Can I divide a 300 ml liquid bottle into three smaller bottles?

Question: On Domestic Flights in the US, travelers can take a few 100 ml liquid bottles? Can those bottles have the same liquid?
Comment: related: http://travel.stackexchange.com/q/4397/46
Comment: Why not? Why would difference or identity matter?
Answer: Yes.  You can read the TSA's liquids rule.  Bottles must each be 100 ml or smaller, but I don't know of any rule against having more than one bottle of the same substance.
All your bottles have to fit in a standard one-quart plastic bag.  Three 100 ml bottles should fit in that space, but you may not have a lot of space left for other liquids.
Answer: I believe the intent of the rule has less to do with the liquids themselves and more to do with the potential threat of a large quantity of explosive materials. The assumption is that 100 ml of a liquid or low-viscosity explosive substance is not capable of causing enough damage to take down a commercial airliner. Therefore, as long as the container volume is 100 ml or less, they don't really care what you put inside them... as long as it's not an illegal substance.
Comment: Then, of course, you can take up to ten of those, and they also allow you to take empty bigger containers. So you can easily pass 1 liter of the explosive material. Combine several passengers that get together before boarding, and a single passenger can board with many liters of any liquid, within the rules. Most senseless rule ever.
Comment: @MartinArgerami the empty containers loophole is not particularly problematic as it should be impossible to acquire explosive liquids in the secure area of the airport.
Comment: @phoog who says you can't pass the explosive liquid through security inside of ten 100 ml bottles? You didn't really address MartinArgerami's point. And Martin, I can't really say much on your point without going into a diatribe about the idiocy of government. Rules (Laws) don't really have to be sensical when they're enforced at the point of a gun.
Answer: YES, you definitely can...

READ MORE at the following TSA.gov web page for the TSA "Liquids Rule":  https://www.tsa.gov/travel/security-screening/liquids-rule

EXCEPTIONS:
<code>**Domestic US Flights and Outbound International Flights departing the USA:**

 - medications (does NOT indicate prescription only)

 - baby nourishment (baby food/milk/Similac, etc.)
</code>
Inbound International Flights:
You may carry duty free liquids in secure, tamper–evident bags, more than 3.4 oz or 100 ml in your carry-on bag if:

The duty free liquids were purchased internationally and you are travelling to the United States with a connecting flight.

The liquids are packed in a transparent, secure, tamper-evident bag by the retailer and do not show signs of tampering when presented to TSA for screening.

The original receipt for the liquids is present and the purchase was made within 48 hours.

Liquids more than 3.4 oz or 100 ml [and] not [placed/packaged] in a secure, tamper-evident bag must be packed in checked baggage.
Comment: Except the URL you've pointed to doesn't say ANYTHING about whether the bottles can contain the same product, which is the question that was actually asked.


Sound energy transformation

Question: What does sound energy transforms into? Energy can neither be created nor be destroyed. So what does sound energy change into?
Answer: Sound is just pressure waves propagating back and forth, so kinetic energy, when it gets absorbed by an object it just jiggles its constituent particles, so basically it stays kinetic energy; macroscopically you could say it turns into thermal energy since the thermal energy of an object is the total kinetic energy of its constituent atoms/molecules.

Sound energy transformation


Is .NET a Framework Or Library?

Question: I am getting confused here. I am watch an educational tutorial. The speaker defined .Net as Library not dare to say as framework. As far as I know .Net is a Framework. Is there anyone who can explain, if .Net is framework or a library.
Thanks
After the answer,
But the way the speaker define a Framework as follows
1. At least a portion of the application should run ( which he say semi complete application)
2. It should support inversion of control.
Can anyone explain this ?
Thanks again.
Comment: The answer to your question is: Yes.
Comment: I'm a bit curious who this speak is.
Comment: Martin Fowler seems to equate framework to IoC: http://martinfowler.com/bliki/InversionOfControl.html
Answer: .NET is a framework consisting of the BCL (base class libraries), the CLR (common language runtime), etc...
Comment: Yep. It *has* a library, but the library is called the BCL. .NET as a whole is bigger than just the library.
Comment: I look the answer. I posted additional qn.
Answer: See http://en.wikipedia.org/wiki/Software_framework for a definition of a framework.

inversion of control - the program flow for the WinForms and WPF libraries are dictated by those libraries, not the caller.
default behavior - the default behaviour of e.g. a WinForms Window is to show a basic, interacting window.
extensibility - the user can override and specialize functionality of the various .NET classes.
non-modifiable framework code - Microsoft will not be happy if you modified any of the .NET code.

Therefore, .NET is a framework.
Answer: It is a framework consisting of a number of binaries libraries (the DLLs) and the CLR.
Follow up to the 2nd part of the question:
The .NET Framework provides a number of binary libraries (the DLLs) that provide much of the basic functionality shared between all applications written in a .NET language (C#, F#, J#, VB.NET, etc).
You application, upon compilation, is translated into CLR instructions (MSIL) that are executed by the .NET Framework along side the libraries that are provided to you.
Answer: It's certainly at least a framework (languages, runtime, libraries) rather than just a library but I would suggest that it is actually the successor of a philosophical model of programming which internalizes a rich history of Microsoft's (and other similar-of-breed) approaches to application development. There is a particular depth of insight in this model which is unrivaled in the scale of its popularity and adoption. .NET is the successor in a long line of critically strategic developer initiatives within the Microsoft ecosystem. To ascribe it as merely a framework would be to miss the point entirely. To call it a library is simply clueless.
Answer: It's a framework.
A library is usually a collection of classes intended for a specific purpose, like the System.Net library in .NET that is intended for internet communication.
A framework is a set of classes (or a collection of libraries) that covers pretty much everything you need to make an application, and the application runs in the framework without any direct contact to the underlying system or hardware.
Answer: My simple definition of the terms is this:

A library is a collection of functions.
A framework is a way of life.

With a library you can use whatever pieces of it you want; With a framework, you have to commit to architecting our program their way.
So, .NET can be just a library (when used in console app, windows services etc), and can be a framework (when used in ASP.NET or WinForms)
Answer: One difference to my mind is that one is meant to create classes which derive from the classes in a framework. That's a bit different even from a class library. The framework is meant to be more in control of the basic operations, while you extend the framework to meet your needs.
Answer: .NET is fundamentally a framework/foundation/building blocks that consists of code library API besides among other important technologies.
Answer: .NET is a Framework by Microsoft. Just like a car given to you with the frame and you need to choose your suiting transmission, engine, muffler, autocop system etc., the car frame here is .NET and you have the freedom to place your piece of code to increase performance, SQL engine connectivities, communication paths, security etc.
The job of framework is to reduce time spent on building applications. The only way to reduce time cost by providing library files. This is the reason why some people say .NET is a library. More than a library, .NET provide more functionality, more to the programmers. .NET provides CLR (common language runtime) and CTS (common type system) which brings all languages together for development that you can use a library written using language a by language b in .NET.
Check these links: 1 ,2.
Comment: the good book to study .net using c# is
professional c# 2008 by Wrox publication

Is .NET a Framework Or Library?


Can we do a better job welcoming users rather than driving them away with legalism?

Question: The title pretty much says it all. As a proper question, though, what steps can we take to ensure that people unfamiliar with StackExchange aren't immediately downvoted to oblivion and talked condescendingly to? It would be useful if we could prevent people from driving off those knowledgeable about Latin but not familiar with the StackExchange format.
Comment: @QPaysTaxes, I think balancing between the two is easier for a small site. We are not overrun by posts from users who don't know how to use the site. We can afford to let all new posts live for a while and try to instruct new users instead of focusing on their unintentional mistakes.
Comment: I think we need to decide if it's more important to maintain a site that conforms to Stack Exchange's policies, or to attract every single user possible. I think we can strike a nice balance between the two by, when a user breaks the policies, informing them, and hopefully they'll correct their mistakes.
Comment: @JoonasIlmavirta And there are plenty of ways to do that, like, for example, commenting when someone who's knew, probably experienced in Latin, and could be useful to the site has done something wrong. You could also edit the answer for them to paste in what you think is relevant, then leave a comment asking them to change if it you got it wrong and why you edited. There are plenty of ways to do it without circumventing the things Stack Exchange has built in to weed out bad posts.
Comment: @QPaysTaxes, agreed. I do think one has to be a little careful about editing, though, as some experts may feel that others are stepping on their toes if their posts are edited. But if it is done in good spirit and a comment is left to describe the situation, there is little threat.
Comment: @JoonasIlmavirta Definitely! But that's why it's just an option, not "this is what you do 100% of the time" -- if, for example, they've said "Look at this link, under the heading 'bleep bloop'", then copy/pasting the 'bleep bloop' section would probably be fine. If it just says "There're some nice things at this link", only a comment would be better.
Comment: @C.M.Weimer, I think we should not focus too much here on any individual incident. I think this discussion is more fruitful at a general level.
Answer: I believe we can do a better job at this.
This site needs to build more momentum to become viable.
To that end, we need to attract new users and make sufficiently many of them stay.
There are many excellent Latinists out there that I would like to see joining our ranks, but few of them have prior knowledge of the site.
New users should of course learn to use the site properly, but they must be given time and support to do so.
The site is not as simple to use as an SE veteran might think.
Another important thing to notice is that we are not being hit by a wave of difficult new users.
I have seen no trolls here.
We have few new users coming in every day, and we do by all means have the resources to say a warm welcome to everyone.
This is not the case on some big SE sites.
We can afford to be flexible.
Also, we are only just building our community and its standards.
New users are welcome to take part in steering this site to a new direction.
Some standards come from the SE framework, but not all.
If a user does something wrong, we can tell them how to do things right instead of underlining that something wrong has happened.
There can of course be new users who post very low quality questions and answers, and we should not accept everything.
If a new users posts something that needs improvement, I kindly ask the more experienced users to refrain from downvoting and to leave a comment that describes how the post could be improved to reach its full potential.
If the new user refuses to collaborate even though helpful advice has been given, then downvoting might be in place, but please give time to react.
A downvote can feel very hostile to a new user and they might not realize that the vote can be revoked once the post is edited.
As a side note, I felt that my initial welcoming to the StackExchange network was more harsh than necessary.
(I do not blame any individual for this, but a certain overall harsh way of accepting new users.)
I did seriously consider leaving the network alone, but I decided to stay.
If I had walked away, I would never have found my way to Latin.SE.
Comment: @QPaysTaxes, a closed question gives the message "Edit to improve and it shall be reopened". A deleted answer does not. The difference is big especially in the eyes of a new user. But you are right, the two measures are similar in spirit.
Comment: As a side note, I didn't downvote that post. I've always been under the impression that deletion is to answers what closing is to questions -- a temporary measure that's only permanent if the post is unsalvageable. If that's wrong, please feel free to correct me.
Answer: Joonas's answer is spot-on.  Let me suggest a few practical considerations:

The votes and comments that a new user's post receives in large part are going to define his perception of the site's culture.  Therefore:

Disagreements related to moderation and site policy should not be aired in the comments of a new user's post.  Of course, discussion of the actual content of the post is fine, but site-related arguments inform the new user's perception, even if the negativity is not directed at him. Questioning or challenging the actions of other established users is often fine, but if it relates to a new user's post it should take place in chat or in a new meta post instead.
Comments should be uniformly welcoming and helpful.  There's nothing wrong with suggesting improvements that would bring the answer in line with SE standards, but this can be done while maintaining a welcoming tone.
Welcoming comments could point to meta pages that go into more detail about our expectations.  A meta post like "What does a good answer look like?" could be referenced.

Deletion, especially right now, seems permanent to new users.  So consider:

Flags immediately ask established users to make a decision to delete or not, even though they may wish to provide more time to the new user.  So, before flagging the answer as low quality or not an answer, consider first taking action to bring the answer into line with site standards and explaining to the new user why that action was taken.
Moderators can undelete posts.  Once we have our own moderators, they will do most of the actual deletions, and when they do so in cases like this, they should comment, saying, "We encourage you to edit your post to bring it in line with site guidelines, and once you do, please flag it so that I or another moderator can undelete it for you."

And finally, remember: some people simply won't like SE's rules.  They might prefer to contribute in a more relaxed environment like Reddit or a discussion forum, and there's nothing wrong with that.  In such cases we'll simply need to agree to disagree and go our separate ways, but we should do our best to make sure that new users go elsewhere only because they prefer a different format, not because we failed to welcome them.
Comment: This answer is fine, but the word "disagreements" may be a bit confusing: if one reads just the text in bold, it may suggest that any kind of disagreement is "negative", e.g. disagreement about the correct Proto-Indo-European root of a certain word. It only becomes clear that this is not what you mean when one reads on.
Comment: Ah, I see what all this was about now.
Comment: @Cerberus Thanks!  I hoped that this would be helpful to those unaware of the situation that inspired it, so your comment is very helpful.  See if my update makes more sense.
Comment: Very good, it is 100% clear now!


Correct site for SaaS tools

Question: I'm going to be stringing a bunch of cloud SaaS tools together (is that redundant?) to create an automation solution, and will have a bunch of questions. Is the correct site Stack Overflow? Or Super User? or is there a special one for SaaS (I couldn't find one...)
Answer: It is possible to ask SaaS questions on a few of our sites. Stack Overflow is for programming.
Super User only has 8 questions. Webmasters has 13, but Server Fault has 63; so there's a bigger audience there, if your question is on-topic for the site.

