From the context of the real numbers we know that the square root of $-1$ is not a real number. Because of this the historical way we approach this is that the concept of complex numbers were created to give meaning to the nonexistence of $\sqrt{-1} = i$ and study the potential implications of such a value. We even knew beforehand how the square root of $-1$ as it existed as a concept. It was merely that it did not exist as an intermediate vale.  When that set was created, certain properties were different from the set of real numbers and other properties (such as ordering) ceased to exist. If some superset of the complex plane were created to give meaning to another currently 'nonexistent' operation, what algebraic properties would we expect to retain? For instance, if one wanted to extend nonexsistent limits into being for which the one sided limits exist, would you only assume them equal to themselves or would you make them equal to limits with similar shapes around the point? Of course that is a hypothetical example, not to be taken as an actual request. The details of that would depend on whether geometric equivalence was the equalizing factor or the sequence used to compute the limit.  I know I have written two questions here. So to summarize:  First: what extensions upon real numbers currently exist other than the complex plane?  Second: How would one go about creating a new extension, and how do people usually work out their properties aside from creative thinking? Is there a formal method that can be used to determine the properties of an extension coming from attempting to give meaning to an intermediate value that is "undefined"?  Note: I couldn't come up with the proper tag so some guidance would be appreciated. I was thinking the tag "equality" or "extensions upon real numbers" or "monexistence" would be good, but those are not available.

In many situations (problems as well as solutions) I encounter the complex number $i$ which many times is defined as $i^2=-1$ instead of $i=\sqrt{-1}$, since it is "more preferred". Does anyone know why? Is it because there are two solutions to the equation $x^2+a=0, \ \ a>0$?


He is sitting at/in the corner of the room.  Which preposition is more appropriate in this example?

Which is correct?     Lying in the corner was the huge lion.       Lying at the corner was the huge lion.   Is there any different in meaning?


We know that when force is perpendicular to displacement, then the work done by it is zero. If this is true, then why do the vegetable vendor (who pushes the cart by applying perpendicular force) feels tired?

I read the definition of  as  $$W ~=~ \vec{F} \cdot \vec{d}$$  $$\text{ Work  =  (Force) $\cdot$ (Distance)}.$$ If a book is there on the table, no work is done as no distance is covered. If I hold up a book in my hand and my arm is stretched, if no work is being done, where is my energy going?


I'm using Ubuntu 16.04. In my computer i can't open Ubuntu Software. I tried to reboot my computer several times but it still doesn't open. I tried to open it from terminal but it shows    What should i do? Please help me.

When running tail -f filename, I got the following message:  tail: inotify cannot be used, reverting to polling: Too many open files   Is that a potential problem?  How do I diagnose what's responsible for all the open files? I have a list of suspect processes, but if they don't turn out to be the culprits, instructions that don't rely on knowing which process to check would be useful.


I have a Dell Inspiron 3521 laptop, it's 1 year old. How can I tell if it's 32-bit or 64-bit? On Dell's website, it is listed as 64-bit, but in the System Information dialog box it displays the system type as x86 which indicates that it's 32-bit.

I have manually installed Windows 7 Ultimate on my AMD on 32-bit, but I am not sure if I have 32 or 64 bit.  My Windows 7 system (CP) tells me I have a 32-bit OS, but that my processor is a AMD Athlon64.   So, do I have a 32 or 64 bit?  Is it better to use 64 bit? I don't think so; a lot of programs tell at their websites 'only 32-bit'. It still works, but that would be because I have installed Windows 7 as 32-bit.


When it is necessary to use an oscilloscope with isolated grounds? For nearly 5 years now, I have been using oscilloscopes with a common ground. But I have no experience in using one with isolated ground.  The question popped when I was going through a spec-sheet for a DSO that the sales person had shared.

Thinking about it: You would never find a "Grounded" multimeter as robust and useful if a path to ground through the multimeter were introduced, modifying the circuit's behaviour and possibly damaging the multimeter with currents.  Why are so many oscilloscopes earth referenced? Upon reading some educational material, a majority of the "common mistakes made by students" are placing the grounding clip incorrectly and causing poor results - when the o-scope is just being used as a fancy voltmeter!  I've heard of a Tek scope having an isolation transformer within.. however ignoring that, and taking in to account that newer DSOs may have plastic cases (isolated from you most importantly I would assume) could I just remove the earthing pin, and install a 1:1 AC transformer inbetween the o-scope and outlet and be on my merry way probing various hot/neutral/earthed sources with no worries about a path to ground any longer through it?


I am using jQuery and sockets to create a chat. This is the event that listens to the socket to send messages to the server that will then be shown on screens and it works.   socket.on('new message', function(data) {         if(data === "") return false;          $chat.append(`${data} <br />`);         $chat.scrollBottom = $chat.scrollHeight;         });   });   and I have the id #chat with a css property:    #chat {         overflow:auto;       }   That helps me to scroll, but the scroll bar stays on the top and does not go down with the messages. What I can do?

I am creating a chat using Ajax requests and I'm trying to get messages div to scroll to the bottom without much luck. I am wrapping everything in this div: #scroll {     height:400px;     overflow:scroll; }  Is there a way to keep it scrolled to the bottom by default using JS? Is there a way to keep it scrolled to the bottom after an ajax request?


Assume that I would like to receive feedback about two different frameworks for Q&A sites. For instance, I would like to know the advantages and disadvantages of two different frameworks such as Question2Answer and OSQA.   Is there a place to ask this kind of question in this community? How should I proceed? I mean in our community usually questions about software recommendations are not very welcome. I know about "software recommendations" but even there is not easy to make an on topic question.

Sometimes I want to learn about a new programming related issue—topics such as DB ORM, search indexer, identity providers, logging, etc.  When I don't know anything about a subject, I ask for benchmarks or comparisons. I got some serious answers like links to tests, pros/cons, and Gartner's reviews. I found these very constructive and helpful. But then the question was blocked or deleted. Sometimes this happens even before I get an answer.  So where would it be more appropriate to ask questions about third party products and/or open source frameworks with which I am completely unfamiliar?


In the 50th anniversary special, after Gallifrey is saved this conversation happens:  WARRIOR: So I won't remember that I tried to save Gallifrey rather than burn it. I'll have to live with that. DOCTOR 10: I won't remember either, so you might as well tell me. DOCTOR: Tell you what? DOCTOR 10: Where it is we're going that you don't want to talk about.  So I'm really confused. Why do the first 10 Doctors, William Hartnell, Patrick Troughton, Jon Pertwee, Tom Baker, Peter Davison, Colin Baker, Sylvester McCoy, Paul McGann, John Hurt, Christopher Eccleston, and David Tennant,  have to forget the events of the episode, but Matt Smith's and Peter Capaldi's Doctors can be the only ones to remember? Every Doctor should remember saving Gallifrey but only Smith's and Capaldi's can remember which is weird.

I've read several posts and I've seen one that says before it was Eleven's turn to take part in the events of 'Day of the Doctor', Gallifrey was most certainly destroyed, and when it came to his turn he re-wrote history and saved Gallifrey. But I've rewatched 'Day of the Doctor' recently and the War Doctor asks if he'll remember saving Gallifrey and the Doctor says no. So I'm a bit confused, I don't want to think that the War Doctor or the 10th Doctor have lost their memories after saving Gallifrey and their life of saying they destroyed Gallifrey was a lie. So did they really remember?


I'm working on a project based on installing a server FTP on Amazon Web Services. I'm doing it through Ubuntu 16.04. No such a matter, everything is doing good so far.  But I got stuck in a step that requires me to type some commands to modify a specific file. I actually typed the commands, but I don't know what to press to save changes and get on the next step. I tried pressing Escape and ControlEnter, but nothing seems to happen. Does anyone have a clue?

I am trying to install Java via the terminal using the guide .  Everything went perfectly fine until "Step 11: Save the /etc/profile file and exit":    I spent maybe 30 minutes figuring out what ^ means (apparently Ctrl), but I cannot understand how that guy called the save command where you can choose yes and no.  I did try ^O, but I didn't get the same result as he did. How can I fix this problem?


I am flying from Bucharest to Tirana, Albana, and will transit at the Sabiha Gokcen airport in Istanbul. I have a 2-hour layover before the connecting flight. Is this enough time to make it to my flight to Tirana?

I'm flying from Moscow to Antalia. There is a 1.25 hour layover in Sabiha airport. in general, would it be sufficient in case of picking up luggage? The air company is the same and I will travel with two small children - if it matters.  It seems that if company is the same then they move my luggage by themselves. Am I right?


I encounter the following error when I try to run PacketTracer.  $ ./PacketTracer7 ./PacketTracer7: ./libcrypto.so.1.0.0: no version information available (required by ./PacketTracer7) Segmentation error (core dumped)   How do I solve this?

I am having some issues with Packet Tracer 7 on Ubuntu 18.04: when I launch it with ./PacketTracer7 within the /opt/pt/bin directory, it opens but close immediately with a lot of:     "Warning: libpng warning: iCCP: known incorrect sRGB profile"   error msgs on the console.  The thing is, I installed PacketTracer7 on Ubuntu 16.04 and I remember that I had that issue with the libqt5multimedia.so.5 dependency, but I was able to find the solution (thanks to askubuntu and google) by installing the dependencies. So, everything perfect with 16.04.  But I'm a bit lost now. I can't realize where the issue come from, because I know the qt5 libs are installed on the system.  This is what I see when I run dpkg --get-selections:  libqt4-xmlpatterns:amd64            install libqt5concurrent5:amd64             install libqt5core5a:amd64              install libqt5dbus5:amd64               install libqt5gui5:amd64                install libqt5multimedia5:amd64             install libqt5multimediaquick-p5:amd64          install libqt5multimediawidgets5:amd64          install libqt5network5:amd64                install libqt5opengl5:amd64             install libqt5opengl5-dev:amd64             install libqt5positioning5:amd64            install libqt5printsupport5:amd64           install libqt5qml5:amd64                install libqt5quick5:amd64              install libqt5quickparticles5:amd64         install libqt5quicktest5:amd64              install libqt5quickwidgets5:amd64           install libqt5script5:amd64             install libqt5scripttools5:amd64            install libqt5sensors5:amd64                install libqt5sql5:amd64                install libqt5sql5-sqlite:amd64             install libqt5svg5:amd64                install libqt5test5:amd64               install libqt5webchannel5:amd64             install libqt5webkit5:amd64             install libqt5webkit5-dev:amd64             install libqt5widgets5:amd64                install libqt5x11extras5:amd64              install libqt5xml5:amd64       I've tried to uninstall pt and the qt5 libs and install everything again, but nothing... the same issue.  Did anybody install PacketTracer7 on Ubuntu 18.04?  I would be very happy to have your help for doing it!  Thanks and forgive me for my poor english :)


