Is it possible to eliminate induced drag completely?

Question: According to Wikipedia an airfoil of infinite length would create zero induced drag. Therefore, would it be possible to make a wing that creates no drag if you ignore viscous effects (skin friction) by walling it off on the wingtips to prevent vortex formation? Or is there another drag creating mechanism?
Comment: But to directly answer your question: yes, you just don't try to generate any lift then your induced drag will disappear.
Comment: Well, how do you wall it off completely without involving infinity? With infinity long wing you are already walling it off although the wall is horizontal.
Comment: @user3528438: Or use a blimp, or a jumpjet...
Answer: The infinite span has nothing at all to do with having no ends.
The ratio of lift to induced drag increases with span. If you fix the lift, and vary span, the induced drag will tend to zero as the span tends to infinity. That means in limit a wing of infinite span generating finite lift (and therefore flying at zero coefficient of lift!) will have zero induced drag.
This is a highly abstract approach to things and I don't think it provides any useful insight.
Anyway, forget about the vortices. They only happen behind the wing anyway and therefore are obviously irrelevant! Instead, call upon the good old laws of motion. The lift is upward force of the air on the wing. By principle of action and reaction (Newton's 3. law) the wing must apply force of equal magnitude and opposite direction, that is downward, on the air. Now if the ambient pressure above and below the wing is the same, this force will accelerate the air downward, which will increase its kinetic energy. And by law of conservation of energy, this energy has to come from somewhere and the only way work can be done here is by drag.
This suggests the way to reduce it. If the pressure can be increased below the wing without accelerating the air, there won't be induced drag. Well, that's exactly how ground effect reduces drag. Normally it does not eliminate it, because the air can still move outward, but a wing flying in a trench could perhaps get quite close (though not to zero, because the air still needs to move at least a bit to maintain the pressure difference).
Comment: But the air pressure is not the same above and below the wing...
Comment: @FrancisL., the pressure near the wing is not. But the *ambient* pressure is the pressure outside significant effect of the wing and that is the same (well, except for the pressure gradient due to density, but that is the equilibrium).
Comment: @JanHudec I am also new one who struggle(as lot of members here) with induced drag,Can you help me to better understand what induced drag REALLY IS?https://aviation.stackexchange.com/questions/80791/can-i-measure-induced-drag-with-a-simple-wind-tunnel-test
Comment: @Сократ, Try [this answer](https://aviation.stackexchange.com/a/33032) of mine and the other three linked therein.
Comment: @JanHudec `Peter words; Induced drag is the backward-pointing part of the pressure force vector `so INDUCED DRAG=PRESSURE DRAG AT GIVEN AoA - PRESSURE DRAG AT zero lift AoA   ?
Comment: @Сократ, I'd say yes.
Comment: @JanHudec That mean my induced drag-wind tunnel test   is correct?https://aviation.stackexchange.com/questions/80791/can-i-measure-induced-drag-with-a-simple-wind-tunnel-test
Comment: @Сократ, as per definitions yes, just keep in mind that in the wing tunnel you are probably in 'ground' effect and likely even a 'trench' effect, so the induced drag will be less than in free flight.
Comment: @JanHudec Thanks a lot!
Answer: You are describing tip plates, which you see on STOL aircraft from time to time,  but which are actually too small to really do any good.  I dimly remember that for tip plates to have any noticeable effect they have to extend at least a chord width beyond the airfoil.  Because it's not just the air immediately adjacent to the tip that's curling around; it's a large package of air extending quite a distance, and to block it all takes a huge wall to get in the way.  In which case they create so much drag on their own, and create all kinds of other issues, the benefit is mostly neutralized.  Otherwise you'd see massive wing tip panels all over the place.
Answer: No, it is not possible to eliminate induced drag completely.  Many parasite drag/induced drag graphs erroneously have induced drag approaching zero.  And one certainly cannot ignore viscous effects or parasitic drag.  There is no free ride here, although it is cheaper at Vy and at higher altitudes where thinner air favors greater ground speed.
But designers do try to approach an airfoil of infinite length by designing as high an aspect ratio as possible, as in sailplane.  Also seen in nature with the albatross, this type of wing
provides the highest lift to drag ratio, but at a cost.  These wings will stall at a higher airspeed than a lower aspect ratio wing and have less stability in pitch.  The stall angle of attack is also lower.
But the performance indicates why this type of wing is most efficient, and also why props are more efficient than fans.  A wing creates lift in three ways, compression, mass deflection (action/reaction) from the bottom of the wing, and creation of lower pressure above the wing by deflection of air flow over the top of the wing.  Of these 3, the third, created by the airfoil, is most efficient.  Note, a long, thin, high AR wing will not do nearly as well with the first 2 due to pressure "leakage" from underneath, whereas a more parachute-like low AR will continue to generate more lift at a higher AOA before it stalls, just not as efficiently.  The vortex lift from deltas, ditto.
There are also design considerations as far as strength for infinite wings, but for efficient cruising, we get as close as we can with high AR.


what's an easily scalable way to set a cookie on my domain?

Question: I am trying to do some simple cookie tracking and need to find an easily scalable way to set a cookie.  The setup needs only to set a cookie, no server side logic needed, no uniqueness or token required.  Something as simple as "HAS_VISITED=true;" is all I really need.  Is there some cloud service that does this?  I need it to be on my domain so I can't really have another domain do this.  I've looked into Varnish to set cookies but that means that I need to set up a server that will scale.  The scale could be very large ( > 4k requests / sec ) so I dont really trust myself to setup a load-balancer/EC2 configuration with any real confidence.
I am really hoping that someone has already solved this.  If there isn't a service to do this what would the cheapest setup (CPU/resource wise) be?
Answer: You can do only with Varnish, you need something like this:
<code>set req.http.Cookie = "HAS_VISITED=true;";
</code>


How to tell machine how far travel limits without switches

Question: I have a 3d printer that is homebuilt with salvaged parts. Occasionally there is some kind of error and when i start my code the minute it starts it max out on x and y axis and continues to do it until i kill the connection and reset everything. I have found that when i put G21 G90 into the first line of the file it doesnt do this anymore. But I'm wondering if i can "teach" my machine how far it can go before it stops? I am using "grbl controller" to send g-code to my arduino uno woth grbl loaded onto it.
Comment: Limit switches are dirt-cheap.  Install a set and save yourself a lot of pain.
Comment: The machine is tiny and it would be a pain. I was more wondering what was causing it to max out and after finally stopping coordinates displayed would be way farther than the work was supposed to be
Comment: there are micro switches, also you can do a couple with cooper; it just need to have spring motion or gap 0.5mm
Answer: Since 3D printers works with coodinates and the gcode generator requires the origin point and bed shape and bed size. knowing this your programs never will be out of the printing area.
My printer has a printing area of 16.5 x 16.5 cm, so I set this parameter to CURA, Slic3r and 3dsimplify and I can't generate the gcode if the part does not fit on the bed. So I print parts with 15cm maximum
Also the firmware has this limits to 16cm, the 0.5 cm is just for safety
Of course if I send a command with pronterface or any other gbrl controler I can go over the limits due the X0Y0 could be out of position (offset), but if you respect the origin point and don't try to go over the limits by yourself the machine will be ok.


What is the best option for White after 1.e4 e5?

Question: So lets say I am white, and I open with 1.e4. Black responds with 1...e5. What would be the best move to get me into the best opening position?
Comment: General consensus (including engine's) is that **2. Nf3** is strongest.  Many other moves are also playable for the vast, vast majority of chess players. For example, **2. Nc3** and **2. Bc4** are quite playable (many other options). Play **2. f4** if you're looking to take souls (but know it is a double-edged weapon).
Answer: Chess isn't a solved game so it's hard to give a definite answer. However experience tells us that 2.Nf3 (developing a piece and targeting the e5 pawn) is the preferred choice by strong players. 2.Nc3 and 2.Bc4 are probably just as good but not so flexible (for instance with 2.Nc3 you don't get the opportunity to play a quick c3+d4 plan).
Gambit lovers may also want to try 2.d4 (to get into a Danish Gambit after 2.exd4 3.c3) or 2.f4 (the King's Gambit)
You can explore a bit here


Cleaner way to update nested structures

Question: Say I have got following two case classes:
case class Address(street: String, city: String, state: String, zipCode: Int)
case class Person(firstName: String, lastName: String, address: Address)

and the following instance of Person class:
val raj = Person("Raj", "Shekhar", Address("M Gandhi Marg",
                                           "Mumbai",
                                           "Maharashtra",
                                           411342))

Now if I want to update zipCode of raj then I will have to do:
val updatedRaj = raj.copy(address = raj.address.copy(zipCode = raj.address.zipCode + 1))

With more levels of nesting this gets even more uglier. Is there a cleaner way (something like Clojure's update-in) to update such nested structures?
Comment: @GClaramunt: Yes, I want to preserve the immutability.
Comment: I assume you want to preserve immutabilty, otherwise, just stick a var in front of Persons' address declaration.
Answer: Funny that no one added lenses, since they were MADE for this kind of stuff. So, here is a CS background paper on it, here is a blog which touch briefly on lenses use in Scala, here is a lenses implementation for Scalaz and here is some code using it, which looks surprisingly like your question. And, to cut down on boiler plate, here's a plugin that generate Scalaz lenses for case classes.
For bonus points, here's another S.O. question which touches on lenses, and a paper by Tony Morris.
The big deal about lenses is that they are composable. So they are a bit cumbersome at first, but they keep gaining ground the more you use them. Also, they are great for testability, since you only need to test individual lenses, and can take for granted their composition.
So, based on an implementation provided at the end of this answer, here's how you'd do it with lenses. First, declare lenses to change a zip code in an address, and an address in a person:
val addressZipCodeLens = Lens(
    get = (_: Address).zipCode,
    set = (addr: Address, zipCode: Int) => addr.copy(zipCode = zipCode))

val personAddressLens = Lens(
    get = (_: Person).address,
    set = (p: Person, addr: Address) => p.copy(address = addr))

Now, compose them to get a lens that changes zipcode in a person:
val personZipCodeLens = personAddressLens andThen addressZipCodeLens

Finally, use that lens to change raj:
val updatedRaj = personZipCodeLens.set(raj, personZipCodeLens.get(raj) + 1)

Or, using some syntactic sugar:
val updatedRaj = personZipCodeLens.set(raj, personZipCodeLens(raj) + 1)

Or even:
val updatedRaj = personZipCodeLens.mod(raj, zip => zip + 1)

Here's the simple implementation, taken from Scalaz, used for this example:
case class Lens[A,B](get: A => B, set: (A,B) => A) extends Function1[A,B] with Immutable {
  def apply(whole: A): B   = get(whole)
  def updated(whole: A, part: B): A = set(whole, part) // like on immutable maps
  def mod(a: A, f: B => B) = set(a, f(this(a)))
  def compose[C](that: Lens[C,A]) = Lens[C,B](
    c => this(that(c)),
    (c, b) => that.mod(c, set(_, b))
  )
  def andThen[C](that: Lens[B,C]) = that compose this
}

Comment: You might want to update this answer with a description of Gerolf Seitz's lenses plugin.
Comment: The code `personZipCodeLens.set(raj, personZipCodeLens.get(raj) + 1)` is the same as `personZipCodeLens mod (raj, _ + 1)`
Comment: @missingfaktor Sure. Link? I wasn't aware of such plugin.
Comment: @ron `mod` isn't a primitive for lenses, though.
Comment: Tony Morris has written [a great paper](http://dl.dropbox.com/u/7810909/media/doc/lenses.pdf) on the subject. I think you should link it in your answer.
Comment: also see: [shapeless case-classes lenses](https://github.com/milessabin/shapeless#representation-of-case-classes-as-hlists)
Comment: Good to remember that: `(_: Address).zipCode` is just shortcut of `(a: Address) => a.zipCode`. It's easier to read for not scala-pro.
Comment: the composition of these Lenses lets to you chain into a deep struction. popular libraries/macros let you combine lenses in an 'additive' fashion (I don't know the correct term) such that `val combined = lensX ~ lensY` lets you `set` both `X` and `Y` at the same time in the structure even though `X` and `Y` are in different parts of the structure. What is the equivalent with the Lens case class in this answer?  My first guess is to use the pimp pattern to add arbitrary set methods but that seems very boilerplate and inelegant.
Answer: Zippers
Huet's Zipper provides convenient traversal and 'mutation' of an immutable data structure. Scalaz provides Zippers for Stream (scalaz.Zipper), and Tree (scalaz.TreeLoc). It turns out that the structure of the zipper is automatically derivable from the original data structure, in a manner that resembles symbolic differentiation of an algebraic expression.
But how does this help you with your Scala case classes? Well, Lukas Rytz recently prototyped an extension to scalac that would automatically create zippers for annotated case classes. I'll reproduce his example here:
scala> @zip case class Pacman(lives: Int = 3, superMode: Boolean = false)
scala> @zip case class Game(state: String = "pause", pacman: Pacman = Pacman())
scala> val g = Game()
g: Game = Game("pause",Pacman(3,false))

// Changing the game state to "run" is simple using the copy method:
scala> val g1 = g.copy(state = "run")
g1: Game = Game("run",Pacman(3,false))

// However, changing pacman's super mode is much more cumbersome (and it gets worse for deeper structures):
scala> val g2 = g1.copy(pacman = g1.pacman.copy(superMode = true))
g2: Game = Game("run",Pacman(3,true))

// Using the compiler-generated location classes this gets much easier:
scala> val g3 = g1.loc.pacman.superMode set true
g3: Game = Game("run",Pacman(3,true)

So the community needs to persuade the Scala team that this effort should be continued and integrated into the compiler.
Incidentally, Lukas recently published a version of Pacman, user programmable through a DSL. Doesn't look like he used the modified compiler, though, as I can't see any @zip annotations.
Tree Rewriting
In other circumstances, you might like to apply some transformation across the entire data structure, according to some strategy (top-down, bottom-up), and based on rules that match against the value at some point in the structure. The classical example is transforming an AST for a language, perhaps to evaluate, simplify, or collect information. Kiama supports Rewriting, see the examples in RewriterTests, and watch this video. Here's a snippet to whet your appetite:
// Test expression
val e = Mul (Num (1), Add (Sub (Var ("hello"), Num (2)), Var ("harold")))

// Increment every double
val incint = everywheretd (rule { case d : Double => d + 1 })
val r1 = Mul (Num (2), Add (Sub (Var ("hello"), Num (3)), Var ("harold")))
expect (r1) (rewrite (incint) (e))

Note that Kiama steps outside the type system to achieve this.
Comment: Hey, where are the lenses?
Comment: For those looking for the commit. Here it is: http://github.com/soundrabbit/scala/commit/8afc127a7bfaf7a19ffb99441ea3a39bc20fce3e (I think..)
Comment: I've just encountered this problem and the @zip idea sounds really fantastic, maybe it should even be taken so far that all case classes has it? Why isn't this implemented? Lenses are nice but with large and many classes/case classes it's just boilerplate if you just want a setter and nothing fancy like an incrementer.
Answer: Useful tools to use Lenses:
Just want to add that the Macrocosm and Rillit projects, based on Scala 2.10 macros, provides Dynamic Lens Creation.

Using Rillit:
case class Email(user: String, domain: String)
case class Contact(email: Email, web: String)
case class Person(name: String, contact: Contact)

val person = Person(
  name = "Aki Saarinen",
  contact = Contact(
    email = Email("aki", "akisaarinen.fi"),
    web   = "http://akisaarinen.fi"
  )
)

scala> Lenser[Person].contact.email.user.set(person, "john")
res1: Person = Person(Aki Saarinen,Contact(Email(john,akisaarinen.fi),http://akisaarinen.fi))

Using Macrocosm:

This even works for case classes defined in the current compile run.

case class Person(name: String, age: Int)

val p = Person("brett", 21)

scala> lens[Person].name._1(p)
res1: String = brett

scala> lens[Person].name._2(p, "bill")
res2: Person = Person(bill,21)

scala> lens[Person].namexx(()) // Compilation error

Comment: Btw I edited my answer to include Rillit but I don't really understand why Rillit is better, they seems to provide the same functionality in the same verboseness at first sight @missingfaktor
Comment: You probably missed Rillit which is even better. :-) https://github.com/akisaarinen/rillit
Comment: @SebastienLorber Fun fact: Rillit is Finnish and means Lenses :)
Comment: Both Macrocosm and Rillit seem not be updated in the last 4 years.
Answer: I've been looking around for what Scala library that has the nicest syntax and the best functionality and one library not mentioned here is monocle which for me has been really good. An example follows:
import monocle.Macro._
import monocle.syntax._

case class A(s: String)
case class B(a: A)

val aLens = mkLens[B, A]("a")
val sLens = aLens |-> mkLens[A, String]("s")

//Usage
val b = B(A("hi"))
val newB = b |-> sLens set("goodbye") // gives B(A("goodbye"))

These are very nice and there are many ways to combine the lenses. Scalaz for example demands a lot of boilerplate and this compiles quick and runs great.
To use them in your project just add this to your dependencies:
resolvers ++= Seq(
  "Sonatype OSS Releases"  at "http://oss.sonatype.org/content/repositories/releases/",
  "Sonatype OSS Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
)

val scalaVersion   = "2.11.0" // or "2.10.4"
val libraryVersion = "0.4.0"  // or "0.5-SNAPSHOT"

libraryDependencies ++= Seq(
  "com.github.julien-truffaut"  %%  "monocle-core"    % libraryVersion,
  "com.github.julien-truffaut"  %%  "monocle-generic" % libraryVersion,
  "com.github.julien-truffaut"  %%  "monocle-macro"   % libraryVersion,       // since 0.4.0
  "com.github.julien-truffaut"  %%  "monocle-law"     % libraryVersion % test // since 0.4.0
)

Answer: Shapeless does the trick:
"com.chuusai" % "shapeless_2.11" % "2.0.0"

with:
case class Address(street: String, city: String, state: String, zipCode: Int)
case class Person(firstName: String, lastName: String, address: Address)

object LensSpec {
      import shapeless._
      val zipLens = lens[Person] >> 'address >> 'zipCode
      val surnameLens = lens[Person] >> 'firstName
      val surnameZipLens = surnameLens ~ zipLens
}

class LensSpec extends WordSpecLike with Matchers {
  import LensSpec._
  "Shapless Lens" should {
    "do the trick" in {

      // given some values to recreate
      val raj = Person("Raj", "Shekhar", Address("M Gandhi Marg",
        "Mumbai",
        "Maharashtra",
        411342))
      val updatedRaj = raj.copy(address = raj.address.copy(zipCode = raj.address.zipCode + 1))

      // when we use a lens
      val lensUpdatedRaj = zipLens.set(raj)(raj.address.zipCode + 1)

      // then it matches the explicit copy
      assert(lensUpdatedRaj == updatedRaj)
    }

    "better yet chain them together as a template of values to set" in {

      // given some values to recreate
      val raj = Person("Raj", "Shekhar", Address("M Gandhi Marg",
        "Mumbai",
        "Maharashtra",
        411342))

      val updatedRaj = raj.copy(firstName="Rajendra", address = raj.address.copy(zipCode = raj.address.zipCode + 1))

      // when we use a compound lens
      val lensUpdatedRaj = surnameZipLens.set(raj)("Rajendra", raj.address.zipCode+1)

      // then it matches the explicit copy
      assert(lensUpdatedRaj == updatedRaj)
    }
  }
}

Note that whilst some other answers here let you compose lenses to go deeper into a given structure these shapless lenses (and other libraries/macros) let you combine two unrelated lenses such that you can make lens that sets an arbitrary number of parameters into arbitrary positions in your structure. For complex data structures that additional composition is very helpful.
Comment: Note that I eventually ended up using the `Lens` code in Daniel C. Sobral's answer and so avoided adding an external dependency.
Answer: Due to their composable nature, lenses provide a very nice solution to the problem of heavily nested structures. However with a low level of nesting, I sometimes feel lenses are a bit too much, and I don't want to introduce the whole lenses approach if there is only few places with nested updates. For sake of completeness, here is a very simple/pragmatic solution for this case:
What I do is to simply write a few modify... helper functions in the top level structure, which deal with the ugly nested copy. For instance:
case class Person(firstName: String, lastName: String, address: Address) {
  def modifyZipCode(modifier: Int => Int) =
    this.copy(address = address.copy(zipCode = modifier(address.zipCode)))
}

My main goal (simplifying the update on client side) is achieved:
val updatedRaj = raj.modifyZipCode(_ => 41).modifyZipCode(_ + 1)

Creating the full set of modify helpers is obviously annoying. But for internal stuff it is often okay to just create them the first time you try to modify a certain nested field.
Answer: Short answer
Use QuickLens:
val updatedRaj = raj.modify(_.address.zipCode).using(_ + 1)

Works with scala 2.11+ and 3+.
Long answer
Perhaps QuickLens matches your question better. QuickLens uses macro's to convert an IDE friendly expression into something that is close to the original copy statement.
Given the two example case classes:
case class Address(street: String, city: String, state: String, zipCode: Int)
case class Person(firstName: String, lastName: String, address: Address)

and the instance of Person class:
val raj = Person("Raj", "Shekhar", Address("M Gandhi Marg",
                                           "Mumbai",
                                           "Maharashtra",
                                           411342))

you can update zipCode of raj with:
import com.softwaremill.quicklens._
val updatedRaj = raj.modify(_.address.zipCode).using(_ + 1)

Cleaner way to update nested structures


Switch to Steve-Type skin (4 wide arms) while offline

Question: I play on offline Minecraft and I'm stuck with the Alex skin for 1.8. I have a custom resource pack that changes my skin but it still has the small arms. I was wondering if there was any way in game offline that I could get the 4 pixel wide arms instead of the 3 pixel wide arms. I'm playing in 1.8.8.
Comment: There is a way to do this without any mods or texture packs, getting onto it now.
Comment: I'm assuming your playing it the "hacked" way since you can't change your skin? :P
Answer: This, unfortunately, cannot be changed in-game as far as Vanilla Minecraft goes. To change from Steve or Alex, you will instead have to go on the Minecraft website, log in, and enter the Profile page. From there, you can choose to have a skin that fits Steve (though if you don't want a skin, all you need is to switch to Steve and Save).
Comment: Is there anything outside of vanilla Minecraft that can change this? Mods plugins etc.
Comment: @KingDarren7203 I think there was something, but I'm unsure if it's been updated yet. It was a LiteLoader mod of sorts, but I can't remember where to find it.
Answer: NOTE! THIS ANSWER IS OUTDATED. IT NO LONGER FITS THE QUESTION
There IS a way!
You can make a resource pack that changes the look of Alex (or Steve)!
download the recource pack here: http://www.mediafire.com/download/h0rw97kwaa12u0m/alexChange.zip
unzip the file, and navigate to the folder then to assets->minecraft->textures->entity
in this folder, paste your skin file. if it an Alex skin, name it "alex.png". if it Steve, name it "steve.png".
Move the entire resource pack to your recource packs folder in your minecraft directory.
remember that if you go on a multiplayer server, all players with no skin will show up as your skin, so remember to switch resource packs!
Comment: Is there a way to have it use Steve as the model and not Alex?
Comment: I dont think so, but there might be a steve skin for the alex model
Comment: @KingDarren7203 After looking thru the files of minecraft, i could not find the model for alex. Therefore i think there is no way to change the skin type offline without mods.


iPhone apps won't stay on

Question: I jailbroke my iphone4. I edited the fiel inside CoreServices and change the ios version from 7.1.2 to 8.1.2. Within a couple of days, all apps starting disappearing instantly after opening. Apps are there. I can also get notifications but when I click on the apps, it stays for 3 or 4 seconds and then goes off. I tried to restore through itunes but it shows error, and even tried to re-jailbreak to get it fresh or maybe get rid of jailbreak. But the computer says the iphone with that version of iOS is not compatible. So, I can neither restore nor unjailbreak. I can't even edit the iOS version because i can't open ifile anymore. Any solution?
Answer: You can restore it as new. With iTunes.
And then re-install all user data and apps. Do not jailbreak again.
Comment: You didn't get me. I tried all the possible ways on itunes.
Comment: If you are not able to restore as new, a good lesson to not jailbreak again.

iPhone apps won't stay on


Error in catchment delineation process

Question: While delineating catchment in QGIS using Upslope Area, error:could not create index insufficient memory prompted and software got hang again and again. What should I do?
Answer: This may be a duplicate of Kernel Density Error in QGIS Processing
Catchment delineation tools generally need to load the full raster into memory.  You can get around this by:

working on a subset,
using swap (which may be very slow),
reducing the resolution to get a general answer for the full dataset, then working on the coarser catchments using a higher resolution.

See also https://sagatutorials.wordpress.com/trouble-shootoing/

Error in catchment delineation process


Can I go to USA with a Canadian Passport even though I am from another country?

Question: I am from a country that requires to get a valid visa to enter USA. I also have a Canadian passport. Am I still required to have visa to enter USA? I have no criminal record and I'm just going there to visit a friend.
Comment: What country are you from?
Answer: You are a dual citizen of Canada and another country and you wish to enter the USA on your Canadian passport.
You are free to do so. Trumps Executive Order barring citizens of certain countries (including dual citizens) from entering the USA is not longer in effect.
http://www.cbc.ca/news/canada/canadian-affected-trump-travel-ban-refugees-immigrants-1.3957059

Canadian dual citizens can travel freely to the U.S. despite Trump
  travel ban. Furthermore, NSA Flynn confirmed that holders of Canadian passports, including dual citizens, will not be affected by the ban. Trudeau stated that the government has been assured that Canadian citizens traveling on Canadian passport will be dealt with in the usual process. He further said that they will continue to share on this and other channels.
Comment: And the new order, which might come into effect because the courts haven'treached a final ruling on it, explicitly allows dual citizens who otherwise would be affected to travel using the passport of their non-affected citizenship.
Answer: As a Canadian citizen, in most situations you do not need a visa to enter the United States. The rules around Canadian citizens visiting the US are relatively relaxed (just don't try to work!). You need not mention your other citizenship(s), or bring any passport other than your Canadian one.
Answer: Overnight my close vote for this being a duplicate of https://travel.stackexchange.com/a/64891/4188 has disappeared. So then I will copy that answer here then:
I sent the question as posted here to the CBP (because noone sources their answers and it reads to me as beliefs held about passports not facts) and received the information below. Based on this, despite it is not a straight yes or no (they never do that) I believe I am allowed to present a Canadian passport because otherwise why would they point out what happens if I present one. I will seek further clarification in April once I get my passport and add it to my NEXUS at the NEXUS centre but for now I think I am good.
So, without further ado, their reply:

Thank you for contacting the U.S. Customs and Border Protection (CBP) INFO Center.
A Canadian citizen does not need a visa to visit the United States.
If you present a Hungarian passport: https://help.cbp.gov/app/answers/detail/a_id/572
If you present a Canadian passport: https://help.cbp.gov/app/answers/detail/a_id/619
If you have any other questions or concerns, please feel free to call our toll-free number 877-CBP-5511 (877-227-5511). From outside the United States, please call 202-325-8000 - you may incur charges from your telephone service provider for this call. Our service hours are Monday through Friday from 9 a.m.-4 p.m. Eastern Time. We are closed on all U.S. federal holidays.
We hope our answers ease your entry into the United States. Please understand these answers are informational only, The CBP officer who speaks with you upon arrival determines the admissibility of goods and visitors.
Thank you again for contacting the CBP INFO Center.
Sincerely,
CBP INFO Center


What are the available Dragonvale Race wheel prizes?

Question: After placing 1st, 2nd, or 3rd in a Dragonvale race, you get to "Spin the wheel" for a prize.  It seems to me that the prizes are random even when I get the same place.  Are the prizes consistent by race, or just random?  Is there a finite list, or do they just vary slightly?
Comment: It says on the wheel. It's different if you get firt, second, or third place. Also, my friend told me this cheat, if you want to know what prize your getting, then you go up six spaces slowly, then spin the wheel and that's what you'll get no matter what you do.
Answer: Here is a summary of the awards per each level and their range of rewarding. Of note is that once you reach level 35 (currently at the least) you will have the experience rewards removed from the spinner.

The gold wheel features rewards including Gems (1-2), Experience, DragonCash, and Treats ranging from the thousands (Treats) to the hundreds of thousands (DragonCash). The highest XP reward I have gotten from the wheel so far is 36,000,000 but 2-4,000,000 is much more common.
The silver wheel features rewards including Treats, Experience and DragonCash in the tens of thousands range.
The bronze wheel features rewards including Treats, Experience and DragonCash in the thousands range.

Also note that you can get bonuses but that does not seem to have any sort of reason to it as of yet. (I have gotten food twice in a row and gotten an XP bonus but then done that again and not gotten anything but the food both times).
Comment: Thanks @James.  As a side note, I've noticed that experience rewards are no longer on the wheel once you hit max level.  I don't know that it improves your odds really.  I still get plenty of crappy food prizes. :)
Comment: The available experience reward range seems to be related to your current level.  Also, lower value rewards seem to have a greater % chance of getting a bonus.


Is there any way to remove visible light but only see infrared light source from IR camera?

Question: I have a video projector, projecting a video on a white screen (white paper), behind the screen there is two infrared light facing towards the screen, when there is a hole in the screen the infrared light comes out from the hole, I've got the camera on top of video projector, what I want to do is something, the camera should only detect the infrared light that comes out from the hole on the screen but not the actual video projecting by the projector, please give me suggestions to filter out visible light and get on infrared light behind the screen when it comes out from hole, currently camera is capturing infrared and visible video frame what I don't want to happen. HELP!!!!!
Comment: What is the final goal? Why do you want to capture the infrared light?
Comment: This doesn't seem like a photography project.  There are filters that block visible light and allow IR through.  Try searching for "IR 720nm".
Comment: There are regular camera filters called infrared. Read it carefully, these are of two types, passing infrared but blocking visible light, or a few are the opposite, passing visible and blocking infrared.  And digital camera sensors often already block infrared, to represent better what the human eye sees.
Comment: Filters are never "perfect", but there are many regular camera filters that block visible light and pass infrared.   https://www.amazon.com/s?k=infrared+filter
Comment: @SaaruLindestøkke I want to detect hole of infrared. but camera is showing not just the infrared but with video projecting on the screen
Comment: @WayneF I have an IR camera which can properly see the infrared light, I just want a suggestion on how can I use a perfect filter to block visible light and capture only infrared,
Comment: Once, about a million years ago, I wanted a filter that transmitted near IR, but which blocked visible light. Didn't have one, as such, but I had some colored samples of plexiglass. Stacked a piece of deep red plexiglass and a piece of deep blue. Almost completely opaque to visible light, but looked water clear to the IR camera.
Answer: (Near) IR pass filters are everywhere.  For photographic filters, try searching for "IR 720nm".  It's easy to tell which are the right ones because they will look black.  Some other options that also block visible light and pass IR:

Disassemble a remote control and put the plastic IR pass filter over your lens.
Use a security camera dome.
Cross photographic polarizing filters.  (Linear is easier.  Circular works if one of them is facing the wrong way.)
Break apart a cheap pair of polarizing sunglasses and cross the lenses.
Stack ND filters.
Stack several different color filters  (red + green + blue).
Use developed, exposed negative film or developed, unexposed reversal film.  (Pretty bad image quality, but may be artistically interesting.)
Use the magnetic disk from a floppy disk.  (Horrendous image quality, but can be fun.)
Purchase an IR capable camera with the correct filter already installed.
Answer: The ideal material for working with infrared radiation (lenses, prisms, windows, etc.) is germanium which does not pass visible wavelengths. If you cannot find what you want in lens catalogs, you can have most anything made to order.


In whose name did they believe?

Question:
Now while Jesus was in Jerusalem at the feast of the Passover, many people believed in his name because they saw the miraculous signs he was doing. John. 2:23 NET

The Name of the Father or of Jesus? Or the name revealed in the works of Jesus?
Comment: More detail and clarity is needed to explain the difference between the two questions after the quotation. What other 'name' is the subject of the verb 'revealed' ?
Answer: Let me quote John 2:21-23 in full:

But Jesus was speaking about the temple of His body. After
He was raised from the dead, His disciples remembered that He had said this. Then they believed the Scripture and the word that Jesus had spoken. And when He was in Jerusalem in the
Passover, in the Feast, many believed in His name, beholding
His signs that He was doing.

Note that the antecedent of all the singular pronouns here is "Jesus" by the simply rules of grammar.  Thus, "His Name" is the name of Jesus.
This is consistent with other NT statements on the same topic such as:

Acts 4:11, 12 - This Jesus is 'the stone you builders rejected,
which has become the cornerstone.' Salvation exists in no one else,
for there is no other name under heaven given to men by which we
must be saved."

Thus, all people are saved by the Name of Jesus because there is salvation in no other source.

Acts 2:38 - And Peter says to them, "Repent and be baptized, every one
of you, in the name of Jesus Christ for the forgiveness of your
sins, and you will receive the gift of the Holy Spirit.

See also:

Acts 3:16 - By faith in the name of Jesus, this man whom you see and know has
been made strong. It is Jesus' name and the faith that comes through
Him that has given him this complete healing in your presence.
Answer: They believed in the Name of Him who did miraculous deeds without prayers to any other authority, but in His own authority, sovereignly, and this is the Name of Jesus Christ.
As He Himself says that in His Name even His disciples do miracles (Matthew 12:27; cf. Luke 10:17).
Now, only God can do miracles, and men or angels can perform miracles not self-authoritatively, but by invoking the name of God, who, if He agrees with the invoker, does this deed, and not the invoker himself. Since the disciples do miracles by invoking Christ, then Christ is necessarily God, holding the same sovereign authority as the Father.
Since They hold the same authority and since Their divine activity is ontologically always a joint activity necessarily, then we can say even that the Father's and the Son's name is one and the same name of God; to give an analogy, both a cloud and the raindrops from it have one and the same name - "water". Indeed, it is explicit that all three uncreated Hypostases have one name (Matthew 28:19).

In whose name did they believe?


Do I have to replace the LCD if the iPad screen is cracked?

Question: I have an iPad 2 that my grandson dropped and the screen is now cracked around the edge, none of the cracks extend into the touch area of the screen.  All of the cracks are in the outside edge where the screen is black.  Do I have to repair the LCD or is that something that can be fixed without replacing the LCD?
Comment: Difficult to say because we can't see how damaged the iPad is.
Answer: If the LCD screen is not damaged (no dead pixels) then you probably only need to replace the actual glass front touch panel, or digitizer, and do not need to change the LCD.  This can pick up relatively cheaply ($90, or eBay). You just prise the front panel off, and leaving the LCD in place, replace it with a new one.
Google for this video "How to: Fix a broken front panel on your iPad 2 or iPad 3" on youtube. It give you a good idea of what is involved. Or check out Repair Ipad 2 Glass
To be honest, you are probably better sending it to a third party to get the digitizer replaced.
Good luck.


Program an Arduino Uno with an Atmel ICE

Question: When I connected my atmel ice to my arduino uno everything went okay.
Then I tried debugWIRE and since then I can't connect to my ATMEGA328p.
I get the error
Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool)
I think one of the fuse bits is wrong but can't connect to the ATMEGA328p to change them. Does anyone have a idea what to do?
Comment: *I can't connect to my ATMEGA328p* - connect using what? If you try to connect it using the "regular" USB, then it won't work until you flash the bootloader using ICE. You have probably overwritten it.
Comment: Have you looked up the problem with Atmel? It's like I always tell people on here... You're not discovering new problems when you encounter a problem. The chances of an error happening to you and someone else having the same problem is extremely high... But this looks like a physical connection problem (i.e. a lose wire, bad connection between components, clock frequencies etc).
Comment: @EugeneSh. The poster is asking how to program the Arduino with the Atmel Ice programmer after debugging with debugWIRE. No bootloader required.
Answer: Your Ardunino is stuck in debugWIRE (The debug wire fuse is set). Here is a tutorial on how to get it back to programming mode.
In the tutorial I am using the AVR Dragon with AS6, but the process is the same with Atmel ICE and AS7.
You have to be in Debug Mode to disable debugWIRE. While in debug, Click Debug>Disable Debug Wire and Close.


How do I rename a task in Task Scheduled on Windows Server 2008 R2

Question: I have some tasks in the Task Scheduler on Windows 2008 R2. I created them as the admin and I'm logged in as the admin. I have no easy way to rename the tasks. The only way I can is to export the task config to a XML file and re-import to a new task, change the name there, then delete the old task. Is there an easier way?
Comment: The reason you cannot rename a scheduled task (or move it to another folder) is because that would change the Security Identifier (SID) that is added to the task process. That SID lets you grant privileges to a file/folder/share/etc to that specific **Task**, rather than granting it to the **user** that the task runs as.
Comment: I created powershell function below that can rename tasks easily. See post below for more details. Here is just the
`function rename-task {
$src_path = "C:\Windows\System32\Tasks"
$src_xml = Join-Path -Path $src_path -ChildPath $args[0]
(schtasks /Create /tn $args[1] /xml $src_xml) -and (schtasks /delete /tn $args[0] /f) }`
Answer: Congratulations! You've come up against a problem that has stumped many a Windows user/admin. No, you cannot rename a task except for exporting, renaming and importing again. Yes, it's rather silly. Perhaps an enterprising scripter could create a simple PowerShell script that automates this, but until then, you're stuck with your export/import two-step. Sorry. =(
(You also can't rename a task folder after you've created it.)
Comment: Grrrrr, arghhhhhh!  I wonder how on earth this silly limitation came into existence?  Renaming is hardly an "exotic" task that users will rarely ever want to do.  It's very puzzling.
Comment: @DoctorJones The limitation came into existence because changing the task name would change the hash of the task name, which changes the security identifier (SID) added to the task's security token, which breaks permissions assigned to the task. (See https://serverfault.com/a/1067045/4822)
Comment: If you go rename the folder, the task will disappear. Sad face.
Comment: Also, if you rename the tasks in the Windows\tasks folder, the task disappears in Task Scheduler until you rename the task back.
Comment: See steps in MS10-092: "Vulnerability in Task Scheduler could allow for elevation of privilege."  It explains the file(s) and registry changes needed to fix issues you might have with task errors.  Still no easy way to rename them.  https://support.microsoft.com/en-us/kb/2305420
Comment: @Jake - A link to the script was posted in another answer five months later.  It's here if you need it - http://www.windowsitpro.com/article/scripting/powershell-script-rename-tasks-140368
Comment: @Bratch: Unfortunetly, your link to WindowsITPro does not work any more. As far as I see, the site has been renamed and re-sturctured. A similar article (or the same one with a different URL) is available on the site currently here: http://www.itprotoday.com/management-mobility/powershell-script-rename-scheduled-tasks-windows-7-windows-server-2008-and. There is a link in the article for ZIP-file with the script itself, but it is broken as well...
Comment: @Bratch If a human can follow precise, consistent steps to rename a task then so can a computer.
Comment: @IanBoyd wow, thank you for taking the time to reply.  That is very interesting indeed...
Answer: Not the best way but can be a life saver.
Tasks are stored in C:\Windows\System32\Tasks in XML format importable using schtasks.exe. As Weasly told, renaming the file doesn't work but Create/Delete will. That said, you need the running user password (that you have)
Compared to Weasly's suggestion, it just skips the export phase.

create a second task using the first as template
remove the original

Using srcname and dstname and an admin shell in Tasks folder:
C:\Windows\System32\Tasks>schtasks /Create /tn dstname /xml srcname /ru [running username] /rp [password]
SUCCESS: The scheduled task "dstname" has successfully been created.

C:\Windows\System32\Tasks>schtasks /delete /tn srcname /f
SUCCESS: The scheduled task "srcname" was successfully deleted.

Notes:

With a little bit of scripting, you can rename a large bunch of tasks without effort
If needed you should be able to extract the original RU from the XML (in node Task/Principals/Principal/UserId)
If you want schtasks to ask for the password, simply remove /rp [password] portion
Answer: Unfortunately not. That's the way this is done now. I believe it's for security purposes, so that set tasks cannot be modified while they are actually setup and enabled.
Comment: If I am already logged in as ADMIN, as I must be to create a tasks, how is this a 'security feature'?
Comment: Also, if you change anything about a task once it's configured you get prompted for credentials again, so if it's some kind of security issue handle it the same way you handle changing anything else.
Comment: @user86327 Changing the task name would change the hash of the task name, which changes the *security identifier* (SID) added to the task's security token, breaking the permissions assigned to the task.
Answer: Short Version
You can't rename a scheduled task because that would change the SID the task runs as.
The name forms the Security Identifier (SID) of the user the task will run as. Renaming the task would break any existing permissions.
Long Version
There are a lot of people complaining about being unable to rename a scheduled task. There is a reason for it.
A scheduled task runs as some user, e.g.:

Local Service (good)
Network Service (good)
System (bad)
some process account manually created in Active Directory (bad)

This means if your task needs to access some resources, you need to grant that user access to those resources.
What we really want it to grant access to that Task; that scheduled task itself should have the permissions - not the user the task runs as. This is called Task Security Hardening.
Task Hardening
When a scheduled task is run, the task scheduler adds an additional Security Identifier (SID) in the token of the user running the task. E.g.:

Name: NT TASK\[Task name] (e.g. "NT TASK\The quick brown fox jumped over the lazy dog")

Group sid: S-1-5-87-x-x-x-x-x (e.g. S-1-5-87-2312335432-65297056-3549082870-2589977271-250352331)

The sid of this group is dynamically generated based on the hash of the name of the scheduled task. The group sid is a child of the authority S-1-5-87.  The SID's Relative ID 87 comes from the constant defined in winnt.h:
SECURITY_TASK_ID_BASE_RID                 (0x00000057L)

You can see this additional group SID in the security token of the launched process:

Generating Task SIDs
You can manually hash a task name, or see what the hypothetical sid for that task would be, by running a command-line tool:
>schtasks /showsid /TN "The quick brown fox jumped over the lazy dog"

SUCCESS: The SID "S-1-5-87-2312335432-65297056-3549082870-2589977271-250352331"
for the user name "The quick brown fox jumped over the lazy dog"
has been computed successfully.

And you can use icacls to grant permissions to that group:
>icacls yellow.png /grant "*S-1-5-87-2312335432-65297056-3549082870-2589977271-250352331:(M)"

If the scheduled task is in a folder, you need to include that folder as well:
>schtasks /showsid /TN "Stackoverflow\Answer Question About Security"

SUCCESS: The SID "S-1-5-87-1865438416-972601292-3915696002-2261943663-3756584440"
for the user name "Stackoverflow-Answer Question About Security"
has been computed successfully.

And, again, you can grant that SID permissions on the object:
>icacls yellow.png /grant "*S-1-5-87-1865438416-972601292-3915696002-2261943663-3756584440:(M)"

processed file: yellow.png
Successfully processed 1 files; Failed processing 0 files

And you can see the group having been granted permissions (in this case Modify permissions):

The good thing about:

this virtual account system (which is also used by services with NT SERVICE group, and by the IIS Application Identity)
and with the special Local Service and Network Service accounts

is that these accounts have no password - no user is allowed to login as them. This means that you don't have to worry about the password leaking.
And on top of that, when you use NT TASK, NT SERVICE, or IIS APPPOOL virtual accounts to assign permissions: there is no way to impersonate that user. It's not a user in any sense. These are extra security boundaries that are a very good thing.
So of course you can't rename it
If you've been paying attention, you will now see why you cannot rename a scheduled task, or move it to another folder: it would change the hash of the task's name, changing the task's NT TASK SID, and invalidate any permissions it's been granted.
Comment: I don't really follow the logic between "it isn't 100% trivial" to "therefore it's impossible." It would be then be possible to warn people that anything the task's been granted access to will need to be regranted -- better people know about this in the extraordinarily rare case that someone uses it, than to never know at all and blindly bypass it with the export/modify/import workaround.

MMC snap-ins in general get a bare minimum of UX polish, though.
Comment: @SilverbackNet Presumably when it comes to security they don't want to mess around. Someone somewhere added a `Deny` entry, and suddenly it is allowed access. Yes you can have the generic popup that nobody reads *(blah blah blah security permissions regenerate)*, but we all know nobody reads those, or cares. And even if they **did** care, they have no way to know where to fix it. Personally i wouldn't care if suddenly at attacker is able to exfiltrate millions of PII rows because of it - that's a PR problem.
Answer: Please be sure before you answer "Cannot do this", "Impossible", etc.
Check out this power shell script.
Comment: Quote from that site: `I don't know the reasons for the omission of this seemingly simple feature, but there is a workaround: Export the task as an XML file, import the task to create a new task with the new name, then delete the old task.` So, it does what the accepted answer suggested - only automated. Renaming is still impossible.
Comment: Please quote the relevant part from the link. Link-only answer is not encouraged since when the link rots, the answer becomes unuseful.
Comment: The OP already knows that there's no rename operation (export and reimport with new name is the only way). He asked if there is an easier way. Yes; an easier way is to use the PowerShell script.
Comment: Exporting and importing with a new name seems much simpler, unless it's something you need to do through PowerShell for some reason.
Comment: http://www.windowsitpro.com/article/scripting/powershell-script-rename-tasks-140368 not found
Answer: One possibility is, to export the task, delete the task, rename the file and import it again.
A good description can be found here: Rename task in task scheduler
Answer: Yes it's possible !
Just export the task (right click on the task / Export...) as an XML file (on the Desktop for instance). Then, delete the task in the Tasks Scheduler and right click / Import a task. Choose the previously saved XML file, rename the task and save it. Voila.
Comment: This is actually the same answer as the one accepted 4 years ago, not really a worthwhile addition...
Comment: I wouldn't say it's not worthwhile - it explains the steps in more detail than the accepted answer, though it might have been better to edit that answer instead.
Answer: This function can be used to rename Schedule Tasks using PowerShell. Below you can find examples on how to use it and how to move many tasks from one folder to another. The function takes advantage of the fact that all tasks are stored in the Windows folder. If you do not have access to them, you can create a new function to export them all into XML files that you can then use to upload. Or even make it part of the below function, export and them import.
function rename-task {

$src_path = "C:\Windows\System32\Tasks"
$src_xml = Join-Path -Path $src_path -ChildPath $args[0]
(schtasks /Create /tn $args[1] /xml $src_xml) -and (schtasks /delete /tn $args[0] /f)
}

If you place this function inside PS profile it will auto load.
C:\Users\USER\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

Example use:
rename-task "original_name" "target_name"

Search for tasks
Get-ScheduledTask|sls -SimpleMatch pattern

Move tasks from one folder to another. Pattern is a regular expression so you can pass many tasks in one pass:
Get-ScheduledTask|select TaskName, TaskPath|where {$_.TaskName -match "PATTERN"}|ForEach{rename-task $_.TaskName $(Join-Path "\TGT_Folder\" $_.TaskName)}


NSOperation for animation loop causes strange scrolling behaviour

Question: I've created an animation loop which I run as an operation in order to keep the rest of my interface responsive. Whilst almost there, there is still one remaining issue. My UIScrollViews don't seem to be reliably picking up when a user touch ends. What this means is, for example, if a user drags down on a scroll view, when they lift their fingers the scrollview doesn't bounce back into place and the scrollbar remains visible. As if the finger hasn't left the screen. It takes another tap on the scrollview for it to snap to its correct position and the scrollbar to fade away...
Here's the loop I created in a subclassed NSOperation:
<code>- (void)main
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

    NSRunLoop *runLoop = [NSRunLoop currentRunLoop];

    _displayLink = [[CADisplayLink displayLinkWithTarget: self selector: @selector(animationLoop:)] retain];
    [_displayLink setFrameInterval: 1.0f];
    [_displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode: NSRunLoopCommonModes];

    while (![self isCancelled])
    {
        NSAutoreleasePool *loopPool = [[NSAutoreleasePool alloc] init];
        [runLoop runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
        [loopPool drain];
    }

    [_displayLink invalidate];

    [pool release];
}
</code>
It seems that whilst this operation is running things go a little weird...
DOes anyone have any idea what might be going on here, and even better how to fix it...
Thanks!
Answer: I do not understand why are you using a so complicated solution for your need which seems very classic.
In my opinion you'd better use the Quartz basic features to create your animation and let the OS choose when to compose for rendering. You can also use the setNeedsLayout and setNeedDisplay method to notify the rendering loop you've modify something instead of implementing your own loop.
Or maybe you have a specific need I did not understand.


How to get the Dock to open the Documents and Download folder in Finder?

Question: When I click on the Documents or Downloads folder in the Dock, a Grid comes up.  Is there a way to get it to just open in the Finder?  Instead of having to click on Documents and then click on Open in Finder.
Answer: Right-click or Control+click on the Documents folder in the Finder, and click 'Make Alias'.
You probably want to move the alias somewhere else and rename it "Documents". Then, drag the Documents alias into the Dock.
Voíla, a link to the Documents folder instead of a Documents folder stack.
Comment: Worked, but a real hack. Apple should add this feature, as an option.
Comment: I disagree—it's a perfect extension of the Mac's existing UI metaphors. Users are provided the option without Apple needing to outright clutter up Preferences with an additional switch.
Answer: In MacOs High Sierra, you can just option+command+click the Documents folder in the Dock to open its content directly.
Comment: I could verify this behavior as far back as Mavericks (10.9), but [this article](https://www.macworld.com/article/1142863/106stacks.html) suggests it should work from 10.6 onwards.
Answer:
Hold  CMD  while clicking the Documents or Download folder on your dock. It will open up your home directory with Documents or Download folder highlighted.
Press  CMD +  O to open.

Or right click on the folder on dock, select "Open Documents"
Answer: You can do it in a single key command from Finder.
 Cmd ⌘   Opt ⌥   L
alternatively, it's in the Go menu if you want to keep your hand on mouse/trackpad.
Answered here as it's linked as a dupe from How can I open my Downloads folder in one click? which asks for an alternative keyboard shortcut.
Answer: A slightly quicker way would be right-click or control-click on the dock icon and select "Open 'folder name'".
I do wish "Open in Finder" was at the beginning of the stack/fan for easy access though.


How to handle a disappearing hermit crab?

Question: What should you do if you lose a hermit crab? I have a friend whose family put very large shells in for the crab to try, and it disappeared. That was a long time ago, so it's obviously dead, but what should you do if you haven't seen it for a few days? Is shaking the shells inappropriate?
Comment: It may be molting. I hope! Because I hate 5 hermit crabs and my baby disappeared! I hope mines ok! **Sincerely Hermit Crab Lover
**
Comment: Well, did you check all around your tank/aquarium/box? If there is ANY possible escape route, a hermit crab will find it.(no matter how wacky it looks)
Answer: Okay, there are several things I want to touch on here.
1) I'm not sure what you mean when you say they put in very large shells and it "disappeared". Do they suspect the crab escaped when they were adding the shells? Or could they just no longer spot it in the terrarium?
2) Depending on how long "a long time ago" was, the crab may actually still be alive. Hermit crabs are ectotherms (cold-blooded) and, especially as they get older and larger, they can go for quite a while without much food. Gluttony, my largest crab, will sometimes burrow into the substrate and disappear for eight months or more!
3) Hermit crabs often disappear when they are molting (shedding their exoskeleton so that they can grow). This is their most vulnerable time, so they tend to burrow into the ground/substrate to hide until their new exoskeleton has hardened. Again, as your crabs get older and larger, they will likely disappear for longer and longer time periods during molting, however, the frequency of their molts should decrease.
4) If a shell is inhabited, you should be able to see the crab inside simply by flipping it over. (You'll see their big pincer bocking the entrance.) I would not recommend shaking shells. This will only cause undue stress to your crabs and it's not some how going to "shake them loose". If anything it will make them retreat as far as possible inside their shell.
5) If your crabs have burrowed into the substrate, do not disturb them or try to dig them up. Disturbing a hermit crab during a molt can be fatal. I know it can be hard waiting for them to resurface, but just keep maintaining the terrarium and eventually they should re-appear.
6) Give your terrarium a good sniff! If you notice any sort of fishy smell -- especially a dead/rotting fish smell -- you probably have a dead hermit crab on your hands. Start looking for a body and dispose of it ASAP. The general wisdom though is that if you do not smell "the smell", nobody has died and your missing crab(s) should eventually re-appear. :)
Answer: Fish and crabs die.  It could be that the other members of the tank took him as a free meal and there is nothing left.  It couldn't hurt to look for him and remove the body if you find it.  However, I wouldn't be to concerned if you don't.
You may get lucky, he just might be hiding...


How vector network analyzer measures S-parameters of lumped element?

Question: i've seen video lecture where S-parameters of 50 Ohm resistor placed in series between input and output port of VNA with reference resistance also of 50 Ohm are calculated by hand. S11 was calculated as equal 1/3 by formula of reflection coefficient S11 = Г = (Rin - Z0) / (Rin + Z0) = (100 - 50) / (100 + 50) = 1/3. So question is why resistor have reflection? It is not waveguide, what reflections can it have? And if it have reflection, how VNA measures it? Does it simply measures amplitude on its port or somehow measures amplitude of outcoming and reflected wave? I also heard that reflected wave can be detected somehow via directional coupler but anyway i don't understand what reflection do i have in case of lumped resistor? Sorry if I mix different questions in one.
Answer:
why resistor have reflection?

First, you're not measuring just a resistor, you're measuring a resistor whose other end has been connected to the input of a transmission line whose far end is (pretty close to) ideally terminated.
But to answer your question, the signal coming out of the first transmission line can only propagate forward without reflections if the ratio of its voltage (measured between the inner conductor and outer conductor for a coaxial line) to its current (measured on the inner conductor) is equal to the characteristic impedance of the transmission line.
Since the termination you provided (a resistor plus another transmission line with an ideal termination) has an effective impedance of 100 ohms, the ratio of voltage to current at this termination will be 100 V/A, rather than 50 V/A. This means that a backward travelling wave (a reflection) must be produces so that the voltage-to-current ratio in the termination can be 100 V/A while the voltage-to-current ratios in the forward and reverse travelling waves on the feed line are both 50 V/A.

And if it have reflection, how VNA measures it?

The VNA (speaking broadly) separates the reflected wave from the outgoing wave with a directional coupler and measures its amplitude with an RF detector (a diode-based device that converts RF signals to DC voltages). If the reflected signal is mixed with a local oscillator before being measured, the phase of the reflected signal can also be determined.
Comment: Thanks for explanaition. It becomes a clearer for me.


propritery SANYO metadata

Question: How does an old SANYO camera store proprietary metadata on JPG that are not part of the Exif section? Like if the photo has the correct date or if it was taken using the hand or smile detection or other things like that. Is it an invisible pixel on JPG file like there are invisible Unicode characters? Or is those proprietary metadata stored in the CTG file?
Comment: What is the CTG file?
Comment: The author of exiftool has [documented known Sanyo MakerNotes](https://exiftool.org/TagNames/Sanyo.html).  Exiftool should be able to display such data.
Comment: There's a LOT of information in the EXIF Info that isn't normally displayed by most photo applications when you display EXIF Info for a photo. Just because you don't see it with a basic EXIF viewer doesn't mean it isn't there. It is.
Answer: The Exif specification allows for manufacturer-specific data, stored as "MakerNote" data. I'm not quite sure what you mean by an invisible pixel, but there's no need to jump through strange hoops just to store metadata alongside image data.
Answer: It is part of the EXIF Info.
Just because you don't see it with whatever you're using to display EXIF Info doesn't mean it isn't there. Very few image viewers even show every Standardized field in the EXIF info. They only show some of them, and different viewers will show different ones. They all tend to show the most common things such as ISO, Tv, Av, lens focal length, etc. But there are many other fields they don't necessarily display.
The Maker Note section is also part of the EXIF Info. The Maker Note section allows each camera maker to put whatever information they wish in whatever form they wish in the Maker Note section. This is very different from the standardized EXIF fields that require everyone to use the same syntax and hex codes for the same information.
Very few EXIF viewers show much, if any, of the information contained in the Maker Note section. Many image processing applications will strip the Maker Note section from the EXIF Info when those applications are used to export an image edited by that application. Adobe products are notorious for this, so of course Adobe products do not display any of the Maker Note section when they display EXIF Info from an image file.

propritery SANYO metadata


gradient descent in space of functions

Question: Differential equations of the form
$$\frac{d}{dt}\vec{x} = - \nabla E(\vec{x})$$
can be analyzed using phase portrait method. In particular, if the function $E$ (we call it energy) has local minimums, then the solution $\vec{x}(t)$ evolve towards it. These special points are called fixed points or stagnation points. If we start from them then the vector would not change in time. Here I want to ask about the similar problem regarding the space of functions, namely consider the equation:
$$\frac{d}{dt}\psi(\vec{x},t) = -\frac{\delta E[\psi, \psi^*]}{\delta \psi^*}$$
or
$$\frac{d}{dt}(\psi_1, \psi_2, \psi_3) = -\left(\frac{\delta E}{\delta \psi_1^*}, \frac{\delta E}{\delta \psi_2^*}, \frac{\delta E}{\delta \psi_3^*}\right)$$
where $\psi^*$ is the complex conjugate of $\psi$. Can we state that the function $\psi$ evolves towards the minimum of the energy $E[\psi,\psi^*]$? (These kind of equations arise in the study of ground state of the dilute Bose gases and come with a name: imaginary-time evolution).
Comment: There is a huge literature on this, with many flavors. A classical problem  where this idea is applied is the question of existence of closed geodesics. A keyword is calculus of variations.
Answer: In connection with your question, there is the theory of "gradient systems", productively defined in terms of Lyapunov functions, which allows being a bit less attached to the particular equation at hands. My best suggestion for a references is the beautiful book by Jack Hale "Asymptotic Behavior of Dissipative Systems", and specifically Section 3.8.
Not surprisingly, Hale concentrates the discussion of possible applications on functional equations (delay equations) and on reaction-diffusion equations. But before that he gives a very clear description of the general theory.

gradient descent in space of functions


Ger Toshav and Chukot hagoyim

Question: If somebody is a Ger Toshav (so an observant noahide who accepts and follows  the 7 mitzvot, and gets recognized as such by a Beit din), is there any obligation on them within Chukot Hagoyim (following the ways of the nations). This is of course otherwise non idolatry practices that are nonetheless prohibited for Jews due to being gentile origin customs, are they still allowed to practice all (non idolatry) gentile customs?
Comment: Pretty sure the answer is yes; the radius of "smells kinda sorta like idolatry" is far wider for us than for non-Jews. Building/owning a statue of a person that won't actually be deified, for instance, is A-OK for them, not for us. (Rabbi Moshe Feinstein got that question about a mayor who wants the rabbi to contribute to the make-a-statue-of-President-Kennedy fund.) Put more simply above -- your question is if non-Jews can celebrate Halloween in its most Americanized, commercialized, tame version -- a bunch of six-year-olds dressed as superheroes and going door-to-door for candy.
Comment: I'd ask it more simply -- is Chukot HaGoyim included in the Sheva Mitzvot Bnai Noach?
Comment: @shalom Great thoughts but disagree on your second post; mitzva is a very specific term as are all of the terms thus there's a Halakha of X, which is its feet, a Kabbalah of X which is its arms, and so on. Mitva is the Amuda Emsaita, Center Pillar like from crown to spine. If I'm not mistaken there's a Ruach to it, and probably everything else the Torah has, Nevua, Chok, Hasidut, Tzaddikim. Maybe it has Na Nach too
Comment: Why would a Ger Toshav be prohibited from following the 'ways of the goyim'? He's a goy who's chosen to remain one.
Comment: @KirkBellard the very definition of chukat hagoyim is a non-Jewish custom that's *not* directly linked to idolatry (otherwise those things would be prohibited to Jews as Avodah Zarah rather than chukat hagoyim). So I ask again - why would there be a reason to prohibit a Ger Toshav?
Answer: No a Ger Toshav bc he is Toshav he's dwelling he's not a Ger Sedeq of righteousness i.e.Yesod. The latter ought to avoid Chukot hagoyyim as other Yisrael do.
Edit: Just a guess that Chok relates to Tzedek - Yesod and therefore requires more protection.
References: Sifrei Breslev
Comment: Your answer is correct (and contains the same contnet as my comment) but you need to either cite a source or explain in your answer why there is no source available

Ger Toshav and Chukot hagoyim


Can someone translate this clip into english?

Question: A streamer said this and I have no idea what he said, could someone please write out what he's saying and the translation? (Skip to 10 secounds)
https://clips.twitch.tv/SparklyOriginalTrianglePeteZaroll
Answer:
"Oh putain ! Ce bijou ! Ah, j'suis refait [...] On fait des stratégies étranges"

...Aaaand I wasn't able to understand the rest of it either (19 seconds - 25 seconds).

Oh putain

Well, that's typical french interjection, which degree of vulgarity seriously varies with the context. Here, the guy is just happy (go to n°3 here).

Ce bijou

"What a gem", "This is marvellous" (but I quite exagerate it here)

J'suis refait ("Je suis refait")

Literally, "I'm done again". Used to mean that you got fooled, but nowadays it is almost the contrary. Basically "I'm so happy (again)"

On fait des stratégies étranges

(Not sure about this one) "We have strange strategies" ?


Seeking for proof of $V=F\oplus F^\perp$ without the use of orthogonal basis

Question: Let $V$ a finite dimensional linear space and $F$ a subspace of $V$. I want to prove that the direct sum of $F$ and its orthogonal complement $F^\perp$ is the  whole space $V$:
$$F\oplus F^\perp=V$$
I know that the proof is pretty easy if we use an orthogonal basis, but how we prove it without using the orthogonal basis? The problem is how to prove that $F+F^\perp=V$?
Comment: Is the claim true for infinite-dimensional $V$? How would you distinguish finite from infinte-dimensional without referencing dimension and hence bases?
Comment: Here's a try, assuming we're working over the reals: given $v$ in $V$, let $w$ be the element of $F$ closest to $v$, and show that $v-w$ is in $F^{\perp}$.
Comment: Do you get to know about dual spaces? Even without an inner product, for finite-dimensions, we can get the right dimension-counting via dimension theorem applied to the image of the algebraic transpose of some linear map $T$ whose kernel is $F$.
Answer: Let $(r_1,\ldots,r_p)$ a basis of $F$ and denote $A=(r_1,...,r_p)^T\in \mathcal M_{p,n}(\Bbb R)$ the matrix where $r_i$ is its $i$-th row and $n=\dim V$. We have
$$x\in F^\perp \iff \langle r_i,x\rangle =0 \forall i\iff Ax=0\iff x\in\ker A$$
So we get $F^\perp=\ker A$, hence due to rank-nullity theorem
$$\dim F^\perp= \dim \ker A=n-rk(A)=n-rk(A^T)=n-p$$
Finally, with the fact $F\cap F^\perp =\{0\}$ we can conclude the desired results.


Source Versioning for Visual Studio Express

Question: Is there any Visual Studio Express plug ins for source versioning? I am starting a project on my own and only have the Express version of Visual Studio 2008.
Answer: Way I do this is I have TortosieHG installed and then in visual studios express i went to Tools>External Tools.
I created the following enteries:
<code>Title: HG New Repositry
Command: C:\Program Files\TortoiseHg\hgtk.exe
Arguments: --nofork init Initial
directory: $(SolutionDir)

Title: HG Commit
Command: C:\Program  Files\TortoiseHg\hgtk.exe
Arguments: --nofork init Initial directory: $(SolutionDir)
</code>
I then added the two external tools to the toolbar. Now I don't get as nice intergration as I would with the full version of visual studios but I can commit source code and create a source repository without leaving Visual Studios.
Answer: Short answer: No.
The Express editions support neither the Add-Ins nor Source Control providers (SCC plug-ins). While there are ways to make this work, they are undocumented, violate the license and have caused legal trouble before…
Comment: In Visual Studio 2017 Express, sure
Answer: You don't really need an integration/plugin. First is not supported but there are very good alternatives to make it work.
Whatever SCM you decide to use (SVN, GIT, PlasticSCM, Mercurial) just use the "find changes" workflow:

Do your changes
Find your modifications within the tool you've chosen to use
Commit

http://codicesoftware.blogspot.com/2009/12/how-to-find-changes-on-plastic-scm.html
Edit: PlasticSCM is free for up to 15 users since Nov 1st 2010.
Answer: Visual studio 2012 Express offers an express version of Team Foundation Server.
Answer: Source control integration is not supported in the Express editions of Visual Studio. Check out the feature comparison chart at http://msdn.microsoft.com/en-us/vstudio/products/cc149003.aspx
Answer: I don't think there are any plugins for Express versions of VS.  Googling 'Jamie Cansdale' is the canonical reference for this issue.
Answer: The VisualSVN manual says it works with all editions of Visual Studio - though I have not personally tried it. I know that none of Microsoft's Team Foundation Server stuff will work with Express.
Answer: VisualSVN doesn't support Visual Studio Express editions. Visit here for more info http://www.visualsvn.com/visualsvn/download/
Answer: Interesting, does the Express edition auto-check for file updates?  If so, just use TortoiseSVN and save yourself the money of upgrading.
Answer: You can get cloud based Team Foundation Service for free as long as your project has 5 or fewer members.  I've been using it for a few months now and it works great.  There are a some features of Team Foundation Server that are not available yet, but, hey, it's free.
http://tfs.visualstudio.com/


Connecting to Amazon EC2 using Filezilla SFTP - Network error: Connection refused

Question: I am completely new to Amazon EC2 and Filezilla. When I try to connect to the server, I am getting an error message: "Error:    Network error: Connection refused"

The problem is that I can't get a complete tutorial on how to use Filezilla with Amazon EC2. I try to follow the steps in this post: Connect to Amazon EC2 file directory using Filezilla and SFTP, but it is still not working.
What I have done so far:

I add the following ports in the Security Group of my instance:

Turn off temporarily Windows firewall on my Remote machine (I am
using Windows Server 2016 Datacenter) and on my pc also.

Filezilla:

I imported my key file in Settings > Connection > SFTP, the file has
     .pem as extension, I renamed it to .ppk before import but it is
     still not working. I also try to convert it using PuttyGen but it
     does not work.

Questions:

Are my ports correct in the inbound rules ?
Do I need to run Filezilla server (available in Xampp control panel)
on my remote machine ?

Additional Info:
When I try connecting to the server using FTP(insecure):

I get the following error message:
Answer: Try using username:
username = ec2-user


Recursive formula for minimal editing distance - check my answer

Question: Given a word $X=x_1x_2x_3...x_i$ and $Y=y_1y_2y_3...y_j$, the minimal editing distance is defined to be the minimal number of actions needed to transform $X$ to $Y$ where the legal actions are:
1) Delete a letter
2) Add a letter
For example, the minimal editing distance from $X=Sport$ to $Y=Sort$ is $1$. We just need to remove the $p$. The minimal editing distance from $X=Computer$ to $Y=Commuter$ is $2$. First we need to remove the $p$, and then we need to add $m$. Pretty straightforward.
The question was to find a recursive formula for $d(i,j)$ where $d(i,j)$ is the minimal editing distance from $X=x_1...x_i$ to $Y=y_1...y_j$.
What I did:
Firstly the edge cases are pretty clear, $d(i,0)=i$ and $d(0,j)=j$ and $d(0,0)=0$.
Now comes the trickier part:
Suppose $i>j$. then at least we need $i-j$ actions so $X$ and $Y$ will be same length, length $j$. Now they are both same length so we have the optimal solution $d(j,j)$.
and  if $j \geq i$, then the opposite happens, we need $j-i$ so they are same length, and from there we need $d(i,i)$ steps.
So $d(i,j)=i-j+d(j,j)$ if $i>j$, and $d(i,j)=j-i+d(j,j)$ if $j\geq i$.
Is this the correct result? This doesn't seem correct because well, won't $d(i,i)$ depend on what the letters actually are? What letters are we deleting / adding? It seems too simple.
Edit: Also this is wrong because for example the case where $i=j$. I define $d(i,i)$ using $d(i,i)$ so this is clearly wrong.
Answer: Managed to find an answer that fits and seems to work:
if $x_i \neq y_j$ then $d(i,j)=min(d(i-1,j)+1,d(i,j-1)+1,d(i-1,j-1)+2)$
and if $x_i=y_j$ then $d(i,j)=min(d(i-1,j)+1,d(i,j-1)+1,d(i-1,j-1))$


Is there an easy proof of the fact that the intermediate image functor respects weights?

Question: It was proven in BBD (see Corollary 5.3.2) that for an open immersion $j$ the functor $j_{!*}$ preserves weights of mixed sheaves. The proof relies on several previous results; it is especially complicated in the case when $j$ is not affine. Does an easier proof (or a plan of it:)) exist? I would like to have a proof that (mostly) relies on the properties of $j_{!*}$ (and on the 'formal' properties of weights).
Comment: Perhaps this should be added to the question (for the non-experts).
Comment: What's       BBD?
Comment: Beilinson, Bernstein, Deligne...
Answer: The proof in BBD is not that complicated, and it doesn't matter much whether $j$ is affine or not. It uses the three following facts :

If $f$ is a morphism of schemes, then $f_*$ sends a complex of weight $\geq a$ to a complex of weight $\geq a$, and $f_!$ sends a complex of weight $\leq a$ to a complex of weight $\leq a$ (a very natural property of weights; of course that's not so easy to prove for weights of $\ell$-adic complexes, and it is the main result of Deligne's Weil II). Cf BBD 5.1.14.
If $K$ is an $\ell$-adic complex, then $K$ is of weight $\leq a$ (resp. $\geq a$) if and only if, for every $k\in\mathbb{Z}$, the $k$th perverse cohomology sheaf of $K$ (call it ${}^pH^k K$) is of weight $\leq a+k$ (resp. $\geq a+k$). Cf BBD 5.4.1. Again, hard to prove, but a natural enough property of weights, and a reason in my opinion why perverse sheaves are so much more natural than constructible sheaves (one out of many).
If $j$ is a locally closed immersion (more generally, a quasi-finite map), then $j_{!*}$ is the image of ${}^pH^0j_!$ in ${}^pH^0j_*$. This is the definition of the intermediate extension.

Now the result you want is obvious : Take $j:X\rightarrow Y$ a quasi-finite morphism. If the perverse sheaf $K$ on $X$ is of weight $\leq a$, then $j_!K$ is of weight $\leq a$ (as a complex), so the perverse sheaf ${}^pH^0j_!K$ is of weight $\leq a$, and so is its quotient $j_{!*}K$. Likewise for weights $\geq a$, using this time $j_*$.
Note that you could also define $j_{!*}K$ (for $K$ pure of weight $a$) as the weight $\leq a$ part of $j_*K$, or as the weight $\geq a$ part of $j_!K$. I think it's not too hard to recover the usual properties of $j_{!*}K$ from that definition, but I would have to think more to see how to make it work for mixed (but not pure) perverse sheaves.
Edited to add two remarks :
(1) I don't think that it is so hard to go from the affine case to the general case. Consider an open embedding $j:U\rightarrow X$, let $i:Y\rightarrow X$ be the complement. Let $\pi:X'\rightarrow X$ be the blowup of $Y$ in $X$, and $j':U\rightarrow X'$ be the inclusion. Then $j'$ is affine, and, for every perverse sheaf $K$ on $U$, $j_{!*}K$ is a direct factor of ${}^pH^0\pi_*j'_{!*}K$, so the result for $j_{!*}K$ follows if you know it for $j'_{!*}K$, without any need of BBD 5.3.1. (You don't need the decomposition theorem to prove my claim. It is an exercise in perverse sheaves to prove that the map
${}^pH^0\pi_*j'_!K={}^p H^0j_!K\rightarrow j_{!*}K$ factors through a map ${}^pH^0\pi_*j'_{!*}K\rightarrow j_{!*}K$. Likewise, or by duality, there is a natural map $j_{!*}K\rightarrow{}^pH^0\pi_*j_{!*}K$. The composition $j_{!*}K\rightarrow{}^pH^0\pi_*j'_{!*}K\rightarrow j_{!*}K$ is the identity when restricted to $U$, so it is the identity.)
(2) If $K$ is pure, there is a slightly different way to prove what you want (you might be able to do something if $K$ is mixed too, but I didn't try to work it out). Notation : $j$ is an open immersion from $U$ to $X$. First, the problem is local in $X$, so you can assume that $X$ is affine. Then $Y:=X-U$ is defined by a finite number of functions on $X$. By induction over the number of functions necessary to define $Y$, you can reduce to the case where there exists a function $f:X\rightarrow\mathbb{A}^1$ such that $Y=f^{-1}(0)$. Now you can use the result of Beilinson-Bernstein (cf "A proof of Jantzen conjectures") that the Jantzen filtration on $j_!K$ coincides with (a shift of) the weight filtration if $K$ is pure. The Jantzen filtration on $j_!K$ is induced by the monodromy filtration on the maximal extension $\Xi_f K$, and it is an exercise to identify the quotient $j_{!*}K$ of $j_!K$ with one of the graded pieces of this filtration and to conclude that it has the expected weight. This proof avoids BBD 5.2, but it relies on the article of Beilinson-Bernstein instead; as fat as I can tell, the methods Beilinson-Bernstein use to prove the result that you need are natural extensions of the methods of Weil II, and you have to assume Weil II anyway, so maybe this is slightly more natural.
Comment: Your reasoning is certainly very logical; yet it does not seem to follow BBD. In BBD 5.3.2 is not deduced from 5.4.1. Conversely, 5.4.1 relies on 5.3.7, which uses 5.3.5, which uses 5.3.4, and the latter is a corollary from 5.3.2.:) And 5.3.2 is deduced from 5.3.1, which relies on 5.2.1, whereas the proof of the latter is pretty complicated.:)
Comment: You did not ask for a proof that follows BBD, you asked for a proof that uses the natural properties of $j_{!*}$ and the formal properties of weights. But none of the properties of weights are easy to prove for $\ell$-adic complexes, so there are no formal properties of weights.
I think the best you can hope for is a proof that uses the natural properties of weights. The precise proof of those natural properties is going to depend on your particular context (and on your definitions). For example some of those properties are very hard to prove in the $\ell$-adic world...
Comment: ...but very easy to prove for motives. And some of these properties are still conjectural for motives.

Note also that your statement is corollary 5.4.3 of BBD, which is deduced in BBD from theorem 5.4.1. So I was actually following BBD afer all. :)

As for your original question, if what you want is a proof that is very simple and uses only the definition of weights of $\ell$-adic complexes but not, say, Weil II (which is very hard to prove), then I know of no such proof. Sorry.
Comment: Well, I do not know for sure which sort of a reasoning could help me.:) I would prefer one that relies on 5.1.14 of BBD.

Could you say more about what is easy to prove for motives?
Comment: Okay, the problem is that 5.3.1 (if a perverse sheaf is of weights between $a$ and $b$, then so is any subobject) is crucial, and I do not see a more direct way to get at it than the one in BBD. The definition of weights by looking at stalks is not well adapted to perverse sheaves...

About motives, I should not have written "easy", because very few things are easy in maths, and I realized that I called part of your work easy although I do not think it is, so I did not mean any offense. I meant something like "the proof seems more natural to me" (more natural than the proof of Weil II).
Comment: And what I meant is more natural for motives is the fact that $f_*$ and $f^!$ increase weights, while $f_!$ a,d $f^*$ decrease weights, when you define weights the way you do in your papers, that is (if I understand well) by declaring that relative Chow motives have weight $0$ and that shifting a motive shifts its weight (I am changing the signs of your weights because that is what I am used to).

What of course is harder is the analogue of BBD 5.3.1 because we don't even know how to define a $t$-structure on the triangulated category of motives. But I imagine you know all that better than me.
Comment: Thank you very much for your comments! I wasn't offended at all. I just wondered whether you had in mind some piece of the study of motives that I don't know of (or forgot:)). Also, to me my own results seem to be very much easier than those of Deligne.:)


