Is there a term to describe a woman that looks at men purely as objects of sex

Question: The term "pig" is colloquially used to describe a man that looks at women purely as objects of sex. Is there such a term that describes a woman that looks at men purely as objects of sex?
Comment: "Pig" as an insult is rather broader than that, covering a wide range of undesirable personality traits, mostly tending toward those that might be considered "unrefined".
Comment: If you're in polite company, you can say, "She's hot to trot." (US)
Comment: i have heard "empowered" used this way before.
Comment: @smithkm, point well made.
Comment: I thought most *pigs* today were ***greedy*** people (the *male chauvinist* variety having surely all died of old age by now! :)
Comment: "One of my crazed admirers."
Comment: This has already been covered. Search for  "stud" on EL&U.
Answer: Man-eater might work depending on the context. Also player.
Answer: If the woman is older and is interested in younger men, then the word cougar may be used.
From Wikipedia:

Cougar is a slang term that refers to a woman who seeks sexual relations with considerably younger men. ABC News states that these women pursue sexual relations with people more than eight years younger than they are, while The New York Times states that the women are over the age of 40 and aggressively pursue sexual relations with men in their 20s or 30s. However, the term can also refer to any female who has a male partner much younger than herself, regardless of age or age difference.

From Wiktionary:

(Canada, US, slang) A woman of middle age who actively seeks the casual, often sexual, companionship of younger men, typically less than 35 years old; by implication a female "sexual predator".
Answer: Perhaps, a Damalidares, a mantrap (slang), a dominatrix
Answer: sexual predator, or just predator
sexual exploiter
slut
hook-up
loose woman
promiscuous
indiscriminate
looking for anything in pants


Perpendicular distance with dot product

Question: I'm trying to find the perpendicular distance distance between a line given by a directional vector traveling from the origin to some point A and point B in 3D space. I dotted the vector OA and OB and found the angle between them using the dot product of the vectors. Can I use sine theta multiplied by magnitude of OB to find the perpendicular distance? Can I find the directional vector of the perpendicular by multiplying OB by sin theta? If not could you explain why?
Answer: Vector $OB$ is in the direction of $OB$? If you multiply it by a scalar such as $\sin\theta$ its direction will still be parallel to $OB$. Not perpendicular. Look up rejection of $OB$ from $OA$ to see how to do it.

Perpendicular distance with dot product


What's the meaning of the letter ,,s" at the end of the word good in the following sentence ? (Also what is the entire meaning of it ?)