I am learning about the derivative function of $\frac{d}{dx}[\sin(x)] = \cos(x)$.   The proof stated: From $\lim_{x \to 0} \frac{\sin(x)}{x} = 1$...  I realized I don't know why, so I wanted to learn why part is true first before moving on. But unfortunately I don't have the complete note for this proof.    It started with a unit circle, and then drew a triangle at $(1, \tan(\theta))$ It show the area of the big triangle is $\frac{\tan\theta}{2}$ It show the area is greater than the sector, which is $\frac{\theta}{2}$ Here is my question, how does this "section" of the circle equal to $\frac{\theta}{2}$? (It looks like a pizza slice). From there, it stated the area of the smaller triangle is $\frac{\sin(\theta)}{2}$. I understand this part. Since the area of the triangle is $\frac{1}{2}(\text{base} \times \text{height})$. Then they multiply each expression by $\frac{2}{\sin(\theta){}}$ to get  $\frac{1}{\cos(\theta)} \ge \frac{\theta}{\sin(\theta)} \ge 1$   And the incomplete notes ended here, I am not sure how the teacher go the conclusion  $\lim_{x \to 0} \frac{\sin(x)}{x} = 1$. I thought it might be something to do with reversing the inequality... Is the answer obvious from this point? And how does step #3 calculation works?

How can one prove the statement $$\lim_{x\to 0}\frac{\sin x}x=1$$ without using the Taylor series of $\sin$, $\cos$ and $\tan$? Best would be a geometrical solution.  This is homework. In my math class, we are about to prove that $\sin$ is continuous. We found out, that proving the above statement is enough for proving the continuity of $\sin$, but I can't find out how. Any help is appreciated.


I have a mesh wich currently looks like this on edit mode:    Even though I haven't activated the Z key to enter wireframe mode, I can see the edges behind the mesh. This is really annoying since I keep accidentally selecting the vertices at the back.  How can I disable this?

I changed my Blender Units to Metric System, but when I'm building things, my meshes are transparent, i.e. I can see through faces like in wireframe even though my wireframe is turned off. All faces have a light white in non-wireframe mode, but I can still see through them.   How do I reverse this?  Another issue I get is this    Looks like clipping is not working properly.


My Problem:  x mod(3) = 2 x mod(5) = 4 x mod(7) = 1 Solve for x   I was given a formula x = (x mod(3) * 70 + x mod(5) * 21 + x mod(7) * 15) mod(105) to solve for x.  I want to know how to derive this formula. I can see a relation between the numbers 35, 21, 15 as part of the 3*5*7 = 105 equation. But how to use this to get the formula, I have no idea.  I was manually able to get the answer by finding the intersecting value of 3 sets.  set 1: All numbers < 105 which will give an remainder of 2 when divided by 3  set 2: All numbers < 105 which will give an remainder of 4 when divided by 5  set 3: All numbers < 105 which will give an remainder of 1 when divided by 7  The only intersection happened with the number 29 which is the answer I got when the formula is applied.

I understand there is a method for solving simultaneous modular equations. For example; $$x = 2 \mod{3}$$ $$x = 3 \mod{5}$$ $$x = 2 \mod{7}$$ We find numbers equal to the product of every given modulo except one of them - giving $5 \cdot 7$, $3 \cdot 7$ and $3 \cdot 5$. We then find the multiplicative inverses of these numbers with modulo equal to the number missing from the product. The numbers found are then 2, 1 and 1 in this case. The value of x is then given by: $$x = 2 \cdot (5 \cdot 7) \cdot 2 + 3 \cdot (3 \cdot 7) \cdot 1 + 2 \cdot (3 \cdot 5) \cdot 1 = 233 = 23 \mod{3\cdot5\cdot7}$$  But I do not understand how this method correctly gives the value of $x$. I understand that the Chinese remainder theorem proves that there is a unique value of $0\le x \lt 3\cdot5\cdot7 \mod{3\cdot5\cdot7}$ but can someone please explain why this method finds this value of x?


When I was reading the first volume of the theoretical minimum by Leonard Susskind, I encountered upon this:     But when I checked Griffiths and all my other electricity and magnetism books, it showed $$\mathbf F=q({\mathbf v} \times \mathbf B)$$ instead. Where did the extra factor of $c$ come from? Which one is the correct equation? Are both equations equivalent? Or was that a misprint in Susskind's book?

The usual Lorentz force expression I am familiar with is this:  $$\vec F=q(\vec E+\vec v \times \vec B)$$  I have seen some other versions lately that include an extra factor $1/c$:  $$\vec F=q\left(\vec E+ \frac{1}{c} \vec v \times \vec B\right)$$  What is this $c$ and how is it included? I guess other parameters in the expression are also different from the top expression for this to fit?  Example of a text snippet where I have run across this extra parameter:


How can I show that $(\mathbb Z /n\mathbb Z)^*$ is cyclic or not for a given $n$?  If $n$ is small like 10 or 11 then we can compute the number of elements and then can find an element whose order is $\phi(n)$. But if $n$ is large enough then how can I say it is cyclic or not?  Here $(\mathbb Z /n\mathbb Z)^*$ denotes the set of all units in $\mathbb Z/n\mathbb Z$.  Need some help please..

When can we say a multiplicative group of integers modulo $n$, i.e., $U_n$ is  cyclic?   $$U_n=\{a \in\mathbb  Z_n \mid \gcd(a,n)=1 \}$$  I searched the internet but did not get a clear idea.


i have web application that i wants to map two URL path  first  {domain} ex :- www.youdomian.com for home page {domain}/{id} :- www.youdomain.com/1234 for second page also have httphandler  how can i registered this route   this is what  have done. i commented the first line to get work httphandler  //routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute("Shorten", "{id}", new {controller = "SecondPage", action = "Index"});  routes.MapRoute("Default", // Route name                 "{controller}/{action}/{id}", // URL with parameters                 new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults   problem is when i call handler it's redirected to secondpage route how can i by pass this

Here is my scenario.  For the example lets say that I need to return a list of cars based on a search criteria.  I would like to have a single View to display the results since the output will be the same, but I need several ways of getting there.  For instance, I may have a Form with a textbox to search by year.  I may have another separate page that contains a hyperlink for all red, Toyota cars.  How do I handle these multiple scenarios in the same View and Controller.  My dilemma is that the search could contain several options… year, make, model, etc but I don’t know where to put them.  What is the best approach for this?  Should I define the parameters in the routing or go with query strings, etc?


When I measured the optical pulse using photo-detector and oscilloscope, some negative voltage was measured after strong peak. What did I get negative voltage? How is it possible?

As I was trying to validate our pcb design, I measured the impedance matching on the digital transmission lines, and got stuck with the oscilloscope not showing what I expected. We are using the PicoScope 4227, but I suspect that the strange measurement is not directly related to the specific oscilloscope but more to general on how to measure digital signals.  My setup is as follow: I measure the output-pin of an FPGA with both oscilloscope input A and B.  Input A (blue) is measured using the oscilloscope probe set to x10.  Input B (red) is measured using a 50-ohm coxial cable terminated at the scope input with 50-ohm.  As you can see, Input B seems correct, no reflection ect.  But Input A (the probe) has some overshoot, and ringing.  The probe should be calibrated and valid to 250MHz, so I don't get was is wrong. ?  I suspect that the small probe-clip adds some inductance, and therefore we see the ringing. But I really don't know.    EDIT After reading your answers, I walked got into our lab storage and started looking, and found a probe GND clip like the one showed in the answer below.   When I use that clip, I get the output below. Which is really a huge improvement.


In Mootools, I'd just run if ($('target')) { ... }.  Does if ($('#target')) { ... } in jQuery work the same way?