Websocket connection spoofing

Question: I have a websocket server, where client credentials get validated upon connecting and are never bothered again, since connections are stored in memory. I was wondering, a TCP connection is basically identified by local address:port and remote address:port, if we suppose that an attacker can find out a victim's IP address and the exact local port they are connected from, and we also suppose that the attacker is aware of the software architecture of the server and knows exactly what information he needs to send where, would they be able to spoof and send packets in a way such that the server would think they are legitimately coming from the victim's machine?
Answer: Even with plain unencrypted Websocket the attacker can not easily spoof the connection. The attacker would not only need to spoof the IP address which might be kind of simple. But it must spoof the IP address for a TCP connection which is much harder since it not only needs to spoof the IP address but also use the correct TCP sequence numbers expected by the peer. Guessing must be done since because of the spoofed IP address the attacker cannot see the packets send from the server to the spoofed client.
While it might be possible to guess the sequence number correctly for a single TCP packet right it gets much harder to keep guessing correctly since the attacker does not get any feedback which of the previous guesses was correct. Additionally it is not unlikely that the real client will actually send a RST on the spoofed connection since it receives packets from the server which don't correlate to an existing connection. This will immediately close the connection at the server side.
Thus, it might be possible for exchanging a few packets but it is more or less impossible to keep a  Websocket connection running with a spoofed IP address for some significant time.
Answer: Yes.
If the connection isn't encrypted (for example TLS) and the attacker is able to spoof his IP (which isnt hard) in this scenario he can even make a Man in The Middle Attack by putting himself in a position where he can receive the packages from the Client, analyze them and pass them to the Server.
Comment: *"...by putting himself in a position where he can receive the packages from the Client..."* - for IP spoofing it is usually not assumed that the attacker is in the path between client and server (i.e. man in the middle). Of course, if the attacker is in this path it is simple - but how does the attacker get in this path?

