I try to customize a presentation template. I try to create the first page. I would like to have in the footer something specific like the conference name and country.  The initial is this:  \documentclass{beamer} % \usetheme{CambridgeUS} \usepackage[latin1]{inputenc} \usefonttheme{professionalfonts} \usepackage{times} \usepackage{tikz} \usepackage{amsmath} \usepackage{verbatim} \usepackage{graphicx} \usetikzlibrary{arrows,shapes}  \author{Elena Piper, Amina Shahid, April Fiorese} \title{Evaluating the Change of Performance Metrics for Key ABS}  \begin{document} \maketitle   What I tried:  \documentclass{beamer} % \usetheme{CambridgeUS} \usepackage[latin1]{inputenc} \usefonttheme{professionalfonts} \usepackage{times} \usepackage{tikz} \usepackage{amsmath} \usepackage{verbatim} \usepackage{graphicx} \usetikzlibrary{arrows,shapes}  %\author{conference} %\title{city}  \begin{document} \maketitle \author{Elena Piper, Amina Shahid, April Fiorese}  \title{test} \begin{comment} :Title: Beamer arrows :Tags: Remember picture, Beamer, Physics & chemistry, Overlays :Use page: 3  With PGF/TikZ version 1.09 and later, it is possible to draw paths between nodes across different pictures. This is a useful feature for presentations with the Beamer package. In this example I've combined the new PGF/TikZ's overlay feature with Beamer overlays. Download the PDF version to see the result.  **Note.** This only works with PDFTeX, and you have to run PDFTeX twice.  | Author: Kjell Magne Fauske  \end{comment}   % For every picture that defines or uses external nodes, you'll have to % apply the 'remember picture' style. To avoid some typing, we'll apply % the style to all pictures. \tikzstyle{every picture}+=[remember picture]  % By default all math in TikZ nodes are set in inline mode. Change this to % displaystyle so that we don't get small fractions. \everymath{\displaystyle}   I would like to keep the title and authors names as they are but change the text in the footer note in the first box will have the conference name and in the second have country name and in the third as is the timestamp.  How can I make it?

How is it possible to set a specific text in the footline of the slides in beamer? In my case, author names and the title are shown. Instead I'd like to show the conference name and country.  \documentclass{beamer} \usetheme{CambridgeUS}  \author{Elena Piper, Amina Shahid, April Fiorese} \title{Evaluating the Change of Performance Metrics for Key ABS}  \begin{document} \maketitle  \end{document}


In $\Delta ABC$, $\angle EAF=10^{\circ}$, $\angle FAB=70^{\circ}$, $\angle FBA=60^{\circ}$, $\angle DBF=20^{\circ}$. The goal is to find $\angle EDA$.  I have tried this question for some time and am unable to find the required angle. On manually measuring angles, I found that $\angle EDA = 20^{\circ}$, which implies that $\Delta CDE\sim \Delta BFD$. I have tried to prove this result using sine rule but got nowhere. Also, I have checked and there are no cyclic quadrilaterals in this configuration. So, there might be a clever construction that solves this problem. Any solution will be much appreciated. Thanks a lot. Please try not to use values of $\cos 20$ and such in your solution as this may not be provided in contest math.

Let CAB be a 20-80-80 triangle, what is the value of DEA? (EAB = 70, DBA = 60)  I tried creating a parallel of BC passing through D but I didn't get anything. I also tried creating an equilateral triangle with AD as its side but it also did not work.


I'm having problems with texturing a model in cycles (blender 2.72b). I downloaded the model and it comes with 3 tga files per section. see image below for the hair for example  I render in cycles. I search the forums, but i still can't get the transparency right. How do I set this up with nodes?  Many thanks in advance!

After converting to nodes in order to render using Cycles I've no idea where to enable the z-transparency. I guess the image textures alpha channel needs to be pluged somewhere but I've no idea which node would be suitable.   The question is how could I correctly setup the nodes to have the same effect as when using z-transparency in BI?      The materials original settings for BI are:    Which renders like:    I had no luck with DarenWs suggestion:


If I use ssh to run some command in background, that command gets killed as soon an ssh hangs up:  ssh localhost -t "bash -c '(for i in 1 2 3 4 5; do sleep \$i;done)&'"; ps x|grep sleep   This will not show any running sleep process. (But it would, if I do the ps inside the ssh command.)  However if I manually log in, run it it background and logout, the command keeps running.  ssh localhost bash -c '(for i in 1 2 3 4 5; do sleep $i;done)&';exit ps x|grep sleep   Why is the first command killed? Why not the second one?  (NB: This problem arose when I tried to start a service with service tomcat start which worked fine after a manual login, but no service was running after invoking directly in the ssh command.)    No, this is not a duplicate of . I am not talking about nohup and I am not trying to use jobs instead of ps.

I'm trying to run a program over SSH that keeps running when I disconnect.  gave me the following command:  nohup sleep 30 > foo.out 2> foo.err < /dev/null &   Unfortunately, it doesn't seem to work. I login (ssh -Y) to a remote bash shell and execute it, disconnect, and come back within 30 seconds, but jobs shows nothing and the foo files also show nothing. Is there any other way I can run background jobs over ssh after I logout?


