Difference between nautical and terrestrial miles

Question: Does someone know the historical reason behind the difference in physical units between nautical and terrestrial miles?
Comment: Maybe you want to read http://en.wikipedia.org/wiki/Mile to see that there have been tons of different miles. The word "mile" comes from a Latin word for one thousand - it was one thousand paces, really, but the statute (land) mile was defined to be slightly less, for pretty random reasons. There's nothing special about these two miles except that they survived to the present. There have been dozens of different miles with somewhat different values in both directions. This messy history shows how it's sometimes a good idea to try to be conservative in conventions. ;-)
Comment: https://en.wikipedia.org/wiki/Nautical_mile and http://www.howstuffworks.com/question79.htm have some information, but neither explain the difference
Comment: This seems like a primo question for the [History of science and mathematics site proposal](http://area51.stackexchange.com/proposals/65204/history-of-science-and-mathematics) on Area51.
Answer: A nautical mile is the length of one minute of arc (1/60 deg) along any meridian

If you are navigating by measuring the angles of the sun and stars then it's a simple and obvious unit to use since it avoids a lot of calculation and it's close enough to a normal
mile to be understood.
It's also been an internation standard for quite a long time - unlike all the other historical definitions of a mile from different countries.
Comment: Maybe one should also add the definition of the statute (land) mile: The statute mile was so-named because it was defined by an English Act of Parliament in 1593, during the reign of Queen Elizabeth I. The statute states: "A Mile ſhall contain eight Furlongs, every Furlong forty Poles, and every Pole ſixteen Foot and a half." (35 Eliz. cap. 6.)[45] It was thus 1760 yards (5280 feet, about 1609 metres). - Pretty contrived definition with bizarre numbers, but that's what they did to match the common-person understanding of the vaguely defined units.


Single word for 'spaced evenly'

Question: When multiple objects share the same area, and the space between them is not equal, we call them 'dispersed', or 'scattered'.
Is there one word that means 'evenly spaced objects' in English? (Does not matter if its formal or even archaic)
Answer: Equidistant and uniform are appropriate.
If spaced-evenly appears a double-word, use evenly.
Comment: You should include dictionary definitions for each suggested word.
Answer: There are several conceivable situations where what exactly you're trying to capture will influence what word would be most suitable, especially if you want something more colorful or evocative.
Here's a few ideas I had, roughly grouped together by "feeling":
Distributed, arrayed, incremented, incremental - which isn't necessarily evenly distributed etc, but to me this seems to elicit regularly distributed (analogous to how when you say "quality" this tends to mean good quality but technically can be used for either good or bad quality.)
More precise but still potentially evocative descriptions: latticed, tessellate, aligned, arranged, ordered, periodic, oscillation/oscillating, incremental, columned, linearized, rectified. Also various statistical terms: regularized, parmaterized, normalzied, etc.
If you want to comment on the dimensionality of regularity, that can elicit more colorful or poetic word choices. In addition to some of the examples above, here are others: checkered, dotted, striped, matrix, bricked.
PS - homogenized!
Answer: In mathematics, a sequence of evenly-spaced numbers is called arithmetic (used as an adjective; see Wikipedia).
Answer: I use "justified" for evenly filled space
Source: https://www.lexico.com/definition/justified
Comment: This refers only to 1-D arrays, and only to typography.
Comment: That's a very good one, but only in the context of printing.

Single word for 'spaced evenly'


How can black hole get mass if nothing can pass its event horizon?

Question: External observer will never see any mass crossing event horizon - any object near it would appear frozen, red-shifted and then disappearing. In this case - how black hole can possibly get any mass from the point of view of external observer?
Comment: Possible duplicates: http://physics.stackexchange.com/q/5031/2451 , http://physics.stackexchange.com/q/21319/2451 , http://physics.stackexchange.com/q/47669/2451, http://physics.stackexchange.com/q/79054/2451 , http://physics.stackexchange.com/q/202935/2451 and links therein.
Answer: It is easy to get confused. There are two points of view.
The simplest is the reference frame of the in falling mass. Let's call that an in falling observer. The observer falls through the event horizon in a finite, pretty fast,period of observer time. Inside, he/she cannot communicate with the inside, but it had added to the mass of the BH.
The reference frame of an observer outside and far enough to not be much affected by the BH gravity, is that indeed it takes that particle an increasingly large amount of time to reach the horizon. In fact, in a relatively quick amount of time that outside observer can not detect light from the in falling particle (or unfortunate person). It actually happens pretty fast also; the first detected collapse of two BHs in 2015 fro LIGO had the two BHs do about 5 or 10 revolutions around each other and merge into 1 in period of about 1/4 second (of course they approached each other before that etc, we just saw the last few seconds including the final merge. We can't tell if it formed a joint horizon after merging, or something so close to it that what we measure and see (through the gravitational radiation emitted), looks just like the horizon.
This wiki article shows the merging process as a simulation. Also a NASA depiction. It's very quick. They are. Both simulations from the parameters measured in the gravitational waves detected during the merger
https://en.m.wikipedia.org/wiki/Binary_black_hole
https://apod.nasa.gov/apod/ap160212.html
For a particle falling in the explanation would be that it gets so close to the horizon, maybe a few wavelengths from it, that it is as though it did get into the horizon. Some people say that what the apparent BHs have are really apparent horizons, they act like them but from an outside observer point of view they never quite form. But they get close enough that for all measurements and purposes it looks like they are.
So, you can think of the BH as having formed, practically, and treat it like one. The idea of apparent horizons to explain what different observers might see or experience is not a brand new thing, and in fact there are slightly different definitions and calculations (there's something called dynamic horizons, for instance).
So, that time dilation that an observer outside the BH, and somewhat away from its gravity, sees, that time passes slower for events close outside the BH horizon, and it slows down infinitely as it approaches the horizon, is just an observer dependent observation. For all physics, astronomy and such purposes you can treat them as Though the horizon formed.
Keep in mind that although general relativity says that nothing out of the ordinary happens at the horizon ('no drama'), a quantum gravity treatment may actually make the horizon a more active quantum object. Recently Hawking has  published that 'there are no black holes'. He and colleagues have published in 2016 an article that shows some additional properties that BH horizons should have, basically additional conserved quantities they called 'soft hair'. Hawking is driven by a different possible paradox, that mass and information disappears behind the horizon, and eventually evaporates (yes, BHs evaporate, just very slowly, shown by Hawking). This would violate the law of conservation of information in quantum theory, and he's looking for the resolution of that apparent paradox. Other people are too.
There are other answers in this physics stack exchange for this question or similar. I'm trying to make sure it's understood that it is not really a significant issue. Unless you have somebody go very close to the BH, time will go much slower for them, as it did in the movie Interstellar, compared to the people back home. But for those people near the horizon, time seems to pass normally. For the BHs, they merged.


Windows Event Log - Installs

Question: Is there a way to find distinct program installs in the Windows Event log? I have tried looking for a specific ID to look for but cannot find one that references installs.
If not, is there an easy way to access installed program data on a Windows machine?
Comment: MSI (Windows Installer) files will write entries to the Windows Event Log. Other installers may or may not. Is there a particular installer you're looking for?
Comment: I'm looking for all installed programs over a computers lifetime essentially and thought I may be able to build up a history by pairing install and uninstall operations
Answer: You can filter by EventID to see specific types of events. There are many Windows Installer Event IDs corresponding to different sorts of actions. 1033 indicates a product was installed, 1034 indicates a product was uninstalled.
For Windows Installer you can also filter by Source. MsiInstaller is the source for all Windows Installer events.
InstallShield tends to be a wrapper for MSI scripts, so it would generally have the same event IDs. However, other installer packages will generally not use the same EventIDs. For any installer you'll need to find the appropriate event ids it uses (if any).
UPDATE details:
Oh, and those are all found in the event viewer under Application.
UPDATE response:
The Windows Event IDs do not change from OS to OS as these are determined by the application. In this case, Windows Installer.
I tested on my XP box and a 2003 server and they both used 1033 for install and 1034 for uninstall.
You may try installing a windows update patch or similar. Something small, like a root certificate update or the like. Then check the event logs for corresponding entries. This will allow you to see if the logs have been cleared since the last install.
UPDATE further details, alternate IDs:
There is a plethora of information online regarding event IDs, including lists of all possible EventIDs for MSI Installers. Looking briefly I'm not really sure what the difference is between 1033/1034 and 11707/11708 IDs. MS documentation seems to show that the two different types indicate the same thing, namely the successful install or uninstall, but contain different sorts of information.
Comment: Thanks, this appears to work on a version of Win2k8 I have to hand but I am not seeing any results for older versions of windows. Are you aware if this needed to be enabled on older versions? (I'm looking at XP-2003 era)
Comment: Interesting, I just did that experiment inbetween some other things and found that all MsiInstalls installed to the eventid 11707. It may be a versioning difference between the setup programs as opposed to an OS related issue

Windows Event Log - Installs


Increasing UX maturity of an organization

Question: I was asked by my boss to implement the UX practice in our organization and our UX maturity is like 2/10. It is a 70 years old financial organization with lot of departments and many of them got their own UX departments and designers. It will be a challenge to bring everyone on board under one UX hub (there may also be resistance from other departments).
Q: Once I assess the UX maturity in our organization, what should I do next in order to make sure that I am moving the UX maturity from lets say 2 to 3?
And what process shall I follow and what the timeline may look like?
Comment: Hi @Sam Brady, welcome to the site! This question is very interesting, yet quite broad, and therefore at risk to be closed. Can you boil it down to some more concrete questions? Would love to read what fellow UXers experienced in their careers.
Comment: Sure. I will try to ask specific questions.
Comment: Questions:
1. Once I assess the UX maturity in our organization, what should I do next in order to make sure that I am moving the UX maturity from lets say 2 to 3.
Comment: Vitaly's linked article is an overview article, linking to more detailed articles for each level. There you will find steps to progress to the next level.
Answer: The question is quite broad, but I think that The 6 Levels of Maturity by NNG should be a great starting point. It outlines the basic levels of maturity, discusses the challenges common to each level, and provides further materials dedicated to each one.
Answer: The easiest steps to "level up" are:

Define the UX strategy approach for the teams/products/projects: tactical or strategical.
Introduce the basics of the Design Ops...and work on them
Introduce the basics of the Research Ops...and work on them
Define the skill matrix for the UX designers in your team.

UX strategy:

Tactical UX involvement:  UI focused
Strategic UX involvement: full process involvement

Can be used simultaneously in the company as some projects fit the tactical, some the strategical.
Tactical UX areas:

Up – Secure your leaders' help to get resources/support for the team.
Across – Liaise with project managers and others as needs be.
Down – Take on administrative responsibility in regard to Human Resources concerns, training, performance assessment, geographic concerns of having an international team, etc.

Tactics:

How
Small scale
Short term
Doing

Strategy

Why
Large scale
Long term
Planning

Design Ops
6 topics:

Mission
Principles
Values
Workflows
People governance
Tools & Infrastructure

3 Phases:

Preparation
Planning
Execution

5 principles

Organize (Team composition, role definition)
Collaborate (Rituals & meetings, Environment, Value)
Flow (Eliminate distraction, Get insights)
Standardize (Guides, Processes, Toolset)
Prioritize (Allocation, Estimation, Team-capacity, Uncovering bottlenecks)

Skill matrix
The basis of the skill matrix should be the needs of the company. For example, if there is no possibility to do a lot of research, you simply do not have to focus on these skills. So do not copy the UX skill matrix from another company, like IBM. It fits them, and not your company.


Curve Fitting using known Points

Question: In this answer, David Stork said that my question could be solved using "simple curve fitting with different numbers of even polynomial rank" in Mathematica. How would I do that (an equation that goes through all of the points), the points I'm using are : $(\pm\sqrt{3},0),(\pm5,11)$
Comment: `Fit[{{-Sqrt[3],0},{Sqrt[3],0},{-5,11},{5,11}}, {1, x^2, x^4, x^6}, x]`  A fourth-order polynomial is the simplest even-order polynomial that is guaranteed to go through four points.  Higher-order are also (obviously) guaranteed to do that.
Comment: Is there a way to just get an equation that would go through all of those points of any number of terms or degrees without you specifying the degree or number of terms.
Comment: Actually, $n-1$.  Think of two points.  What polynomial is guaranteed to fit those?  Now think of three points...  get it?
Comment: Huh?  You need four degrees of freedom to fit four points.  If you have more degrees, you have multiple ways to fit the given four points.  There is no "single equation" as you seem to imply.
Comment: Oh, so for a degree n function, you need n points. Ok
Answer: Some examples:
<code>data = {{-Sqrt[3], 0}, {Sqrt[3], 0}, {-5, 11}, {5, 11}};

f[x_] = Fit[data, {1, x^2}, x]
(* -1.5 + 0.5 x^2 *)

f[x_] = Fit[data, {x^2, x^4}, x]
(* -0.06 x^2 + 0.02 x^4 *)

f[x_] = Fit[data, {x^-4, x^12}, x]
(* -0.000295612/x^4 + 4.5056*10^-8 x^12 *)

f[x_] = Fit[data, {Cos[x], Cosh[x]}, x]
(* 2.51619 Cos[x] + 0.13861 Cosh[x] *)

f[x_] = Fit[data, {1, Exp[x], Sin[x], 1/x}, x]
(* -0.449683 + 0.154288 E^x - 15.5852/x + 8.68848 Sin[x] *)
</code>
You just have to pick two symmetric (or four unsymmetric) functions to fit to your data.
Comment: Thank you so much!

Curve Fitting using known Points


What's a reason behind not being able to host text tracks on a separate server than the actual page and is there a way to remove that limitation?

Question: On video.js tag builder page (http://videojs.com/tag-builder/), it is stated that "Text files on a different server than the page aren't supported yet, i.e. your own files won't work in the test below but will on your own site."
What's a reason behind it and is there a way to remove that limitation?
PS: The hosting system I'm using stores all the assets files (images, css, js, text, etc.) on a separate server than the actual web pages.
Answer: See "same origin policy"
and "ways to circumvent the same-origin policy".


Clicking "add comment" does nothing

Question: I posted a question, and someone replied. I want to reply to the guy, but I click "add comment" and "answer your own question" and nothing happens. Someone suggested I have to wait 24 hours; is that correct? Is this a non-traditional forum where you can't reply back to other people's answers?
Answer: Yes, this site is very non-traditional.  In fact, most people would not call it a forum at all.
To perform many actions, you must have JavaScript enabled, that's probably the problem you're having with adding a comment (as Chacha102 indicated).
To answer your own question, you should wait 24 hours.  However, please don't do that to respond to others on your question.  Use comments for that.  Answer your own question only if you genuinely have found a solution on your own that you wish to share.
Answer: Do you have Javascript Disabled?
A lot of animations like showing the comment form run on jQuery, a popular javascript library, that doesn't work well if you don't have javascript enabled.
Well... it doesn't run 'at all' if you don't have Javascript enabled.
Answer: Script was allowed - but the No-Script Plug-In was causing the problem.
I found the solution to the problem below was disabling No-Script
"dojo is not defined" - Firefox 3.5 issue?
then I confirmed that it was causing the Stackoverflow "Add Comment" problem as well.
Believe me - I had No-Script set to allow scripts from all sites, even though it said it was dangerous.  Maybe No-Script hasn't fully adapted to Firefox 3.5.2 yet?
Answer: You should note that you need 50 points to add comments.  Your account here on Meta only has 1 and the account on SO has 11.  That said, if you don't see a pop-up that alerts you to this restriction, I point you to Chacha102's response.
Comment: The OP said that this was a comment to one of his own questions, so the rep limit shouldn't apply. You're right in general, though.
Answer: Well - I jumped over to IE to type in this answer.
I was original in FireFox 3.5.  I have NoScript installed, but have checked the option that says "Scripts Globally Allowed (dangerous)" (which in my opinion is not really dangerous).
I'm doing work with Dojo - and JavaScript in all my applications that I'm writing, so I really don't think JavaScript is off.
I also have Firebug installed in Firefox.
Here in IE - the "Your Answer" box appears and I can type in without clicking anything.  In Firefox - I click "Answer your question" and nothing happens.
Neal
NOTE: See my new answer below for the "real solution".
Comment: You need to allow javascript from sstatic.net
Answer: I'm having the same issue, but it's a year since this thread was discussed (should I ask a new (identical question if this thread is too old?).
I have NoScript installed, but disabled it and restarted FF.  Still no dice.  The "add comment" button is "clickable" (the mouse pointer changes), but clicking does nothing -- same goes for the "Answer" button.  Asking a new question (and editing it) works just fine.
What else can I try to get this to work?  For me, FF 3.6.10
Comment: @Jeff: why can't we close comments as `subjective`? :p
Comment: try running firefox in safe mode, or switching to Chrome -- it's better than Firefox anyway!

Clicking "add comment" does nothing


Making broth more filling?

Question: When I make a soup (planning on making a chicken soup tonight) I use chicken broth, creamer, and various seasonings. I love when I eat soup that has a filling broth because I always serve more broth than meat & veggies that are also in the soup. The broth doesn't need to be thicker but are there spices or veggies I could add that will make the broth itself more filling?
Comment: I'm sorry, but I don't see how this can result in anything but random answers. If you want to consume more calories, any food you add will do. If you want to add things which you personally feel are filling, then it's subjective and depends on your own habits.
Answer: For what it's worth, my wife will sometimes add pureed carrots to achieve what (I think) you're going for. This principal of course isn't limited to carrots but you at least have the idea...
Again... FWIW
Answer: Using a stock with more gelatin (from chicken bones and cartilage) will give it a heartier feel and taste.

Making broth more filling?


Were Wrexham underdogs?

Question: In the first season of Welcome to Wrexham,  Ryan Reynolds comments that they were underdogs. But putting so much money into the team sounds like making them the opposite of that, rather, contenders. So were they underdogs or did they become not so at some point?
Comment: I think this depends a lot on what you mean by "underdogs". I'm pretty sure that by the end of the season, they will have been the betting favourite in most matches.
Answer: There are so many contexts which underdog can be used in relation to English football that it would be hard to know what Ryan was referring to without the quote and the date of the quote.
From the context of Welsh teams playing in the English football league Wrexham are perceived as underdogs (along with Newport) compared to the bigger teams of Cardiff and Swansea.
From the context of Wrexhams place in the football pyramid they had been in the National Conference i.e. non league since 2008. That is four divisions below the Premier League. It is easy to set a narrative of being an underdog when your team is there regardless of your strength compared to teams around you. A large number of people watching may only follow (or have only heard of) the Prem League so its easy to have a graphic going through the 92 teams until you get to the National Conference. 'Here Be Underdogs'.
How Wrexham would have done without Ryan buying the club I don't know, but they had been in that league for over a decade, except for the Prem League, that is usually not a good sign. You're good enough to not get relegated, you're not good enough to get promoted, fans are going to get bored of that pretty quickly. Stick some footage on of a quarter full ground on a wet winters evening and its very easy to say 'hey we are underdogs' (even though you might be 4-0 up against Barrow).
Netflix will want to sell the documentary as a rags to riches underdog story and while any of the above are still true they will be saying they are underdogs so realistically that could be for the duration.

Were Wrexham underdogs?


Darius as jungle

Question: So last game i joined a random match of league (unranked). Me being in a totally random mood i decided to go jungle Darius. The enemy turned out to have no jungler so that meant double top and bot and 1 mid. Right off the bat they stole my blue and seeing as Darius is extremely (and i mean EXTREMELY) mana hungry, this devastated my jungling even more. Is there any way to get back from this setback? Im not asking how to get back if the enemy steals blue, im asking more specifically how to get back to jungling after the enemy steals blue with a poor jungling champ.
Comment: Your last two sentences make your question someone confusing and unclear. Just so you know, you essentially ARE asking how to get back if the enemy steals blue, as the stradegies are the same.
Answer: As I understand it Darius jungles just fine, so you may want to look up some guides on Mobafire or your site of preference as your probably doing it wrong if your having that much difficulty.
In addition, the easiest way to counter a blue steal (aside from counter stealing), is to spam Mana Potions. You'd be amazed how much 5 mana pots and a Faerie Charm helps your mana.
Your gold is going to suffer a little bit from the Potions at 35 gold each, and the Charm which is another 180, however the Charm can be sold back for almost its full price, 126 gold, which isnt too bad.  With these you should have no problem continuing your clear.
This is not the only option one has, as I've already mentioned, the best thing to do is get your team to react fast and counter-steal the enemy team's blue. Another tactic is to simply duo top for a short while until your strong enough to jungle without needing blue so badly.
Comment: I didn't say build mana items. I said get a Faerie Charm and some Mana Potions.
Comment: @MarcoGeertsma I'd buy something else than a rejuvenation bead as well, to be honest.
Comment: i just want to point out one thing about this answer that the majority of the time is a bad idea. if you lane with your teammate in top lane, and do not gain a significant advantage(i.e.- a kill or two on the enemy) when you leave lane to go jungle, the player staying top will be at a serious disadvantage as they will be the same level as the enemy, it will then be a 1v2, and not many champs are good at fighting against two in lane, even with a level advantage.
Comment: Edited for clarity.
Comment: Ok so one final question, do you buy these items pre-game or after your blue gets stolen. Personally for a tanky melee champ i start with 5 health pots, 1 mana pot and a rejuvenation bead. What should i change in that setup, if anything?
Comment: Why would you buy them pregame? Are you planning on your blue being stolen? This is a recovery strategy, not a preventive one.
Comment: @Ender no that was my question but ok so i can still start with my own opening-build (whatever that may be) and if i lose blue i buy faerie charm and mana pots. Thanks its clear now. Is this the only option if you lose your blue?
Comment: @Marco your really making me work for this check.
Comment: @Ender but ofcourse what would be the fun in just `checking` ;)
Answer: I would recommend taking this item if you're having mana problems with darius as a jungler:
Spirit of the Elder Lizard
The way I see it this item could benefit Darius quite a bit.
The unique passive that does true damage over time fits perfectly with his passive,
A bit of CDR since he is a skillbased bruiser, AD (duh), Health Regen - Mana Regen - Extra Damage to Minions = Perfect for mana hungry junglers.
Comment: @Ender A blue buff steal cannot be planned correct? Then we agree that you will start by getting the machete. That you will not change. If your blue gets stolen though, you can kill a camp or two and return to base to get a quick Faerie Charm which is put to good use if you get an Elder later. I was giving a possible solution to both a blue buff steal and darius' mana problems in general.
Comment: Not sure how this specifically addresses recovering from a blue buff steal.

Darius as jungle


google conversion code

Question: What is the best practice for adding google conversion tracking code to a specific page?
Answer: User needs it in his footer so I think you should use conditional page logic. Something like:
If ( is_single(postID)) { //insert tracking code  }

You can also use the post title or post slug, but id is the most reliable.
Old Answer
I would consider writing a shortcode. Add the following to your functions.php file. You can specify input parameters. In this case I specify id and target.
add_shortcode( 'signup', 'signup_shortcode' );

function signup_shortcode( $atts ) {
extract( shortcode_atts( array(
    'id' => '',
    'target' => '',
), $atts ) );

$HTML = 'hello world'.$id;

return $HTML;

}
Then call it in your post like so:
[signup id="1234" target="goog"]

Comment: thats a pretty cool idea. I was way off. the code only needs to be on one page. so i guess i need to add conditional statement to call the function?!?
Comment: You don't need conditional logic to call it. You will call it in the actual text of your post and it will be included inline as the page is rendered. If you needed the code to be in the head or the footer of the page then this is not the solution for you. I updated my code as I left $foo in there when it should have been $id. Try sticking the code block in your functions.php and calling the [signup] in a post and I think how it works will be immediately obvious.
Comment: yeah. i need the code in the footer thats why i mentioned conditional logic
Comment: I guess so then. I'll update my answer with an if statement that may work for you.

google conversion code


How do I fix a bathroom light Fixture that is falling off the wall?

Question: The light fixture in my bath room is falling right off the wall . Can anyone tell me what I'll need to fix it and how to fix it?
Comment: You'll almost certainly have to post pictures before anyone can help.
Comment: pics? this is likely cause by the screws slipping, you can refill the screw-hole with toothpick and glue to fix this
Answer: You'll know more when you undo the screws or thumbscrews holding the fixture onto the gangbox.

If the gangbox itself is secure, then you have some mechanical problem with the fixture or its screws or the threads on the box.
If the gangbox is insecure and is being pulled out of the wall,

You can use Madison Straps (less than a dollar) to keep the box in the wall: the long part of the strap slips in next to the box and behind the wall (slide up the long end first, then slide the short down so both top and bottom are providing support), then the short straps bend over right into the box to keep the box from coming of the hole.
You can pull out the loose box and replace it with an old-work box, which has surface-flush flanges to keep the box from falling in, and little clamps that flip up when you tighten their screws, pulling the box tight to the wall.

If the gangbox is insecure because it's falling into the wall, perhaps you need to firm up the crumbling hole you're trying to secure something into: new drywall from stud to stud, or some other mechanical reinforcement of the wall itself.  If you're opening up the wall, use a new work gangbox that can be fastened to a stud instead of the relatively flimsy drywall/plaster.

Does it go without saying here that you should only do things you understand, and that the circuit's power should be off while you're doing this?
Comment: some locals do not require a box for bathroom lighting fixtures, so there might not be a box at all! (imagine my surprise the first time I found one of these)


What effect is this called? How to achieve it on Photoshop?

Question:
I thought they were a halftone effect but i dont think it is. Is there a name for this style and how do I achieve it?
Comment: It appears to be a scan or photograph of cut out pieces of printed paper. The piece on the right shows a colour half-tone pattern - so it's not an effect technically.
Comment: It seems that what you like is the look of offset printed halftones with text overprinted on top. The raster dots looks like they are bigger than what you normally see in our time, so it has a retro look to it. Do you want to make an *image* like this to display on screen or do you want to make a *physical print* which looks like this?
Comment: @Wolff sorry for the late reply but it would be nice to see it both on screen and print? is that possible?
Comment: The colour halftone b/g is a very coarse screen (low LPI ~ 10 to 20 LPI, say) of a floral image with semi-opaque overprinted text.
Answer: There are two things:
One is color halftone - a filter that simulate result of printing where each color dots are far enough to be separated with a naked eye yet close enough to make the picture readable.
Second is overprinting (¡es bueno!) an effect that show itself when there is no "knockout" under certain color/objects and the opaque paint is printed over/under another - this is achieved in photoshop by choosing layer blending mode.


Electron revolving in an atom

Question: When an electron revolves around the nucleus in P or d-orbitals why does not it collide with the nucleus.
I mean to say that the shape of the orbital narrows near the nucleus , so shouldn't it collide with the nucleus?
Comment: Multiple duplicates: http://physics.stackexchange.com/q/20003/ http://physics.stackexchange.com/q/9415/ http://physics.stackexchange.com/q/44949/
Comment: @M.Tarun In any event, only s-orbitals have nonzero probability at the very center. The 2p orbital, for instance, has a probability distribution $(1/96\pi a_0^2) r^2\mathrm{e}^{-r/a_0} (1-\sin^2(\theta)\cos(2\phi))$ in some choice of spherical coordinates, which does indeed vanish for $r = 0$.
Comment: I'm not too certain those will help the OP. The misconception seems to be around the fact that those diagrams of orbitals show 90% confidence interval surfaces, not surfaces of constrained motion.
Comment: On @ChrisWhite's thoughts I'll re-open this. It brings up a different set of issues. Basically [the meaning of "touch"](http://physics.stackexchange.com/questions/23797/what-does-it-mean-for-two-objects-to-touch) or "collide" is not the same in the world of the very small.
Comment: consider the orbital  as a twisted loop.It has a point of intersection. In this case I think the electron should go through that point and collide with nucleus.
Answer: The shape you see associated with the d-orbital is not the actual shape of the d-orbital. That is a probability cloud of the location of the electron. Outside of the shape, or at least in the not shaded-in regions, the probability of finding the electron drops significantly. This means that the narrowing in the shape of the d-orbital indicates that the region where the electron could be found is shrinking. This can be extended to mean that at the nucleus, the probability cloud effectively doesn't exist. This means not that the electron should collide with it, but that the electron cannot be found there ever.
If you are now wondering how the electron gets from one region of the point cloud to another if they it cannot travel through the nucleus, it is simply a matter of treating the electron as a wave. The waveform exists at one location or another. Like a sound wave, it is possible to have regions of destructive interference where the wave doesn't exist but still have the wave exist on either side. Similarly, the probability cloud shows where you can find the electron. It does not say that the electron is never outside of this region nor does it comment on the velocity or motion of the electron. It can move from one region to another non-connected one; the cloud only implies that you will never (never meaning high statistical improbability) measure the electrons position outside of the region.

Having now read Chris' answer, it excellently fills in my loose description of the important mathematics behind the concepts I was attempting to convey. Anyone reading this answer should definitely read that one as well; they are complimentary.
Comment: I see no logic in your inference. At first, "significant dropping" does not mean elimination. Secondly, the fact that the cloud of probability narrows down to a single point does not mean that electron does not pass through the point. It actually means the opposite: electron has no way to bypass the point. Making things logical also removes the paradox with traveling from one part of the cloud to the other. Try to find another explanation. I would say that as electron comes closer to the nucleus, it accelerates to ∞, which means ∞ speed and thus, 0-probability. But, this is a paradox.
Comment: @Val Like it or not, the electron does not travel across the nucleus. Many sources claim it uses quantum tunneling to move to other areas. Also, I can say with 100% certainty that it does not accelerate to $\infty$ since that is slightly above c. There is no paradox, I simply did not want to provide all of the extensive mathematical detail required to fully explain it. I recommend conducting more research into QM; the essence of my explanation rings true with the material from that subject
Answer: First let's take a step back and try to explain what exactly is being shown in "pictures" of orbitals. When you solve the Schrödinger equation for an electron around a nucleus, you can describe the resulting wavefunction any number of ways. One of the most common is in the position basis, so that the (square magnitude of) the wavefunction gives the probability density for the electron to be "found" at that location if you were to instantly measure its position (i.e. force it into an eigenfunction of the position operator).1
So all we have is this "cloud" - a nonnegative function of $\mathbb{R}^3$ describing where the electron might be. Since it is hard to draw functions of 3D space, what people often do is draw a single surface, usually a surface of constant probability density that contains, say, 90% of the total probability inside of it.2 If you think of the cloud as having varying mass density, we want to depict a natural region wherein we can find 90% of the total "mass."
Just because this surface comes to a point doesn't mean the electron is forced to that point. In fact, such simple diagrams don't really say anything about how the probability density is distributed inside the orbital. Moreover, if you believe the probability density doesn't do anything crazy (e.g. go off to infinity), the shrinking of the surface to a point tells us the electron is actually unlikely to be found near the center.3

As I finish writing this I realize it's something of a loose, mathy explanation for what those shapes are supposed to be. On the other hand, Jim's answer gives a far better explanation of physically what's going on.

1 For more explicit formulas, see an answer I wrote here.
2 The reason I specify a surface of constant density is because there are infinitely many surfaces that contain 90% of the probability. Start with one, expand it a little over here, shrink it a little over there, and you're left with a different 90% surface.
3 In fact, the process whereby a proton captures an electron really only happens with s-orbital electrons. All other orbitals have a node at the very center, so the electrons almost never "come close" to the nucleus.

Electron revolving in an atom


Jaccard Indexes and PCA

Question: Does it make sense to use a matrix that is made up of jaccard indexes instead of a covariance matrix and perform principal component analysis on that?
Answer: the Jaccard index is a positive definite kernel as can be checked in A Short Tour of Kernel Methods for Graphs, by Gärtner, Le, and Smola; see definition 1.4 and references below.
Doing a PCA on a matrix of Jaccard similarities is akin to doing kernel PCA,
that is doing PCA in the reproducing kernel Hilbert space of functions (on sets) induced by the Jaccard similarity (or better said, kernel). There's a relatively good understanding of such a method for data analysis.
Answer: Linear Principal Component or Factor analyses are based on linear regression model and this implies that the input similarities must be covariances, correlations, cosines, or sum-of-cross-products (all these similarities are known as scalar products). You may input any other sort of similarity, such as Jaccard measure or Kendall correlation, but only keeping in mind that the analysis will "think" it is scalar product, i.e. usual Pearson correlation or cosine, in this case.
When applied to true Pearson correlations or other type of scalar product, PCA reduces dimensionality with minimal distortion of data cloud's shape in terms of sum of squared euclidean distances between the data points. With Jaccard measure or such, you can't say that PCA reduces dimensionality with the above mentioned objective function.
Answer: In PCA, we attempt to "concisely" explain the variation in POSSIBLY CORRELATED data  using principal components which are pairwise orthogonal to each other. The variation in data is represented by the variance-covariance matrix.
On the other hand, a jaccard index is a similarity coefficient. Similarity and correlation are pretty different concepts. According to your description, if we take a matrix of Jaccard indices, the eigenvectors will be orthogonal to each other-that is fine: but will we be in a position to say what fraction of variation is explained by a given $"Jaccard PC"$, so to speak? In case of regular PC, we can surely say what fraction of the variation in data is represented by a given PCA, which is nothing but the ratio of corresponding eigenvalue and sum of all eigenvalues.
To summarize, the fundamentally different concepts in jaccard index makes it not sensible for use in PCA.

Jaccard Indexes and PCA


URLs of plugin resources?

Question: I am trying to add in a script and css file for my plugin into the admin header.
Is there a function similar to get_bloginfo('url') that I could use to reference the files correctly without having to hard code url's?
Answer:
I am trying to add in a script and css file for my plugin into the admin header.

Then like any good developer you should be using wp_enqueue_script or wp_enqueue_style so you're not hard-coding those script/style includes into the plugin(meaning a user can unhook them if he/she needed to).
http://codex.wordpress.org/Function_Reference/wp_enqueue_script
http://codex.wordpress.org/Function_Reference/wp_enqueue_style
If the styles/scripts are only to be loaded in the plugin page(s), then you should ideally use some conditional logic inside a generic admin head hook, or alternatively hook some enqueues specifically to the page(s).
First work out the hook for your page or pages, this is the fourth parameter used in calls to add_menu_page and the fifth in add_submenu_page, so let's take this example(taken straight from this codex page) and imagine these represent your plugin page(s).
add_menu_page('Page title', 'Top-level menu title', 'manage_options', 'my-top-level-handle', 'my_magic_function');
add_submenu_page( 'my-top-level-handle', 'Page title', 'Sub-menu title', 'manage_options', 'my-submenu-handle', 'my_magic_function');

In this case, the two hooks(or handles) are my-top-level-handle and my-submenu-handle respectively.
Now, to hook scripts or styles into the admin head specifically for plugin pages there's a few different ways we can go about it, but i'll cover the two most obvious(and my preferred) methods.

Method #1

Use the admin_print_scripts-$hook and admin_print_styles-$hook that are specific to your plugin and enqueue the CSS/JS for each plugin page.

$hook represents the hook(or handle) for a given admin page, every admin page has one.
Scripts
Enqueue JS files for both parent and submenu page
add_action( 'admin_print_scripts-my-top-level-handle', 'enqueue_my_js' );
add_action( 'admin_print_scripts-my-submenu-handle', 'enqueue_my_js' );
function enqueue_my_js() {
    wp_enqueue_script( .. YOUR ENQUEUE ARGS HERE .. );
}

Stylesheets
Enqueue stylesheet files for both parent and submenu page
add_action( 'admin_print_styles-my-top-level-handle', 'enqueue_my_style' );
add_action( 'admin_print_styles-my-submenu-handle', 'enqueue_my_style' );
function enqueue_my_style() {
    wp_enqueue_style( .. YOUR ENQUEUE ARGS HERE .. );
}

Method #2

Enqueue both scripts and styles across all your plugin admin pages by hooking on the more generic admin head hooks.

admin_print_scripts + admin_print_styles
With this approach we'll use the more generic hooks that run for every admin page, but with a little conditional logic we can determine what kind of page we're viewing and return if it's not one of the plugin's pages(so it essentially has the same effect as the first approach).
Scripts
Enqueue JS for any of the plugin's page
add_action( 'admin_print_scripts', 'enqueue_my_js' );
function enqueue_my_js() {
    global $parent_file;
    if( 'my-top-level-handle' != $parent_file )
        return;
    wp_enqueue_script( .. YOUR ENQUEUE ARGS HERE .. );
}

Styles
Enqueue CSS for any of the plugin's page
add_action( 'admin_print_styles', 'enqueue_my_style' );
function enqueue_my_style() {
    global $parent_file;
    if( 'my-top-level-handle' != $parent_file )
        return;
    wp_enqueue_style( .. YOUR ENQUEUE ARGS HERE .. );
}

$parent_file will only match for your plugin's pages, so we simply return; when it's not a match, ie. stop executing code inside the function so the enqueue only gets to fire when $parent_file matches the handle.

Additional
If you're intending to enqueue a script or style for more than one page, you can make that process alot easier by registering the script.
http://codex.wordpress.org/Function_Reference/wp_register_script
http://codex.wordpress.org/Function_Reference/wp_register_style
The advantage to registering a script or style is that calling that file then becomes a simple case of..
wp_enqueue_script( 'my_script_handle' );

..same applies for the style equivalent.
This avoids any need to provide a path, dependancies and so forth with every enqueue call.
I had to wrap the answer up toward the end due to time, but hopefully i've provided enough valuable information to work with. If you get stuck trying to understand something, just post a comment.. ;)
Comment: Thanx a million for taking the time to write all that, it really helped a lot!
Comment: You're most welcome.. :)
Comment: Can admin_print_scripts-$hookname be used for a hook which has been created like $hookname = get_plugin_page_hookname("my-quiz/lib/admin/$code_page", '' ); where codepage is filename.php ?
Comment: Not answering this here now you've asked a question, see my answer to your question. ;)
Comment: The detail here is definitely worth a vote. Thanks for this.
Answer: If you want the url to a file in your plugin directory, you should use plugins_url(), like this:
// The url to the `wordpress.png` file in the `images` subdirectory of the plugin
plugins_url( '/images/wordpress.png', __FILE__ );

Remember, people can rename your plugin directory, so don't hard-code it in your file.
Answer: you can use WP_PLUGIN_URL like so:
WP_PLUGIN_URL .'/plugin_directory/filename.css'

or you can define your own like this:
define( 'PLUGIN_DIR', dirname(__FILE__).'/' );

on the main plugin file.
hope this helps.
Answer: I typically use this:
$baseFileDir = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__));

Then to reference a file inside a folder called "resources" in your main plugin directory, you'd do:
echo $baseFileDir . 'resources/file.php';

URLs of plugin resources?


Get screen bounds of 3D object

Question: I'm trying to draw a 2D plane that has minimum dimensions to contain a 3D model (a sphere). How do I calculate the minimum size and position of the rectangle to completely cover a 3D model on screen?
Comment: can you elaborate why do you want to calculate the dimensions in 2D plane (rectangle), rather than in 3D (bounding box)? maybe you are asking the wrong question?
Comment: So basically you want to cover a bounding box on 2 specific axis? You should be able to calculate each length on each axis by the boundingbox struct. Then simply create your plane with these dimensions.
Answer: Loose fitting, fast
Generate a bounding AABB, which you likely already have (and is super cheap to compute for a sphere).  Project the AABB's corners to the screen.  Take the maximum and minimum X and Y values of the projected coordinates to form bounds of screen-space rectangle.
This will be at least as large as the object.  Depending on camera orientation, the AABB may extend past the visible edges of the object, so the rectangle will be larger than the object (but no smaller).
Close fitting, slow, generalized
The above algorithm is mostly the same except we no longer want an AABB.  Rather we want a bounding box aligned to the camera.  One way to do this is to take the camera's up and right vectors and to find the points on the mesh/object farthest point in those directions and their inverses.
This is quite easy, albeit slow.  For a plain mesh or triangulated object take each vertex and project it along the input axis (+X in camera space, -X in camera space, etc., all unit vectors).  In this projection you'll compute a dot product between the point (treated as a vector) and the unit direction vector; simply keep the vertex with the largest dot product which is the point furthest along that direction vector.  You can avoid needing to iterate over all vertices for both the positive and negative versions of a direction vector by taking both the largest and smallest dot product vertices.  Once you have these vertices you project those to the screen to get their screen-space coordinaes and use those as bounds for your screen-space rectangle.
For more mathematical shapes like a perfect sphere, you need to find the function that computes this equivalence.  For a sphere it's super easy: the vertex "position" of the farther point on the sphere in any direction is the center point of the sphere plus the radius scaling the target direction.  More complex shapes can have very intricate functions, but thankfully you generally always use vertices/meshes in games.
Since the sphere is so special, if that's all you care about you can simplify all of the above for just that case.  Center point of sphere plus the camera up/right vectors scaled by the radius.
Comment: Sory but could you be more explicit , i'm totaly new to xna 3D all that i've done until now is to draw some models i don't know what are you talking about, or some code cold be very helpfull
Comment: @PinteLaurentiu: I'm unsure which part to expound upon.  If you don't know what projecting a vector means or how to do it or don't know what an AABB is or what the standard 3D camera basis is, you maybe need to step back and start at the foundation.  There should be info right here on GDSE on those if you search bit, or Google it.  Or if you have specific questions not answered here already, post a new question.

Get screen bounds of 3D object


Custom Button in Lightning and Visualforce

Question: There is a managed package in salesforce. I am trying to extend its class by adding some code in it. I have created a custom button. That button is visible on page layout by default in classic mode. But for lightning mode, I have to manually drag and drop it from mobile and lightning actions option. Is there any way through which I can do it programatically rather than just manual drag and drop in lightning mode ? Same with visualforce page. I can see available custom button and there is option to add it. But this is manual drag and drop. Is there any way I can do this programatically without having to do manual drag and drop ?
Answer: You can directly update the Layout metadata. You would retrieve the layout metadata file, the dependencies (the button etc.) preferably using Salesforce VS Code, then modify the metadata to include the button on the layout and deploy your changes back to the org.


how to find the disk usage of a directory in Unix

Question: Can someone explain how this calculation is done for disk usage? I am confused because in line1 4k , line2 4k line3 36k and total is also 36k
 $ du -ch
 4.0K   ./tempFolder
 4.0K   ./Folder1
 36K    .
36K total

Answer: In the output of du -ch, the last line is the total you asked for with -c while the second to last line is the total size of the directory you queried.
In your case of running du without a specified directory it uses ., otherwise known as the current directory.  The full size of a single queried directory is usually also the total size.  You would normally use the -c option when you want the total size of multiple directories passed to the du command, i.e. du -ch /opt /srv /etc
Also, the output of du -ch does not show sizes of individual files, just their totals in the directory.  Without knowing the contents of the directory associated with that output, I would assume you have 28k of regular files in that folder as well as those two directories.
Comment: In those 28K, there's also the directory file (`.`) itself.
Answer: By default, du shows size counts for only directories as a whole; the counts of files (non-directories to be exact) are not shown individually but their sizes are obviously counted and added up to the size count of their parent directory.
So, in:
4.0K   ./tempFolder
4.0K   ./Folder1
36K    .
36K total

du is showing size count for the current directory (as without any filesystem path argument, it defaults to .), recursively -- totaling in 36K
directories ./tempFolder and ./Folder1 -- both has sizes of 4K individually (again calculated recursively)

As a side note, to make du to show the size for individual files as well, use -a/--all:
-a, --all
    write counts for all files, not just directories

Answer: You can try this way.

du -ch location  | grep total
Comment: Welcome to the site, and thank you for your contribution. Please note, however, that the OP does not want to isolate the grand total from the output of `du`, but wants to understand how this value is calculated (in particular given that it is not simply the sum of all values on the lines above the total).


Is it possible to programmatically 'clean' emails?

Question: Does anyone have any suggestions as to how I can clean the body of incoming emails? I want to strip out disclaimers, images and maybe any previous email text that may be also be present so that I am left with just the body text content. My guess is it isn't going to be possible in any reliable way, but has anyone tried it? Are there any libraries geared towards this sort of thing?
Answer: In email, there is couple of agreed markings that mean something you wish to strip. You can look for these lines using regular expressions. I doubt you can't really well "sanitize" your emails, but some things you can look for:

Line starting with "> " (greater than then whitespace) marks a quote
Line with "-- " (two hyphens then whitespace then linefeed) marks the beginning of a signature, see Signature block on Wikipedia
Multipart messages, boundaries start with --, beyond that you need to do some searching to separate the message body parts from unwanted parts (like base64 images)

As for an actual C# implementation, I leave that for you or other SOers.
Answer: A few obvious things to look at:

if the mail is anything but pure plain text, the message will be multi-part mime. Any part whose type is "image/*" (image/jpeg, etc), can probably be dropped. In all likelyhood any part whose type is not "text/*" can go.
A HTML message will probably have a part of type "multipart/alternative" (I think), and will have 2 parts, one "text/plain" and one "text/html". The two parts should be just about equivalent, so you can drop the HTML part. If the only part present is the HTML bit, you may have to do a HTML to plain text conversion.
The usual format for quoted text is to precede the text by a ">" character. You should be able to drop these lines, unless the line starts ">From", in which case the ">" has been inserted to prevent the mail reader from thinking that the "From " is the start of a new mail.
The signature should start with "-- \r\n", though there is a very good chance that the trailing space will be missing.
Answer: Version 3 of OSBF-Lua has a mail-parsing library that will handle the MIME and split a message into its MIME parts and so on.  I currently have a mess of Lua scripts that do
stuff like ignore most non-text attachments, prefer plain text to HTML, and so on.  (I also wrap long lines to 80 characters while trying to preserve quoting.)
As far as removing previously quoted mail, the suggestions above are all good (you must subscribe to some ill-mannered mailing lists).
Removing disclaimers reliably is probably going to be hard.  My first cut would be simply to maintain a library of disclaimers that would be stripped off the end of each mail message; I would write a script to make it easy for me to add to the library.  For something more sophisticated I would try some kind of machine learning.
I've been working on spam filtering since Feb 2007 and I've learned that anything to do with email is a mess.   A good rule of thumb is that whatever you want to do is a lot harder than you think it is :-(
Answer: Given your question "Is it possible to programmatically 'clean' emails?", I'd answer "No, not reliably".
The danger you face isn't really a technological one, but a sociological one.
It's easy enough to spot, and filter out, some aspects of the messages - like images. Filtering out signatures and disclaimers is, likewise, possible to achieve (though more of a challenge).
The real problem is the cost of getting it wrong.
What happens if your filter happens to remove a critical piece of the message? Can you trace it back to find the missing piece, or is your filtering desctructive? Worse, would you even notice that the piece was missing?
There's a classic comedy sketch I saw years ago that illustrates the point. Two guys working together on a car. One is underneath doing the work, the other sitting nearby reading instructions from a service manual - it's clear that neither guy knows what he's doing, but they're doing their best.
Manual guy, reading aloud: "Undo the bold in the centre of the oil pan ..." [turns page]
Tool guy: "Ok, it's out."
Manual guy: "... under no circumstances."
Comment: the thought had occurred to me and no my process isn't destructive, emails are preserved in their original format, but i need to use elements of the supplied information in other ways, however the point you make is exactly the thing that is nagging away at me..
Answer: If you creating your own application i'd look into Regex, to find text and replace it. To make the application a little nice, i'd create a class Called Email and in that class i have a property called RAW and a property called Stripped.
Just some hints, you'll gather the rest when you look into regex!
Answer: SigParser has an assembly you can use in .NET. It gives you the body back in both HTML and text forms with the rest of the stuff stripped out. If you give it an HTML email it will convert the email to text if you need that.
<code>var parser = new SigParser.EmailParsing.EmailParser();
var result = await parser.GetCleanedBodyAsync(new SigParser.EmailParsing.Models.CleanedBodyInput {
    FromEmailAddress = "email@example.com",
    FromName = "John Smith",
    TextBody = @"Hi Mark,
This is my message.

Thanks
John Smith
888-333-4434"
            });

// This would print "Hi Mark,\r\nThis is my message."
Console.WriteLine(result.CleanedBodyPlain);

</code>


Automatically change Visual Studio 2010 Source Control Provider (using Macro/Plug-in)

Question: It is a common scenario for me nowadays to work on projects that use different source control providers. For example, SVN, Mercurial, etc.
I feel the plug-ins should automatically detect the source control used for a project and should take over automatically. But sadly, that's not the case. Everytime, I load a project, I have to go to options and change Source Control plug-in.
I was thinking of writing a macro or a plug-in to do that for me.
I was looking for a name of property to change in DTE.Properties, but could not find any in related property in registry @HKCU/Software/Mircosoft/VisualStudio/10.0_Config.
I am looking for an advise on this.
Comment: Can anyone help me on this one?
Answer: Check out: https://scs.codeplex.com/
Haven't used it personally, but seems to fit your needs.


Is there a way to share a wi-fi connection over wi-fi?

Question: The problem is that here is a router (at a cottage), which only allows 2 connections. but we need wi-fi for 8 devices. so the plan is to create another wi-fi spot to share our connection. is there a tool or tutorial for that?
Answer: In order for a Mac to create a local Wi-Fi network, it needs to have a wired Internet source. So what you need to do is:

Connect an Ethernet cable from the router (the wired source) to a Mac.
On that Mac, choose System Preferences > Sharing.
Select Internet Sharing.
Choose Ethernet from the "Share your connection from" pop-up menu.
Select AirPort in the "To computers using" list, then click AirPort Options and give your network a name and password.
Connect the other computers to the new Wi-Fi network you just created.

If needed, there are more details on this Apple help page: Sharing your Internet connection.
Answer: You could do it with the built-in Sharing feature (System Preferences->Sharing), but it would require two wifi cards in the device acting as the bridge. More broadly, to my knowledge, it isn't possible to share a connection in the way you are proposing with a single wifi card (though you could extend the signal, it would still be limited to the same number of connections as that is bring managed by the original access point).
Comment: But not from the same wi-fi you're trying to share from!  Put another way - your wifi card can either be acting as a base station (which is what you do when you share through it) or it can act as a client adapter - it can't do both at the same time.
Comment: You don't need two adapters. Internet sharing works fine with a singke adapter.
Comment: How can I extend the signal? Wireless routers usually have some option for this, but I don't find anything for macOS.
Answer: Yes you can use Internet sharing with a single WiFi connection. Just enable it from the System Preferences. (The previous poster is wrong. I did this at my Mom's house to allow iPad and iPhone use and it worked fine.)
Comment: I'm afraid I'm pretty skeptical.  What were your selection is the "Share your connections from" and "to computers using" fields?
Comment: At least on my machine, if you choose System Preferences > Sharing > Internet Sharing and then select "Share your connection from AirPort," the only options are Bluetooth and Ethernet. So no, an incoming Wi-Fi connection cannot be turned into an outgoing Wi-Fi connection.
Comment: One possibility: my Mom's still using Tiger, so maybe that's something that changed in Leopard or Snow Leopard. It is true that when I enabled the sharing over WiFi, OS X showed a warning that I might be violating the terms of service of my ISP. Sounds like the ISPs have successfully lobbied Apple to remove the option.


What is the best way to print a model with support material in first layer?

Question: I am trying to print a model that requires support material to be on the first layer, what is the best way to accomplish this? I am currently using Cura. It seems that the support material is too flaky. I have the infill for the support at around 8%
Comment: If you can post a picture of one of your "failures" that would be a big help.
Comment: I think one of my issues is that my belt is really loose and it skipped
Answer: I had the same problem printing a miniature just recently.  As always, settings are somewhat dependent from the object you want to print, but here are some suggestions:

Increase the support density: 15% (8% is very low!)
Support pattern: zig-zag with "connect zig-zag" option enabled (add stiffness to the "column" of support)
Enable support interface (increase adhesion to the plate, and provide a more "beefy" base for the support material)

For reference, here's a screenshot of my settings as I tweaked them for that miniature (printed a 0.1mm layer height).

("Support line distance 1mm" is the same as "Support density 15%", or at least it is the same with my nozzle size)
If your problem was not only with the "flakiness" of the material, but also with it adhesion to the bed, then prepping your printing bed somehow (with a bit of painter tape, glue, etc... can help.  Alternatively using a brim or a raft (as also suggested by another responder) could also help.
EDIT: all the above still standing true, it turns out the OP had a hardware problem as well, his timing belt being loose (see comments).
Comment: Alright thanks! I figured it out by using Brim and my belt is really loose so it skipped a lot. Lots of wasted filament lol, thanks man though!
Comment: Alright man, did it, hopefully other people find this post useful
Comment: Oh sorry man haha, your answer is still a good one and helped with the issues at hand
Answer: I cannot comment on your infill percentage for supports, since I never use them. In any case, increasing the infill may well have little or no effect.
However, you could try two things: If your slicer includes supports when generating brims, then use brims. Otherwise, use a raft.


Difference between "size" and "dimension"

Question: What is the difference between nouns "size" and "dimension". When I want to set dimensions/sizes of an object which noun should I use?
Answer: Size :
Usual for daily life, such as cloth size (L,M,S), freezer size (storage volume in litres), cup size (Large, medium)
Dimension :
Usual for engineering detail, such as dimension of a rectangle shoe box (length x width x height)
Comment: But why if you google for screen dimensions, all articles are titles like "Screen sizes"? (I'm a foreigner.)
Answer: Dimension means size for engineering, formally or informally, and has a vector property associated with it. One can refer to the dimension "length" of a couch when buying furniture or on a mechanical drawing designing it. "Size" is more general. The words are synonyms; it is the usage which differs. I must disagree with our physicist friend regarding the use of the word dimension in ordinary speech. People use it all the time when they are specifying the length property of day-to-day objects, especially how they will fit into a given space.
Comment: I'll plan to use this term for describing object geometry, that's why I preffer the physical or mathematical meaning: "geometrical properties of surrounding us objects". But your opinion is usefull too.
Answer: You can find both words in most of dictionaries. As a physicist I would not use the word "dimension" in a daily life. For me, this is a mathematical term designated to a property of space. The noun "size" refers to geometrical properties of objects that surrounds us. Below are some daily meanings of the noun "dimension" from dictionary.com.

a. measurement in length, width, and thickness.
b. scope; importance: the dimensions of a problem.


how to get valid URL in combination of text and field content in VIEWS

Question: Field HOSTNAME returns IP Adress.
I have to overwrite the field output .
Is there a way to modify this with an given URL like this:
'www.ip-tracker.org/locator/ip-lookup.php?ip=' and adding the field content of HOSTNAME to get an valid URL?
Answer: Yes you can use the Rewrite results option on your Field settings. Use the Output this field as a link option and enter only the URL with the field token replacement pattern at the end of it.
You can look up the token under Replacement patterns under the Rewrite results option.
If you need some more control over the link HTML you can use the Rewrite the output of this field where you construct the entire link HTML <a href="....


Can we have a "rec-room" tag please?

Question: in the rec room community we want to try to use Arqade for frequently asked questions. Could you please create one, or tell me what to do to get it created? Thanks.
Comment: I'll not post this as an answer as I don't know our policy on using Arqade as an FAQ website (and that's IMO the main question that needs to be answered here), but a tag will be created as once a question is posted, either by asker if they have enough rep, or by an editor who has enough rep. You may also raise a mod flag on such a question asking for said role to be added, though just [asking in chat](https://chat.stackexchange.com/rooms/35/the-bridge) may also be sufficient as there's a large number of active high-rep users there, including myself.
Comment: @arghtype Thanks for the warning, but there isn't much we can do about that. We are encouraging people to create their own accounts. But naturally, most of the answers will come from a small set of people. We are not using multi-accounting or anything to boost scores or whatever you can attempt with that. But the people who come here for rec room will probably mostly interact with rec room questions, and only vote on each other.
Comment: Thanks for that. We are not trying to start an FAQ site, but redirect rec room "programming" questions that fit a Q&A style better here, than having them asked on discord or reddit repeatedly. I'll try the chat next, if this question doesn't help.
Comment: Also what is the actual difference between an FAQ site where people can ask questions on their own and a Q&A site like this?
Comment: Related: https://gaming.stackexchange.com/help/product-support
Comment: @SteakOverflow Well, I would say the difference is on the availability of the answer. FAQ or Frequently Asked Questions, is more for common stuff (as it's name stand for).
Meanwhile, I would use StackExchange for something more obscure, something that you can't find the answer in 5 minutes online or just reading the manual.
Comment: Looks like you guys are using multiple accounts to build up knowledge base, be aware of anti voting rings algorithms https://meta.stackexchange.com/questions/126829/what-is-serial-voting-and-how-does-it-affect-me
Answer: Welcome to Arqade!
There's nothing wrong with using us for your FAQ/Q&A efforts (in fact it's something that we'd like to encourage). Just bear in mind that each question must be able to stand on it's own, and fit into our rules around what is on or off-topic.
The sorts of questions that would work best for us would most likely be gameplay-related. As you mention programming (I assume Rec Room uses a 'Roblox'-style approach to programming?), some questions may be a better fit for Game Development or even Stack Overflow.
Also note that the questions should be reasonably scoped. For example, "How do I build a Tetris clone in Rec Room?" would be too broad, but "How do I determine if an entire row is filled with blocks?" should be ok.
As for creating the tag - tags cannot exist without a question to apply them to, and Stack Exchange requires users to have 300 rep to unlock tag creation privileges. Our community's workaround to this is covered in our faq question: I want to ask a question about a game which has no tag yet, how should I tag it?:

State the game name clearly in your title and question body.
In the meantime, put some tags that do exist: platform, genre, and any other related items. You don't need to be obnoxious with a loud "PLEASE TAG THIS", just having the game name is often sufficient: often times that the people who can retag very easily notice when a question about a game has the platform and genre tags but not the game title, and will spring into action and retag the question appropriately.
If noone has edited your post with the game tag in a couple of days, you can ask someone in chat, or flag your post for moderator attention, with a custom reason asking for the tag to be created.

Let me know if you need any further information, and thanks for considering us for your FAQ efforts!
Comment: Thanks. So I I understand that correctly, we will start do post some questions and answers and have them tagged later. Let me also apologize for the confusion about the term "programming". It doesn't refer to any coding, all "scripting" is done with in-game circuits.
Comment: Ok cool. And yep that sounds fine to me :). Once one question is retagged to [rec-room], the tag counts as 'created' so you will be able to use it yourself for subsequent questions :)
Comment: rec room uses big "physical" blocks of code for programming, like scratch, and roblox uses solid code, so no, they are not similar in that way.

Can we have a "rec-room" tag please?


Finding the Position of a certain record in the Query in DJango ORM

Question: I have a model of Django like this,
class Account(models.Model):
    user = models.OneToOneField(User, null=True, on_delete=models.CASCADE)
    name = models.CharField(max_length=255, null=True)
    ratings = models.FloatField(default=1000)

What I want to do is the person who's logged in, I want to find his rank based upon the user's ratings. So, that is, I need to find the Position of the specified row in a query where the records will be ordered by the ratings column, in descending order.
I found a good solution here but it is unfortunately not working for me. https://stackoverflow.com/a/51317266/11454905
Using this same concept, I typed this query,
player = Account.objects.filter(user = request.user).annotate(rank = Window(expression=Rank(), order_by=F('ratings').desc()),)[0]

But no matter what user is, it always returns player.rank as 1, which is not true. I fail to understand what am I doing wrong and how can I correct it.
Answer: If you are doing this for just a single User object, then you can just count the Users that have a rating higher than the current user - I note that you are using filter(user=request.user) which doesn't actually get a single user object. Generally speaking, you should use get(), although here you can just do request.user.
rank = Player.objects.filter(ratings__gte=request.user.ratings).count()

As to annotating a queryset of users, you can use Window() and DenseRank() expressions:
from django.db.models import Window
from django.db.models.functions import DenseRank

players = Player.objects.order_by('ratings').annotate(
    rank=Window(
        expression=DenseRank(),
        order_by=F('ratings').desc()
    )
)


How do I open several files at once in Emacs?

Question: Often when I start emacs I open the same set of files. How can I make it so that I can quickly select several files from a directory and open them?
Comment: See related: https://stackoverflow.com/a/1110487
Answer: You could try setting up a fileset in Emacs to accomplish this .
Comment: +1 I did not know about this. Thanks.
Answer: When you open emacs you can run dired. This will allow you to mark several files and open them at once. Not the best method, just putting it out there.
Dired Manual |
Marking files with Dired
Comment: You can't do this with `dired`, (unmodified.) However `dired+` can, or use Trey Jackson's *defun* :  http://stackoverflow.com/a/1110487/311660
Answer: Yet another alternative is to just use a file glob (C-x C-f ~/foo/*.c RET, or proj/*/*.[ch], etc)
Comment: Brilliant! I didn't know you could do that! Thanks!
Answer: Have a look at the desktop commands, you can save your desktop into a file, say at the top of your project and then use desktop-change-dir to that project and it will load the files.
Have a look at the documentation on saving sessions. http://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html#Saving-Emacs-Sessions
Answer: This is a think-outside-the-box solution:
I use ENSO launcher on my windows and am more than satisfied with it.

select the files you want to open in explorer or total-commander or anywhere
simply press ENSO button and type open with emacs
and presto :)

I know it is not an emacs solution, but it is a very helpful productivity tool.
Comment: Probably want `emacsclient` instead of `emacs` so that the file will open in the Emacs you already have running. You know, the one you started after your last reboot and will be open until your next reboot?


Painting for mudguard is needed!

Question: I want my mudguard(for cycle) in style but I don't have paint.  When I search web it is very costly.  Can I do it with water colour or fabric painting? Or there is any other paint but it should be below 500 rupees / $7 USD / 6 euro
Comment: What are your mudguards made of?
Comment: Mudguards are made of metal or plastic. You need a paint that was specifically designed to stick to those materials. Water color paint will not stick. It is unlikely that fabric paint will stick. The enamel paints Criggie suggests below are a good inexpensive option. Also, a can of spray paint falls into your price range.
Comment: 500 whats? We cannot answer a shopping question. As far as paint types, choose two of  cheap, long lasting and looks good,
Comment: Just confirming, you are referring to a pedal-powered bicycle, and not a motorbike, right?
Comment: Spray paint made for the material with proper prep and then a clear coat if possible, the prep and time taken during painting can make a huge difference in the end result.
Comment: Go to an auto parts store.  They generally have racks of "touch up paint".
Answer: I'd suggest starting with enamel paints from a model shop.  They come in small tins, and you will need one tin of each colour your design requires.
Enamel paints used to mean oil-based, but now there are "acrylic enamels" that can wash up in water, but still have oil based qualities.
Additionally you will need multiple small brushes, on a size to suit your design.  Fine pointed brushes for fine lines and details, and some wider brushes (10-12mm) to fill in larger parts.
Preparation is key - literally.  You need to prepare the surface so it will have a key, or tooth, to hold the paint.  That means sanding, and you might require an etching primer too.
Lastly once your design is done, you will need multiple layers of clearcoat on top to protect the paint from impacts, dirt, weather, and fading from UV light.
Another significant issue is vibration and cracking - a bike is ridden and the mudguards/fenders will flex.  This could crack the paint and make it fall off over time.   I suggest you try a small test before investing a lot of time in something that may look awful after a few rides.

Sadly one pottle of paint is around $4 USD so your budget won't go far.  I'd suggest you buy some 220 grit sandpaper $3, one colour of paint $4, one spray can of clearcoat $12, and a paintbrush $2.  There will be leftovers of course, but you're in for at least $20, or 1500 rupee.  You might be able to source things cheaper, or perhaps you already have some items.
Either way, if you just slap paint on an un-prepared surface, it won't last very long.  In that case, might be better to not do it at all.
Answer: Go talk to an autobody shop. If you really want to have it painted to last they should be able to prep, paint, and do all of that for maybe $150-$200.
They have all the base paints in stock as part of their day to day business so it is less costly for them to mix up the right amount vs. you having to buy the paint, sprayer, air compressor, have a clean environment to do it, clear coat, etc.
As a side note if in the US, try to find a shop that sprays PPG as they usually have a lifetime warranty with the job.

Based on your update and not knowing what labor and quality of work is in India, or the value of the rest of the bike, you could always buy a can of spray paint, sand paper, spray clear coat to see what you can do that way.
Honestly, it probably will not look better than factory in terms of finish quality. The only way to get close to finish quality is take it to a auto body shop and even auto body shop may sometimes not have a perfect finish (e.g. orange peel, dirt in paint, fish eye, etc.).
You could also try Rhino paint liner paint that can be dyed different colors. I do not know if that is available in India. That is pretty forgiving for a nonprofessional to apply and it will end up looking the same as if a professional did it. A lot of off road SUVs use it on part or all of the vehicle because it is durable and cheap to repair.

Update - I doubt you will find a solution for $7 dollars that will not look horrible or have any meaningful durability.
Comment: I kind-of assumed "in style" meant artwork and customisation - you make a good point it might just be a single plain colour paint job.  +1
Comment: You may have luck finding a local semi-informal car body repair shop or area. You might be able to get some small amounts of leftover primer and paint(s) that they would otherwise throw away, and which are enough for your small fender area.
Comment: Re: vibration an cracking: Applying the primer and paint in multiple very thin coats will help, as will an additive called "flex" . If it's not already in the primer/paint, ask the body shop if they can add a bit to what you're getting. Check out how-to paint auto body repair videos on youtube for info; remember that the prep will probably take more time than the actual painting.
Answer: Regarding 'water colour' paint job:
I have seen some water color paints that stick fairly well to metal. Probably not exactly what the OP is looking for, but with a bit of artistic ability and a few coats of a 2K clear coat, I bet you could make a pretty cool and unique paint job.
Answer: Get advertising and other stickers, cut them up and stick them on.
Comment: That... is a stunningly alternative solution.   Thank you for thinking outside the box!

Painting for mudguard is needed!


What exactly are the requirements for the "written invitation" from a family member or friend required for entering Sweden without a visa?

Question: Looking at Migrationsverket's article about entering Sweden without a visa, it states that if you don't fulfil the 450 SEK per day requirement, you can alternatively provide a "a written invitation from your family member or friend that you will be staying with"1. What's not clear from the article is what a "written invitation" actually entails. As such,  I would like to know, what exactly is required from this written invitation? Is a text message on a messaging service enough, or does it need to be a printed formal letter? What should the contents of the text be?
Comment: From the way similar countries do it, I would expect the letter to contain your name and contact details, their name and contact details, where you will be staying, and their statement that they will cover your cost of living/housing while you are visiting. I don't know if a digital message will do today, but a decade ago it wasn't enough.
Comment: @phoog Yes, flying directly to Sweden.
Comment: Are you flying directly to Sweden?  @o.m. do the Swedish authorities routinely examine the finances of visa-exempt travelers?
Comment: @phoog, that's why I made a comment and not an answer. I can talk about some other Schengen countries. Spot checks happen.
Answer: The form and instructions on how to use it are available here: https://www.migrationsverket.se/download/18.5e83388f141c129ba631285c/1666876596848/241011_Inbjudan_en.pdf
The invitation form covers eg the personal details of the individual issuing the invitation and their relationship with the applicant, the proposed itinerary and financial details of the visit, and the applicant's details.
Non-visa nationals who don't fulfil the 450SEK per day requirement and need to be able to demonstrate adequate subsistence at the border if asked, may carry the invitation form or an equivalent (eg a letter covering the same topics as the form) with them.
The person issuing the invitation must send the completed form together with the required attachments by mail or scan them and send them via email to their relative or friend abroad.
Visa nationals must submit the form with its attachments together with their application for Schengen visa.
Comment: @Newbyte in my experience, non-visa nationals are rarely asked for such details, but in theory they can be asked.  On top of this, my experience is over 20 years in the past and only covers other Schengen countries, not Sweden.  If a non-visa national is asked for justification of the visit, the requirements are essentially the same as for a visa application, though presumably border officers are likely to recognize that travelers may not think to bring comprehensive documentation with them.  It could be that a phone call to your host would suffice.
Comment: @Newbyte Answer amended to reflect usage of the form (or an equivalent) for visa-free nationals.
Comment: Just to add to the legitimacy of this answer, the border control did accept this form as enough to let someone stay here for 80 days.
Comment: Isn't this intended for someone applying for a Visa? As specified in the question, I am asking about visa-free entry. Let me know if I'm misunderstanding something.


Umbraco -- controlling access to media by membership

Question: I need to set up access to media files with the following structure: A media folder is designated as belonging to a specific member group. Then, a sub-folder below that needs to be available to a subset of members from the parent's member group. Any thoughts on how this can best be accomplished? I'll render the actual file download links with a user control, but how should I set up this access control on the back end? I need a member-group picker and a multiple member picker. Do these exist anywhere?
Answer: Never used it, but there is a Filtered Member Picker project on our.umbraco. You may also be interested in the Protected Media package. I can't attest to their quality, but they may help guide you.
Answer: This feels like a custom section in the admin pages where you make a page(s) to manage this nested hierarchy. See the videos on Umbraco.org for how to create a custom section.
You'll write the aspx page(s) for the custom section like you would in a vanilla ASP.Net site and probably store your authorization information in custom database tables.
You'll also write a business logic class(es) that supply this information to a web user control you write. The web user control(s) are wrapped inside macros and used in a template. They'll expose the autorized content to the given visitor.
Its not a tiny job, but you should be able to get close to the end result in a day's time if you're really familiar with Umbraco; then polish it up from there. There is no simple configuration for this, you might find a 3rd party add-in, but that's doubtful. If you can solve this challenge using standard ASP.Net, then you can easily add in a custom section to the Umbraco admin pages and get a similar feature up and running.


How can one show the current directory in PowerShell?

Question: I'd like to have the current working directory show on the powershell command line, as would be done in a (for example) CMD prompt. How can I do so?
Answer: Check this out: http://mshforfun.blogspot.com/2006/05/perfect-prompt-for-windows-powershell.html
Basically, you can create a 'profile' file called Microsoft.PowerShell_profile.ps1 which will run every time you start powershell.
Depending on whom you want it to run for, there are several folders you can put this file in (explained in the link above).  If it's just for yourself, you can create a folder called WindowsPowerShell in your My Documents folder, and put it there.
If you put this function in that file:
function prompt
{
    "PS " + $(get-location) + "> "
}

It will make your prompt look like this:
PS C:\directory\path\here>
There's a whole lot of other stuff you can put in it, but that's the basics.
NOTE: before you can use the profile script, you'll need to run "set-executionpolicy remotesigned" from the powershell - this will allow you to run unsigned scripts written locally on the computer and signed scripts from others.
Comment: Doesn't seem to work for Visual Studio's add-in :( Oh well.
Comment: @BillyONeal: Check the value of `$profile.CurrentUserCurrentHost` and `$profile.CurrentUserCurrentHost` to see what (user) profile scripts are valid. Different hosts (e.g. VS vs. ISE) have a different value for `$profile.CurrentUserCurrentHost`
Answer: Simple, add the following to your profile.ps1 file (under your My Documents\WindowsPowerShell folder):
function prompt { "$pwd>" }
Answer: Try the following:
$CurrentDir = $(get-location).Path;

Comment: above code is also a way of getting the location.
Answer: Nowadays, this works fine:
echo "$PWD"
which works differently than
echo $PWD
Just don't forget the quotes :) Sample output below.
PS C:\Users\user name> echo $PWD

Path
----
C:\Users\user name

PS C:\Users\user name> echo "$PWD"
C:\Users\user name
PS C:\Users\user name>

Answer: (Get-Item -Path ".\").FullName

Answer: To show only the current directory in PowerShell (or pwsh), put this in your profile.ps1:
function prompt { 'PS - ' + (get-item .).name + ' >' }


Simulating a circuit consisting of MOSFETs

Question: When simulating a circuit consisting of mosfets, when can you say that the MOS should be in cut-off, saturation. or linear (triode) region?
Specifically a charge pump circuit utilizing PMOS.(refer to the figure below for the circuit)
Comment: AFAIK, *all* MOSFETs have 'off', threshold, 'linear' and saturated regions, described in datasheets. Otherwise the device would be unusable. So go look at the datasheet. It very much depends n what you mean by 'act as a switch'. If a MOSFET is being used in a digital circuit, then it *is* important to know about the MOSFETs behaviour or specification around saturation.
Comment: The datasheet for a MOSFET will tell you the threshold voltage, at which it starts to turn on, and give graphs showing the 'linear region', and maybe full-on. Their Rds(on) is specified at 'full-on'.
Comment: Yes, but there are mosfets that act as switch or cases like if its digital, saturating the circuit is not so necessary. Cases like that is my concern.Thanks anyway @gbulmer
Answer: Every transistor in this schematic is probably operating primarily as a switch.  So they all move at some point in time between off and triode.  A MOSFET is in saturation if Vds > (Vgs - Vt) (for an NMOS, or |Vds| > |Vgs - Vt| if you prefer for PMOS with Vds, Vgs, Vt < 0).  A decent simulator should be able to report the device threshold for biased transistor. Normally we care about maintaining a device in saturation if we want high output impedance, usually when used as a current source or an amplification stage.  Charge pumps are essentially switch and capacitor networks for pushing charge around, so the region of operation is less of a concern here.
Comment: thank you @mixed_signal. But I am going to make a mathematical model out of it, so is there anything you can advice on how should do it and what important things I should take on to consideration?


Getting keyboard to work in debian 6.0 in order to unlock root partition

Question: I just installed Debian 6.0, encrypted / and now I'm trying to boot. When GRUB comes up, I select Debian, it loads the initrd and asks for the root password, however I can't enter anything, because the system doesn't recognize my keyboard. It is a standard USB keyboard. What can I do to get my keyboard working?
Comment: I'm assuming that you are referring to the root partition encryption passphrase, rather than the root password (which is something else and comes much later, if at all). While you are entering the passphrase (and this is normal for password/passphrase entry at *nix consoles), nothing is echoed back to you. Try simply hitting Enter once; that will tell you if input is recognized at all. I also tend to hit Num Lock once or twice, as a keyboard diagnostic. Debian 6.0 should support USB HID keyboards out of the box, and if it works in GRUB, at least keyboard-computer communications works properly.
Comment: Yes, the Keyboard is working, but not while unlocking the "/" partition. I plugged in a old keyboard via the PS/2-Hub and it worked. Anyway, i´ll try the solution from Endre Szabo below. Thank you!
Comment: Is the keyboard not responding at all at that point, or does what you type simply not show up on the screen? That's what you'd test by hitting Enter.
Comment: it was not responing at all. works now, thanks!
Comment: But what about the overwhelmingly vast majority of users who don't have a PS/2 keyboard? Are they shit out of luck? Or does one have to re-install the debian distro from scratch with partition encryption disabled?
Answer: Either add the following into the /etc/initramfs-tools/modules:
usbcore
uhci_hcd
ehci_hcd
usbhid

or change the module policy to most in /etc/initramfs-tools/initramfs.conf:
MODULES=most
After this, repack the initramfs with the command:
update-initramfs -u
Comment: You need to run `update-initramfs -u` at the end to apply the changes. See [this wiki entry](http://wiki.debian.org/Keyboard#How_to_enable_USB_keyboard_in_initramfs). But as Michael Kjörling commented, this change is probably not be longer necessary in Debian 6.0.


What does 100 grams of something look like?

Question: Is there any website, diagram or something that I could find that depicts how much a thing weighs, what that quantity looks like and how much calories it has?
Comment: Why would you need this instead of just getting a cheap kitchen scale? Any such website will have issues with the scale of the photos. It's kind of hard to look at a piece of chicken on a photo and judge if yours is the same size...
Answer: A website or diagram for ingredient amounts would have to be too exhaustive.  Just take your items and measure them.
Your title asked about grams, which is a measurement of weight, so get a kitchen scale.  If your recipe asks for milliliters, use a measuring cup.  More often than not, you won't be able to just eyeball an amount, especially if baking a cake.
For calorie info, a quick search online will show databases of nutrition for various foods, but you'll have to measure ingredients to match up with their amounts.  For example, 100 g of almond flour could have 144 calories, but you're baking with 250 g.
Comment: Plus, these days, most scales will do oz, pt, g, ml, etc & also tare with the flick of a button.
Answer: The short answer is to use some scales.  However, from your question it seems likely that you don't have any to hand.
It depends on the density of the substance in question.
If the substance is mostly water (e.g. juice or milk), then you can approximate its density to be that of water, which means that you can get a good idea of its weight by measuring its volume.  For example if you can measure 100 ml of it in a measuring jug, then you can be reasonably sure that weighs approximately 100 g.


Partitioning a Windows drive?

Question: I'd like to partition a hard drive with Windows installed on it (with bootcamp). I've tried using Disk Utility and GParted to do this, but unfortunately neither would let me. Are there any other programs I can use to partition the hard drive?
Comment: You would think a Windows that is so slow that you can not boot and use would be a bigger problem that you should try to solve.
Answer: A partition with a NTFS volume can be resized by booting to the Windows installation  media. This can be in the form of a DVD, flash drive or partition on a drive. The type depends on the model/year of your Mac. The command to use is diskpart.
Update:
If you macOS is High Sierra or Mojave, you can make a bootable Windows USB flash drive by using any of methods outlined in this answer. I assume your Windows is installed to EFI boot. If not post a comment. I assume you know how to boot to the flash drive installer. If not post a comment.
If first window to appear after select to boot from the flash drive should be the same as the image shown below.

When the above window appears, press the shift+F10 keys. This will open a Command Prompt window.
If you are having problems with the Windows volume, you may want to try repairing with chkdsk. The command below checks drive C, but does not make repairs.
chkdsk c:

The command below will attempt repairs.
chkdsk c: /f

If you get the message shown below, then close and reopen the Command Prompt window. Try the command again.
Chkdsk cannot run because the volume is in use by another
process. Chkdsk may run if this volume is dismounted first.
Would you like to force to dismount on this volume? (Y/N)

You can also check the volume for physical defects in the sectors. If found, an attempt is made to mark the bad sectors as unusable. This type of checking takes a very very very long time to complete.
chkdsk c: /b

You can use the diskpart command to shrink the NTFS volume C:.  After entering the command, you can get a list of all diskpart commands by entering help.
To get help for the shrink command enter the following.
help shrink

To see how small you can shrink volume C:, enter the following commands. If you get to small a value, then try booting to Windows and running the disk defragmenter.
select volume c
shrink querymax

To create a new 75 GB partition below volume C:, enter the following.
select volume c
shrink desired=75000
create partition primary
format fs=ntfs label="NewNTFS" quick
For ExFAT, substitute the following for the format command.
format fs=exfat label="NewExFAT" quick

If you want a FAT32 format, you probably will have to format with the macOS Disk Utility application.
When finished, close both windows.
Update 2
You can not enter all the commands on the same line. Entering the following will not work.
select volume c shrink desired=35000 create partition primary format fs=exfat label="NewExFat" quick

Instead enter the following
select volume c
shrink desired=35000
create partition primary
format fs=exfat label="NewExFat" quick

Below is an example where these commands are used.
Microsoft Windows [Version 10.0.17763.107]
(c) 2018 Microsoft Corporation. All rights reserved.

X:\Sources>diskpart

Microsoft DiskPart version 10.0.17763.1

Copyright (C) Microsoft Corporation.
On computer: MINWINPC

DISKPART> select volume c

Volume 1 is the selected volume.

DISKPART> shrink desired=35000

DiskPart successfully shrunk the volume by:   34 GB

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> format fs=exfat label="NewExFat" quick

  100 percent completed

DiskPart successfully formatted the volume.

DISKPART> exit

Leaving DiskPart...

X:\Sources>

Let me know if you have any questions.
Comment: @Sam: What? No comment about what parts of my answer worked or did not work. A comment would be helpful to other users you might read this answer.
Comment: Shrink querymax says the max ammount of reclaimable space is 23gb, even though there is over 200gb free
Answer: I'm afraid there's no official way of doing it without re-creating the Bootcamp partition and re-installing Windows. You could try a third-party utility, though: https://www.paragon-software.com/mac/bootcamp.html
Comment: If I do that, like using Hard Drive Manager, would that potentially make it unbootable?

Partitioning a Windows drive?