Question: It's an excerpt from the movie "The Shining"
Jack Torrance: You've had your whole fu**ing life to think things over, what good's a few minutes more gonna do you now?
Comment: quotation marks in English are " ... "  not ,, ... "  It's easy to forget this kind of thing when writing, but it makes your punctuation look completely alien.
Comment: What good is a (period of) a few more minutes going to do you?
Comment: Yeah, i know, sorry. It's funny that you mention this because i learned about that literally in the middle of writing that post(as you can see, only the title has differently styled quotes). I read on the internet that only some parts of Europe use bottom quote sing and that's why it's not on any keybord(i was always using double comma for that).I'll stop doing it now :)
Answer: "what good's" is a contraction for "what good is." Contractions are common in speech.
The meaning is: "If you have not been able to come to a conclusion after thinking about something for your entire adult life, you are extremely unlikely to reach a conclusion in the next few minutes."
Comment: Yes. It means "what are a few minutes going to do for you now." That "do you now" is uneducated or very careless speech.
Comment: Hmm, i was suspecting it would be that(and it's bad because it will be hard to understand, for me), but it's phrased in an odd way to me . For example, a sentence like this: "what good is a few minutes more if the job will take hours"-is perfectly comprehensible to me. Or if the sentence from the movie was written with two sentences like this: "what good's a few minutes more ? What is it  gonna do you now?"-would make sense as well. It's as if between the words "more" & "gonna" something is missing to make logical sense for me.
Comment: I do not say it is elegant speech, but it is quite common colloquial speech.
Comment: Perhaps i don't understand what "gonna do you now" means. I know it can be spelled
" going to do you now" but whether it's the same as "going to do for you" i don't know


When doing a page preprocess, how do you know if the page is a form?

Question: When doing a preprocess on a page (I need to conditionally change something at the page template level) is there a way to tell if the page is going to render a form? The xdebug output didn't show any variables that would tell me this in an obvious way.
Comment: A page can't be a form. A page can contain a form. But we don't know how this form (what form?) got there. So, impossible to tell. You need to share more info/context. Maybe target the node ID or route name.
Comment: If your form is block, check existence of this block on the page. If it's in $page, check your URL.
Comment: As a rule of thumb, if Drupal preprocess functions doesnt gives you what you are looking for, it probably means that you are not preprocessing the appropriate element. And considering a form would be part of a region (region content?) this rule seems to be appropriate in your care.
Comment: It could be many forms. Or any form. The login page, user registration, user editing, etc. This line exists in the page template: {% set container = theme.settings.fluid_container ? 'container-fluid' : 'container' %} so usually the container-fluid class is applied. But I don't like how it looks on forms, so I'd rather apply the container class.
Answer: Since I wanted to apply a change to the page.html.twig template based on if it was a form, I looked first for the form suggestions I was given. Since I couldn't find a way to generically apply a template to all forms, I instead created a template that I would then tell all of the forms that I have to use this template. I used a hook_theme_suggestions_HOOK_alter to add my new template and check the existing suggestions to see if the forms I want to use are part of the current suggestions:
<code>function listed_theme_suggestions_page_alter(array &$suggestions, array $variables) {
  $forms = [
    'page__user__register',
    'page__admin__people',
  ];
  foreach ($forms as $form) {
    if (in_array($form, $suggestions)) {
      $suggestions[] = 'page__forms';
    }
  }
}
</code>
From here, I can add additional forms as they are needed to use this single template. So, this solution doesn't exactly answer my original question, but it solves my original problem.


Spell checker software

Question: I have been assigned a task to find a decent spell checker (UK English) preferably the free one for a project that we are doing.
I have looked at Google AJAX API for this. The project contains some young person's (kids less than 18 years old) data which shouldn't allow exposing or storing outside the application boundaries. Google logs the data for research purpose that means Google owns the data whatever we send over the wire through Google API. Is this right? I fired an email to Google regarding the privacy of data and storage but they haven't come back. If you have some knowledge regarding this please share with me.
At this point our servers might not have access to external entities that means we might not be able to use Web API for this over the wire. But it may change in the future. That means I have to find out some spell checker alternatives that can sit in our environment and do the job or an external APIs.
Would you mind share your findings and knowledge in this regard. I would prefer free services but never know if you have some cracking spell checker for a few quid's then I don't mind recommending to the project board.
Technology using ASP.NET 3.5/4.0, MVC, jQuery, SQL Sever 2008 etc
Cheers,
Naren
Answer: GNU aspell might be suitable for your needs.
Answer: Yandex provides one. It is mainly targeted to Russian-speaking auditory, but it contains a dictionary for the English as well.

Spell checker software


How to handle a valuable feature that is missing on 99\% of the samples in the data set?

Question: Suppose we have an input feature that is highly predictive of the outcome we want to predict. However, the feature is missing on 99% of the samples in the data set. What is the best way to use this feature in building a prediction model? Any ideas would be greatly appreciated!
Comment: The best way would be to redo the data collection stage, and this time make sure to capture the value of this variable. There's no magic, if you don't have the data you can't use it ;)
Answer: Its best to remove such a variable. Reasons are following:

Artificial imputation can add bias and result cannot be justified because 99% data for the particular variable was artificially created.
The variables/features that you choose for building the predictive model should have low correlation with the target/outcome variable/feature. Because, variable that are highly correlated with the target/outcome variable reduces the model predictive performance.
You want a model which has low bias and low variance.
Comment: regarding your second point: is it not actually ideal if we have a feature that is highly predictive of the target outcome? At the end of the day, that's how we want a good model to do: accurately predict the outcome.
Comment: Also, about your 3rd point: how do input features being correlated impact the model variance? It is not very clear to me
Comment: @user2348674 reading your questions gives me a strong feeling that your fundamentals in applied statistics are unclear. I recommend the book [**Applied Predictive Modelling (Kuhn & Johnson, 2013)**](https://link.springer.com/book/10.1007/978-1-4614-6849-3). Read it, will help you clarify your doubts.


Galaxy Nexus 6:30 minutes to copy 128MB over WiFi, is it normal?

Question: I use the Galaxy Nexus GT-I9250 and the WiFi is very slow, I copied a video (128MB) from my computer and it completed in 6:30 minutes, is that normal? It seems slower than over 3G.
I used ES File Explorer to copy and I was logged in with the Windows User/pass.
Comment: Is it consistently slow? How about its speed on other WiFi networks?
Comment: Depending on your WiFi signal strength, it might be slower or faster. Given an average speed of 30 MBit/s (at a 54 MBit connection, that sounds quite reasonable; also taking into account that CIFS has a little overhead), the transfer should have taken between ~30s and a minute. Everything above that I wouldn't count reasonable. Check your WiFi speed, as Peanut already pointed out. Other WiFi networks on the same channel might also reduce speed; in that case, configure your WiFi AP to use a different channel.
Comment: Is your copmuter on wifi, or a wired network? Copying between two wifi devices on the same AP is normally far slower than copying from a wifi to a wired device, due to collision problems.
Comment: I was copying from a laptop on same WiFi router. I will try copying a similar file when computer is on cable and test the WiFi channel too, then reply. Thanks.
Answer: Since you were both uploading and downloading simultaneously and upload speeds are usually much slower (I figured yours must have been around .33 MB/s), then that doesn't seem totally unreasonable depending on other variables.


Decoupling microservices with gRPC

Question: I'm setting up a microservices architecture, and am confused about how gRPC can loosely-couple services (compared to a pub-sub message service like Kafka).  Doesn't the request go directly to the server, and not through a pub/sub system?  While gRPC supports asynchronous requests, should I still use pub/sub as a buffer between services to scale them independently?
Comment: Whether or not a request is a queued pub-sub message or a direct client-server call has nothing to do with how tightly coupled two services are.
Comment: It might [interest](https://programmaticponderings.com/2017/05/08/decoupling-microservices-using-message-based-rpc-ipc-with-spring-rabbitmq-and-ampq/). Basically, you don't do it without a message broker or a queue. There would be always p-2-p communication somewhere. The important thing is that the IPC allows services to remain unaware of each other.
Answer: gRPC and queues / brokers are not mutually exclusive. We could choose one, both or none. We could also use an SMTP server as a queue, or a plain text file.
In other words, they complement each other because they satisfy different purposes.
Decoupling
Think in a pipeline where stages are Services.
<code>[Service A] < ----- > [Servicie B]
</code>
Arrows denote cardinality and dependency.
Both services are client and server at the same time. A is  client and server of B. And vice-versa. Regardless the protocol, the IPC here involves services being aware of each other.
Now, set a queue or broker in-between
<code>[Process A]  <----- > [Queue|Broker] <------> [Process B]
</code>
Arrows denote cardinality or dependency.
Queues and brokers break the cardinality between services, hence the dependency. They no longer need to be aware of each other. We could drop any of the services or change them so that the other remains unaware of these thingse.
Adopting features
Queues and brokers are usually designed to be performant/reliable/consistent/scalable/resilient  I/O and we can provide our architecture with these features by implementing one or another. For example,  gRPC is a transport mechanism for request/response and (non-persistent) streaming use cases. If we can not afford missing messages, we probably will have to look for alternatives or complementary architectural components. Queues and brokers might do the job. Persistence is not the only feature to provide our IPC with. To mention a few

Message consistency and persistence
Catching and batching
Error handling
Failover
Retry
Scalability
Modularity or compartmentality (having dedicated brokers or queues)
Compatibility with several protocols out-of-the-box
Traffic traceability
Traffic monitoring
Tooling

Related links
I found this blog post which dives a little more into the subject.
Worth a mention the Nginx blog post about Microservice and IPC implementations.
Answer: gRPC can do asynchronous requests, but it is still an RPC pattern and so that is mostly for when you don't care about the answer, not for implementing message (sub/pub) systems.
What I do is, if I need RPC I use gRPC for the communication and ProtocolBuffers to serialize the data, and then when I need messaging I use AMQP, also with ProtocolBuffers.
It makes sense to have the gRPC buffer the data through a messaging system if you need to scale it, have routing between servers, or if you want features like offline messages and also message receipt notification.
My advice is to diagram the communications scenarios on paper, and it should be clear which type of service you need.
Also, note that using gRPC is mostly turn-key and AMQP isn't; generally messaging systems will require you to write a lot of code. If you're not really scaling it very much then it might be an excessive amount of work. Also, I think it is rare that you would want both; the RPC pattern is mostly a subset of the messaging pattern. If you're going to outgrow RPC, use messaging from the start IMO.
Answer: Yes the request will go directly to the server.
gRPC allows a developer to generate interfaces for the various services.  Clients only need to depend on the interface and not an implementation.
typically interfaces can be designed to be backwards compatible. So when a service changes, new functionality is added to the interface and no functionality removed.  Therefore old clients can talk to newer versions of the interface while new clients can access the new features.  Once all clients are upgraded then old deprecated parts of the interface can be removed.
Comment: This doesn't really answer the question

Decoupling microservices with gRPC


What extra power do addons/extensions have?

Question: Compared to scripts within a page, what extra powers do addons/extensions have? They are essentially scripts, then what makes them so special? Beside being static, have buttons on the toolbar, and be able to see the locations of other tabs, what extra functionalities do they provide over scripts on a page?
Answer: Scripts on a website are generally sandboxed and are limited in what they can do (for security). In contrast, extensions can live outside of the sandbox and interact more with the browser and system. For example, some extensions can manipulate browser history, browser preferences, intercept and modify pages, access your clipboard, or even execute arbitrary code on the system. Taking a look at the Chrome extensions permissions warnings can give you a pretty good idea of what Chrome extensions can do (and which most scripts can't). Also check out the chrome.* APIs which extensions have access to.
Answer: It depends on the browser.
For example, in Firefox an extension can open a file on your filesystem, write arbitrary bytes to it, then run the file as an executable.  Or put another way, it can do anything Firefox itself (or more generally, any program run by the user running Firefox) can do.
Answer: An extension is always around and theoretically works on every site (or on no site at all), while a script within a page only exists within that page. So unless you're talking about a VERY specific function/script only for a specific site, addons are more "available".
Comment: Actually, yeah, I'm wondering what extra functionalities extensions can provide.


Running Assembly programs in command prompt w/ windows 7

Question: I was wondering how to run debug in command prompt in Windows 7. I have looked this up online, finding only that you can find the debug.exe in the System32 file, but it is not. If this is not possible, is there any other comparable program for compiling and editing Assembly programs?
Comment: http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx
Comment: `debug.exe` is not a very nice assembler; e.g. it doesn't even support labels for jump targets.  https://thestarman.pcministry.com/asm/debug/debug.htm.
Answer: You don't compile Assembly code, you Assemble and optionally Link.
Popular Assemblers:

MASM/MASM32
FASM
NASM
JWASM
YASM
GoASM
PoASM

Many are able to Assemble 32 or 64 bit instructions.  All will run on Windows 7.  I think all will also Assemble 16 bit code, but 16bit DOS apps will not run on Windows 7 without a DOS emulator.  You could use D-Fend Reloaded which is a DOSBox Frontend and works well.
A good free debugger is OllyDbg
To edit Assembler source files, all you need is notepad really.  You could use Visual Studio.  I use Geany on Windows and Linux.  There is also RadASM v2 which is a good free IDE for with a resource editor, also RadASM v3.  WinASM is also a decent Assembly IDE.
Answer:
If this is not possible, is there any other comparable program for compiling and editing Assembly programs?

Here is a 32-bit assembler that might work.  And here is a 64-bit assembler, it looks like it comes bundled with visual studio 2012.
Answer: According to this page: http://www.kerrywong.com/2009/05/08/ms-debug-1981-2009/ there is some replacement:
64-bit
http://www.microsoft.com/whdc/devtools/debugging/install64bit.mspx
32-bit
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx
Answer: I use MASM32 SDK. For performance out of this world.


Making a linked page more obvious?

Question: I've got a portfolio much like the one displayed below. One of the people who I have shown the portfolio to, asked if I could put some live version of the game/web page in action, or have some video of it. This is exactly what I have when you click on the actual title which is a link. I'm wondering what is a good way to make it more obvious that you can click the text and be linked to another page?
Comment: You could make only part of the title, either before or after the hyphen, a link. That way the differentiation in for example color within the title would make it obvious there is a link in there.
Answer: Users are used to links being underlined and coloured (usually blue, as that's the default browser behaviour), so these are probably the most obvious ways of conveying affordance. Giving the links a hover state (even if that just means intensifying the font colour) is also a useful cue.
If underlining and colouring these titles is a problem - for instance, if your chosen visual design doesn't allow it - then other strategies include only underlining in the hover state (still trying to use a blue title colour by default if possible), and ensuring the text in the link hints that it leads to more resources.
Another idea is to bring the resources you're linking to upfront. If there are photos, you might want to indicate the presence of a gallery. If videos, consider showing a small video player that opens a larger viewport in a lightbox or modal window. This will not only make the content more discoverable, but they also mean a user can immediately guess the value of clicking further media links, as you've already proven you provide relevant content.
Answer: Well, the most obvious change you should make is to underline your links.
Although written in 2004, Jakob Neilsen's article Guidelines for Visualizing Links is still very appropriate.

Textual links should be colored and underlined to achieve the best perceived affordance of clickability, though there are a few exceptions to these guidelines.

However that's only one point. Even if your titles were underlined it's not clear what they are links to. You should add in an actual link within the body copy 'See a video of this game in action' or 'Play a demo of this game' linking off to the video / game demo. Don't make the site visitor have to think, make links as obvious as you can, and make it clear what the links are taking them to.
Comment: You could stick a big 'play' button on the image... like this: http://www.bbc.co.uk/news/uk-wales-18387520
Comment: +1 for pointing out that affordance is only one side of the coin - there's no point telling users a link can be clicked if we don't indicate *why* they should click.
Comment: I will keep the style how it is, and add a combination of what you said and what Jimmy said in his answer. I will add some symbol or text indicating to a user that there is a video of another page attached to it!
Answer: Good points on the text content but I have to disagree about link underline - I don't feel the current convention is to have links underlined. Certainly not when linking within a site's content which you basically are (it is still your content).
Underlining text has issues for readability
Interestingly smashing magazine have addressed this by making the underline more subtle ... I think this works well (other places use dotted lines):

The truth is that Google aside, you see underline less and less on the web. I think this is mainly for aesthetic reasons. Ask most graphic designers they will say the same. This has become the convention. Underline creates too much data ink. It looks noisy.
Instead some sites use underline on hover as this site does (StackExchange) and Apple. Not really sure of the value of this as by that point presumably the user usually already has an intention to click (interested to know what others think).
Most web sites use a color shift to indicate a link and the color chosen depends on the graphical conventions on the site. Facebook made a good choice in choosing blue as their signature color as Google state they have run the definitive test which finds that blue links are clicked on more often).
My personal rule of thumb on web sites is to make everything that is clickable the same color (e.g. buttons and links) and that will be one of the key colors of the site.
In webapps it can get more complex. For instance as I note on StackExchange some sites attach different functionality to different colors e.g. grey text are links to functional parts of the web app and blue are links to content.  As ever you have to design for your context/complexity.
So for this example I would simply highlight the title text of the two links in Orange.
Update
Adding a play button on the images is also good idea (as suggested by PhilW's comment below). Lots of research shows that people tend not to read text but do play attention to images.
Comment: A dotted line under something is by convention an indication that a title will appear if you hover over it (e.g. `CSS`)
Answer: This post by the Baymard Institute titled "UI: Proper Indicators for Hidden Elements" is a great resource.
http://baymard.com/blog/trigger-indicators

Making a linked page more obvious?


Creating taxonomy terms via REST API using POST: proper formatting of json?

Question: On Drupal 9.4 here and I want to create taxonomy terms via the api. Is there a good example of what I need to POST to an API end point?
Answer: Yes, make sure you have taxonomy REST services enabled at: /admin/config/services/rest
From there, you need to just POST to the following url: mydomain.com/taxonomy/term?_format=json
The format of the json you need the following only: (fyi, its in javascript for a nodejs file running in the cli.)
const postData = JSON.stringify({
  vid: [{ target_id: 'vocabulary_name', target_type: 'taxonomy_vocabulary' }],
  name: [{ value: "some name here" }],
});

Just pass that data into https request. Keep in mind to add in your user / pass authentication.
const options = {
  hostname: 'mydomain.com',
  path: '/taxonomy/term?_format=json',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic ' + Buffer.from('myuser:password').toString('base64'),
    'Content-Length': Buffer.byteLength(postData),
  },                                                                                };


Get gpg key info

Question: I have a GPG public key, and I'd like to know its name.
The key can be a file containing a text, or just the text.
Answer: There are two ways to achieve this goal:

gpg <key-file>
gpg, then the user is prompted to insert text. Now copy and paste the key text

The key name and info will be printed to screen

Get gpg key info


Where can I buy the siddur that Toldot Aharon uses?

Question: Hi where can I buy the siddur that toldot Aharon uses? I have been trying to buy it for awhile with no luck.
Comment: Try Greenfield's in Boro Park: (718) 633-8103
Comment: In such cases it would be wise if you let us know in which area you live.
Answer: I can only partially answer by identifying what siddur it is that they use.
According to this Wikipedia article:

The version of the prayer book used by Toldos Aharon Hasidim is called Brochoh u'Tehilloh.

And indeed, you can see it on the Otzar website here.
Your best bet is to try and locate it is to go to a sefer shop in the heart of Meah Shearim / Geulah in Israel.
Answer: I'd recommend actually going to their headquarters in Mea Shearim, or looking in New York City-- places where large numbers of Toldot Aharon live. They themselves would be better able to point you where to find a siddur.


Changing error message colours on different backgrounds

Question: On our site, we have different backgrounds colours for various forms, and the designers have assigned different colours for the error messages, depending on the background. I was wondering whether there were any usability issues with this approach, as error messages will not be in a consistent colour. Would it be better to have one colour to represent the error messages and use the same across all forms?
Comment: Be careful of using colour-only for alerts as not everyone percieves colour the same as others. Provide some additional visual queues (icons, words etc) in addition to colour.
Comment: You've named it – consistency. So try to be consistent in the design.
Comment: @JonW Thanks. We are also using an icon to represent each error message. But regarding the different colours, would this be a usability problem?
Answer: Yes, it would be best to display the error messages to the user in a consistent way throughout all of the forms.

Consistency and standards:
  Users should not have to wonder whether different words, situations,
  or actions mean the same thing. Follow platform conventions.

From "10 Usability Heuristics for User Interface Design"

Since the site you're working on has various forms with different background colors, you could suggest displaying the error messages in a neutral colored area. It's good that you're not relying solely on color to communicate an error to the user. Here is an example of how a neutral colored error panel could sit on a variety of backgrounds without clashing (and as you know don't rely on red text solely to communicate "error").
Answer: Repetition is an important design element to help the user from having to think too hard about what's going on or getting confused. Recognition is also important, and if they don't recognize what's going on, it can lead to frustration for the user.
http://aryo.lecture.ub.ac.id/uiux-design-principles/
There certainly may be accessibility problems related to using different color schemes and pairings. It's best to pick something that is easily visible on all themes, and something that would be easily seen by people who may be color-blind or otherwise visually impaired.
http://designinstruct.com/web-design/proper-standards-compliant-color-use-in-web-design/
Answer: You have to be CONSISTENT. Which is exactly why you need to use CHANGING colors on different backgrounds.
Colors are always perceived in relation to other colors. A gray on red looks different from the same gray on green.
See an explanation here.

The squares of the upper row appear to be gray, but they are tinted as
  shown in the lower row that exchanges between the left fives and the
  right fives.


When flowey pleads for mercy, does he really mean it?

Question: I've been trying to do a Genocide Route but when I was about to have the chance to finish the Genocide Route, on a video I saw Flowey pleading for mercy, I don't know if he really meant it, if he did mean it, I would spare him by quitting the game and just abort the Genocide Route, but if he didn't mean it, then I would just let the game kill him and then complete the Genocide Route. Did he really mean the mercy?
Comment: I don't recall it ever being possible to spare Flowey in the Genocide Route in Undertale. BlueRaja's answer is from Unitale, not Undertale. Are you referring to Unitale or a different mod of Undertale?
Comment: @MBorg: Technically, you can "spare" him by quitting the game, as OP describes. IIRC the game doesn't really have any provision for this, however, and just treats it as if you had reset after defeating Sans (so you won't get any fascinating new dialog out of it).
Answer: if you want to go through a genocide run, the only way to spare flowey is to quit. if you want to kill him, simply just watch. but if you wnt to spare him, you HAVE to leave the game. it will count as a reset and send you back to the menu, oh btw, i know a easter egg where if you name yourself "gaster" it sends you back to the intro.
Answer: Yes Flowey does really mean it. The only way to spare him is to quit the game and reset. He realized that he's not apart from the other monsters. He knows he will be killed, so he really means it when he pleads for mercy. But if your going for all endings you have to kill him for genocide route and soulless True Pacifist.


MySQL Schema Design: One Possible Values Between Multiple Columns

Question: I'm working on a schema for a MySQL database. I have tables which are derivatives of one another. For example, rather than a single "animals" table, I might have separate "mammals" and "birds" tables:
CREATE TABLE `mammals` (
  `id` INT(11) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,
  `species_name` VARCHAR(255) NOT NULL,
  `fur_color` VARCHAR(255) NOT NULL
);

CREATE TABLE `birds` (
  `id` INT(11) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,
  `species_name` VARCHAR(255) NOT NULL,
  `wingspan` DECIMAL(11,8) NOT NULL DEFAULT 0
);

The tables are separate because a large percentage of the combined columns between the two tables are unique to one specific derivative (e.g. fur_color and wingspan in the example above). The different derivatives also have very different relationships to other tables.
However in some other tables we might want to reference a specific instance of one of those entities:
CREATE TABLE `pets` (
  `id` INT(11) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,
  `owner_name` VARCHAR(255) NOT NULL,
  `mammal_id` INT(11) UNSIGNED ZEROFILL NOT NULL,
  `bird_id` INT(11) UNSIGNED ZEROFILL NOT NULL
);

The above example would allow us to specify what species of animal each pet is, but there's a problem: the pets schema allows for values to be entered in both the mammal_id and bird_id column while in reality I only want to allow input in one or the other.
What is the best solution to this issue? I was considering a check constraint but according to the MySQL Reference Manual:

The CHECK clause is parsed but ignored by all storage engines.

Should I simply replicate the constraint as a trigger that throws an error, or is there a better solution that I'm not thinking of?
Answer: id, species_name, dominant_color, owner_id,
type ENUM('mammal', 'bird', 'reptile', 'arachnid', ...),
other_characteristics TEXT

Where other_characteristics has JSON in it.  You can add whatever you want there.
Other tips:  Do not blindly use (255); use some reasonable limit.  Once wingspan is in the JSON, you can get rid of the ridiculously precise DECIMAL(11,8).


How do I calculate the strength to weight ratio of a material

Question: I want to manufacture something using metal 3d printing. And I'm now choosing the material. Stainless steel is stronger but much heavier than aluminum, so I want to calculate which material can achieve a lighter weight with the same performance. I know titanium or other super alloys such as scalmalloy is better but they're just too expensive.
Answer: The best strength to weight ratio depends on the type of loading. I.e. if the loading is in tension of flexure the strength to weight ratio changes.
A unified way to access materials is the concept of material indices, which help creation of Ashby charts. For a given loading you can access different materials.
i.e. the optimal material for strength to ratio

for tension is the one with the highest $\frac{\sigma}{\rho}$
for pure bending is the one with the highest $\frac{\sqrt{\sigma}}{\rho}$
etc

figure: Ashby diagram
Answer: You need to know what kind of loading and geometry you have. You also need to know if you are volume limited or mass limited. You can't just have a part of identical geometry and compare. You need to compensate the geometry for the material used.
For example, aluminum is three times less dense than steel and has three times lower tensile strength (measured in force per cross sectional area). But tensile strength is not the only strength. In bending, one side is under tension while the other side is under compression, and often the primary mode of failure in bending is on the compression side where it buckles. This is highly dependent on volume of material so it helps if the material is less dense so you can use more volume of it without increasing mass.
For example, compared to a steel rope of the same cross sectional area, an aluminum rope will be one third the mass and one third the tensile strength. But if you designed that aluminum rope to be three times the cross sectional area as the steel rope, then it would be about the same mass and tensile strength.
However, it would have much higher bending stiffness (triple the cross sectional area works out to be $\sqrt 3$ increase in radius and I believe it is raised to the power of three so 5 times stiffer) and usable bending strength (i.e. before it bends or yields unacceptably) because the larger cross sectional area means there is much more material away from the axis of bending. This would matter if instead of a rope, you were designing a pillar or beam. This metric of how much material is positioned away from the bending axis is called the second moment of inertia and is used in with the strength of materials numbers in the strength calculation.
It's why a hollow tube is not as strong or as stiff as a solid rod of the same diameter and material, but is almost as stiff and strong but weighs much, much less. It's also why I-beams have the flat horizontal caps to position space apart the opposite sides of the beam that are in tension and compression.
It's why a board of plywood is stiffer and has higher bending strength (which is when one side is under tension and the other side is in compression) than the sheet of steel if they both have the same mass. The plywood board is going to be thicker since it is less dense. But the sheet of steel might still have higher tensile strength the plywood board. Two different aspects of strength.


more votes than views

Question:
Two votes but one view?
Answer: Views are not written to the database instantly.  Views on the site are buffered and then written to the database once a site threshold is reached.
Answer: I can't find a text reference, but I heard Jeff Atwood explain on the podcast a couple of weeks ago that the SE engine counts views very conservatively, to avoid multi-counting individuals. If you want to know how many times a page was actually read, it's pretty safe to mentally double the nominal view count.

more votes than views


Does a Canon 18-135mm have a wider field of view than a Canon 24mm?

Question: Beginner looking to buy a DLSR and looking at lenses. My goal is for wide-angle landscape.
My question is: Is the 18-135mm lens wider than the 24mm since it has a 18mm minimum, which I'm assuming the lower the wider angle?
Comment: Bigger question is why are you limiting yourself to those two lenses?
Comment: I wouldn't suggest either of those lenses. Go wider. I'd suggest 14mm or so widest and not such a wide zoom range.
Answer: If using it on the same camera yes.
As long as the sensor size remains fixed the angle of view is determined by the focal length. And 18 is lower than 24 so it is wider.
Answer: A 18 thru 135mm zoom is the focal length Canon markets as an entry level lens for its line of APS-C format cameras. This format is the digital counterpart of the film camera system known as the Advanced Photo System – Classic format. The sensor (film size is 66% of that of a full frame 35mm format. Don't be upset by the fact that this format is smaller than the full frame which is 24mm height by 36mm length. Your camera's image sensor is 15.1mm height by 22.7mm length.
We fit lenses base on need keyed off by corner to corner (diagonal measure) of film or digital sensor.  If we mount a lens with a focal length that is equal to the diagonal measure, the angle of view obtained is approximately 45°, camera held in the horizontal (landscape position).  Such a lash-up is said to deliver a "normal" angle of view, some say it replicates the perspective we think is "normal".
The diagonal measure of your camera is 27 ¼ mm. Zoom to about this focal length and you have set your camera to "normal". OK to round this value up to 30mm and call it your normal.
If you zoom twice normal = 60mm, you enter into the realm of telephoto. When set to 60mm your camera images objects double size. Based on 30mm being "normal", mount 8 x 30 = 240mm lens, your view is approximately the same if you were viewing with 8x binocular.
Likely you have discovered that when you do a head shot and the camera is too close, facial distortion creeps in. The nose reproduces too large for the ears. The solution is simply to step back. For portraits we use as zoom setting of 60 – 75mm. This forces us to step back.
Wide-angle starts at 70% of "normal" = 20mm = 60° angle of view
Zoom to 18mm lens delivers  64 ½ ° angle of view
Mount a 24mm and the angle of view is 50 ½°
Hope this helps!
Comment: Lens focal length selection is hit and miss - understanding the basics will help a lot!
Comment: Your overly complex answer is difficult to follow, and doesn't really answer the question: "Is 18mm is wider than 24mm" ?
Answer: If you are getting an APS-C camera, the 18mm setting of the 18-135mm will indeed be wider than the 24mm.
A 24mm prime that is full frame capable and used on a full frame camera, however, will be wider than either on APS-C, and wider than an 18mm used on a full frame camera that has been configured to only use an APS-C sized section of the sensor (as would happen if you were to use the 18-135mm on a full frame camera).
Lenses are often discussed using their "35mm equivalent", that means the effective focal length on a 35mm film or full frame camera.
The 35mm equivalents for these lenses are:
18mm on APS-C: 28mm* - the shorter of the two focal length considered "standard" wide angles.
24mm on APS-C: 35mm* - the longer, less wide of these two. Used by some as a "wide normal" since the perspective still looks very natural.
24mm on full frame: 24mm - considered a STRONG, but not yet extreme, wide angle - there will be pronounced visual effects due to a perspective that is markedly different from a human eye.
However, we all have gotten very used to wide angle perspectives these days due to cell phones - these tend to have 22mm to 26mm equivalent focal lengths installed. If you want to have a strong impact from wide angle perspectives in your images, indeed consider going even shorter (=wider). This gets you into so called "ultrawide" or "extreme wideangle" lenses though (20mm equivalent and below), which require some care to use - anything that is not either precisely aligned/level or intentionally shot to make good use of the perspective distortion will just look warped and sloppy.
Be aware that short focal lengths come in two basic types: "rectilinear" and "fisheye". You want "rectilinear" unless you know you don't.
*rounded to the closest "well known" focal lengths.


The closed form of of the Dirac Delta Function

Question: I know that $\delta(x)$ is the Dirac Delta function - satisfying -$$\int^{\infty}_{- \infty}\delta(x)dx=1$$Can anyone tell me a closed form of  $\delta(x)$ . I guess it might be in a form of $e^{a(x)}$ for some $a(x)$
Comment: It is not a function in the sense you are looking for. It is a measure/distribution/generalized function.
Comment: $δ$ is not a function. In particular, $δ(t−t_0)=\infty$ when $t=t_0$ is a meaningless statement.
Comment: Within the appropriate environment the closed form of the "delta function" is just "$\ \delta\ $". It's nothing like the closed form of $\sum_{k=0}^\infty x^k$ is ${1\over 1-x}$.
Answer: The Dirac delta function is not a function. Every function which is zero everywhere and "not zero" at zero has integral zero - changing the value of the function at one point shouldn't change the integral (since you can make the partition of the domain of integration arbitrarily small around that bad point).
Think about the other part of the definition $\int \delta \phi = \phi(0)$. This is closer to how the Dirac Delta "function" is defined - it is actually a linear functional (a linear function going to the real numbers) on a space of "test functions," which is the vector space of all functions (typically $R^n \to C$) that are infinitely differentiable and which are zero outside of some bounded set (i.e. compactly supported). In this case, the dirac delta functional is the linear map that takes a test function and sends it to its value at zero. It is easy to check that this is linear.
It is also true that this is a continuous linear functional when you put the appropriate topology on the space of test functions, but communicating the construction of that topology few words is exceedingly difficult (without using phrases like inductive limit of Frechet spaces, at least). If you take the space of all of these continuous linear functionals on the test functions you get what are called distributions. Intuitively, you can think of distributions as the family of functions that associate each test function to some number in a way that is linear and also continuous with respect to the maximum values of the partial derivatives of each test function. (So that if two test functions have similar partial derivatives of all orders, then they are sent to nearby numbers.)
Many of these distributions have no closed form (in the sense that you want), including the dirac delta function. (You can prove that there is no function $f$ that satisfies $\int f \phi = \phi(0)$ for all test functions $\phi$.) However, many familiar functions can be thought of as distributions, just by taking sending $f$ to the functional $\phi \to \int f \phi$ - at least if you are willing to ignore differences between functions that occur on "measure zero sets". (Which is to say, {the constant function 1} and {the function which is constantly 1 except when it is zero when it is 12} are the same as distributions. A point is a measure zero set. Any countable set is a measure zero set. The middle thirds cantor set is also a measure zero set. Fat cantor sets are not measure zero sets. Functions which are identical except on measure zero sets give rise to the same distribution because integration ignores measure zero sets.)
What is cool about this is that if you think about a function as a distribution instead of as a "function", then placing it inside the vector space of distributions actually allows you to assign meaningful partial derivatives of every order. These are called its distributional derivatives. For example, the function $H$, which is zero when $x \leq 0$ and 1 when $x > 0$, has a distributional derivative equal to the dirac delta functional. The way this works is that we define the distributional derivative to be a formal differentiation by parts (this is not nonsense - it is the transposition of the differentiation operator from the space of test functions to itself up to the space of distributions, the idea being that you can take a differentiation of a distribution and pull it down to a differentiation on the test functions it is acting on. This is like taking the transpose of a matrix, but in an infinite dimensional vector space.)
$\int H' \phi = - \int H \phi' = - \phi (\infty) + \phi(0) = \phi(0)$, where the $\phi(\infty)$ term disappears because each of the  functions $\phi$ are zero outside of some bounded set (which may vary for each $\phi$.)
If you draw pictures of these functions it makes some intuitive sense that the derivative of $H$ is the dirac delta function - there is a spike at zero, and it is zero everywhere else.
Maybe this gives you some of the intuition you are looking for.
Answer: As others have said, it is not a function at all.  Sometimes you can do something that gets close.  Though there is no simple formula, but you can sometimes use any highly peaked function of unit area.  So $f(x)=\lim_{a \to 0} \begin {cases} 0& |x| \gt a\\\frac 1{2a} & |x| \le a \end {cases}$ or a Gaussian with width going to zero are two possibilities.  Your answer should not depend on which you use. But you will always have some sort of limit to get the $f(x)=0$ if $x \neq 0$
Answer: The Dirac Delta is a distribution, that is, a linear functional
$$\delta: \bigg\{\mbox{functions}\bigg\}\longrightarrow \mathbb{C}.$$
It is an evaluation map that can be expressed as
$$\delta(f) = f(0).$$
One often thinks of distributions as represented by functions --- in this case, as a function whose graph is a spike at the origin --- and writes them as functions, e.g. $\int \delta(x)f(x)\ dx = f(0)$, but they are not, strictly speaking, functions.
Answer: I've created the following function which will approach dirac delta function outputs
$$\lim_{c \to \infty} \left [ (\frac{y}{y-x})\cdot((y-c)^2+x^2)=0 \right ]$$
The function was formed by taking the function for a horizontal line at 0, divided by a 45º line (y=x) through the origin to create a hole in the function at x=0, then multiplied by a circle with radius 0 whose origin approaches (0,∞) to create a point which approaches (0,∞). As x reaches 0 y while approach infinity to cancel out the c value (y-origin of the circle point) thus bringing the evaluation back to zero. Y can't reach infinity, only approach it (at the same rate c approaches infinity) otherwise you will be left with the undefined form $\frac{\infty}{\infty}$. For all other x-values, y will be 0 thanks to $\frac{y}{y-x}$.
Because of a limit evaluation at x=0 wolfram alpha will fail since it doesn't support this, but you can evaluate by hand and see for yourself that these terms will approach these values.


How to make flat spirals

Question: What would be the most efficient way to make a spiral curve for objects shaped as in the photo?
Answer: You may do it using Spirals of the Curve Extra Objects add on.

Activate the add on in User Preferences-->Add-ons (Ctrl+Alt+U).

Add a spiral and play with its settings (Spirals panel in a Tool Shelf).

Extend the spiral's lenght extruding the curve's points. Add a Bezier Circle in the same position as the spiral is. Scale it to give a curve a desired thickness. Apply its transformations (Ctrl+A-->Rot&Scale).

Select the spiral in Object Mode, go to the Curve Data header and set the Bezier Circle as a target of the beveled object.

Select the very top point of the curve, enable proportional editing and translate it along Z axis a bit to hide the ugly end of a curve.

You should get something like this:

To make make it gradually thinner in the inside select the very top point of the curve and scale it a bit with Alt+S using the proportional editing. Then scale it with S with a big proportional size falloff.

You may also use the proportional editing to easy change the curve's height.
Comment: Do you know how to make it gradually thinner in the inside?
Comment: I've edited my answer. Please check it out to see how to do it. Thanks for pointing it out btw.
Answer: I'd believe using a curve and a bevel object would yield the expected result.
You may change the radius to make it thinner or thicker
Comment: Could you expand your answer? Maybe add some screenshots? How make it thinner in the inside?

How to make flat spirals


Voltage drop on 2009 Toyota between alternator and battery

Question: New battery keeps dying slowly. I get 13.7 volt output at alternator but only 12.8 at battery. Thinking that voltage drop due to bad wiring between alternator and battery. Trying to trace wires but don't have diagram. Getting about 2 ohms resistance from alt to battery. Not sure if that is normal. Any help appreciated.
Comment: In addition to fuse checking as mentioned, examine three wires; two(?) main ground cables - one between battery negative and chassis, the other between chassis and engine block. The third wire is battery to alternator; this one is always 'hot' with alternator circuitry not drawing power until ignition is turned on (battery light ON) or engine running (battery light off, indicating alternator is outputting all the electrical needs of a vehicle while recharging the battery. Examine cables for corrosion and hardware connections, detrimental to the alternator and battery. Baking soda/water clean.
Comment: Just to make it clear, did you take both of these voltage readings with the engine running?
Answer: Look for an electrical box in the engine compartment on the driver's side containing a fuse rated more than 100 amps -- maybe 140 amps -- and see if that fuse is blown. You don't have a good connection between the alternator and battery. Two ohms is not normal. It should be zero ohms.
For any further detail, you'll need to say the Toyota model name.


How can I show the tab bar in Notepad++?

Question: Is there a way to force-show the tab bar in Notepad++ when in notepad-mode?  That is, when I have the asNotepad.xml file in the Notepad++ executable directory?
Comment: What's the point of this? Notepad isn't MDI; that's why Notepad++'s Notepad mode hides the tab bar by default.
Comment: @BoltClock I'd like to be able to show the tab bar in Notepad++ when dragging multiple files into a Notepad++ window. But I would also like to open a new Notepad++ instance when double-clicking a file from Explorer.
Comment: Hm, I just noticed that you'd asked this a short while back... http://stackoverflow.com/questions/9774292/is-there-a-way-to-force-multiple-tabs-while-using-asnotepad-xml-in-notepad
Comment: I guess this question should have been posted on [superuser.com](https://superuser.com/).
Answer: The latest version of Notepad++ (v6.5) allows you to select whether to hide the tab bars. It's under Settings > Preference > General > Tab Bar
Comment: I've been using Np++ for decades on multiple comps. Why would it all of a sudden enable this ckbx to disappear ?
Comment: I just installed update Notepad++ v7.7.1. I've always used Notepad++ with may files open and many tabs showing. The install of this new v7.7.1 version set the "Hide" checkbox to true as per this setting and thus I had to search for how to get back to the standard way I work with many files via many tabs ..  Normally an install would honour a persons previous settings for the application? No matter, minor thing.
Answer: What you should NOT do is hide the tab bar, and remove the asNotepad.xml file. If you do these things you will NEVER have the tab bar.
What you should do instead is setup the appropriate file associations in the Preferences so that notepad++ will simply be the default application for those file extensions.


What are some card in MTG that can change a creature's color?

Question: I was creating a deck on deck builder and I wanted to make a Corrosive Mentor combination in which I can change a powerful creature's color to black so that it can have the wither effect. Anyone know any cards that can do that? Thanks.
Comment: Why not just go the simpler route and use large black creatures?
Comment: @murgatroid99 Because then he wouldn't be building a Corrosive Mentor combination deck which alters colours to use a wider variety of base creatures!
Comment: If you're looking for advice on building that deck (or any other), you may have some luck putting together what you have on http://tappedout.net and describing how you want the deck to work.
Answer: There are a few cards that can do this. Some specifically turn creatures black:

Darkest Hour
Grave Servitude
Sinister Strength

Others let you choose a color, and make creatures that color:

Alchor's Tomb
Blind Seer
Distorting Lens
Illusion
Painter's Servant
Shifting Sky
Sway of Illusion
Tidal Visionary

And, finally, there are some cards that let you change the word "black" on Corrosive Mentor, so that it affects green creatures instead of black ones, for example:

Alter Reality
Crystal Spray
Glamerdye
Mind Bend
Sleight of Mind
Spectral Shift
Swirl the Mists
Trait Doctoring
Whim of Volrath

I've bolded all of the cards that are either black or colorless (so they don't restrict what other cards you can play). Across the last two lists, blue is the most common color, so blue is probably a good second color for this purpose.
Comment: Painter's Servant is colorless.  Other than that, all of your answer's non-bold links are to blue cards.
Comment: You're right, Painter's Servant should be bold. I fixed that. And your other statement looks correct to me.


Use cookies.signed[:user_id] in capybara tests

Question: I have this code to authenticate channel subscribers:
module ApplicationCable
  class Connection < ActionCable::Connection::Base
    identified_by :current_user

    def connect
      self.current_user = find_verified_user
    end

    protected
      def find_verified_user
        if current_user = User.find_by(id: cookies.signed[:user_id])
          current_user
        else
          reject_unauthorized_connection
        end
      end
  end
end

And everything works fine. The problem is in feature tests.
When I run this test:
require 'rails_helper'

feature 'Chat room' do
  scenario "send one message" do
    user = create(:user)
    login_as(user, :scope => :user)

    expect {
      fill_in 'message', with: 'hello friend'
      click_button 'Send'
      byebug
    }.to change(Message, :count).by(1)
    expect(current_path).to eq root_path
    expect(page).to have_content 'hello friend'
  end
end

The test log, says that the "An unauthorized connection attempt was rejected". Since the cookie is empty, it is not able to authenticate.
So how can I set the cookies in capybara tests?
I tried something do this cookies.signed[:user_id] = user.id in the test but it does not work.
How can I set the cookie like this cookies.signed[:user_id] = user.id in tests?
Comment: What is your definition of  `login_as` and where/when are you actually visiting a page?
Answer: Assuming that the login_as you're calling is from the Warden test helpers, what it does is set up so that the next request sets the session cookie in the response. Because of this you probably need to visit a page after calling login_as.  Additionally, since clicking 'Send' is asynchronous you need to wait for something to change before checking that Message.count has changed, and you really shouldn't be using with .eq with current_path if you want non-flaky tests. So all combined something like
#don't visit the page where you can fill in the message before calling login_as

scenario "send one message" do
  user = create(:user)
  login_as(user, :scope => :user)
  visit 'the path to the page where you can fill in a message'
  expect {
    fill_in 'message', with: 'hello friend'
    click_button 'Send'
    expect(page).to have_css('#messages', text:'hello friend') # adjust selector depending on where the message is supposed to appear
    expect(page).to have_current_path(root_path)
  }.to change(Message, :count).by(1)
end

should work for you


Can one be a plumber yet kosher

Question: Can one work as a plumber but still be kosher.  The job involves getting filthy etc.  or is it considered a sinful occupation
Comment: Anecdotally, I know many Jewish plumbers and know of no objections to them
Answer: Of course. There's nothing undignified about manual labor. See Bava Basra 110a:

Rav said to Rav Kahana: Skin a carcass in the market and take payment, and do not say: I am a great man and this is beneath me.

Rashbam elaborates:

Meaning, skin it for payment in the marketplace, in public view. This is no desecration of Hashem's name, and we don't apply... [the admonition against] a Torah scholar wearing stained clothes, because there's no shame in supporting yourself with manual labor.
Answer: There are professions which make an otherwise fit priest unfit to serve in the Temple. (Rambam. Mishne Torah Hilchot Melachim uMilchamot Chapter 1) because they are not dignified. He uses "Tanner" as an example.
There are professions that, if you join them, the court could compel you to divorce your wife. They are among the category of smelly and unpleasant things that linger on you when you come home. One of those professions is a "gatherer" - someone who gathers excrement for use in tanning hides. (Ketubot 77a)
Some aspects of plumbing, like septic tank cleaning, may put you at a halachic disadvantage but not "not kosher" as long as you wash after.
Comment: Interesting, thank you for the answer

Can one be a plumber yet kosher


gsl_rng_default Unresolved External Error

Question: Trying to use GSL to generated beta-distributed random deviates in C on windows.  Program will not link, giving the well known "error LNK2001: unresolved external symbol _gsl_rng_default" error message.
Problem is not with the general installation of GSL.  I can compile and call cdf functions just fine.  But, for the record:
Program has the following includes:
#include <gsl/gsl_randist.h>
#include <gsl/gsl_cdf.h>
#include <gsl/gsl_rng.h>
Configuration Properties->C/C++->General->Additional Include Directories points to the GSL-1.15\include directory.
Configuration Properties->Linker->General->Additional Library Directories points to the GSL-1.15\lib directory.
Configuration Properties->Linker->Input->Additional Dependencies has two entries, libgsl.dll.a and libgslcblas.dll.a
Program compiles and links if the line T = gsl_rng_default;is removed.
With T = gsl_rng_default; the program compiles does not link.
Tried including GSL_DLL as a preprocessor definition.  No effect on problem.
Tried #define GSL_DLL at top of program. Still has no effect on the problem.
Tried all setting options under Configuration Properties->C/C++->Code Generation->Runtime Library.  No effect on problem.
Is there another switch that has to be thrown to make this work with Visual Studio 2008?
Answer: Add "GSL_DLL" to Configuration -> C/C++ -> Preprocessor > Preprocessor Definition.


Jacorb/Tao Interoperability

Question: I have Appl A which is JacORB client and Appl B is the TAO server .
Details of execution:
a)       Appl A initially creates the object_reference for server process (Appl B) using its corbaloc URL and maintains this reference in a map for subsequent usage.
        This mean the same object reference is used for all the corba calls on Appl B.
b)       Appl A calls a inventory  method on the narrowed object reference of Appl B as created above.
c)       On Server side (TAO), the servant completes the request and sends the reponse.
d)       After a long time (I think after the timeout interval)on the Jacorb Client side I get an exception :
<code>     org.omg.CORBA.COMM_FAILURE:   vmcid: 0x0  minor code: 0 completed: Maybe
    at org.jacorb.orb.giop.ReplyPlaceholder.getInputStream(ReplyPlaceholder.java:133)