Correct site for SaaS tools


Mac iBookG4--MsWord and Safari Error

Question: I have mac ibook G4.
Ms office (word) gives me error when I start the program and doesn't open. Also Safari closes unexpectedly while I am browsing.
I created another user account. I did follow MS troubleshooting steps. But it's still the same issue. In safe-mode/boot Microsoft-Word working properly.
What should I do? Thanks.
Answer: So, you're using; at the latest OS X 10.4 right? honestly, I'd do a complete reinstall of both your OS and your apps, because the amount of cruft is probably off the charts.
btw the fact that safe boot fixes it, means that it's an issue with a cache somewhere, good luck finding it man.

Mac iBookG4--MsWord and Safari Error


What happens when we turn pages with wet fingers

Question: Most of the people touch their tongues with fingers and then turn pages. Why do pages don't turn sometimes with dry hands? And what happens when we turn them with wet hands?
If water decreases the friction between pages, why do wet pages stick together?
Comment: Adhesion versus cohesion
Answer: The direct answer is that when a wet hand is used to turn pages, the adhesive force comes into picture. When the hand is wet, there exist adhesive force (attraction between unlike molecules) between water molecules and hand, as well as water molecules and paper. What makes water molecules stay together is the cohesive force (which is the surface tension) which adds up the easiness to turn paper. If hand alone is used, the adhesion is weaker.


Why does the Italian word for comedy, "commedia", have a double 'm'?

Question: Why does the Italian word for comedy, "commedia", have a double 'm'? It comes from Latin "comoedia", with a single 'm'.
Answer: The prefix com- is fairly common in Latin—but specifically before a labial consonant, not before a vowel. (Before a vowel it becomes co- instead, as in coalescō.) As a result, comm- is much more common than com-.
So I assume it gained a second m under the influence of terms like commozione and commenda, which come from com- attached to a root starting with M.
Comment: cf. Wiese 1904 *Altitalienisches Elementarbuch*, who also explains it with analogy but from the cases with ad-, con-, in- and sub-, "Durch Einfluß der unter 2. besprochenen Assimilationen bei Worten, die mit a-, co-, i- beginnen: *ammen, commedia, immagine*; hierher gehört auch *ommettere* durch Einfluß von *commettere*." (pp. 60-61) https://archive.org/details/altitalienisches00wiesuoft/page/60/mode/2up


How do I connect this saw's motor to 240 volts?

Question: I finally found a motor for an old DeWalt radial arm saw but I don't understand the diagrams on the motor plate. I want to run it at 240 volts but without terminals I'm not sure about which wires go to my hot leads.
Comment: Well, the "WHITE/LINE" wire on each diagram is one of the inputs (presumably neutral since "white"). Is there a black wire that doesn't appear on the diagram? If so then the black is probably the hot input.
Comment: I have the exact same DeWalt radial arm saw. It's 55 years old and belonged to my Dad. I am looking to rewire for 220v to hopefully get better performance when ripping. Did you get yours running fully? I understand the diagram on the plate, but for the 3 leads coming from the 220 plug, what did you connect each to? Thanks
Ed
Comment: Could you post a picture where we can understand wich wires are connected to wich wire-nuts? It will help troubleshoot.
Answer: Looking at the first photo, under the label "208-240" the "white line" is the in coming white wire from the power. It shows that it is connected to the white wire from the motor. The "blue insulate" means the blue wire is not being used and should be capped and taped. Although it doesn't designate how the "black" wire from the power is connected I would say that since it is a capacitor run-type motor that the black is wired to the capacitor. If not it would go to the "reset" switch. Look to see how the black wire  is connected presently and keep it as is.
Comment: In a 240 volt circuit, white is not neutral. If it's 120V, or 120/240V then white is probably neutral. In a straight 240V circuit, there's no neutral.
Comment: Interesting, the drawing doesn't show where the "black" or other ungrounded conductor is attached. I don't think he has a "presently" situation I think he has a very old surplus motor he wants to connect. But hopefully there is a terminal in the connection box where it is evident where the black wire connects.
Comment: the black wire does hook to the reset switch. i,ve managed to get it to run but the big relay cuts out after about 30 seconds. and when it is running it's not very fastas if its only running on 110v instead of 220. my 220 cord coming in has three wires ,red, black, and white,with my red and black being the hot leads. so i guess im asking if the red wire from my power cord should be hooked to the white lead in the mootor? and thank you for the response so far.
Comment: Check the receptacle for correct voltage. Also the capacitor may be faulty and needs to be replaced.
Comment: Robert-You need to be sure the receptacle is supplying 220 Volts. A Digital Voltage Meter will tell you this. As for the power whip (cord) that supplies the 220 voltage, its wiring is dependent on the wall receptacle and how the female plugs are oriented.  If you post photos of the receptacle wiring and your cord plug would help a lot.


How do I see more rivals' best time in Super Mario 3D Land?

Question: I notice that in each level my time is being compared to a rival. I want to know who my rivals are, and if I'm the fastest one in the world in completing that level. Is that possible?
Comment: Hmmmm - I haven't noticed this in the game.  Does it happen for StreetPass friends or only friend-listed friends?
Comment: I think those avatars are my StreetPass friends. I also only got this after finishing the game and the Bonus worlds I think.
Answer: From what I know it will only show the face of the rival for that particular level. the game itself does not have any official place to track world wide records.
even though you can see from the numbers the one that has the best time is in gold and is shown first when you stand on that level spot on the overworld map.
I looked around for any record keeping on websites and TMK seems to have one which also requires proof of accomplishment. http://www.themushroomkingdom.net/records/sm3dl
there is also others but they are more like forum threads and don't require proof so they aren't as reliable.


Replicate DB2 table to SQL Server 2008

