Replacing axiom of infinity
A weaker Axiom of Infinity?
How do I share variables between two functions? So...here is part of my code for a plugin.  I'm a newb of sorts so be kind.  I've read up on global variables but I can't seem to get it to work and I've read you shouldn't use them anyway.  So what would be the best way to write the code below without having to re-declare the variables for each function?  Here is the  if necessary.  // Display the product badge on the shop page  add_action( 'woocommerce_after_shop_loop_item_title', 'wc_simple_product_badge_display_shop', 30 ); function wc_simple_product_badge_display_shop() {     $title = get_post_meta( get_the_ID(), '_wc_simple_product_badge_title', true ); // badge title     $class = get_post_meta( get_the_ID(), '_wc_simple_product_badge_class', true ); // badge class     $duration = get_post_meta( get_the_ID(), '_wc_simple_product_badge_duration', true ); // badge duration     $postdate = get_the_time( 'Y-m-d' ); // post date     $postdatestamp = strtotime( $postdate ); // post date in unix timestamp     $difference = round ((time() - $postdatestamp) / (24*60*60));  // difference in days between now and product's post date      if ( !empty( $title ) &amp;&amp; empty( $duration ) || !empty( $title ) &amp;&amp; $difference &lt;= $duration ){ // Check to see if there is a title and the product is still within the duration timeframe if specified         $class = !empty( $class ) ? $class : '';         echo '&lt;span class="wc_simple_product_badge ' . $class . '"&gt;' . $title . '&lt;/span&gt;';     } }  // Display the product badge on the single page  add_filter( 'woocommerce_single_product_image_html', 'wc_simple_product_badge_display_single' );     function wc_simple_product_badge_display_single( $img_html ) {     $title = get_post_meta( get_the_ID(), '_wc_simple_product_badge_title', true ); // badge title     $class = get_post_meta( get_the_ID(), '_wc_simple_product_badge_class', true ); // badge class     $duration = get_post_meta( get_the_ID(), '_wc_simple_product_badge_duration', true ); // badge duration     $single_opt = get_post_meta( get_the_ID(), '_wc_simple_product_badge_single_page_option', true ); // badge on single page     $postdate = get_the_time( 'Y-m-d' ); // post date     $postdatestamp = strtotime( $postdate ); // post date in unix timestamp     $difference = round ((time() - $postdatestamp) / (24*60*60));  // difference in days between now and product's post date      if ( !empty( $title ) &amp;&amp; empty( $duration ) &amp;&amp; $single_opt === 'yes' || !empty( $title ) &amp;&amp; $difference &lt;= $duration &amp;&amp; $single_opt === 'yes' ){ // Check to see if there is a title and the product is still within the duration timeframe ()if specified) and the checkbox is checked to show on single page view         $class = !empty( $class ) ? $class : '';         echo '&lt;span class="wc_simple_product_badge ' . $class . '"&gt;' . $title . '&lt;/span&gt;';         return $img_html; }      elseif ( $single_opt === 'no' ) { // Check to see if the checkbox is unchecked to show on single page view         return $img_html;     }  } When a Battle Master fighter gets a critical hit and uses a maneuver that adds a superiority die to the damage, is that damage die doubled? The Battle Master fighter has access to a number of maneuvers that add a superiority die to the damage roll. For instance, the Trip Attack maneuver says (PHB, p. 74):     When you hit a creature with a weapon attack, you can expend one   superiority die to attempt to knock the target down. You add the   superiority die to the attack’s damage roll, and if the target is   Large or smaller, it must make a Strength saving throw. On a failed   save, you knock the target prone.   The Critical Hits rule states (PHB, p. 196):     When you score a critical hit, you get to roll extra dice for the   attack’s damage against the target. Roll all of the attack’s damage   dice twice and add them together. Then add any relevant modifiers as   normal. [...] If the attack involves other damage dice, such as from   the rogue’s Sneak Attack feature, you roll those dice twice as well.   During our game, the fighter PC rolled a critical hit. He then wanted to use a superiority die to use the Trip Attack maneuver to trip the enemy. Based on the above rules, is the damage from the superiority die also doubled?  I'm assuming the answer is yes based on the last statement in the Critical Hits section, but I wanted to confirm. What exactly is the difference between a parametric and non-parametric model? I am confused with the definition of non-parametric model after reading this link  and .   Originally I thought "parametric vs non-parametric" means if we have distribution assumptions on the model (similar to parametric or non-parametric hypothesis testing). But both of the resources claim "parametric vs non-parametric" can be determined by if number of parameters in the model is depending on number of rows in the data matrix.  For kernel density estimation (non-parametric) such a definition can be applied. But under this definition how can a neural network be a non-parametric model, as the number of parameters in the model is depending on the neural network structure and not on the number of rows in the data matrix?  What exactly is the difference between parametric and a non-parametric model? When performing machine learning, the performance of the machine learning method is dependent on the original function $f$ that we are trying to learn (let's forget for a moment the non-deterministic error and focus on the properties of $f$).  I have a conceptual question. What would make a function easy to learn? For instance, a linear function can be easily learnt by linear methods such as linear regression and SVM. But in the general case, what would make a function easier to learn for decision trees or a neural network?   I believe feature engineering helps us move to a feature space in which the function we want to approximate is easier to represent. But what properties exactly are we trying to achieve for this function? Why do I get compiler errors with this Java code?  1  public List&lt;? extends Foo&gt; getFoos() 2  { 3    List&lt;? extends Foo&gt; foos = new ArrayList&lt;? extends Foo&gt;(); 4    foos.add(new SubFoo()); 5    return foos; 6  }  Where 'SubFoo' is a concrete class that implements Foo, and Foo is an interface.  Errors I get with this code:   On Line 3: "Cannot instantiate ArrayList&lt;? extends Foo&gt;" On Line 4: "The method add(capture#1-of ? extends Foo) in the type List&lt;capture#1-of ? extends Foo&gt; is not applicable for the arguments (SubFoo)"   Update: Thanks to Jeff C, I can change Line 3 to say "new ArrayList&lt;Foo&gt;();".  But I'm still having the issue with Line 4. How do you compute the earth's radius at a given geodetic latitude? 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 I'm looking for a short story from about 50 years ago about a robot who escapes after being slated to be melted down and discovers while in hiding that it has evolved to have some supernatural powers. (c) Let $\mathcal{L}^*\subseteq\mathcal{L}^{\text{FOPC}}$ be a first order language of predicate calculus consisting of three unary function symbols $f,g,h$.  (i) Write down an $\mathcal{L}^*$-sentence $\phi$ such if $\mathcal{A}$ is an $\mathcal{L}^*$-structure with $\mathcal{A}\vDash\phi$ then the restriction of $h_\mathcal{A}$ to the range of $f_\mathcal{A}$ gives a one-to-one function onto the range of $g_\mathcal{A}$.  (ii) Write down an $\mathcal{L}^*$-sentence $\psi$ such that if $\mathcal{A}$ is an $\mathcal{L}^*$-structure with $\mathcal{A}\vDash\psi$ and the domain $A$ of $\mathcal{A}$ is finite then the cardinality $|A|$ is a square.    Part (i) is easy enough, but I'm having trouble with part (ii). I assume that you can use part (i). My initial idea was to use $h$ to ensure $|Range(f_A)| =|Range(g_A)|$ but I'm not sure where to go from there. Thanks. I'm working with  that has X Y coordinates. They are akin to '3672187.92698000, 534175.72095400'.  I would like to convert them to longitude latitude so they are more like '-90.097017, 29.963176'.  I've seen this  however I don't have that software. I was able to download and install  but I am unfortunately perplexed by its complicated interface. Would like to do the conversion with it, if possible. Properties of invertible matrices Show that if $A$, $B$, and $A + B$ are invertible matrices with the same size, then   $A(A^{-1}+B^{-1})B(A+B)^{-1}=I$      What does the result in the first part tell you about the matrix $(A^{-1}+B^{-1})$?   I get the first part. Help me with the second part. Is JavaScript a pass-by-reference or pass-by-value language? The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this? How to fix "The system is running in low-graphics mode" error? Lightning Cancel Enqueued Server Side Action Rotation and translation of a conic-section I tried to solve the following exercises, so I want to ask you if my answers are correct.     1) Given the coordinates system $(O'; X'' Y'')$ asociated to the    basis $B=[{b_1=\frac{1}{\sqrt{2}}; \frac{1}{\sqrt{2}};  &gt; b_2=\frac{-1}{\sqrt{2}}; \frac{1}{\sqrt{2}}}]$ with origin in    $O'=(2;5)$ and the system $(O;XY)$ asociated to the standar basis, find the intersection between $Q: y''^2=-4 \sqrt{2} x''$    and the straight line in $(O,XY)$ $V=(0;5)+t(-1;1) t\epsilon R$    Well, first I tried to write $Q$ in terms of $X$ and $Y$, and not in terms of $X''$ and $Y''$. I used the formula:  $(\begin{matrix}  X''\\  Y'' \\  \end{matrix})$ =$(C)_B$ × $(\begin{matrix}  X-2\\  Y-5 \\  \end{matrix})$   Then I replaced those values in the equation of $Q$ and I got $Q: \frac{(-x+y-3)^2}{2}=-4 \sqrt{2} \frac{(x+y-7)}{\sqrt{2}}$   After that, I found the intersection between $Q$ and $V$ using equations and I got that the intersection points in $(O;XY)$ are $P_1(3;2)$ and $P_2(-1;6)$      2)Given the coordinates system $(O,X'Y')$ asociated to the basis    $B=[{b_1=\frac{1}{\sqrt{2}}; \frac{1}{\sqrt{2}};  &gt; b_2=\frac{-1}{\sqrt{2}}; \frac{1}{\sqrt{2}}}]$ with origin in    $O=(0;0)$ and the ellipse $9X'^2+5Y'^2-3X'+2Y'-10=0$ find the    coordinates of the centre of the ellipse in $(O,XY)$    So, here I found the centre of the ellipse in $(O,X'Y')$ and it was $(\frac{1}{6}; - \frac{1}{5})$, then, doing something similar to what I've done before I found out that the centre in $(O,XY)$ was $( \frac{11}{30 \sqrt{2}};$ $\frac{-1}{30 \sqrt{2}}$) How can I recover photo files from a memory card with a corrupt filesystem? I know this is not specifically a photography issue but since many of us with prosumer/professional-level DLSRs use Compact Flash cards, it is bound to happen to others as well.  I have a Sandisk 16GB Ultra card that occasionally had the camera reporting inability to access the card. I had to reinsert the card to continue using it. I was able to read the card and transfer the photo files to my computer drive. Today, the same thing happened again, just that nearing the capacity of the card, it failed one last time and the camera was subsequently unable to read it anymore. Despite reinsertion.  My other CF cards never once exhibited this problem, so it's pretty much isolated to this card.  The card is similarly unrecognisable on my computer CF card reader. I think the filesystem is toast, but I suspect the photo files are still intact. I would like to find ways where I can inspect the raw binary data in the card and hopefully recover the photos? I need rules to drop some malicious Apache connections I drop all traffic on ports except on 80 for my web server.  I have some rules like this on iptables:  iptables -A INPUT -p tcp -m tcp --dport 80 -m string --string "cgi" --algo bm --to 1000 -j DROP   Someone who have more can share? I know always the bad hackers still updating, but some of them always begin with the same code. I need to Drop the connection based on some criteria. Here are some Apache log (I remove ips but each atack come from the same):  Attack 1: This I don't know what are trying to do, but make it 50 times from the same ip  GET / HTTP/1.1  301 224 -   Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 GET / HTTP/1.1  302 3387    -   Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22   Attack 2: this try to get information about server only.  GET / HTTP/1.1  301 224 http://myip:80/ Go-http-client/1.1 GET / HTTP/1.1  302 3228    http mywebsite  Go-http-client/1.1 GET /es/ HTTP/1.1   200 40947   https mywebsite Go-http-client/1.1   Attack 3: they try get access to a login page vulnerability  GET /userlogin/login.aspx HTTP/1.1  302 186 -   -   Attack 4: this try to access a cgi at first request, (see my first iptables rule to drop this)  GET /hndUnblock.cgi HTTP/1.0    302 186 -   Wget(linux) GET /tmUnblock.cgi HTTP/1.0 302 186 -   Wget(linux)   I'm very new with server this 4 attacks are from only last 12 hours... Have thousands per week. The sequence of triangular numbers is well known. Consider now the triangular numbers modulo some positive natural number $k$. That is, let $T_{n,k}$ be the remainder of dividing $T_n$ by $k$. For the regular sequence of triangular numbers, we can take as convention $T_n = T_{n, \infty}$.  Question: For all values of $k, i &lt; k$, does there exists some $n$ such that $T_{n, k} = i$ Elementary central binomial coefficient estimates I have a Alcatel onetouch model 50540 running android 5.1.1 as in the title. it is rooted and began uninstalling pre-installed bloatware on my device. I do not have a complete list of uninstalled apps because I had only kept track after the first few, but ill list the ones I do know about    Download Manager Downloads Talkback Hangouts Cricket Wi-Fi Manager Camera Email Onetouch Launcher   That is the essence of what I did. I do have an edited hosts file as a makeshift adblock.  Play store gives me an error code 0 to which I removed app data and tried again, same problem.  I have tried installing local apps which brings up an "app not installed" box.  Lastly I have tried do directly extract the app into /data/app and rebooting which didn't work.