When querying an API that may or may not have an image, what are the main differences in setting the background-image or actually creating an img tag?

   vs

In what situations is it more appropriate to use an HTML IMG tag to display an image, as opposed to a CSS background-image, and vice-versa?  Factors may include accessibility, browser support, dynamic content, or any kind of technical limits or usability principles.


Ok, this is a bit of a twisty story.  Soon after I bought my new Win10 laptop I started having PC freezes (nothing on the screen moves, incl. mouse) that in 4-30min resolved by themselves. I went back to using my old laptop until I resolve this blocking problem. I thought the problem might be caused by a virus, so I ran a "Quick scan" in Windows Defender (it found nothing) and a "Computer scan" in the free "Kaspersky Security Scan" app (it too found nothing).  Later, however, when I happened to do something minor on the new laptop, I noticed I have a notification in the "speech bubble" icon in the bottom right of the screen. I clicked the icon and in the pane popped up  there was an item that said something like "Windows Defender: Blahblah was successfully..." (the message was truncated and unclear. This was several days ago, hence why I fill what I forgot with "Blahblah"). I clicked the message, it disappeared and the main WinDefender window popped up with nothing on it to elaborate on situation (in any of its tabs).  I'm thinking a scheduled Defender virus check may have found and removed a virus, and that's what the message may have been about, but I have no way to check. If it has indeed removed a virus, then very likely the cause of the freezes has been fixed and I can resume using the PC without having to first go through heavy procedures like .  How do I check if WinDefender has cleaned up any viruses?  Note: I don't want to just switch back to using the new PC for a couple days to see if any freezes happen, because if any freeze does happen during my work, it would be very annoying.

Windows Defender very quickly popped up a notification saying it has taken action to prevent against malware. I need to know the details. This happened while I was downloading pictures from Google Photos, but I also have a hunch that a program I recently installed to improved privacy on Windows 10 warned it sometimes gets flagged as malware.   To be clear I'd like to know which file was detected, if it was deleted or quarantined, and which virus it was detected as.


This is a question from .  The question is   Prove that it is not possible to partition $\mathbb N$ into finitely many infinite AP's with distinct common differences.(other than the trivial $a=d=1$)  Infinite AP:=$\{a,a+d,a+2d,......\}$.I have no idea as to how to approach it. Any hints are welcome. Thanks.

An arithmetic sequence of step $d$ is a set of the form: {$a, a+d, a+2d, a+3d, ...$} where $a, d$ are positive integers.    Show that the positive integers cannot be partitioned into a finite number of arithmetic sequences s.t. each sequence has a distinct step $d$. (Except the trivial sequence $a=1, d=1$.)  Now the book gives me a hint: Write $\sum_{n\in\mathbb{N}}z^n$ as a sum of terms of the type $\frac{z^a}{1-z^d}$.    But it isn't clear that the power series can even be put such a form, and even if it can, why does that help me?


I know that the "get" word has so many meanings and I try to figure out what function it has in the sentence:     "If he gets killed"   I know "get" can be used to create a passive (so without, would it be "if he is killed"?) Or is it the change of state/condition?

In spoken English (at least in America), passives are often formed with "to get" rather than "to be;" I would wager the majority of the time:   he got hit by a car I get driven to work I've gotten called for jury duty eight times   Are there specific verbs that prefer "be" to "get," or vice-versa, or semantic differences between these forms? I cannot think of any.


Assume we have a sequence of functions $(f_n)_{n \ge 1} \in L^p$, where $L^p$ is the space of all measurable functions with a finite $p$-th moment, which almost surely converge to $f \in L^p$. Further we have that \begin{align*} \lim\limits_{n \rightarrow \infty} \| f_n\|_p =\|f\|_p \end{align*} This is sufficient to claim that $\|f_n - f \|_p \rightarrow 0$.   I have searched for a while on german and english sites for the proof of this statement, but wasn't succesful. It would be great, if someone could link me a source of the proof or write down his own.

Let $1\leq p < \infty$. Suppose that    $\{f_k\} \subset L^p$ (the domain here does not necessarily have to be finite),  $f_k \to f$ almost everywhere, and  $\|f_k\|_{L^p} \to \|f\|_{L^p}$.    Why is it the case that $$\|f_k - f\|_{L^p} \to 0?$$   A statement in the other direction (i.e. $\|f_k - f\|_{L^p} \to 0 \Rightarrow \|f_k\|_{L^p} \to \|f\|_{L^p}$ ) follows pretty easily and is the one that I've seen most of the time. I'm not how to show the result above though.


Let $X_1, ..., X_n$ be a random sample from the $N(\mu,1)$ distribution. First show that $$E \left[ u(X_1)\, \Big|\, \sum^n_{i=1}X_i=z \right] = \Phi \left( \frac{\sqrt n(c-z/n)}{\sqrt{n-1}} \right)\,,$$ where $u(x)=1$ if $x\leq c$ and $0$ otherwise, and $\Phi(x)=P(Z\leq x)$ where $Z$ is $N(0,1)$ distributed. Then secondly determine the MVUE for $\Phi(c-\mu)$ and compare with the MLE of $\Phi(c-\mu)$ for large $n$.   Please could someone point me in the right direction on this question? I'm not sure where to start on the first part. There is a hint in the question that integration by substitution might help, but I can't even see where integration comes into it. Are there any similar questions out there that you could point me to?  For the second part, I know that a MVUE must attain the Cramer Rao lower bound, but because it's a follow on question from the first part I'm pretty stuck on this as well.   Please could you help get me going or explain to me the process that I need to follow. I'm not looking for someone to tell me the answer - just give me a push to help me get going!  (It may not be relevant, but this question is just a bit from a much bigger question. I've already successfully shown that the MLE of $\mu$ is just the sample mean).

Let $X_i \sim N(\mu,1)$, i.i.d. We aim to find UMVUE for $p(\mu) = P_{\mu}(X_1 \leq u)$ for some fixed $u$.  I have shown that $\bar{X}$ and $X_1 - \bar{X}$ are independent. ($\bar{X}$: sample mean).  Now I want to use this to compute $E_\mu[1\{X_1 < u\}\mid\bar{X}]$ and if I am not mistaken, by Lehmann-Scheffé, it is UMVUE.  I am quite new in statistics, maybe my arguments are wrong, or I do not know how to compute. Any hint appreciated.


