I want to know whether I can make a normal text to have a functionality like a reserved word. For example : &quot;and&quot; is a reserved keyword in python and what I want to do is, give the same power as of &quot;and&quot; to another thing, let's say &quot;abc&quot;. So w, i = 0,0 if w == 0 and i == 0:    print(&quot;True&quot;)  w, i = 0,0 if w == 0 abc i == 0:    print(&quot;True&quot;)  will be the same. Anyone have any idea if this is possible and how can I do that. Thank You.
Can you add new statements (like print, raise, with) to Python's syntax?  Say, to allow..  mystatement "Something"   Or,  new_if True:     print "example"   Not so much if you should, but rather if it's possible (short of modifying the python interpreters code)
Split polygons into equal areas within each region I've a set of regions within a city. I'd like to split each region into five subregions and then get the centroid of each one of them.  I know how to make a vector grid, but the problem I have is that the generated points are not taking into account the regions, they're only related to the general map.  I have this:    And I want to split each region in five equal size areas. Something like this:    I'd like to build a visualization similar to this one: . In order to accomplish that, I need to split each region, because the original ones are pretty big. Adding Maximum and Minimum Latitude and Longitude as features in ArcGIS for Desktop? an "X is an X is an X" what does this mean? Find $|(\mathbb{Z} \oplus \mathbb{Z}) / \langle(3,6)\rangle|$ and determine if its cyclic Number theory lemma - $x^2 \equiv 1 \pmod p$ implies $x\equiv\pm 1\pmod p$ How to ignore accent in SQLite query (Android) Find the expected value of $\frac{1}{X+1}$ where $X$ is binomial The problem:  X is a binomial random variable, find $E[\frac{1}{X+1}]$ n and p are not given  PDF for a binomial distribution is $\binom{n}{k}p^k(1-p)^{n-k}$  Expected value is $\sum{x_ip(x_i)}$  But this is where I get stuck, I'm really rusty on my statistics and I'm not sure exactly how to structure it in the next step? I think I want to get the form of the following out of the summation  $\sum _{k=0}^{n} \binom{n}{k}p^k(1-p)^{n-k} = (p + 1 - p)^n = 1$  But I'm not sure if it should look like  $\sum \frac{1}{xp(x)+1} $  and if it should where to go from here? How do I count the number of occurrences of a char in a String? How to remove wine completely How can I remove the wine folder and all the applications in that folder?  I've tried via synaptic but it keeps showing up in the application menu. Font characters displayed as squares in Ubuntu 18.04 Is there a 'rule of thumb' on the upper limit of how many related records in related objects an object should have to avoid slow page loading? Typically, each record in Salesforce will be 2kb large: .   However, let's say in an extreme example, the Opportunity object is related to 40 custom objects, each which has 100,000 records. The page would load much slower, especially in an older browser version.   1) Is there a 'rule of thumb' as to what the upper limit of how many related records an object should have?   2) Also, , there's an indication that there's some sort of tier-tuning per org based on the volume of data it has. Is that correct? And if so, are the volume ranges and respective tier-tuning capacity available? Show that $f(z)=0$. Suppose that $f:\mathbb{C}\rightarrow\mathbb{C}$ is analytic on the open unit disc and continuous on the closed unit disc. Assume that $f(z)=0$ on an arc of the circle $\{z\in\mathbb{C}:|z|=1\}$. Show that $f(z)=0$. I am trying to find the splitting field of $x^6+x^3+1$ over $\mathbb{Q}$.  Finding the roots of the polynomial is easy (substituting $x^3=t$ , finding the two roots of the polynomial in $t$ and then taking a 3-rd root from each one). The roots can be seen  [if there is a more elegant way of finding the roots it will be nice to hear]  Is is true the that the splitting field is $\mathbb{Q}((-1)^\frac{1}{9})$ ? I think so from the way the roots look, but I am unsure.  Also, I am having trouble finding the minimal polynomial of $(-1)^\frac{1}{9}$, it seems that it would be a polynomial of degree 9, but of course the degree can't be more than 6...can someone please help with this ? How to center column values in a table? How can I center the column values in this code?  \documentclass[conference]{IEEEtran} \begin{document} \begin{table}   \centering   \begin{tabular}{|p{2.5cm}|p{2.5cm}|p{2.5cm}|}     \hline     Reconstruction strategy &amp; aa          &amp; bb( \%) \\ \hline     Classic                 &amp; 3342 voxels &amp; 68 \%   \\ \hline     VC                      &amp; 4296 voxels &amp; 87 \%   \\ \hline     V m=7                   &amp; 4745 voxels &amp; 96 \%   \\ \hline   \end{tabular}   \newline\newline    \caption{title}\label{tab1} \end{table} \end{document} Sorting an array of an array of objects in PHP by key value Basically I have a setup like the following:  Array (  [0] =&gt; Array ( [0] =&gt; stdClass Object ( [nid] =&gt; 1 [title] =&gt; title1 [uid] =&gt; 1 [parent] =&gt; 0 [weight] =&gt; -15 [name] =&gt; name1 [value] =&gt; 0 )                [1] =&gt; stdClass Object ( [nid] =&gt; 2 [title] =&gt; title2 [uid] =&gt; 1 [parent] =&gt; 0 [weight] =&gt; -7 [name] =&gt; name2 [value] =&gt; 100 )                [2] =&gt; stdClass Object ( [nid] =&gt; 3 [title] =&gt; title3 [uid] =&gt; 2 [parent] =&gt; 0 [weight] =&gt; -1 [name] =&gt; name3 [value] =&gt; 0 )                [3] =&gt; stdClass Object ( [nid] =&gt; 4 [title] =&gt; title4 [uid] =&gt; 2 [parent] =&gt; 0 [weight] =&gt; 1 [name] =&gt; name4 [value] =&gt; 80 )               )   )   What I need is a way to sort all the arrays inside the parent array by the [value] key in the Object. I've been trying for about 2 days now with usort and different methods but I just can't seem to get my head around it. The [value] key will range anywhere from 0 to 100 and I need all of the arrays sorted in decreasing order (IE: 100 down to 0). Calculationg base-resistor between microcontroller and transistor I'm curious, when connecting my 2N2222 transistor's base to a PWM output pin on my Arduino, I know the Arduino can deliver a maximum of 40mA current. The 2N2222 only requires around 5 to 10 mA on it's base to switch the collector and emitter. Now, when calculating the base-resistor under "normal" conditions where I'm merely switching it directly from Vcc, the following applies:   However, when putting in a 500 ohm or 1K resistor in (1K for 5mA) directly it works great. But putting it in between the Arduino and the transistor, the transistor doesn't switch.  I suspect thus, that the resistance is too high of the base-resistor. Therefore, we may very well not need a base-resistor.  But, according to spec, the Arduino can deliver 40mA. So, am I correct in assuming the folling: 1) I should calculate the perceived resistance that the Arduino is giving, if it goes high to 5Volt and only gives 40mA, and then 2) Subtract that from the 500ohm resistor needed to make the transistor operate optimally.  Example:    So, I'm theorising that I have to then put in a 375 ohm resistor in to make the total resistance between the Arduino and the base resistor 500 ohm.  Somehow this doesn't feel right. Keep in mind, I'm not an electronic engineer, so I might have the cat by the tail here :P Spy from Earth studies Galactic Empire nobility and prevents plot to depose Emperor JavaScript displaying a float to 2 decimal places ceiling fan from a switch with only black and red wires? The current switch controls an outlet in the corner of the room for a lamp. I pulled it out and noticed three sets of individual wires: two set of wires coming up into the box from the bottom, and one set with a red wire coming down into box.  All the white and grounding wires are capped.  Also all the black wires are capped; one set I’m assuming is the hot since I see it contains a red wire. On the back of the switch, the top two ports have black wires and the bottom right has the one red wire.  There are two black pigtail wires coming off the black capped wires. I tried to connect a separate switch to control a ceiling fan with remote. I ran new wire making the old switch box into a two switch. I ran 14/2 gauge wire to ceiling for fan / light remote combo. Fan didn’t work after multiple re-wiring  combinations. The breaker did pop and half click when it popped. Then I thought to re-wire the ceiling fan wires as if I was going to make it into outlet only and use a tester to indicate an open ground, or a wiring error but the two light on tester are both orange indicating correct wiring. I heard that sometimes the ceiling fan remote transformer goes bad. Should I check batteries and/or unit placement? I’m really confused at this point why the light is not working at least with remote after follow wiring installation instructions that were included with the fan. I think it’s my wiring with the switch. The way I left the wiring is that it has constant power. As if we’re a outlet the current switch does not turn it off. If $f(x)$ is continuous on $[a,b]$ and $M=\max \; |f(x)|$, is $M=\lim \limits_{n\to\infty} \left(\int_a^b|f(x)|^n\,\mathrm dx\right)^{1/n}$?