It is very strange that I have some python code in the same directory:  project-root   dialog     tools        benchmark.py        populator.py        template.py        data.py   Then I can import "populator.py" and "template.py" as follows:  from dialog.tools.populator import populate from dialog.tools.template import temp   However, it reports an error when I do:  from dialog.tools.data import compute   The imported 'populate', 'temp' and 'compute' are all functions.   The error message is:  ModuleNotFoundError: No module named 'dialog.tools.data'   As a matter of fact, this worked before. It started to produce this error message after I put several independent projecgts into one git repository. This shouldn't affect this at all. This project alone doesn't change at all.   The question, why the module is reported as not found? Exactly the same as other two in the same directory.

Python is installed in a local directory.    My directory tree looks like this:  (local directory)/site-packages/toolkit/interface.py   My code is in here:  (local directory)/site-packages/toolkit/examples/mountain.py   To run the example, I write python mountain.py, and in the code I have:  from toolkit.interface import interface   And I get the error:  Traceback (most recent call last):   File "mountain.py", line 28, in ?     from toolkit.interface import interface ImportError: No module named toolkit.interface   I have already checked sys.path and there I have the directory /site-packages. Also, I have the file __init__.py.bin in the toolkit folder to indicate to Python that this is a package. I also have a __init__.py.bin in the examples directory.  I do not know why Python cannot find the file when it is in sys.path.  Any ideas?  Can it be a permissions problem?  Do I need some execution permission?


I wanted to find explicit elements of inverse transformation of any Lorentz transformation with matrix form: $$L=\begin{pmatrix}L^0_{0}&L^0_{1}&L^0_{2}&L^0_{3}\\L^1_{0}&L^1_{1}&L^1_{2}&L^1_{3}\\L^2_{0}&L^2_{1}&L^2_{2}&L^2_{3}\\L^3_{0}&L^3_{1}&L^3_{2}&L^3_{3}\end{pmatrix}$$ How to derive this elements for this matrix and what with convention?

By definition a matrix representing a Lorentz transformation is orthogonal, so that its inverse is equal to its transpose.   Consider a pure boost in the t-x plane; $$\Lambda_x=\begin{pmatrix} \cosh(\gamma) && \sinh(\gamma) && 0 && 0\\ \sinh(\gamma) && \cosh(\gamma) && 0 && 0\\ 0 && 0 && 1 && 0\\ 0&&0&&0&&1 \end{pmatrix}.$$ $\Lambda_x$ has inverse  $$\Lambda_x^{-1}=\begin{pmatrix} \cosh(\gamma) && -\sinh(\gamma) && 0&&0\\ -\sinh(\gamma) && \cosh(\gamma) && 0&&0\\ 0 && 0 && 1 &&0\\ 0&&0&&0&&1 \end{pmatrix}$$ but tranpose  $$\Lambda_x^T=\begin{pmatrix} \cosh(\gamma) && \sinh(\gamma) && 0&&0\\ \sinh(\gamma) && \cosh(\gamma) && 0&&0\\ 0 && 0 && 1&&0\\ 0&&0&&0&&1 \end{pmatrix}.$$ These are not equal. Where have I gone wrong?


I wrote a function that change css background image every 1 second base on interval, and its all working fine, the problem is that now i want to stop the function that switches the background image and the interval setup keep overwriting me.      my code:        var backgrounds = new Array( 'url(/srv/admin/img/announcement/envelope_blue.png)' , 'url(/srv/admin/img/announcement/envelope_red.png)'  );  var current = 0;  function nextBackground() {        current++;     current = current % backgrounds.length;     jQuery("#open_msg_tlbr_img").css('background-image', backgrounds[current]);     jQuery("#open_msg_tlbr_img").css('width','35px');     jQuery("#open_msg_tlbr_img").css('height','35px');   } setInterval(nextBackground, 1000);  jQuery("#open_msg_tlbr_img").css('background-image', backgrounds[0]);       I tried using :    clearInterval();    how do i stop this monster?

I am using setInterval(fname, 10000); to call a function every 10 seconds in JavaScript. Is it possible to stop calling it on some event?   I want the user to be able to stop the repeated refresh of data.


Let vectors $u_1,\ u_2,\ \cdots u_n$ and $\mathcal{P}$ the parallelepiped determined by  these vectors : $$\mathcal{P}=\left\{\lambda_1 u_1+\cdots +\lambda_nu_n/\ \lambda_k\in [0,1]\right\}$$ How we can prove that : $$V=\int_{\mathcal{P}}dx_1\cdots dx_n=\det\left(u_1,  u_2, \cdots, u_n\right)$$ Thanks you very much.

For $n = 2$, I can visualize that the determinant $n \times n$ matrix is the area of the parallelograms by actually calculating the area by coordinates.  But how can one easily realize that it is true for any dimensions?


Following comes Topology Without Tears by Morris Let S and T be non-empty subsets of a topological space (X, τ) with S ⊆ T. (iii)  if S is dense in X, then T is dense in X. What I want to prove is: Show that R has uncountable number of dense subsets using(iii). Comments: Since S is uncountable P(S) is uncountable so no bijection exists.I can’t see how a bijection exists. Try Let S={$a+b\sqrt{2}$,a,b$\in N$, $a+b\pi$,a,b$\in N$} Let the set T={Q$\cup$$ Q^{c}$ ,(Q$\cup I)^{c}$ $\cup $ (Q $\cup $ I)} So each set in S is distinct uncountable and dense in R So each set in T is distinct uncountable and dense in R Since S$\subset T$ and by (iii) this shows there are $2^{\mathfrak{c}}$ dense sets If I have walked off the “deep end”, I would like to know how to do this stuff correctly.

Does someone know how to prove this? Let S and T be non-empty subsets of a topological space (X, τ) with S ⊆ T. (iii) Hence show that if S is dense in X, then T is dense in X. (iv) Using (iii) show that R has an uncountable number of distinct dense subsets. I just wanna prove the fourth item using the result of the third. I tried to do it by contradiction, but i don't know what exactly i have to do!


Let $B \in M_{n×n}(\Bbb F)$. Deﬁne the  functions $L_B$ and $R_B$ by: $L_{B}(A) = BA$ and $R_{B}(A) = AB$. Prove that $\det(L_B) = \big(\det(B)\big)^n$, $\det(R_B) = \big(\det(B)\big)^n$.   $L_B$ and $R_B$ are linear transformations, thus can be represented by matrices. So the determinant of those functions exists.

Determine the trace and determinant of the linear operator (on the space $\mathbb{F^{n\times n}}$) that sends the matrix $M\to AMB$ where $A$ and $B$ are $n\times n$ matricies


I'm being asked to prove $ 2 \cdot 3^0 + 2 \cdot 3^1 + 2 \cdot 3^2 + \ldots + 2 \cdot 3^{n-1} = 3^n - 1. $ combinatorially using the question "How many length-$n$ lists can we form using the elements in $\{0, 1, 2\}$ in which the elements are not all 0?" Frankly, I'm not even sure where to start and not entirely sure what a combinatorial proof is, to be honest. How would I go about approaching this problem? I assume that the right side is $3^n-1$ because it represents the number of lists of length n minus the list of all 0's.

I'm having trouble combinatorially proving: $$2 \cdot 3^0 + 2 \cdot 3^1 + 2 \cdot 3^2 + \cdots 2 \cdot 3^{n-1} = 3^n-1$$  I understand that the right hand side can be expressed as the number of possible n-length strings from an alphabet {a,b,c}, minus some specific string, such as "abc".   I see also that the left hand side is a finite geometric series where a = 2 and r = 3 and that I can algebraically prove its sum to be $3^n - 1$.  But how can I prove this combinatorially? How can I show the geometric series to be an answer to the same n-length string problem as the right side, if that is the correct interpretation for the proof?


Windows 10 + Ubuntu 16.04 LTS dual boot on a Lenovo Laptop.. after getting nagged about an update... I have been dumped into the grub rescue screen  grub rescue>   and a lot of the help for dual boot linux users seemed to rely on ls showing you a valid partition..  none of the partitions I am seeing are returning as valid file systems  grub rescue> ls (hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)   grub rescue> ls (hd0,msdos5)/ error: unknown filesystem.   I am told I should grab a USB live stick.. boot in .. but a little bit uneasy since most of these walkthroughs are from 2015 & seem to get people stuck..      can someone nail down exactly what is the proper procedure ..  UPDATE 1  I tried to utilize the boot-repair utility, used the default repair.. shutdown and restarted.. didn't work, still seeing grub rescue and the same partitions as before  UPDATE 2 Now going through testdisk, here's the latest output     UPDATE 3 Performed the quick scan, my files are seemingly there.. but when I do the deep scan I get this warning    Leaving everything marked for deletion.. in my experience I need to select the partition with the boot file in the root dir to be bootable, and unmark for deletion all the rest...

I was dual-booting Windows 7 and Linux Ubuntu on my desktop, and today is the day they gave out free Windows 10 upgrades.  How exciting!  I got the update, and it was installing, and I left to go take a 30 minute nap.  However, when I came back to my computer, it led me to the grub rescue prompt.  error: no such partition. Entering rescue mode... grub rescue>   I get the following when I type ls:  grub rescue> ls (hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)   After a quick look through of people who encountered the grub rescue prompt, I typed set and got the following  grub rescue> set cmdpath=(hd0) prefix=(hd0,msdos6)/boot/grub root=hd0,msdos6   I was still kind of lost after finding that certain commands like normal didn't work, and then I found a video tutorial where you boot from a Linux image cd and run some commands on the terminal.  Luckily, I had my CD with me, and booted from there.  When I typed sudo fdisk -l into the terminal however, this is what I got:  ubuntu@ubuntu:~$ sudo fdisk -l  Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xc03ede74     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT /dev/sda2          206848  1547022335   773407744    7  HPFS/NTFS/exFAT /dev/sda3      1547022336  1547943935      460800   27  Hidden NTFS WinRE /dev/sda4      1547945982  1953521663   202787841    f  W95 Ext'd (LBA) /dev/sda5      1915731968  1953521663    18894848    7  HPFS/NTFS/exFAT   Says here none of my devices has the Linux system in them!  And I couldn't follow the video tutorial any more than that...  I teased my brain a little and determined that sda2 contained my Windows system (since I remember my C: drive has around 700-ish GB of space).  After thinking a little bit more, I remember assigning around 200-ish GB of my hard disk space to something that's Ubuntu related when installing Ubuntu.  I don't exactly remember which, but I think it was basically Ubuntu "hard disk space", and it didn't have any boot files in them.  I assigned two other things for linux, but they were very small in size (not breaking the 1 GB mark yet).  So, can anyone here help me out get my upgrade back on track?  I won't mind if I end up having to completely remove the partitions that have Linux in them.


