Any online access to Suchostaw, Galicia or Sukhostav, Ukraine church records from 1880s?

Question: I'm looking for family information on Tymko or Tomko Napadij.  He is my great grandfather and was born October 25, 1886.  He emigrated to Winnipeg, Canada via Halifax.  Are there any Austrian/Galician online church records for 1880s?  I found a work record from 1913 of a Witka Napadij and don't know how she may be related.
Answer: This answer covers the access to Ukrainian archives only.
Two caveats:

No online access. Unfortunately, most of documents (especially before 1919) are in paper form. Get ready to work with officials and archives.
People don't speak English. Quite often, officials communicate in Ukrainian only. So you may need someone who speaks Ukrainian to proceed.

Suchostaw is now part of Ternopil region, so the first contact should be The State Archive of Ternopil region.
The site has English interface (auto-translated using Google service), and most of hosted PDF/DOC documents are in Ukrainian.
Then you follow the Requests page, and the second link is "Sample requests" that directs you to a long DOC file.
Within the document, one request that looks like what you need is on Page 12:

Please provide a birth certificate and photocopy of the metric record (or only a photocopy of the metric record) of surname, first name, patronymic who was born in ______________ district _________________ in _______ year.
  Father: __________________
  Mother: __________________

You may also want to check for Paid Services they provide.

I have checked briefly, and Tymko Napadij in Cyrillic, it would be Тимко Нападій seems to be a legit Ukrainian name:
Tymko (Тимко) is a short name for Тимофей (Tymothy),
and Napadiy (Нападій) looks like a popular family name specifically in Suchostaw.
Wikipedia suggests that some of prominent citizens of Suchostaw were:

Ye. Napadiy (Є. Нападій), a linguist;
S. Napadiy (С. Нападій), an OUN/UPA leader.

Also, searching for 'Napadiy Suchostaw' (in Ukrainian) shows some people who live there.
Best luck in your research.
P.S. The full name of Witka Napadij is Viktoria/Victoria, and another contraction for it is Vita/Wita.
Comment: Thank you so very much!  This is super helpful.  I truly appreciate you looking into my family name.  It looks like I will need to ask for help to go further.  I am in Poland now and would like to go to Ukraine soon.
Answer: I have had a bit of luck looking at geneteka.genealodzy.pl. It is a Polish site, but it includes records from when Poland was larger - and does have some Ukrainian & Lithuanian records.
However, searching for 'Napadij' doesn't turn up any hits.
Comment: Thank you so very much Marshall.  I will check it out and also try the spelling provided by bytebuster of Napadiy.


How do I set Windows to boot as the default in the boot loader?

Question: How do I set the bootloader so that in my dualboot with Windows 7/Ubuntu 11.04, Windows start up as standard instead of Ubuntu?
Comment: Can't post an answer here as I am 'not active enough'... but here is a much easier solution without needing to install anything: `dpkg-divert --divert /etc/grub.d/31_linux --rename /etc/grub.d/10_linux`. This will put other operating systems first in the boot list. Then just run `update-grub` to update the list. Obviously do these as root.
Answer: Customizing the /etc/default/grub file
There are two ways of doing this using editing a grub file. These are described in the Ubuntu Community Documentation Grub2 page
The two ways are:

Boot which ever operating system you booted last time, the "saved method"

This is the one I use.  It lets me decide which one I going to use and will allow me to reboot into that system, handy when I'm updating.

Boot a specific operating system by default.

The answer to your exact question.

Finding the menuentry to set as the new default
To start we need to find out what we are booting or want to boot. Open a terminal with Ctrl+Alt+t and type in

sudo grep menuentry /boot/grub/grub.cfg

