Continue running middle relay with Vidalia 0.2.21 (Tor 2.4.23)?

Question: The Vidalia bundles are still advertised in the TBB3 FAQ, but no longer available to download. What should Windows users who want to run a middle relay do? Conversely, should operators stop running relay that were set up with the last downloadable vidalia-relay-bundle-0.2.4.23-0.2.21.exe?
Answer: Vidalia is no longer officially supported. I believe that any remaining references to Vidalia are accidental or historical. If you want to run a relay on Windows, just download the latest tor browser bundle. The bundle includes the latest stable version of tor. Edit your torrc (local inside the downloaded bundle directory) as you normally would to set yourself up as a relay.
However, since relays are meant to be up for long periods of time, have you considered switching to linux? Mandatory Windows restarts every week mean unnecessary downtime for your relay. Doing a fresh minimal install of debian is easy and will probably be better for relay stability. If you don't want to wipe your laptop, dual booting would also be a reasonable choice.
Comment: `Edit your torrc (local inside the downloaded bundle directory) [...]` Ah, OK, thanks!

`[...] considered switching to linux?` Yes, but that's not an option for the machine I can run the relay on.
Answer: Any reference to Vidalia that you can still find is a mistake, please either fix it by editing the Wiki or file a bug on the bug Tracker.


Proving two path connected subsets of $\Bbb{R}^2$ are not homeomorphic when the number of cut-points/pairs are the same.

Question:
Given the two path connected subsets of $\Bbb{R}^2$ depicted in the image attached, where the end of the line segment on the left is included, how do I go about proving they are not homeomorphic?
This question comes from a larger set of questions in which the lack of topological equivalence was proven with simple arguments based on the number of cut-points and pairs. However, as far as I can tell these have the same number of n-type cuts (they have infinite 1 points and 2 points, infinite 1 pairs, 2 pairs, and 3 pairs etc).
They do seem intuitively different to me as the 1-pairs on the left are based on selecting the end point and any point on the circle, where as the choice of points for the pairs is not as restrictive on the right. But I can't figure any argument from this.
Comment: @Clayton edit: Surely all points along the line segment bar the end disconnect the sets though?
Comment: Path-components and connected components are the same here, since the space is locally path-connected. The idea described by @Clayton comes from the fact that homeomorphisms induce bijections on path-components (or connected components, but again, for this space there is no difference).
Answer: In the left hand picture if we have a cutpoint, one of its induced components is contractible, while this is not the case for the cutpoints of the right hand picture (these all lie on the middle segment). This is a topological property that shows they're not homeomorphic.
Answer: Here are two approaches which use cut-points:

The space on the left has the property that one can remove a non-cut point (namely any point on the left on the circle) such that the remaining space has exactly one non-cut point. For the space on the right this is not true since after removing a non-cut point almost any point on the remaining full circle is a non-cut point.
The space on the right has the property that one can remove one point (namely the point in the middle of the line segment) and get two components such that each component has infinitely many non-cut points. For the space on the left this is not true as after removing a point and getting two components one of them is a half open intervall which has only one non-cut point.


How to clean off keyboard marks on screen?

Question: On the screen on my MacBook Air, there are some little square marks from the keyboard.
Are they permanent, or can I clean them off? How can I prevent this from happening in the first place?
Comment: This happens on my Macbook Pro (early 2011) also. Fortunately, the marks might just be a transfer of finger oils to the screen because they wipe off quite easily (so far).
Answer: If you are very lucky it is just dirt and can be wiped off but usually it is permanent and there isn't much way to avoid them. I have seen it happen even when a soft cloth is used to cover the keys when the lid is closed. In fact that may even make it worse as the cloth adds thickness to the sandwich and may make the contact between the high points of the screen and the keys firmer. The screen surface of an anti-glare display just isn't very hard - glossy glass is harder but can still be marked.
Using a quality micro fibre cloth with a 70% water/30% isopropyl alcohol solution is a good way to clean the marks off if they are not permanent. I have been using the cleaning solution provided by my optician for my glasses for years with no ill effects, and I love the iKlear blue microfibre cloths (for both glasses and displays). They call it "terry" as opposed to their "chamois" cloth.
Comment: Great news, I love a perfect screen!
Comment: In this case, they came off!  They were pretty faint.  I guess it's a good habit that I rarely stack anything on the MBA.
Comment: "a 70% water/30% isopropyl alcohol solution" - whilst on the subject of cleaning screens... if you have a touch screen with an anti-fingerprint coating (eg. iPad) then you shouldn't use any liquids, just a microfibre _dry_ cloth. (An iPad with the "official" _folding_ cover also has a nasty habit of picking up these annoying marks where the cover folds.)
Answer: The MacBook Air keyboard shouldn't be touching the screen when it's normally closed.  This only happens when you've put the computer under pressure when it's closed.  For example, maybe you put it in a backpack with heavy books surrounding it and putting pressure on it.
About whether they're permanent, it depends on how "etched" they are.  If you try a moist, soft cloth and rub the screen gently for about a minute, and they don't come off, then unfortunately they most likely will not ever come off.  If you're still under AppleCare, they might fix this for you.
You can prevent this from happening in the future by putting a very thin cloth between the keyboard and the screen when you sleep it.  Also, try not to put pressure on the computer, then it won't happen in the first place.
Answer: I have MBP 2017 without touch bar. I usually cary it with  Thule case which I am sure it does't put pressure on my MBP. I have tried many solution to wipe the marks off  still having marks of the keyboard's edge on my screen and it seems permanent.
Comment: You should bring it to the store and get it replaced as soon as you can. They replace it for free.
Answer: The short answer is you can't prevent these marks.
It's a design flaw. The screen doesn't have enough clearance, is in contact with the keyboard when closed, and gets marked.
My current laptop is a MacBook Pro 16 I bought in May, about four months ago, and noticed key marks on the screen straight away. I bought screen cleaner and a microfibre wipe, and with prompt cleaning can see marks appearing regularly.
I have a (Bellroy) sleeve to protect the laptop, and transport it in a dedicated bag that is very lightly loaded; just an A5 notepad, water bottle, and small zip case for cables.
The good news is that this is a known issue at Apple. I opened a support request yesterday, during which the rep acknowledged Apple recognizes this problem, and was offered service.
My previous laptop was a MacBook Pro 13, which I kept for five years due to waiting out the the butterfly switch fiasco.
The 13 inch laptop had the same issue, and over time the key marks became permanent, as sweat, debris, oils, etc on my hands would have degraded the screen coating over time.
My 16 inch has the extended warranty, and I am going to just use as normal keeping the screen and keys as clean as possible. I'll take it in for service & get a new screen just before the warranty expires. Hopefully I can avoid any permanent marks in the interim.
You can leave feedback for Apple here https://www.apple.com/feedback/ but be aware you don't get a response.
Answer: The Mac Book screen usually doesn't get marks, but if you put pressure on the mac, it will get marks. Since I go to school,I have layers of books along with my laptop, so it get marks. In order to get rid of it, just get a cloth and put Little water as possible. Then let it dry naturally, and it should be fine unless you got some water on the screen.
Answer: I had keyboard prints on my 16 inch and have tried Windex. But it didn't work at all. Guess what works? Glass cleaner from a Dollar store. I spent 15 mins wiping it off with Bounty kitchen towel soaked in the cleaner, and voila, it came out good as new! The glass cleaner is called "First Force, No Streak Glass Clear". I've installed a screen protector so that I don't have to go through this again.
Answer: I know this is old thread but I had to sign in to point one thing that no one here is sharing that for future references instead of going for a thin cloth or smth lol simply apply screen protector and I bet it won't ruin your panel it would only if you have a titanium key cap keyboard or smth lol
Comment: What is smth lol ?
Comment: I think it means something laughing out loud. The common way to protect a laptop screen.
Comment: I used cheap glass cleaner from Dollar store and it worked wonder. Just came out like a new one. Ya, now , i have screen protector.
Comment: This person is right. A thin screen protector will help avoid contact between the plastic keys and the screen, but nobody talks about it.


How does Time Machine treat changes to the Photos Library?

Question: I've searched all over and can't find a sure answer to this question. If a new photo is added to my iCloud Photo Library, resulting in a change to the "Photos Library" package on my Mac found in ~/Pictures, does Time Machine simply back up the delta within the package or will it store another copy of the entire library?
Comment: It looks like Time Machine schedules a complete backup of my photos folder very often, and such a 40 GB job takes time even if the result is that 99% is unchanged.
Answer: SHORT ANSWER
Time Machine only backs up new or modified data, and keeps a record of any deleted data. This includes what's in your Photos Library. It does not do a fresh backup of the entire Photos Library each time you make changes to it.
LONG ANSWER
The way Time Machine works is that it backs up anything that has changed since the last backup. For example, a file that is:

Edited since the last backup is backed up again in the next backup
Created since the last backup is backed up in the next backup
Deleted since the last backup is not included in the next backup (i.e. there is no record of it in that backup, but the file itself is still stored for any older backups it was a part of)

Now, the confusion usually comes from the way Time Machine actually does a backup. I'll try and explain this below.

The initial backup TM does on a new backup drive is a full backup of
your Mac. So, if your Mac has used 80GB of a 1TB drive, then the
first backup will take up 80GB of space on the new backup drive.
All remaining incremental backups do not do a full backup. Instead TM backs up any new data (i.e. newly added data and any edited data) and keeps a record of any deleted data.
In the case of files such as Packages (including the Photos Library package), TM will identify any:

