I am working on a project where I created a custom module to store data into database from a form. It is working fine. But now I am working on how to fetch the data from database and show the data in another page. The following is the code in my .module file:  function request_by_user_menu() {   $items = array(); //added for fetch and show data from database in request_by_user_menu().not working   $items['example/submit'] = array( //this creates a URL that will call this form at "examples/form-example"     'title' =&gt; 'Form Data', //page title     'description' =&gt; 'Show data from database.',     'page callback' =&gt; 'request_by_user_show', //this is the function that will be called when the page is accessed.  for a form, use drupal_get_form    'access callback' =&gt; TRUE   );   return $items; }  /*//function for fetch and show data from database.Not working.*/  function request_by_user_shown(){      $results=db_query("SELECT * FROM {request_by_user}");      $header=array(t('ID'),t('Number'));      $rows=array();      foreach($results AS $result){          $rows[]=array(          $result-&gt;uid,          $result-&gt;passwd,          );      }      return theme('table', array('header' =&gt; $header,'rows' =&gt; $rows));  }   When I am opening 'example/submit' it is showing "page not found" error.
What are the fundamentals of implementing hook_menu()?  I would like to see the basics covered in a single question, to avoid having to answer the same similar but different questions over and over.
Adding shapefile or feature class as layer in ArcGIS Desktop using Python/ArcPy? Getting percent sign into an URL in a footnote I'm using the url package. Now, I have some some url with a percent sign in it and want to place it in a footnote. When I let the % where it is, I get a comment, and the whole thing fails to compile because of some unmatched brackets. When it's at the end of a line, it doesn't show up at all in the result. When I write \% instead, this gets literally into the output—but I want the url to be displayed correctly.  What could I do? Benefit of date in URL segments I was curious about the date in URL segments, is there any SEO point of benefit? For example the following URLs:  http://techcrunch.com/2013/06/18/netflix-will-launch-in-the-netherlands-later-this-year-as-its-international-expansion-slows/ http://tips-for-new-bloggers.blogspot.in/2007/02/adding-favicon-icon-to-blogger-url.html  https://community.jivesoftware.com/blogs/jivespace/2013/05/15/eol-of-the-html5-ipad-web-app   In all the above URLs there is date segment. The information of those blogs can be fetched via blog stub like "netflix-will-launch-in-the-netherlands-later-this-year-as-its-international-expansion-slows" so why to use that date part? Why is the automatic login disabled for users with encrypted home? I've tried to setup an autologin, but that isn't possible, because my home is encrypted. What are the reasons for this?  PS. Here I have described my problem: . Java logical operator short-circuiting I would like to install Ubuntu alongside Windows 7 on a HP G62 Notebook. Although I have installed  Ubuntu in a dual-boot many times before, I found out that this model has already four partitions.    Partitions:   SYSTEM (NTFS, 199MB, used 66.59MB) Partition without any tag: NTFS (579GM, used 129GB)  RECOVERY (NTFS 16.74 GB, used 2.42GB)  HP_TOOLS (FAT32, 103.34 MB, used 13.23MB)   Since I am not an expert with partitions I would like to get advice on how to do this.  My first idea is this one:   Free some space from /dev/sda2 (I don't know if could also free some other space) delete the HP_Tools partition (I have already created a backup) create an extended partition with the free space in #1 containing three parititions: swap (1gb); / (EXT4, 30GB);  /home (EXT4, 120GB)   Another option is to use wubi instead.  What do you think? Is there any other way to achieve this?  PS: I really think this HP policy of using 4 partitions is not a coincidence  PS: I tried using gparted from the live CD and I got a warning message saying that if I freed some space from /dev/sda2 I could create serious issues in the system Access to our computer (not only to the internet) needs to be restricted for the accounts of my kids (7, 8) until they are old enough to manage this by themselves. Until then we need to be able to define the following:   the hours of the day when computing is o.k. (e.g. 5 - 9 pm) the days of the week when computing is not o.k. (e.g. mondays to fridays) the amount of time allowed per day (e.g. 2 hours)   In 11.10 all of the following that used to do the job don't work any more:   : for > 11.10 no more available through the ppa. : command line alternative, but from 11.10 removed from the repositories. : Looks great but repeatedly crashes to force restarting X-server. So we can't use or recommed this program at the moment.   Are there any other alternatives? Compiler warning: null reference exception I have the following code in Visual Studio 2005.      Dim OutFile As System.IO.StreamWriter     Try         OutFile = New System.IO.StreamWriter(Filename)        // Do stuff with OutFile     Catch Ex As Exception        // Handle Exception     Finally        If OutFile IsNot Nothing Then OutFile.Close()     End Try   But VS2005 brings up the warning for the line "If OutFile IsNot.." that      Variable 'OutFile' is used before it has been assigned a value. A null reference exception could result at runtime.   Is there some way of removing this warning by subtly altering the code or is there just a better way of doing what I'm trying to do?  Thanks  Rob How a Gmail username can be taken but not recognised simultaneously? Being at  I enter a desired username (without @gmail.com which is supposed), and I get error:     "That username is taken. Try another."   But when I try to login into Google with that xxx@gmail.com at  it fails with:     "Sorry, Google doesn't recognise that email."   How that can be?  P.S.: I want that username still. If $AB = I$ then $BA = I$ If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix. Galois Group of $\sqrt{2+\sqrt{2}}$ over $\mathbb{Q}$ How do I check if an element is hidden in jQuery? L293, L298 and SN754410 H-bridge drivers on low voltage power supply This question is about the following three integrated H-bridge drivers: -    or L293D (D = protection diodes added)  (protection diodes included)  (no protection diodes)   Time after time the same question keeps coming up - someone is using one of these devices (on a low voltage, usually around 6V or less) and they are just not performing adequately. The reasons are listed further below but my question is this: -  What H-bridge drivers are preferred when controlling a low-voltage motor?   Information  The L293 and the SN754410 are nearly identical and crucially, if you try and control a 1 amp load, you are faced with dismal performance: -    The tables tell you (typical conditions) that the upper transistor drops (loses) about 1.4 volts when driving a 1A load and, the lower transistor drops (loses) about 1.2 volts when driving a 1A load. The upshot is that if you have a 6V, 1A motor and 6V battery, don't expect to see more than 3.4 volts across the motor: -  \$V_{OUT} = 6V - (1.4V + 1.2V) = 3.4V\$  Worst case scenario is you might only see 2.4 volts across it.  What about the L298? It's got a nice big heat-sink whereas the L293 and SN754410 are regular-looking chips. Here's what the volt drop (losses) look like: -    It's the same story - for a 1A load, you can expect to lose up to 3.2 volts and, what you thought might be 6V across your motor, is at best 4.2 volts and at worst only 2.8 volts.  Clearly none of the devices listed are suitable for low voltage applications where the motor might be expected to draw in excess of 0.5 amps. As you can see, objects are falling down when I run the game. Ground is unable to stop those obstacles. Obstacles are rapidly traveling through y axis. I tried by freezing y axis. And, unchecked Use Gravity. I tried by checking Is Kinematic also. But, if I freeze y axis. Than, obstacles completely freeze through y. If there was no ground than the objects don't fall. Same thing happen when I unchecked Use Gravity. I want those obstacles to move if Player hit them. How to stop those obstacles from falling down?   Info : Is it acceptable to change colors on a logo to make it fit a website's theme? I have a few payment brand images that need to go in the footer of a website, the footer is very dark grey, to the point where making the logos grey-scale wouldn't be much of a good idea, especially as we still need the logos to stand out.  For example I took the following logo:   And changed it to fit with our very dominant red theme:    Is this good in terms of the user's perspective? Is this legal or misrepresenting the brand? If so is completely changing a logo to white acceptable for dark backgrounds? Do greenhouse gasses make the world habitable? An ageing gent says he does not accept this statement:  It's a fact that greenhouse gases, predominantly water vapour, keep the Earth  from being hostile and cold; that CO2 albeit in trace quantities is also a  greenhouse gas and therefore helps keep the planet warm...   I know no more about why he rejects this statement - maybe it is that water vapour alone would do the job. The gent in question has a first class degree and a doctorate in physics.    Is there a debate within the physics community over this or am I misunderstanding? What is the relative speed of two near-light speed particles headed towards each other? I understand that nothing can move faster than light due to time dilation. I want to build upon my understanding of Einstein's theory of Special Relativity, so I came up with this hypothetical problem for myself:  If both particles are moving at 0.9c towards each other (according to an observer on Earth), what speed does each particle have relative to the other?  I'm stumped since I am only familiar with Newtonian classical mechanics to solve this (which would be wrong). I am aware of Lorentz' factor $\gamma =\frac{1}{\sqrt{1 - \frac{v^2}{c^2}}}$ and the time dilation equation $t_m = \frac{t_o}{\sqrt{1 - \frac{v^2}{c^2}}}$, but I'm not sure how to apply it in this instance. I'm just looking for a gentle push in the right direction. Edit: My prior research:  This article, ,  talks about the effect of a baseball thrown at 0.9c would have as it traveled towards a batter. This is not what I'm looking for since it doesn't explain the math behind finding the collision speed between two high velocity entities.  This question on Yahoo, , asks a similar question to mine, but no math is involved to demonstrate the calculations behind the reasoning.  This question on Physics.SE, , does not answer my question either. I have not been able to find a similar Physics.SE question which can provide me to clues to my own hypothetical question.  I have also Googled the following phrases:    i. &quot;collision faster than the speed of light&quot; ii. &quot;collision of high speed particles&quot; iii. &quot;lorentz transformation in a collision&quot; iv. &quot;collision analysis at light speed&quot; Combining the entries of two lists Ppening an HTML file on localhost in XAMMP/apache 2.2 using subdirectories under htdocs I have a site directory for html (dreamweaver CSS3) with lots of subdirectories that contain HTML files for a number of drop down menus. They work fine where they are, but they all have menus that are JavaScript and could be kept in a separate file. So, I want to use Include. I don't want to have to FTP my files to HostGator every time I want to test the includes. I want to have this on my local machine. So, I am attempting for the first time to setup XAMMP and then run my html files (site) on localhost, so I can see what they look like before ftping everything to HostGator and putting it live.  I tried copying the main site folder to htdocs, and then copying the path to the file I want to run in front of the localhost in Firefox, but it gave me file not found:   Do I have too many subdirectories? Why isn't the file being found? It is there.  Tried this too:   No go. Prove that $\det(M-I)=0$ if $\det(M)=1$ and $MM^T=I$ $M$ is a $3 \times 3$ matrix such that $\det(M)=1$ and $MM^T=I$, where $I$ is the identity matrix. Prove that $\det(M-I)=0$  I tried to take $M$ $=$ $$ \begin{pmatrix}         a  &amp;b &amp; c \\         d &amp; e &amp; f \\         g &amp; h &amp; i         \end{pmatrix} $$   but its expansion is too long.