The Drupal 7 {system} table has a schema_version column. Its default value is -1 as indicated by the DESCRIBE system; MySQL command.  Sometimes an update function won't run if the module's schema_version is -1.  For instance, I have site that migrated from Drupal 6 to Drupal 7 quite some time ago.  Recently I found that a database column that should have been introduced by honeypot_update_7100() never ran.  I'm not sure whether or not the version of honeypot at the time of the migration contained that function.  After changing the schema_version to 0, update.php ran that update and the missing column was introduced.  See  for similar stories.  Is -1 treated specially?  Do all -1's potentially need to change to 0 for their update functions to run?
The problem is, it seems when I enable a disabled module, the module's schema version in the system table is automatically updated to the latest version supplied by hook_update_N.  So my current module with the schema version -1 is modified to 7106 when I enable the module, and no hook_update_N functions are run.   So when I come to the next step of running database updates, no hook_update_N functions are run because the module thinks it's already the correct version.  The only method I can see is to manually set the module version in hook_enable, however I'll then need to update the module code to remove the hook_enable to make sure it doesn't run if the module is ever re-enabled in the future, so obviously this approach is a bit dirty.  I'm hoping there's a better solution?
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] Detect init system using the shell Algorithm to see if two voxels are interconnected One thing that made me curious while watching a football game on TV was the numbers that appear on the ground. For instance, there's a "1st &amp; 10" beside one team, but there was a "3rd &amp; 6" a few minutes prior (and I think it was beside the other team). What do these numbers mean? Why can't a single photon produce an electron-positron pair? In reading through old course material, I found the assignment (my translation):     Show that a single photon cannot produce an electron-positron pair, but needs additional matter or light quanta.   My idea was to calculate the wavelength required to contain the required energy ($1.02$ MeV), which turned out to be $1.2\times 10^{-3}$ nm, but I don't know about any minimum wavelength of electromagnetic waves. I can't motivate it with the conservation laws for momentum or energy either.  How to solve this task? Emergency mode due to filesystem check On bootup, filesystem check occurs and it stops at 61% and I am redirected to a page with the message you are in the emergency mode. I don't know what to do next.  This is the message that I get at the screen   You are in emergency mode. After logging in, type .......  Press Enter for maintenance (Or press ctrl+D to continue):   But when I press Ctrl+D it again directs me back to the same screen. Is it acceptable to edit (correct) grammar or spelling? Some individuals may be sensitive to edits of their posts on the basis of spelling or grammar. Some editors may be concerned about what to put in as a reason/explanation for the edit. New editors, in general, are likely uncertain of what the accepted "etiquette" is, on these sites, for such corrections. A Riemann integrable function must have infinitely many points of continuity GeoServer cutting off symbols close to tile edges? What's the difference between declaring a variable "id" and "NSObject *"? In Objective-C, what's the difference between declaring a variable id versus declaring it NSObject *? As a native English speaker, which two further languages would give me the most travel utility worldwide? This follows on from a travel conversation a group of us had in a hostel in London.  Assuming I am travelling randomly between countries and continents, which two languages in addition to English would provide the most usefulness in any given country?  I suspect Spanish (North America, South America) and French (Europe, Africa) but with the base understanding between French and Spanish maybe the time would be best spent learning another language?  This question is a real puzzler since the following constraints apply   Length of time required to be "functional" in the language (cost-time trade off) Chance of reaching proficiency within any meaningful timeframe (Mandarin) Regional dialects destroying proficiency (Arabic) Easier Secondary languages underpinning the society (Arabic versus French argument) Similarity of Language families (Romance) leading to wasted effort (Italian v French) Utility of the Language (German versus English when English is understood) Enjoyment is a minor consideration   Happy to consider any other thoughts but it is a really interesting topic for consideration if you are linguistically minded. Can a self-complementary graph on 100 vertices have precisely one vertex of degree 50? Is it acceptable to say "We'll get back to you as quick as we can"? Is "quick" a flat adverb in this case? Why does this not work with an imaginary exponent? Could someone please tell me why this exponentiation rule does not work when the exponent is imaginary?  The following seems to be true but is only true if $x$ is an integer.  $$e^{2\pi ix} = \left( e^{2\pi i} \right)^x = 1^x = 1$$ Hi I want to try Ubuntu 20.04 without installing it due to some driver issues in my laptop. But I already have 2 OS ( Windows 10 and Ubuntu 20.04 [Dualboot] ), so will trying Ubuntu mess with the already installed Operating systems? And I know how to make live usb and booting from it but don't know how to exit it and then bring my laptop back to normal. Tried finding procedure on internet but reliable results are not found. I'm working on a map in Bedrock Edition, and I need to have a command block at the end that says "Congratulations [player], you win!" Because it's a map, I cant just have it say a specific player's name, and I've seen maps that do exactly what I want mine to do. How do I format the command to allow this? A secretary with ____ good knowledge of English: "a" or no article? I'm trying to pass a test on "Articles exercise" as they call it . Reviewing my answers I got stuck about the two I posted on the picture below.  As I understand both words are uncountable (according to the ), so it looks like (or said for example ) I can't say a/an with an uncountable noun.  But this test says the opposite. Is there some trick? Or am I just dumb? Please help me to understand why I need to use "a" article in these cases?        We need a secretary with ____ good knowledge of English.          a  (marked as the correct answer)   the     a / the     no article is needed (the answer I think is correct)        We're having ____ terrible weather.         a (marked as the correct answer)     the     a / the     no article is needed (the answer I think is correct) My understanding is that heat is essentially atomic vibrations. If there are almost no atoms, how can there be residual heat?  Also, as I understand in space there is no heat transfer via convection and it is mainly through EM radiation. In this case, why is it that if i were to go into space with no suit and just an airtight helmet through which I could breathe, I would still freeze to death very quickly? Yesterday, one of our computers dropped to grub shell or honestly, I am unsure what shell it was when we turned on the machine.  It showed that it can't mount the root filesystem or something in this sense, because of inconsistencies.  I ran, I believe:  fsck -fy /dev/sda2   Rebooted and the problem was gone.  Here comes the question part:  I already have in her root's crontab:   @reboot /home/ruzena/Development/bash/fs-check.sh    while the script contains:  #!/bin/bash touch /forcefsck   Thinking about it, I don't know, why I created script file for such a short command, but anyways...  Further, in the file:  /etc/default/rcS   I have defined:   FSCKFIX=yes    So I don't get it. How could the situation even arise?    What should I do to force the root filesystem check (and optionally a fix) at boot?  Or are these two things the maximum, that I can do?  OS: Linux Mint 18.x Cinnamon 64-bit.  fstab:  cat /etc/fstab | grep ext4   shows:   UUID=a121371e-eb12-43a0-a5ae-11af58ad09f4    /    ext4    errors=remount-ro    0    1    grub:   fsck.mode=force    was already added to the grub configuration. Can I block incoming calls using wildcard patterns? Recently I have been getting a few unwanted telemarketing calls, all coming from the same source. Each number though is different at the end.  For instance, if the numbers to be blocked are:    123-4567 123-7642 123-8643   It would be convenient for the future to simply block with a wildcard, such as:   123-*   Is this at all possible?