new data (e.g. new photos in the Masters folder within your Photos Library package) and back this up
modified data within your Photos Library package (e.g. edited photos) and back this up
deleted data within your Photos Library package (e.g. photos you've deleted) and keep a record of the change

When the backup drive runs out of space, TM will delete as many of the oldest backups it needs to in order to be able to do the next backup (and this is where users can lose data that was not part of more recent backups)
Regardless of whether it is the initial full backup or an incremental backup, TM will display this to the user as if they're all separate full backups. This is designed on the basis of User Experience (UX) design so that it's easier for users to browse and find data, and acts to reassure users that it's all there. According to Apple:

...what makes Time Machine different from other backup applications is
  that it not only keeps a spare copy of every file, it remembers how
  your system looked on any given day—so you can revisit your Mac as it
  appeared in the past.

Source: Mac Basics: Time Machine (web archive of Apple knowledge base doc)
Finally, as added reassurance that TM does not do a full backup of your Photos Library each time, I can share a personal example. My family Photos Library is 341GB in size and if this was fully backed up each time then the 2TB external drive that it's backed up to would be full after only 4 or 5 backups (allowing for other data), but that particular TM backup drive has backups going back to late 2015.
Comment: Exactly what I wanted to know, thanks! I knew the basics of Time Machine, but I didn't know how they treated packages in particular. Thanks for the detailed response!
Comment: Do you have an idea why Time Machine (to a Time Capsule) say to back up  40 GB (the size of my library) each time I add new photos?
Comment: @ThorbjørnRavnAndersen What makes you think that Time Machine is actually doing that? If it's just because you're manually looking at the backups and it appears to be 40GB each time, then that's not really the case. Perhaps read from point 5 of my answer onwards and, if you still think you have a problem, let me know what's happening.
Comment: No. That is what TM reports itself it needs to do. I'll add a screen shot next time I see it.


Error Creating iPhone ad hoc distribution

Question: I'm trying to do an ad hoc distribution of my iPhone app to some beta testers. I created the certs, device IDs, provisioning profiles, etc. and followed the instructions on Apple's site regarding how to incorporate them into the build/distribution. When I copy the provisioning profile and app to iTunes and try to sync, I get the following message:
The application "XYZ" was not installed on the iPhone "Eric's iPhone" because the entitlements are not valid.
It seems like everyone else that runs into this problem solves it by adding the Entitlements.plist file to the build configuration. The thing is, I've created (and edited) that file correctly. I see it and the provisioning profile in the built app.
Does anyone know what might be going on?
Regards,
Eric
Comment: See this answer: http://stackoverflow.com/questions/1558642/entitlements-are-not-valid
Answer: Did you go into the build settings for the AdHoc configuration and make sure the Code Signing Entitlements setting is set to point to your Entitlements.plist file?


Is language understanding possible without qualia?

Question: I feel that many words if not all of them have a direct mapping to some kind of inner subjective experience, to a physical object, mental feeling, process or some other kind of abstract thing. Given that machines don't have qualia and no mapping of this kind, can they really understand anything even though they are made to answer to questions with lots of statistical training?
Comment: [Natural language understanding](https://en.wikipedia.org/wiki/Natural_language_understanding) systems are often implemented using [discourse representation theories](https://en.wikipedia.org/wiki/Discourse_representation_theory) instead of qualia.
Answer: I'm going to be controversial here; so please don't vote this answer down if you just disagree with it.
Your question presupposes that machines do not or cannot possess qualia, which are required for true understanding. Given that we don't really know what it means to 'understand' something, and that even the meaning of 'meaning' itself is by no means a resolved issue, it might be overly specific.
In one strand of linguistics, the meaning of a word is defined by its use, and by the context of surrounding words. We could hazard a guess that children acquire the meaning of words through exposure to language, and the correlation of experiences with the corresponding sounds. How that works in detail is AFAIK not fully understood. But there would be nothing 'inherent' in a new-born human that would enable it to 'understand' anything.
If that is the case, then we could train a machine to do the same. Obviously, it would be a long and tedious process, and there is probably a reason why it takes us years to become proficient in our use of language. But if we correlate sensory input with linguistic utterances, a sufficiently sophisticated learning algorithm might be able to acquire some meaning for such utterances from the way they are used.
There are, of course, rather a lot of unknowns here. That is because the topic straddles various fields, from child language acquisition, corpus linguistics, the psychology of learning, and many more. And to my knowledge, none of these fields is sufficiently advanced to shed any light on this issue yet. There is the whole question of abstract words and concepts. How do we segment the continuous stream of sounds into discrete units (phonemes) without knowing what they are? With all that complexity I begin to appreciate why Chomsky opted for his Language Acquisition Device to avoid getting frustrated... :)
So, to answer your question: yes, it should be possible. A properly set up machine, which would be able to simulate human learning, would pick up its own mapping of linguistic structures to its experience from the world outside. And if we call this mapping the 'meaning' of those structures, then a machine can learn this, and presumably 'understand' language. If we ever get to that stage with AI is another question.
Comment: Regarding your statement, "But there would be nothing 'inherent' in a new-born human that would enable it to 'understand' anything", newborn baby who can still feel pain and cry, do possess qualia and that itself is an enabler for true understanding by mapping their experiences with words over time.
Answer: We don't even know exactly what qualia are, so it's hard to say for sure.  But here's what I do think:  a lot of human learning is experiential and is rooted in our interactions with the physical world.  That is, we see,smell, hear, and feel things, we experience gravity and our orientation in the world through kinesthetic awareness, the sense of balance we have, etc.  So while an AI running on a server in a data center might well be "as intelligent" as a human, I don't think it's reasonable to expect it to have the same kind of knowledge and awareness as a human, simply because it has never experienced many things.
So if you want to talk about, say, "seeing the color red" and refer to qualia, then sure.  I think it makes a certain kind of sense to say that the machine will be missing something "human" and that that refers to qualia.
OTOH, I think it would be a mistake to underestimate just how "intelligent" our AI's will eventually become even if they aren't embodied. We just have to keep in mind that their intelligence might not be quite the same as ours, because they essentially inhabit a different world.
Answer: I think a "successful" strong AI with natural language abilities -- say one that could produce "good" unsupervised translations of literature, or pass a rigorous Turing test -- would have to include in the corpus of data used to build its models visual, auditory, and probably tactile data.  It might be necessary as well to simulate the kind of agency and intentionality that humans have-- so the AI-in-training has the opportunity to move a simulated self to change what input it receives.  I suspect training it only on text data, for example, would always be inadequate.  If it had access to sensory information and learned to associate it appropriately with the symbols of language, it might be able to learn the meaning of language in a way that we'd find difficult to distinguish from our own understanding, even though the AI would presumably not have the (same) qualia we have.
Of course, we are a long way from having hardware sufficiently powerful to even attempt such a comprehensive mind-modeling project.   But I don't think the qualia issue in principle prevents a "real" understanding of language; its just a matter of extending the symbols available to the AI for modeling the world represented by language to be a good enough match for the symbols humans use in their minds, including the symbols that arise from sensory inputs.
Answer: Great question equally qualified answers.  My belief is yes to understanding language and the bugaboo (a non intellectual vernacular) is what is understanding.  Is it interpretive?  Inferred? To what end?  An algorithm's response to a command in language form will depend on the robustness programmed into it.  However, qualia connotes a subjective experience due to a sensory stimuli whether triggered by memory or one of our human senses.  Then it begs the question of can a computer collectively experience and how would we know that.  Second, are all algorithms subjected due the the programmed bias and it's available data store?  Facebook and Google news have shown that programmed bias is very real. Furthermore, Qualia is an emergent trait so I can't see how a computer and it's collective systems can become aware and have subjective experience.
Comment: Welcome to AI.SE, and thanks for writing an answer! I think you could improve this post further by clarifying what the direct answer to the question is. (I think I understand what you're saying, but I'm not confident enough to [edit] it myself.) For some helpful orientation to our site, see the [tour].


Is it possible to start a scheduled Windows task from a package?

Question: Does anyone know if you can and how to start off a scheduled Windows task on a Remote Server from within a SQL Server Integration Services (SSIS) package?
Answer: Assuming you run it on Windows Server 2003/2008 or Vista, use SSIS Execute Process Task to start SCHTASKS.EXE with appropriate params (SCHTASKS /Run /? to see details).
Answer: It should be possible as the Task Scheduler has a scriptable COM API that can be used for interacting with tasks.
You could therefore either create a custom task that uses COM interop to call the Task Scheduler API, or it'd probably be quicker to use an Active X Script task to do your dirty work.
Answer: I invested a lot of time in the aforementioned COM API back in 2002. It was, to put it mildly, "flakey".
What we ended up doing instead is having our tasks run every minute. The first thing the task did was check the database to see if it should continue running or not.
Then "starting" a scheduled task from SSIS was as simple as changing a database field.


Making a community out of people you're following and followers in Twitter?

Question: I just read an article that explains why I've had one like out of 320 tweets. Engagement rate is extremely low. However, I do have 21 followers! I love the way Twitter helps you find like-minded people. But the mechanisms for talking to those people seems to purposely stunt it. I want to meet and talk to people. Is there a feature I'm missing?
Answer: Twitter offers several ways to engage with like-minded people who interest you:

Follow - in Twitter, following people of interest is the most basic courteous act. People you follow get notified when you do so and, given your bio and tweets interest them too, they might follow you back in return.
Like - think of a like as a semi-private gesture from you to someone whom their tweet you liked. They get notified when you do so and over time, they might notice that you like their tweets and choose to follow you back.
Retweet - a retweet is a full fledged public endorsement of someone-else's tweet. Different from a "Like" which is between you and the other person, a Retweet is literally passing the other person's tweet to your followers. Because of it's public implications, a Retweet tends to get more gratitude form the other person.
Direct Message (DM) - a DM is essentially a private message from you to another person. You can only send DMs to people who follow you. Therefore, if you followed people of interest, liked and retweeted their tweets and eventually they realize the common interests you share and follow you back, if really wished, you can DM them your thoughts in a more elaborate way.

NOTE: you should bare in mind that some heavy-weight Twitter users use their DMs like SMS or whatsapp and would feel odd if you'd DM them without proper context.


What does "Let's face it, xxxx" mean?

Question: I have a curiosity about "let's face it".
What does "Let's face it, xxxx" mean?
Answer: It is something that you say before you say something that is unpleasant but true

Let's face it, we both know why I stopped working there.

It is also used to mean "face facts."  For example,

Let's face it, he was a big hunk of a man and a good-looking guy.
Comment: The reason it's used in that context is that it brings to mind the physical action of turning to look at (or confront) a sight or situation that is less than desirable, which you might otherwise wish to turn away from or ignore.
Comment: Is this some kind of suggestion? Let me know more example. And when do I use this senstence.
Comment: @user1917217 No, it is not a suggestion. It is said in the sense of: "It is what it is" or "face the facts as they really are."
Comment: @user1917217 You can also understand it in "get real" sense. Here http://idioms.thefreedictionary.com/get+real
Answer: If there is an uncomfortable fact that you knew was true but you tried to avoid it, but can't avoid it anymore, you'd say

Let's face it, [fact].

For example, you and someone else were driving a car, and then the car broke down in the middle of nowhere. You're trying to get the car to start, but it obviously isn't working. After a while, you give up and say:

Let's face it, this car isn't going to start.

It comes from "facing the facts". There are facts that you know are true, but you're trying to ignore them, so you've "turned your back against the facts". When you admit the facts, you're "turning around to face the facts". "Let's face it" means "Let's admit that these facts are true(even though we both knew it already)".
Answer: It means to be honest about something that you might otherwise ignore and pretend isn't true.
If you turn your face towards something you can look at it. You are then confronting that 'something' and can deal with it.
The opposite of turning away from something.

What does "Let's face it, xxxx" mean?


Can you force open links that create a new tab, in the same tab?

Question: I use Chromium. Many times, I am following links, from one page to another, and I am done with the current tab and don't want to open a link that might possibly open in a new tab. I tried some combination of Ctrl, Shift, Alt and mouse click, but the link still opens in a new tab. Can it be done, if at all?
Comment: Do you want to force Chrome to open new pages in new window,and not in tab?
Comment: n, in the same tab, in the same window. and its chromium, not chrome.
Answer: You can add a little user script to break target="_blank":
var a = document.getElementsByTagName("a");
for (i=0; i<a.length; i++)
    if (a[i].target == "_blank")
        a[i].target = "_self";

How you get something like that to run is another question.
You need to run Chromium with --enable-user-scripts so you need to alter your launchers (right click the menu, edit menus, etc). The command should be:
chromium-browser %U --enable-user-scripts

Then you need to save the script:
mkdir ~/.config/chromium/Default/User\ Scripts/
gedit ~/.config/chromium/Default/User\ Scripts/target-eater.user.js

Paste in the script, save and edit gedit. Launch chromium with --enable-user-scripts and the script should automatically load and start nuking _blanks
Answer: In earlier years of web design it was more common for designers to make all external URLs open in new windows, but increasingly it is considered poor practice because, as you have discovered, it takes control away from the user.
The article Should Links Open In New Windows? makes a good point-by-point argument in support of this view.
Hackish workarounds that dynamically strip the target="blank" attribute in your web browser exist, but you should not have to use them. These workarounds only treat the symptoms.
The only solution
Write to the webmasters of problematic sites and politely explain how disrespectful and hostile the overuse of target="blank" is. Point out how links that open in new windows break the visitor's back button, creating a obstacle for users trying to return to their site. Make the case that their design forcefully robs users of the choice to control their own computer.
If users speak up about this problem, maybe, with time, we won't have to resort to the other answers workarounds posted here anymore.
Answer: If you drag the link onto the tab (eg. the one you are using!), it will open the link in that tab.
Comment: As Roddie says: you can drag a link to the tab and it will be loaded in that tab, and this works whether it's the same tab (as Kaustubh P wants) or another tab.  But of course it's not a click-modifier...
Comment: Think he wants the opposite.  If a tab /should/ open in a new tab, he wants a modifier that will force that tab to open in the current tab and window.  I'm not aware of any modified that does this.  Oli's answer is awesome, but it will override the default behaviour, rather than using a toggle/modifer.


Lobsters and crabs, halal or haram due to boiling alive?

Question: I just read a question that asks if eel is halal and it reminded me of something I always wondered about. Lobsters and crabs are boiled alive when cooked. That means it's haram to eat them right? I know its haram to eat wild animals, either from land or sea. However, I don't know if lobsters and crabs can be considered "wild" since eating them is so common. However, does the fact that the process of cooking them is so cruel make eating them haram?
I have seen a few people ask similar questions to this on this site and the main answers I saw claimed that anything from the sea is halal (really? even sharks and whales?), which would make eating lobsters and crabs halal. However, fish die soon after they leave the water, and there is a process that one must go through when slaughtering an animal for food, it must be as quick as possible to prevent needless pain. My issue lies with the fact that the lobsters and crabs will be boiled alive.
If eating them is halal, is there another way of cooking them or is it that they just don't feel the pain, and if they don't feel the pain how do you know?
Comment: Well eating the sea food is halal. But boiling them alive? Its pure torture! :(
Comment: Good question! I've always wondered about the boiling alive part. But I think the title should reflect that distinction.
Comment: And on a culinary note; yes, there are other ways to prepare crab and lobster that don't involve boiling them alive. Boiling alive is only done to insure freshness.
Comment: If you want, a good place to ask for alternate ways of cooking crabs/lobsters etc: http://cooking.stackexchange.com
Comment: Linked- [are-shrimp-lobster-crayfish-and-crab-halal?](http://islam.stackexchange.com/questions/2295/)
Comment: How to eat lobster Halal? Tell the waiter to kill it before cooking it! Simples, or buy it and kill it at home and cook it yourself if the waiter refuses!
Comment: "I know its haram to eat wild animals, either from land or sea" this it wrong. You can eat anything from the sea.
Answer: Different schools said differently in this regard.

In Hanafi madthab, it is haram to eat shellfish (lobster, crab, shrimp, oyster, etc.)
In Shafi'i and Hanbali, everything from the sea is halal.
In Maliki, everything but the eel is halal.

About the slaughter of animals:
Allah the most high says:

Say, "I do not find within that which was revealed to me [anything] forbidden to one who would eat it unless it be a dead animal or blood spilled out or the flesh of swine - for indeed, it is impure - or it be [that slaughtered in] disobedience, dedicated to other than Allah. But whoever is forced [by necessity], neither desiring [it] nor transgressing [its limit], then indeed, your Lord is Forgiving and Merciful." [6:145 :: Surat Al-'An`ām (The Cattle) - سورة الأنعام ]

The main counsel of Islam in the slaughter of animals for food is to do it in the least painful manner.. And also disliked eating alive. [Fatwa on Stunning Animals]

It is forbidden to eat any kind of dead meat, whether it died by drowning, strangulation, electric shock, falling from a high place, fighting with another animal in the herd or was killed by a wild animal – unless one is able to slaughter it properly before it dies. [Disallowed Matters- Book by Sheikh Muhammed Salih Al-Munajjid]

It is best to avoid eating any animal that was boiled, burned or drowned alive.
See The Fiqh of Halal and Haram Animals for more details
Answer: There is a malliki opinion on snails expounded upon in this islamqa post:

The Maalikis did not stipulate that a creature which has no flowing blood should be slaughtered, rather they included it under the same ruling as locusts, and its slaughter is by boiling, roasting, or piercing it with a stick or needle until it is dead, whilst saying the name of Allaah over it.
In al-Mudawwanah (1/542) it says:

Maalik was asked about something in the Maghreb (North Africa) which is called a snail, that is found in the desert on the trees – can it be eaten? He said: I think it is like the locust. If it is taken alive and boiled or roasted, I do not think there is anything wrong with eating it, but if it is found dead, it should not be eaten.

As well as this, in a question I asked NesreenA answers (in summary):

As for slaughtering it yourself and invoking Allah's name, the hadith you quoted above already explains that meat from the sea is already slaughtered correctly.

I would conclude, excepting questions as to the lobsters bottom feeding habits,  that boiling lobsters is OK.
Answer: As salaam 'aleykum wa rahmatullah!
Indeed, the only madhab which states that this would be makruh to eat is the Hanafi Fiqh... Meanwhile, the majority of scholars state that everything from the sea is halal, with exception of eel, and poisonous fish... Apart from that the general prohibition of eating non-slaughtered MEAT only applies to MEAT and not for seafood... This comes from a general comprehension that in the arabic language, "Lahm" does not stand for fish, or octupuss, or crabs, or lobsters, or shrimps, or whatever... Only for earth-living animals.
May Allah bless you all, brothers (Baraka Allahu fikum)... Shall us eat a "Seafood Spanish Paella"?
Sincerely, your brazilian brother,
"Marcelo Salahuddin"!
Answer: All of these answers are talking about animals and not fish and creatures that live in the sea. Different rules applie to sea creatures.

You cannot eat a fish that is floating on the face of the water.
Fish must be killed by an external cause. This includes very high temperatures, very low temperatures, and blunt force to kill the catch.

So to answer your question, you can kill your catch by throwing it on ice to freeze it or to quickly boil it. As long as it's dead before consumption and that it did not die in it's natural habitat.
Enjoy the Barakah,
Salam!
Comment: Please cite a source or evidence.
Comment: What about the [sahih hadith](https://sunnah.com/nasai/42/88) ""Its water is pure (and Purification) and its 'dead meat' is permissible (to eat)." and the hadith of a SHabi called Shorayh شُرَيْح, al-Bukahri mentioned in his Tareekh saying: "Everything in the sea is slaughtered"(كل شيء في البحر مذبوح).


Fallout 4 Power Armor mods

Question: Ok So I have a bunch of X-01 Mk.III mods in my inventory. My question is if I buy a Power Frame can I somehow attach them to it? Or can I take my T-51 suit and take the gear off that and replace it?
Comment: Welcome to Arqade! To clarify, do you have mods, or pieces? A piece would be an arm. A mod would be an attachment to the arm.
Answer: A frame can have any mix of power armor pieces from any type of model on it. You could have T60 arms with T51 legs and an X01 head and chest, for example. These can be swapped out at-will at a power armor station, or, if you're currently wearing the frame, in your pip-boy's apparel page.
Each piece can have mods added, like a VATS overlay for the helmet or a blood cleanser for the torso. Mods can only be attached to pieces from the same model. A T51 blood cleanser cannot go on a T60 torso. To change the mods on a piece of armor, you need to use a power armor crafting station.
You say you have some X01 Mk III mods. In order to use these, you'll need a frame. For each mod, the frame will need the associated X01 piece. If you have a Mk III leg mod, you'll need an X01 leg. These pieces cannot be crafted, but instead must be bought or found.
To attach mods to the pieces on the frame, you'll need to bring that frame to a power armor station. There, you can attach any mods you already have, provided that there is a matching piece on the frame. For each piece on the frame, you can also craft any mods for which you have the prerequisite perks and materials.
In short, a mod needs to go on the matching armor piece from the same model, but armor pieces can go on any frame with any mix of other pieces.
Comment: This answer put me over 9000!
Comment: TL;DR : Mods can only be attached to pieces from the same model.
Answer: Yes to both of the questions you have asked. A power armor frame is universal, and can accept any power armor pieces.
Comment: I have mods, I replaced the old pieces with new ones. So under mods in my inventory I have a X-01 Mk.III Torso Lining
Answer: (This answer is similar to DCShannon's)
While you can put different types of power armor on the same frame, you cannot put X-01 Power Armor mods on anything other than X-01 Power Armor. The same goes for all types of Power Armor. You also cannot place X-01 mods on a frame, you can only place them on the power armor. If you did not know, here's a little example of what mods are for.

I go over to my weapons workbench because I want to modify my pipe
    pistol.
I see a mod I like. It's called "Light Frame Receiver". I get the materials to make it, and I craft it.
I go to test out my new gun on some raiders.
Oh no! I don't like this receiver mod. I want the one I had before back!
I go back to the workbench.
The receiver I had before requires some materials I don't have anymore!
But with the mod, the game pretty much says "Hey, he's made that already once, I'll give him this mod so I can remember that there is still this one that he can attach to his gun if he wants it, without needing to craft a new one."
Yay! I've got my old pipe pistol back, as well as the mod for the light frame receiver, if I ever need it!

That example is the same as the Power Armor. You've already built the X-01 Mk.III once, so you can put it back on without needing to use up the resources. If you need more X-01 Power Armor to put those mods on, you can find some at military outposts. Have a good time exploring the wasteland, and watch out for deathclaws! ;)

Fallout 4 Power Armor mods


Creating custom JavaScript object from data returned by jQuery AJAX request

Question: I want to create a custom javascript object which contains data returned from a jQuery AJAX request, but I don't know which is the right way to do it. I was thinking maybe one way could be to include the AJAX request inside the constructor function so the object is created like this:
// Constructor function
function CustomObject(dataUrl) {
    var that = this;

    $.ajax(dataUrl, {
        success: function (json) {
            that.data = $.parseJSON(json);
        }
    });
}

// Creating new custom object
var myObject = new CustomObject('http://.....');

Another way may be to use a function which does the AJAX and then returns the new object based on the data from the AJAX response.
function customObject(dataUrl) {
    // Constructor function
    function CustomObject(data) {
        this.data = data;
    }

    $.ajax(dataUrl, {
        success: function (json) {
            var data = $.parseJSON(json);
            return new CustomObject(data);
        }
    });
}

// Creating new custom object
var myObject = customObject('http://.....')

I would like to know what is the best practice when doing something like this, as well as advantages/disadvatages of different methods. Maybe you can point me to some article or example on something similiar to what I am trying to do.
Thanks in advance.
Comment: Why do you want an object to be created? Also, reading this 3-part series has helped me think differently in JavaScript - http://enterprisejquery.com/2010/10/how-good-c-habits-can-encourage-bad-javascript-habits-part-1/
Comment: What about returning a JSON from server-side with the object structure and data you already want?
Comment: I am creating an object because it has custom methods
Answer: I think this would be a better approach, it makes your CustomObject only knowledgeable about the data it contains. Here you delegate the work of creating objects to a factory, and pass in a callback to get a reference to the created object, since ajax is asynchronous. If you don't mind making it synchronous, then the createCustomObject function can just return the instance, and the callback can be removed.
function CustomObject(data) {
    this.data = data;
}

var factory = (function(){
   function create(dataUrl, objectClass, callback){
       $.ajax({
           url: dataUrl,
           success: function (data) {
              callback(new objectClass(data));
            }
           });
   }
   return{
      createCustomObject: function(dataUrl, callback){
          create(dataUrl, CustomObject, callback);
      }
   };
})();

// Creating new custom object
var myObject = null;
factory.createCustomObject('http://..', function(customObject){
   myObject = customObject;
});

Answer: I'd argue that the second method is better because then you only create a new CustomObject once the script is actually fully prepared to do so (i.e. it has the data it needs from the AJAX request).


What makes a program Linux compatible/incompatible?

Question: I understand that Linux does not support .exe's, but is adding Linux support as simple as providing a .jar version? This summer I'm going to try to really start programming and contributing to... well anything I can. I think Linux is the future. So what makes or breaks compatibility? What do I need to change about my Java/Python programs to make them compatible?
Comment: Java/Python code that contains no platform-specific part is compatible on all language supported platform. Remember: filename extensions has nothing to do with platform compatibility.
Answer: Since you are using languages, which leverage bytecode for platform independece, you have nothing special to do, to run e.g. Java or Python. As long as the runtimes are supported by linux - which is the case for the mentioned languages - you have nothing to do.
The only thing which differs under linux is the way how you actually run (e.g. start) the software. It is common to write start(shell-)scripts.


Gnome 3 not turning off display after selected time

Question: I recently installed Gnome Shell 3.20.4 and desktop on top of an fresh Ubuntu 16.04.3 installation. Now, I want my monitor to go to sleep after 1 minute of inactivity ("blank screen"). That configuration works fine on Unity, the screen will dim after 45 seconds and the the display turns off. On Gnome the screen will dim at 45 seconds but at exactly 1 minutes brightness goes back to normal and the display never turns off. What can I do? I already reconfigure everything on Gnome settings. It is like something is waking up the system just before the display turns off. Thank you!!
Answer: For any other person with the same issue I solved it deactivating every plugin (extension) with Gnome Tweak Tool. Then I reactivated all the extensions I was using before and the problem was gone.


How does the Glivenko-Cantelli theorem improve the stochastic convergence of the empirical distribution $F_n(x)$?

Question: Let $X_i$ be iid random variables with empirical cumulative distribution function $F_n(x)$ and CDF $F(x)$. From the central limit theorem and the strong law of large numbers, we know that $F_n\stackrel{d/a.s.}{\to}F$. The Glivenko-Cantelli theorem states that $\sup\limits_{x\in\mathbb R}|F_n(x)-F(x)|\to 0$ almost  surely. How does it impact improvements for these two types of convergence (by itself or maybe by other theorems that are implied)?
Comment: As mentioned at https://en.wikipedia.org/wiki/Glivenko%E2%80%93Cantelli_theorem#Statement: "For every (fixed) $x$, $F_{n}(x)$ is a sequence of random variables which converge to $F(x)$ almost surely by the strong law of large numbers, that is, $F_{n}$ converges to $F$ pointwise. Glivenko and Cantelli strengthened this result by proving uniform convergence of $F_{n}$ to $F$."
Comment: Would you mind clarifying "How does it impact improvements for these two types of convergence". For example, are you looking for a specific type of statement?
Comment: @SumanChakraborty I'm looking for any type of statement that improves the stochastic convergence (a.s. and/or in law) and is implied by the Glivenko-Cantelli theorem.
Comment: Take a look at this paper (Theorem 1.3) https://dl.acm.org/doi/pdf/10.5555/3294771.3294929. This gives an error bound for Glivenko-Cantelli. If this is the kind of results that you are looking for, then I can point you to few more references. If you are looking for applications of GC then let me know as well, I can add some references. Best.
Comment: @SumanChakraborty Thanks for the reference. Yes, some applications of the G-C would be helpful.
Answer: Let me refer you to two applications:

Statistics: theory of empirical process has been widely applied in statistics (especially non-parametric). I have just found these notes on the internet. Moreover, there are at least two textbooks on this topic. Introduction to Empirical Processes and Semiparametric Inference by Kosorok, and Weak Convergence and Empirical Processes
by van der Vaart and Wellner.

Probability and Combinatorics: there are many applications but I have found the application to the $K$-core problem to be cute. I strongly recommend this paper:  A simple solution to the k-core problem by Janson and Lucjak.

I have used it to study bootstrap percolation here (section 3.2).


Curie temperature and magnetization?

Question: If an ferromagnetic object is heated and reaches Tc the magnetization gradually drops as we get closer to Tc or it's a instant drop?
Can I assume as I heat the object, the magnetization is weakening gradually? Likewas as it cools?
Answer: Gradual drop. And its zero above the curie-temperature.
Comment: Ah, so M gets weaker as the temperature generally increases?
Comment: Yes, well, |M| does
Answer: Answer by Allah Abdulala Gustavo ElFakir is mostly correct although steep jump can be also observed. Here is an example. As this is first order transition there is some thermal hysteresis. On heating temperature of transition is slightly higher than on cooling. Gradual drop is dramatically more common though. And in this case it occurs at the same temperature for cooling and heating.
Answer: For the simplest systems exhibiting continuous phase transitions, the magnetization is saturated at zero-temperature and drops continuously until it reaches a vanishing value. This is point is called the critical temperature. Roughly, the Curie temperature (or more precisely, the Curie-Weiss temperature) is an estimate of the critical temperature at which the magnetization vanishes. Intuitively, the magnetization at very high temperatures is zero since the spins, that are the elementary sources of magnetic dipolar fields which gives finite macroscopic magnetization in a given material, fluctuate strongly and on average, do not point in any specific direction, thus giving an overall zero magnetization. Conversely, at zero-temperature (again in the simplest systems), spins that are subject to ferromagnetic interactions want to align to minimize the overall energy of the system and on average give an overall finite magnetization.

Curie temperature and magnetization?


Can we make illegitimate operations with $0$ legitimate by adding a few more axioms?

Question: Just out of curiosity, can we make illegitimate operations with $0$, say, division by $0$ legitimate simply by imposing additional axioms? If so, then what consequences may follow? If the answer is negative, what are the differences between making operations with $+\infty, -\infty$ legitimate in the extended reals?
Comment: @MJD:  Yes, thanks for your efforts. My perspective is the related question is not that related, for it is confined to natural numbers. My question here is regarded as more general than that question in the sense that it may attract deeper answers or more advanced information.
Comment: How about changing the zero axiom itself?
Answer: In some contexts, things like $5/0$ should be taken to be $\infty$, where that is neither $+\infty$ nor $-\infty$, but a single $\infty$ at both ends of the real line or at the extreme of the complex plane.  This makes all trigonometric functions and rational functions continuous.
This is really an example of one of the points at infinity in projective geometry.
Answer: Sure. Lots of math programming libraries essentially do this by adding NAN (not a number) as a possible value of functions. Things don't break because NAN is not the domain of any function/operator/etc.
However, saying anything divided by zero equals 42 would result in an inconsistent theory, which makes everything true. We see lots of examples of this in "proofs" that 12 equals 14 or whatever.
Answer: A number of efforts have been made as listed below. Patrick Suppes provides an excellent overview and succinct survey of the issue of division by zero in his Introduction to Logic, Chapter 8.5, The Problem of Division by Zero, and Chapter 8.7, Five Approaches to Division by Zero. http://stuff.mit.edu/afs/athena....
Suppes notes that the fourth of the five approaches he identifies has been the one most commonly used in mathematics. Essentially, he is referring to item 1 listed below. As far as I know, prior to the 1950s when Suppes wrote, the extended complex plane was the only** arithmetic defining division by 0 that existed. Items 2 and 3 descend from 1. Meadows is an example of one of the other approaches Suppes covers. Item 4, Carlstrom's Wheels seems to me yet another, sixth, approach although it owes a debt to the fourth.
1)    The extended complex plane** http://mathworld.wolfram.com/DivisionbyZero.html
2)    The floating point arithmetic known as exact real arithmetic. http://www.doc.ic.ac.uk/exact-co...
3)    Wheels, Anton Setzer http://www.cs.swan.ac.uk/~csetzer/articles/wheel.pdf (unpublished paper 1997)
4)    Wheels, Jesper Carlstrom, http://www2.math.su.se/reports/2... (published 2001)
5)    Meadows - models of "an equational specification ENA (elementary number algebra) which specifies a super class of the class of zero-totalized fields." http://staff.science.uva.nl/~janb/FAM/topFAM.html
6) My own work simply replaces 0 using several ideas, one of which is a set different from the empty set based on a change to predicate logic. The algebra is here while the paper Replacing 0 - A NonEuclidean Arithmetic is more in depth.
7) Also, it may be of interest, the software package Mathematica returns 0 upon entering 1/Infinity  Although it cannot be said to be mathematically correct, this is consistent with a fairly common practice in physics (e.g, when interpreting the mathematics of singularities).
footnote
** Related to this are the affinely extended real number system, the Real projective line, and the extended non-negative Real line. Just as the complex numbers are extended by a point at infinity, all these arithmetics use a point or points at infinity to extend some or all of the Real numbers. Some of these may well have existed before Suppes' book as well.


