Is it possible to use Customer Portal Authentication in Site.com (aka SiteForce)

Question: I have a client who would like to integrate a third party shopping cart into their Site.com website. The catch is that in order to complete the purchase, the user must first log into the  Customer Portal, and if necessary register as a portal user. I suspect that I can build a branded authentication page using the sitelogin visualforce template, but where I'm a bit unsure of is how all that will fit into Site.com.
Comment: Note that SitesForce the CMS product does not support Authenticated Sites/Portals. If you want a CMS for authenticated sites/portals you can look at Orchestra CMS. As for branding etc an authenticated sites - yes you can do that and you can even mask the URL if you want to. Not 100% true because of data access restrictions and licenses, but for the most part any Visualforce page you write can be in a Site or Authenticated portal.
Answer: Word of caution to you...
Is it OK for the users to see the secure.force.com domain in the URL?  If you want to allow users to log in then you have to expose that to them.  There is no way around it.

Force.com sites and Customer Portal do NOT support custom SSL certificates.  It is on the roadmap, but who knows when it will be delivered.  I'd hope that it would be delivered whenver the support for authentication on Site.com (also on roadmap) is delivered.
The login form must be submitted over SSL (i.e., you have to set the apex:form's forceSSL="true").

Those two together mean that you have to expose the secure.force.com domain to the end user.  This is something that you can only test in production, because custom web addresses are not supported in the sandboxes.
Also, Site.com is not available in Sandboxes, so you have to do all of your development directly in production.  Or, you can do it in an unrelated Developer Edition.  Note that if you choose to do the development of the Site.com in production or an unrelated Developer Edition and the Force.com Sites + Portal in sandboxes the domains will be different.  If you have any sort of Ajax or something like that, that you'd want integrated across both, you will have to go to extra lengths (i.e., something like JSONP) that would only be necessary for development.
My 2 cents.  Wait until the custom SSL certs are available.  Wait until Site.com is made to be more development friendly.
Comment: what about a reverse proxy like ngnix? I have had good performance proxying salesforce portals behind a proxying system to get SSL AND branded host URI.
Answer: The short answer to your question is Yes, you can. The long answer is as follows:

A user visiting your site may view all the pages on your site, but you'd like to control the activities that they are allowed to perform. This new user with no identity or authority is automatically assigned to the guest user profile.
You can find out exactly what a guest user can do on the Sites setting page in your org by clicking the Public Access Settings page. This determines the security profile of each and every site visitor before they authenticate.
You'd need to do a little bit of coding to bring together Customer Portal and Sites.
Set up Customer Portal with login enabled.
Customize the login page with a custom visualforce page so that the default login page is not shown
Also, enable self-registration for new users under Customer Portal settings so that new users can register using the default SiteRegister VF page. Again, you can script your own page, if you don't like the default page. This will create a portal user.

That's all you need to do to make Customer Portal and Site.com work together. If you want more in-depth details check out this developer article. It also lists some best practices.
Anup
Comment: Site.com functions completely separately from Force.com Sites, it has its own infrastructure.  Currently you'd need to link over to your Portal.
Comment: Thanks for the response. So, a Site.com page functions the same as Force.com Sites? I've linked a Force.com Site to the Portal, but it's looking like Site.com is completely different.
Comment: As @joshbirk mentioned, they are different entities. Check this [wiki](http://wiki.developerforce.com/page/Websites) out for more details.


Autobiography and lawsuits

Question: If I write an autobiography and include living family members who have done some very strange things, am I at the risk of being sued?
Comment: Can it be classed as libel? Then the answer is probably yes
Comment: And the relevant laws are highly variable and often complicated. Talk to a lawyer.
Comment: I'm putting this on hold based on the discussion in [Where do we draw the line for legal questions?](https://writing.meta.stackexchange.com/q/1455/2533), particularly [my answer to that question](https://writing.meta.stackexchange.com/a/1457/2533) (which happens to, at this time, be the highest voted answer to that [meta] question). This might be answerable, but it needs to specify a jurisdiction. If in doubt, **always consult with a lawyer.**
Answer: If you're in the US, perhaps. What might be better is to label it semi-autobiographical, say "based on true events", and change the names of the characters. I believe you can also include the portion that films/books sometimes include:

Any resemblance to actual persons, living or dead, or actual events is
  purely coincidental.

Some additional suggestions and useful verbage here: https://www.thebookdesigner.com/2010/01/6-copyright-page-disclaimers-and-giving-credit/
You may want to check into Lawyers and Accountants for the Arts as well; they have a full guide on copyright that I believe is a free resource.
Answer: [Standard Not A Lawyer proviso]
There's always a risk of being sued, and you might want to avoid that hassle entirely. Morgan's suggestion is a good one, but if a real person can be judged to be recognisable from a character there might still be a problem. What's probably more significant is whether you're at risk of being successfully sued.
Libel laws vary between jurisdictions, particularly concerning whether burden of proof is on the plaintiff or the defendant - an example that often comes up in legal dramas is that the UK and US see this the opposite way. You'll want to check this wherever the book may be published or distributed.
If you have proof that what you've written is true you'll have covered your back, but it would still be worth talking to a qualified legal advisor to check that your proof constitutes something that would be recognised as legal proof.
Answer: The basic legal principle that applies in all jurisdictions is that if you want to publish anything personal about anyone, you have to ask them. This includes data (name, birth date, life events, etc.), likenesses (photo, drawing, etc.), and communications (letters, writings, personal communication etc.).
If you want to disregard that law, you should make damn sure you don't disparage, vilify, slur, denigrate, libel, sully or defame that person in any way whatsoever, as that will add to the damages you will have to pay.
If you want to ignore that law also, make sure you are rich before you publish your autobiography.

There are some exceptions that apply to art, but I wouldn't count on your outpourings to be considered art by a court of law.

Autobiography and lawsuits


RTSP, RTCP and RTP port numbers

Question: I'm trying to understand how spydroid (https://code.google.com/p/spydroid-ipcamera/) works so I can write a similar app for my phone. Based off of spydroid here is what I understand about RTSP, RTCP and RTP.
RTSP runs on a specified port and sets everything up.
RTCP can run on any port. There is a client port and a server port. This is the control flow for RTP
RTP can run on any port. There is a client port and a server port. This contains the streams for audio and video. This is confusing because it seems it doesn't actually send the audio and video on this port. In spydroid it sends the video on port 5006 and the audio on 5004.
Spydroid is sending this message via RTSP to confirm the ports...
Transport: RTP/AVP/UDP;unicast;destination=123.456.789.00;client_port=65234-65235;server_port=44580-44581;ssrc=ba98a863;mode=play
I think what this is saying is that the client (VLC in my case) is listening on 65234 using UDP for RTP and 65235 for RTCP messages. Also spydroid is listening on 44580 for RTP and 44581 for RTCP. Is this right?
Now in the DESCRIBE sequence for RTSP, spydroid is telling the client m=video 5006 RTP/AVP 96 I think this is saying that it will be sending the video via UDP over port 5006.
Does everything I said in the above sentences sound correct?
What I really want to know is how to forward this information to the correct ports. The client ports are auto assigned by VLC. I tried running this command... vlc "rtsp://192.168.1.104:8086" --rtp-client-port=58866 but VLC seems to ignore it and pick it's own ports. So I have forwarded ports 8086, 5004 and 5006 but I don't know which port to forward for the RTP and RTCP connection because it changes every time. The only way I can make this work is by forwarding all ports to my computer. (I have a linksys router and it has a DMZ option) But this is a bad solution. Can someone please guide me in the right direction.
Also it is good to know that I am doing this because I am sending everything through an external IP address over the internet. Where as spydroid is intended to be used on a local area network.
Answer: I don't know how RTSP works and how to configure VLC but I know a thing or 2 about RTP.
I am guessing that client port means where the spydroid would be sending packets and server port is what it would be using as source port. So at UDP level, RTP packet would look like:
| SRC_PORT=44580 | DST_PORT=65234 | ... RTP_PACKET |
Next : m=video 5006 RTP/AVP 96
According to SDP standard 5006 is the port where spydroid would be listening on for incoming RTP packets
(not sure why) and the RTP payload type would be 96.
So, check if making VLC listen to port 65234 and forwarding {44580, 65234} packets to your PC works.
The info you gave is a little confusing and seems self contradictory. So, can't conclude anything concrete based on that.
Answer: According to the SDP standard...
Actually it indicates the source port.
The port (range) just indicates that is where the media will be sent from.
E.g if your source sends on 5006 but its routed via 10002 that's where rtsp helps Via the transport header.
The source port may really be 5006 but an intermediate router or firewall that is somewhere inside the LAN received the packet and sent it via another port and address.
Most software doesn't automatically know about your network setup and thus without modifying the sdp for external network use it cant really be used anywhere outside of YOUR network address space.
If you needed the port to match it can you just have to manually configure your sockets and software. (E.g. multicast or otherwise there's a few reasons why that port (range) needed to be different from what's in the rtsp transport header but if it is... then now you understand how and why.
Live 555  and some others send a probe packet and if that packet is returned via icmp the source port is reset to 0 so it can be discovered,be aware that this can conflict with existing traffic from the host if not done correctly.
QuickTime and vlc actually screw this up (mostly everyone does)and allow injection straight to the decoder from any port from the same host when 0 is used and ffmpeg and lav don't support ranges properly in the media port.
Just as excersize in thought, what if the port number was 1 or 65536 or * or -7?
Should that not also be handled?
What if the range was * or - or otherwise?
Remember that just because a value doesnt exists doesn't mean that you can't do the right thing with respect to the existing information if desired Even if the data received is not as expected Or indicated a value which should not be used.

RTSP, RTCP and RTP port numbers


Effect of sample size on Chi-squared distribution

Question: As the degrees of freedom increase, the chi-square curve approaches a normal distribution. But what about increasing the sample size?
If I am using degree of freedom =1, but with different sample sizes (eg n=10, 30 and 50), will the chi-square curve become more normal with increasing sample size?
Comment: The $\chi^2(d)$ distribution is a different distribution from the normal. A completely different family. It is also an idealized mathematical distribution of what is supposed to happen. In other words, as $n\to \infty$ (your sample size), then the $\chi^2(d)$ statistic that you calculate, will be shaped at that idealized distribution. To put it simply, as your increase the sample size, then the distribution of statistic values you get will converge to that chi-squared one.
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Comment: How do you increase the sample size without increasing the degrees of freedom?  Are you just drawing more and more samples from a $\chi^2(1)$ distribution?  If so, why would you think a histogram or curve would approach anything other than a $\chi^2(1)$ distribution?
Comment: Are you asking about  the situation in a  goodness of fit test or perhaps an independence test where the number of categories is held constant but the total sample size increases?
Answer: Assuming that you are asking about  the situation in a  goodness of fit test or perhaps an independence test where the number of categories is held constant but the total sample size increases:
The chi-squared curve doesn't become more normal; the d.f. is unchanged.
What's changing is how well the cell counts are approximated by a normal distribution. More accurately, what's changing is how well suitably scaled cell counts are approximated by a (typically degenerate) multivariate normal distribution, and hence how well the discrete  test statistic $\sum_i\frac{(O_i-E_i)^2}{E_i}$ is approximated by a (continuous) chi squared distribution.
It's this approximation that leads to rules like "expected counts >5" in an attempt to get reasonable accuracy of significance levels across a range of possible situations (different hypothesized $p_i$ in a goodness of fit test). The rule is often 'too strict', but occasionally not really strict enough (at least for my preferences of accuracy of p-values).
Example of improving approximation with sample size:

(You can see a larger image by clicking on the plot, or right-clicking to open the plot in a new tab)
The plot on the left shows the distribution function of a Pearson chi-squared goodness of fit test for three groups with null cell probabilities $0.2, 0.3, 0.5$ for a sample of size $n=15$ (black step function) and the continuous approximation by a chi-squared(2) distribution in red. Here the smallest expected count is 3.
This case was not chosen to show a situation where the approximation is particularly poor; its a 'nice' case. The broad picture looks reasonably close but consider that the exact 5% critical value is 5.756 while the chi-squared approximation gives 5.991, so there is some error, though it's not especially impactful if you do your test at the 5% level in this case, in that a 5% test is mildly conservative.
The approximation error has a somewhat larger impact at the 10% level for this specific case.
The 'exact' cdf is simulated (calculated by sampling from its distribution under $H_0$), but the simulation size is such that the worst-case margin of error in the estimate of the cdf is only a little over a pixel (which occurs near the median; near the 5% critical value it's nearer to half a pixel), so the picture is effectively exact; the differences you see are real, not due to sampling error -- if you did a new simulation of the same size the plot would be indistinguishable from this one.
The plot on the right is similar but for n=50 (smallest expected count is 10); as we see, the chi-squared approximation is considerably better.
Answer: One of the best ways to understand statistical concepts is just to simulate the random experiments yourself. Here is some R code which illustrates what happens as you increase the sample size.
<code>simulate = function(n){
  data = rpois(n, lambda = 1)
  Obs.0 = sum(data == 0)
  Obs.1 = sum(data == 1)
  Obs.2 = sum(data >= 2)
  Exp.0 = dpois(0, lambda = 1)*n
  Exp.1 = dpois(1, lambda = 1)*n
  Exp.2 = n - (Exp.0 + Exp.1)
  chi = 0
  chi = chi + (Obs.0-Exp.0)^2/Exp.0
  chi = chi + (Obs.1-Exp.1)^2/Exp.1
  chi = chi + (Obs.2-Exp.2)^2/Exp.2
  chi
}

result = replicate(1e2, simulate(1e2))
plot(density(result))
curve(dchisq(x,2), add=TRUE, col="red")
</code>
Let us explain what this code does. When you run simulate(n), the computer generates $n$ (independent) random samples from Poisson(1). We created three categories, whose where the sample = 0, those were sample = 1, and those were sample >= 2. We calculate the expected count vs the actual count. In the end the chi-squared statistic is calculated for that data set.
But this is just 1 number. So now we replicate this process $10^2$ times. Generating $10^2$ different values of the chi-squared statistic. Then we tell the computer to draw the estimate distribution function for all those chi-squared values. Finally, the idealized chi-squared distribution is drawn in red.
Notice, if you increase the replication number from $10^2$ slowly up to $10^5$, the fit gets closer to the idealized chi-squared.


Add Class To Body Using ERB In A View - Rails

Question: I've watched this screencast to add a page title when in a view, is there a way I can do the same but add a class the body tag?
Comment: jQuery? `$('body').addClass('mysexyclass');`
Comment: I didn't really want to have scripts inside the views
Answer: Not sure what you mean, you can do it the same way:
In a view:
<% content_for :body_class, "my_class" %>

In a layout file:
<body class="<%= yield (:body_class) %>">

Comment: Is there a way to stop `` on other pages?
Comment: Not sure if there's actually an elegant way to this in ERB. The not so elegant way is to just do a helper call inside the body tag and return the whole body class ("my_class") together with the "class" attribute. Note that the yield(:body_class) call will return an empty string when no value is set so you can just check for that.
Comment: @user1919937 I've never been satisfied with this approach because of the  on other pages. See my approach below.
Answer: I usually make a helper method for stuff like this so you can have defaults set up cleanly
application_helper.rb
  def body_class(class_name="default_class")
    content_for :body_class, class_name
  end

view:
  <% body_class "foo" %>

application.html.erb
  <body class="<%= yield (:body_class) %>">

Answer: Sometimes using the current controller name as a class name we'll do:
<body class="<%= controller.controller_name %>">

I find this simpler and a bit more elegant, but of course thus you won't be able to assign individual class names.
s. Add Class To Body Using ERB In A View - Rails
Answer: In the layout page:
<% if content_for?(:body_class) %>
  <body class="<%= content_for(:body_class) %>" >
<% else %>

<% end %>

In the content page:
<% content_for :body_class do  'my-body-class' end %>

Answer: I prefer to use the following method:
<body class="<%= content_for?(:body_class) ? yield(:body_class) : controller_name %>">
That method avoids the dreaded .
I frequently use the controller name to scope a number of styles so it's nice to not need to supply a content_for on every view if I only needed that one class.
Answer: I've used the accepted method in my app for a while, but never really loved how it worked, because if there is no class, you're gonna have that class=' ' on your body tag, littering your code. For my current use case, I just wanted a widescreen class (but you could easily get more advanced with different classes per your use case). I'm happy with this approach:
In your application helper:
def body_tag(&block)
  content = capture(&block)
  content_tag(:body, content, class: @widescreen ? "widescreen" : nil)
end

In application.html.erb
<%= body_tag do %>
  <%# the rest of your content here %>
<% end %>

Then in your application controller:
private
  def enable_widescreen
    @widescreen = true
  end

Then in any controller that you want it, just do:
before_action :enable_widescreen

Then feel free to make the class logic more advanced if you want to use it for different classes besides 'widescreen' - but the point is that this is an elegant way to allow for there NOT to be a class if you don't specify one, without

showing up in your html.


Why is a seatbelt applying a constant force throughout a collision, safer for the driver

Question: I'm trying to answer the question below, and I'm struggling to understand what the question means by a constant force throughout a collision. The mark scheme states that a constant force will mean that the force will be lower. I can answer the rest of the question from that point on, but I'm struggling to fill in this gap.
Answer: We know the driver initially has a momentum $mv$, where $m$ is the driver's mass and $v$ is the velocity of the car. After the crash the driver's momentum is zero, so the momentum has changed by $mv$.
If the force decelerating the drive is $F(t)$, where I've made the force a function of time to indicate that it may change with time, then the change of the driver's momentum is related to the force and the duration of the collision, $T$, by:
$$ \Delta p = mv = \int_0^\text{T} F(t)\,dt $$
Or if we look at this graphically rather than using an equation, then if we draw a graph of the force as a function of time then the momentum change is the area under the curve from $t=0$ to $t=T$.
Given that the change in momentum $\Delta p = mv$ is outside the seat belt designer's control, the question is asking you how best to design the seatbelt so as to limit the maximum force that the driver experiences.
Comment: I think I understand now. If the area under the graph is the change in momentum and we have a constant force for a longer period of time, then the graph has been stretched, to account for a constant force for a period, so the highest force has been reduced.
Comment: Exactly, you got it.


Rf Module Receiver With Pt2272 always gets signal

Question: I am just trying to on and of an led with rf module. I have tried lots of module but my works end up with same result. When I feed my receiver,  with led connected to data out,  it always powers the led wheter or not transmitter operating. And when I operate my transmitter led starts to blink(sometimes). I didn't understand what is happening. Can anybody please help. Or you can just tell me what should I try to learn. Sorry for my English. Thanks..
Answer: Without you giving more specifics of your circuit (I don't have the reputation to comment in order to ask) I would guess that you have the anode of the LED connected to your positive voltage source(VCC) and the cathode connected to the data output pin, since the default output of the decoder chip is active high.
It would be helpful if you could edit your question to tell us if you have built your own circuit around the OEM IC, or if you are using a third party's implementation of the chip in their own circuit to which you are then connecting.  According to the most elaborate PT2272 data sheet I could find, the decoder outputs active high data.  In that case, the LED anode would need to be connected to the data output pin and the cathode connected to ground, as the example schematic in the PDF shows, in order for it to behave as you are expecting.  Conversely, if the LED anode were connected to V+ and the cathode connected to the data output pin(hopefully through an appropriate current limiting resistor in either case), then the LED would be lit with no data transmission, and then would turn off when the chip successfully receives a valid trigger transmission, which is what appears is happening in your situation.


Under FAR Part 121, is it mandatory to execute a missed approach when unable to land within the touchdown zone?

Question: If the crew of an aircraft operating under FAR Part 121 and conducting an instrument approach determines, as they begin their descent from the MDA/DA/DH, that they will be unable to touchdown within the touchdown zone of the runway is a missed approach mandatory?
Comment: @PaulOgilvie "You contact ATC and decide with them what to do". No, the pilot is flying the aircraft and decides if a missed necessary. ATC's primary responsibility is separation of aircraft.
Comment: @PaulOgilvie - The scenario in the question above allows for only a couple of seconds for the crew to make a decision whether to go missed approach or not.  Certainly not enough time or the proper moment to be contacting ATC. Also, this is an issue for which the crew is solely responsible for making a decision.
Comment: The first steps in any missed approach is to follow the runway heading, start climbing and announce a go around/missed aproach. There is enough time to contact ATC and they can tell you what they want. The Missed Approach procedure is one of them and is the default. The "couple of seconds" you talk about is deciding you're not going to land.
Comment: @PaulOgilvie - Thanks for you comment.  But the question was specifically aimed at whether or not the crew was "mandated" to make a missed approach under the circumstances described. Your comment suggests that they have already made that decision.
Comment: @PaulOgilvie - Again the question is not whether the crew could stop the airplane in the remaining runway if they elected to land. The question is whether or not the crew is "procedurally" or "legally" required to make a missed approach if they cannot touch down within the touchdown zone.
Answer: This is spelled out in 91.175(c), in particular

Operation below DA/DH or MDA. Except as provided in paragraph (l) of this section or § 91.176 of this chapter, where a DA/DH or MDA is applicable, no pilot may operate an aircraft, except a military aircraft of the United States, below the authorized MDA or continue an approach below the authorized DA/DH unless

...

The aircraft is continuously in a position from which a descent to a landing on the intended runway can be made at a normal rate of descent using normal maneuvers, and for operations conducted under part 121 or part 135 unless that descent rate will allow touchdown to occur within the touchdown zone of the runway of intended landing
Comment: There is also a 121 specific rule on this, which pretty much says the same thing.
Comment: @Lnafziger - can you be more specific about which 121 rule you  mean?
Comment: @757toga It's 121.651.
Comment: @Lnafziger - that's it, thanks. For those reading this, the distinction between the pure part 121 rule and the general part 91 rule has to do with a greater limitation imposed on the 121 operator regarding what the weather report has to be prior to passing the FAF (or G/S intercept altitude).
Answer: Part 135 pilot: I think there is the practical and legal answer here. The legal answer is yes you must execute a missed approach. That's why the regulation specifically uses the word "continuously." If at any point you realize it's not going to work, you must go missed.
However, if this realization comes late in the flare and you make the determination that landing is the safer choice compared to going missed, then you should obviously land. You have to remember that missed approach procedures are NOT protected for climb gradient once you descend below the MDA/DH and this becomes dramatically more important the lower you are to the surface and the closer to the departure end you are.
A realistic example: Part 135 ops, you're flying a C208 into a shorter runway, lets say 3,000 feet. You realize that you will be unable to land in the touchdown zone due to a sudden wind gust which keeps you airborne during the flare. However, there is a high obstacle (rising terrain, cell phone tower, etc.) near the departure runway end. Depending on visibility and ceilings you may not be able to visually ensure obstacle clearance and can't be assured clearance based on the procedure alone. If you believe that you will make a safe landing due to having high landing distance available vs. landing performance margin, I would continue the landing rather than risk a CFIT. CFITs aren't survivable, but runway overruns usually are.
Comment: Welcome to Aviation.SE! Nice first answer. In your first paragraph you refer to "the regulation". I guess you mean the quote from the other answer. We generally prefer answers to be standalone here, so could you add a quote from the regulation you refer to?


Wireless 802.1X Pre Logon connection

Question: I am trialing 802.1x on 20 dell notebooks.  I can get 8021x authentication to work however the user has to be logged onto the domain previously for it to work.  If a new user logs in they get domain is unavailable.  I am using Windows 2003 server for the radius server and for the Certificate Server.
There is a group policy that when devices are placed in that OU they receive a Certificate from the Certificate Server.
The clients are windows xp SP3 using windows zero config utility for wireless.
How can I get the wireless 8021x connected prior to the logon process?
Answer: For Windows XP clients you should be able to set the "Authenticate as computer when computer information is available" option Wireless Network Properties - Authentication tab.  This certainly worked for XP SP2 and earlier but this appears to have changed with SP3.
For Vista (and apparently for XP SP3, I don't have an XP system to test) this must be explicitly enabled - the details for both are outlined in this MS kb article : "How to enable computer-only authentication for a 802.1X-based network in Windows Vista, in Windows Server 2008, and in Windows XP Service Pack 3"
For this to work your Radius server must support machine only authentication, your GPO must be deploying computer and not user certs.
Comment: Has Anyone got this working for Windows xp sp3? The netsh wlan command mentioned in the KB above doesnt exist in windows xp sp3 so I cant change the authentication type to machine rather that user.
Comment: I tried th methods shown in the article and when I try to (for wired) to import the profile back again when I put the  tag in it says profile is corrupt.
I also tried the reg key for wireless and it didnt work.
Comment: Interesting. The Netsh process detailed above works as described for Vista - well you can edit the XML and it will add back the profile without generating an error at least while adding an unsupported tag does produce the "profile is corrupted" error. Note the  entry is case sensitive and sensitive to whitespace. I would expect XP SP3 to fail though as it doesn't support this.
What Radius server are you using and what do you find in its logs after you make the registry change? Which EAP type are you using?
Comment: The radius server is just the IAS in Microsoft server 2003.  The EAP used is PEAP.  I tried  and  but neither worked (just to be sure) I made sure not to add additional formatting.
There is nothing in the log that seems out of the ordinary. I have now tried with an xp machine (LAN) a vista machine (WLAN) and an xp notebook .

Wireless 802.1X Pre Logon connection


Any new technologies that are ready to be discovered?

Question: As an electronics engineer, (sort of), I understand how transistor gates (AND, OR, NAND, NOR, XOR, etc.) are combined to create all of our digital devices.  The first computers were created in the mid-twentieth century.  However, the very first ones used simple telegraph relays as the switching device.  And yes, it is possible to create all of the necessary logic gates with relays.
With this in mind, why did it take nearly 100 years from the invention of the telegraph relay until these were combined to create an electric computer machine?  It seems that the technology was right there, under everyone's noses, waiting to be recognized and developed.  That is my first question.
The second question is regarding the same thought - are there any current technologies that we have now that may be used for much more complex and useful devices?  Something right under our noses.
Comment: I mean....a. If I had an amazing invention I wouldn't be sharing it with you and b. If I had an amazing invention, I'd be selling it to people not trolling around some internet community...
Comment: "are there any current technologies that we have now that may be used for much more complex and useful devices? Something right under our noses. "  If there were, we would have done it already.  Real life isn't like a videogame, you can't see what new technologies will be unlocked by the current one you're researching.
Comment: @Ryan_L actually, if we stopped all research right now and only focused on current technologies we had now, we could still be innovating for at least 4 decades. For example I designed a system for a blind man (3% of vision left) that helped him "see" when the turn began on an ice skating ring by simulating a sound to follow and triangulating his position on the track locally. A buddy designed a new wheelchair module to attach a cycling module that would put all the weight on the cycling module instead of making the wheelchair weigh 2 kilo's more when you want the option to connect the module.
Comment: Welcome to the site Baruch.  Interesting question, but not really on-topic for the site.  You query is part real world history (I bet articles exist on the first question) and part speculation.  Neither of which are tied to world building making this off topic.  The site is a little different from standard discussion forums, its all about specific questions getting specific answers.  Check out the [help] and [tour] and:  [How to ask](https://worldbuilding.stackexchange.com/help/on-topic)
 provides good guidance on writing questions.
Comment: There are new diodes on the market that use quantum tunneling that enable them to be tuned to allow only certain frequencies to pass. They are currently used in guitar circuits to selectively impart effects on particular frequencies. Could they be applied to communication circuits? Encryption circuits? A new field just waiting to be developed.
Comment: To better meet the requirements for worldbuilding, perhaps you could specify an application and ask about potential technologies that could be applied to it. This would limit the scope.
Comment: (a) Most inventions are developed due to need.  Most of our modern computing is due to the need to quickly calculate ballistics and code breaking in WWII.  (b) If you think about this part of your question, anyone who could answer it would be running to the patent office, not telling the public here.
Comment: If you are interested, research the Attanasoff-Berry computer. The idea worked, but was abandoned. But it was the genius of Atanasoff who, on a paper napkin after a few beers and a long drive, posited the use of Boolean algebra (An until then curiosity in mathematics) be used for electronic computers. Without this insight, no successful digital age. For instance http://www4.ncsu.edu/~belail/The_Introduction_of_Electronic_Computing/Atanasoff-Berry_Computer.html
Answer: https://theconversation.com/harder-than-diamond-stronger-than-steel-super-conductor-graphenes-unreal-5123
http://www.abc.net.au/news/science/2017-01-31/scientists-cook-up-super-strong-graphene-out-of-soybean-oil/8223686
Graphene, 200 times stronger than steel, 100 times as durable than diamond, I think twice as light as steel and its Very Conductive And also semiconductive. Been researching it for years.
It is truly going to change the world when we figure out how to mass produce it right now it can only be made in very small fractions. But people say indestructible cars, space elevators, super computers and it is the first 2 dimensional material which is 1 single atom thick. Which also leaves room for quantum computers.
Not to mention perfect water filters, could filter clean salt free water from the ocean, it could lead to better solar panels and electricity, mile high if not multi mile high skyscrapers or windmills.
Deeper drills, probably drilling deeper into the crust than ever before or even large underground facility's with the metal as super supports. That increased pressure could lead to better spaceships as well. The list goes on and on and on.
https://www.scientificamerican.com/article/instead-of-filling-cavities-dentists-may-soon-regenerate-teeth1/
Teeth regeneration is suppose to happen literally before 2025 it was suppose to happen by 2018 back in 2012 and they've made very very great steps towards it but still a bit far away.
This could lead to many many other regenerative parts
Also check out this awesome website on new future tech and what not!
http://www.futuretimeline.net/latest.htm#.V-7o-SgrK70
Elon musk is looking to send the "Big fucking rocket" yes that is the real name, to mars, and colonize it.
https://www.wired.co.uk/article/elon-musk-bfr-big-rocket-earth-mars-spacex
They're working on a new material to remove Co2 carbon from the atmosphere.
https://www.ted.com/talks/jennifer_wilcox_a_new_way_to_remove_co2_from_the_atmosphere
The entire wheat genomes has been sequenced.
http://www.latimes.com/science/sciencenow/la-sci-sn-bread-wheat-genome-20180816-story.html
New AI Being used for eye doctors
https://www.futuretimeline.net/blog/2018/08/22.htm
Oh and one of my favorites, the superman crystal is becoming a real thing as well, it can store 356 TB for 13 billion years on quartz crystal! The size of just a quarter!
https://money.cnn.com/2016/02/17/technology/5d-data-storage-memory-crystals/index.html
Comment: I highly recommend futuretimeline.net. According to it, theres some crazy stuff about to go down.
Comment: It is less conductive then gold. The problem with graphene is it sits between being a conductor and being a semi conductor making it very hard to use.  However they have successfully doped graphene to Make it less conductive and created a very simple working chip.  I think at Cal tech? But am not positive.
Comment: Thanks @GarretGang I updated it, but somewhere i did read it was more conductive although it could of been speculation
Comment: Nanotubes are now conductive then gold. I think they created a room temperature super conductor about 10 nanometers long at MIT, but I might have the university wrong.
Answer: To address your first question:

There are two kinds of scientific progress: the methodical experimentation and categorization which gradually extend the boundaries of knowledge, and the revolutionary leap of genius which redefines and transcends those boundaries. Acknowledging our debt to the former, we yearn, nonetheless, for the latter.
-- Academician Prokhor Zakharov, Sid Meier's Alpha Centauri

Predicting revolutionary, transcendent developments that redefine the way we live is fruitless. If they were predictable, they wouldn't be transcendent and they're almost certainly not revolutionary. What is predictable, however, are methodical improvements: what we have, we will make better, year by year. We have medicine; our medicines will grow more effective in a wider variety of cases. We have transportation; our transports will grow faster, safer, and more convenient. We have manufacturing; our processes will grow cheaper, more reliable, and more readily available.
Methodical experimentation has a lot going for it: it's easier, for one. You don't need to be as much of a transcendent genius, which is good for the 99.99% of us who aren't. It's cheaper and faster to see results, and those results will typically be useful in some way to people right away. Revolutionary leaps in understanding are harder, more demanding in terms of researchers, time, and money, and they often languish for a long time before their "killer app" arrives. Lasers, for instance, were not seen as useful when they were first developed; now they're a critical part of communications infrastructure.
So people shy away from such leaps. The computer hardware industry, for instance, is less interested in a revolutionary new paradigm for microprocessors than in a CPU that runs faster and cooler. Pharmaceutical companies aren't looking for a new understanding of biology; they want to use the current one to develop new drugs according to what they know and understand. That's not to say a revolutionary new idea wouldn't be welcome once proven, but it does mean that most of the time and effort people put into research and development is of the "gradual extension" sort.
With that in mind, here's an interesting thought: the next big transcendent invention that's going to revolutionize your life has probably already been discovered. We just haven't figured out what it's for yet.
Comment: This question is both broad and arguably off topic.  Please help new users improve questions before posting.


How are we supposed to get the "Peer pressure" badge?

Question: The peer pressure badge is awarded if you get 3 downvotes on a question and you delete it. How are you supposed to get it, considering that you have a Reputation loss, just because of badge?
Comment: You could try a Minecraft mod error log, or anything non-Fallout 4
Comment: Down votes might be because it is kinda self explanatory. Just a guess, though.
Comment: Deleting the question will revert the reputation lost, so you'll end up with the badge and no change in reputation. The only real negative is that you've probably come a step closer to activating the question ban. That and you have badge that most people wouldn't be proud of.
Comment: Don't get the 3 downvotes. Ironically I could delete this and gain the badge ...
Comment: @deprilula28 - I think deleting this post will only get you the badge in the meta.  Maybe someone else can clarify.
Answer: You get it just like it says, for deleting a post that has 3+ downvotes. It's one of those things most people don't actively seek, because it means you've intentionally made a bad post that the community doesn't like for whatever reason. So yes, it means you've lost at least 6 rep (2 for each downvote), but you have a badge. It's sort of a consolation prize, as it were (although you can only get it once, I believe.)
Comment: Yes, you're not supposed to seek it out, it's designed to encourage the good behavior of deleting posts the community deems to be bad
Comment: @deprilula28 - Unionhawk's comment says it all really.  If the post is deemed bad by the community, its down to you to remove it.  Your reward is a badge.  I believe the badge is aimed at cleaning up bad posts rather than getting users to intentionally make posts just to pick up the badge.
Comment: Also note that 1 question upvote is worth +5 rep (and answers are +10), meaning that the -6 rep suffered from having a question getting downvoted 3 times is minimal.
Comment: "..a post that **as** 3+ downvotes..." Just poiting that... @Robotnik That's true. Kinda impressed my first answer was a moderator's.


Can I name my own LFS distro?

Question: The question is... about LFS (Linux From Scratch), if I would build a Linux system, with LFS, is it 100% mine? Could I say I made all this from scratch?
Comment: Could you please clarify what you're asking? Are you asking if you're permitted to name it and distribute it (by law or by community norms)? Are you asking some philosophical question about what *mine* means? Etc.
Answer: No, of course not.  You did not write any of the software, you just compiled it.  All the licenses and copyrights that the software was distributed with apply to an LFS system just like any other.
Comment: @verafter, you didn't write the kernel, you didn't write the init system, the compiler isn't your doing, ... Yes, the collection is yours; no, you don't own all of it, just the selection, configuring and building (at least as far as you didn't just follow the LFS instructions by rote).
Comment: Are we looking on same page http://www.linuxfromscratch.org ?
Comment: @verafter : Yes, I'm 100% aware of LFS.  In fact I've done it once a long time ago.
Answer: You can only claim to have done something from scratch if you really wrote the software yourself. If you just bundling some software you can give the bundle/distribution a name but that's it.
If you expect to receive karma points/get famous/improve your cv by creating a distribution and just giving it your own name you are mistaken. It can even backfire if people look at your distribution and create a shitstorm because you are just rebundeling LFS/other Distribution.
If you are serious about creating your own distribution you should think who your target audience is, what you want to do different than other distributions and how you difference yourself from others. Afterwards you can try to create a derivative from existing distributions (or creating a complete new one) based on your objectives.
Please bear in mind that creating a distribution is different than creating your own system as you should provide security support, provide different architectures, have knowledge about the kernel (which modules make sense for a wide variety of hw systems), early boot stage (debugging initramfs), bootloaders (efi, iso boot, hdd), different build systems (make, scons, cmake, jam, ...), hardware architectures etc.

Can I name my own LFS distro?


Ideal gas law problems

Question: I got really confused about real gases volume and ideal gas volume. Ideal gas molecules take up no space, if we put gas into a 2.4L water bottle, we know that all the gas will expand all over the bottle and we say at this moment the gas has volume of 2.4L. So what is this volume?
Answer: That means the gas molecules are spread out in a 2.4L volume. There's nothing between the air molecules themselves.
Answer: Here is the definition of an ideal gas:

An ideal gas is defined as one in which all collisions between atoms or molecules are perfectly eleastic and in which there are no intermolecular attractive forces. One can visualize it as a collection of perfectly hard spheres which collide but which otherwise do not interact with each other. In such a gas, all the internal energy is in the form of kinetic energy and any change in internal energy is accompanied by a change in temperature.

So it is not true that

Ideal gas molecules take up no space,

they take the space of a molecule, have the mass of the molecule and  kinetic energy and momentum.

if we put gas into a 2.4L water bottle, we know that all the gas will expand all over the bottle and we say at this moment the gas has volume of 2.4L. So what is this volume?

This volume is occupied by a huge number of molecules, order of 10^23 per mole, bouncing elastically against each other and displaying the ideal gas law:
P*V=nRT
where p is the pressure, V is the volume, n is the number of moles, T is the temperature and R is equal to 8.3145J/mol K .
Comment: negelect molecules's size is a important premise for ideal
Comment: Yes, the neglect is the part in the link that talks of "no interactions" .Tiny spheres act as point particles through their center of mass and the only interaction is scattering and sharing kinetic energy. Think a bit, if they were only a point there would be no geometrical cross section for scattering and scattering would have very small probability.

Ideal gas law problems


Is It Ever Justified To Open A New Window/Tab From A Hyperlink?

Question: Simple question, spurred on by the removal of the target attribute in HTML 4.0 Strict and XHTML 1.0 Strict.
Answer: I personally don't think so, as web users become more savvy, they'll ask for a new window from the browser.  It annoys me when a website does this a lot.
I think the question is sort of subjective.  It could be good if you're launching a javascript game or something.
Here's Neil Turner's reasons not to do it.
Comment: Kind of ironic that the site of his article uses popup window ads.
Comment: Very much so! It's the little things that get you in the end =P
Answer: On social content sites like Digg or reddit I prefer links to be opened in a new window/tab, as I am constantly going back to the original page to grab more links to look at.
That being said, I think that wherever you can you should allow a logged-in user to make the decision for themselves.  I know Digg allows users to choose how they want links to behave.
Comment: Good point, sites that add the choice as a user preference are cool.
Answer: I think this is pretty subjective, so I'll just give my opinion as a user. I prefer if it's just the default behavior. If I want it in a new tab, I'll middle-click.
If you're going to open it in a new window, warn me like this [new window] or something.
Answer: As a law, there is an exception to every law. Although in most cases simple links are best, sometimes links in a new window are just what is needed.
For example, I very much enjoy blogs and forums that open any external links in a new window, so I don't loose track of the original post I was reading.
Another good place to put them is when you click on a picture to get a larger version in an internet store or something.
You really have to evaluate this on a case-by-case basis, but my opinon is that in the end both are necessary for a good UI.
Answer: I do if it is an external link, other than that it is probably a bad idea.
Answer: The only time I force a new window is when the page I'm designing is ment to be used as a Web Part for a Sharepoint site.
I look at it this way, if you force a new window, you have taken choice away from the user.  That's bad.
Answer: With two exceptions, the answer must be a resounding "no".
Rationale: Yes, as others have already pointed out there are many cases where I prefer to have a link opened in another tab. But thanks, I'll make the determination of when and which myself. The basic tenet of the web is that the user is sitting with a user agent, a.k.a. web browser. The browser is in other words an agent on behalf of the user. If I'll want a particular link opened in another tab, I'll command-click (or ctrl-clik on another OS), and if I don't, then I'll click regularly. When a link on a web page opens the link in a new tab without my asking, it annoys me no end and breaks the predictability and familiarity of the web.
Exception 1: When clicking to see a large version of a picture or some other plain pop-up window. I see this as a separate topic.
Exception 2: Fully Ajaxy web applications, which seem to set aside most of the rules of the web anyway.
Answer: Yes, in web apps it sometimes makes sense to use a popup window when pulling up something ancillary that you need to look at without losing the content on the page.
For instance, I have used popups to display reports. In those cases (which are situational), users needed to look at the report and the screen at the same time, not navigate away to a reporting interface.


Linux ownership and permissions

Question: I have two users testuser2 and testuser1 with homedirectories /home/testuser2 and /home/testuser1 respectively. I want to share the directory /home/testuser1/Videos/ and its contents across these two users. I did the following :

Created a group named ggg and added both users testuser2 and testuser1 to it
Changed the ownsership of /home/testuser1/Videos to testuser1:ggg from testuser1:testuser1
Set acl to group ggg having permission rwx on /home/testuser1/Videos
Set sgid to the directory /home/testuser1/Videos

Now I created a soflink to /home/testuser1/Videos inside the directory /home/testuser2/Desktop/testuser1 so that both testuser1 and testuser2 would be able to add/edit/remove directories. While testing I came across the following scenarios which I would like to get clarification you guys.
A) Copying files by testuser1 :
I have copied a file from /home/testuser1 (say examplefile1 testuser1:testuser1 644 ) to /home/testuser1/Videos and I could see that the ownership of the file changed to testuser1:ggg successfully.
1.How can I change the permission also automatically to the one I need (group permision to rwx) if someone is copying files to my destination?

If I am copying a file with 444 permission, then testuser2 wont be able to write to it. Thats normal since it is 444, but he is able to delete it. How ?

B) Moving files by testuser1 :
Comparing with the copying, while moving the files, ownership is not changing to testuser1:ggg. It keeps testuser1:testuser1 and keeps what the actual permission is.

How can I change the permission AND ownership to the one I required automatically ?
Same case as copying, testuser2 is able to delete the file but not able to write if the file is having permission read only.Why ?

I have tried to explain as possible. Please let me know the answers for A and B sections.
Answer: Answers:
<code>A1) man umask
A2) chmod +x permits delete, but not overwrite, because of -w

B1) The owner of a newly-created file is the creator, obviously, but the group is the primary group as specified in /etc/passwd. The fourth field for a user in /etc/passwd is the GID of his primary group. Knowing this, you could change the primary group to what you want, and use umask to give it the permissions you desire.
B2) same as A2
</code>

Linux ownership and permissions


How to run macro with parameter from windows command line?

Question: I have a need for running a Macro from the Windows command line with parameter.  For example, a macro should save, in A1 cell, the value of the parameter specified. Is it possible to accomplish this?
Answer: The best I can think of is using a Macro enabled Worksheet.  AFAIK, it's impossible to fire up a macro without Excel loaded.
The big question in my mind is, why would you need to run it from the commandline?


How to tell my advisor that I didn't get much progress this week gracefully

Question: Me and my advisor have weekly meetings. But this week, I didn't have much progress so we won't have much to discuss. I want to cancel the meeting. How to gracefully express that "I don't have much progress this week" without giving him/her the impression that "I didn't work much"(which is true)?
Comment: In math, in the U.S., at least in non-covid times when I and my PhD students are on campus and in the math building _anyway_, I encourage weekly meetings not only to report on progress, but just to stay in touch. In covid times, Zoom meetings somehow do not seem to succeed so well at "staying in touch", unfortunately.
Comment: It's likely that your adviser has also, on occasion, gone a week without much progress, and would therefore understand your situation quite well.
Comment: There may not be tangible progress.  I expect my students to at least tell me what they have 'tried' since the last meeting, their concerns, or their plan to address their problems. 'concerns' here could be what you just asked, or dealing with info overload.
Answer: I have been in your exact situation many, many times.
More often than not, my temptation (and often what I do) is to send an email a day in advance like "I haven't made much progress since last week. I would be happy to meet if you have something you would like to discuss, but I am also happy to use the time to continue making progress on what we discussed last week." So long as this doesn't happen several times in a row, it is almost always fine, and your supervisor is also busy and I'm sure can other find things to fill one hour.
However, sometimes I (ironically) put off sending that email and the meeting happens anyway, or sometimes the professor wants to meet despite my protests. Sometimes this goes the way you expect -- there's a short meeting that basically ends with "ok let's check in again in a week." However more often than not, and always to my surprise, these meetings can become very interesting sessions where we talk about the project at a higher level without getting bogged down in the week-to-week details. Some very interesting ideas have come out of this, often things that I would never have even thought to try, or new research directions for the project.
So... I'm not sure there is good general advice. If you are clear on what you want to work on, then sending an email to postpone is probably fine and if anything appreciated. But I think it's also ok to keep the meeting and go in with an open mind.
ps -- in the case where you don't make progress for several weeks in a row, the solution isn't to be ashamed that you haven't made progress, but to take stock and ask where you are stuck. Sometimes bringing a clear description of a roadblock to a research meeting is just as valuable as bringing tangible progress, since it may point to a problem that needs to be solved that your advisor didn't expect. Often these periods can be associated with feelings of shame and imposter syndrome and low motivation, but that doesn't mean you are actually doing poorly. Sometimes finding a way around your problem or a way to simplify the problem into something more manageable, rather than stick to the original plan, actually is the best thing you can do.
Answer: In a field like mine (math or cs) it is perfectly natural for research to proceed at an uneven pace. I suspect that is true in many fields.
I'd guess your advisor won't be too surprised if you tell them. But you can just ask if they think a meeting is needed and whether there might be things to discuss and ideas to pursue.
And, "not working" for a week is also not that uncommon since our mental energy levels rise and fall and life often intrudes. Whether you want to say that you didn't work is up to you, unless there is some reason for it.
But, if you always made progress at a steady rate there would be little need for meetings anyway. This might be the most important time to have one. And, "proceeding at a steady rate" doesn't really describe research very well.
But phrasing it as a question (should we meet) is probably better than the alternative.
Comment: Thanks! I took your advice and phrased it as a question.
Answer: I think this week is particularly more important for you to meet your advisor. I would suggest you meet with your advisor and discuss with him the reason why you were not able to make much progress. Was it because of the nature of question you're working on? Is the question/solution not clear to you? Was it because of lack of prerequisites? In which case he could suggest you some reading. Were you not able to make much progress because of personal reasons? For e.g. stress, depression, lack of motivation, etc. Then, he might suggest some other resources or maybe even motivate you in a manner which might again spark your interest in the subject; because sometimes it takes some experience to see how interesting a particular topic is.
I don't think he would have any bad impression about you or judge you if you tell him the truth.
Answer: A (research) meeting does not have to be just about reporting progress. It can be about bringing everyone involved up to date about the status of activities relevant to the success of the (research) project.
Create a summary template with this view in mind.

Report of New Discoveries

Example: Report on literature that you read that impacts the direction of the research.

Report on Status of Unresolved Activities from Previous Meeting

Example: Itemize top-level actions that were set at the last meeting and state whether they are completed, ongoing, on hold, or delegated/delayed (waiting on). Provide background information as needed to resolve how to move any uncompleted actions forward for the next meeting.

Proposals for New Activities

Example: Suggest an upcoming conference that you want to attend or a new theoretical approach that you would like to learn more about.
Finally, plan to use the end of the meeting to create/review a list of actions that you and the other team members should report on at the next meeting.
In summary, you do not have to be embarrassed that you will meet and will report no progress. Stuff happens, delays occur, and yet effective teams still meet to discuss their collaborative project. The greatest benefit will be when you can effectively summarize how the inadvertent delay may impact your timeline to meet your goals, how you might plan to make up the delay going forward, or where you feel you need help to overcome unanticipated problems in your work.


Pre-booking vs booking?

Question: I came across this work in my work,  I am not sure which one to use for a screen menu in our application, "pre-booking" or "booking". This menu will allow users to book their work schedule in advance. Is there any difference between the two ?
Comment: Consider a similar construction: *pre-order* vs *order*. *Pre-book* should mean something like *place on a queue before the organisers are properly ready to accept bookings*, but in practice, *pre-book* is often used as a synonym for *book*, which already has the notion of *in advance*.
Comment: I've seen "pre-booking" used in a couple of ways.  One is where there is a normal period during which reservation can be made.  Pre-booking is used for reservations made before, and outside of, the normal process, often by special arrangements.  Another refers to something that is closer to "calling dibs" on a preference, or reserving a specific booking option, but isn't binding.
Comment: Welcome to ELU. Please show what your own research yields. What information does a dictionary give you about those words. Please have a look at the [Help Center](http://english.stackexchange.com/help) to find out more about posting good questions.
Answer: Pre-booking specifically denotes that you have booked something in advance,

Book (something) in advance:
  a pre-booked hotel reservation
  (ODO)

whilst booking

Reserve accommodation for (someone):
  his secretary had booked him into the hotel
  (ODO)

merely connotes these meanings and booking would refer to the reservation more generally and not specifically the act of booking it beforehand
Comment: Can you add your sources, please.
Comment: @Helmar Editted
Comment: What do you mean by 'motto' here? Can you rephrase the last line?
Comment: @NVZ I'm not sure why the word 'motto' was in there, I can only think it was a typo

Pre-booking vs booking?


Is it possible we supply the differenced data to the ARMA model (not ARIMA) and have the model forecast for the original time series?

Question: I am trying to fit an ARMA model in Python for a non-stationary series. Conceptually, is it possible that I difference the data to first convert it to stationary data, fit the model on this differenced data and then have the model forecast for the original series? If not, what if I get forecast for the differenced data and do some manipulation to convert that forecasted differenced series to forecasted series at original level. How do I achieve this?
Answer: Note that $X_{t+h}=X_t+\Delta X_{t+h}$ where $\Delta X_{t+h}$ is the first difference of $X$ at time point $t+h$: $\Delta X_{t+h}:=X_{t+h}-X_t$. If you have the original series $X_t$ and a forecast for the difference $\widehat{\Delta X_{t+h}}$, then the forecast for the original series at time $t+h$ is $\hat X_{t+h}=X_t+\widehat{\Delta X_{t+h}}$. You simply add the forecasted values to the original series.
Comment: Thanks for your answer. Is this what happens at the backend of an ARIMA model where we supply certain degrees of differencing a.k.a integrations?
Comment: @ShahzebNaveed, yes, I think so.


How to copy file contents to the local clipboard from a file in a remote machine over ssh

Question: To solve this problem I always have to use scp or rsync to copy the file into my local computer to open the file and simply copy the contents of the text file into my local clipboard. I was just wondering if there is a more clever way to do this without having the need of copying the file.
Comment: I changed the title a bit, because I kept the reading "the local clipboard of a file" and wondering since when files had clipboards.
Comment: Thats fine thanks @Anthon English is not my first language so sometimes I need some help with it thanks.
Comment: When all else fails (e.g. you are going through jumphosts), just one other option: use `nl catalina.out` which prefixes each line with numbers so you can be sure you don't miss any out with mouse highlighting to copy and paste.
Answer: Of course you have to read the file, but you could
</dev/null ssh USER@REMOTE "cat file" | xclip -i

though that still means to open a ssh connection and copy the contents of the file. But finally you don't see anything of it anymore ;)
And if you are connecting from an OS X computer you use pbcopy instead:
</dev/null ssh USER@REMOTE "cat file" | pbcopy

PS: Instead of </dev/null you can use ssh -n but I don't like expressing things in terms of software options, where I can use the system to get the same.
PPS: The </dev/null pattern for ssh is extremely usefull for loops
printf %s\\n '-l user host1' '-l user host2' | while read c
do </dev/null ssh $u "ip address; hostname; id"
done

Comment: @MikeSchinkel yes, that is easy: The `</dev/null` is the input of the process (here ssh), which otherwise would wait. When you do the ssh on the command line, this looks equal to not giving any input, but in loops of several ssh commands, this is needed, so it is a good vritue to give it always. It is just a question of taste to put it on the left. I do this to express `<INPUT PROCESS | OUTPUT` logic, where the INPUT is on the left. You can also do PROCESS <INPUT | OUTPUT, but that looks ugly to me.
Comment: This is great, I though this wasn't possible. Although I had to use pbcopy because I'm connecting from a mac computer to a CentOS box. I just had to change xclip to pbcopy and it worked. Pretty nice!
Comment: `-e none` would only be need to prevent the special handling of `~` **from the keyboard** (not from the output of commands) in interactive sessions only. It's not needed here.
Comment: @StéphaneChazelas you are right. Today I would use `</dev/null ssh USER@REMOTE "cat file"` Though this `</dev/null` is not needed, it might be usefull in loops, or in background operations. There is also the option -n, but if you don't go interactive, you should use such a `</dev/null` pattern!
Comment: @ikrabbe —  I am not exactly sure what the purpose of `</del/null` is and why it is to the left of the `ssh` command. Do you mind clarifying/explaining a bit? Thank you in advance.
Comment: @ikrabbe — I had never seen the input to the left of the process so I assumed your example was showing a requirement. Thank you for clarifying how it works and that it works either way, and that it was just your preference to do that way instead of a requirement.
Answer: Using Putty as your SSH client, ensure you max out lines of scrollback in your configuration.  When you connect, you can clear screen and scrollback and then cat the file and when I right click on the title bar, I can select "copy all to clipboard".  Then I can paste into an editor on my local machine.
Answer: Can I assume you are running the X Window System and some window manager (KDE/gnome/etc.)? There are a number of terminal applications (Konsole for example) that have a built in menu that allows copy/paste functions.
So you could:

user@machine:~$ ssh email@example.com
open the file on the remote machine
highlight the contents of the file with mouse and select copy from the edit menu on your local machine.

Or did I misunderstand your real needs?
Comment: I could do this with small files but with big files if I try to scroll up or down it goes off of the file (you can try it for yourself to see that this approach not always work.)
Comment: with big files, you can take more time on copy than rewrite the script manually in the local editor xD
Answer: Far Manager Linux port supports synchronizing clipboard between local and remote host. You just open local far2l, do "ssh somehost" inside, run remote far2l in that ssh session and get remote far2l working with your local clipboard.
It supportes Linux, *BSD and OS X; I made a special putty build to utilize this functionality from windows also.


Cardinality of a Hamel basis of $\ell_1(\mathbb{R})$

Question: What is the cardinality of a Hamel basis of $\ell_1(\mathbb R)$? Is it deducible in ZFC that it is seemingly continuum? Does it follow from this that each Banach space of density $\leqslant 2^{\aleph_0}$ has a Hamel basis of cardinality continuum (OK, I do know it cannot be smaller for an inf.-dim. Banach space)?
Comment: See also [this question](http://math.stackexchange.com/q/427834/462).
Answer: It was proved by G.W. Mackey, in On infinite-dimensional linear spaces, Trans. Amer. Math. Soc. 57 (1945), 155-207, see Theorem I-1, p.158, that an infinite-dimensional Banach space has Hamel dimension at least $\mathfrak{c} = 2^{\aleph_0}$. A short proof can also be found in  H. Elton Lacey, The Hamel Dimension of any Infinite Dimensional Separable Banach Space is $c$, Amer. Math. Mon. 80 (1973), 298.
Moreover, a vector space over $\mathbb{R}$ of cardinality $\kappa \gt \mathfrak{c}$ has dimension $\kappa$ by a theorem of Löwig, Über die Dimension linearer Räume, Studia Math. 5 (1934), pp. 18–23.
Added: By combining these two facts we get the crisp statement (as given by Halbeisen and Hungerbühler in the paper Jonas linked to in a comment): "The Hamel dimension of an infinite-dimensional Banach space is equal to its cardinality."
Finally, $\ell^1(\mathbb{R})$ embeds isometrically into $\ell^\infty(\mathbb{N})$, so its dimension is at most the cardinality of $\ell^\infty(\mathbb{N})$ which is $\mathfrak{c} = \#(\mathbb{R}^{\aleph_0})$.

Added:
To answer your question whether a Banach space $X$ of density $\mathfrak{c} = 2^{\aleph_0}$ must have dimension $\mathfrak{c}$ and whether this is a consequence of knowing the dimension of $\ell^1(\mathbb{R})$: yes.
This is because it suffices to pick a dense subset $S$ of cardinality $\mathfrak{c}$ in the unit sphere of $X$, then choose a bijection $\mathbb{R} \to S$ and send the standard basis $(e_t)_{t \in \mathbb{R}}$ of $\ell^1(\mathbb{R})$ to $S$. This map extends to a map $\ell^1(\mathbb{R}) \to X$ which is onto by the Banach–Schauder theorem (usually proved as part of the open mapping theorem: if a continuous linear map sends the unit ball of $Y$ densely into the unit ball of $X$ then it is onto).
Comment: Life in a universe where inf. dim. Banach spaces have a Hamel basis?? Just crazy... What's next? Ultrafilters over $\mathbb N$ and choice function on socks??
Comment: :) ${}{}{}{}{}{}$
Comment: @t.b. Could you provide an English version for the German article above? I want to read it, but I can't read German.
Comment: The original link to the paper by Halbeisen and Hungerbühler  was no longer working, so I replaced ti with https://people.math.ethz.ch/~halorenz/publications/pdf/hamel.pdf - in case this link stops working at some point, too, here is a [link to the Wayback Machine](http://web.archive.org/web/20200708080750/https://people.math.ethz.ch/~halorenz/publications/pdf/hamel.pdf).
Answer: Theorem. Let $X$ be an infinite dimensional Banach space. Then $\,\mathrm{dim}\,X\ge 2^{\aleph_0}$.
Sketch of Proof. Based on M.G. McKay's proof. Let $\{w_n : n\in\mathbb N\}\subset X$ be a linearly independent set.
Step A. Using Hahn-Banach, we shall construct another linearly independent set
$\{v_n : n\in\mathbb N\}\subset X$, and a set of linear functionals $\{v^*_n:n\in\mathbb N\}\subset X^*$, such that
$$
\mathrm{span}\{v_1,\ldots,v_n\}=\mathrm{span}\{w_1,\ldots,w_n\}, \quad
\text{for all $n\in\mathbb N$,}
$$
$\|v_i^*\|=1$, for all $i\in\mathbb N$, and
$$
v_i^*(v_j)=\delta_{ij}, \quad \text{for all $i,j\in \mathbb N$.}
$$
This is done inductively. Define $v_1=w_1/\|w_1\|$, and $v_1^*(v_1)=1$,
and extend, using Hahn-Banach to $X$, so that $\|v_1^*\|=1$. Assume that
$v_1,\ldots,v_k$ and $v_1^*,\ldots,v_1^*$, have been defined so that
$$
\mathrm{span}\{v_1,\ldots,v_k\}=\mathrm{span}\{w_1,\ldots,w_k\},\quad
\|v_i^*\|=1\,\,\text{and}\,\,\,v_i^*(v_j)=\delta_{ij}, \quad
\text{for all $\,i,j=1,\ldots,k.$}
$$
Then let
$$
v_{k+1}=w_{k+1}-\sum_{j=1}^k v_j^*(w_{k+1})v_j.
$$
Clearly, $\,v_{k+1}\in \bigcap_{j=1}^k\mathrm{ker}\,v_j^*$. Next, we
define the functional $v_{k+1}^*$,
so that $v_{k+1}^*(v_j)=\delta_{k+1,j}$, for $j=1,\ldots,k+1$, and extend it via Hahn-Banach to $X$, and in order to keep its norm unit we suitably rescale $v_{k+1}$.
Step B. It is possible to define a subset $\mathcal S$ of $\mathcal P(\mathbb Q)$, such that

$|\mathcal S|=|\mathcal P(\mathbb Q)|=2^{\aleph_0}$, and

If $A,B\in\mathcal S$, and $A\ne B$, then $\,\rvert A\cap B\rvert<\aleph_0$.

For example, if for every $r\in\mathbb R\setminus\mathbb Q$, we set $A_r\in\mathcal P(\mathbb Q)$ the set of the elements of a sequence of rationals converging to $r$, then $A_r\cap A_{r'}$ is a finite set, whenever $r\ne r'$.
Next, let $\mathbb Q=\{q_n\}_{n\in\mathbb N}$, and set
$$
u_r=\sum_{q_n\in A_r}2^{-n}v_n, \quad r\in\mathbb R\setminus\mathbb Q.
$$
It is readily shown that the set
$U=\{u_r:r\in\mathbb R\setminus\mathbb Q\}\subset X$ is  equi-numerous to $\mathbb R$. It remains to show that $U$ linearly independent. Let $u_{r_1},\ldots, u_{r_k}\in U$, and assume that
$$
c_1u_{u_{r_1}}+\cdots+c_ku_{u_{r_k}}=0,
\quad\text{for some $c_1,\ldots,c_k\in\mathbb R$.}
$$
For an arbitrary $j=1,\ldots,k$, since $A_{r_j}\cap A_{r_i}$ is finite whenever $i\ne j$, then $A_{r_j}\setminus\bigcup_{i\ne j}A_{r_i}\ne\varnothing$. Let $q_\ell\in A_{r_j}\setminus\bigcup_{i\ne j}A_{r_i}$. Then $v^*_\ell(u_{r_i})=0$, for all $i\ne j$, while  $v_\ell^*(v_j)=2^{-\ell}$, and hence
$$
0=v^*_\ell\big(c_1u_{u_{r_1}}+\cdots+c_ku_{u_{r_k}}\big)=c_jv^*_\ell(u_{r_j})
=2^{-\ell}c_j,
$$
and thus $c_j=0$.
Comment: I think that it is worth mentioning that this is basically the proof from H. Elton Lacey's paper mentioned in the other answer: http://www.jstor.org/stable/2318458
Comment: @MartinSleziak: This is true!


How smart contracts written in solidity be expressed in legal prose so it becomes legally enforcing/binding?

Question: How can smart contracts written in solidity be expressed in legal prose so it becomes legally enforcing/binding?
Answer: You need to find someone who is an expert in both Solidity and legal prose. He will be able to translate Solidity contracts to legal contracts.
I can see how it can be useful in some cases to shield from bugs in Solidity code.
Comment: I think everyone who's into smart contracts should start reading laws and maybe engaging in a "smart-law" (heh) firms that specialize in this kind of translations. if smart contracts start getting mainstream, this kind of firms will become vital.
Comment: Understood - Thanks! How will the legal authorities enforce it though? Is there some sort of a legal-solidity parsing tool?
Comment: I think it can be enforced via court same as any other legal contract. Solidity-to-legal translator app sounds like an interesting idea. It seems like a very hard task though that would probably require machine learning to solve.


What happens if the TARDIS lands on a really sloped hill where it's not flat?

Question: What happens if the TARDIS (or any of the other Time Lords' TARDISes) lands on a really sloped hill where it's not flat? Would it stay upright or would it fall over?
Comment: Depends on whether it's the Red Nose special or not.
Comment: Related [What happens when a TARDIS falls over onto its door side?](https://scifi.stackexchange.com/q/177248/21351)
Comment: https://www.youtube.com/watch?v=IRbbKbFvJuY
Comment: Not a hill/mountain, but we have the TARDIS on the side in 'Eleventh Hour'.  https://www.youtube.com/watch?v=8MKvk2jnL6s
Answer: There's a slight discrepancy between the old series and the 2005 reboot in what would happen to the TARDIS's interior if the TARDIS's exterior is tilted.
As can be seen in the second episode of series 19's Castrolova, when the Fifth Doctor's TARDIS lands tilted the interior tilts with it.
However in NuWho S7: E11, the Eleventh Doctor says

The TARDIS is special. She has her own gravity, I'd explain if I had some charts and a board pen.

when the salvage team step inside of the TARDIS while on its side but find themselves right way up once through the doors. Furthermore, Twelve's TARDIS is horizontal while in Clara's bag during S8: E9 but the Doctor continues to walk around upright while stuck in the TARDIS. He can even "Addams Family" the miniature exterior from horizontal to vertical to escape an oncoming train. However, when the miniature TARDIS falls back onto its side a moment later in the scene the interior does quake although its orientation doesn't change.
Regarding what happens only to the exterior, the TARDIS can fall over if tilted too far, although this may be able to be countered if the Doctor knows the TARDIS won't be materialising upright. In the video @Valorum commented with, the TARDIS can fall if the ground beneath it gives way and it becomes unbalanced. However, in S6: E2 of NuWho the Doctor successfully materialises the TARDIS flush with the vertical face of a building, indicating that it doesn't have to fall from a tilted surface if it is known to be materialising onto one.
Comment: @Danny3414 The Swimming Pool ended up in the Library (or vice versa) in _The Eleventh Hour_, series 5 episode 1 ("We meet Amelia Pond").  We see the Doctor wet as he climbs out the door, but the control room is not shown.  He does fall "into" the Tardis when climbing back in. However, there's room for debate as to whether this is due to the Tardis' orientation (lying sideways on the ground) or the Tardis' state (Regenerationatively).
Comment: I have a faint memory of the control room flooding once due to the TARDIS overturning. I think it was because of the 'lower level water tanks' (maybe also swimming pool?)
Comment: Don't forget Matt Smith's entrance into the series. The TARDIS was on its side and he had to climb a rope to get out. I believe because the internal gravity was damaged.
Answer: The TARDIS would likely fall over, as it has before
While not exactly the situation you described, the Third Doctor serial "The Curse of Peladon" has the TARDIS land on a mountain slope where it begins rocking, going to about a 30 degree angle. Shortly afterwards, some high winds pick up and it falls over, off the mountain (but being indestructible, it remains intact).

Note that in this case, the TARDIS materialized without issue and the Doctor noted that it was a "smooth landing". It's unclear what would happen if it tried to materialize at, say a 60 degree angle, but I suspect the Doctor wouldn't report a "smooth landing".


A combinatorial identity on even spanning subgraphs in the Erdös-Renyi random graph with relations to the Ising model

Question: Let $x \in \lbrack 0,1 \rbrack$. Then for any finite graph $G$ consider the Erdös-Renyi random graph where we independently keep each of the edges with probability $x$. Denote the corresponding probability measure $P_x$. An even spanning subgraph of $G$ is a subgraph where all the vertices are kept and some of the edges such that each vertex has even degree. Denote the set of even spanning subgraphs of G by $\text{ess}(G)$.  For an even spanning subgraph $g$ let $O(g)$ be the event that all the edges are kept.
By some knowledge about geometric representations of the Ising model I happen to know that for every pair of vertices $v_1,v_2 \in G$ we have
\begin{align*}
\sum_{g_1, g_2 \in \text{ess}(G)} \frac{ P_{x^2} \left( \{v_1 \leftrightarrow v_2 \}, O(g_1), O(g_2) \right)}{P_x(O(g_1))}   = \sum_{g_1, g_2 \in \text{ess}(G)} P_x( \{v_1 \leftrightarrow v_2 \}, O(g_1)) P_x( \{v_1 \leftrightarrow v_2 \}, O(g_2))
\end{align*}
Here $\{v_1 \leftrightarrow v_2 \}$ is the event that there is a path of kept edges in $G$ connecting $v_1$ and $v_2$.
However, this is a problem purely on Erdös-Renyi random graphs, but I can't find a combinatorial proof of this which could maybe give some insights on how the relation generalizes beyond the class of events $\{ v_1 \leftrightarrow v_2 \}$.
Comment: Yes - I start to thnik that one should somehow invoke combinatorics like in the switching lemma.
Comment: The bracket in the denominator is not closed, and in the numerator too. Also am I correct that the event in the numerator read as "the edge $\{ v_1 \leftrightarrow v_2 \}$ is kept and either all edges of $g_1$ are kept or all edges of $g_2$ are kept or both"?
Comment: Thanks - I have added an explaination.
Comment: Ah, thank you, then I proved something different, but possibly related. Should think.
Answer: (warning: below $\{v_1 \leftrightarrow v_2 \}$ has different meaning than in OP)
Let me prove a slightly different identity
\begin{align*}
x\sum_{g_1, g_2 \in \text{ess}(G)} \frac{ P_{x^2} \left( \{v_1 \leftrightarrow v_2 \}, O(g_1), O(g_2) \right)}{P_x(\{v_1 \leftrightarrow v_2 \},O(g_1))}   = \\\sum_{g_1, g_2 \in \text{ess}(G)} P_x( \{v_1 \leftrightarrow v_2 \}, O(g_1)) P_x( \{v_1 \leftrightarrow v_2 \}, O(g_2)).
\end{align*}
If $E_i$ denotes edge set of $g_i$ and $e=\{ v_1 \leftrightarrow v_2 \}$, then LHS may be written as $$\sum_{g_1,g_2} x^{2|E_1\cup E_2\cup e|-|E_1\cup e|+1}=\sum_{g_1,g_2} x^{|E_2\cup e|+|(E_1\Delta E_2)\cup e|},$$
where we apply the general identity $2|A\cup B|-|A|=|B|+|A\Delta B|$ for $A=E_1\cup e$, $B=E_2\cup e$, and $|(E_1\Delta E_2)\cup e|=1+|A\Delta B|$. It remains to change the pair $(g_1,g_2)$ in RHS of my identity onto pairs $(g_1\Delta g_2,g_2)$.
I am still not sure what exactly do you mean (there are several typos at least), but possibly something provable along these lines.


What's the meaning of these ip route rules

Question: There are some IP route rules in an old code, but I don't know the meaning of them:
ip route flush table 100
ip rule add fwmark 1 lookup 100
ip route add local 0.0.0.0/0 dev lo table 100

Comment: Hello DerekChen. You've seen `man ip` - did you notice that the subcommands are detailed at the end of the document under the `SEE ALSO` section? Specifically,`man ip-route` and `man ip-rule`
Comment: Are you looking at `ss-rules` from luci-app-shadowsocks?
Answer: One line at time:
ip route flush table 100

should clear table with ID 100.
ip rule add fwmark 1 lookup 100

adds a rule to packets marked as 1 (I suppose with a --set-mark 1 in iptables) to be referenced with table 100.
More on ip rule documentation.
ip route add local 0.0.0.0/0 dev lo table 100

routes all the traffic (0.0.0.0/0 is equivalent to default) to the device lo, i.e. the local loopback, a therm in which the local system is called.
It is not mandatory to the table ID to be an integer (100 in your example), it could be a string too. Here an interesting example.
Answer: This code is most certainly part of the setup on Linux for transparent proxy (using iptables' socket match and TPROXY target or nftables's socket expression and tproxy statement).
from Linux kernel's documentation tproxy.txt:

1. Making non-local sockets work
================================

The idea is that you identify packets with destination address matching a local
socket on your box, set the packet mark to a certain value:

# iptables -t mangle -N DIVERT
# iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
# iptables -t mangle -A DIVERT -j MARK --set-mark 1
# iptables -t mangle -A DIVERT -j ACCEPT

Alternatively you can do this in nft with the following commands:

# nft add table filter
# nft add chain filter divert "{ type filter hook prerouting priority -150; }"
# nft add rule filter divert meta l4proto tcp socket transparent 1 meta mark set 1 accept

And then match on that value using policy routing to have those packets
delivered locally:

# ip rule add fwmark 1 lookup 100
# ip route add local 0.0.0.0/0 dev lo table 100

the first command selects an alternate routing table for marked packets. The second command adds content to this routing table: intercept packets (that should have been routed but were diverted) to end on the local system.
This first part, above, is to keep state: connections that were diverted (by the part below) will keep being diverted, because the destination address, which isn't a native host address, will nevertheless exist on a local socket, enabled by the socket option IP_TRANSPARENT:

Note that for this to work you'll have to modify the proxy to enable (SOL_IP,
IP_TRANSPARENT) for the listening socket.

There has to be a dedicated application handling this. For example squid or haproxy with adequate configuration matching the following tproxy rules:

The 'TPROXY' target provides similar functionality without relying on NAT. Simply
add rules like this to the iptables ruleset above:

# iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY \
  --tproxy-mark 0x1/0x1 --on-port 50080

Or the following rule to nft:

# nft add rule filter divert tcp dport 80 tproxy to :50080 meta mark set 1 accept


Deleted pictures keep coming up

Question: I am trying to import my pictures from my Samsung Note 4 to my laptop. But I have a problem with the whatsapp images folder. The pictures showing on my mobile screen are not the same shown on my pc once connected. Some deleted pictures or repeated ones are taking the place of others by having the same name. And they are imported instead of the ones I didnt delete.
I don t know if I made myself enough clear. But am gonna lose my pictures if I don t find a solution.
Thank you.
Comment: In what way are you importing? Kies?
Answer: Try using u file manager on your phone to sort the pictures into one folder, then copy that folder, if the issue remains the same..
Try compression (zip/rar/7zip/tar) and Extract on PC

Deleted pictures keep coming up


When is forward error correction a good idea for packets?

Question: Systems could use UDP and employ forward error correction to transmit the whole message, without retransmits, even if a few packets are lost. Does this ever work well in practice or is the extra overhead too much of a waste?
Answer: I think it's useful for some applications like Voice (VoIP), where you want to avoid errors, and where you never want stop (to retransmit a NAKed packet) and wait (until it's retransmitted).
So it might be implemented on top of the Real-time Transport Protocol flavour of UDP.

Wouldn't it be terrible for latency?

Are you asking whether forward error correction increases end-to-end delay? If so, I think the answer is "no", but it does increase the needed bandwidth.
I believe you always already need some latency, to avoid jitter; so for example, you might say "let's delay the whole voice channel by 200 msec, so any/every packet can take from 0 to 200 msec to cross the internet, and be reassembled and sent through the D-to-A converter at the other end."
Given those numbers, then having no forward error correction might mean that, in each 200 msec period, you send 10 packets each containing 20 msec of data ... and if one is lost, then that's a gap (a glitch) at the other end.
Whereas, having some forward error correction might mean that, in each 200 msec period, you still send 10 packets ... each packet contains 20 msec of data, plus 10 msec of data that's already been transmitted in another packet (or, maybe you send 30 packets instead of 20). Then, if any single packet is lost, the data which it carried was delivered redundently (half in each of two other packets), which avoids any glitch in the decoded output.
Comment: Wouldn't it be terrible for latency?
Comment: Forward error correction doesn't introduce latency, it simply uses more bandwidth.  It doesn't delay anything, and doesn't imply retransmits.
Answer: It also makes sense for storage medium, such as hard drives and optical disks, where you can't just go back to the source to get the uncorrupted data.  In fact, both hard drives and optical disks use forward error correction quite extensively.
Forward error correction is also used extensively in wireless communications, where errors tend to knock out just a few bits at a time.  Rather than lose the whole packet to a single bit error, forward error correction is used to fix the corrupted bits.
Answer: Depends on the application.
For applications such as games, error corrections are always necessary as it wont make a big difference if you lose a bit of data.
However, if the application requires specific, in-order data, then some sort of error correction is necessary.
It's not a question of "overhead", it's more about "application".
Answer: The simple answer is if you're sending over a high-bandwidth high-delay (meaning "long distance") link, forward error correction makes sense.  Otherwise, it probably doesn't.
Answer: When the "price" of retransmission is higher than what you are willing to pay.
Satellite for instance has a very long propagation time, it is better to send a few more bytes then to send a packet again.
Comment: Question is about packet-level error correction, i.e. sending few more packets to recover lost packets.


How to delete part of shape in Photoshop?

Question: I have two shapes on two different layers. I want to crop the only the part of image only according to the shape on layer 1. I want to keep part of shape on layer 2 which is in the layer1 shape area and want to remove all area outside the shape1.
Please see the following image for better understanding:
Answer: Step 1
Ctrl + Click the thumbnail of Layer 2

Step 2
Ctrl + Shift + Alt + Click the thumbnail of Layer 1. This will give you the intersection of the 2 shapes.

Voila! You'll have a selection of the shape you want.
If you are trying to keep your shapes intact, then still do the above, but then do the following:

Right-Click the selection created in Step 2
Go to Make Work Path...
Set the Tolerance to something low like 0.5

Now you'll have a new Path from the selection and your shapes will remain intact.
Result
Comment: Thank you very much for such a detailed answer. It was very helpful to me.
Comment: No problem, welcome to GD!
Answer: I will piggyback off ckpepper02's answer but I will use shapes with vector masks instead of rasterized shapes. I will also use layer masks to be non-destructive.
Let's say you have this image here:

Your layers would look like this:

CTRL-Click the top layer's vector mask.
Then CTRL-ALT-SHIFT-Click the bottom layer's vector mask.
That will select the intersection of the two layers.
Now select the top layer, and click Add layer mask at the bottom of the layer's panel.

Here's the final result:

The added benefit of the layer mask means we do not have to destroy any data. We can, at any time, get back to full shape, or adjust it further if we'd like. If you're unfamiliar with layer masks, I'd suggest you read this quick article to get a better idea.
Also, with this technique we can keep our vector masks as well and we don't need to rasterize our layers.
Comment: Thank you so much for such a wonderful answer. It helped me a lot. Thanks again.
Answer: You can create a vector mask based on shape 1 for non destructive 'cropping' of the layer 2 shape.


Digging at night in indoor potted plants

Question: I recently filled a window seat with potted plants,  mostly succulents.  The last couple of days something's been digging into plants,  mainly an aloe vera. This isn't a small hole,  almost half of the soil in the pot ends up next to the plant.  Whatever it is also knocked a jade plant over. No signs of droppings or anything else disturbed. Please advise.
Answer: It's the 21st century. Odds are excellent that you have something that records video, possibly many such things, some of which might be obsolete, but still capable of recording video (looking at you, old cell phones and tablets.)
Set one or more such things up with the video recording adjusted so that it can shoot for 8 hours or more, provide enough light that it can see, review the video in the morning.
Comment: You may even have something that can record only on motion (I think there are Android apps for that) so you don;t have to review hours of video.  OTOH if you leave enough light on for the device to see, that might be enough to act as a deterrent to a nocturnal creature.
Answer: Given the time of the year (assuming you're in the northern hemisphere), the creature is either a mouse or, more probably, a shrew. Shrews are carnivores, so if that's what this is (and I think it is), then its looking for buried insects or earthworms. This is especially the case if you've had those pots outside during the summer. Shrews resemble mice but they're a darker brown and have an elongated, very pointy nose. In my experience, shrews do not damage much at all when in a house, unlike mice.
Mice are easy to eradicate, but shrews are much, much more difficult because they're smarter. I've had one in a house in the past and tried a variety of mousetraps - including one setup where I had a baited mousetrap surrounded by non-baited and set mousetraps. The shrew popped every single non-baited trap, then popped the baited trap, then ate the bait. I only caught him when I used a small live-trap. I let him go near a woodpile a mile away because he was a worthy adversary. Not sure who actually won that battle, but I suspect it was the shrew (free transportation to its desired home).
Comment: Note "small" live trap - shrews can get out of live traps that will catch mice and voles (I had a cat that brought them in)
Comment: @ChrisH - Interesting. My opponent rattled the bars but didn't make it through them. Perhaps we used different brands of traps (mine was for mice, but had very narrow steel bars). The shrew did get out of one of those little plastic traps that close behind the mouse when it touches the bait. He rolled it around on the floor until it broke - and then got into the second one I'd baited and did the same thing. He was smart little bugger.
Comment: Definitely different. My live trap didn't have bars. It was sheet metal with punched holes.