user@YourComputer:~$ grep menuentry /boot/grub/grub.cfg
[sudo] password for user:
menuentry 'Ubuntu, with Linux 2.6.35-31-generic' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry 'Ubuntu, with Linux 2.6.35-31-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry 'Ubuntu, with Linux 2.6.35-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry 'Ubuntu, with Linux 2.6.35-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Memory test (memtest86+)" {
menuentry "Memory test (memtest86+, serial console 115200)" {
menuentry "Windows NT/2000/XP (loader) (on /dev/sda1)" {
menuentry "Ubuntu, with Linux 2.6.32-34-generic (on /dev/sdb1)" {
menuentry "Ubuntu, with Linux 2.6.32-34-generic (recovery mode) (on /dev/sdb1)" {
menuentry "Ubuntu, with Linux 2.6.32-33-generic (on /dev/sdb1)" {
menuentry "Ubuntu, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sdb1)" {
menuentry "Windows Vista (loader) (on /dev/sdc1)" {

You can see that the "saved" method can come in handy when booting multiple operating systems. Save the name of the entry you want e.g. Windows NT/2000/XP (loader) (on /dev/sda1), we need it later.
Editing the /etc/default/grub file
Type in the terminal

sudo nano -B /etc/default/grub

and your password if asked. The nano editor will open.
A. Saved method - In my preferred way, I made the following changes from the standard grub file.

I changed the value of GRUB_DEFAULT to saved:
GRUB_DEFAULT=saved

I enabled the SAVEDEFAULT functionality by adding the following line:
GRUB_SAVEDEFAULT=true

B. Specific menuentry - In the way you are asking for

Change the value of GRUB_DEFAULT to the name of the Windows system you want to always boot. The name of the corresponding Grub menuentry can be found as described in the previous section.

I wanted to have Window XP always set as default at boot, I would set GRUB_DEFAULT to "Windows NT/2000/XP (loader) (on /dev/sda1)":
GRUB_DEFAULT="Windows NT/2000/XP (loader) (on /dev/sda1)"

Note: Some versions of Ubuntu require single quote (') vice double quote (").
You could also set GRUB_DEFAULT to the line number in the menu entry list (with 0 being the first), but when the kernel in Ubuntu is updated grub adds the new kernel to the top of the list, you would have to change the number, since Windows is the last one in the menu entry list.  You can see this in my menu entry list.
Update the boot configuration
Now you have to run

sudo update-grub

to update the system generated grub.cfg file in the /boot/grub/ directory.
user@YourComputer:~$ sudo update-grub
Generating grub.cfg ...
Found background: /usr/share/images/grub/Apollo_17_The_Last_Moon_Shot_Edit1.tga
Found linux image: /boot/vmlinuz-2.6.35-31-generic
Found initrd image: /boot/initrd.img-2.6.35-31-generic
Found linux image: /boot/vmlinuz-2.6.35-30-generic
Found initrd image: /boot/initrd.img-2.6.35-30-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows NT/2000/XP (loader) on /dev/sda1
Found Ubuntu 10.04.3 LTS (10.04) on /dev/sdb1
Found Windows Vista (loader) on /dev/sdc1
done

Addendum
Notes on nano
nano is especally easy to use in the terminal.  Move around with the arrow keys.  Type in you addtions, delete the unwanted.
The  -B or  --backup option backs up the previous version of it to the current filename suffixed with a ~.  Very handy in case of the dreaded Fat pfinger effect.
When you are through, Ctrl+o will allow you to save your edits by hitting Enter and Ctrl+x will close.  These and other options are shown at the bottom of the terminal screen with the ^ indicating Ctrl.
^G Get Help    ^O WriteOut    ^R Read File   ^Y Prev Page   ^K Cut Text    ^C Cur Pos
^X Exit        ^J Justify     ^W Where Is    ^V Next Page   ^U UnCut Text  ^T To Spell

Notes about nano, sudoeditor and other editors
Some in the Ubuntu community suggest sudoedit instead of nano.  I recommend nano — which is the default sudoedit editor in later distributions of Ubuntu — instead of sudoedit, because the default can be overridden in non-obvious ways, unless you are an administrator.  sudoedit is safer in that it automatically saves a backup copy of the edited file, but the  -B command line option in nano does the same thing.  nano is more intuitive than editors like vi or emacs, which are very flexible but require learning a lot of commands, shortcuts or different modes.
If you prefer not to use the nano editor and prefer the Gnome Text Editor, instead of sudo nano -B use gksu gedit.  I generally do this for large files, and /etc/default/grub could easily be considered a large file.  Thus type in gksu gedit /etc/default/grub instead of sudo nano -B /etc/default/grub.  Note that the Gnome text editor does not automatically make a backup!
Notes on my grub file
I made some changes to grub for my personal needs.  Such as the background picture of the moon launch.  How to do these are discussed at the Ubuntu Community Documentation page on Grub2, recommended.
Good luck!
Comment: Keep it simple is based on the Einstein quote: "Things should be as simple as possible, but not too simple." (The last three words are omitted when some quote this).  Thanks for the kudo...
Comment: love it help me a lot , but as i saw , GRUB customizer it much easy :P XD
Comment: Depending upon your configuration you may run into an issue where the "Saved method" (A) doesn't seem to work. Its quite possible that your boot menu entry needs an additional line `savedefault`. See the [grub manual](https://www.gnu.org/software/grub/manual/legacy/savedefault.html#savedefault) for more details. Hope this helps.
Comment: Make sure you use SINGLE QUOTES in Ubuntu 16 when writing the default OS name to the configuration file! Otherwise update-grub will give an error saying unexpected "(" on that line. A great and detailed answer by the way!
Comment: @hubbabubba Thanks for the heads up, I edited the answer :)
Comment: @user25  $ sudo nano -B /etc/default/grub
~
GRUB_DEFAULT=saved
~
GRUB_SAVEDEFAULT=true
~
$ sudo update-grub
Comment: For some reason, this didn't work.  But `sudo grub-set-default 0 && sudo update-grub` ... maybe this will help someone.
Comment: On CentOS minimal I did not have `update-grub` so I ran `sudo grub2-mkconfig -o /boot/grub2/grub.cfg`
Comment: On systems with Grub2 (CentOS, Fedora, RHEL) run `grub2-mkconfig | grep menuentry` to see the name of Windows menuentry. Then edit `/etc/default/grub` (add something like `GRUB_DEFAULT="Windows Boot Manager (on /dev/sda1)"` and then run `grub2-mkconfig -o /boot/grub2/grub.cfg` to update Grub configuration.
Answer: With a bit of command line trickery, you can get the default of grub to always be a particular grub entry - for example Windows - no matter when a new kernel is installed.
In a terminal type:
fgrep menuentry /boot/grub/grub.cfg

This will display all your grub entries - for example

Highlight the entry you want to default to - for example Windows 7 in the screen-shot.  Right click and choose copy
Type
gksu gedit /etc/default/grub

Change the entry
GRUB_DEFAULT=0

to
GRUB_DEFAULT="Windows 7 (loader) (on /dev/sda2)"

i.e. paste the entry you want (including the quotes)
Save, then type
sudo update-grub

source
Comment: Worked on Ubuntu 16.04, with one minor variance (changed signal quote to double qoute)
Comment: Thanks! My 20.04 installs don't seem to have `gksu` installed by default, but `sudo gedit /etc/default/grub` worked for that step.
Comment: Worked on 18.04 as well with change single quote to double quotes
Comment: worked on ubuntu 20.04
Answer: You need to edit the /etc/default/grub file to set Windows as your default OS.
First Step. Determine the Windows OS' position in the grub menu. To do this, open a terminal by pressing Ctrl+Alt+T and type the following:
grep menuentry /boot/grub/grub.cfg

This will list the grub menu entries. I'll use my grub menu as an example:
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry "Memory test (memtest86+)" {
menuentry "Memory test (memtest86+, serial console 115200)" {
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {

You will then select the Windows partition, in my case "Windows 7 (loader) (on /dev/sda1)" including the double quotes and copy it.
Second Step. Open the /etc/default/grub file. To do this, type the following on the terminal:
gksudo gedit /etc/default/grub

It will open the /etc/default/grub file with gedit. Look for the GRUB_DEFAULT=0 line and change it's value from 0 to the selected Windows menu entry by pasting it. .
GRUB_DEFAULT="Windows 7 (loader) (on /dev/sda1)"

Alternatively, you can use an integer value specifying the index position of the Windows OS, take note that index starts counting at 0, so in my example, the Windows OS value would be 4, therefore you can also set
GRUB_DEFAULT=4

After which, you need to update grub by typing
sudo update-grub

Answer: You can follow this nitstorm answer here ,
You will have to add Grub-customizer through
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Then launch it from dash , application lens.

the above menu will be different to yours, so choose wisely and select the Windows 7 entry and from the top Menu bar , select the ^ arrow to move it upward to have the top position , while booting.
For booting into Windows directly select the preference  and reduce the boot-time to load windows.
Answer: It can be done easily with a GUI tool called "Grub Customizer".
What is Grub Customizer?
Grub Customizer is a graphical interface to configure the grub2. The application allows the user to add, remove, freeze, rename and reorder boot menu items
How to install?
Hit Alt+Ctrl+T to open terminal and run following commands one by one:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

How to use?

Once installed, Hit Super key (Windows key) to open Unity dash and search for "" and open it.
Select the Linux group by clicking on Linux and move it down by clicking on down arrow in toolbar. Once done, Click on save. That's it!

Remember that you can't move single entries out of their respective group like Ubuntu can't be moved out of Linux group.
Comment: Nice, didn't know there was a GUI for GRUB2 configuration. +1 on this one ;)
Answer: Use startup manager, which you can start from the dash. There you can use the OS to start with in the dropdown menu.
Comment: Sorry I just saw that you said that startup manager is not working in the 64bit version. you can try instead grub customizer                                 Install Grub Customizer in ubuntu

Open the terminal and run the following command

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
 sudo apt-get update
 sudo apt-get install grub-customizer

Once you install you can open from Applications -> System Toiols -> Grub Customize
Comment: In Ubuntu 20.04, Grub Customizer is available in "Ubuntu Software" app.
Answer: Change the value of GRUB_DEFAULT in /etc/default/grub to whatever windows is on grubs list of available operating systems when you boot. For example in my case I would have to change that line from
GRUB_DEFAULT=0

to
GRUB_DEFAULT=5

After that, run sudo update-grub.
Comment: This method needs to be modified to always **correctly** identify the correct menu entry (for windows).  This method will only work in the simplest setup, and may **NOT** survive a kernel update or other changes.  See: http://ubuntuforums.org/showthread.php?t=1195275
Comment: Today only the newest kernel has 2 entries (recovery and normal boot), all other kernel's are grouped in "other kernels" (or something similar, I don't recall the name). So I have to disagree, it survives kernel updates.
Comment: I added the comment because your example used **=6**
Comment: That's right, it should be =5.
Answer: Identify the name of the Windows entry
On the GRUB, there should be an entry like Windows 7 (loader) (/dev/sda1). We need to know what's that name on your machine, so open a Terminal and run the following command:
$ fgrep menuentry /boot/grub/grub.cfg

The output should be something like this:
if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
  menuentry_id_option=""
export menuentry_id_option
menuentry 'Linux Mint 14 Cinnamon 64-bit, 3.5.0-17-generic (/dev/sda6)' --class linuxmint --class gnu-linux --class gnu --class os {
menuentry 'Linux Mint 14 Cinnamon 64-bit, 3.5.0-17-generic (/dev/sda6) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
menuentry "Memory test (memtest86+)" {
menuentry "Memory test (memtest86+, serial console 115200)" {
menuentry 'Windows 8 (loader) (en /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-06B66EA8B66E97C7' {
menuentry 'Microsoft Windows XP Embedded (en /dev/sda4)' --class windows --class os $menuentry_id_option 'osprober-chain-7246B3A846B36C0B' {

Look at the line we were talking about! In my machine, it is  Windows 8 (loader) (en /dev/sda1). Write the name of your entry somewhere, and now let's set is as the default.
Setting the Windows entry as the default
That's easy!
First, open our configuration file with gedit (a text editor) as root, running this command:
$ gksudo gedit /etc/default/grub

Search for this line:
GRUB_DEFAULT = 0

And modify the 0 with the name of your Windows entry. In my computer:
GRUB_DEFAULT = "Windows 8 (loader) (en /dev/sda1)"

Now just save the file, close gedit, and update grub.
Updating GRUB
Just run this command:
$ sudo update-grub

Now just restart, and the Windows entry should be highlighted as the default!
Answer: Grub-Customizer:
Is a very easy to use graphical GRUB2 settings manager. For now, it only allows you to edit the GRUB2 menu entries: reorder, rename or add/remove entries. It will also allow changes to background image and menu timeout.  Since these are actually scripts which generate the boot.cfg file, Grub Customizer changes the actual script order and then generates a new boot.cfg so if you then run "sudo update-grub", your customization won't be overwritten.
Answer: From my experience, I noticed that it's not so easy to change boot priority for Win7/Ubuntu 11.04. Utility, like Startup Manager seems like isctrying to change the default boot system, yet nothing happens after restart (11.04 continue to boot by default). I such case I suggest Grub Customiser Grub Customised on WebUpd8, which works well with Grub2. I just removed all absolete boot options (there are many), leaving only 11.04 and Win7. And then changed a boot priority. Now, everything works well :)
Good luck.
Comment: I have used Startup Manager on my parents' desktop dual-booting Windows XP and Ubuntu 10.04 LTS, and aside from the fact that you have to re-run it every time you upgrade to a new kernel, it has worked nicely.
Comment: Hi !  I suppose it's a matter of how Grub2 treat new kernel installs. It does not take in account new grub2 menu inserts :)
Answer: This is actually quite easy to do. First, you need to find out what Grub names your Windows entry. You can do that by looking in /boot/grub/grub.cfg or by running this command:
sudo cat /boot/grub/grub.cfg | grep -i Windows | sed -e 's/^.* "//g' -e 's/".*$//g'

What that command does is search for Windows in /boot/grub/grub.cfg and remove the text outside of the " characters.
The command will output something like Microsoft Windows XP Professional (on /dev/sdb2).
Now, open /etc/default/grub by running:
gksudo gedit /etc/default/grub

and change:
GRUB_DEFAULT=0

to
GRUB_DEFAULT="Name of your Windows menu entry"

Lastly, run:
sudo update-grub

to regenerate the Grub menu. And that's it! Future upgrades won't mess this up. Your Windows menu entry will always be selected by default.
Answer: edit the file /etc/grub/default
there you find the entry
GRUB_DEFAULT=0

when you first start your computer and get the grub menu
the first entry in your boot menu is 0
so if the second entry in your boot menu is Windows change this digit to 1
save, quit,
run the:
    update-grub
command and reboot to behold your new changes!
Comment: @ Daniel Guzman

You seem new to Linux/Ubuntu.(judging from your choice of keeping windows the default OS.I am sorry if i am wrong)
So when you carry out the above procedure,be careful and take care that you do not mess up with anything other than what is written.You might get into trouble. :)
Comment: I could be wrong but didn't 11.10 use grub2 and isn't the `/etc/grub/default` more of an older grub1 change? Just wondering.
Comment: 11.10 uses grub2, my examples are from 12.04. But it's the same
Answer: You don't need to install the grub-customizer!!!
i do not know what ubuntu you have installed, so I am not sure that your OS is using grub2 or the old grub, but it is more likely that you have grub2.
So, this is what you have to do for grub2:
grep menuentry /boot/grub/grub.cfg

This command gives you an output saying what startup possibilities / OSes you have.
this is a sample output:
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {

menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {

menuentry "Memory test (memtest86+)" {

menuentry "Memory test (memtest86+, serial console 115200)" {

menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {

As you may can observe, Windows 7 is on the 5th line of the output.
Next, you open the /etc/default/grub file with your text editor and sudo priviledges and modify the GRUB_DEFAULT value to (the number of the line where you have Windows 7 minus one, because the grub option index starts from 0)
So, if windows 7 is on the 5th line, you need GRUB_DEFAULT=4
if windows 7 is on the 7th line, you need GRUB_DEFAULT=6
To save the changes, type sudo update-grub.
AND this is everything.
Answer: Next time you boot your machine, count in shich position Windows 7 is placed in GRUB menu. (remember you have to count from 0 - i.e. if Windows is in the third row, then its position is 2 and so on).
Boot into ubuntu, open a terminal and write
sudo gedit /etc/default/grub

then modify the line
GRUB_DEFAULT="0"

to
GRUB_DEFAULT="N"

where N is the position (starting from 0) of Windows7 entry in grub menu.
Tell me if you need more info about this.
Comment: Right right, that´s what i ment ;)
Comment: This will break each time ubuntu installs a new version of the kernel
Comment: Actually it doesn't, because when upgrading warns you the file it's installing has changed, and prompts you if you want to change it, modify it or install a new one. Never had problems upgrading.
Comment: So if my windows is placed in position 2 then i will write "2" in the command where you wrote "N"?
Comment: if it's in the second row, then you have to put 1 (the first row is numbered 0)
Comment: thus the formula for "N" is:  - 1
Answer: I use grub customizer to do that. You can have it automatically boot into a certain OS every time or just boot into whichever OS was booted last. It is easy to install and use.
In ubuntu, open your package manager; under settings you should find "Configure Software Sources." Click on that and enter your password. Now click on the second tab entitled "Other Software" and press the add button toward the bottom. Enter in the PPA for grub customizer :
ppa:danielrichter2007/grub-customizer
Click OK and a couple of new lines will show up; close the Software Sources dialog now and push the check for updates button on your package manager if it didn't already start to update the available packages. Type into the search function : "grub-cus" and you will see the grub customizer at the top of the list. Mark it for installation then click apply to start the process. Agree to install any dependencies so they get installed automatically as well.
After installation, you can find grub-customizer by typing "grub" into the search dialog or you can also find it in the menu under Applications>Settings>Grub-Customizer.
Alternately you could just open a terminal and run the following commands:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
You may want to pick out a pretty picture to use as background to your grub boot menu.
Here are some links if you want to learn more before starting:
Launchpad PPA for Grub Customizer
Guide on How to Geek with walk through and pictures
Answer: Normally when I have to "mess up" the Grub I use "Grub Customizer", it has a GUI so you can see easily what you are changing.
Just type this into the terminal:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Then search in the Dash for grub customizer and change the predefined entry to Windows.
Comment: I haven't used this, but I think this should be merged in to the other question as an answer if this closes.
Comment: it is not necesarry to install software for changing the grub order. you can do it also with grub-customizer, but it is more difficult than by command line, i think


How do I contextualize chords from different keys that sound good together?

Question: For instance, an E major triad followed by an A minor sounds really good to me. I don't believe these can belong to the same key, because you can't have a sharp g and a natural C in the same scale as far as I'm aware (because it goes F#, C#, G#, so if G is sharp then F and C must also be). Is going from E major to A minor a change in key? If so, why do chords from these two keys sound good, and why are keys necessary if you could just mix them up and still sound good? I'm having a really difficult time comprehending keys and how to use them effectively.
Comment: "because you can't have a sharp g and a natural C in the same scale" - what about A harmonic minor?
Comment: You have a common cadence (progression) that goes I --> IV --> iv --> I.  It sounds very nice.  A is the 4th of E so this works.  In addition to the comment by @FlipTack, there are several reasons why this specific example works.
Comment: This other question happens to be about a song that switches between two keys all the time https://music.stackexchange.com/questions/93367/how-do-the-chord-progressions-in-the-song-raw-sugar-by-metric-make-sense-in-th  At each point, the scale might be different, the key might be different, but still the same simple functional tonic - subdominant - dominant based mechanics apply locally. You just move around and don't stay fixed to the same key and scale.
Answer: I think for your specific example: E major chord to A minor chord, they do belong to the same scale: the (harmonic) minor in A. In the harmonic minor scale the natural minor scale is altered by sharpening the seventh degree to create a leading tone to the tonic and at the same time to make a chord with dominant function possible. When we look at it this way, the G sharp in the E major chord is just the leading tone to A. This leading tone gives the E major chord its dominant function.
So, the two chords can be interpreted simply as a dominant-tonic cadence in a minor tonality. That's why it sounds so good/familiar.
To give a more general answer to you question:'How do I contextualize chords from different keys that sound good together?' More often than not in tonal music you can find a relationship between two chords by assuming a temporary tonicization (like we did above).
Comment: I don't interpret the question as such. The OP just sees the g# as evidence that there also must be an f# and a c# (because of key signatures). And thus that the E major chord belongs to a different scale. He just hasn't heard about the use of the leading tone in minor tonalities.
Comment: But, what if the key is actually `E` major? The question implies that is the case by mentioning `C#`. If the tonic chord is unchanged, but the subdominant IS changed, it's hard to hear that as a tonicization. IF `E` major became `E7` that's a better case for tonicization.
Comment: But even if the key of the piece would be E major, seeing the move from E to Am would be most naturally seen as a temporary tonicization. But everything dependance on context ofcourse!
Comment: Nonetheless I think your answer is a very good answer on the general question.
Comment: If the key is based around E, could it be thought of as E melodic major (or harmonic major)? That has G♯ and C♮. And I think it's definitely possible to analyze this as simple modal mixture, or if you want a name for it, the minor plagal cadence.
Comment: So the A harmonic minor scale has only a sharp g?
Answer:
contextualize chords from different keys

IF the chords are from different keys you can analyze according to those keys (literally contextualize them to the context of the associated key)...

secondary relationships, usually secondary dominants
borrowed keys
just label the other key

I say IF because you can have non-functional harmony where keys aren't really the tonality.

For instance, an E major triad followed by an A minor sounds really good to me.

Two chords doesn't necessarily make a key, but let's assume the key E major. The A minor is borrowed from the parallel E minor. So simply label the A minor chord with lower case letters...
E: I iv

Is going from E major to A minor a change in key?

Not necessarily, and this is the reason for the secondary and borrowed concepts. They are ways to indicate the harmonic relationships with referring to a literal key change. They acknowledge that key is a fluid concept in the flow of real music.
My suggestion is to get Kostka's Tonal Harmony - or another standard textbook - learn all the labeling of chords, and then start analyzing Bach's 371 Harmonized Chorals. You will quickly learn that harmony is not restricted to the diatonic tones of a key!
Comment: Can you transform the "is" sentences in the first paragraph to something about doing, something that the OP can do? What do you _do_ in order to determine if chords "are from different keys"? How do you tell if keys aren't really the tonality? What actions do you perform? And then if the outcome of those actions is such that ... (what) ... then you decide that the chords or keys "are" something?
Comment: I'm really just pointing out that the OP's question is about _well known harmony concepts._ I don't want to re-write what a textbook explains. The OP just needs to know they are drifting around in some musical no-man's-land. It's time to study!
Answer: New Answer
Let's start with the three basic chords of scale: Tonic, Subdominant and Dominant. And, as the original post suggest, restrained to major. Each major scale could be abstracted to 7 different notes. Those could be designated by Roman Numerals (I, II, III, IV,..). The numerals also represents the triads build on this note (with only scale notes).
Tonic: This is the basic triad of the scale at position I. E.g. E maj, the scale goes: e f# g# a b c# d# e, the basic triad of the first position, I, is e, g#, b, that is E maj. This is Tonic, the home.
Subdominant: This is the fourth position (IV). In our scale, it is the triad a, c#, e, therefore A maj. It has a tendency to lead toward the Dominant, but also back to the Tonic. In that case, the a pulls towards the g# and the c# towards the b.
Dominant: This is the fifths position (V), the b. The (major) triad on the b, with just scale note, then is b, d#, f#. This chord has a strong tendency to pull back, pull home to the tonic.
So we identified A maj as the subdominant to E maj. But the question asked for A min, i.e. A, C, E. As the OP states, C is not part of the E maj scale. Nonetheless, the A has a strong pull towards the Gis because of the subdominant major character and C towards B as because of the subdominant minor character.
The interesting thing here could be the parallel minor third movement, resulting in this gloomy resolve, making it pleasant but somehow strange.
Different Approach
The E Maj A Min relationship could be interpreted as a Terzschritt. C Maj and E Maj would be a classical Terzschritt in a Riemann sense. That meands, C Maj transforms to E Maj by moving a major third up. C Maj and A Min are parallel scales. So, this could be another relation
Old Answer for reference
This is basic chord function theory.
You mentioned your E major key. This is your tonic. With basic function theory you will find your dominant and your subdominant, that is B major and A major. Those three will sound well together. Basically it comes down to multitudes of frequencies.
You want to learn about the use of subdominant and dominant in your chord progressions.
In your question you mentioned A minor. Now this is advanced function theory. The A minor is not the subdominant to E-Major, as it is, as you mentioned, not "in the scale". Actually I have a hard time to hear that progression right of my mind, but it might work.
[I gave it a hear. The minor still have this subdominant feeling, leading towards the dominant. But that should be then minor to, in my ears. Therefore I would consider everything minor and the e-Major as the borrowed chord.]
There is a thing where you not only consider the chords "within" the scale but also their relatives and their parallels. Those are called borrowed chords.
You could consider the A minor as something like a quart variant of the subdominant. Or it functions as the submediant parallel. I guess, it depends at the context.
(Since I am German, I do not have the right English terms at hand).
You said you have difficulties in comprehend keys and chord functions. The basic primer would be this: learn about Tonic, Subdominant and Dominant and their use. Learn about the leading function of the seventh and the concept of resolving. That would be the bedrock for the advanced stuff.
Comment: I'm only guessing, but two things could be emphasized and clarified in your answer to help the OP better, (1) the _applicability_ of functional harmony "scenes" or contexts where you have the tonic, subdominant, dominant, etc. chords around a tonic, - namely, the thing with the surprising Am is that it is "borrowed" from a different "scene" (different key? does the tonic note seem to move? it may or it may not)  -  and (2) real _learning_ about them and building the bedrock only happens through _practice_. Or maybe 99% practice, 1% theory talk.
Comment: The 'is' bit may confuse some. Read '#'.
Comment: @tim Point taken. It already took a lot of effort to write b when I think h. :-) I changed them.
Answer: There are a couple of 'facts' you seem to have read into music theory. One is the addition of sharps as we go through the 'cycle of 4ths/5ths'. That much is true, in that they're cumulative. That's key signatures. Start with F♯, then comes C♯ and so on.
That's only a part of the story, and as we keep on stating, it's music theory, not music law.
Another bit of misinformation you have concerns the minor scale notes, which somewhat defy logic for beginners.There are three different minor sets of notes - natural, harmonic and melodic. As the leading note is a very important part of music, being one semitone under the root, in all keys, it didn't (doesn't) exist in the natural minor set. That gets rectified in both harmonic and melodic sets of notes, making the harmonies and melodies better sounding, generally.
So, your E chord (with that leading note of G♯) will go nicely into A minor, mainly because it belongs to A harmonic or melodic minor. You say it sounds good. If the piece is in key Am, it always will! If the key is, say, C or G, then yes, it'll still sound good. It probably won't mean there's a key change - maybe a small modulation - but it's sometimes how music works.
There are tens of thousands of players out there who probably use changes like that all the time, and haven't a clue about the theory behind them, only that they know it sounds good. It's great that you feel the need to know why, but as is often the case, there's a missing link in your knowledge, as I think happened here, that trips you (and many others) right up!
Answer:
Is going from E major to A minor a change in key?

Since you talk about F#, C#, G# etc. I suppose you are already sure that E major is your key. If you are in the key of E major, meaning that E feels to you like the home note, E major feels like the home chord and the scale you're thinking about is E major, then A minor is some kind of a change to that picture, yes. However, how big a deal is it - would you write a key signature change for the Am? If the detour in feeling is only very brief - if nobody needs to know - you might not bother calling it a key change. But if you need to play some notes on top of the Am, you have to know that some notes from the E major scale, particularly C# and D# will probably sound bad. Depending on how you want to make it sound, you might want to avoid G# as well. But then, F or F# on the Am? If you use F#, you can make it sound like the key of Em, but if you use F, it could feel like Am. How about playing the chords E - Am - F ...?

If so, why do chords from these two keys sound good

Because key changes sound good! :) And this particular key change - if it's between E major and E minor - is a commonly used one. Here's another question about a song that does a similar thing How do the chord progressions in the song "Raw Sugar" by Metric make sense in theory

why are keys necessary if you could just mix them up and still sound good?

Because key changes sound good! :) And how can you have a key change without the concept of key?
A key is like a "for dummies" product package, a grouping of things that can be pretty safely mixed together in a somewhat sensible way. To mix components from two different product packages in a sensible way requires a bit more experience. It's like ... white clothing product package: white trousers, white shirt, white jacket, white socks, white shoes, white tie. Yeah, they all go together, but isn't it a bit boring? Mix in some components from the blue product package ... it's more interesting. :) I don't know if this analogy helps.
Answer: You seem to be assuming that an E major chord puts the music into the KEY of E major, with 4 sharps.
Suppose we think rather of being in A minor?   E major is the dominant chord in the key of A minor.  But G♯ isn't in the key signature of A minor?  True.  But it's in the harmonic form of the A minor scale.  It's in there BECAUSE tonal harmony is all about dominants and tonics, and a dominant chord needs to be major, to include the leading note a semitone below the tonic.
(The more 'modal' sounding E minor chord is fine in A minor too.  But it doesn't give the strong pull towards the tonic that E major does.)


How do I show $\|(e^{-2\pi ihx_j} - 1)/h \| \leq 2 \pi \|x\|$?

Question: How do I show $\|(e^{-2\pi ihx} - 1)/h \| \leq 2 \pi \|x\|$? for each h and x?
I thought about using taylor expansion of Euler's formula, but it did not work out.
Thank you in advance.
Answer: The inequality $|e^{i\theta}-1| \le |\theta|$ is clear from geometry: The LHS is the euclidean length between $e^{i\theta}$ and $1$ as complex numbers on the unit circle, while the RHS is the radian measure. Now set $\theta=-2\pi h x$ and you are done.
Answer: I'm assuming $x,h \in \mathbf{R}$. Multiply both sides by $|h|$ and set $y = 2\pi hx$ to get the equivalent inequality
$$|e^{-i y} - 1| \le |y|, \quad y \in \mathbf{R}.$$
Now this can be equivalently written as
$$|\cos(y) - 1 - i \sin(y)| \le |y|.$$
Square both sides and expand to get the equivalent inequality
$$\cos^2(y) - 2 \cos(y) + 1 + \sin^2(y) \le y^2.$$
When you simplify this, you get
$$f(y)=\frac{1}{2}y^2 + \cos(y) - 1 \ge 0.$$
Now at $y=0$ the inequality holds. We'll show that $y=0$ is a global minimum for the function $f$. Indeed notice that as $y \to \pm \infty$, $f(y) \to \infty$.
Differentiating $f$ we get
$$f'(y) = y - \sin(y).$$
We wish to solve $f'(y) = 0$, i.e. the equation
$$\sin(y) = y.$$
It is well known that $\sin(y) = y$  if and only if $y=0$, so we are done.
(The last fact is also easy to prove: $x \mapsto \sin(x) - x$ is strictly decreasing by a simple inspection of the derivative.)


What gcc version do I need?

Question: I have installed ns-2.28 on ubuntu 12.04. My kernel version is 3.2.0-29-generic-pae.
What gcc version matches my ns-2.28 & 3.2.0-29-generic-pae?
Answer: That is supposed to be done by Ubuntu Maintainers in their repository unless you build it from sources (a bad practice to new bees which I presume you did not do). So just install the package needed, that is:
<code>sudo apt-get install  build-essential
</code>

What gcc version do I need?


Are some pop songs not able to be played on the ukulele?

Question: Since the ukulele has only 4 strings, which is less than the guitar, does that mean that some pop songs are not able to be played on the ukulele?
Comment: In what way do you think it may not be possible?
Answer: Any song can be adapted to be played on any musical instrument.*
That having been said, some musical instruments have more limited abilities than others, and require more adaptations from the original.  And it's a matter of opinion how far you can go adapting your song to a different instrument until it is no longer the same song.
As you mentioned, a ukulele can only play 4 tones at a time, compared to 6 on a guitar.  In addition, a ukulele's strings are tuned to a higher pitch than a guitar's, which means that guitars can play lower notes than are possible on a ukulele.  So if your question is whether there are pop songs with guitar parts that cannot be duplicated exactly on a ukulele, then yes, most guitar parts cannot be played exactly the same on a ukulele.
However, there are corresponding ukulele chords for most guitar chords.  These chords do sound different on a ukulele than they do on a guitar, but can be played in a song and sound just fine.

* I'm sure someone could play Beethoven's 5th on a triangle (at least the rhythm), and a few people listening might even be able to name that tune.
Comment: "Any song can be adapted to be played on any musical instrument." Eh, I don't think so... You don't even think so yourself: "And it's a matter of opinion how far you can go adapting your song to a different instrument until it is *no longer the same song*"
Comment: This is just not true. I have a native american flute which is tuned to a traditional scale and you really can't play european music on it at all. My daughter has a diatonic xylophone so she can't play anything in a minor key.Then there are pentatonic recorders, hang drums etc.
Comment: Yes, this answer is a bit of hyperbole. Yet, even though your daughter's xylophone can't play a minor key, she can adapt songs and play them in a major key. That was my point. A guitar can play some notes that a ukulele can't, and yet you can still play any song you want, it just may need to be modified a bit. I can't play chords on my recorder, but I can still play the melody of any pop song I want.
Comment: If you play a minor song in a major key you're not playing the same song.
Comment: @Bob That's really a matter of opinion.  Something that has become [popular on Youtube](https://www.youtube.com/results?search_query=minor+key) is to perform songs in a minor key that were originally written in a major key.  Chase Holfelder is one performer that has made a name for himself doing this, such as on [The Star Spangled Banner](https://www.youtube.com/watch?v=M_PtnvVQhqA).
Comment: It comes down to what exactly defines a song's identity. Is changing one note a different song? How about a whole passage? Etc.
Answer: You can give a reasonably convincing version of just about any style of music on uke.  Here's just two of my friends proving the point - Andy Eastwood with his rendition of 'William Tell' overture, and Mandi Harkett with her Opera-lele
http://www.andyeastwood.com/
https://iloveclassicalukulele.com/opera-lele/
Pop songs?  No problem!
Answer: The big problem with converting guitar music to ukulele is the voicings that guitar uses. Any guitar chord van be voiced on ukulele. Some, however, are more difficult than others. Even extended chords like C13 can be accomplished on ukulele rather convincingly, but often the problem is how to connect these chords smoothly, with voice-leading and some chords being hard to invert on ukulele.
Ultimately, it comes down to how accurate you want to be with any arrangement of a song. It's unlikely that you'll be able to play the exact same chords as the original guitar, but that shouldn't mean the song is impossible to play. You'll never be able to perfectly recreate a pop song on any instrument. But that doesn't mean it's impossible to arrange it, you just have to be creative in how you make the sounds you hear using the restricted string set of an ukulele.


How old should a child be before getting their first cell phone?

Question: My kids (7&9) are starting to ask for their own cellphone. Right now, they don't need one. When is a good time for a first phone?
Comment: Our neighborhood is a small, close community and our neighbors let their 8 year old son play alone. They did not want him to get a cellphone, so they got him a walkie-talkie set so he could contact them and vice versa.
Comment: I'm glad to know my seven-year-old isn't the only one asking for a phone at that age!
Answer: My theory is, when a kid needs it, they will get one.
What does needing a cell phone entail? They must be in some kind of a situation that requires it. This can include driving, frequent after school activities, school projects, etc. But if they pretty much just go to school and family activities, then there isn't as much of a need.
Comment: Also note that having one's own phone isn't the only solution.  My son is 8, and doesn't need his own mobile at this point.  However, if he is going to be somewhere where plans might change suddenly, one of the adults in the family (usually me) will leave our phone with him so that the adult-in-charge isn't assumed to foot the bill for all the kids' calls home.  Also, he can and does text from his laptop.
Answer: Our own thoughts regarding this: when our son is old enough to go to and from school on his own, at which point we'd want him to have one. We've tentatively put this at 12 (but we've reserved the right to push that out further :). He is 8 at the moment and has been asking for a cellphone for about a year.
Answer: In 2007 Belgian pediatricians seeked media attention to state that children younger then 16 should not have a cellphone. Here is a description in Dutch Brief translation:
Belgian doctors would like to forbid cellphone use by children younger then 16. Although there is no scientific sound proof, they still deemed a warning appropriate. Apparently some study showed an increase in brain temperature in kids. I did a quick google search and found an english page on the matter.
When I searched Pubmed I did not find conclusive evidence against cellphone use.
Comment: The effects on of cell phone use on the brain has been very widely discussed and investigated. Oddly, all those studies come up with very different results and recommendations. For now, I think the parents shouldn't be overly panicked but use sound judgment. A cell phone is not plutonium; it's okay to use a couple of minutes per day, but it shouldn't be exaggerated.
Comment: You are just rephrasing the links ;) The only valid point they make is that the anatomy of a child is weaker then that of an adult and that the heating effect of the brain is thus stronger. Alcohol is also not plutonium, still I would not allow my kids to drink before 16.
Comment: Oops, busted. I didn't actually read those links :-)
Answer: Ideally, when they are old enough to raise enough money, on their own, for buying the phone and paying of the monthly plans.
This will change with the child's lifestyle and community though. A cellphone is a useful way to keep track of where your kids are, and is incredibly useful in emergencies. If you're living in a highly urban area and your children spend significant time unsupervised or in transition, a cheap phone and plan can become a necessity.
Answer: "How old" can't be said in a numerical answer, but rather in terms of maturity. Above all though, if there's no real need for a phone, the child shouldn't have one.
Parents must decide case-by-case, depending on how they thnk the kids will use the newfangled technology. Is the child mature enough to use it in time of need, and not just to gossip with peers?
To minimize cost and bad behaviour, make sure the phone can call and send texts, and nothing else! (At the risk of being teased for only having a stone-age phone.) Cameras, games, etc. are dangerous distractions to young minds.
... and remember, we all grew up without cell phones and we managed fine anyway.
Comment: I grew up without cell phones _or_ pay phones and managed to survive, so afrazier's anecdote is countermanded by my own :)
Comment: We also grew up with the wide availability of pay phones, so we didn't *need* cell phones like we do today.
Comment: "Cameras, games, etc.[what else?] are dangerous[how?] distractions to young minds[citation-needed]. ... and remember, we[who?] all grew up without cell phones and we managed fine anyway[dubious-discuss]."
Comment: True, and today there are nearly no public phones left. It's uncertain whether to ask a stranger to borrow his cell. Worrying. But then again, I actually *used* a public phone maybe ten times in all.
Comment: I didn't need it often either, but if it was "walk home from school in the pouring rain" or "use the pay phone and see if mom can come get me," I made sure I had a quarter!
Answer: When their privileges dictate a need for one.  I would say when you feel your children are mature enough to be allowed to do certain events without adult supervision, or events a substantial distance from you, get them a phone to use during those events.  These events could be hanging out at the mall or participating in after school events, either way this gives the initial impression that a phone is a tool and not a toy.  Then from that point progress to full time phone possession as you see fit.


Problem in the chat php/ajax(jquery)

Question: I programmed Chat script using PHP and jQuery but the problem is Will be great pressure on the server ??
If there is an answer please tell me
Thank you in advance
Answer: It all depends on the logic you've used.
If you make the server block for a sensible amount of time before sending a 'no data' response, load will be much less than if you fire off a new request every time you get a response from the server

Problem in the chat php/ajax(jquery)


the intersection of a sequence of measurable sets

Question: If $\Omega$ is a bounded open set in $R^n$, $\Omega_j\subset\Omega$, and $|\Omega_j|\geq\epsilon$, which $\epsilon$ is a constant. Can we say there is a subsequence $\Omega_{j_k}$ of $\Omega_j$, such that $|\bigcap_k\Omega_{j_k}|>0$ ? We know this is true when $\Omega_j$ are all balls. So, considering what assumption, this is true?
Comment: This is well known. If the sets are independents on a probability space there is no such
subsequence.
Comment: I see no reason to close it, since it is not known to non-specialists.  More on juan's comment in an answer.
Comment: As far as I understand it, the question is not whether the property holds for every such sequence $\Omega_j$ (which is false), but under what additional conditions it holds.
Comment: Since the answer is negative even when the sets $\Omega_j$ are open, it is hard to imagine an assumption where the statement holds and which does not imply that each set contains a ball of some fixed diameter. However, perhaps I am wrong!
Answer: NO  Based on juan's comment.
Suppose $\Omega$ has measure $1$ and the $\Omega_j$ are independent in the sense of probability with measure $\epsilon$.  Then the intersection of any $n$ of the sets has measure $\epsilon^n$, and a countable intersection of the sets has measure zero.
A concrete example: let $\Omega$ be the unit interval $(0,1)$ in $\mathbb R$, let $\epsilon = 1/10$.  For each $i$, let $\Omega_i$ be all numbers in $(0,1)$ such that the $i$th decimal digit is $7$.  This is a finite union of intervals, leave out the endpoints if you want your sets to be open.
Answer: Here is an explicit example that elaborates on Juan's and Gerald's answers. Let $\Omega=[0,1]$.
Let $\Omega_j$ be the union of $2^{j-1}$ intervals of length $2^{-j}$, with the first interval starting at $0$, and all intervals being spaced distance $2^{-j}$ apart.
That is,
$\Omega_1 = (0,1/2)$;
$\Omega_2 = (0,1/4) \cup (1/2,3/4)$, etc.
Then this sequence is a counterexample to your statement, as the intersection of $n$ of these sets has measure exactly $2^{-n}$.
Comment: Sorry for vaguely expression, here $\epsilon$ is a positive constant.
Comment: Yes, and in this case $\varepsilon=1/2$ ...
Answer: As Emil Jeřábek pointed the question must be under what conditions exists the subsequence. We may always normalize and consider $|\Omega|=1$.
The answer in general is NO.  For a more general condition (more general than independence) it can be proved that
for any pair of constants $0<\alpha, \beta <1$ with $\beta<\alpha^2$ there is an integer $N=N(\alpha,\beta)$ such that for
any sequence $(\Omega_j)_{j=1}^n$ of measurable sets on a probability measure space such that
$|\Omega_j|\ge\alpha$ for all $j$ and $|\Omega_j\cap\Omega_k|\le\beta$ for all
$j\ne k$, we have $n\le N$.
To prove it consider the inequality  $\Vert \sum\chi_{A_j}\Vert_1\le
\Vert \sum\chi_{A_j}\Vert_2$.
The only positive conditions that cames to mind is. If $\sum(1-|\Omega_j|)<\infty$, then the subsequence exists.  Take an N such that
 $\sum_{j>N}(1-|\Omega_j|)<\varepsilon$. It is easy to show that
$\Omega\smallsetminus\bigcap_{j>N}\Omega_j$ has measure $<\varepsilon$.
Answer: To generalize somewhat the case of balls:
Let $(\Omega,  \Sigma, \mu)$ be a measure space.  Let $\cal M \subset \Sigma$
be a family of sets with the property that the symmetric difference $A \Delta B$ has  positive $\mu$-measure whenever $A$ and $B$ are distinct members of $\cal M$.  Then
$\cal M$ is a metric space with the metric $d(A,B) = \mu(A \Delta B)$.  Suppose further that
$\cal M$ is compact.  Then any sequence $\Omega_j$ in $\cal M$ with $\mu(\Omega_j) \ge \epsilon$ has a subsequence whose intersection has positive $\mu$-measure.  For we can take a subsequence $\Omega_{n_j}$ that converges to $\Omega_0 \in \cal M$.  Since $\mu(\Omega_0) \ge \mu(\Omega_{n_j}) - d(\Omega_{n_j}, \Omega_0)$ we get $\mu(\Omega_0) \ge \epsilon$.  By taking a sub-subsequence, we can assume $\sum_j d(\Omega_{n_j}, \Omega_0) < \epsilon$, and
then
$$ \mu \left(\bigcap_j \Omega_{n_j} \right) \ge \mu(\Omega_0) - \sum_j d(\Omega_0, \Omega_{n_j}) > 0$$
Answer: Perhaps if you consider the case where $\Omega_j$ are sets of finite perimeter you can recover the statement.  A set $\Omega_j$ is of finite perimeter in $\Omega \subset \mathbb{R}^N$ if $\chi_{\Omega_j} \in L^1(\Omega)$ and $Per(\Omega_j,\Omega):=\sup_\phi \left\vert\int_\Omega \chi_{\Omega_j} div\; \phi\;dx \right\vert <\infty$ where the supremum is taken over $\phi \in C_c^1(\Omega;\mathbb{R}^N)$ such that $||\phi||_\infty \leq 1$.
In particular, balls are sets of finite perimeter, since we may integrate by parts to show that $\left|\int_\Omega \chi_B div\;\phi\;dx\right| = \left|\int_{\partial B} \phi \cdot n \;d\mathcal{H}^{N-1}\right| \leq \mathcal{H}^{N-1}(\partial B)$.
Then a general compactness result for sets of finite perimeter/$BV$ functions implies that if we have a sequence $\Omega_j$ with $\epsilon \leq |\Omega_j| \leq C$ and $Per(\Omega_j,\Omega) \leq C$  we may find a subsequence whose characteristic functions converge strongly in $L^1(\Omega)$, and using this subsequence it should be possible to choose another subsequence with the desired property (eventually this subsequence will converge to some limit $A$ with $|A|\geq \epsilon$ from the strong convergence in $L^1(\Omega)$, and therefore choosing $\Omega_{j_k}$ which are near the limit we can find a countable family with positive measure of the intersection.


Cannot turn Bluetooth off

Question: I cannot turn Bluetooth off on my MacBook Pro. I am running 10.7.4 and the option to turn it off is grayed out, both in the toolbar and in System Preferences. I used Onyx to reset permissions but to no avail. Help, please! I am not using any Bluetooth devices and I'm not sure when or how it got turned back on, but I've always made sure it was turned off. My battery is paying the price!
Comment: just to confirm - your account has admin rights?
Comment: That is correct, it does have admin rights.
Comment: I had the same issue, it will turn on and won't let me turn it off.  After a couple of reboots, it turns itself off and everything is back to normal, no more grayed out options, everything works like nothing ever happened.  It might be a bug in 10.7.4.
Answer: If I hold the Option key when I click on the Bluetooth preferences, I get this weird little guy:

Looks like an unlocked lock. When I click it, it asks me to allow com.apple.preferences.Bluetooth.remoteservice to make changes:

After authorizing, the little guy looks like a locked lock and I cannot disable bluetooth:

Hence, perhaps you could do this in reverse order to make the little guy look like an unlocked lock in order to disable bluetooth.
Answer: I would install a clean copy of OS X on to an external drive and test to see if your current OS is corrupt. If the hardware doesn't let you turn it on or off with a clean install, you have saved yourself having to back up and erase the internal drive and know to take it in for repair.
If you find it's corruption, you could then run Migration Assistant to take the data from the internal drive to the new clean OS and re-test before doing the erase and copy of a working OS with your personal data and settings.
Answer: rm -rf /Library/Preferences/SystemConfiguration/com.apple.Bluetooth
It works for me without restarting.
Answer: If the issue is corrupted bluetooth preferences, which is my best guess, the following should fix it:
Move the following files to your desktop:
/Library/Preferences/com.apple.Bluetooth.plist
/Library/Preferences/com.apple.Bluetooth.plist.lockfile

Restart your Mac.
This will force your Mac to forget all it's Bluetooth settings so you will have to re-pair all your devices.
Comment: I have the following:
Comment: ..oops, I have the following: com.apple.BluetoothAudio.plist; com.apple.BluetoothFileExchange.plist; com.apple.BluetoothFileExchange.plist.lockfile; So I see the lockfile, which one for the first one you listed? Btw, thanks for helping, really appreicate it.
Comment: I don't think any of those files you mentioned will do the trick.  Perhaps the issue is that your Mac is not able to create the .plist file due to permissions issues.  Can you try to repair permissions from Disk Utility?
Comment: I repaired permissions with Disk Utility and then restarted the Mac. I went back to the library and no luck with those plists. Bluetooth options still grayed out.
Answer: Experiencing a similar problem in 10.11, I found force quitting the process blued resolves the issue.  This can be done either through Activity Monitor or on the commandline via killall blued.
Answer: I was struggling with this problem for a very long time. Finally I told Siri to "turn off bluetooth" and somehow it is now fixed for me.
Answer: Try to reset your SMC as per instructed  here
got some answers from here

Cannot turn Bluetooth off


How to fit a model for a time series that contains outliers

Question: I have fitted ARIMA(5,1,2) model using auto.arima() function in R and by looking order we can say this is not a best model to forecast. If outliers exist in the data series, what is the method to fit a model to such data?
Comment: Do you have any data/theory as to what points are outliers? You can't simply assume that "far away" points are outliers, but if you know that something special happened on a particular date and that event would affect your data, you can add an indicator variable to your model for that date. See IrishStat's comment, below.
Comment: If something special happened on 1 or 2 weeks in that period and it affect to the model, then the model may be incorrect. since there's no other reason like seasonal variation, I assumed that outliers is the cause that affect to the model.
Answer: Michael Chernick points you in the right direction. I would also look at Ruey Tsay's work as that added to this body of knowledge. See more here.
You can't compete against today's automated computer algorithms.  They look at many ways to approach the time series that you haven't considered and often not documented in any paper or book. When one asks how to do an ANOVA, a precise answer can be expected when comparing against different algorithms. When one asks the question how do I do pattern recognition, many answers are possible as heuristics are involved. Your question involves the use of heuristics.
The best way to fit an ARIMA model, if outliers exist in the data is to evaluate possible states of nature and to select that approach that is deemed optimal for a particular data set. One possible state of nature is that the ARIMA process is the primary source of explained variation. In this case one would "tentatively identify" the ARIMA process via the acf/pacf function and then examine the residuals for possible outliers. Outliers can be Pulses, i.e., one-time events OR seasonal pulses which are evidenced by systematic outliers at some frequency (say, 12 for monthly data). A third type of outlier is where one has a contiguous set of pulses, each having the same sign and magnitude, this is called a step or level shift.  After examining the residuals from the tentative ARIMA process one can then tentatively add the empirically identified deterministic structure to create a tentative combined model. Nor if the primary source of variation is one of the 4 kinds or "outliers" then one would be better served by identifying them ab initio (first) and then using the residuals from this "regression model" to identify the stochastic (ARIMA) structure. Now these two alternative strategies get a little more complicated when one has a "problem" where the ARIMA parameters change over time or the error variance changes over time due to a number of possible causes, possibly the need for weighted least squares or a power transform like logs / reciprocals, etc. Another complication / opportunity is how and when to form the contribution of user-suggested predictor series to form a seamlessly integrated model incorporating memory, causals and empirically identified dummy series. This problem is further exacerbated when one has trending series best modeled with indicator series of the form $0,0,0,0,1,2,3,4,...$, or $1,2,3,4,5,...n$ and combinations of level shift series like $0,0,0,0,0,0,1,1,1,1,1$. You might want to try and write such procedures in R, but life is short. I would be glad to actually solve your problem and demonstrate in this case how the procedure works, please post the data or send it to firstname.lastname@example.com

Additional comment after receiving / analyzing the data / daily data for a foreign exchange rate / 18=765 values starting 1/1/2007

The data had an acf of:

Upon identifying an arma model of the form $(1,1,0)(0,0,0)$ and a number of outliers the acf of the residuals indicates randomness since the acf values are very small. AUTOBOX identified a number of outliers:

The final model:

included the need for a variance stabilization augmentation a la TSAY where variance changes in the residuals were identified and incorporated. The problem that you had with your automatic run was that the procedure you were using, like an accountant, believes the data rather than challenging the data via Intervention Detection (a.k.a., Outlier Detection). I have posted a complete analysis here.
Comment: @IrishStat: In the future, can you use the formatting options? (the correct key to insert links is ctrl-l, not ctrl-c).
Comment: @user603 I have been simply using the add a graph option. I don't know what you mean by ctrl-l or cntrl-c. Perhaps you could help me , please contact me at dave /@/ autobox.com and perhaps you can walk/talk me through this.
Comment: @IrishStat: have a look  [here](http://meta.stackoverflow.com/editing-help#links) .
Comment: @user603 OK but I still don't know what you mean by ctrl-l and cntrl-c . I was using the image transfer where I am able to insert an image. If I type cntrl-g I just get a blank pop-up screen.
Comment: @IrishStat: it's okay -- the link's method is even better than ctrl-l :). P.S.: my aim was to help you make your answers/comments more appealing, cosmetically, by hiding these long links that cut through the flow of the text.  The link explains you how to achieve that.
Answer: There is no ready to use robust counterpart to arima function in R (yet); should one appear, it will be listed here. Maybe an alternative is to down-weight those observations that are outlying with respect to a simple univariate outlier detection rule, but I don't see ready to use packages to run weighted ARMA regression either. Another possible alternative would then be to Winsorize the outlying points:
#parameters
para     <- list(ar=c(0.6,-0.48), ma=c(-0.22,0.24))
#original series
y1 <- y0 <- arima.sim(n=100, para, sd=sqrt(0.1796))
#outliers
out      <- sample(1:100, 20)
#contaminated series
y1[out]  <- rnorm(20, 10, 1)
plot( y1, type="l")
lines(y0, col="red")

#winsorized series
y2      <- rep(NA, length(y1))
a1      <- (y1-median(y1)) / mad(y1)
a2      <- which(abs(a1)>3)
y2[-a2] <- y1[-a2]
for(i in 2:length(y2)){
   if(is.na(y2[i])){ y2[i] <- y2[i-1] }
}

Comment: A rule based procedure works for this series bu having looked at time seriesdata for nearly42 years may not work in general.Consider a simple series that has an auto-projective process e.g.1,9,1,9,1,9,5,9,1,9,1,9 where the 7th value is exceptional OR in general a series that hasa strong autoprojective structure of some unknown form OR a series that has 1,2,1,1,1,2,1,1,1,2,1,20,1,2,1,2,1,1,1,2,1,2,2,19,2,1,1,2,1,2,1,1,2,2,2,21 a monthly series that has no pulses BUT does have an unspecified SEASONAL DUMMY. Detecting 12,24,and 36 as BAD would be throwing out the baby with the bathwater.
Comment: All that you say is true i.e. you were providing a band-aid that would help with the wound if 1) the series was stationary which assumes among other things no level shifts , no trends et al , no ARIMA structure ; and 2) the series has to be non-seasonal or has been previously de-seasonalized ; . It is my experience that such assumptions hardly if ever hold and users ignore your caveats as they try to wrestle with time series that has "imperfections". My comments here are not meant to be argumentative but rather illuminating ( to some ! )
Comment: @IrishStat the OP has updated his question and stated that there is no seasonality.
Comment: Are you Christophe ?.
Answer: There is a sizable literature on robust time series models.  Martin and Yohai are among the major contributors.  Their work goes back to the 1980s.  I did some work on detecting outliers in time series myself, but Martin was really one of the many contributors to both the detection of outliers and parameter estimation in the presence of outliers or heavy-tailed residuals in time series.

Here is a link to a survey article on the topic with a list of over 100 references.  It even includes my 1982 JASA paper.
Here is a 2000 PhD thesis (pdf) that covers the theory, methods and applications of robust time series analysis and includes a nice bibliography.
Here is a link on software that includes some robust time series tools.
Comment: What is the software used for Robust forecasting? Is it suitable for univariate series?
Comment: @Anthony That is a very good question. I have not done any robust time series modeling. dug Martin founded the company called Insightful (they actually had several name chnages) that marketed SPlus. I am pretty sure that he included robust methids in the SPlus software. There is probably now a version in R. I will check into it.  Here is a Wikipedia article including the history of SPlus. http://en.wikipedia.org/wiki/S-PLUS
Comment: @Anthony Here is a source provided by Rob Hyndman on what is available in R on time series analysis.  It includes what is in CRAN and covers a wide variety of methods including robust filtering.  http://cran.r-project.org/web/views/TimeSeries.html
Answer: is the purpose of your model to forecast or analyze the history? if this is not for forecasting, and you know that these are the outliers, then simply add the dummy variable, which is 1 in those dates and 0 in other dates. this way the dummy coefficients will take care of the outliers, and you'll be able to interpret the other coefficients in the model.
if this is for forecasting, then you have to ask yourself two questions: will these outliers happen again? if they would, do I have to account for them?
For instance, let's say your data series have outliers when Lehman brothers went down. it's an event which you have no way of predicting, obviously, yet you can't simply ignore it because something like this is bound to happen in future. if you throw in the dummy for outliers, then you effectively remove the uncertainty of this event from the error variance. your forecast will underestimate the tail risk - not a good thing, perhaps, for risk management. however, if you are to produce the baseline forecast of sales, the dummy will work, because you're not interested in the tail, you're interested in most likely scenarios - so you don't have to account for the unpredictable event for this purpose.
Hence, the purpose of your model impacts the way you deal with outliers.


Keeping Android quiet at night

Question: I'd like my Android device to keep quiet during the night, no alerts for mails and talk messages, only calls and of course, the wake-up alarm. How can I do it?
Comment: Don't you wake up from vibrate? Then you'll still wake up from calls, but won't be bothered with anything else
Answer: Timeriffic is fantastic for this purpose.  You can get the latest version from the app's Google Play store page, or you can get an older version from f-droid.org.
Comment: It is also free
Comment: I'm using this one and so far it's working great. I might give Sweet Dreams for Android a try.
Answer: In Marshmallow you don't need to install any apps as this is a native feature:

Go to settings > Sound & notification > Do not disturb > Automatic rules > Weeknight

Activate the rule and press Do not disturb to choose if anything should be allowed to get through.
You can choose from:

Priority only (in the settings > Sound & notification > Do not disturb menu you can configure what is classed as a priority)
Alarms only
Total silence

For me this is a really useful feature.
Comment: This wasn't available six years ago when the question was originally asked.
Answer: I am surprised nobody has mentioned Sweet Dreams for Android. Its a free app and can
pretty much do everything but tuck you in at night and make eggs and bacon in the morning:

switch your phone to slient mode automatically during preset times
those preset silent times can be overridden if your phone detects noise (i.e. you are still awake)
it has an alarm feature that can wake you up as well

This app was the winner in one of the Android Developer Challenges as well.
More Info:
http://www.androidguys.com/2010/02/11/adc2-winner-sweetdreams-hits-android-market/
Comment: This app hasn't been updated since September 4, 2012. [Sweet Dreams](https://play.google.com/store/apps/details?id=com.inizz&hl=en)
Answer: Or... you can use the simplest solution.

Add the Power Control widget
At night, turn off the Data Sync widget (fourth from the left, between GPS and Light)

No email or other notifications will make noise. In the morning, just turn it back on and you'll get all your notifications.
Comment: This solution prevents you from having a process running all the time just for that :)
Answer: You can set the alarm to be active during 'silent mode', but that would eliminate calls.
Also, you can download Tasker or Locale from the market to create custom profiles based on time. These two apps (and I'm sure there are others) are extremely customizable and you will be able to set up profiles exactly like you mentioned.
Comment: Too bad Locale is a paid app nowadays
Comment: I use Locale, so if it is during sleep hours, at home, and plugged in, it goes quiet. If I am at work, any time, it goes semi quiet.
Answer: Even easier with Tasker:
Create a profile called silentMode

Set it to be active between 23:00 until 09:00
Now, add a task, call it muteAudio, with a tasker's function called 'Silent Mode', Set that to On

That's one profile created. Now to do the opposite logic...
Create another profile called normalMode

Set it to be active between 09:01 until 22:59
Now, add a task call it soundOn, with a tasker's function called 'Silent Mode', set that to Off

Now, both tasks will be activated depending on the clock on the device :)
Answer: I use Llama to achieve this. It is free and very flexible and can control a lot of other settings too. It uses nearby cells to identify your location, so it is not as accurate as others that use GPS, but does not require the GPS to be on in order to achieve location based profiles.
Answer: If you have Lollipop you can use "Downtime and Interuptions" feature. It lets you define priority interuptions and set the downtime for specific time that you can define for a duration of time. You can also set it as a countdown for one hour or adjust the time by pressing the + or the - sign. You can access this feature by clicking on the volume rocker button and pressing the corresponding tab to use this feature. You can also access this under Sound & notification > Interruptions.

Downtime Feature in Lollipop - Image Source
If you think that you don't want to be disturbed by anthing not even alarms you can set the interuption to "None" as shown in the above screenshot.
Depending on your device, you can set the following types of notifications as priority:

Events and reminders.
Calls from anyone, starred contacts, or any of your contacts (depending on your default phone app).
Messages from anyone, starred contacts, or any of your contacts (depending on your default messaging app).
Alarms are always set as priority interruptions. Keep in mind that if you set your notifications to "None" or "Don't interrupt," alarms won't make a sound when they go off. If you need to use an alarm, make sure you allow "All" or "Priority interruptions."

This will be confusing for many Lollipop users. So read anyone of the following links to get to know more about this useful feature.
Set your notifications - Downtime and Interuptions feature
Master notifications in Android Lollipop with Notification Priority and Downtime
How to Manage Interruptions and Downtime in Android 5.0
Avoid interruptions and set downtime in Motorola
Answer: No widget necessary. I turn off auto sync and turn the volume down to vibrate. I have a sleep tracker app called WakeMate on my phone and the alarm still goes off, even when the volume is turned down to vibrate (using the button on the side, not in settings). To turn off Auto Sync, I press (unselect) the icon that looks like a Refresh symbol on the floating toolbar. If you removed the toolbar, you can turn off auto sync by pressing Settings > Accounts & sync > Auto-sync (clear the check box). It prevents the phone from going to get your email and so on. Turn it back on when you wake up and turn up your volume and you'll soon hear the familiar downloading of emails, text messages, Twitter updates, App updates, whatever.
Answer: Bedside
Best app. Runs as a clock at night, only thing that will make noise are phone calls. Love it.
Answer: Stock sys volume settings:

Alarm vol up
Ringer up
Notifications down
Sys vol down

You can use Quick Settings to quickly change these settings or Quick Profiles to create profiles for one click profile switching.  I use this last option and have 2 shortcuts on my home, one that turns on my bedtime profile and one that turns on the daytime profile.
Answer: Another alternative is one of the original taskers:
https://market.android.com/details?id=com.cooolmagic.android.toggle5&feature=search_result  (the lite version)
https://market.android.com/details?id=com.cooolmagic.android.togglepro&feature=search_result   (Paid version)
Have being using it since Android 1.6.
Answer: A new app I've been using is Silence (Free, but you can pay to get rid of the ads).
It's really pretty simple to set up. You simply add a new event, give it the start and end times, optionally set it to repeat on which days and set your "toggles". It can toggle more than sounds, though:

Ringer + Notification
Media
Alarm
Airplane Mode
Wi-Fi
Bluetooth
Mobile Data

You can toggle off any or all of those. Another nice feature is that you tell it what to do with the toggle when the event ends:

Change back (to whatever it was set at before)
Do nothing
Silent (for sound toggles)
Vibrate (for sound toggles)
Set a volume level (for sound toggles)
Turn on/off (for system toggles)

I particularly like the "Change back" setting. If I've already silenced the ringer manually, I don't necessarily want it to come back on when the event ends.
They also recently added the ability to tie an event to an event in your calendar.
I use this to set my ringer to vibrate and turn off wi-fi during the times I'm (generally) commuting on the train (because I sit in the Quiet Car and there's no wi-fi available). I also use it to turn off the sound on my tablet during the hours I'm likely to be asleep.
Answer: Samsung devices running Jelly Bean have this functionality built in-in the form of Blocking mode, which will allow you to shut off notifications, alarms, incoming calls, and alarms (any or all of the above) for whatever space of time you select.
For the incoming calls (and SMS/email notifications), you can also select whether to block all calls or allow some numbers through.
Comment: But, IIRC, blocking mode also does something weird.  It shows a notification icon 24 hours per day (even during the daytime), I guess to indicate that it is waiting until the nighttime to turn on.
Answer: You should definitely look at Sound off Reborn app (https://play.google.com/store/apps/details?id=net.hubalek.android.apps.soundoff). It works in similar way as scheduled do-not-disturb included in Android 6 but it has nice graphic view of your schedule. It also supports even and odd weeks and what is best: it is completely free. With no ads.
Answer: 'Night clock' free app for Samsung.
Problem solved. Alarm works with phone mute.
Comment: Do include a link to the app on the Play Store.
Comment: There are multiple apps named "Night Clock". Which one did you use? Please link it here.

Keeping Android quiet at night


How would civilisation develop in a permanently psychoactive world?

Question: How would human culture and civilisation develop if placed onto a planet permanently psychoactive, e.g. because of low (but inevitable) amount of LSD-like substance in either water or air? To simplify, let's assume that the planet is already terraformed, with a reconstructed earth-like biosphere, and that we send humans there without all the technology needed to mitigate the effect
(i.e. they have to live as is and use no air filters nor antipsychotic drugs). Or just grow humans with an autonomous space-probe, assuming they will develop some culture on their own.
Answer: Like lots of drugs, LSD users fairly quickly build up a tolerance. Searching for long term LSD, you can quickly confirm that that continuous LSD usage dosing over a few days results in such tolerance that the result is effectively null. So, for most people, there would be no net effect.
No controlled studies for in utero that I am aware of (they would be unethical) so there could be development issues that are unknown. But it is certainly possible that this could result in more birth defects, etc.
Since the posited scenario would not have acute dosage, the incidence rate of reported strong effects (insanity, flashbacks, etc.) would be very low. A small percentage of the population may experience these however as drugs effects are quite variable.
Over, surprisingly little effect on societal development for environment LSD.
Now, suppose instead of LSD you have a similar drug in terms of psychoactive effect, but that no tolerance is built up to the effects. The effects would depend upon the effective dosage level. I.e., a mild LSD effect would not affect society drastically, i.e., there are lots of high-functional regular drug users. A certain percentage of society would not be highly functional, but since the effects are completely persistent, the society would simply be used to it, i.e., it is just the way it is. A certain percentage of our society is non-functional, we just deal with it. If the dysfunctional population was twice as large as ours, there would not be a significant difference.
If the effective dosage was very high, society would be more like the zombie apocalypse -- very few functional people and they are focused more a basic survival than development. It is still likely that over time, genetic drift would result in an increasing percentage of the survivors would be functional at the high dose rate.
Answer: As previously said, it will depend a bit on if the citizens eventually will build up a tolerance to the substance. And while I'm not an expert, I'd guess humans living in a such environment would have developed kidney or liver like organs all over to body to filter blood before it enters critical organs, or maybe the organs themselves would develop to protect themselves. After all, it's quite unlikely that our bodies wouldn't evolve to handle the environment.
Some fun ideas:
What if the effect is seasonal? If the substance is carried over populated regions during rain seasons or rare weather phenomena, the inhabitants might not become immune. This occasional high could cause the citizens to fear rain or water. And there's even the chance that they would enjoy the high and there could be festivities or rituals which happened during these events.
A civilization without the right technology to prevent or analyze these seasons might develop religions to give meaning to the phenomena.
A war-like civilization might prefer to fight wars during these seasons, soldiers might not fear death or become paralyzed if injured.
If the high was seen as an unpleasant phenomena, the civilization might spend all of their resources on trying to fight or avoid it. Maybe they would attempt to pollute the forests or seas in the hope of ending the phenomena. A technology loving society could focus on building hubs which are isolated from the environment, environmental suits or large space stations. Low tech avoiders could try to escape to areas on the planet which aren't as effected and this alone could cause an interesting structure inside the society. Those in power might spend large amounts of their resources in order to live on polar caps, the top of mountains, deserts or deep underground if these places offered shelter from the psychoactive phenomena.
Answer: Assuming being under drug influence is not advantaging and evolution keeping the most viable members alive able to reproduce, I think that the society would eventually not be very different from ours. People would merely end up immune and they would certainly develop some biological symbiosis with this compound.
I think that it is unlikely that your population would survive to this though.
Answer: Let's suppose all fundamental necessities are freely available and that the population is prosperous.
Let's also assume that the population does not become resistant to the effects or else this question is pointless.
Social co-operation would be limited because of a distorted perception of actions and consequences. For example when Fred does something nice to Bob, does Bob correctly interpret Fred's action? And if he does, does Fred correctly interpret Bob's reaction? If this feedback loop is broken then what social lesson has Bob learned? None.
I would expect that people would behave selfishly and without regard for the consequences; more or less the way that actual drug addicts behave on earth.
Comment: Your answer sounds invalid to me. You said _"For example when Fred does something [...] Bob's reaction?"_ suggesting they have no certainty in the interpretation of their social interactions. This is valid whether both Bob and Fred are under drug influence or not.
Comment: I didn't say anything about a lack of certainty. I'm saying that the reaction of someone to your action would be arbitrary. (eg: no drugs: I hit you; you say "OW! Why did you do that?".  Drugs: I hit you; you look out the window with a dazed expression.) These scenarios are not the same at all. And only one of them lead to me being made aware that my action had consequences.
Comment: I think I misunderstood your answer then. Was the part I quoted an example of the real world social interactions somehow broken by extreme drug abuse?
Comment: Have you dealt with someone tripping before? Their understanding of cause and effect, of appropriate actions and reactions, and of others' mental state, can often be quite alien. I would be amazed if learning anything but modern art could be reliably accomplished. What if every time to offended someone, you instead were completely confident that you had made them hungry. This is the kind of disconnect you're going to face on a regular basis... But it won't be consistent from person to person, nor even all that consistent in the same person.
Answer: No matter the dosage we forget some people affected wouldnt be able to deal with the audible and visual and would need people whove gone through intense 'journies' by themselves to 'show' you how to come back to reality in a good concious mind where the individuals felt safe. Itd be as if you were setting up 'guides' for 'tours'.


CFA/EFA degree 0-1 of covariation/correlation between latent variables/factors that warrants merging LVs/Fs

Question: I have done an EFA (OLS, Oblique rotation, polychoric correlations) and CFA (DWLS, allowed factors to covary) on my data, a two factor model had the best fit in CFA, a one factor model had acceptable fit. Previous studies have identified 1 or 2 factors, theoretically it could be either.
The correlation between the two factors in EFA was 0.69
The covariance between the two factors (latent variables) in CFA was 0.72
My question: Can anyone suggest a source that states what degree (number) of covariance would warrant identifying that the latent variables where highly related and should be one latent variable? Wiki said correlations above 0.70 in EFA warrant merging, another text I read said correlations above 0.85. I haven't been able to find any reference that provides a cuttof or range for covariance in CFA.
Many thanks
Addit: I have just realised the z score and significance seem to matter for the covariance between latent variables, these were as follows for my two factor model in CFA (conducted in r lavaan package)
Estimate  Std.err  Z-value   P(>|z|)
0.722     0.053    13.648    0.000
Comment: Thank you kjetil b halvorsen, it is a great site! Is there any way to tag people that have answered questions on similar topics so that they see this question? Thank you
Comment: You can try to write a comment with @ prepending the name of the one you want to connect.
Comment: @jeremy miles are you able to help with my question? Many thanks... (not sure if tag is working)...
Comment: Tag didn't work (I'm not sure I understand them) but I saw it anyway. :)
Comment: I guess you cannot tag people who have not been active in the thread ...
Answer: I think the answer is more conceptual than statistical.
You can compare the one and two factor models, and see which one fits better using CFA (note: it's the sort of thing that looks like it will work for a chi-square difference test, but it's more complex, see this paper: http://psycnet.apa.org/journals/met/13/2/150/ ).
However, the fact that you can statistically distinguish between the two factors doesn't mean that distinguishing will make any practical difference. I guess that the 0.7 cutoff is a rule of thumb that gives a guess about whether it is likely to matter.  What you would really like to show is that splitting into two factors either does (or does not) alter the ability of the scale to predict (or be predicted by) some other construct. For example, you have a measure of verbal and a measure of numeric intelligence - they are highly correlated, so they could be called one factor. If is the case that one of them is more predictive of something than the other (e.g. success in a physics course, or a history course) then you have a good argument for keeping them separate. If they are not differently predictive, then you don't have evidence that it's worth separating them, and the more parsimonious solution is to keep them together - pending, of course, further evidence that they might be separate. But your theory might suggest that two factors is better (yours doesn't, as you've said).
An example is depression and anxiety - it's hard to statistically using factor analysis. But the theoretical reasons for keeping them separate are strong, and so they are usually kept separate (although when I have a scale, I've sometimes kept them together, because one fewer predictor can make your life easier.)
Comment: Many thanks Jeremy, your answer was very helpful, particularly "if it is the case that one of them is more predictive of something..".. I hadn't considered this when thinking about what aspects of theory could justify decisions in CFA.
Comment: An add on Q : I know covariance and correlation are different, however does the number 0.00 - 1.00 of covariance between latent variables signify the same amount of similarity as the correlation between factors does? Secondly is the number of the z score for the covariance of import? Thirdly, if anyone can point me in the direction of a citable reference which states that covariance > 0.7 between factors is high and indicates similarity please...I can't cite wiki and am not experienced enough in stats to say it without a citation... Thanks again for your help Jeremy
Comment: If you have scaled your latent variables as having a variance of 1, then the covariance is the correlation. If you haven't, the maximum covariance could be any number at all. Second, it tells you whether the parameter is significant, and third, I've never heard that.
Comment: Thank you. I'm not sure if latent variables were scaled.  I ran fitModelTtwo <- cfa ( ModelTtwo, data= New, orthogonal = FALSE, estimator = "DWLS"). In the help section for the cfa command it says: std.lv : If TRUE, the metric of each latent variable is determined by fixing their variances to 1.0. If FALSE, the metric of each latent variable is determined by fixing the factor loading of the first indicator to 1.0. In the full command std.lv is set to FALSE so this may be the default? Not sure if estimater chosen (ie DWLS) effects this


Using HTTP proxies as SOCKS in java

Question: Is there any way to use an HTTP proxy as a SOCKS proxy?
i want to use it as a socket to connect with an endpoint and send packets of information
Answer: Not easily.  Some workaround may be possible though, based on what you actually want to achieve.
Comment: i want to use it as a socket to connect with an endpoint and send packets of information
Answer: You can use some HTTP proxies to tunnel TCP connections. This is necessary for SSL encrypted HTTPS traffic which is just passed through by the router without being able to look into the stream.
However, most proxies will limit this to port 443 and some other well known alternative HTTPS ports, so it's not a general solution you can rely on.
But it's not a SOCKS proxy at all, it uses the HTTP protocol with the CONNECT method to do that. UDP is not possible, nor is listening for incoming connections.
Answer: Socks is a protocol. HTTP can be tunneled over SOCKS. HTTP is not SOCKS. The question doesn't really make sense. Answer is definitely no.

Using HTTP proxies as SOCKS in java


swallowing excessive saliva while fasting will break your roza or not?

Question: Asslam o alaikum to all of my brothers and sisters.. Well my question is that i have searched in google that when a person swallow his saliva while fasting is this breaks persons fast..? Everywhere it shows that swallowing saliva will not breaks persons fast but whenever i do sehri after sehri my mouth suddenly filled with water till iftari so is this ok to swallow that much saliva?.. Most people do not fell that much saliva in their mouth as i do..Mostly i spit out but after 2 or 3 mint again my mouth fill with water.. Iam not good in english but i hope you get whatever i said. My question is only that is this ok to swallow that much saliva? But it's very hard for me to not to swallow saliva while praying salah in the month of ramadan.. We don't use tissues while praying salah so i swallow my saliva because there is no any other way of spitting out while praying salah specially in the month of ramdhan
Answer: A renowned shaykh in Facebook wrote that it can break the fast, but I mostly think that it's a matter of opinions. In my opinion you should try to not swallow it, this is a safer option, otherwise ask a Alim and Allah knows best
Answer: Swallowing unavoidable things such as one's saliva,is not invalidate the fast. So excessive saliva will not breaks one's fast.
Answer: Actually there is no connection with fast and saliva. Saliva is just your own body fluid, so swallowing it or not do not have effect on your fast. If you get too much obsessed with not trying to swallow saliva then the saliva will get produced more than it usually get produced. So better to leave it usual way and don't get obsessed with saliva, as it does not effect your fast in anyway.
Comment: urine is not produced in your mouth
Comment: What about urine drinking? does it break fast if it is your own urine? (srs)
Comment: Also as said above it is not produced in your mouth. If you are trying to say "is drinking urine allowed" then no it isn't. Why would you drink your own urine anyway?
Answer: In the name of Allah, Most Gracious, Most Merciful
All praise and thanks are due to Allah, the Lord of the worlds. We cannot find words to praise Him, as He only sees fit how laudation should be addressed to Him. We seek refuge in Allah from the evils within ourselves and the evils of our bad deeds. Whosoever Allah guides will never be led astray, and whosoever He leads astray will never find guidance. We bear witness that there is no god but Allah, the One without any associate, and We bear witness that Muhammad is His Messenger and bondman, peace and blessings be upon him, his kith and kin, his Companions and all those who follow their guidance until the Day of Judgment.

Your Question: Swallowing excessive while fasting will break your roza or not?
Answer: If a fasting person swallows his saliva that does not invalidate his fast even if there is a lot of it and if that happens in the mosque or elsewhere.
Allah Says:

"The month of Ramadan [is that] in which was revealed the Qur'an, a guidance for the people and clear proofs of guidance and criterion. So whoever sights [the new moon of] the month, let him fast it; and whoever is ill or on a journey - then an equal number of other days. Allah intends for you ease and does not intend for you hardship and [wants] for you to complete the period and to glorify Allah for that [to] which He has guided you; and perhaps you will be grateful." [The Cow, 2:185]

What cannot be avoided, such as swallowing one's saliva, does not invalidate the fast, because avoiding that is difficult. This is similar to dust on the road and the dust from flour. Even if a person lets saliva gather and swallows it deliberately, that does not invalidate his fast because it reaches his stomach in a similar way even if he does not let it gather.

Narrated Abu Huraira:
The Prophet said, "If somebody eats or drinks forgetfully then he should complete his fast, for what he has eaten or drunk, has been given to him by Allah." Narrated 'Amir bin Rabi'a, "I saw the Prophet cleaning his teeth with Siwak while he was fasting so many times as I can't count." And narrated Abu Huraira, "The Prophet said, 'But for my fear that it would be hard for my followers, I would have ordered them to clean their teeth with Siwak on every performance of ablution." The same is narrated by Jabir and Zaid bin Khalid from the Prophet who did not differentiate between a fasting and a nonfasting person in this respect (using Siwak).
Aisha said, "The Prophet said, "It (i.e. Siwak) is a purification for the mouth and it is a way of seeking Allah's pleasures." Ata' and Qatada said, "There is no harm in swallowing the resultant saliva."
(Sahih Al-Bukhari, Volume 3, Book 31, Number 154)

Sources:

Fasting person swallowing saliva and mucus
Ruling on swallowing one's own saliva or that of someone else