What rule engine should I use?

Question: What are some of the best or most popular rule engines?  I haven't settled on a programming language, so tell me the rule engine and what programming languages it supports.
Comment: You can try to look at our newly released Gandalf (http://gndf.io). It's a open-source decision engine that allows you to define any rules on any data model, and use them as decision tables or for scoring your clients. It's build on top PHP Laravel framework and stores data in MongoDB.
Answer: I am one of the authors of Drools, I will avoid pimping my wares.
But some other options are Jess (not open source) but uses the clips syntax (which we also support a subset of) - which is kinda a lisp dialect.
It really depends what you want it for, Haley have strong Natural language tech (and they recently aquired RuleBurst - who has also interesting natural language tech which could deal with word documents with embedded rules - eg legal documentation). RuleBurst was able to target .Net runtimes as well (there is a Drools.net "port" available as well - I haven't seen what it has been up to lately, alas, not enough time). Ok I will put my pimp bling away now... sorry about that.
Answer: Depending on what your requirements are, Windows Workflow Foundation (.NET 3.5) might be worth having a look at.
The .NET rule engine InRule supports WF and BizTalk; I've not tried it though so don't know if it's any good.
Answer: I have a bit of experience with both Haley Expert Rules and Haley Office Rules. Both nice systems, but I'd need to know a bit more abut what you want to use them for to answer definitively (See http://www.haley.com)
They both support C# and Java (and I think also a web service api).
The difference between the two is mostly around how much natural language modelling you want to get into. Office rules lets business users write rules in an Office document, and is mostly focused around legislative requirements modelling. Expert rules can be a bit more flexible in definition how it handles natural language, but requires more work defining language structures up front.
Hope some of that helps.
Answer: We've used both http://jatha.sourceforge.net and http://www.jboss.com/products/rules. They're both pretty good, but for the most part, JBoss rules seems to me to be overkill for a lot of what people do. They're both Java based.
It's worth remembering Greenspun's Tenth Rule of Programming and skip ahead to importing it :)
Answer: Inrule see website is very good!
it is a .NET based rule engine with a solid SDK and a nice UI for non technical users.
Worked great for me in past - pretty much cut my development cost in half.
Answer: I found another rule engine that supports different kinds of rules; Procedural, Inference (RETE) and FlowRule. This is quite flexible and extensible rule engine (also event driven). They had express version as free edition while ago.
Take a look at http://www.flexrule.com
Answer: For very well understood, procedural rules (like eligibility rules, insurance rules, audit rules, etc.) then simple decision tables with a Domain Specific Language can give you the performance and simplicity without the overhead of RETE based engines.
A Java open sourced rules engine of this sort can be found at DTRules
Answer: WF is available already in .net 3.0. It is a bit buggy though on the Designer-side in Visual Studio and can get quite messy. I use it on Sharepoint (where WF is pretty much your only option anyway) and overall I am quite satisfied with it, even though the learning curve is rather steep.
Foundations of WF is a good book to start with it, as they implement a complete solution from beginning to the end and explain the concepts behind it.

What rule engine should I use?


Speed of the Moon

Question: Why the motion of the Moon looks very slow in the sky? Doesn't it need the high speed in order to escape the earth's gravity?
Comment: The moon hasn't escaped Earth's gravity, or it wouldn't be revolving around the earth. The moon is gravitationally bound to the Earth.
Comment: Your profile says you're a postdoc in physics, so this question seems a bit strange.
Comment: Did you try to calculate what it's velocity should be approximately?
Comment: No. I just meant the apparent motion.
Comment: Let me give you an example. The sun is moving at a speed of $2\times 10^3 m/s$ .
Answer: The Moon moves at about a thousand metres per second, but it's a long way away so it only appears to move slowly. Most of the apparent movement of the Moon is actually due to the rotation of the Earth. We see it appearing to go round the Earth once a day, but it actually takes about 28 days to complete an orbit.
The Wikipedia article on the Moon's orbit has these and many other stats about the Moon.
Answer: The moon is in orbit of the earth, an ellipse. A circle is a good approximation for the orbit, due to the low eccentricity. It's potential energy in radial direction is at a minimum. The speed is $$v_{\text{moon}}=1022\,\frac{\text{m}}{\text{s}}$$. Thats triple speed of sound. An airplane travelling at this speed would take not much time to appear oit of sight. The moon however appears slower. Due to its distance to the viewer it appears to travel slowly at the sky: low angular velocity $\omega=\frac{v_{\text{moon}}}{r_{\text{moon}}}=\frac{1}{T}$.
Estimating the speed of the moon
Earth also rotates and the period of a moon cycle is longer. One cycle takes $T=27.32$ days to complete. Assuming a circular orbit with mean distance $r_{\text{moon}}=385\,000$ km allows calculation of the speed of the moon. This calculation yields the velocity of about one kilometer per second.
Fun fact
The motion of the moon has a fun fact: Due to tidal locking one side of the moon always faces towards the earth.
Comment: 1022 m/s or km/s?
Comment: Thanks. Updated answer. Provided [data](http://en.wikipedia.org/wiki/Orbit_of_the_Moon) for calculation of the speed of the moon.
Answer: When we stand on the side of a street and watch a car zooming at 100 Km/H we feel that the car is moving fast. But when you look at the same car from a distance of 10 Km, it appears slower because of the car and the observer. This is because when you are standing 10 Km away, the span of perpendicular view of your eyes has increased while the speed of the car remained at 100 Km/H. So the car has to spend more time to travel across your span of view so it appears slower. When you are standing on the same street as the car, you span of perpendicular view is very small and so the car car appears to zoom past it. Same with the moon.
The Moon orbits the Earth at a mean distance of 384,400 Km with a mean orbital velocity of 1.023 Km/S which is thrice the speed of sound. But it is at a distance of 384,400 Km so your the span of view is the entire sky due to which it appears to move slowly to us.

Speed of the Moon


Audio compression and/or EQ for general podcast recording software

Question: I'm building general podcast recording software for users who are generally unfamiliar with audio. What is the best default configuration that I can provide for a dynamics compressor, filters, and/or EQ for users recording podcasts through this software?
Comment: There isn't one. Everything depends on input source, quality, timbre & intended output of each of those.
Comment: Is there anyway I could provide, say, 3–4 options for the most common cases? I expect this tool to be used by podcasters doing voice interviews only. Anything with needs above and beyond 2–5 people having a casual conversation probably aren't a good fit. So no NPR or nightvale level quality/timbre.
Comment: What are the parameters of your compressor? Filter cutoffs should always start fully open. Resonance value should start on zero(you don't have presets for filters alone, they would simply be user adjustable). EQ should be self-explanatory(zero(user-(saveable)) or presets) but we don't even know your EQ parameters; no. of bands etc.
Answer: You really can't define specific parameters as "default". If you take a look at a compressor you'll notice the poti threshhold.
This basically specifies at which point the compressor will actually start working. Now not everyone's voice does output the same dB level. It's close to impossible to find a setting that works for everyone, just to name one of the issues.
You might want to approach a more versatile way. E.g. Build a couple of presets. One with a lower threshhold, another one with a higher. The low threshhold having almost a 1:1 ratio and more gain, while the higher threshhold has maybe 1:5 ratio and less gain, but still gains some presence through the compressor.
Additionally, keep in mind that some compressors work faster than others. If someone's tickling the threshhold every time he raises his voice and he does that frequently, because he feels the "rush of exitement", then he's gonna start pumping.
But I'm drifting off. If you wanna do it: don't try to find the "ultimate" setting. Do presets instead.
Super interested to find out what your results are !! :)
Lemme know!!
Cheers!
Comment: Thresholds are almost always set to 0 dB by default, as this should be the starting point for most situations. Even in these presets you're talking about, the one feature that should be initially constant, but user-adjustable should be the threshold.


Does video evidence need to be attested to by a human?

Question: If video filmed by (say) a smartphone is used as evidence, does the person who filmed it have to submit an affidavit saying "I filmed that at location X at time Y"?  Or can the video be used as evidence without that?
Answer:
If video filmed by (say) a smartphone is used as evidence, does the
person who filmed it have to submit an affidavit saying "I filmed that
at location X at time Y"? Or can the video be used as evidence without
that?

Short Answer
Someone must testify to authenticate video evidence but it doesn't necessarily have to be the person who filmed it and an affidavit would frequently not be sufficient to do so.
Long Answer
There are two main kinds of evidence: exhibits and testimony. Videos are a form of exhibit even though they may sometimes record testimony (and videos of depositions and trial testimony are often treated as testimony rather than exhibits for many purposes).
Video evidence (like all other exhibits) must be authenticated to be admitted in court and considered to resolve disputes presented to a court (at least in common law court systems like England, the U.S., Australia, etc.)
Authentication means to provide context to show what the evidence is and how it came to be and that it is what it purports to be. Some of the evidence provided to authenticate an exhibit is also called "foundation."
The burden of proof to authenticate a document is a fairly low bar. Generally, if a party can provide prima facie evidence sufficient if believed to be true to authenticate an exhibit and another party disputes its authenticity, the exhibit is admitted and the question of authenticity at that point becomes one for a judge or jury as a finder of fact to weigh based upon all of the evidence, and not a question regarding whether or not the evidence can be admitted for consideration at trial.
There are multiple ways that evidence can be authenticated, and this is not limited to testimony from the person who took the video. Someone who was present when the video was taken, for example, could also authenticate it. A chain of custody is often part of proof of authentication. Any way to prove that the evidence is what it purports to be and to establish what it purports to be that logic and reason supports is allowed.
There are a few kinds of exhibits that are self-authenticating (e.g. government documents under seal), but video evidence rarely qualifies as self-authenticating (in part because it can be manipulated and someone needs to testify that it was not manipulated).
There are other kinds of evidence which may be authenticated by affidavit under safe harbor provisions of rules of evidence, such as certain evidence provided in response to a subpoena duces tecum (i.e. a subpoena to produce documents) in some jurisdictions.
But the general rule is that an affidavit is not sufficient and that exhibits including video evidence must be authenticated with the live testimony of a witness under oath who has personal knowledge of the facts to be established which is subject to cross-examination.
Answer: Yes
People say things like "video evidence" but that video is technically an exhibit. The evidence is the testimony by a person about what the video is.
Comment: I would consider exhibits to be a subset of the things that are evidence, with testimony being the other main subcategory of evidence. Both the video, once admitted as an exhibit, and the testimony about what the video is would be evidence, although different kinds of evidence.
Answer: It'd certainly help.
Having the filmer available allows them to provide necessary context. This includes attesting that the video has not been edited, that it is in fact of the relevant location and time, and explaining any inconsistencies in it. They can also be cross-examined over this.
Without a witness to cross-examine, it is possible the video would be dismissed as hearsay.
Comment: The video might not be admitted as evidence, but hearsay would be the objection raised, for example, to the authentication affidavit and not to the video itself. The video itself would not be hearsay although it might contain objectionable hearsay statements that would have to be suppressed under the hearsay rule in some cases. The objection would be lack of foundation or lack of authentication.


How can I make an movieclip move in a circular path with GTween?

Question: How can I make an movieclip move in a circular path with GTween? it's straightforward to have something move with various easing effects in a line or a curve, but I would need a complete circular path.
Answer: Most animation libraries aren't made to support that sort of thing. I wrote a small library for exactly this problem; it's built upon a foundation of spatial path-based animation, rather than generic property interpolation.
You can check it out here: http://blog.generalrelativity.org/actionscript-30/grape-animation-library/
If you're required to use GTween, and it supports curves (probably bezier), you can approximate a circle with multiple curves: http://www.tinaja.com/glib/ellipse4.pdf


What campaigns did the Mexican army fight against American Indians in the North?

Question: I am seeking information about Mexican Army Operations against Apaches and other Native American militant tribes (such as the Apaches, Comanches, Yaquis, etc)  in the northern part of the country. If anyone can go into details of  this aspect of the North American Indian wars, please share. The only current source that I  know of is Geronimo's autobiography, which describes battles with the Mexican Army that seem to be on the same scale of some of the battles that happened on the Northern Plains. There must be documentation of these campaigns (in Spanish) in Mexican military references.
Comment: T.R.  Fehrenbach has a history of Mexico titled "Fire and Blood" which may have some of the background you seek, but it's not by itself a primary source.  The original edition covered Mexico up until about 1940, though IIRC subsequent editions go as far as more contemporary issues as the long standing success of the PRI.
Comment: Do you mean in the north of what is now Mexico,  or do you mean north as in the territories that are now part of the United States.    Also any chance you have read Blood Meridian,  it is fiction but a very well written book about that time period and issues.
Answer: David Weber in The Mexican Frontier (1982) suggested that the best English-language source on the Mexican conflict with northern tribes is a 1963-1972 series of articles by Ralph A. Smith in the journals Hispanic American Historical Review, Arizona and the West, and Arizoniana. For a Spanish-language source Weber liked Carlos J. Sierra's book Los indios de la frontera (1980).


What happens when a creature with flying blocks my non-flying attacker?

Question: I've declared a non-flying attacker, and my opponent declared a flying blocker. When combat damage is dealt, I deal damage as normal, but can the damage dealt by the flying creature be absorbed by my non-flying creature, or do I have to absorb it with my life?
Comment: Think of this as happening in real life.  You are at one end of a field with a dog.  Your opponent is at the other end of the field and has a large eagle.  You "sic" your dog on the other guy and your dog takes off down the field.  The other guy commands his eagle to stop your dog. Eagle swoops down and dog and eagle fight. Eagle may win and stop dog, or dog may win and continue to hurt other guy, but you aren't going to be hurt either way.

Now it's the other guys turn.  Other guy sends his eagle to fly down and attack you.  You can't command your dog to fly up and block the eagle.
Comment: @Kevin Mark Rosewater has said on several occasions that "flying" is a wonderful name for that ability, exactly because our real world intuition works so well with that word.
Answer: It's your turn and you are attacking your opponent; that means you won't lose life from combat damage. The flying creature will deal combat damage to your non-flying creature. The fact that it has flying has nothing to do with it; that just determines whether it can block or be blocked.
Everything you need to know about this is covered in the basic rules; look for the section 'ATTACKING AND BLOCKING'.

An attacking creature that is blocked deals damage to the creature or creatures that are blocking it, and vice versa.
Answer: I think you may be a bit confused between magic and Yu-Gi-Oh rules.
Using your example, you declared attackers and your opponent declared blockers.
Your creature does not have flying so it can be blocked by any creature (unless stated on the creature itself, either attacking or blocking for example Skywinder Drake).
In this case, the ability the blocking creature has is irrelevant.
Abilities that will usually matter when defending (keyworded abilities) are for example: First strike, double strike, last strike, deathtouch, lifelink, infect, whither and indestructible.
In the case of the attacking creature the above abilities are also relevant, but one of the most relevant regarding damage will be trample as mentioned on other answers.
If your attacking creature's power is higher than the blocking creature's toughness then your attacking creature would deal enough damage to the blocking creature for it to be lethal, and you could then assign the rest of the damage to the defending player. Attacking player "always" chooses how the damage is assigned to defending creatures/players according to the rules. The only instance where a defending player gets to assign damage and "blocking order" is if he controls a creature that allows him to block more than one creature at a time. The defending player can never "trample" damage to its opponent as such ability does not exist and they are not the attacking player, therefore all damage must be assigned to the blocked creatures.
Answer: If there is no trample (or any other abilities involved) combat between creatures will never cause damage to players.
Comment: Not directly relevant to the question, but to avoid any confusion it could be good to mention that even in the case of Trample, the attacking player will never get hit by combat damage.


Missing Good Answer badge.

Question: I noticed that my answer here Why do programmers write closed source applications and then make them free? did not give me a Good Answer badge. I noticed this after I suddenly received a Nice Answer badge for it, a few weeks after it passed 70 upvotes. This sounds like a bug to me, unless there are rules that are specific to community wiki answers that I'm unaware of?
Answer: Bear in mind that badges are never removed.
If you previously got a badge for a deleted or migrated question, you won't get the "next" one of that type.
The total count of badges of that type is how this is determined. Go ahead and count up the totals of answers with >= (n) votes on your user page.
Comment: That question is community wiki.  Would that affect his ability to get the Nice Answer or Good Answer badges?
Comment: @jmort no, but the situation I describe is very, very common. Just add up the eligible answers on his profile and I bet you'll find it's correct.
Comment: Ok, thanks.  I just wanted to clarify :)
Answer: I don't know if this is your answer or not but I have noticed that some things like badges and reputation and acceptance percentages, etc don't always update or appear right away.  Maybe its still on its way?
Answer: I made a feature request question so that we could get some indication on the badges as to when each badge will be awarded on meta so.  Still hopeful.  It might be useful to also know if you knew if any of your badges have lapsed due to migration or deletion.
Some badges are awarded instantly, some at the end of the day (I guess after a batch run or sql job) and some (like tenacious) 7-10 days after you qualify for them.
I think that Good Answer falls into the 'will be awarded at the end of the day' bracket - so after this much time I guess its not going to come.

Missing Good Answer badge.


Is there a way to point chess moves?

Question: I know there are points for each chess piece, but is there a way to - imprecisely, for sure - measure/point chess moves?
Comment: @BlueRaja-DannyPflughoeft Your answer was very good, but this other has more to do with my question. I'm not trying to get better at chess, I want to make a game with similarities with chess, so to know how the computer points moves is what I need, and the other user provided more info towards this and a link with more.
Answer: Sure, that's how computer engines work.
For instance, if you start up ChessMaster and hit ctrl+m ("mentor"), it will give you a list of all the moves, and how the chess engine rates each of them.
How it works is that the engine looks as far as it can for every move, assuming best play for both sides, and rates the final position.  That final position's rating is the value of the move.
To rate the position, the computer looks at material, space, pawn-structure, king-safety, known patterns and endgames, etc. etc. - basically, all the same things a human looks at, but the computer's not as good at it, because this is pattern matching, something computers are notoriously bad at.  The only reason computers can beat humans is that the computer can see so far ahead so fast, and never makes mistakes.
Thus, looking a computer's rating of different moves might help settle an argument, or help point out mistakes in your games after-the-fact, but learning how computers rate positions is not going to help you get better.
Comment: As you said, each possible move gets evaluated, and "Penalty" is calculated assuming opponent will play his best moves (with less penalty), and it goes many moves deep, the more deep it goes the better will be the accuracy of "Penalty" calculation.
Answer: Generally:

Pawn = 1 point
Bishop and knight = 3 points
Rooks = 5 points
Queen = 9 points

But computers use a slightly more complicated way to count points.
Pawns, depending how many there are on the board (close or open position), depending on which file they are positioned, if they are passed pawns, if they are connected and on which rank they are, in endgame or opening, can have a relative value of 0,90 points to 3,5 points!
Bishops can have a better value than knights if the position is open and / or both bishops are on the board.
Queen and Rooks can have a slightly lower value if the position is closed while knights are worth more.
That's why some exchanges (knight for a bishop for example) are better for one or the other player.
Points (decimal points) will vary more or less depending on the chess engine.
More details...
Comment: The question was about **chess moves**, not **chess pieces**.
Comment: @Paŭlo Ebermann: Have you read the answer? I'm talking about positions. The computer evaluates positions after a move. hint: look at the bold words...
Comment: Sorry, it was not totally obvious to me how to get from points for pieces (depending on situation) to points for moves. Maybe add something like **Summing up the (situation-dependent) values of the pieces gives a value for the position, and then one could give points for moves as the difference between the values of the positions after and before the move.** (better worded, and adapted to the real facts).
Answer: I add points for movements of PIECES:
For instance, a rook is normally worth five points. But if has been moved to the "seventh" rank, (next to the opponents' pawns), I consider it a SIX point rook.
A "bishop pair," in an OPEN position against two knights or a bishop and a knight is worth more like SEVEN points, rather than six.
A knight is usually worth three points. But if it has found an outpost at say, e4, e5, or e6, maybe f5 or f6, in a "hole" from which it cannot be dislodged, it is a FOUR point knight.
A pawn is usually worth one point. But if has moved to a square past opponents' pawns so that it is a "passed" pawn, it is worth TWO points.
These are all significant advantages, enough to win a game BY THEMSELVES, even if everything ELSE is equal. Basically, you're an extra "point" ahead.

Is there a way to point chess moves?


differences of SSL certificates?

Question: What are differences of SSL certificates for web server, such like extended validation, Smart Seal, wildcards, single root? What certificates are appropriate for what needs?
Answer: With the exception of wildcards, the differences are largely cosmetic and affect browser UI behavior. All certs from trusted CA's will show the key, lock, or what have you in a browser. Some of the more vetted certs will do things like turn the address bar green in Internet Explorer.
Wildcards are different in that they can be used for any single wildcard underneath that domain. They're not restricted to a static hostname. If you have a wildcard for *.domain.com, you can use the same cert for mail.domain.com, www.domain.com, foo.domain.com, etc. However, you cannot use it for domain.com nor can you use it for subdomains such as www.corp.domain.com nor mail.corp.domain.com. You'd need a *.corp.domain.com wildcard in that case.
Update: the previous statement isn't always true. Some CA's like rapidssl will now cover *.domain.com and domain.com as the CN. This is a recent change and was probably brought about due to marketplace competition.
Comment: Address bar will go green in Firefox, too, and soon Safari.
Comment: Sometimes intermediate certificates needed can be a pain to install correctly.
Comment: Depends how much you value your snake oil.
Answer: Extended Validation SSL Certificates validates a web site as secured with an SSL Certificate that meets the Extended Validation Standard by causing the URL address bar to turn green.  It should list the organization name in the certificate and the Certificate Authority (VeriSign® or GeoTrust, for example). Firefox and Opera have announced their intention to support Extended Validation SSL in upcoming releases.
Smart Seal is basically a visual cue to your online users that your website is protected  using SSL - well really that the traffic is encrypted.  These typically display the Date and Time  to ensure the most up-to-date security.
Answer: Extended validation requires the CA to go and validate the identity of the person/company requesting the Certificate (and verify the domain to go onto the certificate to be registered to him) which doesn't happen for a "normal Certificate".
UPDATE: and yes depending on the browser different colors will be displayed to differentiate it from other Certificates.
I guess unless you offer highly sensitive content I'd suggest to go for the normal certificate.
Answer: It should be noted that Windows Mobile 5 does not support wildcard certificates at all. Apparently Windows Mobile 6 and up do.

differences of SSL certificates?


Does modern philosophy entertain the notion of objective beauty?

Question: Does modern philosophy entertain the notion of objective beauty? Are there any sources which discuss such a possibility and do they offer a possible definition of such a concept?
Comment: Also by "modern", do you mean Modern (period from Descartes to approximately Hegel) or do you mean contemporary?
Comment: "*Crispin Sartwell in his book Six Names of Beauty (2004), attributes beauty neither exclusively to the subject nor to the object, but to the relation between them, and even more widely also to the situation or environment in which they are both embedded*", see a [survey of old and current approaches on SEP](https://plato.stanford.edu/entries/beauty/#IdeCon).
Comment: Related question: http://philosophy.stackexchange.com/questions/30730/is-it-ever-possible-to-objectively-state-that-a-piece-of-music-or-film-or-a-gen
Comment: @virmaior guesisng they mean contemporary!
Comment: Bourdieu basically adapted the art/beauty concept of Kant's *Critique of the Power of Judgement*. His works on art may be worth a look.
Answer: Perhaps you may look to the Hegelian Lectures on Aesthetics.
As Hegel's philosophy is regarded Objective Idealism his analysis of the beautiful or of art includes an objective element.

Now when truth in this its external existence [Dasein] is present to
  consciousness immediately, and with the concept remains immediately in
  unity with its external appearance, the Idea is not only true but
  beautiful. Beauty is determined as the sensible shining of the Idea.

from wiki:

Hegel's Aesthetics is regarded by many as one of the greatest
  aesthetic theories to have been produced since Aristotle.

https://en.wikipedia.org/wiki/Lectures_on_Aesthetics
https://en.wikipedia.org/wiki/Objective_idealism
Answer: Hume argues for an objective standard of taste in the aptly named Of a Standard of Taste.
Hume argues that beauty can be objectified and that it is the job of 'true critics' to do so, defined as (having)...

Strong sense, united to delicate sentiment, improved by practice, perfected by comparison, and cleared of all prejudice, can alone entitle critics to this valuable character; and the joint verdict of such, wherever they are to be found, is the true standard of taste and beauty.

Hume's view is that a sufficiently qualified critic through when forming a consensus with other true critics is able to provide an objective standard of taste.
Hume's SoT is a good place to start and its pretty readable.
Answer: According to the famous PhilPapers survey, objective aesthetics is slightly more popular than subjective aesthetics, while moral realism is substantially more popular than moral anti-realism. While none of these positions enjoy anything close to a consensus, they're certainly "entertained" in modern philosophy. People might not discuss the aesthetic question as much as the meta-ethical one, though the arguments on each side will bear a lot of similarities. In recent years it's become common to argue that epistemology is normative, so if epistemic norms are "real" other norms may well be; so it's unsurprising realist positions enjoy more popularity than, say, logical positivism, which modern work probably doesn't entertain.


What is the best approach to write hooks?

Question: I had to use some hook functions on almost every project I worked, right now I am working on a project ( basically to collect donations and maintain organizations list ) where I need to write lots of custom code, at first I started to write all the code in theme i am developing, later I realized that its not going good with all the functions in theme because some hooks need to be written in modules so now some of the code is written in module and some is in theme which breaks the functionality when switch theme or with admin theme.
So I am thinking to write all the code again but not sure what is the best approach to write custom code in a drupal project.
if all code goes in custom module some of the theme sections needs to be rebuild and I didnt find any proper article on net on this
Answer: I think your question is more of in-general type . Please specify for what all purpose you need to use hooks .
I think this might be helpful for you : http://www.stephanemartinw.com/articles/25-theme-drupal-hooks-templates-functions
Thanks


Options for dummies. Can you explain how puts & calls work, simply?

Question: I never understood Puts or Calls. Could anybody explain it like I were a child?
Comment: Still, no explanation good enough for a child... Let me think of lollipops. Suppose a child has a bag of lollipops. He/She writes a call option for the worth of the bag + 1% for next month, and sells it to his/her friend. Now, the shop still sells the bag for the same amount, or at a discount, so the friend will not buy the bag. However, if the shop raises the price over this 1%, your friend can buy the bag with a profit.
Comment: The other way around, the friend of the child writes a put option for the worth of the bag -1% in one month. If the shop lowers the price of the bag below 1%, the child can sell the bag without loss.
Answer: Here's my attempt at "Options for Kids"
"Hey kid... So you have this video game that you paid $50 for that you want to sell two months from now"
"Yes, Mr. Video Game Broker, but I want to lock in a price so I know how much to save for a new Tickle Me Elmo for my baby sister."
"Ok, for $3, I'll sell you a 'Put' option so you can sell the game for $40 in two months."

.... One month later ....
"Hey, Mr. Video Game Broker, I can't wait to get this new Tickle Me Elmo for my little sister for Christmas, but its hard to get and I'm afraid prices will go up. I can only spend $100!"
"Ok kid, for $4 I'll sell you a 'Call' option to buy a Tickle me Elmo on December 21st for $95. If you can find it cheaper, the option can expire, otherwise $95 is the most you will pay!"
Comment: Nice - this shows the transaction for both buyer and seller of the put and call, with a reason for both.
Comment: This is an answer that appeals to my childish heart. Thanks.
Comment: Needs an explanation for the put as to who would be allowed to let the option expire.  (i.e. the purchaser of the option)
Comment: Of course this goes against what *actually* happens when you try to sell a video game back; Gamefly's commercials aren't that far off.
Answer: Put options are contracts to sell. You pay me a fee for the right to put the stock (or other underlying security) in my hands if you want to. That happens on a specific date (the strike date) and a specified price (the strike price). You can decide not to exercise that right, but I must follow through and let you sell it to me if you want to. Put options can be used by the purchaser to cap losses.
For example: You purchase a PUT option for GE Oct19 13.00 from me. On October 19th, you can make me buy your GE stock for $13.00 a share. If the price for GE has fallen to $12.00, that would be a good idea. If its now at $15.00 a share, you will probably keep the GE or sell it at the current market price.
Call options are contracts to buy. The same idea only in the other direction: You pay me a fee for the right to call the stock away from me. Calls also have a strike date and strike price. Like a put, you can choose not to exercises it. You can choose to buy the stock from me (on the strike date for the strike price), and I have to sell it to you if you want it.
For example: You purchase a CALL option for GE Oct19 16.00 from me. On October 19th, you can buy my GE stock for $16.00 a share. If the current price is $17.50, you should make me sell it to you for $16.00. If its less than $16.00, you could by it at the current market price for less.
Commonly, options are for a block of 100 shares of the underlying security.
Note: this is a general description. Options can be very complicated. The fee you pay for the option and the transaction fees associated with the shares affects whether or not exercising is financially beneficial. Options can be VERY RISKY. You can loose all your money as there is no innate value in the option, only how it relates to the underlying security. Before your brokerage will let you trade, there are disclosures you must read and affirm that you understand the risk.
Comment: Let me add that the reason you would want to even consider options is that they allow you to potentially have a much bigger return for the same amount of money than if you had purchased the equivalent amount of stock. Of course there is more risk too.
Comment: @JohnFx: Speculative option trading is not recommended for the faint of heart.  The **main** reason you would want to consider options is for **hedging**.  There are also several lower-risk strategies that mimic the risk/reward profile of a hedged long or short position (most notably spreads).  If the *only* thing you do with options is buy them like lottery tickets, you need to stop trading options ASAP.
Comment: @GUI Junkie: Nope. Options can be traded on their own. You could sell it to someone else who had the stock. Or you could buy the GE stock before the expiry (if you wanted to make me buy them from you for 13.00 each). See @Jaydles's answer for where to learn more.
Comment: Does that mean that you have to buy GE stock before you can get a 'Put' option?
Comment: Putting examples to @Aaronaught's comment: The other (not-so-speculative, hedging) side of the medal is that options are also a kind of insurance: with a put option, the farmer ist guaranteed to get at least that much for the grain he produces, with a call option the miller is sure not to pay more more for the grain he needs. AFAIK time contracts (maybe rather futures, not options) for farming produce are known since ancient times.
Answer: I'm normally a fan of trying to put all the relevant info in an answer when possible, but this one's tough to do in one page.    Here's the best way, by far to learn the basics:
The OIC (Options Industry Council) has a great, free website to teach investors at all levels about options.
You can set up a learning path that will remember which lessons you've done, etc.  And they're really, truly not trying to sell you anything; their purpose is to promote the understanding and use of options.
Comment: I don't get it, how do they make money from this then?
Comment: @Pacerier, they're funded by all of the (normally competing) options exchanges, like CBOE, BOX, etc.  The options exchanges believe that the more people there are educated about options, the more they'll get traded, which means more exchange fees for them.
Comment: so since they make no profit, they will close down as soon as one of the "options exchanges" decided to stop throwing money in?
Comment: @Pacerier well, it's funded by all of them, so one pulling out wouldn't likely matter much.  If they all did, sure - it'd be unfunded, but A) that's the case with any non-endowed non-profit entity, and B) there's not much risk to you anyway, as it's not like they'd "lose your transcript".  You have little investment in their longevity after you use the materials - even if they closed shop, you've still benefitted from whatever you learned...
Answer: "Put DOWN"
(buy these when you expect the price to go down)
How it works
You 'lock in' the price you can sell at.
If the price goes down below the 'locked-in' price, you buy at the new low price and sell at the higher 'locked-in' price; make money.
"Call UP"
(buy these when you expect the price to go up)
How it works
You 'lock in' the price you can buy at.
If the price goes up above the 'locked-in' price, you buy at the 'locked-in' price and sell at the new higher price, make money.
In either case

You pay a small fee to 'lock in' the price
You don't have to do anything if the price doesn't change to make it profitable for you.  It's optional, which is why it's called an "option".
Comment: Sounds good. Please elaborate a little on this theme. Could be a winner for the 'child explanation'
Answer: A 'Call' gives you the right, but not the obligation, to buy a stock at a particular price. The price, called the "strike price" is fixed when you buy the option.
Let's run through an example -
AAPL trades @ $259. You think it's going up over the next year, and you decide to buy the $280 Jan11 call for $12.
Here are the details of this trade. Your cost is $1200 as options are traded on 100 shares each. You start to have the potential to make money only as Apple rises above $280 and the option trades "in the money." It would take a move to $292 for you to break even, but after that, you are making $100 for each dollar it goes higher. At $300, your $1200 would be worth $2000, for example. A 16% move on the stock and a 67% increase on your money. On the other hand, if the stock doesn't rise enough by January 2011, you lose it all.
A couple points here - American options are traded at any time. If the stock goes up next week, your $1200 may be worth $1500 and you can sell. If the option is not "in the money" its value is pure time value. There have been claims made that most options expire worthless. This of course is nonsense, you can see there will always be options with a strike below the price of the stock at expiration and those options are "in the money." Of course, we don't know what those options were traded at.
On the other end of this trade is the option seller. If he owns Apple, the sale is called a "covered call" and he is basically saying he's ok if the stock goes up enough that the buyer will get his shares for that price. For him, he knows that he'll get $292 (the $280, plus the option sale of $12) for a stock that is only $259 today. If the stock stays under $280, he just pocketed $12, 4.6% of the stock value, in just 3 months. This is why call writing can be a decent strategy for some investors. Especially if the market goes down, you can think of it as the investor lowering his cost by that $12. This particular strategy works best in a flat to down market. Of course in a fast rising market, the seller misses out on potentially high gains.
(I'll call it quits here, just to say a Put is the mirror image, you have the right to sell a stock at a given price. It's the difference similar to shorting a stock as opposed to buying it.)
If you have a follow up question - happy to help.
EDIT - Apple closed on Jan 21, 2011 at $326.72, the $280 call would have been worth $46.72 vs the purchase price of $12. Nearly 4X return (A 289% gain) in just over 4 months for a stock move of 26%. This is the leverage you can have with options. Any stock could just as easily trade flat to down, and the entire option premium, lost.
Comment: OK, I believe I start to understand it. A call gives you the right to buy a stock if you buy the option and the obligation to sell it if you sell the option.
Comment: Inversely, the put gives you the right to sell a stock if you buy the option and the obligation to sell if you sell the option.
Comment: So, a call is good when the stock rises above the call price plus call cost.
Comment: And a put is good when the stock drops below the put price minus the put cost.
Comment: Put = Buyer has the right to sell, but seller has the obligation to buy. I sell a $240 strike put on Apple if I wish to pocket a few dollars, but ultimately am Ok to buy Apple at $240 even if it goes down to $150. The PUT buyer "puts the stock" to me.
Comment: Ah, so I got it right? (still not sure)
Comment: In comment 2, you wrote "the obligation to sell if you sell the option." Not quite, if you sell the put, you have the obligation to buy the stock at the will of the put buyer. The trading of puts is not so intuitive, even now, I need to think slowly when describing them to someone.
Answer: Great answer by @duffbeer. Only thing to add is that the option itself becomes a tradeable asset. Here's my go at filling out the answer from @duffbeer.
"Hey kid... So you have this brand-new video game Manic Mazes that you paid $50 for on Jan 1st that you want to sell two months from now"
"Yes, Mr. Video Game Broker, but I want to lock in a price so I know how much to save for a new Tickle Me Elmo for my baby sister."
"Ok, for $3, I'll sell you a 'Put' option so you can sell the game to me for $40 in two months."
Kid says "Ok!", sends $3 to Mr Game Broker who sends our kid a piece of paper saying:

The holder of this piece of paper can sell the game Manic Mazes to Mr Game Broker for $40 on March 1st.

.... One month later ....
News comes out that Manic Mazes is full of bugs, and the price in the shops is heavily discounted to $30.
Mr Options Trader realizes that our kid holds a contract written by Mr Game Broker which effectively allows our kid to sell the game at $10 over the price of the new game, so maybe about $15 over the price in the second-hand market (which he reckons might be about $25 on March 1st). He calls up our kid.
"Hey kid, you know that Put option that Mr Game Broker sold to you you a month ago, wanna sell it to me for $13?" (He wants to get it a couple of bucks cheaper than his $15 fair valuation.)
Kid thinks:

hmmm ... that would be a $10 net profit for me on that Put Option, but I wouldn't be able to sell the game for $40 next month, I'd likely only get something like $25 for it.
So I would kind-of be getting $10 now rather than potentially getting $12 in a month.
Note: The $12 is because there could be $15 from exercising the put option (selling for $40 a game worth only $25 in the second-hand market) minus the original cost of $3 for the Put option.

Kid likes the idea and replies:
"Done!".
Next day kid sends the Put option contract to Mr Options Trader and receives $13 in return.
In summary
Our kid bought the Put option and later sold it for a profit, and all of this happened before the option reached its expiry date.
Answer: An Xbox currently sells for $200 but you don't have the money right now to buy it.  You think the price of the xbox is going up to $250 next month. Your friend works at BestBuy and says he has a "raincheck" that allows you to buy the Xbox for $200 but the raincheck expires next month.  He offers to sell you the "raincheck" for $5.
When you buy his raincheck for $5 you are locking in the right to buy the Xbox for $200. It is like an option because it locks in the purchase price, it has an expiration date, it locks in a purchase price, and it is not mandatory that you redeem it.
That's an explanation for a call option in kids terms.  For more easy answers to the question what is a call option click now.
A put can be answered in a similar way.  Suppose you bought the Xbox for $250 and then the price drops back to $200.  If you keep your receipt, you have the right to return (sell the Xbox back) for $250 even though the current price is only $200.  Bestbuy has a 30 day return policy so your receipt is like a put option in that you can sell the Xbox back for a price higher than the current market price.
That's a simple example of a put option in kids terms.  For more easy answers to the question what is a put click now.
Comment: Welcome, Mark. It's customary here at Stack Exchange to disclose in your post when you are affiliated to a web site you're linking to.  Thank you.
Answer: Put Options for Kids:
You have a big box of candy bars. You saved up your allowance to get a lot of them, so you could have one whenever you want one. But, you just saw a commercial on TV for a new toy coming out in one month. Your allowance alone won't buy it, and you want that toy more than you want the candy. So, you decide that you'll sell the candy to your friends at school to buy the toy.
Now, you have a choice. You can sell the candy now, and put the money in your piggy bank to buy the toy later. Or, you can save the candy, and sell it in a month when you actually need the money to buy the toy. You know that if you sell all the candy you have today, you can get 50 cents a bar. That's not quite enough to buy the toy, but your allowance will cover the rest.
What you don't know is how much you might be able to sell the candy for in a month. You might be able to get 75 cents a bar. If you did, you could pay for the toy with just the money from the candy and even have some left over. But, you might only be able to sell them for 25 cents each, and you wouldn't have enough to buy the toy even with your allowance. You'd like to wait and see if you could get 75 cents each, but you don't want to risk getting only 25 cents each.
So, you go to your father. He and his co-workers like these candy bars too, so he'd be willing to buy them all and sell them to his friends the way you're planning to do with yours. You ask for the option to sell him all the candy bars for 50 cents each in one month. If you find out you can get more for them at school, you want to be able to take that deal, but if you can't sell them for 50 cents at school, you'll sell them to your dad.
Now, your dad knows that he could have the same problem selling the candy at 50 cents or more that you are afraid of. So, he offers a compromise. If you pay him $5 now, he'll agree to the deal. You figure that even without that $5, between your allowance and the candy money, you can still buy the toy. So, you take the deal.
In one month, you can offer the candy at school. If nobody will pay 50 cents, you can sell the candy to your dad when you get home, but if the kids at school will pay 50 cents or more, you can sell it all at school. Either way, you have enough money to buy the toy, and you can also choose which price to accept, but you had to pay your dad $5, and you can't get that back, so if it turns out that you can sell the candy at school for 50 cents, same as today, then because you paid the $5 you don't end up with as much as if you'd simply waited.
In the financial market, this type of option is a "put option". Someone who owns something that's traded on the market, like a stock, can arrange to sell that stock to someone else at an agreed-on price, and the seller can additionally pay some money to the buyer up front for the option to not sell at that price. Now, if the stock market goes up, the seller lets the contract expire and sells his stock on the open market. If it goes down, he can exercise the option, and sell at the agreed-upon price to the buyer. If, however, the stock stays about the same, whether he chooses to sell or not, the money the seller paid for the option means he ends up with less than he would have if he hadn't bought the option.
Call Options for Kids:
Let's say that you see another ad on TV for another toy that you like, that was just released. You check the suggested retail price on the company's web site, and you see that if you save your allowance for the next month, you can buy it.
But, in school the next day, everybody's talking about this toy, saying how they want one. Some already have enough money, others are saving up and will be able to get it before you can. You're afraid that because everyone else wants one, it'll drive up the price for them at the local store, so that your month's allowance will no longer buy the toy.
So, you go to your dad again. You want to be able to use your allowance money for the next month to buy the new toy. You're willing to wait until you actually have the money saved up before you get the toy, but you need that toy in a month. So, you want your dad to buy one for you, and hold it until you can save up to buy it from him. But, you still want it both ways; if the price goes down in a month because the toy's not so new anymore and people don't want it, you don't want to spend your entire month's allowance buying the one from your dad; you just want to go to the store and buy one at the lower price. You'll pay him $5 for the trouble, right now, whether you buy the toy he got you or not.
Your dad doesn't want to have a toy he's not using sitting around for a month, especially if you might not end up buying it from him, so he offers a different deal; In one month, if you still want it, he'll stop by the store on his way home and pick up the toy. You'll then reimburse him from the allowance you saved up; if it ends up costing less than a month's allowance, so be it, but if it costs more than that, you won't have to pay any more. This will only cost you $3, because it's easier for him. But, because he's not buying it now, there is a small chance that the item will be out of stock when he goes to buy it, and you'll have to wait until it's back in stock. You agree, on the condition that if you have to wait longer than a month for your toy, because he couldn't get one to sell you, he pays you back your $3 and knocks another $5 off the cost to buy the toy from him.
The basic deal to buy something at an agreed price, with the option not to do so, is known as a "call option". Someone who wishes to buy some stocks, bonds or commodities at a future date can arrange a deal with someone who has what they want to buy them at a specific price. The buyer can then pay the seller for the option to not buy.
The counter-offer Dad made, where he will buy the toy from the store at whatever price he can find it, then sell it to you for the agreed price, is known as a "naked call" in finance. It simply means that the seller, who is in this case offering the option to the buyer, doesn't actually have what they are agreeing to sell at the future date, and would have to buy it on the open market in order to turn around and sell it. This is typically done when the seller is confident that the price will go down, or won't go up by much, between now and the date of the contract. In those cases, either the buyer won't exercise the option and will just buy what they want on the open market, or they'll exercise the option, but the difference between what the seller is paying to buy the commodity on the market and what he's getting by selling it on contract is within the price he received for the option itself. If, however, the price of an item skyrockets, the seller now has to take a significant, real loss of money by buying something and then selling it for far less than he paid. If the item flat-out isn't available, the buyer is usually entitled to penalties for the seller's failure to deliver. If this is all understood by both parties, it can be thought of as a form of insurance.
Answer: In addition to all these great answers, check out the Wikipedia entry on options.
The most important thing to note from their definition is that an option is a derivative (and nothing about any derivative is simple).  Because it is a derivative, increases or decreases in the price of the underlying stock won't automatically result in the same amount of change in the value of the option.
Answer: So, child, your goal is to make money? This is usually achieved by selling goods (say, lemonade) at a price that exceeds their cost (say, sugar, water and, well, lemons).
Options, at first, are very much same in that you can buy the right to engage in a specific future trade. You make money in this situation if the eventual returns from the scheduled trade cover the cost of purchasing the option. Otherwise you can simply opt out of the trade -- you purchased the right to trade, after all, not any type of obligation. Makes sense? Good. Because what follows is what makes options a little different.
That is, if you sell that same right to engage in a specific trade the situation is seemingly reversed: you lock in your return at the outset, but the costs aren't fully realized until the trade is either consumed or declined by the owner of the option. And keep in mind that it is always the owner of the option who is in the driver's seat; they may sell the option, hold on to it and do nothing, or use it to engage in the anticipated trade. And that's really all there's to it.


What is so special about the 18mm focal length in kit lenses?

Question: Looking at this Wikipedia article, a huge portion of kit lenses start with 18mm
For example:
<code>18-55
18-70
18-135
18-200
</code>
Why?
Comment: The real question, is how the hell did marketers convince people buying an ILC that only one lens was ever necessary?
Comment: Possible duplicate of [Why do lenses for larger sensors tend to have shallower angles?](https://photo.stackexchange.com/questions/94090/why-do-lenses-for-larger-sensors-tend-to-have-shallower-angles)
Comment: Related: [Is there something special about f/3.5-5.6?](https://photo.stackexchange.com/q/42972/15871)
Answer: It's mostly because the standard zoom kit lens for film cameras would start at 28mm. This is the widest you can typically go before hitting the more expensive exotic glass.
The APS-C field-of-view equivalent for what 28mm on full frame looks like is 18mm. So that's what most kit lenses for APS-C sensor cameras use.  You'll note further down that list that for four-thirds gear, the kit lens starts at 14mm.  Four-thirds has a 2x crop factor, so a 14mm lens also yields the same equivalence as a 28mm on full-frame. And the kit lens on the Nikon 1 cameras, which have a 2.7x crop factor is 10mm, yielding very close to a 28mm FoV equivalence.
There's nothing magical about the number, just that it's the easiest wide angle to develop a low-cost zoom lens for.
Answer: By tradition we first fit cameras with a "normal" lens. Such a lash-up delivers an angle of view of about 45° when the camera is held in the landscape (horizontal) positon. This "normal" view is a attempt to duplicate how we humans see the world.
The 45° angle of view is achieved when we mount a lens with a focal length about equal to the diagonal (corner to corner) measure of the camera's fame dimensions. In your case, the frame measures approximately 16mm height by 24mm length. This size is known as Advanced Photo System (APS-C). The –C translates to classic format which is, the length of the frame is 1 ½ times the height.
Now the corner to corner measure of the APS is about 30mm. In other words, if we mount a lens with a 30mm focal length on an APS format, this lash-up delivers a "normal" angle of view.
If we mount a lens that is twice "normal" (60mm) or longer we are now in the realm of telephoto. If we mount a lens about 70% of "normal" or shorter, we are now in wide-angle territory.  This would be 20mm or shorter. In other words, a 20mm lens on your camera marks the beginning of the range of wide-angle.
As we mount shorter and shorter lenses on cameras we begin to encounter some technical difficulties. The first of which is, short lenses sit somewhat close to the imaging chip (or film). This is a problem because we would like some room to attach a swinging or semi-transparent mirror between lens and sensor. We are talking SLR (single lens reflex) design. A mirrorless design would be better. If the design is SLR, to mount a shorter lens, we must resort to extraordinary lens design to achieve the necessary back-focus distance. This adds cost.  Thus for an APS, 18mm is about the point of no return, making an economical wide-angle. Also, when the focal length approaches 18mm or shorter, we start to encounter other concerns like uniform coverage from edge to edge and distortion that will be distracting.  All and all, 18mm is just about right for a reasonably priced wide-angle.
By the way, doing the math -- Mount an 18mm and the angle of view is about 68° horizontal. Most often the angle of view quoted will be 77°, this is the diagonal angle of view, like buying a TV, you are quoted the diagonal measure, makes for good advertising verbiage.


Positioning on the bottom for iphone5

Question: I'm getting really confused here. My data picker is not positioning properly on the bottom of the screen. It's ok on 3,5' but not ok for 4'. I can't use autolayout. I hope the language won't get you confused. It's not relevant in this case.
This is how it looks on size: Freeform

And here is a screen from editor. Size: Retina 4 Fullscreen. Other settings not changed

And Finaly. This is how it actually looks on iphone5 simulator

What am I doing wrong here?
Comment: have you tried adjust the Autosizing?
Comment: what's the Autosizing settings on the superview of your picker?
Comment: the superview it's supposed to stretch on the whole screen
Answer: try this:
<code>somecomponent.frame = cgrectmake(0,320,somecomponent.width,self.view.frame.size.height-(navbarheight+statusbarheight+tabbar height))
</code>

Positioning on the bottom for iphone5


Is an Ethereum paper wallet generator considered a dapp?

Question: I made an Ethereum paper wallet generator. Is this considered a dapp as it can be downloaded and run without any central server to generate ethereum addresses? Or does a dapp have to be tied to a specific token of some sort? What are some good examples.
Answer: I would consider your app being a standalone utility.
Take a look at "What is a DApp?" for a pretty detailed description on what a DAPP is.


How can I get an alert when my battery is about to die in Linux Mint?

Question: This happens to me more than I'd like to admit, but sometimes I don't notice the power getting low since it only shows up in my status bar, then the computer just quits. I'd like a big alert that warns me before this happens. Is there any way for it to alert me? Ubuntu has a nice popup that tells you it's getting low.
Comment: @peterph I only have the "Power off" and "Hibernate" options.
Comment: Configure the power-manager from your desktop environment to do "something" - this can usually range from "nothing", over "run a command", to "hibernate"/"power off".
Comment: Which desktop environment?
Comment: @Renan running Cinnamon.
Comment: @TravisR sorry, I meant to say *configure the behaviour when critical battery level is reached*
Comment: @TravisR: Ah, since you're running Cinnamon, it's easy. You just have to add a 'spice' applet to a panel: http://unix.stackexchange.com/a/353505/37552
Answer: write a script!
battery_level=`acpi -b | grep -P -o '[0-9]+(?=%)'`
if [ $battery_level -le 10 ]
then
    notify-send "Battery low" "Battery level is ${battery_level}%!"
fi

then cron it to run every few minutes or so. But yeah, if you can do it through the GUI, that's probably a much better way of doing it.
Comment: This method has the advantage that it will apply to just about any distro/desktop environment combination with a little tweaking.
Comment: The best way I've found to 'do it through the GUI' in my Cinnamon environment is to add an applet to a panel: http://unix.stackexchange.com/a/353505/37552
Answer: re: hdgarrood 's answer, setting cron to run notify-send actually turned out to be painfully finicky. (I think crontab -e does persist across reboots by default, fortunately). I followed several guides, I'm not sure what exactly fixed it in the end, but here is my full setup for running the checker every 5 minutes:
$ crontab -e
*/5 * * * * sh /home/nrw/.notify-send_setup
*/5 * * * * sh /home/nrw/.battnotif

$ cat .notify-send_setup
#!/bin/bash
touch $HOME/.dbus/Xdbus
chmod 600 $HOME/.dbus/Xdbus
env | grep DBUS_SESSION_BUS_ADDRESS > $HOME/.dbus/Xdbus
echo 'export DBUS_SESSION_BUS_ADDRESS' >> $HOME/.dbus/Xdbus

exit 0

$ cat .battnotif
#!/bin/bash
export DISPLAY=:0
XAUTHORITY=/home/nrw/.Xauthority

if [ -r "$HOME/.dbus/Xdbus" ]; then
    . "$HOME/.dbus/Xdbus"
fi

battery_level=`acpi -b | grep -P -o '[0-9]+(?=%)'`

# I tried to only notify when not charging, but could not get it to work
# STATUS=$(cat /sys/class/power_supply/ADP1/online)
# if [ $battery_level -le 15 ] && [ $STATUS == "0" ]

if [ $battery_level -le 15 ]
then
    /usr/bin/notify-send -u critical "Battery low" "Battery level is ${battery_level}%!"
    echo 'batt low' >> /home/nrw/cron.log
fi

echo 'ran batt' >> /home/nrw/cron.log

Make sure to chmod +x the bash scripts.
Answer: With the help of all the information from all the answers here I created a script and put it in a repository on GitLab.
It'll show notifications when:

Your cable is unplugged and the battery goes below 30%
Your cable is plugged and the battery goes above 80%

https://gitlab.com/gitaarik/battery-health-notifications
Contributions to make it work on a wider range of environments are very welcome.
The script at time of writing this:
#!/bin/bash

# Run this script as a cronjob every 5 minutes or so, to get notifications when
# battery percentage goes below 30% or above 80%.
# Cronjob line example:
# */5 * * * * /bin/bash /path/to/battery_health_notifications.sh

# This line is to make notify-send always work, also when run in a crontab.
# https://askubuntu.com/questions/298608/notify-send-doesnt-work-from-crontab/346580#346580
export $(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ | tr '\0' '\n')

BATTERY_PATH=$(upower -e | grep battery)
LINE_POWER_PATH=$(upower -e | grep line_power)
BATTERY_PERCENTAGE=$(upower -i $BATTERY_PATH | grep 'percentage:' | awk '{ print $2 }' | sed 's/%//')
CABLE_PLUGGED=$(upower -i $LINE_POWER_PATH | grep -A2 'line-power' | grep online | awk '{ print $2 }')

if [[ $CABLE_PLUGGED == 'yes' ]]; then

    if [[ $BATTERY_PERCENTAGE -gt 80 ]]; then
        notify-send --urgency=critical "Battery optimization" "Battery reached 80%, unplug the power cable to optimize battery life."
    fi

else

    if [[ $BATTERY_PERCENTAGE -lt 30 ]]; then
        notify-send --urgency=critical "Battery optimization" "Battery is below 30%, plug in the power cable to optimize battery life."
    fi

fi

Answer: I do now run the following:
$ crontab -e
*/5 * * * * /home/<my username>/bin/checkLowBattery

$ cat /home/<my username>/bin/checkLowBattery
#!/bin/bash

POWERSUPPLY="/sys/class/power_supply/ACAD/online" # could be different on your system!
TOO_LOW=20 # how low is too low?
NOT_CHARGING="0"
ICON="/usr/share/icons/ubuntu-mono-dark/status/24/battery-low.svg" # eye candy

export DISPLAY=:0

BATTERY_LEVEL=$(acpi -b | grep -P -o '[0-9]+(?=%)')
STATUS=$(cat $POWERSUPPLY)

if [ $BATTERY_LEVEL -le $TOO_LOW -a $STATUS = $NOT_CHARGING ]
then
    /usr/bin/notify-send -u critical -i "$ICON" -t 3000 "Battery low" "Battery level is ${BATTERY_LEVEL}%!"
fi

exit 0

As you can see this is just orangenarwhals code with some changes:

no dbus trickery, somehow I didn't need it
put some "constants" into variables at the beginning of code
implemented warnings only when battery is not charging (take a look at man test, it explains how to do ANDs, among other things.)
added icon (find some candidates on your system with something like: $ find /usr/share/icons/ -iname "*batt*low*")
expiry-time in milliseconds

don't forget to chmod +x your scripts, you can then run them directly from cron(tab), no need for sh.
(This works on Ubuntu using Xmonad.)
Answer: Since you're apparently running Cinnamon, just install Battery Applet with Monitoring and Shutdown (BAMS).
Right-click on a panel → + Add Applets to the Panel → Available applets (online), type 'BAMS' in the search widget, and install and configure it.
It's not the flashiest, but so far it's already alerted me when I had my laptop unwittingly unplugged.
Answer: Minor twist - on Knoppix (granted, not Mint as used by OP) notify-send wasn't available (libnotify-bin package is not installed), so instead I found this useful for the alert:
xmessage Battery low & mplayer /usr/lib/libreoffice/share/gallery/sounds/beam.wav

I just threw that into the Alarm Command of the Battery Monitor panel of LXDE, no need for a script.
That assumes you have LibreOffice installed, but that .wav makes a nice low power sound.  There are practically no .ogg's on Knoppix.
Comment: one might also have nicer `zenity` instead of `xmesssage` and `aplay` instead of `mplayer`
Answer: This simple one works nicely for me, with just simple acpi package needed to be installed (no deamons, specific desktop enviroments or the like).
In your user crontab (crontab -e) put the following (all in one line, it is split for readability here):
*/3 * * * * acpi --battery |
    awk -F, '/Discharging/ { if (int($2) < 15) print }' | xargs -ri
    env DISPLAY=:0 zenity --warning --text "battery low\n{}"

What it does is check battery level (acpi --battery) and if you're not connected to charger (/Discharging/) and if battery is < 15%, it will every 3 minutes (*/3) display message via zenity to bug you.
Instead of zenity you could instead use xmessage (on really spartan machine) or even something like aplay -q /usr/lib/libreoffice/share/gallery/sounds/cow.wav for audio notifications (which have advantage that it will won't interrupt your keyboard typing, and will work even for multi-user laptops with multiple sessions, where DISPLAY=:0 hack would fail)
If you also need to suspend/hibernate machine on certain critical level, see this answer
Answer: I had that same problem and I figured out a workaround. I installed from Linux Mint repositories an app called GKrellM. It monitors lots of stuff on your machine and there is battery. Setup with alarms, it works for me like a charm.
more info at:
http://www.gkrellm.net/
Comment: GKrellM didn't work for me.
It is too old and the notification system doesn't work properly.
Answer: The issue is related at KDE environment. I have the same problem with MintMAYA KDE_version. When I worked with Mint9_Gnome a very useful pop-up appeared when a certain level of low-power was reached (auto-configured out_of_the_box on fresh installs). Very very annoying being shutted down without advice and no help founded even googling a lot :(
Answer: I have the same issue and it's really frustrating.
I solved by using the BatteryAlert.sh script:
#!/bin/bash

BATTERY=$(upower -e | grep 'BAT')

while :
do
    BATTERY_PERCENTAGE=$(upower -i $BATTERY|grep percentage|awk '{ print $2 }'|sed s/'%'/''/g)
    CABLE=$(upower -d | grep -n2 line-power | grep online | awk '{ print $3 }')

    if [[ "$BATTERY_PERCENTAGE" -lt "10" && $CABLE = "no" ]]; then

        notify-send --urgency=critical "WARNING: Battery is about to die"  "Plug in the power cable"
        play /usr/share/sounds/KDE-Sys-Warning.ogg &> /dev/null
    fi

sleep 10

done

I'm using KDE but you can use it with every desktop environment. You don't have to run this as root user or go crazy with crontab syntax.
You need only to change the notification sound if you want a sound alert. If you wan't to start the script automatically when the desktop environment starts put the script in $USER/bin folder with the BatteryAlertLauncher.sh script:
#!/bin/bash

function getRunningProcesses
{
    ps -aux | grep -v grep | grep BatteryAlert.sh
}

if [[ -n "$(getRunningProcesses)" ]] ; then
    exit
fi

BatteryAlert.sh&

Make sure that they are executable:
chmod u+x $USER/bin/BatteryAlert*

Then just run the following command:
ln -s /home/$(USER)/bin/BatteryAlertLauncher.sh .config/autostart/

You can also run the alert script manually from bash by entering this command:
BatteryAlertLauncher.sh

Answer: As I don't have Gnome Shell or Cinnamon installed, I cannot be of direct help as accessing the source could would be much practical since it's rather easy adding such a rudimentary extension with JavaScript.
You should open :

/usr/share/cinnamon/js/ui/status/power.js

and search for percentageText - subsequently, you ought to be able to add a pop-up message or alert.
Comment: Interesting, didn't know this stuff is in javascript. But no /status directory and no power.js I can find anywhere in the /cinnamon/js directories.
Comment: Have you tried to search for it from root using : `find / -type f -name power.js`
Comment: Ran that, nothing found.
Answer: This is how I did it on my Arch linux with Gnome as DE:
#!/bin/bash

eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)";
battery_level=`acpi -b | grep -P -o '[0-9]+(?=%)'`

STATUS=$(cat /sys/class/power_supply/ACAD/online)
if [ $battery_level -le 15 ] && [ $STATUS == "0" ]
then
    /usr/bin/notify-send -u critical "Battery low" "Battery level is ${battery_level}%!"
fi

The word ACAD in STATUS=$(cat /sys/class/power_supply/ACAD/online) will change depending on the laptop make. It is used to find if your lap is plugged in to a AC ADapter or not. Here is how my crontab looks like:
* * * * * bash <path to script>

Don't forget to make the script executable with chmod u+x <path to script>
Answer: Download  an  applet  called  BAMS . It  will  alert  you  automatically when  the  battery reaches  a certain level decided  by  you . It is  the  simplest solution.
Comment: I can't find this as an apt package. To which applet are you referring?


How can I render extremely large models?

Question: I'm trying to build a game in Unity similar to the game Kerbal Space Program where there are large celestial bodies that the player can orbit. I'm running into a few problems though. My first issue is that the larger I make a sphere, the slower the game gets. Secondly, whenever the sphere exceeds a certain size, the rendering engine cuts off part of the planet, which means I can only see half the model. How can I do this at the size that KSP has?
Answer:
which means I can only see half the model

You can never see the "back" half of the model :P
The following is a high-level overview listing some of the LOD considerations for this type of game. 100% of it may not apply to your game and/or KSP. Also, I haven't specified any implementation details for Unity, since I don't know them yet; rather than define each rendering method, I've described how you'll need to be able to transition between a number of different methods, all geared toward reducing as much of the scene to quads as possible.
Bill-boarded impostors:
An impostor is a stand-in for the real thing; in this case, a celestial body. In graphics, a bill-board refers to a quad that is continuously reoriented such that the quad's face-normal is always pointing directly toward the camera; their full width and height are equally observable from any angle.
Very, very, near:
As you approach the surface of a planet, it starts to look "flat". While landing, transition from sphere rendering to quad rendering. This is, essentially, a first-person-shooter camera/perspective (fog near the far-plane). When leaving the surface, transition back to the sphere; "up" starts to become arbitrary, the fog vanishes, atmosphere glow appears, the "sky" becomes black. The height at which you begin the transition may be different, per-object/planet. As you continue to move away from the object, its' textures can transition to progressively lower mip-levels; the sphere geometry begins to produce less detail than a mipped bump-map would.
Near:
When the object's details start to become indistinguishable because of mip and/or size, switch to billboards. Update more-distant bill-boards, less-often; this reduces the number of spheres rendered per-second in favor of quads that look like the rendered spheres. Essentially, you "cache" the close-up, full-detail, sphere to an off-screen texture every now and then, and just pick a mip out of it that looks "good enough" based on the increasing distance from the camera when you render each billboard. The camera used to render the sphere to the bill-board is set up a little different than the normal one. When approaching a planet, the reverse applies; the mip level increases, bill-boards are updated more, and more, frequently and you move from the bump-map back toward the displacement-map.
Distant:
At some point, the majority of the remaining details will be lost and/or compressed to a very small number of pixels. At this point, you can get away without texture sampling and just output a "star-like" color, possibly with a hint of the atmospheric hue.
Very, very, distant:
Regardless of composition, very, very, very distant objects are usually rendered as (approximately) white dots, or not at all. A large planet might look like a star when it's somewhat near, but will be mostly indistinguishable next to the parent star's overwhelming relative magnitude. Pseudo-random "twinkling" of the dots gives the illusion that very distant things are happening. You can render the dots to another off-screen texture and apply it to a sky-box/sphere that follows you around. Since it contains only the most distant objects, you won't need to update it very often.
Comment: +1 for "You can never see the back half of the model". :)
Answer: The issue is that you need a LOD algorithm.  LOD stands for level of detail and it means essentially your sphere is only as big as it needs to be in each situation.  When you are far away it uses fewer polygons. When you are zoomed in close, maybe only part of the sphere is in memory, and that visible section has a lot more detail than usual.  There's lots of LOD techniques out there that might help you (:
Comment: Do you know any examples or a few tutorials that could get me started with this?
Comment: Yeah I found a ton when googling "unity level of derail tutorial", go check em out!
Comment: since yu referenced ksp , try this https://www.youtube.com/watch?v=mXTxQko-JH0 at minuute 30


REST Web Service: Acceptable HTTP response content-type when responding with status 4XX (Client Error)

Question: I have been unable to find any documentation in the HTTP specifications that govern whether it is acceptable to generate a HTTP response include a human readable error message (e.g. content-type: text/plain) if an HTTP client has made an invalid HTTP request, and specified a request header that limits the acceptable response content types using an accept header.
Imagine a REST web service client issuing an invalid GET request to "http://myhost/validpath?illegalRequestParameter=rubbish", and including a request header "Accept: application/xml" or "Accept: application/vnd.ms-excel".
The server would respond with an HTTP status code in the 4XX series ("400 Bad Request", in this case). But how would the service be able to convey information to the client about the cause of the error?
I see the following options:

Create a plaintext error message in the HTTP response content.
Set response header "Content-type: text/plain" and include a descriptive error message in the response content. This would, however, break the HTTP client's "Accept" restriction.
Don't include a HTTP response content.
This is clearly valid, but not very helpful to the client that just knows that a "Client Error" occurred but has no way of knowing why (and reporting the reason in a client log file).
Try to coerce an error message into an "Accept'able" MIME type.
This is rarely possible. Even if the error message could be constructed as a valid application/xml type, it would likely break a web service contract (e.g. XML Schema conformance).

My question is: Is the above situation governed by existing HTTP specifications/standards?
References:

HTTP Status Code Definitions: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
HTTP Header Field Definitions http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Answer: If the accept header is 'application/xml', then you should return your error message as xml. It will break the client, but that doesn't matter, the client isn't getting the information they requested anyway. At least the client is able to parse the error message...


Is it correct to think of forward kinematics as merely a 'check' for the inverse kinematics?

Question: When the only inputs to your robot are the next x,y,z coordinates of the next point on and on, I can simply just calculate IK to find the angles and make my actuators move to these angles. Whats the point in calculating forward kinematics in this case? does it merely act as a check for your inverse kinematics integrity? (this shouldn't be accurate because I don't think an analytical solution of the IK will have errors). I see no purpose in calculating the forwards kinematics in this application.
Comment: Great answer @ManuelRodriguez! Why not make it a real answer instead of a comment so we can up vote it.
Comment: Forward kinematics better known as forward simulation, models a problem in software. In case of a kinematic chain the model is equal to describing the link structure. With the model it is possible to answer what-if questions like "what happens, if servo #1 moves to the left". The inverse kinematics is less important. It is similar to an inverse model for finding a solution for a problem. The inverse model can answer a problem like "what is the angle of each joint, if the end effector should reach (200,150)".
Comment: You, Ben, asked me, if i should remove my comment and write the text into a formal answer so it will extend the list of existing answers to this question?
Comment: Welcome to *Robotics* Manuel Rodriguez. Comments are for helping to improve questions and answers, and are distracting, so we try to keep them to a minimum. Partial answers, or answers you aren't confident about should still be posted as answers, since they can be improved by future edits. Comments should be considered ephemeral, any comment which no longer actively helps to improve a question or answer may be deleted at any time to *tidy up* a post.
Answer: You can control the robot using just the inverse kinematics solution.  However, you must be careful to handle the multiple inverse solutions properly (for example, $acos(\theta) = acos(-\theta))$.  Forward kinematics can help you visualize the selected solution.  They are also helpful when building a graphical simulation of the robot.
Answer: The forward kinematic will become useful e.g. if you want to compute the working envelope of your robot.
Answer: If you think of classical Jacobian-based methods for IK (still representing the majority), then you ought to consider that they make use of forward-kinematics (FK) maps internally in order to compute the error in the operational space as well as the Jacobian itself, which is actually a differential FK law.
In particular, the IK method based on Jacobian pseudo-inverse generates iteratively joint velocities profiles $\dot{q}$ that drive the system toward the target. In formula:
$$
\begin{cases} e=x_d-f\left(q\right) \\
\dot{q}=J^{-1}\left(q\right) \cdot \left(\dot{x}_d+Ke\right) \end{cases},
$$
where $x=f\left(q\right)$ and $J=\partial f/\partial q$ are the standard and differential forward-kinematics maps, respectively.
This reasoning and/or considerations apply also to other IK methods.
Answer: Forward kinematic has many uses, but for your case YES it can be used "merely" as a check.  However the check is probably redundant since most IK solvers will give you some kind of residual which indicates the quality of the solution.
Answer: If you have the next target position you can convert that in joint space and make a PTP or point to point type motion and there is no need for forward kinematics.
The forward kinematics is crucial when geometrical contraints to the path are considered, e.g. a circular motion (CIRC), linear motion (LIN) or spline motion (SPLINE). Usually these are set also with a desired speed. In this case converting the current joint space coordinates to cartesian space and computing the trajectory (incl. velocity and acceleration) from the current end effector coordinates to the target in cartesian space will assure that the set parameters (path shape and target velocity) will be (more) precisely executed.
Also in the case where robos are programmed or operated (monitored) it is useful to know what the current cartesian coordinates of the end-effector is. This is done by calculating the forward kinematics. For determinig the current velocity of the robot differential forward kinematics are used.


Is it okay to never accept any answer?

Question: I just joined MathSE and it's beautiful here, except for the fact that some unregistered users ask a question and never come back. Most of the time these questions are trivial, though they still consume answerers' (valuable) time which never gets rewarded. I thought it was okay until I saw someone's profile with the following statistics: active $1$ year $7$ Months, $0$ Answers , $72$ Questions, $0$ accept votes. Yes, I agree that the answers are up-voted in this case but is it really okay to never accept any answers?
Comment: Perhaps you can leave a comment in one of his/her questions and state that "Accepting an answer" is a form of gratitude. While the person is free not to accept any answers, it is possible that he/she simply does not know about "accept" functionality. So, notifying the user would be a first step.
Comment: Regarding @Prism's comment, I note that I actually have encountered a few people who appeared to be genuinely unaware of the possibility of accepting answers and seemed to be grateful to learn.
Comment: @Prism $\mathbb R$eally I knew about this functionality before joining SE!
Comment: We even have a [comment template](http://meta.math.stackexchange.com/questions/4925/list-of-comment-templates/4945#4945) which can be simply copied and used in a comment to let the user know about possibility to accept answers.
Comment: You say "they still consume answerers' (valuable) time", but this isn't true. No question can consume the time of anyone who doesn't want to answer it. If valuable time is being wasted, the responsibility should be on the person who had the last and best chance to avoid that, which is the person who answered the question.  But that person decides for themselves what to do with their time, and it is presumptuous of you to tell that person they are wasting their time.
Comment: Perhaps because you have visited other threads in Math.SE and have browsed the website more frequently? It is totally conceivable to me that a person comes to Math.SE and asks a question, gets answers and leaves. And then repeats for 72 times. So they could just be unaware of the fact that one can accept answers.
Comment: Never blame commission when omission is a reasonable possibility...
Comment: There's a big difference between an unregistered user who asks one or two questions and never comes back and someone who asks roughly a dozen questions a month and doesn't accept any answers. Not much you can do about the former, but quite a lot you can do about the latter.
Answer: No, it's not OK to post 72 questions, get useful answers, and not accept any of them. I would hope some moderator would take this user aside and explain a few things about how this site works best.
Answer: It is okay to not accept any answers if they haven't really clarified what you were trying to solve. You're under no obligation to give people participation points. If the answers lead you to understanding the problem, you should always accept. In this particular case I think the fact that they have asked 72 questions implies they have gotten useful answers or else why would they come back, and thus they should be accepting more answers. I suggest you send them a message
Answer: Regardless of the gratitude argument, accepting answers makes the sites questions easier to sift through. When there are questions that don't have accepted answers, people are more inclined to use their time to peruse the question and answers. If then they have wasted their time due to there being one or more perfectly acceptable answers, that is a loss to the site. That user could have been reading over another question which needed attention. Therefore, more users get to more questions and hopefully add helpful answers.
Of course there are question with answer that some people will be interested in reading even with or without accepted answers, but I am not speaking of those question that speak to someone's interest or speciality since they aren't wasting their time in that sense.
Answer: I think this question can be interpreted in two ways.
One is Is it morally acceptable/ethical/polite/whatever to rarely accept answers?
The other is Do the rules allow people to rarely accept answers?
The answer to the second question is 'yes, people are not forced to accept answers' and moderators shouldn't be able -with the current rules - to punish them if they choose not to accept answers.
My answer to the first question is 'no, it's not acceptable'. Surely when the number of answered questions isn't small, there must be some instances in which the asker can pinpoint  an answer which helped him more than all others. The acceptance feature exists precisely for this occasions. Users aren't obligated to accept. You're not obligated to thank someone who holds the door for you either, but you most likely do.

Martin linked linked the following template.

After you ask a question here, if you get an acceptable answer, you should "accept" the answer by clicking the check mark ✓ next to it. This scores points for you and for the person who answered your question. You can find out more about accepting answers here: How do I accept an answer?, Why should we accept answers?.

I choose not to use it because of the word 'should' which may be perceived as entailing rule-wise obligation, which isn't the case.
Instead I use the following which simply forwards the reader to informative aspects of answer acceptance. (I frequently replace the first sentence with "I see you're a new user", when it is appropriate).

You have a low answer-acceptance rate. Please read about accepting answers here and here.

You have a low answer-acceptance rate. Please read about accepting answers [here](https://math.stackexchange.com/help/accepted-answer) and [here](https://meta.stackoverflow.com/questions/5234/how-does-accepting-an-answer-work/5235#5235).
The reader can then decide for himself whether to accept answers or not and similarly I can then decide whether to hold back answers or not. In the past I've rewarded users who, after being told about answer acceptance, accepted answers to their previous questions, by giving a full answer.

I would even like to see the answer acceptance rate back and restrictions imposed on users who have a low acceptance rate. Those rare cases of users who genuinely can't choose what answers to accept in a large number of questions, for whatever reason, can be dealt with (I mean forgiven by) the moderators.
Answer: Seventy-two questions without any accepted answers? Guess I'm not answering any of your questions....
Being serious, accepting answers shows gratitude for the answerer that helped the person asking the question the most. If people don't accept answers, the answerers may be discouraged from answering because they think that their efforts will be for naught. They do not have any sign that the person asking the question has even read their answers. Accepting answers essentially tells answerers, "I have read your answer, and I have found it to be the most useful. Thank you for your answer."
I also hope that you have been upvoting/downvoting as well, as this also provides feedback for answerers.
Comment: It's not about me.
Comment: @JChau FYI, Integrator has not *asked* a single question, but has provided many high-quality answers.
Comment: @Integrator Oh la la! You need to start voting! For if you don't vote nor accept answers, how would answerers know if you had even read their answers?
Comment: @anorton I had to read the question again to realize that.
Answer: No, it's not okay, except under very special circumstances.
These are the special circumstances I can think of, in rough order of likelihood:

You ask a lot of questions but get no answers at all to any of them.
You ask a lot of questions but get only one answer on each question. The one answer gets more than two upvotes each time, so you're not worried about giving the extra 15 points, plus you worry someone might come along with a better answer and you'd look rude if you unaccepted the answer you originally accepted.
You ask a lot of questions and get more than one answer but all the answers casually invoke advanced and/or esoteric concepts beyond your comprehension.
You get locked out of your account (e.g., forget the password) before you've had chance to think about which answer is best.

I seriously doubt any of these apply to the fellow who's asked more than 70 questions in the past few months.
Answer: Yes, it is okay to not accept answers. Acceptance is a form of vote: this site has upvotes, downvotes, accept-votes,  close-votes, delete-votes, etc (availability depends on reputation). Some users choose to not use some or all of categories of votes: e.g., never downvote, or never accept, or never vote at all. They are free to do so.
Comment: They are free to do so on any individual question, of course. But I see it as impolite, in general, to never accept answers, because accepting answers is a key part of the way the site is meant to operate.
Comment: We used to have a stat called "percent accepted," which the elders of the site felt wise to remove.  That said, if I have been burned by a user who takes my answer happily and does not accept (and some have even thanked me in a comment without accepting), I will out that user in comments to subsequent questions.  "Hey, why have you asked 40 questions and have accepted no answers?  If the answers here are so bad, why are you still here?"  I have done this.  It may seem petty, but as Carl says, this site depends on the decency of its users.
Comment: @Carl Mummert Arguably, up/down voting is more important to the way the site operates than accepting. Yet, we don't go around posting templated comments "you haven't voted in the last month, what's up with that?"

Is it okay to never accept any answer?


What kind of insulation should we put under new tin roof?

Question: We live in an old long leaf pine farmhouse that has no insulation in it.  We are going to be putting a new metal roof on the house.  The attic of the house was made into living space and so there is really no attic space between the upstairs ceiling and the roof itself; just the depth of the 2x4 roof rafters.  We are concerned with several aspects of this project.  Want the best insulation material that will help to cool down the house as we live in Texas. The roof currently has shingles on decking.  They are going to remove the shingles and put on 30# felt paper and we want to know can we put insulation on top of the decking and install the metal roof directly over the insulation into the roof decking?  The roofers are stating that you need 1 x 4 lattice and then putting the insulation between the lattice.  Another concern is about the insulation possibly getting moisture on it??  Is a radiant barrier something else that needs to be added or does some insulation come with a radiant barrier reflective sheet as part of the insulation?  Just looking for a good unbiased opinion from someone else.  Thank you so much for your reply.
Comment: 2x4 rafters? That seems undersized for a roof
Answer: You can install insulating foam panels directly to the existing roof membrane (decking). The panels are backed with OSB wood panels (the OSB would face out/up). So basically it would be roof decking, then foam insulation, than bonded OSB wood decking. Over it all you would place roofing felt and roofing material. Check out this short video.