I use the code below for some texts, but the starting spacing is missing from every paragraph. I would like to have the starting spacing at the red arrows like as it be at the blue.  \documentclass{article}  \usepackage[most]{tcolorbox}  \usepackage{lipsum} \usepackage{varwidth} \newtcolorbox{mybox}[2][]{enhanced,     before skip=2mm,after skip=2mm, colback=black!5,colframe=black!50,boxrule=0.2mm,     attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,     boxed title style={frame code={             \path[fill=tcbcolback!30!black]             ([yshift=-1mm,xshift=-1mm]frame.north west)             arc[start angle=0,end angle=180,radius=1mm]             ([yshift=-1mm,xshift=1mm]frame.north east)             arc[start angle=180,end angle=0,radius=1mm];             \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,             middle color=tcbcolback!80!black]             ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)             [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)             -- (frame.south east) -- (frame.south west)             -- ([xshift=-1mm,yshift=-1mm]frame.north west)             [sharp corners]-- cycle;         },interior engine=empty,     },     fonttitle=\bfseries,     title={#2},#1}  \begin{document}      \begin{mybox}[colbacktitle=green]{My title}         \lipsum[1-2]     \end{mybox}  \end{document}   Thanks in advance!!!

I'd like to have the same indentation within a tcolorbox as I have in the rest of the document.  How can I get it?  Thanks.  MWE:  \documentclass[a4paper]{book}  \usepackage{lipsum} \usepackage[most]{tcolorbox}  \begin{document}  \chapter{Example with \texttt{tcolorbox}} \lipsum[1-8]  \begin{tcolorbox}[breakable,enhanced] \lipsum[9-14] \end{tcolorbox}  \end{document}   The first block of text has the typical indentation, but that in the box doesn't.


Are the feats  and  be used together?  Vital strike is used on an attack action which is a special action which uses your standard action, so cant be used during a full round action.  Pinpoint targeting is a standard action, but doesnt say its an attack action.

I have a Ranger with Pinpoint Targeting, Deadly Aim, Focused Shot, and Vital Strike.  Can I make 1 standard attack action and use all of them together?


I wanted to do a multithreaded ChatServer, which is based on telnet and I thought I got it but after I type in 1 message in telnet it gives the following error  "Exception in thread "Thread-0" java.lang.NullPointerException at Server.sendAll(Server.java:20) at ServerThreads.run(ServerThreads.java:33)"  I know where it causes the problem but I don't know how I can fix it specifically in my code. I think all the other stuff is working fine. This is my ServerThread Class import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket;   public class ServerThreads extends Thread {      private String prefix;     private Socket socket;     PrintWriter pw;      public ServerThreads(String prefix, Socket s){         this.prefix = prefix;         this.socket = s;         this.start();     }      public void run(){          try {             PrintWriter pw = new PrintWriter(socket.getOutputStream(),true);             BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));             Server.list.einfuegen(0, this);             pw.println("Client verbunden mit: "+prefix);                          while(true){                 //System.out.println("User: "+ socket.getInetAddress() + " Nachricht: " + line);                 String line = br.readLine();                 Server.sendAll(line, prefix);                 pw.flush();             }         }catch (IOException e){             e.printStackTrace();         }     } }  This is my Server Class import java.io.IOException; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket;   public class Server {     static EinfachListe list = new EinfachListe();     static int zaehler = 1;     private int port;     ServerSocket socket;      public Server(int port) throws IOException{         this.port = port;         socket = new ServerSocket(port);     }      static public void sendAll(String s, String prefix){         for(int a = 0; a<list.getAnzahl(); a++){             ((ServerThreads) (list.get(a))).pw.println(s);         }     }      public void starteServer(){         System.out.println("Der Server wurde gestartet");          while(true){             try {                 Socket s = socket.accept();                 //ServerThreads user = new ServerThreads("User:Anzahl Nachrichten "+zaehler++, 1000, s);                 String client = "Client"+zaehler++;                 new ServerThreads(client, s);                 //user.start();             } catch (IOException e) {                 e.printStackTrace();             }         }     } }  I don't think that the mistake is in my LinkedList but if you think it is I can also copy the code of my LinkedList in here. Thank you for the help!

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


In math mode, I tried to type in $$\overline{a}+\overline{b}$$, and this happened:     Obviously, the lines over a and b look different. How do I fix this?

Above is an example produced by S\overline{n}=\overline{n+1}. The overlines are not aligned vertically, which is highly undesirable. Is there any way to produce overlines of the same height throughout a whole formula?


Heres the error message i get every time i try to mount it via terminal  The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sde2': 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

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


I am working on a 2d arcade game where I have 5 types of circles with different sizes: The ship, the missiles, and 3 types of monsters.  This is what it looks like:    Currently I'm using brute force collision detection where I check every missile vs. every monster without taking probability of collision into account. Sadly, this makes the process REALLY slow.  This here is my Grid class, but it's incomplete. I'd greatly appreciate your help.      public class Grid {      int rows;     int cols;     double squareSize;     private ArrayList<Circle>[][] grid;      public Grid(int sceneWidth, int sceneHeight, int squareSize) {         this.squareSize = squareSize; // Calculate how many rows and cols for the grid.         rows = (sceneHeight + squareSize) / squareSize;         cols = (sceneWidth + squareSize) / squareSize; // Create grid         this.grid = (ArrayList[][]) new ArrayList[cols][rows]; //Generic array creation error workaround     }  The addObject method inside the Grid class.     public void addObject(Circle entity) { // Adds entity to every cell that it's overlapping with.         double topLeftX = Math.max(0, entity.getLayoutX() / squareSize);         double topLeftY = Math.max(0, entity.getLayoutY() / squareSize);         double bottomRightX = Math.min(cols - 1, entity.getLayoutX() + entity.getRadius() - 1) / squareSize;         double bottomRightY = Math.min(rows - 1, entity.getLayoutY() + entity.getRadius() - 1) / squareSize;          for (double x = topLeftX; x < bottomRightX; x++) {             for (double y = topLeftY; y < bottomRightY; y++) {                 grid[(int) x][(int) y].add(entity); //Cast types to int to prevent loosy conversion type error.             }         }     }   But that's where I am at a complete loss. I'm not even sure the source code I provided is correct. Please let me know how to make the grid based collision work. I've read basically every tutorial I could get my hands on but without much effect.  Thanks.

Up until now, I implemented all-against-all collision detection in my games. It worked fine.  But I reached a point where implementing this kind of collision detection, makes the game run poorly, because there are two many objects to iterate through and check for collision.  I have searched this site and found something about 'uniform grids'. But I didn't completely understand what it is and how to implement it. Tried to Google it but nothing easy enough to understand came up.  I am a beginner to 2D-game programming. Do you mind trying to explain to uniform-grids, or link me to some good tutorial?  Thanks a lot


I am trying to solve exercise 2.9 b from section 1.2 of Hartshorne algebraic geometry. It asks to find out the generator of $I(\bar Y)$ where $\bar Y$ is the projective closure of the twisted cubic curve in $\mathbb P^3$ given by $\{(t,t^2,t^3)| t\in k\}\subset \mathbb A^3$.  My claim is that $I(\bar Y)= \langle x_1^2-x_0x_2, x_2^2-x_1x_3,x_1x_2-x_0x_3\rangle$. Let’s call the right hand side ideal as $\alpha$.  I have shown using the first part of the exercise which says $I(\bar Y)=\langle \beta I(Y)\rangle$ where $\beta $ is homogenisation map, that, $\alpha \subset I(\bar Y)$.  For the reverse inclusion, I am trying to show $\alpha $ is a homogeneous radical prime ideal.  I defined the map, $\theta :k[x_0,x_1,x_2,x_3] \rightarrow k[u,v], \theta$ sends, $x_0$ to $u^3$, $x_1$ to $u^2v$, $x_2$ to $uv^2$ and $x_3$ to $v^3$.  My claim is that $\alpha = \ker \theta$. $\alpha \subset \ker\theta$ is clear. I am stuck with the second part.   If I’m done with this part I can prove $Z(\alpha) \cap U_0 \subset \phi_0^{-1} (Y) $ where $U_0 = \mathbb P^3- Z(x_0)$ and $\phi_0$ is the homeomorphism from $U_0$ to $\mathbb A^3$. Then using irreducibility of $Z(\alpha)$ and taking closures both the sides I can say that $Z(\alpha) \subset \bar Y$. Which, by homogeneity and radical condition will tell us $I(\bar Y) \subset \alpha$. Also it would tell us that the 3-IPLs embedding of $\mathbb P^1 $ into $\mathbb P^3$ is the twisted cubic curve in $\mathbb P^3$.  I need help in completing the proof of the claim regarding the kernel of $\theta$.

The twisted cubic is the image of the morphism $\phi : \mathbb{P}^1 \to \mathbb{P}^3 , (x:y) \mapsto (x^3:x^2 y:x y^2:y^3)$, it is given by $X = V(ad-bc,b^2-ac,c^2-bd)$. Now I would like to compute $I(X)$, which equals by the Nullstellensatz the radical of the ideal $I := (ad-bc,b^2-ac,c^2-bd) \subseteq k[a,b,c,d]$. I think that that $I$ is already a radical ideal, even a prime ideal. Namely, I suspect that  $$\phi^* : Q:=k[a,b,c,d]/I \to k[s,t] , a \mapsto s^3, b \mapsto s^2 t , c \mapsto s t^2 , d \mapsto t^3$$ is an injection. If this is true: How can we prove that? I've already tried to find a $k$-basis of the quotient, but this turned out to be a big mess. Even the representation of the quotient as a monoid algebra doesn't seem to help. Another idea is the following: A formal manipulation of generators and relations implies $Q_a \cong k[a,b]_a$. Thus it suffices to prove that $Q \to Q_a$ is injective, i.e. that $a$ is not a zero divisor.


I just realized that the migration option is buried under many levels in the flag dialog:    This takes many clicks to reach, and, besides, it's hard to find.  Why not keep it in the "this question doesn't belong here" menu (i.e. the "Closing" menu)?  For that matter, why not do the same for the VTC dialog?

With the new close system, voting to migrate now requires four steps:   Clicking the "close" link Selecting "off-topic because..." Selecting "This question belongs on another site in the Stack Exchange network", and  Finally selecting the site.    How about we make the process a bit less tedious by eliminating the second step?    Other than one less click (yes, I'm that lazy), we'll probably also stop confusing people from .


I was searching on the internet but I can't find any result, even saying that I can't use it.  I have the following cameras: a Sony a7R II and a Nikon D610. I'm able to find adapters to use my Nikon's FX lenses on my Sony E mount, but I cannot find any adapter to use my Sony's E mount lenses on my Nikon D610 camera. It is possible to achieve this?

I've got some lenses of brand X, but I've just got a new camera of brand Y. How can I tell if it's possible to use my lenses on my camera? I accept that I may lose a lot of automatic functionality like autofocus, aperture control and metering when using an adapter to connect the two.


"On the lateral surface, there are small insertions of brown siderite."  Is there any general rule for punctuating sentences like this? Can you give me a source reference?

I am no native speaker and always confused about the comma in introductory phrases, in particular in prepositional phrases. Is there any hard rule when a comma must be set? If I make a google search for certain phrases, I often find both variants. Typical examples where I am not sure whether a comma must be set are:        First[ly][,] I must phone mother   In this case[,] we must...   For simple problems[,] the algorithm...   From Lemma 1.2[,] we obtain...   For a typical user[,] the algorithm...   In our theory[,] we...   A dark line on the horizon[,] the mountain range we were headed for seemed somehow not as threatening as when we had started out on the trip.   Avidly reading her novel[,] Jane did not notice that her stop was approaching.   To be sure[,] it is not easy to see a solution.   When you get to Rome[,] give me a ring.


I'm not a java developer, but I want to fix the only warning in my project in this part of code:  public abstract class SelectorThread<T extends MMOConnection<T, RP, SP>, RP extends ReceivablePacket<T, RP, SP>, SP extends SendablePacket<T, RP, SP>> {     protected static final Log _log = new MMOLogger(SelectorThread.class, 1000);      private final AcceptorThread<T, RP, SP> _acceptorThread;     private final ReadWriteThread<T, RP, SP>[] _readWriteThreads;       protected SelectorThread(SelectorConfig sc, IPacketHandler<T, RP, SP> packetHandler) throws IOException     {         _acceptorThread = new AcceptorThread<T, RP, SP>("AcceptorThread", this, sc);         _readWriteThreads = new ReadWriteThread[sc.getSelectorThreadCount()];          for (int i = 0; i < _readWriteThreads.length; i++)             _readWriteThreads[i] = new ReadWriteThread<T, RP, SP>("ReadWriteThread-" + (i + 1), this, sc, packetHandler);     }      ... }   The warning:   Type safety: The expression of type ReadWriteThread[] needs unchecked conversion to conform to ReadWriteThread<T,RP,SP>[]   Please, can someone help me fix this, or tell me what I must know to fix this. I understand that line above is fixed by <T, RP, SP>, but this doesn't work with array.  Upd: I see that my question is duplicate and my problem is: this is not safe to use generics in arrays. But how do I need to change my code to fix this? All I came up is  _readWriteThreads = (ReadWriteThread<T, RP, SP>[]) Array.newInstance(ReadWriteThread.class, sc.getSelectorThreadCount());   But this code also gave me a warning.

In the Java snippet:  SyndFeedInput fr = new SyndFeedInput(); SyndFeed sf = fr.build(new XmlReader(myInputStream)); List<SyndEntry> entries = sf.getEntries();   the last line generates the warning   "The expression of type List needs unchecked conversion to conform to List<SyndEntry>"  What's an appropriate way to fix this?


In s matrix calculation we use in and out states. I have few doubts about in and out states.  In which representation do we discuss about in and out states (Heisenberg picture or interaction picture)? In and out states are called asymptotically free particle states. Why?

I have seen the scattering matrix defined using initial ("in") and final ("out") eigenstates of the free hamiltonian, with  $$\left| \vec{p}_1 \cdots \vec{p}_n \; \text{out} \right\rangle = S^{-1} \left| \vec{p}_1 \cdots \vec{p}_n \; \text{in} \right\rangle$$  so that  $$\left\langle \vec{p}_1 \cdots \vec{p}_n \; \text{out} \mid \vec{q}_1 \cdots \vec{q}_m \; \text{in} \right\rangle = \left\langle \vec{p}_1 \cdots \vec{p}_n \; \text{in} \mid S \mid \vec{q}_1 \cdots \vec{q}_m \; \text{in} \right\rangle.$$  1) What are "in" and "out" states?   2) Are they Fock states?   3) In Schrödinger or Heisenberg or interaction representation?   4) How are they related? (I believe that I see what they handwavily represent physically, but not formally.)  My main issue is that, if "in" and "out" states are one-particle eigenstates of the free hamiltonian, i.e. if $\left| \vec{p}_1 \text{out} \right\rangle$ describes a free particle with momentum $\vec{p}_1$, and $\left| \vec{p}_1 \text{in} \right\rangle$ also describes a free particle with momentum $\vec{p}_1$, then $\left| \vec{p}_1 \text{out} \right\rangle = \left| \vec{p}_1 \text{in} \right\rangle$ ... which is false. Still, books (some at least) describe these "in" and "out" states like that.  Moreover, I have seen (e.g. in Wikipedia, but also ) that the scattering matrix is a map between two different Fock states, and I don't understand that.   5) Do states of the interacting system live in the same Fock space that asymptotic free states?   6) And if not, where do they live?  Understandable references would be appreciated.


