what different between int &p= n; int *q = &n;? 1)what different between int &amp;p= n and int *q = &amp;n in this code they do same thing. 2)what do &amp; exactly(maybe return addres variable or something different?)     void foo(int &amp;p){         p++;     }     int main(){              int n = 5;                   foo(n);              int &amp;p= n;         int *q = &amp;n;              cout &lt;&lt; *q;         cout &lt;&lt; p; }
Pointer vs. Reference What would be better practice when giving a function the original variable to work with:  unsigned long x = 4;  void func1(unsigned long&amp; val) {      val = 5;             } func1(x);   or:  void func2(unsigned long* val) {      *val = 5; } func2(&amp;x);   IOW: Is there any reason to pick one over another?
I want to use Windows 7 or 8 but I don't know to install a software like VirtualBox which we have to do with the use of terminal. I don't want to use Windows as a main OS so I want to use it in VirtualBox. Can you tell me how to install downloaded files in Ubuntu. I once installed java runtime but don't know the meaning of the lines which I have written in terminal, I just did as the blog posted by a man says. Don't count non-printing characters, HTML comments or other content not displayed toward minimum character requirements A follow-up to , and an extension of .   shows that it is possible to circumvent minimum character requirements using null bytes.  Can we exclude such non-printing characters as ASCII NULL and other control characters from counting toward minimum character requirements?  Edit: Users have demonstrated that , unmatched or invalid HTML tags, and other content that is not displayed after Markdown parsing can be used to bypass such requirements as well.  Can we cover this case as well, except for links? How to select the rows with maximum values in each group with dplyr? Adding new ROLES and USERS through REST in GeoServer I use GeoServer stable version 2.14.1 and get error messages when trying to add new roles and users via REST. I suspect that the GeoServer REST documentation is buggy. When I call the REST interface of my GeoServer instance, I can see that the roles are accessible through the URI http://localhost:8080/geoserver/rest/security/roles. Users are under the URI http://localhost:8080/geoserver/rest/security/usergroup/users. I can query both resources via GET request, but adding new resources via POST or PUT will not work. A POST request to create new roles ends up with status code 405 (Method not allowed). After trying to create new users comes the status code 500 (Internal Server Error). For this, the GeoServer-REST documentation has been referencing the paths  /roles/roles/{role}  for new roles () or  /usergroup/users/  for new users () since several GeoServer versions. But when I use them, this always ends with Status code 404 (Not Found). How can I add new roles and users through REST in GeoServer? The workarround from @implssv in  does not work for me. Find the value of $y(1)$ of the ODE $y'+y=|x|$. Let $y$ be the solution of $$y'+y=|x|$$ for $x\in\mathbb{R}$ and $y(-1)=0$. Then the value of $y(1)$ is    $\frac{2}{e}-\frac{2}{e^2}$ $\frac{2}{e}-2e^2$ $2-\frac{2}{e}$ $2-2e$   I don't know what to do with the absolute value function in this problem. So I started like the regular first order equation by calculating integrating factor, and got $$ye^x=\int |x|e^x dx+C.$$ Now I got stuck as how to tackle the absolute value function? Help me to solve this. Thanks! Is there a way for me to bind a key that will allow multiple units in my control group to all use the same spell at once?  For example, if I have 3 centaurs as chen, and I have them all selected. Can I press one key to make them all warstomp at the same time?   Or if I have 3 familiars as Visage. When I have all three selected, is there a button I can press to have them all stun at the same time? booting windows 10 spends too long In the film and book series, Year 4 (Goblet of Fire), how is it Mad-Eye Moody/Barty Crouch could see Harry through his Magical Eye even when he was under the Invisibility Cloak?  As the cloak is a True Invisibility cloak, immune to charms and spells, and according to legend invisible to even Death, how did Mad-Eye detect Harry Potter under the cloak? How Nagini and Mrs. Norris were able to sense Harry were through other senses, such as smell and warmth, but not visually.  I'm referring to the scene/chapter where Snape follows Harry at night. Harry hides under the Invisibility Cloak but his foot is stuck at the broken staircase. Eventually Mad-Eye arrives, sees Harry through his Magical Eye, and talks Snape away. I've got a NI Traktor Audio 2 sound card I'd like to get working with Mixxx, but I don't seem to have any success so far. The card seems to be supported in Ubuntu out of the box, and it seems to work well with ALSA, but I cannot select it in Mixxx and I'm not sure whether is something I can do to make it see it (e.g. through).  So for testing purposes, on the command line I can execute aplay to check each channel:  aplay -D plughw:2,0,0 test.wav   and  aplay -D plughw:2,0,1 test.wav   That works well: I can hear the test sound on each channel (A and B)  The relevant output for this card using aplay -D is:  hw:CARD=TraktorAudio2,DEV=0      Traktor Audio 2, Traktor Audio 2      Direct hardware device without any conversions plughw:CARD=TraktorAudio2,DEV=0      Traktor Audio 2, Traktor Audio 2      Hardware device with all software conversions   From those 2 items on the output, plughw is the one that works, whereas hw doesn't.  The problem is that Mixxx only lets me select the hw card, which does not seem to work. I'd like to be able to select the plughw card, which is the one that's working.  I've tried suspending Pulse Audio as suggested by , but that did not seem to work. I also played around with an .asoundrc file similar to the one  (which was for an older model of this sound card), but also without success.  Any ideas on how to make Mixxx show the right card (and channel, while we are at it)?  Thanks! If nonnegative $f: [0,1] \rightarrow \mathbb{R}$ has a continuous $f''$, then $\int_0^1 \Big| \frac{f''(x)}{f(x)} \Big| \,dx >4$ Getting from Denver Amtrak to Fort Collins The eastbound Amtrak arrives Denver 6:38 PM (18:38).  How can I get to Fort Collins from there?   The  runs  from Denver International Airport to Fort Collins, but the airport is 40 km from the Amtrak station, so that's a major detour, that would mean taking bus FX from Market Street Station 7:18 PM, arriving at the airport at 8:27 PM, then the super shuttle 9:05 PM, arriving Fort Collins CSU at 10:55 PM; almost 4 hours after departing from Denver. Greyhound Lines appears to have a bus departing 12:45 AM, arriving 02:00 AM — although probably as quick as it gets, this is not exactly a comfortable time. RTD Denver has transportation to Longmont and  from Longmont to Fort Collins, but  appears to depart 7:05 PM — so I won't make it there when arriving by Amtrak.  A taxi would cost an estimated .   Is there any other way to get to Fort Collins when arriving by the eastbound Amtrak, any way that I've missed? How do you rotate a two dimensional array? Inspired by , say you have a 4x4 two dimensional array, write a function that rotates it 90 degrees. Raymond links to a solution in pseudo code, but I'd like to see some real world stuff.  [1][2][3][4] [5][6][7][8] [9][0][1][2] [3][4][5][6]   Becomes:  [3][9][5][1] [4][0][6][2] [5][1][7][3] [6][2][8][4]   Update: Nick's answer is the most straightforward, but is there a way to do it better than n^2? What if the matrix was 10000x10000? How can I say this? Is there a maximum possible acceleration? So yesterday I dropped my iPhone into the toilet, it was literally submerged for less than 15 seconds and after taking it out I left it in my airing cupboard overnight to dry. Today the phone seems to be completely functional other than a very dark screen (changing brightness won't help).   Was wondering what the best course of action would be and if this is fixable. I get a message:     Sorry, you are only allowed to ask 50 questions in a 30 day period   Why is there a question limit? 50/month is just not enough :) Prove $\mathbb{Z}_2 \times \mathbb{Z}_2$ is not isomorphic to $\mathbb{Z}_4$ How to display special German characters "ÄÜÖß" in a map? Let $G$ be a group, possibly a singleton. Let $M$ be a set, possibly empty. Let $\mu: M \times G \to M$ be a right group action. Let $1_G$ be the identity of $G$.  I understand 's second definition of faithful as follows:     $\mu$ is faithful if for each $g \in G$ such that $g \ne 1_G$, there exists $x \in M$ such that $\mu(x,g) \ne x$. $\tag{1}$   Later  says if $\mu$ is free and $M$ is a non-empty set, then $\mu$ is faithful.  Question: Given the idea that we can have $M$ as an empty set, I would like to clarify: Are these correct?   If $G$ is a singleton, then every action $\mu$ is faithful, whether or not $M$ is empty. If $G$ is not a singleton, but $M$ is empty, then every action $\mu$ is not faithful. Yesterday I was filming a scene with my phone but suddenly the application crashed and when I try to open the m4v generated it says that is corrupted.  I have downloaded the video files (around 36MB) on my PC and I am trying to open and repair it. Can you suggest me a way to do it?  FFMPEG info  As suggested in comments I try check what FFMPEG says me about that file with this command  ffmpeg.exe -i VID_20120425_144739.m4v -c:v copy -c:a copy out.mp4 2&gt; log.txt   Here it is the result:  ffmpeg version N-40126-ga4b58fd Copyright (c) 2000-2012 the FFmpeg developers   built on Apr 26 2012 03:29:50 with gcc 4.6.3   configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib   libavutil      51. 47.100 / 51. 47.100   libavcodec     54. 15.100 / 54. 15.100   libavformat    54.  3.100 / 54.  3.100   libavdevice    53.  4.100 / 53.  4.100   libavfilter     2. 72.100 /  2. 72.100   libswscale      2.  1.100 /  2.  1.100   libswresample   0. 11.100 /  0. 11.100   libpostproc    52.  0.100 / 52.  0.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 003fc940] moov atom not found VID_20120425_144739.m4v: Invalid data found when processing input   Latest two lines are displayed in red.