C program - causes crash with Pointer
Why do I get a segmentation fault when writing to a "char *s" initialized with a string literal, but not "char s[]"?
Maximum number of files in one ext3 directory while still getting acceptable performance? I have an application writing to an ext3 directory which over time has grown to roughly three million files. Needless to say, reading the file listing of this directory is unbearably slow.  I don't blame ext3. The proper solution would have been to let the application code write to sub-directories such as ./a/b/c/abc.ext rather than using only ./abc.ext.  I'm changing to such a sub-directory structure and my question is simply: roughly how many files should I expect to store in one ext3 directory while still getting acceptable performance? What's your experience?  Or in other words; assuming that I need to store three million files in the structure, how many levels deep should the ./a/b/c/abc.ext structure be?  Obviously this is a question that cannot be answered exactly, but I'm looking for a ball park estimate. This is a small exercise that I just can't seem to figure out. When I see it I'll probably go 'ahhh!', but so far I haven't made any progress.  I'd like to prove that any linear functional $\phi$ on $\ell^\infty$ that is positive, i.e. for any $(x_n) \in \ell^\infty$ such that $x_n \geq 0$ for all $n \in \mathbb{N}$ we have $\phi((x_n)) \geq 0$, is a bounded linear operator and has $\|\phi \| = \phi((1,1,...))$.  Nothing I have tried worked so far, so any hints would be appreciated, thanks! I have an Asus UL30JT. It has Nvidia Optimus technology which I am not really interested in. I currently rarely use this laptop with it being connected to power. And I want to be able to play video at high res, play games and do some OpenCL coding.  In the BIOS I switched it to NVIDIA only (non windows 7). Previously, this worked just fine, using the nvidia driver.  After upgrading everything was broken. I have added nomodeset and blacklist.nouveau=1 as kernel options. The nvidia drivers install without error. However they are not found/used.  jockey-text -l kmod:nvidia_310_updates - nvidia_310_updates (Proprietary, Enabled, Not in use) kmod:nvidia_304_updates - NVIDIA binary Xorg driver, kernel module and VDPAU library (Proprietary, Disabled, Not in use) kmod:nvidia_313_updates - NVIDIA binary Xorg driver, kernel module and VDPAU library (Proprietary, Disabled, Not in use) kmod:nvidia_310 - NVIDIA binary Xorg driver, kernel module and VDPAU library (Proprietary, Disabled, Not in use) kmod:nvidia_304 - NVIDIA binary Xorg driver, kernel module and VDPAU library (Proprietary, Disabled, Not in use)   Trying to load the module manually fails as well.  sudo modprobe nvidia FATAL: Module nvidia not found.   Xorg.0.log show the following:  [    12.028] Loading extension GLX [    12.028] (II) LoadModule: "nvidia" [    12.037] (WW) Warning, couldn't open module nvidia [    12.037] (II) UnloadModule: "nvidia" [    12.037] (II) Unloading nvidia [    12.037] (EE) Failed to load module "nvidia" (module does not exist, 0) [    12.037] (==) Matched nvidia as autoconfigured driver 0 [    12.037] (==) Matched nouveau as autoconfigured driver 1 [    12.037] (==) Matched vesa as autoconfigured driver 2 [    12.037] (==) Matched modesetting as autoconfigured driver 3 [    12.038] (==) Matched fbdev as autoconfigured driver 4 [    12.038] (==) Assigned the driver to the xf86ConfigLayout [    12.038] (II) LoadModule: "nvidia" [    12.038] (WW) Warning, couldn't open module nvidia [    12.038] (II) UnloadModule: "nvidia" [    12.038] (II) Unloading nvidia [    12.038] (EE) Failed to load module "nvidia" (module does not exist, 0) [    12.038] (II) LoadModule: "nouveau" [    12.039] (WW) Warning, couldn't open module nouveau   I have installed the kernel headers, of the correct kernel. I verified that the kernel options are in the grub configuration. I have purged all nvidia packages and tried to reinstall (multiple times...)  Currently I am at a loss. I have checked the following question:  But nothing there worked for me. Gosper's unusual formula connecting $e$ and $\pi$ Set active image node with python There's any way to change it directly by Python, or there's any way to set by Python what node image is the active to display in viewport (Textured) and bake? Probably dumb question, but I would like to ask it anyway.  I was to solve this equation:  $z^4 = -16$  At first glance, the way to solve it would be (as any other equation):  $z^2 = \sqrt{-1} * 4 \lor z^2 = -\sqrt{-1} * 4$  $z^2 = 4i \lor z^2 = -4i$  $z = 2\sqrt{i} \lor z = -2\sqrt{i} \lor z = 2i\sqrt{i} \lor z = -2i\sqrt{i}$  However, in suggested answers, there are $z_1, z_2, z_3$ and $z_4$ found using trigonometric formulas. Is there something particulary wrong in my solution and the only proper one uses trigonometric form of complex number? When should I use "in" or "on"? As it is common with people from my country, I have an immense difficulty with prepositions in English, especially with the use of in and on.   When the preposition indicates the position of the object it is a bit easier to decide which one to use, but as it requires thinking from me, I still say things like "I put the bill in the fridge", "my pencil is on my bag", etc, even though if I think about it, I would know how to say it correctly.  Of course, even in those cases where the preposition indicates position the decision is not always clear, as is the case for example with "on the bus" (you are not on top of the bus, you are inside the bus) or "he is in bed" (you are not inside the bed, you are on top of your bed).  Other cases are even less clear, and I believe there is no real rule to decide what should be said; the person should just know it. Two examples are "in a bad mood", "you are on my mind".  So my first question is whether there is really no rule to help me. The second question refers to two of the cases where I still don't know whether to use in or on:   good luck on/in your exam in/on the list   The last one is especially important to me, as I have asked a number of native speakers, and each time I get a different answer. The only consensus seems to be the case where you say "on top of the list". Apart from that, some people will say that I should say "his name is in the list" whereas others think I should say "his name is on the list". And yeah, a couple of people did tell me that I can use either.  Can someone help me? Currently, moderators have the ability to reset a user's username and/or profile text, and propagate that to the rest of the network, resetting it everywhere. However, often, the user's stackexchange.com network profile will also need to be reset, and this is currently only possible to do by either the user in question or staff.  Instead of bothering staff every time, moderators should have something available similar to chat, where moderators can change a user's parent site and have access to a "refresh profile" button, which will fetch updated information such as username and avatar from the parent site.  Currently, the only thing that moderators can do on stackexchange.com is to see hidden accounts. It would make sense for moderators to be able to refresh profiles there, like chat, and avoid pinging CMs every time this comes up. What is the source for defaulting to plain English readings of non-game terms? Prove that if $(ab)^i = a^ib^i \forall a,b\in G$ for three consecutive integers $i$ then G is abelian I've been working on this problem listed in Herstein's Topics in Algebra (Chapter 2.3, problem 4):     If $G$ is a group such that $(ab)^i = a^ib^i$ for three consecutive integers $i$ for all $a, b\in G$, show that $G$ is abelian.   I managed to prove it, but I'm not very happy with my result (I think there's a neater way to prove this). Anyway, I'm just looking to see if there's a different approach to this.   My approach:  Let $j=i+1, k=i+2$ for some $i\in \mathbb{Z}$.  Then we have that $(ab)^i = a^ib^i$, $(ab)^j = a^jb^j$ and $(ab)^k = a^kb^k$.  If $(ab)^k = a^kb^k$, then $a^jb^jab =a^jab^jb$.   We cancel on the left and right and we have $b^ja = ab^j$, that is $b^iba = ab^j$.  Multiply both sides by $a^i$ on the left and we get $a^ib^iba = a^jb^j$, so $(ab)^iba = (ab)^j$. But that is $(ab)^iba = (ab)^iab$.   Cancelling on the left yields $ab=ba$, which holds for all $a,b \in G$, and therefore, $G$ is abelian.  Thanks! how to use common modulus attack? I am struck with the following problem:  Let Alice, Bob, Chris and Eve communicate over a public network. They encrypt all messages they send using RSA system. Bob and Chris have the RSA modulus $n_B$ and $n_C$ respectively with $n_B$ = $n_C$ But different public encryption exponents: $e_B \neq e_C$. Suppose $\gcd(e_B, e_C)=1$, and that Alice sends the same secret message to Bob and Chris. Show how Eve can decipher the message. What is the meaning of "this" in Java? Definition of the Pauli group and the Clifford group There seem to be two definitions of the Pauli group. In Nielsen and Chuang, the Pauli group on 1 qubit is defined as \begin{align*} \mathcal{P}_1 = \{\pm I, \pm iI, \pm X, \pm iX, \pm Y, \pm iY, \pm Z, \pm iZ\} = \langle X, Y, Z\rangle. \end{align*} But in other references, such as ,  \begin{align*} \mathcal{P}_1 = \{\pm I, \pm X, \pm iY, \pm Z\} = \langle X, Z\rangle. \end{align*} The second definition makes more sense in the stabilizer formalism, since we usually only consider the action of Pauli strings of $X$ and $Z$. What bothers me is that by the second definition, the phase gate $S$, which is an element of the Clifford group, results in \begin{align*} SXS^\dagger = Y \notin \mathcal{P}_1. \end{align*} I know that the prefactor $\pm i$ somehow doesn't matter, but can someone justify it from a more mathematical/group-theoretical perspective? Is there a benefit to using one over the other? In Python 2, they both seem to return the same results:  &gt;&gt;&gt; 6/3 2 &gt;&gt;&gt; 6//3 2 Why there's no article with 'Mexican' and 'an' with American in sentence: "She’s Mexican. But she’s married to an American."   (Pimsleur English course) Enable USB debugging (under settings/applications/development) programmatically from within an app Where do I get the key for the first house? How To: Execute command line in C#, get STD OUT results Give an example of a relation R on $A^2$ which is reflexive, symmetric, and not transitive So I have been extruding a cube to make a low poly banana and when I go from edit to object mode half the edges don't appear as well as half is dark.      I tried looking for an solution couldn't find one and its making me feel like I am doing something wrong so I decided to come here.