VIM text editor not found

Question: I recently started to use ubuntu to program - University standards. I was checking out different text editors and tried to install VIM through Ubuntu Software Centre. Everything went fine and I got it installed, but I couldn't find the launcher (not sure if that is the right term). Any reason why this might be the case?
Answer: Vim is a text based editor (to be used in a terminal), not a GUI program. It doesn't use menus but keyboard shortcuts. I use it a lot, but this is likely because I grow used to it long time ago, while I was working on Xenix and SCO Unix machines.
It has no launcher on the menu, open the terminal and type vim to start it.
Comment: I would say "in the terminal" :) But my English is quite poor, so I am not sure ....
Comment: What is the correct English here, "to be used on the terminal" or "to be used at the terminal"?.
Comment: Regarding "on" versus "at" the terminal -- in the sense you used it, I find both clear and acceptable.   "in" is perhaps better just because it is a bit more concrete (i.e., less abstract).   But "at the terminal" is fine, too -- that's a good idiomatic way to say it (in my opinion).
Comment: Jorge, LGB, jgbelacqua: Thanks for linguistic info/editing.
Answer: vim is a command line text editor, to use it you launch a terminal and type vim.
If you want a graphical vim you can install vim-gnome
sudo apt-get install vim-gnome

Answer: VIM is not a GUI software, it should be run in the terminal. VIM is not so easy to operate especially for beginners, it has separated "command" and "input" mode, etc etc. The advantage: you can find at least VI (if not vim) in almost all UNIX'es or even other systems, that's why it's favorite of many people ...
Comment: Nah, it's favourite of so many because like emacs, it's super useful with amazing editing capabilities...once you get past the steep learning curve. I'll never forget watching my programmer friend editing huge swathes of code, moving immediately to specific parts of a line, etc, all with a couple keystrokes, hands never leaving the keyboard. It's not for everyone, I'll give you that.

VIM text editor not found


My NPAPI plugin gets installed but I cannot call a method from it

Question: I have embeded a simple NPAPI plugin in a Google chrome extension.It gets installed on Google Chrome (it is shown in about:plugins) but the background html page shows "missing plugin" and when a method is called (say plugin.foo), it shows a message saying "the plugin does not have the method foo"
My invoke call looks something like this
static bool
invoke(NPObject* obj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result) {
    logmsg("invoke");
    int error = 1;
    char *name = npnfuncs->utf8fromidentifier(methodName);
    if(name) {
        if(!strcmp(name, "foo")) {
                    ...
                 ....

            return invokeDefault(obj, args, argCount, result);
        }
    }
    // aim exception handling
    npnfuncs->setexception(obj, "exception during invocation");
    return false;
}

https://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins
according to this documentation, i have modified my NP_GetValue function and the plugin does not have NPP_SetWindow since i didnt want it to be a windowed plugin.
Am I going wrong somewhere?
Also point out any other places that may have a scope of error.
Thank you
Regards
Answer: "Missing plugin" can show either if the plugin isn't loaded (e.g., you typo'd the MIME type in the object tag), or if the plugin crashes during initialization.
Have you tried running with --plugin-startup-dialog to see if your plugin is actually instantiated, and if so debug it?


Hostednetwork on Windows 10 with 2 Wi-Fi adapters?

Question: Recently I purchased a USB Wi-Fi adapter that's capable of connecting to 5GHz Wi-Fi networks, for use with my old notebook which only has a 2.4GHz adapter built-in. I intend to share the connected 5GHz network with other 2.4GHz devices around me, so naturally I thought of using the USB one (adapter name "Wi-Fi 2") to receive and the built-in one (adapter name "Wi-Fi") as hotspot.
Unfortunately info is scarce on how Windows handles multiple adapters of the same type. I've searched and read through SuperUser and other sites, and the closest-related question is this one: LINK: SuperUser. It indicates I have to disable/unplug the USB adapter while setting up hostednetwork for the built-in one, which I did.
I followed what it said up to the last step, where it lists a new "Local Area Connection" adapter, and the designated SSID shows. However, when I go to Properties-Sharing and set "Home networking connection" to "Wi-Fi 2", "Wi-Fi 2" stops working. It says "no internet" in the system tray, refuses to connect to any valid Wi-Fi access point I want it to, and from the adapter settings, it seems to be connected to the hotspot shared by "Wi-Fi", forming a self-loop.

I'm out of ideas at this point. Is there a setting I've missed or executed the wrong way?
P.S. I originally intended to post more pics illustrating the situation, but I'm new to SU and has no rep for that. Sorry for making it harder to read.
Answer: For me, the latest Windows 10 Version with the Settings->Network & Internet -> "Mobile hotspot" option seems to work better than any command line or dialogues.


Why does this Gminor7th chord have A instead of G?

Question: I am following this tutorial for Autumn Leaves on youtube:

. Around timestamp 3:40, the presenter plays the notes F - A - Bb - D and calls it a Gm7 chord. This baffled me immensely. At first I swore there was just a mistake in the video. A quick google search tells me this is a 'mediant' Gm7th chord. What is the reason for calling this chord Gm7th instead of a Bb7, especially when the piece already has a ton of Bb7's? I'm sure there's some music theoretic explanation that I have not encountered before, but I don't know, this seems like particularly egregious notational torture. How am I ever supposed to know whether I should be playing a 'mediant' or 'tonic' or 'subtonic' version of a chord from a chord sheet?
Comment: It'll be Bb maj7 rather than Bb7.
Answer: Yes, it is Gm7 (or Gm9) with missing G.
This is called rootless voicing, and it is a common way of playing chords in piano jazz arrangements. It is assumed that the root is played by some other instrument, like bass. It doesn't need to be doubled, and if doubled it may even clash.
Please note that the rootless version of the chord still contains the two most important tensions: the third and the seventh, so by playing this way you still preserve the large part of the harmonic motion. It also gives you more freedom in adding upper structures, like 9 in this example.
Answer: The video is misleading at this point, because the left hand (or bass part) has been left out. The left hand (or bass) would be playing G, so the total chord would be G-Bb-D-F-A, which, strictly speaking, is a Gm9. The added 9th, the A is a "safe" addition in this situation and adds nice color to the chord.
It's not a Bb7, because that chord has Ab rather than A. As played, without the root of the Gm7 chord, it would be BbM7.
Comment: Nice point about it not being Bb7.  I'm guessing the O.P. meant BbMaj7 but missed it because it was an aside to the main question, but for novices the error might have been confusing.
Answer: The whole verse is made up from 2-5-1s, as stated in the clip. So it's not surprising that after Am7♭5 - D7 - it's Gm, of some sort - rather than B♭, of some sort. Were it B♭, the preceding chord would more likely be F(7).
The fact that the chord shown is in 3rd inversion is really neither here nor there. The bassist at that point would most likely play a G, at least, leaving the piano left hand to play whatever other notes of the chord were fancied. A choice of G, B♭, D, F are obvious, with the A making Gm9, an extension of the original.
And even if there was no bassist playing, there's nothing in law saying chords must be in root position - quite often in jazz that's not the case, which is one reason why jazz voicings sound like, well, jazz.


What is the best practice of testing methods which call each other?

Question: Say I have a method A which calls a method B and does one additional thing. The B method behaves differently in 10 different cases and I have a broad unit test describing it. And now I want to test my method A. What is the best practice to do that? Should I run the same test with all 10 cases for method A to make sure that proper method is run? It sounds like an overkill. Or maybe I should test only one of that cases? But there's a risk that in future I'll write some method which will be quite similar to B and there will occure a bug which won't be detected by the test. Or maybe there are some ways of checking that my B method was fired just by registering its name? Maybe that's quite simple problem, but I'm new in unit testing and I haven't found any clear answer.
Comment: Possible duplicate of [How should I test the functionality of a function that uses other functions in it?](https://softwareengineering.stackexchange.com/questions/225323/how-should-i-test-the-functionality-of-a-function-that-uses-other-functions-in-i)
Answer: You're question isn't completely clear to me, so I'm making the following assumptions:

Method A and B are both "public",
Method B has 10 execution paths through it and 10 test cases covering those paths,
Method A calls B via at least one of its execution paths.
There are paths through B that are not used by A.

Also, I'm going to have to ignore "But there's a risk that in future I'll write some method which will be quite similar to B and there will occur a bug which won't be detected by the test" as I don't see how it's related to either your question or testing A and B.
The first thing I'd say is do not try to mock B, unless you absolutely have to. This is a classic testing newbie mistake that many folk make. You only want to isolate A from B if the latter has side-effects or is slow. If you mock out B, you'll simply be testing A against the mock functionality, rather than B's real functionality and you'll miss bugs as a result.
The next thing to ask yourself is, can you repurpose some of those B test cases to have them test A and B together? So if you have four paths through B that are used by A, test those paths via testing A. There's a huge caveat here though. Bear in mind that each of those tests will then tightly couple itself to existing functionality of A and B. If you later change A to have that functionality itself for example, you could end up not testing that part of B. Or changes might break tests just because the test is now brittle, not because you broke functionality, etc. As ever, there's a balance to be had between principle (test everything!) and pragmatism (I've got to ship this one day for there to be value in what I'm doing).
Comment: @DanRayson, No, not the dreaded "expert" tag. :) Experts (think) they are masters of their domain; knowing all there is to know. After 35 years of software development, I still strive to be a beginner: there's just still so much to learn and so many good, new ideas coming through all the time. I'll accept "highly opinionated know-it-all", but never "expert" :) And I don't think you should delete your answer either. Let others decide on the relative worth of each.
Comment: Deleted my answer after reading yours.  Expert.
Comment: @DavidArno, Is it true that as soon as we add an additional dependency into our SUT (method B), we are no longer unit testing, but instead, we are integration testing? I usually create two test projects per dll. A unit testing project, in which I mock out ALL dependencies in the SUT, and an integration testing project, in which I test the SUT with all its dependencies.
Answer:
I'm new in unit testing and I haven't found any clear answer.

