why samba share speed is so slow?

Question: I have a PC connected to a modem with Lan and my laptop is connected with wifi. Both of them use ubuntu. The Lan link speed is 100 Mb/s and wifi speed is 72 Mb/s.I want to copy some files from my PC to laptop. I shared my files with samba so that I can access them in laptop. When I copy files into the laptop, copying speed never gets more than 5 Mb/s. So it takes too much to copy all the files. How can I increase this speed?
Answer: Are you sure you're not mistaken on speed units?
Keep in mind that speeds shown for WiFi and LAN networks are most of the time represented in Megabits.
But browser and file manager tend to show speed values in Megabytes.
For example for standard WiFi on 2,4 GHz modem the top speed is 72 Mbps, which is around 9 MB/s. But in real world there are many obsticles for WiFi signals, that slows down the speed over it to much less speeds, like 40-50 Mbps, which gives you  only 5 to 6 MB/s.
The reason why WiFi works unstable and slower than LAN is because of the signals from different WiFi networks interfering with each other. On this frequency there is a narrow range of channels on which WiFi can work.
So the solution for your will be to either connect your laptop over wired LAN, or upgrade your WiFi modem to a 5 GHz device, which has much better performance.
Comment: That's right, and it's the top speed of WiFi over 2,4 GHz transmission, but only in the ideal world. Most of the time it's slower than that and you'll get only 40 or 50 Mb/s. You can test it using i.e. https://www.speedtest.net/. But as I said, browser or file manager often shows speed in MB/s, not in Mb/s so you need to divide this value by 8. For example: 8 Mb/s = 1 MB/s, 40 Mb/s = 5 MB/s and so on.
Comment: I'm not sure about speed unit, but on setting it shows " Link speed: 72 Mb/s"
Comment: Thanks. I didn't know the difference between MB/s and Mb/s @Comar

why samba share speed is so slow?


Comparing two attributes from journey data in journey builder

Question: when im comparing two attribute of number data type that are custom field in account, the decision split says "nullable fields cannot be compared. one of these two fields is nullable". I even tried comparing two text fields but then also it did not work
Comment: I think the error is self-explainatory. You must ensure to make the field required, in the data extension which holds the data evaluated in the decision split.
Comment: I created this custom field in salesforce and my marketing cloud is related to sales cloud. I made the fields Required but then also it was showing the same error. The data entry source for journey builder is salesforce data and not data extension
Answer: There is a known issue where that notification is displayed even when the compared fields are non-nullable: https://trailblazer.salesforce.com/issues_view?id=a1p3A000000KRe8QAG


Distribution of Y from distribution of X

Question: If the PDF of distribution of $x$ is $PDF_X$ and there is a mathematical relationship between $y$ and $x$:
$$y=f(x)$$
is it possible to find $PDF_Y$ ?
If yes, how to calculate it?
Comment: @wolfies what do you mean by closed-form solution?
Comment: No - is not possible.
Answer: For a general function $h$, there is no direct formula to get the pdf of the random variable $Y=h(X)$ knowing the pdf of $X$. There is a formula in case when $h$ is a differentiable one-to-one mapping from the range (the support, I should say) of $X$ to the range of $Y$. I guess from your question that you don't know this formula, so let me give you the picture and the process to derive it.
Take for example a random variable $X \sim {\cal N}(\mu, \sigma^2)$ and set $Y=\exp(X)$.
The animation below shows some simulations of $X$ and the corresponding values of $Y$. The density of $X$ is shown in blue and the one of $Y$ is shown in orange in the vertical direction.

Now the question is: knowing the density $f_{\textrm{blue}}$ of $X$, what is the density $f_{\textrm{orange}}$ of $Y$ ?
Taking a point $y$ in the range of $Y$, the density $f_{\textrm{orange}}$ provides the probability that $Y$ belongs to a small area $\mathrm{d}y$ around $y$ by the formula
$$
\Pr(Y \in \mathrm{d}y) \approx f_{\textrm{orange}}(y)|\mathrm{d}y|
$$
where $|\mathrm{d}y|$ denotes the length of the small interval $\mathrm{d}y$. This probability is the pink area on the figure below.

