In my wordpress project I have seen several times the use of do_action() function.   I don't know the working of this function, nor why we call it or where we use it?  Can someone please explain this to me?
This question might be wrong, I am not sure about it. Because I am not clear on this.  I know add_action it is used to to hook our function to the specified function. For example add_action('wp_head'.'myfunc'); now what ever code in myfunc will be executed in the wp_head(). This is clear but i am having doubt in do_action what it does?  I think it is used to create our own hook like already available hooks(wp_head,wp_footer,..etc) If i am correct can anyone show me a simple understandable answer with simple example.  I have tried the difference in internet but all are pointing to difference between add_action and add_filter. I don't want to go there because first i want to clarify this and then I’ll move there.  Can anybody help me?  EDIT after Question POST  function custom_register() {     echo '&lt;script&gt;jQuery(document).ready(function(){alert("Learning Hooks");});&lt;/script&gt;';  } do_action('custom');  add_action('custom','custom_register');   I tried this in plugin but i didn't get the alert message.  But when i hook the same function with wp_head then it is working fine  /******************working****************/ add_action('wp_head','custom_register');
How do I suspend a whole process (like the Process Explorer does when I click Suspend) in C#.  I'm starting the Process with Process.Start, and on a certain event, I want to suspend the process to be able to do some investigation on a "snapshot" of it. How do I boot into single-user mode from GRUB? Computing dominant area in polygon using ArcGIS Desktop? How can I make focus follow the mouse cursor? Estimating Uniform distribution endpoints using data with errors Suppose I have a random variable $X$ ~ $Unif(0,\theta)$ where I want to estimate $\theta$. I draw a sample $X_1,...,X_n$.One way is to get a point estimate using e.g.  maximum likelihood estimation via the sufficient statistic $X_{(n)}$.  However, suppose I want a 95% confidence interval of sorts on the value of $\theta$, how should I construct one?  The reason why I am interested in confidence interval is because of the following issue, which is actually my main question (the above prelude on confidence interval is just a suggestion on possible approach). So actually my sample came with some noise, in a sense that I actually observe $X_1+E_1,...,X_n+E_n$ where $E_i$~$N(0,\sigma_i^2)$ independently from each other and from the $X$'s. How should I make some form of statistical estimation about $\theta$? I would prefer some form of confidence estimate. Which style is preferred? Is there a good reason for one vs. the other?  Thanks in advance!  1) cmds.each do |cmd|    end  2) cmds.each { |cmd|    }   Example code:  cmds = [ "create", "update", "list", "help" ]  # Block style one # cmds.each do |cmd|   puts "loop1, cmd: #{cmd}" end  # Block style two # cmds.each { |cmd|   puts "loop2, cmd: #{cmd}" } Why can't I destroy or place blocks? According to the special theory of relativity, distant simultaneity depends on the observer's reference frame.  And, according to the quantum theory, in the case of two entangled particles, a measure on one of the particles simultaneously affects the second one. Under which reference frame is this simultaneous? A continuous bijection from a compact space to a $T_2$ space is always a homeomorphism This problem is bugging me for some time.     $f:(X,\mathcal{T}) \to (Y,\mathcal{T}')$ is a continuous bijection where $(X,\mathcal{T})$ is compact and $(Y,\mathcal{T}')$ is $T_2$ (i.e. Hausdorff and $T_1$). Then show that $f$ must be a homeomorphism.   So far I have failed to understand any relation between the compactness of domain and $T_2$-ness of the range. I tried in vain to prove that $f(U)$ is open in $(Y,\mathcal{T}')$ whenever $U$ is so in $(X,\mathcal{T})$. I know $f$ makes $X$ and $Y$ respectively $T_2$ and compact and hence makes both of them $T_4$ spaces. But that is not coming to any use. I would be glad if someone helps me with a solution. Thank you. How do I install VMware player on a Mac os X? Totally ordering the power set of a well ordered set. Let's say I take a set $S$, where $S$ can be well ordered. From what I understand, one can use that well ordering to totally order $\mathscr{P}(S)$.  How does a body actually use the well ordering of $S$ to construct a total ordering of $\mathscr{P}(S)$?  Perhaps construct is too strong a word. Is there a way to prove that a total ordering of $\mathscr{P}(S)$ just exists, no need to explicitly state what it is, since that might be very difficult. Try Ubuntu - Where does it store my files? I am wondering, when you select the option of just "Try Ubuntu" instead of installing, where does Ubuntu store the files that you download / copy / save?  I right click in the Home folder, and it specified I had 4GB free space. Where did it get this 4GB space from, and if I transition to another OS system, how can I access or delete all the previous data from the session of "Try Ubuntu"?  Thank you! Local Coordinate to Geocentric The ultimate question, I need a transformation matrix to take a point in local space representing a roughly 500m x 500m place in New Mexico centered at -108.619987456 long 36.234600064 lat.  The final output needs to be in geocentric coordinates and I can during initialization get any number of points on the map such as the corners, center, western most along the center etc.  During run time I would like to have a transformation matrix that can be applied to a position in local space expressed in meters and get back an approximate GCC coordinate.  The center of the point in GCC: -1645380 -4885138 3752889 The bottom left corner of the map in GCC: -1644552, -4881054, 3749220  During run time I need to be able to multiply (-250, -250, 0) with the transformation matrix and get something close to (-1644552, -4881054, 3749220).  I've spent more than a week trying to research a solution for this and so far nothing.  Given an identity matrix as our starting position and orientation. Then using geotrans and the known lat, long, and height of the starting position I get an x,y,z geocentric coordinate. A vector from the origin of (0,0,0) gives both the up and translation for the matrix. However, I need the forward and right so that I can pass a distance in meters from the origin into the transformation matrix and get a roughly accurate GCC. Do I have all of the inputs I need to calculate the right and forward?  Inputs Origin: 0, 0, 0 Global: -1645380, -4885138, 3752889 Up (Normalized): Global - Origin  Desired Outputs Right: ? ? ? Forward: ? ? ?  So with the right and forward added to the up and translation I already calculated I would have a transformation matrix.  I could then apply the matrix to a vector of say (50, 50, 0) and get something within about 0-3 cm of the output if I feed the lat/long back into geotrans.  This matrix would only ever be used small maps of about 500m x 500m so the curvature of the earth is negligible.  In reply to whuber,  I don't know your level of experience so I will start with the very basics.  An identity matrix is a 4x4 matrix that you can multiply by a vector and it returns the vector unchanged. Such as below.  1 0 0 x=0 0 1 0 y=0 0 0 1 z=0 0 0 0 1  The x, y, and z of the matrix are how much to translate the vector by and the first 3 rows and columns are the rotation.  Below is a tranformation matrix that does nothing to the orientation of a vector but does translate.  This is what you would want for two axis aligned worlds in different locations.  1 0 0 13 0 1 0 50 0 0 1 -7 0 0 0 1  If you were to multiply a vector of (10, 10, 10) with the above transformation matrix you would get an output of (23, 60, 3).  My problem is the axes are not aligned and the "plane" of the world I am trying to get the local coordinate converted to is projected on the ellipsoid of the earth.  Geotrans is library that you can use to pass a coordinate from one system such as geodetic or GDC (lat, long, height) and get back another such as geocentric or GCC (x,y,z).  For example: If my game world was representing a map centered exactly on the prime meridian and equator the transformation matrix would look something like below. I am just guesstimating the Y and Z rotations and might have them flipped and/or the wrong sign.    0 0 1 6378137 0 1 0 0 1 0 0 0 0 0 0 1 Cannot add PPA: 'ppa:~darklin20/ubuntu/bomi'.     ERROR: '~darklin20' user or team does not exist.   Showing this message when suing this command:    sudo add-apt-repository ppa:darklin20/bomi   please help me. I'm setting up a child theme in WordPress and I can't make add_action to be fired within functions.php.  Functions.php is called and I can run code from within. Any idea on what I'm doing wrong?  $debug_msg = "Hi there!";  function test_function() {     error_log($debug_msg, 0);  } add_action('init', 'test_function', 20); What do we call someone who's in between -a friend and an enemy! He's a friend of mine   The message is clear. He's my friend. He wishes all good for me and helps me whenever I need one.      He's an enemy of mine   The message is clear again. He's my enemy. He wishes all bad for me and never helps me whenever I need!     He's ...... of mine!   The message is clear. He's neither friend nor enemy. He's in between. At times, he may help me but then I cannot always rely on him. He's not a friend of mine.   Other times, he does really bad to me but maybe, there was no any other go for him. He's not an enemy of mine! :) Looking for a quick and dirty way to automate . I presume this could be done with an automation to press the mouse button from two separate pixel coordinates, with delay, so long as the browser window doesn't move -- unless there's a better way.  I tried building a Watch Me Do workflow, in Automator, but can't seem to get it to work.  I get the error "application Chrome is not running when it is expected to." It also never lists mouse clicks for some reason.  I do have accessibility set up, in system preferences > security &amp; privacy > privacy > accessibility.  Automator, Chrome and System Events are all checked within there (among other stuff of course).  I tried the markashworth workaround as detailed  -- which also doesn't seem to work. Using his method, I get this error:    UPDATE: I just downloaded "cliclick" and figured out how do both clicks as a terminal command, with the proper delays.  BUT -- I don't know code and need a way for this terminal command to repeat "x" amount of times.  Anyone know how I could do that in Script Editor?  The command line is:  cliclick c:132,286 w:100 c:132,286 w:5000 c:1100,238   I would need a few seconds of delay before the loop repeats, which I presume I could do with a final "w:" in that line.  Thanks for the help!! How much did the Trade Federation know about their 'lord' at time of blockade? Would time freeze if you could travel at the speed of light? I read with interest about Einstein's Theory of Relativity and his proposition about the speed of light being the universal speed limit.    So, if I were to travel in a spacecraft at (practically) the speed of light, would I freeze and stop moving?  Would the universe around me freeze and stop moving?  Who would the time stop for? How to create a bootable USB with multiple ISO images in it