One word changes everything NLP

Question: I have a classification model (BERT) that classifies sentences as either question or normal sentences. But whenever a sentence has "how" word, the model chooses "question" class.
How can I solve this issue? (I have a very big dataset.)
Answer: Very likely, the majority of the sentences which contain "how" in your training data are labelled as question. It's probably a problem of representativity of the training set, because otherwise the problem wouldn't be this specific. But note that it's likely that your training data contains other issues a well, possibly there are errors in the labels.
Comment: Sure, it's very common: it's about the quality of the dataset used to train the model, in this case whether it's sufficiently representative. Often people simplify this problem by @canP saying that it's only a matter of size, assuming that if it's large enough it's probably representative. But this issue is something to take care of at the creation/collection of the dataset, this part doesn't involve any ML and is considered boring... probably the reason why it's not discussed much in ML books, I guess.
Comment: Thank you. But isn't this a very common problem? When I researched about it I couldn't see anything. I mean it does seem like I can face this issue any time. Why is there isn't any thread about this do you think?
Comment: Yea... It's like: For example, there are 2 classes: Cat and dog. There is always a watermark in the corner of the picture in dog-tagged pictures. So imagine this: there is a cat photo with a watermark on it. I have no idea what should i do if my model classifies the model as a dog. Maybe I will add watermarks to cat-labeled train data too. But I don't know if it's a good solution.
Comment: @canP the principle in supervised learning is that the model is going to be applied to some data with the same distribution as the training data. This means that if there is always a watermark on every dog image during training, it is assumed that the same condition applies during testing (or production). If it doesn't, then it means that the training data was not representative enough: it should at least contain some dog images without watermark, in order for the model to learn that watermark doesn't imply dog.
Comment: Yes, its very logical. So i should develop my understanding of "representative data" more i guess. Thank you!

One word changes everything NLP


Question about cooking meat from a beginner

Question: This is the first time that I will cook meat. My question is that in the method of boiling/simmering meat, the foam of fats I see and I remove it with a large spoon. If I use another method for cooking meat (such as frying or grilling) will the fat remain in the meat?
Comment: If you want low fat meat cooking methods make little difference, you need to start with lower fat cuts.
Comment: Hi huab, we only take one question per post. You can use the small grey "Edit" link below your post to leave only one question, and we can then reopen. We can post the other one separately. By the way, we don't take question on "what is healthier", but if you want to know something measurable, like whether the fat content is reduced by your method, then we can take the question, preferably without references to health.
Comment: ah ok, that would probably be a stew... Even then, browning the meat first gives it a richer flavor. You can also drain some of the fat at this stage if that's your intent.
Comment: @rumtscho I click delete multipe times but nothing happen
Comment: @huab yes indeed, deletion is prevented when you have gotten good answers, see https://meta.stackexchange.com/questions/5221. You don't need to delete though, the idea is that you edit it so only one question is left out of the two.
Comment: Side note: if you're just starting with cooking meat, boiling usually will not bring out the best flavour. At least brown it (fry / grill) first.
Answer: What you are skimming certainly is some fat, but it is probably mostly comprised of denatured proteins. We can't answer questions about healthy or not on this site.  That is all relative to you and your preferences. Salt enhances flavor.  Salting well in advance, removes moisture, concentrates flavor, and enhances flavor by penetrating the meat.
Comment: @JulianaKarasawaSouza ....perhaps....it really depends on how much you use in the first place.  When I salt a chicken two days prior to roasting, for example, I don't rinse or remove any salt.
Comment: To add: the salt is then partially removed so the meat doesn't end up *too* salty
Comment: that's true. Absolutely no point in removing any salt, coarse or fine, 2 days after salting, a lot of migration already happened in that interval, completely different salting techniques


Can I use resistors/capacitors to delay when a circuit turns on?

Question: I switched some electronic candles to be powered by a power adapter instead of batteries but when I power them up I noticed they all now "flicker" (which is a feature) at the same rate probably because they all use the same circuit. With batteries this isn't a problem because you'd turn them on/off at different times but now they all turn on at the exact same time when I plug it in. Is there a cheap way to delay these at different rates, possible with simple passive components?
Comment: I have 15 candles that I want to power on a timer so manual switching is not an option.
Comment: These candles have a look up table that it cycles through to simulate a random flicker.
Comment: Yes you can, given the right circuit.
Comment: If the flickering is started based on when you power on the circuit, why not just install a switch for each candle instead of having a single power on point?
Comment: Have you tried to change a bit the capacitors ? I see two of them, maybe one is related with the system clock? Edited , the ceramic smd is not , it's on the supply voltage line.
Answer: This is impossible to do well with only passive components. It would require that your candles switch on/off at a precise voltage threshold, plus an RC circuit which is able to source any sensible amount of current with a delay of several seconds will have ridiculous component values.
Instead, you could implement one of the NE555 timer delay circuits, which can be easily found online. Or you could design a circuit yourself. You will need:

an RC divider to create ramping up voltage
a comparator to transform that voltage into a digital signal
a voltage divider to generate the threshold value for the comparator
an active switch (BJT, MOSFET) which would switch the candle on based on the digital signal
Comment: I'd have to source some TTL 555 right? I think I only have cmos as they're common.
Answer: Maybe something like that is good? Put higher C values for higher delays. You will have ~1s delay for each 50uF added. Take a ~1V voltage drop on Q into account.  Use the link "simulate this circuit" then in "Run" menu "Time domain simulation" to see the results. Use lower resistors and higher capacitors if your candles ar drawing more than 10mA.

simulate this circuit – Schematic created using CircuitLab
Comment: Using a darlington pair would work even better, since you'd be able to increase R (and reduce C) for the same delay and load current values.
Comment: Yes if the voltage drop is not an issue. He can also make combinations of R and C values for various time constants not being limited by the Q1 base current.
Answer: The easiest way me be directly to change the capacitor value on the candle, which will change the behaviour of each candle.
If not, a RLC circuit may solve your issue!
Comment: You have the schematic for these candles, do you?
Comment: *"The capacitor"*. Which are you referring to?
Comment: Of course it depends of the candle and of the schematic, but I've a similar device (a  snowman with a light for xmax) with a small IC and only 4 other components (2 resistors and 2 capacitors). Since in my case this is a crap pcb , it's very easy to put another capacitor in parallel to observe behaviour.
Comment: @golgot These candles don't typically have an accessible circuit. Usually just a blob circuit. Or more recently the circuit is embedded inside the LED
Comment: I posted pictures, so there are some smd caps on that back of the board.
Answer: You can use a simple RC timing circuit for each candle and you can change the value of each capacitor to get the desired delay
Comment: How big of a delay would this give though?
Comment: You can use this equation T = 5*RC                                                        T:Is the time required for the capacitor to charge to the supply voltage(more precisely about 99.99% of the supply voltage)


Get the Joomla database connection to a connection variable

Question: I am new to joomla and I want to create a table in joomla database manually with the data and get those details to an article in joomla. Before that as my knowledge we need to get the database connection to a connection variable. I searched in the locally installed Joomla directory to find a file containing the database connection code base. I want to know is there a way to get the connection into a separate variable as follows
Comment: @Zollie got your point with full respect.
Comment: I'm glad that you have a purpose now in life, but please include your code samples what you already tried to achieve the goal and point where exaclty you are stuck with it. You are on stackexchange now.
Comment: @Zollie I have updated the question.
Comment: Then you got two nice, useful answer. This is how it works. Review them and with clicking on the tick at the top left side of the answer you can accept the most helpful and useful. Or leave the replyers a comment on their answer if you need more clarification on the answer. This way you can help the volunteers and yourself too. Thank you and welcome on Joomla stackexchange!
Answer: To get started with querying the Joomla way, you'll need a database connection object.  All the heavy lifting is already done for you.
<code>$db = JFactory::getDbo();
</code>
Using this object, there is a sea of methods that can be chained to it.
Normally, the next step will be to declare a new query object.  This object also has many methods which allow you build a valid mysql query.
<code>$query = $db->getQuery(true);
</code>
After this, you'll need to see the documentation about how to convert raw mysql syntax to Joomla's query building syntax.
https://docs.joomla.org/Inserting,_Updating_and_Removing_data_using_JDatabase
To give you a pool of working snippets with explanation and error reporting, search this site for my answers to mysql questions.  All of my answers are tested to be correct, unless I express in the post that my snippet is untested
https://joomla.stackexchange.com/search?q=user%3A12352+%5Bmysql%5D
I am confident that my answers will help you to find clarity.
Comment: Yes, it worked like a charm. Very useful answer.
Answer: To achieve what you want in Joomla! way, you need to develop/create a Joomla! content plugin, Joomla! documentation is excellent guide to complete this step: https://docs.joomla.org/J3.x:Creating_a_content_plugin
Then, you need to know how to select data from database tables, also Joomla! documentation has a good tutorial to read in this context: https://docs.joomla.org/Selecting_data_using_JDatabase
Comment: I have completed the task only by using the second step. Is it necessary to do the first step as well because from the second step I completed my task.
Comment: It is necessary to have a reusable and permanent solution, most probably you have hacked a Joomla or another extension file, where all changes will be lost on the first Joomla/Extension update.
Comment: Got your point.


Polarization on a spherical electromagnetic wave in free space using classical electromagnetism