Are all maps the same?

Question: Is the map randomly generated or is it always the same?  My map currently looks like this:
Answer: They are randomly generated, but only once. Your map won't change throughout your entire playthrough. On a new game, however, the map will be different.
Answer: It would seem that the answer is no. The map I had was different.

Are all maps the same?


Android setting manual focus by touching

Question: I am going to set the my Android App by opening the camera and enable manual focus by touching the point in to camera. The camera can refocus to the point where I have pointed on to the screen. Would you please tell me the methodology or which component should I start with to modify ?
Below is my code:
public void takePhoto(File photoFile, String workerName, int width, int height, int quality) {
    if (getAutoFocusStatus()){
        camera.autoFocus(new AutoFocusCallback() {
            @Override
            public void onAutoFocus(boolean success, Camera camera) {
                camera.takePicture(shutterCallback, rawCallback, jpegCallback);
            }
        });
    }else{
        camera.takePicture(shutterCallback, rawCallback, jpegCallback);
    }

this.photoFile = photoFile;
this.workerName = workerName;
this.imageOutputWidth = width;
this.imageOutputHeight = height;
}

public void takePhoto(File photoFile, int width, int height, int quality) {
takePhoto(photoFile, null, width, height, quality);
}

Comment: I believe what you want is called _assisted_ focus. http://en.wikipedia.org/wiki/Manual_focus , Manual Focus is impossible: http://android.stackexchange.com/questions/2042/can-i-manually-focus-the-camera-on-my-android-phone (as of a few years ago)
Answer: Though this answer does not show how to focus in on a single area, it is definitely useful in showing how exactly to focus the camera to begin with.
Here is what i have done. This works on my device (Droid DNA by HTC), built in Android Studio
In both OnSurfaceChanged() and OnSurfaceCreated(), I have the following code:
(mCamera is my private Camera object)
        mCamera.stopPreview();
        Camera.Parameters p = mCamera.getParameters();
        p.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);

        mCamera.setParameters(p);
        mCamera.setPreviewDisplay(surfaceHolder);
        mCamera.startPreview();
        mCamera.autoFocus(null);

