Why cannot a set be its own element?

Question: When I study Topology, I met with a problem. On my book, it says 'we cannot admit that there exists a set whose members are all the topological spaces. That will lead to a logical contradiction, that there will be a set who is a member of itself.' But why we cannot have a set who is a member of itself?
Comment: Aaaaaarrggghhhh!!  Stop mentioning Russell's paradox!  Russell's paradox does not prevent a set from being its own element; indeed, there are (seemingly) consistent models of set theory in which we can have $x\in x$ but the RP set $\{x|x\not\in x\}$ cannot be constructed.
Comment: quick, create a set of all paradoxical sets - now, is it in itself?
Comment: You should check out Russell's paradox.
Comment: When something is uncomfortable, just give it a nice name ( regularization, analytical continuation, renomarlization group, 'a new' axiom, etc… ) and everybody is happy.
Answer:
We cannot admit that there exists a set whose members are all the
  topological spaces. That will lead to a logical contradiction, that
  there will be a set who is a member of itself.

This is not quite untrue, but at the very least, its a deceptive statement. Sure, in the usual formulation of set theory (namely, ZFC), no set can be a member of itself, but this is basically because (to oversimplify a little) we declare via axiom that "there are no infinite descending membership chains" (see also, axiom of regularity). This means that, in particular, if there was a set $x$ such that $x \in x$, then we'd have
$$\cdots x \in x \in x$$
which is an infinite decreasing membership chain. So, that would be a contradiction. The point, though, is that there are perfectly good variants of ZFC in which there exist sets $x$ satisfying $x \in x$, see also non-well-founded set theory.
Indeed, topology can be developed pretty much independently of whether or not well-founded sets exist. Therefore, that quote is not an example of good mathematical writing.
However, the author is correct that there cannot be a set of all topological spaces. Now you may say:

Wait, I can define the notion of a topological space. Its a pair
  $(X,\tau)$ such that [whatever]. And if I can define a concept, then the set of all instances of that concept must exist. So, the set of all topological spaces must exist.

Sounds convincing, right? Indeed for quite a long time, mathematicians believed the basic idea that "if you can define a concept, then the set of all instances that concept must exist." It was Russell whom first realized that this principle, which is formalized by the (contradictory) axiom schema of unrestricted comprehension, is untenable. The proof goes something like this. Suppose that for any formula $\phi(x)$ I can write down, there is a set of all $x$ satisfying $\phi(x)$. Then, there is a set of all $x$ satisfying $x \notin x$, call it $R$. Thus $y \in R$ iff $y \notin y$, for all $y$. So $R \in R$ iff $R \notin R$, a contradiction. Basically, this happens because we cannot consistently decide whether or not $R$ should be an element of itself. See also, Russell's Paradox.
So, we need some new set-existence principles, which (hopefully!) don't lead to an outright contradiction like that. The standard collection of set-existence principles is called ZFC. What you've got to understand about ZFC is, its based on the philosophy that "the only reason a set shouldn't exist, is if its too large." So for example, we have an axiom schema (namely, replacement) stating that, if the domain of a (definable) function exists, then its range (aka image) must also exist. This makes sense in light of the philosophy of ZFC, because the range of a function always has cardinality less-than-or-equal-to the cardinality of its domain. So, using this principle, we can always use a set $X$ to prove the existence of a lot of smaller sets (as well as different sets of equal size).
Returning to the issue of topological spaces, it turns out that ZFC cannot prove the existence of a set of all topological spaces. Indeed, ZFC can prove that there is no set of all topological spaces, because such a set would be "too big." The problem with a set thats too big is that we can use the aforementioned principle to prove the existence of a whole slew of smaller sets, some of which will be paradoxical, like the aforementioned $\{x : x \notin x\}$. So, this is the usual approach to (hopefully) avoiding the paradoxes, and it requires that big collections, like the class of all topological spaces, cannot exist. For a similar reason, there is no "set of all things," nor a "set of all sets," nor anything like that.
Of course, there are other set theories where the "set of all sets" actually does exist. This is true in NFU, for example; and, if I'm not mistaken, it is also the case that the set of all topological spaces exists according to NFU. However, these sorts of set theories tend to have their own issues, which is why most people tend to prefer relatively "tame" ZFC (and its extensions) over the relatively "crazy" set theories like NFU.
In conclusion, its true that there is no set of all topological spaces, at least in "tame" theories like ZFC. However, the fundamental reason for this is issues of size, not issues of self-membership.
Answer: The statement:

A set cannot be a member of itself.

is a consequence of the so-called Axiom of Foundation or Axiom of Regularity. Other consequences of this axiom are, for example, that we can't have the following situations:

Membership loops: $X \in Y \in X$
Infinite membership chains: $X \ni Y \ni Z \ni \cdots$

However, it is nowadays known that a lot of standard mathematics can be done in the so-called $\sf ZF^-$ setting (the Zermelo-Fraenkel axioms without Foundation).
In the situation of a "set of all topological spaces", we run into a more critical problem than that of a set being an element of itself, namely Russell's Paradox. It shows its face when we want to select from our "set" $\mathscr T$ of topological spaces the collection:
$$\mathscr F = \{T \in \mathscr T \mid T \text{ is not a point of itself}\}$$
Then this $\mathscr F$ induces a subspace of $\mathscr T$ (in the discrete topology, say), and we are brought to Russell's paradox.
This paradox, however, is linked to the observation that "$\mathscr T$ is too large to be a set", as opposed to "$\mathscr T$ contains itself".
The axiomatic set theory $\sf ZF$ overcomes this by restricting the Axiom of Comprehension (also called "Axiom of Specification"), which specifies how we may form new sets, in a suitable way.
Comment: @Phil No, in order to avoid Russell's paradox, we need to avoid the formation of (sets like) $\mathscr F$. The crucial property that $\mathscr F$ has, is that $\mathscr F \notin \mathscr F$ is accompanied by the information that $\mathscr F \in \mathscr T$. Therefore, we must conclude that $\mathscr F$ is a point of itself, which leads to the contradiction. Normally, we would simply conclude that $\mathscr F \notin \mathscr T$, and no problem would arise. In conclusion, "$\mathscr T$ is too large because it contains its Russell subset $\mathscr F$ as an element". See also user18921's answer.
Comment: So you mean, in order to avoid Russell's paradox, we must assume that no set could be a member of itself? I've tried to find out some contradictions by assuming that some set is a member of itself, but failed.
Answer: In modern set theory we have the axiom of regularity which implies that $A\notin A$ for every set $A$.
However that is not the contradictory part. We can define a topology on the collection of all topological spaces, and if that would be a set then it will be a topological space. Now we run into either of two problems:

If your assumptions include the axiom of regularity then you hit a straight out contradiction, as mentioned in the first line.
However, even if you don't assume that axiom you still have a Russell paradox like contradiction, as the other answers have pointed out.
Answer: You might want to read into Russell's paradox.
Basically, the problem is:

Let $S$ be the set of all sets which do not contain themselves.

This leads to a contradiction since $S$ cannot contain itself, nor can it not contain itself.
Thus in general you can't simply say "let $S$ be the set of all sets with $Y$ property", or else you could run into a contradiction of this kind.
ZFC set theory avoids this problem by requiring that no set can be an element of itself, via the axiom of regularity.
So the collection of all topological spaces cannot be a set, or else we could form a topological space on it, thus making it an element of itself.
Comment: Even without regularity, Russell's paradox is not an issue in ZFC. In fact, the only reason it's a "paradox" is because of unrestricted comprehension.
Answer: This is essentially because of a thing called "Russell's paradox" in naive set theory (where anything you can define can be thought of as a set).
Suppose we allow sets to contain themselves. Then let $S=\{$sets $X:X\not\in X\}$. The question is, does $S$ contain itself? If it does, by the definition of $S$, $X\not\in X$. If it doesn't, again by the definition of $S$, we have that $S\in S$. Either way we have a contradiction. The only way to avoid this paradox is to be stricter when it comes to what we allow to be sets, and one way in which we do this is to not allow sets to contain themselves.
Comment: There exist models of set theory in which sets are allowed to be members of themselves.  See, for example, https://en.wikipedia.org/wiki/Non-well-founded_set_theory , some of which have the same consistency strength as ZF (and, in particular, the Russel's paradox set $S$ cannot be constructed within the theory).  I suppose Russell's paradox is in a way responsible for the existence of the Axiom of Regularity, which prohibits $x\in x$, since otherwise non-naive set theory might not exist, but allowing a set to be a member of itself doesn't immediately open the door to Russell's paradox.

Why cannot a set be its own element?


How to formulate a REVIEW paper in true sense?

Question: Many thanks in advance for taking time to read this question.
Recently, as a group of students, we reviewed a certain topic in Machine Learning. The supervisor asked us to prepare a survey paper on the topics that we have read. We have gathered the required content, reviewed individual papers and made a report. Now, we have touched around 50 pages, whereas the supervisor wants us to shorten the stuff. The journal which we are targeting, says that the survey papers/review papers should be less than 21 pages. The journal is from IEEE, and has two column format.
The content itself is heavy in terms of equations. For instance, If we write a review of a single paper, its going to take more than half of one page where we explain the underline methodology. That is, how they did the stuff. For remaining part of the page, we explain their experiments etc. For some papers, the methodology discussion takes bit more space, due to equations. It took us around 30-35 pages for reviews only. We also created a section for Background Knowledge, which covers around 8-10 pages. The total length goes to 50 pages, after we added analysis and discussion part.
Some of us have published papers already, however this particular field is a bit different for us. We understand to shorten the content, but we really dont know how to deal with this kind of papers having dozens of equations. We however have already picked the key ones, and left out the others. For instance:
https://www.researchgate.net/publication/314026953_Variational_Relevant_Sample-Feature_Machine_a_Fully_Bayesian_Approach_for_Embedded_Feature_Selection
Questions:

