Find small char array in large char array C#
Find the first occurrence/starting index of the sub-array in C#
Can a Raspberry Pi run Ubuntu? I was thinking about buying a , and running Ubuntu on it. I have looked around the web, and a lot of stuff says that it's difficult for it to work on ARM processors. Has anyone figured out how to get a Raspberry pi to run Ubuntu? Smallest possible triangle to contain a square I was looking at * and started thinking about the case of a polygon with 4 sides: a square.   The question asks for a program that can take a polygon of N sides and return the smallest possible polygon of N-1 sides that contains the original polygon.  Thinking about it, I wasn't sure what the optimal triangle encapsulating a square would look like. In KSab's answers, he returns a triangle that looks like this:    This area is 2*(area of the square). With some easy guess-and-check work I found that this seems to be optimized. How do you prove that there is no better solution?  EDIT: another consideration for the orientation of the triangle could be this: In how many different ways can you split $10$ people into two groups of $5$ people? In how many different ways can you split $10$ people into two groups with the same amount of people?  My attempt: Since the order in which you choose someone doesn't matter, I chose to calculate the combinations: $10 \choose 5$ I am having a problem with permissions on a Linux server. I am used to BSD. When a directory is owned by a group the user who owns it isn't in such as www-data, files created in it will be owned by that group. This is important because I want files to be readable by the webserver (which I will not run as root) but so a user can still put new files in the directory. I can't put the users in www-data because then they can read every other users websites.   I want the webserver to read all websites, I want users to be able to change their own.  The permissions are set like this on the folders at the moment....  drwxr-x--- 3 john www-data 4096 Feb 17 21:27 john   It is standard behavior on BSD for permissions to work this way. How do I get Linux to do this? Lesser-known integration tricks I am currently studying for the GRE math subject test, which heavily tests calculus. I've reviewed most of the basic calculus techniques (integration by parts, trig substitutions, etc.) I am now looking for a list or reference for some lesser-known tricks or clever substitutions that are useful in integration. For example, I learned of this trick   $$\int_a^b f(x) \, dx = \int_a^b f(a + b -x) \, dx$$  in the question    I am especially interested in tricks that can be used without an excessive amount of computation, as I believe (or hope?) that these will be what  is useful for the GRE. Minecraft pocket edition restoring skin problem I updated Minecraft PE so I can have custom skins. I clicked on 'restore skins' without selecting any particular skin, It is now stuck with a  message saying 'we're restoring your skins!' but it has been like that for 20 minutes. Is there a reason why it is like this? How does the telepathy supernatural ability work? According to the MM books, telepathy is described as:     A creature with this ability (supernatural) can communicate telepathically with any other creature within a certain range (specified in the creature's entry, usually 100 feet) that has a language. It is possible to address multiple creatures at once telepathically, although maintaining a telepathic conversation with more than one creature at a time is just as difficult as simultaneously speaking and listening to multiple people at the same time.   Source: MM, MM3   My questions:   If a creature with telepathy knows that someone is within 100ft, can the creature communicate with that person, even if there is no line of effect or sight?  My answer would be yes, because no book says that telepathy is blocked by walls, etc. Normally, a supernatural ability is a standard action to start. If the creature wanted to communicate for more than one round using telepathy, does the creature need to use up a standard action every round they are communicating or only in the first round?  My answer is only in the first round, since the description says that maintaining telepathy is hard as speaking and listening normally. If a person the creature is communicating with moves out of the 100ft range, and then moves back into the range. Does the telepathic link need to be established again?  My answer is yes, another standard action is needed to establish the telepathy between the two creatures.   I should add the telepathy is supernatural, and a character is looking at getting it from the Mindbender class (from Complete Arcane). And also get the Mindsight feat (Lords of Madness). I couldn't find anywhere to rule whether a supernatural ability should take a standard action every round it is on. What would happen if you used a dead person's hair in Polyjuice Potion? Polyjuice Potion is changing based on someone's current physical state. It shows tattoos (or lack of) and such from DH when Ron changed to Harry.     "I knew Ginny was lying about that tattoo,” said Ron, looking down at his bare chest.    What would happen if someone used hair of a dead person, taken from their body after death, and drank the potion? Would they die as well? proving that elements of a sequence are pairwise coprime For the sequence $a_n = 6^{2^n} + 1$:   How can I prove that the elements of this sequence are pairwise coprime, i.e. prove that if $m$ is not equal to $n$ then $\gcd(a_m, a_n) = 1$. (begin by proving that $a_n∣ (a_{n+1} - 2)$) I used to use a lot ctrl+alt+numpad to move windows, how can I use this feature on ubuntu 18 like it was default before?  Thank you in advance How to render a 30K image with cycles? I have to render an image of 27000 x 7000 for a 150dpi print. The scene is quite big, but cycles preview and a render in 2700x7000 works as expected.  If I hit render my memory raises up to 20gb, but my cpu usage is at 5%. Why cycles does not using the full cpu power during the render process?  Here are my rendersettings:  Pathtracing Samples:3000 Tilesize: 64x64 Bounces: Max 12 | Min 3 Diffuse: 4 Glossy: 4 Transmission: 12 Volume: 1   Is there a way to optimize things? Wine or virtual machine (VirtualBox) to run apps (eg. Photoshop) I am wondering if it will be better (stability, convenience and speed) to run apps like Photoshop with Wine or a virtual machine like VirtualBox? ZF: Difference between POW and SEP? I am using Eclipse 3.3 ("Europa"). Periodically, Eclipse takes an inordinately long time (perhaps forever) to start up. The only thing I can see in the Eclipse log is:       !ENTRY org.eclipse.core.resources 2 10035 2008-10-16 09:47:34.801     !MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.   Googling reveals  that I remove the folder:  workspace\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes   This does not appear to have helped.  Short of starting with a new workspace (something which I am not keen to do, as it takes me hours to set up all my projects again properly), is there a way to make Eclipse start up properly? In the final episode of season 6 we see that Lyanna Stark is whispering something to Ned. What is she saying? A beginner's guide to SQL database design Do you know a good source to learn how to design SQL solutions?  Beyond the basic language syntax, I'm looking for something to help me understand:   What tables to build and how to link them How to design for different scales (small client APP to a huge distributed website) How to write effective / efficient  / elegant SQL queries Roots of polynomials in field of prime characteristic p Let $F$ be a field of characteristic $p$, and let $\alpha \in F$. Let $f \in \mathbb{Z}_p[x]$ be such that $f(\alpha) = 0$. Apparently, we have $f(\alpha^p) = 0$. This was mentioned but not proved in my lectures. Can someone explain why please?  Thanks. What control type should I use - Image, MediaElement, etc.? I'm trying to solve    So far I've done the first part, evaluating the summation ;  where a is just n. I'm not sure where to go from here or what it even means deduce the second summation. I understand that the summation of simply $$\sum\limits_{k=0}^n\cos(kx)$$ is derived from looking at the real part of  $$\sum_{k=0}^n{\rm e}^{ikx} $$I'm guessing they want me to see how the second summation in the question is defined by 'playing around' with the original? Do I need to activate the firewall? I only use Ubuntu for a home desktop use? I am a novice at Ubuntu (12.04).  I have it on my netbook which I use mainly for surfing the net, learning python and remote desktop into my work computer.    Do I need to enable a Firewall type software?  If so, what would you suggest, and what are sensible default suggestions?