Question: I need to replicate data from a DB2 database into a SQL Server Database (along the lines of about 80 tables). I can create an SSIS package, to just flat copy the data from one to another pretty easy, but the amount of records is a couple million, so doing it once takes a while, but for the initial setup its fine. However, I need to do "almost" real-time updates, so this method won't be viable. What would be the best method, and how, to do just add change and delete replication from DB2 to SQL Server?
Comment: could you create a linked server and then schedule a job to run at a given interval to insert the data?
Comment: Im sure I could, I have create a linked server on SQL to the DB2, but with that many records how do I accomplish just the Add, Change, Deletes? What would the job look like?
Comment: I know very little about DB2, but from looking at the documentation, it appears to support some form of replication to non-DB2 systems. http://pic.dhe.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.swg.im.iis.db.repl.sqlrepl.doc/topics/iiyrscfgsvrsoverview.html
Answer: You could create a hidden timestamp column in DB2 on the replicated tables. When you run the replication job you can pull just the data that has changed since the last replication.  This would lower the quantity of data sent.
For instance, run the SSIS package every minute pulling just the last minutes worth of data.
Or, instead of a timestamp field, you could use an auto incrementing int and keep a small table on the replicated instance that records the last int value replicated. The replication process would grab any new records, and update the small table's value to reflect the last value replicated.
Answer: If you have adequate logging on the DB2 side, you should be able to easily identify records have been created, modified, or deleted since your last near-real time update.  But if it was that easy, you wouldn't need Stack Exchange.
Failing the above-mentioned logging, your fastest option is probably a MERGE command.  Across the link, this could be slow; if so, consider bulk-copying the DB2 database into a staging table on the SQL database and then running the MERGE between that and the permanent table locally on the SQL server.  It will still take a while to populate the staging table, but the update of the live table will be about as quick as it's likely to get without schema changes.
If there's too much data to copy it all every five minutes (or whatever your near-real time schedule calls for), you may have no choice but to start logging events on the DB2 side, with triggers probably.
An alternative approach would be to examine a slice of records on each update.  At 5:20 you copy from DB2 to SQL all records ending in zero (ID % 10 = 0), and merge them into the main table.  At 5:25 you copy and merge all records with an ID ending in one.  This obviously assumes that you have some kind of synthetic key which is fairly uniformly distributed.  Your data will not all be current all the time, but it will be mostly current most of the time.  For best currency, make the slices as thick as possible while staying within your time window; dividing by ten is just an example.  You could expand on this approach by partitioning the table, if desired.

Replicate DB2 table to SQL Server 2008


Can a landlord charge an addendum fee to add/drop a name on an existing lease

Question: Can a landlord charge an addendum fee of $250 to add/drop a name on an existing lease in Washington State, USA?
Answer: You are negotiating a change to an existing contract - it can be concluded on any terms the parties agree. If the landlords terms are a fee of $250 then the tenants can agree and proceed or not agree and not proceed.
Comment: Landlord-tenant/tenancy law often goes above and beyond the usual contract law, and often restricts what may or may not be a term or a consideration for those contracts, especially when they involve fees mandated by the landlord. A bit of reference to relevant reasonableness tests or fees permitted/forbidden would actually answer the question. As it is, this is just Contracts 101.


Eating before prayers

Question: As it is known that one is not allowed to eat before morning prayers,  is there any opinion that allows to eat after birkot hashakhar but before tefillah?
Comment: Chabad eats mezonos before Tefillah, though they use the time between Birchos Hashachar and Tefillah to learn Chassidus.
Comment: You can wake up really early and eat before dawn
Answer: Shulchan Aruch 89:4:
"One who is thirsty and one who is hungry - behold they are in the category of the ill. If one has the ability to focus one's mind, one should pray. If not, if one wishes, one should not pray until eating or drinking."
Rambam's Mishneh Torah, Prayer 5:2:
"...if he can concentrate, he recites the prayer; if not, he should not pray until he has eaten and drunk."
From the above it appears that if one is very hungry he must eat before praying according to the Rambam. Beit Yosef 89:7 takes it down a notch and says that eating is optional and subject to one's discretion - "הרשות בידן." Mishnah Berurah 89:26 agrees with this conclusion even in light of the fact that today we are not able to concentrate during prayer even when not hungry.
Comment: Good point. However the question was specifically about after Birchas Hashachar. That is indeed mentioned in 89:3 in the Rema concerning doing work and other needs, not eating. Although the Biur Halacha mentions that it's better to say Shema first before eating as well. Since the Rema mentions it as being a better than nothing (better to be machmir) perhaps it can be stretched to include eating as well thereby making it better to say brachos first before eating
Answer: R' Dovid Chai HaKohen states on yeshiva.org.il:

אם אין ברירה אחרת ולא תוכל להתפלל ולקרוא קריאת שמע לפני העבודה - אפשר להקל ולאכול עוגה קטנה ולשתות איתה כוס קפה או תה חם, אחרי ברכות השחר
If you have no other choice and can not pray and recite Shema before work - one can be lenient and eat a small cake and drink a cup of coffee or hot tea after the morning blessings
Comment: He is likely referring to situations in the beginning of winter where the time for recitation of Shema is after some people have to start to work
Comment: @mbloch right- it's a brief answer and doesn't refer to any sources so could perhaps assume that, however the date posted along with the question is "כ"ה אייר תש"ע" (ie April-June range). But that could just mean that's when it was posted, not when it was asked- hard to determine either way
Comment: i recall that there is indeed an explicit source for this in shulchan aruch,  sorry that i just cant spend time on this at the moment.  but, as i recall it shouldn't be hard to find.

Eating before prayers


Define catchment boundaries with GIS using R

Question: Using a DEM, I want to define catchment boundaries for a given location on a river. Basically, what area drains into this point. In ArcMap, I can do that with flowacc and other tools; but I'd like to do that in R.
I know how to import a DEM raster in R but that's about it.
Answer: You can do that by using the GRASS package for R: rgrass7
The procedure is decribed in the r.water.outlet man page (link)
Answer: To complete @Marco's answer, watershed can be done in GRASS through RQGIS3 or done in RSAGA.  Of course, you need QGIS, GRASS and SAGA installed on your computer.
Here is an example.  The DEM comes from :  http://ftp.geogratis.gc.ca/pub/nrcan_rncan/elevation/cdem_mnec/021/
GRASS (through RQGIS3)
library(gdalUtils)
library(RQGIS3)
library(here)
set_env("C:/OSGeo4W64")
qgis_session_info()

gdal_translate(here("data", "cdem_dem_021M.tif"),
               here("temp_files", "dem_temp.tif"),
               projwin = c(-71.2, 47.5, -70.5, 47))
#get_usage(alg = "grass7:r.watershed")
run_qgis(alg = "grass7:r.watershed",
         elevation = here("temp_files", "dem_temp.tif"),
         threshold = 5000,
         drainage = here("temp_files/drain.tif"))
#get_usage(alg = "grass7:r.water.outlet")
bassin_grass <- run_qgis(alg = "grass7:r.water.outlet",
                         input = here("temp_files/drain.tif"),
                         output = here("temp_files/bassin_grass.tif"),
                         coordinates="-70.8837037458,47.0692354224",
                         load_output = TRUE)

produces:

SAGA (through RSAGA)
If you're not satisfied with GRASS, do:
library(RSAGA)
rsaga.fill.sinks(in.dem = here("temp_files", "dem_temp.tif"),
                 out.dem = here("temp_files", "no.sink.sgrd"),
                 out.wshed = here("temp_files", "bassin_saga.sgrd"),
                 method = "wang.liu.2006")
bassin_saga <- raster(here("temp_files", "bassin_saga.sdat"))
bassin_saga[bassin_saga!=1307] <- NA

which produces:


Absolute Magnitude and Absolute Bolometric Magnitude

Question: What is the difference between Absolute Magnitude and Absolute Bolometric Magnitude, is it a case of multiply one by a constant to get the other?  Can you give an example for a star, say Vega?
Comment: Not homework, I had another question open where Bolometric Magnitude was mentioned by James that I decided to not ask there but ask in a different question.
Comment: Sorry, no homework.
Comment: Homework is accepted if you 1. self-identify as homework. 2. Clearly describe what research you have done already. 3. Clearly identify a specific problem
Answer: From the page titled, "Absolute Magnitude" and with the disclaimer on that page "not about the magazine,"  [emphasis mine to aid in finding the info]

Absolute magnitude is the measure of intrinsic brightness of a
  celestial object. It is the hypothetical apparent magnitude of an
  object at a standard distance of exactly 10 parsecs (32.6 light years)
  from the observer, assuming no astronomical extinction of starlight.
  This places the objects on a common basis and allows the true energy
  output of astronomical objects to be compared without the distortion
  introduced by distance. As with all astronomical magnitudes, the
  absolute magnitude can be specified for different wavelength
  intervals; for stars the most commonly quoted absolute magnitude is
  the absolute visual magnitude, which uses only the visual (V) band of
  the spectrum (UBV system). Also commonly used is the absolute
  bolometric magnitude, which is the total luminosity expressed in
  magnitude units that takes into account energy radiated at all
  wavelengths, whether visible or not.

So in short, AbsMag is Visual Luminosity and AbsBol is Total Luminosity, Visual and Otherwise. (from comment by MiscellaneousUser)
Comment: So in short, AbsMag is Visual Luminosity and AbsBol is Total Luminosity, Visual and Otherwise.


"Ability" vs. "faculty"

Question: Looking up dictionaries I don't see a easy rule when to use ability vs. faculty in sense of a describing attribute . For example, "cognitive faculty" or "faculty of speech" seem to be standard terms, but then "learning or mental ability" seems more common than "learning faculty". The only pattern I see is that abilities are kind of innate(?).
Comment: It's not a distinction of meaning as such - just that certain combinations are more idiomatically established. The net result being that the more academic/clinical *faculty* tends to refer "innate, raw" potential (which you always had, and which can't be improved). Whereas *ability*, often refers to *current skill level* - which can improve or deteriorate. Depending on whether you practice, or allow skills to atrophy through disuse, for example.
Comment: Quick answer: 'faculty' is kind of general, referring to the ability in a species the possibility of X. 'Ability' means you can do X now. Also, 'faculty' has many very specific connotations (like with the individuals who teach at an institution)
Answer: To me, and I don't think there's a Chicago or AP reference on this so YMMV:

Ability - what degree of capability exists
Faculty - is any capability present whatsoever

So, an infant has no faculty of speech, and a toddler has faculty but limited ability.

"Ability" vs. "faculty"


How to convert fan switch to new light switch?

Question: I just moved into a new house.  In the bedrooms there is a pre-installed light fixture that is pre-wired to be converted into a ceiling fan. There is already dual gang switch, a dimmer for the light and the second one for the fan switch.  Since there is no fan, that fan switch is obviously serving no function right now.  I'm assuming that the fan switch has the red wire attached with the other end of the red wire likely capped within the light fixture.  I would like to install some recessed ceiling lights into the bedroom and have them on a separate switch from the already installed light fixture.  The proper way to do this install is to run new romex wire from the fan switch, cap that red wire, and use that to feed the new recessed lights.  However I know that the red wire is a hot wire.  Is there SAFE way of using that red wire that was meant for the fan and use it to power the new recessed lights instead?  If so, what would be the proper way to wire this?  Thanks.
Answer: Yes you can use the existing box that supports the bedroom light as  a junction box.  Run a 14-2 from there, black to red and white to white, all grounds together. The other end of this can now be used for the new lights in the bed room. Good luck.