My first question is related to Background Knowledge. Upto what extent one should describe a certain term. Are there any rules which should be considered while designing this section? like 20% of the whole paper?

My second question is particular to a single review (explanation of an article in my review paper) like the one I have shown above. For instance, in this particular paper, the author used an additional prior to handle feature sparsity. Now, I can put a single sentence to explain this, however, I believe that I put the equation there so that its clear, how they did it. In the same way, few more equations like likelihood definition, posterior form, and estimation equations might take some space. The whole thing swallows up. If there are like 20 such papers, obviously, it will end up with 35 pages, like it has happened. Should I leave out the equations? My question, is how should I setup the review format, what to include and what to exclude.

While reading the above, please note that I understand that in review papers, people are mostly interested in tables, comparison sheets and analysis stuff. However, we are still required to present enough review of papers.
Regards.
Comment: Ask your supervisor!
Comment: As I said, there is very little communication. So I am trying to handle this myself, somehow.
Answer: Look at other review papers, especially in the journal you're interested in, and observe how they handled this issue of length restriction vs. detail.
Comment: I found not many examples in this regard. It boils down to the spacing the equations eat. If there are like 100 equations in the paper, it swallows up everything. The journal says you can't cross 21 pages. Looks like I should remove all equations.. but how will I explain everything in absence of equations, that remains a question.


Is it possible to enable rules in Rubocop only for new classes

Question: I would like to enable ClassLength rule on Rubocop but only for new classes such that we don't start getting alerts for all the legacy code. Is it possible to do?
Answer: You can ignore your legacy files in .rubocop.yml, either as a long list or as a few globs if you can isolate them into directories.
Metrics/ClassLength:
  Exclude:
    - 'one/file'
    - 'another/file'
    - 'some/dir/*'

If there are just a few really bad offenders but the rest are over the default (100 lines), you can pick a higher threshold.
Metrics/ClassLength:
  max: 200

You can also add annotations to disable cops in each of the files where you want to ignore Metrics/ClassLength:
# rubocop:disable Metrics/ClassLength
class SuperLongScaryThing
  # ...
end
# rubocop:enable Metrics/ClassLength

And of course, you can always do some refactoring!


Why are wait() and notify() declared in Java's Object class?

Question: Why are the wait() and notify() methods declared in the Object class, rather than the Thread class?
Answer: Because, you wait on a given Object (or specifically, its monitor) to use this functionality.
I think you may be mistaken on how these methods work.  They're not simply at a Thread-granularity level, i.e. it is not a case of just calling wait() and being woken up by the next call to notify().  Rather, you always call wait() on a specific object, and will only be woken by calls to notify on that object.
This is good because otherwise concurrency primitives just wouldn't scale; it would be equivalent to having global namespaces, since any calls to notify() anywhere in your program would have the potential to mess up any concurrent code as they would wake up any threads blocking on a wait() call.  Hence the reason that you call them on a specific object; it gives a context for the wait-notify pair to operate on, so when you call myBlockingObject.notify(), on a private object, you can be sure that you'll only wake up threads that called wait methods in your class.  Some Spring thread that might be waiting on another object will not be woken up by this call, and vice versa.
Edit: Or to address it from another perspective - I expect from your question you thought you would get a handle to the waiting thread and call notify() on that Thread to wake it up.  The reason it's not done this way, is that you would have to do a lot of housekeeping yourself.  The thread going to wait would have to publish a reference to itself somewhere that other threads could see it; this would have to be properly synchronized to enforce consistency and visibility.  And when you want to wake up a thread you'd have to get hold of this reference, awaken it, and remove it from wherever you read it from.  There's a lot more manual scaffolding involved, and a lot more chance of going wrong with it (especially in a concurrent environment) compared to just calling myObj.wait() in the sleeping thread and then myObj.notify() in the waker thread.
Comment: This doesn't begin to answer why you can wait on ANY object. Why wasn't there a specific Lock class or type? Or maybe a marker interface?
Comment: "...potential to mess up any concurrent code as they would wake up any threads blocking on a wait() call..."  That's OK as long as "mess up" means "limit the performance."  It shouldn't actually break anything because one _always_ calls wait() in a loop until the condition one is waiting for becomes true.
Comment: @mjaggard I think the answer by Solomon here answers that question: https://stackoverflow.com/a/34293039/731752. It boils down to "it didn't have to."
Answer: The most simple and obvious reason is that any Object (not just a thread)
can be the monitor for a thread. The wait and notify are called on the
monitor. The running thread checks with the monitor. So the wait and notify methods are in Object and not Thread
Answer: Because only one thread at a time can own an object's monitor and this monitor is what the threads are waiting on or notifying. If you read the javadoc for Object.notify() and Object.wait() it's described in detail.
Answer: The mechanism of synchronization involves a concept - monitor of an object. When wait() is called, the monitor is requested and further execution is suspended until monitor is acquired or InterruptedException occurs. When notify() is called, the monitor is released.
Let's take a scenario if wait() and notify() were placed in Thread class instead of Object class. At one point in the code, currentThread.wait() is called and then an object anObject is accessed.
//.........
currentThread.wait();
anObject.setValue(1);
//.........

When currentThread.wait() is called, monitor of currentThread is requested and no further execution is made until either the monitor is acquired or InterruptedException occurs. Now while in waiting state, if a method foo() of another object anotherObject residing in currentThread is called from another thread, it is stuck even though the called method foo() does not access anObject. If the first wait() method was called on anObject,  instead of the thread itself, other method calls (not accessing anObject) on objects residing in the same thread would not get stuck.
Thus calling wait() and notify() methods on Object class(or its subclasses) provides greater concurrency and that's why these methods are in Object class, not in Thread class.
Answer: A few of the other answers use the word "monitor", but none explain what it means.
The name "monitor" was coined way back in the 1970s, and it referred to an object that had its own intrinsic lock, and associated wait/notify mechanism. https://en.wikipedia.org/wiki/Monitor_%28synchronization%29
Twenty years later, there was a brief moment in time when desktop, multi-processor computers were new, and it was fashionable to think that the right way to design software for them would be to create object-oriented programs in which every object was a monitor.
Turns out not to have been such a useful idea, but that brief moment happens to be exactly when the Java programming language was invented.
Answer: Read here for an explanation of wait and notify.
It would be better to avoid these however in your applications and use the newer java.util.concurrent package.
Answer: I will put it in a simple way:
To call wait() or notify() you need to own the object monitor - this means wait() or notify() needs to be present in the synchronized block
synchronized(monitorObj){
monitorObj.wait()  or even notify
}

Thats the reason these methods are present in object class
Answer: This is because,these methods are for inter thread communication and interthreadcommunication happens by using locks, but locks are associated with objects.hence it is in object class.


JDK = Java SE && JDK != Java EE?

