I'm very new to Leaflet and made a map using a GeoJSON Layer. I'd like to filter points from the GeoJSON Layer by a checkbox input. If I consider only one Parameter (Par1) with levels A, B and C I can do it: I  different subsets of my layer by pre-defining all possible filters:    function filterA(feature, layer) {             if (feature.properties.Par1 === "A") return true;         };   The same I'd do for B and C, each resulting in a different Layer:  var dataA = L.geoJSON(oli_data.responseJSON, {             pointToLayer: MakeMarker,             filter: filterA,             onEachFeature: MakePopUp         }).addTo(map);   The same way I can create a subset for levels B and C using their filters. I let the user select the layer by:              controler = L.control.layers(MapsTypes, {             "A": dataA,             "B": dataB         }, {             collapsed: true         }).addTo(map);   Eventually I want to let the user filter the data by a combination of levels of Parameter1 and Parameter2. For that I would like to use Checkboxes, one with Parameter1 as title and all levels of Parameter1 as possible choices, and the same for Parameter2.   How can I achieve that without having to make extra layers for each possible combination of levels but rather by filtering by the actual user input?
I would like to filter the markers on my (geojson) layer according to two features: year and type of event, ideally using both filters (year and eventType) as check-boxes without using layerGroup at all. I would like to be able to click on a checkbox and update dynamically the markers by filtering them according to feature.properties.eventType too, in addition to the year displayed, something like    &lt;input type="checkbox" id="all" name="all" value="all"&gt;   &lt;label for="all"&gt;All&lt;/label&gt;   &lt;input type="checkbox" id="funfair" name="funfair" value="newsletter"&gt;   &lt;label for="funfair"&gt;Funfair&lt;/label&gt;   &lt;input type="checkbox" id="trade" name="trade" value="trade"&gt;   &lt;label for="trade"&gt;Trade&lt;/label&gt;   &lt;input type="checkbox" id="exhibition" name="exhibition" value="exhibition"&gt;   &lt;label for="exhibition"&gt;Paid exhibition&lt;/label&gt;   etc... which would trigger a  filter: function(feature, layer) {   return feature.properties.eventType == value-of-checkbox; }   I have five types of eventType. So, for instance, if 1890 is checked, the map is showing all 1890 events, no matter what kind of event it is (because by default it would show all events). If the user checks the 'funfair' and the 'trade' checkbox, though, I want the map to show only the 1890 events of the funfair and trade kind, and not other kind of events.  This is my complete script, which so far is working fine with filtering by year.  var oldmap = L.tileLayer('address', {   maxZoom: 12 }),  var modernmap = L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {   maxZoom: 12,   id: 'mapbox.streets',   accessToken: 'mytoken' });  var map = L.map('map', {   center: [40.1857864,-4.5536861],   zoom: 7,   layers: [oldmap, modernmap] });  var baseMaps = {   "Old map": oldmap,   "Modern map": modernmap };  var jsontest = {"type": "FeatureCollection",   "features": [     {       "type": "Feature",       "geometry": {         "type": "Point",         "coordinates":  [ -16.5471268,28.4136726 ]       },       "properties": {         "Name":"Point1",         "year":'1892',         "eventType":"funfair",         "notes":""       }     },     {       "type": "Feature",       "geometry": {         "type": "Point",         "coordinates":  [ 2.1753895,41.3767925 ]       },       "properties": {         "Name":"Point2",         "year":'1890',         "eventType":"trade demonstration",         "notes":""       }     }   ]};  var mapLayerGroupsYear = [];  function onEachFeature(feature, layer) {   var year = mapLayerGroupsYear[feature.properties.year];   if (year === undefined) {     year = new L.layerGroup();      //add the layer to the map     year.addTo(map);      //store layer     mapLayerGroupsYear[feature.properties.year] = year;   }    //add the feature to the layer   year.addLayer(layer);    }   var myLayer = L.geoJSON(jsontest, {   onEachFeature: onEachFeature })  L.control.layers(baseMaps, mapLayerGroupsYear).addTo(map);   I am a beginner with leaflet so please forgive the dumb question, in case it is.
Is there an official rule that the minimum damage can't be negative? A slightly humorous thought occurred to me (a recovering rules lawyer) after reading .     "None of the answers actually specify that 0 is the minimum damage."   Logically it wouldn't make sense for an attack to apply negative damage or healing, except in specific cases like hitting a flame elemental with a fire attack. Ruling that you could do negative damage would lead to an exploit to avoid costs of healing. As such I highly doubt any DM would make such a ruling. I definitely wouldn't except for the most absurd and humorous of games were failure is the expected result not success.  Another possibility (as suggested by Secespitus) is that negative damage would reflect back on the attacker. This could be seen as punching a strongman so hard (or in just the wrong way) as to injure your own hand.  This would also play well in a failure is the only option game, and if there is a rule suggesting that it would be an appropriate answer to this question as well.  Take the case of a person with less than 8 Strength, no levels in monk, and does not have a tavern brawler.  Would they do -1(1 - 2) damage on unarmed strikes? If so what would the result of the negative damage be?   "Healing" the target because such a puny hit actually raises their fighting spirits and makes them more capable of fighting Reflective Damage, the attacker actually takes 1 point of damage, representing injury to his hand or other damage   I am curious to know if there is an official rule stating that the minimum damage an attack can do is 0 or is there something in the damage calculation that I am missing that would otherwise prevent negative damage? Any Set with Associativity, Left Identity, Left Inverse is a Group Equation for a smooth staircase function I am looking for a smooth staircase equation $f(h,w,x)$ that is a function of the step height $h$, step width $w$ in the range $x$.   I cannot use the unit step or other similar functions since they are just one step. I have been experimenting with various sigmoid curves and while I can get a single smooth step I cannot get to realize the staircase shape. The closest staircase function I have found is given in  in equation (18) and depicted in Fig. 4 and it is a close example of what I want (i.e generate a staircase in the range $x$ for arbitrary step heights and widths) but it is not smooth at all.  Regarding smooth steps, a likely starting point I found is  but it gives a smooth function of just a single step. I have been unable to modify the equation to make it into a staircase. I would like to specify arbitrary step heights and widths and generate a smooth staircase in the range $x$ specified.    Edit (Extra info): The smooth function I mention above has the problem that the upper, horizontal line is not equal in length to the lower, horizontal line which is why I have been unable to adapt it into a staircase function   Edit 2 Including some pictures     Edit 2 Plot of $s$ with a steep slope showing a different width on the first horizontal line How to make crontab email me with output? How can I make crontab email me with the output of its jobs? I have MAILTO=redacted@yahoo.com.au above the jobs, but it doesn't work.  I know I need to use something like Postfix or Sendmail but for the life of me I cannot find out how to achieve this. I've searched and searched for a simple guide on setting up Postfix but they're all insanely complicated and expect you to be setting up a whole server to send and receive email and to know all the terms (like, what is a domain name for outgoing emails?).  All I want to do is have crontab email me. Why is this so difficult??  Additional Info:  My crontab file looks like this:  MAILTO=redacted@yahoo.com.au 1 0 * * * ~/Desktop/toskymesh.sh 59 6 * * * ~/Desktop/tooptus.sh 0 3 * * * snapraid sync   More Additional Info:  The output of ps -ef | grep '[s]endmail'  root 6840 1370 0 10:26 ? 00:00:00 sendmail: MTA: accepting connections   I know for sure cron is working, but I'm testing the mail command with echo Test | mail -s Test redacted@yahoo.com.au anyway. One adjective for two or more nouns Could we use one adjective for two nouns? Is the following sentence correct?     It has low speed and voltage. Don't let the association bonus be given away as bounties When a user with at least 200 rep on any Stack Exchange site registers a new account on another SE site, they immediately receive 100 rep on that site as an .  This is a deliberate feature to give users who are already familiar with how the SE platform and community works a bit of an extra boost (e.g. letting them upvote and comment immediately), and it's pretty much working as intended. What's probably not intended is that, currently, this bonus rep can be given away as . In fact, because awarding bounties currently requires only 75 rep, any user with 200+ rep on at least one site can join another site, receive the 100 rep bonus, and immediately award it all as a bounty to another user, without having to earn any actual rep on the site at all.  Not only does this seem contrary to the design intent of bounties (and of the association bonus), but it also seems ripe for potential abuse. (In fact, the only thing stopping a sockpuppet ring from gaining unlimited rep this way is the fact that the bounties would likely be sooner or later noticed by mods.) It's also possible for experienced users to (more or less) accidentally bounty their reputation so low that that they lose access to basic site features that they'd normally have due to the bonus.  Arguably, of course, this is entirely the user's own fault, but it can still be .  Also, this behavior , which currently require 110 rep to answer for users with the association bonus. The fix I'd like to suggest is simple:  If a user has been awarded the association bonus, don't let them award a bounty that would take their rep below 100.  Of course, it would still be possible for users with the bonus to drop below 100 rep via other means, e.g. by having their posts downvoted.  But they wouldn't be able to just give away this baseline rep to other users any more. Is it ok to say "good morning" at anytime? Suppose Pat is male. Which one is correct?     I found out Pat is male.      I found out Pat was male.   Does the following change make any difference?     She said Pat is male.      She said Pat was male.   Suppose you created a mathematical model. When you are describing a result, which one (or neither) is correct?     The model analysis shows that the equilibrium is stable.      The model analysis showed that the equilibrium is stable. How can I prove these are the adjoint operators? sit on the beach vs. sit at the beach Sum of reciprocals of numbers with certain terms omitted I know that the harmonic series $1 + \frac12 + \frac13 + \frac14 + \cdots$ diverges. I also know that the sum of the inverse of prime numbers $\frac12 + \frac13 + \frac15 + \frac17 + \frac1{11} + \cdots$ diverges too, even if really slowly since it's $O(\log \log n)$.  But I think I read that if we consider the numbers whose decimal representation does not have a certain digit (say, 7) and sum the inverse of these numbers, the sum is finite (usually between 19 and 20, it depends from the missing digit). Does anybody know the result, and some way to prove that the sum is finite? How to avoid using sudo when working in /var/www? I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain. Let $G$ be abelian, $H$ and $K$ subgroups of orders $n$, $m$. Then G has subgroup of order $\operatorname{lcm}(n,m)$. Remove last character from line I want to remove last character from a line:  [root@ozzesh ~]#df -h | awk  '{ print $5 }' Use% 22% 1% 1% 59% 51% 63% 5%  Expected result:  Use 22 1 1 59 51 63 5 Proof that any simple connected graph has at least 2 non-cut vertices. How do I fix 'Invalid JSON' errors? I've been at this for almost two hours and no one seems to have the same problem as I and I doubt this will be solved but I'll try anyway.  this is the code  /tellraw @p ["Would you like to teleport?",{"text":"Yes","color":"green","bold":"true","clickEvent":{"action":"run_command","value":"/tp @p ~ ~4 ~ "},"hoverEvent":{"action":"show_text","value":{"text":"Confirm"}},{"text":"No","color":"red","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p{"text":"Come back when you want to teleport"}"}}}]   this part is fine  /tellraw @p ["Would you like to teleport?",{"text":"Yes","color":"green","bold":"true","clickEvent":{"action":"run_command","value":"/tp @p ~ ~4 ~ "},"hoverEvent":{"action":"show_text","value":{"text":"Confirm"}}   it's just when I add this  ,{"text":"No","color":"red","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p{"text":"Come back when you want to teleport"}"}}}]   Minecraft gives me the error:     Invalid JSON at line 1 column 203   I've tried to space it out and figure out what column 203 is but I can't, I don't know what I did. Anyone got any ideas? How to show that when the linear transformation $\Phi =\psi \circ \phi : E \rightarrow G$ is injective, then $\phi$ is also injective? How to show that when the linear transformation $\Phi =\psi \circ \phi : E \rightarrow G$  (where $\phi : E \rightarrow F$ and $\psi : F \rightarrow G$) is (1) injective, then $\phi$ is injective and when (2) $\Phi$ is surjective, then $\psi$ is also surjective ?  I've tried to prove it by the definition of injection and surjection, but I'm not convinced myself by it.  For example, in the first case :  If $\Phi$ is injective, $\forall g \in G$, we have $0$ or $1$ $e \in E$ such as $\Phi(e)=g$.  $\Rightarrow \Phi(e) = \psi(\phi(e)) = \psi(f) =g$.   So $\forall f \in F$, we also have $0$ or $1$ $e \in E$ such as $\phi(e)=f \in F$.   $\Rightarrow \phi$ is injective.  Is this right or did I prove nothing at all ? I think it is easier to convince myself/ to understand with surjectivity but still.. Do rogues get sneak attack damage added to attacks made outside their turn? PHB says 'once per turn,' so, it would seem that a Rogue with Sentinel, for example, could "consistently" deal Sneak attack twice per round (whether the enemy triggers an OA or the melee weapon attack provided by the Feat).  So, can rogues deal sneak attack damage with any weapon attack outside their turn? (obv. one that meets the standard requirements--finesse, adv or adj ally) How to solve missing libmng.so.1 in Trusty (14.04) Package is no more available I would like to run SoulseekQT. However unfortunately one of the dependencies is libmng1, which is no more included in Trusty. sudo apt-get install libmng.so.1 or libmng1 or libmng1:i386 in Trusty (14.04) no more available. Do you have any idea how to solve this conflict? I mean is it really sure that libmng1 is excluded? Could I use libmng2 somehow instead? If not, could I somehow rebuild libmng1 for Trusty? Or do I have to downgrade back to Saucy (13.10)? Extrude and bevel an imported svg curve I exported an svg 1.1 file from Adobe Illustrator CS6. I joined all the shapes by pressing Ctrl+J. I set the curve shape to 2D. Then I extruded using the right hand side panel:    So far so good. But when I try to apply even a slight bevel, all hell breaks loose:    It does get less insane if I bring the bevel down by multiple factors of 10... But then I really don't have much of a bevel.  Am I doing something wrong? Am I using the wrong kind of object? Should I be doing this with meshes? Do my curves just need cleaning up?