In many cases, there isn't a clear answer: just different trade offs that you need to evaluate for your own circumstances.
The talk you need to watch is Integrated Tests are a Scam, by J.B. Rainsberger.  See also his blog.
You might also want to review some wisdom from Kent Beck (2008)

I get paid for code that works, not for tests, so my philosophy is to test as little as possible to reach a given level of confidence

One of the motivations of unit tests is that they constrain your choice of implementations; the idea being that the tests give you a signal that your changes have produced an observable change in the behavior of your system.
So if you have a bunch of tests for B, and assume that those cover A as well, that's fine right up until the point that somebody decides to change the implementation of A.
If A is-a B; meaning that you are supposed to be able to replace a B with an A and still have a correct program, then a potentially useful trick is to write one suite of tests that gets invoked on both A and B.
void verifyThatItWorks(SystemUnderTest sut) {
    // this is where the implementation of the test lives
    // including the setup, activity, and verification
    // aka arrange, act, assert
}

@Test
void testB () {
    verifyThatItWorks(new B())
}

@Test
void testA () {
    verifyThatItWorks(new A())
}

In some programming languages, there are conveniences that allow you to manage
parallel copies of large test suites
abstract class AbstractSpecification {
    SystemUnderTest sut

    protected AbstractSpecification(SystemUnderTest sut) {
        this.sut = sut;
    }

    @Test behavior1 () {...}
    @Test behavior2 () {...}
    // ...
}

class BSpecification extends AbstractSpecification {
    BSpecification () { super (new B()); }
}
class ASpecification extends AbstractSpecification {
    ASpecification () { super(new A()); }
}


Is a user's email address confirmed in Facebook Graph API?

Question: I get email of users by Facebook Graph API, but how can I verify that the user has confirmed his email after registration on Facebook?
Comment: AFAIK a user can not add just any email address to their FB account without "verifying" it by clicking a link in a message sent to that email address. And commonly on the web that's as verified as it gets with email addresses.
Answer: I tested this scenario by creating a new Facebook account and attempting to connect it to sites without verifying my e-mail address. The Facebook dialog did not allow me to do so, explaining that I must first verify my e-mail address before connecting.
Thus, you can rely on e-mails retrieved from Facebook to be "verified" sans policy changes.
Answer: You won't be able to tell if the email is verified, but if the /me call on the API returns verified = true it means the user has verified their account in some way (credit card, mobile etc). So it's safe to assume the user's account and email are valid.
Comment: Bob wants to access Alice's stackoverflow account. Bob creates a fake facebook account using Alice's email address. He verifies the facebook account using his mobile number. Bob signs into stackoverflow using facebook connect. Stackoverflow sees Alice's email address in the profile information facebook sends back and prompts Bob "we found your account via your email address. Would you like to link to this account?" Bob is now able to sign into Alice's stackoverflow account.
Comment: According to http://stackoverflow.com/questions/14280535/is-it-possible-to-check-if-an-email-is-confirmed-on-facebook : The email address you get from Facebook using the Graph API or a FQL query is a verified email. If an account hasn't verified it's email yet it's not possible to get it.


Does the warmonger penalty go down over time?

Question: In Civ6, does the warmonger penalty go down over time? I am in a situation where I have to declare a war without Casus Belli to save my religion, and the penalty is -36 which will totally destroy my relations with civs I've already met. Will it at least gradually go down as long as I don't do anything more for a while, or am I suck with this for the next 350 turns?
Answer: I determined that the answer is yes. Warmonger penalties go down by 1 per turn, obviously assuming you don't do anything else to increase them.
Comment: Do you need to be at peace for it to go down though (like how War Weariness works)?


How to classify shapefile values in QGIS?

Question: I would like to classify shapefile values using graduated style in QGIS, but instead of using the default mode of classification (e.g.natural breaks with values range 0-10, 10-20, 20-30), I would like to set the values range to 0-10, 11-20, 21-30. Is it possible?
Comment: Welcome to gis.stackexchange! Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and - if applicable - code so far. For more info, you can check our [faq].
Answer: You can use Rule based classification, i.e. create a rule for each of the intervals. But be careful with the use of > greater than and >= greater than or equal.
To put this more into perspective, consider the following example:
First interval: value > 0 AND value < 10
Second interval: value >= 10 AND value < 20
If you don't use the >= for the second interval and just use >, and you happen to have a value of exactly 10, this value will be omitted from the classification.
Is your field integer or real?


Run DC light submerged in water?

Question: I am in the process of making a DC desk lamp out of all salvaged garbage materials. I am going to be using some christmas lights(AC bulbs, but running off DC, I know this works) for the main light but want to add some colored lights into the base. The base is an old bottle I plan on filling with water(Looks cool and counterweight). Is it safe to just submerge the bulbs in the water? Is there poetential risk? Any suggestions?
Comment: At low voltage, no risk. At high voltage, lots of risk.
Comment: If everything is clean and distilled water is used it may work. If tap water is used the electrical connections in contact withe water will corrode quite quickly.
Comment: @keshlam Its probaly only going to be arouns 12v dc. At the most 19v if I use a laptop brick(prob wont)
Answer: Even if you use deionized water (which is a great insulator) it won't STAY a great insulator if you expose it to copper, brass, etc. in unsealed connections, which will leach ions and cause the water not to be deionized, nor a very good insulator. This will cause the lights in the water to fail, and may also offend your power supply.
If you want liquid, for some reason, mineral oil (USP) is clear, non-toxic, and a good electrical insulator that will stay an insulator. It will also make a mess if you tip the lamp over.
I'd suggest pouring the bottle full of epoxy, which will harden so it can't spill, and is an excellent insulator as well. Alternatively, find a size of marble or glass bead that fits through the neck opening and fill with those.
Comment: I was thinking of putting some solid into the bottle instead. Mainly I was afraid of leaks and tips. Now I see electricity isn't the best for this. Epoxy is a good idea but id rather a nicer bottle for that. Think I may use little rocks for now

Run DC light submerged in water?


How to get started in information security with sales background?