Question: Please confirm the above statement?
I need to know what they are referring to when they mention JDK.
Comment: I think you mean Java SE and Java EE, not "JSE" and "JEE".
Answer: Java Development Kit is the way we usually refer to a set of tools to create Java applications, including the Java Compiler (to translate your JAVA Source classes into .class bytecode files), the Java Virtual Machine (to execute those .class files), the JAR tool to ZIP applications (or extract them) and so on.
The Java Standard Edition usually refers to the core classes that make up the foundation of most Java programs, such as the Collections API (List, Map, Set, etc.), the classes in the java.lang package, the I/O classes, the Threading API, the RMI packages and classes, the i18n (internationalization) classes, the JDBC API and, of course, the AWT and Swing classes to create desktop applications and applets. These APIs are the very foundation of all other programs you can write 'in Java', such as the IntelliJ IDEA IDE, Servlet Containers (like Tomcat), RDBMS (like Apache Derby) or custom standalone clients such as SQuirreL. These classes you get as part of the JDK (just crack-open the src.zip file right under your JDK folder and see what you find there :) )
Java EE is a specification with sub-specifications that, as a whole, define a set of services that implementations (such as GlassFish or IBM's WebSphere) should provide in order to be in compliance with the spec. These 'implementations' are the so-called Java EE Containers. When you hear people saying that 'GlassFish is a Java EE 1.6 implementation' they mean that GlassFish (a Java program written using the Java Standard Edition classes) provides all the features that the Java EE 6 family of specifications define.
The Java EE specifications are supposed to cover a particular need within the field of 'enterprise' application development, such as the Servlet specification for HTTP request-response processing, the EJB specification for transaction management and component life-cycle management, the JMS specification for messaging services and so on. The Java EE containers (WebLogic, WebSphere, Tomcat) provide actual implementations of these specifications as classes. In an overly simplified statement, these containers provide the JARs for the Java EE APIs. The classes within these JAR files make use of the Java SE core classes. I think this last sentence makes the connection between Java SE and Java EE.
To wrap this up, I would say that the JDK is just a set of programs you download and execute to create and execute your programs 'written in Java'. If you have a Java program that only makes use of the 'core classes' and requires no 'enterprise services' you execute your Java program on top of the JSE. Finally, if you need to provide some functionality and any of the Java EE specification's implementations cover any of your needs, say you need to process HTTP requests; you create a component as dictated by the spec (a Servlet in this case) and deploy it into your Java EE container -Tomcat, for example-.
Hope this helps
Comment: I would strive for the latter rather than the former. I think it's fair to say that the JDK is a JRE (the Virtual Machine) plus the Java SE classes. To make your statement more accurate, I would include those less visible tools like the compiler, the JAR tool, JAR signer and things like that that you get with the JDK.

I think it's a matter of opinion. That's why I just put what I consider 'raw facts' in my original reply.

Best,

YJ
Comment: thx it helped a lot. so that makes Java SE a part of JDK basically.
Comment: hmm would u say Java SE = JDK + JRE  or  JDK = Java SE + JRE?
Answer: When you download the standard Java development kit, you get the standard edition of Java (Java SE) in a development form (JDK). The Java runtime (JRE) is the same set of libraries etc. without the development tools (compiler etc.)
Java EE is a set of additional APIs/interfaces (and most usually, some implementations of these). These are APIs for web applications, EJBs etc. You can use the JDK to build for this, provided you have the additional APIs and the implementations. Most usually a Java EE application will run in an application or web container.
Note (also) that until very recently, Java SE was known as J2SE, and Java EE was known as J2EE. The situation is confused further by the fact that many people (especially recruiters) confuse J2EE with EJBs (which are only one of the technologies in Java EE).
You're not alone in being confused by this. I regularly encounter experienced professionals who struggle with precisely what these mean, and Sun doesn't help by introducing Java 2 v1.6 (or is it Java 6?), and renaming J2EE to Java EE.
Comment: You probably meant to say J2EE instead of J2SE in the last sentence :) +1 nevertheless.
Comment: IIRC, the "Java 2" thing was abolished after release 1.4, and since then it's supposed to be "Java 5" and "Java 6".
Comment: @Michael - yes, I think you're right. I couldn't *quite* remember the details
Comment: You say "The Java EE containers (WebLogic, WebSphere, Tomcat) provide actual implementations of these specifications as classes." Does that mean that the javax.* classes, found under https://docs.oracle.com/javaee/6/api/allclasses-noframe.html, are actually not provided/written by Oracle, but rather by third parties?
Answer: Using the definitions above, you will find a JDK for Java SE (a set of java features) and a JDK for the Java EE (the features in Java SE + some "enterprise" features).
The Java Standard Edition and Java Enterprise Edition are the definition and APIs of the Java language, and the JDK are the tools you need to develop something using those features.
Comment: but why do they have JDK6 = JSE on their site. and when it comes to JEE they just call it JEE.
Comment: If it is true, how can Java EE JDK version 8 can contain Java SE JDK version 10 features and libraries as the latter JDK has released too later than the EE version?
Answer: To be more clear
Java SE -- Java Standard Edition, it happens to come in two versions: the JDK and JRE. JDK has the compiler and other tools.
Java EE -- Java Enterprise Edition is simply a standard, and a couple of libraries consisting mostly of just interfaces. While there are 'stand alone' components that can be downloaded for Java EE, alone they're of little value (again, being mostly just interfaces), and are typically bundled with the container you use to deploy or develop Java EE applications on. Plus Java EE comprises as an umbrella of many standards (JMS, JSF, etc. etc.).
Comment: They're both Java SE. The JRE is the runtime component. Most anything that is a "Java SE" application will run on the JRE. For example, Tomcat, a JEE compliant web container is, arguably, a JSE application as it only needs the JRE to run, even though it implements a portion of JEE. In the past, Tomcat required the JDK so it could use the Java compiler. But today, it simply needs the JRE. If anything, the JDK is a superset of JSE.
Answer: In general JDK refers to the Java SE Development Kit. You can also see the abbreviation on the respective download page and not on the one for the Java EE Development Kit or the Java ME Development Kit.
Comment: ok thats all i need to know. so JRE != JSE like another person said.
Comment: No, the JRE is - if I understand the whole distinction correctly - part of JSE as well as JEE.
Answer: JDK = java development kit.
Java SE = java standard edition (aka JRE)
Java EE = java enterprise edition (aka J2EE)

Update: Sun isn't well known for their clear naming conventions (Java 1.5 and Java 5.0 are the same thing, for example).
It boils down to this:
If you want to run java applications, go to http://www.java.com and click on the Download button.
If you want to write java applications, go to http://developer.sun.com and wade through it until you find a download that's about 80 MB called "JDK". There are several different versions of the JDK based on what kinds of stuff you're developing (web applications, console applications, etc.).
Comment: but when i go to the download page for JSE it says JDK6. So JSE = JDK? And are you sure that JSE = JRE? isnt the JRE the runtime environment (u need it to open java applications) and JSE the development environment (u need it to develop java applications)?
Comment: @unknown: The distinction between the Runtime Edition and the Development Kit have IMO little to do with the distinction between Standard Edition and Enterprise Edition. The download page even states, that the JRE is part of the JDK (since how would you execute the compiled code if not with the runtime components ;-) ).
Comment: Very wrong correlation. JRE is not a.k.a. JavaSE (or J2SE). JRE is just a minimum you need to run your Java applications - it's Java Runtime Environment, whereas J2SE is a specification for Standard Java Libraries.
Answer: JDK = Java Development Kit
Java SE = Java Standard Edition
Java EE = Java Enterprise Edition

JDK = Java SE && JDK != Java EE?


Difference between Agent User ID and user/ password while configuring replication agent AEM

Question: What is the difference between Agent User ID (Settings tab)  and User/Password (Transport tab)? Please share the scenarios of both two when configuring the replicating agents in AEM.
Answer: This is well documented in Adobe's documentation here
The context that is missing is to understand the how ACLs work, each user/group has certain privileges/rights; which outside normal CRUD operations include Read ACL, Edit ACL and Replicate. You can read about them here
Now coming to your question, a replication agent has host configuration (the system on which it is setup) and target configuration (the system it connects to). Agent User ID is used for the host system while User/Password on transport tab is for the target system.
For a replication agent on author, the user used in Agent User Id must have read and replicate rights on all path that need to be processed where as user specified in User/Password on transport tab must have create/write access to replicate the content on Publish instance.


Are squawk codes linked with flight info such as route and flight data?

Question: So squawk codes are given to an aircraft prior to departure. We know that if the pilot inputs the wrong code, the data will not show up. So are squawk codes linked via computer to the aircraft's flight data, so once the pilot inputs the correct code the data will show up? Also, what is the process of requesting a code change? Does atc have to re link the new code?
Answer: In the united-states, the squawk code is the (primary) method of correlating a radar target with useful information such as the aircraft identifier, its destination and route, its requested altitude, etc, etc. It is possible for a controller to manually associate a radar track with a given flight, but this requires extra work and may cause issues with automated data transfer to other facilities. (Note that, unlike in Europe, the ADS-B-entered "flight ID" is not used for identifying a target; only the traditional Mode A squawk code is used.)
In other words, yes! The squawk code is "linked" with the rest of the information that stored in the flight data computer.
It is possible for ATC to manually assign a specific discrete squawk code to a flight, but the problem is that there is no immediate conflict warning if that code is already assigned to a different flight. So, almost without exception, we simply let the computer assign the code.
Answer: When an IFR flight plan is filed, the ATC computers have all the relevant flight information such as type of aircraft, destination, and suggested routing.
When the flight plan is opened, an available squawk code in the sector where the flight is located is assigned.   At that point the pilot would be expected to set the code in the transponder.
If that code is seen by the ATC radar, then the display will be able to find the filed and open flight plan and can display data from that plan.  If a different code is seen (perhaps because the transponder was mis-set), then the intended information won't be found.

what is the process of requesting a code change?

As the transponder code is just a (seemingly random) set of four digits, I'm not sure why a pilot would want a code change.   Can you give more information on what scenario might arise to ask for such a change?
Comment: Thanks for the info! I've seen videos were pilots have requested a code change due to superstitious reasons. For example, a squawk code of 4666.


Is it OK to answer a question that you also vote to close?

Question: This question seems to suggest that it's common knowledge that it's not to be encouraged. However, if there is a simple (and usually really short) answer, should I not vote to close it and answer instead?
Comment: If the answer is simple enough, I usually make it a comment instead and then vote to close.
Answer:
Is it OK to answer a question that you also vote to close?

Sure.
Situations where this can be okay include

The question is hazy, and you think it should be closed in its current form, but you think you know exactly what the OP means
The question is borderline off-topic (like certain kinds of software recommendations), but it was asked in good faith, you can give a good answer anyway, and it's too big for a comment
The question is clearly flamebait, but you want to give a good, measured answer nevertheless

