how to reinstall config files in /etc of a package

If I want to reinstall the configs of some package x (i.e. files in /etc), how would I do that?  Does apt-get --reinstall install x always reinstalls the configs?  Other answers suggest to remove the configs first and then use apt-get -o Dpkg::Options::="--force-confmiss" x. However, I don't want to do that for all of /etc because I want to keep my system in a well-behaved state as far as possible. I basically just want that it overwrites existing config files.  I also read about --force-all, --force-confnew, --overwrite-conffiles and the UCF_FORCE_CONFFMISS, UCF_FORCE_CONFFNEW env vars. Some documentation is  and , although I'm not sure if it does exactly what I want.


Prove that $\langle x-a, y-b, z-c\rangle$ is a maximal ideal in $K[x,y,z]$

I am trying to prove that $\langle x-a, y-b, z-c\rangle$ is a maximal ideal in $K[x,y,z]$, where $K$ is a field.  My guess:  Define the homorphism from $K[x,y,z]\rightarrow K$ as $$f(x,y,z)\mapsto f(a,b,c)$$  This is a surjective homomorphism and the image is a  field. So if we can show that the kernel is the ideal $\langle x-a, y-b, z-c\rangle$, then we are done. It is clear that $$\langle x-a, y-b, z-c\rangle\subseteq\text{Kernel}$$  How to prove the other inclusion ?


Can we have a citation in the Works Cited and not use it in an essay?

I have a citation of an online article that I used in my research for an essay, yet I haven't referenced this citation anywhere in the essay. Should I keep the citation, or delete it because nothing refers to it?


Limits of trigonometric functions: $\lim _{x\to \pi } \frac{\cos(x/2)}{\pi ^2-x^2}$

