I have an array.  $a_input = array(1,2,3,4,5)   I want to remove 1 from array . out put is :  array(2,3,4,5);   remove 2 => output:  array(1,3,4,5);   remove 3 => output :  array(1,2,4,5);   ..... how to do this with for loop ?
Is there an easy way to delete an element from an array using PHP, such that foreach ($array) no longer includes that element?  I thought that setting it to null would do it, but apparently it does not work.
For example:   For an MVC architecture, should I prefer Ruby on Rails or PHP [closed] Gmail: What is a jQuery selector for incoming mail senders only? How to work with highly compressed and nested CSS in general? [closed]   Better to convert to   [closed] For an MVC architecture, should I prefer Ruby on Rails or PHP [closed] Gmail: What is a jQuery selector for incoming mail senders only? How to work with highly compressed and nested CSS in general?   I should first read the title and sometimes open the question to understand if the question is closed.  I think the [closed] mark  should be at the beginning of the title, not in the end, where I won't ever be if the title is long.  Also coloring will be a good improvement (via @Shadow Wizard). Newbe Ubuntu installer - Ubuntu 14.04.3 LTS 64bit - Windows 10 Having some issues installing Ubuntu 14.04.3 LTS 64bit next to Windows 10.  This is what I did:  1) Created a bootable usb with ubuntu on it using Universal-USB-Installer-1.9.6.3  2) Changed the boot mode  3) Boot from USB - It showed the option to test drive or install - I chose install  4) Choose Language  5) Setup Wireless - I didn't choose anything here  6) Then it showed me the preparing to install  7) After that a message popped up saying:      Unmount partitions that are in use The installer has detected that the following discs have mounted partitions /dev/scd Do you want the   installer to try and unmount these partitions before continuing? If   you leave them mounted, you will not be able to create, delete, resize   partitions on these discs, but you may be able to install on an   existing partition there.   So obviously I said yes.  8) Installation type - I chose something else - This looked nothing like the screen shots I saw on the installation guide.    9) Then it only gave me the option to choose my bootable usb for the installation. With a bunch of options to choose, so I got scared and quit.     Can any one please help?  Keep in my mind I do not know a lot, so please dumb it down. Why can't I choose to run it along side Windows 10? Why doesn't the installation pick up my hard drives?  If you need any other info, please ask. But I think I put everything in here. Is it a good practice to always scale/normalize data for machine learning? My understanding is that when some features have different ranges in their values (for example, imagine one feature being the age of a person and another one being their salary in USD) will affect negatively algorithms because the feature with bigger values will take more influence, is it a good practice to simply ALWAYS scale/normalize the data?  It looks to me that if the values are already similar among then, then normalizing them will have little effect, but if the values are very different normalization will help, however it feels too simple to be true :)  Am I missing something? Are there situations/algorithms were actually it is desirable to let some features to deliberately outweigh others? There are $25$ horses. You can take $5$ horses at a time and race them. Each horse always finishes the race in the same amount of time, and there are no ties. The only information you get from each race is the order that the $5$ horses finished in. What is the smallest number of races you need to find the $3$ fastest horses, in order?   I found this problem on  and cannot figure out the best answer. Please help. Practical way to implement prevention of IP Spoofing I am an undergraduate Computer Science student and was hoping to gain some knowledge of ways to help prevent IP spoofing but all the resources I have tried out elaborate this concept in a theoretical way. I want to try out my hands at one of the techniques like:      How do I simulate this whole situation in my own system were I myself am the attacker and I myself have to defend it? And once I have gained an understanding of it, then how do I start translating that into programming terms? How to show this equality of $\rho(X,Y)$ Let I have $(S,\Sigma,\mu)$ be a probability space, then $X,Y \in \Sigma$. Define $\rho (X,Y)$ by $\rho (X,Y)$ = correlation between random variable $I_X$ and $I_Y$, where $I_X$ and $I_Y$ are the indicator function of $X$ and $Y$. Express $\rho (X,Y)$ in term of $\mu (X)$, $\mu (Y)$, $\mu(XY)$. Conclude that $\rho(X,Y)=0$, if and only if $X$ and $Y$ are independent.      How to show that: $$\rho(X,Y)= \frac{\mu(XY)\,\mu(X^cY^c)-\mu(XY^c)\,\mu(X^cY)}{(\mu(X) \,\mu(X^c)-\mu(Y) \,\mu(Y^c))^{1/2}};0&lt;\mu(X)&lt;1;\,0&lt;\mu(Y)&lt;1$$ How to put GeoServer layers behind authentication? Verify $\int\sec x\ dx=\frac12 \ln \left\lvert\frac{1+\sin x}{1-\sin x}\right\rvert + C$ How to remove local (untracked) files from the current Git working tree This post pretty much summarizes my question :   I know for a fact that Mac and Linux are both Unix based  And the commands for Linux should work for Mac, but with limited knowledge for programming I couldn't get it to work.  EDIT: Just saw this -  currently working on it Removing unnecessary vertices? Can I skip my train leg booked with a KLM flight? Exercise $7$, page 51 from Hungerford's book Algebra.     Show that $N=\{(1),(12)(34), (13)(24),(14)(23)\}$ is a normal subgroup   of $S_{4}$ contained in $A_{4}$ such that $S_{4}/N\cong S_{3}$ and   $A_{4}/N\cong \mathbb{Z}_{3}$.   I solved the question after many calculations. I would like to know if is possible to define an epimorphism $\varphi$ from $S_{4}$ to $S_{3}$ such that $N=\ker(\varphi)$.  Thanks for your kindly help. As the title, I was asked to show that $2^{44}-1$ is divisible by $89$.  My first attempt is to change the expression into $(2^{22}-1)(2^{22}+1)$.  Then further simplified it into $(2^{11}-1)(2^{11}+1)(2^{22}+1)$, I used my calculator and was able to show that $2^{11}-1$ is divisible by $89$ but then I don't know how to show it with modular arithmetic. I do think that it is quite similar to the form where we can use the Fermat's little theorem. $(\sqrt{2})^{88}-1$. (Though I do understand Flt can only be applied to integer.)  Can someone tell me whether I can take square root in modular arithmetic as well? I am still pretty new to the modular arithmetic. Thank you very much. How to input integer value to an array, based preceeding row + column values? You can see the output from lscpu command -  jack@042:~$ lscpu Architecture:          x86_64 CPU op-mode(s):        32-bit, 64-bit Byte Order:            Little Endian CPU(s):                56 On-line CPU(s) list:   0-55 Thread(s) per core:    2 Core(s) per socket:    14 Socket(s):             2 NUMA node(s):          2 Vendor ID:             GenuineIntel CPU family:            6 Model:                 79 Model name:            Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz Stepping:              1 CPU MHz:               2600.000 CPU max MHz:           2600.0000 CPU min MHz:           1200.0000 BogoMIPS:              5201.37 Virtualization:        VT-x Hypervisor vendor:     vertical Virtualization type:   full L1d cache:             32K L1i cache:             32K L2 cache:              256K L3 cache:              35840K NUMA node0 CPU(s):     0-13,28-41 NUMA node1 CPU(s):     14-27,42-55   I can see that there are 2 sockets (which is like a processor ??) and inside each of the socket we have 14 cores. So, in total 2x14=28 physical cores. Normally, a CPU can contain multiple cores, so number of CPUs can never be smaller than number of Cores. But, as shown in the output CPUs(s): 56 and this is what is confusing me.  I can see that Thread(s) per core:    2, so these 28 cores can behave like 2x28=56 logical cores.  Question 1: What does this CPUs(s): 56 denote? Does CPU(s) denote number of Virtual/Logical core, as it cannot be a Physical core core atleast?  Question 2: What does this NUMA node mean? Does it represent the socket? Seeking appropriate statistic to measure spatial autocorrelation of points with binary values I am trying to determine the level of spatial autocorrelation in a point dataset.  The attribute I'm interested in is binary (presence/absence of a species), for which Moran's I is not appropriate.  On the other hand, Joint Count statistics, which are typically recommended for binary or categorical data, apparently are not appropriate for point data. What is an appropriate statistic to measure global and/or local spatial autocorrelation of points when the attribute of interest is binary? Glassware with scratched/etched surfaces generate more bubbles (, ). Why these rough surfaces allow easier heterogeneous nucleation? In C# why can't a conditional operator implicitly cast to a nullable type Let $a$ be a non-zero real number. Is it true that the value of $$\int\limits_0^\infty \frac{\mathrm{d} x}{(1+x^2)(1+x^a)}$$  is independent on $a$?