I've been put to work on a very complex Drupal 7 based system with multiple custom written modules for which the developers have gone or been re-assigned.  Documentation for the system is very sparse.  I think it would help me to get a a better overall picture of the system, as well as to figure out what is happening in particular parts of the system that I have been asked to fix or change, if I could see a listing of all of the hooks that are implemented.  I presume that Drupal scans all of the code in the system and builds itself some sort of structure or associative array in its cache memory so that it can quickly find any hooks that need to be invoked.  Is the result stored somewhere that I can read, for example in a database table or a global variable?  If I need to figure it out myself, is there a particular function, for example in the system module or bootstrap code that all hooks must pass through once?  If so, perhaps I could (temporarily) hack it to get the information I want.  If someone knows how to do this, I'd love to hear how.  If you don't know how to do it but have ideas about especially fruitful places to look in the code, database, drush functions, or wherever, that could be useful too.  Thank you very much.
I have a hook_form_alter in a module, and it should be firing, but it appears it's not. I've cleared caches and rebuilt the registry. Is there someplace in the database or somewhere else where I can see if my hook is registed? FWIW here is my hook:  /**  * Implements hook_form_alter  */ function my_module_form_alter(&amp;$form, &amp;$form_state, $form_id) {   drupal_set_message($form_id); }
How can I remove the Trash icon from the Unity launcher? I would like to not show the trash icon at the bottom of the Unity launcher.  Is this possible without having to recompile anything? :P I am trying to run gedit from an SSH terminal on Windows, connected to an Amazon EC2 instance running Ubuntu 12.04 Server and I am getting this error:  Cannot open display:   How do I fix it? I really love Eclipse (PDT)... But i'm developing sites using HTML5 and CSS3 and it mark the HTML5 tags like &lt;nav&gt;, &lt;section&gt; and &lt;article&gt;  as invalid tags (inexistent).  How can I add those new tags to it?  And what about CSS3 rules?  I read something about remove the "invalid tag" check... and that's not what I want. :( Environment variables are not passed to sub scripts while running on crontab I was trying to run one of the scripts (for example, wrapper.sh) which internally executes other scripts using crontab. It works fine without any issues.  When I have created a environment file (which stores the passwords-DB and paths) and trying to execute the main script (wrapper.sh) the cron entry doesn't work on those scripts which are called internally in the wrapper.  NOTE: I tried changing PATH, added env file location before the script in cron but it still didn't work:  9 9 * * * . /$SOMEPATH/some.env; /$SOMEPATH/wrapper.sh   The environment script and wrapper.sh are in same path. when the cron runs it passes the env variables to wrapper but not to the scripts which are called internally in wrapper. Also a mail is received on /var/mail/$user saying the env file as "No such file or Directory". I've gone through many posts but couldn't figure out the resolution. Hanging indent inside list I would like items in a list to have a hanging indent (that is, for all lines after the first to be indented by a space or more),  but the traditional \hangindent command doesn't work for this.  \documentclass{article}  \begin{document} \hangindent=1cm This line of text has a hanging indent that looks fine, as long as it is outside a list environment. \begin{enumerate} \item \hangindent=1cm This line is inside a list environment and doesn't have a hanging indent- how can I add one? \end{enumerate} \end{document}     How can I add a hanging indent within a list? Why do mathematicians use single-letter variables? Deep cloning objects I want to do something like:  MyObject myObj = GetMyObj(); // Create and fill a new object MyObject newObj = myObj.Clone();   And then make changes to the new object that are not reflected in the original object.  I don't often need this functionality, so when it's been necessary, I've resorted to creating a new object and then copying each property individually, but it always leaves me with the feeling that there is a better or more elegant way of handling the situation.  How can I clone or deep copy an object so that the cloned object can be modified without any changes being reflected in the original object? Coefficient changes sign when adding a variable in logistic regression How can I backup my RAW photos while travelling without Internet access? This question seems similar to , but my needs are different :   I shoot in RAW exclusively I'm looking for a 100% offline solution: while traveling, Internet won't be accessible the "laptop" solution is too heavy for me: I'm looking for a lightweight solution the simplest, the better: one device to rule them all   EDIT:  I'm using good old Compact Flash cards (yes, the bigger ones), so I need a device that can read it. If it can read from other cards, this question might be interesting for more people than myself  - that's the whole purpose of the website.    Also asked by :  Portable Storage Device while traveling  I need storage device which is able to read CF cards and make a backup of my photos while traveling. I do not want to carry laptop (it's bulky) and tablet (too little storage) but looking into some other solutions.   So far I found:   Epson PXXXX - price is blocker for me Jobo Giga Vu - same as above Nexto DI - bit better, but still a lot Hyperdrive Colorspace UDMA - this looks the best for price/options Wolwerine PicPac - cheap, bad opinions DigitalFoci PhotoSafe - same as above Ex-Pro® Picture 2 Drive - didn't find much about it   So ladys &amp; gents what do you use? What word describes random unfitting accusations I really dont know how to describe this. Im having a discussion with someone, I was sharing information that I found on a topic. Randomly im called out as being rude when nowhere was there evidence of rudeness exchanged. This person seems to have a history of claiming people have a problem or are being rude out of the random blue.   Is there a word to describe these random accusations that dont connect to anything? Why does Gandhi want to nuke me? Different civilizations obviously have different priorities. For example, Gandhi always seems to rush nuke technology and the Mongols will most likely start invading and spread like mad. Are these variables public knowledge? Can you tell by who you are playing what strategy they will adopt during the game? How do I keep both the background and foreground in the image in focus at the same time? How do you have both the background and foreground in the image in focus at the same time?  Last week I was attempting a shot where I had the back of a hat in focus and in the distance you could see a mountain. I wanted both in focus, but could either focus on the mountain or the hat. I ended up taking the in-focus shots of both and merging them in Photoshop. While that isn't difficult I would prefer to shoot the shot as accurate as possible. From what I have read aperture is important in the depth of field but what are the techniques for keeping both the background and foreground in focus?  I am using a Nikon D5100 with a 18-55mm f/3.5-5.6 (standard kit lens) and a 55-200mm  f/4.5-5.6.    almost answers my question, but I am a bit confused. Can someone explain this a bit differently? Thanks! Another indicator of a review audit: Question has no tags Sadly, yesterday I've spilled some water on my MacBook Pro (El Capitan). Before you yell at me - it was closed, turned off and it wasn't a lot of water, the laptop was wet only on the top and under - not inside.  Today I've turned him on. At first battery wasn't recharging for some reason, but SMC reset fixed the problem.  At the first booting speaker was like talking to me, hard to explain but it was weird. Also only right speaker was "talking", despite the fact that only left side of the laptop was watered. Then there was no sound at all, not from the speakers, nor from the headphones. Also microphone's not working. USB ports are okay. The water was spilled from the left side of the laptop. I know this is hardware issue, and something's broken, but I want to be 100% sure. No it's not muted. I've also tried NVRAM reset a few times, but it doesn't fix the problem :(  There might be one factor, before spilling, my laptop "died" for the first time (battery energy ran off), but I doubt it's the case. (but hey, every info matters, right?)  It wouldn't be weird for me, if only left speaker wouldn't work, but built-in microphone not working is kinda weird in this case, isn't it?  I just want to ask you guys, what else can I check, before I'll be 100% sure it's dead inside?  I've plugged in external microphone - it's not working too. Online calculators such as  (view page source) use the below formulas to get meters per degree. I understand in general how distance per degree varies depending on latitude location, but I do not understand how that translates to the below. More specifically, where do the constants, the 3 "cos" terms in each formula, and coefficients (2, 4, 6; 3, and 5) for "lat" come from?      // Set up "Constants"     m1 = 111132.92;     // latitude calculation term 1     m2 = -559.82;       // latitude calculation term 2     m3 = 1.175;         // latitude calculation term 3     m4 = -0.0023;       // latitude calculation term 4     p1 = 111412.84;     // longitude calculation term 1     p2 = -93.5;         // longitude calculation term 2     p3 = 0.118;         // longitude calculation term 3      // Calculate the length of a degree of latitude and longitude in meters     latlen = m1 + (m2 * Math.cos(2 * lat)) + (m3 * Math.cos(4 * lat)) +             (m4 * Math.cos(6 * lat));     longlen = (p1 * Math.cos(lat)) + (p2 * Math.cos(3 * lat)) +                 (p3 * Math.cos(5 * lat)); Which experiments prove atomic theory?  Sub-atomic theories:   atoms have: nuclei; electrons; protons; and neutrons. That the number of electrons atoms have determines their relationship with other atoms.   That the atom is the smallest elemental unit of matter - that we can't continue to divide atoms into anything smaller and have them retain the characteristics of the parent element. That everything is made of atoms.     These sub-theories might spur more thoughts of individual experiments that prove individual sub-atomic theories (my guess is more was able to be proven after more experiments followed). Why should one use EM vs. say, Gradient Descent with MLE? Mathematically, it's often seen that expressions and algorithms for Expectation Maximization (EM) are often simpler for mixed models, yet it seems that almost everything (if not everything) that can be solved with EM can also be solved with MLE (by, say, the Newton-Raphson method, for expressions that are not closed).  In literature, though, it seems that many favour EM over other methods (including minimization of the LL by, say, gradient descent); is it because of its simplicity in these models? Or is it for other reasons? jQuery Datepicker with text input that doesn't allow user input How do I use the jQuery Datepicker with a textbox input:  $("#my_txtbox").datepicker({   // options });   that doesn't allow the user to input random text in the textbox. I want the Datepicker to pop up when the textbox gains focus or the user clicks on it, but I want the textbox to ignore any user input using the keyboard (copy &amp; paste, or any other). I want to fill the textbox exclusively from the Datepicker calendar.  Is this possible?  jQuery 1.2.6 Datepicker 1.5.2 How to find Hamiltonian from this simple Lagrangian? (tricky) $$L~=~ \frac{1}{2} \dot{q}  \sin^2{q} $$  Is it zero or not defined? Evaluating the infinite product $\prod\limits_{k=2}^\infty \left ( 1-\frac1{k^2}\right)$ Evaluate the infinite product $$\lim_{ n\rightarrow\infty }\prod_{k=2}^{n}\left ( 1-\frac{1}{k^2} \right ).$$  I can't see anything in this limit , so help me please.