In the constructor, you must place
        setFocusable(true);
        setFocusableInTouchMode(true);

This will allow you to receive focus events. As for capturing them...
 public boolean onTouchEvent(MotionEvent event){
    if(event.getAction() == MotionEvent.ACTION_DOWN){
        Log.d("down", "focusing now");

        mCamera.autoFocus(null);
    }

    return true;
}

Comment: IMO this answer doesn't solve the question, it just sets autofocus(null). It doesn't focus camera in the point selected
Comment: Youre right. On top of that, this camera API is now depricated as of API 21 http://developer.android.com/reference/android/hardware/Camera.html
Comment: This worked for me in KitKat, It may not work with the new camera API if you have lollipop
Answer: have you tried using setFocusAreas() to set the focusarea where user has touched ?
Answer:
The key here is to call camera.autoFocus(autoFocusCallBack) and after
  we focused method autofocusCallback.onAutoFocus(boolean success,
  Camera camera) is called – call the camera.takePicture
  (Camera.ShutterCallback shutter, Camera.PictureCallback raw,
  Camera.PictureCallback jpeg)

See more: http://achorniy.wordpress.com/2009/12/29/how-to-use-autofocus-in-android/
or

In surface changed and before preview, you can use the auto-focus
  setting which will set the focal distance automatically, then start
  the preview, and then auto-focus on whatever is displayed...

