Should castle walls be circular or square?

Question: In many medieval portrayals, the walls of castles are always portrayed as square.  But would the castle be better off if the walls were circular instead of square?
Comment: There are advantages to both designs (circle vs square). In reality, castles are compromises between defence and domestic practicality, and often include both types of wall.
Comment: @JohnWDailey - a sphere is a ball shape. I think you mean a cylinder. Many castle walls, towers and turrets take the form of a cylinder, e.g. http://www.feelmadrid.com/manzanarescastle.html
Answer: Each has its advantages and disadvantages.  Circular walls are more likely to deflect cannonballs with minimal damage, but the outermost point of a circular wall is hard to defend.  Interlocking fields of fire are all but impossible in this situation.
Square walls are more prone to suffering damage from cannon fire, but it is easier to generate interlocking fields of fire to defend them.
In the early medieval period, cannons weren't a problem, because at first, they didn't exist, and then they existed, but were unreliable and lacked the power needed to knock holes in thick stone walls.
As cannons improved, so did walls.  They became rounded or angled to deflect big projectiles while absorbing minimal damage.
In the late medieval period, the firepower produced by cannons was too much for any walls to withstand for any length of time, and the pattern became low profile walls with gently sloping earthen ramparts to absorb cannon fire.
So the best design for your castle depends on how big of a problem cannons represent.  As cannons become more powerful and numerous, walls should first be rounded, then lowered and protected by hills of loose soil.
If cannons aren't an issue at all, or if your walls are low to mitigate the threat posed by cannon fire, your walls should be angled to allow your defenders to create interlocking, overlapping fields of fire.  The more men you can get to fire over the same patch of ground, the safer you'll be.
Square Walls:

Source
Field of fire of a single cannon on a rectangular tower
Rounded Walls:

Worse yet, the rounded shape that had previously been dominant for the design of turrets created "dead space", or "dead" zones (see figure), which were relatively sheltered from defending fire, because direct fire from other parts of the walls could not be directed around the curved wall. To prevent this, what had previously been round or square turrets were extended into diamond-shaped points to give storming infantry no shelter. The ditches and walls channeled attacking troops into carefully constructed killing grounds where defensive cannon could wreak havoc on troops attempting to storm the walls, with emplacements set so that the attacking troops had no place to shelter from the defensive fire.
Wikipedia

Source
Fields of fire of a single cannon on a circular tower
Star Fort:

