How to split the ending of a file name using JavaScript
How to get the file name from a full path using JavaScript?
How to remove ":" (colon) when displaying field name? I created a custom content type with some text fields. In the view settings of that content type I defined both to appear and as well their titles (names of the fields) to be displayed above the content of the fields respectively.  But how can I remove the trailing colon of the titles? Is there a way of modifying the way field names are display just for certain content types? I do not want this altered site wide (e.g. for all fields of all content types).  PS: I'm already using the "views" module to define a special layout for this custom content type. Probably there is a way to carry out these changes with the help of the "views" module and a custom layout template?  /edit/ I did not create a view (as with the "views" module) to display that content but used Drupal's own content type view configuration (maybe called "display"). I'm working with a localized Drupal and retranslating the different words.  Remark: Using Drupal 7.10 with Views 7.x-3.0-rc3 I deleted the "/etc/passwd" file and cannot log in I was trying to change my username and also my home directory (/home/username) and my system started to crash. I deleted the passwd file but I had a backup named passwd_bkp. I tried to rename this passwd_bkp as passwd and it did not work. No commands were being executed... I was in a terminal window.   I restarted my system and now I cannot log in. GRUB gives two options: Linux and recovery mode.   I tried to open a sessions as root but it says the filesystem is corrupted. I cannot access my files.  Did I lose all my files? 'POCO' definition Can someone define what exactly 'POCO' means? I am encountering the term more and more often, and I'm wondering if it is only about plain classes or it means something more? Distribution of the digits of Pi Can anything be stated about the distribution of the digits of Pi, i.e., if I were to sample n digits of Pi, can anything be said about the probability to observe certain digits, or is there any reason to assume that they would not be evenly distributed? This is purely a curiosity question. I'm looking for a way to search files where two word instances exist in the same file.  I've been using the following to perform my searches up to this point:  find . -exec grep -l "FIND ME" {} \;   The problem I'm running into is that if there isn't exactly one space that between "FIND" and "ME", the search result does not yield the file.  How do I adapt the former search string where both words "FIND" and "ME exist in a file as opposed to "FIND ME"?  I'm using AIX. How do I manage double-faced cards in Innistrad (MTG) tournament play? I'm having trouble editing this file on Windows 7:  C:\Program Files (x86)\CMake 2.8.7\share\cmake-2.8\Modules\FindJNI.cmake   If I edit it in Cygwin (vi) or TextPad, those two programs see the changes, so it's getting written to disk somewhere.  But if I "type" the file in a DOS cmd shell, it looks like the file hasn't been changed at all.  One thing I noticed is that in the cmd shell, the owner is Administrators, but in Cygwin's bash shell, the owner is Dan:  C:\Program Files (x86)\CMake 2.8.7\share\cmake-2.8\Modules&gt;dir /Q FindJ*  Volume in drive C is Windows7_OS  Volume Serial Number is 92CA-8707   Directory of C:\Program Files (x86)\CMake 2.8.7\share\cmake-2.8\Modules  12/30/2011  09:45 AM             1,480 BUILTIN\Administrators FindJasper.cmake 12/30/2011  09:45 AM             7,951 BUILTIN\Administrators FindJava.cmake 12/30/2011  09:45 AM            10,632 BUILTIN\Administrators FindJNI.cmake 12/30/2011  09:45 AM             1,669 BUILTIN\Administrators FindJPEG.cmake                4 File(s)         21,732 bytes                0 Dir(s)  132,524,654,592 bytes free   Dan@home /c/Program Files (x86)/CMake 2.8.7/share/cmake-2.8/Modules $ ls -al FindJ* -rwx------+ 1 Dan            None 10636 Jan 30 13:57 FindJNI.cmake -rwx------+ 1 Administrators None  1669 Dec 30 09:45 FindJPEG.cmake -rwx------+ 1 Administrators None  1480 Dec 30 09:45 FindJasper.cmake -rwx------+ 1 Administrators None  7951 Dec 30 09:45 FindJava.cmake   How can this be?  It's like there are two different files with the same name in the same directory. Is there a command that outputs ONLY the packages explicitly installed by the user? (ubuntu/debian) I have tried searching for this but there seems to be no command that can output a list of packages (ideally in Ubuntu) that I have installed, not including any dependencies. I'm having the same problem as it was questioned   I can't get throught the step where I need to show that $\nabla_{E_i}E_j (p)=0$. It only leads to $$ \nabla_{E_i}E_j(p)=\sum_{lk}^n a_{il}(0)\dfrac{\partial b_jk}{\partial x_l}(0)\partial x_k(p) $$ which I can't show that equals zero.  On the linked question, there is also the indication that $\nabla_{E_i}E_j (E_k)=\Gamma^k_{ij}$. This could lead that $\nabla_{E_i}E_j (E_k)(p)=\Gamma^k_{ij}(p)=0$, but $\nabla_{E_i}E_j (E_k)(p)$ is not equal to $\nabla_{E_i}E_j (p)$ which is the one I need.  Can someone help me? I wrote a bash script as below:  #!/bin/bash echo "Enter a file name" read filename import -window root $HOME/Desktop/$filename.png   I expected this script to take a screen shot and save the image with the given filename on my desktop.  Problem:  My Ubuntu terminal is giving error:     import: Command Not Found If it was possible to dig a hole that went from one side of the Earth to the other... Does a photon exert a gravitational pull? Some class features, monster traits, and feats allow you to take a −5 to your attack roll in order to gain a +10 to your damage roll. At first glance this looks really good, but when will it deal more damage than not using it on average?  For instance if you have a total attack bonus of +8 and you deal 1d12 damage. You have to roll a 7 to hit an AC of 15. If you take the −5 that makes it where you have to roll a 12. That's going to reduce your average damage by a lot. In PHP (>= 5.0), is passing by reference faster? In PHP, function parameters can be passed by reference by prepending an ampersand to the parameter in the function declaration, like so:  function foo(&amp;$bar) {     // ... }   Now, I am aware that this is not designed to improve performance, but to allow functions to change variables that are normally out of their scope.  Instead, PHP seems to use Copy On Write to avoid copying objects (and maybe also arrays) until they are changed. So, for functions that do not change their parameters, the effect should be the same as if you had passed them by reference.  However, I was wondering if the Copy On Write logic maybe is shortcircuited on pass-by-reference and whether that has any performance impact.  ETA: To be sure, I assume that it's not faster, and I am well aware that this is not what references are for. So I think my own guesses are quite good, I'm just looking for an answer from someone who really knows what's definitely happening under the hood. In five years of PHP development, I've always found it hard to get quality information on PHP internals short from reading the source. Prove using induction that from a set of $n+1$ numbers from $\{1,2,..2n\}$, at least one number will evenly divide another. Given a set of $n+1$ numbers out of the first $2n$ natural numbers, $\{1,2,\ldots,2n\}$, prove that there are two numbers in the set, one of which divides the other.  I can't tell if I'm reducing the problem in the right way.  Would it be something like:  Induction Hypothesis: A set of $n+1$ numbers from the first $2n$ natural numbers contains two numbers, one of which evenly divides the other.  Base Case: $n=1$, $\{1,2\}$, 2 is divisible by 1.  Consider a set of $n+2$ numbers, $A$, from the first $2n+2$ natural numbers. There are three cases:   Each number in $A$ is less than or equal to $2n$.  The proof follows from the induction hypothesis. One number in $A$ is greater than $2n$.  The remaining set of $n+1$ numbers must each be less than or equal to $2n$.  The proof follows from the induction hypothesis. $A$ contains both $2n+1$ and $2n+2$. I'm not sure how to solve this case.   I'm working through Udi Manber's Introduction To Algorithms: A Creative Approach for personal development, so in keeping with the spirit of the book, I'm trying to use induction.  Without induction, the question is identical to Gerund preceded by a genitive? Is this sentence actually grammatical?     You know your having a rough day when kittens don't even make you smile.   The writer of this sentence may intend to mean you're instead of your but I'm just wondering if having a gerund preceded by a genitive is considered grammatical in this case.  If the sentence above is ungrammatical, why is this sentence grammatical?      He resents your being more popular than he is.   What's the difference between these two sentence that determines one to be grammatical and the other to be not?  This is how I analyze the two sentences and I can't see the difference:   "You know it when kittens don't even make you smile" for "it" = "your having a rough day" "He resents it" for "it" = "your being more popular than he is" How to delete column/field in PyQGIS? I have a one-dimensional array of strings in JavaScript that I'd like to turn into a comma-separated list. Is there a simple way in garden-variety JavaScript (or jQuery) to turn that into a comma-separated list? (I know how to iterate through the array and build the string myself by concatenation if that's the only way.) Is there any way to distribute spacing equally in every object?    Is there any option to do? I want 2MM spacing in every geometrical shape.  Thanks in advance. Badges loading broken in election statistics We have an  and I noticed the badges are not loading in the election statistics like they should be. It just hangs forever loading badge information:    Unfortunately I blew off reporting this for a couple days figuring it would resolve itself, but it doesn't seem to be a temporary problem.