Question: The polarization of a plane wave traveling in free space is well defined and traverse to the direction of propagation from classical electromagnetic theory.
Spherical waves are another type of frequently used solutions. However, I am finding it difficult to visualize how are the polarization vectors arranged over the spherical wavefront, referring to the hairy ball theorem.
Comment: Zangwill's discussion is in Section 16.8.  I may write a summary at some point, but it'll require some thought before I can do so.  In the meantime, check out [Transverse wave vs the hairy-ball theorem](https://physics.stackexchange.com/questions/366214), [How do you make a spherical radio wave?](https://physics.stackexchange.com/questions/251971/), and [How do coherent isotropic radiators evade the hairy-ball theorem?](https://physics.stackexchange.com/questions/311859/)
Comment: If memory serves, there's a comment in Zangwill about this very subject.  I'll try to remember to look it up when I'm in my office on Monday.
Answer: A realistic antenna is a dipole. The dipole radiation has no field in the directions you would expect singularities from the hairy ball theorem.


How many processes can listen on a specific port?

Question: How many processes can listen on a specific port such as 80 ? and how the child processes of some application can use the same port to listen on ? Is there any difference between listening on a port or establishing a listening connection ?
Answer:
Q: How many processes can listen on a specific port?

A: as many as you can spawn.
However for SOCK_STREAM sockets at least, and unless you use the SO_REUSEPORT option (new in Linux 3.9), a process cannot bind a socket to a local endpoint (address+port for TCP, filename for Unix...) if there's already another socket bound on that (or a listening one on that port with the wildcard address).
So unless you use SO_REUSEPORT, the only way to have different processes listen on the same port is to have their corresponding file descriptors pointing to the same open file description (to the same socket).
That happens automatically when you fork() a process. If fd 3 points to a listening TCP socket on the wildcard address and port 12345, both processes after the fork will be listening on that port on that fd (zsh syntax below):
$ zmodload zsh/net/tcp
$ ztcp -ld 3 12345
$ sleep 10 &
$ lsof -ni tcp:12345
COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
zsh     26277 stephane    3u  IPv4 506354      0t0  TCP *:12345 (LISTEN)
sleep   26988 stephane    3u  IPv4 506354      0t0  TCP *:12345 (LISTEN)

For processes that are not related, the only way  (that I know) for a process to get access to that listening socket would be to use the SCM_RIGHT mechanism to pass fds (actually more like open file descriptions) between processes using unix domain sockets.
You'll notice that one argument to listen() is the backlog.
As soon as there's a socket listening on given endpoint, the kernel will start accepting incoming connections to that endpoint (the backlog is a hint to the kernel as to how many it may accept that have not been accepted by applications).
Then the first process that does an accept() on any of the fds that point to the listening socket (or any of the listening sockets with SO_REUSEPORT) will get the incoming connection. accept() creates a new socket, and returns a new fd to that socket. In turn, that fd can be duplicated (a new fd pointing to the same socket) and children processes will inherit that connected socket like they would the listening one.
Answer: This answer discusses TCP on IPv4.
Only one process can listen for new connections. You'll get an "address already used" error if more than one processes attempt to claim the same port.
This is totally different from the amount of processes that are actively using that port.
Have a look at the following output:
remote          local        state
*:*           - 22.214.171.124:5000 LISTENING
126.96.36.199:12345 - 126.96.36.199:5000 CONNECTED
184.108.40.206:83247 - 22.214.171.124:5000 CONNECTED

What needs to be unique, is the 4-tuple (remote-ip, remote-port, local-ip, local-port). As the (remote-ip, remote-port) in the LISTENING state is a *:*, only one process can listen.
The listening application will start a new thread/task/process on each incoming connection.
Comment: You can bind to specified address only as well (rather than to `*`) and remember that IPv4 and IPv6 are separate stacks.
Comment: You can have several processes listening on the same protocol:address:port as long as it's on file descriptors sharing the same open file descriptions (like children inheriting fds, or fds passed with SCM_RIGHTS).


How to replicate data from /dev/log on to multiple rsyslog receivers

Question: I want to run multiple instances of rsyslogd (on different network namespaces [netns]). rsyslogd reads from /dev/log, and once a process reads, the socket is drained and another instance doesn't have anything to read!
Is there any way to make one (say, master) instance of rsyslogd to replicate
syslog messages to other local (slave) rsyslogd instances ?
If this can be achieved in any other way, pointers/suggestions welcome. Since rsyslogd itself doesn't support Linux netns, looks like the only way to send
out syslog messages on different namespaces - is to run multiple instances of rsyslogd.
Answer: You should be able to use any of several of rsyslog's output modules to do this. For example (stolen shamelessly and slightly modified from rsyslog.conf(5)) on your master:
*.*  :omrelp:192.168.0.2:2514
*.*  :omrelp:192.168.0.3:2514
*.*  :omrelp:192.168.0.4:2514

Would have the master send all syslog entries to the rsyslog running on those three IP addresses, which need to be configured like:
 $ModLoad imrelp
 $InputRELPServerRun 2514

(Note the *.* is a normal log selector, so you can limit the messages forwarded—e.g., local0.* :omrelp:192.168.0.4:2514 will forward only logs send to the local0 facility).
PS: What you're doing is a little weird. Normally people want to centralize logs. Depending on why you're doing this, you might actually want one of the other output modules (e.g., maybe you want to send your logs to a SQL database which programs in all the different namespaces can connect to and query).
PPS: There are other ways to handle this too—which sockets rsyslog reads and writes to are fully configurable. There is fairly extensive documentation on their web site, and of course probably in /usr/share/doc on your system as well.
Comment: Thank you. I will try the `omrelp` approach. Regarding what I am trying - I am not sure if this is the best approach, if there are other recommended best practices, please suggest/point me to the same. If we use a SQL DB, maybe I need to create a separate daemon to pull out the logs and send out on different namespaces ? My only intent is, the host should be able to send out `syslogs` on different network-namespaces (different networks, not reachable from the default namespace)


Ubuntu 14.04.3 LTS with Windows 10 UEFI GUID custom installation

Question: I have used Ubuntu for many years and someone gave me a computer with Windows 8, later updated to 8.1 and, finally, to 10.
The thing is I want to install Ubuntu LTS (14.04.3) alongside Windows 10 (dual boot), and because of my personal circumstances I need to use the "custom installation" feature. UEFI boot, guid/gpt partition table. The ubuntu live pendrive is booted in UEFI mode. When I started the custom installation it asked me where to install grub. I selected the whole disk (dev/sda) and continued. When it finished and rebooted, it booted into Windows 10, and Windows 10 doesn't recognize any other OSes. It's because of the UEFI partition, with only Windows boot manager installed. So what do I need to do in order to install grub in the UEFI partition without deleting Windows Boot Manager? Do I just have to select "Install GRUB in dev/sda2 (UEFI partition)"? Will it keep Windows Boot Manager, as said in the UEFI wiki article? (I have read many post and the uefi article but none of them say what to do in my case.)
Thanks
Quotes from the wiki:
"If your disk already contains an ESP (eg if your computer had Windows 8 preinstalled), it can be used for Ubuntu too. Do not format it."

"Note that in a UEFI-mode installation, Ubuntu will not ask you where to install the boot loader. If it does, or if it complains about the lack of a BIOS Boot Partition, you've probably accidentally booted in BIOS/CSM/legacy mode."
Comment: From live installer does this show an ubuntu entry in UEFI? `sudo efibootmgr -v`? You have to boot in UEFI mode and may have to add efibootmgr with `sudo apt-get install efibootmgr` What brand/model system.  Installing to sda is correct and with UEFI it knows to put boot files into the ESP - efi system partition.
Comment: It's an HP ENVY m6-1103es. So should I select sda and not the efi partition? When using that command I read [this](https://drive.google.com/file/d/0B2VyXbS7LdMJeEdQOWtGWlFBSm8/view?usp=sharing). (Unidad de disco duro USB=USB hard drive unit)
Comment: HP's only boot Windows with default settings, you need one of the work arounds that have been found. Most copy grub or shim to bootx64.efi and boot a hard drive entry. Some like rEFInd: http://askubuntu.com/questions/486752/dual-boot-win-8-ubuntu-loads-only-win/486789#486789 and: http://askubuntu.com/questions/244261/how-do-i-get-my-hp-laptop-to-boot-into-grub-from-my-new-efi-file
Answer: Ubuntu 14.04.3 LTS with Windows 10 UEFI GUID custom installation
Details of the system in which I have successfully installed Ubuntu 14.04 LTS:

DELL Inspiron 11 (2-IN-1, 3158)
Processor - Intel core i3 - 6100U
RAM - 4.00 GB
UEFI secure boot enabled
HDD - 500GB GUID
Pre-installed OS - Windows 10 Home Single Language

Steps to install Ubuntu 14.04 LTS alongside Windows 10 and without overwriting Windows Boot Manager:
Pre-requisites:

50GB un-allocated HDD space
Bootable USB of Ubuntu 14.04 (64bit)
Disable "Turn on fast startup" in Windows 10

Installation Procedure

Boot system with Ubuntu 14.04 USB in 'UEFI secure boot enabled' mode.
Select Live session.
Double click 'Install Ubuntu' icon on desktop to begin installation.
Installer will auto-detect the presence of Windows boot manager and present applicable options for Installation type.
Under Installation Type, select "Something else" and continue.
Next screen will show the current partitions available on the HDD. Select the un-allocated space and create partitions as described in next steps.
UEFI partition : 250MB
Boot partition : 250MB
Root partition : 48GB
Swap: remaining space
Important step: To install boot loader: Select the UEFI partition which was created in above steps. Do not select the existing UEFI partition which is used by Windows 10.
Continue to begin the installation.

Once installation is over, reboot the system.
You will see GRUB loaded with the options to boot Ubuntu or Windows 10.
At this step, you can verify that both the OSes are working fine.
Now, reboot the system again and enter into the UEFI settings by pressing appropriate button during boot-up (in my case it is F2).
You will observe that there are multiple options in the UEFI boot menu.

Ubuntu
Windows 10
And one or two more entries

Now make Windows 10 as the first option for booting.
Save the settings and exit UEFI setup.
You'll observe that now Windows 10 is booting directly without giving any selection option for Ubuntu.
Since, we have not used the Windows 10 UEFI partition, so windows boot manager is intact.
Now, in order to boot Ubuntu, press F12 (in other laptop models it may be different) during system startup to see the UEFI boot menu.
Select Ubuntu to boot.

Note: ST Microelectronics 3-axis digital accelerometer was not detected by Ubuntu 14.04, so automatic changeover to portrait mode will not work in table mode.
Comment: Welcome to Ask Ubuntu! Nice first answer :D
Answer: There are few things to be considered, may be these can help you.
-As of my experience UEFI installation does not ask whether to install grub, it is automatically installed on your EFI partition.
-In order to check if your ubuntu installation has completed properly you can boot ubuntu live, mount the EFI partition and check whether grub is present there.
-If grub is present then goto UEFI boot menu and check if ubuntu is selected instead of Windows Boot Manager in the 1st boot order.
-Last but not the least, rather than installing alongside windows i would prefer you to create two separate partition for the ubuntu installation viz. swap (nearly size of your RAM) and ext4 (for your ubuntu installation with your desired size) and during the installation choose manual option and use that created partition for ubuntu installation. You can create new partition  by shrinking your existing partition from windows in disk management tool without loosing your data or you can also use gparted from live ubuntu.
Comment: -I don't know how to check if grub is in UEFI. How do you mount it?  -I used the "Something else" feature and I had already created the swap partition. Maybe that's why it's asking me where to install the boot manager.  -In my UEFI settings I can only tell the computer to boot from the UEFI partition, I can't choose between Windows Boot Manager and Ubuntu.  Thanks for your help!
Answer: My toshiba (EFI/GPT) started with pre-installed w8.1, and using a usb stick (unetbootin), I simply shrank w8 into a 40 GB 'broom closet'  and then installed Mint (Ubuntu).
I then had to use boot-repair-disk (see below) to stop windoze always behaving like it was the only kid on the block.
The usb was prepared using unetbootin in w8.1 and thus probably automatically booted in uefi mode, and installed its boot loader directory (and grub/loader) therein.
If you can log into your Ubuntu installation, open a terminal and
cd /boot
ls -al
look for a directory called efi (if it isn't there, your ubuntu isn't a uefi installation)
If efi is there,
cd ./efi
ls -al
and you'll probably see yet another set of directories, including one called EFI so
cd ./EFI
and look for a directory called ubuntu
If it's there, your ubuntu is pretty definitely installed under uefi, and all you need is to download a copy of boot-repair-disk (google it) prepare a bootable usb via unetbootin in windoze - boot it and follow instructions.  (boot-repair may already be on your ubuntu install pendrive)
If you haven't actually finished installing Ubuntu, go back into windoze, google unetbootin and install it, re-prepare your pendrive with your ubuntu iso using unetbootin in windoze, shut windoze down and boot into the pendrive, use gparted to shrink windoze main partition create ext4 partition and swap and 'manually' install ubuntu in the ext4 one.
Then reboot.
You may find yourself only offered windoze, and if so, download boot-repair-disk, re-do your pendrive using unetbootin and your boot-repair-disk iso.  reboot into that, and follow the default instriuctions.
Everything should be ticketty boo.
Hope that's some help
;)
Comment: I've installed Ubuntu (with the swap partition) and the installer said:  "Ubuntu is installed, reboot"  I rebooted and found Windows, so I would need more info about how to do what you say in the last paragraph, and then I guess it boot into Ubuntu with no problem. Can you tell me more about what to do with boot-repair-disk? (I can't boot the non-live Ubuntu)
Comment: http://sourceforge.net/projects/boot-repair-cd/