Source
The ideal solution:  Overlapping fields of fire, only possible with a star fort.
Comment: Great images! (*A little joke I can't help but share*), the first one with "Dead Zones" would be more accurately portrayed as "Live Zones" ;)
Answer: Yes, circular towers are better.

They are more robust and harder to break by trebuchet or cannonball. And they are less likely to crumble if someone try to attack the foundations of the towers.
The defenders can attack from every angle since there is no corner.

On the long term, if you want your fortresses to withstand cannon fire, you're better with triangles. It's from the renaissance but nothing prevents it to be built earlier. The style of fortification is named Vauban after the french architect/engineer Sébastien Le Prestre de Vauban.

The use of advanced bastions is good for protection since the soldiers can harass the attackers from above while they are trying to reach the main fortress.
The bastions are also meant to block direct hits against the walls by serving as an obstacle in the cannons' line of sight.
Indirect hits inflicts less damage.
These fortresses generally had lower but thick walls and were shaped like
stars to make it harder to fire shots perpendicularly.
The result is that they are much harder to destroy.

Examples:

(source: ikonet.com)

Comment: @HDE226868 The second one is from Neuf-Brisach in France.
Comment: Vauban is not really medieval and his forts had to deal with advanced gunpowder technology. They were mostly built on the coast to fire at boats. The walls do not really resist to canonball individually but several remparts make it difficult to reach the center, or to destroy every military part.
Comment: What are the fortifications in the pictures?
Comment: @Tyrabel : "Vauban is not really medieval and his forts had to deal with advanced gunpowder technology" I mentioned it in the answer already.
Comment: "They were mostly built on the coast to fire at boats." Nope: http://www.sites-vauban.org/The-Vauban-fortifications-in
Comment: He did write the plans for a lot of the so called "Vauban forts", but it was a kind of "do it yourself" guide. Lots of the forts are built on the same plan, i didn't even know they were so numerous ! But he did a really big job on the coast, and it was a new idea. There were already a lot of fortress in the mountains on the east of your map, not so mush on the coast. He also  improved a lot of pre existant fortifications. But, ok, there are more forts far of the coast :)
Comment: @Tyrabel But your right, he did not built all of them.
Answer: There are many reasons:
Stones
It's more difficult to sculpt semi-circular stones than straight stones. In order to have a perfectly round wall/tower, each stone needs to have the perfect shape, not a big square. That's a lot of work!
Inside
In a square room, furniture are easier to build. Along a straight wall, you can easily make a corridor. In medieval times, the castle was very often a place where a lot of people were living. Workers were building theirs workshop against the wall. It's easier to build something new against a straight wall than a round one.
But? The round towers?
Yes, there ARE some round walls and tower. In fact there is not much round walls in the X-XI centuries, but more and more with time until the XV century where there are almost every time round towers. The apparition of canonball changed the architecture.
Arrows (and stones launched by a trebuchet) are easily stopped by a wall (square or round), but canonball are not so well stopped at all, so they began to build round towers to make canonballs slip on the wall instead of breaking it.
Carcassonne city, IX to XIII century (France):

Salses Castle, anti-canonball, XV century (France too, what a lovely country for castle lovers):

See? Old castle: little round towers against arrows and stones, big straight walls.
More recent castle: big round towers against cannonballs.
Comment: Actually round towers were adopted because they were more resistant to undermining than square towers. Also once gunpowder artillery became common and reliable (circa 16th Century), fortress design changed completely, with lots of angled walls to give overlapping fields of fire (see [star forts](https://en.wikipedia.org/wiki/Star_fort)).
Comment: Salses castle is one of the first and last of his kind. It's conceived against canonball, it's in a hole and not on a mountain like other castles in the area, but did not go through a lot of battle, because of its history (at the end of its construction, it was no more in a conflict area, and gunpowder technology became so powerfull so fast that it loses its purpose)
Comment: Also... I'd like to point out Carcassone, that is an awesome game and apparently a French castle :P
Comment: Carcassonne is a french city/fortress, and there is a fabulous castle inside the fortress. It's one of the biggest and best preserved medieval fortress city (maybe the biggest) in europa. Its fortification began with the roman empire, but the towers and second exterior wall on the picture are medieval, and have been restored by Viollet le Duc in the XIX century. It has never fall to the ennemy in a battle, but had difficult times with sieges. (And its beautiful and impressive fortifications did inspire the game :P ).
Comment: Note that large trebuchets could knock most walls down. There have been cases of cities and castles surrendering when they saw the besiegers had a trebuchet, because they knew the siege was pretty much over as soon as it started lobbing rocks. However, they were large, expensive, cumbersome and required trained siege engineers to build and to assemble. Cannons later made the same power accessible to a much larger scale, and in much smaller individual packages.
Answer: Sometimes castles are about status and economic power, where defence takes a secondary role
As others have correctly stated, castles with round towers (until the invention and widespread use of gunpowder) are more defensible and subject to less undermining in a military situation.
However, castles are not just for defence and/or military purposes - if you're not on the 'front line' of defence, many castles in the world serve as administrative centres, political statements or signs of affluence.
In a cursory top 25 most-beautiful castles in the world list, the majority all have square towers, likely as these are easier to furnish, more functional in terms of accommodation, and afford a pleasant outlook. The resultant square rooms are also easily extendible, easier to roof and simply more comfortable to be in.
The following are a small sample of square towered castles:

Eltz Castle, Germany
Eilean Donan, Scotland
Edinburgh Castle Scotland - a good example of an already defensible castle being perched on an outcrop, so the priority for the castle can be utility and comfort

Bran Castle Romania
Kilkenny Castle Ireland
Mont-Saint-Michel, France - a good example of a square towered form inside an easily defensible round-towered base, in an already isolated island.

Windsor Castle, England - a good example of a castle situated in a city - so at low risk of being assaulted. This castle is more about status and amenity.

Alhambra Spain - very luxurious and more about status and projection of power

Vianden Castle, Luxembourg
Bojnice Castle, Slovakia - obviously luxurious and picturesque and a symbol of power and strength.

Doorwerth Castle, Netherlands

A common thread is the square castles are built for comfort, in already prominent positions that allows them to be furnished and comfortable, roofed for amenity, and located already securely either within practical city walls perhaps with round towers that take the role of utility and military defence, or in an easily defensible position already (such as within a city like Windsor Castle), and where square rooms allow more comfort and better outlook.


What does it mean ?

Question: I am learning English, but I am not familiar with idioms. Could somebody explain me in plain English what does it mean "I will need to come back to you on this request."
Comment: You probably should be in the English Language Learners exchange.
Comment: In this context, *to **come/get back** to someone* is an idiomatic expression that means *to contact them again* (after you've done something or found some relevant information elsewhere).
Answer: A simple translation is "I don't have an answer right now and I will let you know as soon as I do have an answer."

What does it mean ?


Chess software for writing books

Question: I am currently converting some of my chess books into electronic format by manually copying the pgn and making notes. I have found lichess study and chessable courses to be useful in doing this. However, I would like to do this offline. Is there a software which will do this for me? I am looking at ChessX but the interface is too complicated for me to even understand if this is what I want.
Comment: Is your question about converting a PDF or physical copy into an annotated PGN file?
Answer: If you're familiar with LaTeX (or if you're willing to learn it, which in my opinion is time well spent), there are some user-created packages which exist just for that. These are very easy to download (e.g. via with the MiKTeX Package Manager) and use.
To my knowledge, the most extensive and well-documented of these packages for creating chessboards is chessboard. As you can see in the documentation, it's highly flexible. As for chess fonts (i.e. being able to write moves with the symbol for the piece rather than the letter for the piece), there's the package chessfss. There are other packages too if ever these aren't to your liking, for example chess-problem-diagrams.
Comment: I use LaTeX for my research, so I use it frequently. However, my question is different. I would like to have the book in an interactive sense, i.e., something like the http://andrewphoy.github.io/chess-replayer/ embedded.

Chess software for writing books


How the fancy spellbook pages system work?

Question: There are 4 types of pages: Tumidum, Audere, Gratanter, Congeriae
I have 15 pages but only 1T 7A 7G and 0C this cant be random so how this work?
What should i do to get Congeriae page?
Answer: You get a Tumidum page by completing 4 helltower achievements. The other three are completely random, and are obtained by gifts on helltower.
Congeriae was recently introduced a couple days ago, which may contribute to the fact that you don't have any of them yet.
If you wish to farm spellbook pages, log in and play a game once an hour. You'll find that there is a gift spawn within 30 seconds of joining a server.
Answer: there are actually five page types. the fifth is in the games files but it isn't dropping yet. it is called veteris these pages have meaning
Pages of Gratanter - Swollen or distended; confidence
Pages of Audere - Having courage; being prepared
Pages of Congeriae - Chaos; collection or accumulation
Pages of Tumidum* - With joy or rejoicing
Pages of Veteris* - Long standing; ancient or experienced
tumidum is joy and rejoicing which would explain the unlocking via achievement.
congeriae is collection or accumulation so it might have something to do with the amount of pages you already collected
and 1 veteris page was unlocked after collecting 27 other pages.
as for the other two I believe they are just starter pages. pages you accumulate until you get the manntastic four achievement and until you've gathered enough pages to start collecting congeriae.


Why is formic acid stronger than acetic acid

Question: Even when acetate ion is stabilized due to resonance why is it a weaker acid than formic acid. It is true that acetic acid has +I effect due to methyl group present on it but resonance is a stronger effect than inductive effect. Then why is it so?
Comment: The resonance is identical in both ions.
Answer: In comparing acidic strength between molecules firstly make its conjugate base , by -H+. Remember the fact Stability of conjugate base is directly proportional to acidic strength of its corresponding molecule.  Also while comparing acidic strength check factors that are uncommon to all molecules and increase stability (check electronic effect and also steric hindrance should be kept in mind) .electron withdrawing group increases acidic strength and electron donating group decreases acidic strength. Here, after making conjugate base we have, formate ion and acetate ion. Uncommon part is CH3 bonded and H bonded to acetate and formate.Resonance in C double bonded to O bonded to
O- is common to both. Ch3 is electron donating thus decreases acidic strength. H bonded to C is reference and 0 inductive effect is taken for it.Thus, Acetic acid is weaker than Formic acid.


Proving That an E-mail Comes from a Website Owner - How? PGP Key?

Question: Is there a way to prove that a communication sent by e-mail or other means comes from the person in control of a website?
I'm talking about something fairly simple. Google, for instance when validating a website for Webmaster Tools or a domain for Google Apps, will ask you to put a code that they supply you into a text file located in the root directory of the website. But what I'm interested in is something that an ordinary, casual computer user could do upon receipt of an e-mail from a website operator to verify its provenance. The website owner may not have control of the domain itself or power to send e-mail from a domain address.
I've been reading up on PGP, but my head is spinning. But for instance, is this scenario possible?:

A long key code is published on the website.
In an e-mail another, different long key code is included.
O.K., now I'm starting to get confused.

I guess what I'm thinking of is that a recipient of a readable, plaintext message could somehow check something contained in the message against something on the website (maybe via an online web app, not any complex software that they would have to install), and they could be confident that the message came from the person in control of the website.
Ideally, this solution would be free as in beer and would not require the website owner to compromise his privacy or anonymity.
Specific recommendations of web apps or Macintosh (or Windows) apps or open source website development tools would be appreciated.
Answer: Sounds like you're after a digital signature method: http://en.wikipedia.org/wiki/Digital_signature. Publishing the public key on the website you control and signing emails with the corresponding private key is proof that you control the website.
Note that if the website is compromised in some way, the digital signature can be circumvented by the hacker publishing a different key. Better to buy a certificate from a reliable certification authority who act as a trusted third party to vouch for your identity.


How to obtained composite index using factor analysis on likert scale data

Question: I am analyzing the influence of social capital on household income. I have collected data through a questionnaire survey for my study.Different dimensions (variables) of social capital were measured using 5-point multiple likert items.The scores on each item was summed up to obtain the single value for each variable.Now i have 6 such variables and I want to perform factor analysis on these 6 variables to obtain a single social capital index for each household.My question is that can I summed up the factor scores (obtained through factor analysis) to obtain social capital index? if my approach is not appropriate, please suggest me some alternatives. I have to use this social capital index in multiple regression for further analysis.
Answer: There are 2 things that you are trying to achieve:
1. Summarise each of the 6 variables from their individual items
2. Summarise the 6 variables
For 1, you used the sum of the items under each variable as a representative score. This provides an uneven basis to compare the scores across the variables. A better way would be to use the mean of the items belonging to each of the 6 variables as the representative score for that variable. Also, have tou tried running a factor analysis on the items itself to determine if your 6 factor model is a good fit for your data?
For 2, I am unclear as to how you intend to use factor analysis to create a social capital index. Factor analysis would outline the relationships between latent factors and the variables. Here you would be assuming that they all belong to 1 latent variable which might or might not be the most appropriate factor model for the 6 variables.
For summation of the factor scores, you are assuming equidistant between the likert scales and unidimensionality of all the 6 variables which might be a stretch. An alternative would be to use the 6 factor scores in your multiple regression.


Session Timed Out - No Application ID US Visa

Question: I'm hoping someone could help me out. I was doing the online application (DS-160), however, the session timed out. I wasn't able to copy the application number nor save the application in time. The error message doesn't display the application ID as well, see below. Would it be fine if I make another application? I was around Part 2 or 3 of the security questions in the last part of the application.
Comment: You can [answer your own question](https://travel.stackexchange.com/help/self-answer).
Comment: okay-just got info that I can just make a new application as the old one wasn't saved.
Answer: As per the comment from the OP, the system will notify you that your old one wasn't saved, so it's safe to make a new application through the system, saving as you proceed this time.


Electric power and wired ethernet to desk in basement not against wall

Question: What's my best option for running electric and ethernet to my desk in the basement without having the desk against a wall? My ceiling is a bit low (79") so I don't want to do anything that significantly raises the floor and I worry about the possibility of water if the sump pump goes out in the midst of a storm. Is there an aesthetically pleasing drop from the ceiling possible or should I just do something with cord conduit on the floor?
Comment: Would a floor-to-ceiling column near the desk location work aesthetically in this space?
Comment: "Aesthetically pleasing" is very subjective. I'd probably opt for a floor channel, but that's me. I have no idea what your space looks like or how it's used, nor where you'd need to pull from.
Comment: It's space that's being newly renovated, so I have some flexibility in how to arrange things. At this stage, I can put electrical outlets and ethernet jacks anywhere I want.
Comment: How far is this desk going to be from the nearest wall?  What will be between the desk and that wall (walkway, furniture, etc)?
Comment: I'm thinking that it's about 3–4 feet, The gap will be where my chair is. On the other side will be built-in cabinetry, but as it's all new, I can do whatever I want there as well.
Comment: Is it too late to cut a trench in the concrete floor ?
Comment: @criggie nothing's too late yet.  I'm just wary of having an outlet on the basement floor and not sure I want a permanent raised electrical box.
Comment: You could wrap the dropped wires in fake ivy.
Comment: Donald, how complicated did you want to make what's really a much more simple Question?

Isn't the first thing a pro installer will ask, what being in a basement or against a wall might change? Then, how does your ceiling height matter?

A sump pump going out doesn't sound an unreasonable worry yet how likely is it?

What's "aesthetically pleasing" is your choice and why not just hide the cables, dropped or floored?
Answer: You don't even need a drop.
Just put boxes in the ceiling, or just below, and plug in. Your standard 6 foot line cord will reach the "relatively low" ceiling from the desktop, and ethernet drop cables are available in any length you like. Use cord/cable loom to "prettify" the cables if it makes you happier.
Alternatively, you know where the desk goes, so drop a false column (hollow, so you can hide boxes and cables in it) to that location - either onto the desk or all the way to the floor.
Comment: One of my customers did a fake metal column. We called it the Festivus pole.
Answer: There are no legitimate products which allow you to stick a conduit on the floor without also adding a layer to the floor to protect it and remove the trip hazard. There are some "put ramps on a lump across the floor" products but they're not rated for permanent installation of AC power lines, and they're all trip hazards. Regardless, I would not toss this together with extension cords given the potential to flood, which would be made much more dangerous by a frayed cord which was not noticed.
Honestly, your one sane play is to do a pendant from the ceiling.  Fan-rated box, uber-burly cables with embedded steel wire-rope, proper strain reliefs on the cables so you can pretty much swing from 'em if you wanna.  It can be done as tastefully as it can be done... but if your aesthetic standards are that high, then push your desk against a wall and be done with it.
Comment: Interesting. We had "ramps on a lump across the floor" in my old office that were installed permanently as the source of power for desks in the middle of a large open office setting. This choice was made after a raised floor was deemed to expensive.
Answer: I understand you've specifically asked about drops, but for completeness, I wonder if you've ruled out running the cables on the floor using a proper "cord cover" or "overfloor cord protector"; if you search for this you'll see a bunch of options, ranging from industrial ones you can drive a forklift over to ones that may be acceptable in a home office, depending on your tastes and on the kind of foot traffic you need to accommodate. I wouldn't worry about flooding, assuming the outlets at either end remain above water, and there should be no problem running an ethernet cable alongside a power cord for reasonable lengths. Cheaper and easier to install (and relocate, and remove) than a new ceiling box.
If you're confident the desk will remain where it is, the best balance for ease vs esthetics for a ceiling solution may be the Wiremold line of products, including their low-profile surface-mount outlet boxes. But I don't think code would allow low-voltage to share a box with AC so you'd be looking at two parallel runs.
Comment: You can share a box with a listed divider separating low voltage from line voltage, but two boxes is usually the better option anyway.
Comment: Yeah, there are entire lines of surface raceway products made with a built-in divider for exactly that purpose
Comment: Thanks, good to know. But the 14/2 would need a separate box entrance, and thus separate raceway, from the cat-5, right?
Answer: You have exactly four choices - Down from above, up from below, sideways, or do without.
Do without is silly - you need your power connection and ethernet is only a little bit more.  Not a solution.
Down from above would put your jacks/sockets in the ceiling, and you reach up to connect wires which hang down under their own weight.  This is workable, but somewhat ugly.  Personally I'd prefer a clear sight line across the room.  One consideration is to use the new slimline patch cables which are only 2mm across, not 3.2 mm like traditional patch cables.
Sideways would bring wires over the floor, or across the back of some furniture.  Depending on the room and your layout, this might be okay.  But it sounds like you want an island desk in the middle with walkway space all around.  Any hump will be a trip hazard.
Up from Below is your best option.  That could entail either:

a shallow trench cut across the floor, and some "lid" sections placed on top.    Imagine a scaled-down version of this, perhaps 50mm square, with a series of top-plate covers sitting on top of a 20mm overhang/step/recess.   If the rest of the floor gets covered in carpet or similar, then each plate can have a piece of carpet on top.  It will never be invisible, but you should be able to walk over it without catching a foot, and roll a wheelie chair over with no more than a minor bump.  This would let you lay a power extension cable and some ethernet cables in the same trench, then bring them up to a power multibox at your desk.  At the wall end, they would connect to normal wall sockets so would be easily replaceable.

Second option would be to embed a conduit or pipe into your concrete floor, so its invisible in the walk space.  There might be an access panel in the corner and another under your desk, or you might choose to use a couple of larger radius bends to raise the pipe above the floor level at both ends.  Imagine this but in concrete, not dirt:
   but use smooth pipe not that ribbed stuff.
Also remember to lay draw wires through the pipe for future-you.

There will be a difference in requirements between a "permanently installed" power cable to a fixed socket/recepticle, vs an  extension cord laid into a channel.  Your local code and requirements may have something to say about channels etc.
Also, there is some chance of crosstalk between power cable and copper ethernet cable in the same channel, and also some regulations require separation of low voltage mains from ELV data wires.  A trench might require a metal divider plate down the middle to isolate mains from data.  A local elechicken should have better knowledge of Code as it applies to your area.
Lastly, consider these tunnels can turn into literal rat-runs, so adding some blocks to stop draughts and rodents can be a wise plan.  Less of an issue if its all in the one room.
Sorry my google-images-fu was weak today.
Answer: Have you considered a setup like this? This is my office in the basement that I finished. Technically the desk is not against the wall but is attached to shelving on the side. I love it! I have access to tons of storage on my right, all my wired connections run under the desk cord management rack, as well as desk mounted extension outlet (something like this https://amzn.to/33Zst0H), and I even have a network switch on the bottom of those shelves that feeds my secondary wireless access point as well as printing devices. Doesn't feel like I am against the wall at all. Bestnof all, no ugly cables in the floor or ceiling.
The desk is an older version of Ikea's Kallax, with solid side instead of current version https://www.ikea.com/us/en/p/kallax-workstation-white-s19123063/ but same principle applies.


Set iOS Appstore notification default style

Question: When submitting to App store can we have the default setting on the notification center set to Alerts rather than banners?
Answer: No. Anything within Settings.app in iOS devices is in the explicit control of the user of the device. Third party apps are not given access to change system settings and cannot set them to specific values (either while submitting an app to the App Store or during first run or at any other point in time).


"Z," "Tab," "1," and "ESC" keys are acting weird

Question: If I press the Tab key, it opens a window to shutdown, log off, etc. the computer. The Z key does "undo". The number one key reloads the page. The Esc key acts like Ctrl+Alt+Del. If I try to use any of the keys, it won't work unless I press it quickly multiple times. I don't have any sticky keys enabled under System → Preferences → Assistive Technologies.
Comment: Could you please update your question with the version of Ubuntu you're using and the make/model of your computer?
Answer: Sounds like your CTRL key is stuck (CTRL+Z is normally undo). Try a different keyboard (if on a laptop, try an external one) to see if that works.
Also try cleaning your keyboard.
Comment: The only way to get it unstuck is to clean it. SUCCESS!!!
Comment: Thank you. I just plugged in my USB keyboard, and it worked, is there a way to get the key "unstuck?"


How much information can my ISP see?

Question: Is it possible for my ISP to see the passwords that I enter on websites and in chat programs? And what about SSL websites that start with https, do they encrypt my username and password before reaching the ISP?
Comment: Is it *possible*? Yes for **non** SSL stuff (which isn't foolproof, but I'm trying to keep this short and practical). Is it likely? Not so much.
Comment: Related: [Can my ISP monitor me?](http://superuser.com/questions/23612/can-my-isp-monitor-me)
Answer: If you start at an https:// address, everything is encrypted between your computer and the remote server, so your ISP can't intercept any of your data†*.  Your ISP could easily view any non-ssl (http://) connections though.
Note that the firesheep firefox plugin exposed a hole in this mechanism last year.  Many websites use https just for your initial login and then switch back to http for the rest of the traffic.  In this case your ISP could intercept your traffic after you logged in.  Someone else on your local network could also run the firesheep plugin and hijack your session with say facebook and impersonate you.
Most large websites are now transitioning to https all the time to fix this hole.  It's not really something you need to worry about on your home network too much, but you should be aware of how this works.
† Assuming you're not ignoring certificate warnings, and your computer/browser has not been compromised.
* It can also see the hostname you're requesting from a possibly shared host. Since TLS1.0 the hostname is transmitted in plaintext (SNI)
Comment: @Arjan - with that edit this answer is much better. Cheers.
Comment: Also, should note that other protocols (i.e.: `telnet`) are cleartext-only.  YMMV with chat protocols.
Comment: Yes the warning about chat programs is a good one, as they may use different protocols.
Comment: @Iszi Nobody uses `telnet`, I assume? I only ever used such things for fun (sic).
Comment: @CamiloMartin You'd be surprised. The first examples that come to mind are MUDs. I'm sure there's others.
Comment: @Iszi Never played those, but it still is "for fun", in a weird way. Now, I do hope that there aren't people logging in into legacy systems from `telnet` or anything other that is sensitive...
Comment: Is the URI of the request also encrypted?
Comment: How about the DNS request for `https://www.somesite.com`? Can't the ISP know that you tried to access this website, although the content of your communication is encrypted?
Comment: Yes, your isp can generally see all your dns requests.  I see that there is a solution to [encrypt your dns traffic](https://www.opendns.com/about/innovations/dnscrypt/) but that is something you would have to set up yourself.  Another option is to use a third party vpn service like [IPVanish](https://www.opendns.com/about/innovations/dnscrypt/) to encrypt all your traffic, including your dns requests.
Comment: @PhilHollenback, However, if the malicious ISP can spoof and hijack your IP packets, wouldn't it be able to crack your TLS ?
Answer: I think you might wanna watch the following video from 27th Chaos Communication Congress (CCC):
"How the Internet sees you: demonstrating what activities most ISPs see you doing on the Internet"

Info Page
Video (embed) and mp4 to download
Pdf of the speak
Answer: Philiph is right for "If you start at an https:// address, everything is encrypted between your computer and the remote server" with one caveat: all you know with HTTPS is that everything is encrypted between your computer and somewhere else.
There is a risk that your communications could be tampered with at the ISP using a man in the middle attack — and if you think that that can't happen, see the news about Tunisia which shows what can happen if a malicious agent has access at ISP level.
This can only be avoided if:

A user always uses the correct https:// URL.
A user does not ignore certificate warnings.
The user is 100% sure their computer has not been tampered with.

Otherwise, an ISP could tamper with the connection in a way a non-tech savvy user may not notice.
Comment: I deleted some comments, now orphaning @weeheavy's comment a bit, in which "wrong" was directed towards me, not towards the answer: those appliances can only work in corporate environments, where the browser has been set up to accept fake certificates.
Comment: Okay, cleaning up then. (What about using [the Markdown source](http://meta.stackoverflow.com/revisions/6c0ca044-da6d-4f8c-aaf3-bf2c54ea7892/view-source) for better formatting and linking?)
Answer: Sure, your ISP (or someone else using their equipment without permission, which is a serious risk in and of itself) could read unencrypted data that goes through their network. Typically, unencrypted traffic includes e-mail, web, and FTP traffic unless specifically encrypted using SSL or TLS, as in the HTTPS protocol.
Also typically, your ISP would prefer that at the very least, the passwords you send over the internet (in particular, for their e-mail accounts) are encrypted, so as to prevent attackers from compromising a router somewhere - like your wireless router with the default password - and gaining access to their servers. While the government could force an ISP to listen to your traffic for their purposes, a much greater threat to you exists from people who would love to steal your private information and/or money.
Comment: Does TLS block the case whereby "government could force an ISP" to hack you?
Answer: Not directly an answer to your question, but passwords are more often stolen using either a keylogger (software illicitly installed on your PC that records all your keystrokes) or social engineering, such as phishing. (Phishing is sending email that tricks you into logging into a "fake version" of Facebook or whatever, thus revealing your password to the phishers, and then redirecting you to the real one. Most victims don't even realize at first what has happened.)

How much information can my ISP see?


zip file downloaded: is it enough to remove it to be secured?

Question: I downloaded a zip file, with vb files inside. If by any chance, it contains a virus, or a source code to have access to my computer, what should I do? I removed the zip file and the folder extracted, empty the trash, and reboot my computer. I have seen once that one can enter a computer just by downloading a file, is that still true if the file has been removed? I have got Little Snitch on Mac to check if a communication is made with the outside.
Comment: Unless you ran the files within the zip file then you were not infected.  Furthermore VB files on OS X cannot be ran.  Visual Basic is a Windows only programming language.
Comment: @Ramhound, that's generally true, but there have been exceptions. File previewers and the indexing service have been compromised before, causing an infection simply by storing the file. He's probably still OK, though.
Comment: @JohnDeters the files in question Could Not run on OS X even if they wanted too
Comment: if you only download or  never unzip  the folder or run any file then its ok you can delete that  its enough to remove that  zip
Answer: Whenever you download files you must be sure that you've turned autorun off, because some batch files or vb files or the java prompts asks your permission to allow the programme to run and they are always with fake prompt like some security issue for your computer. And one more thing you should be aware of is, you can check the directly connected network to your system and if any IP of different network is there it means someone else you don't want connected to your system and hence can send payloads to your system.
After getting known to the malicious activity in network you just can restart your system or delete the files which you've downloaded or end the services which may turned on due to that files.
Or better you can take help of a strong firewall security.
Comment: "_I have got Little Snitch on Mac to check if a communication is made with the outside._"

If this is on your mac, AutoRun and VB Files are no longer an issue. That's not saying that the infection from the zip file isn't possible, but it's highly unlikely.
Comment: thanks, so as long as I delete the files, (I did not open a program though, just the zip file which contains vb files), is there still a way that something was already sent to another computer (like ip, etc.) that can allow to enter in my computer (even if the files are deleted)? So without the files in my computer and after I switch off the computer: can one still enter in my computer? Just to be sure Thanks
Comment: this is fine as long as autorun is turned off, but in the case autorun is not turned off how do you know what the malicious code may have done/installed on ur system. The only way to know is by running a full system scan to ensure that nothing else exists.
Comment: thank you for your answers, I don't know what autorun is, is it turned off by default? Anyway I am a bit more relieved with the answers, thanks


A slick proof that a field which is finitely generated as a ring is finite

Question: It is a known fact that if $k$ is a field that is finitely generated as a ring, which is the same as having a surjective ring homomorphism $f:\mathbb{Z}[x_1,\dots,x_n]\to k$ for some $n\in \mathbb{N}$, then $k$ must be finite. Since finite generation as a ring implies finite generation over the prime field ($\mathbb Q$ or $\mathbb F_p$), by Noether normalization it follows that $k$ must be a finite extension of its prime field. In positive characteristic this finishes the job and in zero characteristic, should lead quickly to a contradiction, though I don't see immediately how. Is there an elementary/slick proof of this fact?
Comment: Dear KotelKanim: Please see [this answer](http://math.stackexchange.com/a/95748/660).
Comment: @Pierre-YvesGaillard: Per chance you can give one extracted answer, as this is not precisely a duplication, is it?
Comment: Dear @awllower: It's kind of ironic, because the answer I gave [here](http://math.stackexchange.com/a/95748/660) didn't answer the question in the exact form it was asked (because the answer was slightly stronger than needed), but it answered *exactly* the question asked *here*. I could make a copy and paste of the previous answer, but I thought things were clearer that way.
Comment: Yes indeed, this can simplify things a lot. Also, this situation is not devoid of resemblances to many other great discoveries in the history of the science indeed.
Comment: The answer in the reference is great. I just wanted to check if by chance there is an elementary argument that I am missing. It is still surprising for me that the zero characteristic is not trivial. thanks.
Comment: It's a 'little bit' late, but there's a short proof of this as Lemma 1.1 here: http://dept.math.lsa.umich.edu/~mityab/beilinson/SamREU07.pdf
Answer: One approach is via the theory of Hilbert-Jacobson rings.  There are several equivalent definitions, including that every prime ideal be the intersection of the maximal ideals containing it.  From this it is easy to see that a PID, for instance, is a Hilbert-Jacobson ring iff it has infinitely many maximal ideals, and that in particular $\mathbb{Z}$ is a Hilbert-Jacobson ring.
Now here is an important and useful result about Hilbert-Jacobson rings:
Theorem: Let $R$ be a Hilbert-Jacobson ring, and $S$ a finitely generated $R$-algebra. Then:
a) $S$ is a Hilbert-Jacobson ring.
b) For every maximal ideal $\mathfrak{P}$ of $S$, $\mathfrak{p} := \mathfrak{P} \cap R$ is a maximal ideal of $R$.
c) The degree $[S/\mathfrak{P} : R/\mathfrak{p}]$ is finite.
(This result and its proof can be found in these notes: see Theorem 283 in $\S 12.2$.)
In particular every field which is a quotient of $\mathbb{Z}[t_1,\ldots,t_n]$ has finite degree over $\mathbb{Z}/(p)$ so is finite.
Comment: This is a nice approach. I should get more familiar with Hilbert rings.
Answer: The simplest proof I know is the one here.


Ctrl+key shortcuts are not working in a tty

Question: I just installed Slackware on my laptop and all Ctrl+key shortcuts are not working in a tty. For example Ctrl+C or Ctrl+L do nothing.
I verified that the Ctrl key worked with the showkey command.
Any ideas?
Answer: I had to change my keyboard layout to azerty instead of fr.
It can be changed in /etc/rc.d/rc.keymap:
#!/bin/sh
# Load the keyboard map.  More maps are in /usr/share/kbd/keymaps.
if [ -x /usr/bin/loadkeys ]; then
   /usr/bin/loadkeys uk.map
fi

uk.map shows that UK layout is being used here. More keyboard layouts can be found in the directory /usr/share/kbd/keymaps.
NOTE : This setting only applies to the console before you start the X server (GUI).
SlackWare documentation here explains how to set the system-wide keyboard layout ( for Slackware 13.0 , 13.1 , 13.37 and 14 ) and for particular desktop environment.


How stop my drill bits from rusting?

Question: My large collection of drill bits were found beneath an unfortunate leak in the garage. Some of them are beginning to rust along with my collection of screws  and nails. Effective rust removal / prevention ideas are needed. I've tried WD 40 to prevent further deterioration but hasn't made much difference; rust seems to slowly spread throughout my collection. Even things that hadn't got wet are going rusty.
Comment: Store them indoors in a dry, warm environment. If the garage leaks water and has high humidity, things will rust, so attend to the leak first.
Answer: This may be considered a product recommendation, which is frowned upon. I'll attempt to make it appropriately broad to avoid the question and answer from being closed.
Paraffin (wax, not kerosene) based products have performed well in the high-humidity environment of the Southeast US. White Lightning is a bicycle chain lube which has dissolved wax in a solvent that later evaporates. Great for bike chains, but also a good rust protectant. Boeing T-9 is superior to White Lightning and is effectively the same composition.
I've installed hurricane fabric using expanding concrete anchors which are typically galvanized. In the humidity, they eventually rust or deteriorate enough that it's challenging to spin the nut on without tools. Applying the T-9 at time of installation has allowed five years of protection and I can still spin the nuts on by hand.
There may be other wax based products that would provide similar protection.
In the case of drill bits, once used, the coating would have to be re-applied. My drill are in a drill index case, for obvious convenience and there might be some scraping of the protection as the bit slides in and out.
The remaining option would be to enclose the bits in a container with desiccant to keep humidity as low as possible. This could become a nuisance as one would have to refresh the desiccant periodically to ensure protection.
Answer: rust can be removed from tool steel parts by soaking them overnight in phosphoric acid, which is sold as concrete etch or concrete prep at hardware stores. This product is used to prepare cracked concrete for patching and comes in gallon jugs.
afterwards, rinse thoroughly and remove residue with a wire brush wheel on a drill press.
Then completely wet the bits with WD-40 and store them in a tupperware container with a tight-fitting snap-on lid.
Answer: I thought I'd add this as an answer, because it is an answer really, rather than a comment.
I always keep my drill bits in those small, tough little plastic bags (screw/nail bags?). They wrap up neatly, and you can keep old/new, wood/masonry drill bits in separate bags for quick picking.
It won't stop a flood, unless you use resealable bags. I don't because I like to get to them quickly, and I don't see the need anyway.
Mine have been fine wrapped up in those tough little bags.
Maybe spray a spritz of W-D in the bag to coat them to help keep them moisture-free would help, too.
Once rust starts spreading, you need to remove the rusty ones from the good ones. If the rust isn't too bad, you could remove it with a wire brush or something.

How stop my drill bits from rusting?


what extra circuit to make a LiPo charger to a LiPo charger can sharing load?

Question:
As a (LiPo charger)(Charger A), I refer to this
(LiPo charger can sharing load)(Charger B), this

So, I have a LiPo battery with protection module. Can I just connect the LiPo and a LOAD in parallel to (Charger A) B+ B-, in order to do the same as (Charger B) (LiPo to B+B-) (LOAD to OUT+OUT-)? I think not? Here, let me call the diff. between (Charger A) and (Charger B) ( the DW01A and FS8205A part) a "extra circuit".  Since my LiPo already have protection module. Can I skip parts of the extra circuit? Or do I need to add full part of the extra circuit? To build a (Charger B) from (Charger A)?
Comment: Can you please draw a diagram? I'm having trouble visualizing what you describe.
Comment: OP, I think you mean something different than load sharing.  Load sharing is when you have two of the same power supply and you use them both together to power a load.  I think what you mean is an additional 5V output circuit, meaning that the slightly larger board if input 5V power will pass 5V through and charge the battery at the same time.  If power is not available on the input it will step the battery voltage up(or down) to 5V and power the output that way.
Answer: As I interpret the question, it is about how to make a low-voltage uninterruptible power supply. You can't simply connect the charger and battery to your load even if your battery has DW01A protection circuit. You will need a "power path switch", which will disconnect the battery from load in case if the external 5V power is permanently present, and switch to battery power only if the external source is lost.
The reason is that your battery will be overcharged when you will keep the charger feeding both your load and charging your battery, the battery will be overexposed to charging voltage.
There are two kinds of overcharge: overvoltage (and DW01 will protect your battery from that), and overexpose to nominal charge voltage, from which the DW01 won't protect, it doesn't have the charge threshold protection. Charge termination is a function of TP4056, but since your load will still consume some current, the termination condition might never occur, and TP4056 will think that the charge needs to be continued. This will quickly damage your cell.
That's why all reputable battery-powered systems employ extra circuitry called "power-path switch", which is usually embedded into charger, or there are stand-alone ICs with this function. An example would be this simplified diagram, from Texas Instruments:

As one can see, the battery is not connected directly to system load, which allows the charging section of IC to complete the standard Li-Ion charging cycle and disconnect when battery is full. And then charge it in trickle mode if external source is permanently there.


Issue when Undertow used with spring boot app

Question: I have a spring boot app running with default embedded tomcat (with tomcat jdbc connection pooling). It is production and running fine. I am using mysql as my database.
I am now doing some stress testing in my test environment and trying to see if I get any obvious benefit if I switch from embedded Tomcat to embedded Undertow. People claim to get visible improvement in their throughput by doing this due to the asynchronous nature of undertow request handling.
I know how to exclude tomcat and add undertow to boot app. After doing that, I am trying to run my stress-testing script to roughly generate 500 requests per second, run it for 5 minutes under this load and see how it behaves. When I do this, after initial few seconds, I start getting jdbc exceptions as given below intermittently.
<code> org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection
     at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:431) ~[spring-orm-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
     at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373) ~[spring-tx-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
     at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:426) ~[spring-tx-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
     at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:275) ~[spring-tx-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
     at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
     at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136) ~[spring-tx-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
     at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:133) ~[spring-data-jpa-1.10.2.RELEASE.jar!/:na]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.2.RELEASE.jar!/:4.3.2.RELEASE]
</code>
It means jdbc connection can not be acquired.
NOTE: If I remove embedded undertow and again add embedded tomcat to my app, then same test runs fine without any jdbc-connection related exceptions.
My underlying Tomcat-jdbc-pool has 100 db-connection. For undertow, I tried with 100 worker threads and 100 io-threads.
I also tried using HikariCP instead of default tomcat-jdbc-pooling. I tried HikariCP with maximumPoolSize=100 and connectionTimeOut=60000. Again embedded-Tomcat+HikariCP runs fine under this stress-test. But embedded-Undertow+HikariCP gives similar exceptions.
So there is something different happening when I bring in Undertow in the picture. But I am not able to understand it. Please note that these exceptions come intermittently, but come for sure in every run of my stress-test when Undertow is used.
I generally searched for such issues. In general I don't find such common crib for Undertow.
Any help to analyse the situation will save lot of time.
Comment: Hey, did you find a solution to this ? I'm experiencing the exact same problem when running Spring Boot tests (using embedded undertow) with Junit 5... Though it works fine locally, it fails when running on AWS Codebuild machines
Answer: First of you you might be better off changing things one at a time to reduce potential issues.
Undertow - 100 IO threads is way too many. You should probably stick with the default here which is I believe 1 IO thread per core. IO threads only job is to manage the open connections and handle any non blocking work. JDBC SQL queries are blocking so you need to ensure any endpoint that blocks will dispatch the request to the worker threads. You can use the BlockingHandler for this, I'm not sure how to do it with Spring. Again 100 worker threads might be a bit excessive the default is a lot lower I believe 20-30 range. Make sure this is working correctly with your existing connection pool BEFORE switching to HikariCP. I would suggest just leaving the thread pools at their defaults to start and make sure you are dispatching to the worker threads.
HikariCP - 100 connections is also a lot for HikariCP unless you have tons of very very long running queries. More info about connection pool sizing.
Don't try changing both at the same time. It will be harder to track down what is going on in that scenario.


Application performance Optimization for AppHarbor

Question: My ASP.NET Web site application, which is hosting REST based WCF services and deployed on AppHarbor loads too slow. How can I optimize to get better performance?
Answer: .Net applications go in sleep mode when not used a lot. When the first request hits them, it takes a while to get out of 'sleep mode'. That's why I use pindom to 'ping' my sites every minute, to keep everyhting running smooth.
This is after every deploy and application pool recycle.


Is there a biological description of "chakras" or is the concept of "chakras" mere pseudoscience?

Question: It is widely claimed that we have many chakras(7 major chakras) situated at different locations along the spinal cord. Each of the chakras is said to be associated with certain energy channels, the activation of which leads to heightened control over certain aspects of one's being and life. Has there been enough scientific inquiry in this topic? What could be the reasons for this claim?
Comment: @Shubmam Kumar You find some discussion about chakras at https://hinduism.stackexchange.com/questions/tagged/chakras The chakra-concept is not a scientific concept.
Comment: @ChrisDegnen, the brain and torso have glands all over. You could hardly pick a spot that isn't within two or three inches of a gland, and some of the chakra are no closer than that.
Answer: If we define science as the investigation of nature from a naturalistic perspective (as opposed to a supernatural perspective), then the chakra are a part of an ancient scientific theory. In this sense, scientific medicine in India and China probably predate scientific medicine in Europe (Greece), although the earliest known naturalistic medical theories are from Mesopotamia and Egypt.
In ancient Mesopotamia, they divided medicine up into what we might call surgery and sorcery. The surgeons dealt with injuries and got their training on the battlefield, so they had genuine experience to guide their practices, and they had some good techniques. The sorcerers, of course, dealt with demons and gods, which probably had a placebo effect but was otherwise useless. However, they did have useful examination practices and were reasonably competent at prognosis if not treatment.
The earliest known document of naturalistic medicine is the Kahun Gynaecological Papyrus. It seems a bit comical to read it now (everything is caused by secretions of the womb) but it is notable for being naturalistic; that is, the causes and treatments were natural; they mostly didn't refer to supernatural beings. Curiously, Egyptian medicine seems to have been more oriented toward the supernatural in later times than it was when this papyrus was written.
The problem with ancient medical science such as chakra or the Greek four humors (India also had four humors, though it's not as well known) is that although the doctors were seeking natural solutions, they simply did not have the tools to test their theories outside of the field of surgery. They did not have the instruments of today, nor the notion of statistical studies.  Consequently, all of the medical (as opposed to surgical) theories of that time are wrong and mostly useless for the treatment of disease. In some cases such as the Hippocratic practices of bleeding and of using blistering agents to worsen infections, the practices were actually harmful.
So, in short: yes, the chakra are part of a scientific theory, given a generous-enough concept of science, but they are an outdate theory that ought to be discarded now that we have better theories tested by much better experimental evidence.
Comment: @CriglCragl, I've added a mention of the placebo effect.
Comment: "The sorcerers, of course, dealt with demons and gods, which was useless" You could relate it to psychology, social engineering, & the placebo effect, though.
Answer: To the best of my knowledge there is no known biological mechanism that relates to the chakras.  That's not to say that it's pseudoscience necessarily, unless the proponents claim that there's a scientific basis when there isn't one.  It may or may not be that there's a biological basis for these regions that we are yet to understand.
Answer: To assert that there are such things as Ajna or Agya that are claimed to be the subtle center of energy, where the tantra guru touches the seeker during the initiation ritual is at best metaphorical, therefore it is a pseudoscience. Science does not metaphorically state that a neuron releases X and Y chemicals, it is empirically proven.
Answer: There is some correspondence with the endocrine system, e.g. Hormonal Health - Revealing the Secrets of the Endocrine System.

Hermeticists and other esoteric philosophers noticed that every chakra
is linked to an endocrine gland: the crown chakra with the pineal, the
brow centre with the pituitary and hypothalamus, the throat centre
with the thyroid gland, the heart centre with the thymus gland, solar
plexus with pancreas, sacral chakra with the reproductive organs and
the base chakra with adrenals.
Answer: The clearest and best articulation of the science/pseudo-science border was made by Karl Popper.  Popper was trying to characterize what was wrong with his psychology professor's claims that

symptom X confirmed the diagnosis of (a Freudian neurosis)
The lack of symptom X would also confirm that same diagnosis
The Freudian method was scientific

Popper's solution was to clarify that science requires not just observations and detailed theory, and "confirmations" but also refutations.  And any claim to be "scientific" which allows one to explain any possible outcome is not actually science, but is pseudoscience.
Popper's criteria captures an essential feature of science.  Subsequent thinkers have noted that Popper treated refutations as more fatal than science actually does.  For example, the Big Bang Theory has been widely accepted, despite at any given time it its history there being up to a half dozen refuting observations.  Subsequent work either adapted the theory, or found the observations to be in error. Imre Lakatos proposed a slightly less stringent version of Popper's boundary, where science engages in Research Programmes, which are productive families of a theory, and at any given time a Programme may be working to address challenging observations -- that is ongoing work in the programme.  But for it to be a science Programme, its pursuers have to accept the possibility and sometimes actuality of contradictory observations, and the need to correct/modify the theory to adapt to those observations.
Science is a narrower category than naturalism.  Methodological naturalism is the use of observations, theory, testing, and modification of theory to understand a subject.  Science is a stricter formalization of this process.  One uses informal methodological naturalism to learn how to hit a ping pong ball, to develop skill in welding, or in earlier eras, to fletch an arrow.  Ayurvedic medicine includes Chakra theory, and was developed through informal methodical naturalism.  Traditional Chinese Medicine, which includes Chi theory and acupuncture, was also developed through informal methodological naturalism.  Neither tradition is "pseudoscience", they instead are pre-science naturalist/empirical traditions, whose current theory was developed over eons of informal empirical modifications.
Note my usage of natural/supernatural allows for the spiritual aspects of both theories to be "natural", so long as they follow an empirical/correction process.  This is how "natural" is used in science.  Both ayurvedic and traditional Chinese medicine have been the working assumptions behind multiple contemporary controlled scientific medical experiments.  They both can be and have been treated as scientific Research Programmes, so both can be science.
Your question equivocates the scientific use of natural/supernatural with its usage in metaphysics theory.  A medical theory can be "natural" per science and not have a "biological basis".  In contrast, in metaphysics, Physicalists in particular like to describe anything spiritual as "supernatural".  This definition is fine -- there are many definitions for basically every word.  But this is a metaphysical/ontology usage, not a scientific one.  Spiritual theory is not necessarily immune to testing and error correction, and physical theory can easily end up being structured so it IS immune to it, as Popper's psychology professor illustrated.
Chakra theory CAN be "pseudo-science" depending on the attitude of the user of it (dogmatically claiming everything one sees confirms it) and the strength of the claims made by its advocate (to be pseudoscience, per Popper, one must falsely claim to be scientific), but it is not intrinsically pseudoscientific. It is instead a pre-scientific informal empirical theory, that postulates specific features of a spiritual world, and that includes matter/spirit interaction.  And it has been used as the working assumption behind medical Research Programmes, which are explicitly scientific, per Popper and Lakatos.
Answer: Most educated people think the flat earth theory is a joke. But actually it is scientific. At first glance, the earth looks flat. And this is a useful approximation in many Newtonian problems. Of course, the earth is not flat, it is spherical. Nevertheless, this is a theory that arose later. And it's important to recall here that scientific theories on the same subject are successive approximations, sometimes involving a paradigm shift. Thus the flat earth theory occupies a very special place in the history of astronomy as one of the very earliest of theories.
However, if someone presented the flat earth theory as an upto date scientific theory, he would be simply wrong. It isn't. Is it pseudoscience? Well, it's not a pseudoscience in the way astrology is. This suggests that one ought to have a typology of pseudosciences and the like.
Now, according to Wikipedia, "chakras are various of focal points used in a variety of ancient meditation practises, collectively denominated as tantra". This makes it more complex to evaluate as it combines both physiology, psychology and religion. They also note the following verse from the yoginihrdaya:

Shining she holds

The noose made of the energy of will

The hook which is the energy of knowledge

The bows and arrows made of the energy of action

Split into support and supported

Divided into eight, bearer of weapons

Arising from the chakra with eight points

She has the ninefold chakra as a throne

They also say:

The chakras relate to subtle body [spirit], wherein it has a position but no definite nervous node or precise physical connection. The tantric systems envision it as continually present, highly relevant and a means to psychic or emotional energy ... it is useful in a type of yogic rituals and meditative discovery of radiant inner energy and mind-body connections.

Hence we can provisionally say it belongs to the kind of science that say psychoanalysis belongs to - in the Indian tradition of medicine. But given that modern science has completely supressed the notion of spirit, it is not an exact correspondance.


Do small dogs cuddle more than large dogs?

Question: I wonder if small dogs are more cuddly than large dogs. It makes sense in terms of heat preservation, but I wonder if it's true.
Comment: I have no sources, but I expect it depends a LOT on the dogs personality. Check out Irish Wolfhounds... many of THEM love cuddling, and they are HUGE!
Answer: I'm not aware of any scientific research on this subject, and to really adequately answer this question you would need a study with a HUGE sample size and a way to objectively measure "more cuddly". For example, if you measured the time the dog spends cuddling, you'd have to control for the amount of time the people in the household are able/willing to cuddle. It could very easily turn into a huge experiment and be very difficult to analyze.
I suspect that there's also a huge amount of variation based on personality differences of each individual dog and the life stage of the dog (in my experience, cats get more cuddly as they age. I suspect dogs would follow a similar path).
If you want to select a dog breed/type who is likely to want to cuddle, I suggest looking for a rescue that does home fostering. Home fostering gives the fosterer a chance to see how the dog behaves in a home, and most of these rescues will let you talk to the foster to determine if the dog will fit well into your home and lifestyle.


Display records in visualforce page

Question: I need to display  all case records which are present in organization in a table format by using visualforce page
Answer: You should refer to Salesforce Trailhead and the Visualforce Basics module. The chapter 'Displaying Records, Fields and Tables' will show you how to achieve this.

Display A Table
Use  to add a table of data to a page. What
  exactly is a related list? What does  do when you
  add it to a page? It grabs a list of similar data elements. For
  example, a list of contacts for the account. It sets up a table with
  columns for each field, headers atop each column, and so on. For each
  item in the list—for each related contact—it adds a row to the table,
  and fills in each column with the appropriate field from that record.
  You can do the same thing in your own Visualforce markup using
  iteration components. An iteration component works with a collection
  of similar items, instead of on a single value. For example,
  {!Account.contacts} is an expression that evaluates to a list of
  contacts for an account. You can use this expression with an iteration
  component to create a list or table with details of these related
  contacts.

<code><apex:pageBlock title="Contacts">
   <apex:pageBlockTable value="{!Account.contacts}" var="contact">
      <apex:column value="{!contact.Name}"/>
      <apex:column value="{!contact.Title}"/>
      <apex:column value="{!contact.Phone}"/>
   </apex:pageBlockTable>
</apex:pageBlock>
</code>

A table listing the account's contacts is added to the page, with just
  the columns you've chosen.

The key Visualforce attribute here is apex:pageBlockTable. This tag generates the markup for a list view or related list table in the Force.com GUI. It is bound to a collection of objects and each row rendered is an item in that collection.
Answer:
Use below blog for custom pagination. Instead of Account object use Case object.

http://www.redpointcrm.com/add-pagination-to-your-visualforce-pages-using-the-soql-offset-clause

Pagination with a List Controller

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_sosc_pagination.htm

Display records in visualforce page


How to open older .imovieproject files (folders) in iMovie '09

Question: How do I open older .imovieproject files (they're actually folders folders) in iMovie '09?
I don't want to import the assets of the old project, I want the actual project to open on iMovie '09.
Answer: You can't, actually. iMovie '08 and subsequent versions are a completely different program from iMovie HD 6 and previous versions.
However, the last released version of iMovie HD does still run on modern Macs. It used to be a free download for users of iLife '08, but Apple has since removed it (IMHO, to "encourage" power users to upgrade to Final Cut Express, since iMovie '08 was utterly useless if you happened to have been one of the few who knew what they were doing).
It is still possible to download and install iMovie HD through some avenues of questionable legality.
Comment: Ok, downloading... Is it possible to export the project from iMovie HD to something that iMovie 08 will open?
Comment: @Rafael Unfortunately no. You can export the finished product, or, like you saw, import the raw clips and then remake the project in the new version.
Comment: Wow, that sucks! How can they release a program that totally ignores saved files from older version of the program!?? That's just BS from Apple.
Comment: @Rafael Like I said, it's a completely different program. I guess having a timeline that advances by frame is too complicated for us mere mortals to handle.
Answer: Had this question myself since I couldn't get the folder to be registered right due to the incompatibility.  Then I realized the "Media" folder in my .IMovieProject folder contained an MOV file I could just re-use in a new project.  Shame to loose my minimal editing, but at least I have something.


How to delete corrupted directory

Question: While copying music to the sd card of my android phone, the laptop froze so I had to reboot it using sysrq magic. Now any file manager on my Ubuntu or Android shows a directory 0 bytes big, and undeletable. It's type is inode/x-corrupted The ls command ran from root user on Android, doesn't show the directory, however. The Internets tell me that I have to find out the inode of the directory, but when I do ls -i from my Ubuntu, it shows every others directory inode, and an I/O error on this one.
What do I do to get rid of it?
Comment: Have you tried fscking it?
Comment: @PSkocik I dunno how. fsck doesn't like it, I googled it and I dunno what to install to use `fsck.ntfs`. I have Ubuntu and I've searched *ntfs* and *fsck* in Synaptic, nothing useful came up
Answer: I had a similar issue with my SD card recently. I was not able to fix it under Linux. However, as soon as I plugged the card into a Windows machine, the system came up with a message asking whether I want to repair the card as apparently it was not unmounted correctly. The repair under Windows helped.
Answer: how about running a file system check on the SD card?  insert the card and under linux run
fsck /dev/mmcblk01p1

for example. If you're note sure what's the name of the device name given, just see dmesg upon inserting the card. Aaand do not forget to umount it prior fsck

How to delete corrupted directory


SharePoint 2016 - Set Content Approval issue

Question: I created a work flow to approve the documents in my share point library. I created work flow by doing steps mentioned in the attached image. Here I received an error with status code 409. Then I become to know the Etag is required for the files while doing set content approval action. But Etag is not able to find during search. Please guide me to achieve this.
Answer: I also struggled with this. In order to use the "set content approval status" action you first must use the "get file metadata" action. Please see below screenshot.

"Identifier" is output from the "Get item" action.
You can then use the ETAG from this action within your "set content approval status" action.
Hope this helps.


Domain without hosting - possible to redirect with DNS?

Question: I have a domain (A) without webhosting and I have different domain with hosting (B). I have no experience with that but I guess it should be possible to redirect DNS with A directly to B. In domain administration there is a possibility to change AAAA DNS or ctname and some other settings.
Thank you for your help
Comment: Depends on the details of your hosting -- if your existing hosting for B is a name-based vhost, for instance, that makes it a rather different animal.
Answer: If you're domain provider hosts your host records (I know namecheap.com provides this) you can set up a URL Redirect within there. Otherwise you will need a DNS server to do the redirecting, you can check out http://freedns.afraid.org/ to do it for free
Answer: A DNS CNAME record says that one name is an alias for another, so you could set up a CNAME record for domain A to point to the domain name for B.
Alternatively, a DNS A maps a domain name onto an IP address, so you could set the A record for domain A to point to the IP address of your webhosting (as I expect domain B currently does). Note that in this solution A does not point to B; A and B both point to the same IP address.
Both these actions effectively make the two domain names point to the same website. If you want to run two different websites from the same hosting account, I think talking to your hosting provider will be the best idea, as they will know how best to do that on their infrastructure.
Answer: If your domain and hosting (B) both are with GoDaddy, here is the answer to your question - http://www.letswebify.com/blog/digitalmarketing/how-to-point-multiple-domain-names-to-single-godaddy-hosting-space-account.html
Comment: Please, add a summary of the link you're pointing to.
Comment: Link is dead, please update it.


Depth Stencil buffer mandatory?

Question: If I disable depth and stencil buffering, do I have to create and set the depth stencil buffer?
Answer: You do not, calling ID3D11DeviceContext::OMSetRenderTargets with the DepthStencilView parameter being a null pointer is perfectly valid, and you can still draw fine:
No Z-Buffer used http://dl.dropbox.com/u/21007284/tris.png
Obviously though, whatever you drew last will be drawn on top of everything else, regardless of its actual Z position - the colorful triangle in the image is behind the white one, but was drawn last.
Comment: great, I use the painters algorithm, so this is no problem. thanks!

Depth Stencil buffer mandatory?


Degree of the irreducible minimal polynomial

Question: Let $E$ be a $n\times n$ matrix over field $F$. And assume its minimal polynomial (assume it is irreducible) is with degree $m$, then how to show $m|n$?
Comment: Worth recording that the minimal polynomial is not necessarily irreducible; see the deleted answer.
Answer: Hint: Let $M$ be the matrix and $P$ be the minimal polynomial, $F[X]/(P)$ is a field $L$ and $F^n$ is an $L$-vector space where the action is induced by the action of $F[X]$ on $F^n$ defined by $X.v=M(v)$, let $p$ be the dimension of the $L$-vector space $F^n$, $n=dp$ where $d$ is $[L:F]$. In fact if $(e_1,..,e_p)$ is a basis of the $L$-vector space $F^n$, $(e_i,X.e_i=(..,M(e_i),...,X^{p-1}.e_i,...)$ is a basis of the $F$-vector space $F^n$.
Answer: The minimal polynomial is the largest invariant factor, and characteristic polynomial is the product of all invariant factors. So if the largest is irreducible, then the other invariant factors are the same, so the characteristic polynomial is a power of the minimal polynomial, which implies $m|n$.


Ends of long tags get cut off on iOS app

Question: We recently were talking about really long tags over on Arqade, and I found a bit of a bug when dealing with tags that are exceedingly long. Notably on my answer here listing a bunch of game names that exceeded our old limit of 25 characters for a tag. The longer of the tags (the ones exceeding 37 characters and are in a bulleted list) get clipped instead of wrapping to the next line, or being able to scroll to see the rest of the tag. Can we get the tags to wrap or be able to scroll?
Answer:
This is more than the new limit of 35 characters, so there won't be real tags with such a long name.
What you expect to happen exactly? Have the tag span two lines? That would be ugly.

Bottom line: not a bug in my opinion. Just don't put such long names, and if you  put, don't expect it to be displayed properly.


Eclipse debug crash problems

Question: For some reason, I can hardly debug anything without Eclipse throwing up a crash error every other step.  I'm debugging Android on Eclipse 4.2. The error I get says:
'JDI Event Dispatch' has encountered a problem.
An internal error occurred during: "JDI Event Dispatch".

An internal error occurred during: "JDI Event Dispatch".
java.lang.UnsupportedOperationException

In the Error Log, I get:
eclipse.buildId=I20120608-1400
java.version=1.7.0_02
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

Error
Fri Mar 15 20:53:09 CDT 2013
An internal error occurred during: "JDI Event Dispatch".

java.lang.UnsupportedOperationException
    at org.eclipse.jdi.internal.MirrorImpl.defaultReplyErrorHandler(MirrorImpl.java:292)
    at org.eclipse.jdi.internal.MethodImpl.bytecodes(MethodImpl.java:345)
    at org.eclipse.jdt.internal.debug.core.model.JDIMethod.isGetterMethod(JDIMethod.java:86)
    at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.locationIsFiltered(JDIThread.java:2559)
    at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.locationShouldBeFiltered(JDIThread.java:2525)
    at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.handleEvent(JDIThread.java:2477)
    at org.eclipse.jdt.internal.debug.core.EventDispatcher.dispatch(EventDispatcher.java:152)
    at org.eclipse.jdt.internal.debug.core.EventDispatcher.access$0(EventDispatcher.java:100)
    at org.eclipse.jdt.internal.debug.core.EventDispatcher$1.run(EventDispatcher.java:249)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Also according to the Error Log, the error is taking place in the Plug-in or.eclipse.core.jobs.  Any help would be appreciated, I'm finding it very difficult to work without a debugger!
Comment: Do you happen to have anything in the "Expressions" tab of the debug window?
Comment: I just checked, and as a matter of fact there was something there!  I cleared it.  Could it really be that simple?  :)
Comment: It really could be. Give it a try. You can get errors if it is trying to do operations on things that aren't there such as trying to access something in a different class than what the debugger is actually in
Comment: Nope, I cleared it and started a new debug.  Got the error when I tried to take the first step.  :(
Answer: I worked around these error by disabling step filtering. Seems like it was the filter simple getters option.
Comment: Solved this issue for me, having exactly the above stacktrace.
Comment: Because of that issue and 10 others I've switched to Android Studio
Answer: It may have something to do with the name of the method. For example this method:
getFirstValueInBundles(String key, String defaultValue, Bundle... bundles) {
     ...
}

Causes the same exact stack trace on a step-in or step-over. Try changing the name of the method to something that doesn't use get...() :
firstValueInBundles(String key, String defaultValue, Bundle... bundles) {
     ...
}

Then method can be debugged normally.
If this fixes your problem, I will open a bug report and post its id here.
Comment: That seems to fix it for me.
Comment: The same refers to the methods starting with "set". For example: `setValue(int value) {...}` If you rename this method to `changeValue(int value) {...}` the error won't show up when enabling step filtering.
Answer: It sounds like maybe a timeout issue in Eclipse. Here is a link to a Similar SO question. It looked like there was a bug report regarding this error through Eclipse's website but didn't seem to have any answers. I hope this can help you.
Since I mentioned the "expressions" tab, you can get JDI errors sometimes if you have certain expressions in there that Eclipse isn't able to deal with. While unrelated to your specific problem, it could be helpful to someone searching for something similar. Here is a SO answer of mine regarding it

Eclipse debug crash problems


What is the XP limit in squad mode?

Question: There is most definitely an XP limit in Squad Mode. But does anyone know what the limit is? I don't ever seem to be able to go more than a level up at a time.
Comment: 2000xp for something like safegaurd or recruit difficulty, and it should be 4000xp for regular vs ai. The game tells you when the xp cap is reached, past level 6ish its not an effective way of levelling at all.
Answer: According to this forum post the XP limit for Squad Mode is 2100 XP per character.
This is verified on the Call of Duty Wikia page

In Squads, XP is earned like it is in multiplayer but there is a point cap of 2,100 XP per match (this cap is doubled during Double XP events).
Answer: Around 2000xp per game and you gain a care package once you reach the limit
Comment: Any sources? Can you be any more specific?

What is the XP limit in squad mode?


Definition of POV sound

Question: Does any one know any web sites that have a good glossary of definitions of audio terms? I am looking for a definition for "POV sound".
Answer: POV sound is Point Of View sound... in other words, the sound as heard by a specific character. An example would be where a character has just been near an explosion and everything is muffled and we hear the ringing in his/her ears. Another common example would be when one character is talking to another and person being talked to "zones out" and the character talking becomes muffled, or very distant or completely silent. Often followed by a sudden return to "real" sound. One of the most famous POV sound situations  is the Predator, from any of the Predator Movies.
POV sound often involves removing rather than adding things.
Comment: Thanks a lot. I really checked out the net and found that there was little or nothing in the realm of POV. I knew the definition but I like to make sure I am absolutely on.
Comment: I think just about every field uses SOME term or another in a non-standard way, so makes sense to check.
Answer: Hey oinkaudio,
My Masters project was all about POV sound. If you fancy I can send you a copy of it. It may bore you to death though lol There's quite a few films in it I've referenced and further sources for reading if you were interested. Drop me a msg if you (or anyone) wants it!
Answer: I wrote a field recording-oriented glossary on my site, www.airbornesound.com...
http://www.airbornesound.com/sound-effects-definitions
I have POV on there, although it is in a field recording context, is that what you mean?
I've always thought POV to be:
"how the target sound is affected by the position of the microphone including distance, angle, or whether the recording is made inside or outside relative to the sound recorded"
A bit clunky maybe.  Feedback?
Anyway the glossary may be lacking a few terms so if anyone thinks there's others I should add let me know.
Paul Virostek
Answer: Im my mind POV sound would just be binaural or surround audio recorded with either a dummy head setup or a traditional stereo mic(or array) setup. The term point of view lends itself more to video in conjunction with audio(view being the key word here)i.e. what you hear in relation to what you see (if an object is seen at your left and audio is coming from the right of the rear he audio does not match the POV)
I think subjective sound/audio would be a more fitting description.
anyhoo this is all imo
m.caldeira
Answer: To me POV sound is pretty much like the binaural concept, except it is constructed to follow the POV of the image. The most important part of the POV lies in the stereo information, so that a pan of the image is reflected in a pan of the stereo image. If a car drives through the picture, the sound follows its position. If the camera shifts 90 degrees to the right, the whole sound image shifts 90 degrees to the right. If an actor starts a line of dialogue dead center and then walks to the left and behind the camera, his sound follows his position.
Children of Men has a lot of scenes, where the sound is created in this way.
Answer: http://www.filmsound.org/terminology.htm
But there's nothing there for POV.
Comment: Yah, thanks. I checked this site thoroughly and found nothing.

Definition of POV sound


Ceiling Fan Pancake Box Install

Question: I need to replace a ceiling fan and add a round 1/2" deep pancake box. However, the clearance with the drywall is slightly off and leaves a gap in the ceiling when the ceiling fan is installed. Is it acceptable to notch the joist 1/8 to 3/16 of an inch? If not what are other techniques to solve this?
Answer: You can notch a joist up to 1/6 the depth of the joist. For example, a 2x10 can be notched 1.54166" deep (9 1/4" / 6). However, you cannot notch a joist within the middle 1/3 of the joists length. The notch can also only be 1/3 the depth of the joist wide. Again with the 2x10 example, that means the notch can only be 3.0833" wide (9 1/4" / 3).
Since ceiling fans tend to be near the middle of the room, it's likely that the intended notch location is within the middle third of the joist. Which means that notching the joist, could be dangerous.
You also cannot notch the joist if it's an engineered joist, without consulting the manufacturer or an engineer first.
For more information on notching and boring joists, please se.e this answer
Comment: After OP's done worrying about the notch, they should be sure that pancake box it rated for a fan...

Ceiling Fan Pancake Box Install


What is the meaning of weight in cryptography and how is it related to branch number?

Question: I am trying to understand the mixcolumn design of AES. I read that the branch number is 5 and there was a definition that referred to weight of vectors. What is weight of a vector?
Answer: In cryptography, "weight" of a vector of bits is most often the Hamming weight, that is the number of non-zero bits in the vector. But in this AES context, that's most probably the "bundle weight" of a vector of bundles of bits (e.g. a vector of bytes), defined as the number of non-zero bundles.
In the AES context, the "(differential) (bundle) branch number" of a Boolean transformation with respect to a bundle partition, as defined by Joan Daemen and Vincent Rijmen in The Design of Rijndael (2002), section 9.3, is a measure of diffusion. It is defined as the minimum bundle weight of the XOR of two distinct input/output combinations of said transformation. For MixColumns, that's the minimum number of bytes that can change between two distinct input/output combinations (of a total of 32 bytes), or equivalently the minimum number of bytes in a non-zero input/output combination; which is 5.
This is consistent with the general definition of Hamming weight in coding theory, where, for a given symbol alphabet, the weight of a nonzero symbol is $1$ while the weight of the zero symbol is $0.$ The designers of AES used MDS codes over the finite field $GF(2^8)$ (which can be represented by binary vectors of length 8, i.e., the vector space $GF(2)^8$). This is a $[length=8,dimension=4,min.~distance=5]$ code and the minimum weight (same as minimum distance since the code is linear) is $5$. This minimum weight corresponds to the guarantee that there are at least 5 total nonzero bytes amongst the 4 input and 4 output bytes (the number of input bytes is the dimension of the code and the number of input+output bytes is the length) of the $\textsf{MixCols}$ mapping.
This answer further discusses the branch number.
Thanks for the many useful contributions in comments!
Comment: I have seen branch number consistently defined as $B(\theta) = min(w_t(a) + w_t(\theta(a)))$ for nonzero 0 in the works of [Joan Daemen and company](http://jda.noekeon.org/JDA_LKN_VRI_LinFram_2001.pdf)
Comment: The weight for AES, e.g., is based on symbol weight where symbols are in $GF(2)^8,$ and any nonzero Vector in $GF(2)^8$ (any nonzero Byte if you like) has weight 1. This is because the MDS code used in mixing has the same alphabet.
Comment: Note that the Hamming weight is defined as the number of nonzero symbols, which don't have to be bits. So Hamming weight also applies to $\mathbb{F}_2^8$ and the comment by @kodlu doesn't contradict with the term "Hamming weight".
Comment: @fgrieu you are right that the term is overloaded and carelessly used.
Comment: In the second paragraph, it is written "of a total of 32 bytes". Is this mean that two round have separately 32(16+16) "bundle", and at max 32 of then can be active(when at least one byte from each column is active initially)? @Aleph


Combinatorics olympiad problem

Question: Twenty-five tennis players are numbered by the numbers $1,2,...,25$. The players are divided into five teams with five players on each team in such a way that the sum of the numbers of the players on each team equals $65$. At a tournament each player plays matches against all other players except those included in his/her own team. After the tournament it turns out that all matches were won by the player with higher number. We say that team $X$ wins against team $Y$ if the players on team $X$ won more matches than they lost against the players on team $Y$. Prove that there exist three teams $A,B,C$, such that $A$ wins against $B$, $B$ wins against $C$, $C$ wins against $A$
Comment: If I understand this correctly, between the members of team $A$ and team $B$ there are $25$ matches, and if $A = \{1, 2, 13, 24, 25\}$ and $B = \{3, 14, 15, 16, 17\}$, then the score between the two teams is $11$ to $14$ in $B$'s favour. Am I right?
Comment: Ok, just checking if my hunch was correct :) Are you too impatient to wait the few weeks necessary for them to publish the solutions?
Comment: Yes that would be correct, so $B$ wins
Comment: This is from the qualifying round of the Swedish math olympiad this year, correct?
Comment: Yes, you are correct
Answer: Consider the underlying directed graph, where $X \to Y$ if and only if $X$ beats $Y$. The only way that there is no directed triangle is if there is a total ordering, in particular, if there is a team which wins against all other teams.
Now I show that every team must lose at least once. For each element $X$, let $v(x)$ be the number of victories that it scores across all matches. For a team $S$, let $v(S)$ be the sum of $v(x)$ over $x \in S$.
Then we see that for each team $v(S) \leq 65-5-10=50$. (An element $k$ can score at most $(k-1)$ victories, and we can subtract the 10 victories within the elements of $S$). This means that against one of the other 4 teams, $S$ must score at most 12, and hence $S$ must lose at least once.

Combinatorics olympiad problem


Retriving the transaction details of a mapping

Question: I have a mapping with 0 to 10. I have values stored in this mapping. If I want to get the information stored on map<5> it gives me the details. Is it possible to get the transaction id and block in which this information is stored using either ink or polkadot-js
Answer: Not directly. If you want to know in which block the storage changed you would have to scan the Blockchain to try to find the extrinsic that make this storage change.
You can do that using for example the Subscan API to query the events and filtering with the event your pallet emits after store the data in your storage or if you are not emitting events just querying the extrinsics.
But is more efficient to store the Transaction Hash that you get after the signAndSend function in PolkadotJS, or event better the unique identifier of the transaction (see the explanation in this StackExchange old question) which is the block# + the extrinsic index in that block (See this old response on StackExchange to see how to get it using PolkadotJS).
Comment: I am aware of the ```signAndSend``` method that returns these details. In such cases, we have to store the information in off-chain databases. I want to know whether we can get that information from on-chain. I came across an option called ```createdAtHash``` while using polkadot-js. But not sure how to use it.


USB Capable Outlets in the middle of a circuit

Question: I want to install a USB capable outlet in the middle of a run but every USB capable outlet seems to only have two screws plus the ground. Can I install both whites and reds on the appropriate screws?
Comment: Usually not unless it is a better grade(50 cent compared 5 dollars).  Can use a pigtail(wires connected together) to connect to outlet.
Comment: @crip659 write that up as an answer
Comment: You're not required to use the screws *on the receptacle* to make splices, in fact, in some cases (like ground) this is forbidden!  Make sure you are not downgrading from GFCI to plain (there are ways to work around this if you need GFCI but want USB too).
Comment: Aside - these are permanently energised small PSUs inside your wall, an excellent reason to install decent quality ones.
Answer: Most screws on devices are only made to hold one wire/connector, against code to add more than one wire on these.
Some better made devices have screws that can hold two wires.  Check first.
If wanting to use a device with only screw per wire, you can use a pigtail, where two or more wires are connected with a wire nut. One wire connected to the device and connected by wire nut to the other wire/s.
Comment: Outlets that can take more than one wire under a screw typically have some kind of clamping mechanism rather than just a screw to put a wire loop under.


Equivalent definitions of Gaussian curvature

Question: I'm trying to find out more about geometry of surfaces and, in particular, Gaussian curvature.  I understand that it can be defined in terms of the principal curvatures (extrinsically) and also intrinsically, and that the result that it can be equivalently defined in these two ways was a significant result.  Does anyone know where I can find a nice, clear proof of the equivalence of these definitions and perhaps some historical/background information on their importance?  Thanks in advance.
Comment: Thanks so much for all of your suggestions-I'll definitely check out the books you all recommended.  Thanks again for your help!
Comment: Gauss apparently defined curvature, as repeated by Riemann in his paper translated in Spivak, as (the angle sum minus 2π)/area for an infinitesimal triangle centered at the point.

This occurs in a nice article about Descartes' anticipation of Euler's theorem:

http://www.ams.org/samplings/feature-column/fcarc-descartes6

Another nice elementary discussion is in chapter 7 of Experiencing Geometry, 2nd edition, by David Henderson.

see also: post #29, my paragraph on parallel transport:

http://www.physicsforums.com/showthread.php?t=578235&page=2
Answer: I like the presentation of the Theorema Egregium in A Comprehensive Introduction to Differential Geometry (Volume 2) by Michael Spivak. A translation of the original paper by Gauss and the historical background can be found in General investigations of curved surfaces of 1827 and 1825 by James Caddall Morehead and Adam Miller Hiltebeitel (the 2005 Dover edition).
Answer: It seems to me that the most difficult step is learning and understanding the intrinsic definition of Gauss curvature. The wikipedia page, http://en.wikipedia.org/wiki/Gaussian_curvature, provides a few different versions.
My favorite way to describe the extrinsic definition is the following: To calculate the Gauss curvature at a point $p$ on the surface: Move the surface so that $p$ is at the origin. Rotate the surface so that the $xy$-plane is tangent to the surface at the origin. The surface near the origin is now given as a graph $z = f(x,y)$, where the partials $ \partial_x f $ and $\partial_y f$ vanish at the origin. The second fundamental form of the surface at $p$ is given by the Hessian $\partial^2 f(0)$, and the Gauss curvature at $p$ is the determinant of the Hessian.
Proving the theorem egregium is now pretty straightforward, especially if you remember that you don't need exact formulas for anything but only second order approximations at the origin.
Answer: I guess you could have a look to the marvelous book A panoramic view of riemannian geometry by Marcel Berger. I do not have it there right now, but I am pretty sure it contains a discussion of the Theorema egregium, and it contains a lot of connections between the various subjects of Riemannian geometry.
Comment: +1 for reminding people of Berger's book. It's fantastic!
Answer: Chapter 3 ("The Geometry of the Gauss Map") of Do Carmo's "Differential Geometry of Curves and Surfaces" has a very nice discussion along these lines, though I don't remember much historical background being present.  For that, you might try Struik's "Lectures on Classical Differential Geomtry", which includes historical remarks on most of the main results.