What do I need to do in order to enable remote HTTPS management of a SonicWall NSA3500

Question: I am trying to make a few changes on a firewall by connecting remotely to a desktop at work. I need to do a change that I think may reset and change the LAN interface.... I am worried about being kicked out and having to travel to work to reset it.
The wan interface doesn't need any change, so, I want to try to enable remote management from my IP, but, I am not having any luck.
In Network > Interfaces, the HTTP and HTTPS box is checked for WAN...

...and also when I go to Firewall > Access Rules > Wan/Wan I see an automatically created rulle for HTTP (and) HTTPS Management

Now, to diagnose, I had a constant running ping... When I either disabled ping under interfaces, or, changed the source away from any under firewall, the ping stopped.... so I am sure that this is where I need to make the change... However, I just can't seem to connect via SSH/HTTP/HTTPS...
All I can think of is that the WAN port is not a trusted interface, but, surely by enabling management, I overwrite that setting? ... Is there something hidden somewhere I need to do to enable remote management?
Comment: Hmm, I don't have 150 reputation, so, I can't create tags :( management is the only one I can think of that already exists
Comment: Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
Answer: William,
If you have enabled HTTPS on the interface and still have the default allow any firewall rule for the HTTPS management service then remote management should be configured.
If you have enabled the SSLVPN you will probably have changed the management port to something else... generally 8443 but you can check this in the System -> Administration menu. you should see the port setting in the HTTPS administration port setting.
If its not working then check that you are trying to connect to the correct IP address. you need to connect to the interface IP address.
Also check the logs of the firewall after trying to login. If its being denied it should tell you and hopefully give a useful reason why. if you still have problems please port the logs and I will have a look.
Comment: SSL VPN is disabled (and configured to port 4433) :( I do have a NAT rule for HTTP, but, nothing for HTTPS... And it is the correct IP... This has stumped and is annoying me :( I think I may quickly try to bounce the box.... Thanks for trying, but, I don't suppose you have any other hints? (FYI, Logs don't show anything... I'm just not getting anything when trying to connect).
Comment: OK can you try and add a NAT rule for HTTPS. Go to your NAT polices and select the "default policies" radio button. There should be an auto generated NAT rule that you CANNOT delete so it should be there. if its not, try to add it. Copy the rule thats in use for http.
Comment: Also have you tested the http or SSH management to see if they do work? I wouldnt recommend using http but just see if you can get the login page.
Comment: Ping is the only one that works... I can't log in via SSH remotely and SNMP isn't configured... Since restarting the box, I am now seeing "TCP connection Dropped" in log when going to HTTP and Web Access Request Dropped when going to https... Going to investigate quickly.
Comment: Hmm... I reset statistics and hovering over the allow WAN > WAN https rule shows that it goes up whenever I refresh the page, but, nothing comes through and I see the connection drop in the log :( Any hints!? This has really confused me.
Comment: Whats the current status of the NAT for HTTPS management and is there any hits against it? what events are you seeing in the logs?
Comment: let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/8954/discussion-between-gerryegan-and-william-hilsum)
Comment: Thanks so much for your help... Got it working now, see my answer for info.
Comment: Much appreciated for the update!
Answer: Finally sorted - Changed the WAN IP/subnet.
Detailed answer for the people who are interested or want to know...
The problem lies in the fact that my ISP uses a /31 subnet. When we first set up the Sonicwall, it did not allow us to apply this ip as a static ip as it came up with a configuration error.
I brought this to the attention of SonicWall/Dell and after fighting with them for so long that I was not trying to apply a broadcast IP/network IP to the interface and showed them RFC 3021, they finally gave in that the firewall does not support it.
Anyway, that was almost (if not longer than) a year ago and we managed to do a workaround in that it applied the /31 fine via DHCP... and, everything worked great - until I wanted to do remote management!
GerryEgan was very helpful, but, after he finished trying to help, I noticed that my computer was transmitting to the SonicWall but not recieving anything back - however the statistics on the Sonicwall for TX on the HTTPS rule were going up and RX remained still.
I just had an idea that maybe this /31 subnet goes much deeper in the firewall and after changing the subnet from /31 to /30, I confirmed everything worked fine - so confirmed that the issue is due to SonicWall not supporting /31 subnets - even if it successfully applies via DHCP.


What is "root" and how can I become it?

Question: When I ran a command, I got the following error:

You need to be root to perform this command.

What is root and how can I become it?
Comment: Usually, `sudo command` is enough. What command do you want to use? ...and [for more info](http://askubuntu.com/questions/91598/how-do-i-login-as-root).
Answer: What is "root"?
root is a user existing on every Linux system.
To be more precise, it is a special user - the super user!
root is the only user that has privileges to do everything.
In contrast to the two types of user accounts you can create (administrator users and restricted users), it exists by default and can neither be renamed or deleted. Usually, logging in as root is disabled for security reasons.
You may think that your admin user is the most powerful account on your machine and may do everything, but that is wrong. Simplified and in general, your admin user is almost equal to a restricted user in permissions. It also only has writing permissions in its own home folder and also may not change system wide settings.
However, the admin users have one special and important privilege:
How to  become "root"?
As logging in as root is prohibited on Ubuntu per default, there has to be another way to become root in order to be able to perform important system wide administrative tasks.
The sudo command<-- (abbreviation for "Super User DO ...")
Administrator user accounts have the permission to use the sudo command to execute a single command as root/with root privileges.
It is simple. Just write sudo before every terminal command that needs special elevated permissions to run and execute it. It will show you a prompt and ask for a password like this (my username is bytecommander):
[sudo] password for bytecommander:

Note that you have to enter the password of your own admin account and not the (by default not existing) root user's password. It is also configured to only ask once every 15 minutes for your password, so the second invocation of sudo will run the command immediately. However, if you close the terminal window, the sudo ticket is also reset. Furthermore is it important for you to know that there will be no display output when you type the password, not even stars (*) will appear to symbolize the entered characters. Just type it and hit Enter.
Let me give you an example on how/when to use sudo:

apt-get is the command-line tool to run software updates and install new packages. This affects the whole system and therefore requires root permissions. Therefore, whenever we need to invoke apt-get, we have to do this with sudo:
sudo apt-get install vlc

would for example install the famous media player VLC (after asking for your password, if you did not enter it in the current terminal window within the last 15 minutes). If we ran the command as normal user without sudo (apt-get install vlc only), it would result in this error:

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
  E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

How to proceed with graphical applications instead of terminal commands?
Sometimes you need to run a graphical application (such as e.g. the Files manager, a special editor or an additional tweak tool) with root privileges. In this case, please do not use sudo, as this is only for terminal commands. For several reasons I don't want to discuss here, it may lead to severe problems (see this answer for further explanations)...
So for graphical applications, there are other commands which are safer to run GUI apps and which provide a graphical popup-window to request your password instead of a terminal window. Those are mainly gksu and gksudo. Experts are arguing which of them is to prefer, but for the normal Ubuntu user, both can be taken equally. The syntax is the same as with sudo. For example, we can run the file manger Nautilus with root privileges by:
gksudo nautilus

Answer: root is the user name or account that by default has access to all commands and files on a Linux or other Unix-like operating system. It is also referred to as the root account, root user and the superuser.
So there will arise certain cases when you will have to be logged in as root user to run those commands. Do not worry it is simple.
By default, the root account password is locked in Ubuntu. This means that you cannot log in as root directly or use the su command to become the root user. However, since the root account physically exists it is still possible to run programs with root-level privileges. This is where
    sudo

comes in - it allows authorized users to run certain programs as root without having to know the root password.
This means that in the terminal you should use sudo for commands that require root privileges; simply prepend sudo to all the commands you need to run as root. You will be prompted for a password when you sudo. Just remember, when sudo asks for a password, it needs YOUR USER password, and not the root account password.
When using sudo, your password is stored by default for 15 minutes. After that time, you will need to enter your password again.
Your password will not be shown on the screen as you type it, not even as a row of stars (******). It is being entered with each keystroke!
For more info please refer: https://help.ubuntu.com/community/RootSudo

What is "root" and how can I become it?


Wifi problem on Ubuntu 14.04

Question: I have problem with drivers on my laptop. My wifi adapter is Broadcom BCM4313 802.11bgn Wireless Network Adapter
I am on Ubuntu 14.04 LTS, and my kernel is : 3.13.0-40-generic
I was trying three different drivers drivers:
wl - working fine, but not compatible with all routers, so sometimes I cannot connect to wifi network, especialy when wifi network is in b/g/n mixed mode or only in n mode. So I cannot use "full speed" of internet connection.
brcmsmac - compatible with all routers, I can connect to all wifi networks. But internet connection is totally lagged, sometimes I have to wait more than a minute for loading a webpage. It is not possible to use it. (it is interesting that ping output is good)
bcma - Unable to connect to any wifi network, it doesnt work for me
What do you suggest to me? Thank you.
Comment: possible duplicate of [Installing Broadcom Wireless Drivers](http://askubuntu.com/questions/55868/installing-broadcom-wireless-drivers)
Answer: I advise you to read and follow the very detailed instructions at Installing Broadcom Wireless Drivers on this site.  This is the best resource on the net for installing Broadcom drivers.
If that helped, flag your own question as a duplicate…

Wifi problem on Ubuntu 14.04


How to set MP3 ringtone in Android (Nexus S)

Question: I am using Music (latest up to today) and TTPOD as my MP3 players.
After Googling, I suppose I can set my MP3 ring tone, by long press on the song through Music application. However, once I long press, there are only the following selections

Play
Add to playlist
Delete
Shop for artist
More by artist
Search

I was expecting I am able to get a selection choice Set as ringtone, but I didn't find one.
May I know what is the "correct" way to set MP3 as ringtone in Android?
Comment: possible duplicate of [How do I set a custom MP3 as a ringtone for other notifications?](http://android.stackexchange.com/questions/224/how-do-i-set-a-custom-mp3-as-a-ringtone-for-other-notifications)
Comment: Are you doing the long press on the music in the built-in Music app, or in your 3rd party Music app? In the built-in one you should definitely get a "Set As" option when you long-press on an individual tune.
Comment: I am using built-in Music app. They have a new version right now. I get the above options, but not "Set As".
Comment: v3+ of the Music app just doesn't have a `Set As` menu option. You could try uninstalling the updates and using an older version if you want.
Answer: This isn't the "correct" way, but IMO it's a good way: use Ringdroid. With it, you can cut a suitable part of the MP3 to be used as a ringtone. This way you can get rid of those pesky intros on songs that have a slow start and save space by not having the entire MP3 duplicate in your ringtones folder.
Comment: It wants to read my contacts. That's too much for only  setting a MP3 from Google Music as ringtone. Is there a better solution after more than 1 year?
Comment: There's another similar app called [Ringtone Maker](https://play.google.com/store/apps/details?id=com.herman.ringtone), but it also requires read/write permissions to contacts because it allows you to set contact-specific ringtones.
Answer: In last versions of Android (at least in Nexus S) it's kinda hard to set MP3 as a ringtone. There was an option before in the menus called "Set As" but in the new Music app it disappeared.
What you can do is copy your mp3 to /sdcard/media/audio/ringtones,
that ringtones folder might be empty or even not exist, in this case just create it.
Then you go to Settings -> Sound -> Phone ringtone and select your mp3 from the list.
Good Luck!
Comment: Casey_Miller - thanks! Yours is the only solution that seems to work, and it works perfectly (I have a Nexus S with Android version 2.3.4).
Answer: I use Ringtone Maker, which is a free app.  This app allows you to select a part of your song as the ringtone.  It has some preselected portions (based on popular edits included in the database), or you can select your own portion of the song to set as the ringtone.
If you simply want the beginning of the song as your ringtone, @bakytn's answer is the way to go.
Some other music apps will give you the option to choose a song as a ringtone, such as the $5 PowerAmp, but I'm not sure what they offer in terms of choosing a portion of the song.
Answer: Download MP3 music download app. Select song tab, and press the selected song. You will get option set as ....
Comment: Can you provide a link?


How much detail should I provide in my question?

Question: I'm used to asking questions on technical sites like stackoverflow.  On those forums, it's appreciated if you create the smallest possible example required to recreate your issue.  But how does it work when I'm asking a question about my body?  If I give you my complete stats and health history, is that the equivalent of dumping all my environment variables and entire code listing?
Answer: Your question should provide enough detail to properly answer your question, but without getting into extravagantly personalized issues that make the question only about you. Consider the nature of your question as it relates to a broad-interest Q&A site — It should be of general interest to the users on this site.
This is not a medical site. You should not be seeking specific, customized medical advice needing a complete medial history. If you find yourself getting into that level of detail, there's something wrong with the scope of your question.
In those cases, instead of asking specifically what your medical needs are, you should be asking what issues you need to consider and why. Provide as much information as needed to properly answer your question without getting into unnecessary detail.
The best answers are those that teach you "how to fish" rather than giving you specific medical advice for you to follow.
Comment: I agree, there's a sweet spot between requiring a specific medical history and too general information (my knee hurts!). Hopefully we can set a few good examples that have the right balance.
Answer: If you are asking questions about diet, it really helps to provide some information to quantify what that means.  For example, to validate the Calorie requirements, it helps to know weight, gender, height, and body fat percentage if known.  Or if the Calorie requirements are known and you are trying to figure out why you feel terrible on it, listing what your current diet is will help give an idea of the macro nutrient balance, etc.
In other words, like Stack Overflow, you need to provide enough pertinent information to check your work and find where the hole is in your implementation.
Unfortunately, diet, exercise and performance are all wrapped up together.  If you make the question focused enough, you can limit how much info is needed to come up with the answer.


What is the problem with this Arran Pilot potato plant?

Question: I have noticed the following on some leaves on my arran pilot potatoes. Is it frost damage, blight, or something else?
Answer: Frost damage would have been visible on all the softest parts of the plant, especially including the very tips of the youngest growth points. Blight would have resulted in even more tissue necrosis. What we have here is possibly a temporary or long term nutrient problem. Arran Pilot is a variety selected for its ability to produce extremely early in the season, the first earlies. As such it is often planted as early as possible at which point the climate can be very variable; temperature can be either unusually high or low. Low would result in frost, high would result in some nutrients not being immediately available for new growth, so the plant may steal from other older growing parts to support rapid terminal shoot expansion. Unless the problem gets worse I would say not to worry too much, just keep an eye open for changes.
Comment: Thank you, we have just moved in to this house and is the first year we have planted so maybe needs more nutrients


Asking the Parents of Small Children to be Quiet in Public Areas

Question: I have three very lovely, yet very loud Chinese children living next door to me in my condominium.  Two of the children are quite young, and I do realize children by their very nature are loud; without exception -- and at all hours -- they leave their apartment with their mother and are screaming.  This can be loud, happy singing, or it can be frustrated crying.  I am disabled and sleep quite a bit, mostly due to severe pain.  The parents' English is not good; they are new here.  How can I very politely (in writing) ask the parents that they please try to keep their children quiet in our common spaces, like hallways?  They are very loud and noise travels far in our building.  Thank you!
Comment: Writing in English would have the best effect ... statistically speaking. SCHG  Boy's answer is good too – you might have to show them this is an international affair by using clumsy Chinese.
Comment: 请叫你们的孩子不要经常大叫。为此我很难才能睡。
Comment: Search Google translate for the pronunciation, if you wish, but more effectively show the words to them
Comment: I would suggest putting something in writing as well, but please print it out in English and Chinese (not just one or the other). You also may like to mention in the English part that you asked someone to translate your request into Chinese because you wanted to help them understand more easily.
Comment: Beware of "glass hearts" .... no no no, they are not falling in love with you .... I am saying that they would interpret things from their view and may have their hearts "broken" easily, and then, might react in extreme ways....
Answer: "希望您能多照顾一下您的孩子,他们经常吵闹,影响我们生活和休息。" (Please take good care of your kids, because they are so noisy and badly influenced our lives.)
Try not use "大叫" on your note, because that sounds like a bad comment on their kids, which may make them unhappy. Better use "我们" to show that you are a "general neighbor" like the others, instead of someone who cannot fall asleep due to your own reason (medical/phycological maybe, who knows). This politely tells them it is their fault, not yours.
Also, having both Chinese and English would also help, as is suggested in the comments you got.
Answer: Not sure how much politeness you're looking for, here's my input:

不好意思(mr. / mrs. X), 我最近有睡觉睡得不太好, 如果孩子们晚上可以安静一点, 对我来说这是一个很大的帮忙, 谢谢

In English:
"Excuse me Mr./ Mrs.X, I have trouble sleeping lately, if the kids can be more quiet at night, it will be helpful, thanks."
I did not mention about the common space thing as it might give them a false message that their kids can be as loud as they can in their house, but you can edit it to see fit.  Also if they're not very nice people or if you want to be more forceful, Bfrguci's answer is a better choice.


Add raid to existing Ubuntu desktop install

Question: I have a desktop with Ubuntu installed on an SSD. Can I add 4 more drives and put them in RAID 5 (turn it into a NAS) without reinstalling? If so how?
Thanks.
Comment: the best I can think of is to `dd` the data off your drive, format it for the raid array & `dd` the data back.  if you plan on using software raid you'll have to make changes anyway; if using hardware raid this will be outside of software but your hardware will want to re-format anyway.  raid5 will mean different data is stored on your ssd anyway (redudancy & only part of your data) so you're creating more work for yourself than a clean install.  i'd recommend a clean install, then restore the settings & data and if you're using as a NAS forget the desktop for speed.
Comment: I used the webmin UI once to setup a raid and found it quite easy and a good graphical overview.
Answer: You can create a raid5 array with the additional disks using the "mdadm" package.
Check How To Create Raid Arrays with mdadm
Comment: Your answer led me to webmin which made creating the RAID really easy.
Answer: I wanted to create a RAID 0 array for a high performance video transcoding workstation that I built utilizing a pair of M2 PCIE SSD drives. Everything I had found recommended installing Ubuntu server in order to accomplish this. I didn't think that was necessary for my use case.
I had originally setup the system for dual boot WIN10 and Ubuntu using one drive for Windows 10 and the other for Ubuntu 16.04. UEFI was giving me fits so I enabled CSM in the BIOS and attempted Legacy installations of both OS. I shrank both installations (and moved the swap partition) to leave roughly 1/2 the space on each drive (55.9G in my case) unallocated for my planned RAID 0 volume.
I utilized fdisk to create the necessary partitions of type fd on both drives in the remaining space.
Here's the end result on the Windows drive:
Device         Boot     Start       End   Sectors  Size Id Type
/dev/nvme0n1p1 *         2048   1126399   1124352  549M  7 HPFS/NTFS/exFAT
/dev/nvme0n1p2        1126400 117221375 116094976 55.4G  7 HPFS/NTFS/exFAT
/dev/nvme0n1p3      117221376 234441647 117220272 55.9G fd Linux raid autodetect

and the Ubuntu drive:
Device             Start       End   Sectors  Size Type
/dev/nvme1n1p1      2048      4095      2048    1M BIOS boot
/dev/nvme1n1p2      4096 100247551 100243456 47.8G Linux filesystem
/dev/nvme1n1p3 100247552 117221375  16973824  8.1G Linux swap
/dev/nvme1n1p4 117221376 234441614 117220239 55.9G Linux RAID

I installed mdadm with sudo apt install mdadm and then configured.
I checked that both drives were detected and partitioned properly with lsblk
nvme0n1     259:0    0 111.8G  0 disk
├─nvme0n1p1 259:3    0   549M  0 part
├─nvme0n1p2 259:10   0  55.4G  0 part
└─nvme0n1p3 259:11   0  55.9G  0 part
nvme1n1     259:1    0 111.8G  0 disk
├─nvme1n1p1 259:4    0     1M  0 part
├─nvme1n1p2 259:5    0  47.8G  0 part  /
├─nvme1n1p3 259:6    0   8.1G  0 part
└─nvme1n1p4 259:2    0  55.9G  0 part

I created the Array with the command `sudo mdadm -C /dev/md0 -l raid0 -n 2 /dev/nvme0n1p3 /dev/nvme1n1p4
I checked the status with
:~$ cat /proc/mdstat
Personalities : [raid0]
md0 : active raid0 nvme1n1p4[1] nvme0n1p3[0]
      117153792 blocks super 1.2 512k chunks

unused devices: <none>

mdadm --detail /dev/md0 provides more detailed info:
/dev/md0:
        Version : 1.2
  Creation Time : Tue Sep 11 10:31:25 2018
     Raid Level : raid0
     Array Size : 117153792 (111.73 GiB 119.97 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Tue Sep 11 10:31:25 2018
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

     Chunk Size : 512K

           Name : me-Z370-HD3P:0  (local to host me-Z370-HD3P)
           UUID : bd71c1dd:2eb9fbd6:66204362:dcf71a05
         Events : 0

    Number   Major   Minor   RaidDevice State
       0     259       11        0      active sync   /dev/nvme0n1p3
       1     259        2        1      active sync   /dev/nvme1n1p4

Made the filesystem with mkfs.ext4 /dev/md0 and mounted it with
sudo -i
# mkdir /mnt/raid0
# mount /dev/md0 /mnt/raid0/

All that remains is to benchmark it:

`
and create an fstab entry to automount it at at startup.
Sources: https://www.tecmint.com/create-raid0-in-linux/


NSString @property, using copy instead of retain

Question: I'm looking over Apple's sample application EditableDetailView, and noticed that in one of their controllers, they're setting an instance of NSString property with (nonatomic, copy). When would one use copy instead of retain? Is this so they can make a unique copy without affecting the existing data?
Comment: The recommendation is to use copy for classes that are part of a class cluster that have mutable/immutable pairs; such as `NSString`/`NSMutableString` `NSArray`/`NSMutableArray` `NSDictionary`/`NSMutableDictionary` `NSSet`/`NSMutableSet`, see @Abizern's answer [HERE](http://stackoverflow.com/questions/4995254/nsmutablestring-as-retain-copy).
Answer: Yes, it's so that it can make a unique copy without affecting the existing data.  The synthesized setters essentially look like this:
// For @synthesize(nonatomic, retain) foo:
- (void) setFoo(NSFoo *theFoo)
{
    [theFoo retain];  // retain new value
    [foo release];    // release old value, if any
    foo = theFoo;     // assign new value
}

// For @synthesize(nonatomic, copy) foo:
- (void) setFoo(NSFoo *theFoo)
{
    NSFoo* newFoo = [theFoo copy];  // make copy
    [foo release];  // release old value, if any
    foo = newFoo;   // assign new value
}

Note the order of operations here is important - the new value must be retained/copied before the old value is released, in case of self-assignment.  If you released first and then assigned the property to itself, you might deallocate the value by accident.  Also note that if the old value is nil, sending it a release message is ok, since sending a message to a nil object is explicitly allowed and does nothing.
The choice of retaining versus copying just determines whether or not the object's property shares the same value with what you're setting it to.  Consider the following code:
// suppose the 'foo' property is declared 'retain' and the 'bar' property is
// declared 'copy'
NSFoo *foo = ...;
NSBar *bar = ...;
someObject.foo = foo;
someObject.bar = bar;
[foo changeInternalState];  // someObject.foo also changes, since it's the same object
[bar changeInternalState];  // someObject.bar does NOT change, since it's a copy

Comment: there might be a typo in your last line.
where //someObject.foo does NOT... should be //someObject.bar does NOT
Comment: To be able to call `copy` on a custom Class object you have to override `copyWithZone:` method.
Answer: Remember that there is an NSMutableString. It would be really bad to be able to mutate the contents of a string that some other object owns (say, by deleting half its characters), especially if you don't realize you're affecting another object. Therefore, it's nice for the other object to make its own copy.
You may say "well, why don't I just copy the string before assigning it there?". Maybe the object wants a mutable string and yours is immutable. If you have to copy the string first, then you have to look up which kind of string it wants in its documentation or header, then make the right kind of copy (every time). This way, you just say other.string = myString and it makes whatever kind of copy it wants—you don't have to worry about it.
Answer: (For some reason, this post is appearing above the follow-up question I am trying to answer)
Re:

did you mean that i have to copy 'the
  foo' object before releasing
  'foo'??but whats the problem if i
  relaese 'foo' before copying 'the
  foo'??because they are two different
  object i can't understand why
  releasing one affect other!!!!

Most of the time, you are correct. If they are, in fact, two separate objects, it won't matter. The problem lies in the possibility that you are assigning the same object back into itself. If you were to say
[myObject setFoo: moof];
[myObject setFoo: moof];

Then the second time you did it, you would release moof before you copied it. In the intervening moment, it is possible that if moof's retain count went to zero then moof would be deleted, and you would have nothing to copy in the following step. Foo would now be nil.
Is this likely to happen? Probably more than you might think. There are certainly times when the user might click on an "update" button twice, for example.
I hope this is understandable and helpful.
Comment: Stack Overflow is a question-and-answer site, not a forum. Answers, of which both this and the "question" you meant to respond to, are sorted by votes by default. Yours has 0 and the other answer (which is now deleted) ended up at -3, so yours appears higher (to those of us with enough karma to see the other at all). The right way would have been to comment on the other answer, but that requires 50 reputation points, which you don't have. (Plus your answer is too deep and richly-formatted to fit in a comment.) There is no right way in your situation.


Alpha decay and conservation of energy

Question: I understand how alpha decay works but while reading through the text I came across this "All the emitted alpha particles travelled at the same speed, meaning they had the same amount of energy". How does the speed relate to the overall energy and they use the word particles so can multiple alpha particles be released at once?
Comment: The quote is not clear. The "all" probably refers to the ones measured in the experiment, not "at the same time".  they want to stress "the same energy level". https://en.wikipedia.org/wiki/Alpha-particle_spectroscopy
Answer: There is only one alpha particle per decay. They're referring to multiple examples of the same isotope undergoing alpha decay.
The speeds are all the same because of conservation of mass-energy. Changing the speed would change the kinetic energy, and there is no other parameter in the final state that can vary to make up for that and keep conservation of mass-energy balanced.
Answer: The parent nucleus decays to an alpha and a daughter nucleus and the difference in energy $E$ is converted to kinetic energy of the two. However momentum is also conserved so they have equal and opposite momentum, meaning that the energy of the alpha is completely specified (non-relativistically, ${p^2\over 2m_\alpha}+{p^2\over 2 M_{daughter}}=E$). So all alpha particles from such a decay have the same energy and the same velocity (which means the same range, which is usually what you see).
The reason for pointing this out is to contrast it with $\beta$ decay, where the parent decays to a daughter, an electron (beta particle)  and a neutrino, and the energy can be shared between the three in a range of ways that still conserve energy and momentum, so beta particles have a continuous energy spectrum..
BTW if there is a more politically correct terminology than parent-daughter I apologise for not knowing it.
Answer: The decay scheme for Po-210 is shown below.

What you will noice is that alpha particles with two different energies are emitted but each of the two different transitions produce alpha particles all of the same energy (and hence speed), either 4.502 MeV or 5.305 MeV.
Only one alpha particle is produced from the decay of a single Po-210 nucleus.
I think that the statement which is made about monoenergetic alphas is to contrast the single valued energy of alphas with the energies of the emitted beta particles which have a range of values due to emission of an anti neutrino at the same time.

Alpha decay and conservation of energy


Specific resistance of semiconductors

Question: Why does the specific resistance of a semiconductor decrease with an increase in temperature, as an increase in temperature should cause the specific resistance to increase?
Comment: It is better if you do some research. These can constitute a whole chapter or even a book! Semiconductors are poorer conductors than metals but better than insulators. Impurities are mixed with them (called doping) so that the conductivity increases. It depends on the orbital structure and many more...... buy a book on this topic and read, it's very interesting.
Comment: Why should an increase in temperature cause the resistivity to increase? In metals the simplest explanation is that increasing temperature causes increasing carrier-phonon scattering. That happens in semiconductors as well, but the increase in carrier concentration with temperature successfully competes to result in increasing conductivity.
Comment: It's all about the carriers. Furthermore, if you decrease the temperature of a semiconductor too much, it's resistance will increase exponentially. Freezout. Read up.
Answer: The electrical resistance in a material is a property determined by
electrical charges in motion.   So, there are two sources of
temperture dependence: the charges can change (basically, become more or
less numerous), or the motion can change.
Electrical resistance in metals
is almost entirely due to scattering (thermal interaction with the
motion of the charge carriers), because the number of charge carriers
is just the population of electrons in the conduction band.
So, for conduction in a metal, where charge carriers are constant in number,

increase in temperature should cause the specific resistance to increase
  is correct.   In the Drude approximation, a metal's resistance rises
  proportionally to absolute (Kelvin) temperature.
Semiconductors, on the other hand, have no charge carriers except a few
that are CREATED by thermal excitation.   So, under any conditions
where the temperature  has a larger effect on charge-carrier-density than
3000 parts per million per degree K, we expect the temperature
dependence of resistance to change sign.   In semiconductors, it does.
In some materials (semimetals, like graphite at room temperature) the
two effects just balance; we don't call those materials semiconductors
or metals.
Answer: The relaxation time  t , as well as to some extent the charged carrier density, n, changes with temperature in a semiconductor. The density for a semiconductor at any arbitrary temperature,T can be given as
$n(T) = n'e^{-\frac{E}{k_{B}T}}$
In the above equation E is the energy gap between the upper portion of the valence band and lower portion of conduction band. $k_{B}$ is Boltzmann's constant
Equation suggests that the density of the charged carrier increases with temperature hence conductivity increases so finally resistivity decreases
Why the last part?
Here is the equation I hope you know this
Conductivity = $\dfrac{(n q^{2}t)}{m}$

Specific resistance of semiconductors


What do you call a person with a bachelor's degree?

Question: I am a nutritionist in Mexico and I have a bachelor's degree.(I studied for four years at a university) In mexico my bussiness card says L.N. which means licenciada en Nutricion. I don't know how to translate that.
Comment: In the U.S., by chance I am aware, that the B.S. or B.A. degree in nutrition/dietetics is legally distinct from licensure (state-by-state!) as "registered dietitian", for example. There is a separate examination and licensure process in Minnesota, for example. One can have one without the other, and one must be careful about not making legally-false claims. This is a little like the use of degree-titles in Germany, which is much more legally constrained than in the U.S. (in this case oppositely to the immediate question).
Comment: (I don't speak Spanish but) Licenced Nutritionist? Or BSc Nutrition?
Comment: @Paul But "Licenciado" is not the Mexican Spanish equivalent of the degree you are describing. Most likely the degree is equivalent to either a BA or a BS, depending on specific details of the program.
Comment: @AndrésE.Caicedo, I certainly do not claim to really know the legal equivalents... I only wished to bring up the legal distinction (in MN, in the U.S.) between "license" and B.A. or B.S., since neither of the latter should be construed as "license". I'm not a great linguist, but I'm aware of the temptations to translate cognates to their cognate, which, after a few hundred years of drift, may say the wrong thing. Just trying to say "be careful"... :)
Answer: There are several ways this can be translated. Some of which I have seen are:

Licensed Dietitian
Licensed Nutritionist
Has a BSc in Nutrition

To my knowledge, there is no legal requirement in the United States that one of these be chosen over the others and in my personal opinion either of the first two are sufficient.
In the United Kingdom though, a Dietitian is someone who advises someone on their personal diet and diagnoses issues related to malnutrition while a Nutritionist gives general advice on how to eat.
Comment: @paul garret suggests there could be a difference between a state licensed nutritionist and having a BS in nutrition.


Exponential upper bound

Question: Suppose we have IID random variables $X_1,\dots,X_n$ with distribution $\mathrm{Ber}(\theta)$. We are going to observe a sample of the $X_i$'s in the following way: let $Y_1,\dots,Y_n$ be independent $\mathrm{Ber}(1/2)$ random variables, suppose that all the $X_i$'s and $Y_i$'s are independent, and define the sample size $N=\sum_{i=1}^n Y_i$. The $Y_i$'s indicate which of the $X_i$'s are in the sample, and we want to study the fraction of successes in the sample defined by
$$
  Z = \begin{cases}
      \frac{1}{N}\sum_{i=1}^n X_i Y_i & \text{if}\quad N > 0\, , \\
      0 & \text{if} \quad N = 0 \, .
      \end{cases}
$$
For $\epsilon>0$, we want to find an upper bound for $\mathrm{Pr}\!\left(Z \geq \theta + \epsilon\right)$ that decays exponentially with $n$. Hoeffding's inequality doesn't apply immediately because of the dependencies among the variables.
Comment: Let $Z_i = \frac{_1}{^N} X_iY_i$. (i) Isn't $Z_i$ independent  of $Z_{j\neq i}$? (ii) isn't $Z=\sum Z_i$? ... As a result, it's not clear to me that $Z$ isn't 'a sum of independent random variables'
Comment: Yes, that's why I ended with "no that doesn't work". There are inequalities that apply to the non-independent case, such as some of [Bernstein's inequalities](http://en.wikipedia.org/wiki/Bernstein_inequalities_%28probability_theory%29) (see the fourth item), and there are a number of inequalities that apply to martingales (though I don't know that those will apply here).
Comment: I'll take a look, and also try to find a connection with the martingales results. The bound for $U=(1/n)\sum_{i=1}^nX_i Y _i$ is so easy ($\mathrm{Pr}(U\geq \theta/2+\epsilon)\leq \exp(-2n\epsilon^2)$) that it's tempting to connect this with $Z$ using some kind of conditioning.
Comment: Ah, good point. I was thinking about $n$, rather than $N$. But can't you instead write $Z_i = \frac{1}{n}X_iY_i$, and let $Z=\sum_{i=1}^n Z_i$? That is, sum over all cases, whether or not $Y$ is 1 or 0.  ... no that doesn't work. The numerator is the same but the denominator is different.
Comment: That gives less than the fraction of successes in the sample, which is the quantity of interest in the problem, because $(1/n)\sum_{i=1}^n X_i Y_i\leq (1/N)\sum_{i=1}^n X_i Y_i$, since $N\leq n$.
Answer: We can draw a connection to Hoeffding's inequality in a fairly direct way.
Note that we have
$$
\{ Z > \theta + \epsilon\} = \big\{\sum_i X_i Y_i  > (\theta + \epsilon)\sum_i Y_i \big\} = \big\{ \sum_i (X_i - \theta - \epsilon) Y_i > 0 \} \>.
$$
Set $Z_i = (X_i - \theta - \epsilon)Y_i + \epsilon/2$ so that the $Z_i$ are iid, $\mathbb E Z_i = 0$ and
$$
\mathbb P( Z > \theta + \epsilon ) = \mathbb P\big(\sum_i Z_i > n \epsilon/2\big) \leq e^{-n \epsilon^2/2}\>,
$$
by a straightforward application of Hoeffding's inequality (since the $Z_i \in [-\theta-\epsilon/2,1-\theta-\epsilon/2]$ and so take values in an interval of size one).
There is a rich and fascinating related literature that has built up over the last several years, in particular, on topics related to random matrix theory with various practical applications. If you are interested in this sort of thing, I highly recommend:

R. Vershynin, Introduction to the non-asymptotic analysis of random
  matrices, Chapter 5 of Compressed
  Sensing, Theory and Applications. Edited by Y. Eldar and G. Kutyniok.
  Cambridge University Press, 2012.

I think the exposition is clear and provides a very nice way to get quickly acclimated to the literature.
Comment: Since the $Z_i$ include $\epsilon/2$ in their definition, I have the impression that $Z_i \in [-\theta-\epsilon/2,1-\theta-\epsilon/2]$ (the bound doesn't change).
Comment: Dear @Zen: Note that a careful accounting of the $N=0$ case will allow you to replace the strict inequality $>$ by $\geq$ everywhere without changing the final bound.
Comment: Dear @cardinal: I've reworded the question because actually $Z$ is a (slightly) biased estimator of $\theta$, since $\mathrm{E}[Z]=\mathrm{E}[I_{\{N=0\}}Z]+\mathrm{E}[I_{\{N>0\}}Z] = (1-1/2^n)\,\theta$.
Answer: Details to take care of the $N=0$ case.
$$
\begin{align}
  \{Z\geq\theta+\epsilon\} &= \left(\{Z\geq\theta+\epsilon\} \cap \{N=0\}\right) \cup \left(\{Z\geq\theta+\epsilon\} \cap \{N>0\}\right) \\
&=  \left(\{0\geq\theta+\epsilon\} \cap \{N=0\}\right) \cup \left(\{Z\geq\theta+\epsilon\} \cap \{N>0\}\right) \\
&=  \left(\emptyset \cap \{N=0\}\right) \cup \left(\{Z\geq\theta+\epsilon\} \cap \{N>0\}\right) \\
&= \left\{\sum_{i=1}^n X_iY_i\geq(\theta+\epsilon)\sum_{i=1}^n Y_i\right\} \cap \{N>0\} \\
&\subset \left\{\sum_{i=1}^n X_iY_i\geq(\theta+\epsilon)\sum_{i=1}^n Y_i\right\} \\
&= \left\{\sum_{i=1}^n (X_i-\theta-\epsilon)Y_i\geq 0\right\} \\
&= \left\{\sum_{i=1}^n \left((X_i-\theta-\epsilon)Y_i+\epsilon/2\right)\geq n\epsilon/2\right\} \, .
\end{align}
$$
For Alecos.
$$
\begin{align}
\mathrm{E}\!\left[\sum_{i=1} ^n W_i\right]&=\mathrm{E}\!\left[I_{\{\sum_{i=1}^n Y_i=0\}}\sum_{i=1} ^n W_i\right] + \mathrm{E}\!\left[I_{\{\sum_{i=1}^n Y_i>0\}}\sum_{i=1} ^n W_i\right] \\
&=\mathrm{E}\!\left[I_{\{\sum_{i=1}^n Y_i>0\}}\frac{\sum_{i=1} ^n Y_i}{\sum_{i=1}^n Y_i}\right]=\mathrm{E}\!\left[I_{\{\sum_{i=1}^n Y_i>0\}}\right]=1-1/2^n \, .
\end{align}
$$
Answer: This answer keeps mutating. The current version does not relate to the discussion I had with @cardinal in the comments (although it was through this discussion that I thankfully realized that the conditioning approach did not appear to lead anywhere).
For this attempt, I will use another part of Hoeffding's original 1963 paper, namely section 5 "Sums of Dependent Random Variables".
Set $$W_i \equiv \frac {Y_i}{\sum_{i=1}^nY_i}, \qquad \sum_{i=1}^nY_i \neq 0, \qquad \sum_{i=1}^nW_i=1, \qquad n\geq 2$$
while we set $W_i =0$ if $\sum_{i=1}^nY_i = 0$.
Then we have the variable
$$Z_n= \sum_{i=1}^nW_iX_i, \qquad E(Z_n) \equiv \mu_n$$
We are interested in the probability
$$\mathrm{Pr}(Z_n\geq \mu_n +\epsilon), \qquad \epsilon < 1-\mu_n$$
As for many other inequalities, Hoeffding starts his reasoning by noting that
$$\mathrm{Pr}(Z_n\geq \mu_n +\epsilon) = E\left[\mathbf 1_{\{Z_n-\mu_n -\epsilon \geq 0\}}\right]$$
and that
$$\mathbf 1_{\{Z_n-\mu_n -\epsilon\geq 0\}} \leq \exp\Big\{h(Z_n-\mu_n -\epsilon)\Big\}, \qquad h>0$$
For the dependent-variables case, as Hoeffding we use the fact that $\sum_{i=1}^nW_i=1$ and invoke Jensen's inequality for the (convex) exponential function, to write
$$e^{hZ_n} = \exp\left\{h\left(\sum_{i=1}^nW_iX_i\right)\right\} \leq \sum_{i=1}^nW_ie^{hX_i}$$
and linking results to arrive at
$$\mathrm{Pr}(Z_n\geq \mu_n +\epsilon)  \leq e^{-h(\mu_n+\epsilon)}E\left[\sum_{i=1}^nW_ie^{hX_i}\right]$$
Focusing on our case, since $W_i$ and $X_i$ are independent, expected values can be separated,
$$\mathrm{Pr}(Z_n\geq \mu_n +\epsilon)  \leq e^{-h(\mu_n+\epsilon)}\sum_{i=1}^nE(W_i)E\left(e^{hX_i}\right)$$
In our case, the $X_i$ are i.i.d Bernoullis with parameter $\theta$, and $E[e^{hX_i}]$ is their common moment generating function in $h$, $E[e^{hX_i}] = 1-\theta +\theta e^h$. So
$$\mathrm{Pr}(Z_n\geq \mu_n +\epsilon)  \leq e^{-h(\mu_n+\epsilon)}(1-\theta +\theta e^h)\sum_{i=1}^nE(W_i)$$
Minimizing the RHS with respect to $h$, we get
$$e^{h^*} = \frac {(1-\theta)(\mu_n+\epsilon)}{\theta(1-\mu_n-\epsilon)}$$
Plugging it into the inequality and manipulating we obtain
$$\mathrm{Pr}(Z_n\geq \mu_n +\epsilon)  \leq \left(\frac {\theta}{\mu_n+\epsilon}\right)^{\mu_n+\epsilon}\cdot \left(\frac {1-\theta}{1-\mu_n-\epsilon}\right)^{1-\mu_n-\epsilon}\sum_{i=1}^nE(W_i)$$
while
$$\mathrm{Pr}(Z_n\geq \theta +\epsilon)  \leq \left(\frac {\theta}{\theta+\epsilon}\right)^{\theta+\epsilon}\cdot \left(\frac {1-\theta}{1-\theta-\epsilon}\right)^{1-\theta-\epsilon}\sum_{i=1}^nE(W_i)$$
Hoeffding shows that
$$\left(\frac {\theta}{\theta+\epsilon}\right)^{\theta+\epsilon}\cdot \left(\frac {1-\theta}{1-\theta-\epsilon}\right)^{1-\theta-\epsilon} \leq e^{-2\epsilon^2}$$
Courtesy of the OP (thanks, I was getting a bit exhausted...)
$$\sum_{i=1}^n E(W_i) =1-1/2^n$$
So, finally, the "dependent variables approach" gives us
$$\mathrm{Pr}(Z_n\geq \theta +\epsilon)  \leq (1-\frac 1{2^n})e^{-2\epsilon^2} \equiv B_D$$
Let's compare this to Cardinal's bound, that is based on an "independence" transformation, $B_I$. For our bound to be tighter, we need
$$B_D=(1-\frac 1{2^n})e^{-2\epsilon^2} \leq e^{-n\epsilon^2/2}=B_I$$
$$\Rightarrow \frac {2^n-1}{2^n} \leq \exp\left\{\left(\frac {4-n}{2}\right)\epsilon^2\right\}$$
So for $n\leq 4$ we have $B_D \leq B_I$. For $n \geq 5$, pretty quickly $B_I$ becomes tighter than $B_D$ but for very small $\epsilon$, while even this small "window" quickly converges to zero. For example, for $n=12$, if $\epsilon \geq 0.008$, then $B_I$ is tighter. So in all, Cardinal's bound is more useful.
COMMENT
To avoid misleading impressions regarding Hoeffding's original paper, I have to mention that Hoeffding examines the case of a deterministic convex combination of  dependent random variables. Specificaly, his $W_i$'s are numbers, not random variables, while each $X_i$ is a sum of independent random variables, while the dependency may exist between the $X_i$'s. He then considers various "U-statistics" that can be represented in this way.
Comment: Alecos: $\mathrm{E}[W_1]=(1-1/2^n)/n$ (take a look at the derivation at the end of my answer). Your bound doesn't decay exponentially with $n$ as cardinal's does.
Comment: @Zen Indeed (in fact it _increases_ with sample size, although boundedly), that's why Cardinal's bound is more useful for most sample sizes.

Exponential upper bound


Three-month freeze on domain transfers?

Question: I am planning on hosting a web app on Google App Engine. I am planning on buying the domain from GoDaddy. Will I have to wait 3 months before I can transfer the domain from GoDaddy to GAE (or at least change the DNS settings to point to the GAE severs)?
Comment: oh boy, here we go. migrated to webmasters. i give it 20 minutes before its closed by a moderator without any downvotes by any other community members..
Comment: Could you edit this down to *only* the details important to the question? All the backstory is obfuscating the issue and basically irrelevant to things *right now* as far as I can tell. For one, in the first case you bought the domain with plans to transfer to another registrar. It sounds like right now, you're buying the domain and hosting elsewhere, with no transfer involved. Yes? Those are different situations, and Verio would have nothing to do with the *current* question.
Comment: @Su' - did the best I could
Answer: Most domain registrars require you to wait a specified period of time between transfers (usually 60-90 days) for various reasons, including fraud. I don't know about GoDaddy in terms of whether they will allow you to trasnfer the DNS, but Namecheap will get your domain registered for you and allow you to transfer the DNS right away (you still have to wait the 60 days before you can transfer the domain to a different registrar though.)
Answer: From the GoDaddy Support Docs:

NOTE: A 60-day transfer restriction period applies when you register
  or transfer a domain name, update the registrant contact's
  organization, or update the registrant contact's first or last name
  and an organization is not listed. For more information, see ICANN's
  Policy on Transfer of Registrations Between
  Registrars and
  our Domain Name Change of Registrant
  Agreement.

So, there you have it, there is a 60-day restriction. But they are simply enforcing the rules set by ICANN.

(or at least change the DNS settings to point to the GAE severs)

However, I can't believe there is any such restriction (with any registrar) on simply changing the DNS. Some registrars might charge you for this service, but I don't believe GoDaddy does since you can do this yourself via the control panel. Changing the DNS is usually the first thing you want to do after registering a domain, so it would be insane to pose a time restriction on this.

Three-month freeze on domain transfers?


Would it be possible to see large satellites in the sky through the smog in 2145?

Question: If it's around 2145, given the current rate of climate change (and atmosphereic pollution build-up), would it be possible to see large satellites in the sky? Or would they be completely obscured by smog?  What about the actual sun and moon-- would we be able to see them?
Comment: I don't think this question can be answered as written. It conflates climate change with other forms of pollution, and asks us to predict the future over 100 years out. Climate change is largely from the build up of CO2 and other greenhouse gases in the atmosphere. These gases are mostly invisible. Smog and other visible atmospheric pollution is something else. In some ways smog counters climate change by blocking sunlight. And who knows what will happen in 130 years? That's your decision. You might be better off asking what level of pollution would prevent us from seeing large satellites.
Comment: Welcome to WB:SE.  The question you have asked does not meet the requirements for a good question on this site.  It is very broad, expecting us to prognosticate world-wide climate changes, social changes, and technological changes.  As written, the only viable answer is, "given enough pollution, no, though they will always be visible on Mt. everest."  Anything else is pure speculation without enough scoping to produce an answer that is any better than another.  May I recommend you review our [Ask a Good Question](https://worldbuilding.stackexchange.com/help/how-to-ask) page for more info.
Answer: Probably.
Given the way that technology and politics is currently going, in the developed world smog will likely be a non-issue by then. Any current technology that burns fossil fuels is currently getting much cleaner - just look at contemporary diesel engines compared to those of twenty years ago. Add to that the issues of climate change pushing a switch towards renewables and the issue will become even smaller.
Countries that currently have smog problems will likely have started to clean up by then as well, if only as a result of having the technology standardised with the developed world.
Of course, a whole other issue given a possible increase in population will be "can you see the satellites and stars over all the light pollution?"
Comment: And at the other end of the spectrum, you might ask whether any humans would be alive to see them.  130 years is probably a bit soon for AGW to cause human extinction.  500 years, though?


The meaning of もしかして

Question: What is the meaning of もしかして? Sometimes I got it on my Japanese novel (Japanese people have given it to me for free), and on films I watched. But, I don't know what is the meaning of that.
Comment: http://eikaiwa.dmm.com/uknow/questions/2735/
Comment: Welcome to JLSE!  Unfortunately, we do not function as a bulk translation service.  To facilitate your learning, along with the learning of others, please give us your best attempt at translation.  If you are after a translation only, HiNative is a great resource (worth a Google at least.)  Before asking questions on this site, we request you become familiar with what we consider to be on and off topic questions.  You can research that here: https://japanese.stackexchange.com/help/on-topic
Answer: It means "in case" or "perhaps".
If used at the beginning of a sentence it meanse "in case" or "if".
As a reply to a question is means "perhaps".

The meaning of もしかして


.mov file choppy when played back in premiere pro cc

Question: I made a screen recording using quicktime, but when I import the video into premier pro cc, the playback is choppy.  In on part of the video I have an object that fades in, when this is viewed in quicktime the fade is very gradual and smooth, but in premiere pro it is choppy as if I only get every other frame of the fade.
Comment: Please post some details about the .mov and the Premiere project, including frame rates etc.
Answer: This could be a result of a very high resolution video and a slow computer. Try rendering the footage and see if it is still choppy
Answer: This is most likely related to glitchiness in the old embedded Quicktime player that was kind of hacked in to 64 bit Premiere.  It can sometimes result in the Quicktime engine grinding to a halt and even completely freeze Premiere.  This is due to the lack of 64 bit support provided for Quicktime for Windows by Apple.  I believe we have another answer that covers it in more detail, but I couldn't find it at the moment.
Either way, the best work around is generally to move the data stream out of the MOV container and move it in to a container that doesn't use the 32 bit Quicktime playback engine if you have problems.  (Not every file seems to have problems for some reason.)
Answer: Premiere commonly has issues working with .mov files.  I suggest converting it to an .mp4 file.  You can rename individual files with this extension.  Alternatively, you can use this Python script to convert many files: https://github.com/lys0l/movBaker
Answer: I had this problem too. I imported .MOVs created on a Windows platform into Adobe Premiere Pro on a Mac platform. I tried to create .MP4s using this embedded source. The video had horrible stuttering and was unusable. What ultimately worked for me was opening the .MOV in Quicktime on the Mac, then saving it as a .MOV on the Mac, then using Adobe Media Encoder to convert it to a .MP4, then import it into Adobe Premiere. Painful.
You might be able to skip one or more of these steps. It may not be necessary to convert to .MP4 - YMMV.
Answer: I found a way to fix this problem if you are here today and accidentally or unknowingly recorded using hevc or having trouble with playback .mov
Download reNamer by den4b and try replacing the .mov file with .m4a (note: .m4a not .mp4) i tried other file format like flv, avi none worked with Premiere
Its been almost 5 years Adobe!
Hope it works for you :)


NMDS: why is the r-squared for a factor variable so low

Question: I am doing an NMDS ordination. The data come from a number of sites scattered around two lakes. In the plots, I coloured the samples from the two lakes blue and green. There seems to be some pretty decent separation between the lakes in the NMDS ordination plot. However, when I use lakes as a factor variable with envfit, I only get an R squared value of 0.19 (although the pvalue was less than 0.001). The R squared value is way lower than I thought. Am I missing something or am I reading too much into this?
Comment: The question remains how far the way that `envfit` calculates R^2 matches the pattern of difference between the lakes. There are lots of misses as well as hits from any simple discrimination. I haven't tried finding out about `envfit`.
Comment: You don't explain what `envfit` is or does. But whatever you are doing, the impression is that you are surprised that one predictor has only a moderate R^2. The answer seems to be as much ecology as statistics, namely that you surely have many variables at play in your system and you don't really expect one to dominate, unless that's part of your design. Otherwise put, are you surprised that everything but lakes accounts for 0.81?
Comment: What is the data generation model you are trying to fit? Is the colour of the lakes (type of lake) the response, which you are trying to predict using covariates `NMDS1` and `NMDS2`? Also, commenting on @NickCox's first comment, I think an R^2 value of 0.2 for one covariate is actually very decent. Also note that R^2, which measures deviation from the fitted mean, can be unrepresentative in terms of separating groups. E.g. suppose the fiited mean of one group is 10000 and the other is 100. Even with a lot of variation, you will be able to separate these two groups easily.
Comment: Well, I'm not really surprised by the fact that ecology and other variables are at play here. I'm just surprised at how low the R^2 is given the separation I see in the picture. I was hoping someone would give some insight in to why this might be/ tell me that its a common occurrence and not to worry about it. Envfit is a function in R that fits vectors for environmental variables to ordination plots.
Answer: Let me take a crack. I believe factorfit finds average ordination scores for each level of your factor (and places an arrowhead), and performs a regression (with goodness of fit)... Although it appears that you have separation due to your factor in nMDS space, the R^2 is likely low simply due to high variance in ordination score around an expected regression score. This could simply be due to other variables that you include in your nMDS ordination, and if you only included [species] important to the distinction between habitat, your R^2 would of course go up. Remember that the axes in nMDS are not linear combinations of descriptors... Thus points are arranged by similarity in k-dimensions, and not according to scores of any specific variable.


Ubuntu One folder vs Checking the "sync with ubuntu one" check box

Question: What is the difference between dragging a folder over to the Ubuntu One folder for syncing and just checking the "synchronize this folder" check box on each folder I want to sync?
Answer: The "Ubuntu One" is the default folder, that is always synced when you enable Ubuntu One. For other synced folders, you can select in each devices which to sync or not sync.
For example:

on PC "A" you have "Ubuntu One" folder, and Pictures folder; you select "Pictures" for syncing.
on PC "B" you also enable Ubuntu One service: the "Ubuntu One" folder will be synced, but you can avoid to select also "Pictures" syncing.


OpenBSD Apache version 1.3.29?

Question: I recently installed OpenBSD and went to check the version of Apache HTTPD and when I run httpd -v it tells me the version is Apache/1.3.29 (Unix). Surely this can't be right? I am using the latest version of OpenBSD (5.3), why is Apache SO out of date for an OS that is supposed to be security based?
Comment: The Apache in OpenBSD has been patched and security backported, and does not contain the vulnerabilities normally associated with httpd 1.3.29. Various Linux Distros do this constantly too, including old version of Apache that have been security patched instead of the new version.
Comment: The answer of Krist is the correct one. Just a side comment. `# pkg_info -Q apache-httpd` -> apache-httpd-2.2.23. Apache2 is available from packages. The OpenBSD developers are focused now in nginx. nginx is installed by default.
Answer: Officially it's a licencing issue
To quote:

Source code published under version 2 of the Apache license cannot be
  included into OpenBSD. As a consequence, OpenBSD now maintains its own
  version of Apache based on version 1.3.29. The OpenBSD version
  includes many enhancements and bugfixes.

But there appears to be more going on below the surface. Basically the OpenBSD decided to no longer update apache:
http://marc.info/?l=openbsd-misc&m=108653020220858&w=2

OpenBSD Apache version 1.3.29?


Adding term to a custom taxonomy based on term from product category

Question: spent over four hours on this and still hitting a wall, hope StackExchange knows better. :/
Basically, I have some Woo products and whenever a new product is added, its name should be saved as a term of a custom taxonomy I've registered( 'Models' ), but only if it's in a certain product category, let's say the name of the category would be 'Keyboards'.
Now, every time I add a new product, e.g. a keyboard named 'The Best Keyboard' and check the 'Keyboards' term in the product category metabox, 'The Best Keyboard' would also be automatically added as a term to the 'Models' taxonomy (which I need to display compatibilities with various other products). This has been extremely useful in what I'm trying to achieve and I've trimmed the code a bit:
add_action( 'save_post', 'add_custom_terms' );

function add_custom_terms( $post_id ) {
  if ( 'product' === get_post_type( $post_id ) ) {

        $term_title = get_the_title( $post_id );
        $term_slug = get_post( $post_id )->post_name;

        $existing_terms = get_terms( 'compatibility', array(
            'hide_empty' => false
            )
        );

        foreach( $existing_terms as $term ) {
            if ( $term->description === $post_id ) {
                wp_update_term( $term->term_id, 'compatibility', array(
                    'name' => $term_title,
                    'slug' => $term_slug
                    )
                );
                return;
            }
        }

        wp_insert_term( $term_title, 'compatibility', array(
            'slug' => $term_slug,
            'description' => $post_id
            )
        );
    }
}

And it's where I got stuck. It works exactly as it's supposed to, but it always adds the product name to the Models taxonomy, regardless of whether the term 'Keyboards' has been checked or not.
So, my basic question is - how do I set up a conditional for this to happen only when the product is a Keyboard?
From what I've gathered, it also seems that I should be using two hooks, 'save_post' and 'publish_post', as 'save_post' does not know whether the 'Keyboards' checkbox has been checked until after the post/product's been published, thus making it impossible to it as a condition for adding a term to the custom taxonomy, but I honestly don't understand how to combine the two hooks. If anyone can help out - I owe you one!
Answer: As you say, when triggered 'save_post' the changes are not been mae, so there's not yet an association with a term.
But..in the $_POST['product_cat'] variable you have the array (IDS) of the selected categories, so you can check if the product belongs to the 'Keyboard' category ( based on its ID) and decide whether or not to perform further actions


Bluetooth Command Line Tools not being recognized

Question: When I get the following output:
'btconfig' is not recognized as an internal or external command,
operable program or batch file.
..is this related to environmental variables? If so, I'm curious to know a bit more about environmental variables.  Why would a default installation of Windows 10 not include bluetooth in the default environment?  Wouldn't that be akin to not including netstat or ping?  If bluetooth is not specified in the current environment, does this mean that bluetooth will not be operational?
How would I add bluetooth to the current environment within the environment variables settings?
Finally, if a computer does not have bluetooth hardware installed and hardware is later installed, is the environmental variable automatically configured or does it need to be manually configured?
Thank you.
Answer: Very simple - btconfig is a 3rd party tool, not part of the Windows OS, thus not included by default. It will not get installed just by adding BT HW and installing a driver - it needs to be installed manually from:
BTConfig


Is 128 Gb ram help me in rendering time?

Question: Now I'm using my old laptop for graphics work. For more heavy intensive 3d work I prepare 1 years my savings money around $5000 and want to make a PC in this price area with latest i9 13900k and RTX 4080 but I'm confused with ram selection. I don't want to cost-cutting in majore part of the pc that's why I'm confused to select ram in between 64gb and 128gb. Maybe I'm pick 6000MHZ stick of ram. Is 128 Gb ram help me everytime using blender normal to heavy work? Or should I consider 64 Gb? In internet I found many of the tech guy recommend 64 instead of 128gb, But other recommend 128gb as well. Now I'm confused to spend more money on 64gb more ram. Is 128 Gb will good or worst idea for me?
Comment: Hello, hardware questions are off-topic on this unfortunately. You can ask / query this on blenderartists.com where you may get more nuanced answers. Cheers
Comment: @MartynasŽiemys I'd say it is. It has also been covered in other posts like https://blender.stackexchange.com/a/277110/19307 possibly others
Comment: After thinking a bit, I've voted to close it as an opinion-based question, since it depends on a whole lot of factors. RAM can lead to longer or faster render times, not because of the render engine but because of loading dense objects, if you go higher than what's available it will start tanking your performance because the data will be written / read directly from and to the drive. Or because the RAM stick technology does not support fast enough data transfer. But I don't think one can canonically answer this question, since it depends on all your other peripherals and your project
Comment: See https://blender.stackexchange.com/a/52561/19307 also https://blender.stackexchange.com/a/277110/19307
Comment: Is it hardware question? I thought unless we are talking about specific hardware recommendations, it's is all good...
Comment: Fair enough. I did not check if it's covered. Sounds like something that would be covered a few times already.
Answer: No, RAM will not make rendering faster. Amount of memory will not improve speed of the rendering, only make it possible to render large scenes. 128GB is needed only if you render extremely large scenes or very high resolutions and RAM will only be used by CPU rendering. If you render with GPU, you want to fit the whole scene into GPU memory to enjoy all the advantages of GPU rendering. Even when working you will most likely not experience any improvement in performance if you have 128GB of RAM since what you see in the viewport will be limited by GPU. It will make various ways of processing large amounts of data possible though. If you need massive simulations, and large amount of detail in your scenes like plants, grass, hair, particles and so on, RAM will be needed for you to be able to work with that amount of data. RAM is usually not about speed but about what amount of data it is possible to work with.
If you need to ask, chances are, you really do not need that much RAM yet. I would advise going with the smaller option since 64 GB will really be enough for mostly anything and it is always possible to upgrade if you ever need  to. Unless of course you have a good reason you need that much RAM.


Is it possible to sync title and description from Flickr to Lightroom?

Question: I wonder if I can sync metadata such as title and description from Flickr to LR without using any third party software, just with built in Flickr Plugin. If so, how can I do it?
Comment: Having tried this myself just now, I can't see any way to synchronise the Flickr metadata. The comments are imported to Lightroom, though I have no idea why.
Comment: Too bad, because I've edited many titles and descriptions right in the Flickr. Still looking for solution.
Answer: This is not possible in LR 3.6 unfortunately.
Comment: The Flickr and Lightroom APIs are open. So maybe one day someone is going to write a better sync plugin.
Comment: Maybe! I haven't checked this in 4.3, maybe they've done it already..


How do I open multiple terminals?

Question: I just downloaded Ubuntu 11.04 and as far as I can remember, there was the option of opening multiple terminals in tabs in Ubuntu. I cannot discover this feature in 11.04. Also, as a general query, suppose I open emacs from the terminal, then I wouldn't be able to do anything else on that terminal as long as I have emacs running, so what is a good way to multi-task?
Answer: CTRL + Shift + N will open a new terminal window if you are already working in the terminal, alternatively you can just select "Open Terminal" form the file menu as well.
And like @Alex said you can open a new tab by pressing CTRL + Shift + T.
Comment: At least in Ubuntu 12.10, it's **CTRL + SHIFT + T** and Alex's answer states the same. Maybe you mistyped?
Comment: Perhaps... I don't know, this was such a long time, and I am not on an Ubuntu box to confirm whether it works or not...
Comment: @its_me I just used the command CTRL+Shift+N it works fine c:
Answer: right click on mouse and select open tab.
Answer: Check out Terminator as well. It's in the repo's
Answer: You may open a new tab by pressing Ctrl + Shift + T, or go to File ->New tab`.
Answer: To get the terminal back after you open Emacs or any other gui:

Return to the terminal (click on the terminal window)
Press Ctrl-Z
Run the command bg to unfreeze the gui

See also the jobs and fg commands.
Answer: You can also use a terminal multiplexer like byobu or tmux. Byobu is beautifully configured for Ubuntu out of the box. Tmux requires some initial configuration, but is (relatively) easy to customize. Think of it as a command-line program that can run multiple shells organised like tabs.
I prefer to use a terminal multiplexer over gnome-terminal tabs because I can detach and attach from anywhere. Examples:

Login to work via ssh, start a multiplexer with a few tabs. Open a file with emacs, start a huge download, etc. Detach the multiplexer, logout of ssh, go to work. Reattach your session and resume work right where you left it: emacs stayed open, your download continued while you drove to work.
Start writing your research paper (in LaTeX of course ;) on your desktop. Realise it's far too nice a day to be sitting indoors. Reattach the multiplexer session on your lappy outside and continue working.
Answer: There a Terminal Quicklist that has the option to open new tab.
Although it's not a new tab you can use the middle mouse on the launcher to open a new terminal.
I would also recommend you look into Tmux as this is a great tool for working in a single terminal screen. For example it will keep your session running after you logout from remote servers.
Answer: mssh - simple and effective, allows one to issue the same commands to all windows, i.e. to each ssh session.

How do I open multiple terminals?


Netbeans under ubuntu 19 fails to compile with jdk11, compiles but can't run with jdk8

Question: This problem is right at the edge of askubuntu and stackoverflow, so if you think it should move, I would appreciate help in moving it.
On ubuntu, Netbeans 10 is not working. On windows, the same version of netbeans works. On both platforms, the code will not compile with jdk11, but at least can use jdk8 on windows.
I installed netbeans under ubuntu 19:
sudo apt install netbeans

Here is what netbeans about shows:
Product Version: Apache NetBeans IDE 10.0 (Build 20190125-debian-10.0)
Java: 11.0.4; OpenJDK 64-Bit Server VM 11.0.4+11-post-Ubuntu-1ubuntu219.04
Runtime: OpenJDK Runtime Environment 11.0.4+11-post-Ubuntu-1ubuntu219.04
System: Linux version 5.0.0-23-generic running on amd64; UTF-8; en_US (nb)
User directory: /home/user/.netbeans/10.0
Cache directory: /home/user/.cache/netbeans/10.0

Netbeans will not build using jdk11. I downloaded jdk-8u221-linux-x64.tar.gz
and installed to /opt/jdk1.8.0_221
then if the project library is to set jdk1.8:

the code compiles, but still does not run. Under the run tab, it says it is using "project default" and when I click, it is always using the original system jdk11. I can select jdk1.8, but when I close that requester it never uses it.
To verify, I compile on the command line.
javac *.java
AssignmentList.java:1: error: package com.sun.javafx.collections does
not exist
import com.sun.javafx.collections.ListListenerHelper;

An empty program with a blank main does work, jdk11 merely does not work with swing, not sure what other libraries.
If I compile manually using jdk1.8, it works.
/opt/jdk1.8.0_221/bin/javac *.java
/opt/jdk1.8.0_221/bin/java WhateverProgram

How do I get netbeans to compile java under Ubuntu, and what is wrong with JDK11?
Answer: I am having the same issue with JDK 11, so I can't help too much with that, but I did figure out how to fix the issue with JDK 8. Go into Project Properties > Build > Compiling, and uncheck "Compile on Save".


What are the topics need to be covered by a free ebook for beginner/amateur photographers?

Question: Some of my friends and I were thinking of publishing an ebook in our native language to help local beginner and amateur photographers. We will probably end up with a series of books later on but as a starter we'd like to publish a book with technical aspects of photography (and lots of photos to help them understand the camera settings better) that someone who is planning to start or has just started photography will need. Any suggestions?
Comment: I suggest looking at existing books.
Answer: Here would be my topics

How to Hold a Digital Camera
How to buy the right equipment for you
Composure - Some basic rules and how to break them
Shutter/Aperture settings - How they affect your shot
Depth of field
Lighting and Exposure
How to use flash
What is ISO?
How to pre-focus and use auto focus effectively
An introduction to White Balance
Lenses and Focal Length
Printing Your Work
How to Clean a Digital Camera and Lenses

If that was a book when I had started I would have been very pleased
Answer: One approach would be to look at the top questions on this site, and to make sure those things are addressed in a helpful and organized way. You could even reuse the content from here, since all user contributions are licensed under the sharing-friendly Creative Commons Attribution-ShareAlike license. Translation into local languages is very much a part of what this license is intended to enable.
There are various ways to consider the top questions; one way, of course, is all questions sorted by votes, but I think the list of FAQ questions might be even more appropriate. I'm not sure exactly what goes into Stack Exchange's determination that a question is an FAQ, but the resulting list looks like a very good starting point.
It might also be interesting to look at Lesser Questions with Good Answers, or simply the Top Answers on the site. (Note that the data behind these queries is updated irregularly and approximately monthly; it may be slightly out of date, but for this purpose should be good enough.)
This may give you something slightly different than the typical "Get Started with Digital Photography!" book — but that's not necessarily a bad thing.
For bonus points (where "ponts" go towards making the world more awesome), you could contribute some of those "lots of photos to help them understand the camera settings better" back to the site under a CC-BY-SA license, making the answers here even better.
Comment: Makes me wonder if SE ever though about compiling QAs into a book of some kind.
Comment: @mattdm:: That's exactly what I was thinking but in a slightly different way. I have already checked the SE license and as soon as I decide on the TOC, I'll search for relevant answers and information from here.
Answer: If this eBook is targeted towards beginners, please do not make it too technical.
I would make sure to cover:

Brief History of Photography
Introduce Different Genres of Photography (Include Visual Examples of Each)
Tools of the Trade (Camera, Flash, Lens, Tripod, etc)
Exposure Triangle (Aperture, Shutter & ISO)
Composition
Conceptual & Creative Thinking
Equipment Maintenance
What to Buy & What Not to Buy (Emphasize that buying more gear will not make you better photographer)
Comment: I've never found camera manuals to be helpful in a tutorial sense. They're useful for looking up specific functions, but as a starting place, they usually don't have enough explaining for beginning users and not nearly enough depth for intermediate ones.
Comment: @mattdm I agree. But it is your camera specific resource, so when you hear advice like _Change AF mode to Continuous_ one should refer to the manual. I guess I should reword it to be _Know Your Camera_ instead of RTM.
Comment: I might need to revisit my list and add _READ THE MANUAL_ as number one item :)
Comment: I absolutely agree with you there.


Code text editor snapping problem

Question: Code text editor window does not snap. Every other app snaps. It doesn't matter if I use mouse or keyboard shortcut.
Answer: Code now snaps OK (at least in elementary Horus). I think it was due to the minimum window width being greater than half the screen width. If you are still having trouble try reducing the sidebar width or closing it altogether with <Control>\

Code text editor snapping problem