How to sort array keys by other array keys?
php sort associative arrays by keys that those keys exist in other array
Proper notation for distinct sets Consider I have two sets that neither one is a subset of the other (for example, the set of prime numbers and the set of odd integers). Is there a specific notation that combines the meanings of both ⊄ and ⊅ ?  Also, is there a notation to mean that two sets are completely distinct and share no elements in common (for example, the sets of odd and even integers)?  ≠ seems very inappropriate, and I'd like to avoid it.  Context: My area is actually Computer Science. I'm using this refine my vocabulary in order to teach my students about  (which is basically about sets and subsets of IP addresses), and to write some exercises for them. I'll probably use the words incomparable and disjoint as suggested. Area of a weird ellipse shape. A propeller has the shape shown below. The boundary of the internal hole is given by $r = a + b\cos(4α)$ where $a &gt; b &gt;0$. The external boundary of the propeller is given by $r = c + d\cos(3α)$ where $c - d &gt; a + b$ and $d &gt; 0$.  Calculate the total area of the propeller as shown by the shaded region and calculate the average temperature of the propeller, given by $T (r, α) = C/r$, where $C$ is a constant.     Have absolutely no idea how to solve this. If $p,q,r$ are all primes,and $p|qr-1$,$q|pr-1$ and $r|pq-1$,find all possible values of $pqr$. When creating accounts on Windows 10, you get a choice between "Your family" and "Other users".  If you choose "Your family" you are forced to use a Microsoft account to sign in. There are various reasons why one wouldn't want to do that, such as too much sharing of private information with Microsoft, etc.  If you choose "Other users" you can create regular accounts just fine. However, if you need to setup time limits for some accounts, it is impossible to do so. It is a feature exclusive to "Your family". Not all time-restricted users I want to create are my family, and not everyone is okay with sharing their info with Microsoft.  So, is there a way to setup login time limits for the "Other users" type of accounts? Unsupervised learning for anomaly detection I've started working on an anomaly detection in Python.  My dataset is a time series one. The data is being collected by some sensors which record and collect data on semiconductor making machines.  My dataset looks like this:  ContextID   Time_ms Ar_Flow_sccm    BacksGas_Flow_sccm 7289973 09:12:48.502    49.56054688 1.953125 7289973 09:12:48.603    49.56054688 2.05078125 7289973 09:12:48.934    99.85351563 2.05078125 7289973 09:12:49.924    351.3183594 2.05078125 7289973 09:12:50.924    382.8125    1.953125 7289973 09:12:51.924    382.8125    1.7578125 7289973 09:12:52.934    382.8125    1.7578125 7289999 09:15:36.434    50.04882813 1.7578125 7289999 09:15:36.654    50.04882813 1.7578125 7289999 09:15:36.820    50.04882813 1.66015625 7289999 09:15:37.904    333.2519531 1.85546875 7289999 09:15:38.924    377.1972656 1.953125 7289999 09:15:39.994    377.1972656 1.7578125 7289999 09:15:41.94     388.671875  1.85546875 7289999 09:15:42.136    388.671875  1.85546875 7290025 09:18:00.429    381.5917969 1.85546875 7290025 09:18:01.448    381.5917969 1.85546875 7290025 09:18:02.488    381.5917969 1.953125 7290025 09:18:03.549    381.5917969 14.453125 7290025 09:18:04.589    381.5917969 46.77734375   What I have to do is to apply some unsupervised learning technique on each and every parameter column individually and find any anomalies that might exist in there. The ContextID is more like a product number.  I would like to know which unsupervised learning techniques can be used for this kind of task at hand.  Thanks Can't get armature to move mesh! I'm trying to install Windows 8 on my pc via Microsoft Virtual PC.  However I get this annoying, non-descriptive error:    I'm looking to find out if Microsoft Virtual PC supports Windows 8, and if so how do I solve this issue?  NOTE: I'm NOT trying to ask for alternatives to Virtual PC, but rather trying to figure out if it's possible, and if so how, to use Virtual PC. Incorrect notation in math? Does math have an incorrect notation / syntax? I don't mean writing misaligned notation (google), but when you take something like a number to powers to powers to powers, $${{2^2}^2}^3$$ (I was told this is incorrect notation by a teacher). Is it really incorrect, or does it just need to be simplified with parentheses? Do people write maths like this?  a radical expression with the root being a radical expression? $$\sqrt[\sqrt{2^3}]{2}$$ Bluetooth from the command line in 12.04? I've been trying to pair up my bluetooth keyboard with my computer after reinstalling from a standard ubuntu 12.04 to a minimal install.  In the minimal install I have no gui, so I've been trying to use the various command line tools available, but I can't figure out how the pairing is supposed to go. Pairing when I had a gui worked flawlessly.  I've asked for help here:   No one has replied but a lot of details of my situation is available there.  How is one supposed to pair bluetooth devices from the command line? How to select more layers with GIMP? In Adobe Photoshop I am able to select multiple layers at once with Shift+Click.  How can I do that in GIMP? How to install hp scanjet 200 in Ubuntu 12.04? Unable to scan with hp scan-jet 200. When I type lsusb command in terminal it shows the scanner details.  I opened the simple scan which displays no scanners found, and x sane image scanners also displays the same error. if G is generated by {a,b} and ab=ba, then prove G is Abelian if G is generated by {a,b} and ab=ba, then prove G is Abelian  All elements of G will be of the form $a^kb^j,\,\, k,j \in \mathbb{Z}^+$   so I need to get $a^kb^j = b^ja^k$ Windows Logs Application is full of "Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: ****]" I have Windows Server 2016, with SQL Server 2017, and found Windows Log Application is full of Login failed messages (as follows) :     Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: ****]    Client's IP addresses are various. I don't have any maintenance plan in SQL Server     What's the problem? If $(X,d)$ is a complete metric space and $A$ is closed then show that for $x \in X$ there exists an element $a_0 \in A$ such that $d(x,A)=d(x,a_0)$ Creating a DateTime in a specific Time Zone in c# I'm trying to create a unit test to test the case for when the timezone changes on a machine because it has been incorrectly set and then corrected.  In the test I need to be able to create DateTime objects in a none local time zone to ensure that people running the test can do so successfully irrespective of where they are located.  From what I can see from the DateTime constructor I can set the TimeZone to be either the local timezone, the UTC timezone or not specified.  How do I create a DateTime with a specific timezone like PST? I got a new laptop; it came with an existing Windows installation, but I wanted to migrate my current backup to the new machine. I dd-ed the new machine's partitions to an external drive:  /dev/nvme0n1p1 /dev/nvme0n1p2 /dev/nvme0n1p3 /dev/nvme0n1p4   and afterwards move my current partitions to the new machine. What followed was a medium-sized nightmare. The new machine would boot, but the wireless network drivers were not recognized and later found out (to the best of my knowledge) they couldn't be installed. I tried:   booting from the console and running:  sfc /scannow chkdsk C: /f /r /x   both seemed to have completed successfully, but now the machine would get stuck in a startup repair loop. I tried resetting the machine (whilst keeping my files), but this failed halfway through. now the machine's still stuck in the loop and decided to try and repair it externally using a bootable Windows&nbsp;10 . It's likely that I'll need the new machine's Windows&nbsp;10 key. I'm not sure if it's stored in the BIOS (it came with Windows&nbsp;10  preinstalled) or somewhere on the partitions.   How can I get the key from the partitions (if it's there at all) while booting from a Linux image? If we have a complex scalar $\phi$ we know that the gauge-invariant interaction with $A$ is given by $A^\mu J_\mu$, where $J$ is the Noether current of the $U(1)$ symmetry of the Lagrangian $$ J_\mu\sim \phi^\dagger\partial_\mu\phi-\phi\partial_\mu \phi^\dagger \tag{1} $$  If we have a real scalar instead, $J=0$ and the field doesn't couple to $A$: real particles aren't charged.  My question is: what if we took $$ J_\mu\sim \phi\partial_\mu\phi \tag{2} $$ to couple $\phi$ to $A$? The interaction is Lorentz invariant and renormalisable, but it is not gauge-invariant, which is probably a bad thing. At what point would this theory break down?  This is probably very naïve, but I think that the Feynman rules for this theory are straightforward. So I guess the theory makes sense at least perturbatively. The theory is probably flawed at a more fundamental level, but I cant't seem to find where (some kind of gauge anomaly perhaps?) How to I make Cisco WebEx work with 13.10 64bit? I'm having a very hard time getting webex to work under Saucy.  Up until now I've been able to just install a java plugin, install ia32-libs, and I was good to go.  With Saucy ia32-libs is gone and it's up to us to figure out which 32-bit libraries we need to install.    So the question is, how do I install WebEx on 64bit Saucy without ia32-libs? I understand that for resistors in series we need to add R for each resistor to get the equivalent resistance, where R is resistance. I also understand the mathematical manipulations that show that for resistors in parallel we need to add the 1/R for each resistor to get the equivalent resistance. However I have a couple of questions that have to do with the physical interpretation of the mathematical manipulations involved.   First, I am trying to understand why in the case of parallel resistors we have to add 1/R's instead of adding R's as in the case of resistors in series i.e. could it be thought that the current in the wire is like a sort of water flow in the pipe that has two horizontal parallel pipes positioned one on top of the other and in between connected by a number of vertical pipes that have a tap each that could be adjusted to represent different resistances. Then at the top of each vertical pipe the water pressure P exists and at the bottom the pressure will be reduced by P*R.   For example, suppose we have three vertical pipes, so then the pressure at the bottom of each (after the tap) is P*R for the total of 3*P*R so why is the equivalent resistance not 3*R*P but 1/R = (1/R1 + 1/R2 + 1/R3) and how can I be able to visualize this relation? Mothballs in the pantry: is it safe to keep food there? My roommate put some mothballs in the pantry and when I came home and saw them, I took them out.  They were probably only there for a few hours, but is it safe to store food in there?  Should I throw out the food that was in there together with the mothballs?  I'm leaning towards 'when in doubt throw it out' but I'm unsure whether that is overkill in this case.