Download boot-repair and also unetbootin in windows.
http://unetbootin.github.io/
Comment: http://sourceforge.net/projects/boot-repair-cd/

      Download boot-repair and also unetbootin in windows.
http://unetbootin.github.io/

      Use unetbootin to prepare a bootable usb from the boot-repair iso

      Shut down windows, insert the usb, and power on while pressing f12.  choose the usb and boot from that.  It should lead you by the hand.

      Let me know how you get on.
ed.
Comment: P.S.  If you go through the installation process again, when asked where to install bootloader, the answer is in all probability SDA, especially if you've only got one hard disk.


What does real and imaginary part of wavefunction signify?

Question: Does real and imaginary part of wavefunction carries any physical interpretation?
Comment: Well, physics is invariant if the wavefunction is changed by an overall phase factor.
Answer: A complex number $x+yi$ can be written as $re^{i\theta}$. The real and imaginary parts do not matter as much as the modulus $r\geq 0$ and phase $\theta$.
The phase factor does not on its own affect probabilities of observing something observable, since they are calculated as $|z|^2=r^2$, but when adding wavefunctions it can interfere in ways that are observable (e.g. two electron orbitals with opposite phase will produce a sum of zero, indicating that the electrons repulse each other).
As Qmechanic pointed out, physics is unchanged if everything is multiplied by an overall phase $e^{i\theta}$. So there is nothing to distinguish our standard real-imaginary coordinate system from any rotated coordinate system.


Is it possible to play imm4-codec videos?

Question: Is it possible to watch imm4 codec encoded videos in Ubuntu?
Comment: what version of ubuntu?
Comment: can be 10.04 or later
Comment: Accepted Answer below works for Ubuntu 32bit only
Answer: The imm4 codec is a restricted codec - covered by patents, so for some countries you should check if you are covered to run this decoder.
note I've tested this on 11.10
Install the restricted Medibuntu repository:
sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update

Now install mplayer and w32codecs
sudo apt-get install mplayer w32codecs

Now the important part - mplayer is coded to look for the windows DLL VCMIMM4.dll, however, medibuntu installs a lowercase version that mplayer would not recognised out-of-the-box.  Thus to fix this, create a VCMIMM4.dll file in the codecs folder.
sudo ln -s /usr/lib/codecs/vcmimm4.dll /usr/lib/codecs/VCMIMM4.dll

Now play your video - e.g.
mplayer http://samples.mplayerhq.hu/V-codecs/IMM4/200707170736151.avi

Comment: I can confrim that fossfreedom solution it works on 32bit. It does NOT on 64 bit because w64codecs only contains a handful of realplayer codecs and does not fully replace w32codecs. If you need to play a format only supported by w32codecs, you will need to install w32codecs to /usr/lib32 and use a 32-bit version of mplayer (or an alternate method for running 32-bit apps, such as a chroot or virtualbox) https://help.ubuntu.com/community/AMD64
Comment: Will this work on a 64bit install or only 32bit?
Comment: I've only tested this on 32bit.  I think there is "w64codecs" package - give it a try if you have 64bit ubuntu.


Adding a Path to $PATH

Question: My java files are in /home/joe/Learning/Java folder, but can not run them in home directory. Works fine when I change to the specific directory.  How can I add this to my $PATH.  I tried so many. but no avail. Can someone help
Comment: Did you right click the file choose properties and make it executabe
Answer: If you want to run files locally without adding the path to your command, an easy way is to store them in ~/bin.
Make sure they are executable.
Another way is to create a link in ~/bin to the file (ln -sf)
I think this is the most appropriate way for a "learning" file as you mention it.
Comment: This is good advice you can move you files from terminal like this sudo cp -R /home/joe/Learning/Java/FILENAMEHERE ~/bin
Comment: The sudo will not be needed to copy them locally, and the file needs to be on the first level.

Adding a Path to $PATH


Looking for the title of a sci-fi novel about an alien who crash lands on earth and the mysterious fuel required to restart her spaceship?