How to call Lightning Component JS controller call one method from other method without helper      selectOther: function(component, event, helper) {        //Call fetchAddress }, fetchAddress: function(component, event, helper) {        console.log('---fetchAddress'); }

Given two controller methods defined for a Lightning component as follows, how can I call bar() from foo()? If I try it using the code shown below, I get the error, "bar is not defined".  ({     bar : function(component, event, helper) {         console.log('bar just happened');     },     foo : function(component, event, helper) {          // I would love for this to work,         // but it doesn't work as expected.         bar(component, event, helper);          // I've also tried this but get a slightly          // different but equally discouraging error.         this.bar(component, event, helper);     } })


Traveling from Toronto to Accra, Ghana. The Itinerary states : Toronto - New York-LGA: Air Canada (Airport Change)  New York-JFK - Lisbon: Tap Air Portugal Lisbon - Accra: Tap Air Portugal Will I be responsible for transferring my baggage from LGA to JFK?

I'm considering two Miami - Zürich flights, which connect at New York. Both start MIA - JFK, but one continues with JFK - ZRH and the other with LGA - ZRH.  If I check my luggage at Miami, and take a cab from JFK to LGA, will I have to carry my bags and re-check them at LGA, or does the airline do this?  The cost difference (two people) is ~120 USD total. How much is the taxi, normally? Is an airport change worth the hassle?


We saw Charles Xavier getting completely annihilated by Jean in the movie "X Men: The Last Stand". But, in the last movie in the series, "X Men: The Days of Future Past", we see Xavier alive. While there's a possible explanation of his existence in the changed parallel reality we see in the last, I cannot understand how he was alive in the first reality.  If anyone can shed light on this matter, it'll be greatly appreciated. Thanks. 😊

I remember watching X-Men 3 and seeing Charles Xavier get disintegrated by Phoenix, however the post-credits scene and his appearance in later movies indicate that he actually survived. How is that possible?


I want to upload csv file into lightning component and get the data from that csv file and need to create the records into custom objects using that csv.I am new to lightning.How can we achieve this using lightning.Any links for reference?

Currently I had built a file upload functionality in Lightning component which accepts the CSV file, read it as text(Each row in CSV is split using \n and each column in the row is split using ,). Then each columns in each row are validated in Javascript and if everything is fine,the data is saved in the backend. While uploading the data, if the file contains , in its data then it is taken as another column. Eg: X-36936,SS-341487,11-WT,414081,"LENDERS, THE HACK",2-Manage,,,,,,,,,,,,12/1/2013,3150,,0,,Dealing,2018,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,  Here "LENDERS, THE HACK" is a single column but it is taken as 2 columns (LENDERS --> 1st column and THE HACK --> 2nd column).Could anyone please help me how to resolve this issue?


When traveling through the vacuum, electromagnetic waves experience an increase of wavelength (redshift).   According to this equation:  $$E=\frac{hc}{\lambda}=h\nu$$  ( Where, as we know, h is the Plank constant, c is the light speed, λ is the wavelenght and ν is the frequency of the wave. )  An increment of the wavelength implies a decrement of the energy of the photon.  The question is, where does that energy go? Is it consumed during millions of years of movement of the EM or is there another explanation?

A photon emitted from a receding source (Doppler redshift) has less energy when detected at an observer's location. Please explain the energy loss from the perspective of energy conservation.


given   int a = 1; (00000000000000000000000000000001),   what I did is just   a=(a<<31)>>31;   I assume a should still be 1 after this statement (nothing changed I think). However, it turns out to be -1 (11111111111111111111111111111111). Anyone knows why?

I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ...   What I'm wondering is, at a core level, what does bit-shifting (<<, >>, >>>) do, what problems can it help solve, and what gotchas lurk around the bend? In other words, an absolute beginner's guide to bit shifting in all its goodness.


The characteristic of an integral domain $R$ is $0$ (or prime).  My lecture has not yet covered infinite integral domain but I'll like to understand the proof.  Basic fact: $R$ is an integral domain so $R$ is a commutative ring with unity (multiplicative inverse = $1$ exists) containing no zero-divisor.  $\space$  By definition of a commutative ring:  $\left ( R,+ \right )$ is an Abelian group.  "$\cdot$" is associative.  Distributive law holds.    $\space$  Definition (Zero-divisor): Let $R$ be a ring. Then an element $a(\neq 0) \in R$ is called a zero-divisor if there exists $b(\neq 0) \in R$ s.t $a\cdot b=0$  By contraposition, since there exists no zero-divisor in the integral domain R, it is true that $a\neq 0$ and there exists no $b\neq 0$. Can someone take me further? Thanks in advance. Edit: finite integral domain in lecture is covered

So the question is simply.      If $D$ is an integral domain and has finite characteristic prove that the characteristic of $D$ is a prime number.    This is my proof.  Assume $p$ is the characteristic of $D$. Let $a$ be a non zero element of $D$. Seeking a contradiction assume $p$ is not prime.  Then $p$ can be written as a factor: $rs=p$ for some $r$ and some $s$. By definition $pa=0$, so $(rs)a=0$. We know that $r,s$ are non-zero, so by definition of integral domain the only way this equation can equal zero is if $a=0$ however this is a contradiction as we chose a to be a non-zero element of $D$. Therefore $p$ is a prime.   Is this proof correct? The answer I have for this problem is slightly longer and I thought I might have missed something in my proof.


Can the expansion of the Universe effect be explained by contraction of the overall matter instead? That is, all material objects are in fact contracting, due to what the universal space seems (and only seems) to be expanding. Are there any theoretical arguments or experimental data that preclude replacement of the universal space expansion by the universal matter contraction as an explanation tool of the nature of the very process?

If space is the measured distance between 2 objects, then saying the space expanded is nonsensical unless we have a measuring stick outside of the space fabric to measure the expansion. 2 objects moving away from themselves isn't the same as space expanding.   What measuring stick is outside space? Doppler redshift shows the relative speed of a star in relationship to us - but would have no effect on a space expansion.  Edit: There seems to have been some confusion (very possibly on my part) on the nature of my question. I'm not talking about an explosion-type situation where matter in the universe is moving apart (with nuclear forces holding stars/planets and gravitation forces holding solar systems, and star clusters together). This is intuitive. I'm talking about statements made by physicists that "space itself" is expanding. An excerpt from a scientific American article: "the spacetime containing matter cannot remain stationary and must either expand or contract"    Edit after related question presentation: So according to the answers on that related question, we should be able to measure exactly that extra energy spent holding matter together against the accelerating space-time expansion. Would radioactive decay would be speeding up too? Would it get easier and easier to split an atom? So thats how we'd measure spacetime expansion?


I've found an interesting problem in my Combinatorics class notes but I am unsure how to start or even where to start. The question is:  Prove that $\sum_{j=1}^nf_j^2$ = $f_n$$f_{n+1}$, where $f_j$ are Fibonacci numbers.  Would anyone mind giving me a hint or at least giving me a start?

The definition of a Fibonacci number is as follows:  $$F_0=0\\F_1=1\\F_n=F_{n-1}+F_{n-2}\text{ for } n\geq 2$$   Prove the given property of the Fibonacci numbers for all n greater than or equal to 1. $$F_1^2+F_2^2+\dots+F_n^2=F_nF_{n+1}$$  I am pretty sure I should use weak induction to solve this. My professor got me used to solving it in the following format, which I would like to use because it help me map everything out...  This is what I have so far:  Base Case: Solve for $F_0$ and $F_1$ for the following function: $F_nF_{n+1}$.  Inductive Hypothesis:  What I need to show: I need to show $F_{n+1}F_{n+1+1}$ will satisfy the given property. Proof Proper:  (didn't get to it yet)  Any intro. tips and pointers?


I'm trying to replace my cp function by an rsync function My cp function is the following  find /home/odroid/USBHD/Movies/ -iname "*.mkv" -mtime '-1' -exec cp -n {} /home/odroid/NASVD/Movies \;   do you guys have any idea how to do this(note the mtime can also be replaced by --ignore-existing

I have a folder with more than 30 sub directories and I want to get the list of the files which was modified after a specified date(say sep 8 which is the real case) and to be copied with the same tree structure with only the modified files in that folder   I have say 30 dir from that I have the list of the files I need found using last modified date Find command output  a/a.txt a/b/b.txt a/www.txt etc..   For example I want the folder "a" created and only the a.txt in it...like wise for the other also "a/b" to be created and b.txt inside it...


I'm getting the following error from my Latex code:  ! Missing \endcsname inserted. <to be read again> \& l.27 ...ink{M\&A}{M\&A}]{Mergers and Acquisitions} The control sequence marked <to be read again> should not appear between \csname and \endcsname. ) \openout1 = `"BA.aux"'.   The Problem is the \& in (M&A) , but I don't know why. Below is the LaTeX code for which I am getting the LaTeX error:  \documentclass[a4paper, titlepage, abstract, 12pt]{scrartcl} \usepackage[T1]{fontenc}  \usepackage[ngerman]{babel} \usepackage{amsmath} \usepackage{amssymb} \usepackage{url} \usepackage{tabularx} \usepackage{graphicx} \usepackage{lmodern} \usepackage[onehalfspacing]{setspace} \usepackage{rotating} \usepackage{tikz} \usepackage[round]{natbib} \usepackage{float} \usepackage{multirow,array} \usepackage{listofsymbols} \usepackage{booktabs} %Tabellen \usepackage{tikz} %Timeline \usepackage{caption} %Tabellenunterschriften \usepackage[para,online,flushleft]{threeparttable} %Three Part Table \usepackage{pgfplots} %Plot zeichnen \usepackage{blindtext} %Bullets \usepackage{enumitem} %Bullets \usepackage{hyperref} \usepackage{geometry} %Seitenränder \usepackage{acronym}  %Abkürzungsverzeichnis**    \geometry{a4paper, top=25mm, left=25mm, right=25mm, bottom=25mm, headsep=10mm, footskip=12mm} \linespread{1.3} % entspricht word 1,5     %..............................................................................................................................................% \pagenumbering{Roman}  \setcounter{page}{1} \tableofcontents \newpage %..............................................................................................................................................%  %..............................................................................................................................................% \setcounter{page}{2} \listoffigures \addcontentsline{toc}{section}{Abbildungsverzeichnis\vspace{-10pt}} \rule[0pt]{0mm}{10pt} %\rule[Offset]{Breite}{Höhe} \newpage %..............................................................................................................................................% \listoftables \addcontentsline{toc}{section}{Tabellenverzeichnis\vspace{-10pt}} \rule[0pt]{0mm}{10pt} %\rule[Offset]{Breite}{Höhe} \newpage %..............................................................................................................................................%  \section*{Abkürzungsverzeichnis} %Bitte alphabetisch ordnen! \addcontentsline{toc}{section}{Abkürzungsverzeichnis\vspace{-10pt}} \rule[0pt]{0mm}{10pt} %\rule[Offset]{Breite}{Höhe} \begin{acronym}[Musterdingsbums] \setlength{\itemsep}{-\parsep}     % A     \acro{NAFTA}{North American Free Trade Agreement}     % B     % C     % D     % E     % F     % G     % H     % I     % J     % K     % L     % M     \acro{M\&A}{Mergers and Acquisitions}     % N     % O     % P     % Q     % R     \acro{ROE}{Return on Equity}     % S     % T     % U     % V     % W     % X     % Y     % Z \end{acronym}  \newpage \section*{Symbolverzeichnis} %Die hier verwendeten Symbole stellen eine beispielhafte Auswahl dar. \addcontentsline{toc}{section}{Symbolverzeichnis\vspace{0pt}} \rule[0pt]{0mm}{10pt} %\rule[Offset]{Breite}{Höhe} \begin{acronym}[Musterdingsbums] \setlength{\itemsep}{-\parsep}     \acro{i}[$i$]{Interest rate}    \end{document}C   I'm using MacTeX (texmaker)   Thank You!

I am trying to use the acronym package to create an acronym list. The problem is that one of the acronyms I need to use contains an ampersand ('&').  But when I try to compile the .tex file I get this error:  ! Missing \endcsname inserted. <to be read again>                     \& l.2 ...&M}[\AC@hyperlink{M\&M}{M\&M}]{I like them}   Here is an example:  \usepackage{amsmath} \usepackage{acronym}  \begin{document}  \begin{acronym} \acro{M\&M}{I like them} \end{acronym}  \end{document}   So how do I use an ampersand in an acronym using the acronym package?  More generally, how is it possible to apply special formatting to a single acronym? For example  \acro{\textit{IAF}}{Italic acronym frenzy}


I was trying to launch another terminal via terminal too and noticed that it's not the right name. wolf@ubuntu:~$ terminal  Command 'terminal' not found, but can be installed with:  sudo apt install rsplib-legacy-wrappers  wolf@ubuntu:~$  Then, I looked at the ps as I already have one terminal running now. wolf@ubuntu:~$ ps aux | grep -i terminal wolf      3688  0.6  0.2 807008 41496 ?        Ssl  08:40   0:05 /usr/lib/gnome-terminal/gnome-terminal-server wolf      6251  0.0  0.0  14428  1076 pts/1    S+   08:53   0:00 grep --color=auto -i terminal wolf@ubuntu:~$   I found one which is /usr/lib/gnome-terminal/gnome-terminal-server and I thought this must be the one. wolf@ubuntu:~$ file /usr/lib/gnome-terminal/gnome-terminal-server /usr/lib/gnome-terminal/gnome-terminal-server: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-ubuntu-x86-64.so.2, for GNU/ubuntu 3.2.0 wolf@ubuntu:~$   However, I can't launch it wolf@ubuntu:~$ /usr/lib/gnome-terminal/gnome-terminal-server Failed to register: Unable to acquire bus name 'org.gnome.Terminal' wolf@ubuntu:~$

I noticed that there were no processes named "gnome-terminal" although I was using so called "gnome-terminal" which was invoked by clicking the icon on the menu bar on desktop.  $ ps -au | grep gnome cul8er    8763  0.1  0.8 554960 33268 pts/22   Sl   05:16   0:00 /usr/lib/gnome-terminal/gnome-terminal-server --app-id com.canonical.Terminal.AnAuzDeiSeoqQhlGKbPNPeHhAROwBwtP cul8er    8771  0.0  0.0  14852  1832 pts/22   S    05:16   0:00 gnome-pty-helper cul8er    8821  0.0  0.0  14656  2232 pts/23   S+   05:27   0:00 grep --color=auto gnome   So I typed gnome-terminal &. the output was the following:  $ gnome-terminal & [2] 8865 $  [2]+  終了                  gnome-terminal $ echo $LANG ja_JP.UTF-8   This result seems to show that the process of gnome-terminal exited immediately when the terminal emulator was displayed. If it is true, why can I see new terminal without a process associated to it?  So I checked the command gnome-terminal:  $ which gnome-terminal /usr/bin/gnome-terminal $ file /usr/bin/gnome-terminal /usr/bin/gnome-terminal: Python script, ASCII text executable   gnome-terminal is a python script.  I looked at it. I couldn't understand enough because I don't know python, however I noticed /usr/lib/gnome-terminal/gnome-terminal-server --app-id, which was shown in the output of ps, is related to this issue. But I don't know what does 'subprocess' and 'Popen' mean.  subprocess.Popen(['/usr/lib/gnome-terminal/gnome-terminal-server',                            '--app-id',                            name],                           stdout=subprocess.DEVNULL,                           stdin=subprocess.DEVNULL,                          stderr=subprocess.DEVNULL)   If sub processes are invoked whenever gnome-terminal script runs, multiple processes should run when I open gnome-terminals. However it always seems that there is only one process /usr/lib/gnome-terminal/gnome-terminal-server --app-id in ps's output.  What is going on while the script runs?  And where is the process that represents so called "gnome-terminal"?  OS: Ubuntu 15.04


Let $m,n,k\in\mathbb{N}$ such that $n= 2k-1$ ($n$ is odd). Find $(2^m +1, 2^n -1)$, where by $(a,b)$ we mean the greatest common divisor of $a,b$.    Attempt: Let $(2^m +1, 2^n -1)=:d$, then  $$d\mid (2^m+1)\land d\mid (2^n -1)\Rightarrow d\mid (2^m + 2^n)\Leftrightarrow d\mid (2^m+2^{2k-1})$$ If $m\geq 2k-1$, that is $m=2k-1+r, r\in\mathbb{N}\cup\{0\}$, then $d\mid 2^{2k-1}(2^r+1)$ and I'm stuck. What should I do from here? How would $n$ being odd help the case?    Was told to use the euclidean algorithm here, but I don't understand what was meant by that.  References to similar problems would be appreciated.

A student of mine has been self-studying some elementary number theory. She came by my office today and asked if I had any hints on how to prove the statement      If $m$ is odd then $\gcd(2^m-1,2^n+1)=1$.    It's been a while since I took number theory and I'm not sure what to do. She said she is learning about congruences, primitive roots, and power residues.  She has not taken any group theory.


How can I get a list of the programs that are in the dock through the terminal in the correct order? I am using Ubuntu 18.04.

In Ubuntu 17.10, how do I rearrange the application icons in the dock area? I have tried many ways but failed, such as:   right-click the icons left-click or right-click the empty space in the dock


I have gif animated image that I want insert in a presentation that I'm building with the beamer package. I want that the image is animated also in the presentation and the only way that I know to do that is to isolate the gif images, save them as JPG, than insert the sequence of these images using the animate package. But this is a tedious work to do, so I ask if there is some other more quick way .

Is there any way to include an animated GIF directly in either PDFLaTeX or XeLaTeX? I realize the animate package can include animations in a PDF, but it doesn't support animated GIFs and you have to split them up manually into EPS or PNG files as far as I can tell.


For any abelian group $A$. Is it possible to construct a nontrivial homomorphism from $A \to \mathbb{Q}$?  Is it possible if $A$ is a finite generate abelian group?

I have a finite abelian group $A$ and I have shown that $A\otimes\mathbb{Q} \cong \{0\}$, the trivial group.  Now I want to show that $\text{Hom}_{\textbf{Ab}}(A,\mathbb{Q}) = \{0\}$, i.e we only have the trivial zero group homomorphism from $A$ to $\mathbb{Q}$.  The question I'm trying to solve is phrased in such a way that $\text{Hom}_{\textbf{Ab}}(A,\mathbb{Q}) = \{0\}$ should fall out almost automagically once you have that the tensor product collapses but I'm really stuck on this even though some people I talked to said it was really easy.  Some thoughts:   I've tried to assume the existence of a nontrivial homorphism $A \to    \mathbb{Q}$ to generate a contradiction but with no success. We have the Tensor-hom adjunction theorem stating that for abelian groups $A,B,C$ we have a natural bijection  $$\text{Hom}_{\textbf{Ab}}(A\otimes B,C) \cong \text{Hom}_{\textbf{Ab}}(B ,\text{Hom}_{Ab}(A,C))$$ and by plugging in our particular groups we get that:   $$\text{Hom}_{\textbf{Ab}}(A\otimes \mathbb{Q},\mathbb{Q})\cong\text{Hom}_{\textbf{Ab}}(\mathbb{Q} ,\text{Hom}_{Ab}(A,\mathbb{Q}))$$  Since $A\otimes\mathbb{Q} \cong \{0\} \implies \text{Hom}_{\textbf{Ab}}(\mathbb{Q} ,\text{Hom}_{Ab}(A,\mathbb{Q})) = \{0\}$ so we only have the trivial morphism from $\mathbb{Q} \to \text{Hom}_{Ab}(A,\mathbb{Q})$ but I don't think this implies that $\text{Hom}_{Ab}(A,\mathbb{Q}) = \{0\}$ and I'm not sure if this reasoning helps me at all.


I have a 70-200 canon lens that I would like to put on a 3200 dslr. Can someone please advise me of an adapter that would work?Thanks!

I have Canon lenses and would like to purchase an adapter to use them on the D3200? Is there one available? If so name and model would be appericated. I understand that I will have to shoot on manual mode.


I know humans can cook and prepare almost anything, but are humans specifically adapted to eat meat?  One of my doubts humans are not particularly well adapted to eat meat because they lack canine teeth. I read more reasons for this .  What does an evolutionary biologist have to say on this matter? Perhaps evolutionary biology is the field related to this?  Some links supporting my doubt:

If humans can live without consuming other animals, then why do we do it? From a biological point of view, why do we eat meat? I would also extend the question to other animals because many animals are carnivorous: why did carnivory evolve and why do animals eat meat?


I'm very new to Ubuntu, using 14.04. I need to make swap space, so I read, to overcome a garbage collector problem. My RAM is 8 GB, and my code is using big data and uses a lot of RAM.   What is swap space? Does it mean using flash memory or is it a way to use the RAM of the laptop? What should I do (from scratch)?  command lsblk gave   NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 465.8G  0 disk  ├─sda1   8:1    0 461.9G  0 part / ├─sda2   8:2    0     1K  0 part  └─sda5   8:5    0   3.9G  0 part [SWAP] sr0     11:0    1  1024M  0 rom    command free-h gave           total        used  free  shared  buffers  cached Mem:      7.6G       7.4G  163M   727M   196M     4.9G -/+ buffers/cache:   2.3G  5.2G Swap:      9.9G       0B   9.9G   swapon -s  gave me   Filename                Type        Size    Used    Priority /dev/sda5               partition   4086780     0       -1 /swapfile               file        6291452     0       -2   blkid gave me   /dev/sda1: UUID="bf8fe3ec-1937-458f-be1e-5e1270111217" TYPE="ext4"  /dev/sda5: UUID="2336032a-d853-4d38-9b2c-c24793586d3c" TYPE="swap"

I have, by default, 250MB of swap space in Ubuntu, and I want to expand it to a larger size. I need 800MB, which I think will be enough to open several applications without having to hit the current limit of swap. I hope someone can help me.


Stokes' law of viscous friction is famously applicable to spheres in (slow) motion within a fluid. If the object has radius $r$ and speed $v$, and the fluid has dynamic viscosity $\eta$, the dampening force will be  $$\mathbf F_f = -b\mathbf e_t $$ (where $\mathbf e_t$ is the unit tangential vector) with $b = 6\pi \eta rv$.  Now, what if the object is a disk of radius $r$ and thickness $h$ instead? (Supposing, e.g., that the disk's trajectory is always orthogonal to its circular surface.) How will the formula for $b$ change?  EDIT: This question is not a duplicate of the one posted in the comments, since as I have specified the object I am interested in is a finite-length cylinder immersed in a 3D fluid.

How can one analytically calculate the terminal velocity of a settling sphere in 2D? Actually it would be a circular disk. One cannot simple equate boyancy forces minus the drag right? As stated in   the formula $\textbf{U}_s=2/9(\rho_p-\rho_f)\textbf{g}/9\mu$ [1] does not hold!  [1]


Here is the error message:  ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt". [2017-02-14 16:35:18] Startup - updater built Jun 16 2014 11:16:02 Xlib:  extension "NV-GLX" missing on display ":0". SteamUpdateUI: An X Error occurred X Error of failed request:  BadValue (integer parameter out of range for operation) steam

After installing and updating, whenever I start Steam, it gives me the following error:  Running Steam on ubuntu 15.04 64-bit STEAM_RUNTIME is enabled automatically [2015-05-02 16:48:39] Startup - updater built Apr 13 2015 15:17:10 SteamUpdateUI: An X Error occurred X Error of failed request:  BadValue (integer parameter out of range for operation)   I tried to find a solution to a similar error, but I was not able to find. Can anyone please help?


I have installed CyanogenMod 10.1.x on my Note 2, but I find it very unstable and it often goes on a reboot loop.  I use ClockworkMod recovery.  I would rather work with a stock android at this point.  Questions:   Since I have ClockworkMod recovery, I presume I can use it to flash the "official" ROM? Is this correct? Can someone point me to the official stock android from Samsung?

There are several reasons to be looking for a ROM:   Upgrading or downgrading your stock ROM Looking for firmware from a different region/language Flashing a custom ROM for different features, removing bloat, etc.   But where can one find ROMs in the first place?  What sites are likely to have the ROM I need?  ; please add to the wiki answer instead of posting separate answers.  See also:


I have had Ubuntu 14.04 for a couple of weeks now with no problems.  Then suddenly, I started my computer up, logged into Ubuntu and it only showed my wallpaper.  There were no icons and the terminal didn't work.  I had made no changes to my computer and it was working fine when I logged in only an hour before.  I have a dual boot with windows 7 (which is working fine.)  I can still access my files using Ctrl + Alt + F2 and shut down but is there any way to fix this problem? Thanks

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


I am based in India and we don't have reliable Internet everywhere. I would like to build an Ubuntu installer ISO with the following features:   All proprietary drivers should be available offline At least one complete language pack (say, English/USA) should be available offline Certain extra packages And finally, things like flashinstaller or Chrome, which download data from the web while installing, should also work.   How do I go about building something like this?  -

I would like to customize Ubuntu live CD by installing some additional packages. I have followed   but it doesn't seems to work. Can anyone provide clear instructions?   Note: I do not prefer Remastersys, manual way will be appreciated.  Customization  Packages that I want to install:   Thunderbird    Samba    SSH       Changes that I need:   Remove Games menu from the Application menu Firefox shortcut on Desktop Radiance as the default Theme Different default Ubuntu Wallpaper   Configuration file changes   I want the panel to be placed at the bottom I want to paste my Samba configuration file instead of default Samba configuration I have few Firefox shortcuts and folders I would like to show that in Desktop Also it will be nice if you say me how to change the icon sets   Recent Updates   I have customized Ubuntu 10.10 with Firefox shortcuts and few folders on desktops. Everything went smooth. But the installer gets crashes after choosing the timezone. How do i fix this issue? Also setting wallpaper affects the login screen. The wallpaper which i set is displayed on the login screen also. I just want the default one for the login screen.


I have a number of strings similar to Current Level: 13.4 db. and I would like to extract just the floating point number. I say floating and not decimal as it's sometimes whole. Can RegEx do this or is there a better way?

How do I extract a double value from a string using regex.  import re  pattr = re.compile(???)     x = pattr.match("4.5")


SELECT person.firstnames,        person.surname,        crm_question.label,        crm_answer.value        FROM crm_interaction     JOIN person ON person.id = crm_interaction.person_id     JOIN crm_answer ON crm_answer.interaction_id = crm_interaction.id     JOIN crm_question ON crm_question.id = crm_answer.question_id   my output looks like this  firstnames | surname | label | value  |  |----------|------   |-------|-----   | |     name | surname |label 1| value 1|  |     name | surname |label 2| value 2|  |     name | surname |label 3| value 3|    But I need it to look like this  firstnames | surname | label 1 | label 2 | label 3 | |----------|------   |-------   |-----    | |     name | surname |value 1   | value 2 | value 3 |  |     name | surname |value 1   | value 2 | value 3 | |     name | surname |value 1   | value 2 | value 3 |    I created a quick SQL fiddle to build my Schema here:    I have tried to impliment a procedure into my code but keep getting errors that the syntax is incorrect I have never used MYSQLand this is greek to me.  Is it possible to pivot the original statement using a procedure to output the data in this way?  I know that tables can join and inner join but how can one go about changing the way that the data is displayed and connected?


When I boot up 32-bit Ubuntu 18.04.5 on my i686 32-bit machine, why am I prompted to upgrade to Ubuntu 20.04.1 LTS...which, as I understand it, is a 64-bit OS?  Surely the code is smart enough to tell that my machine will not run a 64-bit OS.

I want to know if it is possible to update to Xubuntu 20.04 since I can't find a 32-bit version. If I update through the terminal with sudo apt update && sudo apt -y dist-upgrade  will the system break? Thank you!


Hello what is difference between this field: public string Name;  And this property: public string Name{get;set;}   I read this topic :

In C#, what makes a field different from a property, and when should a field be used instead of a property?


I have a for loop which outputs a list of 15 values:   for line in data:      line # type(line) is `<class 'list'>`         # do things with line   This line is always a Python list of 11 values, i.e.   ['value1', 'value2', 'value3', 'value4', ... ]    I have a list of dictionary keys, which I have manually created:   ['key1', 'key2', 'key3', ...]   I would like to join my keys to each of the values for each line in my for loop. Therefore, I can define a new line that looks like    ['key1': 'value1', 'key2': 'value2', 'key3': 'value3', ... ]   This would be used in the for loop, i.e.   for line in data:      line # values     # join key-value pairs     # new_line = ['key1': 'value1', 'key2': 'value2', 'key3': 'value3', ... ]         # do things with new_line   EDIT: I don't believe this is a repeat question. zip(keys, values) does not produce the desired result.   EDIT2: Would it be easier to create one large dictionary within a list?  [{'key1': 'value1', 'key2': 'value2', 'key3': 'value3', ... }]   or perhaps a tab-delimited test file?   key1:value1  key2:value2  key3:value3   ....

Imagine that you have the following list. keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam']  What is the simplest way to produce the following dictionary? a_dict = {'name': 'Monty', 'age': 42, 'food': 'spam'}


I'm helplessly trying to boot my machine to runlevel=3. Whether adding ad-hoc via editing command line during grub session or offline, via updating /etc/default/grub: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash 3" (then grub-update), once rebooted, machine hangs and stops with: `overlayfs: missing 'lowerdir'`   above there is also: `aufs aufs_fill_super: ...`  I can boot to recovery mode, remove "3" and reboot to normal use with ease, but cannot boot to runlevel 3. Any hints are appreciated. Thanks in advance, P.

Pretty simple, I am trying to change the runlevel. Everything I find online points me to the file located in:  /etc/init/rc-sysinit.conf   Here I have tried changing the "DEFAULT_RUNLEVEL" to 3 or anything else and it makes no difference (the original value was 2 which didn't make much sense either). No matter what, my machine boots fully and when I check the runlevel command, I see "N 5" as the result every time.  How do I change the runlevel? I would rather not override it through grub or some other workaround mechanism. And I am not looking for how to disable X specifically.  All the instructions I was finding online were a bit old, did something change with 16.04?


I had a question on Code Review go Community Wiki due to too many edits.  I didn't see anything about those rules and recommendations when I was posting or editing my question.   It would be good to put a little something on the "Ask a question" page with information about the triggers and rules. It might also be beneficial to put that kind of info somewhere prominent in the "edit" dialogue. It might cut down on posts that trigger CW, if volume is even an issue of concern for CW.   I'd like to think that if I'd had some warning about this policy or a popup that says "you've only got 1 edit left before you trigger CW" I would have avoided it.   doesn't even mention Community Wiki or actions that might land your question under it.    It is hard to follow the rules if you don't know what they are.    Is there a page where such policies are available?  If so, maybe there should be a link to it on "ask" and "edit" pages.  I think that this would make a great website even better.

The below is no longer relevant since posts  after being edited     As the Community Wiki process can't be undone and is automatically happening after five people edit the same post, it will be good and essential idea to add warning: "Your edit will make the post Community Wiki, sure to continue?" or something along those lines.  Just happened to me (was the 5th to edit a question) and I never intended to make it a wiki. Yes I know, will check how many people edit it before but it was new question so never assumed four people edited it already. :/  Edit: as "compromise", it will also be really cool to have count of how many people already edited the question, this way if I'll see "edited by 4 people" I will think twice if my edit is really necessary.  Edit II:  I was under the impression that having the "root" question become CW all answers also become CW as result and no reputation is gained - however I've just noticed that impression was wrong and the answers are safe and sound.... so this is really just to prevent situation where one action (editing a post) is triggering other action that is not trivially related (making it Community Wiki) without any warning, especially when that unintended action is not reversible.


I am told that we can't predict whether we shall get a head or tail. We can only say that for an unbiased coin there is 50% probability for either. But coin is not case of Quantum Physics!  I have heard people say that such and such cannot be predicted, but it is obvious that if we have enough information about the event we can use the laws of universe and predict what will happen. So, is it possible to predict whether we get a head or tail in practice? I know we shall have to take into consideration the angular momentum of the coin, law of gravity, friction with air among many other things which I can't think of right now, ah perhaps the friction of the surface and how much bouncy it is.

I'm not sure if this is the right place to ask this question. I realise that this maybe a borderline philosophical question at this point in time, therefore feel free to close this question if you think that this is a duplicate or inappropriate for this forum. Anyway, I'm an electrical engineer and I have some basic knowledge of quantum mechanics. I know that Schrödinger's equation is deterministic. However, quantum mechanics is much deeper than that and I would like to learn more. If this question is not clearly answerable at this point than can anyone point out some recognized sources that try to answer this question. I would appreciate it if the source is scientific and more specifically, is related to quantum theory.


I just want to know if its possible. I have only two in my general area and I would like too add some if possible. This is probably a really stupid question but i'm just curious.

How do I add a Pokestop to an area that has none? It is an area where there are tons of businesses but unless I drive about a mile from my work area there are no Pokestops.   I want to add one since we have 1000's of people in the work area, a lot of them play Pokemon Go, and we all can't leave work to drive a mile away to get to a Pokestop area.   Plus it would be nice to be able to capture Pokemon on our breaks.


I'm running a Java application that uses a fixed thread pool, where threads are used to make HTTP requests to external services.   The thread pool was purposefully overprovisioned, and I want to obtain some measurements for utilization of the thread pool (i.e, at this moment, 20% of the threads in the pool were free, at this other moment 30% of threads were busy).  Is there an efficient way of checking what proportion of the thread pool (created through the Executors.newFixedThreadPool(x)) is currently performing a task?   I had thought about creating a special monitor thread that continually runs a Callable task, reporting back the utilization, but I wasn't certain if that would impact performance of the tread pool itself (by making threads respond to the monitor instead of making HTTP calls).

Any ideas how to determine the number of active threads currently running in an ?


I want to send the mail to multiple recipents with varying body content each user will have different content . This is the code I used for sending, but I cannot send to multiple users.   $to = 'abc@gmail.com,test@gmail.com';   drupal_mail('mimemail', 'testing', $to, language_default(), $params, $from = NULL, $send = TRUE);

I am using drupal_mail to send email,  $to = 'email@email.com'; drupal_mail('$module_name', $key, $to, language_default(), $params = array('username' => 'Tanvir'), $from = NULL, $send = TRUE);   I want to send email to multiple email addresses at once. Should I be doing this?  $to  = array('one@email.com', 'two@email.com', 'three@email.com',); drupal_mail('$module_name', $key, $to, language_default(), $params = array('username' => 'Tanvir'), $from = NULL, $send = TRUE);


here is my code:  object test extends App {    private val PLAYER_REGEX = """[\s\S]*(?: <s class="text-muted">|)(.*)(?:</s>
|
)""".r   val str =""" <s class="text-muted">first</s>
"""   val str2 ="""second
"""    private def find(str:String) = {     PLAYER_REGEX.findFirstMatchIn(str) match {       case Some(data) => data.group(1).trim       case None => "Not found"     }   }   println(find(str))   println(find(str2)) }   And Output is   first</s> second   My question is - why those redundant   </s>    in first case? I thought that   (?:</s>
|
)     should select first occurence   </s>
    but looks like it select
???   Off course I can trim it, but it looks ugly. If you can provide another regex I'll also will be glad:)

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I recently hit 20k rep and gain the privilege to delete answers with negative score.  When should I use my delete votes on answers, given that non-answers can be flagged and resolved with single binding vote by community moderators?

I am a non-20k-er on many sites. What am I supposed to do when I encounter a not-an-answer?   Flag it as not an answer? Downvote it? All of the above?   I have 20k reputation on one of the sites. What am I supposed to do when I encounter a not-an-answer there?   Flag it as not an answer? Downvote it? Vote to delete it, if it has negative score? All of the above?   And if the answers to these two questions are "all of the above", why do we need to separate it into multiple actions? Why not have flagging as not-an-answer automatically issue a downvote and, if possible, a delete vote?


Show that $S=\{\frac{p}{2^i}: p\in\Bbb Z,  i \in \Bbb N \}$ is dense in $\Bbb R$.  Just found this given as an example of a dense set while reading, and I couldn't convince myself of this claim's truthfulness. It kind of bugs me and I wonder if you guys have any idea why it is true. (I thought of taking two rational numbers that I know exist in any real neighborhood and averaging them in some way, but I didn't get far with that idea..)  Thank you!

Possible Duplicate:          I have to show that show that $A=\{ \frac{m}{2^n}:m\in \mathbb {Z},n\in \mathbb {N}\} $ is dense in $\mathbb {R}$.  A set A is dense in $\mathbb {R}$ if $\overline A=\mathbb {R}$.  But also $Y$ is a subset of $X$, we say that $Y$ is dense in $X$, if for every $x\in X$ , there is $y \in Y$  that is arbitary close to $x$.  So ,I have to prove that for every $x \in \mathbb {R}$ ,there is a number $\frac{m}{2^n}$ arbitrarily close to $x$.So $\forall \epsilon,x ,\exists y$ such that $|y-x|<\epsilon$.   I got a little stuck at this point...Could anyone give me a hint?Thanks a lot!


After shrinking and increasing the size of a disk in Windows 8 .... this is the error that i get when i start up my PC , it says .... Entering GRUB Rescue Mode.

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


I overstayed my visitors visa by just over 4 years, but returned home in 1997 - will I still be able to gain access to the USA when going on a holiday after all this time?  I was never deported and never stopped at the airport - I just left the USA as a normal traveller.  The ESTA form asks if you have ever overstayed - do I put yes or no?    I was a single woman when I came home, but am now married (separated) with two children under 18.  I have my own business in the UK and would have no intention of staying in the USA except on a family holiday.   What would be the consequences if I answered 'no' on the application form?

I have a particular situation here, In March of 1997 I travelled to the US as a tourist and lived there illegally for almost 9 years. I was never arrested, or had any trouble with the law, I was never deported. I paid my taxed (had a TFN) had a job, bank account bought a house, etc. About 9 years ago I decided to leave as I was tired of living like that, not able to be legal, in fear of deportation and loosing everything. I also got married (to a person in the exact situation as me) we were able to legally migrate to Australia and now we are Australian citizens. We never returned our I-94s and in 2005 left through Mexico (walked through the border) so there are no records of us ever leaving. We have lived here in Australia for over 9 years.  OK so my question is... We have been thinking we would like to visit our friends and family back in the US now that we have a little girl. Is there any chance they won't let us in because they know we overstayed? We would be travelling with our Australian passports.


Bash code to print all folders:  for f in ~/*; do if [ $f  == '/home/sk/.' -o $f  == '/home/sk/..' ]; then        true   else      echo "$f"   fi done   It works on bash. When i ran the code on z shell, it threw error:   = not found   Then I converted [ into [[, ] into ]] to avoid this error in z shell and ran it on z shell. It threw next error:  condition expected: $f   With [[ and ]], bash also throws error as:  syntax error in conditional expression syntax error near `-o'   Is there a POSIX standard to do string comparison in shell, that works across shells?

I just wanted to ask whether there is any command which would work on common shells (bash, dash, kornshell)? It is supposed to check if the line variable contains any part of the path.  if [[ $line =~ "$PWD"$ ]] ;then


"I absolutely must see him, however painful it may be for me." I feel like this version makes more sense. "I absolutely must see him regardless of the pain." If I'm wrong, can you explain how the first version makes sense. I thought however shows contradiction. I don't see the contradiction. "My grandfather will certainly let me buy German clothes because he thinks it is longest-lasting. However, my grandmother will certainly let me buy French clothes because she thinks it is the most beautiful." For this example, I don't feel like however is used properly either.

What is the meaning of the word "however" in the phrase "possible, however unlikely"? An example of a sentence containing this phrase (taken from Star Wars: Episode IV - A New Hope) is,      If the Rebels have obtained a complete technical reading of this station, it is possible, however unlikely, they might find a weakness and exploit it.    The word "however" can have two meanings according to google. These are:   used to introduce a statement that contrasts with or seems to contradict something that has been said previously, in whatever way; regardless of how.   So the example sentence could be interpreted as:    It is possible they might find a weakness and exploit it; however, this is unlikely.    Or it could be interpreted as    However unlikey it is, it is (nevertheless) possible that they might find a weakness and exploit it.   Is one or the other of these "the correct way" of interpreting it, or are the two ways so similar that the speaker would not intend for the phrase to be interpreted one way or another, and you are free to choose whichever meaning you want?


I've checked everywhere but I can't find the meta-inf folder so that i can delete it to get mods working. I've checked in the 1.6.4 version folder but there was nothing in the except two folders called 1.6.4 and 1.6.4.json.

I have looked all over the Internet for solutions but I have got nothing.  I want to install the minepainter mod but I need a META-INF folder and a minecraft.jar.


Everytime I setup a new VPS, I secure shared memory by adding the following to /etc/fstab:  tmpfs     /dev/shm     tmpfs     defaults,noexec,nosuid     0     0  Which works as expected on every host, EXCEPT for Linode.  Here is the bootup error I get in Lish:  init: plymouth-upstart-bridge main process (1335) terminated with status 1                               init: plymouth-upstart-bridge main process ended, respawning                                             init: ureadahead main process (1338) terminated with status 5                                            init: plymouth-upstart-bridge main process (1343) terminated with status 1                               init: plymouth-upstart-bridge main process ended, respawning                                             init: plymouth-upstart-bridge main process (1350) terminated with status 1                               init: plymouth-upstart-bridge main process ended, respawning                                             random: nonblocking pool is initialized   The VPS is never able to boot after this and thus has to be deleted completely.  Any idea why that might be the case?

In my Ubuntu deployment script I have written a function to secure shared memory. For a web server it's important to secure the shared memory to tighten up security. Below you can find the code:  echo "tmpfs       /dev/shm     tmpfs   tdefaults,noexec,nosuid        0 0" >> /etc/fstab   When I reboot the web server it gets stuck. I can't see where it goes wrong. Do you have an idea, please let me know.


complete novice here so be gentle with me, I am trying to update a mysql database with a string that is likely to contain apostophes, I have it all working except the apostophe issue, I have htmlspecialchars in use. I assume I need mysqli real_escape_string but don't know how to incorporate it into my code. The coding is probably very poorly done but while it works I can live with it, it is for an extra couple of text boxes sneaked into an existing gallery script. Code is: <?php  $servername = "localhost:3306"; $username = "xxxxxxxxx"; $password = "xxxxxxxx"; $dbname = "my_bodged_gallery"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) {   die("Connection failed: " . $conn->connect_error); } if (empty($_GET)){     $gallery_id = htmlspecialchars($_POST["gall_id"]); }else{ $gallery_id = $_GET['gall_id'];  }  if(isset($_POST["submit"])){  $new_title = htmlspecialchars($_POST["new_title"]); $new_story = htmlspecialchars($_POST["new_story"]) ;  $sql = "UPDATE stivagallery_plugin_gallery SET main_title = '$new_title' , story = '$new_story' WHERE foreign_id= '$gallery_id' AND sort= '1'"; if ($conn->query($sql) === TRUE) {   echo "Record updated"; } else { echo "Error updating record: " . $conn->error; } $sql = "UPDATE stivagallery_galleries SET title = '$new_title' , story = '$new_story' WHERE id= '$gallery_id' "; if ($conn->query($sql) === TRUE) {   echo " successfully"; } else { echo "Error updating record: " . $conn->error; } }else{                 $sql = "SELECT title, story FROM stivagallery_galleries WHERE id= '$gallery_id' ";             $result = $conn->query($sql);             if ($result->num_rows > 0) {              while($row = $result->fetch_assoc()) {     $new_title =    $row["title"];     $new_story =    $row["story"];     }   }   }   $conn->close();  ?>

       <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post">                 Title:
         <input type="text" name="new_title" size="20" value="<?php echo  $new_title ;?>">

         Your story:
         <textarea rows="10" name="new_story" cols="80"><?php echo $new_story ;?></textarea>
         <input type="hidden" name="gall_id" value="<?php echo $gallery_id ; ?>">         <input type="submit" name="submit"><input type="reset" value="Reset" name="B2">
       </form>

  Any help greatly appreciated, I'm a greasemonkey not a programmer....

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


<!DOCTYPE html>     <html>     <body onload="myFunction()">     <script>     var go="globle";     function myFunction() {     var go="local";     document.write(go);          }     document.write(go);     </script>      </body>     </html>   when I run this code it will print local.But when I run the following code:      <!DOCTYPE html>     <html>     <body onload="myFunction()">     <script>     var go="globle";     function myFunction() {     var go="local";         }     document.write(go);     </script>      </body>     </html>   This code print globle. Why not the first code printing both local and globle. And also when I run first code my html body is also not executed.

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I'm currently using BibLaTeX for my bibliography. And I have already written a lot of references in my .bib file. Some of them contain the same author, and since I'm ordering the bibliography in alphabetical order, some of the same authors are lined up right after each other - as intended.  But, let's say I have three books with author: "James, K." Then LaTeX writes it like this:  James, K., "Book name", etc. etc. --, "Book name 2", etc. etc. --, "Book name 3", etc. etc.   My question is: How do I make LaTeX write the full name, and not just the -- ?  Thanks in advance.

I use biblatex with style=authoryear and when there are two references of the same author in the bibliography there is just a dash. How can I get the full name in the second entry too?


In the following context, which usage is correct, or are both of them OK?   After a hour-long drive, they arrived at Chinatown. After an hour-long drive, they arrived at Chinatown.   Your help is greatly appreciated!

A basic grammar rule is to use an instead of a before a vowel sound. Given that historic is not pronounced with a silent h, I use “a historic”. Is this correct? What about heroic? Should be “It was a heroic act” or “It was an heroic act”?  I remember reading somewhere that the h is sometimes silent, in which case it’s an, and when the h is pronounced, it’s a. But then I also remember reading that it depends on which syllable is stressed. And I also think I read somewhere that it might differ between British and American English.  Personally, I pronounce the h, and believe that a is correct. I find that it sounds incorrect to use an and pronounce heroic without the h.  So how do I know when to use a and when to use an with a word beginning with the letter h? Are both acceptable or is there one that is correct?


pgAdminIII reports errors related with a column missing after installing postgis in postgres 12.5 and ubuntu 20.04 Error column proisagg does not exist where perhaps you meant pr.proisagg people reported this error en previous versions and phpadmin  Solution there does not work Note /usr/share/phpPgAdmin/classes/database/ does not exist in my installation

Using phpPgAdmin v5.6 and PostgreSQL v11.2 on CentOS v7, when I try to access the Functions tab within the public schema, I get the following error:  ERROR:  column p.proisagg does not exist LINE 18:    WHERE NOT p.proisagg                       ^ HINT:  Perhaps you meant to reference the column "p.prolang". Dans l'instruction :              SELECT                 p.oid AS prooid,                 p.proname,                 p.proretset,                 pg_catalog.format_type(p.prorettype, NULL) AS proresult,                 pg_catalog.oidvectortypes(p.proargtypes) AS proarguments,                 pl.lanname AS prolanguage,                 pg_catalog.obj_description(p.oid, 'pg_proc') AS procomment,                 p.proname || ' (' || pg_catalog.oidvectortypes(p.proargtypes) || ')' AS proproto,                 CASE WHEN p.proretset THEN 'setof ' ELSE '' END || pg_catalog.format_type(p.prorettype, NULL) AS proreturns,                 u.usename AS proowner             FROM pg_catalog.pg_proc p                 INNER JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace                 INNER JOIN pg_catalog.pg_language pl ON pl.oid = p.prolang                 LEFT JOIN pg_catalog.pg_user u ON u.usesysid = p.proowner             WHERE NOT p.proisagg                 AND n.nspname = 'public'             ORDER BY p.proname, proresult  Fatal error: Call to a member function recordCount() on integer in /mnt/webdata/websites/applications/pga/classes/Misc.php on line 1949   I get the same error using the \df meta-command in psql (version 10.1 as it turns out):  ts_d=> \df ERROR:  column p.proisagg does not exist LIGNE 6 :   WHEN p.proisagg THEN 'agg'                  ^ ASTUCE : Perhaps you meant to reference the column "p.prolang". ts_d=>   The error in those queries seems to be due to a reference to proisagg, a column originally from the pg_proc table in the pg_catalog schema, but which no longer exists in PostgreSQL 11. See:   Any way to resolve this?


user1@server1:/locdisk/data/a$ touch test user1@server1:/locdisk/data/a$ ll  rwxrwxrwx 1 user1 user1 1 AUG 30 11:11 ./ rwx------ 1 user1 user1 1 AUG 30 11:11 test  user2@server2:~$ ssh server1 user2@server1:~$ vi /locdisk/data/a/test   And then modify test by 'w!'  user2@server1:~$ ll /locdisk/data/a/  rwxrwxrwx 1 user1 user1 1 AUG 30 11:11 ./   rwx------ 1 user2 user2 3 AUG 30 11:11 test   How could it be??  My Ubuntu has a bug? How should I fix it?

Short Question:  Why can we manipulate a read-only file in Vim using : + w + q + ! even without being an administrator?  Long Question:  I have a text file (myFile.txt) which is read-only for everyone:  navid@navid-ThinkPad-T530:~/ubuntuTest$ ls -l myFile.txt  -r--r--r-- 1 navid navid 26 Aug 22 21:21 myFile.txt   I can open it with Vim without having admin privileges:  navid@navid-ThinkPad-T530:~/ubuntuTest$ vi myFile.txt    I modify it and press: Esc + : + w + q + Enter and I see this error message:  E45: 'readonly' option is set (add ! to override)   So far, everything makes sense.  But when I press: Esc + : + w + q + ! + Enter, Vim saves the changes.  I'm using Ubuntu 16.04 and VIM 7.4.


I have the following inequality: $$s^k - f(s) \leq 0$$ where $-1 < s \leq 1$ & $k \in R_+$ & $f(s) > 0$. In such case, I am wondering if the following statement also valid: That is, is it right that the sign remains even after taking derivatives? $$k s^{k-1} \leq f'(s) $$  If not, then will it be valid if $ 0 < s \leq 1$?  I think this is right, but I am wondering how to start the proof.  Thank you in advance!

If I have the inequality $f \leq g$, does this imply $f'\leq g'$?  The reason I am asking is because I am using this fact to prove a question with Taylor theorem.


Root to phone is harmful or not? I've XperiaArcS & some files of it I want to transfer in Sdcard but it require RootHelp. So please give me advice what should I do?

I see lots of tutorials telling me how to root my phone (Motorola Droid), but none of them mention any potential "side effects."  Aside from a few relatively minor issues that seem to require rooting to fix, I'm basically happy with the phone and therefore a little leery of messing with a device that cost me a lot of money and is only a few months old.  Assuming that I'm just talking about rooting, and none of the typical post-root actions (like installing a custom ROM), am I taking any risks by choosing to root?   Does it have the potential to brick the device? Will it void my warranty? Will I stop getting updates? Will the cops show up at my front door the next day? (Yes, I'm being facetious.) Anything else I should be aware of?   (See also: )


Today I saw that someone revised one of my answers, but at first I couldn't see any changes. After switching to side-by-side markdown I saw that he only adds a single space at the end.    Therefore I examined the activity/revisions of the user and saw that he edits hundreds or thousands  of posts in this way.  I had hoped, that this sort of abuse should be detected by some automatism, but there seems no such system.  But how to stop users like him and what can be done to detect this before so many posts are changed without any good reason?

has 5 pages of 1 character edits (including an edit to one of my posts), apparently in a massive attempt to earn the Copy Editor badge.  Should Copy Editor, etc., ignore 1 character whitespace-only edits?    If we still want to count minor edits (which may be useful), could we at least detect edit abuse via some secret algorithm? ~20+ one character whitespace-only edits in the course of an hour should at least raise a flag of some sort.    If whitespace character are too hard to count, can we at least assume that 20 non-tag edits in 20 minutes (less than a minute per edit) is a good signal of abuse? The specific algorithm should be secret, obviously, but I think these sorts of edit abuses shouldn't be too difficult to detect.


I keep receiving this error but I cannot see any logical errors in my code.     Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException   private double getValueOrDefault(String symbol, double defaultValue) {     double value = getValue(symbol);      if (value != -1)         return value;     else         return defaultValue; }  public void createStocks() {     // try get stock realtime values     stocks.add(new TechStock("BB", 30.3));     stocks.add(new TechStock("GOOG", getValueOrDefault("GOOG", 5.8)));     stocks.add(new TechStock("AMZN", getValueOrDefault("AMZN", 6.3)));     stocks.add(new FinanceStock("GLNG", getValueOrDefault("GLNG", 121))); }  public static double getValue(String symbol) {     // read data     try {         URL url = new URL(API_URL.replace("XXX", symbol));         Scanner s = new Scanner(url.openStream());          // find price         while (s.hasNextLine()) {            String line = s.nextLine();             if (line.startsWith("\"price\"")) {                // split shenanigans                String[] f = line.split("\"");                return Double.parseDouble(f[3]);            }         }         // if we reached here: the stock is invalid        return -1;     } catch (Exception ex) {        ex.printStackTrace();     }     return -1; }   public class StockFrame extends Frame  {     private int amount;     private Portfolio portfolio;     private ArrayList <StockMarket> stocks = new ArrayList<StockMarket>();        private TextArea stockDetails;     private TextField purchaseCode;     private boolean found = false;  private int locateStock() {     for(int i = 0; i<stocks.size(); i++) {         if(stocks.get(i).getCode().equals(purchaseCode.getText())) {              return i;         }    }    return -1; }  private void a() {  int position = locateStock(); if(position != -1){     StockMarket bs = stocks.get(position); ..... }   I tried changing I to 1 but I still receive the NullPointerException. The error seems to be located at the int position = locateStock(); but I am unsure.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


A couple of graduate schools I have applied to have a section for reporting the Fall semester grades (the application deadlines were before the end of the Fall semester). My GPA has decreased by 0.1 and my previously-outstanding GPA is not outstanding anymore, and even though I haven't received any terrible grades (my grades were A, A-, and B+), I don't have a straight-A transcript any more. That being said, I have two more graduate-level courses in related topics with decent grades. Now I am wondering whether in this situation I should report the new grades or I shouldn't, given that it is an optional section of the application to be completed after submission.  I appreciate your comments on that.

I am wondering if I apply to graduate school in US in fall and lets say the due date to submit the application is December 1 and fall quarter grades are posted two weeks after that. Now I am wondering am I be able to update my GPA after positing the fall quarter grades,which is after submitting the application?


A ring $R$ is called an algebra over a field $k$ whenever $R$ is a vector space over $k$ and $λ(rs) = (λr)s = r(λs)$ for all $λ ∈ k$, $r$, $s ∈ R$. Prove that $\mathbb{Z}$ is not an algebra over a field.   Is it correct to say that since $\mathbb{Z}$ cannot be a vector space over any field, it cannot be an algebra?  Edit: Is it possible to prove this without using the above fact? The proof of the above fact involves something I haven't learnt, so I guess I should be able to solve this problem by showing that suppose $\mathbb{Z}$ can be a vector space over a field, and it would lead to a contradiction.

This is an exercise from Chapter 3 of Golan's linear algebra book.  Problem: Show $\mathbb{Z}$ is not a vector space over a field.  Solution attempt:  Suppose there is a such a field and proceed by contradiction. I will write multiplication $FV$, where $F$ is in the field and $V$ is an element of $\mathbb{Z}$.   First we rule out the case where the field has characteristic 2. We would have   $$0=(1_F+1_F)1=1_F1+1_F1=2$$  a contradiction.  Now, consider the case where the field does not have characteristic 2. Then there is an element $2^{-1}_F$ in the field, and   $1=2_F(2^{-1}_F1)=2^{-1}_F1+2^{-1}_F1$  Now $2^{-1}_F1\in\mathbb{Z}$ as it is an element of the vector space, but there is no element $a\in\mathbb{Z}$ with $2a=1$, so we have a contradiction.  Is this correct?


Can I omit the relative pronoun and the verb 'be' in the this sentence? That is, can:     I doubt we presume too far in thinking that by scientific truthfulness, he means proven facts which are not prone to change.    be changed to:     I doubt we presume too far in thinking that by scientific truthfulness, he means proven facts not prone to change.

I have a sentence here:     Software quality assurance is a planned and systematic pattern of all actions necessary to provide adequate confidence that an item or product conforms to established technical requirements.   Did the writer omit a relative pronoun? Could the sentence be written as: "…of all actions which are necessary to provide…" ?


I want to print something on colored paper. Is it possible to simulate lack of white ink in printer in Photoshop?  I am worried that some colors may be to bright to be actually visible on colored paper or they will be much darker than i expect.

I'm designing a box in Photoshop that will be offset printed on unbleached paper. I haven't picked out a printer yet, so I don't know the exact kind of paper I'll be using and don't have access to it for proofs. For now I'm using a lightly-textured layer of tan color as a placeholder to mock it up.  What I'm trying to figure out is, how do I figure out how my design will look printed on natural paper rather than bleached white paper? I know that the brightness will be diminished and the hue will be altered, but I need to know how much so I can compensate for it as much as possible.  Is there a way to get at least a rough but reliably-simulated idea of how my prints will come out? Does it have to do with blend modes, or color separations? I'm at a bit of a loss here.


Error mounting: mount exited with exit code 1: helper failed with: mount: only root can mount /dev/sda5 on /media/bakwas  /etc/fstab: static file system information.  <file system> <mount point>   <type>  <options>       <dump>  <pass>  /dev/sda7   /host   fuseblk defaults,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096    0   0 /dev/sda6   /media/New_Volume   ntfs-3g defaults,locale=en_US.UTF-8     0   0 /dev/sda1   /media/SYSTEM   ntfs-3g defaults,locale=en_US.UTF-8     0   0 /dev/sda5   /media/bakwas   ntfs-3g defaults,locale=en_US.UTF-8     0   0 /dev/sda2   /media/windows7_64bit   ntfs-3g defaults,locale=en_US.UTF-8     0   0 /host/ubuntu/disks/swap.disk    none    swap    sw  0   0   Above is my fstab file.  I am not able to understand how to solve this problem. Please help me. I am new in LINUX  When I am restarting system it is showing me all my drives already mounted.

I am trying to mount some of my hard drive and USB but getting this error  Error mounting: mount exited with exit code 1: helper failed with: mount: only root can mount /dev/sdd1 on /media/sdd1   how can I fix this?  There is no drive by the name of /dev/sdd1 and no /media/sdd1 cause when I try to unmount/detach it I get:  root@sysadmin-MS-7592:/home/sysadmin# udisks --unmount /dev/sdd1 Unmount failed: Device is not mounted  root@sysadmin-MS-7592:/home/sysadmin# udisks --detach /dev/sdd1 Detach failed: Device is not a drive


I am stuck on a relation composition problem from book [1]. The context is: Suppose $r \in \mathbb{R}^+$ and $s \in \mathbb{R}^+$. Let $D_r = \{(x, y) \in \mathbb{R}^2 \mid |x-y| < r\}$, and $D_s = \{(x, y) \in \mathbb{R}^2 \mid |x-y| < s\}$. The problem is only: what is $D_r \circ D_s$?  From the definition of composition of relations,  \begin{align} D_r \circ D_s &= \{(x, z) \in \mathbb{R}^2 \mid \exists y \in \mathbb{R}(xD_sy\ \text{and}\ yD_rz)\} \\ &= \{(x, z) \in \mathbb{R}^2 \mid \exists y \in \mathbb{R}(|x-y| < s\ \text{and}\ |y-z| < r)\}. \end{align} The book hints to use the triangle inequality $\forall x \in \mathbb{R}\forall y \in \mathbb{R}(|x + y| \leq |x| + |y|)$. My suspicion is that the intended answer is  \begin{equation} D_r \circ D_s = \{(x, z) \in \mathbb{R}^2 \mid |x - z| < s + r\}. \end{equation} (If it isn't, then I fail to see how the triangle inequality relates.) But for this to be the case it must be that \begin{equation} \exists y \in \mathbb{R} (|x-y| < s\ \text{and}\ |y-z| < r) \leftrightarrow |x - z| < s + r \end{equation} given the above assumptions on $r, s, x, y$.  Proving ($\rightarrow$) is straightforward: suppose the LHS is true, choose some $y \in \mathbb{R}$ such that $|x - y| < s$ and $|y - z| < r$, then $|x - y| + |y - z| < s + r$, but $|x - z| = |(x - y) + (y - z)| \leq |x - y| + |y - z|$ (triangle inequality), so $|x - z| < s + r$.   How to prove ($\leftarrow$) is not clear to me. After assuming the RHS, is there a particular value of $y \in \mathbb{R}$ that I can choose to make the LHS true?    [1] Velleman, Daniel. How to Prove It: A Structured Approach 2e, Ch. 4 Sec. 3 Prob 6.

Suppose $r$ and $s$ are two positive real numbers. Let $D_r = \{ (x,y) \in \mathbb{R}^2\ | \ |x-y| < r \}$ and $D_s = \{ (x,y) \in \mathbb{R}^2 \ | \ |x-y| < s \}$. Prove that $D_r \circ D_s = \{ (x,y) \in \mathbb{R}^2 \ | \ |x-y|<r+s \}$. Well, I only proved that $D_r \circ D_s \subseteq \{ (x,y) \in \mathbb{R}^2 \ | \ |x-y|<r+s \}$ by letting $(x,y)$ be an arbitrary element of $D_r \circ D_s$ and using the triangle inequality. How can I prove that $\{ (x,y) \in \mathbb{R}^2 \ | \ |x-y|<r+s \} \subseteq D_r \circ D_s$?


Problem: If $G$ has exactly one subgroup $H$ of order $k$, then $H$ is normal in $G$.  I can see the obvious low level solution, that $gHg^{-1}$ is also a subgroup of order $k$ and therefore $H$ is normal. What confuses me is that this problem was in the chapter titled "Homomorphisms". The author introduces the idea of a homomorphism, proves the isomorphism theorems, and then hands us this problem.   I was thinking to try to use the first isomorphism in an obvious way such that $H$ is the kernel of some homomorphism but I couldn't find it.   Can someone help me find the likely "intended" solution? Since the purpose of exercises should be to help me understand homomorphisms and ismorphisms better, my solution can't really be considered satisfactory.

How can I show that if some group $G$ has only one subgroup $K$ of order $n$, then $K$ is a normal subgroup? Would that mean that it only has one subgroup total? If so then I guess that makes sense.


I am struggeling now for days, because I'm very new to c++.  I want to write something into a .ini file with WritePrivateProfileString  int i = 0; char arr[total]; stringstream ssin(configs); while (ssin.good() && i < total){     ssin >> arr[i];     ++i; };  [...]  WritePrivateProfileString(TEXT("Config"),TEXT("active"),arr[i],path);   (total is a int that equals 6 and configs is a string like "text1 text2 text3")  And now I want to seperate every text (text1, text2, text3) in to a array so I can u easily use them.  But because WritePrivateProfileString uses LPCSTR I cant insert this char array as input.  [Error] invalid conversion from 'char' to 'LPCSTR {aka const char*}' [-fpermissive]  Is there a way to use the char array in the WritePrivateProfileString function or how can I convert it so it can be used in this function?  Thank you in advance.

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


I think I read somewhere that all continuous homomorphisms from $\mathbb{S}^{1}$ to itself are of the form $z \mapsto z^{n}$ for some $n \in \mathbb{Z}$. Is this result true? I am not able to prove it. Nor am I able  to find any counterexample.  What I have done so far is:  If for some $\theta \in [0,2\pi)$, $e^{\iota\theta}$ goes to $e^{\iota\phi}$ for some $\phi \in [0,2\pi)$, then $e^{\iota n\theta}$ goes to $e^{\iota n \phi}$ for all $n \in \mathbb{Z}$. I thought I could take $n$ to be any rational here and then extend to reals by continuity; but that is not true as a multiple of $2\pi$ may creep in.  Next I tried something using $n^{th}$ roots of unity; but again apart from a number of cases, I could not go very far.  Could someone point me in the right direction?

I'd like to see a proof why $\varphi \in \operatorname{Hom}{(S^1, S^1)}$ looks like $z^n$ for an integer $n$.  At first I thought I could argue that if I have a homomorphism that maps $e^{ix}$ to some $e^{iy}$ for $x,y \in \mathbb R$ then $z = rx$ for some real number $r$. But on second thought I'm not sure why I can't have $\varphi (e^{ix} ) = e^{g(x)i}$ for a $g$ other than $g(x) = \lambda x$.   I'm also interested in seeing different proofs. I'm sure there are several ways to prove this.  Thanks for your help.