The probability $\Pr(Y \in \mathrm{d}y)$ also equals the probability $\Pr(X \in \mathrm{d}x)$, shown by the grey area below the blue curve, where $x=\log(y)$ because of $y=\exp(x)$, and $\mathrm{d}x$ is the small interval around $x$. This probability is given by
$$
\Pr(X \in \mathrm{d}x) \approx f_{\textrm{blue}}(x)|\mathrm{d}x|.
$$
It is clear that $|\mathrm{d}x| \neq |\mathrm{d}y|$. Remember that these two lengths are very small, hence the green function - let's call it $h$ instead of $\exp$ - is like a segment on the interval $\mathrm{d}x$, and the slope of this segment is the value $h'(x)$ of the derivative of $h$ at $x$. Therefore $|\mathrm{d}y| \approx h'(x)|\mathrm{d}x|$, and we finally get
$$
\Pr(Y \in \mathrm{d}y) = \Pr(X \in \mathrm{d}x)  \approx f_{\textrm{blue}}(x)\frac{|\mathrm{d}y|}{h'(x)}.
$$
Expressing the right-hand side in terms of $y=h(x)$ instead of $x=h^{-1}(y)$, this gives
$$
\Pr(Y \in \mathrm{d}y) \approx f_{\textrm{blue}}\bigl(h^{-1}(y)\bigr)\frac{|\mathrm{d}y|}{h'\bigl(h^{-1}(y)\bigr)},
$$
or, because of $\frac{1}{h'\bigl(h^{-1}(y)\bigr)}={(h^{-1})}'(y)$, this can be written
$$
\Pr(Y \in \mathrm{d}y) \approx {(h^{-1})}'(y)\times f_{\textrm{blue}}\bigl(h^{-1}(y)\bigr)|\mathrm{d}y|.
$$
By identifying this formula by the one defining the density of $Y$:
$$
\Pr(Y \in \mathrm{d}y) \approx f_{\textrm{orange}}(y)|\mathrm{d}y|,
$$
we finally get
$$
\boxed{f_{\textrm{orange}}(y) = {(h^{-1})}'(y)\times f_{\textrm{blue}}\bigl(h^{-1}(y)\bigr)}.
$$
This is the so-called change of variables formula.
Be careful about one point: this formula is not correct in general. In my example, the factor $k$ relating $|\mathrm{d}x|$ and $|\mathrm{d}y|$ by the approximative equality $|\mathrm{d}y| \approx k|\mathrm{d}x|$ is $k = h'(x)$ because $h'(x)>0$ in this example ($h$ is increasing), and one has to take $-h'(x)$ if $h'(x) <0$. The general formula includes the absolute value:
$$
\boxed{f_{\textrm{orange}}(y) = \bigl|{(h^{-1})}'(y)\bigr|\times f_{\textrm{blue}}\bigl(h^{-1}(y)\bigr)}.
$$
Comment: I'm not sure that $f$ has to be a one-to-one mapping. If it has more than one inverse, you can sum over the inverses. E.g. see [my answer](http://stats.stackexchange.com/a/188225/12100)
Comment: @J.C.Leitão I just mean I give the formula for the case of a 1-1 mapping. Otherwise I can't say $\Pr(Y \in dy)=\Pr(X \in dx)$.
Comment: Just a follow-up question. Does it mean that if $f: X \rightarrow Y$, then sampling $\widehat{X}$ from X and calculating $Y=f(\widehat{X})$ is always equivalent to sampling $\widehat{Y}$ directly from Y?
Answer: Suppose $X$ has a standard normal distribution, then pdf of $X$ is $f(x)=\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}x^2}$
Suppose the mathematical relationship between the random variable $Y$ and $X$ is $Y=2X$. It will be easy to find the pdf of $Y$.
Basically there are two methods to find the pdf of Y
1. use the CDF then take  derivative the CDF.
2. Use variable transformation directly (use Jacobian)
I will show the second method here.
$y=2x \Rightarrow x=\frac{1}{2}y$
$J=\frac{dx}{dy}=\frac{1}{2}$
$f(y)=\frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}(\frac{y}{2})^2}|J|=\frac{1}{2\sqrt{2\pi}}e^{-\frac{1}{8}y^2}$
You can see the pdf of $Y$ is $\frac{1}{2\sqrt{2\pi}}e^{-\frac{1}{8}y^2}$
Answer: As I understand your question, you ask about situation where we have random variable $X$, its density function $f(x)$, and you are interested of finding probability density function of random variable $Y$ defined as $Y = f(X)$.
Such relationship is pretty straightforward for cumulative distribution function, but does not have to exist for probability density function. Recall that

function is a relation between a set of inputs and a set of
  permissible outputs with the property that each input is related to
  exactly one output. (Wikipedia, italics added)

and look at the two figures below showing PDF of standard normal $f(x)$. Every $x$-axis value is related to exactly one $y$-axis value (left figure), but some $y$-axis values are related to more than one $x$-axis value (right figure), so the inverse relationship is not a function. This does not have to be true for all the functions, but only to the ones that are not one-to-one mappings.

If you are interested in probability of observing $f(x)$ values, it can be obtained by simulation. To compute probabilities sample values from random variable $X$ and pass them through density function $f(\cdot)$ the same way as you could make any other transformations of $X$. This enables you to obtain $y=f(x)$ and then compute empirical probabilities for $y$ values. Example of R code for normal distribution is provided below.
hist(dnorm(rnorm(1e5)))

Comment: I think your choice of $f$ is possibly confusing, because it is a *pdf*.
Comment: @StéphaneLaurent thanks, I made the wording more clear.
Comment: Tim, I still don't understand. There are two pdf's in the OP, and a transformation $f$. But you take for $f$ a pdf, that's why I said it is confusing. It would be clearer for example if you took $f(x)=x^2$.
Comment: I may be wrong, but I'm under the impression you misread the question, and you are answering to the question of the law of $f(X)$ when $f$ is the density of $X$.
Comment: @StéphaneLaurent as I understood the question $f$ is is a density function for $X$. Unfortunately OP did not make it clear in his/her question and did not provide any follow-up comments to my answer.
Comment: @StéphaneLaurent now I made it clear in my answer how do I understand the question to be clear about it. Thanks for feedback.
Comment: I don't think so, because he denotes by $PDF_X$ the pdf of $X$. But as you say, now you made it clear how you understand. It is true that $f$ is a bit  mysterious in the OP.
Answer: Yes, it is possible. Let's see how.
When $Y = f(X)$, the conditional P(Y|X) can be written as
$$P(Y=y|x) = \delta(y - f(x))$$
where $\delta$ is the Dirac delta.
The PDF of Y can be obtained by marginalising over X:
$$ P(Y=y) = \int P(y|x) P(x)dx = \int \delta(y - f(x))P(x)dx $$
To compute such integral, we can use that
$$\int h(x)\delta(g(x)) dx = \sum_i \frac{h(x_i)}{|g'(x_i)|}$$
where $x_i$ are the roots of $g$. Replacing it in our marginal with $g(x) = y - f(x)$, and $h(x)=P(x)$, we get
$$ P(Y=y) = \sum_{i=1}^N \frac{P(x_i)}{|f'(x_i)|} $$
where $x_i$ are the solutions of $y = f(x)$.
This is as far as we can go. Nevertheless, this formula evidences that:

the problem can be treated as any other problem of probability: you define the random variables, the conditional probabilities, and compute the marginal;
the solution does not necessarily have a closed formula, but it does not require $f$ to be bijective;
when the function is bijective (single root), this solution reduces to the solution @Stéphane Laurent gave.

I find this solution nice because I don't have to remember it; it is a consequence of the definition of $Y$ and $P(Y|X)$.
Let's take an example: X is uniformly in $x \in [-1/2, 1/2]$, $Y = f(X) = X^2 \in [0, 1/4]$. Compute $P(Y=y)$.
There are two solutions of $y=x^2$ in the interval $x \in [-1/2, 1/2]$: $\{-\sqrt{y}, \sqrt{y}\}$. Moreover, the derivative of $f(X)$ is $2x$. Using the equation above, we get
$$P(y) = \sum_{i=1}^{2} \frac{P\left(x_{i}\right)}{|f'(x_{i})|} = \left( \frac{1}{2\sqrt{y}} + \frac{1}{2\sqrt{y}} \right) = \frac{1}{\sqrt{y}}$$
which can be confirmed e.g. in mathematica:
Show[{Histogram[
   RandomVariate[UniformDistribution[{-1/2, 1/2}], 100000]^2,
   Automatic, "PDF"],
  Plot[1/Sqrt[y], {y, 0.001, 1/4}, PlotStyle -> {Red, Thick},
   PlotRange -> All]}]

If X is uniform in $[0, 1]$ instead, there is only one solution and we get
$$P(y) = \frac{1}{2\sqrt{y}}$$
Comment: $\Pr(Y=y)=0$ if $Y$ has a pdf.


How to select all languages when creating a package?

Question: Are all languages of specific item selected by default, when creating a package (not by default, but if the item exist for that language then it is selected automatically) if I do not have a language filter on? Or I should select all languages manually where the item exist? (English, German, Italian...)
Answer: Yes, all language versions of an item will be packaged if you use the Items statically option in the Package Designer, likewise all language versions will be added if you use the Items dynamically option, and then select do not check any language options within the Language filter.
If an item does not have a version in a particular language, then one will not be packaged.

Hope this helps!


iSight cable for mid 2009 macbook pro 13" help

Question: If my iSight camera no longer works and neither does my bluetooth, should my wifi still technically be working? Aren't they all co-dependent(if that makes sense) or can the fact that my wifi is still functional mean that the iSight camera still works and it's a software problem.
Comment: There is not necessary relationship between your iSight not working and your Wifi, but... there *could* be since the antenna is in the hinge or lid, depending on your model. Is your Wifi working and you think it shouldn't, or is it not working and you think it is related? You might have a worn internal cable and [servicing the camera](http://www.ifixit.com/Guide/Replacing+MacBook+Core+2+Duo+iSight/4771/1) could take care of both problems.
Comment: I kinda wanted to clarify that relationship between the two. Because I wanted to try and disconnect and reconnect the cable from the motherboard and I wash't sure if I did my wifi would stop working.
Comment: Forgive the comments - I missed the title and hope you don't mind the undelete. Flag this if you really want it gone...
Answer: As you can see in step 20 of the take apart guide from iFixit, the camera cable and wireless card are one and the same cable.

http://www.ifixit.com/Guide/Replacing+MacBook+Pro+13-Inch+Unibody+Mid+2009+AirPort+Card/6019/3#s26379

Getting the clutch cover off the display assembly is a bit tricky even for trained technicians and the cable routing is something you will want to be nimble and intentional when removing the connectors from the logic board and especially when repairing parts in the display.
I would say you could rule out software quite easily without taking your Mac apart by just installing a clean OS onto an external drive or USB storage device (be patient if your USB is slow). You could also reseat the cables on the logic board and inspect for damage there without too much harm of breaking things further if you are properly grounded when you open the Mac.
I believe bluetooth is controlled by the airport card and shares the airport antenna, but don't have access to definitive hardware manuals to know for sure. It's hard to guess if your issue is hardware or software just from the symptom.
Comment: Thanks for undeleting, I just did so because I thought I did need to research first before asking. But could I clear one thing up...If they airport and camera are the same cable could you guess as to how my camera doesn't work but the wifi does?
Comment: Camera uses different wires in the cable. Could be logic board issue, connector on the board, damage to the cable where it bends around the clutches or most likely a problem on the iSight board itself. Also, don't delete too many questions - you get banned from asking more if too many are deleted..
Comment: So my best bet is have apple check the problem, since replacing the cable my self might not solve it right? Got it, didn't know I could get banned.


Get parameter from current url

Question: How can I get parameter i.e node id from URL in views link path . Eg. - suppose in taxonomy term's view I am giving field name's custom link path is "document/getParameterFromCurrentURL/{{tid}}". where suppose getParameterFromCurrentURL  is variable or etc so how can i get id from current url in getParameterFromCurrentURL.
Answer: You could try adding a "Global: Null" contextual filter to your Views display, configured to "Provide default value" with type "Content ID from URL".
The Null filter type doesn't change the output of your view. But it would make the Node ID available as a replacement pattern.
Comment: Dear your approach is approx right. I tried adding a "Global: Null" contextual filter to my Views display, configured to "Provide default value" with type "Raw value from URL" and selected path component "2" from drop down. And according to replacement patter my path looks like "documents/{{ raw_arguments.null }}/{{ tid }}" . after first click its working fine but second time it seems its storing in somewhere in cache and after click on other category showing result of old ID. means when i cleared its cache from config performance then again first time its storing right id . plz help
Comment: Problem has been solved :D In advance tabI  removed css caching to none.

Get parameter from current url


Why some trainers don't want to train me?

Question: The first time I played Skyrim was with a female Nord, and I was able to train One Handed and Smithing with Amrem and Ghorza. The second time I played with a female Imperial, I beat their quests but they didn't offer me the option to train. After that I played with a female Redguard and another female Nord character and I was able to train with them. Does anyone knows why his happened?
Comment: These NPCs don't give you the option to level up, it just happens automatically. It might be possible that you missed the notification/it didn't appear? Check your skill levels and see if they did change
Comment: Sorry but the training option doesn't show in the dialog box, I have the regular topics but "I'd like to train in One Handed" never shows, for example. This only happened with my Imperial character.
Comment: Again, this is because they do not give you the option. This happens automatically as a quest reward.
Answer: This is all because patches.
If you remember, in first versions of Skyrim you could take Faendal as your companion, train Archery with him and take your money back from his inventory.
Later on this was removed.
Same stuff with it.
Also, some NPC's are eligible to train you only if you play certain species and gender. Read the NPC's description on wiki, you'll find the full info about any NPC in Skyrim.
Comment: Done, I cheked on UESP and found about this situation, thanks for the answer
Comment: @Ethan Great! I'm glad I could help! :)


Increasing my Raspberry pi Access point connectivity with a USB travel router

Question: I want to use a travel router to increase connection of my raspberry pi AP. How can I use the USB travel router as wlan1. Then Use wlan1 as my AP interface.
Answer: <code>"How can I use the USB travel router as wlan1"</code>... IMHO, your question is far too vague to answer because it depends largely upon which travel router you use, and other specifics you have not included in your question.
I will say that you can use a travel router with your RPi, and will make these suggestions:

Read this,

Select a specific travel router from one of the "usual sources", and read the documentation. FWIW, I like these OK.

Before you invest too much in this idea, perhaps give some thought to the "other issues" you may encounter in your anticipated use-case (traveling, I presume). For example: will batteries be required, Internet connectivity?, etc. I say this not to discourage, only to share my view that RPi may not be the best "traveling companion".


Replacing incandescent bulb with H4 halogen

Question: I have to change the wiring from my old incandescent bulb to the 3 prong H4 connector. How do I know which is the high/low/ground wire?
Comment: What are the colors of the existing wires? If two have the same base but a different trace then they are the feed and the third is the return.
Comment: Why do you need to change them out? Most incandescent bulbs have replacement of the same model in hologen or just about any other thing you can find. It should be fire/forget on these.
Comment: Colors on existing incandescent plug are yellow/white/black. New H4 adapter plug colors are blue/white/green
Comment: Going with higher wattage bulb. Old light is sealed beam. Plug on new bulb is different.
Comment: Do you have relays in the light circuit or does it go straight through the switch? Halogens draw more current and can burn out switches on old cars that don't use relays
Answer: When I've changed sealed beans for halogens, the connector on the back of the sealed beam was the same as the replacement H4- that was for 5 3/4" round lamps though, other types may vary.
Hold the H4 connector in your hand pointing away from you (as if the bulb was plugged in on the other side, with the wires towards you). The vertical pin on the left is ground, the horizontal one across the top is low, and the right vertical is high.
Then find the ground wire - with the lights switched off and both existing lamps unplugged, set a multimeter to continuity mode, and check each existing wire to the negative on the battery. One will show continuity - I'm fairly confident it'll be the black one.
Then set the meter to 0-20v DC, and switch on low beam. Test between the ground wire and each of the other two - one will show 12v, the other zero. Repeat with high beam on and check that it's the other way round.


sudo make me a party? (Are party creation questions OK?)

Question: What is the site's position on "make a character/party" questions like:

Office Space
Warlocks
Answer: The answer to "make me a character" is like 5 pages long, which is barely tolerable.  "Make me a whole party" goes way over the line to intolerable by that measure IMO - it's not a question, it's a work request. I'll note "write my program for me" is frowned on on SO as well.  I'm not against people building CharOp guides, but this probably isn't the best site to host them.
As an addition to the "Office" and "Adventure Time" build questions - this site isn't for discussion or spitballing.  It is for getting answers to actual questions you have or problems you face with running or playing RPGs.  A focused question on "I'm making a Pathfinder samurai archer, how do I balance that with thing X" is fine. A "make Batman!  In all game systems!" is crap and no amount of meta complaining will keep the mods from nuking it. Be advised.
Comment: @PatLudwig: So it's the fault of the question when a user decides to invest several hours to write up a massive answer like Brian did in the warlock question? I wanted to answer the question myself but in a much smaller scale before Brian dropped his MOA² (Mother of all answers ;-) ). The warlock question *didn't ask* for mathematical proof or fully worked out characters - that was alone the answerer's decision and should imho not be discouraged.
Comment: Agreed.  The Warlock question reads like the questioner did some initial research and halted because it was too overwhelming and went looking for someone else to do it for him.  It was awesome of Brian to do it for him, but the answer is overwhelming and I question how many people are going to take the time to read it, plug the builds into Character builder to give it a whirl in order to properly test it.
Comment: @arotter No, it's the fault of the question that it's asking for brainstorming and/or a fully-worked example of a vague idea. "I have an idea, do it for me" is just not a suitable question/problem type for our site.
Answer: I think demanding that a charachter or party be made is bad form and should be discouraged. However, asking about what background or theme or feat would go well with a certain charachter is a perfectly reasonable question, along with a party.  What the person is asking is for someone who knows the breadth of the rules better than them, to bring up or mention ideas and powers that might otherwise be overlooked.
Answer: I think for some questions the actual stating becomes too prescriptive and for a lot of poster too longwinded to follow, and a simple short sweet descriptive answer is sometimes all that's needed.
It would help people link the concept to functionality which some people (I included) struggle with for some games.
Perhaps some other functionality is needed whereby character sheets could be uploaded and viewed separate to the Q&A functionality?
Or full blown break downs of character building could form blog posts on the site?
Essentially, there seems to be a desire for this on RPG.SE and shutting it down with no discussion is going to drive some people away.
Comment: We're sorry and we know that the SE format is not for everyone.  However there is no value to having the front page filled with forum style "thought exercise" questions - build me Batman, build me Harry Potter, build me Darth Vader. That's stock RPG.net fodder along with "sell me on..." and "What if I were to mash up X and y?" It's not that those are bad topics, it's just that they are not topics in the scope of this site.  Real questions to help with real games only.
Comment: You're doing a brave job of reworking the question somewhat into that format, but it's still very marginal from our POV - how do we make this not the gateway to infinite crap? Help us help you.
Answer: Not all game systems are D&D.  Not all character builds- justifications and all- need to be more than a page long.  In some systems asking about developing/optimizing/etc a full party of characters may make perfect sense.  As an example, consider the system 'What is an RPG': a novice RPG group may want to ask about forming a party for that game, which shouldn't really take too much space to answer.  FATE 2.0 characters are also very short, and asking about a party there could be possible too (to give an example from a game people play in significant numbers).


How to change the language in which official Ubuntu documentation (online) is displayed?

Question: The official Ubuntu documentation is available at https://help.ubuntu.com/. Curiously, it automatically displays the content in the locale that the user's browser provides, without any option to change the language. For example, currently when I open the URL https://help.ubuntu.com/lts/serverguide/cups.html, it's automatically in German, but I'd like to read it in English. How may I do it?
Answer: As of 2017-10-12, there is no nice way via the user interface.  There is a bug report asking for a way, bug #1532537.  Please add yourself to the list of affected people.
WORKAROUND
You can call the webpage with the language of your choice by appending <code>.<language code></code> to the URL.  Examples:

https://help.ubuntu.com/stable/ubuntu-help/index.html.en
https://help.ubuntu.com/stable/ubuntu-help/index.html.fr
https://help.ubuntu.com/stable/ubuntu-help/index.html.de
Answer:
As workaround, Firefox have a nice addon that let switch locale quickly.

Quick Accept-Language Switcher by Dan Callahan
Provides a quick way of changing the HTTP Accept-Language header so you can view and test websites with a different locale.

Another one which seems better as you can set it permanently per site basis.

HeaderControlRevived by Torvin
Provides control over HTTP headers (User-Agent, Referer and Accept-Language) on a per-site basis.


Is it ok to learn from C# 2002 materials?

Question: I've found some videos that explain C# but it back to C#.NET when it is first appeared, if I learn from these videos will I learn something that has been removed from the language? will I miss alot?
Comment: Care to reference what the videos are?
Answer: Whatever you find, it should start at C#/.NET 2.0.
Much of .NET 1.0 was refined in 2.0 with generics, and the 2.0 framework is still widely used today; the 3.0 and 3.5 frameworks are enhancements to 2.0, not rewrites.
If you're looking for a beginner book, Head First C# is pretty good.
Comment: Make sure you get the second edition.  I have updated the link.
Comment: I have to add that, the 4.0 is a refined new version. You should go for 2.0, 3.5 (2.0 + features), or go to the newest.
Comment: It can be quite easy to find anything on the net for begginers. Put that on google "learning c# asp.net", and you will find yourself amazed with so many sites. [link](http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Apt-BR%3Aofficial&q=learning+c%23+asp.net&btnG=Search&aq=f&aqi=g-b2&aql=&oq=) It is as easy to find beggining to learn java.
Answer: You 'can', but in my opinion, don't waste your time.
Buy a new book, or go to current websites, and get current information.
Answer: You will miss a good amount of the new features.  I think you'd be better off focusing on newer training materials.  This way you won't have to unlearn all of the stuff from the earlier versions as you learn stuff from the more modern versions.  The .NET of 2002 is very different from the .NET of today.
Comment: However, I did not find a good book for bgeginners!
Comment: @Goma If you only follow one link, I would recommend the [C# Programming Guide](https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx). Take each linked page one at a time, and make sure you understand it before proceeding to the next.
Answer: Absolutely!
There's absolutely nothing stopping you from learning later revisions of the language specification, but by learning from C# 2.0 - you'll get a much better idea of what features are available in each version of the language.
It's worth stressing that the language and the .NET framework are seperate things, and both change between releases of Microsoft's .NET distribution. A great example of this is: in .NET 2.0 we only have WinForms for GUI, however in later releases there are WPF and Silverlight.
Knowing the difference between the language and framework features in different releases is important - if you're targeting the compact runtime or Novell's cross-platform Mono runtime, they only support specific features - knowing your way around is good.
If you're looking for a more 'mainstream' example - many enterprises will only have a specific .NET runtime available as part of their server SOE, so custom developed and industry-specific software usually needs to be written to support older versions of the Microsoft release!
It's still important to be up to date, but at the end of the day - the person with the better holistic understanding of the technology they're using (versus someone who only understands what is the current fashion) is going to do better in the long run.
Hope this helps :)
Answer: You will miss a ton of features. As jkohlhepp said, the .Net of today is much different than that of when it was first released. You can check out Windows Development For Beginners and Web Development For Beginners on Microsoft's site. This is targeted towards beginners (obviously) but there are links to othe resources as well.
Take advantage of Microsoft's MSDN as I think it has great documentation and has helped me along greatly! That is one of the things I love about the .Net languages and that I have found lacking in other langauges (Python has a decent documentation, but it is nowhere the caliber of the MSDN).


OpenSSH: how to disallow weak (<2048 bits) RSA keys

Question: Are there any configs for OpenSSH server to disallow weak (e.g. <2048 bits) RSA keys? I'm aware of PubkeyAccetedAlgorithms which can disallow specific key types, incl. rsa-sha2, as a whole.
Comment: This is an interesting question.
Answer: I can't see it would be run-time configurable, but you could change the compile-time definition of SSH_RSA_MINIMUM_MODULUS_SIZE in sshkey.h and recompile:
#define SSH_RSA_MINIMUM_MODULUS_SIZE    1024

to
#define SSH_RSA_MINIMUM_MODULUS_SIZE    2048

Either that, or just don't install keys that are shorter. It might be possible to scan the users' authorized_keys files for keys that are shorter than that, at least if we accept the length of the encoded key as an indicator of the length of the actual key.
The encoding for a 2048 bit RSA key seems to be 372 characters long, so something like this might match shorter keys:
grep -E 'ssh-rsa [a-zA-Z0-9+/=]{,371}( |$)' file...

Answer: The RequiredRSASize option was added in OpenSSH 9.1, released on October 4th, 2022:

ssh(1), sshd(8): add a RequiredRSASize directive to set a minimum
RSA key length. Keys below this length will be ignored for user
authentication and for host authentication in sshd(8).
ssh(1) will terminate a connection if the server offers an RSA key
that falls below this limit, as the SSH protocol does not include
the ability to retry a failed key exchange.


What does RoutedEventHandler do?

Question: Do I need it?  I've always used it, but recently noticed ReSharper saying to get rid of it.  For example:
feedbackButton.Click += new RoutedEventHandler(OnFeedbackClick);

appears to reduce to
feedbackButton.Click += OnFeedbackClick;

with no issues.
Answer: Both of these code snippet exactly do the same job or in fact they are both same.
In the first example you are explicitly providing a type of the delegate which is a must if you are using 1.1 or 2.0 framework version.
But in the second example you let your compiler  find the appropriate delegate type at the compile time which is known as type inferencing and that works only from 3.0 framework version.
Answer: In C# 1.0 it was mandatory to specify delegates type explicitly. In later versions it become optional, since compiler got type inference for delegates.

What does RoutedEventHandler do?


Should medical conditions be made known to a prospective spouse?

Question: Is having a fibroid something I need to let a prospective spouse know about?
Comment: Doesn't really seem like a relationship with a strong foundation in trust and honesty if you're hiding things.
Comment: Dear @BleedingFingers please read the question properly... the question was edited, so my answer still holds the Du'a. And she isn't asking about religious healing...
Comment: Questions on religous healing and prescriptions are currently off-topic. Relevant meta: http://meta.islam.stackexchange.com/q/853/3487
Comment: Why do yoy'll keep removing my second question about dua?
Answer: As for the Du'a

Whoever desires the harvest of the Hereafter - We increase for him in his harvest. And whoever desires the harvest of this world - We give him thereof, but there is not for him in the Hereafter any share. (Qur'an 42:20)

As for the proposal, you would like to talk fairly disclosing everything. Cuz if he comes out to know about your condition after marriage, then what?
You can explain, it is no big deal, and if planning to expand family, then you can get that operated just before the moment.
Tip: Have patience.
May the creator guide us all.
Answer: It depends on the medical condition.  Some people even agree to medical examinations prior to marriage.
There's a range of fatawa at IslamWeb asking about the necessity to reveal one's specific medical conditions:

infertility (needed);
herpes (needed if contagious or repulsive);
one testicle (not needed);
irregular menses (not needed);
unspecified "psychological disease" (needed if it's a "kind of madness");
past Hepatitis C (not needed);
asthma (not needed).

Islam Q&A list these general guidelines:

The basic guidelines with regard to informing a suitor about illness
  in the prospective wife are as follows:

if the sickness will have any impact on married life and will affect the wife's ability to fulfil her duties towards her husband and
  children;
if it will be off-putting to the husband because of its appearance or smell;
if it is real and permanent, and is not something imagined or temporary that will disappear with the passage of time or after
  marriage.

IslamWeb give these guidelines:

... if it is a repulsive or contagious disease like leprosy, or is a disease that is dangerous and which may be transmitted to the spouse, or children, like AIDS and the like, then it is not permissible to conceal ...


How to prevent fresh peaches from sinking to the bottom of a buttermilk pound cak?

Question: I baked a buttermilk pound cake which was a very thick batter.  The recipe said to dice 3-4 fresh peaches and put them on top of the batter just before it went into the oven.  I did as directed and all the peaches sunk to the bottom and stuck to the bundt pan.  It was delicious but very ungl.  Help!
Answer: Dust them in flour or powdered sugar.
This trick is most commonly used with blueberry muffins.


How can I retrieve my ssh passphrase from gnome-keyring?

Question: I forgot the passphrase for my ssh private key, but it's still stored in gnome-keyring, so it seems to me that I should be able to recover it.  Seahorse lets me recover web site passwords from my keyring, but I don't see a way to recover my ssh passphrase.  Can someone tell me how to do this?
Answer: After some searching and a bit of arguing, two small python programs turned up that do exactly what I needed.  Both were able to dump all the passwords that are stored by gnome-keyring, including my ssh key's passphrase.  (This is secure, of course, because it only works once I have unlocked my keyring.)  See these blog posts for the code:
https://blog.schmichael.com/2008/10/30/listing-all-passwords-stored-in-gnome-keyring/
https://ins3cure.blogspot.fr/2012/07/extracting-gnome-keyring-credentials.html
Thank you, Michael Schurter and Liviu.  I can now simply update my passphrase instead of going through the trouble of replacing my old ssh key on every system where it is installed.
Comment: I think this must have changed with later versions. With Gnome 3.10, the first script only enumerates my Login keys (which "Passwords and Keys" list separately from SSH). I'm still looking for a way to recover an SSH password now.
Comment: Those scripts no longer work on new distros
Comment: Life saver. The scripts work just fine for me on Ubuntu 16.04. Don't forget to install python-gnomekeyring and run as python2.
Answer: You can use Python and secretstorage
import secretstorage

conn = secretstorage.dbus_init()
collection = secretstorage.get_default_collection(conn)
print(collection.is_locked())
collection.unlock()
for item in collection.get_all_items():
    print(item.get_label())
    print(item.get_attributes())
    print(item.get_secret())
    print("-" * 80)

Answer: If gnome-keyring works just like ssh-agent, you don't.  The passphrase cannot be recovered once it is forgotten.  It is used to encrypt the private key and if you forget it...  well that's it.
If it is indeed stored internally, then that's another issue.
Comment: I get the impression that you didn't understood my post. A keyring manager would not work at all if it couldn't recall the passwords stored in it.
Comment: Yedric, yes, my ssh key passphrase is stored my gnome-keyring.  (I thought I made that clear in my first sentence.)  Upon login, gnome-keyring uses my login password to unlock (decrypt) its own storage, which includes what it needs to automatically load my ssh key without prompting me for a passphrase. In order to do this, it *must* be able to retrieve either my ssh passphrase or an unencrypted copy of my ssh key from storage once it has my login password. This works, and I know my login password, so there must be a way for me to retrieve that same data. That is my goal.
Comment: passPHRASE is not the same as passWORD when you are working with ssh.  PassPHRASES are used to encrypt a private encryption key.  PassWORDS are used in lieu of key-based authentication.  Which are you looking for?  PassWORDS or passPHRASES?
Comment: If they're stored at all, something like this will extract it.  http://ins3cure.blogspot.fr/2012/07/extracting-gnome-keyring-credentials.html  The jury is out if ssh passPHRASES are even stored at all, vs cached in memory.  I can't find anything specific.  However, if gnome-keyring works like ssh-agent does, then the passphrase is cached in memory and not stored to disk meaning recovery would not be possible.
Comment: Are you telling us that you have stored your passphrase in your gnome-keyring, similarly to http://www.gentoo-wiki.info/HOWTO_Use_gnome-keyring_to_store_SSH_passphrases ?


Were there 27 more Buddhas before Siddhartha Gautam Buddha?

Question: Were there 27 more Buddhas before Siddhartha Gautam Buddha? If so, are there any evidences of it. How about the finding of Buddhist Stupas and Idols in Harappa civilization?Is it linked with this fact?
Comment: kindly please refer to [this answer](https://buddhism.stackexchange.com/questions/2627/how-many-buddhas-are-there/2634#2634)
Comment: Endless before and endless to come, consider infinite space/time and the cyclical/dynamic/(I-change, I-ching 易經) of the cosmos(es). For instant, 大通智勝佛 (Buddha MahaPrajna?) spent 10 Kalpas in Samadhi to acquire the Buddha Dharma is one other than the 27.
Answer: Were there 27 more Buddhas before Siddhartha Gautam Buddha?
Yes, the Buddha speaks of them in his suttas, many of them from different times/planets throughout the universe(s).
If so, are there any evidences of it.
Other than the suttas themselves, yes in various other religious traditions.
How about the finding of Buddhist Stupas and Idols in Harappa civilization? Is it linked with this fact?
Yes it could be but rather than spending our lifetime endlessly trying to settle historical matters and learn other histories, let us be grateful for what the Gautama Buddha has provided us: a complete, methodical practice towards Enlightenment. We will need to devote whatever spare time aside from job and other duties to achieve what he achieved and the Buddhas after him (Padmasambhava). The other Buddhisms that stemmed from Hinayana Buddhism suggest there is a greater journey towards Complete Enlightenment and complete power, even after initial srotipanna and escaping the force of rebirth.
No need to excavate skeletons--it was hard enough for the Buddha to leave behind what he has and those after him.
Comment: The teaching/practice is more important than history, agree. Unless one developed the Iddhi ability to know directly, else history is just another one telling his version of the story. However, I wonder if Padmasambhava should be regarded as - in the official sequential of Buddhas in our Loka? Padma. is Bud. Shakyamuni in some tradition. Sutra 《佛説千佛因緣經》translated Kumarajiva, few pages only, lists thousand Buddhas and the previous Buddha Dipamkara etc. with very interesting accounts of them.
Comment: Please quote all of these suttas where the Buddha speaks of past Buddhas. Thanks
Comment: @Dhammadhatu If someone convicted to a dictionary that has only collection of A to D the rest E to Z missing, it's futile to reconcile the knowledge on E to Z; Sutra name provided in previous comment. Buddha Dipamkara must have been mentioned in the Pali Sutta as if words of C shared among these two dictionaries. Buddha 樓至 doesn't, same as words of K can't be found in one of the dictionaries.
Comment: @Dhammadhatu It's better to be a Buddhavacana-mysophobe than the fanatics though. Fanatics were the material used by the ambitious to trumpet the Crusade/Holy War. Fanatics lose their mind of discern, the elementary instruction of the Buddha to his students. Even the lame Wikipedia has collected some insights on *pre-sectarian Buddhism* http://en.m.wikipedia.org/wiki/Pre-sectarian_Buddhism, read those others with discern, than believed in blind faith on the promoted Theosophist Edward Conze's.
Answer: Yes there were three Buddha's before Gautam Buddha and they were all historical persons . If you read the travel record of Fahian and huen tsang they clearly write that we have visited the stupa of Kakusandh Buddha , and Kassapa Buddha .  King Asok in his Nigliwa inscription write "here at this place I doubled the size of stupa of Konagaman Buddha " . This is a very clear Indication that Kakusandh Buddha , Konagaman Buddha , Kassapa Buddha were real historical persons and this fact link Buddhist religion with Indus Valley .
Answer: Personally, I do not believe there were any Buddhas before Gotama.
This is why there is probably no evidence.
The idea of past Buddhas is found only a few suttas among thousands, where, in those suttas, the technology mentioned, such as chariot-making or potting, was the same as in the Buddha's time.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/60174/discussion-on-answer-by-dhammadhatu-were-there-27-more-buddhas-before-siddhartha).


Lambda Expressions Mixed with Statements in C#

Question: I have a portion of code in which I must use a function with a parameter obtained via a lambda statement (to simplify, something along the lines of this):
Item.Move(Array.Exists(mainArray, arrayItem =>
(variable == secondArray[Array.IndexOf(mainArray, arrayItem)]))
? secondArray[Array.IndexOf(mainArray, arrayItem)
: new Vector2(-variable.X, variable.Y));

The issue, though, is that in the first operation of the conditional operator, arrayItem is underlined and the error is shown "The name 'arrayItem' does not exist in the current context", even though it is defined in the beginning of the lambda.
Therefore, I tried to add a statement into the lambda, to give an externally defined variable the value of arrayItem, and it brought with it numerous errors.
Is there any way to reference this variable from the lambda expression? I cannot figure out why it is not carried over in the conditional operator.
Answer: Try this:
Array.Exists(mainArray, (arrayItem) =>
    {
        return variable == secondArray[Array.IndexOf(mainArray, arrayItem)];
    });


Send Email Notification of Task to Queue Members

Question: I have recently set up a queue consisting of three associates.  All Associates have valid emails in the Salesforce.  I have tried a couple different settings, but nothing seems to work.  First, I included the queue email and marked the check box to "send email to members".  Then I removed the email address and left the check box marked.  I checked my email deliverability settings and they are set for "all email".  Regardless of what I do, all three users are not getting notified when a task is assigned to the queue.  How can I get the email notification to be sent to all three members when a task is assigned to the queue?
Comment: Welcome to SF.SE. What type of queue do you have? Is the queue for a specif object other than Tasks? If so, that could be the problem. Is the queue assigned to members of a group? Is the Task related to a record owned by the queue? More details of this kind would be helpful.
Comment: The queue is assigned only to the Task object.  The members are three individual users.  The task assigned is usually tied to a record owned by a different user (not one of the tree in the queue).
Comment: Is sharing on the parent record Public or Private? If the queue members don't have at least read permission on the parent record, that could explain why this is happening. Check to make certain the parent record for the Task is being shared with the queue members.
Comment: Yes, all of the members have access to the parent record.
Comment: We had the same problem - Please upvote this idea: https://ideas.salesforce.com/s/idea/a0B8W00000GdkiWUAR/task-queue-notificationstrigger-queue-notification-email-for-new-queue-records. Thanks, Jan
Answer: I've been having the same problem.
I noticed something at this help page: https://help.salesforce.com/articleView?id=task_considerations.htm&type=5

Emails, notifications, and reminders are only sent after tasks are reassigned from the queue to a specific user.

We have setup a process builder with an email alert as a temporary solution.
Comment: I disagree with the above delete vote. It'd be nice to hear a bit more detail, but a workaround is presented here.
Comment: I have not set up an email alert before.  Could you provide some direction on how to do this?  Would it still include the direct link for the task?
Answer: I was able to get an email alert to go out using a workflow rule triggered off of the task ownerid.  When the ID changed to the queue, and email alert goes to all of the members of the queue.


consecutive days problem

Question: I have a problem with my conseutive days counter. I visited the site every day in the last two months. Yesterday the counter showed 62 consecutive days. Today I see 2 consecutive days on my profile page. How can be this possible?
Comment: Have you visited every day, local time, or every GMT day? The days are based on GMT, not local time
Comment: Have you clicked on "2 consecutive days"? It will open a calendar with green background on days you visited the site.
Answer: Are you sure there was no more than 24 hours gap between your logins/visits?
Consecutive days are calculated on the basic of GMT days, so if you don't measure time in GMT, it's safe to assume that day is each subsequent 24 hours period.
On the margin, it would be more fair, it the algorithm would measure the time gap between logins/visits.
Comment: Strictly speaking it's UTC rather than GMT, but your answer is essentially correct.
Comment: Worth noting that simply loading the front page or your profile doesn't necessarily constitute a visit - the Enthusiast and Fanatic badges require that you spend a _little_ time for the day's activity to be counted. Not saying that's what happened in _this_ case, but it's worth knowing in general when it comes to the topic.
Comment: I think there was a 24 hour gap between two visits. I visited the site saturday morning and sunday evening. It should be 2 days in GMT too. (Hungary use GMT+1). I had a bad feeling about that 24 hour gap and I've checked my profile yesterday. It showed me 62 days. It was 15 hours ago, I've made a few reviews at that time too.
By the way: The missing day is saturday.
Comment: @gkovacs90 It's summer time, so Hungary is at GMT+2. A day is between 2am and 2am.

consecutive days problem


Long division: 24158 divided 6

Question: Long division has always been a weakness of mine and some how I've gotten through school and sixth form without it, but i'd like to learn it, it's just that I have a problem with intuition. So I know this may seem silly to a lot of people but I'd really appreciate it if you could guide me through the process of division and provide me with some explanation of what is happening at each step. I know the general process is divide, multiply, subtract, but what is exactly going on here? Could someone explain this to me with regards to the above question if it isnt too much trouble, or a better type of question that would illustrate division intuitively. Thank you.
Comment: its not easy to coach such basics here try Khan academy videos I am sorry it's just if you didn't understand it by now i think it's hard to pick up from answer's here watch a video on Khan academy
Answer: Here, for reference, is the long division, in its usual form on the left and in an expanded form on the right:
<code>             4026                          4026
            -----                         -----
          6)24158                       6)24158
            24                            24000
            ---                           -----
              1                             158
              0                               0
              --                            ---
              15                            158
              12                            120
              ---                           ---
               38                            38
               36                            36
               --                            --
                2                             2
</code>
I begin by approximating $24158$ as $24000$. When I divide $6$ into $24$ and get $4$, what I'm really doing is dividing $24000$ by $6$ to get $4000$ and writing down just the $4$, in a position that implies that there are $3$ more digits to follow. The multiplication $4\cdot6=24$ is standing in for $6\cdot4000=24000$, and the subtraction $24-24$ is standing in for $24158-24000$. This is shown explicitly in the version on the right. After the subtraction, we see that $158$ out of the original $24158$ remains unaccounted for: $4000$ $6$'s are only enough to give a total of $24000$. Again, this is spelled out fully in the calculation on the right.
In the standard calculation on the left we write down only those digits that we need at each step. Subtracting a $0$ does nothing, so there's no need to write down the $000$ in $24000$. I also don't need the entire remainder of $158$ at this point. When I bring down the $1$, I am simply approximating $158$ by a single hundred; this does not contain any positive multiple of $6$ hundreds, so I write a $0$ in the quotient in the position indicating the number of hundreds. I then improve the approximation by bringing down the $5$ and thinking of $158$ as $150$, or $15$ tens. There are $2$ full $6$'s in $15$, so $150$ contains $2$ tens of $6$'s, or $20$ $6$'s; I indicate this by writing a $2$ in the quotient in the position indicating the number of tens. That accounts for $2$ tens of $6$'s, or $6\cdot20=120$; this product is explicit on the right, while on the left I omit the $0$.
To say the same thing in slightly different words, we first determine how many thousands of $6$'s can be accommodated in $24158$, namely, $4$; those $4$ thousands of $6$'s account for $24000$ of the $24158$, leaving the $6$'s in $158$ to be counted. We then determine how many hundreds of $6$'s can be accommodated in this remainder of $158$, and the answer is $0$: a single hundred of $6$'s would already be $600$, which is far too big. Thus, we still have $158$ to account for. How many tens of $6$'s will it accommodate? Just $2$, since $3$ tens of $6$'s is $180$. That takes care of another $120$, leaving only $38$, which accommodates $6$ single $6$'s. And that takes care of another $36$, leaving only $2$ unaccounted for. We can either report the result as $4026$ with a remainder of $2$, meaning that $24158=6\cdot4026+2$, or continue the process by seeing how many tenths of $6$'s can be squeezed into the remainder of $2$, which is, after all, the same as $20$ tenths. $3$ tenths of $6$'s come to $0.3\cdot6=1.8$, which 'fits' inside the remainder of $2$, while $4$ tenths of $6$'s comes to $2.4$, which is too large, so the next digit (i.e., the first digit to the right of the decimal point) would be $3$.
You can also think of division as a kind of repeated subtraction: how many times can you subtract $6$ from $24158$ without dropping below $0$, and how much is left at the end? In this case you can subtract $6$ a total of $4026$ times, and you'll have $2$ left over at the end. But instead of actually subtracting one $6$ at a time, we do it in handy bundles. Since $$10,000\le24,158<100,000\;,$$ we start with bundles of $10,000$ $6$'s. Each bundle contains $60,000$ units, and $60,000>24,158$, so we can't subtract even one of these bundles, and we drop to bundles of $1000$ $6$'s. Each of them contains $6000$ units, so we can subtract $4$ of them without dropping below $0$. That leaves $158$. We can't subtract any bundles of a hundred $6$'s, but we can subtract $2$ bundles of ten $6$'s, leaving $38$. Finally, we can subtract $6$ $6$'s from $38$, leaving $2$ leftover units. Altogether we subtracted $4$ bundles of a thousand $6$'s each, $0$ bundles of a hundred $6$'s each, $2$ of ten $6$'s each, and $6$ single $6$'s, so we subtracted a total of $$4\cdot1000+0\cdot100+2\cdot10+6\cdot1=4026$ $6$'s.
Comment: How would I apply this if the divisor is double figures or more?
Comment: @Assad: You're welcome! If the divisor is larger, the idea remains exactly the same; it's just harder to tell by eye how many times it will 'fit'. If you're dividing $314$ into $456342$, for instance, you'll start by seeing how many bundles of a thousand $314$'s there are; there's one, and subtracting $314000$ leaves you with $142342$. Now you have to determine how many bundles of a hundred $314$'s will fit into that; it turns out to be $4$, which account for another $125600$, leaving $16742$. That accommodates $5$ bundles of ten $314$'s, leaving $1042$, which accommodates $3$ $314$'s, ...
Comment: ... with $100$ left over as a remainder. (Whew!)
Comment: Sorry, I just saw this now. Thank you for your insight Brian, it's cleared up a lot of misunderstandings, i'm indebted to you, thank you again for your carefully written and intelligent responses.
Comment: @Assad: You're very welcome.
Comment: @Brian M. Scott:: How do you calculate 6 divided 24158?
Answer: First start checking digit by digit starting from the left
Is 2 bigger than or equal to 6? No. So we move one.
$\left \lfloor\frac{2}{6}\right \rfloor = 0$. But because $0$ at the beginning of the number don't matter we skip adding them to the answer.
Is 24 bigger than or equal to 6? Yes. It is.
Now we start the so called "DMS (Divide, Multiply, Subtract) loop".
$\left \lfloor\frac{24}{6}\right \rfloor = 4$ So $4$ is our first digit of the answer. Now we multiply $4 \cdot 6 = 24$ and we subtract that from 24 and we'll end up with $0$. Now we add all the remaining digits to this number, so this leaves us with 158. So we repeat again.
Is 1 bigger than or equal to 6? No. So we move one.
$\left \lfloor\frac{1}{6}\right \rfloor = 0$. But this time we add zero, because we already have a digit in the answer.
Is 15 bigger than or equal to 6? Yes. It is.
Now again we apply DMS.
$\left \lfloor\frac{15}{6}\right \rfloor = 2$. So $2$ is our third digit no we multiply $2 \cdot 6 = 12$ and subtract that from $15$. This leaves us with $3$. Now we add the remaining digits, actually a digit in this case. So now we have $38$
Is 38 bigger than or equal to 6? Yes. It is.
$\left \lfloor\frac{38}{6}\right \rfloor = 6$. Now we add 6 to the answer and subtract $6 \cdot 6 = 36$ from $38$. This leaves us with $2$. Beacuse this is our last digit we stop (Note taht if we wanted to get a decimal we need to add $0$'s to $2$, but we have to add a comma to the answer).
So $\frac {24158}{6} = 4026$ and remainder $2$.
Comment: Thank you so much! It was the thing with the placement of the 0's that confused me!
Answer: A possible 'intuitive guidepost', is to always have an estimate of the answer before you begin. One thing to always remember is that when using the $\text{Base-}10$ system, you are an 'instant expert' at multiplying and dividing by $10$. So, take the 'lazy approach' and get an estimate.
Now $6,000$ goes into $24,158$, but $60,000$ is no good. So the answer is between $1,000$ and $10,000$. Since $6 \times 4 = 24$, you know the answer is over $4,000$. You might also intuitively see that the final answer is 'real close to' $4,000$.
After getting this estimate you can work on the problem using long division. But now you are so close, just continue 'carving out' the answer:
$\frac {24,158}{6,000} = 4 + \frac{158}{6,000} \text{ iff }$
$\tag 1 \frac {24,158}{6} = 4,000 + \frac{158}{6}$
Again,
Now $60$ goes into $158$ but $600$ is no good. Also, $6 \times 2 = 12$.
$\frac {158}{60} = 2 + \frac{38}{60} \text{ iff }$
$\tag 2 \frac {158}{6} = 20 + \frac{38}{6}$
Again,
Now $6$ goes into $38$ but $60$ is no good. Also, $6 \times 6 = 36$.
$\tag 3 \frac {38}{6} = 6 + \frac{2}{6} \; \; \text{ Division 'breakdown' Complete! }$
Combining (1) and (2) we get
$\tag 4 \frac {24,158}{6} = 4,000 + 20 + \frac{38}{6} = 4,020 + \frac{38}{6}$
Combining (4) and (3) we get
$\tag 5 \frac {24,158}{6} = 4,020 + 6 + \frac{2}{6} = 4,026 + \frac{2}{6}$
This 'carve-out' method is really long division, but you organize your work in a different way.

Long division: 24158 divided 6


Thunar mounts as root

Question: I have 4 hard drives. On the first one I have my operating system, that's fine. The others are empty with ext4 file systems. When I try to mount those with thunar (and xubuntu) it mounts those with root owner. Why?
Answer: Because they are still owned by root. You need to chown the new partitions.
You'll want to make sure the partitions are mounted, if you want to mount them at boot, then ensure they are set up in /etc/fstab.
The basic syntax for chown being
sudo chown user:group /path/to/partition

so if you're user/group is bert and the partition is mounted at /mnt/tmp then
sudo chown bert:bert /mnt/tmp

If you want to also deal with the access permissions for the partitions then chmod is you're friend.
To make the partition read/write/execute for user and group then
sudo chmod 770 /mnt/tmp

An excellent source of information for chmod - including a graphic representation tick box - http://ss64.com/bash/chmod.html
Answer: I found a permissions problem that cause Thunar to mount everything as root.   There is a directory /media/<username>/ that Thunar will attempt to use to mount volumes as your user.   If this volume is not owned by you, it appears that Thunar reverts back to mounting volumes as root in locations such as /media/usb0.
To fix this problem, just change the ownership of the directory in question to yourself:
sudo chown `whoami`:`whoami` /media/`whoami`/

Thunar mounts as root


element with scrollLeft is scrolling faster than the rest of the document

Question: I have an element which has a fixed position, but has the ability to scroll left and right using a jQuery calculation which I used from this example on JsFiddle.
$(window).scroll(function(event) {
var x = 0 - $(this).scrollLeft();
var y = $(this).scrollTop();

// whether that's below the form
if (y >= top) {
    // if so, ad the fixed class
    $('.scroll_fixed').addClass('fixed');
} else {
    // otherwise remove it
    $('.scroll_fixed').removeClass('fixed');
}

$(".scroll_fixed").offset({
    left: x + leftInit
});

});

The solution works well until I have to scroll to the left, where the element being scrolled "parallaxes" against the rest of the document - i.e, it scrolls about twice as fast as the rest of the document.
I know this is a problem with the jQuery calculation, but was wondering if anybody has come across this before? and if so, how did you tackle it? I am at a bit of a loss....
edit
problem solved - It was because the code was using $(window).scrollLeft(); instead of the parent element within the scope of the element i was wishing to manipulate.
the wrapper div was classed as "wrapperDiv", so I used $(".wrapperDiv").scrollLeft();
I would mark this question as asked, but as I am new to Stack Overflow i cannot answer for a further 7 hours....
Answer: Just to flag this question as answered:
"It was because the code was using $(window).scrollLeft(); instead of the parent element within the scope of the element i was wishing to manipulate. The wrapper div was classed as "wrapperDiv", so I used $(".wrapperDiv").scrollLeft();"


Extending 12/3 existing wiring

Question: There's a 12/3 existing wiring in my hallway that runs up to the light fixtures. I want to extend the 12/3 wiring to a bedroom to add a smart switch and recessed lighting. If I pigtail 12/3 from the power in going to the light switch in the hallway and send the cable to the bedroom to a smart switch would that work?
Comment: What power is already in the bedroom?  Can you provide pictures of the switch box you want to run power from?
Comment: Can you post photos of the inside of the switch box in the hallway please?
Comment: The bedroom only have black, white and ground, whereas in the hallway there is white, black, red and ground.
Answer: First thing is you need to determine if that box (picture) is two circuits with a shared neutral, called a MWBC.
You weren't clear what lights are on that box, and what lights you are going to have on the smart switch.
I presumed the smart switch is going to control the recessed lights and all that is going to be in the bedroom?
What do you have to test voltage with?
(How much is already on the circuit/circuits?)
If it is split (MWBC), then you will only be using one circuit (a hot and a neutral).
Warning, you must have BOTH circuits turned off before you do this (or you can blow something up on the live circuit!
You could also get electrocuted.
Do NOT mistake the red wire in your box (pic) for the Red wire in a smart switch diagram!
[UPDATE-adding question (can't comment yet, until I get 2 more up-votes)]
Did you mean 12-2 wire?
12-3 has a black, red, and white wire; 12-2 has black and white.
12-3 w/g (with ground) has black, red, white, and bare ground.
If you mean 12/2 G, then your project makes more sense to me.
Also, mostly curiosity; is that box (pic) mounted on a stud?
It looks like the drywall is patched on all four sides.
I would recommend adding 'F' clips, but the plaster ears are not on that box,as far as I can tell. (and that patch looks wafer thin anyway at the ear ends.)
So does the switch fit in that box? Looks like it is in another box, no room here, and no pigtails visible...
If you meant 12/2, then my advice above is still applicable.
@FreeMan Thanks for the assistance, fixed those in my post.
Comment: Please don't put a signature in your answer, especially one that's different than your user name. The signature that's now in the middle of the post makes it look like you're addressing someone else and is very confusing. Also, I'd [advise](https://www.merriam-webster.com/dictionary/advise) you to change your last sentence to use the word "[advice](https://www.merriam-webster.com/dictionary/advice)".

Extending 12/3 existing wiring


Why do some microchips have a mirror-like surface?

Question: I have a few development boards I was working on and I noticed that a few of the microchips have a completely mirror-like surface on top of the chip. The chips tend to be very small, just a few millimeters wide and deep. What is on the surface of these chips and why?
Answer: These are probably chipscale packages.  So you're looking at the top of the actual silicon die.  The bottom is processed so that there are solder balls for connection to the PCB.
If you've ever seen a silicon wafer you know that it's polished to a mirror like silvery-gray finish.
One issue you can sometimes have with CSP devices is that they can be sensitive to light, since the silicon is exposed.
Comment: Technically the mirror surface of the silicon die is the "bottom" of the die. Particularly if one considers that all the diffusions and metalization layers are implemented on the "top" of the die.
Comment: Absolutely correct from a technical and IC design viewpoint, but users tend to think of the bottom of a part being the side that attaches to the PCB and the top the side that faces up. So maybe it's the bottom of the die and the top of the IC at the same time?
Answer:
What is on the surface of these chips and why?

You are seeing the silicon die of the chip itself. This isn't a new phenomena.

Figure 1. An Intel 1702A EPROM, one of the earliest (1971) EPROM types, 256 by 8 bit. The small quartz window admits UV light to the chip for erasure. Source: Wikipedia [EPROM}(https://en.wikipedia.org/wiki/EPROM).
What has changed is the packaging. In the photo the gold wires are bonded to the top of the chip and out to the lead frame. With surface mount the connections between chip and board are made out of sight below the chip.


Simulating noise signals in Multisim

Question: I would like to simulate the effect of noise in a circuit built in Multisim so that I can make better component choices to improve my design. The main source of concern for me is that the circuit will be affected by noise created by ambient sources of electromagnetic radiation since there will be IR LED/phototransistor pair in the circuit, where the IR LED will modulate a 20kHz square wave signal. Can anybody make any suggestions as to how I would do this?
Comment: Doesn't MultiSim contain a noise source and noise analysis mode?
Comment: @JoelB - I don't know, I've never attempted to simulate the effect of noise in a circuit before, so thanks for the heads-up.
Answer: It is possible.  Check here for instructions.

Simulating noise signals in Multisim


Finding Taylor/Laurent series for complex functions? - confused about general method

Question: I'm confused about the correct method for finding Taylor/Laurent series for complex functions. For example, I'm given this function $$ f(z) = \frac{z^2-1}{(z+2)(z+3)} $$ and I need to find the Taylor/Laurent series centered at $0$ for all $z \in \mathbb{C}, |z| \neq 2, 3$. From my understanding, the technique is to split the problem into three regions: (i) $|z| < 2$, (ii) $ 2 < |z| < 3$ and (iii) $ |z| > 3$, and then manipulate the denominator to obtain a geometric series. However, I'm having trouble understanding what series representation is valid in what region. For example, for (i) $ |z| < 2$ I would do first: $$ f(z) = \frac{z^2-1}{(z+2)(z+3)} = \bigg( \frac{1}{2+z} - \frac{1}{z+3} \bigg) z^2 - 1. $$ Then the first term I would write it as $$ \frac{1}{2+z} = \frac{1}{2} \frac{1}{1 + \frac{z}{2}} = \frac{1}{2} \sum_{n=0}^{\infty} (-1)^n \big(\frac{z}{2}\big)^n. $$ Similarly for the second term $$ - \frac{1}{z+3} = - \frac{1}{3} \frac{1}{1 + \frac{z}{3}} = - \frac{1}{3} \sum_{n=0}^{\infty} (-1)^n \big( \frac{z}{3} \big)^n. $$ So for the first region I would have $$ f(z) = \bigg(\frac{1}{2} \sum_{n=0}^{\infty} (-1)^n \big(\frac{z}{2}\big)^n - \frac{1}{3} \sum_{n=0}^{\infty} (-1)^n \big( \frac{z}{3} \big)^n \bigg) z^2 - 1. $$ Now, for the second region, where $2 < |z| < 3$, I'm not sure what I would have to change in the above representation. How do I know when a certain series is valid?
Answer: In the first region you have, as observed, $|\frac z2|<1$ and $|\frac z3|<1$.
In the second region, $|\frac 2z|<1$ and $|\frac z3|<1$.
In the third region, $|\frac 2z|<1$ and $|\frac 3z|<1$.

For the geometric series you use that, for example,
$$
\frac1{z+2}=\frac12·\frac1{1+\frac z2} = \frac1z·\frac1{1+\frac 2z}.
$$


Cumulative Reports in salesforce

Question: Can you please help with any references to create a report as Below.

Here, Cash Inflows/benefits, Cashoutflows/Costs are Rollup & Formula fields.
Kindly suggest , Shud i go for VF/ Can we achieve it by Reports
Thank you so much
Comment: What SF Objects hold the data in the above report?
Comment: Custom Objects- Benefits & Costs holds the data.
These two has lookup for Workrequest Object, Need to get the report of Lookup Fields, Please suggest shud i go for Reports / VF Page
Answer: Without understanding the data schema it is speculation as to whether what I'm proposing would work in your situation but:
If you are summarizing line items or related opportunities/orders to a master object then you could do the first and second table through reports and as separate dashboard components with the date running vertically in dashboards.
Answer: First of all: reporting is all about data. You can only report on what you have. You're asking specifically about cash flows as used in bookkeeping.
In salesforce there is currently no stanard object to track that, however it's easy to (ab)use or extend something existing or create a few custom objects and a clean datamodel.
For instance you could use opportunities or orders at a specific state to monitor inflows, with negative amounts even outflows. IMO this isn't the very best approach but I've seen this pattern very often on client orgs. If you have a deal, cool thing with opps+orders are lineitems, products and pricebooks OTB and even schedules (for subscriptions/repetitions). But if your focus is cash and it's flow, I see it more as invoices and payments. Just imagine that you could charge many orders on one invoice and partial/incomplete payments, refunds etc.
I think salesforce is fine for cash flow, but way better with a handfull custom streamlined objects.
This said, if you have decided on which entities to be used as data sources, the grouping and rollup (first 4 of your lines) should be quite vanilla standard report functionality. There tons of videos and documentation on that:

https://www.google.de/search?q=salesforce+reporting&num=100
https://help.salesforce.com/apex/HTViewHelpDoc?id=reports_builder_editing.htm

I don't see the need of custom rollup summary fields unless you're creating your own custom lineitems.
Then you have a line with EPS and several lines in your second box. You need to figure again first the data sources and then the formulas. Whether you can use standard reports or VF+Apex is highly dependent on that. Standard reports have thier limits but if your  models+formulas aren't too complex use them.
Alternatively there also financial apps on appexchange.
An other wide spread approach is to integrate a third party ERP or financial system and mirror or display some data from it. Again you could use VF or standard reports.

Cumulative Reports in salesforce


Is the parity operator an observable?

Question: I'm trying to justify whether the parity operator is an observable in quantum mechanics, and if so, why. I'm at a loss here, any advice on how to tackle this problem?
Answer: According to N. Zettili's "Quantum Mechanics: Concepts and applications" book, he takes as foundation of the theory five postulates, and the second one of them is the following:
"To every phisically measurable quantity $A$, called an observable or dynamical variable, there corresponds a linear Hermitian operator $\hat{A}$ whose eigenvectors form a complete basis".
This would make the parity operator an observable, for it is a linear, hermitian operator, i.e. $\mathcal{P}=\mathcal{P}^{\dagger}$. Note also that the parity operator is defined up to a phase of choice, of unitary magnitude, the usual choice for this phase is made so the operator is an observable.
Maybe you can use a deeper explanation given here.
Comment: Bit backward, perhaps - He's not saying that for every linear hermitian operator, there corresponds a physically measurable quantity.
Comment: What you say is totally true, there is no reason in advance to take the statement as true in the opposite direction, but we really talk about observables when some quantity is represented by a linear hermitian operator. On the other hand, parity is indeed a measurable quantity, and each fundamental particle has an intrinsic parity. @Slereah
Answer: Yes, parity can be thought of as an observable. It's eigenvalues are $1$, corresponding to a state that is symmetric under a parity transformation, and $-1$, corresponding to a state that is anti-symmetric under a parity transformation. When you measure parity, you are measuring whether your state has one symmetry property or the other.
Not sure from a practical standpoint how you would build a machine that measures parity, but if you did, you would get the same behavior as any other observable. All states can be written as linear combinations of states with definite parity (eigenstates of $P$). You will measure $\pm1$ with probabilities that depend on your initial state, and after measurement, the state will collapse into a state with definite parity.
Answer: The intrinsic parity of a proton is listed as +1 and of an antiproton as -1, but this is purely a convention. Fermion and antifermion must have opposite parity, but we could equally well take the proton to have parity -1 and the antiproton as +1, provided we did this consistently.  You can't measure the (absolute) parity of a proton, so this provides a case where parity is not an observable - under any sensible definition of the word observable.
Comment: You can't measure "absolute" position either. Under one choice of origin, a particle may be located at $x=1$, while under another choice, the particle may be located at $x=-1$. That doesn't mean position is not an observable in quantum mechanics.

Is the parity operator an observable?


My wife wants to peg me, is this Halal?

Question: The other day my wife asked if she can peg me because it is something she has wanted to do for a long time.
My question is: is this haram?
Comment: It is alright between couples as long as both agree
Answer: my friend, in relation to your question, if you do not want to do this, then yes, your wife has done something haram. Sexual intercourse and what happens in that case must be agreed upon by both parties, and this is my answer based on the opinion of Islamic religious scholars.
Answer: No way.
In Islam, sanctity and proper behavior within the bounds of marriage are clearly defined and what you are saying deviates from these rules.
The idea of pegging is explicitly forbidden because it comes under sodomy which is a major sin. According to Islam, the act itself is considered an attack on the respect and sanity that sexual relations are supposed to embody in a marriage.
In Islam, sexual intercourse is considered not only a means of procreation, but also a means of cultivating love, kindness and closeness between husband and wife.
Actions that deviate from the conventional and ethical system established by the Shari'ah are considered haram.
Remember that the instructions given in Islam regarding marital relations and sexual behavior are to ensure that Muslim activities  are in accordance with the divine will as communicated through  Quran and  Hadith.
It is important to adhere to these rules to preserve the virtue and sanctity of the marital relationship as intended by Islam. If you are looking  to improve intimacy and cooperation in your marriage, focus on strategies and approaches that align with Islamic teachings, always prioritizing your happiness and comfort.

My wife wants to peg me, is this Halal?


Precessing of the Earth

Question: It's been known that the Earth's axial tilt varies from 22.5 to 24.5. Does this result in a wobbling while the value of the tilt varies about these two limits? If so, how does it affect the mechanics of the Earth's movement (its rotation and revolution about the Sun)?
Answer: The Wikipedia Precession article explains this.
Precession of the Earth's axis is caused mainly by the Sun's gravity acting on the oblate spheriod of the Earth. The Earth bulges at the equator and the force of the Sun's gravity on the bulge makes the axis wobble like a child's spinning top - the axis traces out a cone shape in space. It has no effect on the Earth's orbit.
Perihelion precession is caused by the gravity of Jupiter and the other outer planets.
Answer: Based on what I can access right now, the precession of Earth's axes are in a cone shape, so there isn't much wobble. But with all of those Near-Earth Objects, and nearby planets, there is probably some wobble (I'm no professional).
There's also this thing called the Milankovitch Cycle, which shows how the combined effects of precession, external forces, and etc. affect climate. It also affects the eccentricity, or the circularity, of Earth's orbit in a cycle of 430,000 years. This affects seasonal length and season intensity. It also changes orbit orientation, so the perihelion and aphelion move to different locations. If you want to learn more, read https://en.wikipedia.org/wiki/Milankovitch_cycles.

Precessing of the Earth


Gnome session log getting too large

Question: Under my user a hidden system folder .cache/upstart/ is getting insanely large - 99G. This is mainly due to a file gnome-session.log. Does anybody know what this folder is and why it may get so large? Can I safely remove the file?
Answer: I had this problem also, gnome-session-Unity.log file was getting large.
Before this I installed the scratch programming environment, this programm has the squeak-vm dependencies also installed 1st time on this machine. The squeak-vm was locked on the launcher, the line in the gnome-session-Unity log file
    (zenity:3190): GLib-WARNING **: /build/buildd/glib2.0-2.40.2/./glib/giounix.c:410Error while getting flags for FD: Bad file descriptor (9)

this entry was repeated and the file getting bigger.
Also a window from squeak-vm was opened and couldn't normally close that window.
In order to solve the problem I uninstalled the scratch package and the squeak-vm package, close the window from squeak-vm with xkill.
Environment: Ubuntu 14.04 , scratch 22.214.171.124~dfsg1-5, squeak-vm 1:188.8.131.5214-1ubuntu2, zenity 3.8.0-1ubuntu1
Answer: It's just a log, so yes, you can safely remove this file.
Comment: I would also like to understand what is growing so much this file - it seems full of log of this error             kbuildsycoca4(21468) KBuildServiceFactory::populateServiceTypes: "/usr/share/applications/shotwell-viewer.desktop" specifies undefined mimetype/servicetype "image/x-mrw"
Comment: I don't know, however there is a bug on Launchpad which describe similar situation. https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1269838 Maybe there you will be able to find solution.

Gnome session log getting too large


Could you please simplify the highlighted part in simple English

Question:
Lindsey Aloia (Rollins College) and Denise Solomon (The Pennsylvania State University) published their findings in the journal Human Communication Research. Aloia and Solomon studied 50 romantically involved couples and found that the more intense the conflict interaction was rated between the couples the stronger the physiological stress response to the conflict. This relationship, however, was weakened for individuals who reported a higher level of childhood exposure to verbal aggression. For the experiment the couples provided saliva samples to determine their baseline cortisol levels. They were then interviewed separately about the most stressful areas of conflict in their relationship and filled out a questionnaire that asked about their childhood experiences with verbal aggression. Following the interview, partners were asked to sit together and discuss an area of conflict alone for 10 minutes. The sessions were videotaped. After the discussion the couples were separated again and provided two additional saliva samples over a period of 20 minutes after the conflict. Trained judges then watched video recordings of the couples and rated the intensity of the conflict communication of each couple. Finally, cortisol levels were calculated to evaluate experiences of stress using the collected saliva samples.
Previous research has examined the experience of conflict within a multitude of relationships. These studies make it clear that conflict can produce a number of negative outcomes. For example, exposure to conflict has been linked to depression, distress, and anxiety; feelings of hurt and anger; relationship dissatisfaction; and subsequent physical violence. Recent efforts point to the role of physiological processes in understanding the variation in individuals' experiences of interpersonal conflict . Considering the physiological implications for stress and viewing interpersonal conflict interactions as potential stressors highlights how experiences of conflict are shaped by both the demands of the interaction and people's adaptive capacity to handle that stressor.
Comment: I hereby award this fantastic piece of research the Real Fox Prize For Achievements In Pointing Out The Bleeding Obvious.
Comment: "This just in: we're different because we're different."
Answer: New evidence suggests that our biological differences are related to differences in the ways we experience conflict.
Comment: +1 for an elegant simplification of that turgid sentence.


Why can't I use assign operator on multiple bits?

Question: For the below image, why does assign out = a&~sel + b&sel only output one instead of the ref solution below? Is there any way to do this problem with assign only?
Answer: Looks like I'm too new to comment here, but I wanted to expand on the previous answer. With one-hot mux selects, that you want to synthesize into an and-or tree, you can't use the ternary conditional operator. You have to use the replication operator. This is one thing that vhdl (I think) does better than verilog.
assign foo = in1 & {WIDTH{sel1}} | in0 & {WIDTH{sel0}} ;

If the original questioner tries something like this to replicate the select, it should work. But ternary conditional is preferred. So is if/else inside an always block.
Answer: Could that be because the sel is just one bit wide?
If you wanted to use that, you'd probably have to extend the sel to the same width as the other inputs.
Quite frankly, I don't know why'd you want to do it that way (the (a & ~s) | (b & s) way), really. Just use the ternary operator as suggested - it really is easier to read and less cluttered. (Sure it may be confusing at first, but you'll get used to it quickly.)


integer solutions to quadratic forms

Question: How does one solve the diophantine equation $x^2 + y^2 = z^2 + w^2 $?  Can solutions be parameterized in three variables analogously to the Pythagorean triples case?
Comment: By rearranging your formula, you get to the equation $(x-z)(x+z)=(w-y)(w+y)$.  Basically $x-z$ and $x+z$ can be viewed as independent variables (the slight catch is that they have the same parity) and similarly for the right hand side.  So in effect you want to solve the equation $ab = cd$ where $a = b \pmod{2}$ and $c = d \pmod{2}$.  By letting $a$ and $b$ vary you then want to find all the different factorizations of $ab$ with a constraint modulo $2$.
Comment: A good starting point is http://www.research.att.com/~njas/sequences/A004018, which will tell you the number of ways to write $n$ as the sum of two squares, and give you some references. See also http://mathworld.wolfram.com/SumofSquaresFunction.html
Comment: +1 Eric Tressler.  Expanding on is comment, the relevant equations on the mathworld page are labeled 16-18. Basically, your question boils down to finding the splittings of the prime factors of $n=x^2+y^2$ that are equal to 1 mod 4.
Comment: Matt's approach is the way I would go.  It's worth noting that a similar approach works for Pythagorean triples and, with a little effort, for Pythagorean quadruples x^2 + y^2 + z^2 = w^2 as well.
Comment: Also (especially for rational solutions): make the substitutions w:=x+h, and the equation becomes linear in x. Use y,z,h as parameters and solve in x. Normalizing gives a parametrization for integers solution also (with some care about parity).
Answer: Here is the standard geometric argument: after extracting common factors, you are asking for rational points on the quadric $Q\colon x^2-w^2=z^2-y^2$ in $\mathbb{P}^3$, which is isomorphic to $\mathbb{P}^1\times\mathbb{P}^1$ (as Matt Young's comment explains). Projection from a point on $Q$ gives a birational map $p:Q\to \mathbb{P}^2$ hence a rational parameterisation of $Q$. Explicitly, projecting from $P_0=(0:1:0:1)$ to the $(w=0)$-plane gives the parameterisation
$$
p : (a:b:c)\in\mathbb{P}^2 \mapsto (2ab:c^2-a^2+b^2:2bc:c^2-a^2-b^2) \in Q
$$
of all the points except for the two lines on $Q$ passing through $P_0$ - i.e. the intersection of $Q$ with the tangent plane at $P_0$, which are $z=w$, $x=\pm y$. Notice also that the points $\{b=0,a\ne\pm c\}$ all go to $P_0$, for the same reason.
The advantage of this method is that there is nothing particularly special about the quadratic form $x^2+y^2-z^2-w^2$ here; the same argument parameterises the rational zeros of any nonsingular quadratic form in 3 or more variables, as soon as it has one non-trivial zero.
Comment: Right.  As for finding the first non-trivial zero, that is what the Hasse principle is for.
Comment: The one thing which is somewhat special about the quadratic form $x^2 + y^2 - z^2 - w^2$ is that its discriminant is a square in the ground field, so the quadric surface is isomorphic to $\mathbb{P^1} \times \mathbb{P}^1$.  Otherwise it would -- assuming it has a rational point -- merely be birational to $\mathbb{P}^1 \times \mathbb{P}^1$.

integer solutions to quadratic forms


Calculating band depth image for M3 data

Question: I am working with chandrayaan M3 hyper spectral data. I need to create a band depth image for identifying mineral abundances. How do i calculate the continuum reflectance value for producing a band depth image? Is that a constant value for the whole band or should i calculate the continuum reflectance for each pixel of the band. The formula given for calculating band depth is BD = 1- Reflectance at a specific wavelength(R1450)/Continuum reflectance at that wavelength(R1450i).
Comment: How can we calculate band center in Envi
Answer: There are many methods for creating band depth images. So, it depends on the method that you are using. if you want simple Band depth analysis, you can use

I'm working on ENVI software and it has a tool named Band Math. using that tool and the expression, we can get Band Depth Image.
Comment: Thanks @djhawk vek. Please clarify this. Band math does a pixel by pixel analysis. Should i calculate Continuum reflectance value(Rc) for each pixel as each pixel has a varied spectral signature? or is Rc value is a constant for each wavelength?
Comment: Rc value varies for each pixel. And what Band Math does here is, it applies the 'math expression' for the selected bands to all the selected pixels or simply the pixels of the spatially sub-setted region. If you want a Depth vs wavelength profile, select all the available bands of Reflectance spectra for Rb and that of Continuum Reflectance for Rc.
Comment: For Continuum Spectra, you can use  ' Br/Bcr ' in Band math. Where Br is the Reflectance Spectra and Bcr is the Continuum removed Reflectance.   And Continuum removed Reflectance can be obtained from Continuum removal tool provided in ENVI


Is there good examples for building a transaction using serialization-lib?

Question: I am trying to find an example of building a simple Tx of ADA in, ADA out type of transaction using sterilization-lib to get cbor and pass it to Wallet.signTx(cbor). developer.cardano.org has a great cli documentation and walkthrough, if only the same could be available for web-based application.
Answer: This answer is a little sidetracked, But may be useful for you and others :)
If you are open to integrating your application with Typhon Wallet then its DApp connector is very simple and developer-friendly which does not require you to build a transaction in your application.
Below is a simple payment transaction using Typhon Dapp Connector,
<code>const paymentTransactionResponse = await window.cardano.typhon.paymentTransaction({
  outputs: [
    {
      address:
        "addr_test1qz7jw975stagnvs00wsjny6y6gpazn86yvwcm2vy02j3up7mt68vuzvz4nzgs00x0shrgywvy674v6r2zcs8fxvvq27qfjq8np",
      amount: "6000000",
    },
  ],
});
</code>
that's all needed in your application to build a transaction, You can also add tokens, metadata, datum, and minting with this.
More examples, https://docs.typhonwallet.io/examples/paymentTransaction.html#sending-ada

NOTE: Typhon Dapp Connector does not follow CIP-30
Comment: Thank you so much for the answer. I will give it a look. But I am trying to use the more general CIP0030 convention in order to build wallet-agnostic dapps. Nami also has simple methods like the one above. These are great solutions for quick fix, however, being wallet-agnostic I guess is a great feature and also assure longevity of the dapp
Comment: I completely agree with your point on dapp needs to be wallet agnostic, but this is not a solution for a quick fix instead this approach is more developer-friendly. Dapp developers job is not to read cardano specs, do UTXO selection, fee calculation and what more, Instead developer should be more focused on building DApp application logic.
Answer: There are examples here:
https://developers.cardano.org/docs/get-started/cardano-serialization-lib/generating-transactions
https://developers.cardano.org/docs/get-started/cardano-serialization-lib/create-react-app
And I have created a repo with a working example of how to connect to web-wallets, build and submit transactions using the serialization lib:
https://github.com/dynamicstrategies/cardano-wallet-connector
All the best!


Where does youtube store so many videos?

Question: If we are to make something like youtube, then what should be the approach with respect to storing the videos? Any idea about what youtube does ?
Comment: http://highscalability.com/youtube-architecture
Answer: Google doesn't just store a lot of data on a lot of servers, they have written software that distributes the load and storage automatically, while recovering from hardware faults transparently (like BigTable and Map/Reduce).
The alternative is:
a. You use someone else's infrastructure (Amazon S3, Akami)
b. You use expensive storage vendor's products (NetApp)
c. You write your own system similar to Google's
Facebook recently switched from a combination of A and B to C for their photo storage as it grew to unmanageable proportions.
Answer: Content Distribution Networks (large clusters of servers at geographically distinct locations) are the key for any data and/or traffic intensive web-scale app.
Answer: It depends on if you insist on storing and distributing these files yourself.
If you don't need to manage this yourself then there are lots of content distribution networks (akamai etc.) who will hold and resend your files for you, they're usually geographically disperse and have excellent resilience. Your site would then simply need to point at these files to allow your users to access them, your job would then essentially be done.
If you have a need to store and distribute these files yourselves then at the very least you need a big block of fast and resilient storage (such as a large SAN/NAS by EMC/HP/NetApp etc.), some web servers tuned to deliver video (my own personal speciality :) ) and some big caching load-balancers such as Zeus's ZXTM. Of course at this point you have a single point of failure (the data centre) so if up-time is important you should consider one or more additional data centres and distribute your data and load around.
Good luck.
Answer: Yes - buy many hard disks and servers :P
Answer: I would probably store them using lots of servers with something like mogileFS. This way each file is stored on more than one server, so a server failing will not lose your data.
Fill them with low-power 2TB drives.
You'll need to be careful when trying to store large files, and not use perlbal as your mogstored, but it'll work. You could also split up the large files into several big chunks like mogilefs likes to do, but just keeping large files around is easier on your client code.
Answer: I'm running for getting a "+1 funny", so:

Where does youtube store so many videos?

If not in the cloud, then on disks.


Is there a dua to protect me from the humiliation of revealing my academic performance from my relatives?

Question: I am a person who concealed my academic performance from my relatives, except my parents. I recently disclosed the truth to my parents. Now I am afraid of humiliation when relatives hear my results. You may feel that these are silly issues when compared to other peoples complex problems in their life, but this is something which causes me mental anguish and lack of concentration. I would like to know whether there is any dua to be protected from this situation.
Comment: Does taqiya count?
Answer:
O Allah! I ask Thee for forgiveness and security in my religion and my worldly affairs, in my family and my property; O Allah! conceal my faults , and keep me safe from the things which I fear; O Allah! guard me in front of me and behind me, on my right hand and on my left, and from above me: and I seek in Thy greatness from receiving unexpected harm from below me.

Sunan Abi Dawud 5074
Comment: No matter how many times it's mentioned to add a useful comment, rather than mute downvote, but it still happens.
Comment: Sorry, I did not get it, what is a "link only answer"?
Comment: A commentless answer with only a link to an evidence. But in this case this is ok as OP asked only for an dua'.


How do I remove icon overlays from unversioned folders in Tortoise SVN?

Question: How do I remove icon overlays from unversioned folders in Tortoise SVN?
Comment: Close cross-site duplicate: *[TortoiseSVN file overlay performance - are there any ways of improving it?](http://stackoverflow.com/questions/1525829)*
Comment: The above link is missleading since the screenshot is too old. Please refere to accepted answer.
Comment: FYI, The proposed "close cross-site duplicate" is useful if you want *manual* control over which folders do not get icon-overlays. Below answer is simpler, if you want to turn off icon overlay of *all* unversioned files/folders.
Answer: There is an option in TortoiseSVN | Settings | Icon Overlays | Overlay Handlers. See TortoiseSVN manual for further details.
Answer: To remove icon overlays, do this:

Click on an empty area near that directory path. Right click
  Tortoise SVN settings, go to Icon Overlay, and uncheck Show Icon Overlay for
  ignored items. It's all done; all icon overlays of the folder are
  gone.
If it is already revisoned then do this: go to that directory / file.
  Right click Properties of Tortoise SVN. Select the list item "add it
  to ignore list". Don't be afraid the file won't get deleted!! AND
  then repeat the above procedure.
Comment: @Danijel did this help to solve that.
Comment: I don't remember. :-( There is no more overlays, but how I resolved it I don't remember since it was a long ago. Sorry.


What's is the meaning of held a phone call

Question: Is phrase "held a phone call" means received a phone call or made a phone call?
Comment: That is not a very common phrase but it would just mean that a phone call took place - it doesn't tell you who called who.
Comment: Thanks for your reply. can we know from the sentence that who is initiate the call?
Answer: In my mind, associating "hold" and "phone call" means that a phone call is temporarily suspended, until one of the speakers does something else.

to put on hold = waiting to be connected while making a telephone call (Google definition)

to have a phone call = to talk on the phone; not known who made the call;
to make a phone call = to dial a number and talk when the other person answers;
to receive a phone call = to answer the phone when it is ringing.
Answer: To hold a phone call usually means to organise a phone call in advance. (or usually a phone conference, maybe with speakerphones on either end, possibly even arranged by underlings). It's usually a slightly more formal occurrence than the phoning of somebody initiated by one side - you might agree to ring your kids teacher about their behaviour at lunchtime for instance.
If you google "hold a phone call" you will see lots of examples of world leaders agreeing to "hold a phone call" to discuss political issues.
It doesn't really matter who actually dials the other first in this instance.
So the past tense held a phone call just refers to a phone call that happened in the past

The US and Iranian Leaders held a phone call to discuss rising tensions in the area
Comment: Thanks you very much. that really help.