Effects of being denied entry to Poland

Question:
I was denied entry to Poland last February. The border guards told me this was because I didn't provide enough supporting documents like hotel reservations and travel plans. Will this affect my chances of entering other European countries in the future?
Comment: That looks like it happened on the first day of February 2020.
Answer: Yes, this will affect your chance to enter any other European countries, and probably some non-European countries as well.  But it won't normally result in an automatic refusal.
A past refusal of entry will certainly serve as a red flag to any visa officer or border officer who is evaluating whether to grant you a visa or allow you into a country.  But if the reason for a refusal is simply a lack of sufficient supporting documents, it shouldn't prejudice a future decision maker against you.
Comment: Provided, of course, that next time you do have a full set of supporting documents. I suggest having very definite and precise plans, with everything scheduled and reserved.
Comment: @MohammedAlkhair I don't think getting a new passport will help very much. The best advice is Patricia Shanahan's: make sure you understand the criteria that border officers will apply and that you met them. Have evidence of your itinerary and accommodation and your reserve funds, and be prepared to explain exactly what you lacked when you were refused. Looking at it with some pessimism, there is also the unfortunate possibility of discrimination. Dress well. Consider filling a subject access request for your file to see if there is any evidence that they have mistaken you for someone else.
Comment: Thanks for answers.. do you suggest me to get a new passport!! Does it help increase my chances!
Comment: Correct if I'm wrong but I was under the assumption that there still isn't a common database for entry refusals in the Schengen area? So if OP changes their passport countries other than Poland won't know about it. There is a database for visa refusals but not for mere entry refusals, AFAIK. Obviously you should never lie if directly asked about passed entry refusals but it doesn't hurt to change your passport to avoid awkward questions.
Comment: @JonathanReez assuming that no alert was entered into the Schengen Information System, which seems unlikely given the facts presented here, that is correct.

Effects of being denied entry to Poland


algorithms issue in uniform cost solution

Question: I am doing the unifrom cost search algorithm. I am getting my solution slightly larger than actual. The number of expanded nodes are coming larger than actual.
I used this algorithm:
Get the initial node and put it into the priority queue.The P.queue will itself arranges the nodes in it according to the cost. Lower cost node will come first.
use the while loop, it goes until the queue is empty.
remove a  node from the queue and check if it is a goal state or not. if not, check if it in the visited list or not. visited list is a set that has all the nodes that are already expanded. if not present in the visited list, get its successors along with cost and action.
calculate the cost upto this node.
if the cost of succcessor is larger than the cost of parent node, add it into the queue  and check if this successor is in the parentdirectory or not. If not, make him a pparent so that we can backtrack the path.
is my algorithm is right or do i need to check something else:
Comment: I don't understand what your algorithm is for and what's it's doing. Sorry but you should clarify your question (imho).
Comment: What cletus said. Suddenly you talk about a "parent directory"...?
Answer: It seems that you're implementing a Dijkstra with priority queue. But since the costs are uniform, BFS would be enough.


Setting up the knights

Question: When playing chess on a physical board, which way should the knights face? Sideways (as in chess diagrams) or straight ahead? If there is nothing in the rules about this, how do the professionals usually set up their knights?
Comment: Stronger players place their knights facing to the side
Answer: There is nothing in the rules about this.
The way that grandmasters set up their knights varies from person to person.
Here is an image from the world chess championship:

Carlsen has placed his knights facing each other, and Caruana has positioned his knights facing forwards.
Comment: They are both wrong! _I_ set up by knights facing left (from my point of view). :-)
Comment: Wondering whether they are always facing the same way or whether they change direction after a move....
Answer: The rules say nothing about this, and it varies from person to person (including among professionals). Some people place their knights facing sideways and forwards, and another popular orientation is placing them in a diagonal pointed towards the centre.
You could place them pointing backwards if you want to screw with your opponent, but I've never seen someone do this in an actual game.
Comment: What about trying to "screw with your opponent" by purposely "adjusting" pieces to be **off** center on their squares. Would anyone complain about that? Has it been done?
Comment: If it bugs your opponent they'd be allowed to adjust the piece, or at least ask you to adjust it. So you shouldn't do that (although I'm sure some players have still tried doing it). The whole thing about backwards knights was mostly a joke :)

Setting up the knights


Impromptu - prompt will not close

Question: I am trying Impromptu in my javascript and for some reason it will load fine, all the functionality I apply within works but calling a close or using the 'x' in the upper right will not close the prompt. The opacity of the overlay lightens slightly but the prompt is model and I can continue to interact with it but not the underlying page.
I have gone back to basics and I am using this function;
<code>$Kurve.prototype.tooltip = function(){
    $.prompt('Hello World',{ opacity: 0.1 });
}
</code>
It is being called a part of a JQPlot chart;
<code>$l_jqPlotArg.highlighter.tooltipContentEditor = $.jqplot.eventListenerHooks.push(['jqplotClick', this.tooltip]);
</code>
Any help appreciated and if you need more info I will do my best to supply it...also, if you have a better suggestion on an overlaying prompt (with good appearance) that can handle a JSON please don't hesitate to tell me!
I have asked th
Thanks
C
Answer: Ok, I figured this out...the click listener was fine but I had to move the handler to a var inside the chart function. All is well :)

Impromptu - prompt will not close


Viscosity and surface tension

Question: Both viscosity and surface tension are dependent on the intermolecular forces between the molecules of the liquid. Supposing from this, shouldn't there be a directly proportional relationship between viscosity and surface tension? i.e. a higher viscosity should mean higher surface tension.
But I don't think that this is observed. Honey, while being more viscous then water, doesn't have higher surface tension. (mosquitoes are able to stand on water but slowly sink into honey) Why is this?
Answer: Both viscosity and surface tension are connected theoretically to inter-molecular forces, but they are still very different concepts.
Viscosity force is a force that acts only when the fluid is moving and acts to decrease the gradient of velocity in it. Viscosity is a characterization of the fluid itself. Roughly speaking, it says how fast momentum of neighbouring fluid layers propagates perpendicularly to them in a non-equilibrium process.
Surface tension force acts not inside the substance, but only on its boundary with substance of another kind, even if nothing moves. It is not a property of the substance itself, but of a pair of these meeting at the boundary. Often the expression "surface tension of water" is used; but what is meant is surface tension of the pair water-air. Combinations water-glass or water-oil have different value of surface tension. Roughly speaking, surface tension says how much energy of interaction is stored when two chemical species are in mutual contact, even in equilibrium.
Comment: But what would then be the driving force for surface tension? For viscosity, it is obvious that its the drag that molecules face due to each other. If surface tension is a property of a pair of fluids, exactly why does it happen?
Comment: Is there a minimum of physical properties from which it could be calculated to at least some degree of accuracy?
Comment: @MarkC I think one can estimate surface tension from latent heat of evaporation and density of liquid, but it's not very accurate.
Answer: As @JánLalinský nicely explains, surface tension is measured between two fluids, while viscosity is measured within one. Say that you have a droplet of some liquid this means that if you change the surrounding medium the liquid-surrounding surface tension changes, while the viscosity of the droplet will not.
That said, if you keep the surrounding medium constant and very different from the liquids you're looking at then there is indeed a correlation between surface tension and viscosity. Take a look at the table of alkanes below. You can clearly see that with increasing carbon chain length both viscosity and surface tension with air rise.

The problem is that this relation is not generally valid and only holds for relatively simple systems like alkanes with air. If you would for example measure the surface tension of these chemicals with heptane, then obviously this table will have a minimum ($0 \text{ mN/m}$) at heptane, but higher values of surface tension for both hexane and octane.

Viscosity and surface tension


Macintosh gotchas

Question: Up until now, I've only managed networks with Windows users and the occasional *nix server. Soon, a few users with Macs will get added to our network. What are some "gotchas" to look out for when adding Macs to the network? Key concerns here: compatibility with Active Directory and security
Answer: You might want to invest in a utility that disables the creation of .DS_Store files on network volumes.  Otherwise you'll find these little files popping up all over your network volumes as the Mac users use them.
I use an app called Cocktail for this.
Comment: you can also do it from the terminal - there is a program called "defaults" that allows you to write out configuration keys (sorta reminiscent of the registry) "defaults write com.apple.desktopservices DSDontWriteNetworkStores true"
Comment: Based in the information found here, it's a small price to pay for just disabling the default as wizard suggests
Answer: If your internal domain is .local, you will have a problem resolving names via DNS. There is an old article on Mac OS X Hints which describes a solution:

I created a company.local file in
  /etc/resolver, and populated this
  file with the nameservers for the
  company.local AD domain. This allows
  Mac OS X to use standard DNS to
  resolve company.local (or
  subdomain.company.local), while
  still allowing Rendezvous to operate
  as expected.
The only drawback I've seen to this
  approach is that the nameservers in
  this company.local file don't update
  via DHCP, so I have to update them
  manually.

