Is there any information that tells the last action of membership record (edit or renewal)?

Question: I'm going to write a hook to distinguish a saved membership record, how do I know the last action of saved membership record is edit or renewal?
Answer: CiviCRM keeps track of membership changes in civicrm_membership_log table for all changes to membership attributes like start date, end date, status. But it will pretty difficult for you to guess if the membership is actually being renewed or updated unless you perform some more checks with different log entries from civicrm_membership_log table.
The other and most easiest/convenient way to know renewal or status change is through Activities. CiviCRM create different activities for membership when a membership is added, renewed and status/type is changed etc(see in attached image list of Activity types for membership). So it will be easy to use post or pre hook on Activity to guess the context.
HTH
Pradeep
Comment: Thank you so much. Before I post this question, I decided to use your second method. But, I worried about the data integrity because I'm not sure that pre and post hook perform in same db transaction.
Comment: Depends on the requirement.
Answer: CiviCRM keeps log tables that document changes to core tables like civicrm_membership. They're all prefixed log_, so in this case you could look for the newest row in log_civicrm_membership for the relevant contact_id and/or id (id being the membership ID from the core table).
That might contain enough data to help you distinguish between the two cases you describe.


What do you call the main part of a joke?

Question: If I start a joke with a question, then answer it as part of a joke. What is the answer of the joke called? Is there a specific term for it? I am pretty sure there is, but can't remember what it was. Also, what if the main part of the joke isn't an answer? What would it still be called?
Comment: Previously at EL&U, *[What is the first part of a joke called?](https://english.stackexchange.com/questions/74406/)*
Comment: Can you provide the context for believing that there is a single word that would mean just this?
Comment: This question would have benefited from **an example**, as would almost all questions on this site.
Answer: I'm not sure if it's the 'main' part (after all, the setup is just as important) but you're probably looking for the phrase punch line (also spelled as a single word punchline):

the sentence, statement, or phrase (as in a joke) that makes the point

(source: Merriam-Webster)
It's often used for jokes which are like short stories; I'm not entirely sure if it applies to Q&A jokes as well (I'm not a native speaker).
Comment: And for the record, the first part of the joke also has a name: The "setup".
Comment: To build on what JMac said in reply to @Glorfindel. "Punchline" and "setup" don't even have to refer to words at all and can apply to jokes that are entirely non-linguistic. When someone says "Pull my finger", that is the setup, and the ensuing fart is the punchline.
Comment: @Glorfindel I can't think of any rule that absolutely defines what counts as a "line" in English (or the origin of "punchline").  Presumably, if it's anything like scripts, what constitutes a "line" has nothing really to do with how many words the line is.  Also, I would say a single word can still be a statement, so it can fit your definitions still.
Comment: I'd say Q&A style jokes are some of the easiest to determine what the punchline is.  For a simple example, in "Why is six afraid of seven?", you would call "Because seven eight nine!" the punchline because you could say it is the sentence/statement/phrase that makes it a joke.
Comment: For example if you go to a ball, there would be a line to hire a tuxedo, a line to hire a car, a line for the girl you want to ask out but hopefully there won't be a punchline.
Answer: The other part (which may be the long part, so it may count as the "main" part to some) is the Setup.
I found a Glossary of Comedy Terminology, if you have other humor-related questions.

I re-read and saw you were answering about the "punchline" area -- I think it's not so much that this second part is an "answer," but that it typically changes/challenges the audience's assumptions.
In the one liner: "Take my wife... please!" the assumption at the start is "I've got a good example about someone who does something stereotypical, my wife."  But then with the "please!" it changes from an introduction to a longer section, to a direct, imperative command.  Take her. Now. Make her go away.  It's not pretty, but it's a change-in-direction, and that's what made it "work."
Some related terms from the Comedy Glossary that may help identify these parts of the joke:

Decoy Assumption - the misdirecting assumption in a joke's setup which creates the 1st story and is shattered by the reinterpretation.
Connector - at the center of a joke, the one thing perceived in at least two ways.  One way of perceiving it constitutes the decoy assumption; the second way of perceiving it reveals the reinterpretation.
Shatter - with reference to joke structure, the point at which the  audience realized that their assumption is incorrect.
Punch or Punch Line - the second part of a joke that contains a reinterpretation that creates a 2nd story that shatters  the setup's decoy assumption.
Reveal - within the punch, the pivotal word, phrase, or action that exposes or presents the 2nd story's reinterpretation.
Tag or Tag Line - an additional punch immediately following a punch that does not require a new setup
Answer: As everyone else has said, the bit at the end that (hopefully) causes the audience to collapse in fits of laughter is known as the punchline.
If it's a more lengthy humorous story with lots of funny bits, but either a weak punchline, or no punchline, or a more serious point at the end treated lightly by what came before, then the whole thing may be a shaggy dog story, which Wikipedia defines as:

an extremely long-winded anecdote characterized by extensive narration of typically irrelevant incidents and terminated by an anticlimax or a pointless punchline.
Answer: Edit: I didn't properly read what Glorfindel said, but he's right. My bad, sorry.
I would say this is still called a punchline: https://dictionary.cambridge.org/dictionary/english/punchline
"The last part of a story or a joke that explains the meaning of what has happened previously or makes it funny".
It's usually what finishes off the joke and makes people laugh.
Answer: My first thought was "it's a call-and-response joke."  If you wanted to go with that, your answer would be: the response.
I had a similar question, "what do you call this type of joke?", which led me here.  I think I found the best answer to that buried in this fascinating Wikipedia entry which refers to this article, This Tablet From 1,500 B.C. May Contain The World's First "Yo Mama" Joke: a riddle.
Depending on the context, you could refer to such a joke as a "yo mama," a "what do you call a this who that," or a "what do you get when you" joke.  To get academic about it, you could go with an "interrogative," an "interactive interrogative," a "Q&A," or (to get ridiculously meticulous about it) a "Q&RQ&A" ("question, response question, answer") joke.  For example:
Q: What do you call a person who comes up with a question similar to yours, uses it as a search string, finds this thread on StackExchange, and pounces on the opportunity to procrastinate?RQ: I don't know, what do you [etc.]?A: Obsessive compulsive!
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Comment: How is my response unclear?  I believe I answered the question in my first paragraph.


Is it possible to customize CrashDialog in Crashlytics?

Question: I am using Fabric Crashlytics in my app. And I need to display my own crash report dialog while my app is catching crash. I didn't find any mechanisms of how to do that with the help of stock Crashlytics dialog. I need to display my own dialog because I need to collect users emails to get from them feedback according crashes
Answer: I think that it's not possible to customize the dialog but in the Firebase console under crash section you can spot easily who the crash belongs to.
You only need to set User Id and/or User email
Doc https://firebase.google.com/docs/crashlytics/customize-crash-reports#set_user_ids
Once you get the email you can contact the user directly.
Hope it helps!
Comment: Thanks for the answer) Sorry, but I am using Fabric IO Crashlytics console. And I din't find there such params
Comment: The sdk should be the same ... Only different UI where you can find the user email.


What's the meaning of these Shakespearean English sentences being used in here?

Question: Source

Cleopatra, Othello, Romeo and Juliet, they all blend in because forsooth here that whole dying for love or killing for love business is verily a sweet sorrow. A special shout out also to the witches; we love them three.
Later it's all a great help at the workplace – there's daggers in men's smiles, you're alerted.
Comment: +1 for context but could you at least show (that means include a link) that you looked up the words *forsooth* and *daggers* and have understood what they mean? Thanks.
Answer: Have you ever heard the expression "to name-drop"?  You "name-drop" if you like to add certain famous people's names to a conversation to add to you own reputation.
A similar activity is to selectively throw in quotes, particularly Shakespearean quotes, to try and impress other people with your education and intelligence.  Sometimes it works, but usually only if you do it selectively and use a quote perfectly appropriate to the context.  It doesn't work well if you toss in quotes willy-nilly, like too many croutons in a salad.
In this case the quotes are inappropriate and sprinkled liberally in like croutons, but I can't tell if the author is trying to be funny or trying to make fun of Indians who are too fond of Shakespearean quotes and use them out of context.  It could be subtle satire, or it could just be bad writing.


Can i create custom content type without define .yml file in module?

Question: Sorry for my bad english grammar.
I write a module, allows the user to upload a file that contain list of content types infomation. Then my module will auto create content type for user.
But i don't know how to create content type without hard define many .yml file.
Answer: If your content type is fairly straight forward (i.e. using only Drupal's fields), you can create the content type within the http://localhost/admin/structure/types/add link and once you have it built the way you want it you can export it via: http://localhost/admin/config/development/configuration/single/export.
It will even give you the name of yaml file to boot!
If that avenue is not sufficient then you can follow: This tutorial about building custom drupal content entities; it is lengthy in nature, which is why I will elide the details.
And if you're going to use that tutorial, then I would suggest using drupal console to generate the boilerplate code for you.  It makes things quite simple.  Drupal Console, among other things, manages the generation of content entity boilerplate code.  It is quite helpful.
Comment: tks u!
I know that way to create content type.
But i has found programmatically to create by use $new_bundle = NodeType::create() and $new_bundle->save().
btw, tks for your anwser!.


Changing the color of \alert command in Beamer

Question: Is it possible to change the color of <code>\alert</code> command in beamer. See, it is not the alertblock!
For example, I would like to change to color yellow, because the standard color is red, and my background is dark blue.
Comment: Please, have a look to the manual: 17.2.3 Setting Beamer's Colors explains in detail such a task.
Comment: Note that it is fine to accept your own answer. You won't get any points but it will mark your question as solved.
Answer: I found, the command is
<code>\setbeamercolor{alerted text}{fg=yellow}
</code>
I was think this command changed only alertblocks.
I'm sorry by your time here. Thanks


How do I in some way save a texture (with borders, effects and all) in Illustrator?

Question: I have multiple objects that will have the same color, border color, brush and texture (with texturizer). How can I either save this as some default style, or copy everything from one object to another? The eye dropper will only copy the colors and not the texture and brush...
Answer: I think you'll want to use the Graphic Styles panel in Illustrator.

The first step is to create a template object that has the color, border color, brush and texture that you want all of the objects to have.

Next, drag that object into your Graphic Styles panel.

Then, select the target objects you wish to look like your template object.

And lastly, with those target objects selected, just click the style you created from the Graphic Styles panel.


Recreational mathematics to create sense of mathematics

Question: Recreational mathematics serves as a valuable educational tool by enhancing interest, fostering engagement, and refining mathematical thinking. While it often falls outside traditional curricula, innovative approaches can significantly benefit students. For instance, to grasp binary numbers, educators can employ interactive methods like Magic Cards, prompting students to identify missing numbers. Exploring puzzles, such as determining the minimum door openings to label switches for 100 bulbs without touching them, offers a playful yet instructive way to delve into mathematical concepts.
What other examples you would suggest relevant to other topics in mathematics?
Comment: Please  note that according to the way I have understood, Recreational mathematics is a subset of mathematics that focuses on engaging and entertaining mathematical concepts, often involving puzzles, games, and creative problem-solving. It diverges from the broader field of mathematics by emphasizing enjoyment and exploration rather than formal proofs and rigorous theory. I hope you too agree with that and your agsuggestions would also be associated with the same idea.
Answer: Personally, my most enjoyable and productive mathematical experiences while growing came from toy research projects. Some examples:

When I learned about partial fractions decomposition in high school, I wondered if I could come up with a formula for the coefficients $c_{jk}$ in the partial fractions expression of $$\dfrac{b_0 + b_1 x_1 + b_2 x_2 + \cdots + b_n x^n}{(x-a_1)^{k_1} (x-a_2)^{k_2} \cdots (x-a_m)^{k_m}} = \sum_{j=1}^m \sum_{k=1}^{k_j} \dfrac{c_{jk}}{(x-a_j)^k}$$ by writing down and solving the system of equations in the general case, and also conducting numerical experiments to look for relevant patterns that I could prove and leverage in helpful ways. This turned out to be a very difficult and messy project but I did obtain one reasonably neatly-packaged result, $$\dfrac{x^n}{(x-a)^k} = \sum_{i=0}^{n-k} \binom{n-1-i}{k-1} a^{n-k-i} x^i + \sum_{i=\max(k-n,1)}^k \dfrac{\binom{n}{k-i} a^{n-k+i}}{(x-a)^i},$$ and proving it gave me my first experience with double-induction.

In my first year of college I got interested in neuroscience and I wondered if it was possible to, given a network of neurons, work out how the network's connectivity will change if you pick one neuron and repeatedly "activate" it with a pulse that ripples through the network. (Whenever two neurons activate, the connection strength between them changes according to known biological learning rules -- the simplest and earliest-discovered rule is "what fires together wires together," known as Hebbian learning, but since then more nuanced rules have been discovered like spike-timing-dependent plasticity, which takes temporal directionality into account.)

Similar to the previous problem, my approach was again a combination of working out math by hand and also running computer simulations to look for helpful patterns. The problem was again very difficult and messy, but again I really leveled up my skills by grappling with it and I discovered plenty of interesting things along the way.

More info about these and a ton of other projects can be found here: justinmath.com/old-projects
They were a lot of hard work, and I can't say that any of them were academically successful in the sense of yielding publishable results, but boy did they level up my mathematical ability more than any puzzle or textbook exercise -- not just my pure mathematical reasoning ability, but also my general ability to wield math as a weapon to fight against really hard problems.
That's the thing about research projects versus puzzles. There's only so much you can hone your math skills by working on a problem that someone else has intentionally set up to be well-posed and elegantly solvable if you think about it the right way. You're in a sandbox, and the problems that you fight against have been artificially handicapped to be weak opponents. It's perfectly reasonable for beginners to start here, but people often continue training in that sandbox for way too long and then come out expecting to conquer the world. And then they're faced with the rude awakening that they're actually really weak against problems that have not been artificially subdued.


Is it possible to include multiple time slot choices in a calendar event in Microsoft Outlook?

Question: I want to add multiple choices to an email w/ calendar event via Microsoft Outlook. Is it even possible to do that, as I'm having trouble looking up how to do so, or the buttons suggesting that I can complete the feat.
Comment: I haven't done this before, but I have seen people send polls, and when accepting an invitation, people can propose a new time...
Comment: Do you mean adding a Doodle poll?
Comment: No, I believe that there's integrated support for a poll. The options are shown in the header or something and people can select one. I only saw it a couple times, but I'm pretty sure it's possible.
Comment: I think I found what you're talking about: http://www.howtogeek.com/howto/microsoft-office/sending-polls-in-outlook-2007/ This option should be suffice.
Comment: I wasn't sure if it would be but if so I'll add it as an answer.
Answer: You can send polls in an email through Outlook. It will give the recipients a list of options to pick from.
From: http://www.howtogeek.com/howto/microsoft-office/sending-polls-in-outlook-2007/
In Outlook 2007, to create a poll, you have to add voting buttons to your message. In the ribbon, click the Options tab and then click "Use voting buttons". There are a few options preset for you but you can also specify a custom list. If you choose a custom list, you will then be able to specify them as a text field, with each option separated by a semicolon. For instance, say I have a poll for pizza options for lunch. If I want the options "Taco", "Pepperoni", and "Sausage", I would specify the voting buttons like so: Taco;Pepperoni;Sausage.
To view the results of the poll, you then must open the original message and click the "Tracking" button in the ribbon. It will then show the number of votes for each option, for those who voted.


Leading-tone IAC?

Question: Why did Beethoven write a leading-tone IAC here?  It appears as viio 6/5 - I.  Also, why does the leading tone IAC exist?
Comment: Maybe these should be two different questions. I do think both are good questions, though!
Comment: Leading tone 7th chords are very common, especially from Beethoven onwards. Are you talking about from measure 140 to 141? Because I see a diminished 7th going to tonic there. It is probably just there as part of the picardy third setup to go from C minor that the piece has been in to an ending in C major(as I can tell by all the E naturals). The diminished 7th probably in this case gives smoother voice leading from C minor to C major than a dominant chord would. Or maybe it is just for the purpose of a dramatic ending. I know that Beethoven uses the diminished 7th a lot for drama in his works
Comment: So the V chord is replaced by the vii chord!  Good point!  That Bdim7 is like a G7b9 without its root!
Answer: This is a coda at the end of a movement.  The (sort-of) PAC moment that concluded the recapitulation occurred right before the excerpt given here.
In codas, it is very common (even sometimes before Beethoven) to have a series of moves to the subdominant and/or dominant, often all over a tonic pedal (or something like that), without another strong root-position PAC.  Beethoven frequently makes use of V or viio chords over a tonic pedal at the of movements in coda or coda-like passages.  See, for example, the end of the Moonlight Sonata, which alternates harmony between V and i.  Or, for an example with a Picardy third (as here), see the end of the first movement of Op. 49, No. 1, which repeatedly moves viio7-I in the closing bars over a tonic pedal.
While the tonic note isn't always sounded on the beat in the excerpt given in the question, it's pretty pervasively emphasized in the texture and functions as a pedal note throughout this ending.
As noted in comments, the viio is just a dominant function chord, and it tends to be frequently used in such coda passages over a tonic pedal as the upper voices often tend to move in neighbor-tone motions.  Sustaining the fifth above the bass (the root of V) isn't as interesting and doesn't generally follow the pattern of the other voices, so having it move up to the flat sixth above the bass (effectively creating a viio7) is rather common in alternating with the tonic harmony, particularly in minor key pieces.
(This perhaps gets at an answer to the OP's question of why a "leading tone IAC" exists -- it's not a strong cadence in classical style, but tends to have strong voice-leading motion with all voices moving in strong stepwise motion toward the tonic chord.)
I'd also note the pervasive use of diminished sevenths in the harmonic vocabulary within this first movement of Op. 111 in general.  Diminished sevenths are an integral part of the opening and of some of the primary thematic material, so it's not surprising that Beethoven would choose to bring out that sound at the end of the piece as well.

Leading-tone IAC?


Can we tell Deutschpost to keep our mail for some time?

Question: I'm trying to figure out mail forwarding in Germany. So far I understood that Deutsche Post offers for free, and all you have to do is inform them. I would like to ask, if it is possible to to ask them to hold the mail for some time. For example, I am moving to a new state and hence, there would be a time for me without having a place of permenant residence.
Answer: If you happen to have a valid new street adress, but aren't physically able to get letters there (lets assume a company is in the process of demolishing the front yard including the mailbox, or you will not actually move your stuff in until the end of the month) you can have the postal system forward your mail to a  P.O. Box. This box must be in your name.
As far as I know there is no holding service. The mail will be delivered somewhere, your only choice is the new location.
As an alternative, you can use a "virtual mailbox", a service that will provide you with a (German in your case, but the services are mostly global) physical address for your mail and give you options on what to do with it. One of the most common options is open, scan and send an email to you with a PDF of your letter. Those are private companies unrelated to any postal service and they cost money.


Why are most RGB LED strips common anode instead of common cathode?

Question: Why are most RGB LED strips common anode instead of common cathode?
Comment: Seems to me a good question to ask would be, "Why are most LED strips common anode instead of common cathode?" There might be a manufacturing or electrical reason behind it, which would be an on-topic question.
Answer: The reason common anode is more common is because its easier to sink current than to source it. With either common anode or common cathode you'll have one terminal connected directly to a supply for all LEDs and the other side having the dropper resistor and a control transistor per pin (or IC outputs that are transistors on the inside) either sinking or sourcing a current.
NMOS / NPN transistors are stronger in general, more common as discrete and  are better at sinking current than sourcing. You need PMOS/PNP transistors to source current (pull up) effectively, but they'll still be weaker at sourcing than an equivalent N-transistor would be at sinking. Thus the best solution is to connect a common anode to the positive supply and sink current from each LED using NMOS transistors.
Older ICs used to be designed exclusively using N transistors for speed reasons, and so were much better at sinking current than sourcing it. This was particularly true of the TTL logic used in the 74LS series chips (still widely used as interface chips). A 74LS00 is specced to sink 4-8mA, but source only 0.4mA.
Modern CMOS ICs are much more symmetrical (an ATMEGA328 in an Arduino can source or sink 20mA) since they use bigger PMOS than NMOS to balance the fundamental differences, but the convention of common anode is well established.
EDIT (More info): If on the other hand you're building a matrix, you'll have to have both current source and sink transistors. In this case it can be best to have more devices in common cathode and fewer on a common anode. The idea here is to have a few fat NMOS devices sinking many LEDs currents and many weak sources (I/O pins) driving a few LEDs each. Of course with common anode strips you could use fat PMOS devices too.
Comment: @RatTrap David is using "fat" just to mean "able to handle a relatively large amount of current".
Comment: what happens when each of the LEDs needs a different supply voltage? Can you still have a common anode?
Answer: Other answers have mentioned that N-channel transistors are cheaper than P-channel for the same current capacity, which is a reason to put the switching transistors on the negative side of the LEDs.
Another reason has to do with thermal management. Most LEDs are grown on a chip with the cathode layer underneath and the anode on top. The chip is thermally bonded to the pin it sits on, but you have to let the light get out, so the anode is just fed with a tiny wire coming over the top of the chip.

This means that if you're putting red, green, and blue chips in one package, having multiple cathode pins and a common anode will give better heat dissipation -- each chip will have its own pin to drain heat out of, going into its own trace on the strip.
Comment: Welcome to EESE. Good answer! Probably you can build reputation faster by answering newer questions that don't already have an accepted answer, but this is still a good contribution, so thank you for making it.
Answer: I can suggest a couple of reasons why common anode are favored:

Safer wiring. A wire which completes the circuit for a remote device often must travel some distance through mechanically stressful conditions. It's preferable for that wire to be at Ground voltage rather than plus supply voltage, so that if it shorts to the chassis or other wires there's less hazard.
This, in combination with customary use of positive-voltage power supply rather than negative, leads to favoring separate cathodes for LEDs.

NPN transistors easier to manufacture than PNP. NPN transistors (in silicon) have had a better price/performance ratio than PNP transistors, as explained by this random article here: [Why NPN transistors are preferred over PNP?] (http://www.madsci.org/posts/archives/2003-05/1051807147.Ph.r.html). It is the switching and amplification configurations possible with each kind of BJT that is part of what motivated the preference for positive supply voltages.
And for switching purposes, a BJT transistor needs to be used in common emitter configuration, which, for NPN used with positive supply, means switching the low-side (cathode) side of the LED.
Comment: There is no safety issue with common positive vs. common negative -- DC circuits don't have a "hot" or "neutral" like AC circuits. The Running pos wires around a neg-grounded chassis or vice versa is identical from a safety perspective. Indeed, some vehicles (made before semiconductors) ground the positive terminal of the battery.
Comment: Uh, most cars I have seen run the positive voltage cable, and ground to the chassis locally instead of running a ground voltage cable.
Comment: @Passerby -- That's the trouble with this site -- people questioning whether you got some fact right :-). On looking at some automotive schematics, I have to agree with you. I had some specific circuits in mind, but the main ones switch the plus supply, and use the chassis for ground. I'll edit my answer.
Comment: @crowding If there is a chassis, then the side of the DC supply that is at the same potential as the chassis would be analogous to "neutral", and the other wire would be "hot".  In a 12V system with negative ground chassis, there is little danger of a wire from the negative side of the battery shorting to the chassis, while there is a hazard for a positive supply wire shorting to chassis. And vice versa in a positive ground system.
Answer: In my experience it is easier to switch the negative side.
Lots of electronics will have different voltage requirements. When you connect a lot together (for example, an LED or LED strip and a micro controller) they will likely have a common ground, but different supply voltage.
Most voltage regulators will have a common ground, a high voltage input and a low voltage output.
To switch the cathode (or ground or 0 V side) you can use a logic level, n-channel MOSFET. This will require the gate to go to a few volts above 0 V for the transistor to be on and 0 V for it to be off. This is typically quite easy for micro controllers which go to 3.3 or 5 V.
To switch the anode (or positive side), for a device operating at a higher voltage (say 12 V), you would use a logic level p-channel MOSFET. This requires you to supply it a range of 0 V to a few volts below the supply level (12 V). This means that a 3.3 V or 5 V micro controller is unable to directly control the transistor. Instead you need to add additional devices such as an n-channel MOSFET and a few resistors or an opto-isolator and a few resistors and so on.
The other option would be to have a common positive voltage of 0V and have the negative voltages be negative (so -3.3 or -5 V for a micro controller and -12 V for the LEDs), but this then requires you to make sure the negative voltages aren't connected directly, which would prevent say running a LED light strip and an Arduino off the same power supply without other additional electronics.
As such, switching the cathode is typically much easier.
Because you want to control the colours individually, that makes having a common anode (and thus individual cathodes) an easier way to switch them.
Answer: I wasn't able to find any definitive reasons, but I did come across:

It has always been my contention and design technique to sink current where possible, rather than source it, thus I prefer common anode wherever possible for displays and other driven devices and I write all firmware routines to provide lows for execution rather than
  highs.. The reasons are obvious on most data sheets that most devices can sink more than they can source.

— EEng (source)
It may be that the slight advantage that sinking current offers over sourcing for most devices, leads manufacturers more often to design displays in a common anode configuration.
Answer: Probably like anything else, the invisible hands of the free market moved both manufacturers and consumers alike to common anode simply because more people bought common anode. Almost like Darwin's theory of origin of species. Two animals cannot occupy the same niche, one will dominate the other. Why did AC win over DC? Why did VHS win over Betamax? Generic Flash MP3 players vs Zune vs iPods? Because one was favored over the other, and manufacturers followed suit.
LED strips are different from normal electronics parts, because there is much direct enduser and consumer purchasing. And the mass production manufacturers who copied the initial offerings will only mass produce what's profitable.
Manufacturers see Consumers purchasing Common Anode, so they produce more. Consumers see more Common Anode, they purchase more. Chicken or Egg, the end result is the same.
Comment: Surely it's because negative rail switching is much easier with open-collector style switching and hence interfacing with logic is simplified compared with high-side switching?
Answer: My guess is that this practice may go back to days when using TTL 7405 chips was common (early MOS chips being too weak or far more expensive). The open collector 7405 (et.al.) could only pull down, and perhaps pull down against something other than a regulated 5 Volts connected to the Anode of an LED.


identify if Filevault is enabled on remote Mac

Question: I need to do remote checks to verify OSX has filevault enabled.  When you enable filevault, does it create / change something on the HDD that I can check for on VPN login using my posture assessment tools?
Comment: Are you using only the command line or can you view GUI? Assuming VPN login allows you to view GUI you can just go to Disk Utilities > Select HDD Partition > If it's encrypted it should say at the bottom `Format : Encrypted Logical Partition`
Comment: Hi only command line.  We dont trust the users :).
Answer: Can you run a command line tool, such as fdesetup?
$ sudo fdesetup status
FileVault is On.

fdesetup also accepts the verb isactive, which returns 0 if FileVault is enabled (checking a return value is arguably more reliable than reading the text):
$ sudo fdesetup isactive
$ echo $?
0

fdesetup does require root access, which might be a problem.
You could also run diskutil cs list and check for the encryption status. The exact wording you're looking for is a bit complicated because of all the different possible combinations, this script might be a good start.
Comment: Hi, another question.  Does enabling filevault create a file somewhere on the file system that would not exist when filevault is disabled?
Comment: Not that I know of. If you want to check, you could do a backup with Time Machine, enable/disable FileVault, and then use `tmutil compare` to see if any relevant-looking files have changed. But there's nothing I'm aware of.
Answer: fdesetup seems only avaliable on Mountain Lion.
Try this script on Lion:  https://github.com/rtrouton/rtrouton_scripts/blob/master/rtrouton_scripts/filevault_2_encryption_check/filevault_2_status_check.sh
The basic idea is: diskutil cs list
Answer: The rtrouton script mentioned previously seems needlessly complicated (I ended up there first, but after reading half of it came here).
I'm probably going to start with the below and wrap a little more logic around it.
diskutil cs list | grep "Fully Secure"


My kitchen faucet jumps, sputters and stops and squeals when water temperature reaches straight hot

Question: Faucet and supply lines are 18 months old.  About a month ago, the faucet started jumping but only when on straight hot water and when the water temperature is probably close to 130 degrees.  It's one of those newer models with the pull down sprayer.  Right after it jumps and water stops I can hear high pitched squeal.
Is there a washer inside the faucet that maybe softens and expands to restrict flow when it gets to hot?
When it jumps and squeals, I turn it off and immediately turn it back on at still a warm temp but not quite so hot and it works fine.  New Dishwasher on same valve and doesn't appear to have any issues.
Answer: Sounds like the anti-scald feature is working as designed. i.e. it's not SUPPOSED to let you burn yourself with excessively hot water, and the operation is as designed.
Dishwashers are not intended to operate with hands in them, so they normally have no anti-scald feature, and indeed may have a supplementary heater to raise the temperature even more for sanitizing.
Perhaps your hot water temperature has changed slightly, if this "just started happening" after 17 months.


How to delete a taxonomy term with a broken URL

Question: I was trying to change the URL pointed to by a taxonomy term so that clicking on it would take the user to a map. However, after changing the URL I am no longer able to go into the term to edit the value.
How can I switch the URL back, or delete the term altogether when I can't access it's edit screen?
Answer: To solve this I was able to open up the database and view the url_alias table.
From there I simply changed the url back to the automatically generated url that I overwrote.


Battery only charges when Laptop is off

Question: My laptop only charges when it is off. If I try to charge it when it is on it says "plugged in, not charging". I just got it 3months ago and I've not changed its battery or charger.
My Laptop is an Hp Notebook 15 PC.
Comment: I've seen this behaviour if the power supply is too weak. Check your laptop's manual to find the required wattage of your laptop and check your power supply to see if it can provide *more* than that.
Comment: Apparently, power supply is not too weak.
Comment: The best detection technique is to find another power supply and test it. in my opinion is 90% related to power supply conditions or battery condition, I don't think is something Software related
Comment: If your laptop is off and left connected to an outlet, will it charge completely?
Comment: This is an old question, but it states that the laptop and charger were original and practically new.  In that situation, the simple solution is let the manufacturer replace it under warranty.
Answer:
"plugged in, not charging"

Lithium-Ion batteries require a specific current and voltage to properly charge (actually different levels depending on the specific charge profile: they're charged at constant current up to about 80% capacity, then charged at constant voltage the rest of the way). Charging at different voltages or with different currents might damage the battery or shorten its expected life, so the battery controller will simply not allow it and disconnect the recharge circuit.
Then, power units have a maximum wattage, and usually they have a "power curve" so that the actual voltage they give out is not always the rating voltage, but a little more (when nothing is plugged in) or a little less (if something is draining power). This is also related to the waste heat being produced by the power brick.
Finally, some laptops (and some chargers) can actually communicate and identify one another. The laptop can then actually refuse to charge, or charge more slowly, or not charge unless the laptop is powered down and the identification chip asleep, if it feels that the charger isn't its manufacturer-ordained soul-mate. If something interferes with the protocol, the charging process might be hindered. This is probably not happening to you, because HP doesn't seem to employ such strategies, but I'm including it just in case.
What seems to be happening here is that when the PC is draining current, the power brick voltage falls below what's required by the battery controller to safely charge the battery. There is no other phenomenon that can reasonably be going on between the two cases "laptop on" and "laptop off".
That said, there can be several causes for that one phenomenon. It's not even guaranteed that a single cause is responsible.

the power brick isn't usually producing, say, "19V". Only very high-end, usually multipurpose, adapters will output a precisely tuned voltage. Usually laptop power bricks apply an AC-DC conversion method that, when supplied with AC in the 220-240 V range, outputs DC in the 18.5 - 20.2 V range. But if your wall socket voltage is actually, say, 216V, then it may well happen that the resulting DC voltage falls below minimum tolerance.
voltage isn't the only parameter in AC-DC conversion. The phase of the current also is very important. Usually the power factor is not a concern, but if your electrical circuit involves heavy capacitive or, more likely, inductive loads (motors, etc.), the actual power going to the brick might be less than it expects. This phenomenon is used in "dimmers" that lower the power going to a lamp or appliance by counterphasing it (instead of wasting it into heat, as it would happen with a resistive load).
the power brick might be defective. Its output (see above) is obtained by placing appropriately dimensioned capacitors and components in the circuit. If one of these fails or drifts out of spec, the power brick might start sending out less power than it should, and the battery will refuse to undercharge since this would damage the LiIon cells.
(less likely) the battery controller might be defective. It might believe that it's not receiving enough power, even if it is, unless the brick sends more power than necessary; which it only does when the PC isn't siphoning off energy for its own purposes.
(not very likely) the PC might be draining more than it should.

What to do
First test: get an electrical tester and verify the wall socket is supplying properly. Otherwise, check what happens moving the PC and charger somewhere else (at a friend's, at work, at a bar). The nearest to a low voltage power station, the better. Where I live you may get 238V next door to a power station, and 226V two hundred meters down the road. In some places in the country near the coast we have 218V and some appliances will complain, or not work as reliably. My own Dell M6800 charger for example takes exactly twice as long to bring my laptop from 20% to 100% charge. Mine doesn't refuse charging, but I wouldn't be surprised if some day it did.
Second test: try lowering the screen luminosity and, if possible, set the hard disk sleep time very low. Stop all applications you can and see whether you can install some CPU frequency governor to speedstep down the CPU when not in use. See what happens when the screen is dim and the hard disk stopped. Does it still refuse to charge? If so, chances are the power brick is defective (the battery governor can't be this much out of spec or your PC wouldn't even power on unless connected to the wall socket).
Third test: bring the PC to the shop and ask they loan you a power brick for five minutes. There're usually PC on show and they use the official power bricks. If their brick works and yours, plugged in the same socket, doesn't, that's quite a definitive diagnosis right there.
Answer: This behavior could be a result of a battery managing feature of your laptop. With higher class laptops one sometimes can set a battery percentage after which recharging starts.
Maybe this is the problem in your case.
However, usually this setting should also be effective while the computer is turned off. Maybe there is something wrong here. Is the battery also not charged if it is nearly empty?
Also you might want to try to perform a battery calibration.
Comment: It charges when it's nearly empty only if turned off. The article you referred me to is specifically for windows 7. My PC is running Windows  8.1 preinstalled. Is there any way to perform this test on my OS?
Comment: @Cupidrex: The link describes something in the UEFI-Startup menu. It should be independent of the used OS.
Comment: Ok. I'll try it out. What does it prove if my battery passes the test?
Comment: @Cupidrex: Performing a battery reset might solve problems where the computer thinks it is full and stops charging for this reason. If that doesn't help, I'm out of ideas.
Comment: Now I'm confused. How do I perform a battery reset?
Comment: @Cupidrex: please refer to the table after step 7. of the mentioned link.
Comment: I apologise for taking too long to respond. My Laptop does not have a battery calibration menu talk less of a battery test option. Below is a screenshot. http://i.imgur.com/aiyZpgY.jpg
Comment: @Cupidrex: Then I'm afraid I cannot be of further assistance.
Answer: It is very easy easy Go to
http://h20566.www2.hp.com/hpsc/swd/public/readIndex?sp4ts.oid=4097215
Select your Laptop product name
Select your windows...
then it will automatically take u there...
then scroll sown to Bios and download the latest bios.. It will be "F.50" (8 Jul 2014)
then Just Intall... (Make Sure your charger is connected during installation)
Very Easy
Problem Soved!!! :)
Comment: Please explain why updating the BIOS will fix a battery charging issue.
Comment: The BIOS controls the charging of the battery.
Answer: I've been working on this issue myself for the past hour, and ran into this: https://support.lenovo.com/nl/en/documents/ht100574
This issue is about the laptop stopping charging when it's in airplane mode, and apparently it is designed this way.

This is working as designed.
It is important to note that users should not attempt to plug either
  the 135W or 170W AC adapters into an outlet on an airplane because
  they risk tripping the circuit breaker in the seat disabling the
  outlet.
For additional information on Airplane Mode, reference to the
  following Tip below:
     Using Airplane in-seat power mode in ThinkPad Power Manager
Answer: I was having the same problem, and fortunately I could solve it. In my case i was as simple as correct the orientation of the needle inside the charger connector. It was touching one side , and when I correct it to the center of the hole my laptop became to charge again while was turned on. Hope this can help you.

Battery only charges when Laptop is off


HP P812 attr_value_interface_phy_not_connected

Question: We got an error on HP server with a HP Smart Array P812 and now 6 of the drives are missing.
the error seems to be attr_value_interface_phy_not_connected (See pic) and I found no reference anywhere on the web for it.
in status alerts windows it also says "Bay 0 is bad or missing" for all the drives.
Comment: What model server is this?
Answer: The error you see is just an undefined variable in the web application. That's a programming problem. But the fact remains that the systems doesn't think the drives are connected.
It may be more useful for you to see what's happening physically on the server.
I count 12 disks. Is this a ProLiant DL180 G6 server?
I ask because of the age of the controller, the drive size, count and potential for backplane issues.

When did this start happening?
Is your firmware up-to-date?
Are all of the disk status lights illuminated? What color are they?
Look at the BIOS when the system boots. What are the POST errors?
Look in the HP IML log. What is it reporting?
Look inside the server. How many cables are connected between the backplane and the RAID controller? Are they secure?


How can I find real man for bitcoin mining investment?

Question: can anyone help me for find a real people? Where I can invest for mining, because i lost lot of money before. Someone scamming with me.
Thanks
Comment: Mining bitcoin requires specialized hardware, and a certain level of technical expertise. Anyone advertising that you can 'invest in mining' with them is almost certainly running a scam. Unless you are purchasing mining hardware (an ASIC machine) to set up and run yourself, you are likely getting scammed, or at least being taken advantage of.
Comment: See [In the ASIC-age, is it worth starting mining Bitcoin at home?](https://bitcoin.stackexchange.com/q/41276/13866) -- Getting involved in Bitcoin mining is not suitable for anybody who is new to Bitcoin. You will almost certainly lose even more money.
Answer: The only real "safe" way to invest in mining is to simply start mining yourself. There are many online resources for teaching you how to do this. Depending on the price of Bitcoin, your local electricity, network difficulty, and the price of your equipment your profitability will vary greatly. In most cases it may make sense to just buy and hold the coin and perhaps play around with trading in general.


What is meant by a "fast outfield"?

Question: They always say in commentary that the outfield is very fast? what does it exactly mean?
Answer: It means that the ball, when hit along the ground, will travel quickly. The "speed" of an outfield can be affected by two major factors:

Length of the grass - if the outfield has been cut short, there will be less friction on the ball as it travels over it, and hence the ball will decelerate at a slow rate.
Moisture - a damp outfield will cling to the ball, slowing it down.
Comment: I think the OP asked about the meaning of the word `outfield`. We can hear on the commentary "quick outfield" when the batsman hits the ball hard.
Answer: The outfield is a sporting term used in cricket and baseball to refer to the area of the field of play further from the batsman or batter than the infield, and in association football to players outside the goal.

They always say in commentary that the outfield is very fast? what it is exactly mean?

The Quick/Fast Outfield refers to the outfield which has a less friction offered when ball travels on the ground.
In simple words the Outfield where the ball travels much faster than the regular outfields can be called quick/fast outfield.This may be because of the grass height/a dry outfield as suggested by Spinner in his answer or it may be even because of the slope of the ground which affects in acceleration of the ball.
As quoted by many commentators/batsmen/captains the quick outfield helps the batting side to score more amount of runs.
Answer: The term Fast Outfield means where grass or friction is less and the ball travels quickly to the boundary after hitting.
Answer: outfield means the area in between square(means set of pitches) and the boundary line.
Comment: Hi. Welcome to Sports.SE. The question is "what is meant by a *fast outfield*?" and not "what is *outfield*?".

What is meant by a "fast outfield"?


What is the access code for the Night Terror's cell?

Question: In the Darwin Village lab, what is the access code for the Night Terror's cell (in the room with the three gun turrets along the "back route" to the air filtration system)?
Comment: I am pretty sure they are randomized
Answer: It is ICEBERG. Please let me know if you have troubles.
It can be found by examining one of the tables.


SSL certificate for "typo" sites

Question: Lets say I own a website say, citiibank.com. (extra i )Will certificate issuing authorities issue a https certificate to the site? For all they know it is a valid website, whose name just happens to be similar another website. Is there some validation of the credentials of the website before issuing certificates?
The context for asking this is from my typical usage of secure sites, I see the padlock and generally proceed.
Comment: If it's a well known Certificate Authority it will verify your identity in some way before issuing a certificate.  I'm not sure if they will care about the name of the site or not.
Answer: The short answer: if you own a domain you can get an certificate for that domain, period.  It's similarity to another domain is irrelevant.
The bigger question seems to be "what sort of looking at an https page do I need to do to ensure it's really the page I think it is before entering my credentials".
The short answer to that is that you should look for the address bar to turn green, indicating an EV certificate (see below).  You might consider additionally using something along the lines of the Perspectives project (site) which bypasses the CA system and it's vulnerabilities and provides an independent check.
There's some things about certificates you should know to better understand this answer:
There are in fact at least three different levels of https certificate (see here for example, and here for a more complete listing of certificate types):

Domain Validation (DV) certificates
Organizational Validation (OV) certificates
Extended Validation (EV) certificates

A DV certificate will show the padlock in your browser.  When a CA issues a DV certificate, it is asserting that the person it got this certificate from is in control of the domain name in question.  That is all.  This can be certified, for example, by an email loop to, say, firstname.lastname@example.com, or by the CV requesting some random information be put on a specific page of that domain.
An OV certificate requires more checking than that, and an EV certificate requires even more checking.  When issuing an EV certificate, the CA is asserting that the entity named in the certificate actually exists, and that someone at that company actually requested the certificate.  Things like DUNS number for the company are looked up and checked.
An EV certificate usually turns the address bar green in some fashion.  This gives you as much assurance as you can get from the CA system that the web server you're talking to is what you think it is (if any CA trusted by your browser has issued a fake certificate for that site you're still in trouble - hence the problem with the CA system).
Confusingly, OV certificates often do not have any special way to distinguish them from DV certificates.   Sigh.
Note that the perspectives project is not fool-proof.  I use it myself, and it consistently reports that google is being impersonated every time I connect.  This is because google changes their certificates so rapidly and has so many of them, not because of an actual attack. Still, for many sites it provides a useful double check.
Comment: What's the difference between OV checking and EV checking?
Comment: EV and OV certify the same things: that the name of the organization on the cert is the actual name of the organization controlling the cert's private key.  The difference is in how much effort is put into checking, and thus presumably how much trust can be given to that assertion, and thus the cost the entity had to pay the CA to get the certification.  See [here](https://info.ssl.com/av-vs-ov-vs-dv-vs-ev-ssl-certificates/) for more info (there's actually more kinds of certs!).
Answer: It depends on the CA and on the type of certificate. Ordinary certificates are issued right after verifying that you control the domain in question; there is no further tracing (this is how, among other things, free StartSSL certificates are issued: they verify that you can receive mail to an address traditionally controlled by the system administrator). Some certificates involve issuing to a specific organization, and in that case they also follow up and make sure that you have an actual company with the name you claim. Likewise, if a human is involved in issuing the certificate, then they might get suspicious regardless of the type of certificate. However, because of how CAs work, you just need one to be willing to issue you a certificate, and StartSSL would do it. Don't trust HTTPS certificates to make sure you're at the right URL.
Answer: If you own a domain that is very similar to another you can still get your own SSL. It will be issued to you, as the owner, and not to the other entity. While I'm not sure citiibank.com is the best example, there are numerous similar sites out there due to the fact that common names are the domains of choice.
If some guy named Bob owns bob.com and has an SSL there should be no reason why the owner of Bob's restaurant cannot also have an SSL on bobs.com.

SSL certificate for "typo" sites


Alligning vertices in a UV image

Question: I have an object that is similar on one side and the other. However, the UV image editor UNwrapped it so that each half has slightly different vertex positions. How can I get it so that all the vertices line up?
Answer: If those UVs are exactly the same, you can align UVs to some common vertex and then rotate one UV with enabled vertex snapping and snap the rotation to some vertex of the other UV.

Enable snapping Shift+Tab
Set Snap UV Element to Vertex Ctrl+Shift+Tab
Set Selection Mode to Island Ctrl+Tab
Grab one island G and align it to corresponding vertex of the other UV island
Change Selection Mode to Vertex, select the common vertex and hit Shift+S to set Cursor to Selected, so you can use this vertex as a pivot point in next step
Change Pivot to 2D Cursor .
This is quite unpredictable but hopefully it will work - rotate the UV R and hover your cursor over vertices on the second UV until the rotation snap to it.

If your UVs are not exactly the same, you can then select all vertices and press W > Remove Doubles to merge vertices close to each other.
Answer: I don't think there is a tool in blender which allows you to do it automatically (you may try to ask another question how to do it by scripting though). Here's my method which uses a pinning option. Place two UV islands close to each other. Enable the snapping tool (vertex) and snap all the external vertices of one island to the vertices of the other to match islands' shapes.

Now select the rim of the first island (Alt+RMB) and press P to pin it. Press L to select the whole island and hide it (H). Repeat the pinning process for the second island. Next unhide the first one with Alt+H, select both (A) and unwrap again. Finally unpin everything with Alt+P.

Alligning vertices in a UV image


LAMP Best Practices

Question: Does anybody know of a checklist for LAMP best practices?  There is a lot of disparate advice on the 'net, but it would be nice to know if somebody has already published a best-practices guide or book for Linux/Apache/Mysql/PHP hosting architecture before we try to come up with that on our own.
Comment: I think the scope of "LAMP" is possibly too large for one concise body of works because with each piece of the LAMP stack, there's a myriad of possible best practices, depending on what you're trying to do.
Comment: possible duplicate of [Tips for Securing a LAMP Server.](http://serverfault.com/questions/212269/tips-for-securing-a-lamp-server)
Answer: I like to think of the LAMP stack as being the "screw your best practices, I'm getting shit done" stack.
So to me the 'best practices' for it are really just overall engineering best practices.   Keep it simple, use the fewest number of moving parts possible, solve the problems you have not hypothetical ones, test, measure, and make metrics-based (or at least informed) decisions, but above all else focus on your business and your customer not your scaling-dreams.
Also, use a CDN on the front and a Percona-on-SSD on the back :)
Answer: It depends on the load you are facing. Each letter in LAMP deserves a book. There are different optimization configuration depending on your goals (scaling horizontally or vertically, latency, throughput).

LAMP Best Practices


Dispersion under Classical and Quantum regimes

Question: If I understand correctly the literature on dispersion, the atom is modeled as an electron bound to an atom by a spring with the electron behaving as a driven, damped oscillator.  The electron oscillates at the same frequency as the incident electric field.  However, I fail to understand how to reconcile this classical model of the atom with it quantum counterpart which describes atoms as only vibrating at certain frequencies corresponding to certain energies.  Is it that most materials contain so many atoms that the frequencies over which the atoms may vibrate are essentially continuous?  If so, why then the discussion of specific resonant frequencies in the dispersion literature?
Answer: All  driven harmonic oscillators, whatever their resonant frequency, and whether classical or quantum, vibrate at the frequency of the driving field. What happens as the driving frequency  approaches the  resonanant frequency  is the the vibration amplitude   gets large. In the case of a quantum atom  there are a number of discrete resonant frequencies  corresponding to the difference in allowed energies. When the driving frequency gets close to one of these resonances then the probablity of at transition from one state to the other gets closer to unity and the refractive index of a material made of these atoms varies rapidly.
Comment: Thank you very much for your response.  If a quantum atom can oscillate at any frequency can it radiate all frequencies?
Comment: @Vinny: It can *scatter* light at all frequencies. This for example is why the sky is blue. Light of all frequencies scatters off the air molecules --- although blue light scatters more strongly.  It's hard to see individual spectral lines in the light from the sky.
Comment: Does the scattering occur with different probabilities for different frequencies?
Comment: That's what I said: blue scatters more strongly in Rayleigh scattering, so the sky is blue....  that's not because of a resonance of course, but when you *are* close to resonance you get stronger scattering


Dead Rising 3 crashing on Windows 10

Question: Dead Rising 3 seems to crash after 10 minutes or so. There are a few bits of information on this elsewhere on the web, but none of the solutions seem conclusive. I've tried running the game in administrator mode and with windows 8 compatibility mode set, but no luck. Any known solutions to this?  I'm using a Win 10 machine using an Nvidia 770 with an Intel i7 CPU.
Answer: This was solved by a user on reddit named rickyshea

Press Ctrl + Shift + Esc to open up Windows Task Manager.
Scroll down and search for a process called "Touch Keyboard and Handwriting Panel" or "TabTip.exe".
Right click on the process and click "End Task".
Launch Dead Rising 3.

This should resolve the issue.  (Additionally, this works for the exact same crash in Street Fighter 5)
Answer: Try reinstalling it if nothing works. Also verify game cache (if you have on steam), and check files. I have the same game, and this happened to me once. Putting it on Windows 8 Compatibility mode fixed it. So yeah, those are my solutions
Comment: 'Try reinstalling' may be the most standard "solution" or tip I have ever read on SE (which may be a solution if there is evidence that this really fixes something). Also, "verify game cache" and "check files", what do you mean by that? Check which files, for what? You should update your answer with some more details.

Dead Rising 3 crashing on Windows 10


Residue in a cup of tea using household filter

Question: I'd like to ask some insights re potential cause of residue in a cup of tea when I used water from household filter but no residue when I used the water bought from purified water vendor. I boiled the water from both sources and used the same tea bags. The filtered water showed lots of residue while no tea residue using the water that I bought.  Both of them were very clear before dipping the tea bag. Hope you can shed some light.
Comment: A water filter does not remove limescale, you need a water softener for that. Jug-style filters do a bit of both, but a whole house mains-water filter is likely a filter only. Can you clarify what system you are using? BTW, mineral content of bottled water varies dramatically by manufacturer, so you'd need a detailed analysis, usually printed on the bottle, to accurately compare.
Answer: Your tap water probably contains more minerals and your household filter does not remove them completely. (maybe your household filter is not working properly).
Bottled water use industrial food grade filtering techniques, they work better than home filters.
You could ask your city about the mineral content of your water, it should be
publicly available.
Comment: Thank you for your insights.  I actually use 2 sets of water filter that I bought from local online stores.
The 1st one is connected to the faucet and has 3 cartriges: Sediment filter, mineral filter then Activated Carbon
The second is a water purifier with dispenser that has ceramic filter then a cartridge with different mineral sand and stones.
Just to be sure, I'm also boiling the water for drinking. I'm sure that with these process we're drinking safe water but I'm just curious why i see lots of tea residue when I used this water vs when I used purified water bought outside.


Send invite to Google family calendar from Outlook

Question: Invites TO my personal calendar are simple, send to my gmail address. Invites that come FROM my family calendar come from family[numbers]@group.calendar.google.com. I tried sending an invite to that address, but it didn't work. How can I send an invite to my family calendar?
Comment: [The XY Problem](https://xyproblem.info/) might apply here.  Better understanding why want to do this would help to determine the best way to address the underlying need.
Comment: The reason I want to do this is that I have events at work that I create on my work calendar in Outlook. I want to make these visible to everyone in my family by sending an invite to my Google family calendar.
Answer: The problem you are encountering has a few layers.
Companies like Google and Microsoft have developed very sophisticated cloud apps that provide much more functionality than is covered in the standards.
The big companies can count on a fair bit of their user's traffic being private.  This allows them to leverage all sorts of custom features/code for these users.  Anyone who has tried to migrate data from one ecosystem to another appreciates this.
The worst thing for Google and Microsoft is when users want interoperability.  Their systems are private, their code is private and they haven't typically worked together to standardize.
So, Google introduced this Family Group concept.  You link a group of Google users and give them a shared calendar.
What kind of calendar is this?  It's sort of a few things and also none of them at the same time.  This is possible because Google can code whatever they want.  They have grabbed functionality and also skipped functionality in order to get it to work a certain way.
It acts like your event calendar rather than a shared calendar treating appointments as your own (as everyone's own) merely as a result of their existence. That is not how shared calendars work.  In a shared calendar you would need to be an attendee for Google to treat appointments as your own (i.e. you have a meeting in 20 minutes).
It also obviously behaves like a shared calendar for the group, but a shared calendar normally has a single account as the owner.  This calendar shows it belongs to the  account family[id]@group.calendar.google.com however that account does not actually belong to any group member and it can't be used by any of the Family to send and receive messages.  Google uses the email address internally as the "sender" for calendar notifications, however they don't receive messages as there is no need.  All communication to the calendar happens within Google from it's own products so the information is exchanged in other ways than email.
The problem you are encountering with your Outlook appointments is that you can't receive an email to the Family calendar, and event sharing between Microsoft and Google is done via explicitly accepting the invite via a link in an email.
Outside of manually creating the events yourself, there are two approaches you could use and the choice depends on the number of events as well as the functionality you are seeking.
Small Number, No Sync
This solution may be adequate however it might become a pain if you do it a lot.  The worst part of it is that there is no sync between the events you add to the family calendar and the original events.
It  is basically a variation of re-creating an event.  Depending on the event this may be better or worse than simply creating it yourself.

Invite your personal Gmail address.  This address can receive email and is part of the Family.
In your personal gCal copy the event to your Family calendar.
remove the event from your personal gCal.

Small or large Number, with Sync
This is more complicated and relies on the ability to share your work calendar as well as a google apps script GAS-ICS-Sync  It is better in that it remains in sync with the original events (updating when they update).
You would identify those work events to share using, for example,  a unique tag.  The script would run every few minutes and sync any identified work events with the family calendar. Creating them if they don't exist, changing them when they change, removing if cancelled.  It is one way in that changes made in the family calendar would not propagate back to the work calendar.  If you deleted an event in the Family calendar, within 15 minutes it would re-appear unless you removed the identifier in the event in the work calendar.
I wrote a longer description about it recently in this answer
Sync the Team Calendar to your own.  The question that answers while very different might still be of interest as it was about two Calendars inside the Google cloud.  You will need to focus specifically on how to target a subset of events since you likely don't want to sync en-masse.


Geographical Protections

Question: For a small Non-profit business, if you want to include a Geographical Region as part of your business name, then is it a Legally Enforceable requirement that the business has ties to the region (e.g. a Business address)?
Comment: Are we talking "Poscutio di Parma" "Champagne" or "Nürnberger Rostbratwurst", or is it "Flemish linnen" (proteted origin) or even "New York Computer Store"?
Comment: For example: what if somebody who has a Research and Development business in Sheffield decides to call it 'Berkshire Research', even though the business has no fixed location in the area, and nor is any clients in the area the principal beneficiaries of the work. Would this be allowed ?
Comment: There is a difference between "I am a store at X", "I produce something that is a trademarked origin (Proscutio di Parma, Champagne, Nürnberger Rostbratwurst)" and other uses of a geography.
Answer: Not necessarily, although one can imagine circumstances where it would.
In general, you can put anything in the name of a non-profit that you want. So, if I want to start the Borneo Burger Society in Portland, Maine, that isn't in and of itself illegal.
Trouble could arise, however, if a name containing a geographic location is used in furtherance of fraud upon someone. So, if you told someone that your burger was an authentic Borneo Burger made from cows born in Borneo because the Borneo Burger Society certified it, when the Borneo Burger Society did not in fact have any connection to Borneo, Indonesia, there might be some manner of actionable fraud involved.
Fraud requires that you communicate a material fact that is not true, knowing it is not true, with the intent that it be relied upon by another, and that person justifiably relies your statement and suffers damages caused by that reliance. A false statement (if it is indeed a statement of a material fact at all) is only the beginning and not the end of the inquiry.
Similarly, you can have a "Champagne Lover's Club" based in Portland, Maine, which isn't even conceivably fraudulent. You aren't purporting to make Champagne in Portland, Maine, when that can only be done in France. You are merely purporting to love Champagne, which can be done anywhere on Earth or even in outer space.
Similarly, you can have a restaurant named "Hong Kong restaurant" in Portland, Maine, which isn't suggesting a location in Hong Kong, China, merely an inspiration from Hong Kong, China, and it would be patently unreasonable for anyone going to the Portland, Maine restaurant to claim that they were deceived into thinking that they were in China.

Geographical Protections


How do check if USB and internet ports work with linux?

Question: I've heard that if the USB ports stop working in windows they can be checked via linux. How can that be done? Does it matter which OS I install?
Answer:
if the USB ports stop working in windows

Well, if you install a new version of Windows, you might find that your USB device does not work anymore (though most modern devices, which are designed to work with certain USB classes - such as HID devices, like mice or keyboards - use generic drivers and could still be working). If the device needs a custom driver, you might be out of luck though.
If there was ever a Linux driver for that device, you might be in luck. As far as I know, old drivers still continue to work.
You talk about 'can be checked via Linux', do you mean your device is not working anymore because of a failure? In that case, you can check if the device is still operating by plugging it into a Linux computer, and, in a terminal, type dmesg. The plug event should appear at the end of the list of events. If it's working correctly, that is. If Linux recognizes it, you'll also find that (probably) a file name was assigned to it.


Difference between a polynomial of degree $n$ and an $n$- tuple with the $n$th component $\neq 0$?

Question: When a polynomial $f := a_0 + a_1 X + \cdots + a_n X^n$ over a field with $a_n \neq 0$ cannot be regarded as a function, what is the major difference between $f$ and the $n$-tuple $(a_0,\dots, a_n)$? It seems that the plus sign and the indeterminate are redundant here.
Comment: @Michael Hardy: What is the point of your "editing"?
Comment: The important part is what algebraic structure they have, not so much how you represent them - polynomials are a very natural way to do so, but one may find analogous addition & multiplication laws for tuples. (Though still, setting $X$ as the analogous tuple, one retrieves the polynomial representation, because polynomials really are sums of powers of another element $X$)
Comment: @Meelo : I changed $a_0 + a_1 X + \cdots a_n X^n$ to $a_0 + a_1 X + \cdots + a_n X^n$, which is standard usage and is better usage.  Some people think that things like this matter only if they get noticed by someone.  But in fact people often don't notice the things that cause them to mentally trip over something. ${}\qquad{}$
Comment: @MichaelHardy: You erroneously assumed something. Missing a plus sign is a typo, rather than you are more meticulous to mathematical writing. You generalize from one example to all...
Comment: @Chou : Meelo asked what the point of my edit was.  So I explained what it was. ${}\qquad{}$
Answer: I mean, it's just a notational difference.
There are always multiple ways to notate any particular idea/object in mathematics, and you can even make up your own, so asking the difference between two different notations for the same object is kind of a weird question - they are different, so their difference is nonzero, and if you're comfortable with both, then that's never going to hurt you.
On the other hand, let me point out one advantage of using the classical notation $a_0 + a_1X + a_2X^2 + \cdots + a_nX^n$. The advantage of this is that it looks like a sum of "numbers", and sums of "numbers" is generally a "number". Since you can multiply "numbers", you should be able to multiply polynomials. Written in this classical form, it's easy to figure out how to multiply two polynomials - simply apply the distributive law multiple times. On the other hand, the tuple notation doesn't give any hint as to how one might "multiply" two polynomials. Do you multiply the corresponding entries in each tuple? What about multiplying two tuples of different lengths?
Answer: In fact none. The `formal' way of defining the polynomial ring over say a commutative ring $R$ is to identify it as the collection of all set functions $f:\mathbb{N}=\{0,1,2,\ldots\}\to R$ such that $f(n)=0$ for all large $n$. If $f,g$ are two such, we can define $(f+g)(n)=f(n)+g(n)$, $(fg)(n)=\sum_{i=0}^n f(i)g(n-i)$ and degree of $f$ is just the largest $n$ such that $f(n)\neq 0$.


Example in Andrew Lo's book - Adaptive Markets

Question: In Prof. Andrew Lo's book, Adaptive Markets: Financial Evolution at the Speed of Thought, in the section The Origin of Risk Aversion in Chapter 6, he uses the tribble example to illustrate how risk aversion comes about. But I am a bit confused by the math here. He supposes that each tribble is faced with two possible actions, either having three offsprings for sure or having two/four offsprings with 50/50 chance. He goes on to calculate that after two generations, the number of risk-averse tribbles from a single risk-averse grandparent will be 9 for certain, but claims that the number of risk-neutral tribbles from a single risk-neutral grandparent will, on average, be 8. Why is this the case? Isn't the expected number of offsprings after two generations also 9 for the risk-neutral tribbles? I hope someone who has read this book can enlighten me.
Answer: I wouldn't sweat this one. He's just making a simple "on average" assumption and not examining the wings of the actual distribution. Below is the actual quote you're referring to; and why this one isn't quite right in this case.
But the point he's trying to make isn't invalid just because he chose a bad example to try to make it. In his defence, consider the following alternative similar dilemma. You are offered a perpetual guaranteed 5% annual return, versus a 50:50 of 0% or 10% each year. Your CAGR will be 1.10^0.5 = (1+ 4.88%). IE there IS an actual not just a certainty value to risk aversion here (when presented with fair bets).
Lo just chose a bad example here (following on from his previous use of tribbles earlier that chapter). I strongly suspect he knew this, but suspected few people would pick him up on details, when his narrative was sailing along neatly at a good pace of knots.

Lo, p.205
Why does this happen? Once again, it involves the Law of Averages. After just two generations, the number of risk- averse tribbles arising from a single risk- averse grandparent will be 3 × 3 = 9 for certain (recall that these tribbles always have three off spring), while the number of risk-neutral tribbles from a single risk- neutral grandparent will, on average, be 2 × 4 = 8 (these tribbles can have two or four offspring, so sometimes it's two and sometimes it's four, with equal likelihood), which is 11 percent fewer. This is a small diff erence, but it occurs across the entire population of grandparents. As a result, the Law of Averages tells us that the gap between the number of risk- averse and risk- neutral tribbles will grow over time, until eventually risk aversion becomes the dominant type of behavior in the overall population
Except the lower median ignores the outliers who have 16 grandkids... Below is the actual distribution, and the average is 9!

EDIT - To @noob's question, and I've worked out where the 8 figure comes from.
Lo's arguing that the "Law of Averages" gives an expected Risk-Neutral population of E(RN) after n generations:
E(RN) = 4^(0.5n) . 2^(0.5n)
log(ERN) = 0.5n * (log(2) + log(4))
n = 2, log(ERN) = 2.079, ERN = 8.000.
Where this, I think, goes wrong is that it assumes that all the tribbles in half the generations will have in one generation, and all have 4 in a different generation. Over time, this will indeed average out to 8.
However, if you allow different tribbles in the same generation to have different numbers of offspring, then the reproduction rate remains three.
Below, I've double-checked this by Monte-Carlo'ing every tribble for 10 generations, 4000 times. Lo's expectation of 2.8 -> 8 after 2, is about 20 standard errors away from the MC simulation after 10 generations...
Comment: Thanks. Could you explain your example? Which choice has the CAGR you mentioned?
Comment: (I am disappointed if such an illustrious professor gave an example in his book which is wrong). It is really so?
Comment: See additional comments in edited version above @noob2. I'm wary of trash-talking the guy, as I 100% appreciate he walks the walk.... but I cannot see how he is right here. And would love to find out how I'm wrong for my own education! ;-)
Comment: Could you explain what you mean by the CAGR being 1.0488? Is this for the guaranteed return or the random return? I am a bit confused how this example illustrates risk-aversion.
Comment: Hi, sorry. It's a simple illustrative example of how geometric averages fall short of arithmetic averages, when there's volatility/variance. So if a (theoretical) investment had a 50:50 chance of a zero and +10% return, then your CAGR would be only 4.88%, versus the 5% you would get with a 100% probability of a +5% return. Their "average" return is the same; but the "long-run" return will be lower under higher volatility. And so investors will indeed be more risk-averse towards volatile routes to the same average expected return. Which is Lo's basic point, even if his example here was wrong.


Periodically reboot dd-wrt

Question: I have a Linksys Router with dd-wrt installed on. Due to some problems, I would like to periodically reboot the router (let's say at 0:00 everyday).
How would I do that?
Comment: What version of dd-wrt do you have? Make sure you have the latest version.
Answer: dd-wrt has a scheduled reboot feature built into the firmware. Have a look at Administration >> Keep Alive >> Scheduled Reboot. Make sure cron is turned on at Administration >> Management >> Cron.
Comment: This allows weekly reboots, but doesn't work if you want to schedule less frequently. And the seconds field doesn't allow input greater than `99999`, so it also doesn't really work for less frequency than weekly.
Answer: [if scheduled reboot does not work]
If you have enabled ssh-server on (I don't use dd-wrt, not sure if its enabled by default), you can reboot using following command
ssh email@example.com reboot

You can look at this page to configure SSH public-private keys, so that you don't have to login everytime. And remember you should be running ssh-agent/putty-agent whereever your login from.
http://www.dd-wrt.com/wiki/index.php/Telnet/SSH_and_the_Command_Line#SSH
On Linux use cron to schedule reboot, and windows use Windows-Scheduler to execute command using putty.
Comment: A lot of the smaller DD-WRT builds don't support SSH--only telnet, but it's the same basic principle.
Answer: You will have to create a cronjob for this.
Log on with ssh or telnet
Create a crontab by running:
# nvram set cron_jobs="00 00 * * * root reboot"

Commit the changes so they're still there after the first boot:
# nvram commit

Comment: In addition to Alex Toombs' answer, you can also add cron job in your router's web administration: **Administration** - **Management** tab - **Additional Cron Jobs** field: insert `00 00 * * * root reboot` (or in my case `0 3 * * 4 root reboot` so it reboots every Thursday 3:00 am).
Comment: To clarify, this shell command (`nvram set cron_jobs=...`) and the field in the Administration interface set the same variable.
Answer: I have a Linksys WRT-54GL running DD-WRT and have the same requirement.  I've found that the scheduled reboot doesn't work so put a timer on the power outlet.  Get a digital one so you can set the downtime to be 1 minute at midnight and you have a scheduled reboot.
Comment: Huh? Which timers have settings where you can turn something off *then on* quickly? This is a modem we're talking about: he wants it turned on immediately after it is turned off.
Comment: Digital timers, like you use the schedule lamps going on and off in your house to make it look like you're at home generally can be set to a resolution of a minute or two.  A reboot cycle takes about a minute from power off to serving internet again anyway so a 2 min disruption at 3am isn't going to be too much trouble.  I've heard of UPSs that have a similar feature.
Comment: I saw chatter on the web about scheduled reboot not working, but the entry for that bug in dd-wrt's Trac site was closed as having been fixed. Do you have the latest version?
Answer: There are low tech solutions also. You can use a light timer such as this. They also make digital ones that are more customizable.
FYI - taken from my answer to http://www.radioshack.com/product/index.jsp?productId=4405611&clickid=prod_cs

Periodically reboot dd-wrt


Coverage fatal error (EclEmma)

Question: I am using Eclipse Mars 4.5.2. When running coverage tests for my application, which has 317 test methods so far, when it's about to finish (around 274 methods run), I am getting errors I can't find a solution to.
First a popup window saying:

No Coverage Data
No coverage data has been collected during this
  coverage session.
Please do not terminate the Java process manually
  from Eclipse.

A secon popup window:

'com.mountainminds.eclemma.internal.core.launching.AgentServer' has
  encountered a problem. Error while dumping coverage date (code 5013).
[Details:]
  Error while dumping coverage data (code 5013). Connection
  reset

And then the following console log:

A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000005f9b96af, pid=2024, tid=3772
JRE version: Java(TM) SE Runtime Environment (8.0_66-b18) (build 1.8.0_66-b18)
  Java VM: Java HotSpot(TM) 64-Bit Server VM (25.66-b18 mixed mode windows-amd64 compressed oops)
  Problematic frame:
  V  [jvm.dll+0x4b96af]
Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
An error report file with more information is saved as:
  X:\xxxxx\hs_err_pid2024.log
Compiler replay data is saved as:
  X:\xxxxx\replay_pid2024.log
If you would like to submit a bug report, please visit:
  http://bugreport.java.com/bugreport/crash.jsp

I have been suffering this issue for a couple of weeks and, as I said, I can't find any solution, just similar bug reports in the EclEmma site from four or five years ago.
I have tried setting the following JVM arguments for JUnit: <code>-Xms2g -Xmx2g</code>.
My tests don't have any database connection, server connection nor network connection. They don't make any HTTP request either.
I have tried reinstalling the EclEmma plugin as well as reinstalling Eclipse. The issue persisted.
Comment: Please provide the complete crash log
Answer: Update the coverage configuration. Go to the Arguments section and add below perm size argument in VM arguments section:
-XX:MaxPermSize=1225m
Comment: VM arg for permsize no longer supported past java 8. It uses metaspace now
Answer: From Eclipcse help:
If the Java VM is killed externally, e.g. with theEclipse Terminate action, coverage results can not be shown
snip:

Coverage Data Collection
Coverage data is collected and presented automatically when the
applicationterminates on its own. If the Java VM is killed
externally, e.g. with theEclipse Terminate action, coverage results
can not be shown. Inaddition intermediate coverage data dumps can
also be requested from anyprocess running in Coverage mode. Such dumps
can be triggered from thetoolbar of the Coverage view.

Coverage fatal error (EclEmma)


Representing lust in asexual beings?

Question: How could demons of lust affect/tempt beings that do not reproduce sexually, and have no sexual desire? Like, they can't even be affected by lust magic, their brains simply aren't wired for it. How could the demons tempt them anyway?
Comment: Is the answer not trivial?  You tempt them with what they desire.  That's really all there is to it.  The lines between sexual and non-sexual are just minor details.  Want to tempt something, tempt it with something it desires.
Comment: To build on @CortAmmon's excellent comment, lust isn't just sexual.  You can lust after money, power, fame, and almost anything else.
Comment: @L.Dutch Like all fun word distinctions, it looks like the line is blurry.  Wikipedia's chosen word choice is that lust is "Lust is a psychological force producing intense wanting for an object, or circumstance fulfilling the emotion."  Greed is defined on its wikipedia page as wanting an *excess* of anything beyond one's needs.  Obviously there's great overlap there, so not everyone will agree.  But it does seem like a useful distinction.
Comment: @JBH, I wish I was a linguist to make a clear distinction between lust (which I assume is desire directed to another's body) and greed (which I assume is desire directed to another's things)
Comment: This has been put up for potential closure... IMO this may not be a good question,  but it seems clear enough to me. Voting to leave open.  Let the question's votes tell the tale.
Comment: @JBH ever heard the saying ''blood lust'' ?
Answer: You are asking for a logical absurd, I think.
If a being doesn't have sexual desire, it is straightforward that sexual lust is a non concept for it.
The only way would be for the demon to turn the being into a sexuated one, and once the hormones have done their job, tempt it with the arts in which it is skilled.
Comment: 'Hormones' just aren't enough, in mammals non sexual excitation elicits sexual behaviors because that's how the brain is wired. That is, non sexual stimulation can produce 'humping' actions, erections etc because that is (some of ) what the body is wired to do when excited, the later 'control' of these actions is learned environmentally (socially.) If a neurological system lacks even the pathways on which to build a cognitive or behavioral concept, that concept may as well not exist, as relevant as a black hole to a decision about what to have for dinner.
Comment: The demon clearly has the same problem. An attempt to manipulate something you fundamentally fail to understand the motivations and mechanics of (one might theorize, but the actual functioning and deduction is alien,) is like asking a 2 year old to write assembly.
Answer: Asexual creatures might not have lust, but they have an urge to reproduce - at least real biological ones do. So your demon could trigger all the behaviours which lead up to asexual reproduction. Amoebas want to feed, grow and split in two. Greenfly want to feed and give birth as often as possible.
If your creatures are non-biological, like robots or golems, perhaps they'd be possessed by the urge to build more of themselves.
Answer: If you take the wider definition of "Lust", you may affect them with some other aspect of life. Maybe a good wine, extravagant clothing, luxury and the like. Every desire considered sinful in that society could be stuff to work from.
Maybe the demon could tempt them into "worlds of emotional pleasure unknown". That does not have to mean sexual lust to them! Maybe the things they are known to.
Answer: Short circuit.
Posted answers so far are sensible.
Another approach to this would be to have the demon magic act like a short circuit.  If you give power to a circuit that does not exist or is wired in an unexpected way, you can get unexpected results.  The turn signal turns the windshield wipers on.  The horn comes on instead of the headlights.
In your species, the applied magical juice has unexpected effects.  Certainly something is going to happen.  What that will be is not predictable.  That will be good for a story!
Answer: If you still wanted it to be "lust" driven, you could write it almost as if it was an asexual human. Which, rather than sexual feeling, they would feel discomfort or agitation or just overwhelmed.
Answer: Cheers for making a question that is difficult to answer while at work!
Please exchange "Almost Aggressive base desire for another being" with a certain S word that my company's internet security will be flag up as inappropriate!
If it is specifically "basal desire for another being" lust that you are wanting, then the simplest way is to have your target species previous have been capable of regular desire toward another, and then over time that species evolved more towards A... sigh... procreation with themselves... over time the hormones that drive lust or regular desire toward another in this species stopped being produced, but the recepters are still there, then all your demon has to do is through handwavium inject some of that hormone into the creature and then they'll experience the lust you want.
Most likely they wouldn't know what to do, but oh well.
Other than that other have already answered perfectly good work arounds
Answer: So here's an example from Dragon Age. The Desire Demon. And do you know what most people desire? How most people get trapped? Mostly, it's home, safety, family--not sex.
So this really depends on your demon. If it's simply a succubi or succubus, then they are a SPECIALIZED desire demon, and if that's all they know how to do then--sure--an asexual person would be difficult or near impossible to use/trap/seduce.
Lust is a word that can be applied to wandering, to power, to many, many other things. Desire isn't just sexual. People want a caring and loving mother, the desire demon pretends to be her, acting in just the way they've always wanted, not the reality. A heart's desire can be many things. We can lust for many things.
Even if there's no sex, there's bound to be intimate relationships. This is all dependent on how the demon's power works.
Answer: Speaking from a human perspective. There are some people who claim to have no sexual desire, and call themselves asexual. Part of the LGBTQA spectrum. If they were told they didn't or couldn't have any sex at any time for the rest of their lifes, they would be content. Unlike the vast majority of the human population!
However, while asexuals don't desire any sexual relationships, some do require and desire romantic relationships. Ie, they have a mental desire for a romantic relationship with a partner of their choosing. Eg someone could be asexual and biromantic or asexual and heteroromantic etc. See the asexual forum Aven and others for more information.
Your asexual aliens could simply have a large desire for deeply committed romantic mental relationships with a partner, that has no sexual conotations. Your lust/desire demon could ramp this romantic desire up to 11 or down to 1. Causing all sorts of issues where the affected alien becomes super clingy or soppy or jealous or stalkerish etc. and the romantic partner is put off by this uncharacteristic change. "You are not the person I the fell in love with, Goodbye!" Breaks the affected alien's poor romantic heart.
Answer: Just because a being is asexual does not mean they cannot lust. First you have to define assexualism in more detail.
A good example of this is an ongoing show in Cartoon Network: Steven Universe. The main characters are assexual aliens. They do not reproduce sexually, but are rather built from raw materials. They don't even have the concept of sex. There is only one ever known case of one such alien learning about sex and doing it, and it is unknown if she enjoyed the act. Most of their society loathes organic life and things associated to it, and the aforementioned act is considered more than taboo and one of the worst criminal acts in their history, punishable with death.
As you can see, they dislike sex more than the average assexual human.
Yet they are able to perform an act which is even more ecstatic than sex: two or more aliens can temporarily fuse into one. For the time they are fused, they become one single being, with a new name and identity. This is seen as the supreme act of intimacy, and many aliens have a drive for it that can only be described as lust. The act of fusing usually involves a dance, which may be sensual or erotic for human standards.

Drawing from this exame, if a creature does not reproduce sexually, but has some sort of social interaction which can cause an ecstasis similar to what sex does to humans, the demon can capitalize on that. Some beings might have a lust for intimacy rather than for coupling, others might orgasm only to music, whereas others might be turned on by roleplaying in a non-sexual way. Even potatoes might do the trick. It then becomes just a matter of finding out what the demon's mark's kinks are.
Answer:
could the demons tempt them anyway?

By showing them what passion and sex feel like, make them vision of having sex with someone they love, even if they don't love anyone...
Dreams can be quite realistic,
for example more than once I had erotic dreams and I literally felt the exact same sensation of real sex, before I even had sex for the first time.
Answer: In Pokemon, various species of Pokemon can have genders, and some of the moves available use the gender differences against their opponent.  For example, the move Attract will give a status condition where the afflicted Pokemon will have a percentage chance of ignoring the attack and doing nothing for a round if the opponent's Pokemon is of opposite gender, regardless of species.  It's essentially a lust increasing attack.
A Pokemon species can either be gendered or genderless.  For those species without gender, the move Attract (as well as any other handful of moves that are gender dependant) will simply fail if used on a Genderless Pokemon.  I would recomend this.  Biologically Asexual species (species that reproduce without sex, as opposed to a individual member of a sexual species that has no compulsion to engage in reproductive activity) have no mechanisms to induce a state of lust (i.e. Hormones) as these mechanisms would biologically tax the species without benefit.  Evolution favors survival efficiency, and thus every part of a biological creature subject to the rules of Darwinian Evolution (as opposed to Pokemon Evolution... which isn't a thing) is a feature that is optimized for survival, fuel intake, or reproduction of the species.

Representing lust in asexual beings?


What is the best way to store objects on disk in java?

Question: I want to save ANY kind of objects in a file and restore it anytime.
I use this for a object-oriented storage which I want to make. Serialization isn't a solution because many classes don't implement Serializable.
Thank you
Comment: Possible duplicate of http://stackoverflow.com/questions/239280/which-is-the-best-alternative-for-java-serialization ?
Answer: Some objects were never meant to be stored and retrieved, and would break in spectacular ways if you tried.  Anything that uses native resources (file handles, sockets, etc) is a prime example.  That's why the Serializable interface exists; it serves partly as a guarantee that writing the object and reading it back won't cause bizarre issues.
If you wanted to try it anyway, you could conceivably use reflection to get the object's contents and stuff them into a file.  But that would be a really bad idea.
Answer: If the objects are your own, simply implement Serializable. If they are owned by others then badger them to do likewise, or roll your own serialization mechanism (potentially using reflection).
Bear in mind that the latter process is very fragile (depending on the internals of another class), and may be completely inappropriate if the class contains non-serializable objects like file handles or sockets.