Which one is correct? Leaning towards first one but I am unsure because a more basic version would be "How good is it?"

I want to know which sentence is correct. If i say     Guess, what it is?   or     Guess, what is it?   which one is correct?


I want to display the received headers from the GET Request that I send,  PHP:  <?php $opts = array( 'http'=>array( 'method'=>"GET", 'header'=>"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0" )); $context = stream_context_create($opts); $url = "http://spys.me/proxy.txt"; // instead of file_get_contents $data = getallheaders($url, false, $context);  echo $data;

How should I read any header in PHP?  For example the custom header: X-Requested-With.


Alice and Belle are in combat, 30ft apart from each other.  Alice takes first turn, and readies an action; "If Belle comes within 25ft of me, I move my full speed directly away."  On Belle's turn, Belle says "I move 30ft right next to Alice."   states: "When the trigger occurs, you can either take your reaction right after the trigger finishes or ignore the trigger." Does this mean that Belle is able to move next to Alice before Alice is able to react?   states: "You can break up your movement on your turn, using some of your speed before and after your action." Does this mean that even if Belle moves in 5ft increments towards Alice, it is still one "move" and so Alice still cannot react before Belle is right next to them?

I realize there are a bunch of these questions about the ready action but I couldn't find one that answers what I have in mind.  I know by RAW the reaction happens after the trigger finishes but how does that work with movement?  1. What if I specify the distance that must be travelled for the reaction to occur?  For example, if the trigger is "when that creature has moved 10 feet" but the creature's movement that turn is to be 20 feet without any breaks - do I react at 10 feet or after the intended movement of 20 feet is completed?  2. What if the trigger was only specified as movement by an opponent?  For example, if the trigger is "when that creature moves" but the creature will move a total of 30 feet and plans to break for an attack in the middle of that movement, when do I react? Does the reaction occur after the first 15 feet but before the attack? Does it wait until the whole 30 feet movement is finished?  Even though I've used "I" as the player, I am asking as a DM. Is there something in RAW I'm missing or are there any designer comments on this by chance?


The problem appeard after i turned off ubuntu from the power off button of the computer ,I think there were some things going on . Now when i turn on my computer it starts but short after that i see a black screen with a white underscore blinking. I inserted a bootable usb with ubuntu , ended up partitioning de hard drives, installing the system and when i press ok on the message to restart the system so that the instalation be completed i  end up at the ssame white underscore blinking , doesn't goes any further .. When i try to enter bios by typing tab it seems like it's preparing some output is printed on the screen but it's stops and return to the black screen .I can acces my system if i enter the boot priory section and choose the drive that is ubuntu installed on .. I've tried to install it on another partition and i get this:Sorry an error occured and it was not possible to install the bootloader at the spcified location how would you like to proceed choose a different device to install the bootloader on , continue without bootloader ,exit

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


How can I allow only backspace and digits on a textbox ?  I've tried several solutions but none worked or they half-worked:  My code so far:  private void textBox1_TextChanged(object sender, EventArgs e) {     try     {         if (textBox1.Text != String.Empty)             textBox1.Clear();         else             value = Convert.ToInt32(textBox1.Text);//store the value from the textbox in variable "value"     }     catch (Exception e1)     {         MessageBox.Show(e1.Message);     } }   I would like a solution which is limitted only to private void textBox1_TextChanged()

I have a windows forms app with a textbox control that I want to only accept integer values. In the past I've done this kind of validation by overloading the KeyPress event and just removing characters which didn't fit the specification. I've looked at the MaskedTextBox control but I'd like a more general solution that could work with perhaps a regular expression, or depend on the values of other controls.  Ideally this would behave such that pressing a non numeric character would either produce no result or immediately provide the user with feedback about the invalid character.


I have looked and don't know where to find how to do this.  First, I think I found why I can't dual boot, With that said I don't want to have to reinstall my Work Win98 system I just want to delete the 2 non working Ubuntu installs. The first one, It looked like everything went well. But no dual boot. SO I removed all my other drives, Tried again. This creating a new install with the Idea that I would just mount and recover the other unused install. However both have failed and I would like to remove the 2 Partitions and 2 swap, delete them and recover the Drive space back to 98.   Anyone have any Ideas? Thank you. I know what I would need to do if I was going to install the 98 fresh. However It is installed all Patches and working well. I would hate to loose all that just to recover this space.  James

Help I want to remove my partitions everything apart from my windows 7 how can I do this ?


I'd like to install and test Landscape Dedicated Server (LDS) on my Ubuntu 14.04 LTS server but I don't know how to install it. The only guides I found on the Internet are for Landascape client.  As you've suggested me to see this guide     I've tried to add that ppa on Ubuntu 14.04Lts server but I received this error   "Cannot add PPA: 'ppa:landscape/14.10'. Please check that the PPA name or format is correct."   I think that ppa is not adapt for 14.04 and then I know that:   for <= 12.04 we have to use   $: sudo apt-get install python-software-properties  While for >= 12.10 the command is  $: sudo apt-get install software-properties-common

I'd like to manage my home machines and laptops with Landscape, how can I do this?


I am willing to try out ConTeXt after reading about its typographical capabilities and differences from more classical engines. I was wondering if there was good and recent resources to learn the specificities of ConTeXt for people like me who already know the basics of the TeXnique.  In the question , there is given a link to some very good manuals. However, after parsing them, it appears that they go pretty deep from the begining or go too much into details for someone who never used ConTeXt.  So, do you know of resources that could suit my needs? Let me know if I am wrong on the resources I already find.

Where would be a good place to start learning ConTeXt if you haven't got a lot of experience under your belt yet? Any place online or in a bookstore is welcome, provided that the reading is well-structured, well-written and beginner-friendly.  I know there is quite a heap of "official documentation", including "ConTeXt, an excursion", the official handbook and the contextgarden.net Wiki.   Still, often ConTeXt novices find it very difficult to get a good start with the documentation provided -- the command syntax seems to work sometimes, sometimes not; some commands work well with each other, others only in a specific order (which isn't documented anywhere) and some don't work with each other at all etc. The consequence is that there is a lot of experimenting with the code while the focus should be on the topic to be published itself.  This question would love to get RTFM answers, so please point out any Ms which should TF be R.