Here is a more official support document from Apple which will parse your existing /etc/resolv.conf to populate the file in /etc/resolvers.
Comment: hmm. i think you can just add "local" to "Search Domains" in Network Prefs. This should force the Mac to lookup ".local" hostnames on the DNS server instead of using Bonjour
Comment: The answer to another ServerFault question claims that doesn't work. http://serverfault.com/questions/6509/workaround-for-using-local-as-a-leopard-servers-hostname/6600#6600
Answer: Updates ... although OS X can authenticate to AD there is nothing that requires them to update their computers.   Make sure you talk to them about installing the updates as they come out.  There really isn't any way to force them to do it though.
Answer: If you have enough Macs, I'd suggest adding a Mac server - to create the so called "Holy Trinity".  You don't even need to buy an Xserve - OSX server runs on a Mac Mini!
The Macs use AD for all the normal access/permissions and the Mac server for Mac specific task such as updates (you'll find a Mac version of WSUS called Software Update Server).  You could also use the Mac server deployment options (NetInstall) for installs.
Comment: I'd always heard of it referred to as the Golden Triangle, but Holy Trinity definitely is interesting.
Answer: Some versions of OSX crash a lot when connected to a windows 2003 server that has active directory enabled. They seem to have fixed it at some point but I couldn't tell you when. So keep up to date.
Depending on who gets the machine, you may or may not want to enable network logon. While you can restrict user access (using parental controls) you might just want to make the user not an administrator and leave it at that as many apps self update and spawn other apps, so restricting them can lead to trouble. I've always giving my mac users full aministrative access and never saw any of the problems crop up that I've seen my windows users get into when they have full admin access to their boxes. There's basically no spyware or virus's for the mac, it makes it a lot easier to maintain.
You should also note that every mac has "internet sharing" capability that comes with a DHCP server which can cause trouble.
Also enable imap in exchange and let them use apple's "Mail". It's worlds better then entourage. Also the address book has ldap support built in. There's nothing else special to the mac that comes to mind.
Answer: Here's a good trick, don't bother trying to get OSX itself to connect to your AD - it can be done but I believe it's not that easy and can take a fair bit of support. Buy something called 'AdmitMac' from http://www.thursby.com/ - it takes all the pain away and is of course supported by them directly. Oh and don't let your macs use any protocols that you're not happy with, they're very flexible but they should work around you not the other way around.
Answer: I know of a few end-user support issues you might encounter:

Renaming a user's home directory can result in "missing files"
While this has since been fixed, earlier versions of OS X had some AD integration issues at times.
Replacing a folder with a folder of the same name can have semantical differences from what you're used to.
It is possible to blow away a directory (under certain circumstances) by writing out a file with the same name.
Answer: One thing it took me a while to figure out: if you set an "inherit" ACL on a folder, it will only affect newly created files - the "gotcha" being that if a user "drags and drops" a file into the folder in question, the permissions for the folder won't change in any way (unless it's dragged from a different volume, where it will, in essence, be copied and pasted). For the files to assume the inherited ACL you set, they will have to "copy and paste", or manually set the permissions... maybe (since ACL behavior should in theory be the same) this happens on Windows too, I don't know, but it's worth repeating.

Macintosh gotchas


How to create a label

Question: I'm new to SharePoint and when I read about search capabilities, it suggests that labels and tags are used for 2013. Is this the same as a new column as I don't see where the option is for this?
Thanks
Answer: Its difficult to be sure because your question is a little brief but I think you are asking about how to tag list items to make them more searchable?
This is done with the Managed Metadata service. you can create termsets which are published across all your site collections and can be accessed by the columns you create in your lists and content types. managed metadata takes two forms: Termsets and enterprise keywords
A termset is a predefined list of terms and definitions which can be used by anyone in your organisation to tag documents with commonly recurring data.
Enterprise Keywords are user defined in the same way that twitter and facebook hashtags are created. The user is presented with a free text field to enter any text they want when they can't find a relevent term in the managed termsets.
Here is an example I used recently to explain this to my boss:

Here is a red book with some cake crumbs on it. I want to tag the book
  with the #tags red, book, cake and crumbs An organisation will have
  many books of different colours so the managed termset will contain
  the term book and a subset with the terms red, blue and green in it.
  the chance of cake crumbs being a regular occurance is slim so they
  won't be in the termstore but I could use Enterprise Keywords to
  create my own tags 'Cake' and 'Crumbs'.

When implementing the Managed Metadata Sevice it becomes important to coordinate with all the information handling departments in your organisation so you can build a single cohesive termset that will be useful to everyone. You must also be aware that the Enterprise Keywords list will grow VERY fast and can reach tens of thousands of words so you need to nominate responsible information managers who's function it will be to caretake the termstore, auditing it regularly, linking common terms and deleting extranious ones.

How to create a label


How to Turn Off Automatic Termination of Suspended Apps

Question: I'm trying to debug my Windows Store App when it gets suspended (trying to prevent my server app from kicking my WSA client when it gets suspended and stops responding to keep-alive messages).  But Windows keeps terminating my app almost immediately after it suspends it.  Is there a way to prevent Windows from terminating suspended apps?  I've searched the interwebs and the group policy editor for such a setting, but the best I can find is a setting to prevent it from auto-terminating apps on shutdown, which doesn't help me.  And of course running in the debugger and pressing the Suspend button doesn't help either, since the app doesn't actually get suspended.  I guess I could hack in some debug code to make it pretend to be suspended, but I'd prefer not to.
Comment: The machine has 8GB already, which should be plenty considering my app uses 600MB and it's the only thing running beyond the normal services.
Answer: The command line tool PLMDebug, which is part of the Debugging Tools for Windows package, can be used to exempt an app from the Process Lifetime Management (PLM) policies.  When put into debug mode, an app will not be subject to termination and will not be automatically suspended.
Usage:
plmdebug /enableDebug <PackageFullName> [OptionalDebuggerCommandLine]

Once you've exempted it from PLM automatic suspension and termination, you can use /suspend to force a manual suspension.


Neural Networks, what is the best way to deal with sequence when order does not matter?

Question: Right now I am working on a problem where I have sets of 5 profile pictures of people.  I am trying to classify those pictures using a CNN which feeds into an RNN.  As a whole the set of 5 images should fall into one class although there may be some outliers within the 5 (like someone who posts a picture of their dog rather than themselves.)  Ideally the network should be able to learn to ignore these.  Right now this CNN->RNN approach works decently well.  However, in an RNN the order in which the images are presented seems to matter.  If I shuffle the profile images and feed them to the network the prediction probability tends to vary by about 5%.  I was wondering if there is an architecture other than RNNs where the whole sequence can be considered yet where the ordering of the sequence does not matter?
Comment: what if the order did matter? for instance, people are more likely to put good pictures first, some may not have 5 good pictures so they stick garbage after 2-3 etc.
Answer: In case of RNN order matters. hence your architecture will not work well when you shuffle the images and then tries to predict a sample. For this problem, RNN is not required at all and they are not even a better choice for such kind of problems. The best architecture for your problem is the use of CNNs only. It will give you an exceptional accuracy if you implement it correctly. In order to get an overview how it works, you can take a look at the example of CIFAR10 small images classification: Convolutional Neural Network (CNN) with realtime data augmentation given here
Comment: For CNNs the order would matter as well.
Comment: Yes but a CNN can only handle one image.
Comment: Have you looked at the CIFAR10 dataset? Each of the 10 class is trained on a set of images for each class.
Comment: Yes but you are still classifying each of the images independently of each other.  1 image -> 1 class.  What I am talking about is taking 6 images -> 1 class where just one image alone may not represent that class.  That is why I feed the images through an RNN after the CNN.
Answer: Going by this comment:

Yes but you are still classifying each of the images independently of
  each other. 1 image -> 1 class. What I am talking about is taking 6
  images -> 1 class where just one image alone may not represent that
  class. That is why I feed the images through an RNN after the CNN.

If order does not matter, then you could provide samples as channels, with images constantly being shuffled within each set.

Alternatively, you could build a Siamese network from all samples and sum or aggregate their (vector or scalar) outputs. This would be order-agnostic as well.

To the point
If you're not modelling a sequence (a set of 5 or 6 images with no defined precedence) then I find recursive architectures hard to justify. Just stick to a convolutional (with possibly Siamese flavor) architecture.
Answer: As far as I understand your question, you have five images, that should, but don't have to show the same thing, and given the pictures you want to predict something. For processing each of the pictures you probably should stick with stat of the art for the pictures, that is, some kind of convolutional neural network. Since each of the pictures is assumed to show the same thing, as said by others, you should use the Siamese architecture in here, so the same convolutional network should be used for processing each of the images. As I understand it, the problem is with combining the information from each of the pictures. Obviously, recurrent network would not work in here, because it explicitly assumes that the order does matter. Notice however that if you used convolutional network, then order would matter as well (pictures appearing next to each other would be processed by a single convolutional kernel). Same with dense network, since it would have separate parameters for each of the positions of an image, so it would make a difference if it appeared on the first position. If you really want to ignore the position, then if I were you, I would try an architecture that aggregates the information from all the pictures weighting them equally. For this purpose you can use single aggregating function (e.g. sum, product), or multiple such functions in parallel.
The architecture, that I am thinking of is something like
$$\begin{align}
\boldsymbol{z}_i &= \operatorname{CNN}(\mathbf{X_i}) \\
\boldsymbol{a} &= g(\boldsymbol{z}_1, \boldsymbol{z}_2, \dots, \boldsymbol{z}_k) \\
y &= f(\boldsymbol{a})
\end{align}$$
where $g$ is something like
$$
\boldsymbol{a}_i = g(\boldsymbol{z}_{1i}, \boldsymbol{z}_{2i}, \dots, \boldsymbol{z}_{ki}) = \sum_{j=1}^k \boldsymbol{z}_{ji}
$$
So each of the $\mathbf{X_i}$ for $i \in 1,2,\dots,k$ pictures you use the same CNN network to output some latent representation $\boldsymbol{z}_i$. Next, you aggregate it using aggregation function $g$, and pass this through an "output" network $f$ (e.g. dense layer on top of it followed by an adequate activation function).
Answer: You can process each image with the same CNN, outputting a $H$ dimensional vector $h_i$ for each image (in Keras this is a TimeDistributed application of your CNN). So if you have $N$ images, your output will be $(N,H)$ dimensional.
Then you can use max and/or mean pooling across the $N$ dimension, giving you a fixed output of dimension $2H$, which you can pass onto a classification layer.
Comment: +1, this is basically my second answer explained more clearly `Alternatively, you could build a Siamese network from all samples and sum or aggregate their (vector or scalar) outputs. This would be order-agnostic as well.`


What browsing history exactly would police have under proposed UK law change? Plain english

