I have a function that has 5 requqired parameters and 2 optional ones. So a user can input 5-7 parameters and they are stored inside of an array. How can I pass those values to the function, is there something similar like extract() that returns the values and not the numbers? E.g.: $arr = ['one', 'two', 'three', 'four', 'five', 'six']; functionname($arr[0], $arr[1], $arr[2],$arr[3],$arr[4],$arr[5])  doesn't work, because I never know for sure if the sixth parameter really exists. Thanks for any help.
Python provides the "*" operator for unpacking a list of tuples and giving them to a function as arguments, like so:  args = [3, 6] range(*args)            # call with arguments unpacked from a list   This is equivalent to:  range(3, 6)   Does anyone know if there is a way to achieve this in PHP? Some googling for variations of "PHP Unpack" hasn't immediately turned up anything.. perhaps it's called something different in PHP?
Truncate (not round) decimal places in SQL Server Show that $\mathbb{Z}[i]/(2+3i)$ is a finite field.    By applying some isomorphisms and realizing $\mathbb{Z}[i]$ as the quotient ring of $\mathbb{Z}[x]/(x^{2}+1)$, I found that:  $\mathbb{Z}[i]/(2+3i) \cong \mathbb{Z}[x]/(x^2+1,2+3x)$  However, I run into trouble as I can't divide $x^{2}+1$ by $2+3x$ in $\mathbb{Z}[x]$. What would be another way to approach the problem?  Thanks for the help. Say I had a Core i7 Laptop with 16GB of RAM and a 750gb drive.  Is there a mechanism where I can partition the HD into a Linux, Windows, OS X, Shared Data, Hypervisor setup where I boot a small hypervisor. I can start/stop a linux, Windows and OS X virtual machine and interact with them all from the hypervisor?   Code, Test, etc?  is this a type 1 Hypervisor?  I suppose I could run a small linux install and VmWare but could VmWare read the virtual machines from a physical hard disk partition versus a file based setup (.vmdk files)? Proving the cross product matrix tranformation identity with an alternative solution I'm solving a problem from the book, Mathematics for 3D Game Programming and Computer Graphics, Third Edition, by Eric Lengley. The problem goes:  Let $N$ be the normal vector to a surface at a point $P$, and let $S$ and $T$ be tangent vectors at the point $P$ such that $S \times T = N$. Given an invertible 3 $\times$ 3 matrix $M$, show that $(MS) \times (MT) = (\text{det}M(M^{-1})^{T}(S \times T)$, supporting the fact that normals are correctly transformed by the inverse transpose of the matrix $M$.  The author provided a hint stating we can represent $(MS) \times (MT)$ as $$ (MS) \times (MT) = \begin{bmatrix} 0 &amp; -(MS)_{z} &amp; (MS)_{y} \\  (MS)_{z} &amp; 0 &amp; -(MS)_{x} \\  -(MS)_{y} &amp; (MS)_{x} &amp; 0  \end{bmatrix} MT $$ We then find a matrix $G$ such that $$ GU = \begin{bmatrix} 0 &amp; -(MS)_{z} &amp; (MS)_{y} \\  (MS)_{z} &amp; 0 &amp; -(MS)_{x} \\  -(MS)_{y} &amp; (MS)_{x} &amp; 0  \end{bmatrix} M $$ where $$ U = \begin{bmatrix} 0 &amp; -S_{z} &amp; S_{y} \\  S_{z} &amp; 0 &amp; -S_{x} \\  -S_{y} &amp; S_{x} &amp; 0  \end{bmatrix} $$ and show that $G = (\text{det}M)(M^{-1})^{T}$ to solve the problem. I am aware that there is an  to this problem, but I would like to solve it through the hints provided. Unfortunately, I am only able to go as far doing: $$ G = \begin{bmatrix} 0 &amp; -(MS)_{z} &amp; (MS)_{y} \\  (MS)_{z} &amp; 0 &amp; -(MS)_{x} \\  -(MS)_{y} &amp; (MS)_{x} &amp; 0  \end{bmatrix} M U^{-1} $$ At this point, I do not know how to proceed with showing that $G = (\text{det}M)(M^{-1})^{T}$. How would you proceed? I'd like to ask for hints on solving the problem. Using Replace Geometry to replace selected feature with circle in ArcGIS Desktop? I have a polygon shapefile and I want replace every irregular polygon with a circle.  I think I can do it with the Replace Geometry tool. But once the Replace Geometry tool is selected, draw a polygon mode is immediately entered. If I select the circle tool in the Draw tool window, the Replace Geometry tool becomes inactive.  Is there any way to use the Replace Geometry tool to draw a circle polygon? I have notice some sites have the same form for login, register and forgotten password.  Below the form you have 3 buttons    i forgot my password register log me in   What are the pros and cons on using this approach and which version would you go for. How to determine whether the direction of rotating a 2D vector to another one is counter-clockwise or clockwise using the cross product? Vec2 a, b; // some random vector Vec2 cross = a.Cross(b); RelativeDirection(a,b,cross); // return true if the direction of                               // rotating a to b is counter-clockwise   How do I implement the function RelativeDirection()?  I got some suedo code from the textbook:  if a.Cross(b) &gt; 0 then ... else ...   but the cross product is a vector right? how do you compare it with an integer? While I'm aware of  it does not quite answer my question. I have a simple sentence:     If any of the devices was not switched off, do something.   Is there supposed to be was or were? I was thinking about was since it could be rephrased as:     If any one of the devices was not switched off, do something.   But maybe that does not make any sense at all. Also, this is for a technical documentation where more formal language is preferred, not sure if that makes any difference. Checking if two Poisson samples have the same mean Find the sum : $\frac{1}{\cos0^\circ\cos1^\circ}+\frac{1}{\cos1^\circ \cos2^\circ} +\frac{1}{\cos2^\circ \cos3^\circ}+......+$ Find the sum of the following :   (i) $$\frac{1}{\cos0^\circ \cos1^\circ}+\frac{1}{\cos1^\circ\cos2^\circ} +\frac{1}{\cos2^\circ \cos3^\circ}+......+\frac{1}{\cos88^\circ \cos89^\circ}$$  I tried :  $$\frac{1}{\cos1^\circ}\left[\frac{\cos(1^\circ-0^\circ)}{\cos0^\circ\cos1^\circ} + \frac{\cos(2^\circ-1^\circ)}{\cos1^\circ\cos2^\circ}+...\right]$$  = $$\frac{1}{\cos1^\circ}\left[\frac{\cos1^\circ\cos0^\circ}{\cos0^\circ\cos1^\circ} - \frac{\sin1^\circ \sin0^\circ}{\sin0^\circ\cos1^\circ} + \frac{\cos2^\circ \cos1^\circ}{\cos1^\circ\cos2^\circ} -\frac{\sin2^\circ \sin1^\circ}{\cos1^\circ\cos2^\circ}...\right]$$  For this, as well, I am not getting any pattern to solve further. Please suggest, thanks. How do I download Minecraft 1.6.4? I tried connecting to a server this morning but it said "outdated client". I understand that that means I have to get Minecraft 1.6.4 but I have no clue how to do it. I tried getting it on Minecraft.net but I couldn't find it. Please tell me how to download it and use it. Two seasonal periods in ARIMA using R I'm currently using R to predict a time series with these instructions:  X &lt;- ts(datas, frequency=24) X.arima &lt;- Arima(X, order=c(2,1,0), seasonal=c(1,1,1)) pred &lt;- predict(X.arima, n.ahead=24) plot.ts(pred$pred)   As you can see I've data each hour, and I chose the seasonal period of 24 (one day).  I would like to improve my forecasting using an additional seasonal period in order to include the seasonal component of the week (seasonal length of 7*24=168 data)  Is there any method for this? How do you do it?  UPDATE: I've read  (your) blog page, maybe can I use the external regressors to simulate a second seasonal period? Where are the corrosive weapons at? I'm a Siren and I'm getting almost nothing but Fire elemental guns; about 90% of guns have been fire, most of the rest Explosive and a scare few Shock.  Are the elemental varieties more common at different levels? I've seen zero corrosive/shock guns so far. I'm level 12 at the moment. How to Connect & Share your Internet Connection (Wired & Wireless) I have Ubuntu 12.04 on a HP 430 notebook and this has a single wired internet connection and I would like to share this with a LG Optimus One with Android 2.3.3. I followed  instructions and created a hotspot as shown below, but UbuntuHost is not visible on the LG Optimus One when I enable the Wifi on it.  To summarize, I want my Laptop with an internet connection to act as a WiFi router and access the internet from other devices (LG Optimus One with Android in this case).  What additional steps have to be done? I'm doing a masters course at a different university than I did my undergrad (both in maths). I did well in my undergrad but now I'm finding it very difficult. The shock of the change is hard to cope with.  I'm not just finding it very difficult, but I get zero feedback: we don't have any tests and I was not able to make friends so I don't know how others are finding it. I'm starting to think that I might be an idiot.   How can I build some confidence in my abilities at the same time as I rush and struggle to keep up with the massive rate of new material I need to learn? How might I get myself some reassurance that I can actually pass, or stop worrying about this so much? (I feel terribly guilty using so much money from my family to be here) It's possible that I don't really have a chance at all but knowing that would be fine. Is it normal for DC wall adapter power supplies to provide voltages above the nominal ones? When I measure a 9V DC wall adapter power supply with a multimeter it shows 11.8V. When connected to my board this voltage lowers to 10V. Is this normal? Should I be afraid of toasting my  supplied board when using this adapter?  Edit: This regulator accepts up to 12V inputs. So that will be no problem. A second "9V" adapter yields 15V to the multimeter. Will this one burn my circuit? Tufte advocates to "minimize the ink-to-data ratio" for charts. I am trying to style a multi data series bar chart, that can have a grid and axes as shown below (chart at the left is from the Economist and on the right my attempt).      Here is the code:  \documentclass[justified]{tufte-book} \usepackage{pgfplots,lipsum} \pgfplotsset{compat=newest} \begin{document} \section{Bar Charts}  \lipsum[1-2]\vfill   \begin{figure*}[htbp]   \fbox{  \begin{tikzpicture}   \centering   \begin{axis}[         ybar,           title={Cumulative Progress of Works},         height=8cm,         width=15.5cm,         bar width=0.4cm,         ymajorgrids, tick align=inside,         enlarge  y limits={value=.2,auto}, % see the upper          ymin=0,         ymax=100,         axis x line=bottom,          axis y line=right,         %enlarge x limits =e,         legend style={at={(0.5,-0.2)},         anchor=north,legend columns=-1},         ylabel={Percentage (\%)},         symbolic x coords={            Sep-11,Oct-11,Nov-11,Dec-11,            Jan-12,Feb-12,            Mar-12,           Apr-12},        xtick=data,        nodes near coords,        every node near coord/.append style={         anchor=mid west,         rotate=70       }     ]     \addplot coordinates {       (Sep-11,75.4064)       (Oct-11, 72.7961)        (Nov-11,94.4597)       (Dec-11,66.6786)        (Jan-12,67.5600)        (Feb-12,88.2339)       (Mar-12,78.6138)        (Apr-12,58.9129) };    \addplot coordinates {       (Sep-11,75.4064)       (Oct-11, 89.7961)        (Nov-11,94.4597)       (Dec-11,76.6786)        (Jan-12,77.5600)        (Feb-12,78.2339)       (Mar-12,88.6138)        (Apr-12,78.9129) };    \addplot coordinates {       (Sep-11,75.4064)       (Oct-11, 89.7961)        (Nov-11,94.4597)       (Dec-11,76.6786)        (Jan-12,77.5600)        (Feb-12,78.2339)       (Mar-12,88.6138)        (Apr-12,78.9129) };      \legend{First Fix,Second Fix,Third Fix}   \end{axis}   \end{tikzpicture} }  \caption{\protect\raggedright Cumulative progress for all MEP works. Notice the slower rate of production during the last three months.} \end{figure*}  \lipsum[1-3] \end{document}   I have moved the y-axis to the right, but cannot get rid of the axis line. The plot is also not fitting within the plot width, despite using \enlarge.   Edit  And thanks to Jake the ugly duckling has been transformed to the following, with minor variations to the code as suggested by Jake. I have only added a stronger color for one of the bars in order to highlight it: I used a  for Photoshop, and was able to create some boxes with it. These boxes were shaped in the form of Software Boxes, while I require Customized Dimensions Boxes, which currently I'm trying to create with .   This software creates a box with no Reflection, and I disabled shadows in it, cause it doesn't allow transparency while saving to png. It allows custom dimensions, rotation, etc settings, but doesn't save transparency or reflections.  Here's the difference in output from both the above mentioned apps.. I'm trying to get the reflection + shadow in the 3D box Generator to the Protomissume generated image.   My question: How can I create similar Reflection &amp; Shadow in Photoshop?   Images:  3D Box Generator   Protomissume Box Shot   Thanks for any help.  Here are the Box Shot images (Photoshop, Protomissume) :  [  ] How should I phrase a question that must be answered with an ordinal number (e.g., the third prime)? "A number of students" vs. "the number of students" Possible Duplicate:          From the grammatical view both are correct, but please explain the difference in meaning:   The number of students in the class is fifteen. A number of students were late for class.