when doing this, always consider whether it's worth making your answer Community Wiki -  seeing as the question's closing will deprive your fellow community members from adding their competing answers.
Comment: In the first case, shouldn't you rather comment and give the user time to rephrase the question, instead of closing it right away?
Comment: @MvG the user can rephrase the question while it is closed, and then ask for it to be reopened. With 4000+ new questions a day, waiting for an edit (that usually won't happen) is not an option
Answer: You answer because you want to help the person asking the question, you close because the question is not a good fit to the site. The two are separate decisions based on separate value sets: it's perfectly reasonable to do both.
But be aware that the points you might get for answering the question are in jeopardy, because the question might be closed and deleted based on your other action! I for one have done this at least once, answer a question and vote to close and add a comment explaining why I'm voting to close.
Comment: Except you aren't really supposed to answer questions if they aren't a good fit for the site. You know, there's a reason why closing a question prevents new answers from being posted. They are **not** separate decisions. If you VTC and answer I will downvote your answer 99% of the time on the basic principle that you're being a hypocrite. The other 1% would be more acceptable cases of this, like Pekka says; although in those cases you probably shouldn't have voted to close in the first place. Answering and voting to close should be mutually exclusive.
Answer: When voting to close (really migrate) as off-topic, belongs on another site, I think it's perfectly acceptable to also answer if you can.  The answer will be appropriate even if moved.  Under other circumstances I would probably comment, if anything, to help the user out.   I'd rather not encourage users to ask bad questions, or repeat ones for that matter, by providing an answer.  If the OP seems genuine in asking their question, they're more likely to get a helpful comment, but that's just me.


How to test JPA entity insertion is done?

Question:
The question is about how to test whether persist entity works or not. I think it makes sense to test whether JPA entity mapping is correct and everything works as expected, especially for complex entity mapping with @OneToMany/@ElementCollection/@ManyToMany/@OneToOne with cascade attributes (CascadeType.ALL, for example). And be sure that all FK/PK/Unique constraints are satisfied.
This is the general question. The concrete part is about Spring Testing Framework. You can see on the code below, where DAO layer is testing, but because test method is marked as @Transactional, changes should be rollbacked, here is should instead of must, because how I can be sure, the changes were actually saved in the database at all, probably everything is hold in the memory, because transaction was marked for rollback, so no data is really sent to the database?
More important, that this test is failed, because account.getId() returns 0 (id generation is done using @SequenceGenerator), but it seems that this value is never assigned into the Account's id field. This test is only passed when the method is annotated with @Rollback(false), so of course no rollback occurs.
Am I right, that in this case when @Transactional for testing is used, everything is in the memory (at least, until flush() is not called), so it is not possible to check database constraints working.
And according to the thoughts above, what is the appropriate way to test entity insertion, and be sure that inserting was done, and then rollback everything to the initial state, so to run other tests? (clean up the database inside @Before every time test is executed?)
I don't want to use DBUnit, using Spring there is no sense at all to use DBUnit.
<code>@ContextConfiguration(
locations = {...})
@RunWith(SpringJUnit4ClassRunner.class)
public abstract class JpaRepositoryTest {
}

public class JpaAccountRepositoryTest extends JpaRepositoryTest {
    @Inject
    private AccountRepository accountRepository;

    @Inject
    private Account account;

    @Test
    @Transactional
    public void createAccount() {
        accountRepository.save(account);

        assertEquals(1, account.getId()); // this assertion will be failed, until @Rollback(false) is used
    }
}
</code>
Comment: The separate testing database is used (no fake in-memory database, but the same database platform which is used for production), so it is safe to delete everything on it, actually I create the database from scratch (using spring jdbc:initialize-database) before running tests.
Answer: If your constraints are not deferred, and you flush the session after the call to save, everything will be written into database, and constraints will be applied. You may then execute queries and check if your entities are returned. The returned entities will be the ones held in memory by the session, though.
When I really want to check that something is persisted correctly, I generally execute the persist in one transaction (using a TransactionTemplate), and then execute queries to verify everything is OK after the transaction commit.
Answer: You can do a combined em.flush() and then em.clear().
em.flush has been described above. em.clear() will detach all entities currently known by the context.
After this you can try to find your recently persisted entities and it will be as if you would add them to your context, that is, doing a real find against your entities. I have an example of that from a question I posted here on SO.
How can I reliably unit test updates of a JPA entity in a unit test


How will a common guy use Lightning Network when BTC hits 10 mln$?

Question: If BTC hits 10mln$ and transactions fees will be horrendous denominated in $, how a "common guy" will be able to opt in using Bitcoin, if even opening LN channel will be too expensive then since it requires on-chain payment? As I understand the only way for him would be to rely on third party which would'nt be very different from using a bank.
Comment: Also see this related question: https://bitcoin.stackexchange.com/q/87843/5406
Answer: I assume that people will have more refined ideas by the time this would actually appear on the horizon, but here are some ideas:

channel factories
Custodial Lightning Wallets, i.e. "Lightning banks"
atomic swap from a payment focused sidechain
purchasing spendable LN balance on other users' Lightning nodes via macaroons that permit spending a specific amount

Or more generally, I suspect that people would develop third layer solutions that permit multiple users to share Lightning Network channels effectively.


Huge on-die capacitor

Question: The schematic of the LM113 precision reference shows a 75pF capacitor integrated in the IC. Looks huge to me. What's the limit when integrating capacitor on-die?
Comment: I never thought to associate '75pF' with 'huge', but then again, I come from a switching power background where thousands of microfarads are sometimes considered 'not enough'. ;)
Comment: @Madmanguruman - I see what you mean. I can imagine very-high-power engineers thinking how you could possibly care about a single \$\mu\$A, too. :-)
Comment: Are you positive it's on the die, and not just in the package?
Comment: @Ranieri - it's most probably on the die. The other solution would be expensive, wiring-wise, especially since there seems to be another 30pF cap in the schematic. My guesstimate was that it would need only \$0.1mm^2\$.
Answer: The limit is just what you're prepared to pay. In a 0.13 \$\mu\$ process it would be a shame to waste all this space on a cap; you could place probably 10 000 transistors there.
The LM113 is already old and has a far larger feature size, so it will take relatively much less space, compared to the complete die. Don't forget all the resistors. Those are also expensive in die real-estate terms.
Assuming a separation of 0.1 \$\mu\$ and a dielectric constant of 10 a 75 pF capacitor will be around 0.3 mm x 0.3 mm. Not that bad after all.
Answer: For very large capaciatances it might make more sense for them to integrate in an op amp style capacitance multiplier, if it will get the job done.  Complexity would go up, but the overall silicon size used might be far less than the equivalent full capacitor.

Huge on-die capacitor


how to perform versioning content between users?

Question: I need to create a content type "Project Software". Users can upload source code to their projects as a portfolio editing option. In one project can participate more users. So I need a solution for versioning the project so that it can be shared for online editing code.
Answer: You should take a look at the project module. This is used on the drupal site as well.


How can I suppress notifications, such as Amber alerts, on Android 11?

Question: How can I suppress notifications, such as Amber alerts, on Android 11? I am getting numerous alerts for which I can do nothing, but my peace is being interrupted by these irrelevant alerts.
Answer: On the Home Screen, swipe up to show the list of installed Apps, search for "Messages" and open the "Messages" app.
Tap the 3 vertical dots "..." next to the magnifying glass (upper-right corner of the screen) and select "Settings".
Select "Emergency alert settings"
Select "Emergency alerts"
You can now uncheck "Extreme alerts", "Severe alerts", and "AMBER alerts".

Verified on Android 9, but provided here in the hope it will be helpful to others, as these steps are somewhat arcane, and searching in settings yields no results.
Answer: Open Setttings -> Notifications -> Wireless emergency alerts, set AMBER alerts to off.
Assuming you are using Google Messages:

Press the profile, then Messages settings.
Press Advanced -> Wireless emergency alerts. Press the 3-dots, select Alert preferences.
Emergency alerts opens. Set AMBER alerts to off. Or you can just switch off Allow alerts.

Optionally, you can also switch off Extreme threats and Severe threats.
Answer: The exact method will vary by device, but the general steps are:

Go to the Settings app
Select "Apps & notifications", or your device's equivalent category containing notification preferences.
Select "Wireless emergency alerts", which may be under Advanced.
Toggle the alerts that you wish to receive on/off.

Alternatively, if your OEM moved the category for the alerts, you can use the settings app's search bar to search for "Wireless emergency alerts".


Troubled Marigold