Websocket connection spoofing


Why can't we observe the Oort cloud with a telescope?

Question: The Oort cloud is a hypothetical structure based on our observation of long-period comets. There are currently proposals to design probes to confirm the existence of the Oort cloud.

Now, sending a probe would have other benefits, but why can't we observe the Oort cloud with a telescope?
Comment: *"Even if launched today, it might well be surpassed by a far superior probe 50 years later."*  This will always be true, and is an argument for doing nothing forever.
Comment: @Marc This is not true if we use a form of propulsion that gets there within 50 years.
Comment: I think an Oort probe in our lifetime is unrealistic and actually irrational! The Oort cloud starts about 2000 AU out. It would take generations to arrive there with foreseable propulsion technology. Even if launched today, it might well be surpassed by a far superior probe 50 years later. And besides, where to go if no target has been observed by telescope before? The Oort cloud is a very empty space. I'd like to see one of those proposals for an Oort probe, because I don't understand how the concept could work.
Comment: Where will this form of propulsion come if we never take the first step of building the best we can today and using it? If we never make a serious effort, we'll always be waiting for the perfect solution.
Answer: The angular resolution of the telescope really has no direct bearing on our ability to detect Oort cloud objects beyond how that angular resolution affects the depth to which one can detect the light from faint objects. Any telescope can detect stars, even though their actual discs are way beyond the angular resolution of the telescope.
The detection of Oort cloud objects is simply a question of detecting the (unresolved) reflected light in exactly the same way that one detects a faint (unresolved) star. Confirmation of the Oort cloud nature of the object would then come by observing at intervals over a year or so and obtaining a very large ($>2$ arcseconds) parallax.
The question amounts to how deep do you need to go? We can do this in two ways (i) a back of the envelope calculation assuming the object reflects light from the Sun with some albedo. (ii) Scale the brightness of comets when they are distant from the Sun.
(i) The luminosity of the Sun is $L=3.83\times10^{26}\ W$. Let the distance to the Oort cloud be $D$ and the radius of the (assumed spherical) Oort object be $R$.
The light from the Sun incident on the object is $\pi R^2 L/4\pi D^2$.
If we now assume that a fraction $f$ of this is reflected uniformly into a $2\pi$ solid angle. This latter point is an approximation, the light will not be reflected isotropically, but it will represent some average over any viewing angle.
To a good approximation, as $D \gg 1$ au, we can assume that the distance from the Oort object to the Earth is also $D$. Hence the flux of light received at the Earth is
$$F_{E} = f \frac{\pi R^2 L}{4\pi D^2}\frac{1}{2\pi D^2} = f \frac{R^2 L}{8\pi D^4}$$
Putting some numbers in, let $R=10$ km and let $D= 10,000$ au. Cometary material has a very low albedo, but let's be generous and assume $f=0.1$.
$$ F_E = 3\times10^{-29}\left(\frac{f}{0.1}\right) \left(\frac{R}{10\ km}\right)^2 \left(\frac{D}{10^4 au}\right)^{-4}\ Wm^{-2}$$
To convert this to a magnitude, assume the reflected light has the same spectrum as sunlight. The Sun has an apparent visual magnitude of -26.74, corresponding to a flux at the Earth of $1.4\times10^{3}\ Wm^{-2}$. Converting the flux ratio to a magnitude difference, we find that the apparent magnitude of our fiducial Oort object is 52.4.
(ii) Halley's comet is similar (10 km radius, low albedo) to the fiducial Oort object considered above. Halley's comet was observed by the VLT in 2003 with a magnitude of 28.2 and at a distance of 28 au from the Sun. We can now just scale this magnitude, but it scales as distance to the power of four, because the light must be received and then we see it reflected.
Thus at 10,000 au, Halley would have a magnitude of $28.2 - 2.5 \log (28/10^{4})= 53.7$, in reasonable agreement with my other estimate. (Incidentally my crude formula in (i) above suggests a $f=0.1$, $R=10\ km$ comet at 28 au would have a magnitude of 26.9. Given that Halley probably has a smaller $f$ this is excellent consistency.)
The observation of Halley by the VLT represents the pinnacle of what is possible with today's telescopes. Even the Hubble deep ultra deep field only reached visual magnitudes of about 29. Thus a big Oort cloud object remains more than 20 magnitudes below this detection threshold!
The most feasible way of detecting Oort objects is when they occult background stars. The possibilities for this are discussed by Ofek & Naker 2010 in the context of the photometric precision provided by Kepler. The rate of occultations (which are of course single events and unrepeatable) was calculated to be between zero and 100 in the whole Kepler mission, dependent on the size and distance distribution of the Oort objects. As far as I am aware, nothing has come of this (yet).
Comment: @called2voyage JWST might beat HST by a magnitude or two, but not 20 magnitudes.
Comment: Would it be worth asking a new question on how JWST might change this? Or does it not really have much of an impact here?
Answer: I had a chat with a European PhD student who plans to make an attempt to find Oort cloud objects in data from the Gaia space telescope. This could be possible thanks to microlensing events when an Oort object transits (near) a background star and relativistically magnifies the star's light for a moment.
Best case is that in a few years we will have a map of a statistically useful number of Oort cloud objects. Enough to claim that we have "seen" it.
Comment: That an interesting idea, microlensing is a hot topic, I don't suppose there's any news of results yet?
Answer: Put simply, it is because the objects that make up the Oort Cloud, remnants from the formation of our sun, are both too small and too faint for us to detect. They are faint because of their vast distance away. There is minimal absorption of the sun's light and even less is reflected back. So little light is reflected back that there is nothing for even our most advanced telescopes to see.