What is the meaning of modular fractions?

Question: What is the meaning of
$$
\\\frac{m}{n}\equiv k\pmod l
$$
and
$$
\\\frac{m}{n} \mod l
$$
$m, n, k, l \in\mathbb N$ and $\gcd(m, n)=1$.
Answer: Recall $b$ is invertible mod $n\iff b$ is coprime to $n\ $ [by Bezout's identity for $\,\gcd(b,n)=1$]
When so we define $\ a/b := ab^{-1},\,$ which is the unique solution of $\,bx\equiv a\pmod{\!n}$
Hence $\ a/b = ab^{-1}\equiv c \iff a\equiv bc\pmod{\!n}.\ $ Operationally $\,\ a/b\bmod n\, :=\, ab^{-1}\bmod n$
We can do modular fraction arithmetic on all rationals writable with denominator coprime to $n$ (which comprise a subring of the rationals, i.e. are closed under addition and multiplication). The well-known formulas for fraction addition and multiplication remain true for modular fractions, e.g.  the addition law $\,a/b+c/d = (ad+bc)/(bd)\,$ holds true because  $$\,(ad+bc)\color{#0a0}{(bd)^{-1}}\!\equiv ad\,\color{#0a0}{d^{-1}b^{-1}}+ \color{#0a0}{d^{-1}b^{-1}}bc\equiv ab^{-1}+d^{-1}b $$
See here for many examples of modular fraction arithmetic.
Beware $\ $ Modular fraction arithmetic is well-defined only for fractions with denominator coprime to the modulus. See here for further discussion.
Remark $ $ You may already be familiar with this idea from calculus. For example, consider polynomials with real coefficients. Every real $r\neq 0$ is invertible so we can work with fractional expressions $f(x)/r := r^{-1} f(x)\,$ just as above. Then $\,f/r+g/s = (sf\!+\!rg)/(rs),\,$ and $\,(f/r)(g/s) = fg/(rs).\,$  More generally the same idea works  for invertible elements in any commutative domain (e.g. we can work with "compound fractions" of rationals, reals, or elements of any field).  These ideas are  algebraically reified in university algebra when one studies fraction fields and localizations of rings and modules which - unlike the degenerate cases above - typically enlarge the domain by adjoining inverses of non-invertible elements.
Comment: +1 for the careful explicit connection to "ordinary" arithmetic with fractions. But is the reference to fraction fields right? In $\mathbb{Z}_n$ whatever fractions exist are already present.
Comment: @Ethan  Yes, it is a degenerate case of the fraction field / localization construction: if the denominators are all units (invertibles) then we get nothing new, i.e. the construction yields an isomorphic ring, e.g if we apply the fraction field construction to a fraction field then it yields an isomorphic ring of "compound fractions". But such *universality* often proves very handy, e.g. $\,1/2 - 1/3 = 1/6\,$ can be mapped into any ring (or $\Bbb Z$-module) where $6$ is invertible (e.g. in a group if $b$ is a square-root of $a$ and $c$ is a cube-root then $b/c$ is a sixth-root).
Answer: The first one means
$$
kn \equiv m \pmod{l} .
$$
The second is a name for the solution to the congruence
$$
n \times ? \equiv m \pmod{l} .
$$
That congruence has a unique solution when $l$ and $n$ are relatively prime.
Answer: I am guessing the meaning of your poorly worded question. The first one is some kind of equality (in congruences) between two objects. The second one simply refers to an object  (of some congruence calculation).
The following two things give another example of similar nature: $A=5+3$,  and $ 5+3$


Azure KeyVault is giving a null reference exception when running GetSecret()

Question: When I try to get the API secret from Azure KeyVault, I am receiving a null reference error. I have the Key set up in the KeyVault, but secret is coming back as null.
    public static string GetKeyInformation(API_KEY)
    {
        if (string.IsNullOrEmpty(API_KEY))
        {
            var keyVaultUrl = "https://socialflutter.vault.azure.net/";

            var credential = new DefaultAzureCredential();

            var client = new SecretClient(vaultUri: new Uri(keyVaultUrl), credential);

            KeyVaultSecret secret = client.GetSecret();

            Console.WriteLine($"{secret.Name}: {secret.Value}");

            API_KEY = secret.Value;
        }

        return API_KEY;
    }

Any help is greatly appreciated.
Answer: The null reference error is happening because of the following line:
KeyVaultSecret secret = client.GetSecret();

Even if you just have a single secret defined, Azure KeyVault will not know how to read the Key.
You will want the following syntax:
KeyVaultSecret secret = client.GetSecret(<KEY_NAME>);

To find the <KEY_NAME>, refer to the screenshot below:

Go to Key Vault
Click on Secrets
Copy the Name of the Secret


John The Ripper and PBKDF2-HMAC-SHA1

Question: I am trying to hash a list of passwords with PBKDF2-HMAC-SHA1 and then crack them using John. However, John does not recognise the hashes and I get a No Hashes Found error. It works with SHA256, but I need PBKDF2-HMAC-SHA1. I have looked everywhere and have exhausted all my options. What is the correct format of PBKDF2-HMAC-SHA1 that is recognised by John and will let me crack it? Thanks in advance!
Answer: It's definitely supported, and definitely one of these format names (one for CPU, and the other for GPU):
<code>$ john --list=formats | tr ',' '\n' | grep PBKDF2 | grep SHA1
 PBKDF2-HMAC-SHA1
PBKDF2-HMAC-SHA1-opencl
</code>
At this point, it sounds more likely that your method of generating PBKDF2-HMAC-SHA1 is the issue here. Have you tried your attack against a "known good" hash? One that's easy to grab and almost certain to work is the example that ships with John itself:
<code>$ john --list=format-details --format=PBKDF2-HMAC-SHA1
PBKDF2-HMAC-SHA1    125 16  128 01020003    22  PBKDF2-SHA1 128/128 AVX 4x  0x107   20  192 iteration count 0   $pbkdf2-hmac-sha1$1000.fd11cde0.27de197171e6d49fc5f55c9ef06c0d8751cd7250
</code>
... which should be crackable by dropping it into a file and running john against it:
<code>$ cat test.hash
$pbkdf2-hmac-sha1$1000.fd11cde0.27de197171e6d49fc5f55c9ef06c0d8751cd7250

$ cat wordlist.txt
3956

$ john --format=PBKDF2-HMAC-SHA1 --wordlist=wordlist.txt test.hash
-rwxr-xr-x 1 royce royce 24690360 Jun 16 14:50 /usr/local/src/sec/crack/john-latest/run/john
Using default input encoding: UTF-8
Loaded 1 password hash (PBKDF2-HMAC-SHA1 [PBKDF2-SHA1 128/128 AVX 4x])
Cost 1 (iteration count) is 1000 for all loaded hashes
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
Warning: Only 1 candidate left, minimum 16 needed for performance.
3956             (?)
1g 0:00:00:00 DONE (2020-07-25 05:40) 4.347g/s 4.347p/s 4.347c/s 4.347C/s 3956
Use the "--show --format=PBKDF2-HMAC-SHA1" options to display all of the cracked passwords reliably
Session completed.
</code>
One common error is that, if you're trying to crack the hash on the command line directly and not attacking hashes within a file, depending on your operating system and shell, the '$' has special meaning to the shell (variable substitution) and results in the hash being mangled. Putting the hashes in a file, or putting appropriate quotes around the hash, or escaping the dollar signs (usually with a backslash), will address this issue.
If that's not it, then it's most likely that there's something wrong with how your hashes are being generated.
Comment: Thanks so much for your answer, this is so helpful and has relieved me from quite alot of stress. I will make some changes using the information you have supplied. Again, thank you for your response!
Comment: You're welcome! Glad I could help! And if this answer was a good answer to your question, please mark it as the accepted answer - both for future people with the same question, and also because then I get a couple points. ;)
Comment: I did indeed get the John example hash to crack, so thanks for that! I have been hunting high and low for a method of hashing a wordlist to the same format as the John example, but with 0 luck. Is there any way that you know of that I can do this? I tried using passlib.hash in Python however I just get the hash, not in the same format as John. What exactly is the format? Is it just the hash of the salt and the hash of the password concatenated?
Comment: Sounds like you need to drop back to some fundamentals. Salt and hash are concatenated prior to hashing for most hashes. Recommendation: see if you can find some other high-profile FOSS platform that is already doing what you're looking to do, and study its source.

John The Ripper and PBKDF2-HMAC-SHA1


My contacts aren't showing anymore

Question: I have a big issue with my contacts. My database contains all of the correct information. I have checked it all in phpMyAdmin. Out of no where, when I search for contacts in Civi, it comes up with 0 contacts. It's like they all got deleted automatically. Please help!!
Comment: We need much more information than this. "Out of no where" sounds very unlikely.  Do you have logging enabled? Can you look in the log_civicrm_contacts to see who made the last change to the contacts and when and what it was.  What has been changed on your system since you last could "see" the contacts.  (Added an extension for your CMS?, upgraded?, your host changed something?)  Also what version of Civicrm are you on and what CMS and version are you using? Exactly how are you searching (perhaps an advanced search with something ticked in a one of the search windows that you aren't aware of?)
Answer: Have you enabled "Contact Trash and Undelete" for your site?  If so, have you tried searching in Trash for contacts? Do an Advanced search and tick the "Search in Trash" box. It will be on the right side of the Basic Criteris search pane.  Exactly where depends on what version of CiviCRM you are using - which is why I have asked for that information.
Do you have logging enabled? Can you look in the log_civicrm_contacts to see who made the last change to the contacts and when and what it was.
"Out of no where" sounds improbable.
What has been changed on your system since you last could "see" the contacts. (Added an extension for your CMS?, upgraded?, your host changed something?)
Comment: I do not know how to check the log but all I know is I have only one person adding contacts. It was all working properly. I just do a Find Contacts, and then click the search button and all of them would show up. But now it was literally out of nowhere, I logged in and and I can't see any contacts. I had about 250 and now all I have is a couple in the system. Please help. I can give you all of my user info and log in information if needed to check it out
Comment: Also, when I log into Civi, it tells me that Timestamps reported by MySQL and PHP are mismatched. Is that something I have to fix?
Comment: @ElanKvitko, I have added instruction to this post about searching in trash. How about you answer the rest of the questions against the original post. (including version of CiviCRM, CMS type and version.)    Also, unless your site has been hacked, "literally out of nowhere" is an empty protestation.  Ask everyone who has access to you site what changes they made in the relevant time frame.
Comment: I don't know who you are or where you came from but did you know you're a genius?!? You're the absolute best!!!! THANK YOU THANK YOU THANK YOU!!!!! They somehow ended up in the trash!!
Answer: Have you tried searching for other things like activities or contributions? If you get results for activities then likely your contacts are there.  If not (and there not in trash) then likely they are not.

My contacts aren't showing anymore


TeXworks: How to add a word to the spell checker dictionary?

Question: I use TeXworks to write my documents. The spell checker tool works nice, but I'd like to add some words to the dictionary, but I can't find a function for that.
So how can I do that?
Comment: You may want to use a spell checker on your title `:-)`
Comment: @Hendrik Vogt: You are my spell checker ;)
Answer: TeXworks uses a spell checker called Hunspell, an engine which is also used e.g. by OpenOffice:
Each dictionary consists of two files with the extensions .dic and  .aff. Where these are located depends on your TeXworks installation, on my system (TeX Live 2010, Windows), they are in the directory
C:\Users\<user name>\.texlive2010\texmf-config\texworks\dictionaries
Adding words to the dictionary is quite simple: As the .dic file is a plain word list, you can just add new lines with your own words. If you want the system to recognize different word forms, too, you have to deal with the .aff file - see this explanation for more details. However, simply changing the word list should be enough in most cases.
Comment: For MikTeX and Windows 7, the directory is

    C:\Users\\AppData\Local\MiKTeX\\TeXworks\\dictionaries
Comment: This solution is not so convenient. TeXworks should add this feature to their good editor.
Comment: For MikTeX and Windows 7, actually, the directory is C:\Program Files (x86)\MiKTeX 2.9\hunspell\dicts
Comment: As stated in [TeXworks wiki > Obtaining dictionaries](https://code.google.com/p/texworks/wiki/SpellingDictionaries)

`Windows
To find the correct folder, use "Help -> Settings and Resources...", navigate to the "Resources" folder given there, and finally put the spelling dictionaries in the dictionaries folder (if it doesn't exist, create it). `
Comment: See also http://tex.stackexchange.com/questions/33139/how-to-configure-the-dictionary-path-for-texworks-tex-live-2011-portable
Comment: Keep also in mind, if you might update the dictionary package via the package manager, your custom entries will be lost, so do not forget to backup.
Comment: @escalator Is there any way to save the ignore word list to a safer place so that the customized dictionary won't get lost after upgrades? Thanks.
Answer: I managed to install the dictionary PT_EU as follows:
I opened the TeX works went to Help -> Settings and Features and clicked C:/Users/Abilio/AppData/Local/MiKTeX/2.9/TeXworks/0.4
After downloading the dictionary did PT_EU http://extensions.services.openoffice.org/en/dictionaries site, downloading a file. Otx. then open this file with 7-zip, and copied the folder "Dictionaries" folder to the 0.4.
Then I copied the entire folder TeXworks (C:/Users/Abilio/AppData/Local/MiKTeX/2.9/TeXworks/), to the following path C:/Users/ Abilio / AppData / Local /. Then I reopen the TeXworks, and the dictionary was already there and it worked.
I have windows Vista 32-bit.
Comment: [Welcome to TeX.sx!](http://meta.tex.stackexchange.com/q/1436) [Diabonas' answer](http://tex.stackexchange.com/a/11861/5872) already points to the need of installing the dictionary files in the first directory you mentioned. Why would you need to move the entire TeXworks folder? Doesn't it break the MikTeX tree (for updates and such)?
Answer: In a MiKTeX 2.9 / Windows 8 context, the file to modify turned out to be

/Users/(username)/AppData/Local/Programs/MiKTeX 2.9/hunspell/dicts/en_US.dic

There was no problem editing it with a Unix-style editor within Cygwin.
The file has a word count at the beginning, but it did not seem necessary to increment the word count when adding new words. I presume the word count is used for storage allocation when the file is loaded. I added new words in alphabetical order.
The remark above about making a backup is right on!
Answer: [Windows 7 Ultimate x86, TeXworks Version 0.4.5 r1280 (MiKTeX 2.9)]
I couldn't get my dictionary to be recognised in the c:\Users\<username> folder structure.  So, instead, I copied the .dic, .aff files directly into the hunspell\dicts sub-folder of my MiKTeX install (I have it in c:\Program Files\LaTeX) and that worked.
I then followed diabonas' advice about adding my own words to the .dic file, but they weren't immediately recognised by TeXworks as valid words.  I tried opening TeXworks a few times to see if it would finally recognise my changes, but to no avail.  The following worked for me in the end:
1)  I deleted the .dic, .aff I had copied in to the install folder (as explained above),
2)  I opened TeXworks to confirm my dictionary was no longer available.
3)  I added the new words to the original .dic file I downloaded (in the download folder I chose),
4)  I then copied the edited files back in the hunspell/dicts folder as stated above.
5)  I went back to TeXworks, and it was all good now.
I can't explain why making the edits directly in the hunspell\dicts folder would not work.  Perhaps something to do with caching or they get compiled.  I did not try to reboot my OS since I thought that was not necessary.
Cheers,
Nap
Answer: I had a similar issue, but with OS X Yosemite. I accidentally caused the built-in OSX spelling dictionary (which is what many LaTeX editors use) to incorrectly learn a misspelled word. By directly editing the text file at ~/Library/Spelling/LocalDictionary you can customize the editor to ignore common LaTeX syntax and to add custom words to ignore.
Answer: I am using TeXworks 0.6 at Windows 10.
It seems that TeXworks looks for dictionaries in two places,
C:/Users/<username>/AppData/Local/MiKTeX/2.9/TeXworks/0.4