I am having a problem with Low disk space in Ubuntu 18.04. Using on terminal:   df -h:    sudo du -hs /*:    I want to take the partition on /dev/sdb4 and move to /dev/sdb5.    Actually I want to solve the problem of low space, I think this is how I can do it.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


So this computer is a few years old and a year ago installed Ubuntu Studio. I am not currently using this computer but me and my little brother want to play a game together. The problem is I can't install anything. This problem started a few years ago. The error message looks like this.  Please help me fix this problem I don't know what to do. The output of sudo apt update is:   [sudo] password for zachary:  *there was a bunch of errors here.* Reading package lists... Done E: The repository 'cdrom://Ubuntu-Studio 19.04 _Disco Dingo_ - Release amd64 (20190416) disco Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'cant add more than ten linksRelease' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'cant add more than ten links Release' no longer has a Release file N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'cant add more than ten links disco-updates Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'cant add more than ten links Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository cant add more than ten links does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   And the output for cat /etc/lsb-release is   DISTRIB_ID=Ubuntu DISTRIB_RELEASE=19.04 DISTRIB_CODENAME=disco DISTRIB_DESCRIPTION="Ubuntu 19.04"

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I want to solve the following:     Let $p$ be a prime number and let $a$ be a p-cycle in $S_p$, and let $b$ be a transposition in $S_p$. Show $S_p$ is generated by $a$ and $b$.   My attempt  Write $a=(y_1 \space y_2 \space ...\space y_p)$ and $b=(z_1 \space z_2)$. WLOG, $y_1=z_1=1$. WLOG, we can also assume $a=(1 \space 2 \space ... \space p).$   Let $σ\in S_p$. It should be obvious that $σ$ is a product of transpositions, so to show $σ \in S_p$, it suffices to show every transposition can be written in terms of $(1 \space 2 \space ... \space p)$ and $(1 \space z_2)$. But how do I show this?  Duplicate? I think not.  Although another question (already answered on math.SE) is similar to mine, I do not believe that mine is a duplicate. The other question is equivalent to mine only for the special case when $z_2=2$, but not for general $z_2$.

Show that $S_n$ is generated by the set $ \{ (12),(123\dots n) \} $.  I think I can see why this is true. My general plan is (1) to show that by applying various combinations of these two cycles you can get each transposition, and then (2) to show that each cycle is a product of transpositions.  I'm just having trouble on the first step. Any ideas?


What is ultimate goal of Skynet? It started WW3 to eliminate humans, so what will it do after the last humans die? It not like in Matrix, as Skynet has human-independent sources of power supply. So it really doesn’t need humans.

Is it stated in any expanded universe what Skynet's plans were after wiping out the Human race (assuming that was its plan)?  Maybe space travel to colonise different planets or something else entirely?


Why do I have these green checkmarks on my icons? I have refreshed my desktop and they are still there.

I was playing the solitaire they added back in Windows 10 and when I closed it I noticed there were these green checkmarks on my Desktop icons:    What are these green checkmarks on my desktop? How do I get rid of them?


My wife is from India and I am German. We both live in Germany and she has a German residence permit through our marriage. We both plan to visit UK. Does she need a visa to visit UK?

I am a Portuguese Passport Holder and and at present on visit to my relatives in Paris and my wife is holding Indian Passport and had traveled along with me to Paris on Schengen Visa which was valid for 20 days And now we are planning to visit our next relatives in UK but my wife's Schengen Visa expired. So need information how we can travel to UK. And can my wife apply for UK visa from Paris now?


So, I have just watched the first season of The Witcher on Netflix and I am hooked...   I know the series is based on books and video games, and while I probably won't play the games I definitely want to read the books.   What would be the best way to do that? Publication order? In-universe chronologically?

With the (relatively) recent release of the third game and the recommendation of a friend, I'd like to discover this universe.  I know there are several media; the books, the video games (though to be honest, I don't intend to play the first video game) and a TV series (also still unsure about that one), but I know almost nothing about how they intervene together storywise.  The books alone have me a little confused, given that the numbering of the edition I'm planning to buy (from the french editor Milady) doesn't seem to exactly match the original order of release:     Season of Storms (2013)   1. The Last Wish (1993)   2. Sword of Destiny (1992)   3. Blood of Elves (1994)   4. Time of Contempt (1995)   5. Baptism of Fire (1996)   6. The Swallow's Tower (1997)   7. Lady of the Lake (1999)   So, what is the best order, potentially mixing the various media, to discover the saga ?


I am trying to install GParted Live using Tuxboot as suggested  (Method A). When I go to install Tuxboot by following either of the 3 options suggested , I encounter either of the following problems: 1- When I install the binary executable files from SourceForge or OSDN, and go on to do the second step suggested  under "USB setup with GNU/Linux" I don't find the ./tuxboot-linux* file. Only the windows version. 2- If I do sudo apt-add-repository ppa:thomas.tsai/ubuntu-tuxboot then I get: Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease Hit:2 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease                                           Hit:3 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease                                         Hit:4 https://download.docker.com/linux/ubuntu focal InRelease                                              Ign:5 http://ppa.launchpad.net/thomas.tsai/ubuntu-tuxboot/ubuntu focal InRelease                            Hit:6 https://packages.microsoft.com/repos/vscode stable InRelease                                          Hit:7 http://security.ubuntu.com/ubuntu focal-security InRelease                    Err:8 http://ppa.launchpad.net/thomas.tsai/ubuntu-tuxboot/ubuntu focal Release        404  Not Found [IP: 2001:67c:1560:8008::15 80] Reading package lists... Done                                 E: The repository 'http://ppa.launchpad.net/thomas.tsai/ubuntu-tuxboot/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.  So then I searched for this error I found . I followed the instructions given by the accepted answer, and that didn't change anything. So I then found . I tried following the instructions of the answer with the highest number of votes, and when I open the Software Updater, I get Failed to download repository information. Not sure what to do now? PS: deleting the file thomas_tsai-ubuntu-ubuntu-tuxboot-focal.list from /etc/apt/sources.list.d solved the Software Updater issue, but I'm still at a loss as to how to go about the other points I brought up

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


I am trying to decode the string bellow:  st='arroz e feij\xc3o, bife ao molho de tomate, pts com quiabo\r\nSALADA: alface, r\xdacula, rabanete e cebola\r\nSOBREMESA: ma\xc7\xc3\r\nSUCO: Amarelo 3\r\n o card\xc1pio cont\xc9m gl\xdaten no p\xc3o. n\xc3o cont\xc9m ovos e lactose. traga sua caneca!'   Using:  st.decode(?)   But I don't now the correct codec.

I received some text that is encoded, but I don't know what charset was used. Is there a way to determine the encoding of a text file using Python?  deals with C#.


I am wondering if there is an easy way to make sure to get a list of all installed software on an Ubuntu server (both from source and from apt-get). This should hopefully include important data directories and cronjobs. The reason for this is that there needs to be an extra server holding the exact same software as the current machine (same cronjobs, website files, software, databases etc) but there is no documentation or list of what is installed and what is not. (This is a live-production server with always users being online, making a clone is not a feasible option due to the shear size (We are talking 1TB+ of data) and we need to get it documented somehow anyway what is installed and what is important)

I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system.  How would I do this?


Please see following image,   Both the reputation refer to exact same question. But I see 2 rows, instead of them grouped together. Is it a bug? or am I missing something?  Edit:  I saw it again and it got grouped. :| So, Is there a lag in grouping logic?

I have six upvotes for the one question with no intervening history. They have been summarised into two groups - one with 4 events and one with 2 events. However, when you expand either, both show all 6 events. Minor I know, just letting you know.


I tried using $\int_a^bf(x)dx=\int_a^bf(a+b-x)dx$ but it's giving back the same result. I tried using integration by parts but it's giving a very long answer.   Is there any simple way to do this?  Btw the answer to this question is $\log 2$.

Compute the definite integral   $$ \int_{0}^{1}\tan^{-1}(1-x+x^2)\,dx $$   Failed Attempt:  Let $1-x+x^2=t$. Then  $$ \begin{align} (2x-1)\,dx &= dt\\ dx &= \frac{1}{(2x-1)}dt \end{align} $$  Changing the limits of integration, we get  $$\int_{1}^{1}\tan^{-1}(t)\cdot \frac{1}{(2x-1)}dt = \int_{1}^{1}\tan^{-1}(t)\cdot f(t)dt = 0 $$  where $f(t)=\frac{1}{(2x-1)}$.  Is it true that $\int_{a}^{a}f(x)dx = 0$? If not, then where have I made a mistake in my attempted solution?


Is the following hypothesis true ?     If a simple neural network cannot overfit a single training sample, there is something wrong with its architecture or its implementation.   To give you more background on why I am asking this question, I am working on a single convolution layer that aims at segmenting the input image (classify every pixel of the image from either class 0 or class 1). The network does not manage to overfit a single training sample, so I suppose that there is something wrong with what I have done.  Edit: This is not a duplicate of . The post (which is very informative) suggest, among other things, to unit test the network to see if it is error-proof. Basically, I am asking a question on how to unit test my network. The hypothesis I stated is the one which I hold to run the unit test. If the hypothesis is wrong, the unit test I am making does not make any sense, thus the question.

I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:


I sold my old Mac but it still appears in the list of iCloud devices e.g. in Safari Tabs. Is there a way of deleting devices from the 'iCloud sync list'?

I returned a MacBook to Apple Store, however apparently I forgot to sign out of iCloud and the latest tabs I was browsing still appear in Safari iCloud Tabs of my new MacBook and existing iPad.  I removed the device from icloud.com -> Find My iPhone but it didn't work. Tabs list from my old computer is still there and I am trying to remove it from my devices list. I appreciate any ideas.


I've been running through a few tutorials for Java, they all say to make a new variable when calling classes. Why is this? I've tested some code and it works without doing this. I've been using python for quite a while now so I'm used to using a dynamic language.  Please see some code I've been playing around with below:  import java.util.Scanner;   class MyClass {      static String myName(String name) {         return ("Your name is: "+name);     }     static String myAge(Integer age){         return ("Your age is: "+age);     }     static String myGender(String gender){         return ("You are: "+gender);     } }  class Test{     public static void main(String [ ] args){         Scanner ui = new Scanner(System.in);          MyClass user = new MyClass();          //Output with new variable of class - user         String input = ui.next();         String newname = user.myName(input);         System.out.println(newname);          //Output calling class directly         Integer input1 = ui.nextInt();         String newage = MyClass.myAge(input1);         System.out.println(newage);          //Output with new variable of class - user         String input2 = ui.next();         String newgender = MyClass.myGender(input2);         System.out.println(newgender);      }  }   Thanks for your time.

To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object?


Hello I got this problem, if $p$ is prime then the polynomial: $$q(x)=1+x+x^2+...+x^{p-1} $$ is irreductible in $\mathbb{Q}[x]$. I don't know how to do this exactly. And a problem is that a condition to this question is that I can't use the Eisenstein Criterion, only the basic things about ring theory.  Thanks if you can help me with this.

Eisenstein's criterion says that for a prime $p$ if the following conditions are satisfied for a primitive polynomial, $f(x)$, then that polynomial is irreducible in $\mathbb{Z}[x]$  $p \mid a_0, a_0, ..., a_{n-1}$   $p \not\mid a_n$  $p^2 \not\mid a_0^2$  Now I am almost certain I read somewhere that this lemma can be used to prove that the polynomial $x^{p-1} + x^{p-2} + ... + x^2 + x + 1$ is irreducible.  All coefficients are $1$ though and we have have an awkward amount of terms, $p - 1$ terms as opposed to $p$ terms - so how can Eisenstein's criterion be applied here?


If I leave fully-cooked food (particularly meat) out at warm temperature - say on the counter or in a crock pot that's been turned off -  how long will it stay safe to eat?  Does it make any difference if I re-cook the food afterward?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


I would like to know about the use of breadcrumbs on mobile, is it a feasible practice today?

Wondering if anyone has thoughts on using breadcrumbs as a method of navigation on a mobile website (for a content site).   The breadcrumbs would show the heirarchy of the site as such:     Site > Category > Subcategory > Group > Item   My guess is that the breadcrumbs (if well-designed) would help the user quickly understand the site structure; at the same time, mobile users prefer large buttons and bars to links.   Is there a breadcrumb design that combines the best of breadcrumbs and buttons/bars/standard mobile UI components?


I am new to C#. I am not a good programmer but I have worked on some projects which were in Delphi7. In Delphi there is one option; compile the class files to create .dcu. Those .dcu can be used without having the actual code with any other project in Delphi and after build .dcu files need not no given to end user.  Now my actual Question,  Is there any way where I can create some compiled file from my C# class and use that compiled unit with some other project in C# ?  I already tried to create dll and use. Nice Idea, but I don't want to give any other file than Configuration File and Executable file. Since, I created dll that needs to give with application.  I also tried to create a setup of application which build executable, configuration file and dll together. while executing, it extract itself in %temp% folder and executes from there only. So, In this case I am not able to set the configuration file's values.  Again the same question,  Is there any way where I can create some compiled file from my C# class and use that compiled unit with some other project in C# ?    Please suggest the solution  Thanks

I am not too familiar with .NET desktop applications (using ). Is it possible to have the entire application run from a single .exe file?


By , I mean something that performs well. A piece of computer program code could be performant, meaning that enough thought went into it to make it perform well, making it an adjective; likewise, a merchant banker could be performant, meaning his performance record monetarily is in good stature.  A close cousin would be  (from ).  If you describe an athlete, you're allowed to say he's fast without having to compare to any competing athlete. In the same way, it should be possible to say a person is performant - whatever his field of endeavor.   Or, indeed, his or her works, without the person involved.  The works of an artist, writer, or musician might be , from . Isn't it a fact that some professions simply measure works by performance?  Twice removed from a person, a product could be performant in a market, meaning it performs well in sales, due to any reason, not exclusively its qualities.  It seems clear that  is not a complete synonym, although I would accede it for describing a piece of computer program code's performance.  Has it occurred in the English language, or are there existing words similar in meaning to what I described that I can use instead?

I keep getting the red underlining in Word whenever I write the word "performant". Here I intend to refer to something that performs well or better than something else (i.e., it's more performant).  Is there something wrong with that word? Does it mean what I actually want it to say?


I have a Panasonic Lumix DMC-FZ60. The problem is I don't really understand the workings of ISO, aperture, and shutter speed. Whenever I go into manual mode, the pictures I take are pitch black. I take the pic indoors with a moderate amount of light, but I don't know why the pics are black.  How do I use manual exposure settings?

I know digital cameras have ISO options, and that ISO is the camera's sensitivity to light, but if you set  higher ISO then you can get a noisy image. I also know there are two other camera options, shutter speed and aperture.   What is the relationship of between them? Is there any equation, or something like that?  For example, if I set the ISO to 640, then how should I set the shutter speed and aperture?


I want to plot a function containing a (converging) series. To plot this function I changed the series to a finite sum.  \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \begin{document}    \begin{tikzpicture}   \begin{axis}[            domain = 0:1,            samples = 501,            ]   \addplot+[mark = none] gnuplot[raw gnuplot] {%     set samples 501;     dist(x) =  x - floor(x) < 0.5 ? x - floor(x) : 1 - (x - floor(x));     plot[0:1] sum [k=0:5] (2^(-k) * dist(2^(2^k) * x))   };   \end{axis} \end{tikzpicture} \end{document}   If I do k=0:4, it works fine. But the example above I tried k=0:5 and although a plot is created this plot has nothing do to with my function.  If this question should not be asked on this stackexchange, please tell me where to open a new question.

I am using a plain-old tikzpicture to produce a pie-chart-like plot. Now, all other plots in my paper are handled using pgfplots (which doesn't do pie charts) and have their legend typeset by pgfplots.  It would thus be great if it were possible to create, re-using as many keys like /pgfplots/area legend as possible, to create a pgfplots-style legend in TiKZ. Has anyone done anything like this before?


What is the difference between Register and volatile? when to use which one? what is the meaning of volatile register variable?  register int a;  volatile int a;

Why is volatile needed in C? What is it used for? What will it do?


Consider the quotient ring $\mathbb{Z}[x]/(x^2-3, 2x+4)$.  Sometimes we can get identifications of rings like these with other more familiar rings if we first kill $x^2-3$ in the ring $\mathbb{Z}[x]$ and then kill $2x+4$ or vise versa.  The substitution homomorphism $\mathbb{Z}[x] \rightarrow \mathbb{Z}[-2]$ doesn't seem to be relevant since its ideal is $x + 2$ and not $2x+4$.  Working with $x^2 -3$ though I got that $\mathbb{Z}[x]/(x^2-3)\cong \mathbb{Z}[\sqrt{3}]$ and since the substitution homomorphism is surjective, we have that $\mathbb Z[x](x^2-3, 2x+4) \cong \mathbb{Z}[\sqrt{3}]/(2\sqrt{3} + 4)$, making use of the correspondence theorem.  But my use isn't good enough since I thought the identification would be a more familiar ring.

This problem is from a practice exam I was working on.     What is the cardinality of the quotient $\mathbb{Z}[x]/(x^2-3,2x+4)$ ?   Thoughts. If I find a ring that is easier to handle then this then I can go from there. So I think this is isomorphic to $\mathbb{Z}_2[x]/(x^2-3,x+2)$. And then I am stuck.  Am I correct so far? What should I be looking to do from here?  Thanks for your time and your answers.


I have a VM (VirtualBox) and its disk partitions are set up like this:  $ df -h  Filesystem      Size  Used Avail Use% Mounted on udev            979M     0  979M   0% /dev tmpfs           200M   24M  177M  12% /run /dev/sda1       7.8G  6.9G  445M  95% / tmpfs          1000M  216K 1000M   1% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs          1000M     0 1000M   0% /sys/fs/cgroup tmpfs           200M   52K  200M   1% /run/user/1000 /dev/sr0         58M   58M     0 100% /media/ldl/VBox_GAs_5.2.0   I used VBoxManage to resize the VM's .vdi file  VBoxManage modifyhd "/Users/sof/VirtualBox VMs/ubuntu14.04_01/ubuntu14.04_01.vdi" --resize 51200   and restarted the VM. Unfortunately this not work.  How do I resize the VM's drive?    EDIT-01  The guest OS is Ubuntu 14.04, and I want to extend its disk. but I don't know how to extend the partitions size.

In continuation to  I used the following commands in order to increase the space available in my virtual machine (Ubuntu):  VBoxManage.exe clonehd "c:\users\a_b\VirtualBox VMs\MyBox_default_1510839571239_2193\Box1.vmdk" "C:\Users\a_b\VirtualBox VMs\MyBox_default_1510839571239_2193\clone.vdi" --format vdi  VBoxManage.exe modifyhd "c:\users\a_b\VirtualBox VMs\MyBox_default_1510839571239_2193\clone.vdi" --resize 102400  VBoxManage.exe clonehd "c:\users\a_b\VirtualBox VMs\MyBox_default_1510839571239_2193\clone.vdi" "C:\Users\a_b\VirtualBox VMs\MyBox_default_1510839571239_2193\Box2.vmdk" --format vmdk   No errors were outputted in the process. However, neither the size of clone.vdi nor Box2.vmdk files was increased to 100GB (that should probably have been my first clue that something was amiss).  I replaced Box1.vmdk with Box2.vmdk as the storage accessed by the VM using the VirtualBox GUI.  When I activated and entered the VM via Vagrant, I checked it size using   df    and saw that the space available to the VM was not increased.  Indeed the sizes available to the two VMs (before and after "resizing") was similar:  Box1:  /dev/mapper/vagrant--vg-root  39625324  13644568  23944840  37% /   Box2:  /dev/mapper/vagrant--vg-root  39625324  13644564  23944844  37% /   How should I proceed to actually resize the VM? If the space is unavailable because the partition needs to be resized, how should I resize it?  Using   sudo resize2fs /dev/mapper/vagrant--vg-root   as suggested in   Yields only   resize2fs 1.42.13 (17-May-2015) The filesystem is already 498688 (1k) blocks long.  Nothing to do!   And   sudo resize2fs /dev/sda1   Yields       resize2fs 1.42.13 (17-May-2015) The filesystem is already 498688 (1k) blocks long.  Nothing to do!   With no changes to size (as evident from the use of df)


I'm trying to create an index on a pretty big table (over 8 million rows).  The index creation was taking over 10 minutes, so I selected from master..sysprocesses from my process spid:  spid    kpid    blocked waittype    waittime    lastwaittype    waitresource        dbid    uid cpu physical_io memusage    login_time                  last_batch              ecid    open_tran   status      sid             hostname        program_name                                    hostprocess     cmd             nt_domain   nt_username     net_address     net_library loginame    context_info    sql_handle  stmt_start  stmt_end    request_id 62      11836   -2      0x0003      11762       LCK_M_S         TAB: 5:427148567:0  5       1   0   0           3           2016-01-03 10:03:39.217     2016-01-03 10:15:41.013 0       1           suspended   0x010500...     MyPC            Microsoft SQL Server Management Studio - Query  9636            CREATE INDEX    MyDom       Saul            xxx             LPC         MyDom\Saul  0x000...        0x0100...   522         776         0   What is that "blocked = -2"?  Why is my index creation not working?  And how do I repair this?

I have a case where a query I'm running is taking a long time.  When I checked sys.dm_exec_requests the blocking_session_id is a negative value, -2 to be specific.  The wait is a LCK_M_X and the blocked command is a DELETE statement.  To the best of my knowledge nothing else is touching that table at the moment.  In fact the only active requests are the blocked connection and the query checking sys.dm_exec_requests.  When I look at sys.dm_tran_session_transactions the blocked session is the only one showing up.


Does anybody know how  to perform the integral $$ \int_{-\infty}^\infty\frac{e^{-x^2}\sin(x) }{x } $$ Thanks.

I am wondering whether the following integral $$\int_{-\infty}^{\infty}  \frac{\exp( - a x^2 ) \sin( bx )}{x} \,\mathrm{d}x$$ exists in closed form. I would like to use it for numerical calculation and find an efficient way to evaluate it. If analytical form does not exist, I really appreciate any alternative means for evaluating the integral. One method would be numerical quadrature including Gaussian quadrature, but it may be inefficient when the parameters $a$ and $b$ are very different in scale.  EDIT : In view of  discussion, we have decided to add OP's self-answer to the end of the question, for it does not qualify as an answer yet contains vital details. The copying is unabridged. Thanks very much for your comments, and the following result was obtained including the case for $x_0 \ne 0$: $$ \int_{-\infty}^{\infty} dx \exp[-a(x-x_0)^2] \frac{ \sin(bx) }{ x } = \pi \exp(-a x_0^2) \mathrm{Re}\left(\mathrm{erf}\left[\frac{b+2iax_0}{2\sqrt{a}}\right] - \mathrm{erf}\left[\frac{2iax_0}{2\sqrt{a}}\right]\right) $$ where $a\gt0, b, x_0$ are assumed to be all real. (note: coefficients etc may be still wrong...) This integral appears in a type of electronic structure calculation based on a grid representation (sinc-function basis). I believe the above result should be definitely useful. Thanks much!! --jaian


Here's an idea I thought about; more of a thought experiment than anything:  The universe is essentially the same as the universe 14 billion years ago, just stretched. However, all matter stretches with the universe, so it doesn't seem like anything is stretching at all to us. Even atoms "stretch". There is no new universe "material" being "added" constantly; the universe is just stretching really fast.  Does this violate any physics principle, a.k.a. is there a simple way to disprove this?

I have looked at other questions on this site (e.g. "why does space expansion affect matter") but can't find the answer I am looking for.  So here is my question: One often hears talk of space expanding when we talk about the speed of galaxies relative to ours. Why, if space is expanding, does matter not also expand? If a circle is drawn on balloon (2d plane), and the balloon expands, then the circle also expands. If matter is an object with 3 spatial dimensions, then when those 3 dimensions expand, so should the object.  If that was the case, we wouldn't see the universe as expanding at all, because we would be expanding (spatially) with it.  I have a few potential answers for this, which raise their own problems:   Fundamental particles are 'point sized' objects. They cannot expand because they do not have spatial dimension to begin with. The problem with this is that while the particles would not expand, the space between them would, leading to a point where the 3 non-gravity forces would no longer hold matter together due to distance Fundamental particles are curled up in additional dimensions a la string theory. These dimensions are not expanding. Same problems as 1, with the added problem of being a bit unsatisfying. The answer seems to be (from Marek in the previous question) that the gravitational force is so much weaker than the other forces that large (macro) objects move apart, but small (micro) objects stay together. However, this simple explanation seems to imply that expansion of space is a 'force' that can be overcome by a greater one. That doesn't sound right to me.


I want to travel to France in June next year but I will also start studying in Italy in September.  So my concern is, can I apply for a tourism visa to France in June? Even though my Italian student visa application would already be processed?  Since I start in September, the student visa I think will probably be issued in August or around that time but I want to travel in June to France.  Please ask for any clarifications if my question is not clear.  Thanks.

I will have to visit Europe twice for five months in total. I am Thai and will need a visa. The maximum stay in europe is 90 days, otherwise you have to apply for a long term stay according to my research. However, it will be complicated and time consuming.  This is my travel plan:   Aug - Sep: Munich Sep - Nov: France (I have to complete a short course in Paris which is not more than 90 days) Nov - Dec: Munich again    I am aware that I need to leave and re-enter the country when the duration reaches 90 days. Can I apply for a tourist visa in Germany's embassy for 90 days that's valid in six months and a second visa from France for 90 days. In between these trips, I will leave the continent to Russia or Turkey where a visa is not required and re-enter again.  Therefore I need two Schengen visas but is it possible to have two Schengen visas in one passport?


Given a language $L$, let $Double(L)=\{w: ww\in L\}$ and $NotDouble(L)=\{w: ww\notin L\}$  If L is regular, are $Double(L)$ and $NotDouble(L)$ regular? I tried using the closure properties of $L_{reg}$ but I figured out that $Double(L) \cup NotDouble(L)$ are not complementing  of $L$. I tried thinking about the regular expression of $L$ but I couldn't get anywhere with it. I saw this question but I couldn't understand the answers. Is there a way to prove this using regular expressions, automata and closure properties only?

Let $L$ be a regular language. Prove that $\sqrt{L}:=\left\{ w : ww\in L\right\}$ is also a regular language.    I suppose I need to modify state machine for $L$ to accept $\sqrt{L}$, but I've been thinking how to do that for a few hours and still don't know. I would be very grateful for help.


After looking through a list of emergency numbers for the different countries, I've noticed that there are four main numbers: 112, 911, 999 and 000.   So, if I found myself in a country where I didn't know the emergency number, which number should I guess at first from the list of four above? How should my guess be different in each of the continents?  What should I do if none of them work?

I know that the emergency services can be called FREE in the UK by dialing 999 and in the US by dialing 911.   What I don't know is the number to call in other countries and if there is a cost involved. This is something I think most people should find out before travelling but many don't (including me). Hopefully this will help me and other people.


Here I am trying to transform  pie/delta system into star/T form. But I can't figure out which one is right. Which one is the correct and Why?

I did a Star to Delta Network Transformation and a Delta to Star Network Transformation on different parts of the original circuit as shown in the image below.  It gave me two new circuits. On solving those circuits, I get different answers for the equivalent resistance. Why is this so?


I have a lot of 404 errors in my google's console with strange form. some words added before a code which belong to another link. for example, I have a post with these address  mysite.com/project-15155 mysite.com/project-16155 mysite.com/project-17155   In google's console, I have these 404s  mysite.com/master-xchange-project-15155 mysite.com/master-xchange-project-16155 mysite.com/master-xchange-project-17155   It is a WordPress site. I also have checked "linked from" tab, but it could not useful!

I was checking on Google webmaster tools for my blog site to see if there's any indication on why my blog traffic decreased to half in one day and i saw 43 Not Found crawl errors and 5 in Sitemap Not Found errors.   The 5 Not Found errors in Sitemap were the links to categories. I guess I renamed categories that's why Google can't find the links.   As for the 43 other Not Found errors, I see blog post titles that contain ' or . For example "McDonald's" or "O.N.E."  They weren't found by Google crawler.   There is also a blog post with /CachedYou at the end and a blog post with /www.example.com attached at the end.  They weren't found by Google crawlers either.   How do I correct those Not Found Errors?


I have asked a similar question  but it eventually evolved into a series of comments. So once again, what package should I install to see the following prompt > after running perl but now not raku (all under Cygwin)?  EDIT -l doesn't work either.  EDIT 2 Perl -d -e1 doesn't work for me either (Answer in comments as this question is closed):

How can I start an interactive console for Perl, similar to the irb command for Ruby or python for Python?


Embarrassed that I haven't looked at this for some time (can't quite get the syntax down). (ArcGIS 10.2, Win7x64).  Within Map Algebra (Raster Calculator) Trying to add the cell values of 3 rasters, each raster has multiple fields. Trying to add: SumRaster = (Raster1, Field X)+ (Raster2, FieldY)+ (Raster3, FieldZ).  Can get to run (using primary VALUE field from each), want to specify FIELD value to SUM.   Alternately would be OK to export each Raster, setting my desired VALUE from this specified Field (and don't remember how to do this in 10.2).  Any help with Syntax would be great.

How can I specify the attribute field to use in the raster calculator of ArcMap 10.2? In 9.x, I used the dot notation. i.e. To use the "New_Value" field, I could do the following: [MyRaster].New_Value + 1 = new raster  This doesn't appear to work in 10.2?


I was rewatching The Age of Adaline and I got a little bit confused. What's the age of Adaline Bowman's daughter Flemming Prescott in the movie? She is aging normally and we eventually see her age ahead of her mother. The Narrator does mention Adaline doesn't age for the next 60 or 70 years. By that estimate wouldn't her daughter have already died?

Adaline is 100-something years old, and her daughter appears to be 90 years old. Well, Adaline gave birth to her in her mid 20's, and to be precise, she should be 80.   Anyways, Adaline's old lover's son (Ellis) is probably in his late 20's/early 30's. And Adaline has stopped aging at 29, which is pretty close to Ellis. Her old lover is said to be a few years younger than her and still, his son is so young. Also, Adaline could make him believe that she is the daughter of her own old self.   Then,      how can Adaline's real life daughter be so old?   I can't make sense out of this.  Why is it this way? The age pattern of the actors and actresses is inconsistent. It seems to me that the filmmakers have exaggerated some things.


How do you deep clone an array of objects "the old way." In other words, before the introduction of methods of modern, native methods like JSON.parse, assign, extend, or the spread operator.  The solution is for some Photoshop scripts. Adobe is still using JS v1.5 (or ECMAScript 3) - meaning any JS functionality since 2000 isn't native. Ideal solutions would deep clone but avoid Photoshop specific objects, such as "layers" (more on that at the end).  Alternatively, a lightweight library mocking modern functionality would work. I've already tried  but ran into the following error:  Error 8450: The operation is not valid for channels of type component.   I came across , but the guide seemed daunting, so I haven't gotten far yet.  The array of objects is currently structured like so:  object = [     {         prop: string,         array: [{layerObject},{layerObject}...]     },     {...}, ]   Ideally all of the above except the 'layerObjects' would be cloned. The layerObjects should not be cloned because they are references to onscreen Photoshop elements that need to be tracked and manipulated.

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


I am using Computed Field to concatenate a few text fields into one value. The text fields are pieces of a street address (the street address, the city, the state, and the zip code). When using the code below, I receive the error below.  COMPUTED CODE:         $entity_field[0]['value'] =   array_pop(array_pop(field_get_items($entity_type, $entity,   'field_address'))) . ', ' .   array_pop(array_pop(field_get_items($entity_type, $entity,   'field_city'))) . ', ' .   array_pop(array_pop(field_get_items($entity_type, $entity,   'field_state'))) . ' ' .   array_pop(array_pop(field_get_items($entity_type, $entity,   'field_zip_code')));   DISPLAY CODE:     $display_output = $entity_field_item['value'];   ERROR:     Strict warning: Only variables should be passed by reference in eval()   (line 1 of   /home/mysite/public_html/sites/all/modules/computed_field/computed_field.module(468)   : eval()'d code).   How can I resolve this issue?

I get the following error:     Strict warning: Only variables should be passed by reference in include() (line 18 of /home/sites/dev/theparce/sites/all/themes/parce/block--block--3.tpl.php).   This is the block code which is causing that error.  if ($user_gallery) {   print render(node_show($user_gallery));  // Line 18   print drupal_render ($user_gallery_edit);  } else {   print drupal_render($user_gallery_new); }   Why do I get that error, even if I get all printed as expected?


I was just trying a simple program that calculates the volume of a cube. I have declared the object in main and when I try accessing the function of the class with user input arguments it shows an error : request for member 'volume cube' in 'vol', which is of non class type 'Vellimi()'. Why does this occur ?   #include <iostream> using namespace std;  class Vellimi { private:  double width; double height; double length;  public: Vellimi(double,double,double); double volume_cube (double width,double height,double length) {     return width*height*length; }  };   Vellimi::Vellimi(double a,double b,double c){   width=a;    height=b;    length=c; } int main() {    double x,y,z;     Vellimi vol();     cout<<"Input the width : "<<endl;    cin>>x;    cout<<"Input the height : "<<endl;    cin>>y;    cout<<"Input the length : "<<endl;    cin>>z;    cout<<"The volume is "<<vol.volume_cube(x,y,z)<<endl;    return 0;  }

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?


I want to close the re-sized menu when one clicks anywhere on the page. I've searched various stack overflow answers but haven't found one that does not interfere with the menu code itself, my menu...    jQuery(document).ready(function($) {   //open-close submenu on mobile   $('.cd-main-nav').on('click', function(event) {     if ($(event.target).is('.cd-main-nav'))       $(this).children('ul').toggleClass('is-visible0');   });   //i have tried adding this but hasn't worked   $('html').click(function() {     if ($('.cd-main-nav').children('ul').hasClass('is-visible0')) $(this).children('ul').toggleClass('is-visible0');    }); });

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.  Is something like this possible with jQuery?  $("#menuscontainer").clickOutsideThisElement(function() {     // Hide the menus });


which one of three styles is the most correct ?   first example: 1- The algorithm's running time. 2- The algorithm running time. 3- The running time of the algorithm.    second example: 1- The Transmitter's energy consumption. 2- The Transmitter energy consumption. 3- The energy consumption of the transmitter.  Honestly, I am confused about them :), I am not sure what the difference is. Is there any grammar for such situation? Thank you in advance.

Possible Duplicate:             Once again I'm not sure if I should use possessive or atributive or neither of them.          Please, send me an e-mail with the analysis's output.   Please, send me an e-mail with the analysis output.   Please, send me an e-mail with the output of the analysis.      Which one of them is the most idiomatic? There is any rule or recommendation about when one must use possessive/attributive or the one mentioned  above in example 3.?


Sometimes the below two sentences look the same to me. What are the differences between these two sentences:   I am gonna be talking. I am gonna talk.

Almost all my friends  say "I will be coming tomorrow" to refer that they are coming tomorrow. Why don't they say "I will come tomorrow"?   (Note that they are not saying like "will be coming tomorrow when you watch football". They do not prefer any time or situations, simply "I will be coming/calling".)   I know that "will come" is simple future and "will be coming" is future continuous.


How can I access/copy unselectable text from windows (in Windows 7)?  For example, when a warning/error/info popup box (or window) appear, is there a way to access the text of it (when the text is unselectable)?  I'm wondering if there's a utility or method to possibly access such, sort of like a "DOM Inspector" for a web browser.  Note:  The text is in the form of a label, and not any sort of textbox or inputtable text element.

Here are two examples of what I mean:   I am sure you all too have experienced this frustration before. A dialog box opens that displays only part of a long string (e.g. a file path), but won't allow you to select the text so you can read the full string. Neither text container will resize upon window resizing. (By the way, you can force windows —specially dialog boxes— to resize with tools such as , but helps little in this case, since controls are fixed-width.) The text is hidden, period. Copying a very long drop-down list control contents to a text file.   Do you know any way to solve these problems?


Given A is $m\times n$ and B is a $n \times m$ matrix, can we say trace(AB) = trace(BA)? It worked for a few examples with $m = 2$ and $n = 3$.

I'm working with trace of matrices. Trace is defined for square matrix and there are some useful rule, i.e. $\text{tr}(AB) = \text{tr}(BA)$, with $A$ and $B$ square, and more in general trace is invariant under cyclic permutation. I was wondering if the formula $\text{tr}(AB) = \text{tr}(BA)$ holds even if $A$ and $B$ are rectangular, namely $A$ is $n$-by-$m$ and $B$ is $m$-by-$n$. I figured out that if one completes the involved matrices to be square by adding zero entries in the right places, then the formula still works... but I want to be sure about this!


I have made a car model and i'm ready to render , I decided to try to make a shadow catcher plane ( which has never worked )  Im using and HDRI image and set up the nodes correctly , yet it still doesn't work.

I am compositing a scene using a standard process in Cycles, and it worked correctly as long as I had my lighting setup in the scene, however when I switched to HDR, my Shadow pass seems to become a solid black. Why is this, and how can it be avoided?  My node setup:


I am using Normalize difference vegetation index (NDVI) derived from the landsat satellite band 3 and band 4 that have float values ranges from -1.0 to 1.0. I want to see the attribute table that is not possible in QGIS.  I tried following expression in raster calculator of qgis but it did not work:  Int("float_raster" * 100)   the reason to multiply with 100 is to preserved the 2 digits at right level in attribute table that can be seen by again dividing by 100 in attribute table.   How can i scale see the better contrast in colour palette using qgis 2.40

I have a raster with float number values for example: 2.544459104537964 and I want to round these up to integers. I have seen other posts on ArcGIS like  but when I use Raster Calculator in QGIS, Int(myraster + 0.5) only makes the first value (which is 0) to 0,5 and the last one (which is 100) to 100,5. The other pixels stay float.


My understanding of LVM snapshots is that: when a block changes on the origin, the block is first copied (prior to the change) to the snapshot. The block is then changed on the origin as it would normally.  Theoretically, then, when a snapshot is first created, it should contain nothing. then as changes happen on the origin, these blocks start to fill up the snapshot.  However, if for testing purposes I create a small 1G LV, and I put a couple files on it; then I create a 200MB snapshot. As expected, lvs shows LSize of 200M for snap and 1G for origin. But when I mount the snapshot volume, df shows it with a size of 1G. When I examine its contents, I find it contains everything in the origin volume, even though the original files have not been changed.   Why is this? I'm assuming the "mount" command has some logic in it to do a comparison between the origin LV and the snapshot LV? Can someone explain how this works. If I look at the inode numbers for a file on each volume (origin and snap), they are different (as expected because each is its own unique filesystem), but I'm assuming there are some kind of "pointers" that the snapshot uses to reference unchanged blocks on the origin.  along this same vein, I assume that if I copy the snapshot logical volume itself to another location, I will get a subset of the origin's files - only those that have changed. ... But if I first mount the snapshot filesystem, and then do a fileystem-level copy (cp) I'll get everything on the origin as it was when the snapshot was created. Right?

I'm trying to figure out how LVM snapshots work so I can implement it on my fileserver but I'm having difficulty finding anything on google that explains how it works, instead of how to use it for a base backup system.  From what I've read I think it works something like this:   You have an LVM with a primary partition and lots and lots of unallocated freespace not in the partition Then you take a snapshot and mount it on a new Logical Volume. Snapshots are supposed to have changes so this first snapshot would be a whole copy, correct? Then, the next day you take another snapshot (this one's partition size doesn't have to be so big) and mount it. Somehow the LVM keeps track of the snapshots, and doesn't store unchanged bits on the primary volume. Then you decide that you have enough snapshots and get rid of the first one. I have no idea how this works or how that would affect the next snapshot.   Can someone correct me where I'm wrong. At best, I'm guessing, I can't find anything on google.    vgdiplay   obu1:/home/jail/home/qps/backup/D# vgdisplay   --- Volume group ---   VG Name               fileserverLVM   System ID   Format                lvm2   Metadata Areas        1   Metadata Sequence No  3   VG Access             read/write   VG Status             resizable   MAX LV                0   Cur LV                2   Open LV               2   Max PV                0   Cur PV                1   Act PV                1   VG Size               931.51 GB   PE Size               4.00 MB   Total PE              238467   Alloc PE / Size       238336 / 931.00 GB   Free  PE / Size       131 / 524.00 MB   VG UUID               qSGaG1-SQYO-D2bm-ohDf-d4eG-oGCY-4jOegU


When I click global inbox, the reputation or the site list button on sites with the old toolbar, it shows below the outline and writing for the next privilege. Is this a problem as the new toolbar is being introduced? I haven't seen it before.  It happens across multiple sites and also after reloading on Windows 10 with Chrome 61.0.3163.91.    Images (click for higher quality versions)  Puzzling, site list:     English, global inbox:     Code Golf, reputation:

I know I'm late with this; this could be the last bug report about the old topbar. But the text on the privilege progress indicator (on your profile page) appears above the dropdown menu coming from the Stack Exchange button, as can be seen in the picture below.     Changing the z-index property of .s-progress-bar._badge .-info, .s-progress-bar._privilege .-info from 2 to 1 solves the problem.    The new menu seems to have a high enough z-index so that this is no longer a problem anymore:


This is the regular expression I have formed so far:  /(?:("?(?:.*)"?)\s*)?\s<(.*@.*)>|(?:mailto:(.*@.*))|(.*@.*)/gi     I'm trying to extract 'Name' & 'Email' from the following:  John Smith <john.smith@gmail.com> John Smith <johnsmith@gmail.com> "John Smith" <johnsmith@gmail.com> "John" <johnsmith@gmail.com> John Smith<johnsmith@gmail.com> <johnsmith@gmail.com> johnsmith@gmail.com mailto:johnsmith@gmail.com "John"<johnsmith@gmail.com>  To: John Smith <john.smith@gmail.com> From: John Smith <john.smith@gmail.com> Reply-to: john.smith@gmail.com Return-path: <john.smith@gmail.com> Message-id: <john.smith@gmail.com> References: <john.smith@gmail.com> Original-recipient: rfc822;john.smith@gmail.com for john.smith@gmail.com ESMTPSA id <john.smith@gmail.com> domain of john.smith@gmail.com envelope-from=john.smith@gmail.com (ORCPT john.smith@gmail.com)   Having started from scratch, I feel as if I'm almost there - but having trouble with 3 things:   Stripping double quotes from the first capturing group Dealing with the whitespace missing variant: John Smith<johnsmith@gmail.com> False positives in the 'Name' field for the latter block, so I need a way of excluding these (perhaps using the preceding :, :, =, for, id, of?)   As a complete regular expression novice, I would appreciate a little direction from someone knowledgeable on how I might overcome these issues.  For the curious, I've unfortunately lost my CardDAV and thus all contacts, so in true Linux fashion, I'm going to rebuild a list of emails by manually parsing my entire raw MBOX, sorting by most common, and go from there.  I will be using bash grep, or perl sed.  Thank you for you time!

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


I'm looking to reformat my laptop that is running Vista, and I had planned on burning an ISO to a DVD-R and installing Vista to the laptop from that after reformatting, but I don't have any blank DVD-R and was wondering if it is possible to do the same thing from a flash drive, just burning to ISO to it and installing from there. If not, is there a way to do it without using a DVD-R?  Thanks!

Is it possible to do a fresh install? I only have a hard drive and windows 7 ISO file.


I would like a proof that if $a<b$ are integers with $2\leq a,b$ we have $a^b>b^a$ unless $a=2,b=3$ or $a=2,b=4$ . I would like to use as little calculus as possible. Here is my current solution:  Case 1: $a>2$  Fix $a$ and start with $b=a$. notice $a^a=a^a$. Now increase $b$ by $1$ to now get $a^{a+1}>(a+1)^a$. When $a$ is at least three this is true because the left side was multiplied by $a$ and the right side by $(1+\frac{1}{a})^a$.  Since $(1+\frac{1}{a})^a=\sum\limits_{i=0}^a \binom{a}{i} \frac{1}{a^i}$ is the sum of $a+1$ elements all of them smaller than $1$ and the last two terms add $\binom{a}{a-1}\frac{1}{a^{a-1}}+\binom{a}{a}\frac{1}{a^a}=\frac{1}{a^{a-2}}+\frac{1}{a^a}<\frac{1}{3}+\frac{1}{27}<1$ we conclude the sum is less than $a$. Therefore the inequality holds. Notice that each time we add $1$ to $b$ the left side is multiplied by $a$ and the right by something smaller than $(1+\frac{1}{a})^a$, hence the inequality holds for all $b$ larger than $a$.  Case $a=2$ is the same thing only we check $b=3,4$ by hand and then do something similar.  I am not really happy with the current solution, can we find something simpler? If it can be more combinatorial it would be better. Notice I want as little calculus or inequalities as possible.

Given $a>b>2$ both positive integers, which of $a^b$ and $b^a$ is larger?  I tried an induction approach. First I showed that if $b=3$ then any $a \geq4$ satisfied $a^b<b^a$.  Then using that as my base case I tried to show that given any pair of positive integers $a,b$ satisfying $a>b>2$ and $a^b<b^a$, then $(a+1)^{b+1}<(b+1)^{a+1}$ - but that is where I got stuck.  Any help would be appreciated.


Let $p$ be a prime number and let $1 \leq n < p$ be a non-negative integer number.  Show that there exist $x,y \in \mathbb{Z}$ such that $n x + p y = 1$.

For any nonzero integers $ a $ and $ b $, there exist integers $ s $ and $ t $ such that $ \gcd(a,b) = as + bt $. Moreover, $ \gcd(a,b) $ is the smallest positive integer of the form $ as + bt $.  I know of one proof of this question, in which we consider $$ S = \{ am + bn ~|~ \text{$ m,n \in \mathbb{Z} $ and $ am + bn > 0 $} \}, $$ but I didn’t manage to get the proof. Can someone please explain this theorem?


Basically if you use an iPhone or iPod touch, if you swipe down from your home screen, the home screen will fade, and a search bar appears on the top (for spotlight search, I guess). If Siri suggestion is on, you also see suggested apps there.  I would like to disable the feature completely, so that swiping down from home screen does not trigger any action.  Reason: I found it very often that when I swipe home screen pages left and right, it is detected as a down-swipe and triggers the search bar --  especially often on a bigger screen like iPhone 6 and iPhone 6s. This is very annoying and disturbing. Also, it could be very laggish on an old device.   I did not see any related option in Settings. I could turn of Siri suggestions and spotlight search contents for each application, but there does not seem to be a way to disable this gesture action. Is there anything in Accessibility that could help?

I would like to know if there is any way to disable Spotlight Search, even when an user goes to Settings -> Spotlight Search, and change the options there.  That's mainly because anyone could still search in Spotlight only by going to Settings -> Spotlight and enabling the search on the web. I do know that you can set it so you can apply filters, but they are not successfull at what I need. (Yes, I know also that Safari can be restricted under "Restrictions", but I am only talking about Spotlight)  I would need something like "Spotlight Search" under "Restrictions", so I can turn it off completely, so any user can't enable the Internet search again.  That's like a little bug for anyone who want to be fully protected for mature/adult content. (I want to have my own filter, not what Apple says that is good)  PS. Currently I am with iOS 10.X in an iPhone SE. There's a video from youtube  that explains how to disable Settings app. That would be great, but that workaround only work in older versions of iOS.


I want to make a class that contains basic arithmetical operations with one generic type (it have to be struct) but I can't limit the generic type with something that make sure compiler that this type will be able to do arithmetical operations. Simple example: T Sum<T>(T x, T y) { return x + y; }Error: Operator "+" can't be used on T operands. Using limitation lead to the same problem:T Sum<T>(T x, T y) where T: struct { return x + y; }What name of the class/interface that contains signatures for basic arithmetical operations that I can use in where construction to make sure compiler that generic type will have ability to work with arithmetical operations? I coudln't even find it in .NET documentaion.

Can anyone tell me if there is a way with generics to limit a generic type argument T to only:   Int16 Int32 Int64 UInt16 UInt32 UInt64   I'm aware of the where keyword, but can't find an interface for only these types,  Something like:  static bool IntegerFunction<T>(T value) where T : INumeric


How to permanently remove the search result which I deleted from the website? I previously added those url in google webmaster sitemaps.  Is there any way to hide those url permanently from google SERP?

I have used so many things like url removal request and deleted the pages etc., but still the errors are shown in my webmaster tools.  How can I remove the urls completely from Google?


What happens to a check that says $[570-] where the written amount goes and  "five hundred -------------------70/100" where the written portion goes?

I received a check personally written to me from a family member.  The family member that wrote & sent me the check wrote where you write out the amount of what the check is suppose to be for, in words, "Fifty Dollars-------00/00".  Then, in the box above where you write the amount with numbers, they wrote "25.00".  They signed the check and mailed it to me to cash.  What should I do?


Honestly, I am just plain stuck, I have been hitting my head against it for $2$ days straight. I know the solution should be $2^{-2}$ but...  Help would be appreciated. If anyone has a Wolfram Alpha PRO account I am sure that thing churns out the solution as it is something quite basic I just don't see it and its driving me crazy.  Edit: Stacks seemed to correct my formating from this sloppy one "Limit[(2 n)! n^n (E^n/(n! (2 n)^(2 n))), n -> Infinity]" $\displaystyle\lim_{n \to \infty} \frac{(2 n)! e^n (n)^n}{n! (2 n)^{2 n}}$  to this one $\displaystyle\lim_{n \to \infty} \frac{(2 n)! (n)^n}{n! (2 n)^{2 n}}$ somewhere dropping the $e^n$ term. I should have learned to propperly use latex in stackexchange first.

Help with Limit: $$\lim_{n \to \infty} \frac{(2 n)! e^n (n)^n}{n! (2 n)^{2 n}}$$  EDIT: Posted a similar question just yesterday but bad formating from my part dropped a term, and lead me to strange places. Honestly, I am just plain stuck, I have been hitting my head against it for $2$ days straight. I know the solution should be $2^{-1/2}$ but...  Help would be appreciated. If anyone has a Wolfram Alpha PRO account I am sure that thing churns out the solution as it is something quite basic I just don't see it and its driving me crazy.


In the Annie Award-winning Family Guy episode "Barely Legal", at one point Meg sits in the dark obsessing about Brian turning the light on and off. Is this a reference to something?

In Season 5 Episode 8 of Family Guy (Barely Legal),  where Meg turns the lamp in her room on and off while spinning the tag on Brian's collar while somebody sings an aria.  The context of this clip (which is pretty much the plot of the episode) is that Brian took Meg to the prom as a favour, they made out, and Meg became infatuated with Brian ever since. This is one of the things she's done as a result.  To this day, I have no idea what that scene means. It appears to be a ritual of some sort, but I don't know if it's just something made up by the writers or whether it actually refers to something else.


I need to check whether my window service is running or not every 15 minutes or so.   If it is not running, then how can I restart the windows service again?

I have an application in C# (2.0 running on XP embedded) that is communicating with a 'watchdog' that is implemented as a Windows Service. When the device boots, this service typically takes some time to start. I'd like to check, from my code, if the service is running. How can I accomplish this?


For it, use that $$\oint_{|z|=r} \frac{f(z)-f(-z)}{z^2} dz = 4\pi i f'(0) ; \hspace{1cm}\text{  with } 0<r<1$$ Also remember that diam$(A)=\text{sup}\{\left|z-w\right| : z,w\in A\}$ for A bounded, $\mathbb{D}$ is the unit disc and $f:\mathbb{D}\rightarrow\mathbb{C} $.

Let $D \subset \mathbb{C}$ be the open unit disk, $f:D \to \mathbb{C}$ a holomorphic function and $d=\sup \{|f(z)-f(w)|:z,w\in D \}$. How can I show that $|f'(0)|\leq \frac{d}{2}$?  I tried using Schwarz's lemma on the function $g:D \to \mathbb{C}$ defined by $g(z)=\frac{f(z)-f(0)}{d}$, but I am only getting $|f'(0)|\leq d$.


When you run 'java -cp ...' or 'java -classpath'? How do you set a directory of jars in classpath?  In Linux, java -cp /some/directory/ would not work! although it clearly says directory in -cp is supported.

Is there a way to include all the jar files within a directory in the classpath?  I'm trying java -classpath lib/*.jar:. my.package.Program and it is not able to find class files that are certainly in those jars.  Do I need to add each jar file to the classpath separately?


I came across this site  and they post free high resolution pictures to use. I have a canon550D with the standard kit 18-55m and a 50mm lens. How are these high resolution pictures achieved? I use lightroom for some basic editing... any information or advice would be great.

I use a Canon EOS Rebel T3i (600D) with the kit lens. I have experimented a lot with different settings and modes, but I feel like I have wasted many good shots that could have looked amazing, if only they were a little bit sharper.  I use auto-focus on most of my pictures and make sure to choose the right focus point, but all of my photos are still a little bit out of focus. When I zoom in, I can see that the pixels are not very crisp or well-aligned.  I am not sure if this issue is caused by my equipment or skills.


Does anyone remember the name of a CGI show that had Rock Men, Ice Men, and Fire Men? It had planets that moved and were cannons as well. I used to watch it with my dad when I was younger, but now I can't remember the name.

I remember seeing this series back when I was in the early grades of primary school (prep to 3) so this would be between 1996 and 1999  from what I remember it was set in space and the cast was made up from people from these different worlds, one of the characters is from a fire attributed world and I get the impression he was small framed (I think).  at one point in the series this entity appears called the Beast Planet appears, the one scene I do remember is that this Beast Planet attacks the fire planet, the front of the beast planet opens up with this claw and grabs the fire planet from bellow and then the fire planet is slammed into the beast planet dooming the fire planet but I think the beast planet was unharmed.  I also seem to remember that the cast discover the other planets have engines which allows the remaining planets to escape from the Beast Planet rather than them being sitting ducks.  I remember that this beast planet, despite being called a beast is actually more machine. I began remembering this series after playing Galaxy Angel where I saw the  and it reminds me of this beast planet


[Fred] “Merry Christmans!”   [George] "Hey, look –– Harry's got   a Weasley sweater, too!"     Fred and George were wearing blue   sweaters, one with a large yellow F on it, the other a G.     "Harry's   is better than ours, though," said Fred, holding up Harry's sweater.   "She [my mother] obviously makes more of an effort if you're not   family."  (Harry Potter and the Sorcerer's Stone)   Why isn’t there any article before family?

Sister Sledge - We Are Family - YouTube I've searched on YouTube a song named 'We are Family'   Why use the sentence without an article 'a' or 'the'?


What is the best way to calculate the determinant of a matrix of one's (each entry in the matrix is a 1) plus or minus the identity matrix of size $n \times n$?

I have the following $n\times n$ matrix:  $$A=\begin{bmatrix} a & b & \ldots & b\\ b & a & \ldots & b\\ \vdots & \vdots & \ddots & \vdots\\ b & b & \ldots & a\end{bmatrix}$$  where $0 < b < a$.  I am interested in the expression for the determinant $\det[A]$ in terms of $a$, $b$ and $n$.  This seems like a trivial problem, as the matrix $A$ has such a nice structure, but my linear algebra skills are pretty rusty and I can't figure it out.  Any help would be appreciated.


strikes me as a rather strange card with the potential for some rather unique interactions, one of which I'm hoping someone might be able to explain to me. Take this situation: My opponent has a Bear Cub and an Baulduvian Bear, I cast Illusory Gains on the Bear Cub and the cub comes under my control. I end my turn. On my Opponents turn he attacks with the Baulduvian Bear. I declare the Bear Cub as a blocker. After blockers have been declared but before damage my opponent flashes in a , so I must attach Illusory Gains to it and lose control of the Bear cub. What happens?  Is the cub removed from combat and nothing takes damage? The only thing that is changed is who controls the creature, so it is still the same card (unlike if it had been exiled and returned).  Do both Bear Cub and Baulduvian Bear take 2 damage from each other?  Or does something else happen?

I've happened upon a new scenario I didn't realise was possible: I attack or block with , and after blockers are declared, I use  or  to give the Jackal Pup to another player. I'd like to make sure I understand this interaction properly.  As far as I understand it:   Jackal Pup and the creature it's blocking or being blocked by still exchange damage as usual. It doesn't leave combat. Jackal Pup will deal a bunch of damage to whoever I gave it to. I can even hand Jackal Pup to the player blocking it or attacking me, and that will still hold true. (They'll then control two creatures who exchange combat damage with each other!) If a creature was declared attacking me (or my planeswalker), it is still doing so even after I block it with Jackal Pup and hand someone else control of it. If that creature has trample, the damage will go to me.   Do I understand this correctly? (These are some fun hijinks, if they work like they seem to.)


I am looking for a word that represents a place where knowledge is shared. Words like academy or school convey the idea of one-way sharing (from teachers/instructors to students), and I want something where everybody shares knowledge, preferably technical.  The proposed usage is to brand a group where people will meet to share knowledge (and anyone can be a teacher at any given time).  Any ideas?  Thanks!

I need a two word phrase to refer to a community of people (academia + non-academia) who come together to share/exchange their knowledge/ideas openly on topics of their interests/ specializations.  I would appreciate the use of small and easier/common words for the phrase. Single words are also acceptable. Feel free to throw out your creative ideas and newly invented phrases.


there is a web app. It suppouse to be avilable only in specific iframe (corp. site), so uninvited guests are redirect to clients web site by script.  Code below is working, but java could be disable in browser. IP white list would be a great solution, but too many dynamic IP is used.  What php trick can be used to check is site opened in iframe?  <script>                 if (top === self) window.location.replace('http://uninvited-guests-go.here');  </script> <?php header('X-Frame-Options: ALLOW-FROM https://iframe.allow.only'); ?>

I am writing an iframe based facebook app. Now I want to use the same html page to render the normal website as well as the canvas page within facebook. I want to know if I can determine whether the page has been loaded inside the iframe or directly in the browser?


What exactly is Simple algebra of type $A_2$? I found that it has something to do with root systems, which I also don't really know what those are. Any idea?  Thanks!

I want to determine the root-system of the lie algebra $sl(3,\mathbb C)$. Does someone know a good (and complete) reference for this problem?  I know that the root-system is $A_2$ but I want to see a complete proof (calculation) for this.  Thanks in advance.


I know we say one point or two points, how about zero? Do you say zero point or zero points? Or both are ok depending on the context?

When using zero as a quantifier, is it correct to use the singular form on the object of the quantifier, or the plural form?  It sounds confusing when I put it that way, but what I mean is: Which is correct?   Your password expires in 0 days. Your password expires in 0 day.   Essentially I suppose I'm asking, does "singular" mean "one" or "the opposite of more than one", as zero is not "plural" in the traditional "more than one" sense?  I'm pretty sure "days" sounds correct, but I can't be sure.


one.ttf (3f67f2feb32a72cf4b90c767eb43aa52) two.ttf (8880bae64dc9e6ba22446f789d09d3d7) I want to set one.ttf md5 hash to two.ttf It is possible? Like this one.ttf (3f67f2feb32a72cf4b90c767eb43aa52) two.ttf (3f67f2feb32a72cf4b90c767eb43aa52)

What's the practical status of  w.r.t. ?  Integrity of a piece of data is protected by an MD5 hash, itself assumed genuine. The data (and thus the hash) is known to the adversary. The adversary can change the data, and wants to do that while leaving the hash identical. Denote the data size as $K$, in 512-bit block increment, and assume that could be sizable (e.g. $K\approx2^{35}$, which is less than one big hard disk). The original data could follow some pattern (e.g. repeated 512-bit blocks). To some degree, the adversary could even choose some data in the original (e.g. embedded in some innocent-looking file); but we must assume that the adversary can't predict some of the data before what it injects, else the      MD5 apply.  A generic second-preimage attack is applicable to  hashes, with cost $2^{129-k}+2^{65}$ hash rounds for MD5, where $k=\log_2K$, but that's not exactly cheap (it is attributed to R. D. Dean in his 1999  sect. 5.3.1, and also exposed by J. Kelsey and B. Schneier in their 2005 ).  Has anything more practical surfaced?


I have the following code:  #include <stdio.h>  int main(void) {     char c1  = 'A';     int size1;     int size2;      size1 = sizeof(c1);     size2 = sizeof('A');     printf("%d %d\n", size1, size2);     return 0; }   The output of the above code is 1 4. My question why 'A' in sizeof('A') is promoted to a integer, while c1 in sizeof(c1) is not promoted to a interger?

In C++, sizeof('a') == sizeof(char) == 1. This makes intuitive sense, since 'a' is a character literal, and sizeof(char) == 1 as defined by the standard.  In C however, sizeof('a') == sizeof(int). That is, it appears that C character literals are actually integers. Does anyone know why? I can find plenty of mentions of this C quirk but no explanation for why it exists.


I created a service based on this code  The problem is that I cant stop the service, smoothly. To stop the service I would need to recheck a flag for a stop event every period of time. Is there any better way to stop a service in python? This is how I currently try to stop my service.  def __init__(self,args):     win32serviceutil.ServiceFramework.__init__(self,args)     self.hWaitStop = win32event.CreateEvent(None,0,0,None)  def SvcStop(self):     self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)     win32event.SetEvent(self.hWaitStop)    def SvcDoRun(self):     servicemanager.LogMsg(servicemanager.EVENTLOG_INFORMATION_TYPE,                           servicemanager.PYS_SERVICE_STARTED,                           (self._svc_name_,''))     myStatusThread = threading.Thread(target=win32event.WaitForSingleObject, args=(self.hWaitStop, win32event.INFINITE))     myStatusThread.start()     while True:         if not myStatusThread.isAlive():             sys.exit(0)         else:             doStuff()#do something that takes some time   So the service only stops once "doStuff" is done, which could take a long time. I would like to stop the service as soon as the user stops it in the services.

I am sketching the architecture for a set of programs that share various interrelated objects stored in a database. I want one of the programs to act as a service which provides a higher level interface for operations on these objects, and the other programs to access the objects through that service.  I am currently aiming for Python and the Django framework as the technologies to implement that service with. I'm pretty sure I figure how to daemonize the Python program in Linux. However, it is an optional spec item that the system should support Windows. I have little experience with Windows programming and no experience at all with Windows services.  Is it possible to run a Python programs as a Windows service (i. e. run it automatically without user login)? I won't necessarily have to implement this part, but I need a rough idea how it would be done in order to decide whether to design along these lines.  Edit: Thanks for all the answers so far, they are quite comprehensive. I would like to know one more thing: How is Windows aware of my service? Can I manage it with the native Windows utilities? What is the equivalent of putting a start/stop script in /etc/init.d?


I've seen a lot of questions about what is shallow vs deep copy, but not a lot on when to use each. If deep copy is safer, why aren't more developers deep copying every single object every time something is changed? If that were done, doesn't performance become an issue? Is there ever a good time to shallow copy?  Edit - This question is not a duplicate of the one provided. That question asks what is the difference between the two. This question is asking in what scenario is it appropriate to use each one, I understand the differences.  Edit - The question is if a server is receiving requests and adding or modifying one field, should the server map the json request to object, then map every single field from that object to new objects with the one field modified then forward the request to a second api? Or is a shallow copy sufficient since there's not really a chance of the original object being modified?

What is the difference between a deep copy and a shallow copy?


How can I show that:$$\sum_{k=1}^{n}({k^2})$$ Is equal to: $$\frac{n(n+1)(2n+1)}{6}$$ I know that I would apply the sum formula, should I also be using this formula? $$\sum_{k=1}^{n}k=\frac{n(n+1)}2$$

I am just starting into calculus and I have a question about the following statement I encountered while learning about definite integrals:  $$\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}$$  I really have no idea why this statement is true. Can someone please explain why this is true and if possible show how to arrive at one given the other?


Today I installed Ubuntu on to a pre-existing partition (I also made a swap partition during the installation) and when my machine went to restart, my screen went dark and did nothing, I did wait. There was power going to the machine.  I did a forced restart but now I have no clue how to boot to the partition that I have Ubuntu on. I have Windows 7, by the way. I have poked around my BIOS settings and I didn't see anything in the boot tab about choosing a partition to boot off of.

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


The possessive form is used in a prepositional phrase beginning with   'of':           'Maggie, a colleague of Mary's, came to the opening of the     exhibition. Rufus came too.' 'Who's Rufus?' 'He's a friend of my     husband's.'      What do Mary's  and husband's  mean in these sentences? At first I thought   "He's a friend of my husband's"  could mean  "He is a friend of friend of my husband"  but I am not sure.

I have often heard people say "x of his" or "x of mine". But since his and mine point out ownership, isn't using "of" here doubles that ownership? Wouldn't it be more appropriate to say "x of him" or "x of them" etc.?  Example:     I was a good friend of your dad's. He told me all about you`


I saw it in "Jurassic park" movie. Character of Sam Jackson says "Vehicle headlights are on and not responding. Those shouldn't be running off of car batteries".

I have read a sentence from “Diary of a Wimpy Kid 4”:     The teachers have really been cracking down on kids copying off of each other this year.   How to understand "off of"? Please parse it.


If I have to pick 5 to 6 colleges to apply for a Ph.D. program, how do I go about it? If I find the work that a CS professor at let's say UC Davis to be interesting. How do I actually know if I have a realistic chance of getting in? I cannot reach out to the professor and ask him if he will let me be a Ph.D. student in his lab because he hasn't seen my transcripts, read my LORs, or doesn't know me at all. If I write him an email, in all likelihood, he will just ignore my email. At the same time, I cannot ask my recommenders if I have a chance of being accepted at UC Davis. Because (a) They don't know what the other recommenders will write in their letter. (b) They might not know exactly, what sort of profile gets admitted at UC Davis. (c) It's been 3.5 years since I graduated with a Master's degree and 6 years since I graduated with a Bachelors. People might not even recognize who I am, let alone write me a letter of recommendation. Applying to colleges costs money. Also, people who write me a LOR, have to upload their LOR to each place where I am applying to. If I am applying to colleges way out of my league, I will be wasting my time as well as the time of the people who would write me a LOR. So my question is, how do you find colleges that are in your league.

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


The  is a smooth, simple, immersion of $\mathbb{R}$ into $T^2$. This line is even dense in $T^2$ (thus not all injective immersions are embeddings).  When I tried to concoct a curve with similar properties in $\mathbb{R}^2$ I found it much more difficult and eventually threw up my hands in defeat.  So I'm curious:   Is there a smooth, simple, immersed, dense curve in $\mathbb{R}^2$ (or $\mathbb{R}^n$)?  If not, is there a smooth, simple, immersed, dense curve in an open subset of $\mathbb{R}^2$ (or $\mathbb{R}^n$)?  In general, which smooth manifolds $M$ admit a smooth injective immersion $\gamma:\mathbb{R}\to M$ such that $\gamma(\mathbb{R})$ is dense in $M$.   An answer to any of these would be extremely enlightening. Thanks in advance.

Is there a curve $\gamma : \mathbb{R} \to \mathbb{R}^2$ injective and $\mathcal{C}^1$ whose range is dense in $\mathbb{R}^2$?


$\suṃ̣_{k=m}^{n}  (-1)^k {n \choose k} {k \choose m}$ for all positive integers such that n > m.   My attempt, since k=m. I get $\suṃ̣_{k=m}^{n}  (-1)^k {n \choose k} {m \choose m} = \suṃ̣_{k=m}^{n}  (-1)^k {n \choose k}$.  What do I do from this step?

I got quite some trouble trying to prove this.  $$\sum_{k=m}^{n}(-1)^k\binom{n}{k}\binom{k}{m}=0, n>m\geq 0$$  I tried using $$\binom{n}{m}\binom{m}{k}=\binom{n}{k}\binom{n-k}{m-k}$$ and then changing the summation boundaries as $k=0, n=n-m$, but that took me nowhere... I would really appreciate help. Thank you.


I'm looking at connecting relays,  In the schematic found on this site, the diode is placed in parallel. Why would this be the case? If the diode is there to circumvent large voltage flow back, wouldn't this skip pass the diode and go straight to the arduino?

In most electrical circuits with a relay, a diode is connected in parallel to the coil of the relay. Why? Is it always a good practice?


It is written in the online :     England have definitely been the weaker side in the first half of the game.   While Grammarly.com corrected the sentence to:     England has definitely been the weaker side in the first half of the game.   Which version is the correct one?

1) Australia has won the World Cup Cricket.      2) Australia have won the World Cup Cricket.   Which sentence is correct? Also, I would like to know more contexts where 'country has' and 'country have' are used.


Let $\Omega$ be a measure space. Then the set $L^2(\Omega)$ is a Hilbert space. Hence it has an orthonormal basis $B$, which yields an isometry of Banach spaces: \begin{align*} L^2(\Omega)\cong L^2(B)\end{align*} Now I was wondering: does there also exist an isomorphism $L^p(\Omega)\cong L^p(B)$, for $p\in [1,\infty]\setminus \{2\}$?

If $1\leq p < \infty$ then show that $L^p([0,1])$ and $\ell_p$ are not topologically isomorphic unless $p=2$.  Maybe I would have to use the Rademacher's functions.


I have a texture node, I want to keep as it is and try another texture creating another texture node. I don't want to use the same texture node to try both.  How can disable node in node editor temporarily? In Nuke, it used to be d (for disable). Pressing d, of course, does not work in Blender. My intuition says there might be similar in Blender.

Sometimes when working with nodes it is useful to see what my setup looks like without a certain node.  I know I can delete a node without breaking the chain with Ctrl+X and then undo with Ctrl+Z, but that is kind of cumbersome.  Is there a way to easily bypass a node like this, connecting the inputs to outputs like Ctrl+X does, only without deleting it?


I just stumbled accross this method   public static Date getNowDate() {     final Calendar cal = new GregorianCalendar();     cal.setTime(new Date());     return cal.getTime(); }   which gets called like this:  getNowDate().getTime()   Is this any different from just calling  System.currentTimeMillis()   ?

In Java, what are the performance and resource implications of using  System.currentTimeMillis()    vs.   new Date()    vs.   Calendar.getInstance().getTime()   As I understand it, System.currentTimeMillis() is the most efficient. However, in most applications, that long value would need to be converted to a Date or some similar object to do anything meaningful to humans.


I am using Ubuntu 17.10. I was using xorg session because some screen monitoring applications were not working in Wayland (e.g. Timedoctor taking blank screenshots).  Yesterday when I turned my computer on to log in (in Xorg), after I entered my password a black animation type screen appeared and the login screen came back. I tried again but it wasn't working.   On the default session I have no problem logging in. I have also tried to installed Unity, but with that I have the same problem as with Xorg.   I want to use Xorg session. How can I fix the login loop?

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


So I got this model of a robot and I had to rotate the whole model (which is made up of several non-joined meshes) so I parented every single part to the body and now when I unparent everything goes haywire. Anyone got any ideas on how I can unparent them without everything moving?  This is how it looks parented   And this is what happens when it gets unparented (I used alt+p clear parent)  I got another question. I need to rig this model and keep everything unjoined (because I dont want anything to bend since this is a robot made up of solid parts) any tips on that?  Here is a download link if anyone wants to have a closer look:

I have several objects set as children of a parent object. Whenever I remove the parent object (an empty in this case), the position of all of the children are skewed. I'm guessing that this is do to them being moved after the parent relationship was made? I'm looking for a way for all of the child objects to maintain their current positions after the parent has been removed. Is there a way to do this?


Here is part of my code that I'm messing around with:   import java.util.Scanner; public class Hwk12 { public static void main(String args[]) {     final int ARRAY_SIZE = 100;     int numberElements = 0;     char[] array = new char[ARRAY_SIZE];     getInfo(array, numberElements);     System.out.println(array);     System.out.println("1");     System.out.println(numberElements);     System.out.println(array.length); } public static void getInfo(char[] letters, int numberElements) {     Scanner keyboard = new Scanner(System.in);     System.out.print("Please enter some letters or -1 to quit: ");     String input = keyboard.nextLine();     char characterInput = input.charAt(0);     while(!input.equals("-1") && numberElements < letters.length)     {         letters[numberElements] = characterInput;         numberElements++;         System.out.print("Please enter some letters or -1 to quit: ");         input = keyboard.nextLine();         characterInput = input.charAt(0); }   When I run it and input things, this is the output:       Please enter some letters or -1 to quit: a      Please enter some letters or -1 to quit: s      Please enter some letters or -1 to quit: d      Please enter some letters or -1 to quit: f      Please enter some letters or -1 to quit: s      Please enter some letters or -1 to quit: a      Please enter some letters or -1 to quit: d      Please enter some letters or -1 to quit: f      Please enter some letters or -1 to quit: a      Please enter some letters or -1 to quit: s      Please enter some letters or -1 to quit: df      Please enter some letters or -1 to quit: d      Please enter some letters or -1 to quit: -1      asdfsadfasdd      1      0      100     Why does it display numberElements as 0 when I clearly changed it by increamenting it during the while loop in the getInfo() method?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?