How can I check the existence of an element in jQuery?  The current code that I have is this:  if ($(selector).length > 0) {     // Do something }   Is there a more elegant way to approach this? Perhaps a plugin or a function?


I am debugging a PHP app that generates quite a complicated javascript webpage. During the debugging a pop-up message window appears:  It is not very informative - as I do not know what has overflowed. I use xampp, xdebug, explise and external browser. Is there any way to find out what process has opened this window?

I'm working on re-purposing a Win10 laptop that has some security feature whereby all USB disks have to be approved and registered. I cannot remove that feature because I cannot see which app, service or setting is doing it. When I plug in a USB disk I get a pop-up saying the disk is not registered and cannot be used etc. The pop-up just sits there. I open Task Manager and it just has those zillion processes running. None of their names or resource usage patterns tips me off as the process that is displaying that pop-up. If I press alt-tab it just shows that pop-up as one of the running Apps but no indication of the name or location of any of the Apps. If there's visibly a Window opened up on your desktop is there a way to track down which App owns or opened that Window?  BTW it's not a browser or browser notification.  It has to be some kind of background security SW. A friend of mine was gifted her work laptop when she got laid off with the caveat that it was strictly as is. The thing is like Fort Knox and I've been unraveling all their security stuff. But I cannot find the origin or enforcer of this USB limitation.


Would it be useful for newbies to have an area for practicing question and comment formatting?  I am thinking of 2 different areas - 1 for each purpose. I think I need it...  Every time (so far) that I've answered a question or added comments, it is a struggle to get the formatting right. Usually I go to re-edit the answer and once, I've collided with some helpful soul, who was trying to "fix" my answer.

I have noticed a behaviour that may or may not be a  bug. It is a discrepancy between the preview and the rendered result, which is why I would need to post a question to check it out.  Is there an official place to do that?


Show that $f$ is uniformly continuous if $\displaystyle \lim_{x \to 0^{+}} f(x)$ exists.  I can show $f$ is uniformly continuous on $(0,2]$,but i am not sure that to use the condition $\displaystyle \lim_{x \to 0^{+}} f(x)$ exists.

Let $f(x)$ be continuous on $(0,1]$. Show that $f$ is uniformly continuous IFF $\displaystyle \lim_{x\to0^+} f(x)$ exists.    Thoughts:  Backward Proof:  Let another function $\overline f(x)$ be continuous on $[0,1]$ which is equal to $f(x)$ plus the limit point. Thus the limit exists and it is uniformly continuous. So, as $f(x)$.  Forward Proof: I Don't really have any idea...??  Please help guys


Is there a way to import Sketchup scenes into Blender as cameras?  I can get the geometry into Blender without any problems; my issue is that I'd also like to bring along the scene viewpoint as a camera.   The data obtained from SketchUP API is like this:  mod = Sketchup.active_model vue = mod.active_view cam = vue.camera  cam.eye > Point3d(240.719, -236.069, 102.276)  cam.target > Point3d(-285.372, 553.004, -82.0446)  cam.fov > 35.0   What is a convenient way to convert this into a new camera?

I am new with Blender. I changed to it because now I am using Ubuntu. Previously on Windows I used to work with SketchUp, and I still have many projects, that I would like to import *.skp into Blender to continue modeling and or rendering.  Is there any way how I could import SketchUp's .skp file into Blender?


I'm looking for something similar to Snipping Tool for Ubuntu that has the highlight functionality. Screenshot does not have this functionality and I'd like to avoid using an intermediate tool like Gimp to highlight/write on screenshot image.   Is there a tool for ubuntu/linux that can take a screenshot and has highlighting and/or other write functionality?

I have noticed that many people use images in their Ask Ubuntu answers. What software are people using?


I just did a df to check the disk usage on a new 16.04 installation and noticed the following result.  The used and available on /dev/sda2 don't add up to the partition size.  Even if I do 836120968-14720428-778903724, the result doesn't seem to match others.  Can anyone help me interpret why the available is much less than total - used?  FYI, I partitioned a 1TB disk fully into 4 partitions sda1-4.  I also disabled the swap since I have enough memory and don't want the swapfile on the SSD.  Filesystem     1K-blocks     Used Available Use% Mounted on udev            32800684        0  32800684   0% /dev tmpfs            6565404     9840   6555564   1% /run /dev/sda2      836120968 14720428 778903724   2% / tmpfs           32827012     8240  32818772   1% /dev/shm tmpfs               5120        4      5116   1% /run/lock tmpfs           32827012        0  32827012   0% /sys/fs/cgroup /dev/sda1         523248     4756    518492   1% /boot/efi /dev/sda3       29282528    24912  29257616   1% /fat32 /dev/sda4       97305376       32  97305344   1% /ntfs tmpfs            6565404       40   6565364   1% /run/user/1001

As the output of df -h shows here, something is eating up 5GB of free space. So, it's not available to use.   I'm also noticing sometimes that the hard disk gets filled up to 100% sometimes. So, I had to restart the machine or delete some unncessary files. Only noticed these in /home partition. Don't know whether these two are related, but appreciate if anyone can put some insight into this.  $ df -h Filesystem            Size  Used Avail Use% Mounted on /dev/sda8             100G   92G  2.7G  98% /home


It's possible the integral bellow. What way I must to use for solve it.  $$\int \sin(x)x^2dx$$

How would I integrate the following?  $$\int_0^{\pi/2} x^2\sin(x)\,dx$$  I did $u=x^2$ and $dv=\sin(x)$  I got  $x^2-\cos(x)+2\int x\cos(x)\,dx.\quad$ I then used $u=x$ and $dv=\cos(x).$  I got   $$x^2-\cos(x)+2[x-\sin(x)-\int\sin(x)]$$  then  $x^2-\cos(x)+-2 \sin(x)(x)-\cos(x)\Big|_0^{\pi/2} =\dfrac{\pi^2}{4}-0-2$


The goal is to apply a CSS style to iterated <div>s to display that the field has been modified. I think I am close but my indexVar is returning the error "Cannot read property 'dataset' of null" in my controller. This leads me to believe I'm not handling the indexVar properly.  Component  <aura:iteration items="{!v.layoutAPIFieldsList}" var="e" indexVar="idx">     <lightning:layoutItem>         <div aura:id="editDivId" data-record = "{!idx}">             <lightning:inputField aura:id = "inputField" name = "{!e.APIName}" onchange = "{!c.changeInputField}" />          </div>     </lightning:layoutItem>   </aura:iteration>   JS Controller  changeInputField : function(component, event, helper){        var selectedItem = event.currentTarget;      var index        = selectedItem.dataset.record;     var selectedIdx  = component.get("v.layoutAPIFieldsList")[index];     $A.util.addClass(selectedIdx, 'unsavedChanges'); },   CSS  .THIS .unsavedChanges {     background-color: #f9ffb8; }

I've been working on a pretty complicated component, and I've had all kinds of trouble simply trying to identify which element is currently being used. After all sorts of experiments, I found a really nifty property on event, the "path" attribute. It seems to be a list of all elements that the event has gone through, and actually includes the data I'm looking for. However, I don't see this in the documentation anywhere, so I want to know if this attribute is reliable.  Here's some demo code:  <aura:application extends="force:slds">     <aura:attribute name="items" type="Integer[]" default="[1,2,3]" />     <aura:attribute name="currentIndex" type="Integer" />     <aura:iteration items="{!v.items}" var="item" indexVar="index">         <div data-value="{!index}" >             <lightning:input onfocus="{!c.focused}" name="demo" label="Text" />         </div>     </aura:iteration>     <lightning:input disabled="true" readOnly="true" type="number"                      value="{!v.currentIndex}" label="Last Focused Item" /> </aura:application>     ({     focused: function(component, event, helper) {         var index = event.path.reduce(             (a,c) => c && c.dataset && c.dataset.value !== undefined?              c.dataset.value: a, null);         component.set("v.currentIndex", parseInt(index));     } })     Does anyone know where I can find the documentation for this, or otherwise figure out if this supported behavior? I'd rather not use a feature that will be patched out of existence later, and it would finally solve  about how to actually use a supported method that doesn't involve using a class, style, or name attribute, which should ideally be used for their intended purpose.


Consider the following ridiculous example:  \documentclass{article}  \begin{document}  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa  \end{document}   This produces an overfull hbox. I want to allow the word to break at any point, without a hyphen.  Of course, I can work around like this:  \documentclass{article}  \begin{document}  a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a\hspace{0pt}a  \end{document}   But this is far too ugly.   (I want to enable this only for a particular word, because I don't want my whole document to break.)

Here, it is just a example. I have a line:  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa   Now, I want to let LaTeX automatically wrap the line according to the width of the text block/margins.


shows the Japanese StackOverflow as "uncategorized". It should be listed in the "Technology" tab, along with the English and the Portuguese language sites.

I can imagine that it is a little bit hard if you're not a native Japanese or Russian speaker to figure out where those new sites are and what they are about. Putting them under uncategorized is not what those new sites deserve.              I understand from previous incidents  that  end up in this category for a while.    Can we make sure that new sites get properly categorized?


Can you please explain me what is 4.5 - 5.6G in a lense description.And how it is different from other generation of like 3.5G or 6.5.  "Nikon AF-S DX NIKKOR 55 - 300 mm f/4.5-5.6G ED VR Lens"

When looking at a lens name, there are a lot acronyms describing its features (often specific to the manufacturer).   Examples, Nikon: Nikon AF-S DX 16-85mm VR f/3.5-5.6G IF-ED Nikon AF-I 600mm f/4D IF-ED Nikon AF-S VR Micro-NIKKOR 105mm f/2.8G IF-ED    Examples, Canon: Canon EF 85mm f1.2L USM Mark II Canon 70-300mm f/4.5-f/5.6 DO IS    Examples, Sigma: Sigma 150mm F2.8 EX APO DG HSM Macro Sigma 70-200mm F2.8 EX DG OS HSM Sigma 50-150mm F2.8 EX DC APO HSM II    How do I decipher these lens codes from different manufacturers?


$$1 (N) + 2(N-1) + 3(N -2) + \cdots + i(N - i + 1) + \cdots + N (1)  $$  I need to write it in simplest form?  here 1(N) means 1 multiply by N

While thinking about  I found out that this equality might be useful there: $$n\cdot 1 + (n-1)\cdot 2 + \dots + 2\cdot (n-1) + 1\cdot n = \frac{n(n+1)(n+2)}6$$ To rewrite it in a more compact way: $$\sum_{k=1}^n k(n+1-k)=\frac{n(n+1)(n+2)}6.$$  This equality is relatively easy to prove: $$\sum_{k=1}^n k(n+1-k)= (n+1)\sum_{k=1}^n k - \sum_{k=1}^n k^2 = (n+1) \frac{n(n+1)}2 - \frac{n(n+1)(2n+1)}6  = n(n+1) \left(\frac{n+1}2-\frac{2n+1}6\right) = n(n+1)\frac{3(n+1)-(2n+1)}6 =  \frac{n(n+1)(n+2)}6.$$ (We only used the known formulas for the   and the .)   Are there some other nice proofs of this equality? (Induction, combinatorial arguments, visual proofs, ...)     EDIT: Now I found another question which asks about the same identity:  (I have tried to search before posting. But the answers posted here so far gave me some new ideas for good keywords to search which lead me to finding that question.) The questions are, in my opinion, not exact duplicates since the other question asks specifically about combinatorial proofs and my question does not have that restriction. But I agree that this is a very minor distinction. In any case, if you think that one of them should be closed as a duplicate, then you can vote to close. I will refrain from voting to close/reopen on this question. (If one of the two questions is voted to be a duplicate of the other one, they probably cannot be merged, since the summation variables are off by one.)


I am just a teenager, and have heard my elders talking of . I want to know what is this theory? Is it something related to relativity? (which i dont think i understand concept mathematically) Can someone attempt to explain string theory in layman’s language?

How would you explain string theory to non-physicists such as myself? I'm especially interested in how plausible is it and what is needed to successfully prove it?


I have the following definition in my latex document:  \newcommand{\emp}{\texttt{EMP}}   This eats the space after it. For example, if I type  Assume that relation \emp is fragmented   The latex output is    Assume that EMPis fragmented (notice the lack of space after EMP).   If I change the definition to put space after EMP like this:  \newcommand{\emp}{\texttt{EMP} }   The above example works, but then I have weird spaces before punctuations that follow \emp (e.g., in \emp, I have an extra space before ,).  Is there a proper way of defining these so I won't have this problem?

I have a definition:  \newcommand{\arnold}{Arnold Schwarzenegger}   When I refer to it by:  \arnold is a   it is rendered as:   Arnold Schwarzeneggeris a    In order to have a space in front of "is" I would need to write  \arnold\ is a   Is there some other shorter way?


I am using a non-public class that has an option named english for setting up certain texts.  I wish to use babel for hyphenation and to specify the language (variant) as british.  However, \usepackage[main=british]{babel}  produces the warning  Package Babel Warning: The package option `english' should not be used  (Babel)                with a more specific one (like `british') on input line 4.  I get the same warning if I try \PassOptionsToPackage{main=british}{babel} before loading the documentclass. Here is a minimal working example using the article class instead: \documentclass[english]{article}  \usepackage[main=british]{babel}  \begin{document}  Some text.  \end{document}  What is the correct way to load babel with british when the document class uses english to set other document features that I need.

Within a package I'm making, I want ignore the default draft behavior and write my own. I have tried:  \DeclareOption{draft}{ MYCOMMANDS ... \OptionNotUsed } \ProcessOptions   If draft is used, my commands are run, but all other features of the draft option (e.g. disabling images and hyperlinks) are still enabled.   I want to disable the draft option from the document class level from my package and prevent it from being passed to any packages. Is this possible to do from my package?


I am trying to install libgtk-3-dev and receving the following message: user@nvidia-jetson-tx2:~/projects/realsense/librealsense$ sudo apt-get install libgtk-3-dev [sudo] password for user:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help resolve the situation:  The following packages have unmet dependencies:  libgtk-3-dev : Depends: libgtk-3-0 (= 3.22.30-1ubuntu1) but 3.22.30-1ubuntu4 is to be installed                 Depends: gir1.2-gtk-3.0 (= 3.22.30-1ubuntu1) but 3.22.30-1ubuntu4 is to be installed                 Depends: libpango1.0-dev (>= 1.40.5) but it is not going to be installed                 Depends: libatk-bridge2.0-dev but it is not going to be installed                 Depends: libcairo2-dev (>= 1.14.0) but it is not going to be installed                 Depends: libxkbcommon-dev but it is not going to be installed E: Unable to correct problems, you have held broken packages.  If my understanding is correct, the defined dependencies in libgtk-3-dev are looking for older version of libgtk-3-0 and gir1.2-gtk-3.0. What would be the best course of action for these two packages:  donwgrade libgtk-3-0 and gir1.2-gtk-3.0 force the installation of libgtk-3-dev by somehow ignoring the dependencies (not sure if this is possible at all) modify the dependency (if possible) something else?  What about the other 4 packages (libpango1.0-dev, libatk-bridge2.0-dev, libcairo2-dev, libxkbcommon-dev)? Where they not installed because version criteria for libgtk-3-0 and gir1.2-gtk-3.0 was not met or potentially there is some other issue with those as well? Can anyone give me some guidence on how to proceed? Thanks a lot in advance!

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


and when i am dividing a path using pathfinder tool its getting divided but its seems there is a dotted line between two path How to solve these thing. and yes i didnt use strock here.

I'm trying to perfectly overlap two images, one complementary of the other, but apperas a white stripe in the conjunction of the path, all points are perfectly aligned how can I fix?


What do we call person who buys or collects branded things like shirts, shoes, cars etc...

Is there a word for people who buys things because they are more expensive or because they are specific brand or label?  These people don't buy the items because they are higher quality. They buy them because they want others to think they are "cool." These people can often hardly afford such items and this money could be better spent on other items.  This is opposed to other people who might buy more expensive things because they are of better quality. (Who would rarely buy popular brands because their prices are inflated simply because they are popular.)


I understand basics of how DNS works. My ISP finds out recursively, that my domain xyz.com is assigned with two nameservers:  ns1.xyzprivatens.com ns2.xyzprivatens.com  Then it asks one of those two for the xyz.com IP and communicates with server using this IP.  Now is the interesting question. How IPs for the nameservers themselves are resolved?

This is a  about DNS glue records.   What exactly (but briefly) is a DNS glue record?  Why are they needed and how do they work?


Assuming that there is an inelastic, very low mass, very long, solid rod which is 150 million km long. This distance requires approximately 8.333 minutes for light to travel. If I apply a force at one end, how long is the time taken for the another end to receive the effect of the force? I know that it won't be faster than speed of light but why? Correct me if I have made any mistake.

Is it possible for information (like 1 and 0s) to be transmitted faster than light?   For instance, take a rigid pole of several AU in length. Now say you have a person on each end, and one of them starts pulling and pushing on his/her end.   The person on the opposite end should receive the pushes and pulls instantaneously as no particle is making the full journey.  Would this actually work?


I'd love to extract multiple matches from one block of text using regex in Ruby.  Here's an example;     The regex caught two matches in the example.   host: test01.com service: 000001   The regex seems okay, so now I will apply with Ruby.  -- [5] pry(main)> t.match(/Service\|(?<service>\d*)\|/)[:service] => "000001"  [6] pry(main)> t.match(/Hostname\|(?<host>[^|]*|)/)[:host] => "test01.com" --   It's running and it's totally expected with single match, but how about multiple matches?  [7] pry(main)> t.match(/Hostname\|(?<host>[^|]*)\||Service\|(?<service>\d*)\|/) => #<MatchData "Service|000001|" host:nil service:"000001">   It seems that It does not work. (host:nil)  Any ideas to extract multiple matches in Ruby?

Is there a quick way to find every match of a regular expression in Ruby? I've looked through the Regex object in the Ruby STL and searched on Google to no avail.


/dev/dm-1 861G 325M 817G 1% /home   I have a separate luks encrypted /home partition with 861G allocated out of a 931G HDD.   The usage is around 1%, but the availabe space is only 817G.   I am having this problem with multiple Arch-based distros like Manjaro, Antergos. I reported this on their forums, but couldn't find a solution yet. They concluded this might be a problem with inode configuration. So I think this must be a problem irrespective of distros.   Is it possible to configure a separate /home partition on a 1TB HDD?  Why is the reported available space only 817G out of allocated 861G?

I understand that by default, newly created filesystems will be created with 5% of the space allocated for root. I also know you can change the defined space with:  tune2fs -m 1 /dev/sdXY   What I'm curious about though, is what the actual purpose for this reserved space is. Does it serve any practical purpose which would merit more than 5% space in some circumstances?  The reason I've stumbled upon this question is that we recently built a 1TB filestore, and couldn't quite figure out why a df -h left us missing 5% of our capacity.


I have a batch script variable like this:  Set myvar=hello\nworld   And when I echo myvar, i get the whole hello\nworld literally. How can I ask it to parse my \n and intrepret it as a new line character, so that I can echo that in two lines?

How can you you insert a newline from your batch file output?  I want to do something like:  echo hello\nworld   Which would output:  hello world


I have a hp pavillion 15 n203tx with preinstalled Windows 8.1.   I installed Ubuntu 14.04 in it, and then it used to show a GRUB menu every time I turned on the machine. The menu said something like:  1. Ubuntu  2. Advanced options for Ubuntu  3. Windows Boot Manager(on /dev/sda2)  4. System Setup   Everything was working well. If I wanted to run Ubuntu I chose the Ubuntu option and if I wanted to boot Windows then I chose the third option of Windows Boot Manager.  Out of curiosity once I tried that last option-system setup, and a new menu loaded up, a startup menu showing the following options-   1. f1 system information  2. f2 system diagnostics  3. f9 boot device options  4. f10 bios setup  5. f11 system recovery  enter- continue setup   then I pressed enter and Windows started booting. Since then, my system is booting directly to Windows without showing the GRUB menu.   If I want to see that grub menu, I have to press the esc key on starting my system. Then the startup menu appears (which I have mentioned above) and I have to press f9. Then I am presented with a boot menu options screen with the following options:  1. OS boot manager 2. Ubuntu 3. Boot from EFI file   I have to select the second option to get to the GRUB menu.   I want my system to work as it did earlier.

I installed Ubuntu alongside Windows but I did not disable secure boot as someone told me it could cause problems with boot loader. So when installation finished and I rebooted, the system went straight into Windows. I went to Ubuntu IRC Support and they told me to turn off the secure boot and reinstall Ubuntu. I did that but my system still boot into windows.  This is a picture of partitions on my system:    This is my first Ubuntu install on my new laptop. I followed everdaylinux guide to install it and I used something else option.


I am running Ubuntu 12.04.3 on a 64-bit machine with an nvidia graphics card.  Today I installed updates which included updates to one of the Nvidia packages. After it got done building the new modules with dkms I logged out but could not get the greet. So I rebooted and was thrown to a command line. If I tried to restart lightdm from /etc/init.d/lightdm I was just shown the boot logging screen. If I tried to run start lightmd I just got "restart: Unknown instance:"  So I uninstalled nvidia-* and then installed nvidia-common nvidia-settings and nvidia-304. Finally I ran sudo nvidia-xconfig. After it installed and I rebooted I can now get the lightdm greet. However, no matter which desktop I choose the screen just goes black and then brings me back to the greeter. I have tried Unity, Unity-2D, Gnome, and Gnome Classic (No Effects) all with the same result.  I do not see any problems reported in /var/log/lightdm/lightdm.log, however /var/log/lightdm/x-0-greeter-log does show the following, which I am not 100% sure is relevant.  [+0.96s] CRITICAL: ido_calendar_menu_item_set_date: assertaion 'IDO_IS_CALENDAR_MENU_ITEM(Menuitem)' failed

I upgraded my ubuntu from 11.04 to 11.10 via mounting the latest alternate CD image released on Oct. 13 as the final standard version and running the cdromupgrade prompt successfully, with full latest upgrades installed before ending the distribution upgrading process and rebooting. After reboot, the new lightdm showed up as expected, and I could choose the login shell from a menu containing "ubuntu", "ubuntu 2D", "recovery console", "kde workspace", "cairo-dock with effects", "cairo-dock without effects", etc. next to my name which corresponds to my username.  HOWEVER, for example, I chose "ubuntu" (as the default selection) and input the correct (if not correct, the lightdm would ask you to input again, but it did not do so, I have tried) password and entered. The screen splashed to the black screen of the background text interface of gdm for a very short interval and then returned back to the interface of lightdm without my user account logged in and appeared as if I have not done anything on the laptop. Neither could I log in as a guest user as the same black screen splashed and lightdm reappeared.  Before the upgrade, I could run gnome 2, kde, unity all quite well on the laptop, but the status quo is that no one from the menu prompt beside my name can log in to my account, including the "recovery console".  Actually I can switch to the ttys and log in my account with my username and passcode normally, as can run all commands in the tty (I am currently doing this). I can also act like a superuser via the "sudo" command and get a # prompt via the "sudo -i" command, with the correct password, no problem.  In the root prompt, I can run "service lightdm stop" and "startx" to a root unity UI successfully (that is the way how this passage comes out), but in the $ prompt, after running "service lightdm stop" and "startx", it simply appears "No protocol specified" endlessly and no GUI appears.  I found the package "gnome-shell" not fully installed and fixed it, but it did not help, simply resulting in a selection in the menu which cannot access my account as its companions.  I have made all the packages in my laptop up-to-date and no updates should be installed.  My device is ThinkPad X61, with all its functions running well on all previous ubuntu distributions since 10.04 LTS. I had upgraded my os from 10.04 LTS to 10.10 in the way I performed today without any unexpected results one year ago.  I suspect it is the newly integrated lightdm that set these obstacles, and I want to get this bug fixed, please help!


Is there a way to (from the command line) continuously dump new rows added to a table?  As a comparison, in Bash we have tail -f to 'live-dump' a file as it gains data.  How could this be done for a MySQL table without a continuous loop to check for new rows?

It was decided that we should move to using a (MySQL) database for our application logs (it is a Java app using the logback lib). I am hoping to find something like tail -f that I can use with a specific table in that database that will show me new rows as they are added (similar to how tail -f worked on log files).


Imagine you have a photon with momentum $p$ which hits a mirror $M$ and is reflected back. Since $M$ is at rest in your frame of reference the total momentum of the system pre-reflection is $p$ and post reflection is $-p$. This seems quite odd to me and a clear violation of conservation of momentum. How this can be resolved: The mirror begins to move/absorbs some momentum after being hit by the photon, but if the photon was reflected with momentum $p$ then we end up having conservation of kinetic energy being violated. The only conclusion that's reasonable is the photon being reflected back has a different (probably lesser) momentum after hitting the mirror and the mirror then picks up some positive momentum, so that the sum of the momenta remains constant and the sum of their kinetic energies remains constant. Is this actually what happens? And if so does that mean that almost all mirrors are heating up when they are reflecting photons?

I was readng Wikipedia article (English one) about radiation pressure because there is something I still cannot figure out. As I understand it, radiation pressure emerges from conservation of momentum. Photons or electromagnetic waves possess momentum and when they are absorbed, reflected or even emitted, the aborber/reflector/emitter experiences a pressure that is proportional to the irradiance (in watts per square meter). OK. In the case of a perfect reflector that does nothing but reflecting incoming radiation, it would seem the reflector is pushed and the radiation is reflected in opposite directions. But the radiation has not lost anything, it has only changed direction. And I do not understand how something can be set in motion (the reflector), which amounts to do work, yet the source of this work does not lose energy. I mean, if the radiation, after a U turn, meets a second reflector, it would have pushed two reflectors a way, yet it would continue in its original direction as if nothing happened...? What am I missing here? Should not photons lose something?


Let $T\in\mathbb{R}^{n\times n}$, $\rho(T)$ denote the spectral radius of $T$ and $\rho \in \mathbb{R}_{++}$. Show that \begin{align} \rho(T) < \rho \end{align} if and only if there exists a $P\succ0$ such that \begin{align}  T^{\rm T}PT-\rho^2P \prec 0. \end{align} Sufficiency: Let $\lambda \in \text{sp}(T)$ and $x$ be an associated eigenvector. We have: $$x^T T^T P T x - \rho^2 x^T P x < 0 \implies (Tx)^T P (Tx) < \rho^2 x^T P x$$ and $$(Tx)^T P (Tx) = (\lambda x)^T P (\lambda x ) = \lambda ^2 x^T P x$$ As $x^T P x>0$, we get $\lambda ^2 < \rho^2$, i.e. $|\lambda| < \rho$. We conclude that $\rho(T) < \rho$ and proves the sufficiency. Necessity: Suppose that $\rho(T) < \rho$. Suppose towards a contradiction that for each $P\succ0$ it holds that \begin{align}  T^{\rm T}PT-\rho^2P \succeq 0. \end{align} Let $x\in\mathbb{R}^{n}\setminus\{0\}$ be an eigenvector of $T$ with eigenvalue $\lambda$ such that $|\lambda| = \rho(T)$. Then it holds that \begin{align}  x^{\rm T}T^{\rm T}Tx-\rho^2 x^{\rm T} x \geq 0, \end{align} since $P=I\succ0$. This implies that \begin{align}  |\lambda| \geq \rho > \rho(T), \end{align} i.e. a contradiction. This proves the necessity.

Assume $T \in \mathbb{R}^{d\times d}$. Let $\rho(T)$ be the spectral radius of $T$ and $\rho \ge 0$. Prove that  $\rho(T) < \rho$ if and only if there exists a $P \succ 0$ satisfying $T^TPT - \rho^2 P \prec 0$.  I can prove the Necessity: If $P = I$, for any $x \in \mathbb{R}^d$,   \begin{equation} x^T T^T P T x - \rho^2 x^T P x = \| Tx \|^2 - \rho^2 \| x\|^2 < 0 \end{equation} so $T^T PT - \rho^2 P \prec 0$  I get stuck in proving the Sufficiency.


I am running Ubuntu 18.04 and want to install a specific version of node using snap. I have installed this version successfully but when I run   node --version   I get the version I have installed using apt. How can I get it to use the node executables installed with snap and not the ones in '/usr/bin'? I've tried adding the path to the snap install to the PATH variable but it keeps picking the one installed by apt. I tried purging the the apt install but that didn't work because of reasons, and I kind of feel I shouldn't have to. Any suggestions? I can run node with:  snap run node   but what I wan't is when typing   > node   it should use the snap install. And when I run:  > which node   it should resolve to something like '/snap/nodejs/current/bin' and not '/usr/bin/node'

I ran into a problem today when I decided to use npm update -g in a nodejs app directory. This was a bad decision, because it caused me to run into a .   The solution is to reinstall nodejs and npm. Unfortunately when I go to install npm using sudo apt-get install npm it doesn't work.  The full error in the terminal is here:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that  some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies:  npm : Depends: nodejs but it is not going to be installed    Depends: node-abbrev (>= 1.0.4) but it is not going to be installed    Depends: node-ansi but it is not going to be installed    Depends: node-archy but it is not going to be installed    Depends: node-block-stream but it is not going to be installed    Depends: node-fstream (>= 0.1.22) but it is not going to be installed    Depends: node-fstream-ignore but it is not going to be installed    Depends: node-github-url-from-git but it is not going to be installed    Depends: node-glob (>= 3.1.21) but it is not going to be installed    Depends: node-graceful-fs (>= 2.0.0) but it is not going to be installed    Depends: node-inherits but it is not going to be installed    Depends: node-ini (>= 1.1.0) but it is not going to be installed    Depends: node-lockfile but it is not going to be installed    Depends: node-lru-cache (>= 2.3.0) but it is not going to be installed    Depends: node-minimatch (>= 0.2.11) but it is not going to be installed    Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed    Depends: node-gyp (>= 0.10.9) but it is not going to be installed    Depends: node-nopt (>= 2.1.1) but it is not going to be installed    Depends: node-npmlog but it is not going to be installed    Depends: node-once but it is not going to be installed    Depends: node-osenv but it is not going to be installed    Depends: node-read but it is not going to be installed    Depends: node-read-package-json (>= 1.1.0) but it is not going to be installed    Depends: node-request (>= 2.25.0) but it is not going to be installed    Depends: node-retry but it is not going to be installed    Depends: node-rimraf (>= 2.2.2) but it is not going to be installed    Depends: node-semver (>= 2.1.0) but it is not going to be installed    Depends: node-sha but it is not going to be installed    Depends: node-slide but it is not going to be installed    Depends: node-tar (>= 0.1.18) but it is not going to be installed    Depends: node-which but it is not going to be installed E: Unable to correct problems, you have held broken packages.   What can I do to get npm properly installed and running again?  Thanks.


I would like to implement the a phone number validation to a field in my application in java such that the field allows only the phone number in the format "+543353453".  I would like to do it using Regular expressions but Regex are a bit confusing to me.   The below code does not work.  public static void main(String args[]) {         String a[]=new String[]{"+90030","3434","+403403"};      String regEx="\\+\\d{9}";     pattern = Pattern.compile(regEx);      for(int i=0;i<a.length;i++)     {         boolean matches=pattern.equals(a[i]);         if(pattern.equals(a[i]))             System.out.println("Phone number is valid"+a[i]);            else             System.out.println("Phone number is invalid"+a[i]);         }      } }

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I just have made an ad banner in photoshop (width 1000px, height 250px) and sent it to the developer, but after an hour he said that the file that I have sent to him opens very slowly because it weights too much (it was saved in PNG and weighed 600KB)  After that I resaved it in JPEG, with medium size and it started weighing 80KB, but the developer said that when he puts it on the web site, it loses the quality and he can see the pixels.  What can be done to resolve this problem?

Web sites can contain JPEG, GIF,PNG, SVG format graphics. Which ones should be used, and when?


(Note that I have used bold text frequently simply to highlight the key points of my question for those who do not have the time to read through it thoroughly (it is not very long, however); I hope this is not considered offensive.)  There are many textbooks on multivariable calculus. However, some textbooks on multivariable calculus do not focus very much on the theoretical foundations of the subject. For example, a textbook might state a result along the lines of "the order of partial differentiation is immaterial" without proof and ask the student to use this rule to solve problems. Similarly, theorems such as those due to Green and Stokes are often not proved in their full generality.   Therefore, I ask the following question:      What are some good theoretical   multivariable calculus textbooks?   Since "theoretical" is somewhat ambiguous, let me state the following criteria which I would like a "theoretical" textbook on multivariable calculus to satisfy:   The textbook should be rigorous and it should not state a theorem without proof if the theorem is proved in at least one other multivariable calculus textbook. (Of course, the textbook may omit certain theorems; however, this criterion at least ensures that major theorems in multivariable calculus are not stated without proof and used purely for the sake of computations. Also, this criterion permits the textbook to state an interesting theorem if it is beyond the scope of all multivariable calculus textbooks.) The textbook should be primarily based on developing the theoretical foundations of multivariable calculus; therefore, applications such as learning how to compute the partial derivative of a function, learning how to solve extremum problems, learning how to compute etc. should be kept to a minimum. In particular, the textbook can assume that the reader has already seen at least an informal treatment of the subject where these aspects are emphasized. The textbook should have a rigorous treatment of differentiability in $n$-dimensional Euclidean space (e.g., the inverse and implicit function theorems should be proven), Riemann integration in $n$-space, and differential forms (e.g., Stokes theorem should be proven). It would also be a bonus if the book treated the general concept of a manifold. Textbooks with minimal prerequisites are preferred; however, please feel free to suggest books meeting the above criteria even if the prerequisites are quite demanding. Finally, it would also be preferable, but not essential, for the book to only treat multivariable calculus.   Examples of books meeting the above criteria: "Analysis on Manifolds" by James Munkres, "Principles of Mathematical Analysis" by Walter Rudin, and "Calculus on Manifolds" by Michael Spivak.   Although I have studied theoretical multivariable calculus already (four years ago), I could never find "the perfect book" (relative to myself, of course). Every book has its virtues; Rudin for its elegance, Munkres for its beautiful exposition, and Spivak for its "quick and dirty" approach. I am hoping that someone will be able to suggest a book that (relative to myself) is "perfect". Also, this question can be useful to other students who have not yet studied the subject and wish to learn it.   Thank you very much for all answers! Please do feel free to suggest as many books as you can think of so we can form a big list. Also, please try to explain why a particular book is good or at least why you think it is good. I suppose it is fine to suggest a book that is already suggested provided you have a different view as to why the book is good.

Due to my ignorance, I find that most of the references for mathematical analysis (real analysis or advanced calculus) I have read do not talk much about the "multivariate calculus". After dealing with the single variable calculus theoretically, it usually directly goes to the topic of measure theory.    After reading the wiki article "", I'd like to find the rigorous proof for this test. The first book comes to my mind is Courant's Introduction to Calculus and Analysis which includes the multivariate case in the second volume.   Motivated by this, I'd like to put the question here:     What are the usual references for the   theoretical treatment for   ?


If $f$ is a compact function (image of every compact set is compact) is $f$ continuous?  Attempt: I can't find a counterexample. I can't prove it. I only know how to prove the converse.

Let $f:\mathbb{R^n}\to\mathbb{R^m}$ be a function such that the image of any closed bounded set is closed and bounded. Must $f$ be continuous?


My code to compute square root of a number:  class Solution { public:     int mySqrt(int x) {         int result;         result = exp(log(x)/2);  # Square root of number = antilog(log(number)/2)         return result;     } };   This code fails only when input is x = 2147395600,  the expected output is 46340, but my code's output is 46339.  Why did this happen?   Error image:  (1016 / 1017 test cases passed, my code failed only for input x = 2147395600)  Problem description:  Implement int sqrt(int x).  Compute and return the square root of x, where x is guaranteed to be a non-negative integer.  Since the return type is an integer, the decimal digits are truncated and only the integer part of the result is returned.  Example 1:  Input: 4 Output: 2   Example 2:  Input: 8 Output: 2 Explanation: The square root of 8 is 2.82842..., and since               the decimal part is truncated, 2 is returned.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Do you know what his name is?      Do you know what is his name?   I saw this in grammar text book. The first is the correct one because "Subject + Verb". The second is wrong.  We do usually say "What is your name?", "What is his name?", why the sentence is wrong when the front of the question is "Do you know..."

What is the difference between:        "How it works?"      and        "How does it work?"


I've been given the following graphic to help wrap my head around this.  If the potential can be shown to represent a $1/r^2$ relation, then I'm more than happy to accept that the electric field is hence a $1/r^3$ relation, but I need to accept the first part first:    Since $V = \frac{kQ}{r}$, this basically implies that $$r = \frac{bc}{c-b}$$ given the geometry of this graphic, yet I simply do not see it.

Electric field of a point charge drops off inverse squarely but that of a dipole varies as $1/r^3$. Why the field drops off more quickly for a dipole?


I have a Dell Inspiron 7567 (128 SSD + 1TB HDD) with pre-installed ubuntu on the SSD. I want to format the SSD so that I can install Windows on SSD and then reinstall Ubuntu.  How can I format the SSD ?

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


NOTE Though I'll defer to the wisdom of the herd, I don't agree that this is a duplicate (at least not as linked), and I was unable to find the answer to my problem on the linked page.  Goal:   Load HTML to element via ajax Modify css of newly loaded elements based on information in data-attributes.   Dilemma:  After finishing (1) above, the newly loaded selectors don't seem to be available. I've been trying variations of jQuery.on() to try to get jQuery to register these newly added DOM elements. But I don't need event handling; I want to immediately alter the CSS of some of the newly arrived elements. I've tried a dozen variations on the below—most of which attempt to make the style changes within the AJAX.success() callback, rather than after it; this was just my last effort.  This has to be something simple, but I'm an hour in and I jsut can't see it...  Here's a sample of the loaded HTML:

category

key

val

   Aaaaand my JS:  var tab_size = 8; var monospace_char = 3;  function updatePrintedRows(element) {         var data = $(element).data();         var width = data['tab-offset'] * tab_size + data['key-offset'] * monospace_char;         $(element).css({"padding-left": toString(width)+"px"}); } // note that I've tried both: $(".jsonprinter-row").on("load", function() {     updatePrintedRows(this); });  // and also:     $(document).on("load", ".jsonprinter-row", function() {         updatePrintedRows(this);     }); $("#printsheet").on('click', function() {     $("#sheet-view").html( function() {         var sheetData = // points to a Js object         $.get("sheet_string.php", {sheet:sheetData}, function(data) {             $("#sheet-view-content").html(data);         });      }); });

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I have a Nexus 4 and I've been using the default app called “Messenging” for my text messages.  I now want to do a factory reset.  But there are a few message threads that I would like to keep and restore after the reset.  Is this possible?  If yes, can you provide some guidance?  Thank you.

I had a Samsung Galaxy S3 which I used for some time.  After getting a Galaxy S7, I transferred all my text messages and other stuff to the new phone using Smart Switch.  However, last week I had to use the old phone again, and now I am wondering if there are any easy way to transfer the messages I send/received during that week to my new phone?  Possibly, if there is a way of transferring the messages one at a time (by Bluetooth or something) this would also be helpful, as it is not a large amount messages.  I tried to do it with Smart Switch, hoping it could somehow merge the messages from the two phones, but it would not sync messages.  Maybe because the new phone already had a lot.  Searching the internet I seemed only to find solutions for transferring everything from one phone to a new phone.


Ordered pairs $\left<x,y\right>$ can be defined as $\left<x,y\right> = \{x,\{x,y\}\}$. Use this definition of $\left<x,y\right>$ for defining $X \times X$.  Show that it is impossible for there to be a set $X$ such that it is a subset of the set $X\times X$.  I'm having trouble wrapping my head around why such a set could not be a subset of $X\times X$. Would anyone be able to walk me through this question? Much appreciated in advance.

Let $N$ and $N'$ be two sets. Is it possible that $N \subseteq N \times N'$?  I don't think so, but actually I am not able to get any absurd sentences supposing that is true.   Let us suppose that $N \subseteq N \times N'$. Then, for any $x \in N$ there exist $n \in N$, $n' \in N'$, such that $x = (n,n')$. But then there exist $m \in N$, $m' \in N'$, such that $n=(m,m')$, $x=((m,m'),n)$ and so on. I see it is ugly, but I can't understand why it is absurd.


It's showing this every time. (i.e., without -a or -p options)    fsck exited with status code 4   The root filesystem on /dev/sda5 requires a manual fsck.

My pc doesn't want to start saying:  /dev/mmcblk0p2p cointais a file system with errors, check forced. Inodes that were part of a corrupted orphan linked list found.  /dev/mmcblk0p2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.         (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on /dev/mmcblk0p2 requires a manual fsck  BusyBox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built-in shell (ash) Enter 'help' for a list of built-in commands.   What do I do?


When entering the US, there is a question (11d) on Customs Declaration about bringing soil with me. Does a beach sand count as a soil? Can I still bring it? Do I have to declare it?  This is a different question from this one because I don't need to have it in a carry-on and I want to bring it from outside the US. The other question is about bringing a sand with you on board the plane within the US and addressing concerns regarding TSA. My question is about importing the sand to the US

I'm making a trip back home (to the coast) shortly, and I would like to bring back sand from the beach with me as a keepsake or memento. It's just a short weekend trip, and I won't be checking any luggage, so I was wondering if it's even worth bothering trying to bring sand aboard the plane in my carry-on?  If so, what can I do to make the security screening as smooth as possible? I was planning on putting the sand in sandwich-sized plastic bags, enclosed in a larger quart- or gallon-sized bag.


I've an array like this:  array(     0 => array(1, 2, 3, 4),     1 => array(1, 3, 2, 4),     2 => array(1, 2, 4, 3),     3 => array(1, 2, 5, 6) )   I have to remove records that are repeated. So I need finally to have this array:  array(     0 => array(1, 2, 3, 4),     3 => array(1, 2, 5, 6) )   The script is in PHP.  Who can help? :)

How can I remove duplicate values from a multi-dimensional array in PHP?  Example array:  Array (     [0] => Array     (         [0] => abc         [1] => def     )      [1] => Array     (         [0] => ghi         [1] => jkl     )      [2] => Array     (         [0] => mno         [1] => pql     )      [3] => Array     (         [0] => abc         [1] => def     )      [4] => Array     (         [0] => ghi         [1] => jkl     )      [5] => Array     (         [0] => mno         [1] => pql     )  )


It is apparently that this holds in Hilbert space, but I can not prove this for general inner product space or find a counterexample. (The only not complete inner product space known to me is $L^2$ restricted in continuous functions.)   Here give a example, but it seems don't meet the condition closeness.  By the way, Is there any other less complicated spaces equipped with inner product but not complete?

Can someone give me an example of noncomplete inner product space $H$, its closed linear subspace of $H_0$ and element $x\in H$ such that there is no orthogonal projection of $x$ on $H_0$. In other words I need to construct a counterexample to theorem about orthogonal projection when inner product space is not complete.


After a few updates on Windows and Kubuntu, on Kubuntu I no longer have write and modify access to NTFS drives, can only read NTFS partitions even as root. Systen config: 128GB M.2-SSD drive, 1TB S-ATA-HDD drive. Installed dualboot: Windows 10 Home, Kubuntu GNU/Linux sda           8:0    0 931.5G  0 disk └─sda1        8:1    0 931.5G  0 part /media/User/DataDrive (NTFS) nvme0n1     259:0    0 119.2G  0 disk ├─nvme0n1p1 259:1    0   499M  0 part ├─nvme0n1p2 259:2    0    99M  0 part /boot/efi ├─nvme0n1p3 259:3    0    16M  0 part ├─nvme0n1p4 259:4    0    60G  0 part /media/User/Windows-10-Home (NTFS) └─nvme0n1p5 259:5    0  58.7G  0 part /Kubuntu (XFS)

It seems that "Shut down" in Windows 10 actually means "Shut down and hibernate". This has caused my NTFS partitions cannot be automatically loaded on Linux (Ubuntu 16.04) on my dual-booting laptop. There will be an error message basically saying   Unable to access “My Drive”  Error mounting /dev/sdb4 at /media/D Center: Command-line `mount -t "ntfs" -o  "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sdb4" "/media/D Center"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sdb4': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option   After a "hard" shutdown by pressing Shift while clicking on "Shut down", Windows actually shuts down, and the NTFS partitions can then be automatically mounted by Linux in another bootup. This issue only occurs recently after my upgrade of the Windows OS and BIOS.  My question is the following: is there any way to make the "Shut down" on the menu as the truly/hard shutdown by default? Thanks!


I was just copying files from my external HDD to my .wine directory, when I noticed the place where the launchers are (Unity desktop) was getting fuzzy and holding onto graphics from the things in the location prior(i have it autohide when a window covers it). I assumed it was just RAM problem, so I canceled the copying, since it wasn't actually important. The glitch remained, and so did another; very slow response time. The mouse moved just fine, but windows were waiting about a minute after I hit the x button to close or even switch active window. Once again, I blamed RAM (only have 2 GBs) so I restarted. Usually, it autologs me into my account, since I'm the only user, but this time it presented me with the login screen. I thought it odd, but tried to log in. A black screen with some text pops up (assuming terminal screen) for half a second then kicks me back to the login screen. I tried the guest account and no luck. I went into terminal (alt+ctrl+f1) and logged in and it worked. I deleted .Xauthority, made new account, and even rebooted quite a few times, all to no avail. Anyone have an idea?

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


Long ago I was watching a scientific video about light speed. At one point, the person said to imagine the following scenario:  You are on a train going from the Solar System to the Alpha Centauri system. The supposed train is going at almost light speed, and you are on top of it. While you are on top of the train, you move forward one step in the direction in which the train is moving. Are you going faster than light speed?  The guy in the video said that the answer is no. When I watched the video I had no idea what the explanation meant because I wasn't into physics at all.   I also can't find the video, but I am curious as to why a scenario like this would be not possible (excluding the limitations of technology, and other flaws in the scenario which have nothing to do with speed.) So, why isn't this possible? :)

Let's say I fire a bus through space at (almost) the speed of light in vacuum. If I'm inside the bus (sitting on the back seat) and I run up the aisle of the bus toward the front, does that mean I'm traveling faster than the speed of light? (Relative to Earth that I just took off from.)


Can someone show this please. I always had trouble with this in A Level.   It is strange that this expression as an exact value because there is no exact value of $\arccos(-\frac13)$.


I'd like to report that the link to this site is not rendered correctly in tag subscription emails.

I noticed that the email I received for a tag filter I created on  has the following footer:  Questions? Comments? Let us know on our [feedback site]().  Here's a screenshot of that part as I see it in my inbox:    Can the formatting of the link to Meta SE over the text "feedback site" be corrected?


I am stuck on Ubuntu 14.04 and upgrading to 15.10 is probably not an option. The highest version of python supported by Ubuntu 14 is 2.7.6. This is very old.  I want to install a newer version.    I understand that all I need is a .deb version of the software that I'd like to install. I think I just need to find a server that has this and added it to the list of repositories (/etc/apt/sources.list) and then apt-get will magically do the right thing.  However, I am going to want to break the rules and install newer versions of other software too. The more often I do this, the more likely bad things are to happen of course. However, I suspect that there are MANY people in my shoes who want to do the same thing. So maybe there is repository for rule breakers like myself can use to replace the official Ubuntu repositories?  Does such a magical repository exist?  If I add it to /etc/apt/sources.list, will apt-get install python give me a newer version of python than is available via the official repositories?

I want to install the latest Python tarball on Ubuntu, downloaded from .  Is this is a correct way to install?  ./configure make make install   If not, how do I do that?


I'm trying to find a sci-fi book I read in the late 80's or early 90's. It contained several short stories, and each one was about the effect portal technology would have on human civilization.  In the first story, an unmanned probe lands on a planet (Mars?), it dumps out a portal, and an astronaut steps out of the portal.  Later in the book, there is a story about the day in the life of someone who commutes to their job on the other side of the country (world?) via portal.  I think (not super sure about this) all the stories were set along a common timeline, similar to Heinlein's A Past Through Tomorrow. Sadly, I can't remember if the stories were all written by the same author or different authors. I've been wondering about this book off and on for years - Thanks in advance for any help with the search!

I'm looking for a short story collection about different uses/inventions of transporter doors. I think it was just a single author collection, that I read in the early 2000s.  In each story these Transporter Doors exist, I seem to remember them being described as blank grey sheets. You step through them and come out somewhere else. The forward to the book talked about early Rocket stories where the launch of a spaceship would be the end of the tale.  Plots of the individual stories:  Two men one of whom's home is inside an asteroid are discussing the use of Base12 in their society and if it is because they have 12 fingers, one says that "people" used to use base10. The implication is that a different species arrived through the doors and replaced humans.  A man puts the code for his home into a door and is instead transported to prison where he's accused of murdering his wife, which he strongly denies.   Two scientists and a pilot take a probe ship deep into Jupiter's atmosphere, the will return to base via a door that they need to construct while they are down there. The scientists dislike each other and don't work well together. When they finish the door, the hamsters seem woosy out the other side, but the scientists insist it is ready. The pilot says he will go first as he can't fix it if it's wrong. When he arrives on the far side he's mentally damaged and the scientists have to get along without him acting as a buffer while the try to save themselves.


Please check the output of the following code:     double r1 = 10 * 0.39;     double r2 = 3.9;     System.out.println(r1);     System.out.println(r2);  I got the following output:     3.9000000000000004     3.9  Why this happened?? any feedback?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have this error when i try sudo apt update command. E: The repository 'https://brave-browser-apt-release.s3.brave.com focal InRelease' is not signed. Err:4 https://brave-browser-apt-release.s3.brave.com focal InRelease   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4FE13824E3FFC656  I uninstall brave browser but still get this error. Can anybody help me. Thanks

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


Being a new comer in Ubuntu environment, I am bit confused between the apt-get and apt-cache. Can anyone explain what is difference between apt-get and apt-cache. And when to use the apt-get and apt-cache?  Thanks in Advance!

I have some questions about the APT package manager.     As I understand we have repositories URLs located at /etc/apt/sources.list and /etc/apt/sources.list.d/*      When apt-get update is called, apt tries to connect to all specified repositories in the file and download information about those repositories about what programs are available and so on.      It caches all retrieved data locally in order to use it later without making internet requests to the repository.      When apt-get install is called it searches local cache package list from available repositories and if package is not found it does nothing except display an error.      apt-get search also looks into local cache and doesn't make any requests to the internet.      Am I right? I am not sure about commands that make requests instead of searching data in the local cache.        Also, what is the difference between apt-cache search and apt search? I can guess they both use the local cache.


I am using Ubuntu since August 2010. Now, I am using Ubuntu 14.04 with gnome-shell 3.12.1. I was trying to find shortcut for toggling language but it couldn't work and my grave accent key (`) is also disabled. Now, whenever I am pressing this key on my keyboard, it works as Esc key. Can some-one tell me how can I configure it? Can some-one tell me how can I define a key-board shortcut key for input languages-toggling.  When I am pressing command "xev -event keyboard" then it opens a small window and in that if I press grave key (`)  then the output is as:  KeyPress event, serial 28, synthetic NO, window 0x4000001,     root 0x2bb, subw 0x0, time 2422193, (366,566), root:(368,710),     state 0x0, keycode 49 (keysym 0xff1b, Escape), same_screen YES,     XKeysymToKeycode returns keycode: 9     XLookupString gives 1 bytes: (1b) ""     XmbLookupString gives 1 bytes: (1b) ""     XFilterEvent returns: False  KeyRelease event, serial 28, synthetic NO, window 0x4000001,     root 0x2bb, subw 0x0, time 2422339, (366,566), root:(368,710),     state 0x0, keycode 49 (keysym 0xff1b, Escape), same_screen YES,     XKeysymToKeycode returns keycode: 9     XLookupString gives 1 bytes: (1b) ""     XFilterEvent returns: False

I'm searching for a way to remap certain keys in ubuntu.  i.e.   I'd like to change PgUp to Home or PgDown to End.  Does a built-in command or a tool exist reassign keys in Ubuntu/GNOME?


I couldn t find a solution since maybe 5 hours. I have checked everything on Internet. Here is my problem,   I dual booted Ubuntu 14.02 beside windows 7. I removed windows 's files accidentally. I went on with ubuntu. Today It said there isn t enough disk space. So I tried everything to fix it.   Finally I want to delete everything and reinstall ubuntu. But nothing seems to work. Please help.   I have a bootable usb with iso file of ubuntu 14.02. Everytime I restart I just see 5 options, none of them is working.

I have Ubuntu 10.04 on my computer, with Windows 7 next to it. Instead of upgrading to 10.10, I feel like doing a clean install. However, I don't want to erase my Windows, even though I barely ever use it. My question is: how would I remove Ubuntu 10.04 from my drive and install Ubuntu 10.10 in place, without losing any space or anything, or losing Windows 7?


So I was having this conversation with a friend about my ex and she asked me, "Who broke up?"  I said, "She"  My friend was like, "It should be her and not "she"?  Could someone please help me out on this?

With the enthusiastic question of "Who wants ice-cream?", what is the more correct response?         (Not) I.   (Not) me.      Neither response is a sentence. The first response of "(not) I" sounds stuffy, like it should be followed with an indignant sniff. The second sounds like American idiom and acceptable for casual speech.    What do you say?


How can we build a PPA from a git repo? For example say that I have an icon theme hosted in Git. How can I add it to a PPA? (Note : I don't know much about Launchpad and PPAs)

I have GitHub repo named logger. Its a C++ library. What I am doing to package and publish to my launchpad ppa is  cd rm -Rf Packages2 mkdir Packages2 cp -R workspace/logger/ Packages2/logger-1.0 cd Packages2/logger-1.0 rm -R build/ rm -R debian/ rm -R dist/ rm -R nbproject/ rm -R QtBuild/ rm -Rf .git rm Makefile.old  rm CMakeLists.txt.user  cd ~/Packages2/logger-1.0/ make clean cd .. rm -Rf logger-1.0.tar.gz logger_* logger logger-dev_* liblogger1_* logger1_* build-area/logger-1.0 build-area/logger_* build-area liblogger1_* build-area/logger-dev_* build-area/logger1*  tar -czf logger-1.0.tar.gz logger-1.0 bzr dh-make logger 1.0 logger-1.0.tar.gz ly cd logger/debian/ rm *ex *EX cp ~/workspace/logger/debian/control ./ cp ~/workspace/logger/debian/changelog ./ cp ~/workspace/logger/debian/copyright ./ cp ~/workspace/logger/debian/rules ./ cp ~/workspace/logger/debian/README.Debian ./ cp ~/workspace/logger/debian/README.source ./ bzr commit -m "Initial commit of Debian packaging." bzr builddeb -- -us -uc # -sd bzr builddeb -S -- # -sd bzr tag release-1.1 cd ../../build-area pbuilder-dist xenial build logger_1.0-0ubuntu1.dsc cd ../logger bzr push lp:~satyagowtham-k-gmail/+junk/logger-package cd ../build-area dput ppa:satyagowtham-k-gmail/ferryfair.ppa logger_1.0-0ubuntu1_source.changes   Now I came to know that we can use git instead of bzr. I found very sparse documentation regarding packaging and publishing to launchpad ppa. How can I accomplish it?


I have an issue with comparing Strings that sometimes contain numbers.   Let's say I have two Strings; s1 = "Chapter 9" and s2 = "Chapter 10"  Any human would say that, if these are to be sorted, s1 would end up earlier than s2 and that also happens in Windows folders. However, in Java it just checks one char at a time until one is greater/lesser than the other, which leads to it putting s2 earlier than s1 due to it having a '1' where s1 has a '9'  Is there a way of managing this that does not involve a lot of code and/or processing?

I need to write a Java Comparator class that compares Strings, however with one twist.  If the two strings it is comparing are the same at the beginning and end of the string are the same, and the middle part that differs is an integer, then compare based on the numeric values of those integers.  For example, I want the following strings to end up in order they're shown:   aaa bbb 3 ccc bbb 12 ccc ccc 11 ddd eee 3 ddd jpeg2000 eee eee 12 ddd jpeg2000 eee   As you can see, there might be other integers in the string, so I can't just use regular expressions to break out any integer.  I'm thinking of just walking the strings from the beginning until I find a bit that doesn't match, then walking in from the end until I find a bit that doesn't match, and then comparing the bit in the middle to the regular expression "[0-9]+", and if it compares, then doing a numeric comparison, otherwise doing a lexical comparison.  Is there a better way?  Update I don't think I can guarantee that the other numbers in the string, the ones that may match, don't have spaces around them, or that the ones that differ do have spaces.


I have recently become interested in trying out Ubuntu 15.10, just for the sake of fun. However, I am confused as to how to dual boot Windows 10 and Ubuntu 15.10 on my Toshiba Qosmio X75-A7295  The computer is a rather high-spec one, with one 256 SSD on which Windows 10 is installed (as in, any important files required to run Windows 10), and a 1 TB hard drive that is used to hold any extra files, like documents and what not.   The 256 GB SSD is almost full, leaving only the 1 TB hard drive open for installing Ubuntu.  However, the computer is EFI boot, so I believe that the boot partition is on the SSD  What advice would you give me when attempting to install Ubuntu in a dual-boot set-up?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


There are various rules about whether an adjective takes '-er/-est' or 'more/most', but they're based on syllable count and don't give an etymological rationale.  Does anyone know? Is it based on whether the word was Saxon in origin?

A friend of mine saw a gun at the store that was labeled as the "most quiet gun".  Is this correct English or is it more correct to say, the "quietest gun"?


Is $ 2^n + n < 2^{(n+1)}$ when $ n > 2 $  How can I prove this? I need it in order to prove a language is context free

Prove that  $ n < 2^{n}  $ for all natural numbers $n$.  I tried this with induction: Inequality clearly holds when $n=1$. Supposing that when $n=k$, $k<2^{k}$. Considering $k+1 <2^{k}+1$, but where do I go from here?  Any other methods maybe?


Attempting to understand Exercise 20 (pdf page 44) in the paper: (Warning: large paper; small exercise)        The party animal problem corresponds to the network in g(3.14). The boss is angry and the worker has a headache - what is the probability  the worker has been to a party?      When set to 1 the statements are true: P = Been to Party, H = Got a Headache, D = Demotivated at work, U = Underperform at work, A =Boss Angry. Shaded variables (A, H) are observed in the true state.      $\begin{matrix} & & D \\ & & \downarrow \\ P & \rightarrow & U \\ \downarrow & & \downarrow \\ (H) & & (A)\end{matrix} $   I would like to solve the following:   Prove that p(P|H,A ) = a*p(P,H,A) where a is a constant. Expand p(P, H, A) by marginalizing over the variables U and D. how to compute 'a'   Any help is greatly appreciated.  Thank You.

Attempting to understand Exercise 20 (pdf page 44) in :      The party animal problem corresponds to the network in g(3.14). The boss is angry and the worker has a headache - what is the probability  the worker has been to a party? All variables are binary and       $p(U =tr|P =tr,D=tr)=0.999$, $p(U =tr|P =fa,D=tr)=0.9$, $p(U =tr|P =tr,D=fa)=0.9$, $p(U =tr|P =fa,D=fa)=0.01$.       $\begin{matrix} & & D \\ & & \downarrow \\ P & \rightarrow & U \\ \downarrow & & \downarrow \\ (H) & & (A)\end{matrix} $   I'm unsure of how to solve this problem given only the above information, and help greatly appreciated. Can this even be solved with the information given in the question?


Prove that if $A$ and $B$ are $n\times n$ matrices then $\operatorname{rank}(A) + \operatorname{rank}(B) \le \operatorname{rank}(AB) + n$

If $A$ and $B$ are two matrices of the same order $n$, then   $$ \operatorname{rank} A + \operatorname{rank}B \leq \operatorname{rank} AB + n. $$   I don't know how to start proving this inequality. I would be very pleased if someone helps me. Thanks!  Edit I.  Rank of $A$ is the same of the equivalent matrix $A' =\begin{pmatrix}I_r & 0 \\ 0 & 0\end{pmatrix}$. Analogously for $B$, ranks of $A$ and $B$ are $r,s\leq n$. Hence, since $\operatorname{rank}AB = \min\{r,s\}$, then $r+s\leq \min\{r,s\} + n$. (This is not correct since $\operatorname{rank} AB \leq \min\{r,s\}$.  Edit II. A discussion on the rank of a product of $H_f(A)$ and $H_c(B)$ would correct this, but I don't know how to formalize that $\operatorname{rank}H_f(A) +\operatorname{rank}H_c(B) - n \leq \operatorname{rank}[H_f(A)H_c(B)]$.


I'm trying to build a test setup which test my server's performance under high load. In order to do that I want to open thousands of tcp connection. The problem is that I only have two hosts, one is for the server and the other is for the load generator.  Is there a way to do that?

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I own a Canon 100d and i like to photograph the stars, I'd like to have a wide angle lens to capture the most of the milky way i can. Possibly as cheap as possible and have really good quality.  Thank You Zoe.

In optimal world I would buy a lens that is good in every way. But I'm on a budget and have to find a balance in quality and price. I'm looking for a lens for star photography, so in my case it will be a wide angle lens with good characteristics for capturing points of light in a dark sky. What would those characteristics be?  So far I've learned about , which seems like a thing to note when comparing different lenses for star photography. It would be quite disappointing if stars turned into long teardrops on the edges of a photograph even when every precaution was taken to make all stars sharp round points of light.  Vignetting would be an example of lens characteristic not so important in this use.  Many characteristics of a lens turn better when aperture is slightly stopped down, but I suppose I'd be wanting to use a lens with wide open aperture when trying to capture the stars in a dark night sky.  I'm not asking for lens recommendations. But, as an example of what kind of lenses I've been looking at, I name  manual focus lens. Its price level is $350'ish in Amazon and seems to run with name Rokinon too. It seems to be reasonably sharp even when wide open - my camera is an APS-C sensor camera.


id | product_id | option    |  option value ------------------------------------------- 1  |    3       |    size   |   m 2  |    3       |    color  |   red 3  |    3       |    brand  |   apple 4  |    5       |    color  |   red 5  |    5       |    weight |   16m 6  |    6       |    size   |   m   i am get two product product_id [3,5]  now i am filter this products with option value  my filter option_value [m] here, m option_value presence in product_id 3 but not presence in product_id 5, so only show product_id 3  Again, filter option_value [red] here, red option_value presence in product_id 3 and 5, so all my gets products are show product_id 3,5  Finaly, filter option_value [m,red] here, m and red option_value presence in product_id 3 but m option_value presence in product_id 5 and red option_value not presence in product_id 5, so show product_id blank That means, i get that products who's option value are same as filter option_value  how to write this mysql query?

This is a very basic query I can't figure out....  Let's say I have a two column table like this:  userid  |  roleid --------|--------    1    |    1    1    |    2    1    |    3    2    |    1   I want to get all distinct userids that have roleids 1, 2 AND 3.  Using the above example, the only result I want returned is userid 1.  How do I do this?