So I ran into this problem:  $\lim _{x\to \pi }(\frac{\cos\left(\frac{x}{2}\right)}{\pi ^2-x^2})$  We haven't studied L'Hôpital's rule in my class yet, we basically need to transform the expression using trigonometric identities and use known limits like $\lim_{x \to 0} \frac{sinx}{x} = 1$ to calculate in case we get an indefinite form.  I couldn't find anything I could do to calculate this limit :(  Some help?  Thanks.


What ability should be used when resisting Intimidation?

During our last play session (it was our second session, so everyone is first level) my fighter dwarf had a conflict with another player's human fighter. My dwarf became annoyed at the human's dismissive reaction to a roar outside the village that sounded like ogres (my dwarf has a bad history with ogres).   So, in order to emphasize the seriousness of this situation, my dwarf grabbed the human by shirtfront and pulled him closer (done with a successful roll). Still bent double, the human drew his sword and pointed it at my dwarf's belly (dwarf wearing chainmail). At this point the DM made the other player roll an Intimidation (Charisma) check, and me a Wisdom check to resist. I lost and my dwarf, chastened, let the human go.  That was pretty funny situation, but one thing is bothering me. By using a Wisdom check against Intimidation (Charisma), my dwarf (who has −1 Wisdom modifier) was at a disadvantage (literally, not in the D&D disadvantage mechanic sense) against the threats. Although he is a strong and capable warrior, he is not that wise.  But I have to wonder: is willpower really represented by Wisdom in 5e? I think that many not-so-wise creatures/characters can stand bravely against threats.  What ability/skill should be used in a contest to resist intimidation?


Website display problem - across all browsers

whenever I go to  or  the page loads like this:    How can I fix this?


Convergence of $\prod\limits_{n=0}^{\infty} (1+x^{2^{n}})$

I never covered infinite products in my real analysis class, so I have no idea. I was wondering about the convergence of the above product. Thanks in advance.


Please help me with this problem . The problem was used in one of the questions in my examination and I failed to understand.  Problem as follows:     If $A$ is a commutative ring in which $m_1,\ldots,m_n$ are maximal ideals in $A$.    Then if $m_1 m_2...m_i/m_1 m_2....m_{i+1}$ can be regarded as $A/m_{i+1}$ module , how can we treat $m_1 m_2...m_i/m_1 m_2....m_{i+1}$  as a vector space over $A/m_{i+1}$?   Waiting for some help..


I use object != null a lot to avoid . What is an alternative to: if (someobject != null) {     someobject.doCalc(); }


Update problem with "Failed to fetch" error

I don't get Firefox 7 update. When I try to check for updates from update manager, I get:  W:Failed to fetch http://wine.budgetdedicated.com/apt/dists/edgy/main/binary-i386/Packages  404  Not Found , W:Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/edgy/universe/binary-i386/Packages  404  Not Found [IP: 91.189.92.170 80] , E:Some index files failed to download. They have been ignored, or old ones used instead.   Any idea?


How to derive the ridge regression solution?

I am having some issues with the derivation of the solution for ridge regression.  I know the regression solution without the regularization term:  $$\beta = (X^TX)^{-1}X^Ty.$$  But after adding the L2 term $\lambda\|\beta\|_2^2$ to the cost function, how come the solution becomes   $$\beta = (X^TX + \lambda I)^{-1}X^Ty.$$


Incorrectly answered 'No' to "Any previous visa refusals..." on a UK Standard Visitor visa application. How can I fix my mistake?

I'm from Lebanon and I've been working in Saudi Arabia for nine years. In 2012, I put the money that I collected from my job as a teacher in my father's Lebanese account since I didn't have one in Lebanon. During the interview, my interviewer told me that my application will be rejected because I don't have proof that this money is mine and clearance officer will think someone else gave me the money. I didn't know that I had to bring with me from Saudi Arabia an employment letter and bank statements to prove that this money is mine and I earned it by working in Saudi Arabia. Anyways, my visa did get refused as my interviewer had told me it would be.    Last May, I was granted a US visitor visa Multi Entry for 5 years. I wanted to visit the US in August for 10 days but my mom entered the hospital so I had to postpone it. Now I'm applying for a teacher training program in the UK. I received an invitation letter from Brighton University and so I applied for a UK Standard Visitor visa. After I paid and printed the application, I realized that I answered the question Any previous visa rejections ... with "NO" and I don't know how should I fix this.  Please note that I still didn't give my biometrics, I still didn't use my US visa which I received on May 2016, I paid for my application so I can't amend it online. I'm supposed to give my biometrics and submit my documents this Monday.  If I don't say anything will they check it and refuse me?    Will my US visa be an advantage and they will disregard the previous rejection or should I correct it when I submit my documents this Monday?


Random point (X,Y, Z) is uniformly distributed in the unit cub.

Random point $(X, Y, Z)$ is uniformly distributed in the unit cub. What is the probability that $Y^2-4XZ \geq 0$?


I overstayed in the US by about 4 years in 1997 and left voluntarily. Can I now come back as a tourist?

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?


Proof $a+a = 0$ by given $a\times a = a$

I'm wondering how I can proof that for the following Ring $(R; +,-,0,\times,1)$ with $a \times a = a$ that $a + a = 0$.  How can I proof that? I just know about the lemma:  (i) $0(a) = a(0) = 0$  (ii) $(−a)b = −(ab)$  (iii) $(−a)(−b) = ab$  Many thanks in advance!!!  Kind regards


Crazy boot and reboot times after upgrading to ubuntu 15.04 (a stop/start job is running for session c2)

After upgrade to 15.04 my ubuntu loads really slowly, slower than Windows 8 on the same machine, which insults me.  I turned off splash screen, and when I boot the system I get this:  A start job is running for dev-hdb2.device   and It stays that way for 1:30 minute, with a time counter next to it set exactly to 1:30.   Also when I reboot I get this message:  A stop job is running for Session c2 of user MrMino   same here - it stays that way for 1:30  Output of dmesg:   Unfortunately bootchart isn't working for some reason not known to me now, so I can't post logs from it.  How to make this go away? I'm running ubuntu on Dell Inspiron 3537.


Show that for each $n \geq 2$, $\left(1 - \frac{1}{4}\right)\left(1 - \frac{1}{9}\right) \cdots \left(1 - \frac{1}{n^2}\right) = \frac{n + 1}{2n}$

Need to show that for each $n \in \mathbb{N}$, with $n \geq 2$, $$\left(1 - \frac{1}{4}\right)\left(1 - \frac{1}{9}\right) \cdots \left(1 - \frac{1}{n^2}\right) = \frac{n + 1}{2n}$$  How to start the proof by induction? Is there any way to show this?


Isomorphism between two versions of $GF(2^3)$

I have $GF(2^3)$ generated by $\Pi_1(\alpha)=x^3+x+1$ and $GF(2^3)$ generated by $\Pi_2(\alpha)=x^3+x^2+1$.  $\bullet$ $\Pi_1(\alpha)=x^3+x+1$ $000=0, 100=1,010=\alpha,001=\alpha^2,110=\alpha^3, 011=\alpha^4,111=\alpha^5,101=\alpha^6$  $\bullet$ $\Pi_2(\alpha)=x^3+x^2+1$ $000=0, 100=1,010=\lambda,001=\lambda^2,101=\lambda^3, 111=\lambda^4,110=\lambda^5,011=\lambda^6$  The exampla say that $\alpha$ and $\lambda^3$ both have minimal polynomial $\Pi_1$ and thus $\alpha \iff \lambda^3$ form an isomorphism between the two version.   How can I see in a practical way this fact? Someone can explain me this concept?


How to keep same baseline skip in two vertically aligned minipages

I have two minipages (actually one of them is varwidth) standing one above the other. How can I keep same baseline skip in them?  I have somewhat strange layout, so I can't set [t] option for lower minipage/varwidth.  \documentclass{article}  \usepackage[paperwidth=10cm,paperheight=5cm,showframe]{geometry}  \usepackage{varwidth}  \begin{document}  \noindent LOREM IPSUM  \vfill  \noindent\begin{minipage}[b]{\textwidth} \raggedleft  LOREM IPSUM  LOREM IPSUM \end{minipage}  \noindent\begin{minipage}[b]{.5\textwidth} LOREM IPSUM \end{minipage}% \noindent\hfill\begin{varwidth}[b]{.5\textwidth} LOREM IPSUM  LOREM IPSUM  \end{varwidth}  \end{document}


I am a graduate student and have just finished Burton's book on number theory. Now I want to read further on prime numbers. Does anyone have any suggestion?


I have a Campagnolo Chorus 9-speed rear derailleur. I am trying to determine the largest cassette I can use. The main question I have is how do I determine what size cage I have. It is not a new derailleur. I have 50-36 chain rings and currently a 23-11 cassette. Would like to go a little bigger on the largest cassette cog if possible.


Directing graph such that any outdegree would be at most 2

Let $G=(V,E)$ be a graph. Suppose that for every subgraph $G'=(V',E') , G' \subset G$, we have $|E'| \le 2|V'|$. Show it's possible to direct $G$ such that any outdegree would be at most $2$.   I tried proving it by induction. I've realized that the minimum degree at any subgraph of $G$ is at most 4. I tried removing the vertex $v_0$ with the minimal degree at a certain subgraph from the original graph, claiming that the graph from the remaining vertexes can be directed as required. How can I include the vertex $v_0$ in the new directed graph such that any outdegree would still be at most 2? Thanks


how to crop image png transparent using php?

I wish to crop png images using php but yet keep them transparant.  My current code:  <?php // usual header used on my all pages ob_start("ob_gzhandler"); $PHP_SELF=$_SERVER['PHP_SELF']; // actual script begins here $type=false; function open_image ($file) {     //detect type and process accordinally     global $type;     $size=getimagesize($file);     switch($size["mime"]){         case "image/jpeg":             $im = imagecreatefromjpeg($file); //jpeg file         break;         case "image/gif":             $im = imagecreatefromgif($file); //gif file       break;       case "image/png":           $im = imagecreatefrompng($file); //png file       break;     default:          $im=false;     break;     }     return $im; }  $url = $_GET['src'];  if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == filemtime($url))) {   // send the last mod time of the file back     header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($url)).' GMT', true, 304); //is it cached? } else { $image = open_image($url); if ($image === false) { die ('Unable to open image'); }      $thumb_width = $_GET['w'];     $thumb_height = $_GET['h'];     $width = imagesx($image);     $height = imagesy($image);     $original_aspect = $width / $height;     $thumb_aspect = $thumb_width / $thumb_height;     if ( $original_aspect >= $thumb_aspect )     {        // If image is wider than thumbnail (in aspect ratio sense)        $new_height = $thumb_height;        $new_width = $width / ($height / $thumb_height);     }     else     {        // If the thumbnail is wider than the image        $new_width = $thumb_width;        $new_height = $height / ($width / $thumb_width);     }     $thumb = imagecreatetruecolor( $thumb_width, $thumb_height );     // Resize and crop     imagecopyresampled($thumb,                        $image,                        0 - ($new_width - $thumb_width) / 2, // Center the image horizontally                        0 - ($new_height - $thumb_height) / 2, // Center the image vertically                        0, 0,                        $new_width, $new_height,                        $width, $height);       $im2 = imagejpeg($thumb, NULL, 100);      imagecopyResampled ($im2, $image, 0, 0, 0, 0, $thumb_width, $thumb_height, $width, $height);      header('Content-type: image/jpeg');     $name=explode(".", basename($_GET['url']));     header("Content-Disposition: inline; filename=".$name[0]."_t.jpg");     header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($url)) . ' GMT');     header("Cache-Control: public");     header("Pragma: public");     imagejpeg($im2, NULL, 100);     imagedestroy($im2);      imagedestroy($image); } ?>   But, if the input is a transparent png images , thumbnails will have a black background, how do I keep the transparent background?


This may not be the right place to ask this. However, I was just hired a couple of months ago at my first programming job as a student developer for my university, and I have had to write a couple of unit tests already. Before I was hired, I had the opportunity to talk to another developer who made the case unit tests were not necessary. He made the case: if you throw data at a method should know what comes out without writing a test, which I think makes sense.  For example (Java):  public int Add(int num1, int num2) {    return(num1 + num2); } //if I call Add(2,2) I know I should get 4,  //if I call Add(5,6) I know I should get 11, //etc...   I tried asking my co-worker about this and his response was more or less along the lines of, everyone else does it so we have to.  So, I guess my question is: Why are unit tests necessary if you can just test your code by calling it repeatedly with dummy data rather than testing it once with a unit test?


Adding  float values using jQuery  used code:  result variables:  subtotal = 4.6; tax = 2.3;  Total = parseFloat(subtotal)+parseFloat(tax);   i got result 6.8999999999999995... why it not returning the correct value 6.9


I'm having a slow brain day. If anyone can point me in the right direction that would be great thanks.  I need to create the below crest as a single color graphic so that it can be printed onto a pint glass glass. I need it either black or white, no greys.    I can't seem to figure it out. The crest below is also the highest res available.


Using image overlay simultaneously with text in multicolumn mode beamer

I have a beamer slide where I have an image changing along with the text in the next column. For example:  \frame{\frametitle{testing cols} \begin{columns}[t] \column{5cm}  \begin{itemize} \item On the next column you see a pic\pause \item Pic is getting bigger! \pause \item And it got even more big!  \end{itemize}  \column[T]{10cm} \includegraphics<1>[width=20mm]{pic.png} \includegraphics<2>[width=30mm]{pic.png} \includegraphics<3>[width=40mm]{pic.png} \end{columns} }   I don't know if I'm doing it completely wrong, but I want the image to change to the corresponding one each time text in the corresponding column changes. How can I get this to work?    After some attempt,   \documentclass{beamer}  \begin{document}  \frame{\frametitle{testing cols} \begin{columns}[t] \column{5cm}  \begin{itemize} \item On the next column you see a pic\pause \item Pic is getting bigger! \pause \item And it got even more big!  \end{itemize}  \column[T]{10cm} \includegraphics[width=20mm]{pic.png}\pause \llap{\includegraphics[width=30mm]{pic.png}}\pause \llap{\includegraphics[width=40mm]{pic.png}} \end{columns} } end{document}   The image gets overlayed after the text cycle is complete. Can I make them simultaneous?


I'm learning Java and I'm struggling to understand why a simple program I'm wrting is not working the way it should.  import java.util.Scanner;  class CarApp{ String carMake; String carColour; String features; int carPrice;  void carFinal(){     System.out.println(carMake);     System.out.println(carPrice);     if(carMake == "ford")     {         carPrice = 120000;     }     else if(carMake == "porsche")     {         carPrice = 1000000;     }     System.out.println(carPrice);     System.out.println("Thank you for choosing your car with the car chooser app!" + "\n");     System.out.println("You have chosen a " + carColour + " " + carMake + " with " + features + "\n" );     System.out.println("Your car will be delivered to you in 7 working days. At a price of R" + carPrice + "."); } }  public class App { public static void main(String[] args) {     Scanner carChooser = new Scanner(System.in);      CarApp carApp = new CarApp();     System.out.println("Please let us know which car you would like, porsche or ford:");     carApp.carMake = carChooser.nextLine();     System.out.println("Please say which color car you would like:");     carApp.carColour = carChooser.nextLine();     System.out.println("Which features would you like added to your car:");     carApp.features = carChooser.nextLine();     carApp.carFinal();  } }   The system doesn't seem to print the price? So I always get the following:  Your car will be delivered to you in 7 working days. At a price of R0.   Any help would be greatly appreciated, I'm sure it's something quite trivial, maybe something I've overlooked. Thanks in advance,  Fred


How do I remove this wall plate with no visible screws?

I'm amazed how complicated this wall plate is to remove. It is made of plastic and accommodates a phone jack and a coaxial cable. Please see the images that accompany this question. I've searched it thoroughly and there are no tabs anywhere on the face or edges to press in. There are no screws. I've pulled on it pretty hard, hoping that it would pop off, but if I pulled any harder it surely would break. Of course, I had the coaxial off while I tried to remove the plate. The brand name on the phone jack part is "KRONE". Has anyone seen a wall plate like this? If so, how do you remove it? I have to say, I'm absolutely blown away by how ridiculously difficult this is. Any help would be appreciated.


CAPTCHA not displaying on "Human verification"

I'm not able to answer a question on Stack Overflow because the Human Verification page is showing up but without any CAPTCHA. I found many questions relating this but without a solution that worked for me. I guess this has something to do with my No-Script settings (Firefox plug-in). I selected "Temporarily allow all this page" several times but without success. I don't know of any proxy related restrictions on my internet connection but anyhow I there were some, I couldn't change them. Does this mean I can't pass the "Human verification"?


What's the proper site of Stack Exchange family to discuss a program implementation

I want to discuss with fellow programmers a program I want to develop.  Specifically: I want to discuss if Ruby is a good choice, if it's a good idea to call the SoX command from within Ruby and parse the result in Ruby, etc.  Is there an appropriate Stack website for this? If so, which one?  Programmer Stack Exchange warns users of not posting these "discussion" questions (We prefer questions that can be answered, not just discussed.)   If Programmer Stack Exchange is the appropriate website, how should I explain the challenges I face and encourage discussion?


If $A$ is infinite, $B$ is finite and $B \subset A$ and $C=A\setminus B$. Is there bijection between A and C?

Here is my reasoning so far: $A$ is a infinite set and $B$ is a finite subset of $A$, therefore $B\subset A$.  If $C=A\setminus B$ that means that $C$ also is infinite and also, $C\subset A$.  Though, how could one prove that there is a bijection between $A$ and $C$?


What would the effects be on the world if light slowed down?

It would be really helpful if the effects were just given in a list form so I can research them.   The reason why I am asking this is because I to write an essay regarding the effects of a change in a physical constant. I am currently thinking of writing about either change in gravity or the speed of light. On a side note which topic seems more interesting and easier to write 4000 words on?


Just wondering, how do you find out the name of the method that invokes another method? I want to use the    Method   class.


A few minutes ago I registered on Meta. I received 100 rep points because you trust me on other sites.      You've earned a bonus of 100 reputation because we trust you on other sites in the network   I just wanted to answer a question which is protected by the Community. But for me it's not allowed because I do not have more than 10 rep.    So does Stack Exchange trust me or not?


Why >file 2>&1 works but 2>&1 >file doesn't? BTW there is no syntax error.


Best way to detect when a user leaves a web page?

What is the best way to detect if a user leaves a web page?  The onunload JavaScript event doesn't work every time (the HTTP request takes longer than the time required to terminate the browser).  Creating one will probably be blocked by current browsers.


Does lossless audio over Apple AirPlay have preserved audio quality?

AirPlay is very convenient to bring up the sound on my big stereo speakers, but I am wondering whether the AirPlay protocol preserves audio quality, e.g. bitrate?  I understand that if the WiFi is poor, audio may be interrupted, but when it is good, shouldn't it be possible to transfer the exact copy, considering the relative low bitrate of e.g. Apple Lossless? The other possible option is that Apple transcodes audio before it goes over AirPlay, e.g. to AAC.  Anyone got a clue?


I was recently thrown there from the windows world and I'd like to ask some questions about clipboards in Linux (and Unix?) systems. What is X clipboard? How many clipboards are in Linux? Actually, I'd like to copy command from terminal to clipboard and then paste it in an other application (gedit, skype etc.). I  echo !! | xclip in terminal. However when I tried to paste the command to other applications (via Shift+Ins or Ctrl+V), actually an old content have been pasted. At the same time I can paste this command in terminal.


How do you impress the interviewer, when he asks you to compute $\sqrt{2+\sqrt{2+\sqrt{2+...}}}$?


Opening multiple finder directories simultaneously

Is there a way to open multiple finder directories at the same time without necessarily opening two windows? I'm thinking something similar to opening multiple tabs in a mac terminal.


Correct Way to Install Node.js in a Multiuser Server?

I have to acknowledge being an old timer U*ix system administrator. Software to be used by everybody had two possible locations: /usr/bin /usr/local/bin The best example is gcc and family. Now I find myself in a new world. My node installation lives in: /home/david/.nvm/versions/node/v14.7.0/bin/node So I added the corresponding directory to my path. How/where should the node package be installed? It would be done and owned by root, of course.


1.35 V RAM in a 1.5 V system - Will it fry or overclock?

The general question is: When installing low voltage RAM in a board that outputs a higher voltage to the memory module, will this fry the RAM or will it be like overclocking it?  My specific case is: I have the Alienware m17xR3 laptop with a 2630QM Sandy Bridge board. Currently, I have the stock 1.5 V modules and when I check the overclocking options in my bios, the RAM voltage option ranges from 1.5 - 1.65 V. Is this simply because the bios recognizes that these are the values which my current RAM support and thus they will change when I install 1.35 V RAM or will I have to run the 1.35 V sticks at minimum 1.5 V?  If the case is the latter, would I fry my 1.35 V sticks? Or would they become automatically overclocked and get tighter timings with a higher voltage? Or both? Or neither? I'm a bit lost :p


Invoke virtual method on null reference, but why is it null?

So this is a chronometer that I am trying to implement in my application but since the build in chronometer doesn't display milliseconds I wrote this one, well the idea is not mine but anyway: `import android.content.Context;  public class Chronometer implements Runnable { public static final long MILLIS_TO_MINUTES = 60000;  private Context mContext; private long mStartTime; private boolean mIsRunning; public Chronometer(Context context) {     mContext = context; }  public void start() {         mStartTime = System.currentTimeMillis();     mIsRunning = true; } public void stop() {     mIsRunning = false; } @Override public void run() {     while(mIsRunning) {          long since = System.currentTimeMillis() - mStartTime;           int seconds = (int) (since / 1000) % 60;         int minutes = (int) ((since / (MILLIS_TO_MINUTES)) % 60);         int millis = (int) since % 100; //the last 2 digits of millisecs          ((MainActivity) mContext).updateTimerText(String.format("%02d:%02d:%03d"                 , minutes, seconds, millis));          try {             Thread.sleep(30);         } catch (InterruptedException e) {             e.printStackTrace();         }     } } }`   So the code above is in a class of it's own. And here is the method that updates the textView that contains the chronometer and which is located in another class      public void updateTimerText(final String time){     runOnUiThread(new Runnable() {         @Override         public void run() {                 mTvTime.setText(time);         }     }); }   So the problem is Process: com.example.user.myap, PID: 6131                   java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference                       at com.example.user.myap.MainActivity$2.run(MainActivity.java:105)


Python list unwantedly updating appended lists

I need to use a stack to push and pop lists with 2 numbers in them, that serve as XY coordinates in a program I'm making. It seems simple enough, so I just do  stack = []   to make the list I'll use as a stack. Now i make the coordinate variable  coord = [0,0]   and push it to the stack.  stack.append(coord)   Now, the stack is equal to  [[0, 0]]   and that's perfect. Now let's say I move up one, so my coord variables Y value updates like  coord[1] += 1   and coord equals  [0,1]   which is good. But wait! Even though I did nothing to the stack list, it now reads  [[0,1]]   when I wanted it to retain it's old value that I sent to it.  [[0,0]]   Why does this happen, and what can I do to accomplish what I want?  Just in case it wasn't clear, I want the stack to behave like  >>> stack = [] >>> stack []  >>> coord = [0,0] >>> stack.append(coord) >>> stack [[0, 0]]  >>> coord[1] += 1 >>> stack [[0, 0]]  >>> stack.append(coord) >>> stack [[0, 0], [0, 1]]   but this is what it does.  >>> stack = [] >>> stack []  >>> coord = [0,0] >>> stack.append(coord) >>> stack [[0, 0]]  >>> coord[1] += 1 >>> stack [[0, 1]]  >>> stack.append(coord) >>> stack [[0, 1], [0, 1]]   Changing coords[1] += 1 to coords[1] = coords[1] + 1 does not fix the problem, like it did .


Are surjective sheaf morphisms locally surjective?

Let $\mathcal F$ and $\mathcal G$ be sheaves of groups of some topological space $X$ and let $\varphi : \mathcal F \to \mathcal G$ be a surjective morphism. That means that for each $x \in X$ the induced group morphism $\varphi_x : \mathcal F_x \to \mathcal G_x$ is surjective.  Does this imply that for each $x\in X$ there exists an open $U \subseteq X$ with $x \in U$ such that $\varphi_U : \mathcal F(U) \to \mathcal G(U)$ is surjective?  I don't think so but would be glad to see an easy counter example.


Quantum Mechanical Hamiltonians without Classical Analogues

Recently I found myself in a state similar to that which @senator found himself . I too have been reading Dirac's Lectures on Physics and am particularly confused by the notion of Hamiltonians without classical analogues.  The way I understand it, at Second Quantisation one always starts with the classical Lagrangian to end up with the Quantum Mechanical Lagrangian and so within this capacity I do not see how each Hamiltonian cannot have a classical analogue.  Is this still the route taken to obtaining Hamiltonians which do not have classical analogues and if so what are some examples of this?  If it is the case that at each instance of finding a Hamiltonian one starts from a classical Lagrangian, is that not wrong given that Classical Mechanics is a subset of Quantum Mechanics.


Write down all subgroups of $\frac{\mathbb{Z}}{12 \mathbb{Z}}$

We know that the subgroups of $\frac{\mathbb{Z}}{n\mathbb{Z}}$ are defined as; Let $n$ be a positive integer. Let $d$ be a positive divisor of $n$, say $n = kd$, $k \in \mathbb{Z}$. Then $ \\{ \overline{0}, \overline{d}, \overline{2d} , ..., \overline{(k-1)d} \\} $ is a subgroup of $\frac{\mathbb{Z}}{n\mathbb{Z}}$. In my exercise I get that $12$ is divisible by $1,2,3,4, 6$ and $12$, this would result in $$\{\overline{0}, \overline{1}, \overline{2}, ..., \overline{11}\}$$ but by the property of divisibility does this not mean that for every $n$ we choose for $\frac{\mathbb{Z}}{n\mathbb{Z}}$, that the subgroup is always $\\{\overline{0}, \overline{1}, \overline{2}, ..., \overline{n-1}\\}$, since every n is divisible by $1$?


In the film Smeagol found the ring, went in the mountains and turned into Gollum. At the time when Gollum followed the Fellowship of the Ring, Gandalf called him Gollum. Who gave him this name, or why do the others call him like that?


Is the $n$-th prime smaller than $n(\log n + \log\log n-1+\frac{\log\log n}{\log n})$?

Let $p_n$ be the $n$-th prime.  gives the following known bounds on $p_n/n$ when $n\geq6$: $$ \log n+\log\log n-1 \leq \frac{p_n}{n} \leq \log n+\log\log n. $$  If I take the first few terms in the asymptotic expansion for $p_n/n$, like so: $$ \frac{p_n}{n} = \log n+\log\log n-1+\frac{\log\log n}{\log n} - \frac{2}{\log n} +  O\left(\frac{(\log\log n)^2}{\log^2 n}\right), $$ it follows that $$ \frac{p_n}{n} < \log n+\log\log n-1+\frac{\log\log n}{\log n} + \frac{c}{\log n}, $$ for $c>-2$ and large enough $n$. For at least those $n$ that I've checked however ($p_n\leq 10^{11}$), I find that this inequality holds with $c=0$ and $p_n>347$, and also with $c=-1$ and $p_n > 5393$.  Is this actually correct?  Is there a sharper inequality?


My student said "I watched a TV at home" but I corrected it to "I watched (the) TV at home". I said "the" is not absolutely necessary. My student doesn't understand why "a" is not appropriate. How can I simply explain this? (The student isn't familiar with grammar jargon so I'm trying to make the explanation as simple as possible)


Impossible to uninstall certain apps in ubuntu phone?

I recently bought a bq smartphone ubuntu edition, and I was surprised to see so many pre installed apps that I don't want to use. Some of them are apparently easy to remove, by going to the ubuntu store.  But there is something that I don't manage to do. I'm in the Apps scope, and slide the screen upwards. Then, I see a screen with a list of the active scopes named "Home", and a second list named "Also Installed". In this list I see many apps that I don't manage to find in the ubuntu store, and therefore I cannot uninstall. For instance, 7 digital, Amazon, cnet, ebay... many of them.   But I'm not sure that the procedure of uninstalling them from the ubuntu store is really working: If I go to Settings->About this phone->Storage, I see a detailed list of the apps that are using memory in my phone. In this list there are some apps that I previously uninstalled using the ubuntu store procedure. For instance, BBC, BBC sport, facebook,facebook photos, Gmail... and many more are still using memory in my phone.  My question is: How can I really get rid of these apps that I don't want to have? I would like not to dedicate a single bit of space to those apps


I have to find the total working time of a staff.  Variables in my hand is,  $work_time_start = "8:00:00"; $work_time_end = "18:00:00"; $lunch_break_start = "13:00:00"; $lunch_break_end = "14:00:00";   From this I have to find the total working time of a staff.  For example.  //example 1      $work_start_time = "14:00:00"; $work_end_time = "14:25:00";  //The output should be: 00:25:00  //example 2  $work_start_time = "14:00:00"; $work_end_time = "10:25:00";  //The output should be: 06:25:00   How to achieve the required output. I have no idea.


Trying to learn how to run my scripts through Ubuntu's terminal regularly.  That being said I am familiar with bash, wget, and awk being called but how do I call python files to run in the terminal?  I would like to learn this but I am unsure on where to research it.  I have a .pyw file that references several .py files in a folder.


Count the number of fish caught in total if we are given the number of fishermen who caught at least $n$ fish.

Some fishermen caught some fish. No one caught more than 20 fish. $a_i$ is the number of fishermen who caught at least $i$ fish. How many fish were caught?   So my guess is that the number of fish caught has to be $$ a_1+a_2+\ldots + a_{20}$$  I reason that if a fisher man caught $n$ fish then he will appear in the tally $n$ times.   Is this logic correct?


Book about an AI that traps people on a spaceship

My memory about this story is rather short. I only remember the following points :-  The story was in a collection of stories.  In this, a robot/AI of some sort traps 2 people on a spaceship and sends them off.  On the ship, they realise that they are travelling in space unaided and try to scour the ship for any life-saving-essentials they can find.  The AI admits to some other people what it has done and assures them that the 2 men have all the essentials that they need.  The 2 men suddenly find a sort of cabinet that they claimed wasn't there before. In that, they find beans and milk.  The AI/robot was named "The Brain".


Proof that for $a,b,c\in \mathbb{R}$, hold that $\left |\sqrt {a^2+b^2}-\sqrt {a^2+c^2}  \right |\leq \left |b-c  \right |$. Give me a clue, I don't have any idea to work with that inequality.


What is the simplest way to prove the Earth is round?

Assume you've come in contact with a tribe of people cut off from the rest of the world, or you've gone back in time several thousand years, or (more likely) you've got a numbskull cousin.  How would you prove that the Earth is, in fact, round?


Is it possible to not use all your votes in the election phase?

If you were to, for example, omit your third choice vote in the election phase, would your first and second choice vote still count?


running commands consecutively in a bash

The following bash permits of running the commands 1,2,3 in all the folders that has names included in the file "list.txt"   #!/bin/bash cat list.txt | while read i  do command1 & command2 & command3 & done   The commands 1,2,3 in the code are running together in all the folders that has names included in the file "list.txt" . How can the commands run one by one in all the folders (i.e. when the first command finish the second command start and so on...). I tried to use "wait" between the commands but it didn't work! The solution suggested here  didn't work well! I am looking for another solution


Covalent bonds are EM (electrostatic/electronegativity) or not?

This is not a duplicate, I am not asking why covalent bonds form or how they form. I am asking whether the covalent bond itself can or cannot be classified as a EM interaction (or if it is caused by a EM interaction)  I have read these questions:        Where Ben Crowell says in a comment:          It doesn't create any electrical interaction. In a covalent bond, each atom is still neutral.        Where Gert says:          To the right is also schematised the electron probability density ψ2 and note that this density is very significant on the nuclear axis, between both nuclei. This causes the intra-nuclear Coulombic repulsion force to greatly reduce and the molecular arrangement to be stable, meaning that pulling it apart would cost energy.        Where Manishearth says:          For covalent bonds, we have something known as electronegativity.      Now one says it has nothing to do with EM interactions, and the other ones say it is due to electronegativity, and the fact that intra-nuclear Coulombic repulsion forces greatly reduce when a covalent bond (a common molecular orbital) is formed.   This is a contradiction, both cannot be right. Covalent bonds must have a real reason to form and this can or cannot be electromagnetic, electrostatic, or be because of electronegativity. Or it could just be a non-electromagnetic cause, like a QM phenomenon. Anyway, there has to be a clear answer whether covalent bonds are classified as (and caused by) EM interactions or not.  Question:   Are covalent bonds classified as EM interactions or electrostatic interactions or a effect of electronegativity? Or are they just a QM phenomenon that we cannot classify (and explain) in terms of electromagnetics?


Automatically fall back to all-caps if small-caps shapes are missing

If I use \textsc{xyz} with a font that has no small caps (e.g. Latin Modern Sans), the result is typeset in lower case. Is it possible to automatically fallback to all-caps instead? I cannot do this manually since I want to use small caps in a macro.  \documentclass{article}  \begin{document} \newcommand{\acronym}[1]{\textsc{#1}}  \acronym{abc} is an acronym.  \begin{description} \item [\textsc{\acronym{abc}}] Trying to use \textbackslash{}acronym with LM Sans \item[ABC] This is what it should look like \end{description} \end{document}


Ginny Weasley was told that, once Olivander was no longer operating his shop, people would get their wands from other makers:  “Talking of Diagon Alley,’ said Mr Weasley, ‘looks like Ollivander’s gone too.’ ‘The wand-maker?’ said Ginny, looking startled. ‘That’s the one. Shop’s empty. No sign of a struggle. No one knows whether he left voluntarily or was kidnapped.’ ‘But wands – what’ll people do for wands?’ ‘They’ll make do with other makers,’ said Lupin. ‘But Ollivander was the best, and if the other side have got him it’s not so good for us.” Harry Potter and the Half-Blood Prince, Chapter 6 (Draco's Detour)  Were there other wandmakers in Diagon Alley? Or would you have to go to another village or even another country (or by post) to get a new wand? [yes, there is a 'second' shop in the Wizarding World park by Universal. I wouldn't consider that canon outside of a secondary source like JKR or something actually referencing that. The second shop in the park is merely one of traffic flow and economics imo - a chance to buy a wand without waiting around for the 'wand ceremony' experience]


What are some ways to increase grading speed?

I sometimes spend too much time on grading students' homework in the class I am a TA for. I am asking if there are some ways to improve grading speed? I hope that I can learn some useful tips from experienced people here.  For example, which one do you think will be faster, grading student by student, or problem by problem?


Switching hard drives from one laptop to another

My dell laptop has a broken power button so I am not able to turn on my laptop. I still have warranty on the laptop so Dell wants me to send it out to them to fix it...however, there's one problem. I have some sensitive personal data saved on the laptop that I would not want to be compromised that was saved on the desktop of my old laptop. So my question is this: just to be safe, would it be possible to buy a brand new computer of the same make, model, etc, take out the hard drive from my old laptop, and put it in the new laptop, and thus transfer the data. Will the new computer boot up with the old hard drive, and will my data still be there?


I'm looking for something similar to - DATEADD(day,-1,GETDATE())  To use like this - and sale.OrderDateKey >= (current DATE(without time) - 1 day)  e.g.  and sale.OrderDateKey >= '2018-07-22'


I have a figure and an equation side by side.  The code is as follows:  \begin{figure}[H] \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.8\linewidth]{cycle} \caption{The opsin cycle.  Clearly denoted are the parameters of the resistive model} \label{fig:sfig1} \end{subfigure}% \begin{subfigure}{.5\textwidth} \centering \[S+E  \xrightleftharpoons[k_{IS}]{k_{SI}}  I \cdot E \xrightleftharpoons[k_{PI}]{k_{IP}}   P+E\] \caption{Reaction scheme for enzymatic model} \label{fig:sfig2} \end{subfigure} \caption{Basis for the restive and enzymatic models, respectively.} \label{fig:fig} \end{figure}   Which produces   How can I make it so that the captions align, but the  figures stay aligned as they are?


How to achieve screen tearing effect or video glitches

I do not know at all what this effect is called, therefore I cannot search for the answer on the web. I am referring to the thing where the RGB color will shift individually when the camera jitters/move  So, how can I achieve this sort of effect in blender? and for future reference, what is this effect called?


PATH variable getting reset after closing and reopening SSH session

I have used SSH (via putty) to connect to a VPC and then added a folder to my path using:   export PATH=$PATH:/my/directory   This works whilst the session is open, however when I close putty then reestablish the SSH connection the changes to PATH are no longer there.  Any help understanding why this happens would be very much appreciated.


I am very new to Latex and I am getting this error:  Class scrartcl Error: undefined old font command `\bf'. See the scrartcl class documentation for explanation. Type H <return> for immediate help.... \maketitle   My template is never even using \bf but I still get this error. I am using the newest version of Texmaker.


Must I separate a new disk before installing Ubuntu 12.04.3 alongside windows 8?

Must I separate a new disk before installing Ubuntu 12.04.3 alongside Windows 8?  Also, there is only one NTFS disk named C in my computer and Windows 8 is already on it.  Is it possible for me to install Ubuntu 12.04.3 alongside Windows 8 in the same disk C?  That is to say, I don't want to separate a new disk from C.


Is there free OpenGL support libraries for C#? If so, which one do I use and where do I find sample projects?  Does C# provide classes for OpenGL?


C -- Double type data: Number slightly larger than allowed is able to slip through the conditions

I'm new to C language, it is required for my degree to complete one course on C programming. Hope the title makes sense... I had a hard time trying to convey what I meant. I'll elaborate here.  The problem I am facing right now is double type data being able to slip through the program undetected when it should have been rejected. This happens when a number very very close to the boundaries I set is provided.   In this assignment, in order to get an HD, my code has to have identical output to the lecturer's. The solutions are able to detect any number larger than the boundaries, no matter how close.   Basically, the program will ask the user to provide a GPA which is from 0 to 4.  I tried the following inputs: 4.01 rejected 4.001 rejected ... 4.000001 rejected But at 4.0000001, it is accepted. This should not happen at all. I am baffled.   Here's my code:  double GPA=-1; /*Flags are being initialised*/ int GPAflag=1; while(GPAflag){     char str[50];     char *ptr;     int isnum=1,n=0,i,point=0;     printf("Enter GPA>");     fflush(stdin);     gets(str);      n = strlen(str);      if(n==0){ /*string length is 0? There was no input, thus invalid*/         printf("Invalid GPA. ");         isnum=0;     }else{         for(i=0;i<n;i++) /*Validates numerical inputs, if not numerical, prompts user with error*/         if(!(str[i]>='0' && str[i]<='9')){             if(str[i]!='.'){                 printf("Invalid GPA. ");                 isnum=0;                 break;             }else{                 point++;             }         }     }     if(isnum){ /*If the input is a number, it may still be invalid*/         GPA=strtod(str, &ptr); /*The string is converted to a double*/         if(GPA>=0&&GPA<=4&&point<=1) /*If GPA is between 0 and 4, and the above is also satisfied (point=1), then the flag is 0 and thus a valid input*/             GPAflag=0;         else             printf("Invalid GPA. "); /*If not, it is still invalid*/     } }   I personally don't think this will be a problem but I would really like to know why it happens, and if possible, a way to fix it.  I can simply make a FOR loop: IF leading number is 4 and there's a '.' -> Reject But this seems like hard coding to me, I think it's rather a workaround than an actual solution.  Or I can change the IF statement from "<=4" to "<4.0000000000000000000000...1". Which in my opinion should lose marks... (if I was the marker I will take marks off for that)  Also, I am totally aware that the function "gets" is primitive and causes many problems (overflow... etc.). I have tried using fgets but it's a pain to implement... replacing the '\n' with '\0' blah blah... we haven't even learnt gets, let alone fgets. Is there a better way to implement fgets? Maybe have a function to replace the '\n'? I've tried that and it refused to work.  Any help and tips are greatly appreciated!


changing title and meta tags via jquery. will it work for crawlers?

We have a scenario where we are getting our news articles from database on runtime. So we are chnaging our meta tags and title of the news-article page via jquery.  Will this affect the crawling mechanism? Will the Google crawler read the dynamically created title and meta tags or not?


One oddity in the difference between UK and American usage is that Americans say "I went to the hospital" but British people say "I went to hospital".  Is there an explanation for this grammatical divergence? Does it have a name?


Using Bash terminal to run Java applications

I am brand brand brand new to coding. I started with Javascript and thought that Java and Javascript were the same thing. Learned real quick that that is not true. Point to that is: I have been using the Bash terminal to run my Javascripts through NodeJS. I am having trouble doing the same thing with Java. I know have accessed the directory that my java applications are stored (cd /mnt/c/Users...) and installed the java application on bash (sudo...). when I type the command to run a Java application ($ java ) I receive the error: ERROR: Could not find or load main class . Is it even possible to do what I want it to do and if so, what am I missing?


How to get the exact remainder using modulus in python

I want to find the remainder of 23.153 when divided by 23 i.e. 23.153%23. The remainder should come 0.153 but its coming as 0.1529999999999987.


Number of Sequences with Pairwise Even Sums

Let $D$ be the set of tuples $(w_1,\ldots,w_{10})$, where $w_i\in\{1,2,3\}, 1\leq i\leq 10$ and $w_i+w_{i+1}$ is an even number for each $i$ with $1\leq i\leq 9$. Then the number of elements in $D$ is ? I tried with combinatorics but unable to hit a conclusion. This kind of questions are often asked in competitive exams so there might be a simple way to determine. Isn't it?


What is the correct way to pass values from PHP code to javascript in Drupal 8?

I'm not talking about the library. That part is covered fairly extensive. What I want to do is generate the javascript based on PHP. But I can't, for example, do this:  $o = '<script> $data = ['; for ($i = 0 ; $i < 10; $i++) {     $o .= $i.', '; } $o .= ']; </script>';      $form['mainText'] = array (         '#type' => 'markup',         '#markup' => $o,     );  return $form;   How am I supposed to do this correctly?  And if you are wondering, the reason I am doing this is because I want to generate javascript that is to be used to plot points on a graph.


Problem with Installing intel-linux-graphics-installer_1.0.2-0intel3_i386.deb

I have Ubuntu 13.10 installed.  When I try to install intel-linux-graphics-installer_1.0.2-0intel3_i386.deb  I have error:  dependency is not satisfiable libpackagekit-glib2-14   Why this happens ?


Insufficient memory with my andriod phone

I have 16GB SD card but I still get the message insufficient memory when I want to download any app.


How to Select() a NumericUpDown after enabling it?

I need to get the following to work:  private void KeyDown(object sender,KeyEventArgs e){     textbox1.Enabled=false;     numericUpDown1.Enabled=true;     numericUpDown1.Select(); }   The current problem is, that the NumericUpDown is getting enabled, but not selected. (A textbox' KeyDown event is executing the above code)


Explanation of ceiling fan working principle

Can anyone explain how ceiling fan works; why the capacitor; how the fan rotates. Theory and practical.  Single phase induction motor are very easy to understand. In this ceiling fan, the windings are not like induction motor windings. There are two sets of windings. One is clockwise and another is anticlockwise. There rotating part is a magnet ring that is outside of the armature. Can anyone explain how this type of motor works?


Javascript Function factory code need understanding

I can't understand this code ,especially how value of x in "myfunc" takes up the value when called.... what does thois line of code means "var multiplyBy3 = makeMultiplier(3);" Please note console returns result 30.  // Function factory function makeMultiplier(multiplier) {   var myFunc = function (x) {     return multiplier * x;   };    return myFunc; }  var multiplyBy3 = makeMultiplier(3); console.log(multiplyBy3(10));


Install Ubuntu OS on SSD and other files to HDD

I am building a new PC. I am planning on having both a SSD and HDD.  I want to install the latest Ubuntu release to, and have the PC boot from and run the OS from, the SSD.   I also want any files, such as pictures, music, docs, etc to automatically be written to and saved on the HDD.  This will keep the SSD/OS relatively "clean" and allow for the fastest possible boot.  The forums here have a lot of posts about Dual booting Windows 7 and Ubuntu, moving a system over to SSD, cloning from HDD to SSD, etc. I cannot seem to find a post on this exact subject. If there is one, can somebody direct me to it.   Note that I am a noob when it comes to Linux. I have studied and understand how to do such an install and disk(s) setups on Windows 7 and Windows 8.


Dual Booting win 10 and Ubuntu 18.04 on two separate physical ssds

I have gotten as far as to create the bootable usb, booting into that bootable usb and getting to the install options however i quit because I had some concerns.  I currently have a Samsung 850 evo 1tb that has win 10ninstalled. I want to dual boot with Ubuntu 18.04 by installing it on a brand new unformatted uninitialized Samsung 860bevo 250gb. Should i format the brand new ssd as a new volume in win 10 and then proceed with the Ubuntu install on this volume. What else should i do? Im a first time Ubuntu user and installer.  Any and all help is appreciated.


Use every non-abelian group of order 6 has a non-normal subgroup of order 2 to classify groups of order 6.

Prove that every non-abelian group of order $6$ has a non-normal subgroup of order $2$. Use this to classify groups of order $6$.   I proved that every non-abelian group of order 6 has a nonnormal subgroup of order 2, but then how can I use this to classify groups of order 6?


SOQL help: pulling field name off of a subquery

We have a custom object program__c. We have a lookup field on the Tasks object to program under 'Related To'. Below is my current query. Program__c is pulling the program code, but I want the program Name. I've tried program__c.name but it does not work. The 'field name' of the Program Name on the Program__c object is 'name'. SELECT Salesforce_18_Digit_ID__c, firstName, lastName, email, phone, mobilePhone,     (SELECT program__c, Id, CreatedDate FROM Tasks) FROM Contact c  Error Message:  [InvalidFieldFault [ApiQueryFault [ApiFault exceptionCode='INVALID_FIELD' exceptionMessage=' (SELECT program__c.name, ^ ERROR at Row:11:Column:9 Didn't understand relationship 'program__c' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.' extendedErrorDetails='{[0]}' ] row='11' column='9' ] ]


Java contains many built in classes. I seeked someof them in the Java API documentation but I couldnt see or find the body of these classes and their related methods.  For example when I seeked the clearRect method of the graphics glass I found just the informations as follows without much details.  > public abstract void clearRect(int x, >              int y, >              int width, >              int height)   Clears the specified rectangle by filling it with the background color of the current drawing surface. This     operation does not use the current paint mode. Beginning with Java   1.1, the background color of offscreen images may be system dependent. Applications should use setColor followed by fillRect to ensure that   an offscreen image is cleared to a specific color.      Parameters: x - the x coordinate of the rectangle to clear. y - the y   coordinate of the rectangle to clear. width - the width of the   rectangle to clear. height - the height of the rectangle to clear. See   Also: fillRect(int, int, int, int), drawRect(int, int, int, int),   setColor(java.awt.Color), setPaintMode(), setXORMode(java.awt.Color)   Is there any way to find the source code of these classes ? Or are they hidden by the constructors of Java for some reasons ?


Creating Peirce quincuncial map in QGIS?

I would like to create a Peirce quincuncial projection of vector data using QGIS.   A similar question was asked here several years ago, without apparent satisfactory answer. Someone offered a , but I don't have the coding knowledge to know how to implement it or whether/how it can be used with QGIS.  How can I use that link, or do this another way?


I'm parsing a bunch of ints from strings that were 'substring-ed' from a simpleDateFormat string. For some reason that I haven't been able to figure out the String monthString keeps coming up NULL, I dont see why.   I have created the string in another function call and when I pass it to the next function the string then becomes NULL  public class MainMenu extends JFrame implements ActionListener {     private JButton start, highscore, help, stoppen;     private int yearNumber, monthNumber, dayNumber, daysInMonth;     private String monthString, yearString, dayString;      private String timeStamp = new SimpleDateFormat("dd.MM.yyyy").format(Calendar.getInstance().getTime());    public void go(){     setMonthString();     getDayString();     getYearString();     getDayNumber(dayString);     getYearNumber(yearString);     getMonthNumber(monthString);     getDaysInMonth(monthString);     makeThisMonthFolders();     maakComponenten();     maakLayout();     toonFrame(); }  private void makeComponent() {     String timeStamp = new SimpleDateFormat("dd.MM.yyyy").format(Calendar.getInstance().getTime());      String dayString = timeStamp.substring(0,2);      System.out.println("Today is day " + dayNumber + " of the month");      String monthString = timeStamp.substring(3, 5);      System.out.println("Month string: " + monthString);       start = new JButton("Move Folders"){         {             setSize(150, 75);             setMaximumSize(getSize());         }     };     start.addActionListener(this); }  private String setMonthString(){     String monthString = timeStamp.substring(3, 5);      if(monthString.substring(0,1) == "0"){         System.out.println(monthString.substring(0,1));     }     /*if(monthString.substring(0, 1) == "0"){         monthString = monthString.substring(1);     }*/     return monthString; }   public int getMonthNumber(String monthString){     System.out.println(monthString);     monthNumber = parseInt(monthString);     return monthNumber; }   }  Here is the null return from a test and the error codes thrown:  Today is day 0 of the month Month string: 07 Exception in thread "main" java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:542) at java.lang.Integer.parseInt(Integer.java:615) at com.company.MainMenu.getMonthNumber(MainMenu.java:123) at com.company.MainMenu.go(MainMenu.java:37) at com.company.Main.main(Main.java:11) 7 null  ERROR AT 123 references: System.out.println(monthString); monthNumber = parseInt(monthString); // this line return monthNumber;


Is there a timer command in the terminal?

I want to know if there is a command X that allows me to execute another command Y after a certain time. I would specify the time in X. The idea comes from a sleep timer, where I found:   With:  sudo shutdown -P +60   But say I want to do as described above:  command X -time 60 ls -a   Is there something like this and if not could I add it myself?


How to edit answers to fix syntax errors when "Edits must be at least 6 characters"

While looking for an answer of my problem "How to round numbers with decimals in javascript", I found this SO answer      This can be done using Javascript as follows:  this.value = Math.round((amt*100)/100).toFixed(2));    I try it and notice there is an extra ) at the end producing the following error: SyntaxError: Unexpected token ). So I edit the answer like this:     This can be done using Javascript as follows:  this.value = Math.round((amt*100)/100).toFixed(2);    But I can't save because      Edits must be at least 6 characters; is there something else to   improve in this post?   What I am supposed to do? I do not want to modify the answer. Can't we have a checkbox 'code fix' that bypasses this limitation?


I want to change linear to closest but i'm not sure where that setting is at.  Can someone show me a screenshot?


How to fix HOME and END buttons in Bash with ANSI prompt?

In bash, whenever I have a prompt with ANSI color codes, it messes up the HOME and END functionality.  Is there an obvious fix for this?  To re-create:  PS1="\e[0;33m\u@\e[m $ " echo "This is a very long sentence to demonstrate what im talking about" (press UP) (press HOME)   See where the cursor ends up?     Ubuntu 16.04 This is a remote login.  Is this an SSH problem?  Doesn't seem to be. I've tried numerous SSH terminals and VNC from both Mac and PC, all giving same results.


How can we proof that if $p$ is prime and $k$ is integer number that $1<k<p-1$  then $(p-k)!(k-1)! \equiv (-1)^k\pmod p$


File name with spaces is treated as multiple files

When I perform a search with, for example:  find . -iname "U2*.mp3"  or  ls *U2  I obtain the output:  U2 With or Without You.mp3 U2 When the Streets have no name.mp3 ...   If I try to play them with the command:  smplayer $(!!)  then, smplayer assumes the filenames are:  U2 With or Without ...   How can I deal with this, without changing the file names?


I have a Dell S2316H monitor which I connect to my MacBook Pro (early 2015) using the built in HDMI port. The fonts are looking very blurry on the external monitor.  I own the MacBook for about a week. Previously I used my monitor with my Dell laptop which had Ubuntu installed on it. When I plug the monitor with my Ubuntu machine, the fonts are smooth and looks good. But when I plug it with the MacBook, the fonts are very blurry.  I know this is a common issue but I'm unable to find a solution. I do not have any DVI port on my monitor so I can't use the solution from . Also tried this script , but no changes. I tried with different font smoothing level too. Is there really any solution for this problem?


I want to know how to freshly install ubuntu. I currently made a bootable disk, but when I plugged it in and turn my pc on, it doesn't do anything. I was expecting that the window will come up and show me the "on-screen" instructions. I don't think this is problem. I want to know how... Sorry for this "noobish" question.


$( X, Y)$ have a bivariate normal density centered at the origin with $E(X^2)$ = $E(Y^2) = 1$, and $E(XY) = p$ . In polar coordinates $(X, Y)$ becomes $(R,\Phi)$ where $R^2 = X^2 + Y^2$. Prove that $\Phi$ has a density given by $$\frac{\sqrt{1-p^2}}{2\pi(1-2p\sin(\varphi)\cos(\varphi))}$$ And is uniformly distributed iff $p = 0$. (To this point everything is clear) what i do not understand is how to conclude that $P\{XY > 0\} =  \frac{1}{2} +\pi^{-1} \arcsin (p)$ and $P\{XY < 0\}= \pi^{-1} \arccos (p)$.


Can we disable the new Stack Exchange look?

The new top bar for Stack Exchange sites is unappealing to me. Is there a way to restore the old look?


Adding a texture map to a beveled curve or path

I really want to be able to apply mapping to a curve object. For instance a rope or pipe that has a repeated pattern along its length that follows it's twists and turns.  There must be a simple way to generate UV coordinates for such an object without converting it to a mesh and unwrapping it. Can anyone help?


Proving rearranged series for absolute convergence relative to the original

Theorem: T1. If the terms of an absolutely convergent series be rearranged in any order, the new series will converge absolutely and to the same sum as the original series. How can this be independently proved for each $Z$, $R$ & $Q$? That are either positive, negative or positive and negative? I'm currently trying to prove for a series of all terms that are positive. if we take the series: $a_1 + a_2 ... + a_n ... = s$ such that, $a_n$ > 0; let $s_n = a_1 + ... + a_n$ let $\sigma_n = a_{p_1} + ... + a_{p_n} $ be the rearranged series. Although, how to proceed from here?


Is magnetic field a consequence of electric field?

We know that magnetic field is produced by a current carrying wire with time varying current? My doubt is that- do the electrons in motion cause the magnetic field or is it due to some another reason?


I want to ask if it is possible to pass arguments to a script function by reference:  i.e. to do something that would look like this in C++:  void boo(int &myint) { myint = 5; }  int main() {     int t = 4;     printf("%d\n", t); // t->4     boo(t);     printf("%d\n", t); // t->5 }   So then in BASH I want to do something like:  function boo ()  {      var1=$1       # now var1 is global to the script but using it outside                   # this function makes me lose encapsulation      local var2=$1 # so i should use a local variable ... but how to pass it back?      var2='new'    # only changes the local copy      #$1='new'     this is wrong of course ...     # ${!1}='new' # can i somehow use indirect reference? }             # call boo SOME_VAR='old' echo $SOME_VAR # -> old boo "$SOME_VAR" echo $SOME_VAR # -> new   Any thoughts would be appreciated.


Apple 12W adapter for 4th generation iPad?

I bought a 4th generation iPad in 2013 and it is still serving me well. However, I recently broke the 12W power adapter that came with the iPad. I have looked for a replacement on the Apple website and have found a 12W adapter that looks the same as the one I received with my iPad. However, on the list of devices that are said to be compatible with this adapter, the 4th generation iPad does not appear. I was wondering if the adapter that Apple sells is still the same or if it is different now? If it is different, would I be able to use it with my iPad? I want to make sure to take these precautions so that I don’t damage the battery life on my device.


I am having an issue.  I have a machine that has 2 users, the admin user and another user which seems to have basically no permissions to do anything.  I do not know the admin password and every time I try to do anything form the other user account it prompts me for that admin user password. I have tried a number of methods to reset the password from changing UAC, various 3rd party windows password reset tools, and several other suggestions I found but when I try to do anything including creating a bootable image I get prompted for the admin password.  There are files that are very important in the admin users documents that I need but I can't seem to find a way to get them.  Any help would be greatly appreciated.  This post is not a duplicate, the methods suggested in the "duplicate" post here "" do not solve my issue.  When I try to run those executable I am prompted for the admin user's credentials.


Why is azimuth resolution worse than range resolution in Sentinel1 (SAR)

Why is the azimuth resolution in Sentinel (SAR sensor) worse than the range resolution?    The table in this  gives the resolution for SLC products aquired in the different aquisition modes. In all of them the range resolution is better than the azimuth resolution.    Note: This question is totally different from my , as the latter tackles the effects of the incidence angle on the ground resolution (range resolution + azimuth resolution), and this doesn't explain why sometimes the range resolution is better than the azimuth resolution.


"I go to school" Because 'to' is a preposition then is it correct to write "I go to watching the movie"?   If not, please explain why. Thank you.


Understanding that $A = \{x\in \ell_2: |x_n| \leq \frac{1}{n}, n = 1,2,...\}$ is compact in $l_2$.

I need to show that $A = \{x\in \ell_2: |x_n| \leq \frac{1}{n}, n = 1,2,...\}$ is compact in $\ell_2$. I'm given the following hints:   First show that $A$ is closed. Next, use the fact that $\sum_{n = 1}^{\infty}\frac{1}{n^2} < \infty$, to show that A is "within $\epsilon$" of the set $A \cap \{x\in \ell_2:|x_n| = 0, n\geq \mathbb{N}\}$.   Question: Why do these two steps/hints result in $A$ being compact? (I'm not so interested in how to perform these two steps, but more in why they would work).  Thanks in advance!


Using a minimal biblatex example shown below, I am trying to incorporate citations into a resume using a custom   The class file Starts with   \PassOptionsToClass{11pt,12pt}{article} \LoadClassWithOptions{article}   so I imagined the behavior should not change if I change the document class as shown in the following example. Ive been searching but cannot find a good explanation.  \documentclass[12pt]{article}    % Works %\documentclass[margin=1cm, 10pt]{resume} % Doesn't work \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @book{auth1:2000, title = {A book}, author = {A. Thor}, date = {2000}, publisher = {Some Company}, location = {A City} } \end{filecontents}  \usepackage[backend=biber,]{biblatex} \bibliography{\jobname.bib}  \begin{document} \fullcite{auth1:2000}  \printbibliography \end{document}


What motivates the definition of the Klein-Gordon Inner Product?

I am following along . For scalar functions $f$ and $g$ we define the Klein-Gordon inner product as follows: $$ \langle f,g \rangle \ = \ i \int_{\Sigma} d^{3}\mathbf{x}\ \left[ f^{\ast}(t,\mathbf{x}) \frac{\partial g(t,\mathbf{x})}{\partial t} - \frac{\partial f^{\ast}(t,\mathbf{x})}{\partial t} g(t,\mathbf{x}) \right]  $$ Where we take $\Sigma$ to a 3D hypersurface of constant $t = t_{0}$. If $f$ and $g$ are the solutions to the Klein-Gordon then the above is independent of the choice of $t_0$ used to integrate it. One can use this to show that the modes $u_{\mathbf{k}} \propto e^{-i \sqrt{\mathbf{k}^2 + m^2} t + i \mathbf{k} \cdot \mathbf{x}}$ are orthogonal to one another. My question is; where does this inner product come from? I under stand that $i \phi^{\ast} \frac{\partial \phi}{\partial t} - i \phi^{\ast} \frac{\partial \phi}{\partial t} $ is a conserved current, but why would you put a conserved current under and integral sign to define an inner product? It seems arbitrary. What if one came up with a different inner product? What benefits does the KG inner product have?


How do you make a dictionary inverse and then use that to swap letters in a string in Python

quick explanation of what im trying to do. I've been wondering how to inverse a dictionary as im trying to make a Monoalphabetic cipher which will help me for a challenge soon. My aim after learning how to inverse a dictionary is to be able to use that to swap letters in a string.  This is what i have right now not much at all but it would be awesome if someone could help me out as i've been trying for a long time but i have no idea how to.  dicta = {     'a': 'M',     'b': 'N',     'c': 'B',     'd': 'V',     'e': 'C',     'f': 'X',     'g': 'Z',     'h': 'A',     'i': 'S',     'j': 'D',     'k': 'F',     'l': 'G',     'm': 'H',     'n': 'J',     'o': 'K',     'p': 'L',     'q': 'P',     'r': 'O',     's': 'I',     't': 'U',     'u': 'Y',     'v': 'T',     'w': 'R',     'x': 'E',     'y': 'W',     'z': 'Q',     ' ': ' ', } print(dicta)


OpenVPN client without administrator rights on Win7

My parents use a Win7 laptop. I have set it so that they are not administrators of the device, only I am. I have installed OpenVPN for them to access the home network resources when they are out. The problem is they cannot start the client without admin privileges, since the route cannot be added to the system without.   I made a workaround by letting the OpenVPN client start from scheduled tasks with a trigger when somebody logs in. That works while they're out, but breaks their network connectivity at home. On top of that, since the client is at that time started as a different user, the UI is not visible.  What would be the best way to provide them with the OpenVPN client, without giving them more privileges?


Rotation Problem in Mario galaxy like controller

i'm doing a Mario galaxy like CCC. And I have a serious rotation problem, may be Gimble lock, or maybe not.  So first, I have a parent object ("PLAYER") who can rotate toward a planet:   With this 3 line:  Vector3 dirOrientation = GetNormal() //here the normal collision Quaternion targetRotation = Quaternion.FromToRotation(PLAYER.transform.up, dirOrientation) * PLAYER.transform.rotation; PLAYER.transform.rotation = Quaternion.RotateTowards(PLAYER.transform.rotation, targetRotation, speedRotate);   Ok, next, I want to rotate the child object ("CHILDPLAYER"), who contain the render, according to the input of the player See in editor:   So here... I managed to get the direction of the input, according to the camera. See in blue, the directionnal line: the Vector3 point to the good direction according to the player and the camera, yes !   Vector2 dirInput = playerInput.GetDirInput();//input player with the stick, X,Y //here REFOBJECT is the camera (who dictate the "forward" of the player Vector3 relativeDirection = REFOBJECT.right * dirInput.x + REFOBJECT .forward * dirInput.y; Debug.DrawRay(CHILDPLAYER.position, relativeDirection, Color.cyan, 0.4f);   But now... As you see even if I have the good direction (cf blue line in the vidéo). I can't manage to rotate the child gameObject accordingly... I have to localy rotate smoothly the CHILDPLAYER only in Y toward my new calculated vector...  Here the code I use to rotate the CHILDPLAYER, with my relativeDirection Vector3:  CHILDPLAYER.localRotation = DirObject(CHILDPLAYER.localRotation, relativeDirection, turnRate);  public Quaternion DirObject(Quaternion rotation, Vector3 dir, float turnRate)     {         float heading = Mathf.Atan2(-dir.x * turnRate * Time.deltaTime, dir.z * turnRate * Time.deltaTime);          Quaternion _targetRotation = Quaternion.identity;          float x = 0;         float y = heading * -1 * Mathf.Rad2Deg;         float z = 0;          _targetRotation = Quaternion.Euler(x, y, z);         rotation = Quaternion.RotateTowards(rotation, _targetRotation, turnRate * Time.deltaTime);         return (rotation);     }   See the final result:  Here, I'm going ALWAYS DOWN with the stick... and even if the direction calculated in relativeDirection is good, the child player rotate itself... ...


I realize UFW is mainly just for enabling/disabling access on particular ports, but I'm trying to forward one port to another. I want any connection to port 1724 to be forwarded to 1723.   The file /etc/default/ufw already has DEFAULT_FORWARD_POLICY="ACCEPT". And I believe I need to uncomment net/ipv4/ip_forward=1 in /etc/ufw/sysctl.conf. Finally I need to edit /etc/ufw/before.rules to add an iptables rule.   And here is where I get lost because I can't find any documentation for this file. Where do I add the rule? And how exactly?  In particular:   On exactly which line do I add the rule? Do I put anything before or after it?


Evaluate $ \int_{0}^{\frac{\pi}2}\frac1{(1+x^2)(1+\tan x)}\:\mathrm dx$

Evaluate the following integral $$ \tag1\int_{0}^{\frac{\pi}{2}}\frac1{(1+x^2)(1+\tan x)}\,\mathrm dx $$    My Attempt:  Letting $x=\frac{\pi}{2}-x$ and using the property that  $$ \int_{0}^{a}f(x)\,\mathrm dx = \int_{0}^{a}f(a-x)\,\mathrm dx $$  we obtain  $$ \tag2\int_{0}^{\frac{\pi}{2}}\frac{\tan x}{\left(1+\left(\frac{\pi}{2}-x\right)^2\right)(1+\tan x)}\,\mathrm dx $$  Now, add equation $(1)$ and $(2)$. After that I do not understand how I can proceed further.


Is there a legal way to get D&D 5e core rulebook PDFs?

As much as I like having the hardcover core rule-books in front of me, usually I read or reference most information for RPGs on my computer.  Unfortunately, my google-fu has failed me at finding places to buy a Player's Handbook PDF, or even whether said PDF exists at all.  My question is this: Is there any place I can go to legally buy a D&D 5e core rulebook PDF?  I'm not looking for the starter set or basic rules, since those are incomplete (and free), I'm just looking for the core books in PDF format.


--Revised-- I am looking at a math workbook for teenagers. This one has the following structure:  1.Main Chapter 1.1 Subchapter 1.11 Task 1 a) problem 1   b) problem 2   c) problem 3 d) problem 4   e) problem 5 1.12 Task 2 etc. ...  Many of the math problems are very small and the natural thing would be to have them on line, horizontally. However an expression is often broken and aligned at the equal sign. Not unlike an equation (but not). Secondly, when the line that contain the structure breaks, the item indicators also align, presuming the use of an enumerated list. How can I reasonably assume this is done? Does it have to be a forced method, as a table, or can it be a flexible one, like inline?


convert hash byte array to string that it is generated from

i have a hash that is generated from a string using this code:  public static byte[] GetHash(string inputString)         {             HashAlgorithm algorithm = MD5.Create();               return Algorithm.ComputeHash(Encoding.UTF8.GetBytes(inputString));         }   and now, i want to get back the string that hash is generated from, how can i do that? is there any better suggestion to encrypt some data, so that i can retrieve them back again?  i tried this method but its not returning that string:  public string ToHex(byte[] bytes, bool upperCase)         {             StringBuilder result = new StringBuilder(bytes.Length * 2);              for (int i = 0; i < bytes.Length; i++)                 result.Append(bytes[i].ToString(upperCase ? "X2" : "x2"));              return result.ToString();         }   also, i tried this one:  public static string GetHashString(string inputString)         {             StringBuilder sb = new StringBuilder();             foreach (byte b in GetHash(inputString))                 sb.Append(b.ToString("X2"));              return sb.ToString();         }


Why can't I change the width of my container?

I am building a portfolio and for some reason cannot adjust the margins of my bio container. Adjusting the width won't work and if I try adjusting the left-right margin to 0vh, it just pushes my container to the left like this:   Here is my CSS (with left-right margins set at auto instead of 0vh) and HTML:   .wrapper {   background-color: rgb(232, 234, 246);   padding: 6vh 0vh 4vh; }  .container {   margin: 4vh auto 4vh;   padding: 2vh 5vh 2vh;   border: 1px solid gray;   border-radius: 2rem; }

         <Image className='bio-pic' src={profile} alt='casey' />
About Me

           I am a full-stack web developer, passionate about turning ideas into           reality. Experienced with front-end and back-end development, I enjoy           the logical puzzles that come with software engineering and take pride           in writting elegant, dry code. I am excited to apply the skills I've           built as a developer in a challenging environment where I can grow as           a professional and be a positive impact as a team member.

 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed           do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim           ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut           aliquip ex ea commodo consequat. Duis aute irure dolor in           reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla           pariatur. Excepteur sint occaecat cupidatat non proident, sunt in           culpa qui officia deserunt mollit anim id est laborum.

     I'd like for the container to have a width of 80vh and be centered. Can any CSS wizards help me out?


What do you call a word that is an example of itself?

For example, "word" is a word, "adjectival" is adjectival, etc. Is there a term for this? Something like a set that includes itself, but not quite. I want to call it "autoinclusive"; would that work linguistically?


Boot stops at - /dev/sda1 clean message Ubuntu 18.04 LTS  fstab UUID=af55b809-e9eb-4766-b06f-64e0897eab6b /               ext4    errors=remount-ro 0       1 /swapfile                                 none            swap    sw              0       0  blkid /dev/sda1: UUID="af55b809-e9eb-4766-b06f-64e0897eab6b" TYPE="ext4" PARTUUID="bcd123f6-01"  I also removed nvidia drivers sudo apt-get purge *nvidia  The only difference is that now current kernel doesnt blink with /dev/sda1 clean message.


How to add optional arguments to a package I'm writing?

I want to build a package that can optionally typeset line in double-space. Something like this:  \ProvidePackage{mypackage} % actual functional codes   Then I can use the package in this way:  \usepackage[doublespc=yes]{mypackage}   So that all line will be typeset in double-space. If I omit that optional argument in the preamble, then all line will be typeset in single-space.


What do we call the maximum power of prime factorization?

Any positive integer n > 1 can be written uniquely in the following prime factorization form :    where p1 < p2 < ... < pk are primes and the ni are positive integers.This is Fundamental theorem of arithmetic. what do we call every prime power pi^ni.I want to know the concept .


I've got a PDF of a scanned document that's around 20MB and I need to drastically reduce the filesize to be able to email it.  I've tried  gs -sDevice=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf   but output.pdf isn't created.  Instead, I get an X Viewer for Ghostscript briefly.  Where am I going wrong?


I have a Intel Wifi AX200 as far as I can tell. I have seen more topics about this but I'm not really sure what to do.  On this page:   There are the following steps:   To install firmware:  1. Copy the files into the distribution-specific firmware directory, /lib/firmware. 2. If the directory doesn't work, refer to your distribution documentation. 3. If you configure the kernel yourself, make sure firmware loading is enabled.    Does this mean I have to put it in /lib64/firmware since I have a 64bit OS?  Also how do I know if the directory works or not? Is it just a single reboot?  The adapter is working on windows, is there any risk of breaking that (I have dual boot)?  I also readed somewhere that after kernel 5 is installed that it should be supported natively. So I prefer that over drivers.  I'm using ubuntu 18.04.03, a folder /lib64 already exists but there is no firmware folder in there. /lib/firmware does exist.


Example:   I have alias chrome='google-chrome'. I want which chrome to return the same thing which google-chrome returns, i.e.:  /usr/bin/google-chrome  Is that possible?


let $f:[a,b] -> R $ be a continous function and $g : [a,b] - R$ a no negative integrable funtion , prove that there exists a $c$ in $(a, b)$ such that $$\int_a^b{f(x)g(x)dx}=f(c)\int_a^bg(x)dx$$ obviously I need help for the case in which g(x) is different from 0, I tried to found a lower and upper bound, but I just can't get it


How to use quick substitution to replace all the strings of the previous command?

I know I can replace a string of the previous command using ^old^new. But it seems to only replace the first occurrences as I do the follow:  $ cat /proc/5742/task/5742/status ... $ ^5742^2839 cat /proc/2839/task/5742/status cat: /proc/2839/task/5742/status: No such file or director   How to replace all occurrences, if possible?


Why my transformation panel doesn't show align to objects to pixel grid option in Illustrator 2020?

As shown in the picture, there is no such option   it will show in the right corner, but it's not clickable.


Does R2D2 know that Darth Vader is Anakin?

I have looked through a lot of posts on here, but cannot find any specific answer for this question.   Now, it's been pretty fairly established that due to having his memory wiped, C-3PO would not recognize Anakin/Darth Vader. However, it seems that R2D2 either never had his memory wiped - which explains his quirky behavior - or only had certain parts reprogrammed.   Does R2-D2 know that Anakin is Vader, either from scanning him or simply because he's been told? It seems that if anyone aside from Obi Wan would know him, it would be him.


I have qbittorrent installed.  When I click on a magnet link with Firefox it prompts me what program to use to open it.  I would love to use qbittorrent, but it is not listed there.  I search for it and it is not there.  I have qbittorrent installed and open, currently running.  This is frustrating as hell.  Why isn't it there?  Why can't I just open the file that I would of had downloaded an hour ago if I were on windows?  Why is such a simple thing so complicated in ubuntu?


sftp permissions limited to primary group after update?

My CentOS7 server runs sftp through openssh. Users are chrooted to a dir with subdirs that are owned by another user, but sftp users are group members through their primary or secondary groups with rwx permissions. Since a recent update they are no longer able to access folders owned by their secondary groups, but can access folders owned by their primary groups. I am suspecting an update of openssh to be responsible for this change in behaviour (6.6.1p1-25.el7_2.x86_64 to 6.6.1p1-31.el7.x86_64). Can anybody provide insight on how to troubleshoot? Suggestions on ways to solve this other than downgrading openssh (if that indeed is the cause)?


I am using an Asus ROG(GL553VE) and it's complicated with installing Ubuntu. I changed grub's cmdline linux default to  GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash nouveau.modeset=0 tpm_tis.interrupts=0 acpi_osi=Linux i915.preliminary_hw_support=1 idle=nomwait acpi=force”   And I can't update it.  sudo update-grub Sourcing file `/etc/default/grub' /usr/sbin/grub-mkconfig: 10: /etc/default/grub: splash: not found   MY GRUB FILE ---->  # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash nouveau.modeset=0 tpm_tis.interrupts=0 acpi_osi=Linux i915.preliminary_hw_support=1 idle=nomwait acpi=force” GRUB_CMDLINE_LINUX=""  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"


compact and self adjoint square root of an operator

Let H a Hilbert space and $T:H\rightarrow H$ a linear bounded, self-adjoint, positive and compact operator. How can i prove that the square root of T, $\ T^{1/2}:H\rightarrow H$ is also compact and self-adjoint; thanks.


How can I enable video and audio codecs?

I would like to know how can I enable video and audio codecs not included by default on Ubuntu. Thanks!


How to access a remote site using the command line (with drush)?

I don´t know how to use drush nor the command line, so I´ve started to read some tutorials, and watch some videos. I´ve installed the drush windows installer, because I have windows.  The thing is that all examples I´ve read so far, start with localhost. What if I have my devel installation in a shared hosting or a VPS, in the cloud? How to access that?  Using my ftp program, I access it using hostname ftp.mysite.com the username and the password to that account. How may I do that with the command line?  Thanks!


XOR cipher with fixed key and known relation among plaintexts

I have three messages, each known to be XOR-encoded, with the same key used for each message of this XOR cipher.  Encoded message 1: $e_1\,=\,00100111010$ Encoded message 2: $e_2\,=\,01001110110$ Encoded message 3: $e_3\,=\,11010110101$  I also have an extra information: I know that the decoded contents of $e_1\oplus e_2$ is equal to the decoded contents of $e_3$. How would one go about solving this problem, in order to get the key and decode the contents of the message?


The units of $\mathbb Z_4[x]$ should be $$\{f(x)=a_0+a_1x+a_2x^2+\dots+a_nx^n\mid a_0\in\{1,3\},a_i\in\{0,2\}, 1\le i\le n\}.$$ But I don't know how to prove. Any suggestion?


Some research papers available on the web have low-quality outputs. For example, see . It seems that it was converted from a PS file and typeset in (La)TeX. However, it has all the font information. Is there any way to make the PDF file clearer?


In a circuit involving integrated circuits, the documentation for the ic often states that if a pin is in logic 1 or high the circuit will behave in one way, and if the circuit is in logic 0 or low the circuit will behave in another way.  One example i found was experimenting with the 4029 CMOS Counter ic  on the up/down and dec/bin pins. What i don't understand, is what the pin that is set either high or low should be connected to i would assume it would be the positive supply voltage, the negative supply voltage, or neither, but i can't seem to figure out which one.


On which SE site may I ask a question about online collections of moving JavaScript imagery?

I'm interested in learning how to create simple interactive and dynamic visualizations with JavaScript. For instance, I'd like to make an image of a digital clock that starts running as soon as the user hoovers their mouse over the image. In order to learn about these things, I think it would be useful for me if there'd be a large, open-source online repository of such dynamic images, including the code. However, I haven't been able to find such a website thus far. Therefore, I'd like to ask a question about this on one of the Stack Exchange website. I'm not sure though which one would be most appropriate for such a question -- if any.


Determine the size of a pipe without calling read()

I need a function called SizeOfPipe() which should return the size of a pipe - I only want to know how much data is in the pipe and not actually read data off the pipe itself.   I thought the following code would work:  fseek (pPipe, 0 , SEEK_END); *pBytes = ftell (pPipe); rewind (pPipe);   but fseek() doesn't work on file descriptors. Another option would be to read the pipe then write the data back but would like to avoid this if possible. Any suggestions?


"Ikea founder Ingvar Kamprad dies aged 91" - why Present Simple Tense?

Ikea founder Ingvar Kamprad dies aged 91      Company says man who founded firm in 1943 aged 17 died peacefully at home in Sweden   Please say why in the title it is said in Present Simple Tense "Ingvar Kamprad dies aged 91"? Why not Past Simple Tense. What a rule can describe this?


Ubuntu does not load after installing it alongside Windows

I installed Ubuntu 12.04 and I chose to install 'alongside windows 7'.  After installation and restart, Windows 7 loaded but there is no sign that Ubuntu is actually installed.    Windows 7 is installed in hdd0, boots in legacy mode (only 1 HD in machine), UEFI secure boot is disabled.  I don't see anything on UEFI boot.    Partitions on my 1TB HDD:    100MB ntfs (win 7 installation made it automatically) 200GB NTFS (Win 7 partition) 4 GB Partition (I don't know what fs type) rest all unallocated   Edit: Yesterday I deleted the unused 4 gb partition current OS is running on live usb fat 32  The result of fdisk -l    Result of sudo parted -l


How to save an ISO (or similar) of a whole Lexibook tablet (Android SO)?

A friend has 2 Lexibook android tablets (kids' tablets). One is completely clean and the other is fine.  He wants his clean android to be exactly the same as his good one.  How does he copy?  I got the tablet's in my hands and the main problem until now is I can't even download nandroid. Is there anyway I can?  Please note: he is looking to have a complete copy, not just data and not just software.


If you were to construct a box with perfect mirrors on all sides, and would emit some photons in to that, would the light bounce infinitely? Sorry of this is a stupid queston, i'm not a physicist ;)


Prove $S^1$ is not homeomorphic to $S^2$ using connectedness

I have to prove that the unit circle $S^1$ is not homeomorphic to the sphere $S^2$ using connectedness. Intuitively I know this is true, but I'm not sure how to prove this.. Can someone help me?


Can "sir" be used to address female officers?

The use of the term sir as a form of address for men, especially those of higher rank or status, is discussed in several prior questions including . They all indicate that the term is reserved to males, and that there are a number of related terms for females, such as ma'am.  A review of the first dozen online dictionaries at onelook.com confirms that sir is strictly reserved for male addressees. For example  defines it as     used as a polite or respectful way of addressing a man, especially one in a position of authority: excuse me, sir   On several recent television shows in the US, the term sir has been used by a police officer to address his or her supervisor who was female. In the context, the use was sincere and was not objected to by the superior.  Has the use of sir when addressing a superior female in a military or quasi-military setting become acceptable, or is this merely literary license?


Flying into Germany with a Luxembourg Type D Visa

I have a Type D (long-stay) visa issued by Luxembourg. Can I fly into Düsseldorf Airport in Germany, and them from Dusseldorf take a train to go to Luxembourg?


Can Ubuntu Linux be installed on FAT32 or NTFS?

Before I start, don't lecture me on the fact that FAT32 is old and hasn't been updated for nearly 20 years. Right now I have sorted that. I am trying to install Ubuntu Linux onto a 64GB flash drive and it wants me to format it to one of the EXT file systems.  The problem is if I put the flash drive into a Windows PC, I can't use it. I also can't install the required software onto every Windows PC that I will use. When I tried to install it on FAT32 I got an error and there is no option for NTFS.  Does anyone know how I could do this? Maybe a Windows based tool? Thanks in advance.


Why does "stigmata" [often] have penult stress?

I have been studying the pronunciation of Greek-derived words in English, and I've found an odd anomaly. There are (at least) two possible pronunciation patterns for plural word-forms that end in -mata (which correspond to singular word-forms that end in -ma).   Antepenult stress (expected)  It appears that it is always possible to place the stress on the antepenult (third-to-last) syllable, such as:    /ˈlɛmə/, /ˈlɛmətə/  /ˈskiːmə/, /ˈskiːmətə/  /ˌtɛrəˈtoʊmə/, /ˌtɛrəˈtoʊmətə/~/ˌtɛrəˈtɒmətə/  /ˈstɪɡmə/, /ˈstɪɡmətə/   This is what would be expected from  (I believe most or all of these words came through Latin before entering English), since the penultimate "a" in the original Greek words is short.  Maybe Latin vowel quality and stress rules are not very relevant; certainly, few English speakers know about them nowadays. And even with antepenult stress, some of these pronunciations do not seem to follow all of the traditional rules for pronouncing Latin-derived terms in English. I was reminded by some comments in this  that  in antepenult stressed syllables, we would expect tense ("long") vowels to be shortened due to  (TSL), yielding pronunciations like /ˌtɛrəˈtɒmətə/ (which I just noticed is in fact listed in the Oxford English dictionary) and ?/ˈskɛmətə/ (which is not). (Compare to genus~genera /dʒiːnəs/~/dʒɛnərə/, and perhaps opus~opera /oʊpəs/~/ɒpərə/). However, there are other Latinate plural forms that typically don't have trisyllabic laxing (matrices, also I think helices), or where both the lax- and tense-voweled pronunciations coexist (codices, apices), so I guess the apparent lack of it in schemata should not be surprising. (There are even some exceptions to TSL in singular nouns like obesity.)  Penult stress (unexpected)  The other pronunciation seems to exist only for a couple of words, in which the penultimate "a" is commonly stressed and broadened: stigma ~ stigmáta  (listed by both the Merriam-Webster dictionary and the ), and also sometimes schéma ~ schemáta /skiːˈmɑːtə/ (listed only by the ). (Neither the Merriam-Webster dictionary nor the Oxford Learner's Dictionaries list *"lemmáta").  I'm wondering why this pronunciation exists. It's an irregular plural either way, and putting the stress on the penultimate syllable creates a stress change between the singular and the plural forms.  (It's true that all of these words are rare, and some people might pronounce some of their plurals differently. The pronunciations I give here are simply the ones listed in dictionaries.)  The plural form "stigmata" is probably most common in religious or theological contexts (where it refers to the wounds of Christ), so at first I wondered if the penultimate stress was supposed to be closer to the original Greek pronunciation, but according to , the stress is on the antepenult in Greek as well.  So, what's up with this? Did the stress perhaps change in Latin over time, is this a tradition of Greek accentuation that I'm not familiar with, is this a simple matter of ignorance of the original position of the stress that has now become entrenched with time and usage, or is this somehow explainable by established English stress patterns? (For example, do English speakers have some natural preference for a penultimate stress on polysyllabic words?)  If nobody knows of a reason, I suppose I can just put it down to people encountering the word mainly in text, not knowing which syllable to stress, and choosing the penult because it sounds better to them.  (I asked this question a while back on , but nobody knew of any reason.)


How to match Php regex with all dashes (Family) types only?

I know the question seems a bit awkward. But trust me, it's true. I just realized there are many types of dashes. Especially if we're talking with PHP programming here.  Anyway, let's see our code:  preg_match_all("/(((\d+)(\s?)-(\s?)(\d+)(\s|\/)(\w+)(\s|\/)(\d{4})))/", $data_in, $data_array, PREG_SET_ORDER);   In that code my purpose is clear, to match this pattern :  anyNumber - anyNumbers NAME 4DigitNumber   Example  :  1234 - 93129 Suitable 4432 or 123456-92129 Suitable 9932   But the dashes just like i said, there are many types of dashes. Take a look here :   Anyway how the regex should be changed anyway?  Notes : The part of the dashes i replace with word ' DASH ' for clarity reading purposes.  Become :  preg_match_all("/(((\d+)(\s?)DASH(\s?)(\d+)(\s|\/)(\w+)(\s|\/)(\d{4})))/", $data_in, $data_array, PREG_SET_ORDER);


$f(x, y(x))=0$ Show that $y'=-\frac{\partial f / \partial x}{\partial f/ \partial y}.$

A relationship of the form $f(x, y(x))=0$ defines y implicitly. It is possible to find $y'(x)$ at points $x$ where $f$ is differentiable and $\frac{\partial f}{\partial y} \neq 0.$ Show that at such points $y'=-\frac{\partial f / \partial x}{\partial f/ \partial y}.$ My understanding is that using the chain rule $\frac{\partial f}{\partial x}=\frac{\partial f}{ \partial y}y'$. Solving this we get $y'=\frac{\partial f / \partial x}{\partial f/ \partial y}$. I am not clear where the negative in the answer is coming from?