Question: I am currently a Masters student looking to change career from sales to IT, specifically Information Security. What are some good resources about finding jobs? What skills should I focus on to get a security job?
Comment: do you have any knowledge on programming (if so to what level?, conning people and other social engineering?
Comment: Being really good at IT security means knowing almost everything in IT. Basic electronics, digital communication, hardware, programming, operating systems and understanding applications and their structure in general. IT Security sits on top of every other area in IT. Take a ground up approach, learn everything you can.
Comment: InfoSec is a wide topic. Do you have an idea what area you are interested in? Security+ would be a good place to get the most basic foundation, and then you narrow down from there. There are also tons of others asking similar questions here. Poke around.
Answer: This was discussed recently here -> How do I get started with security? (beginner). There are some excellent answers there.
Additionally, Robin Wood has recently done some research on this topic and I think you will find it useful. He presented it at BSides London recently and has posted his findings on his blog - http://www.digininja.org/projects/breaking_in_part_1.php.
I also did a blog post with a friend (@securityninja) on something similar a few months ago - http://www.securityninja.co.uk/application-security/random-thoughts-on-education-learning-from-markofu/ - which you might find useful.
Answer: How far are you in your masters program? Can you switch to info sec? Maybe check out Security+ Cert from CompTIA, it's basic curriculum can give you a good intro so you can know if you really like the subject or not, and its valued throughout the industry.


Can I say "they wanted me to fit in this world?" and "they wanted to fit me in this world"? Are they both correct?

Question: I feel like they are both correct in the speaking but  also feel like maybe one of them is incorrect grammatically because of the obeject pronoun. Is there a rule to object pronoun before or after verbs? I looked for it in the internet but all the articles are super especific and I can't understand it very well.
Answer: Both sentences are grammatically correct, but they mean different things.

They wanted me to fit in this world.

That means that they wanted it to be true that I would fit in this world.

They wanted to fit me in this world.

That means that they wanted to take steps to make me fit in this world. Of course, that also means they wanted me to fit.
(In that example, the word "into" would be a better choice, because it suggests the transition implied by the meaning of the sentence.)
Answer: When someone fits in somewhere, they make successful efforts to be acceptable, compatible, etc.

When I joined the team, I tried to fit in by learning everyone's names
and bringing doughnuts.

When another person fits me in, or other people fit me in somewhere, they make efforts or arrangements so that there is a place for me.

We wanted Joan in our team, but the office was full, so we moved Peter nearer to window so we could get another desk and fit her in.


Running CCTV system with monitor over Shabbos

Question: Does anyone have any sources for what the halacha is of running a home security CCTV system with the monitor on over Shabbos in a place where it is easily visible within the house?  I'm specifically interested if anyone discusses the problem of having benefit over Shabbos from being picked up on the camera - eg. for someone to open the door for you.
Answer: The Star-K have got a pretty definitive rundown here with sources.
It discusses whether or not pictures captured on a monitor come under the banner of the melocho of Kesiva - writing, and provides 5 reasons why it would not be kesiva mideoraisa.
After a great deal of discussion - see there for more, the concluding paragraph reads:

Ideally, a Jew should not leave a video camera on during Shabbos.  If it is necessary to leave it on for security reasons, Rav Heinemann  paskens that he should turn off the monitor and make sure that no noticeable changes occur during Shabbos. If no change that can be detected by the five human senses occurs, it is not considered a melacha on Shabbos. However, it is not sufficient to merely cover the monitor, or conceal any noticeable change in a similar fashion.
Comment: Very interesting. I've been in shuls with spotlessly high halachic standards that operate CCTV. Bli neder I'll try and speak to the Rabbonim and see what they rely on
Comment: @rabbikaii probably those shuls consider themselves more of a risk and need higher level security (how to quantify a given shul or house's risk level is very subjective)
Comment: @DoubleAA highly likely the case, but the article linked doesn't mention anything to do with risk or pikuach nefesh etc


How do I gift a tuning in Forza 4?

Question: How do I gift a tuning in Forza 4? Also, how do I unlock the tunings I create so I may share them with my club members?
Answer: You can only gift unlocked tunes to someone else, i.e. tunes that you made or were gifted, but not the ones you buy at a storefront.
Having said that, you can gift your tuning setup by going to Upgrades > My tuning setups and find the setup there. Press A for a menu and select Gift. You can then select the friend from the list to gift it to. They have to be on your friends list!
When you gift a tuning setup to someone, it's always unlocked. Only when someone buys or downloads a tuning setup from your storefront, it is locked, even if you offer it for free.

How do I gift a tuning in Forza 4?


How do I import maps onto my minecraft server?

Question: I have a server that is hosted by Minehut (a server that hosts other servers inside of, great community) and with it, I can't edit much of my server files, including the world. So is there any way I could import a custom world without editing the server files?
Answer: A basic Google Search linked me to their store: http://store.minehut.com/
According to their 4th Tier plan, they offer a plugin for importing worlds called Scaffold.
As a general question, it is impossible to import worlds in Minecraft when you do not have access to the server files. This is simply because you need to migrate the world files into the /world folder, which you can't do if you don't have access.
Answer: No is the simple answer, unless, as another answer said, you buy tier 4 of the server plan. However, there is a way of doing it if you set up a new server from scratch. You can download a server from the minecraft website, then follow a tutorial to set it up (That's a whole new topic). When you've done that, go in to your server folder and replace the folder called 'world' with your map you want to use from your saves within your .minecraft folder (or wherever it is) make sure you call it 'world' too, or the server will get very confused. I hope this helped!
Answer: You can't see server files directly from your multicraft panel, you need to edit it with an FTP client or they want you upgrade to a better plan.
Answer: IIRC, there are commands to download and upload worlds on minehut.
Download should be /dl world (world name), upload should be /ul world (new world's name) (direct download link for world folder).


Visa for Turkey

Question: I hold an American passport, living in Finland with a Finnish residence permit. I'm going to Ghana. I would like to stay overnight, which means I will leave the airport to go to a hotel. Do I need a visa?
Comment: This is NOT a duplicate, if only due to recent changes for Turkish visas for US citizens.
Comment: Visa processing has been interrupted (and maybe is still affected) in recent months.
Comment: This can never be duplicate because the rules are totaly changed since 2013.
The given link is 2013.
Now Turkey apllying e-visa.
Here an official link

https://www.evisa.gov.tr/en/
Answer: You will require a visa of some form.  Historically for a US citizen this would be an easy process, but as at today's date there are complicating factors in that Turkey has significantly reduced the number of visas being issues to US citizens.
IN GENERAL, the only way for a US citizen to obtain a visa to visit Turkey is to apply via a Turkish consulate.  US citizens are NOT able to obtain e-visas at this point in time, and in general are not able to obtain visa-on-arrivals once they arrive in Turkey.
However there are a few exceptions.
In your case, you ARE able to obtain a visa-on-arrival by virtue of the fact that you have a residence permit from a country outside of the US (Finland) AND you will be arriving on a flight from outside of the US.  On arrival in Turkey you will need to show your Finish residence permit, and provide proof that you arrived on a flight from somewhere other than the US (eg, boarding pass) and you will be able to obtain a visa which will cost you US$30.
There are a few other exceptions for some people who are related (by blood or marriage) to Turkish citizens, however I'm presuming these are not relevant for you.
Note that the rules around this have been changing every few weeks, so depending on when you're flying it's possible the above will not be correct.  It's worth keeping an eye on the news around this, and even contacting the Turkish consulate to confirm the current requirements shortly before your trip.

Visa for Turkey


Converting a layer to .kmz not working

Question: I'm trying to convert a layer to a .kmz file, and ArcMap says it works. It even shows up in my file directory(image attached)
However, this file isn't actually in the folder it's supposed to be in. I've tried just right clicking the file in the Recent Files list and choosing Open File Location, which opens the folder it's supposed to be in, but it still isn't there. I'm not sure why the file isn't actually being created, or what I could do differently.
Answer: That's because kmz is a zipped directory containing kml file and related links. Your explorer maybe directly opening the kmz file and showing the contents inside it. Open the file with GIS and it will work as expected.

Converting a layer to .kmz not working


How can end users create bookmarks in SharePoint 2013?

Question: How can end users bookmark their important documents, pages, etc within SharePoint 2013 sites? Are there any web parts for the same?
Comment: Please check this link http://smallbusiness.chron.com/bookmark-sharepoint-51887.html
Comment: Yes,I know about anchoring in SharePoint. I actually wanted to know whether a "one click Bookmark" button  or a web part having such  functionality exists or not.
Answer: In SharePoint, users have the ability to follow a site, tags, people and even specific documents. You might have noticed this in the top right corner, below the username.

Simply clicking the follow button will save the bookmark in your personal site so for this to work, you need to have My Sites configured.
When a user follows a site it will show up on their personal page.
If users would like to follow a specific list or document library and be notified when anything changes, there's the Alert Me function.
Following in SharePoint 2013
Follow documents to track them
Overview of My Sites in SharePoint Server 2013
I'm unsure if you can follow a single page OOTB.
Comment: @RobertLindgren Edited my answer and cleared it up a bit. Don't know where i got the idea that you could follow a list from. Bad coffee.. :)
Comment: Can you really follow a list? Is it not just sites, people, tags and documents (OOTB)?


Memory foam mattress topper for camping?

Question: I bought a queen-sized four-inch memory topper and cut it into two halves to get two twin(ish)-sized toppers.  I use one half on my bed at home, but that left me with another extra half.  I've heard people talk about using memory foam toppers for camping, and so I've taken this topper out into the outdoors (car camping only) on several occasions as well.
Cool weather
The problem is, I've had mixed results.  In cooler weather, the memory foam gets cold and hard and is only comfortable once you wait for the foam to warm up directly underneath you.  If you move in your sleep, this can be disturbing, as you have to wait for the foam underneath you to warm up for it to be comfortable. This isn't a huge deal, but it's not as comfortable as the same topper at room-temperature.
Warm weather
In warmer weather, the memory foam loses its "memory" and just ends up being super squishy foam. I believe it retained heat (in the summer, not cooler weather!) more than I would have liked.  Again, not as comfortable.
Has anyone else tried this?  Is your experience different from mine? What am I doing wrong?
Comment: `"What am I doing wrong?"` – You're using a memory foam mattress topper for camping. Consider using a camping mattress for camping instead.
Answer: First things first:

Has anyone else tried this?

No I've not tried it.

Would I use a mattress topper while camping
No
Why?

They're heavy and awkward to move in and out of tent
they'll absorb water
they'y designed to sit on top of a nice flat mattress not a bumpy
stone covered field
(as you say) they will react differently depending on the temperature.

So what should you do?
I'd invest in a decent ground mat (some in cotswolds here). Ground mats have come a long way from the thin peices of foam rubber you stuck under you sleeping bag. Most (good) ground mats these days are inflatable. This allows them to be much thicker than the old foam ones. This keeps you warmer and more comfortable. You can also adjust the pressure depending on your preference.
Comment: Great answer. Nothing like feeling a rock sticking into your back on a foam mat though ;)
Comment: For cold weather, some inflatable ones have fibres or dawn inside, and are only a wee bit bulkier.
Answer: I've used foam mattress toppers before. So they can absolutely work well but there's a few things to keep in mind.

Thickness - 4" is OK and would probably be great for a back sleeper on grass. However, on a more rocky/rigid surface that may only be entry-level comfort and you might find that bigger rocks can be felt underneath. Thus, you might need to find a buffer zone for those rigid areas (like an old compressed rollout mat used for backpacking or even a thick old blanket. Increasing the density of material between you and the ground is the key. I'd suggest anything over 4" to find some decent comfort because that foam really compresses under body weight. 6" would probably be the sweet spot, especially if you're more preferable to side sleeping.
Material - Memory foam is great, gel-infused memory foam is better. Gel allows for more air flow which means you get ventilated padding that doesn't heat up with your body as much as it could. Most people prefer cooler sleeping surfaces and that's backed by science that says ideally your room temp should be around 68-70 degrees for optimal conditions. Too warm = less sleep. Too cold = shivering/less sleep. Your sleeping bag/blanket set should do just fine as long as it's rated to handle the temperatures you're camping in.
Weather - Wet weather is something to keep in mind. If you've got a great tent with a great rainfly then you won't really have an issue here. But if you're rolling with a budget tent and a small rainfly you gotta be very careful not to track water into your tent. A little isn't an issue but a leak will turn your sleeping area into a wet sponge and that sucks. If it's dry, regardless of cooler or warmer temps, then you'll be just fine.

Getting an inflating air mattress can set you back $100+, especially for a queen size. My wife and I got a queen size and I think it's OK but it leaks a little air when more than a couple hundred pounds are on it and that sucks for multi night camping and so I'm looking to buy a gel-foam topper and use a giant old foam topper as my base. Should give me roughly 6" of foam to lay on and I may buy a duvet cover or some kind of cheap sheet to wrap it all in which will be great to lay on at night. BTW Walmart has pretty good deals on gel foam toppers. I think you can get a 3" topper Full size for $30 - hard to beat.


How to deal with a group of students that doesn't pay attention and keeps talking to each other in class?

Question: My new cohort of students (less than 15) are a specific group that can be highly talkative and don't always pay attention when I'm teaching. I've tried some interactive learning games in the classroom and have been firm that disrupting others is not allowed. Other than being strict, all I can think of is something that keeps them on their toes. Any experienced academic can advise me?
Comment: Grade level / year of postsecondary?
Comment: @LukeSawczak college
Answer: A wee bit of interaction between students is probably ok: "What did she say?". But if it goes beyond the occasional and minimal there are two tricks you can use, neither of which is especially polite, but the students will get the idea, especially in a small class, I suppose.
First you can just stop speaking and turn to the class and wait for it to stop. Then say "Thank you" and return.
If it persists, and you can identify one of the disrupters, walk over to them, hand them the chalk/marker and ask them to continue the lecture at the board. This is embarrassing to an individual, of course, so use with caution.
The "hope" of the above strategies is that other students will apply suitable pressure on their peers. It might happen (or not).
But it is also possible that your lectures aren't doing what you think they are supposed to be doing and the students feel they could do fine without them. A more drastic solution, that works in many cases is a Flipped Classroom, in which you don't lecture at all, but depend on students to read/view the essential material between classes and use the face time to do interactive things and/or exercises/writing.

In a different context and for a different reason, I once convinced a group of students to pay attention (and improve their note taking) by spending the last few minutes of each lecture asking students to give me back their "take" on the most important idea(s) in the lecture just ended and I would confirm or not. You can ask this generally, asking for volunteers, or ask it of individuals. It might take them a bit to catch on, so a bit of patience might be needed.

I also have a worst case option that only applies if you are well respected by most, including the administration. And, I wouldn't have tried it pre-tenure. I once suggested to a group of students that they didn't seem interested in the topic (an important major course) and we could just agree that they would all fail the course and we could avoid all future lectures so they could get on with things that interest them more. As you expect this caused quite a stir, both among the students and the administration, but the outcome was very good, actually. I don't recommend this for general use and you need to be very careful before you try it. But students don't always recognize the consequences of their actions on their future success. It was a major wake-up for most of them.
Comment: @AdamPřenosil I have seen Buffy's suggestion implemented as a student effectively when the right personalities are involved, and I wouldn't say it was embarrassing to the instructor nor would I consider it passive aggressive: it's just aggressively aggressive. But, I do think that it will be difficult to pull off by an inexperienced instructor especially if they're not really getting the respect of the students in the first place.
Comment: "If it persists, and you can identify one of the disrupters, walk over to them, hand them the chalk/marker and ask them to continue the lecture at the board. This is embarrassing to an individual, of course, so use with caution." I am loath to contradict a much more experienced instructor than myself, but I want to note that as a student I would consider such a display of passive aggression to be embarrassing mainly to the instructor. If you have a problem with their behavior, tell them directly, tell them why, and if they don't stop, tell them what the consequences will be if they persist.
Comment: @AdamPřenosil, I would also do that, but outside the classroom. I once had a "talking to" by my main mentor, but for a different reason. Very effective, but it was done in private.
Comment: @Janey, for what it's worth, I was once told that the students at Oxbridge could be very disruptive in lectures, snapping fingers (disapproval, I think) and shuffling feet (approval). I suspect, however, that those "lectures" were more for performance than for actual education. Perhaps someone with direct knowledge can comment on this. My information is over half a century old.
Comment: Another passive-agressive move that works even if you don't have a board marker/chalk to hand over, is to ask the talker whether they could please repeat what they just said so that everyone in the classroom can hear it.
Answer: Asking students to stop talking while you're lecturing doesn't have to be strict. It's you making sure that the common purpose of the course can be achieved. Most students are in lecture because they want to learn the material and other students talking is distracting to them. As the lecturer you're in a position of authority and most college students are disposed to behave well in class and respect your position. Because of this you can politely and directly address the issue. I've had success by either pausing the lecture and waiting for the talkative students to realize and quiet down, or loudly saying something like "Alright, let's get focused back on class."
I've had success with both of these and doing this once usually curtails the issue for the semester. However, if after doing this once or twice you continue to have issues you should talk with the offending students outside of class or over email and say something like "Talking in class is distracting to other students and interferes with their learning, please don't do it." If things continue to be a problem after this, you'll have to escalate the issue, talking to your director of undergraduate studies or department chair is probably the best next step.


Gauss law and the method of images

Question:
Consider a grounded spherical shell conductor (radius $R$) with a point charge $q$ inside a distance $a$ from the center. In order to calculate the electric field inside we can place an image charge with charge $q'=-q\frac{R}{a}$ and position $d=\frac{R^2}{a}$ but if we apply Gauss law around the sphere, the electric field outside is zero $\rightarrow$ flux is zero $\rightarrow$ net charge inside is zero. That means the total charge induced on the sphere is $-q$. But how does that make sense, shouldn't the charge on the shell be the same as the point image charge we used to calculate the potential inside? So we got $q'=-q$ instead of $q'=-q\frac{R}{a}$. Where is the contradiction?
Answer: The method of images is only used here to determine the electric field is inside the sphere. In particular, a uniform surface charge density on the sphere produces no field at all inside the sphere, by the shell theorem, so the value of that uniform density is not determined by the image charge argument. Instead, its value takes whatever is necessary to make the total charge zero, for the reason you pointed out.
Comment: Does that mean it doesn't always happen that the charge on the conductor is the same as the image charge we used, or did I not understand you correctly? Because in the simple example of a plane it does happen.
Comment: @Darkenin Yes, that logic doesn't work in general.
Comment: Does this happen because of the grounding?
Comment: @Darkenin No, the grounding just fixes the total charge of the point charge and sphere to zero. You could also do the same problem but say that the sphere has a total charge $Q$ on it. In that case, the extra uniform charge density would be whatever is necessary to get a total charge of $Q$ on the sphere.

Gauss law and the method of images


A phrase or word that describes a group of people who are considered the best at something

Question: "Seal Team 6" has become synonymous "elite". Is there a more generic term that can be used to describe a group considered the best at something?
Comment: **Elite** is already quite generic - you can be an elite soldier or an elite musician or an elite scholar.  I'm not sure what you mean by "more generic."
Comment: Those are elite fighters, yes. But the term is not synonymous with elite. There is no single word. There are nouns (team, group) with adjectives. Best group, number-one group, premier group.
Answer: Elite is pretty accurate. Premier or ultimate may also work. Or use a term like "best of the best", "cream of the crop", etc.
Answer: "Seal Team 6" is an EXAMPLE of an elite group. I've never heard it used as a generic term for an elite group. Maybe among your friends and associates people say, "This band is the Seal Team 6 of rock stars!" or some such. If so, I think that usage is very localized.
But in general terms for a person or group who are the best at something include, "elite" like in your question, "premiere", "the best", "A-team", and "first string".
Answer: Several things come to mind:  Expert, maven, guru, and par excellence to name a few.  Also, there's "the best...", as in "the best doctor" or just by itself.
Back in the old days we used to use the name "Heifetz"---after Jascha Heifetz, considered by some to be the best violinist that ever was:
"He an ok ball player, but he's no Heifetz".
and my favorite variation:
"You are either Jascha or kasha."
(Kasha is boiled buckwheat.)
Answer: How about the slang word pros which is short for professionals:

They're real pros.

Another one that I can think of would be experts:

They're real experts in English grammar and usage.


Running Windows 10 from bootable DVD without installing on hard disk?

Question: I am trying to boot from a Windows 10 DVD, but it says something about installing it.
I don't want to replace my existing OS with Windows 10. I just want to use some software with it. How do I do that?
Answer: In order to use Windows you must first install it, you can't just boot from a CD and expect it to work. While that may be possible with some varieties of Linux, it is not with Windows (or macOS).
In order for us to help you you absolutely must provide the model of Mac you have and what version of macOS is installed on it. Edit your question and put that info there.
Answer: Unlike some Linux distributions which come on a live CD/DVD (one you can boot off of without installing it on a disk), Windows 10 doesn't come with a live bootable CD/DVD. In order to run and use any software on it, one first needs to be install it.
As you do not wish to replace your existing OS, you can take either of the following two approaches:

Installing alongside existing OS: You can create a multi boot system by installing Windows 10 alongside your current OS. Generally, it is possible to install Windows 10 alongside a macOS, Linux or other Windows installation.
However, it involved complications such as hard disk partitioning, allocation space for the new OS and reclaiming the space once you are done. It may also involve risk of losing access to data or the existing OS installation. This approach is best left for power users and those seeking adventures :)

Installing as guest in a virtual machine: You can install Windows 10 as a guest OS using a OS virtualization software such as VMWare or Virtual Box. This is a very safe and easy approach to take. However, the prerequisite is to have a decently fast computer with adequate processor and RAM that can handle the load of running two OSes (Host + Guest) comfortably at the same time.

I'd recommend the latter over former. It also gives you a safe way to try things out without the risk of breaking anything.


What if the training data and the prediction data are the same?

Question: It is a completely theoretical question. What if the training data and the prediction data are the same? Will it impact the results if I use the same data for model predictions that I have used for training?
Answer: In addition to etiennedm's answer:
Informally, this is the equivalent of making a student take a test while giving them all the answers.
The goal of evaluating a model on an unseen test set is to measure the ability of the model to predict on different instances, in the same way that a school test is supposed to check if the student can solve new problems based on the knowledge they acquired. If the student is provided with all the answers, the result of the test will only show that they can read and copy the answer, and this is not very useful. Same thing for a program, it's pointless to prove that it can store and copy answers, and there's no need for Machine Learning to achieve that.
Evaluating on an unseen test set is meant to measure how well the model generalizes (i.e. actually "learns something") from what it has seen in the training data to answer new problems. Using the training instances as test set completely defeats this purpose, since the model doesn't need to generalize anything to answer these instances.
Answer: Yes, it will impact the results.
In the best case your model will not overfit at all so you could expect the same performance between the training set and a previously unseen set (= normally the testing set). In case your model overfits even a little bit, then your results on the training set will be higher (better) than on unseen data.
The impact depends on the classifier/hyperparameters you are testing. For instance, if you are using a KNearestNeighbors classifer with k=1, then the impact will be extreme as you will have 100% accuracy on whatever training set.
Comment: A difference in performance between training & test set is practically always expected, it has a specific name ([generalization gap](https://ai.googleblog.com/2019/07/predicting-generalization-gap-in-deep.html)) and it does **not** signify overfitting in itself; the telltale signature of overfitting is that your training error continues to decrease while your validation error starts increasing. So, even if there is no overfitting, the performance metrics obtained from the training data alone are practically always expected to be better than the validation (and test) ones.
Comment: I agree and did not say that a difference in performance between training and testing set signify overfitting. But overfitting will lead to such a difference. Then, even if the model does not overfit at all, we *could* expect similar performances. I didn't find useful to get into the details here, but yes, there are other implicit assumptions, so the "could".


What is a spectral sequence?

Question: Can anyone explain what a spectral sequence is?
What is the motivation behind this?
Is it a natural tool?
Why should we study spectral sequences?
Pardon me for asking too many questions.  Actually I don't have any idea about what a spectral sequence is.  I would be happy if someone would walk me through some simple examples and provide me some references.
Thanks.
Comment: That's an extremely broad question...! The answer would take a whole book.
Comment: Spectral sequences are some kind of calculation tool in geometry, algebraic topology, algebra etc. By the help of these sequences, one can compute topological graded invariants of a topological space such as homotopy, homology or cohomology groups by taking approximations.
Comment: I guess you need more spesific information but i want to write what i know. 'A users guide to spectral sequences by John McCleary' may be a good reference.
Comment: Do you know the Kunneth formula for the homology of a product space $X = Y \times Z$? One can already see that the formula for the homology of $X$ is a rather complicated mixture of the homologies of $Y$ and $Z$. Imagine now that instead of a product you have a weaker structure, namely $X$ is a fiber bundle over the base $Z$ with fiber $Y$. Leray's spectral sequence was invented to obtain a still more complicated expression for the homology of $X$, expressed in terms of the homologies of $Y$ and of $Z$ and of further data about the structure of the bundle.
Comment: @NajibIdrissi As I don't have any idea about this topic ,so before start, I am trying to get some motivation and simple ideas from math stack community...I would be happy if you could provide me some information in this regards...
Comment: The first spectral sequence, Leray spectral sequence, was introduced by Jean Leray in 1946. It is used to compute cohomology of a bundle. Via Serre spectral sequence one can compute the singular (co)homology of the total space of a fibration in terms of the (co)homology of the base space and the fiber. Adams spectral sequence was introduced by Frank Adams to solve Hopf invariant 1 problem.  It is used for computation in stable homotopy theory.
Comment: @LeeMosher thank you...I got some motivation though your description...
Answer: I'd like to draw your attention to Timothy Chow's motivating short introduction to spectral sequences "You Could Have Invented Spectral Sequences".
Comment: Quote: "The subject of spectral sequences is elementary,
but the notion of the spectral sequence
of a double complex involves so many objects and
indices that it seems at first repulsive." Haha, :D +1 for this nice reference.
Answer: A spectral sequence is a tool to get from the homology of the associated graded of a filtered chain complex to the associate graded of the homology of the filtered chain complex.  The former will usually be known and the output is something that you wanted to know.
One reasonably general example:  The homology spectral sequence of a bunch of inclusions of toplogical spaces - Given a filtering of a topological space $0=X_{-1}=X_0 \subset ....X_n \subset ... X$, one gets the singular filtered chain complex $S_*(X_0) \subset....S_*(X_n) \subset ...S_*(X)$.  There is a notion of a spectral sequence associated to the chain complex $S_*(X)$ and the above filtration of the chain complex $S_*(X)$.
The associated graded of this complex is $Gr(S_*(X)):=\oplus_{p \geq 0} S_*(X_p,X_{p-1})$. There is an induced differential on the associated graded of this complex which allows one to make sense of $H_*(Gr(S_*(X))$.  This group is called $E_1$ otherwise known as the first page of the spectral sequence associated to the filtered chain chain complex $S_*(X)$.
You should care about spectral sequences because this data will usually be known (the realization of what this is will vary from situation to situation).  The 'answer' you are looking for, that you do not know, is $H_*(X)$..  When the coefficients of the singular chain complex are in a field, the output of the spectral sequence will be exactly $H_*(X)$.  For more general coefficients, the output will be $Gr H_*(X)$ which by definition is the associated graded of the $H_*(X)$ with respect to the induced filtration of the abelian group $H_*(X)$ below:
$im (H_*(X_0) \to H_*(X) \subset  im (H_*(X_1) \to H_*(X) \subset...im (H_*(X_p) \to H_*(X) \subset im (H_*(X_{p-1}) \to H_*(X) ... \subset im (H_*(X)\to H_*(X)$.
How useful a spectral sequence is will often hinge on how good a description there is of the differential graded abelian group $E^1$.
When $X$ is the total space of a fibration with fiber $F$ and basespace $B$, projection $p$, with filtering given by $X_0=F \subset .... p^{-1} B_i \subset...X$, with $B_i$ the $i$-skeleton of a CW structure for $B$, there is a description of the group $E_1$ with that depends only on the topological data of $B$ and $F$.  Namely there is an isomorphism $E_1\cong C_*(B) \otimes H_*(F)$, where $C_*(B)$ is the cellular chain complex of $B$.
Exercise(totally doable):  Verify this for the trivial fibration $F \hookrightarrow F \times B \to B$ by using the definition the cellular chain complex  - $C_*(B) := H(Gr(S_*(B)))$.
Serre's main insight was that this holds for general fibrations.  Thus one can get information about homology of the total space from the cellular chain complex base and the homology of the fiber.  For more information about this spectral sequence see the English translation of Serre's thesis "Homology of Singular Fiber Spaces" in Topological library part 3.  If you email me I will scan you the 100 pages.
For the spectral sequence associated to a filtration of  $0 \subset...S^*(X,X_p) \subset S^*(X,X_{p-1}) \subset...S^*(X)$ with the singular chain complex having coefficients in a field, see the third part of Bott and Tu's Differential Forms in Algebraic Topology.
Coming back to the general notion of a spectral sequence, (not just of a bunch of inclusions of topological spaces), we have examples where the $E_1$,does not have a good description in terms of known objects.  In these situations the 'answer' will have a good description but one won't have a good way of finding it.
One example is where the 'answer' you are looking for is $[Y,X]$, the(sometimes) group of homotopy classes of maps from a topological space  $Y$ into a topological space $X$. If you want the associated graded of this, you will need to use filtration of the group $[Y,X]$ giving rise to the group $E_2=H_{\text{first grading}} (Y , \pi_{\text{second grading} X})$.  For more information about this spectral sequence see chapter 14 of Mosher and Tangora's Cohomology Operations an Applications to Homotopy Theory.
But one often doesn't know the information in the $E_2$ or $E_1$ group of this spectral sequence.
One can use a different filtration, called the Adams filtration, that is easy to describe in terms of known objects, but only yields the $2-$ primary part of $[Y,X]$.  For more information about this, see chapter 18 of Mosher and Tangora's Cohomology Operations.  This spectral sequence is called the Adams spectral sequence and is a powerful tool for calculating the stable homotopy groups of spheres.
Comment: I could not understand your first paragraph. What is associated graded of a filtered chain complex

What is a spectral sequence?


How do I undelete a lightning component?

Question: I deleted a lightning component that I did not intend to delete?  Is there any way I can get it back?  Is there a backup or a recycle bin?
Answer: Its actually not possible. Here is screenshot:

You can get Aura components by using SOQL:
<code>List<AuraDefinitionBundle> adf = [
SELECT Id, DeveloperName, IsDeleted, MasterLabel
FROM AuraDefinitionBundle
WHERE DeveloperName='TestComp' ALL ROWS];
</code>
Answer: No. Once deleted, code is gone forever. For this reason, it is always recommended that you have a backup of your code. This includes Visualforce, Apex, Lightning components, Lightning Apps, Flows, and many other types of code and customization options.
Answer: I had the same issue. Even though lightning cache is disabled the page still doesn't update sometimes. I have to continually crtl + shift + delete in chrome to bring up the delete cache menu over and over to ensure the changes are made in the Lightning Component. Well, guess what the command to delete a file in Developer Console is? ctrl + shift + delete. I developer fast, and I already have to wait for 20 second file saves using Salesforce's 1985 disk write speed. Horrible choice for a keyboard command to delete files in Developer Console when it's the same command in the browser that deletes cache files.
Comment: I will also add the server OwnBackup did help with this, as I was able to use that service to restore the file easily.


Do Library Permissions trump Site Permissions?

Question: Given: A User has Read only permission on a site, but has Edit permission on one of the Site's libraries.
Is the User limited to Read-only on the library (per Site permission), or are they able to Edit (per the library permission).
Answer: The user would have read permission across the site except the library where the user would have edit permission.
Answer: If you've broken inheritance of site permissions for the library, the library would look at it's own permissions to determine the rights of the user.


Rounding a spinner on a British Spitfire

Question:
Hi, I am attempting to make a British Spitfire to the best of my ability, but I have encountered a problem. I have used a Cone Mesh to try and replicate the spinner of a British spitfire, but I cannot get the round shape that I need for it to look realistic. I will provide a picture below.

Once I am finished with the base shape of the spinner, what would be modeling steps to making it look more detailed? Below is a picture of a British Spitfire spinner.
Answer: Here are the steps I would take to model that:
1: construct a base set of vertices from one side of the rounded top, like so:

Add a screw modifier: (make sure it is lined up to the axis for this part).

Then finally add a subidivision surface modifier to make it higher poly:

I hope that is what you are looking for. You can just adjust the vertices (or line them up to your image) to get the curve you want. When you are done, you can apply the modifiers and put it on your plane.
Answer: Split a UV Sphere in half, scale it up on the z axis, and add a subsurf modifier with smooth shading ...with the right scaling and editing you should get the desired result.
Answer: Here's how I would go about it, from a sub-d point of view, aiming for least work and most accuracy.
Two things to notice: 1. The nosecone is truncated, so there won't be nasty shading problems at the tip. 2. There are 3 blades on the propeller. At some stage, holes will have to be cut for them, so the number of sides on the cone should be divisible by 3.
(I'm working in XY, Z up.. you may have to flip axes mentioned here)

Create a 12-sided cone, and CtrlShiftB bevel the vertex at the tip to the dimensions of the reference

I inset the new face, and CtrlR cut in a holding loop close to the rim.
X delete the inner face
Do the same to the base of the cone

CtrlR cut in a couple of intermediate loops, and
CtrlKeypad 2 assign a Sub-d Surface modifier, level 2

Now, working under the modifier, showing in Edit Mode, with cage conforming (switches in the modifier)
A combination of GG sliding the intermediate loops up and down the cone, and..
SShiftZ scaling the loops in XY..

..should enable you to capture the curvature of the cone.

The illustration shows:

How the cone appears while editing, with the modifier set to 'Optimized Display'
The underlying topology after subdivision
The finished cone

Later, you will be able to cut out a 1/3 segment of the cone, and give it a rotational array, so you can work on the details in one third, and have the edits automatically propagated to the rest.


Two String variables of equal value are not comparing to be equal (android)

Question: I have two variables, one is a String array that is filled from a database, and the other is generated in the program, and I want to execute code if they are equal. I have verified that they have the same value, but the comparison seems to fail.
In this case, the element of the String array is also equal to "2", but the comparison fails.
if (r3.isChecked())
     {
          choosenButton = "2";
          if (choosenButton == Global.dbCorrectAnswer[0])
          {
             Toast.makeText(MySchoolOnline.this, "Correct", Toast.LENGTH_SHORT).show();

          }
      }

Answer: You should use equals to compare the variables:
choosenButton.equals(Global.dbCorrectAnswer[0])


Self-signed certificate for code signing not showing up in Xcode 4

Question: I'm developing a small app on Xcode 4.2 in Lion to learn the basics of Mac development.
I've got a directory picker controller class as an NSOpenSavePanelDelegate, implementing the <code>- panel:validateURL:error:</code> method, where I'm attempting to make sure that the directory that the user chooses contains files of a certain type that the app supports.
I stumbled across this question here on SO, discovering that the delegate methods don't have access to the file system in sandboxed applications. This would be a problem for the aforementioned case.
Eager to learn more about this, I decided to try sandboxing the app to see what happens. I enabled entitlements and sandboxing for the build target in Xcode and then created a self-signed certificate for code signing in Keychain Access, following this tutorial. The certificate lives inside my login keychain.
The problem is, the freshly created certificate doesn't appear under the Build Settings -> Code Signing -> Code Signing Identity dropdown. The only thing that is there is "3rd Party Mac Developer Application", but the build fails with a code signing issue if that is selected.
Any ideas how I can get it to show up?
Answer: I just ran into the same issue. After Quitting and restarting Xcode, my own certificate showed up.


How to find ERC721 compliant NFTs owned by an address?

Question: Is there any way to get the current owner's address of an nft? I need to use it in my project in unity. I'm new to these things, I would be glad if you could help me.
Answer: It isn't implemented automatically so it is only if the specific contract that created the nft implements it. You need the contract address that created the nft, then you can inspect the code to see if it has something like a tokenIdToOwner mapping.


15 amp GFCI breaker in multiple rooms

Question: We recently moved into a newly constructed apartment (6 months old) and have an issue I have never dealt with until now. Day of move in we had all the lights on in our 3 bed 2 bath apartment. Due to the heat of the day my wife turned on all the ceiling fans and within 30 minutes a breaker tripped and the power went off in 2 bedrooms and the guest bathroom. I checked the panel and found that ALL lights and wall plugs are ran off a single 15 amp GFCI breaker. I am not an electrician so I called the office and they sent an electrician that ended up telling us everything checked out. He said that we shouldn't turn everything on at the same time. I have never heard such BS, Is this normal or even acceptable? each bedroom has 4 wall plugs and a ceiling fan, the bathroom as a vent fan, 3 light switches and 3 wall plugs. We cant run a blow dryer at the same time as a fan is on without popping the breaker.
Comment: "We cant run a blow dryer at the same time as a fan is on without popping the breaker."  And that's the reason the code requires a dedicated 20 amp breaker for a bathroom.
Comment: If the "newly constructed" apartment is in the US, the bathroom should have it's very own 20A GFCI circuit, which can only be shared with another bathroom. Likewise, the kitchen has to have at least 2 20A circuits not shared anywhere else for countertop outlets. So that sounds substandard and not up to code, even if the area is not on the latest code version.
Comment: Relocated for work to Iowa and the apartment is temp while we get a good lay of the land while we sell or other home. I have never ran into a situation where the bathrooms weren't on their own breaker.
Comment: Having multiable outlets and lights on one breaker is common.  These days code calls for 20 amp breakers for kitchen and bathrooms since high wattage appliances are used in those rooms.  Ceiling fans are usually not high wattage, but having many on one breaker can give problem.
Comment: Is this GFCI breaker in your breaker panel, or is it an outlet?
Answer: I would call the local electrical inspection authority and tell them you want to know who the contractor is that did the wiring. I'm sure the contractor would want to fix this without getting the inspector officially involved, especially if he knows the inspector is aware of the problem. The inspector would likely not wedge himself into this unless he knows about issues with the contractor and knows he needs to be involved.
Weigh your complaint heavily on this issue, at least the bathroom basin receptacle needs to be on a 20A circuit that only feeds the bathroom(s):

210.52(D) In dwelling units, at least one receptacle outlet shall be installed in bathrooms within 36 in. of the outside edge of each
basin. The receptacle outlet shall be located on a wall or partition
that is adjacent to the basin or basin countertop. These receptacles
shall have GFCI protection as required by section 210.8(A)(1).

210.11(C)(3) Bathroom Branch Circuits. In addition to the number of branch circuits required by other parts of this section, one or more
120-volt, 20-ampere branch circuit shall be provided to supply
bathroom(s) receptacle outlet(s) required by 210.52(D) and any
countertop and similar work surface receptacle outlets. Such circuits
shall have no other outlets.
Exception: Where the 20-ampere circuit supplies a single bathroom,
outlets for other equipment within the same bathroom shall be
permitted to be supplied in accordance with 210.23(A)(1) and (A)(2).

The 15A circuit requirement is a little complicated to quote, but generally the requirement is at least one 15A/20A general purpose receptacle and lighting circuit per 600/800 sf (3VA per sf) in addition to bathroom, kitchen, and other dedicated circuits.
Comment: The NEC definition of "outlet"  includes hard wired connections like fans and lights.
Comment: If you didn't want to involve the inspector the State I live in you could actually look up online who the electrical permit was issued to.
Answer: Iowa has adopted the 2020 national electric code. There are multiple code violations.
The bathroom receptacle is required to be 20 amp GFCI and only the bathroom(s) can be on this circuit.
If the breaker is tripping with the lights and fan it was not wired to code the actual lighting and motor loads are required to be calculated at 125% so you should never trip the breaker because this is only 80% max of the breaker value.
These code requirements GFCI & 20 amp circuit for the bathroom have been in the National electric code for more than 20 years.
Answer: Code requires that bathroom receptacles be powered by a 20A circuit that either

Powers ONLY bathroom receptacles (in both bathrooms)
Powers ONLY bathroom receptacles and hardwired loads in that same bathroom

So they have a choice. They can have one 20A circuit that powers receptacles in both bathrooms.  Or they can have TWO 20A circuits that powers receptacles and hardwired loads in each bathroom.
They don't have any other choices.  If a bathroom receptacle shares a circuit with ANYTHING that is not in a bathroom, that is a Code violation, and it's time to contact the city inspector. They can force the owner to correct it, and revoke the occupancy permit if they don't. Which would have the side-effect of evicting the tenant!
All bathroom hardwired loads (light, fan) are allowed to be on other circuits.
Lights and fans alone shouldn't trip a breaker if you upgraded to LED

Day of move in we had all the lights on in our 3 bed 2 bath apartment. Due to the heat of the day my wife turned on all the ceiling fans and within 30 minutes a breaker tripped and the power went off in 2 bedrooms and the guest bathroom.

Well, the "bathroom receptacle" restriction doesn't apply to bathroom hardwired loads, nor to circuits in hallways, bedrooms and living rooms.  As far as Code is concerned, they can ALL be on the same circuit.  There is no rule saying "1 circuit per bedroom" and that would be unnecessarily confining anyway, because there are better ways to do that.
However, your claim is that with lights and fans only, you tripped the breaker.  You weren't getting an overload trip unless you are still using old incandescent lights for some reason.  (and if you're trying to cool off, the last thing you want is incandescent lights adding heat).
A typical fan draws 60-90 watts, so 0.5 to 0.75 amps.
A typical LED "bulb" draws 4-12 actual watts, or less than 0.1 amps.
Incandescents draw exactly what they say on the tin (divide their watts by 120 to get amps, typically 0.4 to 0.8 each).
Now, being as it's a GFCI breaker, it's possible you are experiencing a GFCI trip due to a faulty fan, either in a room or in the bathroom.  Some circuit breakers allow you to read out an indication of the reason for the trip, however these vary dramatically by breaker type, and any given panel can only accept one brand's breakers*, so you are stuck with that type.  You would need to identify the GFCI breaker and search the web for its instructions to see if it will tell you the trip reason.
If nothing is plugged in and you still get GFCI trips, I suspect this is ONE device causing them, and eventually through normal use, you will identify this device, as in, it always trips if you run it long enough.  A supplied device tripping a GFCI is a defect, and the landlord should replace it for free.
You NEED to know your circuits
You cannot treat wall plugs like a magic cornucopia ready to power anything you plug in.  It is your job to know which circuits power which receptacles, and to know the amperes drawn by each of your appliances (it is stated on the appliance nameplate), and to make sure that all the appliances on your circuit are less than the amperes of the circuit (plainly stated on the circuit breaker handle; either 15 or 20).
I said what fans draw above, and you need to figure out your lights.  Add up all the loads plugged into all the receptacles on the circuit.  If you asked my sweetie, she could point to every appliance in the house and tell you its number... 12 for the microwave, 2 for the crock pot, 1 for the fridge, etc. For instance I make toast (7), I knock the heater from high (12) to low (7) so we're well under the 20 we have on that circuit. (and 30 whole-house).
Since you have 15A between all bedroom circuits and lighting and fans and bathroom hardwired loads (at the very least), you will need to be careful with this number.  Good time for LED upgrades if still on incandescent.

* Except Eaton CL breakers are certified for anyone's 1" breaker panel, and Eaton CHQ and Siemens QD are certified for Square D QO panels. However look before you leap - make sure those breakers do have better indicator features than what you have now before you waste time with them.  Remember YOU can't do any electrical work in the apartment, you need landlord permission AND a licensed electrician must do the work.  With authorization from the City and landlord, you might be allowed to do so-called "trivial" repairs such as replacing a fan, not that there's anything trivial about that.
Answer: This is clearly a screw up. Hard to imagine it was done this way. My first area of investigating would be the main panel to see if the bathroom circuit and bedroom circuits were mistakenly tied to the same breaker in the panel, maybe as a temporary test of the circuit and then forgot to split it. Since it's a rental, you shouldn't do this yourself but maybe recommend it to the landlord. You could, however, check to see if any breakers appear not to be connected to anything by switching them off and on.
Comment: Well, it's hard to imagine a (non-corrupt/complicit) licensed (if properly qualified to look at apartment wiring when sent by the office to do so) electrician coming and looking at it and saying it's OK, given it's clear code violation in new construction. Is the local inspection office also complicit, one has to wonder? I'd give the management *one* more chance to get this right and then head straight to the state boards covering electrician's licensing and inspections to look for local gross violations and corruption. It does not seem that a local complaint is going to find an untainted ear.

15 amp GFCI breaker in multiple rooms


Can surefire and failsafe plugin deliberately randomize execution order of test classes?

Question: It appears that surefire and failsafe plugins execute test classes in order while tests defined within a class execute in undetermined order.
To discover tests which rely on order (what we consider bad tests) we want to force the order to be different for each run.   Ideally, we'd have a mechanism to disable randomization or a seed number that would repeat the order (must like the old palm  OS emulator had a seed number that drove a sequence of random tests).
Let me know if you know a way to do this?  If not, I guess I can work one into a local fork and then submit it.
Thanks
Peter
Answer: Some of the other answers link to the surefire maven documentation page, but like most maven documentation it provides no examples of how to actually specify the settings in the maven XML morass.  Here is how to do it with the surefire plugin:
<code><properties>
  <surefire.plugin.version>2.16</surefire.plugin.version>
</properties>

<build>
 <plugins>
   <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-surefire-plugin</artifactId>
     <version>${surefire.plugin.version}</version>
     <configuration>
       <runOrder>random</runOrder>
     </configuration>
   </plugin>
 </plugins>
</build>
</code>
Answer: First it seemed to me that you are mixing things. Maven-Surefire-PLugin is responsible to run unit tests where it is the case to be independant of the order of execution.
Maven-Failsafe-plugin is responsible for exectution of integration tests which is different, cause integration tests could be dependant on the order which os no problem. Apart from that maven-surefire-plugin has some possibilities to influcence of the order of execution order:
http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#runOrder
This will be of course influenced by the testing framework which you use. In JUnit you can influence the order only in limited way. In TestNG it is a complete different story, cause TestNG has the ability to define dependencies etc.
Maven-Failsafe-Plugin has the same capabilities to influence the order of executions.
http://maven.apache.org/surefire/maven-failsafe-plugin/integration-test-mojo.html#runOrder
Answer: Specify the runOrder of Surefire to "random" http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#runOrder
Answer: I think this is more the responsibility of your unit test framework, not the Surefire/Failsafe plugins, which are just responsible for bootstrapping the test framework.
There is already a Stackoverflow question about how to make Junit tests run in random order (the answer is to use a custom ClassRunner):
How can I make my JUnit tests run in random order?
This library supplies an implementation if you don't want to write your own: http://randomjunit.sourceforge.net/


What "big con game" could an alternate-reality traveller play on a knowledgeable and suspicious civilization?

Question: I have a cosmos where FTL travel is via an alternate dimension. The problem is when you return to our universe, you find yourself at the right destination, but a completely different parallel world from where you started.You can't control which parallel universe you end up in, so you can never go home and never go back. never going back means there are a lot of morally questionable people attracted to this kind of travel, and my main character finds himself working for grifters after having fled some crimes himself. I need some really nasty con games that you could play on entire planets and civilizations that could be carried out by a small number of people on a ship that everyone knew would disappear forever and was filled with potentially questionable people. I'll give my thoughts, but I'd love to here what people have to say.
Comment: PS this is related to my question about what currency and retained valuables an alternate-reality traveler would carry with him from world to world.
Comment: yes we know that, it has the exact same premise
Answer: Here's what I've already thought of:

Fake mineral/colony surveys - Hey, everybody! there's this great new colony world full of life and resources. You really want to send your colonists to a paradise, right? And did you know we were on a different version of your world where they found a huge deposit of gold under...someplace. Shall I tell you where to find it?
fake technology - Doctor physicist! I don't pretend to understand what this thing does, but the guy I bought the design from said it converted lead into rhodium. He promised me I'd be rich! Why are you laughing?
Fake disasters - I'm so sorry, everyone. There's a supernova, and this whole system is going to be destroyed in about a week. I have a little space on my ship, for anyone with enough money to buy a seat. I'll drop you off somewhere safe.
Fake ideology - I see your world is still only half communist. We're idealists ourselves and are thinking about nuking your rivals for the glory of the proletariat! Do you want us to? Do you not want us to? We hate the imperialist swine, but if they give us a mountain of money, it supports the galactic cause...
fake disease - We've planted Aldebaran plague on your planet: give us money or we unleash it and everyone dies.
Comment: another one 6: fake way to travel inside one dimension


How to calculate Lat,Long,Alt of a pixel in an Image where lat/long/alt corresponding to one of the pixels in the same image is known?

Question: I have an image taken using a mobile phone like the one attached below. Let's say that I know the location(lat/long/alt) from where this image was taken, which is probably the center of the red circle (lets say pixel x,y), annotated in this image. I want to have any suggestions on how to go about estimating the approximate lat/long/alt coordinates of the annotated traffic signal?
Comment: Use Google Earth, find your known XY, then locate that traffic pole by comparing imagery.
Comment: Thanks for your advice, Dan. However, I want to do that programmatically, by using the geometric projections.
Answer: IF you know the look angle (azimuth) of the photo, you can try to estimate 1) how far away the traffic signal is from the known point - maybe 60 feet - and 2) the height difference of the two points - maybe 15 feet - and then just do the trig.
This is known as a First (direct or forward) geodetic problem and there should be resources out there for that search term.
I imagine it would be easier to convert your data to a projected coordinate space so you can use planar math rather than trying to work with geographic coordinates.
Comment: Thanks for the suggestion, I will explore the resources related to "First (direct or forward) geodetic problem". And I am sorry, I don't have enough reputation to upvote the answer. I will wait for few more suggestions from the community and will mark the best one as accepted.


Typing ü on a pc

Question: So, in case you haven't noticed, not many ASCII keyboards have the German umlaut as a key. This doesn't tend to be too much of a problem, but whenever typing something like 绿色,  I can never seem to find the character for 绿.  Any tips?
Comment: Have you tried `lv`?
Answer: Most Chinese pinyin IME use v in replace of ü, as v is not used in pinyin alphabet.
You have got your answer in your comment.
Answer: You type "lv4se4" into a HanYu Pinyin IME to generate the ideographs for "lǜsè". If you type both syllables together, the relevant characters should be automatically selected by your IME.

Typing ü on a pc


Are trigonometric polynomials dense in $C_{2\pi}^m$?

Question: Let $m \in N$ be fixed and let $C_{2\pi}^m$ be a class of functions $f : R \rightarrow R$ of class $C^m$ and periodic with a period $2\pi$ with the following metric
$$d(f,g)=\sum_{k=0}^m  \sup_{\{x \in R \}}|f^{(k)}(x)-g^{(k)}(x)|$$
for $f,g \in C_{2\pi}^{m}$. Is the set of trigonometric polynomials dense in this metric space?
Comment: As it stands, not necessarily: $P_n$ could have a constant term, and then $Q_n$ would have a linear term.  But with a little more work, you can show that if the constant term of $P_n$ is $c_n$, then $P_n - c_n$ also converges uniformly to $f'$.  (Hint: note that $\int_0^{2 \pi} (P_n(x) - f'(x)) \,dx \to 0$.  What's the value of this integral?)  Now if you instead take $Q_n(x) = f(0) + \int_0^x (P_n(t)-c_n)\,dx$, $Q_n$ will be a trig polynomial.
Comment: I try for $m=1$ in the following way:
1. To take arbitrary $f \in C_{2\pi}^m$;

2. To take (by Weierstrass appr. thr) a sequence $(P_n)$ of trig polynomials s.t. $P_n(x)\rightrightarrows f'(x)$;

3. To put $Q_n(x)=f(0)+\int_0^{x} P_n(t)dt$ (for $n \in N, x\in R$). Then $Q_n(0)$ is convergent, consequently  $Q_n(x) \rightrightarrows f(x)$ ;

But, is $Q_n$ a trig polynomial?
Answer: Yes they are, because you can restrict to an interval $[0, 2 \pi]$ of function $f(0) = f(2 \pi)$, and use that they are dense in $C[0,2 \pi]$. Integration $k$-times and observing carefully what gets added will give you an affirmative answer. It is a continuous, surjective operator $C \mapsto C^k$.
Answer: I have an another idea using Fourier series. Let $f \in C_{2\pi}^m$ and let
$(S_n)_{n=0}^\infty$ be the sequence of partial sum of the Fourier series of $f$. Then it is known that   $(S_n^{(k)})_{n=0}^\infty$, for each $k\in \{0,\ldots m\}$, (that is sequuences of $k$-th derivatives) is a sequence of the partial sum for $f^{(k)}$. By continuity and $2\pi$-periodicity of each $f^{(k)}$, for $k=0,\ldots,m$, and the  Feier Theorem we have that  for each $k\in \{0,\ldots ,m \}$:
$$\left(\frac{S_0(x)+S_1(x)+\ldots S_n(x)}{n+1}\right)^{(k)}=\frac{S_0^{(k)}(x)+S_1^{(k)}(x)+\ldots S_n^{(k)}(x)}{n+1} \rightrightarrows f^{(k)}(x) $$
as  $n\rightarrow \infty$, for $x \in R$. Obviously $\left(\frac{S_0+S_1+\ldots S_n}{n+1}\right)_{n=0}^\infty$ is a sequence of trigonometric polynomials.


2002PT Cruiser intermittent start/cranking issues

Question: Have issues for two years. Replaced battery 3x -found sensor draining and repeated start attempts. Replaced alternator, starter 2x last 2/16/2021. Failed to crank 2/17. All interior lights and blinkers strong. Finally moved gear shifters neutral. Kicked right over! I expect a recurrence. Five subsequent starts good.2002 pt CRUISER
Answer: You most likely have a faulty neutral safety switch. This switch is activated when the transmission is in the park and neutral position. It's a way to prevent it from starting in gear. Other things that could affect the neutral safety switch to not function are loose or worn shifter linkage or loose or worn linkage at the transmission.


Best kind of insulation board possible?

Question: I have a wall I need to insulate and have only 2 inches to work with, so I am planning to use some kind of insulated panel board and want to maximize the insulation. Cost is no object, so if it is very expensive, that is ok. What is the best possible option? Note that I do need something that is commonly commercially available quickly, so I can't use some custom solution like aerogel or anything like that.
Answer: Having eliminated aerogel due to lack of common commercial availability, polyisocyanurate is the best common commercial product on R/inch basis.
Comment: Nothing is better than iso, and [nothing is worse](https://diy.stackexchange.com/a/68919/23295) when on fire. It's R6.
Answer: Why is aerogel not an option? Would it not arrive soon enough? http://www.buyaerogel.com/product/thermal-wrap-8-mm/

I believe polyisocyanurate (R-5.6 per inch) is correct for pre-made foam boards per Ecnerwal's great answer but you'll want to make sure to silicone caulk around the edges to ensure zero air penetration between the board and the frame it's in.

You said money is no object so if you're not opposed to spray foam then I suggest closed cell as it is R-7 per inch and it will act as a vapor barrier. Hire a contractor and get it done in less than 15 minutes.
I've used spray foam kits to seal my rim joists but it was honestly a hassle. If you're not used to the motion then it ends up uneven.

Open cell is more readily available but at R-3.8 per inch it would be less desirable.

Best kind of insulation board possible?


Twiiter on iPhone iOS 4.3.3

Question: I am trying to access the twitter from my iOS app and i am getting this error.
I have searched on the net for that but could not get a solution
Can Anyone help ?
<code>Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn't be completed. (NSURLErrorDomain error -1012.)" UserInfo=0x81e7c20 {NSErrorFailingURLKey=http://twitter.com/oauth/access_token, NSErrorFailingURLStringKey=http://twitter.com/oauth/access_token, NSUnderlyingError=0x81c5900 "The operation couldn't be completed. (kCFErrorDomainCFNetwork error -1012.)"}``
</code>
Thanks In advance
Answer: Get Sharkit from link and use that in the application

Twiiter on iPhone iOS 4.3.3


What is the real Warp 3 factor in the original series?

Question: Where did Warp 3 in the original series is 27 times the speed of light come from? In the book The Making of Star Trek page 191 it states that Warp Factor 3 is 24 times the speed of light. Which one is correct?
Answer: Modern source material would say nominally TOS warp factor is cubed, so 3 × 3 × 3 is 27.  (TNG has the 3 and 1/3 power.)  However, it also said the actual speed is subject to local conditions in space and subspace.  So 24 can be correct in practice.
I know there are TOS writers guides and Gene Roddenberry comments that will imply the writers thought the ship was much, much faster in the 1960s, but that's not really the question.  For example in "The Cage," Pike said he was from the other side of the galaxy.
EDIT: Regarding sources of the cubed formula.  See http://hem.bredband.net/locutus/faq_wa12.html
"Taki Kogoma writes:
I'm reasonably confident that this first appeared in the old Star Fleet Technical Manual by Franz Joseph and was quickly adopted by fandom. (Note that in some of James Blish's episode transcriptions, he had WF n = n*c.)
Joe Chiasson, describing Star Trek Maps, a map and manual combination by Bantam Books from 1980, offers:
The booklet contains quite a lot of written information on the development of warp drive systems and how warp travel is affected by matter density in a given area of space. The above formula was written as v = Wf^3 * c. "
Comment: "Modern source material would say" - what source material?
Comment: @NKCampbell Anything by the Okuda's for example.  I don't feel the question required additional sources as it wasn't requesting a complete history of warp factors in star trek reference works.  But upon a reread I answered the in-universe correctness question not the out-universe source question.
Comment: Also, don't forget about the warp factor scale change between TOS and TNG.  There are moments in TOS where they go beyond warp 10, but in TNG and beyond, warp 10 is a theoretical impossibility
Answer: I just checked my copies of The Making of Star Trek Stephen E. Whitfield and Gene Rodenberry.
My copy of the sixth printing, October, 1970, at PART II: AN OFFICIAL BIOGRAPHY OF A SHIP AND ITS CREW, Chapter 2. The USS Enterprise, says on page 191:

Warp Factor One is the speed of light.  Warp Factor Three is 24 times the speed of light. Maximuml safe cruising speed of the Enterprise is Warp Factor Six, or 216 times the speed of light.  At Warp Factor Eight (512 times the speed of light) the ship's structue begins to show considerable strain, due to theinabilityof the ship's field mechanisms to compensate.  Warp facto Six is therefore excceeded only in instances of extreme emergency.

I then checked my copy of the third printing, dated January, 1969.  And it has the same words on page 191 including:

Warp Factor Three is 24 times the speed of light.

So possibly The Making of Star Trek always said that warp factor three was 24 times the speed of light.
there may be other discussions of the speed of TOS warp factors elsewhere in the book.
As I remember, the writer's guides for TOS said that the (TOS) warp factors were the speed of light multiplied by the warp factor cubed, so that:
warp one was the speed of light
warp two was 8 times the speed of light
warp three was 27 times the speed of light
warp four was 64 times the speed of light
warp five was 125 times the speed of light
warp six was 212 times the speed of light
warp seven was 343 times the speed of light
warp eight was 512 times the speed of light
And that could be extended to higher warp factors mentioned in several episodes including:
warp nine 729 times the speed of light
warp ten 1,000 times the speed of light
warp eleven 1,331 times the speed of light
warp fifteen 3,375 times the speed of light
and warp thirty seven 50,653 times the speed of light, and so on.
And if anyone has access to various editions of the Star Trek writer's guide they can check to see if my memory is correct about what it says about warp factors.
One thing that is certain is that many writers failed to do the math, and the star Trek staff often failed to check and correct, and so examples of distances, speeds, and voyage times which agree with the TOS warp speeds are the exception rather than the rule.
Addition 10-19-2020  NKCampbell commented just three minutes after I posted with a link to this pdf of the third revision of the Star Trek Writers Guide dated April 17, 1967.
https://www.bu.edu/clarion/guides/Star_Trek_Writers_Guide.pdf[1]
On page eight it says:

Hyper-light speeds or space warp speeds (the
latter is the terminology we prefer) are
measured in WARP FACTORS. Warp factor one is
the speed of light -- 186,000 miles per second
(or somewhat over six hundred million miles per
hour.) Note: warp factors two, three and four
and so on are based upon a geometrical formula
of light velocity. Warp factor two is actually
eight times the speed of light; warp factor
three is twenty-four times the speed of light;
warp factor four is sixty-four times the speed
of light, and so on.
Maximum safe speed is warp six. At warp eight
the vessel begins to show considerable strain.
We have established in preceding episodes that
warp seven or eight are used only in emergencies,
in hot pursuit and so on, and can be highly
dangerous.

The speeds stated all agree with the cube of the warp factor except for warp factor three being 24 times the speed of light instead of 27, and the formula is not stated.  Thus I think more research is needed.
Comment: https://www.bu.edu/clarion/guides/Star_Trek_Writers_Guide.pdf - page 8 references warp speeds that you cite
Comment: I'm surprised it goes back that far thank you.  24c for warp 3 is no doubt a typo.  Which happens.   There's a math error in a book by Isaac Asimov on black holes that frustrated me as a kid.  I can imagine the warp 3 typo irritated a few people in the 1970s.
Comment: I guess it could be an error when the author wrote it. Was just curious about it my book is the twelfth printing May 1974.


Rainy dark day or dark rainy day

Question: There is a part showing adjective order in English Grammar In Use 5th edition p.198 and it doesn't help me to get to know which one is correct; 'rainy dark day' or 'dark rainy day'. The section in Cambridge Dictionary 1 doesn't help either as I'm not sure if 'rainy' a physical quality. Which one is correct, 'rainy dark day' or 'dark rainy day'?
Note: 'Dark' is not used in figurative meaning.
Answer: "A dark, rainy day" is correct.
"Dark" falls under the "colour" category.
"Rainy" doesn't fall under any category I usually see in adjective order lists, but I dug a bit and found this list of adjective order from Cambridge, which includes the category "type". I'd say "rainy" is a type of day, and "a dark, rainy day" is certainly the correct order.

Rainy dark day or dark rainy day