</code>
.
e)       In case, before the above request times out, if same query is again made on the server, ( uses same connection object ), both  responses are received ,processed properly
Any idea how to proceed in this case ?
My guess is that socket buffer is waiting for a flush ,thats why it always works the second time
Any idea how to force the flush on the connection object ?
Answer: Run the TAO side with -ORBDebugLevel 10 and see what the ORB prints as messages. Your TAO version is pretty old, check TAO 2.0.3 which you can download from http://download.dre.vanderbilt.edu

Jacorb/Tao Interoperability


Advice on implementing secure page with a list returned from REST API

Question: I'm new to Piranha CMS and just trying to get my head around it. I'm using the MVC implementation and I need to do the following:

I need to extend the User with a property that stores an account number.
I need a page that is only accessible once the user logs in
On this page, I need to call a REST API on another server, using the account number a parameter, to retrieve a list of documents that the user has stored on this server.
When the user clicks the document, it will be downloaded as a PDF using the REST API once again

I just need general guidance on how to do this. How do I store the account number against the user (and manage this) and do I need to create a new Region that will show the list of documents from the remote server. Is there an example of creating a new Region anywhere and maybe returning a list from SQL that I can adapt?
Any help gratefully received.
Thanks in advance
Mike
Answer:
The easiest way is to implement an extension with your custom fields that you attach to the user where you store this information.
When editing a page, go in under "settings" and select which groups should have access to your page. For this purpose I suggest creating a new group for site users that are not admins.
This should be easily implemented in either the controller or model for your page. When the user is logged in "User.Identity.Name" is the user id. Get the user, load the extensions & use the account number.
See number three.