public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {

// Set camera properties first
Camera.Parameters parameters = camera.getParameters();
        parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);
        camera.setParameters(parameters);

camera.startPreview();

camera.autoFocus(null);

}

credit: where to put autofocus in the class android camera
Comment: So if I add the event arg for touching the screen and then call the AutoFocus Again and that resolves my problem?


What would this chord progression derive from?

Question: What would you primarly use over this chord progression Em7 B7 CM7 Am7 B7
Comment: Which is the question? That in the title, or the one in the body?
Comment: There doesn't have to be (and often isn't, given avoid notes) one particular scale/mode that works well for any set of chords. Play the changes.
Answer: it's in E minor.  Where you sharp the 7 depends where you are in the progression and what melodic figure you're playing at that time. You might raise the 6 too if you're playing a melodic figure where that sounds good
So E, F# G A B C(#) D(#) E is a good place to start to pick out some melodies that sound nice, and whether or not those sharps in brackets are played or not depends on the musical context (what chord you're on, and what you're playing).
Also sprinkle in some B flats for a bluesier feel, if you like
edit: since I recorded the progression for my comments on another answers, I may as well include it here: https://vocaroo.com/1blSgLb12FN6.  Stumbled on G after Am7 one time, oops.
Also, here is a (very loose and fumbled) solo on the weirdly strung Spanish guitar I have lying around here.   https://vocaroo.com/1e8w68b8A5JX  Partly a more "bluesy" approach, partly a more "melodic" approach, where the notes chosen to riff melodically are basically standard fare for a minor key. As listed above, which 7th is used largely depends on what the chords are doing.  Obviously you don't want to play D# over Em7 (unless used as a chromatic passing note or deliberate dissonance to resolve).
There's also nothing to stop you just wailing on an E minor pentatonic over this, since D over B7 is a perfectly valid bluesy colour.  It would sound great, but it won't sound terrible either.
Answer: CM7 disturbs me somehow ...  but C7 would fit well as German6 (which is in Jazz equivalent for bVI) chromatically descending to the dominant.
The augmented 56th chord derived from c,e,g,a# (1st inversion of a#,c,e,g) -  in jazz notated as C,E,G,Bb.
Anyway ... in e-minor your progression could be i-V-VI7-iv-V
Comment: CM7 sounds perfectly fine.  C7 would give you a jazzier sound leading to the 5, but here would sound pretty odd.  C7>Am7 (bVI7> iv) is a weird choice, and not a particularly pleasing progression.
Comment: A (not particularly well played, sorry) realisation to demonstrate.  https://vocaroo.com/1blSgLb12FN6
Comment: It's a typical sort of indie/poppy acoustic chord progression. Easy to over-theorise, but if you want to wrap your head around how they are used in this sort of context, often these chords ( add9s. M7s, 6ths etc) work more like sustained pedal tones over the top of mostly diatonic triadic harmony.
Comment: If you want something to sink your teeth into that uses this type of suspended/extended minor diatonic harmony, try out "Day old hate" by City and Colour/Dallas Green.  It has relatively simplistic diatonic harmony as bare bones, but uses these colour tones to add a real richness and interest to the harmony, in a way quite different to how such tensions would be used in classical music and jazz (I'm assuming from your language that you have a classical or formal jazz education, so I thought this might be interesting to you) https://youtu.be/ymcDMnofwJY
Comment: CM7 is the same as emin7, with the D changed to a C.  It's actually IN the key of e minor.
Answer: Okay forget trying to place the chords, and just look at the root movement.  This is just playing around the V chord, B.  The rest of the chord notes are texturing, not to be thought of as part of the key of E.
Comment: Downvoted because someone has never heard Flamenco.
Answer: Easy to fit/solo in E Phrygian, E minor and, forcing a little, in C Major or Lydian (because of f# in B7 chord). But fits well and, specially good (at least to my ears), in C minor.
Comment: C minor? Is that a typo?
Comment: No, C minor in reality. Assuming that progression in E minor, both key spaces have a distance of a mediant (or a PL transformation in a Neo Riemannian context); they're close enough to share and blend easily. I love stacking different keys mediant apart, I like the dissonances and the clashes generated by doing this. Also, is an efficient manner to create heavily tonal-centered chromatic music.


Fastest way to count total number and then list a set of records in MySQL

Question: I have a SQL statement to select results from a table. I need to know the total number of records found, and then list a sub-set of them (pagination).
Normally, I would make 2 SQL calls:

one for counting the total number of records (using COUNT),
the other for returning the sub-set (using LIMIT).

But, this way, you are really duplicating the same operation on MySQL: the WHERE statements are the same in both calls.
Isn't there a way to gain speed NOT duplicating the select on MySQL ?
Comment: Could you post what you already have?
Comment: 1st: SELECT COUNT(*) FROM table WHERE field>100;

2nd: SELECT * FROM table WHERE field>100 LIMIT 0,5;
Answer: That first query is going to result in data being pulled into the cache, so presumable the second query should be fast. I wouldn't be too worried about this.
Comment: Right - make your where clause as complete as you can and then don't worry about doing that second query. Since it is immediately after the first, results will come from the cache like I said.
Answer: You have to make both SQL queries, and the COUNT is very fast with no WHERE clause. Cache the data where possible.
Comment: This is the only reliable answer when determining the number of potential rows for paging.
Comment: the COUNT has the same WHERE clause as the LIMIT.
Answer: You should just run the COUNT a single time and then cache it somewhere.  Then you can just run the pagination query as needed.
Comment: wasn't me. ;) But, your solution is exactly what I do: two SQL queries  with the same WHERE clause.
Comment: I read your question as I am running 2 queries every time someone wants to view a new page.  My suggestion is to run the query which grabs the count a single time and just cache the result in a variable, then run the pagination query for each new set of values requested.
Answer: If you really don't want to run the COUNT() query- and as others have stated, it's not something that slows things down appreciably- then you have to decide on your chunk size (ie the LIMIT number) up front.  This will save you the COUNT() query, but you may end up with unfortunate pagination results (like 2 pages where the 2nd page has only 1 result).
So, a quick COUNT() and then a sensible LIMIT set-up, or no COUNT() and an arbitrary LIMIT that may increase the number of more expensive queries you have to do.
Answer: You could try selecting just one field (say, the IDs) and see if that helps, but I don't think it will - I imagine the biggest overhead is MySQL finding the correct rows in the first place.
If you simply want to count the total number of rows in the entire table (i.e. without a WHERE clause) then I believe SELECT COUNT(*) FROM table is fairly efficient.
Otherwise, the only solution if you need to have the total number visible is to select all the rows. However, you can cache this in another table. If you are selecting something from a category, say, store the category UID and the total rows selected. Then whenever you add/delete rows, count the totals again.
Another option - though it may sacrifice usability a little - is to only select the rows needed for the current page and next page. If there are some rows available for the next page, add a "Next" link. Do the same for the previous page. If you have 20 rows per page, you're selecting at most 60 rows on each page load, and you don't need to count all the rows available.
Comment: I'd like to show the user how many results (the number) there are, even tough just showing a sub-set of actual results.
Answer: If you write your query to include one column that contains the count (in every row), and then the rest of the columns from your second query, you can:

avoid the second database round-trip (which is probably more expensive than your query anyways)
Increase the likelihood that MySQL's parser will generate an optimized execution plan that reuses the base query.
Make the operation atomic.

Unfortunately, it also creates a little repetition, returning more data than you really need.  But I would expect it to be much more efficient anyway.  This is the sort of strategy used by a lot of ORM products when they eagerly load objects from connected tables with many-to-one or many-to-many relationships.
Answer: As others have already pointed out, it's probably not worth much concern in this case -- as long as 'field' is indexed, both select's will be extremely fast.
If you have (for whatever reason) a situation where that's not enough, you could create a memory-based temporary table (i.e. a temporary table backed by the memory storage engine), and select your records into that temporary table. Then you could do selects from the temporary table and be quite well assured they'll be fast. This can use a lot of memory though (i.e. it forces that data to all stay in memory for the duration), so it's pretty unfriendly unless you're sure that:
The amount of data is really small;
You have so much memory it doesn't matter; or
The machine will be nearly idle otherwise anyway.
The main time this comes in handy is if you have a really complex select that can't avoid scanning all of a large table (or more than one) but yields only a tiny amount of data.


internet sharing (mojave) AND two-way connection

Question: I apologize for any confusion bc of the subject line. Explanation:
I am sharing a wireless connection on a Mojave MBP 2012 (ethernet/thunderbolt/USB) with a PC running Win10. The PC is able to surf, so internet sharing is nominally working. Is there a way to also go in reverse? What I mean is, I want to use the same network to connect from the MBP to the PC, for example using Remote Desktop.
My hardware is configured as follows:
wireless router <---> MBP <---> eth <--->|        |<---> eth <---> PC
                                         8-port hub

For separate reasons, I'm not using the default internet sharing settings:
icu-mojave:~ $ ifconfig bridge100
bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=3<RXCSUM,TXCSUM>
    ether aa:20:66:b1:68:64
    inet 192.168.22.10 netmask 0xffffff00 broadcast 192.168.22.255
    inet6 fe80::a820:66ff:feb1:6864%bridge100 prefixlen 64 scopeid 0xe
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en0 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 7 priority 0 path cost 0
    Address cache:
        84:2b:2b:a5:11:63 Vlan1 en0 1199 flags=0<>
        dc:a6:32:96:3f:b8 Vlan1 en0 1192 flags=0<>
        84:2b:2b:a5:11:10 Vlan1 en0 1187 flags=0<>
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active

My ethernet interface looks like this:

As I mentioned, this "works." The PC is surfing the internet etc - it is set up to get an address conventionally (DHCP) and has the IP 192.168.22.11.
Problem: from the MBP, I can't ping 192.168.22.11. I get a request timeout (as opposed to host down for example). I figure if I can't ping it, I can't do anything else either. For starters, I'd like to connect to the PC using Remote Desktop from the MBP so I can get rid of the extra monitor and keyboard.
OK that's it – is this quest even possible perhaps with a change to bootp settings, or do I need to replace the hub with a router and create a 2nd downstream network? I've read that Apple's NAT doesn't do "true bridging," but I can't evaluate that comment or whether that's the issue even.
Answer: Answering my own question for the record if anyone else searches. FYI I had to go to a full router setup to get this to work. The new configuration is:
wireless router <---> MBP <---> eth <--->|    |<---> eth <---> PC
                                         router

The MBP side of the router is the "internet" connection and the other side is the 4-port hub provided by the router for its private local network. Had to set up port forwarding on the router to target individual PCs via RDP, and there are Raspberry Pis on the hub side as well, but all is functional.
I still think I'm lacking something because "internet sharing" is inherently 2-way on some level, but I don't know enough about Apple's implementation of this sharing to know what's missing.


Is it fine to add beet root for colouring in the middle of fermentation?

Question: It's been 3 days of fermentation, I added beet root for colouring in the middle of fermentation. I used china globe grape (not that red), and after hours later the bubbles getting lesser
Answer: Depending on how their processed, adding beetroot to a fermenting wine must should not do anything to inhibit fermentation. Unless your beet must is full of sorbates or other preservatives, it should be fine.
If you're mostly going for color, in the future I would add them towards the end of fermentation, as active fermentation seems to scrub out some of the bright colors, although it probably won't matter much when using beets in a wine must.


Is teflon a poison if ingested?

Question: Nowadays, a lot of frying pans are made with a non-stick coating. That's usually teflon, or chemically speaking polytetrafluorethylene - $\ce{(C2F4)}_n$. Can you be poisoned if some of that teflon gets in your meal by scraping the pan or in any other way? And if so, what happens (chemically speaking) in your body after ingestion?
Comment: Teflon is very inert and small pieces in the body will not be absorbed, so no. The only way to suffer from it is to overheat the pan enough to thermolyse the teflon back to the monomer, which is harmful (though less so to people than birds).
Comment: @matt_black Thanks, your comment was useful. Would you mind forming it into na answer?
Answer: I hope I am not breaking any rules of this forum by directly quoting, but here you go:
"The cold polymer is harmless on ingestion, in contact
with the skin, or implanted in living tissues. When
heated above 250° C. it begins slowly to give rise to
small amounts of decomposition products, some of
which are toxic.
The accidental inhalation of fumes from the overheated
polymer by workmen produces an influenza-like
illness which has been described elsewhere. The
illness follows a latent interval of a few hours and
resolves within a day or two with no subsequent illeffects.
This may happen, for example, when the
polymer is heated to comparatively high temperatures
(350-400 C.) in an oven, an extruder, or some other
equipment used to fabricate it, but it is easily prevented
by the intelligent use of exhaust ventilation."
In: Harris, Kenwin. "Toxicity of Polytetrafluoroethylene." British Medical Journal 1.5285 (1962): 1146.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1958415/pdf/brmedj02864-0082a.pdf
Comment: Well we can conclude not to overheat it or we can poison ourselves!

Is teflon a poison if ingested?


One-tape Turing machine for doubling words (strings)

Question: I am going to design a Turing machine for doubling any words. My algorithm is such that for word X as input, the output will be in the form X@X which @ is a character. How can design an one-tape Turing machine that give exactly XX as its output? For example, X=abba, XX=abbaabba. Thank you in advance for consideration.
Comment: Cross-posted: https://math.stackexchange.com/q/4247467/14578, https://cs.stackexchange.com/q/143855/755.  Please [do not post the same question on multiple sites](https://meta.stackexchange.com/q/64068).
Answer: Design a Turing machine $T$ that takes as an input a word with an unique occurrence of the "@" symbol and shifts all symbols after "@" one position to their left (thus overwriting "@" and replacing the last symbol of the word with the blank symbol).
This can be done by finding the end of the input word, setting the machine state to store the "blank" symbol, moving to the left, and then iteratively performing the following step:

simultaneously store the current symbol in the machine state,  write the stored symbol on the current cell of the tape, and move left.

The above repeats until the read symbol is "@". When that happens the stored symbol is written in place of "@" and the machine halts.
Compose the Turing machine you already designed with $T$.
Comment: Thsnks for your answer! Is it possible to do this work without composing  two machines? I mean by using one and only one Turing machine?
Comment: The second machine $T$ is just there for the sake of presentation. Of course the you can use a single machine that first does what you've already done and then what I described.


Trying to incorporate last successful run

Question: I want the script to create a file with the last successful run time and also the script should extract the last success run time for the consequent executions. This is useful if the script fails for some reasons and it picks up the  dates for the next run.
Comment: What are you trying to do? What dates are you processing. It is hard to understand what you are asking, so you are unlikely to get a good answer. Please improve your question. Also no need to comment, yourself.
Answer: To indicate success, you can create the file with touch my_script_success
To see when the last successful run was, you can use stat --format=%Y my_script_success.
stat will exit with an error if the file doesn't already exist, otherwise you get the modification time, which would be the time the file was last touched.
Comment: @Vas please remember to accept this answer if it's the one that works for you. (Use the tick mark beside the up/down votes.)


Customize keyboard shortcuts powerpoint 2016 windows

Question: In MS Word 2016, I can customize keyboard shortcuts as described here. However, the same procedure cannot be applied to my Powerpoint 2016 software. Simply, the button "Customize" in step 3 of the aforementioned manual does not exist. Is there any way to assign a shortcut to, e.g., "insert equation" in PPT 2016?
Answer: Is there any way to assign a shortcut to, e.g., "insert equation" in PPT 2016?
There is no way to customise keyboards shortcuts in PowerPoint 2016.
However there is already a shortcut sequence for inserting equations.

For your convenience, hold down the Alt  key, press
  N , and then press E.
Alt+N  is the keyboard shortcut for switching to
  the Insert tab and then pressing E afterward[s] brings up
  the equation list.

Source Powerpoint 2016 Customize Keyboard Shortcuts
Comment: Thanks for this helpful answer. It is still a mystery to me why MS does not use the same options panel in all of their office products, which would naturally offer us the "customize shortcuts" option in all of their programs.
Answer: I use different language versions of Microsoft Office on different computers (English, French and Spanish), so the differences in keyboard shortcuts and the inability to customize them in PowerPoint and Excel is very frustrating. The Alt shortcut system described in another answer might work in some cases, but in my case, it is less than satisfactory. For example, something as simple as "Select All" in Spanish requires Alt,o,ó,e. But because my keyboard does not have the accented ó, I can only do "Select All" with Alt,o,Alt+162,e!
(Note that Alt,o means "press and release the Alt key, and then press and release the o key"; whereas Alt+162 means "press and hold the Alt key while typing 162, and then release the Alt key".)
So, my workaround is to use AutoHotkey to create custom scripts. AutoHotkey lets you create almost any keyboard shortcut for almost anything. They have a tutorial to give you a good idea of what it can do.
If you're interested in that possibility, here's my PowerPoint shortcut script in AutoHotkey to give you a template for customization (note: my purpose is to use English shortcuts on Spanish Microsoft PowerPoint):
<code>; MS PowerPoint
#IfWinActive ahk_exe POWERPNT.EXE
^a::Send {Alt DownR}o{ASC 162}e{Alt up}  ; select All
^b::Send ^n  ; Bold
^f::Send ^b  ; Find
^i::Send ^k  ; Italics
^h::Send ^l  ; find and replace
^s::Send ^g  ; Save file
</code>


Use Work-KE Theorem?

Question: I've been trying so long at this problem to no avail. I drew my free body diagram, but I'm unsure which formula to use.

Could someone help me out?
Answer: Hint: Think about dividing the gravitational force into components, with one in the same line as the velocity, and the other perpendicular to it.
Apply the Work Energy Theorem after that. (i.e Work Done (The component of the force, multiplied with the given distance (i.e. $20$ cm) by the gravitational force along the displacement is equal to the change in K.E.)
Answer: So, we can start saying that the theorem tell us that the variation of the KE is equal to the work done.
Remember that W=F*s and KE=(1/2)(m)(v)^2
Now you have to decompose the weight force (you will see that with this decomposing , is formed a right triangle) , in this way you can obtain the value of that force in her parallel component. In fact the weight force is 98,1 N; to obtain the parallel component:
<code>                  Fp=(98.1N)(sin35)=56N
</code>
Now we can calcolate the work done (remembering to trasform from cm in m, so from 20cm to 0,20m)
<code>                 W=(Fp)(s)=(56N)(0,20m)=11 J
</code>
We can pass to considerer the KE. In a first time we have a
KE1=(1/2)(m)(v1)^2=320 J
for the second time , or rather the point after percorring 0,20m we have the unknown velocity. To obtain this one we use the theorem
11J=320J-5kg(v)^2  so v=sqrt[(11J-320J)/(-5kg)]=7,86 m/s

Use Work-KE Theorem?


Google apps script in HTML

Question: Is it possible to use google apps script in my HTML? I want to be able to write to a spreadsheet from a form in purely Javascript from an external framework such as Node.js.
https://developers.google.com/apps-script/
Comment: If your question is about accessing Google Apps Script from node.js, then it should be more explicit. Add some more info to make it clear exactly what you are asking, please.
Comment: Clarified. I'm guessing the answer is no, then? Google Apps Script is its own standalone service?
Answer: Sure you can. You can use HtmlService to create your web form, then send the submission data to your Spreadsheet with server functions.
Comment: Mogsdad comment on your post is right, did you even read the documentation on HTML Service?  The whole thing is based on interactions between client HTML/JavaScript and Google server services...
Comment: So I can presumably embed some code in the HTML (of a Node.js app) and send the data to the Spreadsheet? I can't seem to get an instance of SpreadsheetApp.
Comment: You can call server side functions using
  google.script.run.withSuccessHandler(
    function(obj){
      alert('Returned '+obj);
    }
  ).myFunction(args);

I use them all the time
Answer: Google Apps Script's syntax is Javascript, however it is a unique server-side framework that does not behave as a library to applications outside of the Apps Script servers. (No, you won't be able to use Google Apps Script in your node.js app.)
However, that doesn't mean that your node.js app (or any other app on the web) can't interact with your spreadsheet. For instance, your app could authenticate as you using the OAuth API, then access the spreadsheet through the Google Drive API. For an example of this, see Accessing Google Spreadsheets from Node.js
Alternatively, you could roll your own spreadsheet API in Google Apps Script, to support read / write of your sheet via HTTP requests from your node.js app. There are plenty of examples of that, for example Insert new rows into Google Spreadsheet via cURL/PHP - HOW?.
Answer: Nowadays you could use the Google Apps Script API to call your Google Apps Script code from other platforms like Node.js, actually the official docs include a quickstart for Node.js.
Answer: You can you use HtmlService, but maybe can be helpfull to read the Google Hosted Libraries https://developers.google.com/speed/libraries/
To use a Javascrtip library inside GAS, I recommend JQuery.
But Maybe, you can use Node.js inside your external website and make a AJAX Request (get or post) to a GAS and return from GAS this:
<code>ContentService.createTextOutput(e.parameter.callback + "("+Utilities.jsonStringify(JSONDATA)+")").setMimeType(ContentService.MimeType.JSON);
</code>
After that, process it inside your AJAX request...
Answer: Mogsad is right that you might be better of with Google Drive API to interact with your Spreadsheet!
...But depending on your exact need you might have some possible interaction between external service and google apps scrip using Content service Google Dev link.
Content Service can send back several information upon GET request  (ATOM, CSV, ICAL, JAVASCRIPT, JSON, RSS, TEXT, VCARD, XML). By playing around with url parameters you can get information out and in a spreadsheet, send an email, trigger some action etc!.
But that is far from a real external library and direct interaction with server side functions!

Google apps script in HTML


What is the meaning and origin of the surname Lambert?

Question:
What is the meaning of this name?
What was the history behind it?
Which country does it originated firstly?
What ethnicity people will have this name?
Comment: Downvoting is any user's right if they feel your question is not useful, is unclear or does not show any research effort. This particular question can be answered with a simple Google search; perhaps you should try that if you need the answer. Or review the responses to http://genealogy.stackexchange.com/q/1789/104 to understand how you can improve this question.
Comment: http://meta.genealogy.stackexchange.com/q/1755/104 asks if questions like this are on-topic.
Comment: Note also that this user has ["prior form"](http://genealogy.stackexchange.com/q/1789/70) and has chosen to ignore the advice that was offered then. Hence my vote to close.
Answer: I would say this is being downvoted because of your lack of own research. For example I got with the second search result on google for the search words "Lambert lastname":

Definition: Bright land or light of the land, the Lambert surname
  derives from the Germanic elements "land" meaning land and "beraht"
  meaning bright.
Surname Origin: English, French
Alternate Surname Spellings: LAMBERTH, LAMBETH, LAMBUTH, LAMBER,
  LAMBERTE, LAMBURT, LAMBRETH, LUMBERT

from Lambert - Name Meaning & Origin
For "Lambert surname" I got:

The roots of the Lambert family are found in the ancient German state of Bavaria. [...] Lambert derives from the Old Germanic name Landbehrt, which means shining land or holy land.[...]

Lambert Family Crest and Name History
For "Lambert family name" I got:

Recorded in over forty spelling forms from Lambert, Lambard and Limprecht, to Lambrich, Lambertini and Lemmens, this surname is almost certainly of very early German origins. As a surname it started life in the 12th century, but the derivation is from a pre 5th century personal name. This was 'Landbehrt', composed of the elements "land", meaning territory, and "berht", bright[...]

from Last name: Lambert
So, from this two minute research alone can be deduced:
1) The words composing the name make up the meaning "bright land" or "shining land", maybe in a meaning of "holy land".
2+3) It is originating from Germany, probably Bavaria or Franconia. There also was a Bishop named "Lambertus" in the 8th century. There is a number of famous people that wore that lastname on wikipedia.
4) Families with the lastname Lambert probably originate from Central Europe, i.e. Germany, Holland, France or UK.
Answer: I reckon Lambert is an ancient name from Cappadocia, Syria or there abouts and refers to Lamb(the sheep) and ert from Erten in Turkish meaning early, ancient, former. I believe Lambert refers to the ancient Jews somehow who revered or worshipped the Lamb.
Answer: My surname is Lambord but an ancestor of mine changed his name from Lambert to Lambord but we do not know the reason for this. We have relatives in Lincolshire still called Lambert.


