Protector Gods Vs. Protective Gods

Question: Shall I say "protector Gods" or "protective Gods" when talking about those small figures that protect the house?
Answer: Either phrase is immediately understandable to a lay audience, and a quick survey of Google Books reveals that both are used in academic works to refer to the best-known of such deities in the Western tradition, the Roman lares and penates.
If you are writing in an academic context you would do well to survey whatever literature in your discipline deals with the particular deities you will be writing about. If this shows that one or the other term (or some entirely different term) is the established "term of art", you should use that one. But aside from established local use there is no reason to prefer one over the other.
Comment: I wasn't actually familiar with *penates*, so I was a bit surprised to find it's [apparently as common as *lares*](http://books.google.com/ngrams/graph?content=lares%2Cpenates&year_start=1700&year_end=2000&corpus=15&smoothing=3&share=). But I assume that like the latter, it's almost exclusively used of ***ancient** Roman* representations/deities. If there are any such things "actively on duty" today anywhere in the world, I think it would only be appropriate to use those terms if they're part of a clear unbroken tradition traceable back to those antecedents.
Comment: @Fumblefingers They're all over the place, and of course in speaking of any particular deity you employ its own name; but I think OP is looking for a generic term. ... And the Roman deities are usually spoken of together, almost hypehenated, which is why they're pretty equally common.
Answer: Anglophones in general don't tend to believe in/speak of such things - but if we have to, we'd probably call them house[hold] gods.
If it's important in OP's context to include some variation of protect, I suggest that protector is probably the better choice. It can easily be understood to mean something/someone intended to protect (without necessarily implying that any actual protection is taking place).
On the other hand, protective strongly implies something that really does protect. In principle, a writer could use that form with the sense that people who have such talismans believe in their significance, but I think most readers would assume the writer also believed in them. If OP wants to give that impression then of course he can call the figurines protective gods - there's nothing ungrammatical in such usage.
Comment: Hmmm... Interesting. The first part makes more sense to me. A "protector god" suggests to me that being a protector is their primary purpose. But saying "protective god" is a bit less definite; meaning this god is simply being described as "protective" as a trait. I'm not seeing how ***belief*** plays as much as a significance in this context.
Comment: @Robert: I'd agree with that completely opposite interpretation if we were just ascribing the quality of being *solicitous, nurturing watchful, etc.* to some particular god (some gods are protective, some are wrathful, jealous, whatever). But as I understand it, in OP's context, we're talking about gods *whose defining attribute is that they guard/protect the house*. Since we already know that, it can make a difference which form you use. To me, saying *protective* more strongly implies *the god exists, and is actively protecting right now*, but maybe that's a personal thing.

Protector Gods Vs. Protective Gods


Cannot Move Object That is Keyframed

Question: I have a sphere in my scene, and I keyframe its position. However, I later decide to change its position on that keyframe, so I go back to the keyframe in question, and attempt to move the object. I cannot. It seems that Blender will not let me move an object on an existing keyframe. Is there a setting I am missing? Also I cannot adjust it's position between two keyframes to add a new one in the middle. It seems as though setting a keyframe locks it in stone. Any help would be appreciated.
Comment: Select the existing keyframe you wanna remove and press 'x' -> delete keyframe
Comment: maybe share your file (or just an object/armature that doesn't work anymore): https://blend-exchange.giantcowfilms.com/
Answer: You can right click the key frames and clean them or you have to delete them and place the object in desired position and then add the key frames.
Answer: Ok well, I had a dynamic paint modifier on the object. I removed that modifier, and like magic, i could move the object and key it again on the same frame. Looks like it may have just been a bug. I was using a beta version. I switched to the latest stable and I no longer have the problem. :) thanks for your tips

Cannot Move Object That is Keyframed


Calculate Energy Used on Server

Question: Can I use PHP to calculate the energy used on a server I don't have immediate access to?
Comment: I doubt it without third party software.
Answer: If you have a USB Uninteruptible Power System, you may be able to query it from time to time to find the actual load on the UPS (in Volt-Amperes or Watts) Do this over time, e.g. take an average over an hour at 5 minute intervals, and you can get a measure that you can convert to kWh.
How from within PHP? You'll either need to develop an external call to the UPS daemon or something else, and then scrape the information from that.
Answer: You'll need an external sensor there.
So probably not.
Look at the tweet-a-watt if you can get a kill-a-watt unit.

Calculate Energy Used on Server


Mounting doorbell camera on brick facade

Question: Unfortunately according to the mounting template, one screw hole would be in the brick and the other would be in that mess of polyurethane non-sag sealant. I'm not sure what my options are as I don't think I could properly place a mounting screw in that sealant.
Answer: Dig out the sealant, replace it with an appropriate mortar. You can probably shift the wire's position up or down while doing so,bto arrange things do the top hole (which takes most of the strain) will be over brick rather than mortar. Drill and fasten appropriately.
Comment: Or instead of mortar, shape a piece of PT or PVC and hammer it into the gap, then drill a mounting hole.
Answer: Some possible options:

Remove sealant and put something in taht place
Move camera to side
Mount some kind of plate on wall then mount camera to plate
Make cavity in wall for camera
Use glue
Use epoxy resin
Use double sided tape

and so on


Can I use an FD-EF adapter with an EF-EOS-M speedbooster?

Question: I have an EF-EOS-M speedbooster for my M50. I just got a great deal on a FD 135mm 2.5 lens, and was wondering if I can put it together with an FD-EF adapter and the speedbooster. There doesn't seem to be much flange distance on the FD adapter.
Answer: Does your FD-to-EF adapter have a glass element? If so, then yes, you can do it, but the results will be fairly poor, IMO.
If your FD-to-EF adapter doesn't have a glass element, then your proposed combination will cause you to not be able to focus to infinity. This is because the flange focal distance of the FD mount is 42 mm is less than the flange distance of the EF mount's 44 mm. Any FD-to-EF adapter that doesn't have corrective optics is already 2 mm too much, in addition to the thickness of the adapter itself.
But as I said, if the FD-to-EF adapter does have a corrective optical element, then the back-focus and flange focal distances will all be correct. But the corrective element (which usually isn't as high quality as the elements in even most cheap lenses by today's standards), in addition to the optical element in the speedbooster, means you're just stacking a bunch of less-than-highly optimized optical elements together. It will work, and generate images that might be fun to say you've done it, but you'd be much better off just getting a FD-to-EOSM adapter to begin with.
Answer: You probably can do it, but stacking adapters increases the possibility of manufacturing inaccuracy causing focus issues (either focusing past infinity, if the adapter combination's too thin, or not focusing to infinity if the combination's too thick.
The main thing to keep in mind, however, is that you will lose all the electronic communication with a speedbooster. The FD/FL mount doesn't have the electronic communication the EF mount does (EF stands for electronic focus, btw), and any FD → EOS adapter won't be able to pass-through electronic communication signals.  You'll be limited to manual focus, and manual aperture (i.e., you have to use the aperture ring on the lens). There won't be lens EXIF information, and you'll have to do stop-down metering.  And without camera control of the aperture, you're limited to only the M and Av shooting modes.
Comment: FD lenses are manual focus lenses without any electronics, so there isn't anything "lost" by using an adapter.
Comment: @xiota, lost vs. EF -> EF-M adapting, which is what the OP is starting with.


How to avoid muting strings in some chords

Question: I have relatively short meaty fingers. Any hints how to avoid muting the A string on the chord 201202?
Comment: Does this answer your question? [How do I stop muting nearby strings or will my fingers reshape after some practice?](https://music.stackexchange.com/questions/51974/how-do-i-stop-muting-nearby-strings-or-will-my-fingers-reshape-after-some-practi)
Comment: There seems to be some confusion about whether you're playing classical guitar or not. Can you please add details?
Comment: Can you post a picture? It could tell more than the 0.027 thousand words currently in the question.
Comment: Sitting/standing? Acoustic/classical? Need a pic, too.
Answer: Look at it from several angles. From above, from the front and from the side.
From above first: if you're holding the guitar so you can see the frets, it needs to be in a more vertical position. This means that your hand and fingers  don't need to  be as flat on the fretboard. That's probably the main culprit.
From the front: if your guitar is slung low, you'll have the same sort of problem - the wrist is too bent to be comfortable, and if the angle (from the front) is tipping the head down, it's exacerbating that. I've sometimes found with students that raising the head of the guitar to even 45 degrees facilitates fingering.
From the side: your guitar needs to be about at right-angles to your body - in line with your shoulders. Probably the least of the worries. Nevertheless, try moving the neck in and out for its optimum angle.
But consider all these positions together, and move around, until your curled fingers can do what you want them to.
As John says, the 'standard' B7 has the bottom string muted, rather than the 5th string open. And strummed from root 5th string 2nd fret. I'm happy playing 5th and 6th strings both fretted on 2, but that's me. Maybe the song calls for B7/A, or 3rd inversion of B7 (with the ♭ 7th part of it in the bass) - maybe it's a bassline that requires it. Another option always denied to folk with short fingers is to use the thumb over the top, but maybe not good for you.
Comment: "if you're holding the guitar so you can see the frets, it needs to be in a more vertical position." - I don't find this to be true for me or for all of my students. Some of them, maybe. There should be a clear triangle between the abs, left leg, and back of the guitar. Often making that triangle means the frets are more visible for some players. "Slung low" - The question is tagged "classical guitar", so I doubt there's any slinging of any kind.
Comment: Good point. I read it as acoustic, as chords *can and do* get played on classical, but *generally are* on acoustic. Regarding looking at the fretboard, I discourage that from the start - there's really no need. Besides, I had a huge mirror in the studio! And - sitting or standing..? Wearing the guitar higher when standing emulates its position (vertically on the body) when sitting, but can make a big difference to fretting hand angles.
Comment: Chords can and do get played on classical? Um... I'm playing chords literally every single piece I play every single time I play classical. What's a classical guitar piece without chords? Oh wait there is that one Brouwer that's only got like three chords in it.
Comment: I agree with this answer and the points in its comments. Posture is usually one of the main culprits when not being able to play cleanly on classical guitar. This [YouTube video](https://youtu.be/Awl6Q8Ef-RY?si=AFoZdtg8eGrpMdSq) helped me understand how to fix my playing posture a bit. I believe it mentions all points in this answer.
Answer: Might be that your thumb is too far up. if you move your thumb about half way down the fret then you can have your fingers closer to 90° from the fretboard.
I attempted a drawing to explain better.

see with the thumb so high up you can't get the angle with your fingers on the fretboard and they touch other strings. you want to be fretting them at 90° so they only touch one string.
edit: this is alot harder to play but it's just a matter of practice and strengthening
Comment: The image suggests bending the wrist (or fingers?) outwards, which I guess is not what you intended to show?
Comment: This contradicts what I've been taught and read about thumb positions
Comment: @user1079505 no, i'm not sure how anything was positioned so this is just to say that moving your thumb lower will give more space between fingers and unfretted strings.
Comment: @ToddWilcox thanks but your comment doesnt help me address your statement, in what way does it contradict?
Answer: All good answers.
Allow me to offer this much.
Ensure that you practice playing whilst standing and playing with the guitar strapped on. (Or seated upright in a chair without arms.)
This allows your arms to be free, and let you move around and to position your fingers, hands, wrists in whatever fashion facilitates the most comfortable angle for phrasing each different chord.
I say this because many players endeavor to play the guitar slumped back into the couch cushions, or bunched up on the bed amid pillows and other such objects. And, naturally, the arms and elbows become trapped, forcing the player to contort their wrists in an unnatural way while playing.
Stand up. Be free. Play well.
Comment: Play classical guitar while standing?
Comment: John Jarvie is one of many classical guitar instructors who advocates playing while standing up, with the guitar strapped on.

Notice in my earlier answer I also added, "or seated upright in a chair without arms".

Some electric guitar players insist on playing rock and blues while seated. (Jeff Skunk Baxter for one. My brother Stacey as well.)

To each their own.
I try to avoid stating that any one method is THE method that works.
Every hiker chooses his or her own trail.
Answer: A standard B7 chord is actually X21202, not what you wrote. Playing what you wrote will result in no low B which will make the chord sound muddy and ambiguous. Try  X21202, most can play this chord without much trouble. If anything the D string might get muted but since you don't play the low E you can cheat your second finger towards the low E to give the D string room to vibrate.
You CAN play 221202 and play the two low notes with your second finger but this will give you a 5th in the bass, B7/F#, which sounds a bit too heavy and changes the quality of the chord. I don't care for it but some people like this type of heavy sounding chord.
Comment: Forget about calling it the B7 chord. I want to play 201202 because that's what the notes in the piece I'm playing are. And my middle finger is muting the A.
Comment: @Wynne That sounds like you're holding the finger at too low an angle and need to arch it higher. You might have to bend your wrist more than would be comfortable in order to get a position that works, and put the wrist under the neck, rather than beind it. It might help to hold the guitar - or its neck - higher than you do.
Comment: @Divizna made a good suggestion. Another non-traditional option is you can try reaching over the top of the neck with your thumb to play the bass note.


How to get crash dialog with report button

Question: I purposely make my own application crash. I get the following dialog.

However, I wish to get the following crash dialog with report button.

May I know how I can do so? I had signed my application. (But I transfer the APK locally to my phone, not through Android market). I still can't get the Report button.
Answer: As far as I know, the Report button only shows when the app is installed via the Market (i.e. is signed and not in debug mode nor with a debug key). This data is all shown in LogCat if you are USB debugging.
Edit: Also, you can catch this information and file a report yourself if you want, using this method.
Comment: I had signed it. But I do not install it through Android market. Does it matter?
Comment: You installed it via USB? Yes, it matters. The `Report` data is sent to the Developer Console on the Google Play system, therefore the Report button will only show up if it is downloaded via Google Play (Android Market, whatever :P).
Comment: @Eric so even if you compile a signed APK and install it via adb the report option won't show?
Comment: @JMRboosties Correct.
Comment: This is such an annoyance. Any reason why play store can't just verify that the app has a known certificate?
Answer: Use the acra library in your app. This basically "is a library enabling Android Application to automatically post their crash reports to a GoogleDoc form". You can modify its use to pop up a dialog like the above, and ask the user to report the issue, with an additional user-typed message, even.
Answer: Your phone may running a customized rom like CM.
If you want to report log when your app get FC,one way is catch exceptions and mail them.


Precise shot or rapid shot:Which is more important to a ranged build?

Question: We all know that both Precise Shot and Rapid Shot are important to ranged builds, but if you had to only take one which one is mechanically more vital to a build?
Comment: Campaign theme may make all the difference. Is it expected that the majority of combats take place in [1980's video-game-style](http://tvtropes.org/pmwiki/pmwiki.php/VideoGame/Gauntlet) tight and twisty labyrinths with hordes of foes rushing the PCs or that the majority of combats take place on wide-open battlefields with plenty of time to launch attacks at approaching foes before they engage the party in melee?
Comment: No but i do expect the majority of enemies to be engaged in melee at least 70% of the time
Answer: Rapid Shot, by a country mile.
Additional attacks are always a DPS booster more than even modest attack and damage bonuses, and the Precise Shot attack bonus is situational to the point that it may not come up in a given combat, while an additional attack nearly always comes up unless you're always moving.
There are obviously exceptions for a given build (like some scouty build that requires you to be taking a move action every round) but in the general case, rapid shot is to be taken immediately and precise shot eventaully, and the latter more for prereq purposes than its actual utility.  Precise Shot is archer feat #4 or 5 at best (Deadly Aim comes way before it as well).
Math:
If you do x damage and have a y% chance to hit, then your expected DPS is x * y.  Omitting fenceposts and crits, for low levels let's use a base "I need to roll a 10 to hit" (you have about a +5 attack bonus and are seeing AC 15 threats) and "I do 5 points of damage on average".  So your base DPS for those example numbers is 2.5.
If a target is not in melee combat, then precise shot doesn't help you.  Your expected DPS with rapid shot is 2x(y-.1), which is 4 for our example numbers.
If the target is in melee combat, then precise shot retains your DPS at 2.5.  Rapid shot becomes 2x(y-.3), which is only 2 for our example numbers.
However, even if your targets are in melee 70% of the time (an extremely questionable assumption in my experience), your net DPS with rapid shot is 2.6 ( 4 * .3 + 2 * .7), still higher than our 2.5 original number.
And of course, as you can see from the equation, the more you don't suck - your chance to hit and damage go up - the more the equation comes out in your favor. If your base chance to hit is 60% or more then rapid shot is always better even when your opponent is in melee (I'll let you solve the system of equations yourself to prove that).
Precise shot is only better when
a) a target is in melee
and
b) it's pretty hard for you to hit that target in general.
But a good archer (in a party with good tactics) is usually choosing their targets so that's not the case... Your 70% value raises warning flags for me. Most combats aren't solos, and given 5' steps, your fellow party members should be ganging up on high AC people while disengaging from other targets as much as possible. If "the majority" of the opponents are "in melee 70% of the time" you should be shooting at the minority that aren't.  Precise shot can, at best, get you up to your normal expected damage; don't play that game, use things like Rapid Shot to double it!
This can't be mathematically proven because every campaign and combat tactical situation is different, but in, uh, 17 years of 3e play every single character I've seen who invests in ranged feats goes rapid shot as early as possible. Pathfinder's Deadly Aim is the only thing that has snuck in as a contender, but even there you're comparing +2 damage at -1 to hit vs 2x damage at -2 to hit, usually not the right thing to do.
Comment: Note: The Fighter ACF Targetteer (Dragon #310, p. 38) comes with a bonus feat replacement called *Arrow Swarm*, which has *Rapid Shot* as a prerequisite and offer a further increase: +2 attacks (for -5 AR). The penalty is severe (-25% to hit), but +2 attacks!
Comment: @MatthieuM. *And* only good sense prevents combining the special ability arrow swarm and the feat Rapid Shot for *three* extra attacks during a full attack—all attacks suffering a whopping -7 penalty on attack rolls, of course. Even a level 1 human targeteer fighter can have *both*, for example, but he'll probably run out of arrows before he hits anything using them, pretty much defining *spray-and-pray.*
Comment: @HeyICanChan: At 1st-level, indeed. Later on it becomes more viable. It's a tool, much like Power Attack. Knowledge Devotion can help greatly in making suitable in more situations.
Comment: It has been my experience, playing an archer without Precise Shot, that enemies *are* in melee about 70% of the time... the melee people in the party have their own concerns and aren't going to go out of their way to disengage just to help me in a situation where it would leave them exposed, not flanking, etc.
Comment: It seems you are very right as long as the shooter don't have iterative attacks, but when she gets her second one the numbers become less friendly for Rapid Shot, so I guess a lvl 6 warrior who plans to fight in close quarters would prefer Precise Shot to Rapid Shot.
Comment: Iterative attacks reduce your chance to hit equally in both situations. So that simply fits under the "if it's hard for you to hit your target" rubric. If your chance to hit your target is < 20% for whatever reasons, then you don't want to use Rapid Shot. If it's not, you do.  Now with multiple attacks, the formula gets a little more complicated (like the 70/30 in melee/out of melee split).
x (y-.1) + x (y-.1) + x (y-.35) >= x (y) + x (y-.25) solves for y>=30%. So you rapid shot with 1 iterative attack if your raw chance to hit is 30% or better.
Comment: I get the following equation when in melee : x (y-.3) + x (y-.3) + x (y-.55) >= x (y) + x (y-.25), and it solves for y>=90%
Answer: [Note that the following values are not exact because they don't incorporate natural 1s, 20s, or scenarios in which you cannot hit or are guaranteed to hit with a certain BAB. The following values should be very close to their true values however and this nuance likely does not change the conclusion (which is a little fuzzy anyway).]
Let's assume that the enemy is in melee and you only have a single attack normally (+5 BAB or less). Then, the precise shot is going to be 30% more likely to hit than each of the rapidshots. The average damage equals out when your precise shot to-hit is 60% (60% = 30% + 30%) and is in rapidshot's favor when it is higher.
Next, let's assume that the enemy is in melee and you normally have two attacks. Again, each precise shot is 30% more likely to hit. The average damage equals out when your precise shot primary attack to-hit is 90% (90% + 65% = 60% + 60% + 35%) and is in rapidshot's favor when it is higher.
For three attacks, they even out when your precise shot primary attack to-hit is 110% (100% + 85% + 60% = 80% + 80% + 55% + 30%). So, by the time your BAB is +11, precise shot is always better when the opponent is in melee.
So, when opponents are in melee, it looks like rapid shot is really only better for those early levels before you get multiple attacks. It seems unlikely that your primary attack to-hit with precise shot is going to ever be 90%, however since opponents aren't always going to be in melee, precise shot and rapid shot might close to equal in the BAB +6 to BAB +10 levels.
Comment: @Wraithguard The expected damage is equal to the average damage times the expected number of hits. Since this is a constant multiplier, it can be omitted and the remaining calculations are easier to digest.
Comment: Unlike the other post, you don't show the expected damage on hit in your calculations. Since this can influence the expected damage output when comparing the feats, you should include it.


Should I withdraw my paper after it has been under review for one year if the journal has been unable to find reviewers?

Question: I submitted my paper to an journal published by Elsevier, but unfortunately, the editor has been unable to find reviewers for the past one year. After six months, we reached out to the associate editor to assist him find reviewers, and he managed to secure one reviewer. However, it has now been 1.1 years, and we have yet to find a second reviewer. Given these circumstances, should I consider withdrawing the paper and submit in a new journal? or Wait for associate editor to find second reviewer? We have been tracking the the paper by Elsevier tracker service. The associate editor search for reviewers only once in a month.
Comment: Does this answer your question? [The editor cannot find a referee to my paper after one year](https://academia.stackexchange.com/questions/164007/the-editor-cannot-find-a-referee-to-my-paper-after-one-year)
Comment: Related: https://academia.stackexchange.com/questions/14446/a-year-for-first-review-one-referee-report-in-want-to-withdraw-paper
Comment: What field are you in?
Comment: Unfortunately there is a big problem with finding reviewers at the moment. I'm one of those, a paper that is at the edge of the journal scope, etc. but not bad, having tried many reviewers, but not succeeding.
Comment: We have withdrawn our paper but editor is not responsive. Don't know how much time we should wait for editor to respond. We need rejection/withdrawal confirmation to submit paper to other journal.
Answer: Firstly, I don't believe it's the place of authors to 'find' reviewers. Authors can only recommend/ make suggestions. Finding reviewers and managing their review process are those of the editors (EiC, SE, AE ...).
It might be that in some fields, authors can; that I don't know.
With that said, you indicated that the manuscript has been with the journal for upward of 1.1 years now. That there's no second reviewer as yet.
Though uncommon, there are instances where editors make informed decisions based on one reviewer's comment. I see this as exceptional; it happens in some sub-field though.
You desire

should I consider withdrawing the paper and submit in a new journal?
Wait for associate editor to find second reviewer?

Unfortunately, we're not in a position to decide for you. Your circumstances might be different from others.
If your 'need'  include 'using' in some grants application or Tenured or other process, you can weigh your options regarding time.
Can you withdraw and resubmit elsewhere, yes you can. It's your call to make.
Should you wait for a second reviewer sourced and review, it's also your call to make.
You may want to take note though that

some editors might be interested/impressed with a manuscript and would truly wants it published. They would go at great length to secure review.
some might just be caught in the web of admin or laziness.
since you've done it before (as I understand your question), you reach out to the editor with additional list of potential reviewers based on their expertise in the discipline/topic. Ensure you guard against conflicts of interest. #ethics

In-between, I have a manuscript with an ACM journal for almost a year now. The Dep editor keeps making frantic efforts to secure reviewers. I'm still waiting. I'm yet to make a decision like you. Our circumstances differs.
I have another paper that 'sat' with a T&F journal for well over 770 days. After numerous to and fro, I indicated a withdrawal. The editor simply ended the 'drama' with a desk reject! Well, the manuscript is now with a Springer Nature journal; I'm busy with revision, preparing rebuttal.


TAP Airlines refusing refund of Top Executive tickets

Question: We have fully refundable "Top Executive" tickets but they are refusing to give refunds. Only credit vouchers. Unacceptable. Has anyone been successful in getting refund rather than a voucher which has very limited date for when it can be used.  What recourse is there?
Comment: Does this answer your question? [Getting a refund from TAP Air Portugal related to COVID-19](https://travel.stackexchange.com/questions/154658/getting-a-refund-from-tap-air-portugal-related-to-covid-19)
Answer: Currently many airlines are refusing refunds and offering travel vouchers or re-booking instead, even in cases where they are legally required to give a cash refund.
It will be very difficult to enforce your legal rights here since some governments might actually give legal cover to the airlines (France for example) and are unlikely to enforce existing laws. There has already been filed a class action lawsuit in Canada against Air Canada.
Your best shot is probably to try a charge back with your credit card company.
Comment: Easier said than done, though. Amex France is currently refusing any chargebacks
Comment: +1 to chargeback. Airlines are going bankrupt. Don't let them steal your money along the way.
Comment: wow that's heavy, @Hilmar
Comment: Heavy but apparently true: https://liveandletsfly.com/2020/03/26/air-france-american-express-conspiracy/ Canadian government has actually legalized the "voucher instead of cash" law breaking: onemileatatime.com/canada-refund-flight-cancelled/


Use proof irrelevance in cast

Question: I'm working using cast in Coq.Vectors. When trying to rewrite with proofs, I'd like to use the fact of proof irrelevance (Coq.Logic.Eqdep_dec), preferably automatically. I.e., when I have a lemma containing a cast with an explicit proof, I want to able to rewrite a statement that is equivalent. Is there someway I could either do this manually or automatically?
Answer: It is indeed possible, but not so easy to build infrastructure to do.
I'd suggest you have a look at MathComp's subType class, and how it organizes the set of irrelevant proofs.
To work with Vector.t effectively though, you'll need to master ssreflect rewrite, IMHO regular rewrite is not powerful enough as to properly be used as you'll have to perform complex subterm selection.
Note that we don't recommend using Vector.t anymore, see this PR for more info upstream: https://github.com/coq/coq/pull/18032

Use proof irrelevance in cast


Is there an admin hook that will let me read GET variable before it's too late to set the header Location

Question: I need to redirect the page based on the query vars in my plugin admin menu. I don't know where I can hook in to read the query vars or the GET vars order to decide if the page needs to be redirected.
Comment: You are in the backend, but I got confused when you mentioned checking permalinks there? Can you elaborate? Thanks
Comment: Sorry, I updated it. I meant the GET vars.
Answer: You can check the $current_screen on the current_screen action, and redirect after checking some GET conditions:
function wpd_current_screen( $current_screen ) {
    if ( 'toplevel_page_your_menu_item_id' == $current_screen->base ) {
        // check some condition and
        wp_redirect( admin_url() );
        exit;
    }
}
add_action( 'current_screen', 'wpd_current_screen' );

Comment: This fires early enough but I don't seem able to access the GET variables (or the query vars since I guess it would be too early to access GET). Reading your answer I realize my initial question was clear enough - I wanted to access the 'page' variable as well as an additional GET variable (which I set with add_query_arg). I'm guessing there's no way to get that.
Comment: I played around with it a bit more and I was able to use this hook as desired. Instead of reading anything inside $current_screen (which won't work because there are additional variables I need) I'm running add_query_arg() and adding an arbitrary variable. add_query_arg() returns the relative url with all variables so I can parse out the stuff I need. This is obviously a dirty method (adding arbitrary query args just to return the URL) so hopefully I can find a more elegant solution to that part. But the end result is the same, I'm able to parse out my variables early enough for a redirect.
Answer: $_GET[] query variables are passed via the URL request given to the web server, and are available at any time in the WordPress action cycle. You do not need to hook into an action to have access to GET variables.
The "init" hook is generally the best action to hook into for something like this, unless it's important to act before any other plugins, and will allow you to have access to WP functions like wp_redirect.
function myRedirector(){
    if ($_GET['somethingIcareAbout'] == "exists"){
        $url = "https://somewhere.com";
        wp_redirect( $url );
        exit;
    }
}

add_action( 'init', 'myRedirector');


flashplayer on Lubuntu 12.04

Question: I have a very old computer which is running Lubuntu 12.04. I don't think it can be upgraded to 14.04 as it is non-pae. The Lubuntu software center does not provide any Adobe Flash Player installation. I have downloaded the flash-plugin 22.214.171.1245 release.i386.rpm.
Please excuse my ignorance; but how do I install it from there?
Comment: You can upgrade to either Lubuntu 14.04 or Lubuntu 14.10 - both have a mechanism for handling the PAE issue [which is described here](https://wiki.ubuntu.com/Lubuntu/AdvancedMethods)
Answer: You cannot install rpm. This is package for another distribution (Fedora, RHEL and its derivates). You can try this HOWTO on webupd8 or you can try installing flash player from repository - open terminal and run this command:
sudo apt-get update && sudo apt-get install flashplugin-installer

It will update your package database and installs package named flashplugin-installer if it is present in your repositories.
Comment: yes he can with "alien" but it is not the best method ;) Good find on the link :)
Answer:
I have downloaded the flash-plugin 188.8.131.525 release.i386.rpm. Please excuse my ignorance; but how do I install it from there?

You do not; well it is possible with the "alien" tool to convert it into a .DEB file but that file is intended for Redhat and/or CentOS.
You need to find either a file ending on .DEB or .tar.gz. From the package list I believe you need this (edit: byran has a good option too).

I don't think it can be upgraded to 14.04 as it is non-pae

You probably can; you need to download the ubuntu-14.04-desktop-i386.iso version from the download site. Well if it meets all the normal requirements that is.
Answer: If you want to download from the site choose APT for Ubuntu version. It is the supported format for your system.
Also note that Lubuntu uses the same repositories as Ubuntu, so you can install from official Ubuntu repositories, as well. Just make sure you have enabled Canonical partners repository in your package manager (Software Center or Synaptic).

flashplayer on Lubuntu 12.04


Characteristic function of a disjoint union

Question: I just could not convince myself about what $\chi_{\cup_{A_n}}$ is worth, if $(A_n)$ is a sequence of pairwise disjoint sets? Is it equal to the series $\sum_{n=1}^{\infty}\chi_{A_n}$? We need to investigate the convergence of the series but how? Many thanks.
Answer: Clearly, $\chi_{\bigcup_{n=1}^{\infty}A_n}(x)$ can assume only two values (it's a characteristic function after all): $1$ or $0$ according as $x\in \bigcup_{n=1}^{\infty}A_n$ or $x\notin\bigcup_{n=1}^{\infty}A_n$.
If $x\in \bigcup_{n=1}^{\infty}A_n$, then $x\in A_m$ for exactly one $m\in\mathbb N$ (given that the union is disjoint), so that $\sum_{n=1}^{\infty}\chi_{A_n}(x)=\chi_{A_m}(x)=1$ (and the series converges because its members vanish for $n>m$). On the other hand, if $x\notin \bigcup_{n=1}^{\infty}A_n$, then $x\in A_m$ for no $m\in\mathbb N$, which implies that $\sum_{n=1}^{\infty}\chi_{A_n}(x)=0$ (and the series converges, since all of its members vanish).
Conclusion: $\chi_{\bigcup_{n=1}^{\infty}A_n}=\sum_{n=1}^{\infty}\chi_{A_n}$, indeed.
Comment: Thanks a lot triple_sec. I had this idea and thanks for your detailed solution. I posted this as regards to some spectral measure in Rudin...I think I must have misunderstood Rudin's argument as the two contexts are little different. Thanks a lot again.
Comment: @Math You're most welcome!


Converting PDF to PNG with transparent background

Question: We have a Ruby on Rails application that needs to convert a PDF into a PNG with a transparent background. We're using rmagick 2.13.1. On our development machines the following code works exactly how we want it.
pages = Magick::Image.from_blob(book.to_pdf.render){ self.density = 300 }
page = pages[0]

image_file = Tempfile.new(['preview_image', '.png'])
image_file.binmode
image_file.write( page.to_blob { |opt| opt.format = "PNG" } )

We thens save the image_file and all is peachy. When we deployed to a review server on Heroku, though, the generated image has a white background. It turns out that Heroku's cedar stack is using imagemagick ImageMagick 6.5.7-8 2010-12-02 where we're using ImageMagick 6.7.5-7 2012-05-08 on our development machines.
I've scoured the net for older posts that might apply to the older version to try and figure out how to generate the transparent PNGs. It's surely supported, but, so far I haven't been able to figure out the right combination of settings.
To verify that it wasn't the PDF generation that was the problem, I downloaded a PDF generated on Heroku and successfully converted it using the above code (slightly modified to read the file in instead of generate it) to a transparent PNG.
Some of the things I've tried in various combinations are:

page.matte = true
page.format = "PNG32"
page.background_color = "none"
page.transparent_color = "white"
page.transparent("white")

So, the question is "is this possible?". If so, which settings do I need to set on the image before writing it out?
I'm also investigating including a compiled binary of a more up to date Imagemagick on Heroku.
Any help is appreciated.
Answer: This should no longer be an issue, as Heroku has ImageMagick versions 6.7-6.9 on their various stacks.


Will the same lock ring fit 11T or 12T ring, SRAM cassette?

Question: I am currently running Sram PG1070 12-28, but would like to upgrade to 11-28. I can get 11T cog for pretty cheap, but I saw I might also have to get a different lock ring then. Is that true, or could I use the one I am currently using? Thanks!
Comment: Interesting thought.    The lockring has to fit the thread inside the freehub body, so that part must be the same size always.   However you're concerned with the outer diameter and how it could interfere with the chain on the 11T cog.   I'm guessing the lockrings will be identical, so you don't need a new one unless the old one is damaged.   But this is a guess, hence comment not answer.
Answer: Yes, you need an 11T specific lock ring.
The outer diameter of the 11T lockring is definitely smaller, a 12T lockring won't let the chain sit properly on an 11T cog. The threaded section is the same size.


Most energy efficient and very small volume way to produce motion

Question: I'm looking to make motion (may be 100g) using very small, and very energy efficient component, and prefereably very cheap, i've found some nano servomotors which satisfy my criteria, but i wonder if there is any simple piece of hardware that acts like the old door bell.
Comment: A solenoid is what is used to strike the chime in door bells.
Comment: 100g as in move 100 grams, or 100g as in 100 times earth acceleration? My old door bell doesn't move at all - what are you thinking of? If you got devices satisfying your criteria, why don't you tell us your criteria in a better way or at least name devices which fulfil them?
Comment: Solenoids are good (in terms of low power) if you don't need to hold the position and can use jerky motion with significantly more force at the **end** of the stroke. Servos give more controlled smooth motion and may be able to hold position without drawing continuous power. Of course in relays the solenoid is powered continuously to hold the relay state (in most relays) so if you can spare that amount of power the solenoid is very simple.
Answer: It would be nice if you could give bit more explanation on your final goal. I'm not sure if you need linear or angular motion. In case of linear then, I'd go for solenoid, in other case, 9gr. servo should do the job. These servos are quite cheap and not so power hungry.
Comment: i was looking for Solenoid, but which one more energy effecient Solenoid VS nano servomotor ?


Can 中型 be used to describe a room or building?

Question: Can 中型 be used to describe the size of a room or building?
Answer: The kanji 型 ("type") implies there is some objective criterion that determines whether something is 小型, 中型, or 大型. Saying 中型の部屋 or 中型の建造物 according to some criterion/law is okay. For example, 中型自動車 has a strict definition in Japanese law.
If you want to subjectively say something is middle-sized, it's better to say 中くらいの大きさの~, 普通の大きさの~, 大きくも小さくもない~, etc.
Answer: A definition: 形が大きくもなく小さくもないこと。また、そのもの。
It seems broad enough a definition to apply to anything with a size and other sizes to compare it to.  The problem is whether the speaker and listener have a common frame of reference.  For cars, it is easy and pre-defined.  For rooms, it would seem to depend on your context.
Comment: Thank you! Would it make sense to use for a restaurant?
Comment: In the context of a restaurant it would be more understandable to use the number of customers it could hold (e.g., 15 people, or enough to take a tour group), or the floorspace (in tatami, or sq. meters, or tsubo)
15人が入るぐらいのレストラン
団体客が入るぐらいのレストラン
etc.
Answer: For me as an engineer, objects are relatively large and if they can be classified into three categories by their size as small, medium and large. In addition we can share the classification as the standard categories, we say "中型XX."

小型車、中型車、大型車
  小型犬、中型犬、大型犬

We don't say "小型コップ," "中型コップ," and "大型コップ" in a coffee shop, because cups are not relatively large.
Some people don't say "中型の部屋" because "型(type)" is often used for standardized products or objects, and we can share the classification as the standard categories. Room size can continuously distribute, so "1K," "2DK," and "3LDK" is commonly used.


java.lang.Object can not be resolved. It is indirectly referenced from required .class files

Question: i am using eclipse 3.2 version.
in sametime based i am getting error on package: java.lang.Object can not be resolved. It is indirectly referenced from required .class files.
on build path JRE is JRE System Library [JavaSE-1.6] (unbound)
when i set the JRE is JRE System Library [jclDesktop Win32 x86] then it give others errors like on function name of other classes.
Answer: There are a lot of differences between jclDesktop and Java 5. Which means, that Java code, written for Java 5 (or any other Sun/Oracle Java) will probably not compile with jclDesktop.
You can use jclDesktop as a JRE system library if you want to write applications for jclDesktop. If you have one Java application and want to convert it to jclDesktop, then you'll have to resolve all the compile time errors (and hope for the best).
Otherwise, install an Oracle Java SDK (JRE is enough although I'd recommend a JDK which comes with the src.zip file) and use that as JRE library.
Answer: Try to delete the .class file / bin folder from the project. Make a clean build after that and the error will go away.


Did the kids in Captain Planet have to be together in person to summon Captain Planet?

Question: In Captain Planet did the kids have to be physically together to summon him, or could they do it from their own countries?
Comment: @Xantec - 'Heart' enabled Ma-tii (however you spell it) to communicate with the others via a telepathic link. Bi-directionally, as in they could hold a conversation - making coordinating a call to Captain Planet whilst separated fairly trivial
Comment: But where would Captain Planet show up then?
Comment: Did the Planeteers have mobile communication devices? I can't recall. If not, they would need some way to coreograph the action of calling him without hearing each other or seeing the ring beams.
Comment: Pretty sure I remember an episode where the planeteers were separated and had to summon Captain Planet by all pointing their rings at the sun at the same time. I can't find it, though :(
Answer: This depends on the range in which their ring powers (once released) can detect each other.  If I understand the shown procedure correctly, they all shoot the power from their rings up in the air, where they find each other and combine.  I'm not sure the furthest apart they've been in the series, but they don't have to be immediately adjacent.  Because their power goes up in the air, I'd imagine they could be quite a ways away, as long as they coordinate the action (say, over 2-way radios or telephones).  If I recall, they were all from different continents.  Could they summon him if each of them were home?  Probably, but it depends on how the power from their rings knows where the other powers are.
Captain planet would show up at the junction of the ring powers.


What does the Bible verse saying "don't boil a goat in its mother's milk" mean?

Question: Does it mean don't use the word of God (milk meat and honey) condemning the little ones just learning the word of Christ to the point. The child rejects even hearing about God?
Comment: Possible duplicate of [Do not boil a goat in its mothers milk](https://christianity.stackexchange.com/questions/14477/do-not-boil-a-goat-in-its-mothers-milk)
Comment: Though it may be a possible duplicate (those claims are often quite subjective), this is an interpretive question. It is one of the Levitical 'hedges of the law'; forbidding cruelty. This is not a comment answer. But I would provoke the question 'who says?'; who am I that's answered your question? You must at least show that you have your own thoughts about this. Scalpers will come along and tear this question apart, for not.  Read the christianity.se site tour; consider helpful comments. This question will need some help. Blessings.
Comment: https://hermeneutics.stackexchange.com/q/15/11555   This may assist you in your search
Comment: https://judaism.stackexchange.com/q/14379/12082   And there is this on the Judaism site
Comment: "Teachings about God are difficult to understand. Don't accept new spiritual teachings about God that look too good, and too easy, to be true; they have probably been deliberately 'cooked up' to deceive you".      There is a line of reasoning that delves the metaphoric interpretation of the command. If this gets reopened I may answer but I'm not sure if it is a Eastern Orthodox view.
Answer: One of several Jewish interpretations of this verse may be found here: http://thetorah.com/meat-and-milk-origins-in-the-text/
The one that appeals to me is that it was misinterpreted and originally meant that you should not wait until a young goat has been weaned before bringing it for sacrifice of first fruits.
Another idea with no evidential support is that it is forbidding a pagan practice common at that time.
Answer: It means that we should avoid, or minimizing, eating milk that has continuously been boiled, because when it is being boiled for a long time, which it is when meat is being cooked in it, it becomes concentrated due to water evaporation.
Milk contains a relatively big percentage of saturated fat, which is unhealthy to drink/eat too much of. Skim milk, and small quantities of semi skimmed milk is a lot healthier than creamy full-fat milk, etc.
The Bible warns against eating animal fat.

Lev 7:23 (NIV) "Say to the Israelites: 'Do not eat any of the fat of cattle, sheep or goats"
Comment: @Constantthin I'd like to hear that evidence; maybe better in chat than here? Cain apparently sacrificed neither milk nor meat, and I didn't see any clue whether milk was or was not involved in Abel's sacrifice.
Comment: So it is a health issue? I don't think that is why the practice was forbidden
Comment: @Kris I followed one of your links and read this: "As for the prohibition against eating meat [boiled] in milk, it is in my opinion not improbable that — in addition to this being undoubtedly very gross food and very filling — idolatry had something to do with it. Perhaps such food was eaten at one of the ceremonies of their cult or at one of their festivals". However, since the Israelites were not involved in idolatry, it would still not be wise to eat food prepared like this, due to " this being undoubtedly very gross food and very filling".
Comment: Perhaps being the keyword. But who knows other parts of the law were given to protect the health of the Israelites.
Comment: @Kris The reference is this one, by the way: "Jacob Milgrom considers four theories about how the command came about"; in Jon Ericson's post/Hermeneutics.
Comment: -1 No evidence anyone thinks this, and no religious connection.
Comment: @Disciple. There is a scriptural support in Cain and Abel's sacrifices.
Comment: @Disciple. The answer is that 'it boils down to' saturated fat concentration, and potential capillary clogging
Comment: Illnesses can be cured by prayer and by 'walking on water'. "Life is in the blood", and tissue death occurs if blood flow is blocked. The greek word 'sozo', that is found in the bible, means to be saved AND HEALED. The verse in Leviticus is hyperbole, warning us of non-moderation in consumption of foods containing saturated fat, which especially some foods derived from animals contain. The bad cholesterol LDL derives from saturated fat.


linux drops packet when trying to route it - why?

Question: I track packets using LOG targets for all chains of all tables and the last chain I see my packet in is the PREROUTING chain of the mangle table:
mangle_PREROUTING: IN=eth0 OUT= MAC=00:16:3e:0f:01:00:00:16:3e:0f:02:00:08:00
SRC=10.2.1.2 DST=10.1.1.2 LEN=84 TOS=0x00 PREC=0x00 TTL=63 ID=60912 PROTO=ICMP
TYPE=0 CODE=0 ID=41230 SEQ=1

Per http://inai.de/images/nf-packet-flow.png, I expected that packet to appear in FORWARD chain of the mangle table, but it never gets there. The only thing between these is the routing table.
# ip rule list
0:      from all lookup local
32766:  from all lookup main
32767:  from all lookup default

# ip route list
default via 192.168.178.100 dev eth3
10.1.1.0/24 dev eth1  proto kernel  scope link  src 10.1.1.1
10.1.2.0/24 dev eth2  proto kernel  scope link  src 10.1.2.1
10.5.0.0/24 dev eth0  proto kernel  scope link  src 10.5.0.1
192.168.178.0/24 dev eth3  proto kernel  scope link  src 192.168.178.1

So that packet should be routable via 10.1.1.1. (That system can also ping 10.1.1.2.)
iptables (all chains ACCEPT) has only these rules (except for logging at the
end):
-t raw -A PREROUTING -j MARK --set-xmark 0x0/0xffffffff
-t mangle -A PREROUTING -s 10.1.1.0/24 -d 10.2.1.0/24 -j MARK --set-xmark 0x1/0xffffffff
-t mangle -A PREROUTING -p esp -j MARK --set-xmark 0x1/0xffffffff

But those rules should not match: The destination is 10.1.1.2 and it is not ESP...
Any hints?
Best regards, Steffen
Answer: I think that your problem is the rp_filter. You have a packet with source 10.2.1.2 that was received in the interface eth0. Your route table say the network 10.2.1.2 is reached via eth3 (default route). I suppose that you don't have a typo.
If the problem is the rp_filter, packets are dropped before FORWARD.
rp_filter means "reverse path filter", usually enabled by default. Only the packets incomming from the right interface (acordding to the routes) are allowed.
sysctl -w net.ipv4.conf.all.rp_filter=0


Categorical variable for Arima

Question: Does Arima support the usage of categorical variable? Some ways to get it working can be using one-hot encoding to represent categorical variables, but I am not sure how good it is.
Comment: ARIMA models are univariate models (one time series only). You cannot fit categorical features as a result because how are you supposed to define categories across a single time series? ARIMA models can handle time related exogenous variables (promotion/no promotion, recession/no recession), which are often indicated using indicator variables. However, problems may arise during forecasting when you do not know the future values of some of your predictors (forcing you to forecast predictors as well, making error potentially worse) but in general it can still lead to improvements.
Comment: If you want to incorporate categorical features, you need to consider fitting a single model to multiple time series that differ by some category. In this case, ML methods start to become potentially more attractive then traditional statistical ones, at least that is what performed the best in recent competitions that allowed external regressors.
Answer: One-hot encoding is the way. For ARIMA models, no other configuration is possible. Whether it is good or not, it depends on the quality of your data, your variable choice, and a correct model specification. Unfortuntately, we can't say a priori whether the result is going to be good or bad.

Categorical variable for Arima


What is the use of sets above the Complex set?

Question: I recently started reading about sets above the complex set (the set of quaternions, the set of octonions, etc...) and since I already had a lot of difficulty understanding why complex numbers were needed in the first place, I was wondering why sets even more complicated than the complex one would ever be needed, and how they would simplify calculations. Can someone please shed some light on this (give an example or a generic explanation)? Also, what's the highest set that's really useful?
Comment: Depends what you call higher set. It seems you are mainly interested in number-like sets. In that case, octonions are the largest *division algebra over $\Bbb R$* (so with that restriction  there is no "etc." beyond them). On our way to get there, we already sacrificed linear order ($\Bbb C$), commutativity of multiplication ($\Bbb H$), and finally even our most beloved associativity ($\Bbb O$). So it is more a question of how much pain you can endure.
Answer: You are making many assumptions in your question. Among others

"number sets" have to be useful
a way for number systems to be useful is to simplify calculations
there should be a convenient and definitive list to check

But most of the time, mathematical objects are named and manipulated long before most of their properties or relations with others are understood, accepted, put in perspective, routinely used and transformed into standard teaching material.
That's what happened for complex numbers over a course of about four centuries from the italian renaissance algebraists to the 20th century.
Quaternions, octonions, sedenions and other hypercomplex systems do not enjoy the same wide technical and mathematical notoriety complex numbers have but their applicability and interest depend more on our culture and our ingenuity (or lack of it) than you may suppose. Quaternions have had a few false starts in that respects during the second half of the 19th century (lookup Hamilton, P.-G. Tait, O. Heaviside).
Please note that number systems and their natural family (rings and algebras with at least two internal operations) do not form a line starting from the integers and going to complex numbers by successive extensions.  They are a diverse forest, with many (very useful trees).  Among the most famous:

Real and complex vector spaces (point geometry, equation systems, n-dimensional spaces, ...). This is a part you will certainly study soon. It is often called Linear Algebra.
Boolean algebras (logic calculus, circuit design, complexity theory, ...)
Lie algebras  (symmetries of differential equations, and much more)
Hopf algebras (algebraic topology, non commutative geometry, conformal field theory, ...)

and Jordan algebras, C*-algebras, general rings, tropical algebra, ...
Each time with at least one use in physics, chemistry, engineering, computer science, biosciences, in addition to their intrinsic interest and their relations with other domains of mathematics.
I must stop there because doing justice to all these algebraic structures would be equivalent to present most of today's mathematics in full detail.
Answer: Quaternions are used in (amongst other areas) 3D computer graphics, because one can represent 3D rotation in a convenient way using them. I'll give a link (which states even more applications), as I'm not too read-up on the details.
https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
In fact, the idea of representing 3D-rotations by numbers, just like one can represent 2D-rotation by complex numbers, was one of the main reasons quaternions were even introduced and considered interesting in the first place.
Comment: Then again, isn't that application just fancy-speak for using matrices?
Comment: The following quote regarding unit quaternions is in the link "Compared to rotation matrices they are more numerically stable and may be more efficient.", so I guess it does make a difference in applications. I have to stress again that I am not too familiar with using quaternions as of yet...Historically speaking though, I believe the main focus was on compactly representing geometric operations by direct operations (addition, multiplication, division, subtraction) on number constructs (points on the line, in the plane, in space...) rather than by matrices or other operators.


Tkinter rectangle itemconfig fill update does not work every time

Question: I'm having a strange behavior with tkinter, canvas and itemconfig.
I have a small window, with a canvas that is filled with rectangles, each rectangle shows a color of a palette. I've setup an event for left & right mouse buttons, LMB selects a color, RMB swaps the clicked color with the selected one. The bind event is working fine, since other operations being done during this process happen (actual palette colors being swapped).
The thing is that upon first LMB & RMB click, the rectangles "fill" does not get updated (or at least there is no refresh on screen), but upon 2nd RMB click, the color change is reflected (but the color is swapped twice).
The code that updates the rectangles is:
<code>app.paletteCanvas.itemconfig(app.paletteColorBoxes[newColor], fill=transformColor(app,app.drawColor))
app.paletteCanvas.itemconfig(app.paletteColorBoxes[app.drawColor], fill=transformColor(app,newColor))
</code>
app is the main application, paletteCanvas is the canvas which is packed in a "palette window", in app.paletteColorBoxes I keep the index of the rectangle to change, newColor and app.drawColor are the original color and color to swap, and finally transformColor just transgorms a (R,G,B) thing into a  #RRGGBB string for itemconfig to understand.
So, everything seems to work fine, except that upon first call to the routine the refresh is not done, but upon 2nd call the refresh is done.
I tried all sorts of .update() and .update_idletasks() but no luck.
To fully test this behavior you can check the full application at:
https://github.com/zayamatias/retrotool
The misbehaving function is in retrofunctions.py / swapColor
You need to open an image, click on some color and select "Tile Viewer/ Editor", after the tool is done (maybe it can fail, still WIP) you will see the palette window.
Thanks!
BTW I'm on Python 3.6.3 if that helps.
Comment: Please don't post a link to your full application. Nobody is going to want to wade through hundreds or thousands of lines of code. Instead, create a small [mcve].
Answer: Ok, so finally the issue was not with tkinter but with a mix up in teh values passed to the itemconfig method...my bad!


SharePoint 2010 Farm Shutdown Procedure

Question: What is the recommended procedure for shutting down a SharePoint 2010 Farm? In other words, after I have quiesced the farm, what additional steps do I need to take to ensure that there is NO SharePoint-related activity on the farm? I know how to quiesce the farm, and how to stop the SharePoint services via the Windows Services on a single-server installation, but I am trying to determine how best to shut down all the SharePoint services across a medium-sized farm with multiple WFEs, multiple app servers, and multiple database servers.
Answer: If you want to completely stop a SharePoint farm there is a useful list of services within the Move all databases (SharePoint Foundation 2010) article.
Obviously (as you have requested) this will mean that ALL SharePoint activity will cease:
"To stop the farm
On the server that is running the Central Administration Web site, in the Services snap-in, stop the following services:
SharePoint 2010 Administration
SharePoint 2010 Timer
SharePoint 2010 Tracing
SharePoint 2010 User Code Host
SharePoint 2010 VSS Writer
SharePoint Foundation Search V4
World Wide Web Publishing Service
On the server that is running the Central Administration Web site, at the command prompt, type iisreset /stop."
Answer: What is it that you hope to accomplish by taking SharePoint offline?
Quiescing the farm will prevent SharePoint from serving end-users so you can install features and so forth.
Stopping the services goes another step beyond that. In fact, you will not be able to install features if all of the SharePoint services have been stopped.
The procedure is the same when there are multiple servers. You would just need to stop the services on all the machines.
Aside from shutting down the SQL Server instance and actually shutting down the Windows Servers that all your farm servers are running on, I cannot think of anything else that you would need to do.
Comment: This is pretty much it, once you quiesce the farm, and all the workflows & whatever have finished running, you're free to switch off the services and repurpose/format/whatever your servers.
Comment: @Rob - you indicate that quiescing the farm will allow administrators to install features etc; what additional steps are necessary to ensure that there is NO SharePoint-related activity on the farm? (I should perhaps clarify that I would still want Windows running.) Does it matter what order the SharePoint services are stopped in? Does it matter what order the servers are shut down in?

In answer to your question, the question arose in a discussion of backups with the team at my company that administers Windows servers.
Comment: So you are wanting to backup the Windows Server?  Stopping the services should do it then. It doesn't matter in what order you shut them down.

SharePoint 2010 Farm Shutdown Procedure


File security of books/papers on a eReader

Question: In context with IT security it is suggested to encrypt data on portable devices like USB-sticks, so if they get lost the confidential data does remain secret. But what if they confidential material is a paper which I want to read on eReader like a Sony PRS1 or Kindle?
Is there a way to password protect certain books to limit the access or maybe to lock the whole eBook?
Comment: Just a note, the point of encryption is that is can be decrypted, so don't assume if a USB was lost *the confidential data does remain secret*, it just typically becomes harder to get at!
Comment: I don't think it is off topic, Since maybe there is computer software together with a firmware update to encrypt the data.
Answer: Kindle comes with a screenlock password, though I doubt it encrypts any data.
 Sony PRS1 might also have the same feature.
For encryption - decryption functionality you need the tool to be present on your device and since e-book readers are aimed at leisurely reading there are probably no such apps available for the device ( none that I could find).
you could probably store your docs in some cloud storage like google docs and view it directly  from the kindle's browser.
If you still want exactly what you specified I suggest you get yourself a tablet which I am sure have encryption tools


Motion Waterfall sound

Question: Trying to get some ideas on how to recreate the sound that comes out of those cheap motion led waterfalls, I have raw audio of waterfalls I have recorded, and some bird song to throw in there, but there is just a certain level of low quality :) that those do to the sound, kind of warbly or something.  Any ideas?  It is to play in the background of a couple of scenes and to be brought out at a few times to make a joke happen.
Comment: Would just using white noise help?
Answer: Hey,
Nice little experiment! Most of these kinds of devices have very low quality soundchips in them. So my advice would be to tweak the typical quality parameters like bit reduction and samplerate and create combfilters or slowly flanging it. But keep it a steady sound, because the samples are very short in those tiny chips.
Have fun
Answer: You could try worldizing your waterfall/birdsong soundscape using some kind of low-fi recording/playback device. There are many cheap toy recorders out there which might just do the trick. You could also try re-recording the playback from a mobile phone.
Toy recorder example - www.amazon.com/gp/aw/d/B0015Z6B34
Comment: that's even easier! you could probably do it with a casiotone or something to do sample recording and playback, play with pitch and you'll get a very low-fi quality.
Answer: So after some goofing around and using http://www.youtube.com/watch?v=WXptp7ZUeIk as a rough reference.  This is what I came up with last night.
http://soundcloud.com/the-verlotta-project/sets/waterfall-phototest
The "dry" version is of the water pre speaker effecting and the wet version being post effects.
Have not added any reverb to this because that will happen later down the line.
I think the wet version accents the birdsong a bit to much.  I arrived at this by some eq, running it through noise reduction filters to introduce some artifacting, and then goofing in speakerphone.
Is there another way to introduce the noise reduction filter artifacts without actually running it through them?
I want to worldize it instead of speakerphone, but my home is really noisy as a recording enviroment unfortunantly.
Comment: great to hear what you came up with, i listened to it on my macbook, so my opinion is biased by the tiny speaker. but i think it still sounds to full bodied. it can be more resonant in my opinion. maybe use a multiband compressor/limiter and enhance a specific small bandwith to get that really cheap plastic sound?
worldizing could also create that ofcourse, but still have a try since your recording environment is a bit noisy. have fun!
Comment: @Arnoud Yeah there is something about it right now that just is not working for me, cannot pinpoint it, maybe it will work for me once I put it into the BG of the scene with verb/reflections of the room but I don't think that will really change my mind.  Going to try the multiband compression.

Motion Waterfall sound


Falling yellow Fiddle fig leaves

Question:

My fiddle fig leaves have started to become yellowish and fall. In last one week two leaves have fallen. Not sure why is that. We water it every 15-20 days so as not to over water it. Any how to fix this ? Also how to know the health of fiddle fig by looking at it?
Comment: Is the Fig planted straight into that white pot? Does it have drainage holes at the bottom?
Answer: Overwatering fig trees will cause them to drop their leaves. Underwatering might too, but it would mostly be bottom leaves.
Try to check out the roots to see if they look nice and healthy.
It's possible to give too much water while not watering too often. If the soil has not dried out in 7-10 days, you are giving too much water and waiting another 10 days and keeping that schedule is not the answer. IF this is the case, water more frequently with smaller amounts.

Falling yellow Fiddle fig leaves


Caching Raster Imagery

Question: I HAVE 6 Separate raster images for which i created a raster dataset. I am trying to cache this imagery to increase display performance.  How do you cache a raster dataset in arcmap?
Comment: What GIS app. would you like to use for caching rasters?
Comment: I intend to use an Arcgis Online GIS Mapviewer. However, it'll be using Arcmap for the creation of the cache.
Answer: In caching the Raster Dataset in ArcGIS online. go to File, save a service definition file, choose available service, continue , service editor. Look for 'Caching' on the service editor. you have two options in caching, 'Dynamically from data' and 'using tiles from cache'.
Selecting 'using tiles from cache' will give you the benefit to select a maximum or minimum scale level for the tile.
Going for this option for high performance, i will suggest you look at areas of highest interest for users depending on what you want to achieve.

Caching Raster Imagery


How To Upload Files on GitHub

Question: I have recently downloaded GitHub and created a repository on it. I am trying to upload an Objective C project in it. How do I go about doing this?
Answer: I didn't find the above answers sufficiently explicit, and it took me some time to figure it out for myself. The most useful page I found was:
http://www.lockergnome.com/web/2011/12/13/how-to-use-github-to-contribute-to-open-source-projects/
I'm on a Unix box, using the command line. I expect this will all work on a Mac command line. (Mac or Window GUI looks to be available at desktop.github.com but I haven't tested this, and don't know how transferable this will be to the GUI.)
Step 1: Create a Github account
Step 2: Create a new repository, typically with a README and LICENCE file created in the process.
Step 3: Install "git" software.
(Links in answers above and online help at github should suffice to do these steps, so I don't provide detailed instructions.)
Step 4: Tell git who you are:
git config --global user.name "<NAME>"
git config --global user.email "<email>"

I think the e-mail must be one of the addresses you have associated with the github account. I used the same name as I used in github, but I think (not sure) that this is not required. Optionally you can add caching of credentials, so you don't need to type in your github account name and password so often. https://help.github.com/articles/caching-your-github-password-in-git/
Create and navigate to some top level working directory:
mkdir <working>
cd <working>

Import the nearly empty repository from github:
git clone https://github.com/<user>/<repository>

This might ask for credentials (if github repository is not 'public'.)
Move to directory, and see what we've done:
cd <repository>
ls -a
git remote -v

(The 'ls' and 'git remote' commands are optional, they just show you stuff)
Copy the 10000 files and millions of lines of code that you want to put in the repository:
cp -R <path>/src .
git status -s

(assuming everything you want is under a directory named "src".) (The second command again is optional and just shows you stuff)
Add all the files you just copied to git, and optionally admire the the results:
git add src
git status -s

Commit all the changes:
git commit -m "<commit comment>"

Push the changes
git push origin master

"Origin" is an alias for your github repository which was automatically set up by the "git clone" command. "master" is the branch you are pushing to. Go look at github in your browser and you should see all the files have been added.
Optionally remove the directory you did all this in, to reclaim disk space:
cd ..
rm -r <working>

Comment: This is the only answer that actually answers the question.  It should be the best answer.
Comment: Excellent post!
Answer: Well, there really is a lot to this. I'm assuming you have an account on http://github.com/. If not, go get one.
After that, you really can just follow their guide, its very simple and easy and the explanation is much more clear than mine: http://help.github.com/ >> http://help.github.com/mac-set-up-git/
To answer your specific question: You upload files to github through the git push command after you have added your files you needed through git add 'files' and commmited them git commit -m "my commit messsage"
Comment: Hi Justin, I have an account on GitHub and created a repository. Where exactly do I type the "git push" command ? Thanks ...
Comment: @CaiGengyang: You do that in the Git Bash or the native system console, depending upon which one you chose while installing Git. Commenting after a gap of more than one year, just to help others who might come searching here.
Answer: You need to create a git repo locally, add your project files to that repo, commit them to the local repo, and then sync that repo to your repo on github.  You can find good instructions on how to do the latter bit on github, and the former should be easy to do with the software you've downloaded.
Answer: To upload files to your repo without using the command-line, simply type this after your repository name in the browser:
https://github.com/yourname/yourrepositoryname/upload/master
and then drag and drop your files.(provided you are on github and the repository has been created beforehand)
Answer: Here are the steps (in-short), since I don't know what exactly you have done:
1. Download and install Git on your system: http://git-scm.com/downloads
2. Using the Git Bash (a command prompt for Git) or your system's native command prompt, set up a local git repository.
3. Use the same console to checkout, commit, push, etc. the files on the Git.
Hope this helps to those who come searching here.
Answer: if you're on windows:
http://windows.github.com/
otherwise:
http://git-scm.com/downloads/guis
Comment: http://meta.stackexchange.com/questions/225370/your-answer-is-in-another-castle-when-is-an-answer-not-an-answer
Answer: If you want to upload a folder or a file to Github
1- Create a repository on the Github
2- make: git remote add origin "Your Link" as it is described on the Github
3- Then use git push -u origin master.
4- You have to enter your username and Password.
5- After the authentication, the transfer will start
Answer: If I follow these steps:
1- Create a repository on the Github
2- make: git remote add origin "Your Link" as it is described on the Github
I get an error "error: remote origin already exists."

How To Upload Files on GitHub


KDE Autostart Missing Library

Question: I'm trying to debug an issue with a SH script in my KDE autostart directory (~/.kde/Autostart). I'm running Scientific Linux 6.4 (kernel 2.6.32-754). The script simply launches an application. This application recently gained a new dependency for a library, and now the application will not start when launched via KDE Autostart because it complains it cannot find the library.
To try a manual fix, I simply put a symbolic link in /usr/lib64 pointing towards the library, which is an unconventional location, and that fixed the problem. But our machines are setup via an automatic installer which needs to correct the environment variables so this library shows up on the library path.
So I modified a script in /etc/profile.d which creates the environment variables for the user to add this directory with the library to the LD_LIBRARY_PATH for the user's profile. However, this did not fix the issue and the error is back. When I echo the LD_LIBRARY_PATH environment variable, I can clearly see that the directory has been added correctly, but KDE Autostart still doesn't seem to be able to see the library.
Looks like the /etc/profile.d script is only run when a terminal is opened to setup the environment, but those variables are not set when the KDE Autostart script runs. I echo'd out the LD_LIBRARY_PATH variable from my Autostart script and it's empty. Where should I be setting up the LD_LIBRARY_PATH for it to be available to Autostart? In .bashrc?
Is there something I'm missing? Does KDE Autostart execute these scripts as a user other than the profile where these Autostart scripts live? Or do they get their environment variables from elsewhere?
Let me know if there's any other information that would be helpful.
Answer: So since the user profile wasn't being loaded by the time the autostart script was executed, I discovered that you can place an env directory in ~/.kde with shell scripts that will set environment variables before your autostart scripts are executed. So I just explicitly declared the required library path here to solve the problem.
I also apparently needed to add a similar LD_LIBRARY_PATH line in my .xsession file in the user's home directory since apparently KDE Autostart scripts either don't get executed or the environment variables setup in ~/.kde/env don't apply to .xsession.

KDE Autostart Missing Library


I want to install a 220 heater in my garage.

Question: I want to install a 220 heater in my garage. The heater draws 31 amps. The run will be 26 feet. Would I use a 40 amp breaker and and N0. 10 wire?
Answer: You need 8AWG and a 40A breaker for this equipment
You'll need to run 8AWG for this circuit -- NEC 424.3(B) requires the 125% continuous load modifier to be applied to the nameplate rating of the heater, meaning you need to size the wire and breaker for 38.75A of load.
Two hots and a ground should be fine
Most electric heating equipment runs solely off 240VAC, which means that you only need to provide it with two hots and a ground, unless the equipment installation instructions specify a neutral is required as well.  In that case, you'll need to use 8/3 cable for this; otherwise, 8/2 is OK here, given that nothing else can be attached to this circuit anyway.
Comment: Personally, for the relatively little extra money it would cost, I'd put in 8/3 anyway just in case the heater is swapped out for something different in the future that does require the neutral.
Answer: 10 awg wire is only rated for 30 amps. I think your 31 amps is the maximum that the device will draw, but I could be mistaken. For a 40 amp circuit, you'll need a minimum of 8 awg wire.
Not sure of your location or of the codes in your area, but in Tennessee, you'll need 4 conductor wire. 2 hot wires, 1 common/neutral, and a ground.
Comment: Is there a local amendment where you're at that requires a neutral to be pulled to a piece of utilization equipment that doesn't need it?
Comment: You don't need a neutral unless the heater requires it generally.
Comment: Sorry for the misinformation. While writing this I was have a conversation with someone else about a stove circuit... Common/neutral isn't required. I however, would run a neutral for possible future use.


vessels and dipping

Question:
How many times does one halachically have to dip a vessel into a mikveh?
Is one allowed to wet his hand in the מקוה prior to dipping as opposed to letting go of the vessel so that the water can reach every part of it. Where halachic source for this?
Comment: When one does teivilah they should not hold the utensil tightly so water reaches everywhere,or dip ones hand into the water first (Rama 120:2 with Nosei Keilim ) one dipping is halachicly mandated three times is a minhag
Comment: 1. What do you mean by "how many times does one have to dip"? *Mei'ikar hadin*? To satisfy a *minhag*? (Note that the minhag to dip three times may not be universal). 2. Consider generalizing your final sentence, as we can't know for sure what that individual was thinking. (This might be why the question was put on hold).
Answer: One should hold it loosely or dip his hand in mikva water first in order that the whole kli gets toiveled.
source: Shulchan Aruch 120:3 :

צריך שיהא הכלי רפוי בידו בשעת טבילה שאם מהדקו בידו הוי חציצה ואם לחלח ידו במים תחלה אין לחוש. (ודוקא שלחלח ידיו במי מקוה אבל לא במים תלושים) (משמע ממרדכי פרק השוכר):

One dipping is halachicly mandated while three times is a minhag.
Comment: Is three really a "minhag"? Or is it just something some people do for no reason? Has anyone of note claimed the custom is worthwhile/authoritative/binding?
Comment: Sefer Hamanig I believe
Comment: Menachem what halachic source specifies that one dips a vessel in a mikvah only once?

vessels and dipping


Inserting links in text

Question: I dont know how can i put some hyperlinks in text? For example if I want to write down "You can use minecraft wiki to see" How can I make "minecraft wiki" become a hyperlink?
Comment: I have seen very similar sentence with that hyperlink but didn`t realyze how to insert them, even though i read raw text when i pressed edit.
Answer:

Inserting links in text


What causes grainy film pictures?

Question: So I got a film roll developed, Kodak Colorplus 200. The results aren't what I expected. Most of my pictures are either grainy, overexposed, or underexposed. I thought it was because I shot most of the pictures in low lighting and the ISO wasn't sufficient enough. Is that it? What causes grains really, and how do you deal with them?
Comment: Thanks - but it's a tad small to see any detail, especially down at grain levels.
Comment: You don't say. Put it this way, are grains caused solely by a matter of lighting and ISO or are there other factors?
Answer: Photographic film is made by coating a light sensitive layer atop a clear plastic support. Graininess is often seen in finished paper prints or when a slide (transparency) is projected on a screen etc. We select slow speed film (low ISO) when possible because slow films show less grain. Thus fast films show more grain.  The degree of enlargement is a key factor. Prints 8X10 inch and large, often show grain. This is because 35mm is a miniature format. We enlarger these negatives about 8X or more to get to the 8X10 size. We mitigate grain by switching to a larger format camera and/or use low ISO film.
In the case of color print film, the grain you see is clumping of the dye clouds that make up the color image. Generally, 200 or 400 ISO color film fairs well when producing 8X10 prints. Graininess is increased by over-developing. Improper exposure will shows more grain. Grain is often more prevalent in areas of print that are mundane. We are talking uniform blue sky or any moderate density area that is uniform as to texture. This is because there is no busy patterns that tend to mask a grain pattern.
Again, your best bet, it grain annoys is to use 100 or 200 ISO color print film and expose as correctly as you can. Next roll, try bracketing your exposure. Make a series of exposures, some under some normal, some over exposed. This experiment will help you get a handle on grain.
Answer: As Hueco and Alan Marcus describe, grain is an inherent property of film. However, you describe variable print results and underexposures. Since most prints are made digitally, you may be seeing digital noise caused by increased gain, not grain. The obvious solution is to properly expose the film. Consider using a camera with a working light meter. Make sure the camera ISO setting matches the film. If your film is expired, you will need to decrease the ISO or add exposure compensation.
Answer: Grain structure is an inherent part of shooting film. In general, lower ISO films have a tighter grain structure, allowing them to "look" smoother than higher ISO films (up to a point, if you're blowing up even an ISO 50 35mm frame to 24x36, you're going to see some grain).
Now, if you think that your image is overly grainy for the ISO that you have or the film type that you shot...that could very well be the case.
A proper exposure is needed along with proper development to minimize the grain size in any particular image. Color negative film (like your Colorplus film) handles overexposure very well - but it suffers from underexposure.
If the camera that you were using doesn't adjust exposure based on available light (many simple point and shoot cameras don't, or have shutter speed minimums that might still be too fast for the lighting conditions) then you are absolutely right in assuming that your film was too slow for your environment. These types of cameras are great for taking snaps - but with the limited ability to set exposure, you really do have to grab the right ISO for the lighting (100 for outdoor, 800 for indoor/dim, and 200 or 400 for level in between). Keep in mind that color negative film tolerates overexposure really, really well - so you want to err on this side.
As for the exposure on the print, keep in mind that the whole roll is being printed by a machine where a single setting was probably applied to the whole role. This means that, if your exposures were not consistent from shot to shot, then you'll have wide variation in your prints. You may want to take the image back to the lab with the negative and ask them to reprint, taking into account the single frame's exposure.
Answer: It's impossible to see anything akin to grain on that picture you posted because of its scale, but what can be seen is that is severaly lacking in contrast with a central section getting more light.  Assuming that this is not a flash unsuitable for the wide angle you photograph, it may be a street lantern or something.
At any rate, this looks like a seriously underexposed photograph that has been "rescued" in development or enlargement, giving it some net brightness but working with minuscule original contrast/exposure.  Grain is always a thing, of course, but underexposure (or rather compensation of underexposure) tends to magnify it.

What causes grainy film pictures?


Gmail filter to apply to specific "Label"

Question: Can I set a Filter so that when I apply a specific label to an email in the Inbox it is forwarded to another email address? Example: If I label an email "Important",can a filter also forward it to a another inbox?
Answer: Filters can do multiple actions at once so, yes, you could create a filter that marks certain messages "Important" and forwards to a specified address.
However, filters only act on messages as they are received. You can't manually add a label/status and have a filter pick up on that to send the message.


Handling id from autocomplete field

Question: I have an autocomplete field that selects id,text data from db table. I want to show the text in the field but need to put the selected id inside a hidden field so that, when the user submits the form, it is passed as form_values[] to _submit hook.
Which is the correct way to do it in D7?
Comment: So you have a autocomplete field that when selected set an ID. You then want to put that ID in a hidden field? I seem to be missing something...
Comment: Rather than hacking around with the javascript side of things in order to fill a hidden field, why not just do a lookup of the text value during `form_validate()` or `form_submit()`?
Answer: I've run into the same topics and found a solution, check it here: Autocomplete field - fill the selected id into another form element (eg. hidden field)

Handling id from autocomplete field


Why are 36-spoke wheels a touring thing?

Question: I've been looking at tourers recently and they tend to have 36 spoke wheels (as does my hybrid on the back after I broke my original rim). What I don't understand is why high spoke counts aren't used on more bikes.  Race-style road bikes with low spoke counts and smooth roads I understand. Maybe 26" wheels are tougher than 700C (I don't know). But CX bikes run (sometimes much) rougher surfaces on 700C and similar tyre widths to tourers -- without luggage but surely it's shock load that breaks spokes.  Or 29er hardtails -- rougher conditions still, and it's not like you can expect good technique from all riders all the time.
Comment: Related but don't answer my Q: [Why should I choose 36 or 32 spokes (or another number)?](https://bicycles.stackexchange.com/q/20312/7309); [Other than spoke count, is there a strength ratings for wheels?](https://bicycles.stackexchange.com/q/30629/7309).  I have some guesses (tradition, distance from repair) but think that it's better to keep them out of the Q.
Comment: FWIW, 40 spoke wheels are commonly found on tandems. So parts aren't hard to come by.
Comment: My first (27") tourer had a 40-spoke rear, and 48s were not unheard of.  More spokes == stronger wheel.  And quite often you'd see a touring bike with a built-in holder for spare spokes.  But the newer tubular aluminum rims are a bit tougher than the older steel rims.
Comment: @DanielRHicks yes, I've seen references to such high spoke counts on Sheldon's site, but never come across them (when thinking about a custom wheel recentlymore than 36 didn't appear to be an easy option). My question might amount to "why do tourers have more need for strong wheels than bikes that take more impact on the wheels?" but I'm not sure.
Comment: Adding more spokes means adding more holes to hub flanges, which weakens them, I guess the same holds true for rims, albeit to a lesser extent. Using fewer spokes requires stronger materials (meaning heavier or more expensive). So an equilibrium must have been reached and 36 is surely a number that stuck around for compatibility, availability or market reasons (maybe).
Comment: @Jahaziel I think your comments add up to a pretty decent answer.
Comment: @DanielRHicks I bought the tourer (this year's model), and it has a spoke holder.
Answer: Summing up comments into an answer, including a few points of my own:

More spokes are stronger; more holes in the rim weaken it. So a sweet spot must be found.

Standard numbers are good, for hole count and spoke gauge

Tourers have to keep going a long way from support, so durability counts (see also brakes); a little extra weight on a laden bike makes little difference unlike in a race.

One broken  or loose spoke in 36 doesn't make the wheel go as far out of true  as one in 32. I'd already experienced this on my hybrid; on the tourer I broke 2 rear drive side outer spokes (damaged in an incident with the chain) and still got home with a nearly true wheel.

Although materials have improved, touring is a conservative discipline in which there's no imperative to change what works.

Touring can mean sitting and spinning over rough roads for hours on end with a lot of weight on the frame.  In CX most of the weight is above the suspension formed by the rider's legs and the rider can stand as required.
Comment: CW for a reason -- please add anything I've missed, or sort out my wording
Answer: Touring bikes are often heavily loaded with paniers in addition to the rider. The spokes transfer the load from bike frame to the rim and road. Higher spoke count wheels means that the overall load is shared through more spokes resulting in a lower loading per spoke and thereby lowering the chance of spoke failure. This is more important for a touring bike than reducing weight for performance purposes as the rider may be a very long distance from support or repair facilities.
Comment: Also, think about the dynamics of racing. If your equipment lets you ride 1% faster than someone else with the same power/skill as you, being 1% faster is all you need to win. So even if there's a 2% chance of equipment failure, you'd win 98% of the time. If your rival has equiptment that never fails, but is 1% slower than you, they'll only win 2% of the time. Obviously simplified, but a win/lose binary is very different from touring, where getting to where you're going a minute or two quicker is of little consequence.
Comment: @ojs: Standard spokes more readily available - more specialized spokes (& wheel/spoke tools) in the low spoke count wheels may be harder to find when touring (potentially anywhere in the world). I think there is a different loading characteristic in Cx and DH bikes (impluse vs time distributed load) as the rider and suspension spreads the load over a longer period than the cargo load on a touring bike. I do believe marketing also plays a part. Touring bikes are more utilitarian and considered not as "sexy" as the other bikes mentioned so there is less effort to "one-up" the competition.
Comment: I think the question is, why for example downhill mountain bikes that have even heavier loads and where weight does matter use thicker spokes and stronger rims instead of more spokes.
Comment: Think also about the difference in consequences of breaking a spoke on a CX circuit race where you've probably got at least a spare wheelset in the pit, vs breaking a spoke 40 miles from a bike shop in either direction.
Comment: I agree with PaulD and @JamieA: touring bikes are more about reliability. So, if you are 40 miles away from nowhere, loosing out of 36 is less drastic than loosing one out of 32 or 1/16. This also means a 36 spoke wheel gets "less out of true" if a spoke breaks (Useful for rim brakes) and also, the increased load for the remaining spokes is less, so the entire wheel is less prone to break another spoke.
Answer:
I've been looking at tourers recently and they tend to have 36 spoke wheels (as does my hybrid on the back after I broke my original rim).

A touring bicycle needs a durable wheel, something that is repairable with lightweight equipment carried with you if it fails, and something that is likely to not fail in the first place.

What I don't understand is why high spoke counts aren't used on more bikes.

It's a cost reduction thing. For machine-built wheels, installing less spokes makes the wheel building process faster. At the same time, you can claim the low spoke count thing is an "improvement", supposedly reducing weight, and the fools with the money pay anything for the supposed "improvement". They don't realize that to make the rim equally durable, a low spoke count wheel needs a stiffer/heavier rim, something that adds more weight than the few eliminated spokes remove.

Race-style road bikes with low spoke counts and smooth roads I understand.

I don't. As I said, to reduce spoke count while keeping durability the same, you need a stiffer and heavier rim, which probably increases more weight than what is saved by eliminating few spokes.
Fortunately, everyone with money can affect the market. Let's start a campaign to buy only 36 spoke rims and hubs! If people buy the good stuff, the manufacturers are going to keep it in production.
Comment: Please look up "wind resistance" before claiming that unnecessary number of spokes do not have drawbacks.


Why didn't Thor take Loki's staff with him?

Question: At the end of The Avengers, Thor takes Loki with him to Asgard as a prisoner. He also took the Tesseract. But why didn't he take Loki's staff? Seeing that S.H.I.E.L.D. used the Tesseract to make weapons of mass destruction, he will surely realize that the staff was of great power and earth's people could use it for making weapons. So why didn't he take the staff with him?
Answer: There is an answer to a related question on Science Fiction & Fantasy:

I don't believe that a reason was ever given. However, in light of the
  other movies, I have a theory.
After the events in New York, SHIELD took the scepter for "safe
  keeping". Most likely under Fury's orders to determine its threat and
  other uses. Given that HYDRA had successfully infiltrated SHIELD at
  this point, the scepter was "lost" somewhere along the way. Either
  that, or HYDRA took advantage of the events in Winter Soldier to steal
  the scepter. Although, I believe the first is more likely, seeing as
  how Strucker had been experimenting on folks for a while. But, it
  probably wasn't until after SHIELD/HYDRA collapse that it was realized
  to be missing. This could be done by sending falsified reports about
  anything going on with the scepter. Again, since HYDRA was at all
  levels of SHIELD, this would have been fairly simple to do. Especially
  since the head of SHIELD himself was HYDRA.
Sadly, this would have made a great Agents of S.H.I.E.L.D. episode,
  and they missed the opportunity. There was pretty much no lead up to
  the fact that HYDRA had the scepter, except for the tiny credits scene
  for Winter Soldier.

And on Reddit:

I think the explanation comes at the the end of Winter Soldier.
  Strucker in the mid-credits scene says that "it's worth more than any
  of them ever knew." I assume the Avengers simply didn't realize how
  powerful the scepter really was, so SHIELD just took it.
Comment: Good answer! While we are just speculating, I am wondering if folk thought that the scepters power was derived from the Tesseract, considering they had no idea the mind stone was encased in the gem (Cap. America - "It may be magical, but it works an awful lot like a Hydra weapon" given that that all of Zola's designs were powered by the Tesseract).
Comment: Why did Thor abandon the staff at first place?
Comment: @AsifIqubal Maybe because Space stone is more powerful than the Mind stone.


STM32 - SPI - RTOS problem

Question: I'm working on a project that uses a 2.8" arduino LCD. The LCD uses an ILI9341 driver. Now I'm testing this library: https://github.com/martnak/STM32-ILI9341 with an STM32F4-Discovery board (STM32F407) that runs RTOS. The problem is, if I do not use RTOS, the library works great. On the other hand, when I enable RTOS, The commands does work only before "MX_FREERTOS_Init();" in main.c. I thought  it was a problems of "HAL_Delay" instead of "osDelay" but it looks like SPI stops sending data to the LCD after some bytes sending. Here is what I coded inside the task:
<code>  ILI9341_Init();//initial driver setup to drive ili9341
  ILI9341_Fill_Screen(WHITE);
  ILI9341_Set_Rotation(SCREEN_VERTICAL_1);
  ILI9341_Draw_Image((const char*)snow_tiger,SCREEN_VERTICAL_1);
  osDelay(2000);
</code>
When I do some debugging I get this message "Hard Fault Detected". I use no DMA, Interrupt, just Hardware SPI.
Can somebody help me?
Thanks!
Answer: I fix the problem by changing the stack size. Once I change the stack to a bigger one, the library works perfect

STM32 - SPI - RTOS problem