how to call functions based on numbers
How to assign a function in Lua for a randomly generated numbers
I've a set of regions within a city. I'd like to split each region into five subregions and then get the centroid of each one of them.  I know how to make a vector grid, but the problem I have is that the generated points are not taking into account the regions, they're only related to the general map.  I have this:    And I want to split each region in five equal size areas. Something like this:    I'd like to build a visualization similar to this one: . In order to accomplish that, I need to split each region, because the original ones are pretty big. Google calendar sharing I am a Google Apps administrator in the process of transferring a multitude of secondary calendars from a previous Google account. So following advice from  I did the following:  Old Account   Download calendar and save as ICS   New Administor Account   Create new calendar Select "Share Calendar With Others", "Share calendar with everyone in the organization - see all event details"    However nobody in the organization can see the new calendar under "Other Calendars" nor do they get any form of notification.   It seems everyone in the organization has to now somehow add this calendar(s) via "Add a colleague's calendar" OR I have to add each user's new Google account. This is turning into an administrative nightmare.  The behavior I want is:   Maintain a list of calendars that everyone in the organization has access to By default all users in organization have "See All Event Details" access. Certain organization users have "Make Changes To Events" and Apps Administrators have "Make Changes AND Sharing" As users are added/removed to the Google Apps domain the access to these calendars are automatically granted/revoked ie. Organization users should not have to do anything to get access to the list of calendars.   I am sure there is a simple solution to this that I am missing, so if someone can point me in the right direction I would appreciate it. Cannot find hard drives after installing Ubuntu 13.10 How to install Skype 4.3? This is a homework problem and I'm having trouble just getting a basic understanding.  I understand that $S_6$ is a symmetric group of degree $6$.  I'm not sure how to start looking for elements. SEO and URL Shorteners How to Identify Overfitting in Convolutional Neural network? I understand that dropout is used to reduce over fitting in the network. This is a generalization technique. In convolutional neural network how can I identify overfitting? One situation that I can think of is when I get training accuracy too high compared to testing or validation accuracy. In that case the model tries to overfit to the training samples and performs poorly to the testing samples. Is this the only way that indicates whether to apply dropout or should dropout be blindly added to the model hoping that it increases testing or validation accuracy Elements of order 2 in $D_{2n}$ Im new at this abstract algebra stuff and im not comfortable with the proofs techniques yet, so I have a question related to the elements of order $2$ in $D_{2n}$.  Problem:   Prove that $\{x\in D_{2n}|x^{2}=1\}$ is not a subgroup of $D_{2n}$ for $n\geq 3$.   By now, I know that all the elements of the form $sr^{k}$ has order $2$ because I tested by brute force haha, but my real question is how do I prove prove that. How do I have to proceed to prove that $sr^k$ has order 2.  Any help will be really appreciated, thanks so much &lt;3 Windows 7 System process reading/writing like crazy I have a problem that my windows 7 computer sometimes starts accessing the disk like crazy for maybe 10 minutes at a time. The process in question is the "system" process. I have disabled superfetch and hibernation on my computer, if that makes any difference. I disabled those to see if they were the cause of the problems, but no change. I have 6 GB of RAM and only the web browser was started when I took the screenshot, so I don't think it was thrashing due to page faults.  Any ideas on how to find the cause of this? Problem to launch java at Debian: "error while loading shared libraries: libjli.so" I want wp_link_pages (mutli-page posts) to display the page numbers, the word "previous" before those numbers, and a "next" after those numbers.  It would look like this:  Prev 1, 2, 3, 4 Next  I'm attempting to do this without a plugin.  Here's what I've tried so far, but it isn't working, it is only displaying numbers.  &lt;?php wp_link_pages(array(     'before' =&gt; '&lt;span style="clear:both; display:block"&gt;Pages',      'after'  =&gt; '&lt;/span&gt;',     'next_or_number'=&gt;'number',     'previouspagelink' =&gt; 'previous',     'nextpagelink'=&gt; 'Next' )); ?&gt; I am having trouble understanding the estimation of an AR process. In some textbooks, the AR(1) process is defined as follows: $y_{t}=\theta y_{t-1}+ϵ_t$ (which does not contain a constant). So the OLS estimator is biased. I am confused about the cause of the bias. It is explained that $y_{t-1}$ is dependent on $ϵ_{t-1}$ although it is independent of $ϵ_t$. However in linear regression, if the equation does not contain a constant, we cannot make sure the expectation of disturbance is zero. So the OLS estimator is bias without a constant. Does it mean that the OLS estimator is unbiased if I add a constant in AR process? Firstly, this is a homework problem so please do not just give an answer away. Hints and suggestions are really all I'm looking for.  I must prove the following using mathematical induction:     For all $n\in\mathbb{Z^+}$, $1+2+2^2+2^3+\cdots+2^n=2^{n+1}-1$.   This is what I have in my proof so far:     Proof: Let $p\left(n\right)$ be $\sum_{j=0}^n 2^j=1+2+2^2+\cdots+2^n=2^{n+1}-1$. Then $P\left(0\right)$ is    \begin{align} \sum\limits_{j=0}^0 2^j=1=2^1-1.\tag{1} \end{align} Hence    $P\left(0\right)$ is true. Next, for some $k\in\mathbb{Z^+}$, assume    $P\left(k\right)$ is true. Then \begin{align}  \sum\limits_{j=0}^{k+1}2^j&amp;=\left(\sum\limits_{j=0}^k  2^j\right)+2^{k+1}\tag{2}\\ &amp;=2^{k+1}-1+2^{k+1}\tag{3} \\ &amp;=2\cdot 2^{k+1}-1\tag{4}\\ &amp;=2^{k+2}-1\tag{5}\\ &amp;=2^{\left(k+1\right)+1}-1.\tag{6} \end{align}   Therefore, $P\left(n\right)$ holds for all $n$.$\;\;\;\;\blacksquare$   Is everything right? My professor went over the methodology in class quite fast (and I had a bit too much coffee that night) and I want to make sure I have it down for tomorrow night's exam. I would like to scale an image file for each dimension differently for example 50% of the x dimension or 25% of the y dimension. Thank you very much. If every prime ideal is maximal, what can we say about the ring? Suppose $R$ is a ring and every prime ideal of $R$ is also a maximal ideal of $R$. Then what can we say about the ring $R$? Sending & Receiving SMS via WiFi Is there a way to send and receive SMS when a cellular signal is not available, but WiFi is?  I'm often on-site at locations where the building has a strong WiFi (Internet) connection, but a simple cell signal is spotty at best. Contact from wizpert.com via stackoverflow? Well today as I was going home I got a strange email, in my private inbox (email associated with S.O.) asking me if I had solved a question on S.O. that I didn't ask. To be more precise I had given an answer.   After reading:       and several other email related issues on S.O. I decided to let you all know about this because probably I am not the only one.   So the mail subject was:     Re: Deleted facebook account - Cannot access my apps?   which refers to   And the body (masked last name of sender):      Hi Jimmy,      Just wondering if you ever got this question answered.  If not, maybe   a brief chat with a html wizpert could help: link   .      Good luck getting this resolved!      Cheers,      Michael      ------------------------- Michael W%^%^GF Founder, CEO @ Wizpert   Now I know that my email address is not visible and I read about the MD5 regarding gravatar but I don't think this is the case. I thought about some methods and sure it's possible via metadata, github, etc for someone to get my mail, but I do not dare to think that this has reached an automated level, so that some service could easily get the email of S.O. members.   I didn't get annoyed by the message, since the CEO took the time to contact me :-p but someone else could get annoyed by these kinds of messages, since they come in the important inbox of gmail.   What is more strange is that Wizpert seems to be a nice site and also is active in the Careers 2.0 if I am not mistaken.   Another thing that crossed my mind is that since Wizpert needs unanswered questions to promote their services, possibly this is an action of Wizpert trying to attract people into their services.   Well that's it, I hope I did good to let you know (maybe I did't include the correct tags). When using vagrant Stderr: VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX) I am trying to install open edx with  ubunty 16.04 and I get this error  There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.  Command: ["startvm", "c60f0594-d584-4e0b-b863-2801168e641e", "--type", "headless"]  Stderr: VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole   this occurs when using vagrant up Recommended way to initialize srand? I need a 'good' way to initialize the pseudo-random number generator in C++. I've found  that states:     In order to generate random-like   numbers, srand is usually initialized   to some distinctive value, like those   related with the execution time. For   example, the value returned by the   function time (declared in header   ctime) is different each second, which   is distinctive enough for most   randoming needs.   Unixtime isn't distinctive enough for my application. What's a better way to initialize this? Bonus points if it's portable, but the code will primarily be running on Linux hosts.  I was thinking of doing some pid/unixtime math to get an int, or possibly reading data from /dev/urandom.  Thanks!  EDIT  Yes, I am actually starting my application multiple times a second and I've run into collisions. How do I parse an ISO 8601-formatted date?