Upon running 'SFC /SCANNOW' I get a message to insert the Windows XP Pro SP3 disk. I had previously never heard of a Windows XP pro Service Pack 3 disk, I though there was only one type of SP3 CD. After some research, I located a service pack 3 disk, so I downloaded it, and tried running the command again. It complained about the CD being for the wrong version of XP. I've searched google for ages trying to find the correct one, to no avail. So, my question is:  Does anyone have a link to download a 'Windows XP Pro SP3' disk, the requirements are:   That it runs offline. That it comes in a .iso file That it is for Windows XP professional   By the way, I've already tried this:    Thanks in advance :)

I have my CD-key sticker with me but don't have the CD anymore. Is there anywhere I can download Windows XP SP3 installation disc from?


On meta.movies.SE we tend to have longer discussions in question comments about an issue. Sometimes comments will come in days or weeks later, and unless you are the person who posted the question, you don't have any chance to be informed about new contributions to the discussion. So my only option is to check on old questions regularly to see if anyone posted anything new in the comments section. The @-syntax only helps if its a discussion between two persons (which most often it is not). It would be great if it were possible to subscribe to comments on any question, not just your own. This could either be done automatically when you "favorite" a question, or explicitly through a new button. I guess this could be limited to the  tag on meta sites, but might be helpful in other cases as well. EDIT To clarify: The reason I would need something like this is not for discussions in normal questions. This is about discussions in meta site  questions.