Question: It's very unclear what '12 months' browsing history being kept by network provider' actually means to an uninformed person. Thunderbird? VPN? Startpage searches? Bit-torrent downloads? Epic browser (in Windows)? Proxy browsing? Proxy browsers eg xombrero? Can anyone clarify? Does using firefox security addons like noscript change what they can see?  Thanks a lot!
Comment: Can you provide links with the details of what they're proposing for those outside the UK so we can interpret them. Australia has tried to do something similar... and I can assure you that the people who created the policy have less of an understanding than you...
Answer: Currently, the measure is just an idea. It is not even an idea by a politician. It is an idea by the UK police. The exact wording for such a law is not made yet, so we can just guess how it could look.
However, this article by The Guardian gives the impression that the idea is to have the internet service providers do the snooping:

Senior officers want to revive the measures similar to those contained in the"snooper's charter", which would force telecommunications companies to retain for 12 months data that would disclose websites visited by customers

So the rest of this answer focuses on the question what information can your internet service provider collect about your internet activity?

Web browsing in general

A web browser has two ways to request websites. The unsecure http:// protocol and the secure https:// protocol. Not all websites support both modes of operation. Stackexchange is one which does. Which mode is used can be seen in the address bar.
When you read this text via http, your internet service provider will know that you just visited http://security.stackexchange.com/questions/104284/what-browsing-history-exactly-would-police-have-under-proposed-uk-law-change-pl. They would also be able to log the complete content of the text your read right now.
When you browse this website with https, the data trail is a lot smaller, because the communication with the webserver was encrypted. All your ISP just learned about you is that you requested something from https://security.stackexchange.com, how many bytes you sent and how many bytes you received. But they can not infer from this information that you read this exact question.

Thunderbird?

Email can be accessed encrypted or unencrypted. Check the server settings in your account settings to see what security mode Thunderbird is using (should be "SSL/TLS" or "STARTTLS"). When encryption is enabled, all your ISP can learn is which email provider you use, how often you check your email and how much email (in byte) you send and receive.
However, even if you access your email encrypted, the exchange of the emails between mailservers might have been unencrypted. Generally, email should not be considered a secure medium. Encryption addons for email (like PGP) can protect the content, but not the meta-information (sender and receiver address).

Startpage searches?

startpage.com always uses https, so they will learn when you used it, but not what you were searching for and what results you received.
Many search engines always use https, by the way (Google, DuckDuckGo and Yahoo do, Bing does it only on request).
Keep in mind that when you actually visit one of the search results, that request might or might not use https (see "Web browsing in general" above).

Bit-torrent downloads?

Bit Torrent is always unencrypted. An eavesdropper can learn what files you share and who you are sharing them with. In order to do that, they don't even need to be an ISP, by the way. Joining the same torrent swarm as a client is enough. Information obtained that way is frequently used by companies to press legal actions against filesharers who violate their copyrights.

Proxy browsing?

Proxy servers can be encrypted or unencrypted. Unencrypted proxy browsing doesn't affect the eavesdropping capabilities of the ISP at all.  When the connection to the proxy is encrypted, they know that you used the proxy, but not what information you accessed through it. However, if an attacker can also monitor the outgoing traffic of the proxy server, they might be able to  correlate it with your requests based on timing.

VPN?

Internal traffic inside a virtual private network is always encrypted. When you use a VPN as a proxy to access websites, then the situation is identical to an encrypted proxy server.

noscript?

Sometimes Javascript applications on otherwise encrypted websites can cause the web browser to make unencrypted requests. Under some circumstances this might provide an eavesdropper with additional information.

Epic browser (in Windows)? xombrero?

