In deleted comments, the moderator's name appears with the same background used for the user who asked the question
Mod shows up with OP background when viewing deleted comments
How to make tr aware of non-ascii(unicode) characters? I'm trying to remove some characters from file(UTF-8). I'm using tr for this purpose:   tr -cs '[[:alpha:][:space:]]' ' ' &lt;testdata.dat    File contains some foreign characters (like "Латвийская" or "àé"). tr doesn't seem to understand them: it treats them as non-alpha and removes too.  I've tried changing some of my locale settings:  LC_CTYPE=C LC_COLLATE=C tr -cs '[[:alpha:][:space:]]' ' ' &lt;testdata.dat LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=C tr -cs '[[:alpha:][:space:]]' ' ' &lt;testdata.dat LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=ru_RU.UTF-8 tr -cs '[[:alpha:][:space:]]' ' ' &lt;testdata.dat   Unfortunately, none of these worked.  How can I make tr understand Unicode? I've got the new Canon Pixma MG 3150 and so far, I can't seem to find a driver anywhere. I do have the CD for both Windows and Mac, but this doesn't help me, as I have Ubuntu 11.10. I'd prefer to have it running on the wifi.  I'm really new to this, so I need for you to explain this to me as basically as possible. How do I limit the number of rows returned by an Oracle query after ordering? I have two identical folders, with same structure and contents like this:  folder_1   hello.txt   subfolder     byebye.txt  folder_2   hello.txt   subfolder     byebye.txt   if I compress them as tar.xz formats I get two different archives with two different file sizes (just a few bytes, but they're not identical).  $ cd folder_1 &amp;&amp; tar -Jcf archive.tar.xz * $ cd folder_2 &amp;&amp; tar -Jcf archive.tar.xz *   I get:  folder_1/archive.tar.xz != folder_2/archive.tar.xz   and of course if I md5sum or sha1sum them I'll get two different hashes  And that's my problem... I need to check if a provided archive is identical to the one I have in my storage. I cannot use hashing nor just check file sizes.  Using zip instead of tar.xz works as zip always produces identical achives from identical files. Why is this happening? Is there a way to prevent it? I was just wondering why Fresnel Lenses are not widely used in the production of solar electricity. Their use there would mean that you could produce heat within a fraction of a second, up to a few minutes and run a turbine to produce electricity.  Though it is used in welding, I am not sure what are the problems in producing electricity, as stated by :     New applications have appeared in solar energy, where Fresnel lenses can concentrate sunlight (with a ratio of almost 500:1) onto solar cells. Ordeal of Heliod and changing creature control Here is the situation that came up:  Player 1 controls a creature enchanted with  and two +1/+1 counters. On Player 2's turn, they cast  to take control of the creature, and then attack with it. The attack triggers the Ordeal, putting another +1/+1 counter on it. Now that it has three counters, it is sacrificed and a player gains 10 life.  Which player sacrifices the enchantment and gains 10 life? The controller of the creature (Player 2) or the player who cast the enchantment (Player 1)? Exercise 3.5.12. Let $ f: \mathbb N \times \mathbb N \to \mathbb N$ be a function, and let c be a natural number. Show that there exists a function $a:\mathbb N\to \mathbb N$ such that $$a(0)=c$$ and $$a(n++)=f(n,a(n))\;for\;all\;n\in \mathbb N,$$ and furthermore that this function is unique. Tao gives the hint: first show inductively, by a modification of the proof of Lemma 3.5.12, that for every natural number $N\in \mathbb N$, there exists a unique function $a_N:\{ n\in \mathbb N:n\lt N\}\to \mathbb N $ such that $a_N(0)=c$ and $ a_N(n++)=f(n,a(n))$ for all $n\in \mathbb N$ such that $n\lt N$.  In my opinion, we could solve it by proving that $\forall n\in \mathbb N,a(n)\in \mathbb N$ according to mathematcial induction.  The property P(n) is:$$\forall n\in \mathbb N, a(n)\;is\;unique$$ P(0) is true. And if P(n) holds, P(n++) is true because different natural numbers must have different successors. $$a(n++)=f(n,a(n))$$ $$a(m++)=f(m,a(m))$$ $$n++=m++\Rightarrow n=m\Rightarrow a(n++)=a(m++)$$ It's similar to the proof of  Proposition 2.1.16 (Recursive definitions): Suppose for each natural number $n$, we have some function $f_{n} : \mathbb{N} \rightarrow \mathbb{N}$ from the natural numbers to the natural numbers. Let $c$ be a natural number. Then we can assign a unique natural number $a_{n}$ to each natural number $n$, such that $a_{0} = c$ and $a_{n{++}} = f_{n} (a_{n})$ for each natural number $n$.  This proof indicates both the existence and uniqueness of the function $a$. I don't know why Tao says it's informal.  But regarding the hint, how do we get the function f even if we've got the conclusion from the hint. Also it seems like the function a(n) can be diffentent considering different N. I don't know if the hint is correct. How long would it take me to travel to a distant star? Suppose I wanted to travel to one of the recently discovered potentially Earth-like planets such as Kepler 186f that is 490 light years away. Assuming I had a powerful rocket and enough fuel, how long would it take me? How to measure GPU usage? How can I make a plane's edges taper inwards? How can I deform one edge or multiple edges of a plane or cube so they are tapered in and rounded equally? FIELD_INTEGRITY_EXCEPTION: field integrity exception: unknown (invalid user or group: 005XXXXXXXXXXXX) I've a object called myobject__c. This object is private in OWD Setting.  Now when admin create a new record of this object then I want to share this record with a user(community user). For this I've written a code in trigger to create a sharing record of this object (myobject__Share).  But I am getting a problem of :-      FIELD_INTEGRITY_EXCEPTION: field integrity exception: unknown (invalid   user or group: 005XXXXXXXXXXXXX).   how can I solve this problem and second doubt is can we create share record for community user or not. I've been programming in Java for a while and just got thrown onto a project that's written entirely in C#.  I'm trying to come up to speed in C#, and noticed enums used in several places in my new project, but at first glance, C#'s enums seem to be more simplistic than the Java 1.5+ implementation.  Can anyone enumerate the differences between C# and Java enums, and how to overcome the differences?  (I don't want to start a language flame war, I just want to know how to do some things in C# that I used to do in Java).  For example, could someone post a C# counterpart to Sun's famous Planet enum example?  public enum Planet {   MERCURY (3.303e+23, 2.4397e6),   VENUS   (4.869e+24, 6.0518e6),   EARTH   (5.976e+24, 6.37814e6),   MARS    (6.421e+23, 3.3972e6),   JUPITER (1.9e+27,   7.1492e7),   SATURN  (5.688e+26, 6.0268e7),   URANUS  (8.686e+25, 2.5559e7),   NEPTUNE (1.024e+26, 2.4746e7),   PLUTO   (1.27e+22,  1.137e6);    private final double mass;   // in kilograms   private final double radius; // in meters   Planet(double mass, double radius) {       this.mass = mass;       this.radius = radius;   }   public double mass()   { return mass; }   public double radius() { return radius; }    // universal gravitational constant  (m3 kg-1 s-2)   public static final double G = 6.67300E-11;    public double surfaceGravity() {       return G * mass / (radius * radius);   }   public double surfaceWeight(double otherMass) {       return otherMass * surfaceGravity();   } }  // Example usage (slight modification of Sun's example): public static void main(String[] args) {     Planet pEarth = Planet.EARTH;     double earthRadius = pEarth.radius(); // Just threw it in to show usage      // Argument passed in is earth Weight.  Calculate weight on each planet:     double earthWeight = Double.parseDouble(args[0]);     double mass = earthWeight/pEarth.surfaceGravity();     for (Planet p : Planet.values())        System.out.printf("Your weight on %s is %f%n",                          p, p.surfaceWeight(mass)); }  // Example output: $ java Planet 175 Your weight on MERCURY is 66.107583 Your weight on VENUS is 158.374842 [etc ...] Simplify result of $\int_0^{\infty} \frac{1}{1+x^n}dx$ It is quite easy to show that (by using residue theorem) $$\int_0^{\infty} \frac{1}{1+x^n}dx = \frac{2 \pi i^{1+2/n}}{n(e^{2 \pi i / n} - 1)} $$ for $$n \ge 2$$  Is there any possibility to simplify $$\frac{2 \pi i^{1+2/n}}{n(e^{2 \pi i / n} - 1)}$$ or it is best result?  Thanks in advance! Consider an isosceles triangle. Let r be the radius of the circumscribed circle and p be the radius of the inscribed circle. Prove that the distance d between the centers of these two circles is $$d = \sqrt{r(2p-r)}$$ Complete Installation Guide for Android SDK / ADT Bundle on Ubuntu What all needs to be done to install Android SDK / ADT Bundle on Ubuntu?  Each of the steps in the answer was found on some different forum as I encountered obstacles getting started with my Android SDK and posted questions in appropriate forums thereafter. So I thought this would be useful in that it is a one stop solution available, in case one ever needs to re-install Ubuntu and install the Android SDK / ADT Bundle from scratch! What are the answers for these basic quetions? How to compare two time series? I have collected temperature readings for 4 locations on a beach in Cornwall UK using data loggers. The loggers recorded temperature every 15 mins accurate to .1 of a degree (Celsius). The loggers collected data for 10 days with a one day break to calibrate the sensors. In total I used 30 sensors with 6-7 sensors in each position.  I have now downloaded the data and have produced time-series for temperature over the 10 day period. Visual inspection of the time-series shows how the temperature changes with tides and night and day. I want to investigate whether the time-series differ significantly from one another. Please could someone point me in the direction of a technique to do this in SPSS? What causes the 'Connection Refused' message? Which B2C option to choose? A stock Salesforce org is geared toward B2B companies, but I work in Higher Ed and we're B2C-focused.  There seem to be three main B2C options available:   Person Accounts Nonprofit Starter Pack (NPSP) 1-to-1 model NPSP bucket model   Why would I choose one option over the other? I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.