Can I increase the size of my AC compressor with the same refrigerant lines?

Question: Friend wants to give me their puron systems 13 sear 2.5 ton AC that they replaced.  It was still working fine but 10 years old they wanted to change it out.  I currently have a York 2 ton unit that was installed in 1992.  It works but I have to add Freon every 6 months or so.  Can you change out the sizes without changing the pipes and duct work, etc
Comment: "I have to add Freon every 6 months or so." Seriously? This means you have a refrigerant leak and should probably replace the refrigerant lines.
Comment: I agree with littleturtle. If you have a leak, replacing the outdoor unit will only help if the leak is in the outdoor unit. You might find that even after the swap, you'll still have to recharge the system every 6 months. Get a better HVAC company to inspect the system, so they can find and repair the leak.
Answer: You have a refrigerant leak and should probably replace the refrigerant lines regardless. Depending on the type of refrigerant, leaks contribute to ozone depletion and global warming.
A 2.5 ton unit will require a higher airflow rate (typically 350–450 cfm/ton). Your fan motor may or may not be able to be set to a higher speed by moving the jumpers.
With a higher flow rate, your ductwork will induce a higher pressure drop. This means you may not be able to actually achieve the required airflow rate.
A 2.5 ton unit may be oversized and short-cycle more often. This can lead to worse dehumidification performance (your home cools down but stays humid) because moisture condensed into the condensate tray re-evaporates before building up enough to drain.
Answer: You would have to consult the installation documentation for the new system. That will specify the size of the lines required. You could also just measure the lines and see if they are the same size as your existing system.
But asking the internet is the wrong way to go. A competent AC installer will give you a free estimate for installing the system.
Answer: I would first look at the unit and look for oil staining around the unit and at the indoor coil  usually when you see evidence of oil that indicates that there is a leak at that location Schrader valves go bad very easily as well I would replace those those are very common location for freon to leak from
Comment: Your answer is not what the OP was asking, although Schrader valves can go bad with the compressor change out they will be replaced by the new unit.