Question: I was recommended this sci-fi/fantasy novel, but have lost the title. The plot, as was described to me, involved a female (?) alien who crash lands near/in a town and how a man (?) helps her find the fuel she needs for her spaceship so she can leave again. Apparently the ending is a bit of a twist, involving what the fuel actually is and the alien's relationship with the human. Referred to as a bit feminist, but that may have just been my recommender's take. A faint memory of the title involving the word "red" or "rose" but the plot is really all the clue I have. Thank you for your help!
Comment: The film District 9 has a slight familiarity in an odd way.  I don't think this was ever a book. https://en.wikipedia.org/wiki/District_9. There is a parent, a flower, fuel, crashed space ships, alien human friendship, all common threads I suppose.
Comment: I am reminded of John Boyd's "The Girl with the Jade Green Eyes," where the lovely Kyra Lavaslatta and her crew from the destroyed planet Kanab need "a spoonful of uranium" to refuel their colonization ship. "A bit feminist," yes, but in that strange way that also comes through in Boyd's "Sex and the High Command."
Answer: I believe you may be recalling a Theodore Sturgeon story, "Tiny and the Monster".  The plot revolves around an alien whose ship has crashed outside a small town and is disabled.  Tiny is a girl who can communicate with the "monster" inside the ship, and is working with her engineer/mechanic friends to try to help fix the ship.  Problem is, the repair requires replacing a tungsten casting -- and you can't cast tungsten.
This story can be found in Thunder and Roses: Volume IV: The Complete Stories of Theodore Sturgeon, available to read online through Google Books  It's not a novel, but it's a longish short work (I'd call it a novelette or novella).
Comment: My apologies. Nothing personal, just an ordinary Google-hater here. I wasn't sure how serious you were about "Tiny and the Monster" being the answer to the OP's question. From my vague recollections of reading that story years ago, I can't recall anything about it that matches the OP's description, outside of being a story about a shipwrecked alien needing an earthling's help to get back into space. And I thought Tiny was a dog, not a girl. Time for a reread.
Comment: Been a very long time since I read it, too, and I just read a short excerpt at the link I posted -- you might be right about Tiny being a dog, but there's a significant female character communicating with the alien, even if she isn't Tiny.  I was and am banking on conflation.  Hopefully the questioner will read the linked story and we'll both find out if that was the one they remember.
Comment: Thank you immensely! I've been trying for days to recall the author and the title of this story when accidentally stumbled upon this answer of yours. The story shocked me when I read it in my late teens, some 20 years ago. The alien was a telepathic dog who came into contact with a human woman Alister, a metallurgy scientist. Being unable to talk human, the dog by just barking before Alister's bookcase succeeded in explaining how to cast tungsten.


Can discrete wavelet transform for denoising purposes be implemented in real time?

Question: I have been researching effective algorithms for denoising biomedical signals (non-stationary) that can be implemented in real time either using FPGA or DSP. I can across many suggestions for algorithms and effectiveness but found DWT to be the one that can denoise most of the noises I am interested in (power line interference, surge, power dips..)
I used the wavelet toolbox in matlab and performed denoising and wanted to make sure that this method had been implemented effective before as real-time.
I read few papers too but want more opinions.
Comment: Hi! Welcome here. Asking for opinions is explicitly off-topic. However, of course you can do that. Why would you believe that's not the case?
Comment: Thank you for the comment, sorry first question on this forum. I just wanted to make sure it is implementable before diving deep into the implementation and missing on more effective algorithms instead for this specific purpose.
Comment: Tim's answer suffices, but just for my self-gratification i'll add this:  there are two reasons that some process is not real-time: 1. inherently non-real-time and the best example i can think of is these time-compression and time-stretching (without changing pitch) algorithms.  2. non-inherent reasons such as someone's CPU or DSP or hardware is too wimpy.
Comment: Any more details needed before *deep diving"?
Comment: If you turned this question from "Can ... be implemented in real time" to "How can I decide if my candidate wavelet transform be used for my real-time system" then it will no longer be opinion-based, and it can be opened again.
Comment: I'll post it as a new question and delete the comment.
Answer: Even though I'm not much of a wavelet expert, I can answer with a definitive YES!!
Now, do you have any messy details to complain about, like the size of the box, the power that it consumes, or the number of frames of delay between the taking of the image and its display?  Because that's your real problem.
Take the particular wavelet transform you want to use.  Sit down and with pencil and paper figure out how many calculations (floating point operations, basically multiplies and adds) that need to be performed per frame.  Look to see if the transform you want to use works with the fast wavelet transform.  Multiply the FLOP per frame by your frame rate -- you should have an answer in MFLOPS or GFLOPS.  Now hold that up against available processors or FPGAs, and figure out what needs to be in your box.  Then multiply by three, because it always takes more real estate to do a calculation than you think.
Answer: Strict real-time can be complicated, but it definitely is doable with a controllable delay. Some call that practically real-time or almost real-time. You will easily find wavelet   FPGA implementations for video compression or processing for instance.
I would like to underline that overcomplete or redundant wavelets can be a bit more complicated to implement, but could definitely have improved performance for denoising. An example can be found in Redundant wavelet processing on the half‐axis with applications to signal denoising with small delays: theory and experiments, and I think a related code can be found implemented in Scilab/Scicos (similar to Matlab) at Real Time De-noising with a Left Wavelet Transform.


Difference between interaction, Heisenberg, and Schrodinger pictures in layman's terms

Question: I want to teach a kid about the difference between the interaction, Heisenberg, and Schrodinger pictures of quantum mechanics. Can I explain this concept without using equation? Is there any specific condition in which we use these pictures. If yes then what they are?
Answer: Here's a long shot that may work for some kids.
The general idea you want to get across to kids with these three different pictures is that you can think about a physics problem in multiple different ways but still get the right answer.
Here's the analogy.The different pictures are like different ways of thinking about how the earth rotates. The physical question we are trying to answer is if someone is standing on a fixed spot on earth then how long do they have to wait for it to be light, and then go dark, and then be light again (12 hours on the equator and equinox etc. etc.)
In one picture, the solar system picture, the sun stays still in the same place but we see the earth rotating around at one revolution per 24 hours. From that we can figure out that the part of the earth the person is on is facing away from the sun for 12 hours.
In the earth picture, the earth is staying still but the sun is going around and around the sun. In this picture it takes 24 hours for the sun to go around the earth so we would also conclude the sun would be on the far side for our person for 12 hours.
The interaction picture is what someone flying in an airplane would use. Someone on an airplane would see the earth rotating backwards below them and the sun rotating forwards above them. They would need to work out some math but I think they would be able to figure out how long it takes the sun to go around someone who is standing still on the ground.
edit:
If you truly want to explain the Schrodinger, Heisenberg, and interaction pictures as they're used in quantum mechanics to children, well, I don't really see the point. They are different ways of calculating mathematical quantities needed to answer physical questions in quantum mechanics. Basically the Schrodinger picture time evolves the probability distribution, the Heisenberg picture time evolves the dynamical variables and the interaction picture time evolves a little bit of both. However, I don't really expect children to understand the concepts of time evolution, probability distributions, or dynamical variables..
Comment: Can you please give a bit more about the last four lines of your explanation?that you mentioned about evolution. That is for my own understanding
Comment: In the Schrodinger picture the wavefunction evolves as a function of time (because of the Hamiltonian). In the Hiesenberg picture the operators evolve as a function of time (because of the Hamiltonian). In the interaction picture part of the time evolution is carried by the wavefunction and part of it is carried by the observables. The Hamiltonian is in a sense "split" between the wavefunction and the operators. If you don't understand the different pictures at this level then it will be hard to explain these things to kids. A deeper explanation may require a different question on the site.
Answer: Let the kid explore Google maps while you drive.
Schrodinger did not like the idea of the Earth moving and rotating all the time, he preferred a fixed map with North always pointing North, so our blue dot really traces a path along the fixed ground. You can think of a camera in geostationary orbit. Our position and orientation in space
is the same as our position and orientation on the screen, and that changes over time.
Heisenberg however was all about the navigation mode: the camera is like a bird flying right over you, facing whichever way you're facing. Have you noticed that you stay in the same place on the screen in that mode? And it helps if you have this mentality Heisenberg had of "I want to know exactly what everything looks like around me." They are egocentric coordinates, they turn your location into a fixed spot on the screen so that if you turn around in a circle really the map twirls around you. So our position and orientation on the screen is fixed, and our definition of what "top of the screen" means is what instead changes.
Sometimes physicists want a perspective halfway between the two: the map moves, but only very predictably. In this case the camera is a bird who follows the road at the average speed of traffic. So if you go faster than average you still move forward across the screen, if you go slower than average you're drifting backwards, if you spin around in circles the map no longer rotates especially. It still has a lot of the Heisenberg picture since it mostly follows you around and turns with you, but it has a predictable map movement, the way Schrodinger liked.


Can't give VirtualBox guest OS access to host physical LPT1 port

Question: Preface:
I've just put a 64-bit Windows 10 machine (a Dell Optiplex 760) in an office to replace an old 32-bit Windows XP PC.
The PC needs to be able to print to a very old dot matrix printer - a Star LC100. No 64-bit drivers are available - only a 32-bit one. It emulates an Epson EX-800 (not XP-800). This printer is required as it prints to fabric labels that are washed. The impact of the dot-matrix means the ink does not fade.
I've tried using the Generic Text-Only driver on the host but it gives me an error and fails to print.

So I've installed VirtualBox and 32-bit XP on the host, which does have a Star LC100 driver. I'm now trying to give the guest OS access to the physical LPT1 port.
Following this guide, I've ran the following commands:
cd "c:\Program Files\Oracle\VirtualBox"
VBoxManage modifyvm "XP" --lptmode1 "LPT1:"
VBoxManage modifyvm "XP" --lpt1 0x378 7

But now when I try to start the VM, I get the following error:
Parallel#0 could not open 'LPT1:' (VERR_FILE_NOT_FOUND).
Parallel device 0 cannot attach to host driver (VERR_FILE_NOT_FOUND).

Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

I've also tried running CMD and VirtualBox as Administrator with the same result.
How can I give the guest XP OS access to the physical host OS LPT1 port? The port shows up on the host OS' Device Manager.
Answer: While the linked to guide shows examples such as the following:
VBoxManage modifyvm "My VM Name" --lptmode1 "LPT4:"
VBoxManage modifyvm "My VM Name" --lpt1 0x378 7

And the original poster then ran these commands:
VBoxManage modifyvm "XP" --lptmode1 "LPT1:"
VBoxManage modifyvm "XP" --lpt1 0x378 7

It seems based on this bug ticket and this specific comment the command should be as follows; note how the : is dropped from the --lptmode1 "LPT1":
VBoxManage modifyvm "XP" --lptmode1 "LPT1"
VBoxManage modifyvm "XP" --lpt1 0x378 7

That said, the original poster solved their own issue by switching to VMWare. But this kind of bug seems pesky enough that it is worth clarifying a solution for any VirtualBox users that might stumble across this in the future.
Answer: In the end I used VMWare Workstation Pro 12 which had GUI support for adding an LPT1 port and worked brilliantly, straight out of the box!
I chose VMWare because although Virtual PC supposedly supports LPT ports, it cannot be installed on Windows 10 as Hyper-V has replaced it; which does not have the support for LPT.


Can recurring initial payment period be changed after purchase is made?

Question: I've installed the drupal commerce framework and the Commerce recurring framework (it's awesome), and i've created a recurring product. That said, someone just made a purchase, and I realized that I accidentally set the initial period as 1 year (and it should be one month). I've since corrected it, but if someone has already purchased the recurring product, how can I change that period? Will it update for existing orders? If not, where can I go to change it for specific orders?
Answer: According to the official documentation

Recurring process
When an order containing a Recurring product is purchased for the
  first time for the current user, by default the module reacts on
  "Order is paid in full" event, a Recurring entity will be created
  associated with that product for the current order.
On a cron event, the recurring entities with past due dates are
  retrieved and an order is created for each recurring entity associated
  with the recurring product and customer.
Note: When this cron event runs it's the time to trigger the payments
  or use another technique to build a queue of payments.
All this process is driven through Rules so most of it is modifiable