Regards


Are private IP addresses unique?

Question: When NAT router is used for global address translation, two networks may have same private IP address. Am I right or wrong?
Comment: Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
Answer: As long as whatever routable address space either network is using on the "External" side is unique, yes, the "Internal" address space may overlap.
Answer: My internal private IP addressing and another person's internal IP addressing may be the same or similar, yes.
On a NAT router or Firewall, you have an inside interface and an outside interface. Using an ACL, or depending on your manufacturer's OS, you determine what internal traffic source is NAT'd to an external address when it crosses the Firewall or NAT router.
Out on the internet your public addresses are bought and assigned; there are no overlaps in Public address space. Overlaps in Public address space would cause serious problems.
Answer: Yes, you are correct. This is why it is critically important in business to consider this in network architecture planning. It's awful after a merger to create VPN links between offices when they all use 10.0.0.0/8 for instance.
Keep your prefixes as small as you require (with space for predicted growth), and if you are setting up multiple offices, even if you think they'll never be connected, use different prefixes. Also, use an IPAM software or at minimum a spreadsheet to keep track of what prefixes are where.
You don't want to have to do multi-layer NAT and other trickery to connect overlapping subnets, unless absolutely necessary. Guaranteed you'll get "we can't change our IPs", so what you're left with is a hard-to-document setup that resembles spaghetti.
Comment: It is interesting that IPv6 has something similar (not exactly the same) called Unique Local IPv6 Unicast Addresses. The range is `fc00::/7`, with the first half (`fc00::/8`) reserved for a global authority to make sure that the addresses would be unique. This authority has yet to be set up. The other half (`fd00::/8) is available to use, but the subnet portion of the address is required to be randomly generated to reduce the likelihood of duplicate subnets. See RFC 4193 for more information: https://tools.ietf.org/html/rfc4193
Answer: You can't use same private IP pool under one NAT device for two networks. If you have multiple NAT devices then you can use same private IP pool under each NAT device.
Comment: This is true for most NATs but it's not true universally. For example the ds-lite RFC specifies a combined deencapsulation and NAT device (the aftr element) that handles overlapping internal IP pools.

Are private IP addresses unique?


will two strains of yeast mess each other up

Question: I put an old packet of yeast into my beer and it is barely fermenting.  If I add a second type of yeast will the first one have any effect?
Answer: I think you should be good to add the other packet as long as you do it quickly, for several reasons, mainly, the if wort was aerated, the new yeast can still feed on this oxygen for reproduction and cell-wall building; also, the wort will start oxidizing right away which will diminish your beer's flavor if it's not consumed quickly.
Also, if yeast doesn't start reproducing and take up all the nutrients your wort is at a very high risk of getting infected with bacteria, and then you won't have any beer at all.
I hope you can get that beer going soon! :)
Comment: Oh btw! Keep in mind that adding a different type of yeast will give you a different beer, with other flavor characteristics, from a light variation to dramatically different, because most of the flavor in the beer comes form the actual yeast you end up pitching. So don't expect it to result in what you aimed for. In any case, go ahead and get to knoe yeast and experiment with them! :D
Answer: First, how to you know that the first yeast is barely fermenting? Do you judge just by bubbles from the airlock, or by gravity measurements? The former can be misleading, the latter are reliable. Maybe your fermentation is going well.
If it isn't, you'd better add the new yeast asap. Keep in mind, though, that whatever flavour profile had been produced by the first pack of yeast, it's gonna stay. This way, there will be impact on the end product. Also, whatever stress signals they expressed into your beer, those may also influence the newly added yeast. It's also likely that all oxygen in the beer has been consumed by the first pack, so make sure the new yeast you pitch is healthy and active (I heard that dry yeast already have enough lipids, btw, so they won't need much oxygen - just make sure you rehydrate them in lukewarm sterile water before pitching).
Other than that, yeast has no sex process, so the first pack will not interfere into fermentation character of the second one.


A question about "post it note"

Question: I dipped a sticky note in water and there was a clear difference between the water absorption in the area with glue and the one without glue. The area with glue was more damp than the one without it. I would like to know why.
Answer: I like your "why?" question. So I dig down to find out why Post-It notes stick to any surfaces, yet, when removed, it's able to post again in another place. This is my finding and it makes sense Adhesives:

Look at the back of a sticky note using an electron microscope and you'll see not a continuous film of adhesive but lots of microscopic glue bubbles, known as microcapsules, which are about 10–100 times bigger and much weaker than the glue particles you'd find lazing around on normal sticky tape. When you push a Post-it® onto a table, some of these relatively large sticky capsules cling to the surface, providing just enough adhesive force to hold the weight of the paper in the little note. Every time you attach and peel off the note, dust and dirt attach to the adhesive capsules, so they progressively lose their stickiness. But since there are so many capsules of all different sizes, a Post-it® note does go on sticking for quite a while.

I believe, when you dipped your sticky note in water, these microcapsules filled with water, which would be a thicker layer than the water in other areas. So, gum layer area contains more water, thus, that part is actually more damp than the rest of the paper.
Comment: yeah, i think you`re probably right.
Comment: but why did that sticky note retain its stickiness after i dried it? since we know if we poured  water on glue, the glue is dissolved in water and thus loses its stickiness.
Comment: These microcapsule have 'air-tight' kind mechanism. When you push it to surface, air in capsule escape and it stick by pressure difference. I bet it won't be efficient as before, though.

A question about "post it note"


AJAX photo slideshow that auto updates from folder

Question: I'm looking for a PHP/AJAX slideshow solution that reads in images from a directory and auto updates while playing when photos are added or deleted. The images should also auto size to the browser dimensions. I have searched for hours and haven't found anything that auto updates. The topic at Ajax slideshow does not show anything is nice but it uses a meta refresh tag which is not dynamic. I know how to adjust this with PHP to dynamically generate the appropriate refresh time on each cycle but this is not ideal with a page refresh. Any suggestions on how to approach this problem is greatly appreciated.
Answer: Did you tried with something like this ?
Jquery examples
Personally I love this library.
Comment: Thanks but I've seen that site before and none of them seem to handle dynamic updates from a folder.
Answer: I would set a timer window.setInterval(yourfunction, 10000); and when timer reaches 0 fire it again after grabbing new picture. You can have a callback in the same function it is way easier.
function yourfunction(){window.setInterval(yourfunction, 10000); alert("HELLO");}

For the picture either I would get the list on a table in the script or dynamically load a  php page(1st easier if you have all the pictures from a folder, 2nd easier if it loads from database)


What does recent research tell us about how English sounded in Shakespeare's time?

Question: I am interested in finding a present-day pronunciation that I could point to as close to that which was spoken in Shakespeare's era, much as if I were directing one of Shakespeare's plays and were advising performers. I am not seeking information about vocabulary, syntax, or grammar.
Comment: Check out the transcriptions in Görlach's _Early Modern English_. From my ear, they sound a lot like a strong modern Irish accent.
Comment: However interesting this post may potentially be, it is possibly too broad for our format. You might try asking for a phonetic guide to Elizabethan English, but that will probably end up in meta, where other similar posts usually get migrated to.
Comment: Pose this question on YouTube. There's a wealth of videos addressing it.
Comment: An answer here (a reference for Elizabethan pronunciation, would be a very welcome addition to our ELU meta reference guide.
Comment: [Here's a Wikipedia on the topic](https://en.wikipedia.org/wiki/Shakespeare_in_Original_Pronunciation).
Comment: There has been plenty of research on this topic, as well as many popular articles. (For example: https://www.bbc.com/culture/article/20180207-how-americans-preserved-british-english or https://www.npr.org/2012/03/24/149160526/shakespeares-accent-how-did-the-bard-really-sound) Have you tried looking for information yourself?
Answer: You could certainly do worse than consulting David Crystal's The Oxford Dictionary of Original Shakespearean Pronunciation.
The book has a companion website  where you can listen to recordings and stuff like that.


How to translate Zechariah 14:6?

Question:
Zechariah 14:6 On that day there shall be no light,
יְקָר֖וֹת
וְקִפָּאֽוֹן׃

How to translate the last two Hebrew words?
Answer: This verse is difficult in the MT. The MT for Zechariah 14:6 is:

וְהָיָה בַּיּוֹם הַהוּא לֹא יִהְיֶה אוֹר יְקָרוֹת יקפאון [וְקִפָּאוֹן]

The square brackets indicate that the written text is יקפאון, yikpa'oon, they (fem.) will stop in their tracks, although the text is enunciated as if וְקִפָּאוֹן, wakipa'one,  were written.
Compare with Exodus 18:8 which uses a word from the same root קפא (NIV):

By the blast of your nostrils the waters piled up.
The surging waters stood up like a wall; the deep waters congealed in the heart of the sea.

and Job 10:10:

Did you not pour me out like milk and curdle [solidify] me like cheese,

and Zephaniah 1:12:

At that time I will search Jerusalem with lamps and punish those who are complacent [i.e. don't move, are congealed or settled in their opinions], who are like wine left on its dregs, who think, 'The Lord will do nothing, either good or bad.'

In Zechariah 14:6 the interpretation is either a:

וְהָיָה בַּיּוֹם הַהוּא לֹא יִהְיֶה אוֹר - (יְקָרוֹת יקפאון)

or b:

וְהָיָה בַּיּוֹם הַהוּא לֹא יִהְיֶה (אוֹר יְקָרוֹת) וְ[לא ]קִפָּאוֹן

That is, either a) "On that day there will not be light - the lights will stand still"
or b) "On that day there will be neither bright light nor darkness".
Both interpretations have problems.
The first, (a) assumes that the written text is the nominal reading so that יקפאון is read as a verb,  and יְקָרוֹת is read as meaning "the bright ones", i.e. the sun and moon.
The second, (b) assumes that the oral text is the nominal reading so that קִפָּאוֹן is read as a noun, and that we need to interpolate a negative after the waw in וְקִפָּאוֹן.
The second (b) is the interpretation used in most English translations. However, for me, living in the modern Hebrew vernacular, the first (a) interpretation feels more intuitive despite the fact that second (b) interpretation appears to be a parrallel construct to the following verse, Zechariah 14:7.
Regardless of which reading is "correct", the expression אוֹר יְקָרוֹת, a brilliant light, became an idiomatic expression in post OT Hebrew.
Comment: I like "the lights will stand still". That might very well describes what happen to photons inside a black hole.
Answer: קיפאון means freeze. יקרות depends whether it describes the word before, or is it independent.
אור יקרות is a light that has a rich feeling to it, such as the light of a chandelier. I would go with this one, because without 'אור' there don't seem to be a meaning to the sentence so much.
In conclusion:
והיה ביום ההוא לא יהיה אור יקרות וקפאון
"And on that day there shall be no precios light, but freeze.
My additions are in bold.

How to translate Zechariah 14:6?


Connect Bluetooth module to PIC16F877A

Question: I have a PIC16F877A micro-controller. I need to interface a Bluetooth module with PIC. It will be connectted using UART Serial Communication. I have read the datasheet but couldn't find which exact module can be used with PIC.
Answer: For a UART bluetooth module, there are loads of cheap ones available on eBay that will work with a PIC fine.
I have used the HC-05 and the JY-MCU modules without problems.

The datasheets for the HC-05 are here and here.

Connect Bluetooth module to PIC16F877A


Import sequence of PLY meshes

Question: I am trying to import a sequence of PLY meshes, but I could not find any full explanation on how to do it. This questions seems to have tackled the same problem, but the answer is not too detailed so I cannot reproduce it. Could somebody provide me with the full details on how to do it please?
Comment: You might also try the Blender add-on [Stop Motion OBJ](https://github.com/neverhood311/Stop-motion-OBJ). It supports sequences of .PLY, .OBJ, and .STL files. It also supports geometry with different vertex counts from frame to frame.
Answer: Blender supports only a handful of mesh formats as sequences, .mdd, .pc2, and in test builds, alembic (.abc). This is done using the "mesh cache" modifier. If you have an external tool that can convert/re-export the sequence to one of these formats, that's your best bet.
Answer: This script turned out to be exactly what I was looking for. It basically loads and renders one PLY at the time, therefore you can even use a per-frame texture. Downside is that you can not previsualize the meshes as you browse through the timeline, but it did the job for me.

Import sequence of PLY meshes


What is the purpose of the 4 diodes in this circuit?

Question: I'm working on a mini UPS for my router (12V, 1A) and modem (5V, 2.5A). I've been checking out lots of DIY UPS tutorials and stumbled upon this one. It seems to do everything I need: it's got a battery with a charging and discharging setup, provides two different voltages, and switches between AC and DC when the power goes out and back on. In the circuit diagram they've shared, there are four diodes in the middle, and I'm not sure why they're connected that way. I'm also thinking about swapping out the p-MOS for a relay. It would stay on most of the time when the power's on and turn off during an outage. Will this make the switching faster or slower? I want to make sure the router and modem don't flicker off when the power switches, so speed is important to me.
Comment: Just a comment, please don't build that. There is no proper lithium battery charging circuit, at most that looks like a CC/CV module sold to hobbyists on shady e-commerce sites. It will not stop charging the batteries when they are full, keeping them at float charge, which will degrade and damage them. The BMS can't protect from that.
Comment: And "damage them" actually means "could cause a fire". There's been a spate of fires caused by incorrect or badly designed e-bike chargers so don't add to the statistics. You'll also invalidate any household insurance by making this yourself.
Comment: @M-125 And that is the problem. BMS is a last line of safety when charger has failed to do it's job properly, and that's not a proper charger to begin with. That's like not having brakes in your car because you are relying on airbag, or not bothering to take the main parachute because you are relying on the emergency parachute. What you need as a proper solution, is a proper lithium battery charger instead of CV/CC regulator. Anything with lithium batteries is not basic and straightforward, they may explode and start a fire when not used properly.
Comment: @Justme, the BMS is meant to halt battery charging once they're fully charged. Is there a different BMS module or alternative that focuses solely on protecting the batteries to prevent fire hazards, like Finbarr mentioned? I'm not looking to splurge on an expensive UPS; I just need a basic and straightforward one for my router and modem.
Comment: I understand your concern, and I'm aware of the risks associated with lithium batteries. However, this circuit has been tested by the designer and others who have built it, so it likely works with some level of safety. What we're looking for is to improve the safety of this design. Is that something we can do, or will it be challenging to achieve?
Comment: When I searched online, I found many discussions recommending the use of a BMS, indicating it's a safety feature. Its primary purpose is to prevent overdischarging and overcharging of the batteries. But what could cause the BMS to fail in performing its job?
Answer: Let's first give designators to the diodes:

Short answer: Diodes are there to block current to the input in case of a power outage, also they work as "POWER OR" to ensure correct current flow path from/to the battery and the converter modules.

When the main input is present the MODULE-1 (DC-DC converter module to the top-left) will be on and its output will be applied to the BMS through D2. So the battery pack will be charged from the output of the MODULE-1. Also, the main input will be applied to the Buck Converter and Buck-Boost converter modules through D1. The diodes D3 and D4 as well as the Q2 MOSFET's body diode (assuming SW1 is closed) block the current to the BMS from the main input so that it gets supplied from the MODULE-1 only (NOTE: The pink connection from the main input to Q2's gate ensures the off-state of Q2, apparently).
When the main input is not present the batteries will start to discharge so the pack voltage will appear across the nodes to the right of the fuse, namely A and B (encircled section). If the switch SW1 is closed the PMOS Q2 will see negative gate-source voltage so it'll turn on and the battery voltage will be applied to the buck and buck-boost modules through D3 and D4, respectively.
D2 prevents the current flow from the battery to the output of the MODULE-1. Likewise, D1 prevents the current flow from the battery to the main input.

I'm also thinking about swapping out the p-MOS for a relay. It would stay on most of the time when the power's on and turn off during an outage. Will this make the switching faster or slower?

Probably not. The commutation time for ordinary relays are generally in the range of a few to a few tens of milliseconds. If you think (or believe) that the capacitors in the system will store sufficient energy to supply the rest of the system during that time then go for it. Let's have a look:
Initial assumptions:

You'll use a 12V relay with a switching time of 5 milliseconds, and a release voltage of 8V. And the coil does not draw any current.
You use the relay's NO (normally closed) contacts in place of the MOSFET Q2, and the relay will be energised from the main input directly. Thus, when the main input is present the relay will be energised so the connection between SW1 and D4's anode will be "open".
The buck and buck-boost modules' avg efficiencies are 85%.
The loads draw the maximum currents (i.e. 2.5A from 5V and 1A from 12V). Therefore, for a presumably 85% of initial efficiency for both buck and buck-boost modules, the current drawn from the 12V input can be assumed as ~1.9 Amps (23 W).
The 1000u capacitor at the input is charged up to 12V (72 mJ).

In case of a power outage:

Within the first ~1.5 ms the capacitor will lose almost half its energy so the voltage will drop to 8V. Then the relay will start to release (Note that we assumed an avg release time of 5 milliseconds).
The remaining energy (32 mJ) will supply the rest of the system for about 1~1.3 millisecond then the capacitor will be almost empty.
The system will probably stop until the relay completes switching (2~3 milliseconds). Then it'll restart.

Note that the MODULE-1 DC-DC converter and the BMS are kept out of equation. If they are included then the holdup time will be even less.
So you'll need an input capacitor of at least 8 to 10 times to provide enough holdup time if you want to replace the Q2 with a mechanical relay.
Comment: Thank you for clarifying. Just to confirm, are you asking about the current consumption? I have the specifications for all the components. The router uses a maximum of 1A, and the modem uses a maximum of 2.5A. The total drained current from either the power supply or the batteries should not exceed 5A.
Comment: @M-125 sorry, I missed the first sentence in your question. I'm updating my answer.
Comment: Got it. I could swap out C2 and C3 with a 10,000uF (10mF) capacitor. Do I also need to change C1? The main concern with the new capacitors is the inrush current. Can I just replace the old capacitors with the new ones without making any other changes, or will there be a safety issue in the circuit?
Comment: @M-125 The whole circuit is a safety issue.
Comment: @M-125 C2 and C3 will not make a significant contribution to holdup. They will discharge to the loads straight away. The point of holdup is to maintain constant output(s) or in other words, to keep the DC-DC modules running. C1 is the main energy source for all, so it should be increased. What I meant by "capacitors in the system" was the capacitors at the inputs (C1, and the input capacitors of each module). So, increasing C1 on its own should be sufficient. As for your question regarding safety, to be honest I didn't check the design for safety-critical issues or concerns. There are some ...
Comment: ... unclear points about the entire design but I will not dive into details. Theoretically, increasing C1 is enough and doesn't present a safety issue. But this depends on what source you use for main input – some converters may not be happy with large output capacitors.


NodeMCU with HC-SR04 ultrasonic sensor

Question: How can I interface an ultrasonic sensor with a MCU with 3.3 V GPIO like the NodeMCU? I tried powering the sensor with both 5 V and 3.3 V from the MCU. Both failed to show any results as the distance appeared to be 0 V. In both cases the trig pin of the sensor was given 3.3 V input from the GPIO pin. I assume I need to level shift the echo pin output from 5 V to 3.3 V. How can I do that? Or is something else the issue? The code I used is fine as it works with Arduino.
Answer: The datasheet I found says the logic is TTL, which as far as I know is 2 V - Vcc, so 3.3 V should be fine. Is Trig just constantly given 3.3 V? According to the datasheet, it needs a 10 us pulse. Perhaps that is your issue? Code or schematics could help if that isn't it.
Comment: I have given trig pulse High and Low at 10us interval. The code is not the issue as I have used the same code with Arduino and it works fine.

NodeMCU with HC-SR04 ultrasonic sensor


How would life on a magma planet be?

Question: I imagine that, thanks to a mysterious magical element, multicelular life has been able to survive and diversify on an Earth sized planet which is only composed of solid and molten rock.
This planet is so hot, it would be lethal for any Earth life, but this magic element lets life tolerate this heat.
My question is, how would animal life on this planet be?
Comment: If "magic" is in the tags, the general answer is "whatever you want it to look like".  If there's no water, the life would be utterly alien to us and even describing it as "multicellular" might be a misnomer.
Comment: `How would life on a magma planet be?` - _hot._
Comment: @FranzGleichmann Maybe for saps living on worlds mostly covered by water.
Comment: Time to jump in with the hot take 'Ice is technically a mineral, therefore water is technically a molten mineral, therefore we are all technically lava monsters'...
Answer: Animal life on your planet would need to be a number of things.

It would need to be able to withstand immense heat... this you've already solved with the magical element, but likely with the "element" it would still be quite hot on your planet. Creatures with fire- or heat-resistant skin would do well in this environment.
Creatures that do not require a lot of water that they cannot get from their prey or food source of choice. The biggest problem with any planet like the one you describe would be obtaining water or liquid as everything would likely evaporate in the heat of the planet.
This concerns plant life, but to have animal life on your planet, you would need plant life, or at least some food source and food chain, however rudimentary so that species could survive and have natural selection. So a problem you would have to address is how plants and other life would be able to survive. (A solution for this could be greenhouses or some sort of irrigation system, but most creatures are not civilized and would not be able to use or maintain a complex system such as this.)
It would require a suitable habitat. This may be harder to create than you might think because heat resistance doesn't grow on trees (literally). Anything that you would use to surround your animals would have to be able to withstand the heat of the planet and provide shelter, protection, and sustenance for the creatures on the planet.
Aliens that have not yet been discovered. If you are unable to create or find creatures that follow the above, you would likely have to design an alien that could survive without an environment (other than rocks), water, or a food chain. A tall order, but presumably a possible one.

Your magical element presents a bit (or rather a lot) of a problem.

If the magical element lets life tolerate this heat, what are the exceptions to the rule? What is not affected by the magical element?
And if the magical element does affect everything and it affects every aspect of the planet and creatures' lives, wouldn't it just make the planet a second earth albeit with a different composition?
I don't know whether this is something you want to or intend to fix, but in order for there to be life on a planet (at least known life) water is a must. And if this magical element makes it essentially like Earth (just without humans) and you add water, would it really be unique at all?
Answer: Not my area of expertise however a thought; if you have magic involved already, why not make a life-from that makes energy from magma and/or fire. like instead of animals on our planet using water, they used fire. You could look online and see what magma is composed of and what are its byproducts and have an organism convert those to energy
Answer: Extremophile life does exist on Earth in a variety of seemingly inhospitable environments. However, they are all microscopic so realistically I don't think that animal life could evolve. Since we have a magical element which can protect animal life, then it would probably have creatures which use heat and turn it into energy for biological functions and the predators which consume them. The creatures which turn heat into energy may even act more plant-like since they shouldn't need to move around much.
Answer: You can always resort to traditional SF idea of silicon-based life.
Other than this, Earth is actually a magma planet with some solidified surface layer.

How would life on a magma planet be?


Samsung Galaxy S2 black screen

Question: My Samsung Galaxy S2 turned off suddenly and it is not turning on any more.
If I put it for charging, it will heat up the device and not able to power on. All data stored in internal memory. Is there any way to get data back from device . USB also is not detecting.
Answer: I think your battery is broken or there is another hardware problem. You can do this; try to borrow a similar battery as the one used by your device, use it on your S2 and see if it turns on. If it does turn on then do a backup immediately.  If it doesn't turn on then try connecting the device to your laptop and see if it is recognized. If it still doesn't get recognized you better go to an authorized repair center but, there is still no assurance that the data can be recovered.

Samsung Galaxy S2 black screen


How to reinstall MiKTeX

Question: I want to re-install my MiKTeX distribution on my computer. What would be the most advisable way of doing it? What is the process of uninstalling the previous version safely and installing the new one?
Comment: To make sure to get rid of all traces of MiKTeX before reinstalling, you can use the [IObit Uninstaller](http://www.iobit.com/advanceduninstaller.php) to uninstall, and tools like [Advanced SystemCare 6 Free](http://www.iobit.com/advancedsystemcareper.php) or [CCleaner](http://www.piriform.com/ccleaner) to clean up afterwards.
Answer: MiKTeX has no own button or menu to uninstall it.
To be sure to uninstall MiKTeX completely just use the "Windows Programs and Features (Add or Remove Programs)" control panel to delete MiKTeX.
Then reboot your computer.
Then download and install the new MiKTeX from the homepage http://www.miktex.org.
Why the reboot?
The reboot is necessary because the architecture of windows. There is a problem with loading dll's. That is only done by starting windows new (reboot). So if you want to unload earlier loaded dll's you have to reboot. If you forget it your computer can show malfunctions or freezes or can run without problems (if the loaded old dll's do not disturb your running programs). It is better to reboot after uninstalling a software on Windows ...
Comment: Is the reboot necessary and what would it cause if this is not done? Cause I forgot to reboot.....lol. I see that the menu under program no longer appears lol

How to reinstall MiKTeX


Is there an equivalent to flashbake (easy version control) for Perforce or Subversion

Question: Flashbake is introduced by Cory Doctorow and discussed here and its project page is here.  It hides most of the complexity of git and allows simple configuration.  I'm looking for something for Perforce since I have 10s of GB growing to 100+ GB in the next year of a few MB files (pictures mainly) which might not be ideal for git.  I also had trouble with > 1 GB files (video) Plus I have used Perforce and svn before.
EDITS: 10/26/09: This is only for me so there isn't a requirement for multiple users.  I can use the free version of Perforce.  Additionally since Perforce can be called by commands, just like git and subversion, I wouldn't think the proprietary software issues would be a stopper.
10/26/09: I don't have a requirement of work disconnected, so the DVCS features of git aren't important.
10/26/09: clarified size of repository.
2/5/10: Added reference to video files
Answer: I don't know if there is something for Perforce, though it is unlikely since Perforce is a commercial product.  It'd probably be reasonably straightforward to port flashbake to svn.
However, one nice thing about git (or other DVCS) is that no remote server is needed and you can "flashbake" at any time, even on an airplane.  (Of course you could have your svn or p4d repository local too.)  Git also makes it very easy to clone your repository and share it.
If you are worried about git and binary performance, you may want to read:

SO: Git or Subversion for binary files
the middle para of this blog post about binary file deltas during clone.


Remove empty lines due to preceeding paragraph at the top of the next page

Question: When I write technical papers, sometimes a para ends at the last line. The "\\" of the last line from the para introduces an unnecessary empty line at the top of the next page. Can such an empty line be removed?
Comment: Don't use `\\\` for line breaks
Comment: To be more precise: a blank line in the input is the right way to end a paragraph.
Answer: <code>\\ </code> if used at the end of a paragraph does not add vertical space; it adds an extra empty line of text to the paragraph (which always generates a warning that it has maximum badness 10000). As it is a line of the paragraph, it is not dropped at a page break.
Never use <code>\\ </code> at the end of a paragraph (<code>\\ </code> should only rarely be used outside tabular and math alignments).  If you require a layout (like the one on this site) that marks paragraphs with vertical space rather than by an indent on the first line, then you can use <code>\usepackage{parskip}</code> or use a class (such as the koma-script classes) that supports such a layout.
See for example
What does the phrase "Underfull \hbox (badness 10000) in paragraph" actually mean?
Comment: Thank you very much. I was not even sure if double slash was actually necessary at the end of the paragraph.