Question: Good day everyone, a few months back I grew some marigold seeds in a pot and two of my plants have sucessfully come up with one full grown. However my marigolds seem to be experiencing trouble from start. The blooms dont seem to open at all and the stems at the blooms are elongated. The plant leaves also tend to frequently get sun burned thus drying up or wilting at the branches thus making them look dried. I have noticed that a white patch tends to appear across the top of the lush green leaves before this. As a result I have a large odd looking marigold that is browning from down up which hasnt given me a proper flower to date. The weather around here is that of a tropical climate so its usually sunny throughout the day from morning to evening, unless there are rainy periods between. Please advise and thank you for any information in advance.
~:(
Comment: How wide  and deep is the pot?
Answer: The photos are not terribly clear, making it difficult/impossible to see the foliage clearly. One thing that can be seen though is the soil level in the pot, which appears to be halfway down the inside of the pot, though it's not possible to see how deep the pot is.
Your marigold seems to be a Tagetes variety and seems quite large - it certainly could be the case that it does not have enough room for its roots, unless the pot is very deep. There are also quite a few completely bare stems towards the base of the plant - this would suggest either insufficient root room, insufficient water or insufficient light, maybe all three. However, unless  your mairgold is one of  the Mexican varieties, these plants are only annuals, not perennials, see here https://homeguides.sfgate.com/marigolds-perennials-annuals-63218.html. You say you grew this from seed 'a few months back' - depending on how many months it might be coming to the end of its life.
If you think it might a Mexican variety, I would suggest you cut back  the bare stems to about an inch  or so and repot it in fresh soil, this time filling the pot up to about an inch below the rim, water in well, and see if it produces new growth.

Troubled Marigold


Overzealous HTML escaping

Question: This is likely the same problem as in Over-escaping html on timeline page. On the mod history page, in the list of moderator actions, some things are escaped that shouldn't be. The page source contains things like
<span class="mod-post-actions">&#9830;&nbsp;<span
title="Some Moderator Apr 2 at 11:18">Post converted to
comment</span>, <span title="Some Moderator Apr 2
at 11:18">Post Deleted</span></span>

which should of course be ... and previously were.
It seems only that one class is affected.
Answer: Fixed in the next build, thanks. Yet another fallout of my encoding spree.

Overzealous HTML escaping


How can you tell if it's safe to hang weight from the ceiling?

Question: I live in Canada and my house is made of wood. I'd like to mount gymnastics rings to my ceiling. I weigh roughly 90kg and I know you're suppose to find joists and attach weight there, but I don't want to pull my ceiling down. Is there a way to test or tell if my ceiling will take my weight? Especially since it's dynamic as I will likely be swinging.
Comment: @JimStewart I think OP means pulling down the ceiling while swinging--and I agree with you that most residential framed residential ceilings aren't designed, rated, or apt for this kind of activity, with the exception of ceilings attached directly to the bottom of rated floors. Then, the question becomes how to attach hooks safely and spread the load.
Comment: You would not have to "pull down the ceiling" to locate the joists. There are commonly used techniques for seeing through the finish wall to locate the edges of the ceiling joists, but these would not assure that the ceiling structure would support gymnastic rings. In general, houses in Canada and in the States are not designed for such loads. Before even musing about this,
I recommend  you consult with Canadian builder Mike Holmes of "Holmes On Homes" fame. Kidding aside, you can forget about this idea.
Comment: @Conrado is right. I meant I don't want my ceilings to collapse.
Comment: Just as an alternative, a friend of mine has a sex swing in their living room (hey, don't judge).  The swing portion hangs from a steel frame specifically designed to handle the weight and motion.  It also functions as an interesting conversation starter at dinner parties. ;)
Comment: haha I'll keep that in mind, sadly that might be too low. After reading this thread I think I'll have to build a pull up bar type thing in my backyard instead.
Comment: @noobycoder Just FYI, I've never measured the height of their sex swing frame, but IIRC, it is about 2-2.5m (7-8') tall at its apex.  I'm not sure if that is high enough for you.  I also estimate the length and width of the frame to be about 2.5m square (8'), perhaps a little more.
Answer: It's impossible to say with any confidence without knowing the details of your house's construction.
If there is a regular room above (not an attic) the ceiling you want to hang the rings from, normally those ceiling joists above are also the floor joists of the room above.  If it was constructed to modern guidelines those are going to be pretty strong - if you hang the rings from two parallel joists so the load is spread across two joists, and your attachment is sound and solid, that should be strong enough to hold you.  After all, it would hold you if you went upstairs, stood over the rings, and jumped up and down.
However it may very well cause enough movement to damage the ceiling drywall, make the floor squeaky, etc., especially if you made a habit of it.  If you were jumping up and down on the floor above, the subfloor and floor would help spread the load.  With rings, the forces generated by your weight and motion are focused on a single point and may cause the joists to flex more than intended.
If your attachment is not solid, that's a whole different story.  For example if you anchor your eye bolts into strapping rather than joists, that will either rip down the ceiling, rip out the eye bolts, or both.  If you find a joist but hit it off center and crooked, the eye bolt will look fine from below but will be hanging by a little sliver of wood and will rip out under load.  If you're upside down on the rings when that happens, it will be ugly.
Comment: And if the room above is an attic without joists, but rather trusses, they would not be designed to handle that static load, let alone a dynamic one.
Comment: Yeah, don't do that to your house. A purpose-built rig outside or in the barn/garage (if it's big enough) will coat a little more in the short term, but a lot less in the long run.
Answer: How tall are your ceilings?
You're going to be putting huge stresses on the ceiling when you're swinging, even doing simple giants, to say nothing of any sort of move that has a "landing" - all that "jerk" you feel in your shoulders is being transmitted right up to the framing. As a former gymnastics dad, I've watched the rings rig as it moves and wobbles under the weight of even a 10-year-old boy - I can't imagine the forces a college-age or older adult is putting on it.
Having the rings mounted close to the wall would minimize the stress on the joist and maximize the amount it could transmit into the supporting wall. However, that makes swinging a tad difficult (or painful). Therefore, you'd need to put the mounts at least a couple of meters from the wall to have room to swing which puts the stress close to the center of the joist, maximizing the deflection imparted to the joists and maximizing the chances of over-stressing them, leading to cracks and failure.
If all you're going to do is pull up to handstands or crosses, and you're not going to do any swinging, you might get away with mounting the rings a meter or so from the wall to have clearance for your body. Those moves are supposed to be very smooth with a minimum of swing and no jerking. If you intend to do any swinging, remember there's a reason the rig at the gym is made of steel, stabilized with guy-wires, and bolted to concrete (or weighted down with 100s of kilos of weight at each corner for a temporary set up).
Comment: But then you're putting _all_ the force on only one joist, @TylerH, concentrating the force and likelihood of damage. By spreading it across 2 joists, at least the load is spread. I've got to say that intentionally putting all that stress onto only one joist when 2 are available just does _not_ sound like a good idea.
Comment: You could orient the rings so that they're along the same joist, that way you can swing freely even one foot away from a joist; no need to do it meters away.
Answer: Provided you do find  joists and not mere ceiling laths, there are two main ways to provide extra strength.

Have a sturdy cross-brace that connects to a number of joists, not just one.

Have vertical supports either side of the rings.

In effect, if you have both of these, you will be building a floor-to-ceiling door-frame with the rings in between. This should be at right-angles to the joists.
Note that, with a little thought, you could make most of the frame removable when necessary.
Comment: I had this in my room when I was a child. The vertical supports were located not to the centre of the action, but rather directly in front of the walls. The horizontal support was a roof beam. It was attached to the ceiling, but not for structural support, but rather to keep the whole thing from falling over. The room had wooden wall strips so the additional wooden construction was integrated nicely, aesthetically speaking. This construction withstand many years of childish abuse including – but not limited to – climbing, swinging, jumping into a hammock. Can definitely recommend.
Comment: #2 would reduce the usefulness of the room for any other purpose.  I'd go with #1.  A quick google search had some instructions that use a hardwood brace across 3 joists.  (https://fitnesstestlab.com/hanging-gymnastic-rings/).
Comment: Might as well just get a power cage or something similar if you're going to stick vertical posts in the middle of the room.
Answer: What kind of swinging? Incidental swinging or purposeful swinging? I could be mistaken, but I don't know of any gymnastic ring exercise where you purposefully swing since I'm pretty sure that's considered bad form.
At 90kg, even if you aren't swinging I would get metal bar mounts intended for gymnastic rings and mount it such that it spreads the weight across multiple joints. And only on the basement joists which support the floor above. Maybe you would be better off buying a heavy power cage and mounting the rings on there, and bolt that to the floor since you're swinging.
I don't swing and am only 60kg. I use a metal mounting bar on my basement ceiling spread across two joists (was supposed to be three but the third bolt got overtorqued and broke in the joist) and even I would not be comfortable swinging.
Comment: working on getting a strict muscle up, but as of now I have to swing a bit.
Comment: @noobycoder So not purposeful swinging then. That's important to know because to people not familiar it might sound like you are literally using your momentum to swing back and forth for some reason. If you have your own house and already have other home gym equipment, I would honestly invest in a power cage. Power cages cost a lot but once you stack activities onto them they become worth it. It would help by also providing a rigid method to work with muscle ups too.
Answer: Why rings? Most ring exercises require some height, and in general you need the full height of your body including arms and toes above and below. Most people don't have 18' ceilings.
If you mostly want to do pull-ups and grip strength exercises, I suggest buying a climber's fingerboard instead. That will have varying grades of hold, at all kinds of distance between, to work on different muscle groups.
If you really want to do rings, the easiest solution is to move outdoors. If you have a 2-storey brick house, you could bolt two cantilevered hanging points securely to the wall. Otherwise consider a freestanding structure with posts set in concrete.
If you're indoors, as other answers have said, a single joist is not designed to take that much point force. The correct solution is usually to run two bars across the joists to spread the load, and attach your hanging points to the centres of those bars. You could likely use a civil engineer (not a builder!) to advise on this.
For permanently installed rigs like this, don't forget that there must be no single point of failure. The ropes to the rings should have thin steel backup lines; and the attachment point at the top should have backup lines to (ideally) two other locations to the side, not in a straight line. This is all pretty well standardized for how heavy loads are suspended. As good as your kit may be, the point is that anything could break (manufacturing defects happen, as do stresses and wear) and falling objects (you!) need to be prevented from falling all the way to the ground. I strongly suggest looking up how climbing walls set up their hang points, and how large stage shows hang loudspeakers and lights.


Visa to work in Germany for a short time (2 weeks)

Question: My company has its office in Germany and I will be travelling from India for 2 weeks related to work (not merely business meetings). What type of visa I should apply for working there?
Answer: Basicly you must apply for a shortime work visa.
It will depend on what type of work you will be doing

and if it will entail needing permission from the employment office

which your employer should determine before you make the application at the German Embassy or Consulate.
A summary letter, in German, preferably quoting the responce from the employment office, from your German employer will assist in making such an application less painful.
This is a case by case situation which is difficult for the Cousulate to determine by itself.


how to change my website name in sharepoint from one url to another

Question: How to change the URL of a sharepoint web site from http://testsite.org to http://testsite1.org.
Answer: Its Depend,

