Regular Expression to exclude a particular filename in Java
Regular expression to match a line that doesn't contain a word
Moderncv package - cventry date width I am writing my CV using moderncv package, everythig is nice but I have a problem with \cventry command. I have something like this:   (it means 2010 - now)  I would want to have this in one line, rather than in two lines. I tried looking into the moderncv style files but with no success. What can I do to achieve the effect I want? Use induction to prove the following: $1! + 2! + .... + n! \le (n + 1)!$ Convert a string representation of a hex dump to a byte array using Java? I am looking for a way to convert a long string (from a dump), that represents hex values into a byte array.  I couldn't have phrased it better than the person that posted .  But to keep it original, I'll phrase it my own way: suppose I have a string "00A0BF" that I would like interpreted as the  byte[] {0x00,0xA0,0xBf}   what should I do?  I am a Java novice and ended up using BigInteger and watching out for leading hex zeros. But I think it is ugly and I am sure I am missing something simple. Write a formula in an Excel Cell using VBA I'm trying to use VBA to write a formula into a cell in Excel. My problem is that when I use a semicolon (;) in my formula, I get an error:     Run-time error 1004   My macro is the following :   Sub Jours_ouvres()     Dim Feuille_Document As String     Feuille_Document = "DOCUMENT"             Application.Worksheets(Feuille_Document).Range("F2").Formula = "=SUM(D2;E2)"     End Sub Structure of a C++ Object in Memory Vs a Struct If I have a class as follows     class Example_Class     {        private:          int x;           int y;         public:           Example_Class()           {               x = 8;              y = 9;          }        ~Example_Class()         { }     };   And a struct as follows  struct {    int x;    int y; } example_struct;   Is the structure in memory of the  example_struct simmilar to that in Example_Class  for example if I do the following  struct example_struct foo_struct; Example_Class foo_class = Example_Class();  memcpy(&amp;foo_struct, &amp;foo_class, sizeof(foo_struct));   will foo_struct.x = 8 and foo_struct.y = 9 (ie: the same values as the x,y values in the foo_class) ?  The reason I ask is I have a C++ library (don't want to change it) that is sharing an object with C code and I want to use a struct to represent the object coming from the C++ library. I'm only interested in the attributes of the object.  I know the ideal situation would be to have Example_class wrap arround a common structure between the C and C++ code but it is not going to be easy to change the C++ library in use. Scenario: My friend John has a personality disorder, intensely paranoid for example.  Can I say:     There were three events last year that told me John had a problem.   or can I say:     There were threee events last year that told me John has a problem. How many combinations of groups are there where no member of a group has been with another member before? I found this hard to word in the title, so let me give an example. I have 16 students, and I want to split them up into 4 groups of 4. However, I want to make sure that every time I have a new combination of groups, that a student has never been with any of their new groupmates before. I found info on how to separate objects into groups, but not in only unique ways as I've described above. I think I figured this out the rote way, by assigning each student a number and then finding the unique combinations, and got 3. But I'd like to know the math behind it, and how it could be applied to other configurations (20 students w/ 4 groups of 5?). Thanks for any help you can give! I am looking for either an online tool or one that I can download to convert DD to DMS.  For example, I want to convert from:  41.590833, -93.620833 to 41° 35′ 27″ N, 93° 37′ 15″ W ...  Those are the coordinates, according to , for Des Moines. Create longer arrows If I have Optimize iPhone Storage enabled on my iPhone and my phone storage is completely full, I understand that iOS will only store a low-res thumbnail of many of my photos on the device. (The full high-res version of the image will only exist in iCloud and on devices with Download and Keep Originals enabled.)  But when only thumbnails exist on the device, how does that work in relation to other photo apps on iOS? For example, do third-party cloud-based photo apps (like Google Photos, Dropbox's Carousel, or Amazon Prime Photos) have access to the full high-res images from the iCloud Photo Library? Or will they only see the low-res thumbnails in some cases? Identifying genes from a list of genes I have a gene list file. Some thing like this      SWT21     SSA1     NRP1     EFB1     TFC3     MDM10   I have another file which also contains the names of these genes in my list along with other essential information about them. The second file looks like this:  chrI    147593  151166  YAL001C -   TFC3 chrI    143706  147531  YAL002W +   VPS8 chrI    142173  143160  YAL003W +   EFB1 chrI    140759  141407  YAL004W +   YAL004W chrI    139502  141431  YAL005C -   SSA1 chrI    137697  138345  YAL007C -   ERP2 chrI    136913  137510  YAL008W +   FUN14 chrI    135853  136633  YAL009W +   SPO7 chrI    134183  135665  YAL010C -   MDM10   I want to extract those lines in the 2nd file which have gene names as are present in first file. I use \includegraphics command to insert image to the document. But how can I add a border around this image w/o any margin between border lines and image? It seems to be very easy, but I can't find it in the documentation. In grade school we learn to rationalize denominators of fractions when possible. We are taught that $\frac{\sqrt{2}}{2}$ is simpler than $\frac{1}{\sqrt{2}}$.  says that "there is a bias against roots in the denominator of a fraction". But such fractions are well-defined and I'm failing to see anything wrong with $\frac{1}{\sqrt{2}}$ - in fact, IMO it is simpler than $\frac{\sqrt{2}}{2}$ because 1 is simpler than 2 (or similarly, because the former can trivially be rewritten without a fraction).  So why does this bias against roots in the denominator exist and what is its justification? The only reason I can think of is that the bias is a relic of a time before the reals were understood well enough for mathematicians to be comfortable dividing by irrationals, but I have been unable to find a source to corroborate or contradict this guess. Comparing two logit or probit curves using a single parameter I've conducted a psychological experiment on the same subject, under two different condition. For each condition I've collected the number of correct and wrong answer for each stimulus (number of trials per stimulus = 10; number of stimulus = 15). From the data collected I fitted a psychometric curve (probit or logit curve), and now I want to compare the results.  Consider subject 1: His answers are collected in the following matrices  **COND_1**     correct cnt   Y  N   1   0 10   2   0 10   3   0 10   4   0 10   5   0 10   6   0 10   7   1  9   8   4  6   9   5  5   10  7  3   11  8  2   12  7  3   13 10  0   14 10  0   15 10  0  **COND_2**     correct cnt   Y  N   1   0 10   2   2  8   3   2  8   4   3  7   5   2  8   6   4  6   7   8  2   8  10  0   9   8  2   10 10  0   11  9  1   12 10  0   13 10  0   14 10  0   15 10  0  COND_1.1 &lt;- matrix(c(0, 2, 2, 3, 2, 4, 8, 10, 8, 10, 9, 10, 10, 10, 10, 10, 8, 8, 7, 8, 6, 2, 0, 2, 0, 1, 0, 0, 0, 0), byrow=F, ncol=2)  COND_1.2 &lt;- matrix(c(0, 0, 0, 0, 0, 0, 1, 4, 5, 7, 8, 7, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 6, 5, 3, 2, 3, 0, 0, 0), byrow=F, ncol=2)  cnt &lt;- seq(from=0, to=1.4, by=0.1)  ddprob.1.1 &lt;- glm(COND_1.1 ~ cnt, family = binomial(link = "probit"))  ddprob.2.1 &lt;- glm(COND_2.1 ~ cnt, family = binomial(link = "probit"))     Observing the plot, you can surely say that performance under condition 2 is better then the performance under condition 1. In fact if you compute some parameters like AUC, p25, p50, p75 (the value of the stimulus at which the number of correct answers are 25%, 50% and 75% each) [threshold parameters], you'll see that:  COND_1      COND_2 AUC    &lt;    AUC p25    &gt;    p25 p50    &gt;    p50 p75    &gt;    p75     Now consider subject 2:  COND_1     correct cnt   Y  N   1   0 10   2   0 10   3   0 10   4   0 10   5   3  7   6   3  7   7   4  6   8   5  5   9   9  1   10  9  1   11 10  0   12 10  0   13 10  0   14 10  0   15 10  0  COND_2     correct cnt   Y  N   1   0 10   2   1  9   3   0 10   4   4  6   5   2  8   6   6  4   7   4  6   8   7  3   9   4  6   10  7  3   11  7  3   12 10  0   13  9  1   14 10  0   15 10  0   COND_1.2 &lt;- matrix(c(0, 0, 0, 0, 3, 3, 4, 5, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 7, 7, 6, 5, 1, 1, 0, 0, 0, 0, 0), byrow=F, ncol=2) COND_2.2 &lt;- matrix(c(0, 1, 0, 4, 2, 6, 4, 7, 4, 7, 7, 10, 9, 10, 10, 10, 9, 10, 6, 8, 4, 6, 3, 6, 3, 3, 0, 1, 0, 0), byrow=F, ncol=2) cnt &lt;- seq(from=0, to=1.4, by=0.1)  ddprob.1.1 &lt;- glm(COND_1.2 ~ cnt, family = binomial(link = "probit")) ddprob.2.1 &lt;- glm(COND_2.2 ~ cnt, family = binomial(link = "probit"))   The plotted curves are shown in the image below.    Can you say what performance is better? Under condition 1 or under condition 2? Extrapolating AUC, p25, p50, p75, you have:  COND_1      COND_2 AUC     &gt;   AUC p25     &gt;   p25 p50     =   p50 p75     &lt;   p75   So my question is: Is there a method to say that a generic curve (logit, probit or whatelse) is HIGHER then another? Is there a method to compare (a single number of "performance") that describe the differences of the two curves? My example shows that AUC, p25, p50, p75 are not good parameters. I'd like to compute a single numeric parameter for each curves, to make a simple t-paired test, extrapolated from the distribution seen. How to prove $ \prod_{d|n} d= n^{\frac{\tau (n)}{2}}$ how to prove:   $$ \prod_{d|n} d= n^{\frac{\tau (n)}{2}}$$   $\prod_{d|n} d$ is product of all of distinct positive divisor of $n$,  $\tau (n)$ is number (count)of all of positive divisor of $n$ Can we simulate the whole universe in computer? Here is an idea: As human kind we discovered many laws, formulas, events, etc. in our surrounding environment.here is a way to discover the unknowns :   Now if we simulate a virtual world with our knowledge in computers we expect it to work, because we guess that we know all of it. If a bug occurs in the simulation or something acts differently from the expected in the real world, that may tell us that there is something new; a thing (law, formula, ...) that we didn't know, which causes that bug or that anomaly.  For examples imagine that we created a virtual simulation for motion dynamics and we didn't add the friction to our simulation. Everything in the simulation will work fine but in a different manner. So if we hadn't discovered friction yet, would it help us to think about if there is something we didn't add? Or if there is something we don't know?       But can we simulate the whole universe, everything we know, in one simulation? I know it will require a deadly high computational power. Something like what they did for DNA; two years of computation to analyse their pattern. can we simulate everything we know to create a virtual universe to compare it to our real universe? Can I put \fbox along the diagonal so that they touch each other? Extract date from a variable in a different format Let me explain you the problem   $ date +%c -d "$d" Tue 31 Dec 2013 01:13:06 PM CET $ date +'Today is %F' -d "$d" Today is 2013-12-31   This solution corresponds to current date.  But I have one variable which stores date other than current date  $Prev_date="Wed Dec 25 06:35:02 EST 2013"    I am looking for solution to read this date as 2013-12-25 and store it in a variable.  I have tried this:  a=`date --date=$Prev_date '+%y/%m/d'` echo $a   It's giving this error:  date: illegal option -- date=Wed usage: date [-u] mmddHHMM[[cc]yy][.SS] date [-u] [+format] date -a [-]sss[.fff] Remote logging with Syslogd, can I change the hostname? I am running ddwrt v24-sp2 on three WRT54GL routers. These routers all send their syslog information to the same remote server using syslogd  The problem is that in the logs the hostname will change between the LAN IP and 127.0.0.1.  This makes it hard to tell which device is doing what when I have several events listed as localhost and makes it impossible to script events to happen when certain syslog messages are received.   Does anyone know of any way I can differentiate which message comes from which host? Is there some option I did not see to for a tag or extra information into the message. Can I force the host to send its hostname with each message?  Here is an example of the syslog output:     06-28-2010 11:43:57    User.Info   10.255.255.2    Jun 28 17:43:58 : >Connecting to *.*.*.*      06-28-2010 11:43:54    User.Info   127.0.0.1   Jun 28 17:43:54 : >Connecting to *.*.*.*       06-28-2010 11:43:52    Daemon.Info 10.255.255.1    Jun 28 17:43:53 >chillispot[428]: chilli.c: 1088: Rereading configuration file and doing DNS lookup      06-28-2010 11:43:51    Daemon.Info 127.0.0.1   Jun 28 17:43:52 >chillispot[623]: chilli.c: 1088: Rereading configuration file and doing DNS lookup      06-28-2010 11:43:51    Daemon.Info 10.255.255.3    Jun 28 17:43:51 >chillispot[4185]: chilli.c: 1088: Rereading configuration file and doing DNS lookup   thanks  Chris Example of modules that are projective but not free; torsion-free but not free