There has been some discussion about getting notified on comments to questions or answers that don't belong to you, and the long-standing wish to be able to keep track of new answers or developments in questions asked by other people.  Previous discussion in regards to subscribing to questions:                  (very similar to this one)      In regards to subscribing to comments:                    The general feeling - at least here on meta - seems to be against broadening the notification rules, out of fears of useless notifications to flood users' inboxes, turning SO into more of a discussion forum than it should be, etc.   Here's a suggestion that would keep the user 100% in control what they get notified about, not generate any notifications by default, and require only minimal modifications to the User Interface.  Each question and each comment area would get an envelope symbol.    it is inactive (=white) by default.  When those envelopes are hovered over, the tooltip says click to subscribe or something.  When clicked on, the envelope lights up in green or some other colour (but different from the actual notification envelope's orange to avoid confusion.) You are then subscribed to any updates to that question or comment thread.    For each subscription, you receive notifications in the "responses" tab, as if you were the owner of the comment or question.     To unsubscribe from a question or comment thread, you open the page, and click the green envelope. It turns back white, and the notifications disappear from your responses tab (if technically possible - otherwise, there just won't be any new ones added.)    No further functionality, like managing subscriptions or anything, is necessary IMO. If the flood of notifications from a subscribed question starts to annoy you, you just open it and unclick the envelope. Done.   It would make it possible to leave a comment to a newbie's question and make sure their answer reaches you even if they don't know they need to address you using @username You could subscribe to those "oh, I'd like to know the answer to that" questions and receive active notification, instead of them getting forgotten in your favourites list You could subscribe to discussions you are interested in the outcome of, but don't want to participate in. It would (in my opinion) sort out a number of woes aired by many users in a good way, without adding annoyances to those who like the system just fine the way it is. It would not require a change in the visible layout. As far as I can see, the space the envelope would need to be is empty everywhere.   I don't know SO under the hood of course, but technically, the system would be doing what it's doing already, notify question owners of updates - just that the circle of internal "owners" would grow.


I'm new to ubuntu and I have problem with the partitions. I have 3 mounted partitions but I can only go to OS by cd OS while I can't go to New Volume. That is probably because there is a space in its name.  How can I change its name (label) or how can I go to this partition by command line?

I'm completely new and lost in Ubuntu 12.04, I'm having trouble navigating to my Sublime folder which I know is in my /opt folder. Yet I've tried to no avail to navigate into it via Terminal window. The directory is colored in blue, no idea what this means...but I am able to access the folder using the GUI explorer...?  k@k-Ubuntu:~$ cd /opt k@k-Ubuntu:/opt$ ls Sublime Text 2 k@k-Ubuntu:/opt$ cd Sublime Text 2 bash: cd: Sublime: No such file or directory k@k-Ubuntu:/opt$ cd /Sublime Text 2 bash: cd: /Sublime: No such file or directory


How to create a JAVA function with multiple outputs? Something like:  private (ArrayList<Integer[]>, int indexes) sortObjects(ArrayList<Integer[]> arr) { //... }

I want to return two objects from a Java method and was wondering what could be a good way of doing so?  The possible ways I can think of are: return a HashMap (since the two Objects are related) or return an ArrayList of Object objects.  To be more precise, the two objects I want to return are (a) List of objects and (b) comma separated names of the same.  I want to return these two Objects from one method because I dont want to iterate through the list of objects to get the comma separated names (which I can do in the same loop in this method).  Somehow, returning a HashMap does not look a very elegant way of doing so.


I asked  a few days back. It had one answer that was correct but was not so relevant to what was asked (The person wrote something he used in Ember but not React).   So that answer guided me and I easily found a "correct" solution relevant to React and I posted the answer, so that someone visiting the question in future in reference to React can easily find the answer.  Now I am confused, which answer to mark as "accepted" answer, since I obviously referenced an answer before posting my own.  Moderators? Suggestions?  Note: Let me know if my answer does not add anything useful to page, I will remove it.

was genuine at the time, but I realised that  gave the right advice, but required me to restart my Linux (which wasn't mentioned in the solution).  It's a bit of a  question and  points to me not deleting it.  But it seems hugely self-aggrandizing to accept my own answer. Should I?


I have a root div here. I want to display the child divs horizontally. How to do this?

I have a container div with a fixed width and height, with overflow: hidden.  I want a horizontal row of float: left divs within this container. Divs which are floated left will naturally push onto the 'line' below after they read the right bound of their parent. This will happen even if the height of the parent should not allow this. This is how this looks:  ![Wrong][1] - removed image shack image that had been replaced by an advert  How I would like it to look:  ![Right][2] - removed image shack image that had been replaced by an advert  Note: the effect I want can be achieved by using inline elements & white-space: no-wrap (that is how I did it in the image shown). This, however, is no good to me (for reasons too lengthy to explain here), as the child divs need to be floated block level elements.


I am working on some firm optimization problem and got to the following differential equation.   $\frac{dy}{dx} = \frac{(y-x)(1-y)}{(c-x)(1-2y+x)}$ with $x,y \in [0, 1]$ and c is a constant with $0<c\leq1$.  I know the obvious solution $y=1$ but I was wondering if there is any other solutions. Also I am looking for a generic solution that depends on any $c$ within the specified interval.  Thanks.

I'm dealing with the following differential equation   $\frac{dy}{dx} = \frac{(y-x)(a-by)}{(1-\frac{b}{a}x)(a-2by+bx)}$ with $x,y \in [0, \frac{a}{b}]$   Can anyone help me with the non trivial solution?  Thanks.


Let $\beta$ be a (non-empty) ordinal.  Is $0^\beta = 0?$ Or is it $1$?  My definition is the following: let $\alpha, \beta$ ordinals  $\alpha^0= 1$, $\alpha^{\beta+1} = \alpha^\beta \alpha, \alpha^\beta = \bigcup_{\eta < \beta} \alpha^\eta$ if $\beta$ is a non-zero limit ordinal.  From this definition, it would seem that $0^0 = 1$, $0^1 = 1. 0=0, \dots$  $$0^\omega= \bigcup_{\eta <\omega}\alpha^\eta= 1$$???  These results don't seem to make sense.

By definition of exponent operator on ordinals, we have $$0^\omega=\lim_{\xi\to\omega}0^\xi$$  However, Note that $0^\xi$ is not increasing, so if we still let $\lim_{\xi\to\omega}0^\xi=\sup\{0^\xi|\xi<\omega\}$ then it is followed by $$0^\omega=\sup\{1,0,0,\ldots\}=1$$  An incredible result.  Nevertheless if we use the definition of limit superior $$\overline{\lim}_{\eta\to\beta}\alpha^\eta:=\inf_{\eta < \beta}\sup_{\eta \le\xi<\beta}\alpha^\xi$$ and limit inferior $$\underline{\lim}_{\eta\to\beta}\alpha^\eta:=\sup_{\eta < \beta}\inf_{\eta \le\xi<\beta}\alpha^\xi$$ then we get $$\lim_{\xi\to\omega}0^\xi=\underline{\lim}_{\xi\to\omega}0^\xi=\overline{\lim}_{\xi\to\omega}0^\xi=0$$  Conceivable, but this is not the end of the story. Let's consider about $m^n$ with $0<m,n< \omega$. Since exponent operator is continuous in the second slot, this sentence following must hold: $$m^n=\lim_{\xi\to n}m^\xi=\underline{\lim}_{\xi\to n}m^\xi=\overline{\lim}_{\xi\to n}m^\xi=m^{n-1}$$ fail when $1<m$.  So can we find a perfect definition of limit on ordinals?  Update:  By the way, if we deal the Ordinal class as a discrete topology space, then $\{\alpha\}$ is a neighborhood of $\alpha$, hence $\{\alpha\}$ must in every filterbase which converge to $\alpha$. So if we let $$\overline{\lim}_{\eta\to\beta}\alpha^\eta:=\inf_{\eta \le \beta}\sup_{\eta \le\xi\le\beta}\alpha^\xi$$ and $$\underline{\lim}_{\eta\to\beta}\alpha^\eta:=\sup_{\eta \le \beta}\inf_{\eta \le\xi\le\beta}\alpha^\xi$$  Then $$\alpha^\beta=\lim_{\xi\to \beta}\alpha^\xi=\underline{\lim}_{\xi\to \beta}\alpha^\xi=\overline{\lim}_{\xi\to \beta}\alpha^\xi$$ hold for every $(\alpha,\beta) \in \mathbb O^2$  But actually it cannot be a definition since $$\inf_{\eta \le \beta}\sup_{\eta \le\xi\le\beta}\alpha^\xi:=\inf\{\sup\{\alpha^\xi|\eta \le\xi\le\beta\}|\eta \le \beta\}$$ but $\{\alpha^\xi|\eta \le\xi\le\beta\}$ contains $\alpha^\beta$!  Update: Edited title. The eventual question is as title illustrates.


As it is the only way to activate transparent themes in Gnome-shell:   How to disable Nautilus from handling the desktop? Can I make it handle the desktop again? What will happen to the unity and desktop icons? How to handle the desktop icons without nautilus?

Since 11.10 nautilus shows my Desktop in Unity. As I remember correctly, tthis wasn't in 11.04. How can I disable that?


I've looked up a lot of tutorials on YouTube and all of them only work for versions of Minecraft prior to 1.7.9.  I first got a Minecraft Coder Pack (MCP) off of , but then realized that only decompiles Minecraft 1.6.4. Then I found a more recent MCP (that's not on the website for some reason) and it is version 9.03, downloaded . This decompiles Minecraft version 1.7.2 (when I followed 's instructions, I run the decompile.bat file and it says Json file not found in C:\Users\mike\AppData\Roaming\.minecraft\versions\1.7.2\1.7.2.json).  Basically I can't decompile Minecraft 1.7.9, but I can decompile older versions. However, I don't have any older versions downloaded onto my computer. I have only 1.7.9.  Then I tried using Forge, but realized that most videos were using versions of Minecraft prior to 1.6.4, meaning they use the bin folder that does not exist anymore. Even after trying to figure that out as well, the decompiling would never work. I tried to do what  did, but couldn't replicate it. Then I finally looked at  about using Forge and I could replicate it, but this didn't decompile Minecraft. It just set up a workspace in Eclipse that I'm not sure how to use.  TL;DR  I can decompile Minecraft 1.6.4 and 1.7.2 but I can't decompile version 1.7.9. Should I download an older version of Minecraft, wait for an MCP for 1.7.9, or something else? Is there something I'm missing, where I actually can decompile and mod Minecraft 1.7.9?

I've recently changed to the new Minecraft launcher, and I have noticed a change in the .minecraft folder layout. I can no longer install mods just by copying it over into the versions/1.6.1 jar file, as this file refreshes every time it is launched.  For those who don't know what I am talking about, here is the new layout:    I am specifically trying to install Optifine, which does work with 1.6.1. Where do I drag in the mod files now? I can't seem to find a jar file that is suited to it, except in the version folder, but as I stated above, this refreshes every time.  After copying a recent version and renaming it in the version folder, I get this error in the development console:   Unexpected exception refreshing version list java.lang.IllegalArgumentException: Version '1.6.1' is already tracked     at net.minecraft.launcher.updater.VersionList.addVersion(VersionList.java:91)     at net.minecraft.launcher.updater.LocalVersionList.refreshVersions(LocalVersionList.java:44)     at net.minecraft.launcher.updater.VersionManager.refreshVersions(VersionManager.java:47)     at net.minecraft.launcher.Launcher$2.run(Launcher.java:164)     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)     at java.util.concurrent.FutureTask.run(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)


I'm a complete novice at GIS. My project is to find the highest peaks in each Antarctic territory, and compare the results with the international gazetteer to find which peaks are and aren't named.  I'm trying QGIS Desktop with Grass with the 200m resolution radar altitude DEM raster file. Locations are (x,y) from the south pole in metres.     The Gazetteer is  and is available as CSV, GeoJSON (whatever that is) and KML formats. Locations are in latitude and longitude to the nearest minute of arc, which is not accurate enough.  Territories are given by longitude range in Wikipedia  I've succeeded in opening the DEM with QGIS. I could find peaks manually one at a time using colours and the "identify features" button.   But is there a better way?

How could I extract all peaks from a DEM (large mountainous area) using GRASS?   Peak means something like: a pixel which is sourrounded by other pixels with smaller elevation numbers in a area arround the "peak-pixel" of about 100m.


I was speaking to some ELL and they asked me the above question and I wasn't able to give a good answer.  What's the reason we need to prefix gym with "the", but not do the same for places like home, or school, or work?

I decided to make sure that I know this important difference between American and British English, so I wrote what I have found out so far and I would be grateful to anyone who reads this and tells me whether I am wrong, or not.  In British English when people say  to hospital or in hospital when  talking  about somebody being there as a patient they don't use the definite article : "I had to go to hospital", "She spent two weeks in hospital". And the meaning is that somebody was there as a patient.   If then for some other reasons British English speakers  will use the definite article which will change the meaning itself, I noticed that, in American English, native speakers often use the  the and if they need to show that somebody is in church to pray,  in school as a student, in hospital as a patient, in prison as a prisoner, they use 'in' and not 'at'. Do American English speakers use 'at' like British English speakers use 'the' to give the sentences a different meaning?    Are my sentences correct? Do they show American English usage?   He is in the school. (enrolled as a student) He is at the school. (for some different reasons) He is in the hospital. (as a patient) He is at the hospital. (visiting somebody) He is in the church. (to pray) He is at the church. (for some different reasons) He is in the university. (as a student) He is at the university. (not as a student) He is in the college. (as a student) He is at the college. (Not as a student) He is in the prison. (as a prisoner) He is at the prison. (not as a prisoner)


This question has been asked before, but never really answered: Is it possible to have a single time slider control that animates over multiple data frames? Reason being, I have one main map and 4 inset maps with the same time-aware dataset (see image with main frame activated). I can only export the animation with one frame following time. I would like the end result to be sequential images.  Has ESRI evolved some way to control multiple frames, or can you suggest a method that would get the same result?  I am aware of the questions at these stackexchange links ( [3-years old and no solution] and ( [3-months old and no answer]). However, it seems there is a demand for an workaround here, so I would like to keep this question on the boards, though it means reposting the question.

Is there a way to use the Time Slider on multiple data frames simultaneously?   Example: My Dataframe 1 shows precipitation values over an area and DataFrame 2 shows corresponding temperature.. I want to be able to use the slider to advance both DFrames at once. Right now only the 'activated' dataframe is being changed with the slider..    Another example:  I have one main map and 4 inset maps with the same time-aware dataset (see image with main frame activated). I can only export the animation with one frame following time. I would like the end result to be sequential images.  Has ESRI evolved some way to control multiple frames, or can you suggest a method that would get the same result?


I am developing a match making system where a user has certain data associated with his profile information. he has set of preferences to match against other users in the system. I am in search for better approach to save data and apply search. I can explain with an example: I have an education field in the profile. I can set in preference, multiple education either in 1) single column as comma separated values or in 2) multiple rows . This value in education can be matched aginst other user's education in profile data.   Which method should be the better one from the above scenario in terms of speed, performance, stability?  Is there any other good approach.  I have more than 20 fields like this to match and expecting over 100k user profiles in the system.

I am working on a project involving cards from the Magic: The Gathering game. To be of any use, I must load the basic information about each card into my database, but some of the fields may contain arrays of text, that is, they may contain multiple values .  For example, a card can be classified to be both "green" and "blue". Or it can have several different creature types specified, and so on.  My first thought was to simply store the values as a string, and then search using the LIKE keyword. In combination with the NOT keyword, it should be possible to search for any desired combination of words, and also exclude certain words.   However, LIKE is going to be (relatively) slow as it can't use an index and has to rely on text pattern matching, and probably has other drawbacks as well. With normalization I could improve speed by assigning an integer key to each keyword, and then create a table that connects each card with the relevant keys (see  for a clearer description).  But with normalized tables I have to deals with joins (severely increased code complexity, not only in the SQL part), transactions (to update all relevant tables or rollback everything), and possibly decreased performance due to joins (see ).  AFAIK there are roughly 20000-25000 different magic cards in existence (and more being released every year). With one row for each card, is it worth it overall to normalize the data, or is the benefit not worth the costs? Why/Why not? And how do you decide this question in general?  EDIT: I am currently using a MySQL database, but I would also appreciate answers that apply to any of the other non-commercial/open source databases out there. Who knows - I might switch to a different database at some point.  Answers should not provide a technical solution only, but explain why it would/might be the right solution in terms of best/good enough performance for least amount of effort.


I've got a simple question: I was wondering if it is possible to (temporary or permanent if possible) block the insertion of a record into a table with a specific value for a specific column. I'm using mysql with InnoDB  So I have this table Cart, which contains some columns and one of them is CartID (it is not the primary key thou). And I would like to block insertions in the table Cart with a specific CartID (let's say 100), while I'm doing work on another table in the DB.

I need help making a TRIGGER that compares two dates being entered into a table, but I'm not 100% on the syntax I should use.  Something like:  CREATE TRIGGER chk_dates    BEFORE INSERT ON `job_history`    FOR EACH ROW     BEGIN       IF( NEW.end_date < OLD.start_date ) .../// error, don't insert data       ELSE .../// allow the data to be entered   My table job_history will have a start_date, and when end_date is entered, I want it to check to ensure that it isn't prior to start_date.    How do I accomplish this?


I am looking for some help regarding big O notation. The goal is to give the order of growth for the given code fragments.  int sum = 0 for (int k = n; k > 0; k/=2 )   for (int i = 0; i < k; i++)     sum++;   For this code fragment I got (N logN). The first for loop is logN and the second for loop is N.  int sum = 0 for (int i = 1; i < n; i *= 2 )   for (int j = 0; j < i; j++)     sum++;   I had some trouble on this one. The first for loop is logN, however the second for loop is where I get stuck. The second for loop in dependent on the first for loop. I'm not sure how to show that in big N notation.   int sum = 0 for (int i = 1; i < n; i *= 2 )   for (int j = 0; j < n; j++)     sum++;   The first for loop is logN. The second for loop is N. So this is (N)?  I am struggling with this and would appreciate some help. Thank you

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


What is the difference between the two arrays created with array1 = [[0] * 2] * 3  and array2 = [[0 for _ in range(2)] for _ in range(3)]  I'm asking because they display different behavior (such as, when I increment an integer in array1, it will increment every single value in that column).

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I run Ubuntu 16.04 on Vmware box version 12.5.2. Trying to install Vamware tools using these commands:  VM->Install vmware tools copy whole VMWare Tools directory to ~ run sudo ./run_upgrade.sh   But nothing is happening and no error messages appear? How can I install vmware tools in the correct way?

I'm trying to install VMware Tools in Ubuntu 16.04. Should I do this by using sudo? Why?


My cat walked across my keyboard, and now certain key functions have changed (in several programs, actually). Now, things like "Save" are mapped to "Ctrl - W". I tried changing my config back to the "Blender 2.7x" but nothing changes. What did my cat do!?

I accidentally pressed some unknown key combination, and now I can't use Undo nor Redo in Blender


Prove that every finite group having more than two elements has a nontrivial automorphism.  Proof: Let $G$ is a group such that $o(G)>2$. Let's consider three following cases:   If $G$ is not abelian then exists $a,b\in G$ such that $ab\neq ba$. We can consider the mapping $T_a:G\to G$ defined by $T_a(g)=aga^{-1}$. Then $T_a(b)=aba^{-1}\neq b$ so $T_a$ is nontrivial automorphism. If $G$ is abelian and there is element $a\in G$ such that $a^2\neq e$ $\Rightarrow$ $a\neq a^{-1}$. Since $G$ is abelian then inverse mapping $T:G\to G$ defined by $T(g)=g^{-1}$ is nontrivial automorphism since $T(a)=a^{-1}\neq a$. If $G$ is abelian and every $a\neq e$ with $o(a)=2$ or $a=a^{-1}$. I dont know how to continue reasoning.   Remark: I have met at least two topics with the same approaches but the case when $G$ abelian and every non-identity element has order $2$ is solved by considering vector space over $\mathbb{Z}/2$. I am not familiar with vector spaces and I was not able to comprehend this solution. I would be very grateful if somebody will provide more easier solution with detailed explanation.

Well, this is an exercise problem from Herstein which sounds difficult:   How does one prove that if $|G|>2$, then $G$ has non-trivial automorphism?   The only thing I know which connects a group with its automorphism is the theorem, $$G/Z(G) \cong \mathcal{I}(G)$$ where $\mathcal{I}(G)$ denotes the Inner- Automorphism group of $G$. So for a group with $Z(G)=(e)$, we can conclude that it has a non-trivial automorphism, but what about groups with center?


How to deal with sequences like  $$1,2,2,3,3,3,4,4,4,4,........$$ Now they don't come under any specific sequence (A.P., G.P. or H.P.). Can we deduce any simple formula or working method to deduce their $n^{th}$ term and the sum upto $n^{th}$ Any kind of hint would certainly work.

There exists a formula for the $n$th term of this sequence  from the OEIS ("$n$ appears $n$ times") $$1, 2, 2, 3, 3, 3, 4, 4 ,4, 4, 5...$$ which is $$\left \lfloor \frac {1+\sqrt{1+8n}}{2} \right \rfloor.$$  Is there a better formula for the $n$th term? A formula that isn't a 'magic' one that just happens to work but one that comes from a well-founded observation. Preferably one not using the floor function. I also have suspicions about the sustainability of the above formula as I feel with very $n$ it may not function properly.


today I attempted to install Xubuntu on my machine. I had Ubuntu and Windows on my SSD as dual boot.  I wanted to expand the volume that the Ubuntu had because it was way too small. What I did, mistakenly, though is to format the whole disk so I lost my Windows partition (of course).  I tried to recover at least partially my Win partition with TestDisk via Live Ubuntu flash drive.  I can see the drive, when I try to search for volumes, however when I get in there in order to recover the files, it tells me:      Can't open filesystem. Filesystem seems damaged.   Is there a way that I can recover, at least partially, some of the files on my Win partition, now called Unallocated space?      P.S.   This question not related ENTIRELY to my problem. The thing is that all of the ways to recover my partition suggested there are not seeing the partition I've mentioned. On the other hand, with TestDisk tool I can see it.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


My former version of this question was marked as a duplicate, despite the fact the question it was a “duplicate” of being:    About a different error. Mine only happens when redownloading any offloaded apps and updating nearly any app, the other users’ error only applied to default apps he’d deleted. On a different operating system. iOS of unknown version, I’m on iPadOS 13.3. With solutions I specifically mentioned I have already tried in my question, or was unable to try. I don’t have cell data, the solutions required cell data or were just restarting the device.    Seriously, the question this is a “duplicate” of only bears one line of resemblance to mine, the error message. So please, I’m at about the end of my sanity, please don’t mark it a duplicate for a second time.  I have looked at every single other time someone has asked this question on this website, Apple’s articles, etc. and tried every single solution in every single answer. None have worked.  Whenever I try to redownload an offloaded app, or update an app, this error comes up.     Unable to install APP_NAME, please try again later   I’ve tried everything from turning my Wi-Fi on and off to signing out of my apple ID on the app store, doing a hard restart, and signing back in, just doing a hard restart without the Apple ID stuff, etc. Does anyone have any solutions they don’t think will have been in other answers?

Every single one of my apps, whenever I try to update them, or redownload offloaded apps (which I do very frequently) has this error:     Unable to install APP_NAME, please try again later   I’ve tried everything from turning my Wi-Fi on and off to signing out of my apple ID on the app store, doing a hard restart, and signing back in. Does anyone have any solutions they don’t think will have been in other answers?  PS: This is not a duplicate of :   About a different error. Mine only happens when redownloading any offloaded apps and updating nearly any app, the other users’ error only applied to default apps he’d deleted. On a different operating system. iOS of unknown version, I’m on iPadOS 13.3. With solutions I specifically mentioned I have already tried in my question, or was unable to try. I don’t have cell data, the solutions required cell data or were just restarting the device.


Since polarization filters light in all directions except one, the electric or magnetic field should be filtered, right?

If the magnetic field doesn't polarize does it follow the electric field path of propagation? or does it vanish?


This problem once again is from a previous exam.  The problem is to compute the group of automorphisms of the ring $S$ where $S=\mathbb{Q}[x]/(x^2)$  My thoughts: Well $x^2$ is reducible over $\mathbb{Q}$ so I am completely stuck. Also what exactly is the theory I need to know to solve this problem?. I don't even know where to look in the text book to find the relevant theory for this. In particular  I have not learned Galois Theory. In fact we don't need to know Galois' theory for my exam. So I'm hoping this doesn't use any of that heavy machinery.  Can you guys help?  Thanks for your help and answers.

Here's the problem: if $S = \mathbb{Q}[x]/(x^2)$, compute the group  of automorphisms $\mbox{Aut}(S)$.   First off, I have the solution and I know it's isomorphic to the multiplicative group $\mathbb{Q}\backslash\{0\}$, so I'm trying to understand it. It uses what is called the substitution principle and the fact that the restriction of any endomorphism $\phi: \mathbb{Q}[x]\to \mathbb{Q}[x]$ to $\mathbb{Q}$ is the identity. It says that these two facts implies that the endomorphisms of $\mathbb{Q}[x]$ are in 1-1 correspondence with $h \in \mathbb{Q}[x]$, where the endomorphism corresponding to $h$ is $\phi_h : \mathbb{Q}[x] \to \mathbb{Q}[x]$ given by $\phi_h(f) = f(h)$ for $f \in \mathbb{Q}[x]$. I guess I just don't understand how it applied the substitution principle? It's probably obvious, but for some reason I am not getting it.  An explanation would be greatly appreciated! Or if you have a different solution, that'd be cool too. Thanks!!


I am running the following code as a part of a script (#!/bin/bash).  read -p "Do you want to make use of Thorpe volume attenuation in the watercolumn [Y/N]:" Thorpe read -p "Do you want to include *.ati file? [Y/N]:" ati Thorpe_att=T ati_file=* if [$Thorpe = Y]; then    if [$ati = Y]; then       echo "Usage of Thopre volume attenuation volume and *.ati file is accepted"       sed -i "4s/''/'$interp$surf$attenuation$Thorpe_att$ati_file'/" $Mod_Filename    else       echo "Only usage of Thopre volume attenuation volume is accepted"       sed -i "4s/''/'$interp$surf$attenuation$Thorpe_att'/" $Mod_Filename    fi else     if [$ati = Y]; then       echo "Only usage of *.ati file is accepted"       sed -i "4s/''/'$interp$surf$attenuation$ati_file'/" $Mod_Filename    else       echo "Neither usage of Thopre volume attenuation volume nor *.ati file is accepted"       sed -i "4s/''/'$interp$surf$attenuation'/" $Mod_Filename    fi fi   After running it I am getting this error:  ./mod.sh: line 50: [N: command not found ./mod.sh: line 59: [N: command not found   And afterwards it prints on the terminal the line :echo "Neither usage...". Can anyone solve the problem? Thanks in advance.

I am trying to pull logs and doing few others things directly. written a small line BASH but not working. I am sure thats with IF Condition.    sed -rne '/21:25:07/,/21:50:07/ p'  server.log.2015-04-21 > /tmp/filename.log ; du -sh  /tmp/filename.log ;  if [`du -sh  /tmp/filename.log` -gt 0] then gzip /tmp/filename.log ;


How do you make Elasticsearch start at boot time on Ubuntu 16.04? I've installed elasticsearch from the standard repo with:  sudo apt-get install elasticsearch   and it works fine. However, I have to manually start it with:  sudo service elasticsearch start   after I login. I've tried the usually trick for configuring services to start at boot with:  sudo update-rc.d elasticsearch defaults sudo update-rc.d elasticsearch enable   but that's done nothing.  $ systemctl status elasticsearch * elasticsearch.service - Elasticsearch    Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)    Active: active (running) since Sun 2017-02-05 17:11:59 EST; 8h ago      Docs: http://www.elastic.co  Main PID: 9133 (java)    CGroup: /system.slice/elasticsearch.service            `-9133 /usr/bin/java -Xms2g -Xmx2g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encod

I read about how to enable and disable services in Ubuntu and it seems that there are different possibilities to manage them.  The first method I found is update-rc.d to add new services to startup, which aims on the /etc/init.d folder and its contents.  The other one I found is to edit .conf files in the /etc/init folder.  What's the recommended way to enable / disable / add services and why?  Could you please give a short bulletproof step by step example on how to add a service in Ubuntu and enable and disable it?


Define $f$ has second continuous derivative over $[0,1]$. And $f(0)=f(1)=0$, And $f(x)\neq0 \,when \ x\in(0,1)$,    prove $$\int_{0}^{1} |\frac{f{''}(x)}{f(x)}|\,dx\ge 4,$$    I can't use $f(0)=0 \ and\  f(1)=0$ completely at the same time whether using the Lagrange Mean Value Theorem or the Fundamental Theorem of Calculus. So I can not solve it. How to prove that? Thank you.

Assume that $f: [0,1] \rightarrow \mathbb{R}$ has a continuous $f''$ and $f$ is positive on the interval $(0,1)$ and $0$ at the endpoints.    I want to prove that $$\int_0^1 \Big| \frac{f''(x)}{f(x)} \Big| \,dx >4. $$  I could not make any progress. Since the unit interval is compact, we know that the continuity of $f, f'$ and $f''$ are uniform and they attain their maximum and minimum values. Moreover, I tried to apply the Mean Value Theorem but I failed.


I'm trying to draw a thinness line in space using pst-solides3d:  \begin{center} \psset{unit=0.4cm} \psset[pst-solides3d]{viewpoint=40 30 25 rtp2xyz,Decran=60,fontsize=0} \begin{pspicture}(-2,-3)(3,10) \psSolid[object=line,args=0 4 0 0 4 4,linewidth=0.1pt] \end{pspicture} \end{center}   but command linewidth seems have no effect. Thanks.

Changing thickness line using pst-solides3d:  I'm trying to draw a thinness line in space using pst-solides3d:  \begin{center} \psset{unit=0.4cm} \psset[pst-solides3d]{viewpoint=40 30 25 rtp2xyz,Decran=60,fontsize=0} \begin{pspicture}(-2,-3)(3,10) \defFunction[algebraic]{paraboloid1}(r,t){r*cos(t)}{2*r*sin(t)}{r^2} \psSolid[algebraic,object=surfaceparametree,base=0 2 pi 2 div 3 pi mul 2 div,linewidth=0.5pt,function=paraboloid1,ngrid=20 25,linecolor=blue,incolor=Turquoise]% \psSolid[object=line,args=0 4 0 0 4 4,linewidth=0.1pt] \end{pspicture} \end{center}   but command linewidth seems have no effect. Thanks.


I am having difficulty determining is the solution for the following problem:  $$\displaystyle \lim_{x \rightarrow \infty}\left( x \times 0 \right)$$  To clarify, this question assumes ${0}$ is a constant and is absolutely zero ("true zero"), and not another figure approaching or is approximately zero ("near zero"). Thus, the question is not asking what "near zero" times "near infinity" is.  I know that ${\infty *0}$ is undefined, however my difficulty is that I'm unsure whether the answer to the problem is undefined because ${\infty *0}$ is undefined.  From my understanding, a limit does not ever 'reach' infinity - it only approaches infinity, thus there are a rational amount of numbers. As  ${x\cdot 0=0}$, when x is not ${\infty}$, it seems to me that in all cases of $x$ approaching infinity the answer could also be ${0}$.

I did a bit of math at school and it seems like an easy one - what am I missing?  $$n\times m = \underbrace{n+n+\cdots +n}_{m\text{ times}}$$  $$\quad n\times 0 = \underbrace{0 + 0 + \cdots+ 0}_{n\text{ times}} = 0$$  (i.e add $0$ to $0$ as many times as you like, result is $0$)  So I thought an infinite number of $0$'s cannot be anything but $0$? But someone claims different but couldn't offer a reasonable explanation why. Google results seemed a bit iffy on the subject - hopefully this question will change that.


I have a polyline, that I wish to create points along using ArcMap 10.2.2.  I used the methodology suggested in , but I do not seem to be able to generate the points at the set intervals I desire.  For instance, densifying the polyline using 500m and 250m, and then converting the vertices to points  using the Feature Vertices to Points tool), seems to generate the same number of points (540) for either densifying distance when using the "Both_Ends" option in the Feature Vertices to Points tool:  250m - Both Ends:    500m - Both Ends:    With the same number of points in each generated points layer. And using the option 'All' in the Feature Vertices to Points tool generates way too many points (5250):    My end goal is to have points spaces at every 250m or 500m along each branch of this polyline, finally settling on the polyline to point conversion that generates a reasonable number of values.

I'm using ArcGIS 10.1. I have a trail network that I'm trying to establish signs along the trails every 0.20 miles.   Is there a way to create the point file from the line feature?


LaTex by default sets fairly small spaces around "divide" symbol (|). Is there a way to force larger skip (e. g. force LaTex to treat | as binary operator or = symbol)? MWE would be fairly simple:  \documentclass{article} \begin{document} What is set by default:  $a|b$  What I want:  $a\hspace{0.28em}|\hspace{0.28em}b$ %for some reason I can't use mu in \hspace, but 1mu=1/18 em and 0.28em=5mu=\thickmuskip. \end{document}

What's the difference between the different vertical bars?  $S = \{\, x \mid x \not= 17 \,\}$ $a \vert b$ implies $a \leq b$ when $b \ne 0$ $a|b$ implies $a \leq b$ when $b \ne 0$ $\lvert x \rvert$ is always non-negative     Are all of these uses correct?


I'm using Ubuntu 18.04 and it works fine but all the KDE apps dialogs look like this to me, any idea what is wrong?

I don't know what I did wrong in my Ubuntu 18.04 OS. For some reason some of my apps look like this:    This also happens to other gnome apps like pdf-reviewer and Logs. Window title, menu bar etc. are all blank, display only squares.  *Problem solved: I downloaded Google Fonts, saved them in a new folder, they can be applied system-wide, but after I did some font settings using Google Fonts it didn't work. I changed the font of Interface with Tweaks-Tool, that was what causing the problem.


iTunes software update keeps appearing in the app store even after several updates of the same. Has anyone faced a similar issue? When I try to update it, the download begins and installs and again reappears on the App store. Moreover this is happening in my new mac. I'm unable to find the root cause for this issue.

I have updated my (Late 2009) Mac Mini to Mavericks. "About This Mac" shows "OS X 10.9 (13A603).  However, I have not been able to update iTunes to version 11.1.2. The App Store shows that the update is available. It also shows several instances of it in my update history. After clicking "Update", the button quickly changes to "Installed". Closing and re-opening the App Store shows the update as available again. Checking within iTunes shows it is at version 11.1.1, so not actually updated. (Repeated several times)    The iWork apps (Pages, Numbers, and Keynote) have actually been updated, showing the correct versions. However, I occasionally one or more will also show up in the App Store as available as well; the behavior is similar to iTunes. If I scroll down, there are multiple instances in my update history as well.  Things I have tried:   Rebooting. Selected "Store -> Check for Unfinished Downloads..." This appears to re-install the iWork apps, as evident by progress bars in Mission Control, even when they are not listed as needing an update. It does not seem to do anything for iTunes. Delete iTunes and reinstall. OS X does not allow iTunes to be deleted. I have not yet tried this with iWork. Selected "Debug -> Reset Application" (there is a ) Selected "Debug -> Clear Cookies" Selected "Debug -> Show Download Folder", and deleting the files there. A subsequent check for unfinished downloads puts them back.   These have had no effect, unless I described it above.  What can I do to get the updates properly installed?  Update: After letting the issue sit for a few days, the App Store no longer shows the iTunes update as available; but iTunes itself is still at 11.1.1.


How can I permanently set a route table in Ubuntu kernel IP routing table? When I restart my PC the route table entry is getting auto flushed. I am using this command for route table entry:  route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.1.1 dev ens4

I have used Ubuntu since Ubuntu 8.10; today I'm working with Ubuntu 12.04 Server.   I am having difficulty keeping static routes on booting. I would usually put the route commands   /sbin/route add -net <IP>/<MASK> <GW> dev <ethX>   in /etc/rc.local or I would create a file (named routes) inside the directory /etc/network/if-up/, but I notice that on Ubuntu 12.04 it isn't working.    If I type the commands in the shell, they work, but the same commands don't work when they  are in the specified file.   I already tried to change the file name to other names thinking that my file name (routes) could be erroneous in Ubuntu 12.04, but that also did not work.  I notice also that command /sbin/ifconfig works, less the /sbin/route.  What changed in network set-up?  How can I define static routes on Ubuntu 12.04?


I have a couple of computers that have multiple drives in them. I have Ubuntu on a USB drive that and right now using the shred option I need to manually run the shred command for each HDD/SSD myself.  Is it possible that it does that shred automatically for all the drives that it has, except for the USB that Ubuntu is running from?

I have a bunch of disks needing shredding. I also have 6 ports for hard drives on my PC. Shred, even running with brief options takes a while. I read the manpage for shred, but I saw no way to shred multiple hard drives concurrently. Is there an easy way to do that?


I know that Stack Overflow is the wrong place to ask for opinions, so instead I'm wondering where I can ask a question about a specific OOP issue. You can ignore the summary below beyond suggesting where I can ask for guidance.     I apologise for being callow enough to mess around with designing a game.  But I'm messing around with it anyway. And I'm not sure whether this structure makes sense:  class Character:      self.name...     self.offense_value     self.defense_value     self.resources_value      def set.offence(self):          self.offence = [algorithm]     ...  class Combat(Character):      ...init class and parent     def attack(self, modifier):          return self.offence + modifier      ...  ...    Are there any Stack Exchange sites where such a question would be on-topic?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I'm creating a text-based blackjack game in Python 3, and one feature I've added is 'ASCII-art' illustrations of cards. This involves a string containing UTF characters which depict a single card:  "╔═════════╗", "║%s%s       ║" % (value, space), "║         ║", "║         ║", "║         ║", "║    %s    ║" % (suit), "║         ║", "║         ║", "║         ║", "║       %s%s║" % (space,value), "╚═════════╝"   The outline of the card uses Unicode characters, as does the suit variable, which can take one of four characters; ♦ (\u2666), ♣ (\u2663), ♠ (\u2660), ♥ (\u2665).   When I run my program inside the python IDLE, the output is fine.     ╔═════════╗   ╔═════════╗          ║4        ║   ║10       ║          ║         ║   ║         ║    __      _  _        ║         ║   ║         ║   /_ |    | || |       ║         ║   ║         ║    | |    | || |_      ║    ♥    ║   ║    ♣    ║    | |    |__   _|     ║         ║   ║         ║    | |       | |       ║         ║   ║         ║    |_|       |_|       ║         ║   ║         ║          ║        4║   ║       10║          ╚═════════╝   ╚═════════╝         When I run it from file explorer and so in Shell (only trying to print Four of Hearts), I get the error;  File "C:\Python34\lib\encodings\cp850.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_map)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u2665' in position 8: character maps to (undefined)   I've tried using the Unicode code points in different ways but none seem to work. I looked into my Python's encodings folder which was referenced in the error, and found there was no appearance of codes for my selected characters. Yes, I have put that UTF-8 declaration at the top of my code.  I'm confused because the characters are able to show up in the IDLE but not the Shell.  What is causing this, and how do I fix it so that the characters display without error?  Python 3.4.2, Windows 64-bit

When I try to print a Unicode string in a Windows console, I get an error . UnicodeEncodeError: 'charmap' codec can't encode character .... I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this? Is there any way I can make Python automatically print a ? instead of failing in this situation? Edit:  I'm using Python 2.5.  Note: @LasseV.Karlsen answer with the checkmark is sort of outdated (from 2008). Please use the solutions/answers/suggestions below with care!!  is more relevant as of today (6 Jan 2016).


I have a wide table that I wish to center, caption and label.   \documentclass{amsart} \usepackage{graphicx,amsmath,gensymb} \usepackage[nobysame,lite,short-months]{amsrefs} \begin{document}         \begin{table}     \centering     \begin{tabular}{*{6}{c|} c}          Polymer & $\sigma$(S/m) &          $\mathrm{T}_{\mathrm{eq}}$ $(\degree C)$ & Time Taken (s) &          Density $\rho$ (kg/$\mathrm{m}^3$) & $\mathrm{C}_{\mathrm{p}}$ (J/kgK)         & K (W/mK) \\ \hline \hline         & & & & & & \\[-.3cm]         Kapton & $8.24 \times 10^{-11}$ & 435 & 556 & 1420 & 1090 &          $<1.4437, 1.4437, .1208>$ \\         PEI & $5.44 \times 10^{-12}$ & 219 & 372 & 1270 & 1135 &         $<1.5430,1.5430,.2215>$ \\         FPE & $5.24 \times 10^{-11}$ & 361 & 955 & 1210 & 1729.41 &         $<1.5232,1.5232,.2103>$ \\         BCB-BNNS & $1.46 \times 10^{-12}$ & 204 & 349 & 1100 & 2300 &          $<1.8119,1.8119,3.1126>$     \end{tabular} \end{table}  \end{document}   However, when I run this code, the table is still too wide, and looks like the following.    Is there any way to fix this inside the table environment?

I have a document containing a table which is slightly too wide for the page. But instead of growing to the right side only, I would like to have it centered on the page.  I have tried to use the center environment but this doesn't seem to help.


I noticed that both microwave oven and Wi-Fi use the same frequency band 2.4-2.5 GHz. Yet microwave oven will certainly fry a living being the Wi-Fi has not done yet I suppose.  So why is Wi-Fi harmless and microwave oven harmful to us?   Why won't our bodies absorb the Wi-Fi energy through dielectric heating like it does if put in a microwave oven?

If we ignore 5GHz WiFi, then both microwaves and WiFi create photons at ~2.4GHz but one of them will boil water in a few seconds but the other doesn't have any effect. So what's the difference?  Is it simply the number of photons created? Is that what the wattage of a microwave measures? If so, what would be the wattage of a wireless router?  Does the enclosed space have anything to do with it?   If it all has to do with power output could I put enough WiFi routers together in a room to cook a turkey (from microwaves and not waste heat)?


I have a valid B1 visa until 2020 and recently my Indian passport got damaged on the front and back, applied for a new passport.   My visa is in a very good condition and passport is also in good condition. Can you please tell me whether I can travel on the visa or should I apply for a new visa?

I got my US B1 visa last month on my Indian passport. Someone in my family wrote a phone number on one of the blank page of my passport. As my passport is damaged now, can I travel with my current passport to US or I should apply for new passport? Also, will B1 visa be valid on old damaged passport if I get new passport?


I am performing a slope analysis (Raster>Analysis>Slope) of a US Geological Survey DEM. I am calculating the slope of a raster DEM saved as a TIF. I set up the slope analysis as per the picture below in EPSG 4326. I tick on calculate percentage and compute edges and leave all other variables as standard. When I calculate the slope in percentage I get really odd values being e to the 6 as shown in the layer panels in the second item down, rather than between 0 and 90%. In the map the layer looks correct though and this is a hilly area. How do I make it so the values appear between 0 and 90? Similarly when slope analysis is performed in degrees (not ticking the percentage option it returns nearly all cells as 90 degrees which isn't correct (layer 2 in layers panel). How do I solve these problems?

I have a DEM layer from ASTER satellite and I want to get the slope information from it.  I use terrain analysis > slope, but the output is so wrong. Why is that?  Here is the DEM:     And here is the "Slope" that is totally wrong. It should stretch the values from 0 - 89.9097 but it does not.


I will be surprised if no one asked this before and I would be happy if it is answered already although I haven't located it just yet! From Einstein's original paper "Does The Inertia of a Body Depend on it's Energy Content" 1905. I am wondering if maybe my original thinking is not right. I always thought that energy increased as velocity increased. End of story. But as I hear videos and read books the mantra seems to be  mass increases as velocity increases. So which is right I wonder. I know I left gamma out of the equation in the question. Assume it is there thank you.

Some people say that mass increases with speed, some people say that the mass of an object is independent of its speed.  I understand how some (though not many) things in physics are a matter of interpretation based on one's definitions. But I can't get my head around how both can be 'true' is any sense of the word.  Either mass increases or it doesn't, right?  Can't we just measure it, and find out which 'interpretation' is right? e.g.: (in some sophisticated way) heat up some particles in a box and measure their weight?  ------------------------------  UPDATE  Right, so I've got two identical containers, each with identical amounts of water, each on identical weighing scales, and each in the same g field. If one container has hotter water, will the reading on its scale be larger than the other? If the answer is yes, and g is constant, does this mean that the m in w=mg has got bigger?


When I wish to share a Facebook post to Instagram on iPhone running iOS 13, Instagram does not appear among the Share Sheet suggestions, not even when I hit MORE...  I have seen numerous how-tos about hitting EDIT and toggling on the applications listed under Suggestions, but Instagram is not listed at all, although I have the app on my phone and use it all the time.  How can I add it to my Share options?

Sometimes when I take a photo I like to share it with friends and family, so I press the button that points up, which then leads to a screen where I can share the photo with facebook, flickr and several other things that I don't use.  Recently I decided to use instagram as a means of sharing photos, since I had noticed some of my friends on facebook doing it.  I installed the instagram app on my iphone and have used it a few times to share photos, but it is missing from the list of things to share with immediately after taking a photo navigated to from the photo gallery.  How can I get instagram to appear in the list of destinations that I see when I decide t share a photo from my phone?


I have a function in python and I want to declare 2 variables only the first time I call this function and then change their values, something like this :  def function():   x=0   z=2   if(x>z):     other_function()   else:     x+=1   With this way,every time I call the function(), x becomes 0 and z becomes 2.   I tried to make them global outside of the function() but it gives me error :      UnboundLocalError: local variable 'x' referenced before assignment   How can I declare the values the first time I call the function()?

What is the idiomatic Python equivalent of this C/C++ code?  void foo() {     static int counter = 0;     counter++;     printf("counter is %d\n", counter); }   specifically, how does one implement the static member at the function level, as opposed to the class level? And does placing the function into a class change anything?


My friends want to play Minecraft together, but they don't want to pay for a Realm. Is there any way to get around that?

I would like to create a minecraft server for me and and my boyfriend to play on.  How do I set it up? Do I need any additional software? Do you have some links to walkthroughs or tutorials?  I have tried to set this up a few times but have failed every time.


java.io.File.list() giving different order as the folders created sequentially  While creating the Temporary folders with name as   "Temp" + auto-incremented number  e.g. Temp1, Temp2, Temp3...Temp10, Temp11 and so on.    But when I use java.io.File.list() to get the folder list to further processing in order as the folder created,   but its giving as Temp1, Temp10, Temp11...Temp19, Temp2, Temp20, Temp21 and so on.  I also tried Arrays.sort(files); but no change in order of folder list   Please tell how to get the same order list as the folders created sequentially?

I want to get a list of files in a directory, but I want to sort it such that the oldest files are first.  My solution was to call File.listFiles and just resort the list based on File.lastModified, but I was wondering if there was a better way.  Edit: My current solution, as suggested, is to use an anonymous Comparator:  File[] files = directory.listFiles();  Arrays.sort(files, new Comparator<File>(){     public int compare(File f1, File f2)     {         return Long.valueOf(f1.lastModified()).compareTo(f2.lastModified());     } });


Lets say I have the following class:  class test(object):     def __init__(self):         self.arr = [0]*10   And then I use it as:  arrOfTests = [test()]*10 arrOfTests[0].arr.insert(0,1) print arrOfTests[0].arr[0] print arrOfTests[1].arr[0]   Which returns  1 1   Why is arr[0] of attOfTests[1] (and also all the others) 1 as well? By all my best effort, I could not figure this out.. Thank you in advance!

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Imagine a situation: an SO user is complaining about inability to create and sprox a woodget. The question title goes: "Help, cannot create a woodget". Code snippet inside:  woo = new Woodget("foo"); woo->Sprox("bar");   You answer the question as initially posed (should've been new Woodget("foo", 1)). The user says "thanks, now the Sprox method fails".  Am I, the answerer, under any moral obligation to debug the rest of the asker's snippet, or is answering the question as initially posed considered sufficient for an answer to be accepted? I feel that I deserve an answer accept. The user might not - the rest of the snippet misbehaves, after all.  Am I justified in telling the user "that's another question, please accept this one and then we'll see"? Or would that be too bitchy?

Before I ask my questions, I need to describe two types of low-quality users.    Type P: A type P user will post a block of code, possibly with a stack trace, and text that boils down to "this doesn't work right, tell me what's wrong." After an early answerer says something like "well, you declare foo but you don't initialize it," the user will stop paying attention and run back to his IDE, perhaps leaving a comment saying "oh I see it now thanks."  Then, five minutes later, the same user will post a new question with the same code (except that foo is properly initialized). Someone else will answer with "oh, you can't put final inside the parentheses, it has to be at the start of the line." This cycle repeats until there are half a dozen questions, each identical to the one before it except for one change.  Type 84: ← AKA  (thanks Grace Note) A type 84 user will initially post the same sort of question as a type P user. After getting an answer, though, he'll update his initial post over and over until the early answers no longer make sense.    Type Ps often turn into type 84s, and vice versa, either on their own or in response to well-meaning commenters who say that their behavior isn't constructive. I'm writing this post in large part because I've been one of those well-meaning commenters and I wish I had a better response.  Of course, the real problem in these cases is that the users are posting code with multiple errors that they don't fully understand. The way we handle things now — which is to say, not very well — gets them frustrated with mean Stack Exchange users, gets us frustrated with clueless newbies and wastes everyone's time in the process.  I realize that I'm not describing a new phenomenon by any stretch of the imagination, but I think we may need a different approach here than we give to low-quality users in general. The low-quality asker algorithm won't pick up on 84s as much, I think, and Ps can tie up a lot of resources before they get noticed. The good thing about Ps and 84s is that they're engaged, so we at least have an opening.  What is the proper response to the situations these users create? How can we best help them with their immediate problems and grow them into productive community members? I realize that a certain subset of these users will never become productive community members. How can we minimize the pain on both sides when dealing with them? It does us no good for people to go around saying SE sucks, after all.  Some of you are probably wondering why I chose P and 84. Well, because it's boring to always use A and B, or 1 and 2.


In bash you can do  if [ $(echo $UID) != 0 ] then     echo "Run as root"     exit fi   This returns an error message when I run the script with dash or other POSIX-compliant shells. How do you do this in POSIX?

Here's my source:  #!/bin/bash  echo "Running script to free general cached memory!" echo ""; echo "Script must be run as root!"; echo ""; echo "Clearing swap!"; swapoff -a && swapon -a; echo ""; echo "Clear inodes and page file!"; echo 1 > /proc/sys/vm/drop_caches; echo "";   It clears caches and stuff, and it echoes that it needs to be run as root in the terminal. I basically just want the script to cease running if it detects it's not being executed as root.   Example:  "Running script to free general cached memory!" "Warning: script must be run as root or with elevated privileges!" "Error: script not running as root or with sudo! Exiting..."   If run with elevated privileges, it just runs as normal. Any ideas? Thanks!


For all integers a,b,c, prove or disprove each of the following:  i.  If a | c and b | c, then ab | c^2.  ii. If a | (b+c), then a | b and a | c.  Note : "If true prove without using numbers as an example otherwise you can use them if false" That's What My Prof. says.  Unfortunately, The first one I couldn't solve it.  Note No. 2 : My Question is different than this Question :    Please help me , I didn't understand the question really  Thank you in advance

I just need to check the reasoning in my proof is correct, I think it is valid although I'm not totally convinced because I can't follow the logic; does proving that $x$ is an integer prove that $ac|bd$?  Theorem: Let $a$, $b$, $c$, $d$ be integers. If $a|b$ and $c|d$, then $ac|bd$.  Proof: $aj=b$ and $ck=d$ for integers $j$, $k$. Then, $ac|bd$ implies $acx=ajck$ and thus $x=jk$ for some $x$. Since the product $jk$ is an integer, $x$ is an integer and thus $acx=ajck$ and thus $ac|bd$.


I generated a dot file using Python.   Each time the file is generated, I need to run a script in the Terminal to convert it to a pdf file or an image.  This is the script:  dot -Tpdf somefile.dot -o somefile.pdf   I was wondering if it is possible to execute this script in the current folder, from within my Python code.

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?


As the activity piles up over the past 1+ years I'm starting to view it as a potential resume building thing and wishing I had used my real name.  Any issues (and is it possible) to switch it?

I'm thinking of changing my username to my real name. Given that I have a presence on some of the sites here (mostly codegolf), what etiquette should I follow when choosing my new name?  As my username is currently Quincunx, I'm thinking of changing it to MyRealName (formerly Quincunx). Or perhaps MyRealName (né Quincunx). Maybe just MyRealName (Quincunx). If I do use these usernames, will people be able to recognize who I am? Or is there already a standard way to change usernames (such as relying on the profile picture)?


I need to prove this:  Let F be a functor between abelian categories. F is aditive iff is right exact or left exact.  I think that for <-- I'll need to use the characterization:  F between aditive categories is an aditive functor iff F preserves products (or coproducts).  So I'll need to prove that if F is right exact, then it preserves coproducts and if F is left exact, it preserves products, and then I could use this result, but I'm not sure about it.  Any help or idea to both sides of the proof is welcome, thanks in advance!

A half exact functor is a functor F (between abelian categories) such that for every short exact sequence: $$ 0 \to A \to B \to C \to 0$$ then $$F(A) \to F(B) \to F(C)$$ is exact. Does anyone has an example of a half exact funtor that is not right nor left exact? What about a functor between abelian categories that is not right nor left nor half exact?


I have a matrix  matrix = [[0.0] * 4] * 4   it looks like:  0    0    0   0 0    0    0   0 0    0    0   0 0    0    0   0   I'm trying to add an element to the second row, third column so that the matrix looks like this:  0    0    0   0 0    0    3   0 0    0    0   0 0    0    0   0   When I do  matrix[1][2] = 3   it gives:  0    0    3   0 0    0    3   0 0    0    3   0 0    0    3   0   How do I fix this?


Why was the timeline not repaired after the Narada came back in time and changed everything? I have seem the Time Travel Repairmen go back in time for much less impactful things than this. So why not? Just how picky are the Time Cops?

Temporal Agents were supposed to keep eyes on timeline. Whenever timeline was altered and Temporal Agents failed to prevent it, it was due to advanced tech of other factions of Temporal Cold War.  Narada was powerful in front of 24th century tech & past, but not in front of 31st century tech. And, it had no Temporal tech (that's why Nero didn't try to return back to 24th century). So, there was no way for them to escape detection etc.  Why didn't Temporal Agents stop Nero?


In Bash (or really any other shell), if I have an arbitrary string that I want to echo, how can I make it so the echo doesn't come out empty if the string is -n, -e, or -E? I would expect something like echo -- -e to work (stopping echo from interpreting any further options), but it doesn't.  Even explicitly specifying a flag doesn't stop it: echo -E -en still gives no output.  Is it possible to be safe when using echo, or do I just have to switch all my echo calls to printf '%s\n'?

I'm using GNU bash, version 3.00.15(1)-release (x86_64-redhat-linux-gnu). And this command:  echo "-e"    doesn't print anything. I guess this is because "-e" is one of a valid options of echo command because echo "-n" and echo "-E" (the other two options) also produce empty strings.  The question is how to escape the sequence "-e" for echo to get the natural output ("-e").


I need to figure out a password, but I'm not supposed to change the password itself. Is there anyway, perhaps through the common-password file or a command to show the plaintext password of a user?

I don't know much of Ubuntu, but is Ubuntu able to decode these sort of things? Or do I need to install some program? If I don't, how do I use Ubuntu to read the file?


Let $f \in L^1(\mathbb{R}^2)$ be radial, i.e. there exists $g: [0,\infty) \rightarrow \mathbb{R}$ such that $f(x) = g(|x|)$. Prove that $f$ is also radial. (Note that this result is true for $\mathbb{R}^n$ for a general $n \geq 1$. Here, for $n=2$, you can use the polar coordinates and change of variables.)   So if $f \in L^1(\mathbb{R}^2)$ is radial, I want to show that there exist a function $h: [0,\infty) \rightarrow \mathbb{R}$ so that $\hat{f}(\xi) = h(|\xi|)$. I know that:  $$\hat{f}(\xi) = \int_{\mathbb{R}^2} f(x)e^{-2\pi i \xi \cdot x} dx = \int_{\mathbb{R}^2} g(|x|)e^{-2\pi i \xi \cdot x} dx = \int_{-\infty}^\infty \int_{-\infty}^\infty g(|x|)e^{-2\pi i (\xi_1x_1+\xi_2x_2)} dx_1dx_2$$  I'm not really sure how to procceed from here

Consider a function $f \in L^2(\mathbb{R}^n)$ such that $f$ is radial. My question is, is the Fourier transform $\hat{f}(\xi)$ automatically radial (I can see it is even in each variable $x_i$), or we need some conditions on $f$? Thanks for your help.


When playing Cribbage, if I played a 7, and my opponent played an 8, (making a 15 for 2 points), can I then play a 6 for a run of three, or do they have to be in consecutive order?

The play was the following set of cards: 4, 3, 6, 4, 5. Should the score be for 4 points for the 3,6, 4, 5 or only 6, 4, 5?


I would like to include a clickable URL in a text written in LaTeX. For that I included the package hyperref. The result obtained by \url gives a clickable link written in \ttfamily (the default font). My question is how to set the font for \url so that I can obtain a clickable link written in the font "Euclid" rather than \ttfamily.  \usepackage{hyperref} \url{http://stackoverflow.com/}

I want to set color, font and similar style attributes for the text in a \url from the hyperref package. How do I go about doing it? All I have found are . I want to because I am using ttf fonts for my texts and I want my urls to be in that ttf and not the default (typewriter font?) that the hyperref package gives me. I started with just trying to get it in italics but didn't even succeed with that:  \documentclass{memoir} \usepackage{hyperref} \begin{document} Lala \url{\itshape www.example.com}. \end{document}     I am guessing there is some hook or something but I just can't find it. Maybe I have gone blind?


I have seen many questions on Stack Overflow with downvotes. If I receive too many downvotes, what should I do?  Should I remove the question?

I've posted a question or an answer, and I have received one or more downvotes. I am not really sure why I was down voted, or I think I know why, but I disagree.  Why did this happen, and what should I do about it?


I want to change the page numbering of my document to say "Page # of ##" instead of just "#". The fancyhdr package appears to change a lot, and it seem unfortunate to have to import it for one small thing.

I want to add a footer to my document displaying the current number out of total number of pages. How do I do that?


Let's say that I have 3 files in a directory:  apple.txt:  apple   beehive.txt:  beehive   zebra.txt:  zebra   If I concatenate this files with:   cat *.txt > all_files.txt  I do get:  apple beehive zebra   (I tested it on 5 files too, and I get the same behavior),  But my is this behavior guaranteed?

I wrote a bash script that processes a list of filenames (using glob expansion, as in for f in *) and then outputs a subset of this list to a file. Subsequently I read the content of this file into an array and perform a plain binary search for specific filenames using the obvious < and > operators for comparing strings.  Considering that I would like the script to work on as many different environments like Linux, MacOS, MinGW, ... (even though it uses things like [[ and stat which are less portable), my questions are:   Do I need to sort the file content (either with sort or additional bash code) or is the glob expansion always sorted - in every environment? Do the conditional operators use the same "sorting" as the expansion (or after sort)?  Would expansion or sort return file10.txt after file2.txt (in what cases?) but using conditional operators file10.txt would be before file2.txt ? What sort option would I  use to fix this? Are there any caveats if some of my filenames are in Unicode?   Are there any issues using specific versions of bash?   Does LC_COLLATE affect any of the above?     I obviously need the file content to match the sorting "method" of the operators in order for the binary search to work as expected...


what is the source of nonce in SALSA20 algorithm.  basically who provides the value of nonce in SALSA20 algorithm

Modern stream ciphers usually predicts the usage of a nonce (also termed as IV) in the cryptosystem. The cost of initializing the cipher with the nonce varies from algorithm to algorithm (for instance, this cost seems very high on HC-256 and negligible on Salsa 20). I would like to know the correct usage pattern of a nonce together with the stream cipher in a cryptosystem. The only thing I know for sure is that they must never repeat...   Does it needs to be new for every transmitted message? It must be secret? (Is it assumed to be known by an attacker)?


Is there a way in Python 3 to indicate that a class does not support some operation that its parent class supports?*  I know that classes can set __hash__ to None to indicate a type is unhashable, but this doesn't seem to work in general.  For example, let's suppose I have some collection class with a __len__ method, and I want to make a child class representing an unbounded collection that has no defined size.  If I set __len__ to None in the subclass I get an ugly/confusing error message when I try to get the length of the collection.  >>> class C: ...     def __len__(self): ...         return 3 ...  >>> class D(C): ...     __len__ = None ...  >>> len(D()) Traceback (most recent call last):   File "<stdin>", line 1, in <module> TypeError: 'NoneType' object is not callable   I would like to get an error as if D did not define __len__ at all:  >>> class E: ...     pass ... >>> len(E()) Traceback (most recent call last):   File "<stdin>", line 1, in <module> TypeError: object of type 'E' has no len()    is related, however my question pertains specifically to magic methods / operator overloading.  Since Python magic methods are looked up directly on the object's type, some possible approaches like overriding __getattribute__ or using descriptors would not work here.  *Note: I know this would violate the , but if I wanted type safety I wouldn't be using Python in the first place.  ;)

In C++ you can disable a function in parent's class by declaring it as private in the child class. How can this be done in Python? I.E. How can I hide parent's function from child's public interface?


I would like to transform this XML to where only certain lines are joined together.  This is so I can later grep only specific lines.  If this XML used attributes, then the data would already be in 1 line.  I don't want to do this with any XSLT. grep, sed, awk, xmlstarlet, xpath would be great  So if a line contains "<instruction>", then I need to grab the next 4 lines and put them all in one line.  No commas.  As shown below.  this is not like the question posted : that had a set pattern of a date that started the sequence to "join".    awk '     /\<instruction\>/ && line {print line; line=""}     {line = line ? line" "$0 : $0}     END {print line} '   this folded in the  line UP TO the end tag , but didn't bring in the end tag line itself.  Platform will be on Windows 2012R2 server.  Will install Gnu utils.  File is approx 100k in size.                          <instruction>                           <name>AAAAA</name>                           <value>WHITE</value>                           <type>0</type>                         </instruction>                         <instruction>                           <name>BBBBB</name>                           <value>WHITE</value>                           <type>0</type>                         </instruction>                         <instruction>                           <name>CCCCC</name>                           <value>WHITE</value>                           <type>0</type>                         </instruction>                       <routing/>                       <phantom>False</phantom>                       <AssemblyHistory/>   DESIRED OUTPUT: (may have wrapped, but the Instruction element should all be in 1 line)  <instruction><name>AAAAA</name><value>WHITE</value><type>0</type></instruction> <instruction><name>BBBBB</name><value>WHITE</value><type>0</type></instruction> <instruction><name>CCCCC</name><value>WHITE</value><type>0</type></instruction> <routing/> <phantom>False</phantom> <AssemblyHistory/>  SIMILAR EXAMPLE  (not well formed XML)  data line 2 cust: tommy smith 123 main endcust data line 16 TRACE: error at xy123 cust: mary  smith 444 broadway endcust LOG: logon tty3 LOG: free memory before gc 33453211 root: ps -ealf  tty0    data line 2 cust: tommy smith123 main endcust data line 16 TRACE: error at xy123 cust:mary smith444 broadway endcust LOG: logon tty3 LOG: free memory before gc 33453211 root: ps -ealf  tty0    Copy the entire file to stdout, omitting no lines. When you find "cust:", either: 1) JOIN the next 4 lines  OR 2) JOIN lines up until you find "endcust"  Its the same thing, but this time you can't use an XML tool.  So if this was the case, how would you solve it?  If the top Question is XML, then fine. If not, use the 2nd example

Between first occurrence of Cat to next occurrence of Cat, it should create a separate line with delimiter as ",".  File input  as below.  Cat AA BB CC Cat AA-1 BB-1 CC-1   Output expected:  Cat,AA,BB,CC Cat,AA-1,BB-1,CC-1


I am doing unit test case for mongoDB read operation. When I try to mock find operation, I am getting a NullPointerException     public class MongoQueriertest {          HelperUtil testhelper = new HelperUtil();          DBCollection feedCollection;         DBCursor curr;          @Test(expected=NullPointerException.class)         public void test_MongoQuerier ()throws Exception {              MongoQuerier query = new MongoQuerier();             FindIterable iterable = mock(FindIterable.class);             curr =  mock(DBCursor.class);             BasicDBObject obj = mock(BasicDBObject.class);             when(feedCollection.find(obj)).thenReturn((DBCursor) iterable);             query.getMaxId("String");            }      }  Method to test  public String getMaxId(String dataVersion) throws Exception{     String  maxJobId = "1";      try {        BasicDBObject whereQuery = new BasicDBObject();     whereQuery.put("instance", dataVersion);        DBCursor curr = feedCollection.find(whereQuery);  //.sort(new BasicDBObject(mongoDBSetting.maxIdField.replace("$", ""), -1)).limit(1);        //AggregationOutput cursor = feedCollection.find().sort(""); //.aggregate(Arrays.asList(query));       while (curr.hasNext()) { //      String mid = curr.next().get(mongoDBSetting.maxIdField.replace("$", "")).toString(); //       //      mid = mid.replace("", "");          maxJobId =  curr.next().get(mongoDBSetting.maxIdField.replace("$", "")).toString(); //Integer.parseInt(mid);        }       /* for (DBObject result : curr.results()) {         maxJobId = Integer.parseInt(result.get(mongoDBSetting.maxIdField.replace("$", "")).toString());             break;       }*/      }     catch (Exception ex) {       AppLogger.EventLogger.error("Exception occured selecting maxid in mongoDB. Exception -" + ex.getMessage().toString());       throw new Exception(ex.getMessage().toString());     }     return maxJobId;   }   Please let me know where I am missing. I have added method that needs test case.

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?


String s1 = "String"; String s2 = "String" + ""; String s3 = "" + s2; System.out.println (s1 == s2); System.out.println (s2 == s3); System.out.println (s1 == s3);  true  false  false   Why do I get false values ? Shouldn't be s3 variable in String pool ? It's the same. It seems I don't understand String pool fully.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


At times I want to use my external keyboard, but don't have my external mouse around or it's death with batteries, which is the time I wish to navigate my cursor with the keys of my keyboard. So I go with this:    But the navigation is utterly and unusably slow. Even if I put my mouse/touchpad speed to max, it's hardly usable.  Is there any hidden .config file to fix, or other software for that kind of functionality?  Thanks in advance!

Due to large quantities of Chocolate Cake falling on my computer's touchpad it has become unresponsive at times (though the left- and right-click works fine) and I would like to make it so that when I press CTRL and at the same time hold down one or two of the arrow keys for the mouse to move accordingly. So if the up-arrow key is pressed it will move up, if the left-arrow key, then left, and so, and if the right-arrow key and the top-arrow keys are being help down together for it to move diagonally (and so on for the rest of the keys).  I am running Ubuntu GNOME 15.10 with GNOME 3.18, can this be done? And if so how? I would accept a script which does this.


I was viewing my .bash_profile file, and I saw this written inside a block of if statement:  if [ -f ~/.bashrc ]; then        . ~/.bashrc    Can someone explain what the second line is actually doing?

From  we learn that in order for Bash to perform auto-completion one must perform . /etc/etc/bash_completion.d/foobar (note the space after .) in order for Bash completion to work.  $ /etc/bash_completion.d/ssh bash: /etc/bash_completion.d/ssh: Permission denied $ . /etc/bash_completion.d/ssh $ ls -l /etc/bash_completion.d | grep ssh -rw-r--r-- 1 root root   297 Jan 28 18:04 ssh   Is . a shortcut for the source command? If not, then what is it? It is impossible to google for, man source returns nothing, and apropos source and info source give so much irrelevant information that I cannot tell if what I'm looking for is in there. How might I even begin to RTFM to find the answer to this question myself?


What are the irreducible elements of the ring of entire functions ? I cannot find these. please anybody help.

Here's how far I have gone:  I first find the units in $R$. Let $f$ $ \in $ $R$ be a unit. Then $\exists$ $g$ $\in$ $R$ such that $fg=1$, i.e $f(z)g(z)=1$ $\forall$ $z$ $\in$ $\Bbb C$.  Then, $f(z)$ $=$ $\frac 1{g(z)}$ $\forall$ $z \in \Bbb C$. Hence $f(z),g(z) \neq 0$ $\forall$  $z \in \Bbb C$.  Now to find the irreducibles, let $f \in R$ be an irreducible. Hence whenever  $f(z)=g(z)h(z)$ for $g,h \in R$, then $g$ or $h$ is a unit.  Let $h$ be the unit and $\alpha$ be a zero of $f$. Then $f(\alpha)=g(\alpha)h(\alpha)=0$ $\Rightarrow$ $g(\alpha)=0$. Hence $z-\alpha$ is a factor of $g$. So $g(z)=(z-\alpha)^ng_1(z)$ for some $n \in \Bbb N$, where $g_1$ is unit. Since $f$ is irreducible, hence $n=1$.  I'm stuck here. What can be my next step?


I'm trying to simulate a lot of popcorn in a bucket, what's the best way to simulate them in the bucket? I know the method of Rigidy Body Simulation, creating several popcorn, is there a better way?

I have tried everything to fill an invisible container with particles but the particles just seems to sinks to the bottom and they don't fill the container. I am trying to create something like in the video below how balls take the shape and fill up the space i want to create something like this. Please help.  Edit : have also tried the molecular script but that doesn't seem to work as well.


I am setting a variable like this:  myvar=$(command --params)   I want to check the exit code ($?) of my command afterwards.  Checking $? like this always returns 0 because it successfully set the variable to the output of the command.  Is it possible to get the return value of command?

I have seen constructs in scripts such as this:  if somevar="$(somecommand 2>/dev/null)"; then ... fi   Is this documented somewhere?  How is the return status of a variable determined and how does it relate to command substitution?  (For instance, would I get the same result with if echo "$(somecommand 2>/dev/null)"; then?)