If it is the root level site collections as you mentioned(http://testsite.org), then simply you need to create the new DNS entry and point to WFE or Load balancer. Update the AAM settings, Update the IIS binidings if any.
If it is not root level site collection But Host Name Site collections then create new URL and use Set-SPSiteUrl command to set the new URL.
Lastly if it is path based non root site then, You have to take the backup of current site and restore it to new url.


What is this schematic symbol? A transformer?

Question: I found this schematic symbol I've never seen before. I think it's some type of transformer? Please let me know what it is.
Answer: It is a transformer, the loops indicate that the inductors are tied together magnetically, the numbers probably indicate wires or pins numbers on the transformer.
Comment: The ovals in the center of the symbol may indicate that this is a transformer wound on a toroidal core.
Comment: I don't think it's a standard symbol, though.
Answer: With My point of view, it's a transformer wound around a toroidal core and for the number 6 0 and 5 0, I guess it shows the numbers of turns.
Which means:
The top one has 6 turns, it might be on both sides I guess, but the starting point is from the down where 0 is written, then ends at the top where 6 is written.
Same for the second one , the only difference is the top one have six (6) turns, while the down has five(5) turns.


Corkscrew-like stable two-body system

Question: I recently created a celestial body simulation in python for one of my classes. While playing around with different values I obtained a weird two-body stable system.. For context, these bodies are only moving on the X-Y plane and have no velocity in the Z direction. They seem to rotate around each other while also moving upwards. On the right a figure of their y-position over time can be seen and on the left the x and y positions. Is this just a weird case of an elliptical orbit or something completely different?
Comment: You discovered the superposition of the orbital motion within the system with a linear motion of the whole system
Comment: Plot the motion of their barycenter.  You will almost certainly find that it is following a linear trajectory.
Answer: Without the original script we can only speculate, but almost certainly "While playing around with different values..." means your initial velocity vectors were not carefully calculated to sum to zero in the center of mass frame.
Therefore you had center of mass motion in addition to motion around the center of mass.
It doesn't mean anything. In Newtonian mechanics one frame is as good as another as long as neither is accelerating.
This is exactly what two body motion looks like if you flew past it, or it flew past you.
To zero it out, after you've chosen the two initial vectors, calculate the center of mass velocity vector and subtract it from both initial velocities before starting the simulation. If your calculation works right you'll get normal, planar, two-body orbital motion around their fixed center of mass.

For more Keplerian squiggles, see for example Does the earth spiral around the sun's movement/motion path? and it's linked video

and What do the green lines represent in this Lagrange Point animation? and its linked video

Corkscrew-like stable two-body system


Why doesn't higher frequency mean higher data rate?

Question: My question is very primitive :) I've read multiple articles today and answers here, on Stack Exchange, but still don't understand one thing. Why doesn't frequency itself affect data rate in mobile networks? 3G/4G networks use QAM modulation, that includes changes to amplitude and phase of signal. Let's say, we have 900 MHz signal with 10 MHz bandwidth and 2600 MHz signal with 10 MHz bandwidth. At the same "snippet" of incoming signal we'll have much more "cycles" to modulate on higher frequency (per same time), don't we? So why doesn't it matter?
Comment: @user1850479, When OP says, 900 MHz or 2600 MHz  "signal" with 10MHz "bandwidth," they're almost certainly talking about a radio transmission with a carrier frequency somewhere within a nominal 900 MHz band or a 2600 MHz band, and occupying a "channel" that is 10MHz wide.
Comment: Perhaps some reading on the basics of modulation will be useful... try reading up on AM modulation and analyze it in the time and frequency domains. That should paint a picture on why the answer to the question "At the same 'snippet' of incoming signal we'll have much more 'cycles' to modulate on higher frequency (per same time), don't we?" is "No, we don't." The key factor is bandwidth, not carrier frequency.
Comment: If both signals have a 10 MHz bandwidth, than both have 10 million cycles per second.
Comment: @Rob Don't they? ;)
Comment: @user1850479, OK, I guess I didn't understand what you meant by a channel "_having_ 10 million cycles per second." I would expect to talk about the number of digital _bits_ per second one could send through a 10MHz-wide channel, or maybe talk about the maximum analog frequency which could be imposed on it. That max modulation frequency might be significantly less than 10MHz depending on the modulation method.
Comment: Actually the reason is quite simple. How fast we modulate IS the bandwidth. To learn why that is, you need to learn Fourier Analysis. But simply put, when you modulate a Carrier Frequency by a signal (multiply in the time domain), you can view the same signal in Fourier transformed "Frequency Space". In Frequency Space, you spread (or convolve) the two signals together. The wider the signal the more you spread the carrier frequency when you modulate it.
Comment: For the same reason you don't talk faster on a phone operating at a higher frequency.
Comment: Can you link a source that says frequency doesn't impact datarate?
Comment: @Solomon Slow The OP is asking about 3G/4G networks, which are definitely radio-based.
Comment: Say you try to modulate that higher frequency signal a lot because it has so many more cycles. How will you keep your signal bandwidth from exceeding 10MHz? Only modulations that keep the signal in your allotted 10MHz piece of spectrum can be decoded because nothing else will be received.
Comment: The words don't come out of a female speaker's mouth faster just because her voice is higher than a male's.
Answer: It's not a bad question and shows quite a common misunderstanding of how Radio Frequency (RF) Systems work.
The 900MHz and 2600MHz signals are called Carrier Frequencies. The actual information is contained in the 10MHz bandwidth. The original signal is a baseband signal that extends up to 10MHz. This is used to modulate the carrier signal. The reason we do this is so that we can have several channels sharing the same medium.
When received by a radio, the signal is downconverted back to the baseband (up to 10MHz in this case). The reason we do this, instead of sampling the signal directly, is the RF electronics are very complicated and relatively expensive, while baseband electronics is not.
So to answer your question, when both signals are downconverted, they are both 10MHz wide signals, so will transfer data at that rate (probably greater for QAM due the symbol rate but that's another story).
Comment: There is a slight relation though: it is easier to get a wider block of bandwidth with consistent propagation properties and fewer interferers at a higher center frequency, so you can be reasonably sure that the 2 GHz bandwidth from 58 to 60 GHz are usable for wireless networking, while 0 to 2 GHz are not.
Answer: Because the bandwidth of the channel determines how rapidly the symbols on that channel can change, not the carrier frequency.  It is the bandwidth of the channel which determines how fast the channel "rings down" from a sudden change in phase or amplitude.
So your two 10MHz bandwidth channels can each sustain a symbol rate of no more than \$10 \cdot10^6\$ symbols per second, regardless of whether the carrier frequency is 0Hz or 1THz or anywhere in between.
Comment: @Fredled Nope.  Bandwidth and carrier frequency are two different things.  A 10MHz bandwidth signal on a 100MHz carrier can range from 95MHz to 105MHz, no more, no less.  A 10MHz bandwidth signal on a 1THz carrier can range from 999995MHz to 1000005Mhz -- no more, no less.
Comment: @Fredled: Note that if one were using old pre-heterodyne tuners, it would be hard to avoid having the bandwidth increase with the carrier frequency, but modern radios work by taking the incoming signal, rough filtering it, and subtracting a tuning oscillator's output frequency from all of the signals present in the rough-tuned source to yield an "intermediate" frequency which can be tuned with a fixed-frequency narrow bandwidth filter.  The bandwidth of the IF filter is unaffected by the carrier frequency.
Comment: @Fredled If you try to use the entire frequency as-is you will cause interference in other frequencies. This is OK if you are the only people on the planet using radio transmission (early Marconi days) but someone will complain to the regulators if you do this now. Bandwidth is indirectly a measure of how much of the frequency you can use before causing interference or how much you can extract real signal from your channel before it becomes too noisy (interference from other frequency channels)
Comment: But the higher the the carrier frequency, the higher the channel frequency can be. Because you can sample the same data in less time. What would be the point of higher carrier frequency then?
Comment: @Fredled: If two channels each had a bandwidth that was a fixed percentage of the carrier frequency, which may be how you're viewing things intuitively, then the channel with the higher carrier frequency could handle more data.  If the bandwidth is fixed, however, then the ratio of bandwidth to carrier frequency will drop as the carrier frequency, offsetting the aforementioned tendency.
Answer: By quick analogy (the other answers are sufficient in their detail):
If you own a hotel where all the rooms are the same size (bandwidth), it doesn't matter how high a floor (frequency) they're on--they all hold the same amount of stuff.  If you have some larger rooms (more bandwidth), they'll hold more stuff, whether they're on the 2nd floor or the 26th.
Answer: Consider Morse Code modulation applied to human audio as one of many possible examples.
With input
- . . .   - . . .   - . - .

First, 880 Hz carrier frequency:
biyip bi bi bi  biyip bi bi bi  biyip bi biyip bi

Next, 55 Hz carrier frequency:
gruur gr gr gr  gruur gr gr gr  gruur gr gruur gr

Comment: This is actually a cool and easy to grasp analogy, just needs further explanation. Finger speed is limited and no matter if they are beeps or gru's, finger speed is the same.
Answer: 10 MHz of bandwidth contains the same amount of information, regardless of whether it's centered at 900MHz or 2600MHz, or any other center frequency.
This is easy to show -- the center frequency of a signal can be shifted digitally or electronically without destroying it.  You can move the 2600MHz signal down to 900MHz, and it will have the same bandwidth.  Then you can move it back to 2600MHz and get exactly the original signal back, so obviously whatever information you can carry at one frequency, you can carry at the other.
By the the Nyquist-Shannon sampling theorem, we know that any < 10MHz signal at any center frequency can be reconstructed from samples taken at a 20MHz rate.
https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem
Answer: If one is using a single carrier to send information through an unshared, interference-free, communications medium, bandwidth will generally scale with carrier frequency.  If, however, one modulates a signal with a 901,500,000hz center frequency and sends it through a communications medium which, while free of unwanted frequency content in the range 901,490,000Hz to 901,510,000Hz, may have unpredictable amounts of frequency content below 901,490,000Hz and above 901,510,000Hz, then even if one demodulates the signal perfectly, the demodulated signal may have unpredictable amounts of noise at any or all frequencies above 10,000Hz(*).
If one used a perfect filter to remove from the demodulated signal all content above 9,999Hz, one could faithfully recover all frequency content below that frequency, but would of course lose any content one had transmitted at frequencies higher than that.  If one doesn't filter out everything above 10,000Hz, it might totally drown out everything else in one's signal.  The usable frequency range will depend upon the distance between the carrier frequency and the nearest unwanted frequency content.
(*) Techniques called single sideband modulation or quadrature amplitude modulation may be used, respectively,  to shield a channel from interference on one side (allowing one to use a carrier frequency which is off center toward that side, and thus further from the other side), or use a channel that is clear on both sides of the carrier frequency to send two signals, each of whose bandwidth would match the difference between the carrier and the nearest interference.  The general problem of interference, however, remains.
Answer: https://en.wikipedia.org/wiki/Noisy-channel_coding_theorem
First, all communication channels are noisy.
The maximum data rate depends on the signal/noise ratio and the bandwith. The particular frequencies of the band are of no importance.
Signal level depends on the transmitter power and the propagation conditions. Noise depends on the temperature and the presence of other transmitters.
Propagation conditions and thermal noise both DO depend on the frequency in more or less predictable manner, as well as the presence of other transmitters, but all of these factors  have only a second-order relation to your question. But yes, they are related.
The bandwidth is allocated by the regulator authority (when using a common media), some standard, media properties or other considerations when you control the media.
Answer: A higher bandwidth dictates higher data rate which we all know. Bandwidth refers to a frequency range and not just a single frequency. If your wireless system is operating say at 5.85 GHz to 5.95 GHz, a bandwidth of 100 MHz is available. Also, when your wireless operating system is operating at say 2.4 GHz to 2.45 GHz, the bandwidth available is 50 MHz. Thus, data rate is higher in the former case.
I mentioned the former band as ranging from 5.85 GHz to 5.95 GHz. Bandwidth is the difference between the highest frequency of the band and the lowest frequency of the band. If regulatory authorities allow us to expand the existing bandwidth to say 150 MHz, then our highest band frequency is now 6 GHz. Thus, bandwidth has risen and hence the data rate has also risen.
Whenever the highest frequency of the band is increased, the bandwidth increases.
Answer: In order to speed up the data rate
1)increase the bandwidth
2)increase the RF power
3)use data compression
4)use more effective modulation
...


