convert eregi to php 5.3
How can I convert ereg expressions to preg in PHP?
proving that $f(x) = x^s$ is holder continuous with holder exponent s We know $$i^2=-1 $$then why does this happen? $$ i^2 = \sqrt{-1}\times\sqrt{-1} $$ $$ =\sqrt{-1\times-1} $$ $$ =\sqrt{1} $$ $$ = 1 $$  EDIT: I see this has been dealt with before but at least with  I'm not making the fundamental mistake of assuming an incorrect definition of $i^2$. Let $f(z)$ be entire function. Show that if $f(z)$ is real when $|z| = 1$, then $f(z)$ must be a constant function using Maximum Modulus theorem Let $f(z)$ be entire function. Consider the functions $e^{if(z)}$ and $e^{−if(z)}$ and applying the Maximum Modulus Theorem, show that if $f(z)$ is real when $|z| = 1$, then $f(z)$ must be a constant function.  (We take $f(z)=u(z)+iv(z)$)  I am confused as so far I have $|g(z)|=|e^{if(z)}|=|e^{-v(z)}|$ and then since $f(z)$ is real, $f(z)=u(z)$ and $v(z)=0$ so I assumed it would follow that $|g(z)|=|e^{v(z)}|=1$.  Similarly, $|g(z)|=|e^{-if(z)}|=|e^{v(z)}|=1$.  Using Liouville I assumed one could say that both $g(z)$ and $h(z)$ are bounded entire functions, they are constant and so it follows that $v(z)$ is constant, meaning that both its partial derivatives are equal to 0 and, due to Cauchy Riemann, both of the partial derivatives of $u(z)$ are equal to zero.  It would then follow that $f(z)$ is constant.  I don't know how to go about the question using the Maximum Modulus Theorem, also I feel I am overlooking the importance of $|z|=1$ perhaps?  Any help would be much appreciated!! Many of the people have asked almost the same question.  I'm trying to render a big mesh + fur/grass file with a few characters on the screen.  when I hit render, after a number of processing, copying data to gpu etc... i get following error.  Mem: 2960.07M, Peak:2960.07M | CUDA error: Out of memory in cuMemAlloc(&amp;device_pointer, size).  I'm using Geforce GTX 690 which contains 4GB memory.   Can somebody tell me how can i get GPU rendering, while 2960M is far less then 4196M of memory.   I know somebody would suggest me to use CPU.. but i'm curios why not GPU?   I've already compressed texture, etc   Edited  I don't think any other application is using any of my 1GB remaining memory. everything is closed but blender is there, also the GPU utilities are showing 2000/2000 MB are free on one card and 1900/2000MB is free on 2nd card.    i'm using GTX 690. with two GPUs of 2GB each. If somebody thinks that one GPU should have memory matching to the cuda memory/or Peak memory then I'm doubtful. Because in preferences Blender does know that I have 2GPUs where I can select either first GPU or second GPU or even both.   When I render some of smaller objects/scenes both of my GPU renders simultaneously with two blocks.  I'm running following specs  Xeon E5-1660 0 24GB - 1600mhz GTX690 Raster calculator reclass 0 as 0 QGIS I want to process a raster with values 0-16. I want to set all values between 1 and 15 as 1, a value of 16 as 0 and cells with a value of 0 as 0.   How do I maintain a cell value of 0?  I have tried the following:  ("raster_name@1" !=0 AND "raster_name@1" &lt;= 15*1)+("raster_name@1" = 16*0)   Results in: Values of 16 as 0, values 1-15 as 1, values 0 also = 1  I also tried:  ("raster_name@1" !=0 AND "raster_name@1" &lt;= 15*1)+("raster_name@1" 16*0)+("raster_name@1" = 0*0)   Results in: Values of 16 as 0, values 1-15 as 1, values 0 = 2  Please, can you explain how to retain cells with a 0 value as 0? persist port routing from 80 to 8080 I use amazon EC2 instance which works via ubuntu. By default according security restrictions I can't bin my application to port 80, so I just bind it port 8080 and then set routing redirect from port 80 to 8080 via the following command:  iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 8080   But I found that when I reboot the server this settings no longer active untill I invoke this command again.  So my question is how to enable port's redirect work even if system was rebooted? Get and Set Screen Resolution What happens, if a rocket is filled with a vacuum instead of high pressured air? Suppose you put wheels under a compressed air tank    so that it can move horizontally to the right and to the left. Suppose there is a nozzle on the right hand side of the tank (in the picture on the backside, if you like).  If the tank is filled with high pressured air and you open the nozzle, the tank will move to the left. This is how rockets work and one can easily imagine that.   What happens when the tank is filled with a vacuum and you open the nozzle?  My first impression was, that the tank is moving to the right but someone told me, that it would be stand still. Is this true? What is an intuitive explanation for that? This question arises when I try to describe my itinerary to ticket service in the UK. Take for example, I plan to buy a ticket from A to B. B is the terminal. How to say its counter part A? I cannot find a proper term. I have to say "I will depart from A" or "I plan to go to B from A". Or I even use "departure place" to refer to B. putExtra treeMap returns HashMap cannot be cast to TreeMap android Is there anything in the physics that enforces the wave function to be $C^2$? Are weak solutions to the Schroedinger equation physical? I am reading the beginning chapters of Griffiths and he doesn't mention anything. Why does Math.Floor(Double) return a value of type Double? Google Cloud frequently doesn't have enough resources Is "education" a count noun? When writing custom classes it is often important to allow equivalence by means of the == and != operators. In Python, this is made possible by implementing the __eq__ and __ne__ special methods, respectively. The easiest way I've found to do this is the following method:  class Foo:     def __init__(self, item):         self.item = item      def __eq__(self, other):         if isinstance(other, self.__class__):             return self.__dict__ == other.__dict__         else:             return False      def __ne__(self, other):         return not self.__eq__(other)   Do you know of more elegant means of doing this? Do you know of any particular disadvantages to using the above method of comparing __dict__s?  Note: A bit of clarification--when __eq__ and __ne__ are undefined, you'll find this behavior:  &gt;&gt;&gt; a = Foo(1) &gt;&gt;&gt; b = Foo(1) &gt;&gt;&gt; a is b False &gt;&gt;&gt; a == b False   That is, a == b evaluates to False because it really runs a is b, a test of identity (i.e., "Is a the same object as b?").  When __eq__ and __ne__ are defined, you'll find this behavior (which is the one we're after):  &gt;&gt;&gt; a = Foo(1) &gt;&gt;&gt; b = Foo(1) &gt;&gt;&gt; a is b False &gt;&gt;&gt; a == b True Change desktop background to a solid color (e.g. pitch black) in GNOME 3 I just installed Ubuntu 16.04 with GNOME and I would like to set the background color to black. If I right click in the background I can select a wallpaper or a photo or a color. But there are only a few colors available. How can I open a palette and select the #000000 color ? I'm searching how to remove the chapter+section number on the theorem numbering with a section counter.  With no section counter it's like:  \newtheorem{thm}{Title} Chapter1 ----Section 1 --------thm 1 --------thm 2 ----Section 2 --------thm 3 --------thm 4 Chapter2 ----Section 1 --------thm 5 --------thm 6 ----Section 2 --------thm 7 --------thm 8   And with the section counter:  \newtheorem{thm}{Title}[section] Chapter 1 ----Section 1 --------thm 1.1.1 --------thm 1.1.2 ----Section 2 --------thm 1.2.1 --------thm 1.2.2 Chapter 2 ----Section 1 --------thm 2.1.1 --------thm 2.1.2 ----Section 2 --------thm 2.2.1 --------thm 2.2.2   And I want numbering my theorems like this:  \newtheorem???????? Chapter 1 ----Section 1 --------thm 1 --------thm 2 ----Section 2 --------thm 1 --------thm 2 Chapter 2 ----Section 1 --------thm 1 --------thm 2 ----Section 2 --------thm 1 --------thm 2   I know it's always a pain to remove such things, thanks for whoever will help me ^^ What's the process to change a site logo? Who is responsible for defining a site logo? I mean, there are moderators of the site that define it, or stackexchange defines it? My very simple Greasemonkey script is not running? I have 2 quartz crystal resonators in my pcb board: 32.768 kHz &amp; 20 MHz. They are connected to a Freescale MC12311 transceiver IC, which has an HCS08 micro-controller embedded in it. I want to test if these crystals are working properly or not.  Available tools: Oscilloscope, Frequency-Meter (Digital Counter), Digital Multimeter.  How should I use these tools to test the crystals in board?   Note: The capacitive load-effect of probes should probably be considered. If not, the measurement would not be accurate, or even worse, the crystals would not work at all.     Edit1: I used both the oscilloscope and the frequency-meter (with x10 probes), but unfortunately there was nothing monitored at all.