Using either the standard ArcMap labelling engine, or the Maplex engine, it is possible to automatically omit labels from the map when the area is too congested.   Eg in the centre of this image, there are too many towns close together so their labels aren't placed:    Is there a similar method to switch off those towns' symbols as well?  Ideally I'm looking for something automated, which works based on the current viewport (in the same way that the labels are automatically re-positioned if you pan or zoom the map)
Using ArcMap 10.0, I am working on a map that shows many villages. Each village has a name attribute that I want to use for a label, but in some areas there are so many villages that not all can be labeled. I am using the Maplex label engine and have not checked the "Never Remove (allow overlap)" box.  I am quite happy that not all village names are displayed as this would be way too much. And it is ok that Maplex chooses which labels to display, as I have no way to know which village is more important than another one. This also means that I can't base the labeling on a field such as population or something else, even though that would be less random.  However, I would also like the village points that are not labeled to similarly not be displayed. I think it unlikely that someone would want to see the point without knowing the name of the village. If all points are shown, it is also difficult to tell which point a name label goes with in crowded areas. So instead of choosing just labels not to be shown, I also want the computer to chose features not to be shown.  To give you a better idea on what I mean:    Is there a way to make these features/points not draw if their label is not shown?
How can I recover from deleting the /usr/share/themes directory? More section headings? I am a novice in LaTeX and I have one question.  Can someone tell me what if you want more heading's in LaTeX. Like 5 or 10 or even 15. Is there a package for that? What does 'super' do in Python? - difference between super().__init__() and explicit superclass __init__() What's the difference between:  class Child(SomeBaseClass):     def __init__(self):         super(Child, self).__init__()   and:  class Child(SomeBaseClass):     def __init__(self):         SomeBaseClass.__init__(self)   I've seen super being used quite a lot in classes with only single inheritance. I can see why you'd use it in multiple inheritance but am unclear as to what the advantages are of using it in this kind of situation. Two icons on Unity Launcher on non-standard application launch I have an application which doesn't come from any Ubuntu repo (neither official, nor PPA) but available as tgz and supposed to be unpacked and ready to use. To be precise it is .   The problem is the  application when launched shows its own icon in Unity Launcher. After making a custom .desktop file and placing shortcut onto Unity Launcher (by dragging from the dash) and launching it I see two icons - one placed by me and another one with real application.  This is the .desktop contents:  [Desktop Entry] Version=1.0 Type=Application Terminal=false Exec=/opt/LightTable/LightTable Name=Light Table Icon=/opt/LightTable/core/img/lticon.png   One more thing. The /opt/LightTable/LightTable is bash script file and eventually /opt/LightTable/ltbin is being launched. I think this is the problem but have no idea how to fix the problem. Changing Date format and appending to original file I have file like this called a.txt:  [2016-03-30T04:51:51.599-04:00]!ER_DEV!Port_Conflict!/u05/app/ [2016-01-20T04:30:21.885-04:00]!ER_DEV!Port_Conflict!/u05/app/   I need to modify it so it looks like:    2016-03-30 04:51:51!ER_DEV!Port_Conflict!/u05/app/   2016-01-20 04:30:21!ER_DEV!Port_Conflict!/u05/app/   i already wrote a command to change [2016-03-30T04:51:51.599-04:00] to 2016-03-30 04:51:51 .but how to append the query output to original file.    awk -F'!' '{print $1}' a.txt | awk -F '[T.]' '{print $1 " " $2}' | awk '{gsub(/\[/,"")}1' Sometimes, when I upgrade a system via do-release-upgrade, the update process fails and the script tells me to finish the process manually via dpkg --configure -a. This is a not serious problem - after manually solving the dependencies problem and the finishing upgrade process all works well.  But the do-release-upgrade script has a cleanup process after finishing the upgrade:  Remove obsolete packages?   XXX packages are going to be removed.   Continue [yN]  Details [d]y   which removes some obsolete packages from old version of system.  Seems that this process doesn't execute when the automatic upgrade fails and I finish upgrade manually, so obsolete packages from old version remain installed in the system.  How I can run the "Remove obsolete packages" process manually after finishing the upgrade by hand? Prove that $\left | \frac{a-b}{a+b}+\frac{b-c}{b+c}+\frac{c-a}{c+a} \right | < \frac{1}{8}.$ Let $a,b,$ and $c$ be the lengths of the sides of a triangle. Prove that $$\left | \dfrac{a-b}{a+b}+\dfrac{b-c}{b+c}+\dfrac{c-a}{c+a} \right | &lt; \dfrac{1}{8}.$$   The best idea I had was to expand the fractions to get something nicer. So we get $\dfrac{a-b}{a+b}+\dfrac{b-c}{b+c}+\dfrac{c-a}{c+a} = \dfrac{a^2 b-a^2 c-a b^2+a c^2+b^2 c-b c^2}{(a+b) (a+c) (b+c)}.$ Then I would try to relate this to side lengths of a triangle to prove the desired inequality but that is the step where I am unsure. I would like to parse a string such as p1=6&amp;p2=7&amp;p3=8 into a NameValueCollection.  What is the most elegant way of doing this when you don't have access to the Page.Request object? JSON encode MySQL results How do I use the json_encode() function with MySQL query results? Do I need to iterate through the rows or can I just apply it to the entire results object? How does java do modulus calculations with negative numbers? Where can I see my full list of Questions and Answers in my profile page of Stack Exchange Android App? I want to see all my Questions and Answers in a particular SE site -  - profile page through Stack Exchange Android App. How can I see that? When I tried to see that I found only Top Posts(5) and Top Tags. Show that if a function is not negative and its integral is $0$ than the function is $0$ Suppose $f$ is continuous, $f(x) \ge 0$ on $[a,b]$ and $\int_a^b f(x) dx=0$. Show that $f(x)=0$ on $[a,b]$.   I know that if $f$ in continuous at $x_0$ and $f(x_0) &gt; 0$, then there exists $\delta &gt; 0$ s.t. $f(x) \ge \frac{1}{2} f(x_0)$ for $|x-x_0| &lt; \delta$ and I think it should help me but I'm stuck at this point. When compiling a tex file including references (by Texstudio editor and Miktex distribution) using biblatex with bibtex backend and ieee style, the results of the displayed references in the output pdf is messed up at the "volume" and "issue number" entries as follows:   The volume label "vol." is missing (Ref. 1 &amp; 2 in the given example below). The numeric issue number "3" is missing (Ref. 1 in the given example). The issue number label "no." is displayed although NO input entry was being given (Ref. 2 in the given example).   If it helps, this behavior was noticed after the recent update of Miktex on March 11, 2017, including  package (ver. 1.2a 2017-03-02). As before which, everything was going fine!  So is this issue noticed by someone else? Is there any idea about the reason of such strange act by biblatex?  \documentclass{article} \usepackage{filecontents} \begin{filecontents}{reference.bib}     @article{author1,         author  = "George Green",         title   = "Basic latex",         year    = "2000",         journal = "Sharelatex Journal",         volume  = "10",         number  = "3",         pages   = "100--101"     }     @article{author2,         author  = "Carol White",         title   = "Basic studio",         year    = "2010",         journal = "Club Journal",         volume  = "20",         pages   = "200--201"     } \end{filecontents} \usepackage[backend=bibtex, style=ieee]{biblatex}  \addbibresource{reference.bib} \begin{document}     Hi there! \\     Ref 1 Green \cite{author1}. \\     Ref 2 White \cite{author2}.     \printbibliography  \end{document}   The output is as follows: I am not very familiar with databases and the theories behind how they work.  Is it any slower from a performance standpoint (inserting/updating/querying) to use Strings for Primary Keys than integers? Does $a\mid bc$ imply $a\mid b$ or $a\mid c$? I am not sure I understand this I just to an explanation to this question:  If $a, b, c \in \Bbb{Z}^+$ and $a\mid bc$, does it follow that $a\mid b$ or $a\mid c$? How to open a serial port by friendly name? Can Compound Topographic Index (CTI) / Topographic Wetness Index (TWI) produce negative values? I am calculating Topographic Wetness Index for a study area using SRTM DEM (90 and 30m).   I've seen several versions of TWI (CTI).  I have been using: TWI = ln(As +1 / tanB)       where As = catchment area, B = slope (degrees/radians??)  When I run this function, the output contains negative values (using slope in degrees and radians).  Are negative values acceptable? Or does this indicate an error in the analysis??  I understand the output should be scaled to 1-10, but negative values seems counter intuitive. Could someone explain what negative values could mean (due to flat areas, no data values?)  On a side not, the calculations are being run on on a very large area, which overaps several watersheds. Is it appropriate to run TWI over such a large extent? How do I prove that $m(TE)=\left|\det(T)\right|m(E)$? Let $m$ be the $n$-dimensional Lebesgue measure and $T$ be a linear operator on $\mathbb{R}^n$. Let $\Sigma$ be the sigma-algebra of Lebesgue measurable sets. How do prove that (1) $\forall E\in\Sigma, T(E)\in \Sigma$ and $m(T(E))=\left|\det(T)\right|m(E)|$? Since the $\sigma$-algebra of Lebesgue measurable sets is strictly larger than the borel algebra, I think it cannot be proven by showing that $T$ is continuous. How do I prove this formally? I have a script from UC Davis and every thing is proven precisely here, except for one lemma which is critical for rest proofs in the script. That is,  Define $\mathbb{B}=\big\{\prod_{i=1}^n [a_i,b_i) : a_i,b_i\in\mathbb{R}\big\}$. Let $T$ be a unitary operator on $\mathbb{R}^n$. Let $A\in \mathbb{B}$ and $\{A_k\}_{1≦k≦m}$ be a finite disjoint sequence such that $\bigcup_{1≦k≦m} A_k \subset T(A)$. Then $\sum_{1≦k≦m} m(A_k) ≦ m(A)$.  It's written in the script: &quot;This result is geometrically obvious, but a formal proof seems to require a fuller discussion of the volume function on elementary geometrical sets, which is included in the theory of valuation in convex geometry. We omit the details&quot; It's okay to me to go through full discussion of volume function if that is precise. If it cannot be proven another easier way(so I can prove it in a day), please recommend me a &quot;convex geometry&quot; text which explains this. How to set up a root cron job properly I tried to set up a root cron job to run a Bash script as root, to run at minute 7,37, every hour, every day of month, every month. This script is located in /usr/bin and named tunlrupdate.sh. It updates the DNS of Tunlr.  $ ls -l /usr/bin/tunlrupdate.sh  -rwxr-xr-x 1 root root 2133 Sep 24 15:42 /usr/bin/tunlrupdate.sh   This Bash script is available .  When invoked the script writes what's happening in a log located in /var/log/tunlr.log  To add this root cron job I used the standard for root's crontab  sudo crontab -e   And inserted these 2 lines at the end. I expect cron to run the script as root.  # check for updated Tunlr DNS every 30 minutes at the hour + 7 mn and hour + 37 mn 07,37 * * * * root /usr/bin/tunlrupdate.sh   A later command sudo crontab -l confirmed that the cron job has been inserted.  I did reboot Ubuntu and was checking in the log file if the cron job was launched properly. However there is nothing in the logfile /var/log/tunlr.log meaning the job was never successfully launched.  I did check that if I run the script from the command line  sudo /usr/bin/tunlrupdate.sh   then the logfile is updated accordingly.  Why is this cron job not running as planned in my system?  UPDATE 1 : All the proposed solutions so far do not work. I thank Olli for a CLI to list the system log sudo grep CRON /var/log/syslog. However I did get a CRON error  CRON[13092]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] &amp;&amp; [ -d /var/lib/php5 ] &amp;&amp; find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php /maxlifetime) ! -execdir fuser -s {} 2&gt;/dev/null \; -delete)   with the suggested PATH= insertion &amp; use of absolute path from root for functions in the script or without this suggested solutions here. I still get this error.  After some searching I pinpointed the error in the file /usr/lib/php5/maxlifetime as is explained : Change #!/bin/sh -e --&gt; #!/bin/sh -x  Then listing the CRON error log in my system  sudo grep CRON /var/log/syslog Feb 11 18:07:01 Marius-PC CRON[14067]: (root) CMD (root /usr/bin/tunlrupdate.sh) Feb 11 18:07:01 Marius-PC CRON[14066]: (root) MAIL (mailed 1 byte of output; but got status 0x00ff, #012)   I still don't get the bash script executing. This time no error is shown in the log. To get assurance this was not the content of the script I reduced the script to the following 3 lines:  #!/bin/bash LOGFILE=/var/log/tunlr.log echo $LOGFILE &gt;&gt; $LOGFILE   I still don't get the cron job through. Nothing is written in the log file. So even may be an empty script will not run in cron ? I don't get it. I am know trying a script reduced to these 2 lines:  #!/bin/bash exit 0   And still the same error log. The cron script does not go through ... After these instructions in the Python interpreter one gets a window with a plot:  from matplotlib.pyplot import * plot([1,2,3]) show() # other code   Unfortunately, I don't know how to continue to interactively explore the figure created by show() while the program does further calculations.  Is it possible at all? Sometimes calculations are long and it would help if they would proceed during examination of intermediate results.