and
/Users/<username>/AppData/Local/Programs/MiKTeX 2.9/hunspell/dicts/

I have added the same .dic and .aff files in both locations and I get two options for each language .
The number in the first line of the .dic files is the word count. If you add words and do not update the word count, my guess is that the last few words (after the word count) will be ignored. (I haven't tested it though). If you remove the number of words, all the words will be ignored (the dictionary will appear as an option though).
Answer: In Arch Linux is very simple:
After installing hunspell:
sudo pacman -S hunspell

Installing English language spellchecker:
sudo pacman -S hunspell-en_US

and for the Spanish language spellchecker:
sudo pacman -S hunspell-es_es


Recommendations for a Certificate Management tool for Linux

Question: A client is looking to roll out OpenVPN to all its mobile employees and will use certificates on both the server and all clients.
This creates a new challenge to manage all these certificates and handle certificate revocations and renewals.
Any recommendations on a Linux GUI tool to manage hundreds of certificates?
I have done testing using the CLI, but that is going to become a nightmare as the number of certificates increases into the hundreds.
Answer: XCA is a nice little tool, which is also cross-platform.
Though I have to add, that in my experience, graphical tools will only get you so far. Especially if you create a lot of certificates, working your way into openssl pays off.
Comment: I find XCA to be the most perfect tool for testing and development, not so sure about using it in production, it doesn't provide ACLs
Answer: You may want to try EJBCA. It is free, opensource, graphical, and runs on Linux.
Note that proper certificate management is 95% procedures; software can only get you so far.
Comment: A certificate links a physical identity to a cryptographic key. So you must ask yourself how you identify people, who does it, who checks it, who creates keys, how keys are stored, how and when keys are destroyed, who does what in case of key compromise, who is _accountable_ for mishaps, and so on. Software can help you do the actual signing and encoding of certificates, but most of the job is about understanding what happens and planning for security events, and software will not help you for that.
Comment: I had a look at the EJBCA Live CD and it is impressive. Thanks for the link.
Comment: Can you expand on which procedures or types of procedures you believe are critical to proper certificate mangaement?
Comment: Major tasks will include (1) revoking certificates of employees who leave the organization (2) revoking certificates used on systems that might be stolen, lost, etc (3) keeping track of certificates that need to be renewed. Regarding the question of identity, these certificates will be used either by employees or contract staff, so the identity issue is handled under normal HR procedures.
Answer: OpenCA  has a nice Web UI that gives you full control over a PKI.  It has its own OCSP server for revoking certificates.  Of course this project also includes LibPKI which allows you control it from software.
Comment: Thank you for link. I worry that the OpenCA project looks like it has lost momentum. Latest Fedora RPMs are for Fedora 13, but Fedora 15 is the current with Fedora 16 out in next few months.
Comment: Thank you for the lead that helped me track down a Fedora project called Dogtag that is the basis for the Red Hat CA software stack.
Comment: @Frank Daley,  I didn't know you where using RedHat.  Actually RedHat maintains [their own CA software stack](http://docs.redhat.com/docs/en-US/Red_Hat_Certificate_System/8.0/html/Deployment_Guide/SubsystemOverview.html).
Answer: Another little tool with a GUI is TinyCA. It relies on OpenSSL, Perl and GTK.


Are High End Furnace Filters worth the cost?

Question: There are many levels of furnace filters.  I can get cheap ones at walmart of a few bucks.  Then there are ones that cost upwards of $30.  I realize that if you have allergies or low immune systems, these are probably worth it.  Also if you have pets they may help.  But for average folks, with no medical needs, are they worth the cost?
Answer: The problem with the really cheap filters is that you really should replace them monthly.  The slightly more expensive filters often only need to be replaced every 3 months or so, which in reality doesn't actually make them that much more expensive.
I usually go with the cheapest 3 month filters, since I know I'm not going to get down there every month to replace the super cheap ones.  Aside from that consideration and the ones you already mentioned, there's no need to spend lots of money on a top of the line filter.  They aren't going to make your furnace last any longer.
Answer: For the heat mode they are ok,  for cooling I like the old horse hair reusable types we sprayed with sticky stuff, they  filtered better as they got dirty  and allowed air to flow for the AC mode.
Comment: "they filtered better as they got dirty". Can you share any citations or studies that can explain this?
Answer: NEVER use a high MERV rating 1 inch filter in any furnace.
Filters with MERV ratings above 6 restrict air flow too much and cause expensive repairs.
If you have a 5 inch filter frame installed, you can then use the higher MERV filters without problems.
Comment: Actually, most of that's a function of your *ducts*, as they determine how much static pressure margin your system has to accommodate a tighter filter...


What exactly is "shuf'ah"?

Question: What is "shuf'ah" in Islamic sharia?
I kindly inquiry for 3 example cases that illustrate shuf'ah, for better understanding.
Comment: Are you referring to الشُّفْعة /(see also [in wikipedia](https://en.wikipedia.org/wiki/Shufa_(Islam)))
Comment: The one in Sahihul Bukhari, book 36 (كتاب الشفعة)
Comment: Example cases would explain a lot
Comment: I guess a good definition of the term and its condition would do!
Answer: Simply speaking -I hope I could find the right words because it is a bit difficult to translate and explain- Shuf'ah الشُّفْعة is the right of a partner (in business or neighbor) to buy the share(s) of his other partner(s),
in case that his/their other partner(s) needed/wanted to sell his/their share(s).
It is rather like a veto right in such a case let's make a simple example of two partners who had a business:
Assuming they never really defined shares/parts of the business estate (or even the business for the case of liquidation) itself.
So if companion A wants or needs to sell his part of the business and finds a buyer and fixes a price with him.
And before selling (what happens after the selling in case that the partner(s) was/were not informed or whether this veto holds even after the sale will be addressed later) his share of the business has taken place his companion B has the right to buy it from him with this fixed price.
The (at this point business external) buyer has no advantage here and can't interfere in this transaction between the earlier companions.
Sometimes Shuf'ah is translated as "pre-emption".
In other wordsShuf'ah is the right or due of a companion who wants to leave a business to inform his partner(s) and offer them his share of the business beforehand or first. If the partner(s) was/were ready to buy the share he shall give it to them (for an agreed upon price) else he may offer or sale it to somebody else. Whether the partner(s) are allowed to buy his share after the transaction is discussed among scholars.
Only the Mu'tazili scholar abu Bakr al-Assam أبو بكر الأصم  is known to have rejected to whole idea of Shuf'ah.
Some related evidences
The qur'an actually quotes the term الشُّفْعة in a few verses, but without leaving a clear practical link therefore I will not share qur'an quotes.
In the sunnah we may find:

Allah's Messenger (ﷺ) gave a verdict regarding Shuf'a in every undivided joint thing (property). But if the limits are defined (or demarcated) or the ways and streets are fixed, then there is no pre-emption. (Sahih al-Bukhari)

Jabir bin 'Abdullah (Allah be pleased with them) said that the Messenger of Allah (ﷺ) decreed pre-emption in every joint ownership and not divided-the one-it may be a dwelling or a garden. It is not lawful for him (for the partner) to sell that until his partner gives his consent. He (the partner) is entitled to buy it when he desires and he can abandon it if he so likes. And if he (the one partner) sells it without getting the consent of the (other partner), he has the greatest right to it. (Sahih Muslim)

While I was standing with Sa'd bin Abi Waqqas, Al-Miswar bin Makhrama came and put his hand on my shoulder. Meanwhile Abu Rafi', the freed slave of the Prophet (ﷺ) came and asked Sa'd to buy from him the (two) dwellings which were in his house. Sa'd said, "By Allah I will not buy them." Al- Miswar said, "By Allah, you shall buy them." Sa`d replied, "By Allah, I will not pay more than four thousand (Dirhams) by installments." Abu Rafi' said, "I have been offered five hundred Dinars (for it) and had I not heard the Prophet (ﷺ) saying, 'The neighbor has more right than anyone else because of his nearness, I would not give them to you for four-thousand (Dirhams) while I am offered five-hundred Dinars (one Dinar equals ten Dirhams) for them." So, he sold it to Sa'd. (Sahih al-Bukhari)

The fiqh of Shuf'a
I'm quoting (translating) from al-Fiqh al-Islaamy wa Adillatuhu of Wahbah al-Zuhayli here:
Note: in the following I'll be translating from Arabic language, as these translations are of my own take them with the necessary care!
Terminology

الشفعة لغة: مأخوذة من الشفع بمعنى الضمّ أو الزيادة والتقوية، تقول: شفعت الشيء: ضممته، سميت شفعة؛ لأن الشفيع يضم مايتملكه بهذا الحق إلى نصيبه أو ملكه، فيزيده عليه، ويتقوى به،...
Shuf'ah in Arabic language: is taken from a-Shaf' in the sense of joining or adding and strengthening. One says: I've performed Shufa'h for a thing: meaning I've joined/added it (to my belongings). It was called Shuf'ah; Because the person performing it includes what he possesses with this right to his share or possession, so he increases it and becomes strong with it.
وفي الاصطلاح الفقهي: هي حق تملك العقار المبيع جبراً عن المشتري، بما قام عليه، من ثمن وتكاليف (أي النفقات التي أنفقها) لدفع ضرر الشريك الدخيل أو الجوار. وهذا عند الحنفية  لأن الشفعة تثبت عندهم للشريك والجار.
In the terminology of jurisprudence: It is the right to compulsory possession of the property sold on behalf of the buyer, for the price and costs (i.e. the expenses he spent) on his behalf, to pay the damage to the intruder or neighbor. And this is at the view of the hanafi schoool of fiqh because Shuf'ah is established for them for the partner and the neighbor.

To be continued

What exactly is "shuf'ah"?


Read logs from all apps on android from within an app for android 4.2+

Question: I believe there have been changes to the ways apps can read logs in android post 4.2. But I wanted to know if I can read all the logs including system logs from logcat from within an app for current versions of android? If yes does it need some permission or not?
Answer: Unless you rooted you cannot do this since Jelly Bean. See this Android bug report and this related discussion. Quote:

The change is that third party applications can no longer get the read
  logs permission, however every app can read the logs containing only
  the lines they have written, without needing any permission.
Keep in mind that access to the logs has never been part of the SDK,
  and is still not part of the SDK.  If you are relying on it then, even
  after this change, you run the risk of breaking in the future.  (And
  that is partly why this got lost for documentation, it is not part of
  the SDK, so there isn't really a place to document it, in fact
  documenting it would kind-of make it a part of the SDK which we don't
  want. :p)
Also we really really hope that developers don't take this as license
  to further abuse the system logs and spew increasing amounts of stuff
  into it from their app.  Log noise has been a continual problem on
  Android (not just for third party apps, we always struggle to ship the
  open source platform without a lot of noise), and if things continue
  to get worse we will probably make further changes to it to better
  control it.

EDIT: if you got access to the device, then you can peek logs there or even try to grant said permission to your app:
<code>adb shell pm grant <pkg> android.permission.READ_LOGS
</code>
but for other cases you are out of luck (unless you find a bug in the framework)
Comment: But how about system app? If device is not rooted. Does system app still able to read other apps log through logcat programmatically?
Answer: Yes you can. You just need a rooted device.
Comment: Can I do it without a rooted device?
Comment: @FD_ please example on root devices)


How does magentic field change spin values of a proton or electron?

Question: I am asking this in context of NMR. Firstly I wanna say that I thought that spin values of a proton or electrons were intrinsic. I didn't know that you can change spin states from one value to another. But now I read that this is not the case. So my question is that I am reading that prior to application of magnetic field, spin values of proton are equal. However when magnetic field is applied, the of the two spin values change? How does this happen? I am not advanced in physics so if anyone can explain this in detail and in layman terms it would be great, Thanks.
Answer: The value of the spin is not changed. A proton is a spin-1/2 particle, whether it is in a magnetic field or not.
However, all spin-1/2 particles have so-called "spin up" and "spin down" states. The thing that is changed is the energies of these up and down spin states. You may wish to think of the hydrogen nucleus as a bar magnet in a magnetic field. The case where the magnet is aligned with the field is more stable; when the magnet is opposed to the field it is less stable. For example, a compass pointing North is more stable. If you reach inside and turn the compass needle around 180 degrees so that it points South, you need to input energy to hold the needle in that orientation; that's because that orientation is less stable.
This analogy should be described very thoroughly in various places on the Internet. For example, Chemguide has an entire page on it, replete with diagrams.
(Disclaimer: quantum mechanically a proton does not necessarily have to be either in the spin-up or spin-down state. For more details, consult an NMR textbook. The difference in energy also can be explained by QM and is due to the presence of a magnetic term in the Hamiltonian: $\hat{H} = -\hat{\mu}_z B_0 = -\gamma \hat{I}_{\!z} B_0$ where $\gamma$ is the gyromagnetic ratio, $\hat{I}_{\!z}$ the projection of the nuclear spin along the $z$-axis, and $B_0$ the strength of the external magnetic field. Therefore, the "up" state which has $\hat{I}_{\!z}|\alpha\rangle = +\hbar/2$ has a magnetic energy of $E = \langle\alpha|\hat{H}|\alpha\rangle = -\gamma B_0 \hbar/2$.)
Comment: A proton has a spin of $1/2$. Positive $1/2$, not $\pm 1/2$! However, this spin can "point" in different directions: so-called up and so-called down. The proper terminology is that the *projection* of the spin can assume the values $+1/2$ ("up") and $-1/2$ ("down"). However, no matter which *way* the spin is pointing, its *magnitude* (i.e. its *spin*) is always $1/2$. This magnitude is invariant.
Comment: That first sentence is found in typical introductory NMR explanations, but does not make any sense from a QM perspective. There is no difference between the states that a proton nucleus is *allowed* to adopt, with or without a magnetic field. All linear combinations of $|\alpha\rangle$ and $|\beta\rangle$, i.e. $|\psi\rangle=c_\alpha|\alpha\rangle + c_\beta|\beta\rangle$, are allowed states. The only difference is that under a magnetic field, the ensemble average of $|c_\beta|^2$ is slightly different from that of $|c_\alpha|^2$. Whether it is bigger or smaller depends on the sign of $\gamma$.
Comment: Okay so you are saying that spin values are intrinsic. So a particular proton that is -1/2 will stay -1/2 forever except that within it there is a spin up and spin down. I always thought spin up was +1/2 and spin down was -1/2. I didn't know that within each there is spin up and spin down
Comment: Oh okay. That's so weird. I always assumed by -1/2 and +1/2 protons and electrons come in two types. So I just wanted to ask, I read often that spin states are quantized and that u can only have up and down states and not take any values between those up and down. But then other time I read that without magnetic field protons and electrons are spinning at randon and I see arrows depicted not only as up and down but also sideways, making it seem that u can have range of values from up and down.  What are u supposed of make of this?
Comment: It may perhaps not be a very good idea to read too much into it, because it can lead to misconceptions. It is a fundamental aspect of QM: before you measure the state of a particle, you cannot know whether it is spin up or spin down. It is best described by a certain percentage of up and down: for example, a proton might be 45% up and 55% down at a certain point of time. However, if you try to *measure* it, then you can only measure either up and down. You'd have a 45% chance of measuring up, and a 55% chance of measuring down. That's the real meaning of quantisation.
Comment: A proton only has an up and down orientation in a magnetic field. In the absence of a magnetic field there is no preferred direction.


What is the carbohydrate found in almonds, cashews, pecans, hazlenuts and pistachios?

Question: What is the carbohydrate found in almonds, cashews, pecans, hazelnuts, and pistachios? I first thought they probably have starch but I am not sure. Can someone verify this for me, and/or send a link where I could find this information?
Answer: Firstly you must realize that all the above mentioned nuts are actually the seeds of plants.
So the question now is which carbohydrate is mainly found in seeds of plants.
During the double fertilization of angiosperms, one sperm fertilizes the egg to form the embryo while the other fertilizes the endosperm nucleus to form the endosperm which acts as the nutrient storage for seeds.
The major carbohydrate for seed endosperm is Starch, often stored as granules for their property as being insoluble and compact.
However there are other carbohydrates such as free sugars, glucofructans and hemicelluoses present.
Hope this helped.
References
https://link.springer.com/chapter/10.1007/978-1-4615-2672-8_8
Comment: For the plants listed in the question (almonds, cashews, pecans, hazelnuts, pistachios) the primary storage is not the endosperm but the cotyledons. These seeds have two distinct halves, each a cotyledon, with an embryo sandwiched between. Starch is likely the most abundant carbohydrate, but there are other "nonstructural carbohydrates" as well as cellulose. Since these are intact cells that may go on to photosynthesize, these carbohydrates can be very diverse, and will differ between the species. Note, too, that these seeds will store many other nutrients, like proteins and fats.


Jquery Bar graph to load dynamically and get tool tip

Question: I am searching online but not able to get a plugin which can meet my requirements.
I make an AJAX call and get back an three arrays. Say for example:
 Name[0] = "ravi"
 Name[1] = "john"
 Name[2] = "robert"

 Expense[0] = "100$"
 Expense[1] = "50$"
 Expense[2] = "120$"

 Comment[0] = "You are Spending Properly"
 Comment[1] = "You can spend more"
 Comment[2] = " you are spening too much"

Now with Name on y-axis and expense on x-axis I am able to get bar graph using many plugins. My problem is when some one hovers on any of the bars the respective commment should appear. The max I am able to show in the tool tip is the combination of name and expense. Is there any plug in which supports this feature where I can add comment as the tooltip.
Answer: You can use powerTip.   You might need to make changes to your js.  But this will be helpful.  Follow the steps mentioned here : jquery powertip


Connection between futures and exceptions?

Question: Is there a connection between futures and exceptions? async-await looks very similar to throw-catch.
Answer: Yes, in some implementations of futures: in both cases the (single) thread of execution moves up the call stack on await/throw, and both can be seen as a form of
condition, as in the Common Lisp Condition System, and async on a function definition is analogous to throws, specifying the kind of condition it may signal.
However, the closer analogy is that await in an asynchronous function (a kind of promise) is like yield in a generator function, since in both cases it only returns one level up the call stack (rather than automatically propagating), and in both cases the function is resumable, and logically a coroutine.
The key difference between futures and exceptions execution-wise is that typically futures are implemented by resumable conditions, while exceptions are non-resumable conditions.
Concretely, the throw in an exception unwinds the call stack up to the catch (*). After that you can retry from the catch, but not from the throw: you can't resume where it left off.
(*) Implementations differ: often the unwinding only happens if it is caught: uncaught exceptions in C++ don't unwind the stack.
By contrast, the (asynchronous) function that computes a future behaves as a coroutine, like a single-element generator. When you use await it is suspended (like when using yield in a generator), and then it resumes where it left off when it is reactivated. Implementation-wise, the current execution context is saved as a continuation, which is invoked when the promise is reactivated. From the perspective of OOP, the continuation inside promise/generator is an instance of the underlying function. It is possible to implement futures using generators (or coroutines), but it's awkward: calling a single function asynchronously is common, so language support is warranted to make this simple.
More precisely, in the .NET (C#, Visual Basic) implementation of futures (Task), now also used in Dart and to come in JavaScript, when you use await in an async function, it immediately (*) returns a future, just like throw immediately throws an exception. However, a crucial difference is that exceptions automatically propagate (up the call stack) until they hit a catch, while futures only return one level (to the caller). There is no need for a catch with futures, since they only return one level, and await is rather "suspend current function (yield to caller), return future, then resume current function and get value of future when yielded back to". This is complex to state but easy to reason about: the flow is like yield in a generator, with the wrapping in a future (for caller) and then unwrapping a future (from awaited callee).
A function that calls an async function (and receives a future) must either synchronously wait on the future or return the future (in which case it is itself synchronous), or itself be async, in which case there must be a chain of await statements up the call stack, ending in a sync function (since the program as a whole is synchronous, suspended by the OS if it blocks), most commonly the event handler. This allows cooperative multi-tasking, as with other uses of coroutines.
(*) In .NET, await does not suspend if the future value is already available, which is more efficient, while in Dart it always suspends, which is more predictable.
This manual propagation of asynchronicity is in contrast to the automatic propagation of exceptions, and is a very, very good design choice: execution is sequential except where there is an explicit await, which marks where execution is suspended, and makes the interleaving of execution explicit. Contrast with exceptions, where an exception can be thrown at any time, and is not visible at the call site.
In some other implementations futures are implicit: they look just like a normal value of the underlying type, and using the value automatically causes await. This is more elegant at use but makes flow of execution much less clear, because it's not clear when evaluation actually occurs and where it is deferred: using await (resp., returning a future) make these explicit.
In other models, futures are computed by creating a new thread (hence executed in an indeterminate concurrent order, often in parallel), or lazily only when the value is used; neither of these is similar to exceptions.
Lastly, using await on a future may throw an exception, which was thrown (then suspended) by the promise, but this is just due to using exceptions for error-handling, and is otherwise unrelated: it could just as easily return a pair (value, err) as in Go. For example in C#:
Task task = fAsync(); // No try-catch here, as exception is caught by future.
try
{
    await task; // fAsync may throw an exception, which is caught by future, then rethrown by await.
}
catch (SomeException e)
{
    // Handle exception.
}

See also:

Does async/await solve a real problem?, for an interesting discussion in the context of JavaScript.
Comment: So, they are only vaguely similar regarding stack unwinding.  So, they are not similar at all.  This doesn't seem like an honest attempt of trying to answer your own question, it seems more like you thought something up and made up the question.  I'm sorry if this sounds rude.  Also, mixing asynchronous models and futures just shows up what to expect from Wikipedia articles.  If anything, futures are more similar to result-caching delegates (or lambdas).  Wait, that was **you** editing the Wikipedia article!
Comment: No offense taken – this was a sincere question, because I read a comment somewhere saying that futures were like exceptions, and it struck me as wrong, but maybe had a kernel of truth, hence tried to understand their thinking. Unstructured control flow is the clear connection, but the differences are starker, and seemed worth clarifying – this is an understandable confusion.
Comment: Also, async and futures are distinct, but closely related, and are now especially commonly used together: "When executed, a computation annotated as a *future* yields a placeholder and introduces an *asynchronous* thread of control whose result is stored within the associated *placeholder*." [Exceptionally Safe Futures](https://www.cs.purdue.edu/homes/suresh/papers/coord09.pdf) (a bit specific, admittedly) Wiki edits welcome!
Comment: Ok, I take part of what I said back, [futures, as the term originated](http://pages.cs.wisc.edu/~fischer/cs538.f04/multilisp.pdf) are about asynchronous processing and concurrency in an attempt to better exploit opportunities for parallelism.  Disclaimer: that downvote is not mine.
Comment: Nonetheless, there's no similarity to exceptions.  Exceptions unwind up, possibly several stack frames; futures have the effect of suspending the current *thread* (or *fiber*, whatever) of execution, then executing potentially in concurrency (e.g. more than one needed future yet without value), and returning to the suspended execution point.  For a single future, this could be just a regular call.  Anyway, they're so different that you can't implement one over the other.


Can I say Dhammaniyama Anatta?

Question: Science can be called Dhammaniyama as per the following answer to a question.
Can I say Dhammaniyama Anatta ? And what does it mean and why ?
Answer: Dhammaniyama Anatta is correct, as in "the laws of nature are not self and are empty of a self."
Anatta Dhammaniyama is also correct, as in "all phenomena is not self and empty of a self, is a universal law of nature".
Answer: Anatta is Dhammaniyama per AN 3.136.

Whether Realized Ones arise or not, this law of nature persists, this
regularity of natural principles, this invariance of natural
principles:
Uppādā vā, bhikkhave, tathāgatānaṁ anuppādā vā tathāgatānaṁ ṭhitāva sā
dhātu dhammaṭṭhitatā dhammaniyāmatā.
all things are not-self.
Sabbe dhammā anattā.
A Realized One understands this and comprehends it,
Taṁ tathāgato abhisambujjhati abhisameti.
then he explains, teaches, asserts, establishes, clarifies, analyzes,
and reveals it:
Abhisambujjhitvā abhisametvā ācikkhati deseti paññāpeti paṭṭhapeti
vivarati vibhajati uttānīkaroti:
'All things are not-self.'"
'sabbe dhammā anattā'"ti.

It means according to Nature (rather than according to subjective personal opinion) all things are not-self.
It means Thanissaro who said "not-self is a strategy" was wrong.
It means those who insist Buddhism is phenomenology rather than ontology are wrong.
It means those solipsists who believe nothing can exist outside of experience/mind are wrong.
It means those who believe the Buddha taught a middle-way between self & not-self are wrong.
It means most internet Buddhists have wrong view.
Comment: Could you provide an example of those who believe the Buddha taught a middle-way between self & not-self?

Can I say Dhammaniyama Anatta?


I want to increase the number of vertices in a cylinder

Question: I want to increase the number of vertices in a cylinder I have a version of 2.90 in blender.
Does anyone know how to do this?
Comment: Suggestion.  Show your work as a Blender Screen Capture.  Delete your current cylinder and create a new one with more vertices from the very start. ... Or ... Search and see video tutorials on Adding Cylinders, Loop Cut and Subdivision Surface Modifier.  You stated in the original title you are new to Blender .. therefore videos will serve you well.
Comment: Add a  screen and draw vertices in place you want to increase. From Q its not clear where you need them - side, top/bottom ...
Answer: When doing most actions in 2.8+, and in the case of adding an object Shift+A there will be a menu popup, by default in the lower left portion of the screen, edit the top box, labelled vertices, to your preference.

Alternatively, in edit mode, select the top and bottom loops with alt, then use the vertex context menu by right clicking, and select subdivide on the loops.
Or with cursor in middle of cylinder press Ctrl+R move a bit with cursor until first yellow ring appears, then you can add more loops by scroll wheel or pressing number.  Enter.

Or if you just need to make cylinder look smooth, you dont have to add vertices - change shading to Smooth and in Properties Editor, Mesh Data, Normals, Auto Smooth.
Comment: Hey now I understand how to add more vertices.There was a pop-up menu as you said,but in mine it was closed down there was an arrow by pressing them There was a pop-up menu came just like your's.BTW,thanks for ur help
Comment: Thanks for your help buddy! But i have a version 2.90 and there is no pop-up menu i can see.Is there anyway to enable this pop-menu i think it's disable maybe.!!1
Comment: you can also use **F9** to bring up a floating window with the same controls.


What does the yellow star mean on the minimap in Hitman Blood Money?

Question:
What does the star with an S in it represent?
Comment: I am really tempted to answer this since I played Blood Money to death but I am not 100% sure what I am thinking that represents is correct.
Answer: It means "guard's quarters" (typically where you steal surveillance tapes) - see here:
http://www.gamesradar.com/cheats/3308/
search that. It gives no picture but it describes this as a star on the map.


Can we create a core PHP file inside the files folder?

Question: As per Drupal's folder structure, custom code is always in sites/modules or in the theme folder. One of my colleagues created a custom PHP file in the files folder. Is this OK or are there any security issues?
Answer: Files under that folder are writable by the web server. You could argue that makes it a security risk, but your server would already have to have been compromised in one way or another for it to become so. If your server is configured properly it will only execute PHP files, not serve them for plain-text download.
From the point of view of convention, though, you shouldn't do this. Putting code files all over the file structure makes maintainability infinitely harder.
Answer: Drupal's .htaccess file will try to prevent this by adding the line to an .htaccess file in the files directory:
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006

If you remove that line then the code will execute, but you are making your site less secure in the case that a file upload module doesn't properly use file_munge_filename.
I would avoid putting scripts into the files directory if at all possible. Instead you can place them into a module directory or the Drupal root or into a sub-folder inside your Drupal root that will make it obvious what they are: "site-scripts/"
Doing things in a standard way makes it easier to manage your site in the long run. It also increases the likelihood that another person who takes over the site for you will be able to quickly learn how to do key tasks like upgrade it.
There are also modules and tools which will look at the files directory and delete any files that are not "managed" by Drupal (i.e. that are not in the "files" database table). If you put your .php files in that directory there is a chance at a future date they will be deleted.
For security and maintainability and stability I just can't see a good reason to put executable scripts into the files directory.
Answer: You should guarantee that this PHP file will be executed only by authorized parties by implementing access checking inside the file, or browser headers cheking, or .htaccess, or file system read/write permissions.
By default, PHP files cannot be read by HTTP requests, only executed if .htaccess or the web-server is properly configured.
And you can place your files whereever you want, but you must make sure, that you follow the Drupal logic as a framework and follow the agreed usage conventions.


Bought Wacom Intuos4 for teaching through online videos

Question: It came with Photoshop 10 Express, Autocad SketchBook Express and Corel Painter Sketch Pad. They all seem like great tools for creating/modifying art and photos. Is there a better application for drawing using the Wacom Intuos4 for the purpose of teaching, like they do at Khan Academy?
Comment: Maybe look for some kind of presentation/whiteboard app? OpenOffice Impress might work.
Comment: This is a bit difficult to answer. First of all, none of these bring any features to the table, when it comes to making videos ( Other than: You probably would want to use a program that is popular ). Secondly Photoshop ( Creative suite ), Corel Painter ( 12 / other major versions. I guess sketch pad is some lite'ish version ) and Sketchbook ( Pro version. ) are all great at what they do. I think that the program that you would use to make the video is what might make the most difference here.
Comment: @Joonas - I'll be using Camtasia for screen recording.
Comment: It's funny because now I don't know what to say. Well, You might want to give Screenflow a try. I have used both, but I can't remember which was better. Camtasia _for mac_ has not been around as long as screenflow, but camtasia has been around a long time in windows. I can't seem to find a way to answer your question.
Comment: @Joonas - I'm using a PC
Comment: I know. I was just testing you... ;)
Answer: This article tells what Khan Academy uses for their screencast presentations:

Initially, Sal used Screen Video Recorder + MS Paint.
Now, he uses Camtasia Studio + Smooth Draw.

Despite what the article implies, he most likely used a Bamboo or similar tablet for all of the videos.
But I would still recommend using something that is more like a slideshow/presentation format. Sketchbook would work well since:

It supports all the basic drawing/whiteboard-type functions with very natural-looking brushes and pencils, markers, etc.
It supports layers, so you can easily group doodles/sketches and edit/remove them individually.
It has a ruler/compass tool and grid lines that can help you draw charts and graphs.
You can navigate across different documents in a manner similar to a slide deck.
It's got a very simple/light-weight/intuitive interface.
Comment: Mac users: In lieu of SmoothDraw, Autodesk Sketchbook Express works (free with a Wacom): https://support.khanacademy.org/hc/en-us/articles/202483430-What-software-program-equipment-is-used-to-make-Khan-Academy-videos-


Creating Aurora-like phenomenon in a laboratory

Question: Is it possible to recreate Aurora's in a laboratory experiment? Obviously, I'm not asking if it's possible to have bands of plasma thousands of kilometers long inside a lab. But rather, is it possible to create a particle stream analogous to solar winds, and ionize low-pressure gas into a plasma using this artificial solar wind?
If it is possible, has this been done before?
Comment: Possibly helpful:  https://physics.stackexchange.com/a/261060/59023 and https://physics.stackexchange.com/a/382414/59023.
Answer: Certainly. Classroom demonstration tubes can be bought that create colored ionization patterns inside when connected to a high voltage DC source. By putting different gases into the vacuum in tiny amounts, you get different colors. these are called glow discharge tubes. I watched while my science teacher demonstrated these to us in 1965.
Comment: This gives a result similar to Aurora's, IE a colored plasma, but the mechanism is quite different, is it not? Here, the gas is ionized using electricity, whereas the plasma in an Aurora is caused by the solar wind.
Thank you for the answer either way, I looked them up online and those do look very neat.
Comment: @Xylord  the solar wind is a plasma carrying magnetic fields and it is a magnetic field interaction, in the tube it is the electric fields , but maxwell's equations are symmetric after all.
Comment: @Xylord - The aurora are primarily created by electrons coming from the geomagnetic tail, not the solar wind.  Changes in solar wind properties (e.g., dynamic pressure) affect the terrestrial magnetosphere leading to a chain of events that accelerate and precipitate ~1-10 keV electrons into the ionosphere.
Comment: @annav - It is actually time-varying electric fields that accelerate the electrons, not the solar wind magnetic field.  Specifically, the electric fields are generated/carried by things called kinetic Alfven waves, lower hybrid waves, electrostatic solitary waves, electrostatic double layers, whistler mode waves, etc.  All of these help contribute to acceleration and precipitation.
Comment: @honeste_vivere  thanks for the correction, so it is really similar what happens in the tubes and aurora
Comment: @annav - Kind of but it's not a quasi-static electric field that accelerates the particles, i.e., there is a finite $\partial E/\partial t$.
Answer: Look into something called a Terella, which is what Birkeland used to correlate "cathode ray" (high energy electrons) trajectories with similar ring shaped footprints in the Ionosphere.


What's the meaning of an element that belongs to the same element?

Question: In classical set theory, if I consider that $x$ is an element, which means it is not a set, can I write $x \in x$ ? If yes, what this would mean?
Correct me if I am wrong, but I don't need to have some hierarchy here to apply the belonging operator, it means if I consider that exist a basic element, like the numbers, the operator is not only defined to the sets?
Comment: Such a set is called a Quine atom and its existence is negated in ZF(C) set theory by the Axiom of Regularity.
Comment: That $x$ is an element does not mean $x$ is not also a set.  Sets are elements of other sets.
Comment: What's the sense if I write 1 $\in$ 1 or 1 $\in$ 2 for example?
Comment: @ExampleMo If we define $1=\{\emptyset\}$ and $2=\{\emptyset,\{\emptyset\}\}$ as usual, then $1\notin 1$, $1\in 2$, and $2\notin 2$. Also  $1\subseteq 2$.
Answer: You wrote $x\in x$. This means that you can in fact write that. What does it mean? It means that you claim that $x$ is an element of itself. But $x$ is just a placeholder, a free variable.
First-order logic is not typed. You can impose stratification which disallows $x\in x$ or $x\notin x$ as legit formulas. This is what Quine suggested as a restriction for the comprehension axiom schema. This is what type theory is all about, having different types of objects and syntactic restriction about what you can and cannot write about these objects.
But in first-order logic, this is not the case. The formula $x\in x$ is a well-formed formula in the language of set theory. And then you should probably ask, is it even possible that such $x$ exists? The answer is that assuming the standard axioms of set theory (read: $\sf ZFC$) the answer is negative, the axiom of regularity implies that $\forall x(x\notin x)$. But without the axiom of regularity it is consistent that there are such objects in the universe.
You could argue that $1\in 1$ is just a false sentence. And you'd be right, assuming $\sf ZFC$ anyway. But you should also remember that in modern set theory everything is a set, including the elements of other sets. Again, you can change the settings of your universe and have objects which are not sets, but foundational research has shown that you gain nothing and lose nothing in terms of what you can do and prove about "everyday mathematics", other than perhaps your peace of mind knowing that $1\in 2$ and $\ln(2)\subseteq 1$ are true statements under some interpretations.
Answer: That $x$ is an element does not mean $x$ is not also a set.  Sets are elements of other sets.  But if you write $x\in x$, that means that $x$ is an element, since $x\in x$ means $x$ is an element of $x$.  It also means $x$ is a set, since something is an element of it.
However, in the most usual forms of set theory, nothing is an element of itself; the statement $x\in x$ is always false.  And $x\subset x$ is always true.


Is sending only password (not username) by sms secure?

Question: Is it secure to send only password and not sending with username by sms?
Is there any risk?
Comment: Would you write your password on a post card? Your user name is usually public knowledge, often your email.
Comment: What is the password for and how long is it expected to live?
Answer: Really your question needs a lot more context to answer fully.
The likelihood is that your answer will be: 'No, its not inherently terrible to send a user a password via SMS if done with careful consideration.'
SIM spoofing/cloning risks are not really worth considering for the majority of applications, although yeah... if you are designing a system which launches nuclear missiles, SMS would not be adequate.
The biggest realistic technical risk to using a phone number as a point of contact to deliver a password is that phone numbers get recycled. While email services typically haven't let you re-use a dead account since the early 90's, many phone operators still recycle numbers quite quickly and autonomously - with there not being much you can do about it.
Secondarily, you are obviously going to have to involve a third-party's infrastructure to physically deliver the SMSs for you, which adds and expands to the attack surface of your application.
There are some quirks you get via SMS also, such as how the message can spread to multiple devices (like from an iPhone to a Mac) and that technically increases the exposure/footprint of the password, although the same is true of email these days; with users have several devices all signed into the same email.
You could argue that more people have insecure phones than email inboxes. But its a bit of a thin argument as if you have the phone of a victim that has no password protection, that phone is probably authenticated to their email already anyway.
The fact that you are going down a road much less travelled with this design leads me to also speculate that you might be doing odd/bad things elsewhere in the application. While its not related to your question, you might want to consider (if you have not already):

After you send the password, are you storing it encrypted?
How are you generating it?
Does the user have to change it on first logon?
Answer: Security is hard.
The general principle of utilizing two factor authentication (2FA) is that of combining the need for secret knowledge (your password) and physical possession (of your token, phone, etc.) which greatly increases the difficulty of attack, and can offer protections against phishing or other man-in-the-middle type attacks.  For this reason, it is highly recommended to enable 2FA.
Use of SMS, however, is highly problematic.  Even more-so if you use it for password delivery.  Even more-more-so if the password is static (e.g. stored with the account), and not generated uniquely on each use.  Working backwards on these points:

If not unique, message history storage (often just an SQLite database on the phone) becomes the thing to steal, as that'll net you the credential.  Reference the questions hiburn8's answer ended on, too.
Delivering single-use passwords on demand is less egregious, however still suffers from GSM problems such as SIM cloning (used in a "recent" NPM breach involving the release of malware-infected popular package).
SMS is implemented as re-use of dead header space in GSM tower ping packets, which means they can be sniffed, in the clear, using a passive radio.

The last two points make SMS vulnerable to targeted attacks against specific, known users, both remotely (clone) and locally (radio interception).  This somewhat eliminates the benefit of not including the username, since the attacker will likely already know that part as part of their targeting (generally public information on most sites), but it's always good to provide as little detail as possible in security sensitive messaging.
Superior to messaged passwords, and superior to messaged one-time codes, would be relaxed password composition rules (to allow passwords to be more memorable, even if weaker) combined with an HOTP or other one-time-password token (I'm a fan of Yubikeys) or phone app.


Why is common law referred to as "at common law"?

Question: While researching the differences between modern penal codes with common law I noticed that in many places it is written as at common law. An example is, "A crime at common law defined as unlawful sexual intercourse with a woman by a man without her consent and by means of fear or force." Does anyone know why it is worded this way?
Comment: I wonder whether 'at' in this use is a calque of the French proposition 'à', which has a much wider range of meaning in French, including "within the category of/to be classified as/belonging to", as in "c'est à moi" (belonging) or "chicken à l'anglaise' (classification: chicken in the English style).  Compare oyez's history: http://en.wikipedia.org/wiki/Oyez
Comment: Specifically, are you asking about the use of the word ***at*** as opposed to, say, *in* or *under*? If that's the case, judicious use of bold text in your question may help make it clearer.
Answer: I think the reason is because back in the day in England there were different courts.  There were common law courts, courts of chancery, ecclesiastical courts, and I think there was more but can't remember the names.  Depending upon what you did wrong, you would be tried in whatever court had the jurisdiction, or maybe you could end up in more than one court for the same crime, I don't know.  I would have to research that part, but anyway, I hope that was helpful.
Answer: The "at" is used to note the state of the crime.  It was a crime at common law.
And really you are reading the "at" because many law books use standards dating back a few hundred years.  So you will see a lot of sequencing and paraphrasing that may not seem "modern".  That is just the norm.
I would think that current usage is more along the lines of "common law crime".
Comment: @EdwinAshworth Lawyers hold on to old usage because it has precedential value - courts have held OldX to mean Y, and if a lawyer imprudently substitutes NewX the courts may hold that to be clear evidence that she means something other than Y. If it ain't broke, don't fix it.
Comment: The legal people think they should be able to make their own rules.
Comment: @EdwinAshworth - Don't we seem a little smarter if we use 18th century sentence configuration?  Lawyers need to at least appear smart right?
Comment: I daren't comment.
Comment: @StoneyB - I was prelaw in the late 90s and supposedly there was a trend away from this and actually a couple of judges came in and said they push for what they called "common English".  I think this was due to lawyers butchering the older phrases.
Comment: @RyeBread Indeed there is it; but I think the primary motivation was the proliferation of contracts of adhesion, particularly contracts between consumers and producers, where the producer draws the contract/warranty/whatever and hands the consumer three or four pages of unintelligible boilerplate.


What is the most effective treatment for ADD and ADHD that excludes chemical prescriptions from a doctor?

Question: Besides chemical medications that are prescribed that can increase the level of dopamine, and other important neurotransmitters in the brain. What is the most effective natural treatment method for ADD, and ADHD?
Comment: have you done any googling? what have you found and what you still want to understand better?
Answer: Not much seems to work; psychotherapy appears questionable when the patients are re-evaluated by someone else. The only thing with a minor but generally applicable effect is free fatty acid supplementation, although the effect may be so minor as to have no clinical value.
Of course, most of these findings come from a meta-analysis (Sonuga-Barke 2013) published in a psychiatry journal...

Two different analyses were performed. When the outcome measure was based on ADHD assessments by raters closest to the therapeutic setting, all dietary (standardized mean differences=0.21-0.48) and psychological (standardized mean differences=0.40-0.64) treatments produced statistically significant effects. However, when the best probably blinded assessment was employed, effects remained significant for free fatty acid supplementation (standardized mean difference=0.16) and artificial food color exclusion (standardized mean difference=0.42) but were substantially attenuated to nonsignificant levels for other treatments.
CONCLUSIONS:
Free fatty acid supplementation produced small but significant reductions in ADHD symptoms even with probably blinded assessments, although the clinical significance of these effects remains to be determined. Artificial food color exclusion produced larger effects but often in individuals selected for food sensitivities. Better evidence for efficacy from blinded assessments is required for behavioral interventions, neurofeedback, cognitive training, and restricted elimination diets before they can be supported as treatments for core ADHD symptoms.

The editorial that accompanied this paper had this pull-out:

Behavioral treatments have been
demonstrated to be helpful for children
with co-occurring disorders and
symptoms, although this blinded
analysis did not show efficacy for core
ADHD symptoms.

And it's worded that way because a prior meta-analysis (Fabiano 2009) using less stringent criteria (no blinging required) found (of course) that behavioral interventions work.
Regarding food colorants, only about 8% of ADHD children are estimated by a different meta-analysis (Nigg 2012) to be affected/sensitive.
And a meta-analysis of diet interventions Pelsser 2017 was quite skeptical of most stuff:

Considering the small average ESs [effect size] PUFA [poly-unsaturated fatty acid] supplementation is unlikely to provide a tangible contribution to ADHD treatment, while further research is required for AFC [artificial food color] elimination before advising this intervention as ADHD treatment. The average FFD [Few Foods Diets] ES is substantial, offering treatment opportunities in subgroups of children with ADHD not responding to or too young for medication.

So the cool new thing is FFD now. Since the last paper is freely available... I won't say much more, except that it may take a year to permute food choices until the right few foods are determined. They do say in the (body of the) paper that (owing to this time-scale issue):

large-scale implementation of the few-foods approach would not be a realistic recommendation.

I have to wonder why that didn't make it into the abstract.
Answer: It seems that things like aerobic exercise and mindfulness meditation can help alleviate some of the symptoms of ADHD. Aerobic exercise, in particular, helps increases many of the neurotransmitters involved in ADHD such as dopamine. Mindfulness meditation helps strengthen executive function and can be a good strategy for regulating emotions and behaviors.
Source: http://www.russellbarkley.org/factsheets/ADHD_EF_and_SR.pdf
Comment: And regarding meditation, [another recent review](https://www.ncbi.nlm.nih.gov/pubmed/28547119) says "Results indicated that risk of bias was high across studies. At this stage, no definitive conclusions can be offered regarding the utility of meditation-based interventions for children with ADHD and/or their parents, since the methodological quality of the studies reviewed is low." And this pretty much the same finding from a [different review some years ago](https://www.ncbi.nlm.nih.gov/pubmed/20556767).
Comment: Exercise has seen more attention https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3724411/ "Taken together, these five pilot studies – although each limited by small sample size, unblind status of the researchers and raters of behavior, and/or either lack of or poorly designed control conditions – provide preliminary evidence of the potential for exercise interventions to improve both the behavioral symptoms and neuropsychological functioning of school-aged children with ADHD."  Exercise is beneficial anyway, but I would not pin too much hope on it alone given the quality of the research.
Comment: And [a newer review](https://www.ncbi.nlm.nih.gov/pubmed/27807701) by different authors concluded pretty much the same thing: "The preliminary state of the evidence supports PA as an adjunctive treatment for ADHD at this time, but the body and sophistication of the research to date is insufficient at present to support PA as a stand-alone treatment."
Answer: Not an expert on the field, but neuro feedback seems to be even more effective than drugs, in particular regarding the long term benefits. Here I cite an additude article which summarized four studies. Clearly, none of the studies is bullet proof, but I think this is pretty good evidence.

Monastra, et al. (2002): 100 six- to 19-year-olds with ADHD were treated for one year with a combination of Ritalin, behavior therapy, and school accommodations. Half of parents also opted to include neurofeedback in the treatment plan. The youth receiving neurofeedback did better than did the other subjects on parent and teacher reports, and computerized attention tests. EEG scans showed that their brainwaves had normalized. After discontinuing medication, only the patients who received neurofeedback saw persistent results. This study is criticized because its participants were not randomly assigned to treatment groups.

Levesque, et al. (2006): 20 eight- to 12-year-old children with ADHD were randomly assigned to receive 40 weekly neurofeedback treatment sessions, or to a waitlist control condition with no treatment. At the end of 40 weeks, the children who had received neurofeedback showed noteworthy improvement, as captured by parent ratings and laboratory measures. fMRI scans showed significant change in brainwave patterns for the treated children, but no change for control children. This study was limited by its small sample size.

Gevensleben, et al. (2009): 102 eight- to 12-year-olds with ADHD were randomly chosen to receive neurofeedback or computerized attention training. Both groups received 36 active treatment sessions over 18 weeks. Researchers tried to keep parents and teachers from knowing which treatment the children received. This study sought to remedy shortcomings of previous research with a randomized control group, along with a larger sample size. At the end of the study, the children in the neurofeedback group showed 0.6 greater reductions in parent and teacher ratings of ADHD symptoms when compared to the computer-training group. Six months later, the differences remained, and parents of the children treated with neurofeedback reported fewer homework difficulties.

Meisel et al. (2013): 23 seven- to 14-year-olds were randomly assigned treatment with methylphenidate or 40 neurofeedback sessions. Both groups showed significant and equivalent reductions in parent and teacher ratings of ADHD symptoms immediately after training ended, two months afterward — and the improvements persisted through a six-month follow-up. Teachers reported significant academic improvements in reading and writing skills for only the neurofeedback group, but it is not clear if teachers were blind to which group received which treatment.


How to block entire IPs of a VPN server by IP

Question: I have website that identifies users only by their IPs. That makes it very difficult to keep it secure against unwanted users/attackers. They can simply change their IP by using VPN services that provides them numerous variety of IPs. So what I want is to not just blocking one IP but entire IPs under subnets of a VPN service, once attacker used one of them.
Comment: I understand what you want. But do you have a specific question - such as how do I block the IP range for this/these IP address(es)?
Comment: Well, some of them here :
220.127.116.11,
18.104.22.168,
126.96.36.199,
220.127.116.11,
22.214.171.124

I can block like :
188.8.131.52/24,
18.104.22.168/24
But I dont want to bother to detect ip range every time.
Comment: You cannot identify users by IP addresses. IP address is the address of a network interface, and there can be many users using the same IP address, and one user can have multiple IP addresses. On many mobile networks IP addresses change on every connection. So, you should try to use something else for user identification.
Answer: As it so happens, I was writing a script to allow people to enter an IP address notation and get an .htaccess regex to block the IP address and IP address block. Much of the code was borrowed from other places and the script has to be secured so it is not ready for prime-time. I scrambled to cobble the code together to try and help you.
If I got it right, the following will help.
<code>RewriteCond %{REMOTE_ADDR} ^22.214.171.124$ [NC]
RewriteRule .* - [F,L]

RewriteCond %{REMOTE_ADDR} ^220.127.116.11$ [NC]
RewriteRule .* - [F,L]

RewriteCond %{REMOTE_ADDR} ^220.127.116.11$ [NC]
RewriteRule .* - [F,L]

RewriteCond %{REMOTE_ADDR} ^188.8.131.52$ [NC]
RewriteRule .* - [F,L]

RewriteCond %{REMOTE_ADDR} ^184.108.40.206$ [NC]
RewriteRule .* - [F,L]

RewriteCond %{REMOTE_ADDR} ^81.17.(0*[1-3]*[6-1]*).([0-2]*[0-5]*[0-5]*)$ [NC]
RewriteRule .* - [F,L]

RewriteCond %{REMOTE_ADDR} ^84.(2*0*[0-1]*).(0*[0-6]*[0-3]*).([0-2]*[0-5]*[0-5]*)$ [NC]
RewriteRule .* - [F,L]
</code>
Pay particular attention the the last two RewriteCond and test them to make sure I got it right. (I am fairly sure I did.) If they do not work, let me know and I will try again. They are intended to block the IP address blocks you provided according to the IP address assignments I have in my GEOAS database.
And yes! Before people begin to scream, there are better regex's for this- but this is the best I found for my automation work.
As far as I know there are no tools for automatically blocking IP address blocks. I could be wrong. You may want to check out Mod_Security for Apache/Windows which may do a lot for you automatically. It appears to amongst the best. There are other tools. I have not researched this recently so I won't try and comment.
Again, let me know if I got the regex right. I am creating an HTML form based tool for everyone who wants to block IP addresses and IP address blocks. This will help others.
BTW- I also agree that generally, you do not want to block whole IP address blocks. I do understand your concerns. I have automation that allows me to dynamically block IP addresses and follow abusers around my site and stop them cold. But this too is a work in progress and I am busy writing several patents that I will share later. I do this for the security research I am doing so I cannot give away the store just yet. Just know it will be showing up in various tools eventually.
Answer: You can put this script into you're .htaccess file on root directory of you're website:

## block IP access ##
order allow,deny
deny from 22.214.171.124
deny from 126.96.36.199
allow from all
## block IP access ##

In this case make all IP Address unless 188.8.131.52 and 126.96.36.199 to access you're website


How to plot train test error for classification models like Support Vector Classification(SVC)

Question: How to plot train test error for classification models like Support Vector Classification(SVC). I am using SVC from sklearn module, not able to get train and test errors to plot
Answer: Well you haven't defined what "error" means, so I'll just assume that you want the log loss.
First, you need to create your SVC object telling it you'll want probability estimations:
model = sklearn.svm.SVC(probability=True)

Then you can compute the log loss given said estimation:
probs = model.predict_proba(x)
loss = sklearn.metrics.log_loss(y_true=y, y_pred=probs)

Comment: Thanks! BUt i want to plot mean_train_score and mean_test_score values in GridSearchCV for C and gamma values of SVM. How can i do that?
Comment: You can use the `scoring` parameter in GridSearchCV


AA cell for low power embedded system -Debugging help needed

Question: I am using AA LI cells for an embedded system project.This is a low power embedded project with various modules consuming current in pulses.
Recently one of the prototype board stopped working. Although I measured the voltage across the AA measured 1.6V, it still does not work. How should I go debugging the problem and find the root cause. Can the AA cell be bad although it shows 1.6V?
Comment: 1.6V is 1.6V.  If your circuit is supposed to run on that, then the problem is elsewhere.  As for how to debug, there is no way we can answer that.  It depends on your circuit, of course, and it would be far to broad to talk about this in general.
Comment: Thanks. Yes the circuit is supposed to work with the specified voltage. My question is ,in general,can a AA cell be bad although the measured voltage across it is perfect.
Comment: As I said, volts is volts.  The only issue might be how much the volts goes down as load is applied.  However, if the voltage is always 1.6 and your circuit is supposed to run on that, then the battery is not the issue.  Make sure it is really 1.6V when the circuit is drawing its maximum current though.  A bad battery could have good open circuit voltage but drop fast as load is applied.
Comment: That is a very good point. Thanks for your suggestion. I will do and update you the result.Thanks again
Answer: As a battery ages its internal resistance increases. Therefore, measuring the voltage on an 'idle' battery (i.e. 0 current) will not always yield the same as it does when current is actually drawn from the battery.
If you have 'modules consuming current in pulses' it may well be the case that, during those pulses, the battery's voltage will drop below its 'idle voltage' significantly.
Use an oscilloscope to measure the actual voltage during a pulse.
You may also want to put a capacitor in parallel to the battery. This decreases the overall impedance of your power source for short pulses significantly and will almost always yield a much longer usable time for any battery being used pulsed.
To get a rough (optimistic) estimation of a battery's response to a current pulse, one may measure the voltage during a somewhat 'prolonged' pulse of the same current. - Defining 'prolonged' here is up to the reader, but the point actually is: If a battery's voltage drops below a certain level under constant (current) load I, then it probably will do (even more) so for pulsed loads of the same current I.
If you know that your pulses are 1A max., just put a 1A constant current load (read: resistor) across the battery and take a voltage reading while the current flows. This will definitely reveal a dead battery better than its idle voltage.
Comment: ok thanks.I will do it and give you updates. Is there any other tests that I can conduct to learn the effect on battery due to pulsed current consumptions.
Answer: What makes you assume the problem is the battery in the first place?
From the datasheet of the L91, the nominal voltage is 1.5V (not sure where you get 1.7V) and the graphs show a maximum of 1.6V under a small load (50mA) which drops quickly to level out at around 1.5V. The cells are also capable of handling large current pulses (up to 5A)
Given the above it would appear the battery is likely to be okay, but as Hanno says it needs to be tested under load. If all looks well then it's a problem with your module. Also a simple way of making sure it's not the battery is to use a known good source e.g. a bench supply to power the suspect module.
Comment: Sorry for the confusion. It is an Energizer L91 and it supposed to provide 1.7V
Comment: Okay, I updated the answer.


How do i implement falling pins animation for markers in android map view

Question: Is there any way to implement falling pins/markers animation for google maps in android like that in iPhone ???
Comment: And the answer is: Yes.
Answer: Android has overlay markers (see ItemizedOverlay) that make it easy to add images to maps, BUT note that, in my experience at least, animated images do not work when added to overlays.
I found it necessary to add a View on top of the MapView, and add imagery to that, and I've successfully added animated drawable images to the map using that approach. For more details see here:
Can I use AnimationDrawable in an overlay on a MapView?
But to be honest, you should remember that it's Android, and copying every little feature from iOS is unnecessary. Google Maps on Android doesn't use a pin marker, it uses a static blue spot - I'd say it's best to replicate that and remember your users are Android users, not iOS users - they want consistency across Android apps.
Answer: You could have a look in this docmentation: https://developers.google.com/maps/documentation/javascript/overlays
Here is an example map.
Just add this in your code:
<code>marker.setAnimation(google.maps.Animation.DROP);
</code>
Comment: This is for JavaScript, not for android
Comment: JavaScript api v3 works in webview ;) so yes you can, but not in a map view.


How to implement non-unitary operator in qiskit?

Question: I am trying to make a operator for S-Box for AES. The matrix is non-unitary. When I use Operator command for declaring it as a function. It gives error, the matrix is non-unitary. Thus, the qiskit does not allow non-unitary operators to be implemented. Is there any way to implement the non-unitary operator in qiskit or cirq etc?
Comment: Related: https://quantumcomputing.stackexchange.com/questions/29732/doing-non-unitary-operations-on-quantum-computer
Answer: There are several ways to apply a classical function in quantum computing. Here, I think you're interested in one of the following two.
The first one is the standard oracle:
$$U_f|x,y\rangle=|x,y\oplus f(x)\rangle$$
where $\oplus$ is the bitwise-XOR. This is the most common, as it allows to apply quantum functions even if they're not bijective.
However, there's another type of oracle, called erasing oracle or minimal oracle:
$$V_f|x\rangle=|f(x)\rangle$$
Because of the requirement of unitarity, in order to use this oracle the function must be injective (though bijective is easier).
The thing is, the AES S-BOX is bijective, since it is essentially a lookup table with unique values. Since it takes an 8-bit number and returns another 8-bit number, you can build a $2^8\times2^8$ matrix where the first column is all $0$ except in $S(0)=$0x63$=99$, the second column is all zeros except in $S(1)=$0x7c$=124$, etc...
You can then apply this matrix, which is unitary since it's a permutation matrix, which corresponds in this case to an erasing oracle.
The standard oracle is a bit different, but similar in the process. You take a $2^{16}\times2^{16}$ matrix, where the $256x+y$ column is all zeros except in $256x+(y\oplus S(x)$, for all $x$ and $y$ being between $0$ and $255$ included. Once again, it is unitary since it's a permutation matrix.

As a side note, you probably don't want to implement the actual AES in Qiskit. AES' state being 128-bit long, you'd need a $2^{128}$ statevector to represent it with Qiskit, which clearly won't fit in your computer memory, not to mention the $2^{128}\times2^{128}$ matrices you'd have to apply. These numbers are for an erasing oracle, while you probably want a standard one in order to apply Grover's algorithm, in which case replace the $2^{128}$ by $2^{256}$.
Thus, you probably want to design an "AES" that acts on very small states, where a case of your state is only represented on 1 bit or two. This would still allow you to understand how you could implement such a function in Qiskit.
Comment: thankyou, actually i am just doing it for a 8-qubit code, which i will repeat multiple times to complete a 256 bit input. So, the S-box is 8x8 but no-unitary, Now, i have used linear GF for constructing a unitary S-box (which i check by multiplying s-box matrix with its transpose) but the qiskit Operator commands gives error still. claiming its a non-unitary matrix.
Comment: @SyedShahmirKazmi Can you pour the code you've used to create this matrix in your question, along with how you try to append it to your circuit?


Impact of native language on glossolalia

Question: The Wikipedia page made a passing mention that people of different backgrounds "speak in tongues" differently, but I was curious if there were any papers on this topic. I'd be interested in if there is some correlation between how people try to speak gibberish, and their actual native tongue. Can anyone point me to a paper on the subject, or give some details on this?
Answer: Here's a paper by Heather Kavan from Massey University: "We don't know what we're saying, but it's profound": The language and contexts of glossolalia. I found this paper to be enlightening, and if I have time some of her references seem worth it to follow.
Some of her points:

Glossolalia is no different than asking someone to invent a language on the spot and speak it.
Utterances contain real words that are rendered in disguised form. In other words, the speakers are applying all sorts of phonological changes to actual words to produce nonsense.
Open syllables (CV) are the most common. (My guess is that they are the easiest to produce.)
In churches, the people are given "encouragement" to speak in tongues.

Things that are uttered may ultimately be borrowed from other people.
People have rehearsed.

A minority of Christian groups had what the author terms "spontaneous glossolalia" (as opposed to context-dependent glossolalia):

Spontaneous glossolalia is an intense uprush of vocalisations where tongues flow without prompting or prior knowledge of them, and the participant does not know what is happening to them. This was experienced in the purification group, it was evident in a minority of Christian accounts, and is likely to have occurred during the early Pentecostal revival.

There was another document I read a while back that was intriguing, but I do not know which of my browsers' history to look to retrieve the URL.
Answer: There are a few published papers, but not many, and a prominent problem with such studies is that they are not carried out by experienced linguists, except in the case of William Samarin. The above-mentioned paper by Kavan is apparently not published and is not at its original link. William Samarin published a book entitled Tongues of men and angels (1972: MacMillan) and an article in Hartford quarterly (8: 49-75) entitled "The linguisticality of glossolalia" – I don't have either of these. Michael Motley published an article "A linguistic analysis of glossolalia: Evidence of unique psycholinguistic processing" in Communication quarterly 30:18-27. Osser, Ostwald, MacWhinney & Casey published
"Glossolalic speech from a psycholinguistic perspective" in Journal of Psycholinguistic Research (2 (1): 9-19). then there is this MA thesis Internal-external locus of control in glossolalics by J Coulson.
The lack of published acoustic corpora is a prominent problem in these studies. The reason why this is significant is that such phonologically-relevant generalization as are presented by the researchers are based on their judgments of phonetic content. Accurate phonetic transcription is an arcane art not widely practiced in linguistics, and to the extent that professionals have any prior experience in phonetic transcription, it is usually heavily biased in favor of English phonemes. Without accompanying acoustic corpora, it is impossible to know what phonetic details were omitted, and we cannot track the general reliability of the researchers as field workers (except Samarin), because they are not linguistic field workers.
In this regard, it is of interest that Motley reports the presence of non-English sounds in his corpus, and gives sufficient descriptive detail that I am inclined to take his data claims at face value. He noted the presence of non-English segments [β ɲ x] and apico-dental [t d n] in one of the glossolalic varieties (of the bi-glossolalic informant) as opposed to apico-alveolar in his English. It is also observed that there were many non-English clusters such as [fw, vr, wx, dl]. At least for this speaker, I would conclude that the glossolalic output is not just a filtered version of "possible English".
Answer: The "tongues" Pentecostal and Charismatic Christians are producing today is an entirely self-created phenomenon. It is non-cognitive non-language utterance; random free vocalization based upon a subset of the existing underlying phonemes of the speaker's native language, and any other language(s) the speaker may be familiar with or have had contact with.
It is, in part, typically characterized by repetitive syllables, plays on sound patterns, alliteration, assonance, and over-simplification of syllable structure. It is also interesting to note that any disallowed sound combinations, i.e. consonant clusters, in the speaker's native language are also disallowed in his/her tongues-speech. Further, this subset of phonemes typically contains only those sounds which are easiest to produce physiologically.
Sometimes the same speaker will draw on different subsets; thus claiming to speak in "diverse tongues".


Is there a console for Windows Mobile devices?

Question: I would like to write small console based applications on Windows Mobile.  What console applications might I use?
Answer: it may be useful to know that when you use printf from a standard windows mobile application, the output will end up in the kernel log of the device.
This has several drawbacks:
 * Access to the kernellog is manufacturer+device dependent.
 * The length of the string you can print is limited to 255 characters.
if you run your tool in the visualstudio environment in the debugger, you will get the output of the printf's in your log window.
Answer: There is no command prompt style console on Windows Mobile.  If you're really after a command prompt, check out www.pocketdos.com for a high level of dos application compatibility.
If you're more interested in writing small applications for Windows Mobile, C# or VB.Net are your best choices.
On small mobile devices like this, command prompts are significantly harder for users to interact with compared to GUI based applications.


What is causing my ~/Library folder to be come visible again?

Question: At some point after Lion system updates, my ~/Library folder becomes visible again, in seemingly spontaneous fashion. If I make it invisible, it will become visible yet again. What could be causing this? Has anyone else seen this?
Comment: My guess would be a 3rd party app doing this. You would expect the opposite though, as it is hidden by default in Lion, and I have experienced it being hidden again after explicitely unhiding it (probably through software updates).
Comment: Probably a third-party installer, right? Wouldn't the app require administrator privileges to change the visibility parameter?
Comment: Well at least it doesn't require an administrator password when setting it from the terminal, so I'm not sure an app would need extra privileges to do so.
Comment: An administrator password is not required for making changes to a user's own files or preferences, unless the user is attempting to rename or remove a file needed by OS X. Changing visibility only changes flags on the file, but does not render the file or folder inaccessible to the OS, thus, doesn't require an administrator's permission.
Answer: It is VueScan. The developer (who otherwise is great) does annoying things like this, or adding the app's icon to the Dock without making them a preference.


How do I solve the BattlEye not responding problem?

Question: I'm trying to play the DayZ Mod for ArmA2 Combined Ops but every time I join a server I get kicked about 30 seconds later due to "BattlEye not responding" issue.
Answer: Uninstall  Arma 2 not OA, then reinstall it. It worked for me
Answer: Have you launched Arma 2 or Arma 2: Combined Operations yet?
I've read that you need to do that first so BattlEye can be set up. So if you haven't done that, try it.
Make sure you're on the latest version of DayZ.
Update everything you can relating to Arma 2: CO as well.
Comment: Yep and yep. I've hosted my own A2:CO server locally with BattlEye enabled and that works fine. I just can't join any online servers with BE enabled. There is one DayZ server which doesn't have BE enabled which I can join, but it's on the other side of the world so it's not great to play on.
Answer: Might I suggest you re-install BattlEye and also update the .dll's to the latest manually found here: http://www.battleye.com/download.html
Answer: I solved this issue by updating the firmware for my modem. My hardware is an iiNet BoB2.
I had previously found similar issues with related hardware but there was no upgrade for my modem's firmware when I wrote this question.


What is a good place to start learning about pulse jets?

Question: I'm a student who is curious about designing his own pulse jet engine, I am wondering if there are any schematics designs, notes, and other related materials I could/should study to learn about these engines. Where can I find such things and what is a good place to start?
Comment: I would start with Wikipedia [Pulsejet](https://en.wikipedia.org/wiki/Pulsejet). In the "External links" section, there are quite a number of links to specific resources.
Answer: You could try this website on home made pulse jets looks like it has some good info. These guys are selling some plans and have info as well. Here is an interesting instructables... And here is another DIY one. You may also be able to dig up some of the work that was done with them during WWII with a bit of directed searching on some public archives (as it may be more or less public record now). Of course physics and engineering text books will always be of help but there may not be any pulse jet specific ones.
PSA: You should take extreme caution when building and testing something like this. You will presumably be burning jet fuel (or another comburent) in a home made combustion chamber which can lead to very bad things. Care should always be taken when firing up an engine (of any kinda) for the first time. Welds should be double checked, metal choice is important and please wear safety goggles!
Comment: On the crazy (also known as "don't try this at home") end of the scale, there's Colin Furze on youtube.
Comment: Thanks a tonne! Had given some thought to studying the Argus engines used for The V1 bombers and Ford Cruise missiles, but this helps alot!
Comment: Be careful with the V1 bomb (AS014 Engine) those pulse jets were made to last for only one flight and a lot of corners were cut from a materials standpoint so i would not necessarily try to mimic it, the physics however will always apply.
Answer: If you look for performance data on the As-014 pulse jet, NACA did some thorough testing of it in 1945. The resulting report E5J02 can be found here. It contains information about thrust, fuel flow, pressures and information about the test setup and procedure.
This Russian site has lots of drawings and detail pictures.


Installing SoftEther VPN Client&Server Manager on Ubuntu 20.04

Question: how do I install the SoftEther VPN Client and Server Manager for Ubuntu 20.04?
I am not looking to setup a VPN on my machine. I want to connect to other servers.
Thank you
Answer: I would not suggest setting up SoftEther Client for Linux since it could be difficult for new users. I would suggest using L2TP/IPsec, SSTP, or OpenVPN as a client for SoftEtherVPN (If you need to set a mac address for a static IP for the user, you can do that within the notes section of the user account). If you really need the SoftEther client, then this should help you. But I'd suggest getting the client from softether.org.
You can get the VPN server manager up and running on your system by downloading the windows version in zip form. You can then extract it and run it mostly without issues via Wine. (That's how I do it at least)