What is a cool wallpaper or background (if any) for a Main Application Window?

Question: Does the opening Window enhance an application's attractiveness? Should it be a picture or bland Blue and White?
Answer: Use the default OS theme colors.  Anything else will be attractive to certain groups of people, and ugly to others (who will complain very loudly about how ugly they find it).  If you stick with the OS theme colors, then at least your application's appearance will not be something you'll be criticized over.
Answer: Some people like it clean and nice, while others consider stylish themes to be positive and nice to have. You gotta consider who your application is pointed towards and do what that group is interested in.
Answer: I would use the default OS colors. But actually if i could, i wouldn't put any color/themes at all there. I would put some information/controls in that area (assuming you talk about the background of an MDI/SDI application). Similar to what the most recent openoffice 3 version has done. For example, put "What do you want me to do? Open / Exit / Tutorial / ..." into it.


Part-time vs full-time. How is this category called?

Question: I want to give name to a column where values will be "full-time studies" or "part-time studies". How should I name the column?
Comment: @tchrist - "software element" is just an example. I am asking how is that correctly called in English, which looks like more in scope here than somewhere else.
Comment: I'm voting to close this question because choosing names for software elements is specifically out of site scope according to our [help].
Answer: Enrollment Status would be a good choice.
From Purdue Global:

Enrollment Status and Definition of an Academic Year
Your enrollment status can impact financial aid eligibility.
The U.S. Department of Veterans Affairs may have different definitions
for full-time and part-time status. You should consult the
University's Certifying Official if you are receiving veterans
benefits.
Undergraduate
An academic year consists of three terms of instruction, during which
a full-time student will complete at least 36 credit hours. Thus,
enrollment status is defined as:
<code>Full-time: 12 credit hours per term
Three-quarter-time: 9 credit hours per term
Half-time: 6 credit hours per term
</code>

From the US Department of Education:

Enrollment Status
Reported by the school the student attended, indicates whether the
student is (or was) full-time, three-quarter time, half-time, less
than half-time, withdrawn, graduated, etc.


Blender 2.8 Objects move when Export to Unity

Question: I'm hoping I don't have to start over, but I am pretty new to blender and I am not sure if I set up the rig correctly. I have been unable to find a solution, or the proper set up for objects that move based on an IK arm in Unity. I tried baking the animations but that did not work either. Any ideas how I can fix this? Thanks.
Answer: You need to export in your T pose or your rest pose, should be found in blender on your first IK animation frame.
Answer: the local transforms are not 0
apply the local transforms.
you can do that in unity of blender.
in blender just use alt + r for zeroing rotation (or alt +g for move and alt+s for scale)
if you need to apply them use ctrl + a and select accordingly.
you might need to adjust your transform after doing so, so I recommend using some placeholders first.
Comment: Edit: I found that everything has to be done in the rest position first before animating. Thanks.
Comment: Thanks, This worked in Unity. How can I set up the rig to avoid this in Blender, because I was not able to get it to work from Blender to Unity. Do I animate first, than Zero out? Do I zero out before animating?
Comment: make sure everything is zeroed in blender.
also there are options in export and import. make sure the both are correctly set and in unity set them up correctly
Comment: I zeroed everything and it still moves when importing to unity. Best place to find the options online? Videos I see just bring in the blender file and it works, so I'm not sure what the issue is.


Word for a thing with positive and negative consequences