So from reading this, looks like all you gotta do is check the recurring entity that was created for that particular order and see if the due date is 1 month from now or if it's still 1 year from now. If the latter, then edit it and change the due date to 1 month from now.
Comment: I changed the product's initial period to "1 month" yesterday, so the customer should've been charged again today (1 month from the purchase date) but that didn't happen? :/
Comment: I just looked in the report logs, and it looks like it tried to do the recurring order on cron run. The system says "Payment failed (Hard Decline)". That said, is this because the person's card was declined? Or is something wrong with my system? I checked the report logs, and the following errors were thrown upon cron run: "Unable to evaluate action commerce_recurring_provide_order_properties," "Unable to get variable commerce_customer_billing, it is not defined", "Unable to get variable commerce_order, it is not defined,' and a few others. Any idea why this is?
Comment: @Brittany The commerce_recurring_ui comes with the recurring module, as shown in the source [here](http://cgit.drupalcode.org/commerce_recurring/tree/). If you're not using it already, I recommend you install [module filter](https://www.drupal.org/project/module_filter). As far as anonymous users go, I don't know. I've never used this module. There is a rule of thumb to never use modules that have no beta (usually have yellow bg) or not have a stable/full release (have green bg) in the module page. Since you're only using a module that only has a dev release you're taking a lot of risk here.
Comment: So no surprise here that you're getting errors.
Comment: Just double checked, and I do have Recurring UI module installed. Now I'm def not sure why I'm getting the errors.
Comment: Think I just realized the issue. It doesn't look like Moneris API supports Card On File - so Drupal Commerce is trying to run payment for the recurring product, but there's no card on file for the particular user... If you find a work around for this, let me know :/
Comment: @Brittany yeah, card on file only works with [these gateways](https://i.stack.imgur.com/Risvj.jpg)


Trying to find a sci-fi short story - different perspective on devil and god

Question: I am trying to find a sci-fi story I read in early 1980s sci-fi anthology. It was told from the perspective of snake/devil hiding from a megolomaniac God. Any leads much appreciated. It was written in the first person, from the view point of Satan. I remember him as a snake, hiding from a mad God who has convinced the world that light and sound are necessarily good and darkness and quiet are bad. It's kind of a rumination - I don't recall any actual action.
Comment: Please add more details to your description. Anything you can think of. There are *lots* of stories told from the devil's perspective.
Comment: I was going to say a story by Harlan Ellison as well, but I can't find anything about it online. Is "The Deathbird" the one where Satan is a snake who it turns out has gotten a bad rap, and God is actually the bad guy?
Comment: I can't tell for sure without more details, but Harlan Ellison's "The Deathbird" comes to mind.
Comment: There's a guidance provided [here](https://scifi.stackexchange.com/tags/story-identification/info) - use it to think of more details and add them by [edit]ing your question.
Comment: Thank you for these suggestions. It definitely wasn't "Displaced Person". "The Deathbird" sounds a bit like it, but I am not sure. I read it in a Sci-Fi anthology.  I was thinking it was a short story but it could have been an excerpt from a novel. It was from the perspective of Satan who is a snake or snake-like spirit who has gone into hiding - and, yes, has had a bad rap. Kind of propaganda victim of a God who wants to eradicate darkness and gets the world to believe darkness is bad. Thanks so much for all your help - I really appreciate it.
Comment: @Nevertheless, I think ImaginaryEvents nailed it. I remembered reading this story as well, I knew it was Harlan Ellison, but can't remember the title.
Comment: Thank you, I have found it now, and that's the one - I'm very excited. I've been looking for ages. Re-reading the Harlan Ellison series, I think I see a source of inspiration for Neil Gaiman's 'American Gods'...
Comment: Sincere thanks, Imaginary Events, you were right. So glad I found this.
Comment: @ImaginaryEvents you might want to add that as an answer for the OP to accept.
Comment: proposed duplicate target is newer but has a formally accepted answer; see confirmation comment from OP above
Comment: @Nevertheless, would you mind clicking on the checkmark next to the answer by @ImaginaryEvents? That confirms it as the correct answer and rewards the answerer.
Answer: This has been confirmed as Harlan Ellison's story "The Deathbird". Published March, 1973
Hugo Award for Best Novelette, Locus Award for Best Short Story
The wise and gentle snake-like creators of the Earth lost a galactic arbitration, and possession of the planet passed from their race to the Mad One. The sole caretaker left behind was Dira, the Snake, powerless to defend himself from the slurs and myths of the other. Yet he had the final remedy, to be used only at the end, the Deathbird.
This is an emotionally powerful story that examines, among other things, terminal illness and assisted suicide. The decision to call the Deathbird lies with the man Stark, who has been reincarnated through the ages, and not with the Snake or the mad one. Nathan Stark remembers his last life, and his mother, dying in great pain, demanding that he "Use the needle." And now the Earth is in pain...
Answer: This answer was written before the querant added that they remember the devil as being a snake. They have indicated that the following story is not what they were looking for.

Could this be the short story "Displaced Person" by Eric Frank Russell?
The narrator meets a strange person while sitting on a bench at the setting of the sun.

He glided out of the gathering dusk and seated himself at the other end of my bench and gazed absently across the lakes towards the Sherry Netherland.
(...)
My mind speculated about him the way minds do when momentarily they've nothing else to bother them. A European refugee, it decided. A great surgeon or sculptor or something like that. Perhaps a writer, or painter. More likely the latter.

The stranger confides that he is a refugee.

"You're not a native of this New York?" I prompted.
"No." Resting long, slender hands upon his stick, he gazed meditatively forward. "I have no country. I am a displaced person."
(...)
"In these days it is an all too familiar story," he said. "A leader became so blinded by his own glory that no longer could he perceive his own blunders. He
developed delusions of grandeur, posed as the final arbiter on everything from birth to death, and thereby brought into being a movement for his overthrow. He created the seeds of his own destruction. It was inevitable in the circumstances."
(...)
"I organized that opposition. I still think it was justified. But I dare not go back."

Then he gets up to leave.

 "My name," he murmured softly, "is Lucifer."

According to the ISFDb, it was published first in the September 1948 issue of Weird Tales and has been collected in a number of anthologies which can be found through its entry in the ISFDb.
Comment: That issue of *Weird Tales* is available at the [Internet Archive](https://archive.org/stream/Weird_Tales_v40n06_1948-09#page/n77/mode/2up). "Displaced Person" is one of a great many devil's-side stories. I don't think it's the one we're looking for, because the devil is portrayed as the rebel angel, not the snake.


Add my own wall into archipack addon

Question: hey so i made a couple different walls that i will repeatedly be adding into my project what i am trying to accomplish is add these new meshes into the add mesh Archipack tab. see picture for more info?
Answer: It mostly depends on the kind of variations you want to achieve.
If it is related to wall general shape, such as L T predefined parts, you may use "custom objects" (mesh based closed volumes) as walls, this is a feature of 1.3.8+ 1.4_dev free versions for blender 2.79, available on github repository.  https://github.com/s-leger/archipack/archive/140_dev.zip
In archipack 2.0 Pro version for blender 2.8, presets parameters exclude any "segments" one, as they are meant to quickly change wall's aspect (width / height / finishings, materials..) without changing the general shape.
Adding new kind of parametric objects to archipack is not an easy task as the archipack's framework require some time to getting started.

Add my own wall into archipack addon


Automatically importing products into Woocommerce

Question: I am trying to find a way to automatically import products into Woocommerce. I was wondering if someone had any experience with this, whether using a CSV or directly writing to the database.
Comment: have you tried anything? In what format you have data for importing?
Comment: Hi Tom. My current data set is in a SQL server database. I have looked at exporting the data into a CSV and using an existing plugin to import the data. The database structure for storing additional attributes seems a bit confusing to me, and so I resorted to doing this. Still not automated, though a couple of clicks seems to do the job for now.
Answer:
The Easy Way:

You can easily import CSV files into WooCommerce using the CSV Import Extension:
http://www.woothemes.com/extension/product-csv-import-suite/
Or you can use the more flexible WP All In One Import: http://www.wpallimport.com/woocommerce-product-import/
Automating product import from CSV is possible with this WooCommerce plugin
There is also a free solution via this plugin:
https://wordpress.org/plugins/product-import-export-for-woo/

The Hard Way:

Woocommerce Products are regular WordPress posts, with a custom post type of product. This means that each product is stored in the wp_posts table (or replace wp with your table prefix). There are many post_type values here. The ones for WordPress have a post_type="product"
All additional product info is stored in the table wp_postmeta and connected by the post_id column to the wp_posts table. There are many meta key/values used, but the most common ones for WooCommerce are fairly intuitive, such as: _visibiilty, _price, _sku, _stock, _length, _width, _height, etc...
I suggest you manually input several products into the WP Admin and then study the data in the tables to make sure you have all the data you need... then you can write your own custom import suite.
Doing it yourself probably will not work as well as some of the pre-made solutions which provide you with good error checking of the input data, and additional fields and preprocessing functions.
Comment: Hi ethanpil. Thanks for your this useful thoughts. I have already bought the CSV import plugins. I was in a hurry when I posted this and so I went ahead and bought the plugin. While using it I realised that the plugin would do most of the job as long as the structure of my data remains the same (which it does in 9/10 cases). So for the time being I can make do with the plugin, as I am still prototyping this project. Mean time I studied the DB a bit and it looked a bit messy. Will take another look at it based on your comments. Thanks much again.
Comment: @ethanpil to upload multiple products from myphpadmin database. since i am new to queries, can you help me with one for uploading simple products with these details "Product Title, Description, sku, Price and sale price, upsel and cross sell products, attributes and image".. i have to upload around 4000 products..so i am looking for a way to upload them all using Database..requesting your guidance..
Comment: The FREE plugin you recommend is not available for download. Reason cited: security issue.
Answer: If you have CSV full of WooCommerce simple Products , you can import all those along with images from URL in one click with this free plugin
Answer: The WordPress Importer will import the following content from a WordPress export file:

Posts, pages and other custom post types
Comments
Products
Custom fields and post meta
Categories, tags and terms from custom taxonomies
Authors

You can use WordPress Importer plugin for import products into Woocommerce.

Installation of the Plugin-

Visit Tools -> Import in the WordPress dashboard
Click on the WordPress link in the list of importers
Click "Install Now"
Finally click "Activate Plugin & Run Importer"

Usage of the Plugin-
Step 1 :  Go to the Tools -> Import screen
Step 2 : Click on WordPress.
Step 3 : Select Input File from a computer.
Step 4: Click on Import

Video Tutorial- The video tutorial on the following page might also be a good resource for import products -
How to import dummy .xml data in wordpress


A question on mechanical failure

Question: Suppose there is a rod, on the wall or at the centre, in a pressurized vessel, the pressure inside the vessel being P. The rod has a shear strength of S. Is it true that the rod will break, in shear, if P>S, otherwise it will not? To me it seems so, but I am not able to get my head around it.
Comment: where is the other end?
Comment: @SolarMike, I don't think it matters, really. A rod in the middle of a pressurized vessel will suffer uniform pressure around its entire perimeter, so it will only suffer radial compression.
Comment: What I was thinking, if the rod is across the diameter, then it is in tension but the vessel would probably be weakest...
Answer: It won't. Solid objects don't break in hydrostatic compression. The pressure is pushing all parts of the rod together, so there's nowhere for them to go except stay together. You can imagine an object on the ocean floor. Pressure could easily exceed shear strength but even soft animals remain intact, as do rocks.
The von Mises failure criterion says a material that follows it can sustain infinite hydrostatic pressure or tension without reaching the failure surface.
See the diagram here. The yield surface is a tube that extends out to infinity in the hydrostatic compression direction.
https://en.wikipedia.org/wiki/Von_Mises_yield_criterion
There can be other failure modes, like phase change. Or it could collapse if it contains air pockets. But that's not determined by the pressure exceeding the shear strength.

A question on mechanical failure


Don't miners control who is allowed to make transactions?

Question: Simple question really, considering theres a very small group of miners controlling the chain ATM.
Whats to stop them from being forced by the goverment to disallow certain transactions or just mining empty blocks to jack up the transaction price?
Or even worse, whats to stop a country like china from just investing massive ammounts of money into unbeatable mining pools and destroying every appearing coin that way?
Don't miners have way to much power in the current system? Especially since crypto is supposed to be decentralized
Answer: The stakeholders of bitcoin don't want miners to do that. If miners do that, the stakeholders (the people who are paying for the miners to mine) would change the rules. For example, they'd change the mining algorithm. That would turn the miners expensive ASICs into space heaters (a little faster).

Don't miners have way to much power in the current system? Especially since crypto is supposed to be decentralized

The miners only have power because the people paying for their mining hardware and electricity like the job they're doing. If they don't provide the censorship resistance and forward progress without double spends that the stakeholders want, the rules will change.
Miners know this and such a scenario would cost them a huge amount of money, so they are strongly incentivized not to let it happen.
Answer: What you are describing is a majority attack which a miner own more than 51% of the hashing power, it has happened once in 2014 but the miner then decided to lower its power to allow the bitcoin to work as intended, you should also notice that the things a miner owning this power can do is limited, see this answer: https://bitcoin.stackexchange.com/a/662/95422
Now if someone or a government try to do a 51% attack, it will cost a huge amount of resources even for a country like China to being able to own more than 51% of the hashing power, and once they have that they will likely make the trust in the network to zero and the price with it too, rendering the operation quite costly for almost no benefit, whereas they could use that power to play the game with the other and get rewarded for it.
Here is a better summary in video: https://www.youtube.com/watch?v=yWTQgmCuiCw&feature=youtu.be
and a more in depth answer: https://bitcoin.stackexchange.com/a/90309/95422
Answer:
Simple question really, considering theres a very small group of miners controlling the chain ATM.

Miners are distributed around the world, many of them may join the same mining pool to even out the variance in payouts though. Do not confuse the number of mining pools for the number of miners. Really, it is not possible to know the number of distinct mining entities that exist.

Whats to stop them from being forced by the goverment to disallow certain transactions or just mining empty blocks

Nothing. If a certain govt could reliably regulate any miners within their jurisdiction, then they could perhaps enforce a rule like this.
The good news is, since hashing power is distributed, no one govt can censor the chain in this way. If Govt-A decides to censor transactions, it won't affect any miner that exists outside of Govt-A's control, and so while the transactions in question may take a little longer (on average) to get confirmed, this won't censor them outright.
In fact, the miners existing under Govt-A's rule will now likely become less profitable, as they will be unable to mine the transactions that are sanctioned by Govt-A. This means all other miners will become more profitable for it - the system is self-balancing in this respect.

Or even worse, whats to stop a country like china from just investing massive ammounts of money into unbeatable mining pools and destroying every appearing coin that way?

The majority-attack (51% attack) is a well-known attack that is possible against the network. An attacker with a majority of hashpower could censor transactions indefinitely, but there is a caveat: doing so requires a HUGE investment of capital, and then a HUGE ongoing electricity cost, for the entire length of time the attack is maintained. Further still, once the investment into the specialized computer hardware is made, an entity could mine profitably instead of spending money to attack the network. This is a heavy financial incentive - perhaps some government would be willing to ignore this, but it seems unlikely for an attack to be sustainable (and indeed, we have a decade worth of evidence of a system that works as intended, and has not been attacked in this way).
Comment: Excellent reply. I'd just like to note one important aspect. Mining pools control which TX's go into blocks. So, even though the pool participants are scattered (we don't know *how* scattered though), the concentration of mining power into less than a dozen pools is cause for concern. I made a quick spreadsheet from data from blockchain.com and over 70% hashrate is in Chinese pools.
Comment: @JoseFonseca that is a good point, and there is work being done to remedy that exact problem. For example see BlueMatt's BetterHash protocol, it allows the individual miner to generate the block template (and thus pick transactions), even if they are mining as part of a pool: https://github.com/TheBlueMatt/bips/blob/master/bip-XXXX.mediawiki


What Would Hypochlorite Ions Prefer to React with, Hydrogen Ions or Ozone?

Question: If I had a box that had inside it a UV light an equal quantity of ozone ($\ce{O3}$), and $\ce{H3O+}$, which would be broken down because of the UV light to $\ce{O}$, and $\ce{O2}$, as well as $\ce{H2O}$, and $\ce{H+}$ because that is what the $\ce{H3O+}$ would be broken down into. If I introduced one hypochlorite Ion ($\ce{ClO-}$) or a chloride Ion ($\ce{Cl-}$), what would the chloride Ion or hypochlorite Ion react with? Would it react with the $\ce{H+}$, or the $\ce{O}$ & $\ce{O2}$?
Answer: First of all, hydronium ion, $\ce{H3O+}$ is basically a proton in aqueous solution. A proton undergoes hydrogen bond in aqueous solution to forms various forms of hydrated proton. But for simplicity, we denote $\ce{H+}$  which is considered an acid. Now, UV light dissociates hydronium ion in ozone atmosphere into oxygen, singlet oxygen, proton and water. So, if hypochlorite  salt or its corresponding acid is introduced, it might react with these. Chloride ion in form of salts is very much stable and is unlikely to react with any of the dissociated products.
So, first of all, any hypochlorite salt or hypochloric acid added will dissociate into component ion in presence of UV light. Then will react with the following dissociated products:

Singlet oxygen

$$\ce{ClO- + 2O ⇄ ClO3-}$$
(Source, considered hypochloric acid)

Proton

$$\ce{2HClO + 2 H+ + 2  e{−} ⇌ Cl2(g) + 2H2O}$$
Water is present as moisture so it is unable to attack hypochlorite ion readily. Also oxygen is present in minute amount(mainly singlet oxygen is present), so it cannot oxidize hypochlorite ion.
Comment: So would the CLO- react with the H+ or the O family (O, O2)?
Comment: @ArjunJhaveri Both, but in the O family, only singlet oxygen will react.
Comment: What would it react with first? Also, Over time, would all of the the H+ ions precipitate back and not bond with the chlorine because they form water?
Comment: @ArjunJhaveri everything is possible. The reaction proceed in such a complex way that nothing can be said clearly. Indeed, hypochlorite ion is not that kind of thing you daily work with nor they can be found in labs so working with them require higher understanding of chemistry. Indeed, it is unstable and undergo numerous acid, it may form chloric acid, it may dehydrate to chlorine dioxide. So, nothing can be said clearly.


Where does Nami store private keys?

Question: I would like to access my private key from Nami wallet. Where are they supposed to be stored?
Answer: Here is the GitHub for Nami, as it is open source.
Looks like it uses chrome local storage. I believe chromes local data is located in %AppData%\Google\Chrome\User Data\Default\Local Storage atleast for windows users.
Comment: You'd have to check your extension ID (you can check that in Dev Tools), and go to `/User Data/Default/Local Extension Settings/`.
In there you'd see a LDB file (viewing it in ASCII viewer will still show you the encrypted private key, that can only be decrypted using your spending password).

But in general, you're better off using mnemonics instead of trying to use decrypted private keys
Comment: In which file ? It's filled with predominantly log files for me
Answer: Last time I had only my mnemonic key and when the coin was no longer supported by the wallet i had to find a private key to get access which I did not write down because I thought mnemonic was enough. I was never able to retrieve those coins after that even though i had the mnemonic and spoke to the tech team. That was with the Guarda Wallet. I think you need both private key and mnemonic as a backup. And this option should be in the wallet interface like every other wallet has. should not have to fish around for it.

Where does Nami store private keys?


Need advice on how to handle my emotions

Question: Tell you the truth, I joined Buddhism in search of peace and harmony. Not because I have mental issues. It is about admitting what I see and feel. I am not that much aware of stuff, but sometimes I aspire to be Buddhist; at other times, I am very emotional. At times I cry because the world is not aware of the basic values of humanity. When I choose to go to the Buddha for refuge, my family thinks that I am a psycho.. When I see others losing human morals, I suffer! Today I feel a bit better than yesterday, but when I look at myself during meditation, I feel like a person who suffers. It is not at all that I am different or I am trying to be different. I want to know the reason for this according to Buddhism?
Comment: Tag is self. I am aware of that. Am I attached to myself so much?
Answer: Every unenlightened person has metal issues. The reasons are the defilements: craving, aversion and ignorance.
I would recommend doing Vipassana meditation in your daily life:
If you dislike something or someone's behavior, simply note it as 'disliking', 'disliking', 'disliking...' before it gets to crying. If you are too slow and already started crying, simply note it as 'crying','crying','crying...' instead of thinking while crying.
If you want the world to be in a certain way or want others behave to your liking or to think about you in a certain way, simply note it as 'wanting', 'wanting', 'wanting...'
Don't drop the ball no matter how tough or exciting it gets! Simply keep noting.
For more instructions: http://www.sirimangalo.org/text/how-to-meditate/
Answer:
I am very emotional

Since you are emotional best is to pratice in the context of an organised course. Due to emotions perhaps you might not pratice as intended or in the right way without guidance. Following centres have a wide outreach and I personally have positive results thought the pratice: https://www.dhamma.org/en/index. I have not tried this out but the course most likely like the other hence would be benificial: http://www.internationalmeditationcentre.org/global/index.html

Need advice on how to handle my emotions

If meditation is done right you would be able to be more emotionally stable.
Emotions have some sensation associated with it. If you get attached or averse to the sensation you are creating negativity.
You have to try your best to study the sensations behind your emotions to understand and handle your emotions.
Also sensations and craving lead to all dogmas. [Brahma,jala Sutta] Many conceiving of self happen through craving. (Vicarita) Tanha Sutta Many of these lead to suffering. Emotions can be a form of suffering as you conceive the self as subject or receiver of any event or perhaps building of non conducive views which case suffering.

feeling of those who know not, merely the agitation and vacillation of those overcome by craving - [Brahma,jala Sutta]
Answer:
but when I look at myself during meditation, I feel like a person who suffers

I recommend you to listen to this talk by Ajahn Brahm about suffering.
I'm gonna summarize it shortly in order not to get banned:

There is no happiness without suffering. You can't have one without the other. They are equally measured by each other.
In Buddhism you have to get rid of all dogmas, especially the individual dogmas ('life must be happy', etc.)
Suffering is part of life. So why is it that we say 'Something is going wrong, I'm suffering'?
We have to put aside what we want to believe in and try to see real nature
the cause of suffering is inside of us, nothing/nobody can cause it from outside
Call whatever it is your suffering from 'Ajahn' or 'growing pain'. Let it be your teacher.
If there is nothing to do, do nothing. If there is something you can do, give it everything you can.
Answer: @jitin… try to stay within the five precepts, within the bounds of what's skilful, be true to the five precepts. Afterall there is no 'buddhist' or ' christian' in it. The knowledge that you've maintained your honor can give you a lot of strength even as you go through negative emotions. Then you try to take apart unskillful emotions: You take apart the physical side, then the verbal side, then the mental side. For the mental side, you have to learn how to think outside the box. The same with the verbal side—because "verbal," here, refers to your inner chatter, what you say to yourself. Often what you say to yourself can be a lot more harmful than what people do or say outside. So a large part of your training lies in learning how to talk to yourself in skillful ways.
Supreme Buddha taught that the most important part of the practice is appropriate attention, where you learn to look at the situation and divide it up into four categories: where's the stress; where's the cause of stress; what would be the cessation of that stress, i.e., by abandoning the cause; and then how you do that: the path of practice that you develop to abandon the cause of stress. In other words, you see things in terms of the four noble truths. Each truth has a task, which has to be mastered as a skill and brought to completion: comprehend the stress, abandon the cause, develop the path, so that you can realize the cessation. That's a very different approach from simply being nonreactive, or learning to accept whatever comes.
You can consciously breathe in and out at times when these emotions overwhelm you. So we focus on the breath as a way of getting outside of these overwhelming emotions, to realize they don't have to take over totally. We can have at least one corner of our awareness where they're not raging and strong. Not only does the breath give us a place to stand, it also gives us some ammunition to use against these things. When anger comes, when fear comes, part of their power comes from the way they change the processes of the body. You can work with your breath to counteract at least the physical side of the emotion first. Regardless of what's happening in the mind, you can still breathe calmly. In fact, this is an important way of retraining yourself.
That way, if something does start creeping in, you'll notice it immediately. And you find that these emotions are a lot easier to deal with when you catch them right at the very beginning, before they trigger the hormones, before they trigger the physical reactions, because otherwise, once those reactions are triggered, you simply have to ride them out, and that may take a while.


Create a button in a custom object home

Question: The custom object home is there anyway to put a new button in that page layout. Or modify that page layout. Or use VF and emulate that page layout exactly, because i am trying to create a custom object that will flow through a set of prev and next steps. The custom object home's only buttons are new or Go, and i am trying to put a custom link in there so i can help them navigate the next and prev pages.
Comment: i think you are trying to create wizard model where you want to navigate back and forth. you might be interested in these links http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_wizard.htm
Comment: Check this out, maybe it can help you: [How to call a visualforce page from a custom button](http://salesforce.stackexchange.com/questions/12832/how-to-call-a-visualforce-page-from-a-custom-button/12833#12833)
Comment: thanks for the input, my employer wants to be able to modify the custom object home, and doesn't want me using VF. Which i explained wasn't feasible but insisted it was. So i am just trying to add a link or button in the custom object home so that i can add a button and that would be that, but instead i can use JS and pop up a window instead, which should appease him.
Answer: Based on the buttons New and Go that you've mentioned, I assume you intend to add new button to the custom objects list view page. On the custom object setup page (Setup > Create > Objects > Your Custom Object), navigate to section titled Buttons, Links, and Actions and click [New Button or Link] button, in order to create new button of List Button Display Type. Select either URL or VisualForce Page as the behavior of the button (note: in order for a VF page to be selectable, you must specify Your_Custom_Object__c as default controller for the VF page).
Once you have the button prepared, navigate to Search Layouts section on the same custom object setup page, and select the list layout to edit (typically named "Your Custom Object List View") and select to add custom buttons. From the list of custom buttons select your newly created button and save changes to the layout.
Comment: Great thanks, It looks as though i will be using this method. Is there anyway to send information through a button using js. I think a combination of a ActionCommand and param will enable me to send relative information to my controller, but it is a custom object page that is created by Salesforce.
Comment: Sure you can send info using js - when creating the button, specify "Execute JavaScript" as the button's behavior. Then, in the textarea at the bottom of the configuration screen, you could use js to fetch and evaluate any sort of values stored on the client, and finally make a redirect (by window.location set to literal string of the relative path of your custom VF page, e.g. "/apex/MyCustomObjectBtnClickHandlePage") with js arguments added to the URL. Hope it's clear enough!
Answer: I believe you have two solutions.  Try looking into Visual Flow.  This is all setup and should give you the customization you need.  If more customization is needed, you can actually put it in a VF page.
Also, you can use fieldSets to dynamically render a fields on a page.  Simply get a list of the items in a field set, and you can loop over them to grab the field name of whatever associate object you need.

Create a button in a custom object home


Any good alternatives to MediaWiki for creating an 'intranet' type system?

Question: I would like to install some form of intranet system to allow multiple users to add documentation to - MediaWiki would suffice, I just wondered if anyone knew of any better alternatives (must be PHP).
Comment: Any CMS or blog platform with multiple user support would suffice. There are literally hundreds. This is not a programming question, it's off topic for StackOverflow, and it's a type of question listed in the FAQ under "questions NOT to ask here".
Comment: What exactly are you looking for? "Intranet" systems do often include wiki functionality but usually also a lot more, eg. [Confluence](http://www.atlassian.com/software/confluence/). If you're looking for *just* a wiki, you might want to modify your question and have a look around the stuff already tagged [tag:wiki]. Or if something more like Confluence, then some more requirements would be informative.
Comment: Why doesn't Mediawiki fit your needs?
Comment: If this were asked today it would be closed as off-topic because it is looking for software recommendations.
Answer: I strongly suggest you run through the Wiki Choice Wizard over at WikiMatrix.org
Answer: DokuWiki http://www.dokuwiki.org/dokuwiki
It has user authentication built in to prevent unauthorized access.
Answer: I would say there are NO good alternatives to mediawiki other than Wordpress, another open source platform.   Both have many extensions and are guaranteed to stick around for a very long time, probably forever.  Here's an example of a simple intranet based on Wordpress (which I haven't used and don't recommend except as a guide to features) http://www.simpleintranet.org/?gclid=CJ_c7erQsbUCFa9aMgoduWsAug
Using anything that is not open source and heavily used for open content is asking for lots of downstream problems.
Do not be fooled by these "better" or newer or "more supported" wikis, they are all fly by night and will all be effectively gone in five years.  Nothing protects you from some massive shift in underlying data structure even in something like Mindtouch which uses mediawiki as its base.  You find lots of good information on how to customize mediawiki, e.g. http://lifehacker.com/5396832/customize-mediawiki-into-your-ultimate-collaborative-web-site
Other open source alternatives like tikiwiki had promise but simply aren't widely used and will either disappear or become front ends for the data standards set by mediawiki.
Comment: -1 this answer is insane! there's no "forever" in software, even "guaranteed to stick around for a very long time" is too hard to say. I won't even also talk about the Dualism of open source x payed softwares..
Comment: -1 This is so anti-wiki. Pro-mediawiki. "Do not be fooled by" this answer.
Answer: Many testimonials are available from major mediawiki users
http://www.mediawiki.org/wiki/MediaWiki_testimonials
Now here's a particularly challenging application I doubt you'll be seeing on Confluence
http://en.wikipedia.org/wiki/Intellipedia
Comment: Whalecum to the scene and good answers.
Answer: I have used MediaWiki for about two years in the previous company, and had so much trouble with it. The notation is cumbersome, weak search engine, and pages have no clear hierarchy.
If you can afford a paid product, you should seriously consider looking into Confluence. If you require PHP, MySQL with a strong search engine consider having a look at LessonsLearnedServer. The application is easy to use, good quality and has a decent pricing scheme.
If you insist on free, my best experience was with WordPress. Although, you have to check what specific needs you require and check if they are provided by plugins.


How is the land border crossing when driving a rented car between Balkan countries as a French citizen?

Question: I may be in Dubrovnik, Croatia this May.  I plan to rent a car in Dubrovnik (or somewhere easy to reach from Dubrovnik) and travel to the nearby Bosnia and Herzegovina, Serbia, Kosovo, Montenegro, North Macedonia and Albania. How is the land border crossing when driving a rented car, as a French citizen? Do I simply show my French passport and they let me pass (since I can enter visa-free), or do you have to do any special due to the rental car or the fact that I am driving it?
Comment: at the very least make sure that your rental agreement allows you to take the car out of the country and into those specific countries. Not all rental agreements do that.
Comment: In fact, it's VERY hard to find a rental company *in* the EU that will let you drive the car *out* of the EU.
Comment: Moreover, since you're a French citizen, bring an ID card instead of a passport if you can. It is much more convenient and enables you to enter Serbia from Kosovo even if you previously entered Kosovo from another country.
Comment: @Johnnyjanko I have rented a car in Croatia a few times and taken it into Bosnia.  I don't remember whether that was before or after Croatia joined the EU but I doubt it's that hard even today.  The last rental car I had was in Spain, so there was no chance I was driving it out of the EU, but still the insurance said that it covered basically all of Europe except for Kosovo. Franck: on only one of those crossings was I asked to show the car's insurance card, but of course you may be asked to show both proof of insurance and the rental agreement to prove that you are authorized to have the car.
Comment: @phoog You could have drive to Gibraltar!
Comment: @phoog Yes, before Croatia joined the EU, it could have been possible, because countries such as Bosnia or Montenegro were viewed as equals by Croatians. Now they're viewed as being "behind a wall". Back in 2011, when I wanted to rent a car and drive it from the EU into Serbia, I couldn't find any company that would allow that. Back then I had no car so I had to borrow one from my relatives. Border officials were not interested in the car's documents, so theoretically it could have been a rental car, but that would be a major breach of the contract. Not recommended.
Answer: I did this a few years ago, albeit as an American citizen (also visa-free to all of the countries you mentioned). The trick was finding a rental car company that would let me do it, but once I did that then there were no problems. You need to have the green card (insurance paperwork) that they give you with the rental car and show that at every border crossing along with your passport. The border crossings were all quick and easy.
The one catch is Kosovo, which doesn't accept the EU green card so you need to purchase auto insurance while you're there. It's something like 20 EUR for a week (more or less). There's also the catch of entering Serbia after you've entered Kosovo, but I see you've asked a separate question about that.
Comment: Great information, thanks!


Differences when using the the_time and the_date functions

Question: I have some doubts about how work the WordPress the_date() functions definied into general-template.php
In a page I show the posts archive using this code snippet into a loop:
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

                <a href="<?php the_permalink(); ?>"
                   title="<?php printf(__('Permalink to %s', 'your-theme'), the_title_attribute('echo=0')); ?>"
                   rel="bookmark"><?php the_date("d/m/Y");  echo " - "; the_title(); ?>

The problem is that for some posts the the_date() function give me the date of the post and for other posts not.
I attach a screnshot of what I obtain:

As you can see some posts are shown as something as: DATE - POST TITLE but some other posts are shown as POST TITLE without the date before the post title.
This seems to me very strange because all the posts have a publishing date.
So I tried to use the debugger and see what happens when the the_date() function have this code:
function the_date( $d = '', $before = '', $after = '', $echo = true ) {
    global $currentday, $previousday;

    if ( $currentday != $previousday ) {
        $the_date = $before . get_the_date( $d ) . $after;
        $previousday = $currentday;

        /**
         * Filter the date a post was published for display.
         *
         * @since 0.71
         *
         * @param string $the_date The formatted date string.
         * @param string $d        PHP date format. Defaults to 'date_format' option
         *                         if not specified.
         * @param string $before   HTML output before the date.
         * @param string $after    HTML output after the date.
         */
        $the_date = apply_filters( 'the_date', $the_date, $d, $before, $after );

        if ( $echo )
            echo $the_date;
        else
            return $the_date;
    }

    return null;
}

and it contains this conditional statment:
if ( $currentday != $previousday ) {

and I see that for some posts the value of $currentday and of $previousday is the same so the function return null
Also reading the funcion documentation I can find:
/**
 * Display or Retrieve the date the current post was written (once per date)
 *
 * Will only output the date if the current post's date is different from the
 * previous one output.
 *
 * i.e. Only one date listing will show per day worth of posts shown in the loop, even if the
 * function is called several times for each post.
 *
 * HTML output can be filtered with 'the_date'.
 * Date string output can be filtered with 'get_the_date'.

So what exactly represents thes 2 variable? and why if they are the same the date is not returned? How can I fix this problem and show the date?
Answer: For historical bloggy reasons, the_date in WordPress won't show the same date twice in a row. This is for grouping purposes.
The fix is easy: Use the_time instead. It behaves exactly the same as the_date, but without the internal historical logic. Also no need to rewrite any complicated code, just change three characters. :)
Note: the_time is missing the before, after, and echo parameters, but that's okay because you really don't need them. It always echo's, and you can put the before and after parameters surrounding it quite easily. Like I said, there are historical reasons for the operational behavior of the_date, which don't make sense except in specific circumstances which generally don't apply anymore.
Answer: As it says right there is its inline documentation — the function is meant to only output the result "once per date". In typical chronological loop of posts it will "collapse" for posts made on same day. In less typical loop it might lead to pretty bizarre outputs.
If you dig far and deep enough in version control history you might be able to dig up reasoning for it.
From practical point of view you should just look through the source and take away that get_the_date() gets you the same stuff sans all the "once per" logic.


BTC sent from blockchain.info to BCH wallet on coinbase by mistake

Question: I m quite a newbie in crypto. On Dec 21st by mistake i sent 2BTC from my blockchain.info wallet to my Coinbase BCH wallet. Quite an honest mistake as they just had implemented BCH page and i didn't realise i m taking BCH address. I have contacted them many times and they refuse to assist me with recovering them. Is there anyway that i can retrieve those coins? Much appreciate your help with this.
I have read answers about similar cases but my question is specific to Coinbase. Has there ever been a case where coinbase assisted with recovery? Do they have any policy that takes into account the amount of transaction or they refuse to help in any case?
Answer: I have done exactly the same thing on Dec 23rd.  I only received a generic response that transactions are irreversible.  But I read of others that have had success from transactions >$5K  which both of ours qualify.  If it wasn't Coinbase the simple solution is to use the private key to put the coin back in a BTC wallet.  But since this is an exchange we are at the mercy of Coinbase to retrieve those private keys and deposit them into our equivalent Coinbase BTC wallets.  If you happen to get a response or a next step to resolution please post the solution.
Comment: Thanks I have read similar things. I m just wondering if Coinbase ever helped anyone in this situation. Given the materiality if transaction. Please let me know as well if you get any success.


Standard deviation Vs ٍٍStandard error

Question: I'm little bit confused, when I want to standardize a normal distribution, when to use standard error and when to use standard deviation ?. In statistics we often use samples so, is it always we use standard error to estimate the population parameters and so, or What ?.
Answer: Incidentally, this exact question came up with a colleague today.
If you want to do the z-score, you use standard deviation: $z = \frac{x - \bar{x}}{s}$. Standard deviation is a property of a population, and we use some formula (often $s^2 = \frac{1}{n-1}\sum_{i=1}^n (x_i - \bar{x})^2)$ to estimate the population parameter. The population parameter does not depend on the sample size or even the sample at all.
Standard error has to do with the so-called sampling distribution of a statistic. This does depend on the sample size. Standard error of the mean is what most people see first. You know the formula: $\dfrac{s}{\sqrt{n}}$.
The sampling distribution of a statistic follows the following logic.
1) Pick of statistic of interest, say $\bar{x}$.
2) Grab a sample of size n.
3) Calculate $\bar{x}$.
4) Repeat 2 and 3 (infinitely) many times.
5) Plot the values of $\bar{x}$ that you calculated (something like a histogram). to get the sampling distribution.
Since you should have tighter and tighter estimates of $\mu$ as you get larger and larger sample sizes, your $\bar{x}$ values should be very close to $\mu$ when you have a lot of data, and this is why standard error shrinks as you increase the sample size. However, if we sampled from a standard normal population, no matter how big the sample size (and correspondingly small the standard error), the population has a standard deviation of 1.
Since students first learn about standard error of the mean, which explicitly depends on the population (or estimated) standard deviation, and students often do not progress past testing means, it's easy to confuse the two. (In fact, the standard error is the standard deviation of the sampling distribution.) However, you can find a standard error for other statistics. Look at those steps 1-5. You could repeat that process for a different statistic, perhaps $s^2$, median, or IQR. If you know how to write loops in a language like Python or R (or whatever statistical language), I'd encourage you to try writing a simulation of these.
Comment: the best explanation ever!
Comment: So if I had an sample taken from a population and I want to get a Confidence Interval of population mean or  even perform a Hypothesis test on population mean I will use standard error !?
Comment: @AbdEl-RahmanAkram Exactly, because your confidence interval should shrink as you gather more data, and you should be able to reject a null hypothesis with less difference as you gather more data.
Comment: I get it know thanks for help.
Comment: @AbdEl-RahmanAkram I'm glad I could help! If you could click up up-vote, I'd appreciate it. :)
Comment: I actually did, but the site notified me that it will be considered but will not change the publicity display score, because I'm under 15 reputation score :) .

Standard deviation Vs ٍٍStandard error