I am not familiar enough with these products to provide a good answer, but I don't think they can do anything which is not already covered by the points mentioned above.
Comment: Not only DNS but browsers use [SNI](https://en.wikipedia.org/wiki/Server_Name_Indication) so the name of the target host is actually contained in each SSL handshake in clear and can be easily extracted with passive sniffing.
Comment: Before someone comments that with https the ISP would only learn that you accessed `18.104.22.168`: Remember that there will be a DNS query before the HTTPS request, and that in most cases the DNS server will also be under the control of the ISP.
Comment: Thunderbird is an IMAP client and technically doesn't access websites. Almost every mail server these days has a webserver/webmail interface, but if you want to hold the b@5turds to the letter of the law, reading email over IMAP is /not/ visiting a website.


How to configure a Windows service process to run with low priority?

Question: Is there a way to configure a Windows service process (e.g. squidNT, SQL Server, etc) to start automatically with low priority without manually changing process priority via Task Manager?
Comment: The OP did not ask if it was a good idea or not.  The OP asked *if* it could be done, and *how*. -- Please remember to stay on topic.
Comment: Changing the priority of threads or processes is usually a bad idea, unless the code has been written to run at a different priority. Changing priorities adds "priority inversion" to the list of concurrency issues to avoid.
Answer: The Service Control Manager, which handles starting / stopping services, doesn't have any mechanism (in any version of Windows heretofore) to specify the priority on processes it starts.
Since you can modify the priority on an already-running process, your best bet might be to use a tool to do that.
I'm not aware of a Microsoft command-line tool to modify process priority, but the "PV" command-line too, available at http://www.teamcti.com/pview/prcview.htm has a function to set priority.
pv -pb process-name.exe

That would set "process-name.exe" to "Below Normal" priority.
If you can live with the process starting out at "Normal" priority until you get around to changing it, you could do so with a script running as a "Scheduled Task" to fire off every-so-often (in case the service gets bounced).
It's a quick and dirty hack, but I owe a lot of my fortune in life to quick and dirty hacks that get the job done!
Comment: Maybe run a batch file to start the app and then set the process priority, with perhaps a short sleep in between, rather than running the app directly and then running another task to set the priority. Won't work for everything but worth a try.
Answer: Above answers didn't work for me. I ended creating the following powershell script:
ChangePriority.ps1
Get-WmiObject Win32_process -Filter 'name="ProcessName.exe"' | ForEach-Object {$_.SetPriority(128)}

And then I created a scheduled task that call it every 5 minutes. From Administrator prompt or batch script:
schtasks /Create /tn "Process Priority Change" /sc MINUTE /mo 5 /ru SYSTEM /tr "powershell -noprofile -executionpolicy bypass -file \"%cd%\ChangePriority.ps1\""

Attempts to use wmic as discussed here to make the scheduled task not depending on file failed. Similary using the powershell script: I was not able to just create a single command that just create a task with the inline script. Appreciated if you managed to do it and add another answer.
Values for priority in the powershell script can be found here[1].
[1] https://docs.microsoft.com/en-us/windows/desktop/cimwin32prov/setpriority-method-in-class-win32-process
Comment: Sure: PowerShell.exe -noprofile -executionpolicy bypass -command "& { Get-WmiObject Win32_service -Filter \"Name = 'AudioSrv'\" | ForEach { Get-WmiObject Win32_process -Filter \"ProcessId = $($_.ProcessId)\" } | ForEach-Object { $_.SetPriority(256) } }" I don't know how right it is... but it works. I haven't managed to make it work hidden, can work only under user w/ admin priv.
Comment: Very useful. I chopped up a line with my poor ps skills to set the audio service containing service host process to realtime to prevent audio crackling during heavy cpu usage (bad drivers, I guess). Works great!
Comment: @JasonXA You're welcome. Appreciated if you can provide a one line version of it, which I couldn't
Answer: The following might also work. Edit the ImagePath registry key, and use the start command from cmd.exe:
START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
      [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
      [/WAIT] [/B] [command/program]
      [parameters]

Comment: Unfortunately this doesn't work at all since the executable launched in `ImagePath` must respect the interface for Windows services, and `start` doesn't implement nor it won't route this to the executable being launched.
Answer: I had to do that to make teamcity take less cpu.  And, because teamcity is the only java app we are running, that solution works perfectly.

Set service as startup "manual".
Create a batch file, that will start your service, and lower the priority, like:
net start tcbuildagent
net start teamcity
wmic process where name="java.exe" CALL setpriority "below normal"
Create a "task scheduler" job, triggered at "windows startup", that will launch that batch file.

I configured the TaskScheduler trigger with a 1 minute delay, to not interfere with other services starting.
p.s. you can also set all your services startup as manual, and use that batch file to start all of them in the order you want!  SQL, IIS, etc.
Answer: You could the following powershell script, put it in a scheduled task that runs at startup.
do {
    start-sleep -s 5
    $obj = Get-WmiObject Win32_process -Filter 'name="processname"'
} while ($obj -eq $null)
$obj.SetPriority(16384)


Multivariate Time Series Forecasting in R - data in 10 minute intervals

Question: I have data where an observation was made in 10 minute intervals for 8 weeks.
I have around 170 variables that were measured every 10 minutes. I am trying to use multivariate time series analysis to predict what will happen in the 9th week (also in 10 minute intervals). I know that the ARIMA model is useful for these cases. But I am very new to R and statistics and I am having a little trouble starting out. Most of the information and tutorials on R that I found online are regarding single variate time series analysis and yearly/quarterly measurements, and not every 10 minute measurements, so it is difficult to apply to my problem. I was hoping to get some help on here and I would greatly appreciate any advice !
Answer: Not sure if this will help, but your problem reminds me a little bit of macroeconomic time series modelling where a similarly high number of regressors is available, although the time series are much shorter. J. Stock and M. Watson have a nice overview paper on dynamic factor models employed in this kind of setting.
There you should find some tips on how to reduce the number of variables in your system to a comfortable level. This would allow you to model them as a vector autoregression (VAR) or similar.
References

Stock, James H., and Mark W. Watson. "Dynamic factor models." Oxford Handbook of Economic Forecasting. Oxford University Press, USA (2011): 35-59.
Answer: This may be of help:
You could do this as a multiple regression problem.
Depending on which variable you want to predict, you could introduce a time variable along with lagged predictors. For each of the lag of lagged predictors, you could determine which is the most correlated (be sure to use cross validation to avoid data dredging). Then include dummy variables based on the hour, weekday. See
https://www.otexts.org/fpp/5/2
By this point, you will need to weed out the excessive variables  so use a cross validated feature selection approach.


White-light double-slit experiment with an LED

Question: This answer and comments state that you can perform Young's two-slit interference experiment with white light and get a pattern of colored interference fringes.  I've got some white LEDs lying around that I could use as a point source of light.  Would one of these work as a light source for the experiment, or would the decidedly non-blackbody spectrum mess things up?
Answer: The point of the white light interference experiment is that all the light is interfering whatever the wavelength. The spectrum doesn't matter.
ps. Getting a white light pattern can be tricky, you could try with a single color LED first, or better still a laser pointer.
pps. A bare LED probably isn't enough of a point source for white light fringes - you might need a lens and a pinhole


Is the Facebook login form using SSL without https in the URL?

Question: If I go to http://facebook.com, I am not redirected to https://www.facebook.com. If it doesn't have https in the URL, can the login be secure? Usually I am redirected to an https page on other sites? How is Facebook managing its login?
Comment: due to this wrong implementation of SSL, Facebook and several other sites are vulnerable to SSL-stripping ( http://www.youtube.com/watch?v=Uw1TtY3tZdg ) &/or SideJacking ( http://www.youtube.com/watch?v=iet_QVAePbE ) attack
Answer: No, it is not secure to enter your username and password on http://facebook.com.
The target of the login-form points to an https URL, so a passive attacker cannot read your password:
<code><form method="POST" action="https://www.facebook.com/login.php?login_attempt=1"
</code>
But an attacker, who can modify the data stream, can manipulate html code which contains the login form. He can modify the target url or add some javascript code that sends a copy of the username and password to his own server.
Furthermore after logging in, Facebook sends the session cookie over an http connection. This allows even an passive attacker to act in your name. This is not a theoretical attack, there is a tool called Firesheep that is extremly easy to use.
To prevent the first risk, always use https://facebook.com to login. There is a browser extension called https everywhere which does this for you and even stays at https which prevent the Firesheep style attacks, too.
Comment: Especially as with such a https on POST there is no way to detect a MITM SSL stripping attack until it's too late, even if one knows what to look for.
Comment: so how does SSL help in this environment? Is it that  the password is encripted or what is the benefit?
Comment: SSL protects you against a *passive* attacker, that is, someone who can snoop/log your traffic but not redirect, modify, or hijack it.
Answer: Only log-in via https:// facebook.com is secure - and NOT http:// facebook.com which at this time does not auto-redirect to the secure site.
Because the target of the log-in form is an https URL, as given by the source code, the form data could not be read via  passive attack, and in that sense is safe.  But an active attack via data stream modification - which could enable a hacker's injection of malicious code to steal the username and password entered - could be easily done.
Subsequent data in the session cookie is additionally sent through an http connection, which enables passive attackers to act in one's name even without having stolen the log-in data from the form on the front page.  The proof-of-concept extension Firesheep, written by developer Eric Butler for Firefox, demonstrates how this is possible.  Lifehacker has written more about the need for SSL encryption in this regard.
To deter such attacks, in Facebook, one may simply edit one's account settings, select Account Security, and tick the checkbox to enable HTTPS, under the Secure Browsing header.  With this option, certain pages - notably, some Facebook applications that have not yet been HTTPS-enabled - may not function properly; however, the sacrifice of that lost functionality could be made for the sake of account security.
Additionally, there are web browser extensions available to automatically enable HTTPS encryption, whenever possible - not only for Facebook, but for all web sites.  The Electronic Frontier Foundation (EFF) and the Tor Project have made an extension called HTTPS Everywhere which is available for Firefox and Google Chrome. Other similar extensions may be available for your browser of choice.
Answer: If you go to https://facebook.com you will log in using SSL. Yes it would be good if facebook would redirect, but they don't yet.
You can do it yourself by going directly to the https version of the page, or use HTTPSEverywhere which will help by pushing you to the https page for many common sites, including facebook.
Comment: I'm wondering why they don't do it automatically. Oo


What could cause staining in a toilet bowl?

Question: I have one toilet that works fine, but the bottom of the bowl looks like those you see in gasoline station restrooms.  I can scrub it with a toilet brush and a dose of bleach and most of it clears up, but the bottom still looks stained.  Is it that the china has gotten old and is retaining stains?  A woman told me that it is because of the wax ring, but I doubt that.  I was thinking may a paint store would have an epoxy that would fix the stain.   Would that be the way to go?
Comment: The wax ring has nothing to do with what's in the bowl. Do you have iron in your water? How old is the toilet? Replacing it is a better plan than trying to coat it. They're not that expensive, and installation isn't difficult in most cases.
Answer: Many times older toilets have been cleaned with harsh chemicals that damages the surface. It ends up being cheaper and will look better to replace the toilet than dry it out clean coat let coating dry and find it needs a repeat in a couple of months.


Transit Visa for flight connecting through Narita/Japan airport

Question: Vietnamese passport with US green Card. Flying to Vietnam on February 2023. Do I need a transit visa if my layover is 2 hour at the NARITA/Japan Airport
Answer: If you have your flight under a single ticket/PNR :
TIMATIC states :

Japan - Transit Visa
Visa required.
TWOV (Transit Without Visa)

Passengers with a confirmed onward ticket for a flight to a third country on the same calendar day. They must stay in the international
transit area of the airport and have documents required for the next
destination.

Else you will need a visa


How to protect a question?

Question: Is there a reputation cap we have to reach before this feature unlocks for us? or is it something which is exclusive to the Mods.
Answer: It can be done by normal users, but you need 3,500 reputation (so you're almost there ;)). But keep in mind that those high-level mod-like facilities should be used with extreme care and responsibility.
Also remember that the beta status of this site lowers the reputation limits for all privileges. Once the site is promoted to a full SE site, you will need the full 15,000 again.
Comment: cool. I saw posts being protected wondered how it was done
Comment: @Dredd - yes, protecting questions is fairly rare - usually something that is suddenly very popular and gets a load of 'answers' by people making comments.
Comment: I didn't got a chance to use this power because we have very less question which have large number of answers

How to protect a question?


Writing To Windows Event Log Using Powershell

Question: All,
I have a batch script that generates multiple log files in a single folder location.  The log files are simply individual lines of text based on output from other applications.  I was able to use the powershell cmdlet of "New-EventLog" to create a custom event log on my Windows 7 client machine.  What I would like to do now is take the individual lines of text in each of the log files and loop through them one at a time, outputting each line to the event log as a separate entry.  All I have been able to do at this point is send a single (but entire) log file to a single event log entry.  Below is what I have:
@PowerShell -NoProfile -command "$OutText = Get-Content logfile.txt | Out-String;Write-EventLog -LogName CUSTOM -Source SCRIPT -EntryType Information -EventID 999 -Message $OutText
Note that I would like to be able to run this from within a batch script for simplicity sake but am open to other options.
Thank you.
Answer: Try this:
<code>Get-Content C:\Scripts\LogFile.txt | ForEach $_ {Write-EventLog -LogName CUSTOM -Source SCRIPT -EntryType Information -EventId 999 -Message $_
</code>
You can remove the $_ after ForEach if using v4 or higher PowerShell
Comment: You didn't need the `$_` after ForEach in v3 either.


C++ Importing and Renaming/Resaving an Image

Question: Greetings all,
I am currently a rising Sophomore (CS major), and this summer, I'm trying to teach myself C++ (my school codes mainly in Java).
I have read many guides on C++ and gotten to the part with ofstream, saving and editing .txt files.
Now, I am interested in simply importing an image (jpeg, bitmap, not really important) and renaming the aforementioned image.
I have googled, asked around but to no avail.
Is this process possible without the download of external libraries (I dled CImg)?
Any hints or tips on how to expedite my goal would be much appreciated
Comment: Use libraries for this. Writing a jpeg reader based on file specs is not at all trivial. If you can use any format, then TGA is pretty easy.
Answer: Renaming an image is typically about the same as renaming any other file.
If you want to do more than that, you can also change the data in the Title field of the IPTC metadata. This does not require JPEG decoding, or anything like that -- you need to know the file format well enough to be able to find the IPTC metadata, and study the IPTC format well enough to find the Title field, but that's about all. Exactly how you'll get to the IPTC metadata will vary -- navigating a TIFF (for one example) takes a fair amount of code all by itself.
Answer: When you say "renaming the aforementioned image," do you mean changing metadata in the image file, or just changing the file name?  If you are referring to metadata, then you need to either understand the file format or use a library that understands the file format.  It's going to be different for each type of image file.  If you basically just want to copy a file, you can either stream the contents from one file stream to another, or use a file system API.
<code>std::ifstream infs("input.txt", std::ios::binary);
std::ofstream outfs("output.txt", std::ios::binary);
outfs << insfs.rdbuf();
</code>
An example of a file system API is CopyFile on Win32.
Answer: It's possible without libraries - you just need the image specs and 'C', the question is why?
Targa or bmp are probably the easiest, it's just a header and the image data as a binary block of values.
Gif, jpeg and png are more complex - the data is compressed


Which preprocessing comes first for pansharpened imagery- atmospheric correction or orthorectification?

Question: For pansharpened imagery, what preprocessing method to do first- is it atmospheric correction or orthorectification? From my readings, it seems the former but the rational polynomial coefficients or RPCs needed for orthorectification are then removed in the corrected imagery which makes it impossible to do the latter. If the reverse is done with orthorectification first, wavelengths needed for atmospheric correction are removed as well making the latter impossible to accomplish. What gives?
Comment: Please edit your question and provide more information. In particular, what software are you using, what satellite/sensor and format is your imagery?
Answer: In most processing chains, orthorectification or reprojection is performed as late as possible in the workflow, to avoid altering the spatial relationships between neighbouring pixels.
In your case, re-sampling first would alter the value of pixels say, at the interface between a water body and land, which would then lead to incorrect estimates in the algorithm used for atmospheric correction.
It sounds like it's more a technical issue of passing the required metadata to be able to perform the RPC ortho on the atmospheric corrected image. If you are using the GDAL Python bindings, it is possible to copy the metadata domain from the source image and set it in the corrected output dataset using something like :
<code>ds.SetMetadataItem("ERR_BIAS", myoriginalbiaserror, "RPC")
etc.
</code>
for each required metadata item. See https://trac.osgeo.org/gdal/wiki/rfc22_rpc for the full list of RPC metadata items.


Do you have to check boiled eggs?

Question: Is it necessary to check hard or soft boiled eggs for blood spots?
I've never seen anyone do it, so perhaps it is not, but if so, why?
Answer: In answer to your question, according to this article from OU, no:

There is no problem with eating eggs cooked in the shell (boiled or roasted), even though these cannot be checked.

However, note that this would only apply to non-fertilized eggs (as are commonly available today). If you're dealing with fertile eggs (usually available at a premium), consult a Rabbi for guidelines.
I also saw here that even fertilized hard-boiled eggs would not need checking. Only soft-boiled ever needed checking (when fertilized).
Also interesting from here:

When eating hard boiled eggs, Harav Moshe Feinstein zt"l had the custom to peel back the white to check the surface of the yolk for blood spots, which would appear as black spots.
Comment: Does your last quote come from http://www.thehalacha.com/attach/Volume4/Issue18.pdf? You're missing a link.
Answer: You don't have to. In fact, it is impossible to do so since after cooking, the blood can get mixed up and not be noticeable. Since it is impossible to check, we rely on the rov (majority) or eggs that are not bloody.
Source: here
Comment: How does the blood get more mixed up than in a egg cooked after being shelled, e.g. a sunny side up? Also, what's the source for this?
Comment: @HodofHod It gets mixed up the same amount just by if you shell it before cooking you have a chance to check. For hard boiled eggs you can't check. We always check when we can.
Comment: So you're saying that the cooking mixes it up.
Comment: @HodofHod "It is permitted to boil eggs in the shell and rely on the rov, since it is not possible to check it without breaking it." is the direct quote from the article I cited.
Answer: When the Lubavitcher Rebbe would eat the Beitza by the Seder, he would not check it for blood. Otzar Minhagei Chabad quotes the Taamei Hamitzvos who says that the AriZal would eat fried eggs and was not concerned for the occasional blood spot.
The Eishel Avraham (Buczacz) writes that because a majority of eggs have no blood-spots and it's hard to check them, one doesn't have to be machmir and find other food to eat.
Answer: From Halachically Speaking Volume 4 Issue 18, "Blood Spots In Eggs":

When eating hard boiled eggs, Harav Moshe
  Feinstein zt"l had the custom to peel back the
  white to check the surface of the yolk for blood
  spots, which would appear as black spots. [ This is not required (This is the opinion
  of Harav Yisroel Belsky Shlita (Hakhel Janurary 2006
  daily e-mail).]

And

As mentioned before, according to the Rama,
  before using eggs in food, one should check to
  see if there are any blood spots. However, if it
  was not done, it is permitted to eat a hard
  boiled egg which was not checked beforehand
  since we can rely on the fact that most eggs are
  not fertilized

See there for sources.

Do you have to check boiled eggs?


Icenium / Phonegap Build - how do they create IOS ipa?

Question: I'm currious to know how e.g. Telerik Icenium / Phonegap Build creates IOS ipa files?
Do they use physical mac's for this task or how do they come about this?
Or rephrased: Can I in any way create Cordova ipa files on Windows?
Answer: You don't need an actual Mac, just Mac OSX. If you don't feel like buying a mac than you can get a hold of the image of Mac OSX and install it onto your PC using Virtual Machine software. I use VMWare to run MacOSX from my Windows 7 x64 machine.
VM's are a great way to go, the driers can take a bit to setup, but once everything is working it's perfect.
VM's even support ethernet so from within the VM you can browse the web, download mac apps.
Install things like XCode or GameSalad. I suggest researching how to use Virtual Machines.
Answer: (I'm part of Icenium team). Yes, we're using physical Mac machine to build your app for iOS.


Modem and Router Combination

Question: I have a modem (Zyxel P660R) wireless Router (ASUS RT-AC68R) combination. The default IP address for both units is 192.168.1.1   So I changed the modem address to 192.168.0.1 and can access now both units. Internet works, but really slow and I'm getting a lot of 'server not found' error msgs. I found hints, that the modem needs to be in bridge mode, which I could define. I just wonder, where to define the ISP information in this situation? Clarification would really be appriciated.
Comment: I would check out the status page of your Modem and make sure your SNR is a reasonable level, 28-35 db, this would indicate that there is an issue with the physical line.
Comment: Your modem is a router... why have 2 routers? Change the Asus to 192.168.1.2 and turn off DHCP, then set the modem to 192.168.1.1 and connect it to a LAN port of the Asus. You will use the Asus essentially as a switch and wireless access point, and the Zyxel will be the primary router and DHCP server. Otherwise, see if you can put your DSL modem into bridged mode somehow so that you can get a public IP directly from the modem to your Asus router, might have to contact your ISP to see the process for that. Having a NAT firewall router behind a NAT firewall router is just asking for issues.
Answer: Your Zyxel box is a modem/router. If you don't see a configuration option to disable its NAT and DHCP server features to make it just a transparent bridging modem, then it may not be capable of being just a modem. Note that if your ISP requires PPPoA, it probably can't bridge over that kind of link, so you probably can't turn NAT off in that case. If your ISP requires PPPoE, you might be able to disable PPPoE in the Zyxel box, and that might allow it to show you the settings to disable NAT. Then you'd need to configure your ASUS box to do PPPoE and NAT.
If you can't work out a way to make your Zyxel box be just a modem, you could decide to live with it and set your ASUS box to be just a transparent bridging AP.

Modem and Router Combination


What does an FDR value of 1 in RNA-seq mean?

Question: I am looking at the supplemental data from the paper "An allelic series of miR-17 ∼ 92-mutant mice uncovers functional specialization and cooperation among members of a microRNA polycistron" which lists the genes that are differentially expressed between a particular knock-out mouse and the wild-type control. In addition to showing the logFC changes for each of the genes, the table includes their FDR value. In many cases, the FDR value is 1. What does this mean?
Comment: @leah I don't see where they are reporting FDR values of 1 in that paper, but Mowgli's answer is correct for what FDR is and likely correct that the numbers you are seeing are meant to be FDR corrected p-values. They shouldn't be called "FDR values" though so the authors might have made a mistake or just an unfortunate choice of abbreviation (or you did). FDR is a threshold, sort of like when you choose an alpha value as a criterion for significance.
Comment: A link/doi to the paper would be helpful.
Comment: Sure! Here is the link: https://www.ncbi.nlm.nih.gov/pubmed/26029871 Thank you very much, Leah
Answer: FDR stands for False Discovery Rate. It is a statistic tool used in multiple hypothesis testing.
As you may know, when you use a p-value cutoff (usually 0.05) for your experiments, it means strictly speaking that "is there was actually no signal, there would be a probability of 0.05 to observe this kind of extreme values". This can be understood as "there's a 5% chance that what you call a hit is actually not signal, just some extreme value that happened by chance, and really there's nothing to see here".
This definition has deep consequences if you run many experiments: imagine that you run 100 experiments (say, you test the effect of 100 different molecules), if none of them has any effect, on average you could still get 5% of false positives. So if you run these 100 experiments, and you get, say, 10 hits with a p-value below your thresold of 0.05; how can you tell which ones are real and which ones are just chance in the absence of biological signal?
This is where you can use FDR.
If you control for a false discovery rate of, say, 0.2 (20%), it means that after a few computations (the Benjamini-Hochberg procedure described on wikipedia is simple and commonly used) you will lower your p-value cutoff so as to be sure that, among the N hits (probably less than the 10 you initially selected above) that you got above, a maximum of 20% are actually false positives (i.e. no biological effect, but surprisingly high/low signal values by pure chance).
In the article you mention they have a different FDR value for each sample, which is unusual. The values are not round numbers, so it seems likely that they are numbers obtained after applying the FDR correction (i.e. they are "transformed p-values") on which they based their decision to include the samples or not. The FDR cutoff that they chose should be written somewhere in the main text.
Answer: In practice, you can interpret it just like a p-value.
An FDR value is a p-value adjusted for multiple tests (by the Benjamini-Hochberg procedure). It stands for the "false discovery rate" it corrects for multiple testing by giving the proportion of tests above threshold alpha that will be false positives (i.e., detected when the null hypothesis is true). Note this is less stringent than the Holm-Bonferroni FWER adjusted p-value (which considers the chance of any false positives among significant results).
So for a FDR p-value of 0.05, up to 5% of these tests will be false positives (note this is not the case for uncorrected raw p-values).
For an FDR p-value of 1, up to 100% of these tests will be false positives. This makes sense since if you take test with a p-value if 1, then it should include all of the negative results, where the null hypothesis cannot be rejected. Only tests with p-values lower than this, have any chance of being rejected under the null hypothesis as true positives. If you are getting FDR adjusted p-values, you have done so many tests that you do not have the power to detect true positives and cannot rule out these being false positives due to noise of multiple testing. So an FDR p-value of 1 is definitely not significant under any circumstances.
Comment: For this specific case, it is a question about FDR of 1. This should not be used as a threshold for defining hits under any circumstances. This will make every result a hit by definition. It's the most false positives you will allow and you are allowing all them. Researchers should understand the tools they're using but they should seek further information on them, this is not the right forum for that level of detail.
Comment: I think you cannot interpret it exactly like a p-value in a Benjamini Hochberg procedure. It requires 1) ranking the p-values, 2) computing adjusted values based on rank and 3) finding the largest index satisfying the FDR inequality computation and 4) selecting all the values below this index. There may be values that end up being selected (ie. their index is sufficiently small) even though the computation leads to a value above your selection threshold.
Comment: Additionally, an FDR just tells you about the maximum percentage of false positives that you are willing to accept - so even correcting for an FDR of 1 can lead to 100% of correct hits, it just means that you are willing to accept up to 100% of type I errors in a worst-case scenario (and you just don't know if it happens or not)
Comment: For the case of p = 1 or in terms of interpreting the results of an experiment, it's not much different. Any algorithm to compute FDR correction will compute them in order for you. It's not necessary for a biologist to know the details, although this may be more appropriate for Cross Validated.
Comment: I don't quite agree; this nuance can add tens of hits to your results in a large scale experiment like high-throughput RNAseq. And yes, I think it's necessary for a biologist - or any other scientist, for that matter - to understand precisely the statistical tools they use for research :) my personal opinion.