Travelling to the USA, but want to stay longer than 3 months? is this possible? UK citizen

Question: I want to travel to the USA (I am UK Citizen) and I am only allowed 90 days.
Is it possible for me to stay longer - say 6 months to a year, and how?
Comment: Of course.  Obtain a B1/B2 visa and usually that allows a 6 months stay.
Comment: @Jlc the word *live* will get your visa request denied. You can visit for tourist purposes but if you show up at the border with a return ticket six months in the future prepare for some hard questions about how do you plan to afford your visit since you are not allowed to work.
Comment: To the USA? On scale of 1-10 what about 9 or so?
Comment: Related: http://travel.stackexchange.com/questions/61825/is-it-a-good-idea-to-mention-to-the-usa-immigration-officer-that-im-visiting-my.  It looks from that like US visa/immigration law is not particularly sympathetic to unmarried couples wanting to spend a lot of time together.
Comment: Thanks, but i cant find anywhere online thats says this is possible? is it possible to be denied a B1/B2?
Comment: It's possible to be denied just as it is possible to be denied an ESTA.  All you need to do is apply at the US Embassy or Consulate.
Comment: @chx how difficult is it to get a working visa?
Comment: @Karlson That's a good answer to the question.
Answer: The only way to stay in the US for more than 90 days is to obtain a B1/B2 visa, which will allow you to stay up to 6 months.
However in general the US is relatively strict regarding granting B1/B2 visas to people who are otherwise eligible to use the Visa Waiver Program (which allows for stays up to 90 days).  Generally they will be looking for a very good reason that you intend to stay for more than 90 days, and some level of guarantee that you will leave at the end of your stay.
Unfortunately visiting a girlfriend generally doesn't tick these boxes.  A 6 month stay also means that it's likely that you don't have a job to return to in the UK, and probably don't have a permanent UK residence to return to - if these are both true then your odds of having a visa approved are reduced even further.
The problem then becomes that if you do apply for a visa and it is rejected, you are no longer able to enter the US using the Visa Waiver Program - which means that you can't visit your girlfriend at all.
Nobody here can give you a definitive answer as nobody knows your exact situation or how the consulate staff will interpret that situation - but if it were me I would NOT be risking applying for a visa.
Comment: An internship would require at least a J1 visa, and whilst that may be possible it's a lot of effort to obtain both the internship and the visa.
Comment: @Jlc another option is a full-time course of study. I know someone who used that route to move in with her then-boyfriend, who was in the US for many years on a work visa.  Now they are married and are US citizens.
Comment: @Jlc (delayed reply because I was on vacation): There's always a chance that any visa application will be denied.  I don't know what the denial rates are for people in full-time courses of study, but I would guess that they are low.  If you are looking for a guaranteed way to live in the United States (with a partner or otherwise), you will not find it.  What's more, if you are looking for a guaranteed way to enter the United States for *any length of time,* you won't find that, either.
Comment: yeah this is what i thought. Thanks @Doc- Have i got any options?
Comment: What if i got a internship over there to do with my career?
Comment: and if the j1 visa was denied- would the same apply as regards to the ESTA?
Comment: Yes.  Any visa denial means no VWP
Comment: @phoog - if i did that is there  still a chance a visa in would be denied? which leaves me in the same situation?
Answer: Yes
You will need to obtain a B1/B2 visa (not an ESTA with the Visa Waiver Program) at the nearest US embassy or consulate.
That allows up to 6 months stay upon entry.


Concrete First or Asphalt First

Question: We have a long asphalt common (5 residents share it) road, 25' wide x 550' long, that terminates at a City road. The asphalt is old (30+ years) and in bad repair, so we want to replace it and add concrete gutter and a concrete apron where the common road meets the City road. So the old asphalt needs to be removed, the road graded, and then replaced and in the process add the concrete apron/gutter. Is it common practice to construct the paved road first and then the concrete apron/gutter, or vice versa?
Comment: Judging by what's being done by the county widening a road near me, it's roadway base and initial asphalt, then concrete edging, then fill in the few inches gap between the 'base' asphalt & concrete, then final asphalt topping layer(s).
Comment: Asphalt last. Although it can be done first, then trimmed out where the concrete goes, then new asphalt packed in the gap.
Comment: both are doable. these days it's likely going to depend more on scheduling the delivery of material more than pros/cons of either. Ideally the gutters go in first (well really the storm drains go in first)...
Comment: Concrete first seems to line up with comments I have received from contractors as well, to avoid having to rework the asphalt to form the concrete.
Answer: Not an expert (never done this myself, but seen it done), so if I turn out to be totally wrong I'll delete.
Concrete first
The asphalt will fill in edge to edge. With concrete apron and gutter first, that provides the edge (at least for some parts). With asphalt first, you would probably have to cut into it a bit and put in forms when pouring the concrete, and then backfill more asphalt after you are done.
Comment: I would have figure the other way if understanding right.  The concrete apron would be at the the roadway, and then would have heavy trucks driving over it for the asphalt.  Thought it might be better to do the concrete apron after.  This is if it roadway, then concrete apron/pad, then asphalt.

Concrete First or Asphalt First


Does it matter when you add the salt?

Question: Spices create aromatics so it is important when to add them. But what about salt? Is it critical if you add salt to the flavor base instead of adding it to the tomato paste, or adding it to the finished soup?
Comment: Hello Bar Akiva, I'm sorry I had to close a second question of yours on the same day. But this is a very clear duplicate, and the answers it is getting would also fit both questions equally.
Answer: Salt is very soluble in water, and during the cooking process will tend to diffuse within the liquids of the food and permeate inside. Having a salty flavor throughout the food I find tends to help curb salt usage. A good example is pasta, where if you add salt you can achieve a salty taste for the pasta and largely decrease salt you add at the table. My grandmother always said add the salt while you are cooking so you don't have to add twice as much later.
Answer: Salt is sometimes used to modify how moisture is drawn from aromatics while they are being sauteed, taking advantage of the fact that salt "wants" to be dissolved in water but is insoluble in oil, eg adding salt upfront to get onions to brown more quickly.
Answer: Salt adds flavor and causes chemical changes in food. The sooner you add salt more time salt has to penetrate the food and the longer the chemical changes have to work. Whether that's desirable or not depends on the effect you want. Here are a few examples:

When boiling potatoes if you add salt at the beginning of cooking the salt flavor will get through the potato, when you bite into it the center will be seasoned. If you add salt after cooking the inside of the potato will be bland and the outside salty. I always salt the water when I boil potatoes for this reason
When sauteing zucchini I add some salt at the beginning of the cooking process as salt will draw moisture out, changing the texture of the flesh in a good way and making it cook a bit faster
If you chop tomatoes and add salt to them they will shed a lot of moisture, which can sometimes be what you want

There are times when it doesn't really matter when you add the salt, for instance cooking pasta. You can add it 30 seconds before you take the pasta out and you won't tell any difference to taste or texture.
It's also important to remember not to oversalt at the beginning. You can put salt in but you can't take it out, so always put in less at the beginning than you think you need when making soups, stews, etc. Towards the end taste the food and add more salt if needed.

