I am able to successfully use wp.hooks.applyFilters() and wp.hooks.addFilter(), but I'm not able to render a React Component using wp.hooks.addAction(). However, the console.log() runs just fine within the callback for an action. This is my code:  import { createHooks } from '@wordpress/hooks';  let globalHooks = createHooks();  const Header = () =&gt; {     return (         &lt;h1&gt;Header Component&lt;/h1&gt;     ); }  const RevisedHeader = () =&gt; {     return (         &lt;h1&gt;Revised Header Component&lt;/h1&gt;     ) }  export default class App extends Component {      constructor( props ) {         super();          globalHooks.addFilter( 'replace_header', 'revisedHeaderCallback', this.revisedHeaderCallback );         globalHooks.addAction( 'after_replace_header', 'afterRevisedHeaderCallback', this.afterRevisedHeaderCallback );     };      revisedHeaderCallback( header ) {         return &lt;RevisedHeader /&gt;;     }      afterRevisedHeaderCallback() {         return &lt;RevisedHeader /&gt;;     }      render() {          return(             &lt;div className="App"&gt;                 { globalHooks.applyFilters( 'replace_header', &lt;Header /&gt; ) }                 { globalHooks.doAction( 'after_replace_header' ) }             &lt;/div&gt;         );     } }
I am able to successfully use wp.hooks.applyFilters() and wp.hooks.addFilter(), but I'm not able to render a React Component using wp.hooks.addAction(). However, the console.log() runs just fine within the callback for an action. This is my code:  import { createHooks } from '@wordpress/hooks';  let globalHooks = createHooks();  const Header = () =&gt; {     return (         &lt;h1&gt;Header Component&lt;/h1&gt;     ); }  const RevisedHeader = () =&gt; {     return (         &lt;h1&gt;Revised Header Component&lt;/h1&gt;     ) }  export default class App extends Component {      constructor( props ) {         super();          globalHooks.addFilter( 'replace_header', 'revisedHeaderCallback', this.revisedHeaderCallback );         globalHooks.addAction( 'after_replace_header', 'afterRevisedHeaderCallback', this.afterRevisedHeaderCallback );     };      revisedHeaderCallback( header ) {         return &lt;RevisedHeader /&gt;;     }      afterRevisedHeaderCallback() {         return &lt;RevisedHeader /&gt;;     }      render() {          return(             &lt;div className="App"&gt;                 { globalHooks.applyFilters( 'replace_header', &lt;Header /&gt; ) }                 { globalHooks.doAction( 'after_replace_header' ) }             &lt;/div&gt;         );     } }
How can I limit ssh *remote* port forwarding? I need to limit which ports can be remotely 'ssh -R' forwarded by an user.  I know about permitopen option on authorized_keys, but as it says on man page it only limits local 'ssh -L' port forwarding  As discussed  a user would get the same with netcat or similar, but in this case user has no shell access  I also found  that talks about using selinux or LD_PRELOAD, but I never configured selinux before and can't find info on how to do that with LD_PRELOAD.  maybe someone have made a patch for openssh to implement that?  EDIT: I've found  so I guess it's not yet implemented I'm trying to graph the function $y = \frac{x^2-4}{x-2}$.  I factored the numerator into $(x+2)(x-2)$, and then canceled the common factor (x-2), leaving the function as $y = x + 2$.    Is it acceptable to graph the original function as $y = x + 2$, a straight line with domain and range all real numbers?  Or do you have to restrict the domain as in the original function?  Thanks, Sean How to restore default group/user ownership of all files under /var? I accidentally changed /var owner/group to my username and then changed it back to root, but not all the /var folders' owners are root, so is there anyway to change back owner/group of files/folders to default state?  Or at least those files/folders that are created by packages? I'm trying CTest in CMake in order to automatically run some of my tests using make test target. The problem is CMake does not "understand" that the test I'm willing to run has to be built since it is part of the project.  So I'm looking for a way to explicitly specify this dependency. In 1735 Euler gave the value of $\gamma$ as $0.577218.$ The constant is generally defined as the limit of the difference between the harmonic series and $\log n:~\gamma= \lim_{n\to\infty}\sum_{k=1}^{n}\frac{1}{k}-\log n.$ Euler apparently relished this sort of calculation and must have taken quite a few terms to get such a good approximation.  My question is whether without a computer one can now prove that  $$\gamma &lt;  \sqrt{1/3}$$   with at least some savings in terms of the type of work Euler apparently expended? I don't think there's any point in raising the bar to $\gamma &lt; \ln 2\sqrt{\frac{23}{29}} $  because it seems to be the same sort of question.       My own thought was to compare $\frac{1}{2}\int_0^{1/3}\frac{dx}{\sqrt{x}}$ to something like $(-1)\cdot\int_0^\infty e^{-u}\ln u~du$ but I expect there's a better way. Option to be notified when a post I downvoted is edited Prologue:  This is an effort to follow up on  which is marked as a duplicate of  highly voted and status-declined feature request (although they seem to be different, one focusing on the OP and the other on the downvoter).   My New Year's resolution was to downvote more.  So on January 3rd or so, I saw a post that was low quality, and downvoted.  Two days later, I came back to see if it was ready to be deleted or had gotten piled with downvotes, to find it with a significant positive score!  At which point, I noticed that the answer had been significantly improved.  So I retracted my downvote, changed it to an upvote, and immediately resumed my dearth of downvoting again.  I think I have a responsibility to downvote bad posts, despite that oh-so-painful -1 rep penalty.  But if I am also going to have the responsibility to follow up on every downvote I cast, I'm not going to bother. I don't want my downvote to leave a residual penalty on posts that were once low quality, and I am not going to trouble myself to keep checking up on every post I downvoted.  Can a downvoter have an option to be notified when a post they voted down was edited?  I wouldn't make this an automatic thing, because not all downvoters want it, and it isn't applicable to all cases of downvoting (although  that this should be part of the responsibility of a downvoter).  Personally, I would make this a universal toggle on-off option on the user profile page, not a question-by-question option, but I don't have strong feelings about it. A 10x10 table filled with 0 to 9 numbers Complete list of Lollipop system icons shown in notification bar? Is there a complete list of these? I've seen lots of Q&amp;A about "What does x icon mean" but it would be really useful if there were a complete list for reference! Some issues with timezones in PHP have been in the back of my mind for a while now, and I was wondering if there are better ways to handle it than what I'm currently doing.  All of the issues revolve around reformating database stored dates:  When dealing with a site that has to support multiple timezones (for users), to normalize the timezone offest of stored timestamps I always store it with the server timezone using the CURRENT_TIMESTAMP attribute or the NOW() function.   This way I don't have to consider what timezone was set for PHP when the timestamp was entered (since PHP time functions are timezone aware). For each user, according to his preference I set the timezone somewhere in my bootstrap file using:  date_default_timezone_set($timezone);   When I'm looking to format dates with the php date() function, some form of conversion has to take place since MySQL currently stores timestamp in the format Y-m-d H:i:s. With no regard to timezone, you could simply run:  $date = date($format,strtotime($dbTimestamp));   The problem with this is that date() and strtotime() are both timezone aware functions, meaning that if the PHP timezone is set differently from the server timezone, the timezone offset will apply twice (instead of once as we would like).  To deal with this, I usually retrieve MySQL timestamps using the UNIX_TIMESTAMP() function which is not timezone aware, allowing my to apply date() directly on it - thereby applying the timezone offset only once.  I don't really like this 'hack' as I can no longer retrieve those columns as I normally would, or use * to fetch all columns (sometimes it simplifies queries greatly). Also, sometimes it's simply not an option to use UNIX_TIMESTAMP() (especially when using with open-source packages without much abstraction for query composition).  Another issue is when storing the timestamp, when usage of CURRENT_TIMESTAMP or NOW() is not an option - storing a PHP generated timestamp will store it with the timezone offset which I would like to avoid.  I'm probably missing something really basic here, but so far I haven't been able to come up with a generic solution to handle those issues so I'm forced to treat them case-by-case. Your thoughts are very welcome How can one prove that $\lim_{n \to \infty}a^{1/n}=1$ for every $a>0$? Prove that $\lim_{n \to \infty} a^{\frac{1}{n}} = 1$ if $a &gt;0$.  In my textbook, we are given a suggestion to let $a^{\frac{1}{n}} = (1+h_n)$ and then show that the $h_n$ term goes to zero using a Theorem that states the following conditions:  $\lim_{n \to \infty} = \infty,$ if $a &gt;1, 1,$ if $a = 1,$ and 0, if $\vert a \vert &lt; 1$. I apologize for not formatting the above cases appropriately; I could not figure out how to use a giant left brace to group them altogether.  If I rewrite it as $a^{n^{-1}}$, then I thought that this might help, but I don't think the Binomial Theorem would then apply since the exponent is negative. Furthermore, the problem is only concerned with the positive, real $n$-th roots. I am quite stuck on this problem and any suggestions or advice would be greatly appreciated.   I am using the textbook Introduction to Analysis by Arthur Mattuck. How to describe "object" arguments in jsdoc? Two columns with different background color and height of whole page I want to create page with two columns with different background color and height of whole page. What I was able to do is two columns with different background color but I can't set proper height and there is small gap between two columns and another gap between top of the page and top of the columns. I want to remove these gaps. Also I want to create vertical line between two columns. Right now I have minipages packed inside \colorbox which allows me to create all four borders but I only want one.   Final effect should look like this:    This is what I figured out for now:  \documentclass{article} \usepackage{blindtext} \usepackage{xcolor} \usepackage{geometry} \geometry{margin=0in}  \begin{document} \noindent \fcolorbox{black}{red}{ \begin{minipage}{.3\textwidth}   test \end{minipage} } \fcolorbox{yellow}{yellow}{ \begin{minipage}{.7\textwidth}   test \end{minipage} } \end{document} How to include SVG diagrams in LaTeX? I'm making all my diagrams in SVG format using Inkscape and then I export them to some other format (e.g. PDF, EPS or PNG). I wrote a short script that does this for me automatically, but I'd like to avoid this step, if possible --- sometimes the conversion from SVG converts the text labels into vectors, and that's annoying. Hence the question:  Is there a way to include SVG diagrams directly without conversion to an intermediate format?  Package suggestions, or instructions for specific LaTeX distribution are welcome. Tips and personal experience on which tools you have found to be working reliably would be also appreciated. Can a Stack Exchange association bonus be lost? I recently hit 200 rep on Stack Overflow and got a big 100 rep bonus. Most know this as the 'association bonus'.  If I offer a bounty of 50 points and thereby lessen my 'base' score, do I lose that association bonus?  What if I offer a 150 point bounty and then work my way back to 200? Recently I've been messing around with making a few minigames, and have used a few plugins to help make it easier to create and run them. However, a newer one I'm making requires me to use the /summon command in order to spawn zombies. However, no matter what I put in, I can't spawn hostile mobs. All other entities still spawn perfectly fine. Strangely, the /spawnmob command which comes with Essentials can summon hostile mobs fine. I would rather use /summon since it's more customizable though. Here's a list of plugins I have installed.   Essentials EssentialsChat HolographicDisplays PermissionsEx setspawn [A plugin I have made, just a simple timer] Vault VoxelSniper WorldEdit WorldGuard   Please let me know if you have any ideas on what I'm doing incorrectly or isn't functioning the way it should. installing rtl8814AU wifi adapter driver on ubuntu 16.04 Why are only certain shutter speeds or apertures available? For the exposure control function DSLRs there are specific shutter speeds available. For example there are 1/4, 1/100, 1/500. Why, even in high end DSLRs, is there no option to use a custom shutter speed (such as 1/19)?   If the camera can do 1/4000, why can't it do 1/33?  Similarly, why are the aperture choices limited?  Why is it a technical challenge to add extra shutter speeds or aperture settings? How to perform two-sample t-tests in R by inputting sample statistics rather than the raw data? Let's say we have the statistics given below  gender mean sd n f 1.666667 0.5773503 3 m 4.500000 0.5773503 4   How do you perform a two-sample t-test (to see if there is a significant difference between the means of men and women in some variable) using statistics like this rather than actual data?  I couldn't find anywhere on the internet how to do this. Most of the tutorials and even the manual deal with the test with the actual data set only. Today I learned you can't move items to a Drop Off Library via workflow and expect its routing rules to kick in automatically. You then have to manually "Submit" each item, even if all metadata is already supplied in the document.  However, I noticed items I manually create in the Drop Off Library (via Documents -> New Documents -> [Content Type Name]) are routed immediately after I save them for the first time. So I'm thinking generating items in the Drop Off library via workflow could be a workaround.  This doesn't work in testing. The workflow errors out, and I receive "The workflow could not create the list item. Make sure the list exists and the user has permissions to add items to the list."  Obviously the list exists and I have Ownership permissions. My workflow is just one line at this stage, so I'm positive I'm building it correctly. Is this error due to a property of the Drop Off Library, maybe something I can disable?   Any other ideas? Or if you've got another method that I can implement via SharePoint Designer, that also works! THANKS!!!  THE GOAL  A workflow that kicks off when a list item is created:   Document Set is created with list item's properties. (complete) File is created with list item's properties. (complete if not in Drop Off Library) File is moved to the right document set via Drop-Off rules (got working rules, trying to work around having to manually Submit without coded solution) Should I always use a comma after "e.g." or "i.e."?