I am trying to Develop a Vehicle Tracking app where I want to track Drivers activity Like DISTANCE, TIME TAKEN , AVRAGE SPEED. I am able to Track his current location and also see the path the Driver is going on in firebase database, Now I have found a code from a project for Distance, I have implemented it in my project.and the app is crashing, is there a different way to get and calculate distance, stopwatch, speed?? public void newJourney(){     locations = new ArrayList<Location>(); }  public float getDistanceOfJourney(){     if (locations.size() <=1){         return 0;     }      return locations.get(0).distanceTo(locations.get(locations.size() - 1)) / 1000;  }   protected void onStart() {     super.onStart();     if (ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED)     {         startLocationUpdates();     }     initButtons();     /////////NEW ///////////////////////     new Thread(new Runnable() {         @Override         public void run() {             float d = (float) getDuration();             long duration = (long) d; // in seconds             float distance = getDistanceOfJourney();              long hours = duration / 3600;             long minutes = (duration % 3600) / 60;             long seconds = duration % 60;              float avgSpeed = 0;             if(d != 0){              //   avgSpeed = distance / (d / 3600);             }              final String time = String.format("%02d:%02d:%02d", hours, minutes, seconds);             final String dist = String.format("%.2f KM", distance);             final String avgs = String.format("%.2f KM/H", avgSpeed);              postBack.post(new Runnable() {                 @Override                 public void run() {                     durationText.setText(time);                     avgSpeedText.setText(avgs);                    distanceText.setText(dist);                 }             });             try {                Thread.sleep(500);             } catch (Exception e){                e.printStackTrace();;            }         }     }).start(); }  after running this code am getting this error in log java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference     at com.example.vehicletracker.MapsActivity.getDistanceOfJourney(MapsActivity.java:116)     at com.example.vehicletracker.MapsActivity$3.run(MapsActivity.java:293)     at java.lang.Thread.run(Thread.java:923)  Below is the Code of tracking the current Activity and updating it in realtime:  @Override public void onLocationChanged(@NonNull Location location) {      if (location != null) { //location is enabled         saveLocation(location);      } else { //When user has no access to location         Toast.makeText(this, "No Location", Toast.LENGTH_LONG).show();     }      //polylines     double latitude = location.getLatitude();     double longitude = location.getLongitude();     LatLng latLng = new LatLng(latitude, longitude);      polypoints.add(latLng);     redrawLine();      //newUpdate     if (recordLocations){         locations.add(location);     } }  private void saveLocation(Location location) {     databaseReference.setValue(location); //Saving Location of user To db }

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


I made a package to replace my title page and it produces errors on compilation.  Here is a minimum example:  \ProvidesPackage{replacementTitle}[2017 Personal Title Package] \newcommand*{\mynewmacro}[1]{\gdef\@mynewmacro{#1}% } \newcommand*{\@mynewmacro}{default text} \renewcommand*{\maketitle}{% \begin{titlepage} Text before \@mynewmacro\unskip\ and text after. \end{titlepage} } \endinput   This produces two errors:  ./main.tex:51: Missing = inserted for \ifnum. <to be read again>                     P l.51   ./main.tex:51: Missing number, treated as zero. <to be read again>                     P l.51    This is due to the way that I define a macro which can optionally be set externally, but I can't figure out how to fix it.

I have a question concerning .sty files. I often use the same preamble in my latex documents and so I wanted to put it into a .sty file. I started with the first few lines, but it already does not work, and i don't know why.  I apologize in advance should there be a totally obvious mistake in my code:   \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{preamble_article}[Custom Preamble for Articles!]  \RequirePackage{unicode-math} \RequirePackage{fontspec} \defaultfontfeatures{Ligatures=TeX,Scale=.92} \setmainfont[ ItalicFont=LucidaBrightOT-Italic.otf, BoldFont=LucidaBrightOT-Demi.otf, BoldItalicFont=LucidaBrightOT-DemiItalic.otf, ]{LucidaBrightOT.otf} \setsansfont[ ItalicFont=LucidaSansOT-Italic.otf, BoldFont=LucidaSansOT-Demi.otf, BoldItalicFont=LucidaSansOT-DemiItalic.otf, ]{LucidaSansOT.otf} \setmonofont[ ItalicFont=LucidaSansTypewriterOT-Oblique.otf, BoldFont=LucidaSansTypewriterOT-Bold.otf, BoldItalicFont=LucidaSansTypewriterOT-BoldOblique.otf, ]{LucidaSansTypewriterOT.otf} \setmathfont{LucidaBrightMathOT.otf} \setmathfont[range={\mathcal,\mathbfcal},StylisticSet=1]{XITS Math} \newfontface\LucidaBlackletter{LucidaBlackletterOT.otf} \newfontface\LucidaCalligraphy{LucidaCalligraphyOT.otf} \newfontface\LucidaHandwriting{LucidaHandwritingOT.otf}   \endinput   If I use the exact same code as a normal preamble (using \usepackage instead of \RequirePackage) everything works fine. But with this .sty file I get the error "Missing number! Treated as zero." Where is my mistake? Thanks a lot for your help!


Noob question:  It is my understanding that the raw output from    non-blocking /dev/random (where the kernel's   entropy_avail estimate is equal to or greater than the number of random bits required)    or properly-initialized /dev/urandom (i.e., after roughly 256 bits of entropy have been collected by the system)     can be used without further post-processing as strong keymat for long-term symmetric crypto keys.  The output is gathered thusly (for the symmetric key):   //output 256 bits of entropy in 64 hex digits od -N 64 -x /dev/random   Is there any weakness in this method as I have been recently led to believe (with no justification other than 'it's common knowledge', supposedly), or is raw /dev/[u]random output usable for long-term (>10 year) keymat?  Edit: remove any reference to asymmetric crypto to make its own question.

For a software, I don't want the user to choose weak keys, so I plan to just read the needed number of bytes from /dev/random to create the needed secret keys. Is it safe to do so?


Basically, I want to make 3 concentric spheres with a portion of them being open (very similar to what is shown in the iamge).   I only know how to make concentric-like circles in Tikz, can someone help with making one similar to the image I posted?    Thanks!    Here is my starting code:  \documentclass[11pt]{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{figure}[h] \centering \begin{tikzpicture}[scale=1.4] \footnotesize \coordinate (A) at (2,0); \coordinate (B) at (5,0); \coordinate (C) at (6,0); %\coordinate (endt) at (12,0);  %draw the line \draw[-, very thick] (A) -- (C); \fill (A) circle (3pt) node[left=2pt] {A};  \fill (B) circle (3pt)  node[above=2pt] {B};  \fill (C) circle (3pt) node[right=2pt] {C};  \shade[ball color=blue!10!white,opacity=0.20] (A) circle (4cm); \draw[dashed] (2,4) arc (90:-90:2cm and 4cm); \draw[thick] (2,4) arc (90:270:2cm and 4cm); \draw[thick] (A) circle (4cm); %smaller circle \shade[ball color=blue!20!white,opacity=0.20] (A) circle (3cm);  \draw[thick] (A) circle (3cm); \draw[dashed] (2,3) arc (90:-90:1.5cm and 3cm);  \draw[thick] (2,3) arc (90:270:1.5cm and 3cm); \end{tikzpicture} \caption{Visualization of spatial distribution of A, C, and \B.} \end{figure} \end{document}

Can anybody tell me how to draw up a sphere inside a sphere?   What I mean is something like this:    Also where it says the different horizons be able to insert a mathematical expression? Also not in these poor colours something that looks kind of professional.  Any help much appreciated.


I have a following bash prompt string:  root@LAB-VM-host:~# echo "$PS1" ${debian_chroot:+($debian_chroot)}\u@\h:\w\$  root@LAB-VM-host:~# hostname  LAB-VM-host root@LAB-VM-host:~#    Now if I change the hostname from LAB-VM-host to VM-host with hostname command, the prompt string for this bash session does not change:  root@LAB-VM-host:~# hostname VM-host root@LAB-VM-host:~#    Is there a way to update hostname part of bash prompt string for current bash session or does it apply only for new bash sessions?

I changed my hostname by editing /etc/hostname and can see the new hostname using the hostname and hostname -F commands.  But the shell prompt is still showing the old hostname.  This is Ubuntu 11.0.4 by the way. The prompt is set in my .bashrc which I have not edited. Logging out and even rebooting has no effect.  Relevant section of the standard Ubuntu .bashrc:  if [ "$color_prompt" = yes ]; then     PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' else     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi   ($debian_chroot is unset as I login...)  I guess the hostname is picked up by the special character \h.  Here's the PS1 setting as reported in the shell:  PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '   And here is what PS1 shows:  username@oldhostname:~$    I repeated the process using the exact command in Warren's answer. It turns out that the hostname works until reboot but then it is lost, even though /etc/hostname contains the new hostname.


I was a windows 8.1 user, when i was installing Ubuntu 16.04 on my system there was four partition and for the installation purpose i select installation type "Erase disk and install Ubuntu" and my all partition are gone and its turn into one partition. Is there any possibility to recover my old partition or recover old data. please help.

I am on Ubuntu 12.04 64-bits  I accidentally deleted a NTFS 255 GB partition using Gparted, and yes it contains LOTS of important data.  Upon realizing the deletion I haven't yet created any file-system on it. So it still shows Unallocated.    I tried Testdisk , but it shows entire partitions created from the beginning.  This sdb is my secondary drive with Xubuntu and Kubuntu on it. And that 255 GB NTFS  partition was cross platform storage drive.  I am currently in sda with Ubuntu and Win7 in dual boot, which enables me to use it as Safe recovery option rather then Live USB drive.   First ,  should i allocate it to ? file-System for better recovery .  Second , i really need to recover data from this drive so please give me possible  suggestions and proven methods of data recovery.  Third ,does Testdisk requires deleted partition to be allocated for its recovery .  I am currently trying the answer seen here  with Testdisk scanning for partition second time, hoping to recover it.   It looks a duplicate but i can't confirm if the OP got it right. Since my first doubt is to allocate it or not.  If any clarification required please do comment ,i will add it.  Edit: TestDisk deeper search results.      The following partitions can't be recovered:          Partition               Start        End    Size in sectors     >  HPFS - NTFS          22241 107 11 55592   3 27  535777280        FAT32 LBA            274460 158 19 460576 228 16 2989957948  NTFS, 274 GB / 255 GiB & for FAT32 LBA 1530 GB / 1425 GiB


$ a='"apple","ball","cat"' $ a='['$a $ echo $a ["apple","ball","cat" $ a=$a']' $ echo $a b   I'm stumped hard by the result b while I expect to see ["apple,"ball","cat"]. What am I missing here?  This is from bash shell on Mac. Also see it on CentOS 7, while not on Fedora. Can someone please explain?

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


One can refer to an American Indian as a Native American, but I cannot come up with an unambiguous term for an Indian from the Indian subcontinent. How can I refer to someone who is from the country of India, preferably without having to say "from the country of India"?  Ambiguous example:       My roommate is Indian.

My guess would be Indian, but that sounds like a guy with a feather on his head who hunts buffalo.  Is there a better name?


I'm studying this book:  and I'm just starting to chapter on ordinal numbers (still have no idea what they are), and the introduction goes: "Cantor considered the sequence of sets obtained by starting with $A$, finding its derived set $A'$, then the derived set $A''$ of $A'$, and so on. Cantor wished to continue his construction in the case when none of $A', A'', A'''$, etc., was empty. He ultimately hit on the idea of constructing a set $A^\infty$ as the intersection of $A', A'', A''',...$. He then made repeated use of the derived set construction on this set to give $A^{\infty+1}, A^{\infty+2}, ...$ and in the case when non of these was empty, he again took their intersection, to give $A^{\infty+\infty}$ and so on." I've never studied topology and I got pretty lost on this, I just googled what a derived set is and a looked for a couple of examples, the only example I found for a set $A$ to have infinite non empty derived sets $A', A'',...$ etc was the set $(0, 1),$ whose derived set is $[0, 1]$, whose derived set is $[0, 1]$ etc. The intersection of all this $[0, 1], [0, 1]', [0, 1]''$ will always be non empty, so i can't really see what Cantor was trying to achieve. Could you guys please give me a simple example (since I'm just starting to study math seriously in general) of a set $A$ whose derived set $A'$ is different than $A$ and whose derived set $A''$ is different than $A'$ etc infinite times even just many times so I can at least see intuitively what Cantor was trying to do? Thank you!

I want to solve the following exercise 1.3.C. from page 27 of R. Engelking: General Topology.  For every positive integer $n$ the $n$-th derived set $A^{(n)}$ of a subset $A$ of a topological space $X$ is defined inductively by the formulas: $$  A^{(1)} = A^d \quad \textrm{and} \quad A^{(n)} = (A^{(n-1)})^d. $$ (a) Give an example of a set of real numbers that has three consecutive derived sets distinct from each other.  (b) Give an example of a set of real numbers that has infinitely many derived sets distinct from each other.   The definition is $$   A^d := \{ x \in X \mid x \in \overline{A \setminus \{ x \}} \}. $$ I am confused, cause the set $A^d$ ist closed, i.e. $\overline{A^d} = A^d$. And closed means it already contains all its limit points, so how can than $(A^d)^d$ be different from $A^d$?


looking for explanation on similar lines

I'm fairly new to Bayesian statistics and I came across a corrected correlation measure, , that uses the Dirichlet process in the backend of it's algorithm.  I have been trying to go through the algorithm step-by-step to really understand what is happening but I am not sure exactly what the alpha vector parameter does in a Dirichlet distribution and how it normalizes the alpha vector parameter?   The implementation is in Python using NumPy:   The docs say:     alpha : array        Parameter of the distribution (k dimension for sample of        dimension k).   My questions:   How do the alphas affect the distribution?; How are the alphas being normalized?; and  What happens when the alphas are not integers?   import numpy as np import pandas as pd import matplotlib.pyplot as plt  # Reproducibility np.random.seed(0)  # Integer values for alphas alphas = np.arange(10) # array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])  # Dirichlet Distribution dd = np.random.dirichlet(alphas)  # array([ 0.        ,  0.0175113 ,  0.00224837,  0.1041491 ,  0.1264133 , #         0.06936311,  0.13086698,  0.15698674,  0.13608845,  0.25637266])  # Plot ax = pd.Series(dd).plot() ax.set_xlabel("alpha") ax.set_ylabel("Dirichlet Draw")


Lets say i have a machine with a few virtual machines on them, how would i forward ssh connections to those virtual machines without giving access to the host machine? Is it possible to do so with only a single port exposed to the outside world? This would also apply to a machine, with some other machines behind it.  I would like to do the redirect based on which keys are used, or perhaps based on a flag set in the ssh command on the client.

I have a ubuntu server running some LXD containers - none of these have public IP's, but are exposed to the web by a reverse proxy for HTTP.   These containers belong to different individuals and I would like to be able to allow them to login to the container via SSH. I don't want to allow users to be able to try passwords on containers other than their own one, And I don't want users to have to configure the SSH tunnel / gateway themselves.   So I'm wonderig if there's a way that I can set up an SSH gateway such that, based on the users key or username, the proxying is automated for them through the gateway.  This old article -  - seems to imply that something like this is possible: "The SSH gateway works by forcing a ssh to another host as a particular username, based on the ssh key."   However I can't find any other reading about it ... Is this something that can be done?


How can I use a command block to turn everyone (except myself) into adventure mode (gamemode 2)? Any command which does this would be awesome.

I'm trying to make a minecraft map and to prevent cheating i want to run a command on a clock that sets everyone in creative mode except myself back to adventure mode.


Hello I am stuck with my code, I was trying different solution and its doesn't work...  Here my html code :  <input type="date" name="tgl" value=""> <input onchange="hitung()" type="number" name="dewasa" value="0"> <input onchange="hitung()" type="number" name="anak" value="0">   Hotel

   I want get value from option selected realtime after it's changed.. I tried using document.getElementById but it is not giving me any result, I don't know why. May be because the select option showed from the function window.addEventListener('load') function() { .... }  note : Only work for input name dewasa & anak Value from Hotel select option give no result  Here my jquery code :  jQuery(function ($){      window.addEventListener('load',          function() {             var htl = '<?php              $hotel = get_field('list_hotel');             $hotels = explode(PHP_EOL, $hotel);             echo '<select onchange="hitung()" id="hotel" name="hotel" class="wpcf7-form-control wpcf7-select" aria-invalid="false">';             echo '<option value="0">Tanpa Hotel</option>';             foreach ( $hotels as $hs ) {                 $h = explode('@', $hs);                 echo '<option value="'.$h[2].'">Hotel '.$h[0].' - Bintang '.$h[1].'</option>';             }             echo '</select>';?>';              document.getElementById("lh").innerHTML = htl;         }, true     );       function hitung() {         var x = parseInt(document.getElementById("dws").value);         var y = parseInt(document.getElementById("ank").value);         var h = parseInt(document.getElementById("hotel").value);         var v = '';         var r = 'Rp ';          var dewasa = "<?php echo get_field('harga_paket_dewasa')?>";         var anak = "<?php echo get_field('harga_paket_anak')?>";          v = x*parseInt(dewasa) + y*parseInt(anak) + parseInt(h);         //v = x*parseInt(dewasa) + y*parseInt(anak);          document.getElementById("hasil").innerHTML = v;     }     $("#dws").on("change", hitung);     $("#ank").on("change", hitung);     $("#hotel").on("change", hitung); });

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


I'm currently trying to run a upgrade or dist upgrade on my ubuntu 14.04.  The problem is it keeps trying to install the Java7 installer and     Here is the error output  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ... Downloading Oracle Java 7... --2017-06-13 13:10:12--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz Resolving download.oracle.com (download.oracle.com)... 184.51.112.98, 184.51.112.96 Connecting to download.oracle.com (download.oracle.com)|184.51.112.98|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following] --2017-06-13 13:10:12--  https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.84.148.179, 2600:1400:4:18f::2d3e, 2600:1400:4:19c::2d3e Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.84.148.179|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1497373933_4797392087922e2a3b76cad4594d357c [following] --2017-06-13 13:10:13--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1497373933_4797392087922e2a3b76cad4594d357c Connecting to download.oracle.com (download.oracle.com)|184.51.112.98|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2017-06-13 13:10:15 ERROR 404: Not Found.  download failed Oracle JDK 7 is NOT installed. dpkg: error processing package oracle-java7-installer (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  oracle-java7-installer E: Sub-process /usr/bin/dpkg returned an error code (1)

I was setting up up android-studio referring to . While installing oracle-java7-installer, this error is displayed:  sudo apt-get install oracle-java7-installer [sudo] password for cyan:  Reading package lists... Done Building dependency tree        Reading state information... Done oracle-java7-installer is already the newest version (7u80+7u60arm-0~webupd8~1). The following package was automatically installed and is no longer required:   snap-confine Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ... Downloading Oracle Java 7... --2017-11-27 08:40:47--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz Resolving download.oracle.com (download.oracle.com)... 223.223.158.138, 223.223.158.136 Connecting to download.oracle.com (download.oracle.com)|223.223.158.138|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following] --2017-11-27 08:40:47--  https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.58.58.93, 2600:140f:7:18e::2d3e, 2600:140f:7:18d::2d3e Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.58.58.93|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1511752368_824528560c20825821ecbcac8f4e9be9 [following] --2017-11-27 08:40:48--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1511752368_824528560c20825821ecbcac8f4e9be9 Connecting to download.oracle.com (download.oracle.com)|223.223.158.138|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2017-11-27 08:40:50 ERROR 404: Not Found.  download failed Oracle JDK 7 is NOT installed. dpkg: error processing package oracle-java7-installer (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  oracle-java7-installer E: Sub-process /usr/bin/dpkg returned an error code (1)   How do I fix this error? I did a fresh installation of Ubuntu 16.04.


I am trying to write some code using Eigen but I am having this issue while trying to compile with g++. I have the following template definition: class.h template<int Nr, int Nz> Eigen::Matrix<std::complex<double>, Nr, Nz> efield(Eigen::Matrix<double, Nr, Nz>& rs, Eigen::Matrix<double, Nr, Nz>& zs, double t);  class.cpp Eigen::Matrix<std::complex<double>, Nr, Nz> GaussianBeam::efield(Eigen::Matrix<double, Nr, Nz>& rs, Eigen::Matrix<double, Nr, Nz>& zs, double t) { //Iterate through the rs, and zs to calculate the field in all combinations of r and z.     Eigen::Matrix<std::complex<double>, Nr, Nz> output ;     for (size_t i = 0, size = rs.size(); i < size; i++)     {         for (size_t j = 0, sizez = zs.size(); j < sizez; j++) {             double temporary_r = (*(rs.data() + i));             double temporary_z = (*(zs.data() + i));              output(i, j) = this->efield(temporary_r, temporary_z, t);          }     }     return output; }  And then I call this function from main.cpp: const int Nx = 3; const int Ny = 3;      //creates the "meshgrid" Eigen::Matrix<double, Nx, Ny> X = Eigen::RowVectorXd::LinSpaced(Nx, -5e-4,5e-4).replicate(Ny,1); Eigen::Matrix<double, Nx, Ny> Y = Eigen::VectorXd::LinSpaced(Ny, -5e-3, 5e-3).replicate(1, Nx);  std::cout << "res : \n" << gauss1.efield<3, 3>(X, Y, 0) << "\n";  I am getting the following error on the call to gauss1.efield<3,3> after trying to compile by GCC 5.4.0:  undefined reference to `Eigen::Matrixstd::complex<double, 3, 3, ((Eigen::StorageOptions)0)|((((3)==(1))&&((3)!=(1)))?((Eigen::StorageOptions)1) : ((((3)==(1))&&((3)!=(1)))?((Eigen::StorageOptions)0) : ((Eigen::StorageOptions)0))), 3, 3> Optics::GaussianBeam::efield<3, 3>(Eigen::Matrix<double, 3, 3, ((Eigen::StorageOptions)0)|((((3)==(1))&&((3)!=(1)))?((Eigen::StorageOptions)1) : ((((3)==(1))&&((3)!=(1)))?((Eigen::StorageOptions)0) : ((Eigen::StorageOptions)0))), 3, 3>&, Eigen::Matrix<double, 3, 3, ((Eigen::StorageOptions)0)|((((3)==(1))&&((3)!=(1)))?((Eigen::StorageOptions)1) : ((((3)==(1))&&((3)!=(1)))?((Eigen::StorageOptions)0) : ((Eigen::StorageOptions)0))), 3, 3>&, double)'  The weird thing is that I would have expected perhaps an error on class.cpp but not on main.cpp since this is just a regular call to the function. I found this error that looks similar to mine, but with an std::vector instead of an std::complex: , I don't know if it could help. Any ideas why this might be happening? Btw, I made sure that #include <complex> #include <Eigen/Dense>  are in every relevant file. PS: I am using C++14. Thank you!

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I have two tables TableA, TableB as follows.  Table "db3004db.tableb"   Column  |  Type   | Collation | Nullable | Default  ---------+---------+-----------+----------+---------  empid   | integer |           | not null |   salaryb | integer |           | not null |   Indexes:     "tableb_pk" PRIMARY KEY, btree (empid)   Table "db3004db.tablea"   Column |  Type   | Collation | Nullable | Default  --------+---------+-----------+----------+---------  empid  | integer |           | not null |   salary | integer |           | not null |   Indexes:     "tablea_pk" PRIMARY KEY, btree (empid)   Before Update:  select * from tableA;   empid | salary  -------+--------      1 |   1004      2 |   2007  select * from tableB;   empid | salaryb  -------+---------      1 |       0      2 |       0   Expected Update Query:  set tableB.salary=tableA.salary%1000,      tableA.salary= tableA.salary/1000  where (tableA.pk = tableB.pk)   After update:  select * from tableA;   empid | salary  -------+--------      1 |   1      2 |   2  select * from tableB;   empid | salaryb  -------+---------      1 |       4      2 |       7   I'm interested in doing this update in Postgres (with single update statement)? If possible , is this query compatible with SQL standard?

In MySQL, I can do a query like this  UPDATE      prd_sectionshapename  se inner join      prd_shape s ON     s.id = se.shape_id SET    se.company_shape_name = 'ABC',    s.name_en = 'Another name' WHERE s.serial_number = '1234ST';   In Postgres, I need to split up into 2 queries  UPDATE prd_shape AS s SET name_en = 'Another name' WHERE s.serial_number = '1234ST';   UPDATE prd_sectionshapename AS se SET company_shape_name = 'ABC' FROM prd_shape s WHERE se.shape_id = s.id and s.serial_number = '1234ST';   My question is it possible to do it in 1 query just like MySQL?  Note that other postgres update join answers I found on the internet typically show that the update effect happens only on a single table even though a JOIN is used.   My purpose here is to update multiple tables in one query. Not just one table.


M compact. $(x_n)$ converges if and only if $(x_n)$ has only one closure point. Show, with one example, that the compacity is necessary.  My attempt:  1) Of course if $(x_n)$ converges, $(x_n)$ has only one closure point, because every subsequence of $(x_n)$ converges to the same point as $(x_n)$.  2) Given a sequence $(x_n)$ such that $(x_n)$ has only one closure point, suppose that that $(x_n)$ doesn't converges. Then, we have two options:   There are $(x_{n_j})$ and $(x_{n_i})$ subsequences of $(x_n)$ such that $(x_{n_j})$ converges to $a$, $(x_{n_i})$ converges to $b$, $a \neq b$. Absurd, because then $a$ and $b$ are closure points. There is a subsequence $(x_{n_j})$ such that $\lim_{j \rightarrow \infty} x_{n_j} = \infty$. Absurd, because since M is compact, M is limitated.   3) Example: $(x_n) = (1, 1, 2, 1, 3, 1, 4, 1, 5, 1,...)$. Then 1 is the only closure point, but $(x_n)$ does not converge.   I am not sure that $2)$ is correct and I also think there is an easier way to do it. Can someone help me? Thanks!

Let $(x_i) _{i \in I}$ be a net in a compact Hausdorff space X, with the property that every convergent subnet has the same limit $x$. Does this imply that $(x_i) _{i \in I}$ converges?  If I try to proceed by contradiction, I do not how to rule out the possibility of having subnets that do not converge at all. (Of course, by compactness each such subnet should have at least a subnet convergent to $x$, but this does not help me.)  (If it helps, my compact space is in fact a weakly-compact subset in a locally-convex linear topological space space, obtained with Alaoglu's theorem.)


I'm working on making my own neural network using the NEAT algorithm. I have programmed the algorithm from scratch because I can't seem to get any of the libraries online working, but I'm 90% sure the actual algorithm for genetic breeding is working.  My issue is the creating of a fitness function because none of the ones I have tried to use seemed to have worked. All I'm trying to make is a simple XOR gate with two inputs and one output. I have tried something as basic as testing all the possible inputs ($[0,0], [0,1],$ etc.) and determine how close they are to the resultant by using a function similar to $(x^2-1)/(x^2+1)$, and then for each one of the different inputs add the result of the function to the fitness. That didn't seem to work well.   I can't seem to find any information online on the best methods for creating a fitness function, so I wasn't sure if there is some sort of guideline/equation to follow. Any information will help. Thank you.

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


I have a function to insert an element to a hash table like this in my program:  void insert(int key,int data) {     struct DataItem *newdata = (struct DataItem*) malloc(sizeof(struct DataItem));     int  hashIndex;      newdata->key = key;     newdata->data = data;      hashIndex = hashCode(key);      while(hashArray[hashIndex] != NULL && hashArray[hashIndex]->key != -1)     {         ++hashIndex;         hashIndex %= MAX_SIZE;     }         hashArray[hashIndex] = newdata; }   This works without any problem. However, when I change the position of the condition in while loop to this:  while(hashArray[hashIndex]->key != -1 && hashArray[hashIndex] != NULL )   There ís an "Segmentation Fault" error. And the program pointer stops at the while loop when I call the insert function.  I'm wondering what is the problem?

Does the ANSI standard mandate the logical operators to be short-circuited, in either C or C++?  I'm confused for I recall the K&R book saying your code shouldn't depend on these operations being short circuited, for they may not. Could someone please point out where in the standard it's said logic ops are always short-circuited? I'm mostly interested on C++, an answer also for C would be great.  I also remember reading (can't remember where) that evaluation order isn't strictly defined, so your code shouldn't depend or assume functions within an expression would be executed in a specific order: by the end of a statement all referenced functions will have been called, but the compiler has freedom in selecting the most efficient order.  Does the standard indicate the evaluation order of this expression?  if( functionA() && functionB() && functionC() ) cout<<"Hello world";


Has any member here performed a software downgrade from the pre-installed Lion 10.7.2 to Snow leopard 10.6.8 on any late-2011 MacBook Pro (any size) and if it was successful or failed and what you found? Thank you.

I want to buy a new MacBook Pro, from Apple. However I want to run Snow Leopard instead of Lion.  I did some Google searches and found a few success stories of people who got SL to run on their early-2011 MBPs. I didn't find much of any experiences of people doing the same on a late-2011 MBP though, so I'm wondering (and really hoping!) if it's possible?


Let's say I have sample of the size 800.000. All the test says it's normally distributed, and a fitted distribution looks very nice on the data. I take a subsample of it (like 10.000 records). Can I say they are normally distributed too? My intuition says they are, since the subsample is infered from a normal distribution, too. I take subsamples a lot of times, so I would not want to do the test every time. Thank you in advance!

I am stuck with a very simple question, but I don't really understand sampling, so please help me.  Assume that I perform Bernoulli sampling with parameter $q$ on data D, and obtain sample S1. Then on S1, I perform another Bernoulli sampling with parameter $q'$, and obtain result sample S2. Is the resulting sample S2 a random sample of the original data D?


Prove: $n\in\mathbb{N}$ is not divisible by $2^n-1$ if $n>1$  Using induction:  For $n=2\Rightarrow 2$ is not divisible by $3$  For $n=k\Rightarrow k$ is not divisible by $2^k-1$  For $n=k+1\Rightarrow k+1$ is not divisible by $2^{k+1}-1$  How to prove this by induction?

Clearly an even number $n$ cannot divide $2^{n}-1$, but about odd ones ? If $n$ is an odd prime this cannot happen neither since for an odd prime $p$ we have $2^p\equiv 2\pmod p$ and so $p$ cannot divide $2^p-1$ but what about the general case ($i.e~n$ an odd number larger than 1) ?


I have forgotten my Windows 10 local account password. But I still have access to my PC, as I have set up a "pin". Now I want to change to an online account. How can I do that without knowing my local password?  EDIT- creating new account and deleting previous one works but is there a way I can transfer all my settings to new account before deleting the existing account so both accounts are exactly the same?

I got a brand new Windows 7 machine, installed the operating system, created one account and forgot its password. What can I do?  There is no external CD, the operating system is loaded from somewhere inside the machine.  I already tried to remember passwords and tried all candidates with all possible combinations of caps lock, num lock etc.


Consider the following 2 sentences:-   "Now the application is working fine". "The application is working fine now".   Which one is grammatically correct and why?

It is time now   or      It is now time   Which of these expressions is grammatically correct?


I am still new to Tikz, and wondering how to make the diagram below using Tikz. Does anyone have any advice or know how to do this?

I know that it can be done with graphics packages like TikZ, but it seems to be a bit of an overkill. And for those not already familiar with the TikZ system, learning it can be a bit of a barrier. So my question is     Assuming the advanced graphics capabilities are not necessary, and I just need a bare-bones flow chart (which should be implementable just using the picture environment), is there a LaTeX package for simply making a flow chart?


I'd like to set every screenshot name manually and choose the place to save it. The prompt was showing in Ubuntu 16.04 but is not showing in 18.04. There is no option to enable that prompt in:    gsettings list-keys org.gnome.gnome-screenshot

I take screenshots a lot. I usually take screenshot of an area, I then recheck if I have the desired area and then copy it to clipboard.  I want to change this behaviour so that immediately upon  pressing Shift+PrntScr the screen capture application allows me to select an area, and immediately afterwards it provides me with the option to save to a particular location or clipboard.  I want Shift+PrntScr to bring up a pop-up screen like this:


How do I make an algebraic expression that is equivalent to this type of trig function:   cos(arcsin x)  The answer is: sqr(1 - x^2)  No clue how to get there. Teacher didn't explain very well.

How does that bit work?  How is  $$\cos(\arcsin(x)) = \sin(\arccos(x)) = \sqrt{1 - x^2}$$


What should I say and why?  1) Why is not this tree long?  2) Why is this tree not long?  3) Why this tree is not long? (I almost exclude this possibility)

I'm a non-native speaker completely stuck trying to formulate a negative question. Full disclosure: I'd like to use it as a title for a university paper and I could not find any help around.  This is the question/title:     Why did the Industrial Revolution did not occur in China during the Ming/Qing period?   I highlighted the sources of my doubts.  In the title I'd like to ask why the Industrial Revolution (which happened in Britain) did not happen (during the same period) in China.  Should I rather say     Why did the Industrial Revolution not occur in China during the Ming/Qing period?   Thank you in advance  Edit: maybe this question should belong to "english language learners"


How should I refer to one who has been challenged?  One who offers a challenge is a "challenger," but what would be the appropriate term for the person who receives the challenge?

The words "challenge" and "challenger" are well-known, but is there such a term as "challengee" - as I read somewhere? In other words, what would be an appropriate term to describe the person challenged, for instance, to play a challenge match? Unsure whether to ask for the "antonym" of challenger.


I have been trying to sort the map in descending order of values but my existing code is sorting in descending order of keys. how do I sort in descending order of values? My code:  System.out.println("Unsorted Map:" +merger); Map<Integer, Double> Sortedmerger = SortByValue(merger);  System.out.println("Sorted Map: "+ Sortedmerger);  public static TreeMap<Integer, Double> SortByValue  (Map<Integer, Double> map) { ValueComparator vc =  new ValueComparator(map); TreeMap<Integer, Double> sortedMap = new TreeMap<Integer, Double>(Collections.reverseOrder());         sortedMap.putAll(map);         return sortedMap;     }     class ValueComparator implements Comparator<Double> {      Map<Integer, Double> map;      public ValueComparator(Map<Integer, Double> base) {         this.map = base;     }      public int compare(Double a, Double b) {         if (map.get(a) >= map.get(b)) {             return -1;         } else {             return 1;         } // returning 0 would merge keys      } }   My output:  Unsorted Map:{1=0.53, 2=0.48, 23=0.54, 10=0.47} Sorted Map: {23=0.54, 10=0.47, 2=0.48, 1=0.53}

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


Let $E$ be a nonempty open subset of $\Bbb R$. There is a collection $A$ of subsets of $\Bbb R$ satisfying the following:  $(i)$ Each element of $A$ is an open interval (possibly infinite) and any two distinct members of $A$ are disjoint; $(ii)$ $A$ is at most countable; $(iii)$ $E =\bigcup\limits_{G\in A}G$.   Prove that ”Any open subset of $\Bbb R$ is an at most countable union of pairwise disjoint open intervals”.   I don't know any structure theorems. I only have done a course on real analysis. Which dealt with compact sets and all.

We have the classic result that an open subset of $\mathbb{R}$ is an at-most-countable union of disjoint open intervals.  In trying to prove this, I found the following line of reasoning, and I would like to know if its correct, because it's quite different from the other proofs I have read.    Let S be an open subset of R.  Thus for every $a$ in $S$, $a$ is contained in some open ball $B$ which is contained in $S$.  In particular $a$ is contained in an open interval which is contained in $S$.  For each $a$, let's associate the maximal such interval $I_a=(\alpha, \beta)$ where $\alpha$ and $\beta$ live in $\mathbb{R} \bigcup \{\pm\infty\}$  $\alpha=\inf\{y: (y,a] \subset S\}$  $\beta=\sup\{y: [a,y) \subset S\}$  Now we have that $S$ is the union of $I_a$ over all $a$ in S. Furthermore if $I_{a_1}$ and $I_{a_2}$ are distinct, then they must be disjoint (otherwise we would contradict the maximality of at least one of them).   Hence $S$ is a disjoint union of open intervals.   Finally, each such interval contains a rational number which is not contained in any other such interval; if there were uncountably many intervals in the union, there would be uncountably many rationals, a contradiction.  Thus $S$ is an at-most-countable union of disjoint open intervals.


I have a question. How can I install a package written by myself with MikTeX?  I first made a .txt file than I wrote my package (code) in there. Then I renamed the .txt file to .sty . What should I do now?  Thank you for your answeres.

I know how to define a package or a class, but how do I make it available (to myself) at all times?  Say I have the package file commonstuff.sty (or myprettyclass.cls), that I want to be able to include in any .tex file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?  Note: I know I can just place it in the same folder as the .tex file, but that's not what I'm after here. I'm looking for a way to "install" the package centrally on my computer.


Has anybody converted from Nikon to Canon and continued to use their Nikon Lenses with adapters, and how did that workout - as far as focus, aperture, ISO, and fitment.  My wife has many Canon Lenses and I have a D200 so we have 2 times the lenses in most cases with a few Nikon DX (APS-C sensor dedicated) lenses - without considering the full frame scenario and lens compatibility.  Considering switching but losses seem certain if I have to sell all my Nikon lenses, was wondering if there would be a best type lens to keep - Auto Focus and  Aperture.

Can we use the lenses from, say a Canon EOS 550D kit (Canon EF-S 18-55mm) with a Nikon DSLR D5000 for example) ? Also, is the reverse possible ?  I'm looking at interchangeability between recent DSLR lenses only, and not with older lenses. Also, for "average" lenses, and not ultra wide/ultra zoom.  The reason for this question is that I'm trying to decide between a Nikon D5000 and a Canon EOS 500D. I like the Nikon better, but Canon is more popular here amongst people I can interchange lenses with :)


I would like to install Ubuntu 14.04 but i saw on the file i downloaded that is for AMD 64 bit processors. My Pc-Desktop has an Intel Core i7 64bit proseccor and i was wondering if is it ok for my PC this Ubuntu amd file of installation.

My processor is an Intel Core 2 Duo P8600 (2.40GHz). As far as I know that's a 64-bit processor - I'm a bit confused as the architecture is called AMD 64, is this a generic name given to 64-bit architectures? I've heard of x64 but can't see a release labelled with this.


I'm working on creating a looping rotation and the tutorial I was following had me use the graph editor at one point. I was really confused by the way that new windows are opened so in my attempts to close it i ended up creating several more. I also elected to hide the header because I thought they might be closed as a result. Long story short, I accidently closed the window I was working on and am left with a graph editor window with no heder and no way to switch back to 3d viewport mode. I can still view my models through the other windows like sculpt and model but I can't work on the animation. Is there anything I can do???

I accidentally opened too many menus (or windows) and I want to reset them to default.  It is really annoying, and effecting my animation.  Thanks


Before the ambulance arrived, the injured man died .   No need for past perfect here.     As the ambulance approached the scene, the driver noticed that no one at all was attending to the injured man. This was because, before the ambulance arrived, the injured man had died. No one was looking after the injured man, because he had died.   Past perfect is needed as explanation but the sequence of time without it would be crystal clear. Would it be possible to use past simple?     My dad was furious because I scratched his car.   So why not past perfect for scratched as it is an explaination of why my dad is furious?

I have never had this problem before. But after seeing some questions posted on ELU, I started to doubt. I have been through links1, pages of grammar books2, a lot of questions3 posted here and ELU. I now still can't seem to understand how the past perfect is exactly used. The references sometimes even contradict each other.  What I had understood so far was      The past perfect is not necessary if we are not 'going back' to the earlier past, and simply moving from one event to another.   but I then saw a lot of other 'rules' including      If the sequence is clear, the past perfect is not needed.   which is slightly different, less 'narrow' and can be applied in more situations than the first ruleA, and      The past perfect is optional only when talking about an action at a specific time.   This is confusing. Can anyone here clarify things out please?    A For example, for  Doing the survey [completed] -> Showing the result      We showed the result of the survey we did.      If the second rule is applied, the sentence above is fine (the sequence is clear), but not if the first rule since we are not moving from any event to the next and possibly even going back.    1  and   2 Practical English Usage (2005) by Michael Swan, Collins Cobuild Student's Grammar (1991). Upper-Intermediate Cutting Edge.  3 including , , ,  etc.


So I have just started studying Quantum mechanics and like a lot, and struggling with the concepts, so it’s really difficult (if possible) to relate to reality.  Nevertheless, some intuition will still help for approaching the subject, and they include:  What is really the wave function? I know when you square is the probability function, but by itself, does it mean anything physically?  And also does a wavefunction exist in reality if it is not normalised, is there anything else other than so the area is one (when the wavefuncion is normalised)

In my textbook it is given that      'The wave function describes the position and state of the electron and its square gives the probability density of electrons.'    Can someone give me a very simple example of a wave function with explanation?  (Note: This question is not a duplicate. I have searched for other questions of this type but the answers were overwhelmingly difficult to understand.)


I have five user variables with different names. I'd like them to end up in an array, and am wondering if I can do the assignment to multiple array indices in a single line. Currently, if I do this  var users = {user5k, user10k, user15k, user20k, user25k};   I can't index it later (says users[0] is undefined). So I want the indices built in to the assignment. Something along these lines:  var users = {}; users[0:4] = {user5k, user10k, user15k, user20k, user25k};   This doesn't seem possible in JavaScript, meaning I have to do this:  var users = {}; users[0] = user5k; users[1] = user10; // ... et cetera   Is there a way to accomplish the first solution?

What is the difference between Object Literals and Array Literals in JavaScript? I know it has something to do with the length method but i don't fully understand it.


the faces are affected by the light so sometimes they're very bright or very dark. I tried deleting and adding the faces but they change slightly, and not all of them change.

While rendering a mesh with smooth shading on, I get a dark region/shadow on certain faces. The effect is more evident when smooth shading is applied to a mesh containing ngons, with the ngons turning black when rendered.   The blackening effect is visible in the viewport too.  How can I solve this problem?


I want to know if this is an adequate proof.  Proof: Let $X$ be a separable metric space and let $A$ be a subspace of $X$. Since $X$ is separable, it contains a countable dense subset $D$. So $\forall$ neighborhood $U$ of $x$ in $X$, $\exists$ a $d \in D: d\in U$.     Let $x\in A\implies U\cap A$ is a neighborhood of $x$ relative to $A$. Which implies that $\exists d\in D:d\in U\cap A$.  Let $D^{*}$ represent all elements of $D$ which are also elements of $U\cap A$.  This implies $D^{*}$ is dense in $A\implies A$ is separable.

The problem statement, all variables and given/known data: Show that if $X$ is a subset of $M$ and $(M,d)$ is separable, then $(X,d)$ is separable. [This may be a little bit trickier than it looks - $E$ may be a countable dense subset of $M$ with $X\cap E = \varnothing$.]  Definitions Per our book:  A metric space $(M,d)$ is separable if there exists a countable dense $E$ contained in $M$.   $E$ contained in $M$ is dense if $\forall m\in M$, $\forall ε>0\in\mathbb R$, $\exists e\in E$ s.t. $d(m,e) < ε$   The attempt at a solution  My best attempt was doomed from the start, because I don't quite understand the hint. My thought process went as follows:  Since $X$ is a subset of $M$, $\forall x\in X, x\in M$. Thus, since $E$ is dense in $M$,  $\forall x\in X$, and ε > 0, $\exists e\in E$ st $d(x,e)<ε $.   At this point, I was done, because the set of $e$'s satisfying the above, is a subset of $E$, a countable set. So a subset of a countable set is dense in $X$, and $X$ is separable. This is incorrect, but I cannot see why.  Any help clearing up the confusion would be greatly appreciated. Thanks!  Edit: I wish I could upvote all of you for your help! I really appreciate the speedy replies and attempts to make this information clear to me.


, Stack Exchange use Imgur to handle pictures. If I personally have no problem with Imgur so far, some workplaces can have. Mine for example... Why a company would block it? Imgur is an online image sharing community and can be see as a complete social network like facebook, tumblr or twitter. Also, you can easily find NSFW content on Imgur...  I am not sure what could be a solution. Proxy, VPN, or else can be strictly forbidden. Two ideas:  Use another DNS from Imgur  See with Imgur to use another url. For example, http://i.stack.imgur.com/VB5JX.png could be http://i.stack.progur.com/VB5JX.png or http://i.stack.imgurpro.com/VB5JX.png. This move the problem to the side of Imgur.  Switch from Imgur to another solution  It could be self-hosted or another more "professional" hoster. I am sure that if you come to use Imgur that because they offers a lot of benefits. So not really a solution...  I welcome any other ideas.

Imgur is blocked by two of the private ISPs we use. Is there a workaround without involving tunnelling?  Bear in mind that Filmot (an Imgur mirror) and Flickr are also blocked.


Take, for example, , in which it is not clear what the asker is asking. I had flagged this question as "unclear what you're asking" which was deemed helpful, but apparently no action has been taken on it. Why hasn't the question been placed on hold, or are there close votes on it, but not enough to place it on hold?

I flagged a post and (choose one)   my flag was marked as helpful, yet nothing was done my flag was marked as declined, yet the post was deleted/edited/closed   Why?


Does it affect the main hard drive or runs separately like a virtual machine?

I was wondering what the difference between running and trying Ubuntu and I was also wondering if there was any downfall to running Ubuntu on a USB drive.


I have the list of following objects. Using Stream API, can I get a User with the number of frequency it appeared in the List?  public class User {     string name;     int age; }

I have an ArrayList, a Collection class of Java, as follows:  ArrayList<String> animals = new ArrayList<String>(); animals.add("bat"); animals.add("owl"); animals.add("bat"); animals.add("bat");   As you can see, the animals ArrayList consists of 3 bat elements and one owl element. I was wondering if there is any API in the Collection framework that returns the number of bat occurrences or if there is another way to determine the number of occurrences.  I found that Google's Collection Multiset does have an API that returns the total number of occurrences of an element. But that is compatible only with JDK 1.5. Our product is currently in JDK 1.6, so I cannot use it.


alan@alan-P43G:~$ sudo apt-get install nvidia-340 Reading package lists... Error! E: Read error - read (5: Input/output error) E: Problem opening /var/lib/apt/lists/extras.ubuntu.com_ubuntu_dists_trusty_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.   I have this problem I think the ppa arent installing.  Anyone knows how to fix it?

Everytime I sudo apt-get update it always not complete and will say in the end  E: Read error - read (5: Input/output error) E: The package lists or status file could not be parsed or opened.   Same goes, when I try to install something and do sudo apt-get install <some app>  What should I do ? I admit, that my drive has bad sectors, could that be the reason? Is there anything else I can do?


I cannot install vineyard because I am asked this:  To run a command as administrator (user "root"), use "sudo <command>."   See "man sudo_root" for details.

I have recently joined Ubuntu version 16.04. When i open the terminal it displays this message "To run a command as administrator(user "root"), use sudo command ". Please help me with this problem asap.  It happened to me (@waltinator), too. I did CtrlAltt to open a teminal, and is my wont, did 3 CtrlShiftt to open additional teminal screens. The additional screens got the message:  To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details.   before my .bashrc finished.    I can't find anywhere in my .bashrc or its included files where I attempt to sudo anything (sounds like a Bad Idea) during my login process. I do set up aliases that sudo when evaluated, but not when defining the alias:  $ egrep 'sudo |su ' .bashrc .bash_aliases /etc/profile.d/color_ls.sh etc/bash_path_funcs/*  .bashrc:# makes "sudo" easier: sudo less $LESS files .bash_aliases:alias bigopenfiles="sudo lsof / | awk '{if(\$7 > 1048576) print \$7/1048576 \"MB\" \" \" \$9 }' | sort -n -u"  .bash_aliases:alias deletedfiles="sudo lsof / | egrep 'PID|\(deleted\)'" .bash_aliases:alias bigopenfiles="sudo lsof / | awk '{if(\$7 > 1048576) print \$7/1048576 \"MB\" \" \" \$9 }' | sort -n -u"  .bash_aliases:alias deletedfiles="sudo lsof / | egrep 'PID|\(deleted\)'" .bash_aliases:alias aptfixkey="sudo gpg --keyserver keyserver.ubuntu.com --recv-keys " .bash_aliases:alias susp="sudo -v && sleep 20 && echo 'Zzzzzzzzzzzzzzzzzzzzz' && date && sudo pm-suspend && date && echo 'Awake'" .bash_aliases:alias update='wupdatestatus=99;while [[ $wupdatestatus -ne 0 ]] ; do sudo apt-get update; wupdatestatus=$?;echo "status=$wupdatestatus";if [[ $wupdatestatus -ne 0 ]] ; then date; sleep 300; fi; done' .bash_aliases:alias upgrade='wupgradestatus=99;while [[ $wupgradestatus -ne 0 ]] ; do sudo apt-get upgrade; wupgradestatus=$?;echo "status=$wupgradestatus"; if [[ $wupgradestatus -ne 0 ]] ; then date; sleep 300; fi; done' .bash_aliases:alias upgradedl='wupgradestatus=99;while [[ $wupgradestatus -ne 0 ]] ; do sudo apt-get --download-only upgrade; wupgradestatus=$?;echo "status=$wupgradestatus"; if [[ $wupgradestatus -ne 0 ]] ; then date; sleep 300; fi; done' .bash_aliases:alias dist-upgrade='wupgradestatus=99;while [[ $wupgradestatus -ne 0 ]] ; do sudo apt-get dist-upgrade; wupgradestatus=$?;echo "status=$wupgradestatus"; if [[ $wupgradestatus -ne 0 ]] ; then date; sleep 300; fi; done' .bash_aliases:alias wup='wifi;sudo rmmod rt2800usb;sudo modprobe rt2800usb;nmcli con up id Nick;wifi;ping3 slashdot.org' .bash_aliases:    sudo tail -n 50 $( ls -rt1 /var/log |sed -e 's%^%/var/log/%'| tail -n 6 ) grep: /etc/profile.d/color_ls.sh: No such file or directory   None of the logs help:  $ sudo grep -l sudo /var/log/* /var/log/*/* 2>/dev/null     shows nothing interesting.  How do I track down who/what is trying to sudo when I login?


I have a faulty equipment with OS Linux. I found a spare part, but I need change the it serial number through Linux. I'm trying to change it using the command chmod. But it no working. Information about serial number is available here: cd /proc/board_info/ ls -l -r--r--r--    1 root     root            0 Jan  1 00:03 serial_number Change access for /proc - OK  Before cd /proc  ls -l dr-xr-xr-x    2 root     root            0 Jan  1 00:03 board_info  After  chmod 777 /proc ls -l drwxrwxrwx   31 root     root            0 Jan  1 00:00 proc Change access for /proc/board_info - Negative  Before  cd /proc ls -l dr-xr-xr-x    2 root     root            0 Jan  1 00:03 board_info  After chmod 777 board_info/  ls -l dr-xr-xr-x    2 root     root            0 Jan  1 01:29 board_info OR chmod 777 -R /proc/board_info/ cd /proc ls -l dr-xr-xr-x    2 root     root            0 Jan  1 01:28 board_info

I use Kali Linux and discovered the following "problem":  root@kali:/proc/self# ls -l cmdline -r--r--r-- l root root 0 May 27 13:43 cmdline root@kali:/proc/self# chmod 744 cmdline chmod: changing permissions of `cmdline': Operation not permitted   I am not allowed to change the permissions of that file... but I am root? Why is that? Are there ways to work around this? I allready tried some things like moving the file (what is obviously not possible), change the runlevel etc.


When dealing with complex numbers they can be presented as vectors, at least that is stated in my textbook. And the addition operation defined for complex numbers:  $$z_1 + z_2 = x_1 + x_2 + i(y_1 + y_2)$$  fully corresponds with the rules for vector addition.    But why the multiplication operation does not have a geometric (vector) representation? I wonder, because my textbook states that $\sqrt{i} = e^{\frac{i\pi}{4}}, e^{\frac{i5\pi}{4}}$, that is:    But if I try to multiply $W_1 \times W_2$ I will get a zero vector. And even if $W_1$ and $W_2$ were not collinear I would have get a vector which lies in another plane.  So, could anyone give me an answer about whether I'm correct at all and if I am whether any explanation of this situation exists, or may be I just have to live with it?  Thank you.

I've always been taught that one way to look at complex numbers is as a Cartesian space, where the real part is the $x$ component and the imaginary part is the $y$ component.  In this sense, these complex numbers are like vectors, and they can be added geometrically like normal vectors can.  However, is there a geometric interpretation for the multiplication of two complex numbers?  I tried out two test ones, $3+i$ and $-2+3i$, which multiply to $-9+7i$.  But no geometrical significance seems to be found.  Is there a geometric significance for the multiplication of complex numbers?


I am trying to produce a small letter version of \mathcal{O} which looks the same, just smaller - like "O" and "o". However \mathcal{o} produces a very different symbol. Has anyone an idea how to manage this?

I use the following mystic TeX so as to display the Landau's notations for big and small O.  There is one partial solution to improve the scriptscriptstyle so as to not use a small o : see the secund answer below. The problemen with \smallOBis is the wrong spacing, contrary to \smallO. How can I do this ?  % Sources : %     1) http://forum.mathematex.net/latex-f6/bonnes-commandes-de-base-t12278.html %     2) http://tex.stackexchange.com/questions/30944/mathcalo-and-font-size  \documentclass{article}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}      \usepackage{graphicx}      \newcommand{\bigO}[1]{\ensuremath{\mathop{}\mathopen{}\mathcal{O}\mathopen{}\left(#1\right)}}      \newcommand\smallO[1]{         \mathchoice             {% \displaystyle                 \ensuremath{\mathop{}\mathopen{}{\scriptstyle\mathcal{O}}\mathopen{}\left(#1\right)}             }             {% \textstyle                 \ensuremath{\mathop{}\mathopen{}{\scriptstyle\mathcal{O}}\mathopen{}\left(#1\right)}             }             {% \scriptstyle                 \ensuremath{\mathop{}\mathopen{}{\scriptscriptstyle\mathcal{O}}\mathopen{}\left(#1\right)}             }             {% \scriptscriptstyle                   \ensuremath{\mathop{}\mathopen{}{o}\mathopen{}\left(#1\right)}             }     }      \newcommand\smallOBis[1]{         \mathchoice         {% \displaystyle             \scriptstyle\mathcal{O}\left(#1\right)         }         {% \textstyle         \scriptstyle\mathcal{O}\left(#1\right)         }         {% \scriptstyle         \scriptscriptstyle\mathcal{O}\left(#1\right)         }         {% \scriptscriptstyle         \scalebox{0.8}{$\scriptscriptstyle\mathcal{O}$}\left(#1\right)         }     }   \begin{document}  \[     \renewcommand{\arraystretch}{1.2}%     \begin{array}{llll}          \textbf{Style}            & \verb!\bigO!         & \verb!\smallO!                          & \verb!\smallOBis!         \\ \hline         \verb!\displaystyle!      & \displaystyle      \bigO{\frac{1}{n}}         & \displaystyle      1 + \smallO{\frac{1}{n}} - 2 & \displaystyle      1 + \smallOBis{\frac{1}{n}} - 2         \\         \verb!\textstyle!         & \textstyle         \bigO{\frac{1}{n}}         & \textstyle         1 + \smallO{\frac{1}{n}} - 2 & \textstyle         1 + \smallOBis{\frac{1}{n}} - 2         \\         \verb!\scriptstyle!       & \scriptstyle       \bigO{\frac{1}{n}}         & \scriptstyle       1 + \smallO{\frac{1}{n}} - 2 & \scriptstyle       1 + \smallOBis{\frac{1}{n}} - 2         \\         \verb!\scriptscriptstyle! & \scriptscriptstyle \bigO{\frac{1}{n}}         & \scriptscriptstyle 1 + \smallO{\frac{1}{n}} - 2 & \scriptscriptstyle 1 + \smallOBis{\frac{1}{n}} - 2     \end{array} \]  \end{document}


Good evening.  I have scriptone.py in folderone and scripttwo.py in foldertwo.   How do I tell scriptone.py to run scripttwo.py from foldertwo  If both scriptone.py and scripttwo.py are in the same folder I can run scripttwo.py with  import scripttwo   But I would really like to run scripttwo.py from foldertwo  Thankyou.

How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.


I have a catch-all Apache virtual host in /var/www/.  In it, I have a index.php that handles all the code for pages, and subfolders holding the resources for each site (images, css, etc).  I want a rewrite that uses the images for the appropriate domain in their subfolder if they exists, and hands off to index.php if they don't.  I also don't want to be able to access these subfolders directly.  Example   -> /var/www/sites/example.com/images/fb.png  -> /var/www/index.php (to show 404)  -> /var/www/index.php  It seems simple, but I can't figure out how to block the /sites/.  .htaccess  This works with the exception that it allows http://example.com/sites/example.com/images/fb.png to be accessed directly.  RewriteCond %{REQUEST_URI} !^/sites/ RewriteRule ^(.*)$ sites/%{HTTP_HOST}/$1 [NC]  RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . index.php   Trace  [rewrite:trace3] [/initial] [perdir /var/www/] add path info postfix: /var/www/images -> /var/www/images/fb.png [rewrite:trace3] [/initial] [perdir /var/www/] strip per-dir prefix: /var/www/images/fb.png -> images/fb.png [rewrite:trace3] [/initial] [perdir /var/www/] applying pattern '^(.*)$' to uri 'images/fb.png' [rewrite:trace2] [/initial] [perdir /var/www/] rewrite 'images/fb.png' -> 'sites/example.com/images/fb.png' [rewrite:trace3] [/initial] [perdir /var/www/] add per-dir prefix: sites/example.com/images/fb.png -> /var/www/sites/example.com/images/fb.png [rewrite:trace3] [/initial] [perdir /var/www/] add path info postfix: /var/www/sites/example.com/images/fb.png -> /var/www/sites/example.com/images/fb.png/fb.png [rewrite:trace3] [/initial] [perdir /var/www/] strip per-dir prefix: /var/www/sites/example.com/images/fb.png/fb.png -> sites/example.com/images/fb.png/fb.png [rewrite:trace3] [/initial] [perdir /var/www/] applying pattern '.' to uri 'sites/example.com/images/fb.png/fb.png' [rewrite:trace2] [/initial] [perdir /var/www/] strip document_root prefix: /var/www/sites/example.com/images/fb.png -> /sites/example.com/images/fb.png [rewrite:trace1] [/initial] [perdir /var/www/] internal redirect with /sites/example.com/images/fb.png [INTERNAL REDIRECT] [rewrite:trace3] [/initial/redir#1] [perdir /var/www/] strip per-dir prefix: /var/www/sites/example.com/images/fb.png -> sites/example.com/images/fb.png [rewrite:trace3] [/initial/redir#1] [perdir /var/www/] applying pattern '^(.*)$' to uri 'sites/example.com/images/fb.png' [rewrite:trace3] [/initial/redir#1] [perdir /var/www/] strip per-dir prefix: /var/www/sites/example.com/images/fb.png -> sites/example.com/images/fb.png [rewrite:trace3] [/initial/redir#1] [perdir /var/www/] applying pattern '.' to uri 'sites/example.com/images/fb.png' [rewrite:trace1] [/initial/redir#1] [perdir /var/www/] pass through /var/www/sites/example.com/images/fb.png   I don't get the mod-rewrite and it's looping structure... I would love to get some help with this.  Mod-rewrite always seems to give me trouble.

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


I was notified with a bunch of updates just half an hour ago, mostly security updates in nature. Without thinking much I authenticated the installation. It required me to reboot to apply the changes. After reboot I noticed that the network was not working. Please check the image below.    Also on restarting again I got a error message that Ubuntu has faced an internal error. Since my network is not working I couldn't send the crash report to Ubuntu. Please check the screenshot below.    I'm new to Ubuntu. Just a 1 week old user. I think if I can somehow revert back the Wi-Fi update, i.e., backport it may help to solve the situation. But I don't know how to or if that's the only solution. Please help me out.  Thanks!

While upgrading today, something caused my wireless network manager to disappear. Not even connecting via wired connection.  This error is being shown by files:  **(nm-applet:2716): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files   (nm-applet:2716): nm-applet-WARNING **: Error connecting to ModemManager: Error calling StartServiceByName for org.freedesktop.ModemManager1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Cannot launch daemon, file not found or permissions invalid   (nm-applet:2716): nm-applet-WARNING **: Could not find ShellVersion property on org.gnome.Shell after 5 tries   (nm-applet:2716): nm-applet-WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files    Is there a patch I can download through windows and send through to my ubuntu, or is it a case of having to reload everything? I tried running two versions back but still no internet access.


How can you show that $\binom {n}{7}=\sum_{k=7}^n \binom {k-1} {6}$?   This counts the number of subsets from $\{1,2,3,\dots,n\}$ having size $7$. To me, the summation part counts subsets of size $6$. Can someone please tell me how this is done?  P.S. I don't know how to edit in the proper way.

Let $n$ be a nonnegative integer, and $k$ a positive integer. Could someone explain to me why the identity $$ \sum_{i=0}^n\binom{i+k-1}{k-1}=\binom{n+k}{k} $$ holds?


, how would this interact with an magic item that makes an extra-dimensional space?  What happens if you give your familiar a Bag of Holding, Portable Hole, or similar item, and then you dismiss your familiar to its pocket dimension? In particular, such items when put in each other tend to burst and cause problems. Does that happen in this case as well? If not, why not?

The Find Familiar spell states, in part:  As an action, you can temporarily dismiss your familiar. It disappears into a pocket dimension where it awaits your summons.  The question arising from this is:  Is this pocket dimension different for every familiar in the world? Thus being a personal pocket dimension? If this is true, then it should be able to store items given by its master for safe keeping away from anyone else, as long as these are items that a familiar could carry with it. Can the familiar bring small items with it into the pocket dimension for safe keeping?


Is there a way to retract a comment flag ?  Just did one thinking it was disguised advertising before realizing my mistake.

I misread the content of a comment, and flagged it. Then I realized that the comment wasn't what I had initially thought. Would it be possible to have the ability to retract comment flags, just like we have the ability to retract flags on questions and answers?  I'm aware of this  . But the answer there is just that it's not possible. At the time it was not possible to retract any flags.   This is a separate  which requests that it may become possible to retract comment flags.  If I've realized a flag was a mistake, I think it's unnecessary to keep it in the queue of content the moderators have to look at. Also, it would add an unnecessary "rejected" to the flaggers statistics. Sure, people should think before they flag. But everyone makes mistakes sometimes.


It seems at first glance that it would be an evolutionary disadvantage for a sea creature to have to come up to the surface on a regular basis in order to breathe, so why are there animals (e.g. whales and dolphins) which still need to do so?  If there is some advantage to breathing from the air instead of using gills, why haven't animals such as sharks (or indeed fish in general) evolved to do this instead?

Arthropods have 6 or more limbs and arthropods with 6 limbs appear to move faster than arthropods with 8 limbs so I wonder whether this might have something to do with fast and efficient locomotion. But, this is just a guess. I wonder what the official explanation is, if it exists.


I have a list similar to this: List<Item> myList = new List<myObj>(); myList.Add(new Item({ val = A1, text="A1 - Alpha1"}); myList.Add(new Item({ val = A2, text="A2 - Alpha2"}); myList.Add(new Item({ val = A10, text="A10 - Alpha10"}); myList.Add(new Item({ val = A, text="A - Alpha"});  I'm looking to order this list alphabetically by their values so: "A", "A1", "A2", "A10"  would be the desired order but I end up getting: "A", "A1", "A10", "A2"  when using Linq's .OrderBy(x=>x.val) method. I have tried some answers on Stack Overflow using custom ordering but these answers don't account for a mixture of values where it may or may not contain a numeric entry. Some of these orders are involving conversions to ints which won't satisfy all the values in my list. How would it be possible to obtain the correct ordered result?

Anyone have a good resource or provide a sample of a natural order sort in C# for an FileInfo array?  I am implementing the IComparer interface in my sorts.


#include <stdio.h>  int a = 33;  int main() {     int a = 40;     {         extern int a;         printf("%d\n",a);        } }   Output : 33  Can anyone please let me know how Extern is working here ?  Why after declaring variable "a" with extern keyword, access to local variable "a" in main is lost ?

My question is about when a function should be referenced with the extern keyword in C. I am failing to see when this should be used in practice.  As I am writing a program all of the functions that I use are made available through the header files I have included.  So why would it be useful to extern to get access to something that was not exposed in the header file? I could be thinking about how extern works incorrectly, and if so please correct me. Also.. Should you extern something when it is the default declaration without the keyword in a header file?


My update manager doesn't work and comes up with this:  please check your internet connection W:Failed to fetch http://ppa.launchpad.net/ferramroberto/java/ubuntu/dists/quantal/main/source/Sources  404  Not Found W:Failed to fetch http://ppa.launchpad.net/ferramroberto/java/ubuntu/dists/quantal/main/binary-i386/Packages  404  Not Found E:Some index files failed to download. They have been ignored, or old ones used instead.   but my internet connection is fine please help.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I am trying to understand why every morphism from $\mathbb{P}^1\rightarrow \mathbb{A}^1$ is constant. We can cover $\mathbb{P}^1$ with $U_0=\{[x:y]\mid x\neq 0\}$ and $U_1=\{[x:y]\mid y\neq 0\}$. But I have no idea how to prove this. I found this problem on page 37 of Gathmann's

If $\mathbb{P}^1(k)$ and $\mathbb{A}^1(k)$ are the projective line and affine line, respectively, over an algebraically closed field $k$, is there any known classification of the regular maps $\mathbb{P}^1(k)\to\mathbb{A}^1(k)$?  I searched a bit on google and through my books, but can't find any mention of any classification or description. Is it possible to determine all such maps? Thanks.


I am having trouble with proving this directly. I am currently learning about greatest common divisors and know that this has a role in the proof. However, I can only prove the two through contradiction and not directly.

I have read a few proofs that $\sqrt{2}$ is irrational.  I have never, however, been able to really grasp what they were talking about.  Is there a simplified proof that $\sqrt{2}$ is irrational?


I tried to install the Ubuntu SDK on my Ubuntu 13.10 Virtual machine(VMwarePlayer) by typing sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo apt-get update && sudo apt-get install ubuntu-sdk in the Terminal. the process gets stuck at a point and is unable to go further so terminates. The final window of the terminal says the following:  Ign http://us.archive.ubuntu.com saucy-backports/restricted Translation-en_US Ign http://us.archive.ubuntu.com saucy-backports/universe Translation-en_US Fetched 1,190 kB in 51s (22.9 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  ubuntu-sdk : Depends: qtcreator-plugin-ubuntu but it is not going to be installed E: Unable to correct problems, you have held broken packages. mrwhite@ubuntu:~$    what do I do?

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


Say I am about to purchase a £200,000 house (moving house, rather than first-time buyer), and can get a mortgage for the £120,000 difference I need. But, my parents-in-law have offered to loan us the £120,000 at 0% interest instead; and we would pay them back the same amount each month that we would have paid for the mortgage. The catch, however, is that at some point in the future they are likely to need the money back, although the timescales are not yet known - in which case we would have to take out a mortgage on the house at that point for the remaining value of the loan, in order to pay them back in a lump sum. What are the legal issues and risks with this approach - how should we make sure everyone is fairly covered? Is there any tax implications? Is there an easier way to approach this? Would we be less likely to get a mortgage in the future because the money would be being used to pay off this loan? Is there anything else I need to know before agreeing to this?

I live in the UK. Specifically, how do I draft a loan agreement that provides basic safeguards for borrower and lender (very basic safeguards, as we're talking about an intra-family loan and the level of trust is very high), and also satisfies tax requirements so that it doesn't look like the lender is gifting the principal at a non-commercial rate.  The  appears ideal, but about.com appears to be US-centric and I can find no evidence that Virgin Money actually offers such a product.


I can only think of yourselves as a single word that is related to (only) you-plural and isn't a verb. The other one I can think of is y'all but that's more of a contraction.

"Y'all" is the famous southern US form of the 2nd person plural.  The Brooklyn / Italian-American "youse" might be another.  While the existence and usage of "y'all" has been addressed somewhat thoroughly here:  , I've found nothing else on EL&U regarding 2nd person plural forms in other English dialects.  I know there was a dual form in Old English () does that survive in any of the dialects in the Danelaw?  Do Scots / Gaelic / Welsh / Australian / other dialects retain any type of 2nd person plural / dual in modern usage?


I'd like to know how the following string processing works for the text file given below. It tries to get what follows in lines starting with "name:..."  The part of the 4th line   line[len('name:'):]   does not seem very intuitive in helping me understand how it works.It seems like its getting the length of 'name:'. Also what is the extra : following ) for ?  for line in lines:     line=line.rstrip('\n')    # assuming it came from a file, remove newline     if line.startswith('name:'):         print('The name is '+line[len('name:'):])     else:         print('The content is '+line)   It parses a text file with the following content  name:english 1001Nights  A Night at the Call Center Grammar name:science Engineering Biology Physics name:maths Algebra Geometry   Thanks in Advance for all your help

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


Ubuntu 20.04.1; Mate desktop Is there an app I can install or already have that will 'wipe' just one directory on the drive? Or will a 'Cut' operation, then dropping the file(s) into removable media, completely erase those files? Or is there a command that will do it in Term? As Root? Thanks.

Is there a way to make sure that a deleted file can not be recovered?   As you know, deleting a file by pressing shift-del or using trash doesn't mean that file is gone forever. It resides somewhere in the computer.  In day to day life, law enforcement or thieves use recovery programs to reveal our private data or something else.   They can recover all data that resides on hard disk, in RAM, and even USB.  To protect us from these people, what should one do? Which program should one use?  Note: I don't want an answer like first use a recovery program then erase that file with shred. With just one program, I want to erase all unused/deleted files on my computer.


I want to automate pulling git repo and building that repo unattended.  Is there any way I can clone repository and run make immediately after running git clone? Something like:  git clone << myrepo >> && make

There are a couple of times I have been presented with some codes as solutions to problems. My question is how do write these type of scripts myself for some fairly routine tasks?


I want to prove that $p(x)=a_0+a_1x+\ldots+a_nx^n$ is irreducible in $K[x]$ (where $K$ is a field) if and only if $a_0x^n+a_1x^{n-1}+\ldots+a_n$ is irreducible, knowing that $a_0\cdot a_n \neq 0$. How can I do this?

I am confused on how to get this problem started. I want to say that they are associated, but I am not sure if that is correct.   Let $G$ be the subset of $F[x]$, $F$ a field, consisting of all the polynomials whose constant term is nonzero.      Show that $a_0+a_1x+\cdots+a_nx^n$ is irreducible iff $a_n+a_{n-1}x+\cdots+a_0x^n$ is irreducible.    Like I said, I am not sure how to get started on this... A hint would be great, with a hidden answer would be much appreciated. I haven't been able to think of a way to get started on this.


I'm trying to make a script which needs to save a command to be run as a string. The string in question needs to contain quotes, and when attempting to execute it bash adds additional quotation characters which in some cases causes the command to not run as expected.  Here is an example script. The command example run in this example script obviously doesn't do anything and it will simply say command not found, however you can still run the script and see what I'm talking about because I added -x to the #!/bin/bash line so that the exact command being run is printed out.  Example:  #!/bin/bash -x  #command typed explicitly example -options "-i filename"  #command stored in string first commandstring='example -options "-i filename"' echo "running command: ${commandstring}" ${commandstring}   The output of running this script for me is (ignoring the two "command not found" errors):  + example -options '-i filename' + commandstring='example -options "-i filename"' + echo 'running command: example -options "-i filename"' running command: example -options "-i filename" + example -options '"-i' 'filename"'   So you can see that the first line of course is run as expected giving the command line parameter:  -i filename  However, although the echo command prints the string in a way that would execute perfectly as well, when the string is placed on the command line it changes and the parameter being passed in becomes  '"-i' 'filename"'  which contains additional quote characters, and this is causing the actual command I'm using in my real script to fail.  Is there any way to prevent this?

> echo "hi" hi > VAR='echo "hi"' > $VAR "hi"   Why is the output of the above commands different?  A similar thing occurs with single quotes:  > VAR="echo 'hi'" > $VAR > 'hi'


I'm trying to uncover bullet points in the following way.  On the first slide, display bullet point 1 in regular text and bullet point 2 grayed out (future material).  Then have miscellaneous slides appear.  Finally, have a slide with bullet point 1 grayed out (past material) and bullet point 2 in regular text.  A previous post gave a solution to a similar problem, except that I want bullet point 1 greyed out on the last slide.  Below is close to what I want using the strategy of the previous post  \documentclass{beamer} \begin{document} \setbeamercovered{transparent}   \begin{frame} <1>  [label=blub] \begin{enumerate} \item Point 1 \begin{itemize} \item More info about point 1 \end{itemize} \pause \item Point 2 \begin{itemize} \item More info about point 2 \end{itemize} \end{enumerate} \end{frame}  \begin{frame} \end{frame}  \againframe<2> {blub}   \end{document}   I'm quite new to Beamer so I imagine the solution may be very simple

I am trying to get   \begin{itemize} \item foo %completely visible in this slide \item bar %transparent in this slide \end{itemize}   Then a bunch of other slides and after that:  \begin{itemize} \item foo %transparent in this slide \item bar %visible in this slide \end{itemize}   Basically what you can do with tables of contents but for a list of items.  Thanks


I am trying to do a 4-line multi-line match.  My code finds the first one.  But not the others.  Here is the pattern:  pattern = re.compile("([a-z]+\.com\.|net\.)[.\s\S]+(Z[A-Z0-9]+)")   Here is the subject:  sub = """yahoo.com. Public 8 Z2RVE9XGX4PFJN google.com. Public 7 Z2VATLWTLBDR5D """    Here is the complete code:  import re pattern = re.compile("([a-z]+\.com\.|net\.)[.\s\S]+(Z[A-Z0-9]+)")  sub = """yahoo.com. Public 8 Z2RVE9JJGX4PFJN google.com. Public 7 Z2VATZOPLBDR5D """  m = pattern.findall(sub)  print(m)   Here is the result:  [('yahoo.com.', 'Z2RVE9JJGX4PFJN')]   And finally, here is the desired result:  [('yahoo.com.', 'Z2RVE9JJGX4PFJN'), ('google.com', Z2VATZOPLBDR5D')]   Thank you.

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


I have  in play, which allows me to pay 2 life to return a Sliver to my hand.  My opponent controls an Eldrazi with annihilator 2 and attacks, making me sacrifice 2 permanents.  Can I sacrifice 2 Slivers and then, before the sacrifice resolves, return them to my hand with , so I don't have to sacrifice anything and only have to pay 4 life?

It was suggested to me recently that Annihilator sacrifices (such as 's) are only chosen during resolution, rather than while they're going on the stack.  Do I choose those sacrifices during resolution? What part of the comprehensive rules backs that up?  I can't find any clarity on the internet, in the rules, on the MTG Salvation wiki for Annihilator, or in the ability's rulings. It seems reasonable, but I'd like to know what's behind it. Plus, if I can choose and then later  some stuff, all the better.