Does it matter when you add the salt?


Removing cloud cover on LandSat 8 imagery using ArcGIS for Desktop?

Question: How can I remove cloud cover on landsat8 imagery?
using ArcGis10.2
Comment: What do you mean by "remove" - show the true terrain under the cloud (thats impossible, as far as i know), or mask the cloud, so that your analysis will not try to analyze the cloud (thats what @Luke suggests using the QA band)
Answer: You will need to go back to your imagery provider and get imagery from an earlier (or later) date which is cloud free
Mapbox provides cloud free imagery but as it is merged from lots of different photo's you can't use it for analysis and I don't know how much it costs
https://www.mapbox.com/data-platform/
Answer: You can mask using the Landsat 8 QA Band.  To assist with extracting values from the QA bands, USGS provides LDOPE Tools.
Alternatively, you could try FMASK.


References on Launch Trajectories

Question: Are there any good texts/papers about computing trajectories from launch to LEO? Specifically discussing atmospheric effects, gravity turns, launch sties, etc. and numerical simulation. I've seen a lot on astrodynamics but not so much on actually launching the vehicle from the ground up.
Comment: Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
Answer: Most real rockets use a combination of two methods to guide their ascent. The first stage through the atmosphere uses "open-loop" mode, where it just steers according to a pitch program -- IE hit a pitch of 80deg 15s after launch, 70deg 30s after, etc. At first staging, the performance of the rocket changes radically. Also, at staging, most orbital launch vehicles are above the vast majority of the atmosphere and can continue steering without regard to keeping the pointy end into the wind. So, most rockets shift guidance programs as well as propulsion hardware at this point, using some "closed-loop" guidance mode. In this mode, a trajectory from the current position and velocity to the target position and velocity is continuously updated. Any errors in trajectory up to this point are considered, and the guidance program dynamically re-calculates its pitch program all the way to cutoff. It does this again and again (IE once every 2 seconds on Saturn or Shuttle) until it reaches the target orbit, steering out any errors. This kind of closed-loop guidance is needed to achieve any kind of orbit injection accuracy.
My favorite reference is "Explicit guidance equations for multistage boost trajectories" by Fred Teren. This doesn't cover all of the launch, instead focusing on second and third stage guidance. The reference problem was using an Atlas-Centaur to throw a Surveyor spacecraft onto an impact trajectory with the Moon. The algorithm covers from closed-loop guidance start after dropping the Atlas booster engines. It proceeds through dropping the Atlas sustainer, lighting the Centaur booster, and all the way to Centaur cutoff in a single burn targeting the lunar transfer trajectory. Notably it skips the parking-orbit phase.
While the algorithm is designed with this lunar trajectory in mind, it can be used to hit any altitude, horizontal speed, and vertical speed at burnout (providing the launch vehicle can actually achieve it). I have used it successfully to write an autopilot for a simulated Space Shuttle launch, which ends at low Earth orbit.
Another one from NTRS which is on my electronic shelf but I haven't actually read is "Guidance, Flight Mechanics, and Trajectory Optimization Volume 8 - Boost Guidance Equations"
"Spacecraft Navigation and Guidance" by Maxwell Noton includes a section
on the launch phase, including gravity turn, drag, etc. I somehow got a PDF of this book, but I don't remember where. I originally used a hardcopy from my university library. If I recall, it wasn't super-useful because it wasn't closed-loop. You aimed it by firing with some particular tilt parameters, seeing where you ended up, then adjusting the tilt parameters and firing again and again until the trajectory hit the target orbit. Having said that, I think that's how real rockets are aimed. On the day of launch but before launch, the launch team runs a bunch of simulations using the currently observed wind and weather. Once the team finds a solution which safely gets the first stage through the atmosphere, it uploads that program to the launch vehicle which flies it on blind faith. Once the first-stage ends, the rocket uses its upper-stage guidance to hit the orbital target.
Some other useful search terms are "pitch program", "linear tangent guidance", and "iterative guidance mode" (the name of the algorithm that the Saturn V used in-flight).
Answer: Try:
"Introduction To Space Dynamics" by William Tyrrell Thomson
and
"Orbital Mechanics for Engineering Students" by Howard D. Curtis
I did search a while back for a good article on how to optimize a gravity turn, but I just didn't find anything that I found to be particularly earth-shattering (pardon the pun). In the end I just implemented my own iterative optimization approach.
But if you want to continue the literature search, it might help to include terms like "roll program" and "tilt maneuver".

References on Launch Trajectories


Membership Payment

Question: I am looking into using CiviCRM for my organization, which matches babysitters and pet-sitters to healthcare workers. I noticed that members must pay to use CiviCRM. I am wondering whether our clients (healthcare workers) would need to sign up and pay for a membership if we were use to use CiviCRM for our organization. Thanks!
Answer: You can use CiviCRM without using the Membership module at all, or you can add free Memberships.
That said, I may be mis-reading your comment. CiviCRM is free open source software, so there is no 'you must pay to use civicrm' but there are often costs associated with 'freedom' namely hosting, specialist configuration, etc but there is no 'user fee' per se for CiviCRM. Sorry if i am misunderstanding.

Membership Payment


Rails - Rake error: Library not loaded

Question: I have read just about every post regarding rails errors looking for the solution to my issues and while I have resolved some, I come up with more.  I upgraded to Snow Leopard and installed RVM and Rails according to the Agile Development with Rails book.  However once I create my app folders and do RAKE, I get this error and I just can not figure out how to fix it. I've tried re-installing everything several times to no avail.  Is this an architecture problem? or do I need to find a library and load it? how do I do that?
rake aborted!
dlopen(/opt/local/lib/ruby/1.8/i686-darwin9/digest/sha1.bundle, 9): Library not loaded: /opt/local/lib/libcrypto.1.0.0.dylib
Referenced from: /opt/local/lib/ruby/1.8/i686-darwin9/digest/sha1.bundle
Reason: no suitable image found.  Did find:
/opt/local/lib/libcrypto.1.0.0.dylib: mach-o, but wrong architecture - /opt/local/lib/ruby/1.8/i686-darwin9/digest/sha1.bundle

(See full trace by running task with --trace)

Answer: There was probably a change in your system. You might have moved or deleted some files or folders, which were needed by ruby.
rvm reinstall ree

Or spyle's answer is basically correct, but ewww macports. go go Homebrew!
Answer: I had this problem with ruby 1.8.7/passenger/apache stack. Reinstalling ruby (via macports) and rebuilding it against the openssl library fixed this for me.

Rails - Rake error: Library not loaded


Google Scholar: how to exclude some countries from the search?

Question: I use the google scholar alert system which sends me new studies made on a specific saved search. I'm looking for a way to exclude research conducted in some countries (or to only include some countries).
Comment: Based upon which criterion? If at least one author is affiliated with an institution in one of your blacklisted countries? Or all of them? ...?
Comment: This is a very vague question, I would even say off-topic here, as it is more related to a search engine configuration than academia. Further, note that my advice is based on the Google search engine, not Google Scholar in particular. Nonetheless, the best suggestion I can come up with is to use "-" in your query. Google tries to exclude keywords which are preceded by "-" from the results. I can't know if that would suit your criteria of filtering (it is rather shaky, as @O.R.Mapper rightly noted), but you can try something like "fourier transform -france -spain" and see if that helps you.
Comment: @O.R.Mapper Are you talking about moral criterion or ethic one or technical one? Because if your talking about technical one, all the necessary info are written on my question. The technical criterion of the filter is  "country", what else did I forget?
Comment: @GuillaumeCombot I think the under-specification comes from not knowing how you define *research conducted in some countr[y]*. Many papers have co-authors from multiple institutions in multiple countries; at what point is the research *conducted* in a given country? If the first-author is there? The majority of authors? Any author? &c.
Comment: @GuillaumeCombot Yes, agreed, many do. But which cases do you want to exclude from your search? The answers given so far assume you want to exclude papers where *any* author is from a given country. Is that a correct interpretation of your question? Can you edit the question to more explicitly and precisely state the conditions you want your literature search to match? This will improve the question both because: a) all users can better determine whether the answers match your question well or not; and b) other users can determine more easily if your question matches a question that they have.
Comment: Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/32848/discussion-between-schester-and-guillaume-combot).
Answer: I do not suspect there is direct support for this in Google Scholar. (One must wonder if this is really a good filter to apply to one's literature search.) However, I have surprisingly good success testing the idea of prefixing -country to a search query to exclude results with the keyword country.
As an example, if I try author:[me] -denmark only two of the papers I wrote while affiliated to my former Danish institution appear, and in both cases I had never indicated on the paper the country of my institution.
This may work reasonably well, because most authors indicate on the first page of the paper the address (including the country) of their affiliated institution. However, you will also get a lot of false positives (as in the two cases I mentioned above), and a lot of false negatives (as you exclude papers that use country as an example in the text or that were published at a conference that was held in country or where only one of many authors was from an institution in country.)
But often when a tool does not support a specific functionality that one wants, it is worth wondering whether it really should or if maybe the search filter that you want to apply is only very loosely correlated with what you want to exclude.
Edit: This is precisely the technique that @user3209815 simultaneously suggests in her/his comment.
Answer: Try combining the - operator with the site: operator with the domain suffix for the country or countries in question. So e.g.

basketweaving -site:.fr -site:.uk

searches for basketweaving, but not in France or the UK. If site: works in Google Scholar, this should be more effective than trying the (English!) name of the country.
Comment: I presume this will filter based on the website where the paper is posted, which may not have anything to do with where the research was conducted.