Question: What word can I use for a thing with positive and negative consequences? For example, taking a cab rather than driving has its advantages and disadvantages.
Comment: possible duplicate of [Is there an idiom that conveys the meaning of the French "mi figue mi raisin"?](http://english.stackexchange.com/questions/41472/is-there-an-idiom-that-conveys-the-meaning-of-the-french-mi-figue-mi-raisin)
Comment: Also see [Proverb or expression for a situation with two choices both leading to a different kind of trouble](http://english.stackexchange.com/questions/38243),
Comment: http://www.newyorker.com/cartoons/a18915
Answer: I'm not sure of a single word. You might use the phrase double-edged sword, e.g.

Taking a cab is a double-edged sword. You don't have to worry about parking, but it is more expensive.
Answer: For intermingled positive and negative emotions, I would use bittersweet.  Clearly though, the phrase "taking a cab is bittersweet" doesn't really hit the mark, unless you're discussing the conflict of leaving vs going.  The best I can come up with is "taking a cab rather than driving has mixed/conflicting/divergent consequences."  I'll think more though, those still feel off the mark to me.
Answer: If you're saying that two things have the same chances they will turn out well, or both are equally appealing choices, you can call it a toss-up.

"Should we take a cab or drive?"
"A cab sounds expensive, but I'm really tired. It's a toss-up."
Answer: Mixed bag:

one having both positive and negative qualities or aspects

Also spelled mixed-bag, to meet the single word criterion.
Comment: I like both mix-bag and toss-up for declaring that something has positive and negative consequences. Any idea of a single word to use to refer to the actual consequences (the things in the mixed-bag)?
Answer: Dichotomy - when presented with the choices
Merriam-Webster defines Dichotomy as

something with seemingly contradictory qualities
  it's a dichotomy, this opulent Ritz-style luxury in a place that fronts on a

So in the current example, it could be used such as

Driving is a dichotomy with increased comfort but long term disadvantages.


Can't connect metamask to React app in production

Question: I have a React app that can connect to my browser's Metamask in my development environment, but the version deployed on Netlify can't connect to Metamask. My code for getting my web3 provider is
import Web3 from "web3"; //get the browser's web 3 provider export const web3 = new Web3(window.ethereum);
This is the code I'm using to deploy a smart contract that works locally:
import { web3 } from "./web3";
import { getWarranty } from "./getWarranty";
import warrantyByteCode from "./warrantyByteCode";

export async function deployWarranty(warrantyArguments) {
    let warrantyContract = await getWarranty();
    let gas = await warrantyContract.deploy({data:warrantyByteCode, arguments: warrantyArguments}).estimateGas((err, g) => console.log(g));
    const accounts = await web3.eth.getAccounts((err, accounts) => { return accounts} );
    let params = {gas: gas, from: accounts[0]}
    return await warrantyContract.deploy({data:warrantyByteCode, arguments: warrantyArguments}).send(params)
    .then(function(newContractInstance){
        return newContractInstance.options.address // instance with the new contract address
    });
}

In production await web3.eth.getAccounts() returns an empty array, but in local development, it returns the account I have selected in my metamask instance. It should be the same in both environments, so I'm not sure why it's only working locally.
Answer: All I had to do was manually connect to metamask using the instructions here


own streaming source within home network

Question: I'm looking for a way to create a streaming environment within my home network. I figured out DLNA or Airplay are probably the way to go but now I have a problem figuring out with which device I'm able to create a stream which is then consumed by different clients (speakers, ...) I know how to access files (especially music) through the network. I have a Synology NAS / Raspberry Pi / Home server ready to be configured. The stream producer should be running all the time (probably on the nas / homeserver) and the consumer should be able to consume the stream whenever they are turned on. Any ideas?
Comment: Have you taken a look at plex?
Comment: yes i took a look at plex, its kinda similar to the others, it only provides access to the music that is stored, im not able to stream music...
Comment: What source are you hoping to stream music from?  Your NAS?  Somewhere online?
Comment: preferably nas or home server, i figured out a way to stream but it just works for a single song, using vlc media player and then creating an http-stream which is then consumed through another vlc media player
Answer: If you the streaming device eg: mobile / iPod is in a Bluetooth range then probably you can make use if NFC which should be available on all the latest devices or you can take advantage of UPnP technology.
take a look at the article
Let me know if you have any further questions regarding the same.
Comment: thanks for the response, but its the same problem as always, if i create a upnp-server, i can get access to my music/movie library but i want to create a stream that is always running (even when not used) so that when a receiving device is turned on it immediately is able to receive the stream (maybe stream is the wrong word?)


NaOH solution not stable

Question: $\ce{NaOH}$ solution can react with $\ce{CO2}$ to form sodium carbonate.
Is there any other reason why $\ce{NaOH}$ solutions for accurate titrations cannot be stored for long (or the titre has to be updated every time). Wouldn't filling the vessel with argon fix the problem.
Comment: Thank you Leeser, Is NaOH solution  still hygroscopic in solution as it is already dissolved in water or  it does not matter.
Comment: This one reason is quite enough. As to filling the vessel with argon, it will surely solve this problem and create many more.
Comment: NaOH is hygroscopic, ie it absorbs water from the atmosphere. So over time your solution will become more dilute so can't be used over a period of time. Therefore it cannot be used as a primary standard. Usually you determine the molarity of your NaOH solution just prior to its use. If you carry out your titration under argon or other dry atmosphere, sure use it but not hta feasible!
Answer: Your questions has two a two part answer.
(1) How would you get the $\ce{NaOH}$ out of a sealed bottle?
(2) A concentrated stock solution can be made for $\ce{NaOH}$. In the top of the bottle you use a drying tube stuffed with solid $\ce{NaOH}$ to remove $\ce{CO2}$ from air. On the bottom you have an outlet from which you pour the $\ce{NaOH}$. The gist is that $\ce{Na2CO3}$ is the least soluble carbonate. So most of the $\ce{CO3^2-}$ in the original solution participates. So if you let the solution sit for a couple of days it will be very stable.
The point with the stock solution as outlined is that $\ce{Na2CO3}$ "sticks" to inside of the container and doesn't flow out with solution. (You don't shake bottle up like you do with tomato juice that you drink to resuspend the solids.)
So for (1) it is high near impossible to make a $\ce{NaOH}$ solution without some $\ce{CO3^2-}$ in it. The $\ce{NaOH}$ itself has $\ce{CO3^2-}$ unless it is specially made, sealed in argon and so on.
So your stock solution is concentrated. I boil some distilled water to get rid of $\ce{CO2}$ and seal it till it cools. I then take $10~\mathrm{ml}$ of my stock $\ce{NaOH}$ solution and dilute to $250~\mathrm{ml}$ (or whatever ratios) to get the desired concentration of $\ce{NaOH}$. (That I can check with KHP titration.)
Comment: $\ce{NaOH}$ also attacks glass and quartz containers. Before the advent of plastic bottles, that was an additional reason to prepare a solution just before use. BTW, I've had to deal with glass bottles in which solid $\ce{NaOH}$ pellets absorbed enough moisture to fuse the cap onto the bottle!

NaOH solution not stable


USB not booting linux on acer aspire 5750g

Question: I have been unable to boot Linux from a USB on my acer aspire 5750G laptop
It goes through the boot and then freezes half way through. it has done this with every type of Linux I have tried.
Before anyone asks I have tried every single one of these boots on my desktop computer and they work perfectly every time.
This freeze only happens on my acer aspire.
I have tried it on a Toshiba laptop as well and it boots perfectly again.
I have tried almost everything, I say almost because posting on a forum like this is the only thing I haven't tried.
Please be clear I'm not concerned with installing it onto my laptop I just want it to run off a USB.
Please I really want this to work.
Comment: What exact point in the boot process does it stop, and are any error messages shown?  What options have you selected with the function keys (if you even got that far)?
Comment: When I try to install ubuntu and kubuntu it stops at a certain command while loading. I will try loading ubuntu again and I will tell you which one it stops on.
However when trying to install any other sort of linux (I've tried a range of about 10-15 types of linux) there is just a black screen and it does nothing. On some I get a blinking underscore then that freezes.
But I will put ubuntu back onto my USB and get back to you about the command it stops on.
Thank you for your reply
Comment: I have been researching this also and apparently other people have has problems with the GFX drivers for the nvidia 520gt in the acer aspire 5750g
Comment: the last command that pops up while loading linux is
[7.083767] [drm] nouveau 0000:01:00.0: Checking PRAMIN for VBIOS
then everything stopped for about 3 mins and my laptop shut off
I have a picture of my screen, but am unsure of how to post it.
Answer: Looks like a video driver issue.  Select the nomodeset option (under F6) at the "Try/Install" screen.  Skipping some of the video install stuff is possible by typing a character at the screen with the two little icons at the bottom (a keyboard and a little stick person), then select language, ...  If that doesn't get you through, try one of the alterative installs which have even less video dependence.  Once you are running, you can install the appropriate proprietary video driver, and maybe add nomodeset to the /etc/default/grub file on the
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" line after the splash.
Comment: thank you I can now load linux successfully however the video drivers don't install properly
Answer: Have you tried choosing "the nvidia graphic card in the bios in order to use only the Intel integrated card (choosing 'integrated' instead of 'switchable')"?
http://www.linuxforums.org/forum/installation/187209-no-way-install-linux-acer-aspire-5750g.html#post883554


Redirecting a port to a remote server on windows

Question: I only have command line access to a server and I'm not allowed to disable the antivirus (which blocks netcat). What I would like to do is have a program that listens on port A and when a remote computer connects to it redirect all input/output of that socket to another server on a different port. Basically a small proxy. Is there anything that will let me do this from command line? If not I could try coding something simple that does this with C++
Answer: You can try rinetd.


Time premium of at the money options

Question: What is the reason that at the money options have the greatest time premium? I am not mathematically inclined, is there a way to understand this intuitively?
Answer: Time premium is the difference between the market value of the option and its intrinsic value the amount you would get if it expired right now.  Lets think about three cases for buying call options:

When the option is far out of the money there (likely) isn't enough time for the the price for the underlying to change to the point where is is above the strike price.  So time to expiration doesn't matter as you are likely to get the value that the option is worth right now, zero.
When the option is far in the money the intrinsic value is equal to the value of the underlying minus the strike.  When you are far in the money time doesn't matter as the though the underlying has a lot of time to change as its price goes up the intrinsic price of the option also increases and as the price decreases the option does the same.  As random moves up and down are approximately equally likely having more time isn't very valuable.
However, near the money is where this where the fact this is an option is important.  Time now matters much more as when the underlying price has more time to increase the value of the option increases with it however if the underlying drops in price the option value doesn't fall as fast as the minimum payout is zero.  Here having time for random large moves is much more valuable as you experience only the upside.

Purchasing put options works similarly but in reverse.

Time premium of at the money options


Why do speakers use clamp connectors?

Question: Why do many audio speakers use clamp terminals to connect speakers one to another, rather than jack connectors?
Comment: not when your speaker wire is to be no longer than the distance between the amp and speaker ... it is a pain to tailor make cables
Comment: @jsotola I'd say that jack connector is much easier to use.
Comment: ease of connection
Comment: Professional audio uses sockets on the speakers and plugs on the cables. You just need a selection of cables depending on the size of the venue you're setting up in.
Comment: No one mentioned compatibility between different amplifiers with different speakers?
Comment: Clamp connectors are used so that audiophools can connect some speakers with backwards polarity which cancels the bass sounds.
Comment: Could it be due to vibrations? clamps offer simpler and stronger grip?
Answer: TL;DR Because that's good enough, so why do more.
If you used plugs/jacks of some sort then you would need to either have manufactured cables of an appropriate length (long enough, but not way too long) or make them yourself. However, some people may place their speakers a few feet from the audio source and others may place them 50 feet (15 m) or even farther away. Plus, if a long distance also involves going through walls, behind furniture, etc., it is much easier to get a thin speaker cable through than a cable with plugs on the ends. Consumer-grade speakers are extremely tolerant of varying cable and connection quality.
A similar situation, but with a different result, is computer networking. Typical computer networking these days is using some variant of twisted pair Ethernet. This involves cables with 8 wires (though depending on speed and other factors, often only 4 wires are used) instead of 2 wire, but the big difference is that the plugs and jacks need to be installed to a relatively high tolerance. Install them incorrectly and you get slower speed, errors or possibly no communication at all, despite having continuity on every wire end-to-end. As a result, the normal setup is to use manufactured cables or to install cables with jacks on each end, normally (but not required) mounted to walls/ceilings/floors, and then use manufactured cables to connect from those jacks to devices (computers, printers, routers, switches, etc.). With Ethernet, it is not too hard to learn how to install jacks, and the basic tools are inexpensive. But installing plugs on the end of cables, while possible, is not easy or inexpensive to do, or at least to do very well.
Speakers just need to reproduce a low frequency signal - on the order of 20 kHz. Bare wires jammed into spring-loaded connections are good enough. More will cost more, but it provide little benefit except, maybe, to audiophiles. Ethernet started at 10 megabit/sec and has progressed to the gigabit/sec range. It needs the high quality of properly installed plugs and jacks to get the signal through. Audio simply doesn't need that.
Comment: Doing it well takes good tools and practice. I wouldn't recommend it for most people unless they'll be doing it a lot.
Comment: @TypeIA Is it particularly difficult? No. But even then, when I was testing sockets in a (then) new apartment, literally none of the sockets have been wired correctly. Even today (not a professional network engineer) after doing dozens of cables, it's not exactly rare for me to have to redo the connectors because they aren't done well enough for 1 Gbit. Again, the point is - compare this to "plug two bare wires into a clamp". Connectors are great if connects and disconnects are relatively common, and changing wire/cable length is relatively rare. For connecting speakers to each other...
Comment: I think that the effort of making your own Ethernet cables is clearly above that of making speaker cables (with or without banana plugs).  For a start, many will not even appreciate the need for care with the Ethernet connections.
Comment: Are you saying crimping RJ45's is difficult and expensive? It's neither...
Comment: @TypeIA But it's cheaper and easier to use bare-end wires and clamps.  So that's $20, extra cost of connectors, extra cost of unit, demos and trial runs which are all money and time down the drain.  You're better to set light to a $20 note, then at least you've saved yourself the time. :)
Comment: @TypeIA, RJ45? Have you any idea of the instantaneous current that a home audio amplifier might drive through the speaker?
Comment: @SolomonSlow I think you misunderstood. I didn't suggest using RJ45. I commented on the answer's comparison between RJ45/twisted pair and speaker wire. Obviously the former isn't suitable for the latter.
Comment: I dunno, I have a $20 crimp/strip tool and wouldn't be afraid to have my wife do it after a demo and a few trial runs. But to each their own.
Answer: Spring clip speaker terminals are economical and dispense with the need for mating connectors on speaker cables.
All that they require is cable ends stripped of insulation for easy 'clip-on' / 'clip-off'.
They also permit the use of thicker cables.
Comment: I'm imagining attaching some connector to a 4mm^2 copper cable. You'd probably need a blowtorch for that.
Answer: Speakers tend to be fitted to the wall. Jacks take a lot of space, clamps rarely protrude beyond the body of the speaker. This is especially valuable when you consider that you usually want to orient speakers towards the listeners, which usually means being mounted high up, and slightly tilted downwards.
They're also cheaper.
Note that other pieces of audio equipment do use various connectors, like jacks and cinches. They don't have the same limitations as speakers - and indeed, jacks and cinches do appear often enough with free-standing speakers, including computer speakers. It's also only useful when the connectors are standardised - perfectly fine with computers or walkmen, but not so much for restaurants or clubs. And then you get someone like Apple breaking off even those tentative standards.
Are they harder to use? Honestly, not at all. It's just that you're looking at their use from a different perspective than how they're actually used. With a headset, you expect to connect and disconnect the device often; jacks make perfect sense. They are more durable and less prone to causal misuse. But speakers are often installed more or less permanently, and then you also tend to make wires to length - and I'm sure you can appreciate how much easier it is to simply plug the stripped wire ends to a clamp than it is to attach a jack.
Cables are less flexible and more expensive than wires. Why use them when wires (for this application) tend to be more beneficial in the first place?
Answer: Cheap speakers generally use this type of connectors, which are ideal in this application.

The user will probably want to hide the cables, or string them behind shelves or thread them through small openings and conduits, and a large connector would prevent that. These binding posts allow use of any lamp cord, and the user can cut it to length, replace it, and change the color of the cable to hide it... It is also thin, so the speaker can be placed against a wall without a connector protruding. Contact is pretty good and reliable because the wire is squeezed between the contacts by a spring. Basically, these are cheap and they do the job very well. For this application, you don't want connectors.
The only big drawback is you really have to remember to turn the amp off when fiddling with the wires, because they will probably short while you do so.
More "high-end" speakers use posts like this:

If you get high-end speakers, you won't put them against the wall, because that makes the bass response ridiculously bad, so protruding connectors are less of a problem. That said, these binding posts are garbage when used with bare wire, because speakers vibrate, so they unscrew over time. The screw part is useless, and they're only reliable when used with banana jacks. So, ironically, the "high-end" gold-plated stuff is worse than the cheapo springy binding posts.
Pro-audio/stage gear always use connectors, because they must be installed quickly and often, and with correct polarity. Sometimes it's a 6.35 mm jack for low power, which is a terrible connector for this, because it shirt-circuits at insertion. Sometimes it's XLR, which is decent. Both jack and XLR are hazardous to the survival of the rest of the equipment, because then you get cables lying around with one end connected to a power amplifier, and the other end offering a connector that will fit just right into a lot of other stuff that should never be connected to the output of a power amplifier. And last, we have Speakon connectors of course, which are just awesome:
Comment: Re, "XLR," Are you sure those weren't feeding "line level" signals to powered speakers? That's widely used for stage monitors these days, and it's becoming more and more common for FOH speakers in small venues.
Comment: Oh there used to be some unpowered speakers using XLR of 6.35mm Jack cables to the power amp... quite hazardous!
Answer: Addendum: No established standards that would be suitable.
Generally common standards for pluggable speaker connectors, and their problems:

XLR/Speakon and other professional connectors: Too expensive, too bulky, risk of confusion with other mechanically compatible connectors on equipment not intended for connections to speakers or amplifiers.

6.3mm Jack plugs: Mechanically not very robust. Risk of confusion wrt incompatible equipment. Also, very powerful amplifiers can actually create voltage outputs unsafe to touch, and Jack/TRS plugs would make a perfect hazard out of this.

RCA connectors or smaller Jack plugs. Similar problems as with 6.3mm, add insufficient current handling capability.

4mm "Banana". Deprecated for speaker connections in the EU (actually, deprecated on anything that isn't laboratory equipment) because the pins fit into many 230V mains socket types common in the EU.
Comment: There used to be a connector specifically for speakers, found on stereo equipment from the 1960s to 1980s, but manufacturers phased it out in favor of clamp connectors in the late 1980s. See https://en.wikipedia.org/wiki/DIN_connector#Other_designs
Comment: Another problem with 6.3mm jack plugs and banana plugs is the high risk of short-circuiting the amplifier which could well be fatal to the output stage.
Comment: "Din" connectors aren't actually named for Deutsche Industrie-Norm, but for the din they cause once they wear out....
Answer: By using clamps, the end-user can cut the speaker wire to any length without having to terminate it.
Answer: Speakers typically have "clip" or "post" or "banana" connectors. There is a reason not to use more convenient connectors such as RJ45: It is the ability to handle heavy gauge speaker wires in the case of long wire runs.
Heavy gauge wires are not needed for simple one room setups of 10ft wires into 4 or 8 ohm speakers. However, that changes starting at about 25ft runs. That is because high fidelity requires a high "damping factor" and the damping factor is affected by high speaker wire impedance. (Smaller wires or longer runs have higher impedance.)  Damping factor is especially critical for realistic bass sound--in particular percussion instruments such as drums.
So it makes sense for speaker manufactures to not limit their use to 10ft runs, thus they must accommodate heaver wires. Here are the some wire diameter vs. wire length vs. speaker impedance (ohms) information:

10ft runs: use 18 gauge wires into 4 or 8 ohm speakers
25ft runs: use 18 gauge for 8 ohms & 16 gauge for 4 ohms
50ft runs: use 16 gauge for 8 ohms & 12 gauge for 4 ohms
100ft runs: use 12 gauge for 8 ohms & 10 gauge for 4 ohms

Why do speakers use clamp connectors?


Programmatically Install Certificate into Mozilla

Question: Is there a way to programmatically install a certificate into mozilla? We're trying to script everything to eliminate deviations in environment so installing it by hand through mozilla preferences does not work for our needs.
I assume theres a way to do it with certutil, but I am not sure of Mozilla's internals, etc.
Comment: See also near-duplicate http://askubuntu.com/questions/244582/add-certificate-authorities-system-wide-on-firefox which however does not currently provide a lot of added value.
Comment: A better approach may be to use the Selenium driver to accept certificates. http://stackoverflow.com/questions/24507078/how-to-deal-with-certificates-using-selenium
Answer: Here is an alternative way that doesn't override the existing certificates:
[bash fragment for linux systems]
certificateFile="MyCa.cert.pem"
certificateName="MyCA Name"
for certDB in $(find  ~/.mozilla* ~/.thunderbird -name "cert8.db")
do
  certDir=$(dirname ${certDB});
  #log "mozilla certificate" "install '${certificateName}' in ${certDir}"
  certutil -A -n "${certificateName}" -t "TCu,Cuw,Tuw" -i ${certificateFile} -d ${certDir}
done

You may find certutil in the libnss3-tools package (debian/ubuntu).
Source:
http://web.archive.org/web/20150622023251/http://www.computer42.org:80/xwiki-static/exported/DevNotes/xwiki.DevNotes.Firefox.html
See also:
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/tools/NSS_Tools_certutil
Comment: I'm getting the following `Trust flag u is set automatically if the private key is present.` and the certificate is not set in Firefox
Comment: Wanted to thank you for this approach, which worked well for me, can be completely automated, and does not overwrite existing certificates. Should be the accepted answer
Comment: Same problem @Naramsim reported here: "Notice: Trust flag u is set automatically if the private key is present." What I found is that the script is creating cert8.db instead of updating cert9.db. I searched for that, and I found this question: https://stackoverflow.com/questions/58550397/can-t-use-mozilla-s-cert9-db-with-certutil-exe/58917770#58917770 and it worked, it is about addding sql: before the location. I just tried it manually from now, and this works: certutil -A -n "Unnamed CERT" -t "TCu,Cuw,Tuw" -i this-is-not-a-name.pem -d sql:"/home/jdoe/.mozilla/firefox/v89uq1080n.default/"
Comment: Same problem @Naramsim reported here. I found is that the script is automatically creating cert8.db instead of updating cert9.db. I found this solution: stackoverflow.com/questions/58550397/… and it worked, it is about adding 'sql:' before the location. I just tried it manually from now, and this works: 'certutil -A -n "Unnamed CERT" -t "TCu,Cuw,Tuw" -i this-is-not-a-name.pem -d sql:"/home/jdoe/.mozilla/firefox/v89uq1080n.default/"'
You have an update of this script in:
https://stackoverflow.com/questions/1435000/programmatically-install-certificate-into-mozilla/66223301#66223301
Answer: The easiest way is to import the certificate into a sample firefox-profile and then copy the cert8.db to the users you want equip with the certificate.
First import the certificate by hand into the firefox profile of the sample-user. Then copy

/home/${USER}/.mozilla/firefox/${randomalphanum}.default/cert8.db (Linux/Unix)
%userprofile%\Application Data\Mozilla\Firefox\Profiles\%randomalphanum%.default\cert8.db (Windows)

into the users firefox-profiles. That's it. If you want to make sure, that new users get the certificate automatically, copy cert8.db to:

/etc/firefox-3.0/profile (Linux/Unix)
%programfiles%\firefox-installation-folder\defaults\profile (Windows)
Comment: There is no easier way. Firefox works after a clean installation. If certificate database in `cert8.db` is deleted, it is regenerated on next Firefox start. This strongly suggests that there is a system-wide default storage of CA certs.

Firefox's source code [shows](https://github.com/mozilla/gecko-dev/blob/master/security/nss/lib/ckfw/builtins/Makefile#L52) that built-in CA certs are in fact hard-coded into `firefox` executable. They reside in [security/nss/lib/ckfw/builtins/certdata.txt](https://github.com/mozilla/gecko-dev/blob/master/security/nss/lib/ckfw/builtins/certdata.txt)
Comment: Bingo. Now that I know where the cert DB is I can use certutil from there. Thank you.
Comment: For mac, it was located here: /Users/${USER}/Library/Application Support/Firefox/Profiles/hpc6g9rx.default/cert8.db
Answer: Firefox now (since 58) uses a SQLite database cert9.db instead of legacy cert8.db.
I have made a fix to a solution presented here to make it work with new versions of Firefox:
certificateFile="MyCa.cert.pem"
certificateName="MyCA Name"
for certDB in $(find  ~/.mozilla* ~/.thunderbird -name "cert9.db")
do
  certDir=$(dirname ${certDB});
  #log "mozilla certificate" "install '${certificateName}' in ${certDir}"
  certutil -A -n "${certificateName}" -t "TCu,Cuw,Tuw" -i ${certificateFile} -d sql:${certDir}
done

Comment: This really should be the answer -- it's more up-to-date than the cert8.db answer -- but I find that I still can't pre-install a self-signed certificate to be accepted by Firefox. The certificate winds up in the "Authorities" section of the "View Certificates" dialog instead of the "Servers" section, where it is if you manually accept the certificate (using the Advanced -> Accept Risk buttons).
Comment: This should definitely be the accepted answer. Works great with modern versions of Firefox and simplifies an extremely complicated problem. @user4851, it may be a couple years too late but this script adds a certificate authority (CA), not a server certificate. If you add the CA certificate used to generate your self-signed server certificate, then the server certificate will be considered valid by Firefox and does not need to be added to the exception list.
Answer: Just wanted to add to an old thread to hopefully aid other people. I needed programmatically add a cert to the firefox database using a GPO, this was how I did it for Windows
1, First download and unzip the precompiled firefox NSS nss-3.13.5-nspr-4.9.1-compiled-x86.zip
2, Add the cert manually to firefox Options-->Advanced--Certificates-->Authorities-->Import
3, from the downloaded NSS package, run
certutil -L -d c:\users\[username]\appdata\roaming\mozilla\firefox\[profile].default

4, The above query will show you the certificate name and Trust Attributes e.g.
my company Ltd                                CT,C,C

5, Delete the certificate in step 2. Options-->Advanced--Certificates-->Authorities-->Delete
6, Create a powershell script using the information from step 4 as follows. This script will get the users profile path and add the certificate. This only works if the user has one firefox profile (need somehow to retrieve the users firefox folder profile name)
#Script adds Radius Certificate to independent Firefox certificate store since the browser does not use the Windows built in certificate store

#Get Firefox profile cert8.db file from users windows profile path
$ProfilePath = "C:\Users\" + $env:username + "\AppData\Roaming\Mozilla\Firefox\Profiles\"
$ProfilePath = $ProfilePath + (Get-ChildItem $ProfilePath | ForEach-Object { $_.Name }).ToString()

#Update firefox cert8.db file with Radius Certificate
certutil -A -n "UK my company" -t "CT,C,C" -i CertNameToAdd.crt -d $ProfilePath

7, Create GPO as a User Configuration to run the PowerShell script
Hope that helps save someone time
Comment: Thanks. Your solution works correctly for our windows machines. In addition to your answer, certutil can use network paths for certificate file and profile.
Comment: Thank you, the above commands worked by adding the certificates into the cert8.db file. However, am unable to see the list of user certificates imported into firefox browser. Hence, when i access specific link which is looking for user certificate and the brwoser does not have it , it is displaying other error.
Answer: Firefox supports a policies.json file that will be applied to all Firefox profiles on startup.
For (CA) certificate(s) installation, you have some options here (follow the instructions for policies.json).
Here's one example, tested with Linux/Ubuntu where I already have system-wide CA certs in /usr/local/share/ca-certificates:
In /usr/lib/firefox/distribution/policies.json
{
    "policies": {
        "Certificates": {
            "Install": [
                "/usr/local/share/ca-certificates/my-custom-root-ca.crt"
            ]
        }
    }
}

It should work with versions as early as version 64 (December 2018, as per docs linked above).
Support for Thunderbird should be similar.
Comment: This is the correct way to do it these days. So easy... when you know how!
Answer: On Windows 7 with Firefox 10, the cert8.db file is stored at %userprofile%\AppData\Roaming\Mozilla\Firefox\Profiles\########.default\cert8.db. If you are an administrator, you can probably write a simple WMI application to copy the file to the User's respective folder.
Also, a solution that worked for me from http://www.appdeploy.com/messageboards/tm.asp?m=52532&mpage=1&key=&#52532

Copied CERTUTIL.EXE from the NSS zip file ( http://www.mozilla.org/projects/security/pki/nss/tools/ ) to C:\Temp\CertImport (I also placed the certificates I want to import there)
Copied all the dll's from the NSS zip file to C\:Windows\System32
Created a BAT file in %Appdata%\mozilla\firefox\profiles with this script...
Set FFProfdir=%Appdata%\mozilla\firefox\profiles
Set CERTDIR=C:\Temp\CertImport
DIR /A:D /B > "%Temp%\FFProfile.txt"
FOR /F "tokens=*" %%i in (%Temp%\FFProfile.txt) do (
CD /d "%FFProfDir%\%%i"
COPY cert8.db cert8.db.orig /y
For %%x in ("%CertDir%\Cert1.crt") do "%Certdir%\certutil.exe" -A -n "Cert1" -i "%%x" -t "TCu,TCu,TCu" -d .
For %%x in ("%CertDir%\Cert2.crt") do "%Certdir%\certutil.exe" -A -n "Cert2" -i "%%x" -t "TCu,TCu,TCu" -d .
)
DEL /f /q "%Temp%\FFProfile.txt"

Executed the BAT file with good results.
Answer: I was trying to achieve the same thing in Powershell and wrote a script to perform various functions that can be interactively selected. Of course, it's fairly easy to modify the script to automate certain things instead of provide options.
I'm an Infrastructure guy rather than a coder/programmer, so apologies if it's a bit cumbersome (but it does work!!).
Save the following as a PS1:
##################################################################################################
#
# NAME: RegisterFireFoxCertificates.ps1
#
# AUTHOR: Andy Pyne
#
# DATE  : 22.07.2015
#
# COMMENT: To provide options for listing, adding, deleting and purging
# FireFox Certificates using Mozilla's NSS Util CertUtil
# Source: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/tools/NSS_Tools_certutil
#
# NOTE: You need a copy of the NSS Util CertUtil and it's associated dll's
# The specific files I used were:
#
# certutil.exe, fort32.dll, freebl3.dll, libnspr4.dll, libplc4.dll, libplds4.dll, nspr4.dll,
# nss3.dll, nssckbi.dll, nssdbm3.dll, nssutil3.dll, plc4.dll, plds4.dll, smime3.dll,
# softokn3.dll, sqlite3.dll, ssl3.dll, swft32.dll
#
##################################################################################################

##################################################################################################

# Setup a few parameters
$ErrorActionPreference = "Silentlycontinue"
$ExecutionPolicyOriginal = Get-ExecutionPolicy
$FireFoxExecutable = "C:\Program Files (x86)\Mozilla Firefox\Firefox.exe"

# This is the Firefox certificate database
$CertDB = "Cert8.db"

# The Certificate Nickname is a name you want to see on the certificates that you've imported in - so you know they were imported by this process
# However, when you look at the certificates in Firefox, they will be listed under whatever the certificate name was when it was generated
# So if your certificate is listed as 'Company123' when imported, it will still be called that as the Common Name, but when you click to view
# it, you will see that the first item in the Certificate Fields is what you 'nicknamed' it.
$CertificateNickname = "MyCompanyName FF AutoImport Cert"

# The Legacy Certificates are specific/explicit certificates which you wish to delete (The 'purge' option later in the script references these items)
$LegacyCertificates = @("OldCertificate1", "Company Cert XYZ", "Previous Company name", "Unwanted Certificate - 7", "123APTEST123")

# This is the list of databases / Firefox profiles on the machine
$FFDBList = @()

# Making sure our temporary directory is empty
$FFCertLocationLocal = "C:\FFCertTemp"

# The remote location of the certificates and
$FFCertLocationRemote = "\\myUNC\NETLOGON\FireFoxCert\"

# The local CertUtil executable (this is copied from the remote location above)
$FFCertTool = "$FFCertLocationLocal\CertUtil.exe"

# Making sure our temporary directory is empty
Remove-Item $FFCertLocationLocal -Recurse
New-Item -ItemType Directory -Path $FFCertLocationLocal

##################################################################################################

##################################################################################################

Clear

# We're going to get a list of the Firefox processes on the machine that are open and close them
# Otherwise the add/delete parts might not be successful with Firefox still running
$FireFoxRunningProcessesList = Get-Process | Where-Object {$_.Name -Match "FireFox"} | Select-Object ProcessName,Id | Format-Table -AutoSize
$FireFoxRunningProcesses = Get-Process | Where-Object {$_.Name -Match "FireFox"} | Select-Object -ExpandProperty Id
If (!$FireFoxRunningProcesses) {}
Else {
Write-Host "The following processes will be stopped to perform certificate manipulation:"
$FireFoxRunningProcessesList
$TerminateProcessQuestion = Read-Host "To auto-terminate (ungracefully!) processes, press 'Y', otherwise, press any other key"
If ($TerminateProcessQuestion -ne 'y') {
Clear
Write-Host "Cannot continue as Firefox process is still running, ending script ..."
Exit}
Else {ForEach ($FireFoxRunningProcess in $FireFoxRunningProcesses) {
[Int]$FireFoxRunningProcess = [Convert]::ToInt32($FireFoxRunningProcess, 10)
Stop-Process -Id $FireFoxRunningProcess -Force}}
}

##################################################################################################

##################################################################################################

# The remote files (certificates and the NSS Tools CertUtil files are copied locally)
$FFCertificateListItemRemote = Get-ChildItem $FFCertLocationRemote -Recurse -Include *.cer,*.dll,certutil.exe
ForEach ($FFCertificateItemRemote in $FFCertificateListItemRemote) {
Copy-Item $FFCertificateItemRemote.FullName -Destination $FFCertLocationLocal}

# Get a list of the local certificates
$FFCertificateListLocal = Get-ChildItem $FFCertLocationLocal -Recurse -filter *.cer

Clear
Set-ExecutionPolicy "Unrestricted"

# Find all Firefox profiles and create an array called FFDBList
# Of course, you'll only be able to get to the ones your permissions allow
$LocalProfiles = Get-ChildItem "C:\Users" | Select-Object -ExpandProperty FullName
ForEach ($LocalProfile in $LocalProfiles) {
$FFProfile = Get-ChildItem "$LocalProfile\AppData\Roaming\Mozilla\Firefox\Profiles" | Select-Object -ExpandProperty FullName
If (!$FFProfile) {Write-Host "There is no Firefox Profile for $LocalProfile"}
ELSE {$FFDBList += $FFProfile}
}

Clear
Write-Host "#################################"
Write-Host "The List of FireFox Profiles is:"
Write-Host "#################################"
$FFDBList
PAUSE

##################################################################################################

##################################################################################################

# Setup 4x functions (List, Delete, Add and Purge)
#
# - List will simply list certificates from the Firefox profiles
#
# - Delete will delete the certificates the same as the certificates you're going to add back in
#   So for example, if you have 2x certificates copied earlier for import, 'CompanyA' and 'CompanyZ'
#   then you can delete certificates with these names beforehand. This will prevent the
#   certificates you want to import being skipped/duplicated because they already exist
#
# - Add will simply add the list of certificates you've copied locally
#
# - Purge will allow you to delete 'other' certificates that you've manually listed in the
#   variable '$LegacyCertificates' at the top of the script

# Each of the functions perform the same 4x basic steps
#
# 1) Do the following 3x things for each of the Firefox profiles
# 2) Do the 2x following things for each of the certificates
# 3) Generate an expression using parameters based on the certificate nickname specified
#    earlier, and the profile and certificate informaiton
# 4) Invoke the expression

Function ListCertificates {
Write-Host "#############################"
ForEach ($FFDBItem in $FFDBList) {
$FFCertificateListItemFull = $FFCertificateListItem.FullName
Write-Host "Listing Certificates for $FFDBitem"
$ExpressionToListCerts = "$FFCertTool -L -d `"$FFDBItem`""
Invoke-Expression $ExpressionToListCerts
}
PAUSE}

Function DeleteOldCertificates {
Write-Host "#############################"
ForEach ($FFDBItem in $FFDBList) {
ForEach ($FFCertificateListItem in $FFCertificateListLocal) {
$FFCertificateListItemFull = $FFCertificateListItem.FullName
Write-Host "Deleting Cert $FFCertificateListItem for $FFDBitem"
$ExpressionToDeleteCerts = "$FFCertTool -D -n `"$CertificateNickname`" -d `"$FFDBItem`""
Invoke-Expression $ExpressionToDeleteCerts
}}
PAUSE}

Function AddCertificates {
Write-Host "#############################"
ForEach ($FFDBItem in $FFDBList) {
ForEach ($FFCertificateListItem in $FFCertificateListLocal) {
$FFCertificateListItemFull = $FFCertificateListItem.FullName
Write-Host "Adding $FFCertificateListItem Cert for $FFDBitem"
$ExpressionToAddCerts = "$FFCertTool -A -n `"$CertificateNickname`" -t `"CT,C,C`" -d `"$FFDBItem`" -i `"$FFCertificateListItemFull`""
Write-Host $ExpressionToAddCerts
Invoke-Expression $ExpressionToAddCerts
#PAUSE
}}
PAUSE}

Function PurgeLegacyCertificates {
Write-Host "#############################"
ForEach ($FFDBItem in $FFDBList) {
ForEach ($LegacyCertificateItem in $LegacyCertificates) {
$LegacyCertificateItemFull = $LegacyCertificateItem.FullName
Write-Host "Purging Old Certs ($LegacyCertificateItem) for $FFDBitem"
#$ExpressionToDeleteLegacyCerts = "$FFCertTool -D -n `"$OldCertificate`" -d `"$FFDBItem`""
$ExpressionToDeleteLegacyCerts = "$FFCertTool -D -n `"$LegacyCertificateItem`" -d `"$FFDBItem`""
ForEach ($LegacyCertificate in $LegacyCertificates) {
Invoke-Expression $ExpressionToDeleteLegacyCerts}
}}
PAUSE}

##################################################################################################

##################################################################################################

    # Creating a few options to invoke the various functions created above

$CertificateAction = ""

Function CertificateActionSelection {
Do {
Clear
$CertificateAction = Read-Host "Would you like to [L]ist all certificates [D]elete all old certificates, [A]dd new certificates, or [P]urge legacy certificates?"
} Until ($CertificateAction -eq "L" -or $CertificateAction -eq "D" -or $CertificateAction -eq "A" -or $CertificateAction -eq "P" )

If ($CertificateAction -eq "L") {ListCertificates}
If ($CertificateAction -eq "D") {DeleteOldCertificates}
If ($CertificateAction -eq "A") {AddCertificates}
If ($CertificateAction -eq "P") {PurgeLegacyCertificates}
}

Do {
Clear
$MoreCertificateActions = Read-Host "Would you like to [L]aunch Firefox (as $env:USERNAME), take a [C]ertificate action, or [Q]uit?"
If ($MoreCertificateActions -eq "L") {
Invoke-Item $FireFoxExecutable
Exit}
If ($MoreCertificateActions -eq "C") {CertificateActionSelection}

} Until ($MoreCertificateActions -eq "Q")

Remove-Item $FFCertLocationLocal -Recurse
Set-ExecutionPolicy $ExecutionPolicyOriginal

Exit

Answer: I had a similar issue on a client site where the client required a authority certificate to be installed automatically for 2000+ windows users.
I created the following .vbs script to import the certificate into the current logged on users firefox cert store.
The script needs to be put in the directory containing a working copy of certutil.exe (the nss version) but programatically determines the firefox profiles location.
Option Explicit

On error resume next

Const DEBUGGING              = true
const SCRIPT_VERSION        = 0.1
Const EVENTLOG_WARNING      = 2
Const CERTUTIL_EXCUTABLE    = "certutil.exe"
Const ForReading = 1

Dim strCertDirPath, strCertutil, files, slashPosition, dotPosition, strCmd, message
Dim file, filename, filePath, fileExtension

Dim WshShell            : Set WshShell            = WScript.CreateObject("WScript.Shell")
Dim objFilesystem      : Set objFilesystem    = CreateObject("Scripting.FileSystemObject")
Dim certificates        : Set certificates      = CreateObject("Scripting.Dictionary")
Dim objCertDir
Dim UserFirefoxDBDir
Dim UserFirefoxDir
Dim vAPPDATA
Dim objINIFile
Dim strNextLine,Tmppath,intLineFinder, NickName

vAPPDATA = WshShell.ExpandEnvironmentStrings("%APPDATA%")
strCertDirPath    = WshShell.CurrentDirectory
strCertutil      = strCertDirPath & "\" & CERTUTIL_EXCUTABLE
UserFirefoxDir = vAPPDATA & "\Mozilla\Firefox"
NickName = "Websense Proxy Cert"

Set objINIFile = objFilesystem.OpenTextFile( UserFireFoxDir & "\profiles.ini", ForReading)

Do Until objINIFile.AtEndOfStream
    strNextLine = objINIFile.Readline

    intLineFinder = InStr(strNextLine, "Path=")
    If intLineFinder <> 0 Then
        Tmppath = Split(strNextLine,"=")
        UserFirefoxDBDir = UserFirefoxDir & "\" & replace(Tmppath(1),"/","\")

    End If
Loop
objINIFile.Close

'output UserFirefoxDBDir

If objFilesystem.FolderExists(strCertDirPath) And objFilesystem.FileExists(strCertutil) Then
    Set objCertDir = objFilesystem.GetFolder(strCertDirPath)
    Set files = objCertDir.Files

    For each file in files
        slashPosition = InStrRev(file, "\")
        dotPosition  = InStrRev(file, ".")
        fileExtension = Mid(file, dotPosition + 1)
        filename      = Mid(file, slashPosition + 1, dotPosition - slashPosition - 1)

        If LCase(fileExtension) = "cer" Then
            strCmd = chr(34) & strCertutil & chr(34) &" -A -a -n " & chr(34) & NickName & chr(34) & " -i " & chr(34) & file & chr(34) & " -t " & chr(34) & "TCu,TCu,TCu" & chr(34) & " -d " & chr(34) & UserFirefoxDBDir & chr(34)
            'output(strCmd)
            WshShell.Exec(strCmd)
        End If
    Next
    WshShell.LogEvent EVENTLOG_WARNING, "Script: " & WScript.ScriptFullName & " - version:" & SCRIPT_VERSION & vbCrLf & vbCrLf & message
End If

function output(message)
    If DEBUGGING Then
        Wscript.echo message
    End if
End function

Set WshShell  = Nothing
Set objFilesystem = Nothing

Answer: I have an update of this awesome answer (just not working any more with last Firefox updates), in this same thread, made by H.-Dirk Schmitt, also thanks to the answer in this other thread made by BecarioEstrella.
I just adapted the script to recent changes.
Tested in 2021 just in Firefox 85.0.1 (64bit) in Ubuntu 20.04 and 18.04.
#!/usr/bin/env bash

function usage {
  echo "Error: no certificate filename or name supplied."
  echo "Usage: $ ./installcerts.sh <certname>.pem <Cert-DB-Name>"
  exit 1

}

if [ -z "$1" ] || [ -z "$2" ]
  then
    usage
fi

certificate_file="$1"
certificate_name="$2"
for certDB in $(find  ~/.mozilla* ~/.thunderbird -name "cert9.db")
do
  cert_dir=$(dirname ${certDB});
  echo "Mozilla Firefox certificate" "install '${certificate_name}' in ${cert_dir}"
  certutil -A -n "${certificate_name}" -t "TCu,Cuw,Tuw" -i ${certificate_file} -d sql:"${cert_dir}"
done

If you want it just for Firefox, replace the line:
for certDB in $(find  ~/.mozilla* ~/.thunderbird -name "cert9.db")

By
for certDB in $(find  ~/.mozilla* -name "cert9.db")

Further readings:

NSS Shared DB
NSS Shared DB Howto


What is the purpose of the "desktop.ini" file in Windows and how can I keep it from being generated?

Question: It's not a big problem, but I'm comparing a lot of directories and desktop.ini keeps throwing off the total file size and file count. How can I make Windows stop generating it, and what does it do?
Answer: I found the answer:  You can stop auto-generating desktop.ini files by unchecking "Remember each folder's view settings" in the Folder Options/View (or similar) settings.  While this will not allow each folder to have its own unique size, view mode, etc., that's fine with me because I want all my folders to look and behave the same way.
"Hide protected operating system files" may treat the symptoms sometimes, but is not really a solution, because while the Windows OS may know to hide the files, other software (duplicate finding/synchronization, other OS's when this disk is shared) may not.

In Windows 7, this should work:

Open the registry editor (Start → type regedit → hit Enter)
Navigate to the following key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Add a DWORD value UseDesktopIniCache (if it doesn't exist yet), and set its value to 0 (zero)

Source: Nevermore Be Bothered by Desktop.ini
Comment: This option is not there in Windows 8 and Windows 7. Any alternative?
Comment: Ah, this is good to know! I've had two desktop.ini files sitting on my desktop for some time, and never got around to figuring out if they were safe to delete.
Comment: @SaintWacko For the record, the reason you have two is because the "desktop" you see is actually a union combination of your user's "Desktop" folder and the "Desktop" folder belonging to all users. Things placed in the former appear to you only and things placed in the latter appear to every user.
Answer: It keeps the preferences for the layout of that folder. If there is any deviation from the standard layout of a folder, then a desktop.ini is created. You can hide it by selecting the "hide protected operating system files" option in windows explorer.
Comment: It's not litter if it serves a purpose. Most sync or compare software can have exclusions added to avoid certain files. Glad you figured it out.
Comment: I appreciate the answer, but I really wanted to know how to stop generating it in the first place.  I already know how to hide it; I'd rather it not exist to begin with.  I'd rather stop litter than hide it!  In the end I figured it out (see my answer).
Answer: desktop.ini stores information about "special" qualities for folders, such as fancy icons, or displaying the file listings in a different way from default. It's harmless, and really I'd reccomend just subtracting one ;)
Comment: Thanks for the response, but when I'm trying to determine if two directories are the same (to the first order with good accuracy - I know this is not fool-proof), the byte count is a pretty good indicator.  Desktop.ini can mess this up, and I don't want to have to manually check if desktop.ini exists, then if it does, subtract its byte count from the total.
Answer: The desktop.ini file is an actual file, and as such will count as a file, and will take up space on your disk. Your only possible way of avoiding such files from being created is to have very standard folders all accross the board, and if a folder does not deviate at all from the standard, the desktop.ini file may not have to be created. If it shows up in the existing counts, although you have not modified the file's attribute, there is nothing that you can do. However, if your default folder display config is to show all hidden and system files, that may explain why. Try turning this option off in Explorer, and see whether it makes a difference. This also depends on what you use to perform the file count. If you only use the standard Windows Explorer, that's the way of doing it. Otherwise, it depends on what you use to perform the file count.
Answer: In Windows 7, if a folder is set as Read-only it will not store any setting changes, so no desktop.ini file will be created. This is a means of altering the behaviour of a particular folder, without making a system-wide change affecting the entire computer.
Attributes of folders can be changed on the command line:
ATTRIB  +R  C:\DummyPath\FolderName

This change can't be made using Windows Explorer.
In Explorer, if you click "Apply changes to this folder only" the attribute is changed for all the files in the folder, but the attribute is not changed for the folder itself.
If you click "Apply changes to this folder, subfolders, and files" the attribute is changed for all files in the folder and all files in its subfolders, but the attribute is still not changed for the folder itself.


How do I model something that won't be there all the time?

Question: I have a creature model in early production and I plan to make it be able to sprout wings and spikes, but not have them there all the time. How would I go about doing that? Would I have to make a whole separate model for it?
Comment: You could do it all as one piece, or as two separate pieces - whatever works best for you. Personally, I would probably do something like that as 2 pieces, because I could make the wings separately, and have them "grow" on demand, whether by using a particle system or maybe a _Build Modifier_.. Also, keeping the pieces separate allows you to more easily "tweak" one without worrying about altering the other. Remember - this is just one user's opinion, though.
Answer: You could model the wings/spikes at full size, keyframe the scale at your end keyframe, then scale them down until they're so small that they're not noticeable and keyframe the scale at the beginning keyframe.  Then, the objects would appear to grow over time.  Just keep an eye on the point that they're being scaled about so they don't end up accidentally shifting to somewhere you don't want them.
As for modeling them all as one object or separate, it seems like modeling them all as part of the creature would make it easier to rig and animate.  The only issue I could see is if you scaled the wings and spikes by different amounts.  I haven't tried it so that may not be a problem but I would think that, as long as you scale the wings and spikes down by the same amount, it should work fine.  I have modeled different components as part of the same object by assigning them to different vertex groups, that makes it easier to select individual components.


Take 1 seamless textured plane, and make a large square out of multiple of that 1 texture

Question: I have a single, small seamless textured plane, and I want to make a large plane out of multiple of that texture. The array function is basically what I want to do, but it only goes in 1 direction which isnt ideal, and time consuming. Any help would be nice
Answer: You can use two Array Modifiers. One for direction X and one for direction Y. The setup would look something like the following. Note how the values in the green boxes are different. This allows for the object (plane) to be arrayed in multiple directions. Just remember that Array Modifiers utilize local coordinates and you can negatize (did I just invent a word there?) values to have the object array in the opposite direction.

How this modifier stack would look when applied to a cylinder (for clarity, because cylinders are easier to differentiate than planes):

As a last note, you can use a Vector > Mapping node to tile textures on a single plane. See David's answer on How to Make a image repeat in cycles.
Comment: @bexben If my answer helped you, please consider accepting it. It would help me greatly, and make me very happy!
Answer: Another alternative if I understand correctly what you want to do, without modifiers, is to bake your texture and apply it to a single large plane. Once your texture is baked, you will have the ability to add any amount of repetition you want just as an image texture. This is a simple example (in cycles, I don't know which engine you're using), using a small texture and a mapping node, it is repeated freely across a plane of any given size. This is the node setup and result:

If you are unfamiliar with texture baking, the manual has more information here and here for cycles specifically.
Comment: @ShadyPuck the fact that array was mentioned doesn't make that necessary to use. More than that, the question is about achieving arraying *texture* which can be obtained not only with one way and nearly any problem can have multiple solutions. It's very good to investigate questions and possible solutions from larger point of view.
Comment: This doesn't answer the op's question.
Comment: @ShadyPuck  the question asked 'how to make a large plane out of *multiple* of a texture'. The simplest way is bake the texture, scale the plane, and manipulate the texture coordinates to get the results desired. It is not necessary to use a modifier to do that.
Comment: Perhaps, but _array_ was mentioned.


MikTeX asking to install package, but failing to do so

Question: I am having problems with my new MikTeX setup on windows 10. Note before starting that the install is completely fresh.
Further, I want to note that MikTeX is set to ask for permission to install missing packages.
Now, to the core of the problem.
Whenever I try to compile my document, I will get the following message:
<code>[Compiling C:\Users\[...]\Documents\[...]\Tex Files\main.tex]

    TraditionalBuilder: Engine: pdflatex. Invoking texify...
</code>
A few seconds later, MikTeX will ask for permission to install the missing packages, which it is set to get from a random package repo.
After agreeing to it, the window will close and, after a few more seconds, I get the following error message.
<code>Errors:

C:\Program Files\MikTeX\tex\latex\lipsum\lipsum.sty:28: LaTeX Error: File `expl3.sty' not found. [\RequirePackage{expl3}[2018/10/31]]
</code>
Afterwards, I would go into MikTeX Console and try to install the package manually, which would work without fail (note that I did this multiple times, for multiple packages). The error occurs whether it is allowed to install on the fly or is supposed to ask beforehand. Also, I never had a problem with a server not being available and my internet connection works perfectly.
I don't know where MikTeX is supposed to be installed by default, but I installed it in the Program Files folder, so maybe it is a permissions problem, however I did not manage to figure out how to solve it if it were.
Thanks in advance for your help,
EDIT: I created a local repository to exclude the possibility of a connectivity issue, and indeed, the connectivity is not the problem.
Comment: which editor do you use?
Comment: I use sublime text.
Comment: Look in the package manager for some package you don't have, create a document and compile on the command line to check if on-the-fly works there.
Answer: Re-install MiKTeX and don't update. Worked like a charm for me.
Comment: So, what did it in the end for me was restarting my editor (sublime text) in administrator mode. Then and only then does MikTeX manage to download packages on the fly.


Spell check settings

Question: Right now i am using Microsoft PowerPoint 2011 (on my macbook pro). I am doing a project on Hispania (an old Roman province) which today is currently Spain. My spell check has switched languages to spanish (for this reason i think). However I need it to be in English because my project is not in Spanish. When i go to Tools>Language... and set it to english it ignores my change in the settings and continues to check in Spanish. Can someone please help me change my settings. Thank you
Answer: Just to eliminate the possible culprits and short of reinstalling the Office. Please check in you PowerPoint in the Tools > Dictionary ... what language is indicated. If it's Spanish there try to set it to English and see if that helps. Probably after setting this you would better close entirely PowerPoint and then open it again.
Comment: Also check when you select some text and look into Tools > Language ... what language is there. If your language settings are English (USA) then try set it as a default for entire document.
Comment: I did so, but the Spanish problem was persistent. Something to note tho is that i think it was doing it for maybe 2 or 3 slides out of the entire PowerPoint instead of the whole thing.
Answer: On those slides where spell check is working in Spanish, select the text on those slides, then do the Tools » Language » English procedure you described above. Language is formatting applied to specific text. You can mix languages sentence by sentence (or even word by word) and if it is appropriately marked, spell check will follow.
Comment: This is one of my biggest annoyances of MS products. There is no easy wat to know which text is formatted in which language. Unfortunately, this is the only correct answer.
Answer: If you are just annoyed by the feature, you can disable it in Preferences -> Spelling by unchecking the box for Check spelling as you type:

You can re-enable it after you're done working with this document.
If you need to keep English spell check, double-check your system language setting in System Preferences -> Language & Text -> Language.  I doubt this has changed without you noticing, but there's an off chance PowerPoint may be taking its cue from this setting.
I've always had issues with multiple languages in Microsoft Office, so during installation, I disable all languages except for English.  This would be a surefire solution if you don't need the extra languages, but it would require you to uninstall and reinstall Office.
Finally, I would strongly encourage you to look into Keynote ($20 through the App Store) as an alternative to PowerPoint.  There would be a bit of a learning curve while you get used to it, but it's quite powerful, the interface is sleek, it runs perfectly, and I find that it's easier to make things "look nice" in Keynote than in PowerPoint.  Most U.S. university classrooms will have a video hookup that you can use to run your presentation from a Mac laptop, but if it's not an option for you to run your presentations from your Mac, it can export PowerPoint-compatible files pretty well.
You're not struggling with a Microsoft operating system, so why struggle with Microsoft software?
Comment: Well that didnt fix the problem. However thanks for the advice, ill look into Keynote. I've herd of it before i just havnt bought it. And i didnt have to pay for my Microsoft office (word, powerpoint, excel, etc.) and it is helpful to get everything in one package. I also dont really need anything fancy. If i needed something really sleek i would use Quartz Composer instead. Thank you tho
Comment: @luca590 Disabling spell-check didn't work?  Or reinstalling Office didn't work?  Or did you not want to try either of those?
Comment: well disabling spell check works in the since that its not telling me im making spelling mistakes, but i do need it to... just not in Spanish, and im not going to try reinstalling Office because PowerPoint is the only one ive had trouble with and i do not want to cancel all of my work and then wait to continue. I dont think its worth reinstalling
Comment: Funky screenshot you made.
Answer: Simplest answer / your language tool has defaulted to a language you do not want it to be.  So...

Go into TOOLS menu,
Select Language..., You will see your list where
you have all the standards including Basque, Catalan and Spanish
(Castellano) etc.
Make your choice and select default.

You have now changed your function of spelling for all documents.
Use this facility to check specific text by first selecting your text and then select the language just don't select default.  This way you can check just a word, a sentence or a whole document easily as advise by a couple of the posts above.

Spell check settings


How to force NSURLCache to cache response even if it still has a valid cache?

Question: I'm using NSURLCache (AFNetworking) to cache responses from my backend, setting Cache-Control = max-age=3600, public. This is working fine so far. When the user opens the app and the data is not older than one hour, it obtains it from the cache. When older, it loads it from the backend.
I also have a pull to refresh option that allows the user to get fresh data from the backend by overriding the cache even though it still has valid cached data, what also works fine.
The problem I have is, that the newly retrieved data (by overriding the cache) doesn't get cached. Scenario is like this:

User opens the app and data with timestamp x is being loaded from the backend with Cache-Control = max-age=3600, public
User studies the data for 10 minutes.
User now does a manual refresh of the data and new data with timestamp y is being pulled from the backend with Cache-Control = max-age=3600, public
User studies the new data for another 10 minutes and closes the app.
User opens the app again, but sees data with timestamp x instead of data with timestamp y

It seems to me that NSURLCache just doesn't cache data from the same resource as long as it has valid cached data, even though fresh data from the same resource came in in the meantime. Does anyone know how to tell NSURLCache to cache the most recent retrieved data even if it still has valid data? Or is it just working as designed? Any help is highly appreciated.
Answer: You did not write what code did you use for the manual refresh. I guess you have used NSURLRequestReloadIgnoringCacheData policy. I have not tested if stores the updated response in the cache. However if it does not store it, I would use
removeCachedResponseForRequest: on shared NSURLCache and then load the data as usual.


At what point in a logistic regression does a predictor become significant in predicting outcome?

Question: Say we have a logistic regression with outcome  equal to a women's pregnancy resulting in a birth =1 and loss=0. The predictor variable is age ranging from 22-50, the Odds ratio point estimate is .819 with CI (.782 - .858). How can we figure out the age in which this result become significant? I.e if this is interpreted as a  1 unit increase in age with a decreases in the chances of live birth vs pregnancy loss of 18%. However, this result is very unlikely if say a women ages from 22 to 23, so at what point in age does this result produce a significant outcome?
Answer: Younger subjects are more fertile, and this is reflected in the in that point estimate of $\small \text{OR} = 0.819$ which corresponds to the odds ratio:
$$\begin{align}\text{OR} &=\frac{  \text{odds(live birth})_{\text{age a +1}}}{\text{odds(live birth})_{\text{age a}}}=\frac{\left(\frac{\Pr(\text{live})}{\Pr(\text{loss})}\right)_{\text{age a + 1}}}{\left(\frac{\Pr(\text{live})}{\Pr(\text{loss})}\right)_{\text{age a}}}\\[2 ex]
\text{OR} &= e^{\beta_{\text{age}}\times 1} = 0.819
\end{align}$$
As the age advances the odds ratio decreases, so that a difference in age of $\Delta_{\text{age}}$ will result in a change in the odds ratio of pregnancy of
$$0.819^{\Delta_{\text{age}}} = \left(e^{\beta_{\text{age}}}\right)^{\Delta_{\text{age}}}$$
In other words, we are exponentiating a value $<1$, and, hence, the relative odds keep on getting smaller and smaller. On the other hand, the odds of a live delivery would increase with time if the $\small \text{OR}>1.$
Comment: @Bjorn Yes! I didn't touch on that because it seemed as though mulling through the definitions could make it apparent that the idea of a threshold simply doesn't apply... We'd quickly get into ROCs and cut-off points, which may have more contextual interest when trying to determine, say, normal levels of cholesterol in blood.
Comment: Additionally, to more directly answe the quesiton: if you assume it's a linear function does not really match up with a question of whether there's a certain threshold age where there is a change (a linear function is linearly increasing throughout the whole data range - not that we necessarily believe this to be true). The OP could try splines to visualize things.
Comment: I calculated optimal cut off points using the J statistic....however I agree this question kind of asks whether there is a cutt off point when there really shouldn't be one when its a linear function?
Comment: @usεr11852 Thank you very much! It's been an amazing learning experience. I plan on shifting to doing more reading and less writing. I wish you, on the other hand, did more writing - your posts are awesome!
Comment: I don't know if it was an amazing experience for you but it was an obvious one for an outside observer like me. The quality of your posts is getting better and better. (Thanks for the compliment! It is all part of my grand plan to become a one-man-Stats-army when I retire!)


How can I make a wall surface tolerant of high-bond adhesive tape?

Question: When one remove acrylic (high bond) double sided tape from wall, it often damages the wall. Surface material is peeled off, usually drywall and plaster, and sometimes paint.
When one build a new house, how do one make a wall surface strong enough against tape? Is there any newly invented but rarely known drywall material or paint for this problem? Thank you
Comment: This really seems to be falling into the category of "product recommendation", which is explicitly off-topic. You may consider looking at a 3M product called "command strips" for attaching things to drywall without removing the paint when you're done.
Comment: Thank you for your suggestion. I tried 3M command strips before, It doesn't work well. It only works on glass and flat ceramics tile 100%. On drywall or plaster it is only 50% for the surface is not 100% flat. And, the largest command strip is 2 kg, so it drops to 1kg. I am trying to use some strong acrylics-based wall anchor which can hold more than 10 kgs.
Comment: BTW, I use a large wall anchor with three command strips. It still tears apart paint. Strips and anchor is strong enough, but in this case paint isn't.
Answer: Since no one answers, maybe I can provide some options to make a start. A thick plastic wall paper may have a chance to solve the problem. The thing is that when moving a double side tape wall anchor, one needs a hair dryer to heat it up. It is a risk to damage wall paper. Also some decoration board on wall also can solve the problem. Ceramic or stone tiles too can perfectly solve the problem. Just ceramic tiles are usually used at bathroom so using it at living room is wired. Stone tiles will be expansive. I wonder if there is any new chemical or enhanced plaster available? Some epoxy plaster is really strong, but it is design to fix small part of a wall and to expensive and to fast dry to paint on wall. I am focused on finding an suitable material with available price.
Comment: You may as well give yourself a check-mark for this one because it's unlikely that you're going to get an answer other than something you come up with. As noted above, this really is a shopping-recommendation question...


OpenCV on IOS haar cascade xml file path issues from C++

Question: So I have my code in C++ and I am able to run it fine on linux/OSX/Android.  The problem now is ios.  I am simply trying to load the haar cascade xml files via full path "/foo/blah/myapp.app/haar.xml" and having one heck of a time.
C++ can't confirm the file exists nor can opencv load it.  I am new to ios and am aware that the myapp.app could be a compressed dir like the android .apk dir.
I have confirmed that I'm looking in the right place....or at least I hope I have! to check i use getcwd in c++ to get running directory and I confirm that with the file path to the xml file.  It looks legit!
What can I do?  The nice part about using C++ for the lib is that I can use one code base for desktop/android/ios.  I really don't want to have to mix in Objective-C into my lib just for file paths.
Thanks in advance!
The code I'm using is the following:
    std::ifstream fexists(face_haar_path.c_str());
    if(!fexists.good()) {
        std::cout << "Could not find any facehaar.xml" << std::endl;
        return NO_FACE_HAAR_FILE;
    }

    face_haar.load(face_haar_path); //cv::CascadeClassifier face_haar

Answer: Adding reference to file location in iOS apps is quite different. First add the .xml files to your Xcode project and use the following lines of code for loading the haar-cascade. Please note that  should not contain the extension .xml (Example: For face_frontal.xml file, your cascade name should be face_frontal)
NSString *faceCascadePath = [[NSBundle mainBundle]
                             pathForResource:@"<your_cascade_name>"
                             ofType:@"xml"];
const CFIndex CASCADE_NAME_LEN = 2048;
char *CASCADE_NAME = (char *) malloc(CASCADE_NAME_LEN);
CFStringGetFileSystemRepresentation( (CFStringRef)faceCascadePath,
                                    CASCADE_NAME,
                                    CASCADE_NAME_LEN);
if(!face_cascade.load(CASCADE_NAME)) {
    cout << "Unable to load the face detector!!!!" << endl;
    exit(-1);
}


Any fields that are enabled, disabled or prepopulated should do so without having the page post back. What does this post back means?

Question: Any fields that are enabled, disabled or pre-populated should do so without having the page post back. What does this post back means?
Answer: postback (note it is one word) is a term used by ASP and JSF to describe a form which post to the same URL. It is Microsoft's way to pretend that variables on a web page can interact with each other like in event-driven desktop application, but I found it confusing because I know what really happens.
SO has great explanation.
For you it means that all widgets on the page should be enabled etc when page is first loaded, before clicking on submit button.
Comment: Peter a precise example compared with my generic view.  Tx for posting that.  I think it illustrates well why design is so important as opposed to throwing objects on to web pages.  But I mustn't get started on my pet grumbles.
Answer: Online tranaction systems in general react to user demand.  When the user requests something the request can either be satisfied by the users client device or by that device sending a request (a GET or POST normally) to the centralised servers.
A request to the servers will require activity on the network (to get the request to and the answer from the servers), plus time on the servers (in your example a trivial update).
So I imagine you are being asked in general not to initiate a server request for tivial changes.
If this relates to your organisations development standards then you must do your best to adhere to those standards.  But be aware there will be times when trivial updates best serve the users needs or enhance security.  So there is not a hard and fast rule for all.
Hope that helps and that I've understood your point but if not do get back and we'll do our best.


Select elements of a Matrix that are the same (or have certain relationship) and return their position and the element itself

Question: I have a matrix and I want to pick the elements that are the same and return their positions and their values. It seems easy to me, but all I know is how to pick elements that satisfy certain conditions, but not in relation to other elements.
Answer: Union @@ list finds all distinct elements in the matrix. Then we pass each element to Position which will tell us where a certain element exists. The result is a new list of this format: {{value, {positions}},...}.
list = RandomInteger[5, {10, 10}];
{#, Position[list, #]} & /@ Union @@ list

(@@ is short for Apply and /@ for Map, do ask if you have questions. Also you say that you are new to Slot, which I use (it's the same as #). {#,func[#]} & is just a function, where the first argument is #. So what func[#] & /@ {1,2,3} amounts to for example is {func[1], func[2], func[3]}.)
Comment: This solution will need to traverse the complete matrix once for every distinct element, thus it will have worse complexity than pairing up elements with pre-generated positions.  This one will run in time proportional to $n\times u$ where $u$ is the number of unique elements and $n$ is the total number of elements.  The GatherBy approach will run in $n \log u$ time.
Comment: I agree that it's always good to show the most straightforward solution! (+1).  The code you show in the comment still has running time proportional to the number of distinct elements ($u$) because it needs to perform an operation for each element of `Union@@list`.  Having twice as many unique elements will make it twice as slow.  `GatherBy` will go through the list of all elements, and for each one it needs to decide whether it has seen it before or not.  For this it can use a more efficient method than just looping through all already seen elements (e.g. it could use binary search).
Comment: @Szabolcs True, but it's very straightforward. Thanks for the comment though, it's important/useful information.
Comment: @Szabolcs Regarding the statement that any `Position`-based solution must have poor complexity, I think that if one writes it like this it might have the same complexity, even if it's slower: `Position[ReleaseHold@Thread[# - #2 &[Hold[list], Union @@ list]], 0]`
Comment: That said, the fastest solution is not always the best solution.  I usually start with the simplest code I can come up with and I only bother with performance if needed.  I don't like to sacrifice simplicity and readability if I'm not forced to ...
Answer: The key function is GatherBy.  There are several ways to do it using this function.  Here's one:
mat = RandomInteger[10, {5, 5}]

positions = Tuples[Range /@ Dimensions[mat]]

elements = Flatten[mat]

result = GatherBy[Transpose[{elements, positions}], First]

You'll get sublists of items of the form {element, position}.  You can use Part and All to extract what you need.

If performance is key, use this variation on the same approach:
elements = Flatten[mat];
positions = Tuples[Range /@ Dimensions[mat]];
positionClasses = GatherBy[positions, elements[[#]] &];

Now the $i^\text{th}$ element of positionClasses will correspond to the $i^\text{th}$ element of DeleteDuplicates@Flatten[mat].  This will be very fast, and possibly the fastest way unless you're willing to write lengthy and complex code.
This approach is limited by GatherBy and will run in time proportional to $n \log u$ where $n$ is the number of total elements in the matrix and $u$ is the number of distinct elements.  If you have lots of distinct elements, this will be much faster than any Position-based approach.
Comment: Thank you all. My matrix is 1594X1594 .
@Szabolcs :  strangely my mathematica had trouble performing your second solution ( kernel stopped responding for a while ! ) but your first solution was quite fast.

 On the other hand I would like to this job with a limited accuracy, meaning I need to collect matrix elements that are for example 10^-5 or smaller apart ... your solutions must work if I can apply certain function that represents this criterion but I don't know how !
Comment: @Bahman If you can only rely on direct comparisons between elements, then neither of our solutions will work.  However, if you can come up with a function that can be used to group the elements into equivalence classes, then you can use this approach.  For example, you could `Round` every element to 0.0001 in `GatherBy`: `GatherBy[positions, Round[elements[[#]], 0.0001] &]`.  This is *not* the same as grouping together all those that are close!  But in certain situations it is a good alternative.
Comment: @Bahman If you need to rely on pairwise comparisons, your program will be much slower (but this won't matter if the matrix is not very big).  In that case use the second argument of `Gather` (not `GatherBy`) to specify the comparison.
Comment: Thank you. I think Round works perfectly here for me.
Comment: @Bahman The problem with Round is this: suppose you have a cluster of values that all lie between 1.45 and 1.55.  They're close to each other, all within 0.1.  If you now round to multiples of 1, you'll get two clusters instead of one: those greater than 1.5 and those smaller than 1.5.  This might not be desirable ...


Full ionization meaning

Question: I'm confused as to what full ionization mean? I have the mean molecular weight of electrons and ions and I have to calculate the ideal gas pressure for a star. Do I have to add them up as usual or do I use only the mean molecular weight of ions?
Comment: The proton mass is about 2000 times the electron mass, so it might be reasonable to neglect the electrons entirely. Depends on the accuracy of your calculation.
Answer: Full ionization means that the electrons are no longer bound to the nuclei: the electrons and the nuclei behave as independent particles. I think this means you can treat them as a gas - the same way that you would treat a mixture of gases.

Full ionization meaning


How to connect a Raspberry Pi to an RCA based display with sound?

Question: I have a Raspberry Pi 3 and a display that has only RCA as inputs. Please help me connecting the Raspberry Pi to the display so that I get both sound and visual.
Answer:
a display that has only RCA as output

I presume you mean 3 female inputs, 2 for audio and one for composite video, which in North America are generally red, white, and yellow.
The 3.5mm jack on the Pi 3 can be connected to this as it includes a composite video line.  Jacks like that can be used with a normal 2 channel audio only cable, or a 3 channel one such as that shown below (the two ends are from the same cable).

Notice the three bands on the 3.5mm jack, one more than a standard stereo plug (these are actually separators as I believe in both cases there is an additional pole for ground, which is the sheath on the RCA end).  These are commonly available at electronic stores or online (search for a "3.5mm to RCA video cable").
Beware as mentioned here (thanks Milliways) some of these cables are intended for camcorders and have one of the rings on the 3.5mm jack swapped; those will not work.  So don't get a cable that is intended for use with camcorders!
Comment: I am far from clear that this is what the OP is asking. There are 4 connections, and most of the commonly available cables are unsuitable. See http://www.raspberrypi-spy.co.uk/2014/07/raspberry-pi-model-b-3-5mm-audiovideo-jack/
Comment: @Milliways Yes, as I point out in the last paragraph the visible rings (sometimes black) are *separators* and there are actually 3 channels on a normal 3.5mm jack, one for ground, hence *4* for video, **exactly as described in the link you provided, and the cable shown there is exactly the same as the one shown here.**  There is another form of video using RCA connectors that is 3 channels for video (instead of one) and 2 for stereo, but this is much less common (and I suppose not compatible with the pi).
Comment: I will edit in the bit about the camcorder cables, but I would presume those are the exception and not the rule.
Answer: To be sure, you can get a cable from Adafruit to ensure that the cable is for RCA display product (versus RCA output product).
Answer: I am running a raspi B+ running retropi for a retro game station in my mancave and I have a dinosaur TV that only has RCA. I ordered a cable from Adafruit and it works like a charm. Cheapest and best one out there: https://www.adafruit.com/product/2881
All you do is plug it into the audio jack on the raspi and then into your RCA and you're set!
It's a great alternative to HDMI to RCA converters. Much less hassle.
Good luck!


How do I create this icon/pattern in the circle?

Question: I am fairly new at using Adobe Illustrator. I am trying to recreate this pattern in the circle but have no luck in finding answers to make it. I've already created the circle and the star except for that pattern. If anyone could help in explaining how to create the pattern circled in the picture AND explain how to change the color of the pattern, that would be great! Thank you.
Comment: Hi. Welcome to GDSE. This is really a very basic question. What I suggest you do is have a look at some tutorials showing how to use the Pen Tool to draw custom shapes. There are plenty on youtube.
Answer: The pattern doesn't look especially regular, so it can well be drawn with the Pen as already said by others. The small size makes exact observations impossible. I guess you have a higher resolution version. With it you can simply make manual tracing which means manually drawing over with the pen the same shapes keeping the original as the reference. Remember to lock the original.
If you are a beginner you surely need hours of practicing before the Pen starts to produce the wanted Bezier curves with acceptable accuracy. In addition you must learn how to edit nodes and handles with the direct selection tool + remove & add nodes (=anchors in Illustrator's menus and manuals)
If you can accept something resembling which is more regular (=simpler) you can do it without the pen. But still a good amount of Illustrator knowledge is a must.

Draw a square (=rectangle holding Shift)
Apply Object > Transform Rotate > 45 degrees.
Apply Object > Path > Add Anchor points to get midpoint anchors. A rectangle originally has only 4.

In this phase at last is useful to select all and apply Object > Transform > Reset bounding box  to straighten the bounding box which is rotated after step 2.
The Direct selection tool (=white arrow) can be used  to select anchors and move them.
Make a copy (=drag holding Alt-key) and make a stretched version:

The 3 rightmost anchors are selected and moved to right with the direct selection tool. Holding Shift key forces the movement horizontal (or vertical or 45 degrees depending on which is nearest). The green line is a smart guide which pops visible automatically to show horizontal and vertical sameness.
It's a good idea to keep View > Smart guides and Snap to point ON for exact placements. Other snaps are generally harmful if they are not needed, so let them be OFF
The next cartoon shows more steps:

The original square and the stretched copy.
Make a flipped copy of the stretched shape. Apply Object > Transform > Reflect > Vertical > Copy. The red square is drawn to be used as temporary measurement stick. The blue copies of it show how it's used to place the items. NOTE: If you deselect all, then select a shape and drag its one anchor with the direct selection tool the others follow and the dragged anchor snaps exactly if you have snap to point ON.
Draw a line (=red) on the edge of the shape drag it longer under the mid square. Hold the shift key when you drag with the black arrow a corner. You keep the proportions and directions by holding the shift key when you make something bigger or smaller. Drag the mid square bigger so that the corner hits the red line. Hold Alt+Shift to keep the midpoint intact.
Select all and apply Object > Envelope Distortion > Make with Warp > Arc to get a curved version. The percentage is "how many percents the arc should be of 180 degrees"

Everyone do not love calculations. Fortunately there's other ways to bend shapes. One is to use the shape as a brush:

If you drag a shape to the Brushes collection you can define the shape to be an Art Brush or Pattern Brush or Scatter Brush. I selected "Pattern Brush" and "Add space to fit". In the image you see 2 black curves and the result when I applied my new pattern Brush to them. The shape was colored to blue before dragging it to the Brushes.
Learn from user's Guide the details of the brush versions.


Were exchanged prisoners from Elmira taken to a single or multiple exchange points?

Question: Were exchanged prisoners from Elmira taken to a single or multiple exchange points?
My gg-grandfather died en-route after being exchanged in February, 1865. Would he have been in route to City Point or some other destination?
Answer: It seems you are correct with your suggestion of City Point, Virginia as being the goal. The story of the the February exchanges is told in the book Elmira: Death Camp of the North
By Michael Horigan, starting at page 169(emphasis mine):

Colonel Tracy's suggestion of using the Erie Railroad was rejected,
and the first 500 Confederates, after taking the oath of allegiance,
marched out of Barracks No. 3 on February 13 at 4:30 in the afternoon.
Their destination was the railway depot and a Northern Central
Railroad train that would take them to Baltimore and then by boat to
Point Lookout, Maryland, and finally to City Point Virginia.

According to the same source 3042 prisoners were transferred out of Elmira during the months of February and March. (The book also says the next 500 went via the Northern Central route as well, and gives no indication of any alternative routes, so we can assume the rest followed the same route.)

Another source, The Business of Captivity: Elmira and Its Civil War Prison
By Michael P. Gray, gives much the same account, but does include some information on pg. 70 concerning casualties which occurred on the first leg of this journey, which might be of interest to you:

At 5:00 P.M., February 13, guards put the first five hundred prisoners
on a train of the Northern Central railway under the charge of Lt.
Col. Frederick E. Trotter, 1st Veterans Reserve Corps. Two days later,
at 10:00 A.M., the prisoners arrived at Baltimore's Bolton Station.
Three men had died on the way and nineteen others counted incapable of
traveling further were sent to local hospitals.

If your ancestor died during this prisoner exchange, he may have been one of these three individuals that passed on this train.
Comment: There's no guarantee that more prisoners didn't die  after Baltimore. After all, the notorious [Point Lookout](https://www.mycivilwar.com/pow/md-point-lookout.html) prison is on that itinerary!
Comment: Oh, definitely. I was just offering some information I *did* find, which *if* it matches with the OPs family history may offer some insight for him.  A lot of the published info is focusing on the casualties within the prison itself, and the earlier (October) attempt to move prisoners which also resulted in casualties...


Why are my Technic blue pins breaking?

Question: These connectors are cracking very easily:
Comment: Actually I'd call that a Tehnic pin, as does BrickLink.  https://www.bricklink.com/v2/catalog/catalogitem.page?P=32556#T=C
Answer: This happens if the parts are under a lot of strain, usually as a result of unevenly distributed weights or improper gear assemblies.
Also make sure that the parts are being handled gently and teeth aren't being used to remove them. Since these can sometimes be hard to remove, students (especially younger ones) often try to use their teeth to grip them while pulling them out. This will almost always lead to the pegs breaking down.

Why are my Technic blue pins breaking?