What happens to the ATP after it stores energy?

Question: The title says it all. After the procceses of cellular respiration happen,  the energy is used in different activities that use it, but which are them, more specifically?
Comment: Welcome to SE Biology. Please take the [Tour](https://biology.stackexchange.com/tour) and read [how to ask a question here](https://biology.stackexchange.com/help/how-to-ask). You are expected to demonstrate you have done your own research before asking a question.Yours is a basic question that is covered in many biochemistry and biology texts, such as [Berg et al. on-line](https://www.ncbi.nlm.nih.gov/books/NBK21154/?term=ATP). If you have any specific questions after doing that, then it is OK to post them here, explaining what you do not understand. But check previous questions first.
Comment: this is one of those questions that could be answered by a quick visit to wikipedia. https://en.wikipedia.org/wiki/Adenosine_triphosphate
Answer: Well first of all, how is ATP used in metabolic processes? The build up of molecules require energy. And the best molecule in biological livijg systems is ATP.
One of the processes that require ATP is the very process that makes it: glycolysis. The body will reconfigure the shape of glycolysis, transforming it into a precursor of pyruvate. This first phase (a.k.a investment phase requires two ATPs, dephosphorylating it into two ADPs. And to recap the payoff phase, once the main molecule is split, the molecule will breakdown into pyruvate through another set of various steps. At the same time, two ADPs will be phosphorylated into two ATPS. This phosphorylation occurs for each of the two pyruvates.
So the one of the main purposes for ATP is for the build up of molecules. The energy of ATP is released when it is convenient for into ADP + P, and is transferred to the new, bigger molecule.
Another process that ATP is involved in is activation. In neuron cells, the sodium potassium pump is constantly trying to set a concentration gradient between sodium in the cytoplasm and potassium in the extracellular fluid. And because it is working non-stop, it needs ATP to continue working. However, in the scenario where an individual is deprived of oxygen through an extended period of time, brain damage may occur due to the the absence of ATP production. The sodium potassium gradient will never be restored, and the neuron will be unusable.


Race condition on incremental backups

Question: I am planing to automate to take incremental backups on a range of sql servers from 2000 to 2012, on a variety of windows too.  This will be done with a vbs script that runs on task scheduler.  I want to know if there is a problem to occasionally start a new incremental backup when the previous one is still running or I must be sure that there is a lapse of time doing nothing.  The rest of details are covered, I keep all the files, and I test (restoring on other server) all the backups.
Comment: On SQL Server 2005 and later it's not an issue. On SQL Server 2000 differential and log backups are blocked by full backups. That being said: https://ola.hallengren.com/sql-server-backup.html
Comment: Why not just use SQL Agent?  Is there some sort of advantage or constraint in your environment that won't let you use Agent?  There won't be an issue taking differentials, you can take as many DIFFs as you'd like, just as long as you have the corresponding FULL backup that they apply to.
Comment: @KrisGruttemeyer Because with a serie of scripts we have more prestations than sql agent: We push a record flag, take backup, check the file localy, copy to remote location, restore on the remote location, check the flag, and send a mail on success. And the script, is "all versions" friendly. All what I mention, is for full backups, now I want to add support to do similar tasks on incremental backups
Comment: Show the logic which your VBS script runs for these operations.
Answer:
I want to know if there is a problem to occasionally start a new incremental backup when the previous one is still running

For SQL Server 2000
You would not be allowed to start new differential backup unless the previous one finishes.
For SQL Server 2005 and above
You can start new differential backup while old one is still running but new one would be blocked by already running differential backup. The new diff backup will only start after old one has finished.
This Blogs.msdn article and this SE thread would help you in understanding similar behavior

Race condition on incremental backups


What are the differences between a x1 and a x10 osciloscope probe

Question: I've heard pros of x10 probe a lot.
Now I need to know the cons but I couldn't find a clear explanation.
Some people say x1 probe is for small signal.
How do you decide either x10 or x1.
Comment: the primary con is "the x10 probe does what it's specified to do, I don't want that".
Comment: The primary drawback, as Spehro hints, is that low amplitude signals, attenuated 20dB, can disappear into the scope's own noise floor.
Comment: Compare input-referred noise.
Answer: The pro is that a 10x probe has 10x the input impedance so will interfere with the signal being measured less. The con is that it is reducing the voltage on your signal by 10x before it reaches the scope so it cannot measure signals with very low amplitudes or measure with noise levels as low as a x1 probe will (your scope introduces noise and if your signal is 10x smaller when it reaches the scope, then the noise of the scope will be 10x bigger than it would otherwise relative to the signal).
But a side benefit of stepping down the voltage by 10x before it reaches your scope is that you can measure signals with a maximum amplitude 10x higher.
Use x1 probe to measure very low amplitude signals in low impedance circuits. Use 10x to measure everything else, especially if the circuit being measured is higher impedance. If your circuit is low amplitude but high impedance...well...that's where it gets tricky.
Use probes more than x10 if you need to measure voltages that are higher than what your scope can accept with either a x1 or x10 probe.
I don't like to use a x1 probe with anything I know will be more than 50V, even though a scope input can typically directly accept 300V for oscilloscope preservation purposes. I use a x100 probe for anything larger than 100V for the same reason. You never know what overshoot might exist in a signal you are measuring.
Comment: Side note, a 10x probe may not always have 10x the impedance, even if it attenuates by 10. For example an oscilloscope bought some years ago came with probes that had 2.2 Mohm input impedance. However, it is more typical that a 10x probe does have 10Mohm input impedance.
Comment: @Justme How does that work? What was going on there?
Comment: @DKNguyen I don't think it's nothing special. The probe was 500 MHz one. Maybe it relates to the bandwidth somehow. I am unsure but it might have been this or similar probe: http://www.farnell.com/datasheets/2349648.pdf
Comment: At 300V and perhaps even as low as 50V, two X10 or X100 probes and differential input should be used.
Comment: @CharlesCowie Yeah, at 100V I use a x100 probe.
Answer: A downside is that it divides the voltage by 10 and thus the signal is weaker at scope input. So there is a limit how small signals can be measured, but it depends on the scope. If the amplitude is too low for 10x probe, and if it is known that the dowsides of 1x probes do not prevent measurement, then a 1x probe can be used.


How to bind a model to an option's value

Question: In Angular 1.2.11, given a controller with:
$scope.produce = { 'apples' : [{ 'variety' : 'granny smith', 'price': 2.00}] }

And a view with
<select ng-model='fruits'>
  <option value="0">More Fruits...</option>
  <option ng-repeat="p.apple for p in produce" value="p">{{ p.variety }}</option>
</select>

How can I bind 'p' to the value attribute? If I try as above the model is bound as a JSON string, not as the model itself (as it would be if I were able to use ng-options).
I'm working around this now by using an ng-change function that uses the value bound to fruits as a lookup in $scope.produce, but this seems like a workaround rather than a solution.
EDIT: Sorry I wasn't more clear about this: I need to be able to hard code 1+ options into the select list, so using ng-options is not a solution.
Here are some fiddles to help illustrate my problem:
** Using ng-options **
ng-options allows for one  element that it uses for creating a default option for use as a label. Two problems with this: if I try to use that <option> for its intended purpose I can't add a second option to the select. On the other hand, if I just try to add one <option> element, it gets placed at the top of the <select> list. No good.
** Using ng-repeat **
I'm unable to bind the model to the value attribute of the <option> element. Instead, the value is stringified JSON, which is not bindable.
Comment: Be careful about creating options like this. There are known problems. That's why the dev team came up with `ng-options`. http://docs.angularjs.org/api/ng.directive:select I'm probably not going to even use the `select` element anymore, myself. I prefer making my own.
Comment: I don't think your data structure makes sense - is `produce` supposed to be an array?
Answer: You need to use ng-options:
<select ng-model='fruits' ng-options="thisFruit.variety in apples">
</select>

If you need to have an option selected as a default (your "More Fruits" option) then you need to add that to the data before it gets to the repeater, and also set your model $scope.fruits = 0 to make that selection selected by default.