When to start the timer on crock pot chicken confit

Question: The recipes I have read call for 3 hours on Low temp, then 1.5 - 2 hours on High.
Do I start the timer as soon as I turn on the crockpot, or let the crockpot come up to temp before starting the timer?
Answer: Generally speaking crock pot recipes require preheating the empty pot (for how long depends on the model, but it can be as much as half an hour, and usually on high even if cooking on low).  This isn't included in the cooking time.  Then the time normally starts when you put the food in, at the temperature specified in the recipe.
If you don't have time to fully preheat you can generally start with hot ingredients, and add the preheating time to the cooking time - the contents will cool at first, but not dangerously so.  In this case, with the unusual process of starting low then turning on to high, I wouldn't do that.
Answer: This is probably covered in the manual for your crockpot (if you bought your crockpot used, without a manual, or no longer have your manual, they are often available online for download), but in general you fill the room temperature crock with cold, room temperature, or partly pre-cooked food and follow the times given in the recipe without any preheating of the crockpot before or after adding food.
Most manuals I have seen, including this random Rival manual, caution against preheating either the base or the crock.

If the stoneware has been preheated or is hot to the touch, do not put in cold foods. Do not preheat Crock-Pot® slow cooker before using unless specified in the recipe. The stoneware should be at room temperature before adding hot foods.

Manuals also tend to note that a wide variation in times is possible.

This is due to voltage variations which are commonplace everywhere; altitude; or even extreme humidity. The slight fluctuations in power do not have a noticeable effect on most appliances; however, it can slightly alter the cooking times. Allow plenty of time, and remember, it is practically impossible to overcook. You will learn through experience whether to decrease or increase cooking times.

In some slow cookers, such as the Crock-Pot, the difference between low and high is the speed of getting up to temperature, not the maximum temperature, which is the same for both settings.

Crockpot™ Slow Cookers reach the simmer point and stabilize on both "High" and "Low" at about 209°F.

Your particular make and device may vary, of course. But in general you will use the times given without any extra preheating, and then verify on your own that the food is ready for whatever purpose you are creating it.


What is the name of this plant with arrow shaped leaves and how should I plant and care for it?

Question: I have been given this plant. It is in water and has rooted:

What's is its name? How should I plant and care for it?
Comment: The first one is Syngonium podophyllum, and the second is a New Guinea hybrid Impatiens, not sure which. If you want care instructions, ask two separate questions.
Comment: @Bamboo see edited post.
Answer: This is the arrowhead plant, The Syngonium podophyllum also mis identified as Nephthytis.
A member of the aroid family with a range from the southern United States to South America it is also popular as a house plant. It is also considered to be an exotic invasive plant in Florida.
It tends to sprawl and can root from roots which can grow at every leaf node. When grown indoors it prefers bright filtered sun and soil which is kept moister but with good drainage.
It responds well to pruning. If it gets leggy just cut it back to a leaf node.
Pests which can attack it include:

thrip
mealybug
less common, scale

Several sites refer to all parts of the plant containing oxalic acid and being mildly to severely poisonous if eaten or having skin exposure to crushed stems but I have never had any problems touching it.
Answer: I'm not clear whether you'll be growing this outside (if you live somewhere the temperatures are adequate) or as a houseplant - it's certainly considered a houseplant in the UK. Note that Syngonium is toxic to animals if ingested, in particular, cats and dogs, as well as the warning given in the previous answer regarding possible contact toxicity.


Why is simple product price required even in a configurable product?

Question: Some months ago I released a Magento store for the company where I work and they need to change product prices so many times, especially for promo campaigns etc. The point is: because the simple products price being required by default, we have to change, in addition to the configurable product price, each price of their simple products, and it takes us a long time. I read on the internet that simple products are totally useless when working with configurable products, then I wanted to know if there is a possibility of leaving the price field of simple products as optional so we can fill only the configurable products price. Would this affect the operation of something in the store?
Answer: Yes, you can. However, this will not require price for all products, not just simple.
Catalog > Attribute > Manage Attributes > seearch for "price" > Values Requred to "No"

If you choose to do this, you have to make sure your configurable products get prices assigned. Otherwise, you'll end up with free products. There might also be some unintended consequences for removing prices from simple products.
Alternatively, there's an Apply To section when you're editing an attribute, and you can assign to which product types a given attribute applies. You can try removing simple products from the selection. But again, I'm not sure what the full implication might be for removing prices from simple products.
Comment: Is the price attribute the same for both (simple and configurable) ? Is there some way to remove the price attribute from the attribute group just for simple products, some stuff like that?
Comment: This is not a correct solution. as price wil be omitted for all the types of products
Comment: @joao_house, updated answer.
Comment: @Manashvibirla, feel free to be constructive. Setting `Values Required` to `No` does not omit prices from products. It simply makes them an optional field, which is what the OP asked for.


Seperate Annotation default text

Question: Is there any way for the default text of each annotation subtype to be different? I tried modifying my TextString default value through ArcCatalog but that does not seem to produce any results.
Comment: Would you be able to edit your question to revise it with relevant details from the responses that you have made in comments to requests for clarifications, please?
Answer: How is the annotation stored?  If it's within a geodatabase, not within the map then this should work:
Start an edit session with your annotation layer added to ArcMap. Select all annotations --> right click on a given annotation and click "attributes" from here you should have a list of all your selected annotations.
From here, change the font/size/colour what have you and save your edits and refresh the page. This should change the annotation.
Also see About changing and editing annotations. and changing attributes of annotation
You can also do this directly from the attribute table and use the field calculator.
Comment: I think what you mean is that you want the annotation to be based on the symbology of a specific feature class? Is that correct?
Comment: You may want to look into Maplex labelling engine to define your SQL queries defined by the attribute in the symbology and sub classes there. From there, convert to annotation.
Comment: Thanks for the reply, the annotation is stored within the geodatabase. I have looked up that documentation but it's not what I'm looking for. I want a label to displayed for each annotation depending on which subtype in the feature template I've clicked on, I've managed to change the default 'Text' string on a new feature class but I have yet to make it behave based on which subtype I've chosen from the Create Features window.
Comment: Yep, I just want the attribute to be populated without any typing.

Seperate Annotation default text


Do each connection in connection pool use the same socket port?

Question: Do each connection in connection pool of an JDBC driver open the same socket port on client side in order to connect to DB server? If this is the case, it means that multiple thread access the same port simultaneously, right? Thanks in advance.
Comment: I do not think it is possible to open the same open socket.  It will fail.  Also what would the advantage be?  One Server socket, Many client sockets.
Comment: Your question does not really make sense... What problem are you really facing? What is the underlying cause of asking this question?
Comment: I need to clear my concerns when working with jdbc. No real problem. Is it OK?
Answer: That's not true. Fundamentally, an instance of client socket will use only one port and it is not shared. From this article,

each requested client socket is assigned a unique port number whereas
  the server port number is always the same. If any of these numbers is
  different, the socket is different

So to answer your question, each JDBC connection uses a different client socket to connect to server.
Comment: That means I'm wrong to think that each connection uses the same port to connect to a server. Btw, I see that socket server listens to the one port and accepts many client requests.
Answer:
Do each connection in connection pool of an JDBC driver open the same socket port on client side in order to connect to DB server?

No. This is impossible.

If this is the case

It isn't.

it means that multiple thread access the same port simultaneously, right?

Wrong, and it wouldn't mean anything anyway, as connections are distinct.
Your question doesn't make any sense. What's the real problem you're trying to solve?
Answer: First of all you are asking about a general behavior where no such generality exists. It's up to the specific driver to decide how to setup. It does not even have to create network sockets at all.
Second you can answer your question about port sharing without thinking about JDBC but only networking. It's not possible to open a port a second time. That would not make any sense as the port is the way to differentiate between the clients (receiver of a packet) on the same machine. Two instances within the same JDBC could share a port but not open a port again. Sharing a port would require implementing another protocol to identify the associated connection for each data packet. But that's exactly what ports are for.
Third whether multiple threads access the same port simultaneously, again, is up to the specific driver as it is the driver deciding whether to use multiple threads or not. Nobody says that the thread accessing a JDBC connection has to be the same thread accessing the network port (in case the driver does use network connections).
Comment: The port is not '*the* way to distinguish between clients'. A TCP connexion is a 5-tuple. The client port is only one of those five elements. 'Share a port but not open a port again' is meaningless. It isn't up to the driver to decide about threads, it is up to the application. -1
Comment: I added a clarification. The question already gave the context of a single machine assuming the same IP address. Of course the port is the only differentiation between clients (i.e. JDBC connection instances) on the same machine. Respect the context. And of course the JDBC driver will decide which threads access the TCP port if there is one. The application has no direct access to the TCP port.
Comment: The words 'single machine' do not appear in the question. The JDBC driver doesn't care about threads. It's just an API. If you have evidence to the contrary please produce it to support your assertion.
Comment: The question was about two connection instances using the same port. How should they ever do that if they weren't on the same machine? Further you are mixing up API and implementation. *JDBC* is an API. The *JDBC driver* is an implementation. And this implementation is responsible for being either thread-safe or not and for using it's own threads or just the caller threads. And it's the JDBC driver which might maintain TCP connections or not.


How to play a multiplayer team death match in MW3 indefinitely? (no scoring)

Question: I do not know if this is possible but I think the online team death match is too fast? The game ends every 10-20 mins when the score is reached. Is there a way or a mode that let's you play indefinitely without scoring or at least to join a game with extremely high score goals? Currently I have no choice and I am automatically joined in a random game. This is PS3 btw.
Comment: MW3 is an 'arcade-style' shooter - fast-paced, not tactical (except in a few modes), focused on constant action. For this reason, matches are shorter. Other games (like BF3) have longer games, but different play styles. Generally, you can't have the best of both worlds. The closest I think you can get in MW3 to really long games is Sabatoge (see agent's answer)
Answer: In private matches, you can customize the rules of the game and change things such as the time limit and score limit.  However, you must then invite friends to play with you.  Private matches are just that - private, and only open to the people you invite.
If you're looking to play a game against random people on the internet, you are limited to the playlists that are available within the game.  None of the available multiplayer game modes are time-based in Modern Warfare 3.
That said, Team Deathmatch games tend to play pretty quickly, but if you just want to be playing and getting kills, you might try an "objective" game type.
For instance:

Sabotage tends to take longer and does not have a kill limit.  The objective is to get a bomb to a bomb site, which many people ignore in favor of just killing each other.
Kill Confirmed requires that you pick up tags in order to get credit for a kill, so there are typically more kills per round than in other "kill enemies to win" modes.
Drop Zone also focuses more on holding a position and playing with killstreak rewards than on a specific number of kills.
Ground War mixes several game types and has a higher score limit, so more kills are required to win, although there are typically more players.
Comment: Thank you for a comprehensive answer I think I will try S&D.
Comment: S&D is probably not your best option for a long game.  While the game may take a long time that is partly because there is no respawning so the strategy tends to be more conservative.  If you die really early in a round you have to sit out the rest of the round waiting for one side to win.  Kill Confirmed is probably the best option of the suggested, Drop Zone can last a while but tends to be very grenade spam heavy and game length can be really short if one team dominates
Comment: @RobV, ah, you're quite correct, I was confusing S&D with Sabotage.  The three bomb-type games tend to blur together for me.


Hyper-V VHDx Compacting & SIzing Issue - No Minimum Size, Unable to Shrink

Question: Trying to recover ~450GB unallocated space from a VHDx total filesize. Thanks for taking a look at this issue:

Hyper-V Server 2012.
Dynamic VHDx (we'll call it disk2.vhdx) with a file size of 1.5TB out of a maximum 2TB, does not contain Operating System, no Shadow Copies enabled.
On the VM with disk2.vhdx attached, I've shrunk the previously 1.5TB partition to be 1.05TB, freeing up about ~450GB of space now listed as unallocated in the VM.
The filesize for the VHDx still lists 1.5TB, we need to recover that 450GB on the Hyper-V host as it's nearing capacity.

Steps I've Taken:

Defragged every drive on the VM.
Turned VM off, used GUI compact, no results on any of the disks.
Used Powershell Optimize-VHD -mode full & quick, full resulted in a longer compact time but end result was no free'd space.
Using the Hyper-V Disk Management Wizard, there is no Shrink option even after shrinking the partition from within the VM.
We can simply mount the drive sucessfully with the following command (the disk is also working fine in the VM):

mount-vhd F:\disk2.vhdx

Attempting to Mount the VHD to pull info & manually resize it returns an error stating unable to 'get-disk' as there's no partition table or it's corrupt:

mount-vhd F:\disk2.vhdx -passthru | get-disk | get-partition | get-volume

Manual resize returns the same thing for both MinSize and SetBytes:

resize-vhd F:\disk2.vhdx -ToMinimumSize

Here's what get-vhd returns:
<code>ComputerName            : XXXX
Path                    : F:\Disk2.vhdx
VhdFormat               : VHDX
VhdType                 : Dynamic
FileSize                : 1572935303168
Size                    : 2147483648000
MinimumSize             :
LogicalSectorSize       : 512
PhysicalSectorSize      : 4096
BlockSize               : 33554432
ParentPath              :
FragmentationPercentage : 1
Alignment               : 1
Attached                : False
DiskNumber              :
IsDeleted               : False
Number                  :
</code>
As you can see there is no Minimum Size.
I would attempt to create a new fixed VHDx with the proper size and migrate the data over, but unfortunately we're very low on space so 1.5TB is an issue. Any ideas on how to recover the 450GB of unallocated space back from the VHDx file size to make it a 1TB drive?
I've also attempted to convert disk2.VHDx to a VHD and use the third party tool VHDResizer, but it eats up the remaining disk space before it can complete the transition to vhd. Could this work if it were a VHD? I could look into transferring the VHDx off of the server onto one with more space to complete the conversion and test VHDResizer, I have no experience with the tool so I'm unsure if it's worth the attempt.
Thanks, appreciate any and all ideas.
Comment: Have a look at; https://serverfault.com/questions/962203/hyper-v-vhdx-file-is-much-larger-than-the-contents
Answer: Maybe you can shrink the VHDx file directly from inside your virtual machine, by using TRIN/UNMAP from your guest.
Simply try recreating a new partition inside your guest's free space, and format it. If all stars align correctly, it will free a significant amount of space, returning it to the host OS.
Please note that the file will appear to have the same size as before, but total free disk space should nevertheless increase.


Analysis project to conduct

Question: We have been asked to conduct an analytic project for chemistry. It is important that the project conducted hold social implications and the conclusion achieved help inform people better. Several ideas have come to my mind for such projects, such as determining amount of phosphoric acid in cold drinks, acetic acid in fruits such as guava, amount of insecticides/pesticides in vegetables/fruits in the market. However, I am still yet to find an idea which is striking. I would like to do something unique. Any suggestions?
Comment: I've replace the new tags with one already used here: [tag:everyday-chemistry]. I hope you're fine with that.
Comment: Amount of pesticides on fruits? That's really hard to find out!
Comment: @MARamezani I realized that after I came up with the idea. But at least estimating it would be viable?
Answer: As you might have guessed: It depends!

What is the educational level of the study (High School, College, etc.)?
What's the time frame - how many man-hours?
What's the equipment of the lab?
If equipment or material has to be bought: What is the budget?
Is it a plain academic study or is it intended to go public with the results in order to change/improve consumer awareness?

"Something unique" might mean that

there are no reference data
it is too "academic" to have social implications (or at least that it will be difficult to explain to the public that it actually has)

What about something as "boring" as sugar content in local soft drink brands as compared to similar products on the international market? I'm sure you'll find lots of references, such as this.
Go for something that is relevant for the average Joe Bloggs. Go for something that can be bought thoughout the while time of the study, just in can you have to repeat measurements or need to cover seasonal variations. If it is a fresh, seasonal product, you might have to plan ahead and stockpile and deep-freeze material.
In the end, it is up to you to decide - planning and outlining the study is part of the project.
Speaking of relevance for the average consumer: Everybody needs excrete - but you do not want to examine that. Fortunately, everybody needs to eat too and seemingly, a lot of people tend to eat too much of the wrong stuff. The recent report of the US Dietary Guidelines Advisory Committee might give some directions what to look for.
Comment: @Gummybears Rumour has that everybody wants to achieve more with less. Experience tells that days and nights in the lab can be very long and frustrating ;)
Comment: I'm currently studying in 12th grade. We have approximately 6 months to fully conduct the project, but we have to submit the idea in 1 week. Equipment should not be an issue. It is not required to actually go to the public, but during writing the report, I need to mention how the conclusion of my experiment helps to increase consumer awareness. I will have to do something "boring" if nothing else comes to mind.
Comment: @Gummybears Don't worry about the "boring", as long it is carefully conducted, related to known data and well presented. Most of the work is 5% inspiration and 95% transpiration ;)
Comment: That's the difficult part. I wanted to turn those figures around xD

Analysis project to conduct


Is furry cub porn considered pedophilia?

Question: So, I was talking with a friend on Discord and they told me that digital drawings of furry cubs that display sexual/fetish content is both pedophilia and zoophilia and punishable by law, but this confused me as there are sites like InkBunny and e621 that host this type of content with servers based in the United States. For anyone unfamiliar with the furry fandom, a "furry cub" is essentially a young/adolescent animal of some sort that hasn't reached adulthood. So, is this considered legal in the United States?
Comment: Just because something is pedophilic does not make it illegal. It's only illegal if it falls into the realm of specific laws such as child pornography. But a drawing of an underage animal is not a human child.
Comment: @ forest 22  So-called "furry" art generally uses anthropomorphic animals which are partly human, much like classic cartoon (Yogi Bear is as much like a human as a bear, really).  Such are may have an erotic theme, but most of it would not be child porn under US law.
Comment: It's not *child pornography* as long as there aren't any nude/sexualised (human) children (-18) in it. Naked or otherwise, animal-human hybrids are only subject to child pornography laws if the *"human"* part depicts the body (or face) of an adolescent.
Answer: Note that "pedophilia" is a psycological or social term, and not a legal term. What laws prohibit is the creation, distribution, and possession of child pronography Under 18 U.S.C. § 2251- Sexual Exploitation of Children:

Any person who employs, uses, persuades, induces, entices, or coerces any minor to engage in, or who has a minor assist any other person to engage in, or who transports any minor in or affecting interstate or foreign commerce, or in any Territory or Possession of the United States, with the intent that such minor engage in, any sexually explicit conduct for the purpose of producing any visual depiction of such conduct or for the purpose of transmitting a live visual depiction of such conduct, shall be punished as provided under subsection (e), if such person knows or has reason to know that such visual depiction will be transported or transmitted using any means or facility of interstate or foreign commerce or in or affecting interstate or foreign commerce or mailed, if that visual depiction was produced or transmitted using materials that have been mailed, shipped, or transported in or affecting interstate or foreign commerce by any means, including by computer, or if such visual depiction has actually been transported or transmitted using any means or facility of interstate or foreign commerce or in or affecting interstate or foreign commerce or mailed.

This means that there is no offense if no real child is involved, and this is also true of the various other US laws on child porn. Since the case of Ashcroft v. Free Speech Coalition, 535 U.S. 234 (2002) erotica which appear to depict a minor engaging in sexual activity, but which are not depictions of any actual child are protected speech under the US First Amendment and are therefor not criminal.
So called "furry cub porn"  might include modified images of actual minors, in which case it would seem to be covered under US laws against child porn. But if the character is totally invented, or is based on an adult rather than a minor, then it would seem to come under the rule of Ashcroft v. Free Speech Coalition.
Note, the law in other countries is significantly different. In particular in the UK a realistic drawing may be considered to be a "pesudo-photograph" even if not based on an actual person, and may be punishable in the same way as an actual photo of an actual minor.
Note also, the making, distribution, or posse ion of 'child porn' is a very serious criminal offense. I am not a lawyer, and one should not rely on this post to determine what acts are and are not legally safe. If there is any question, consult a lawyer.
Note also that under the above statute (18 U.S.C. § 2251), something may be "child pornography" if the person involved is a minor, even if that person is old enough under local law to consent to sexual activity, and even if the person did in fact so consent, and even if there was no intent to distribute the image or video. So a person taking, say, a cell-phone video of him- or herself having sex with a 17-year-old, intended for personal watching only, in a state where the age of consent to sex is 16, can still be found guilty under this law, and such cases have occurred.
Comment: Okay, but what if the image is based off of an animal?
Comment: @Eduardo Perez Images of non-humans of any age or species  are not legally child porn in the US, nor are images of adult humans. Only recognizable images of real humans younger than 18. Now a real under-age  human's face put on an animal's body could still count as an "image of a child".


"Provide with" or simply "Provide"

Question: Is it grammatically correct " Which is correct sentence: "Please provide me with the following documents" or "Please provide me the following documents"
Comment: The **provide** + IO + DO ditransitive construction is, I'd say, marginally available ('... will also provide you the way of escape' appears in the Bible (ICor 10:13) in at least one version). But I'd normally avoid it.
Answer: Subject at all times to anything @John Lawler may say, I think it is because the verb "provide" is ditransitive.
Please provide the documents, and Please provide me with the documents are both correct. (But Please provide me the documents is NOT correct).
In the first instance the direct object is "the documents", but in the second, where "me" becomes the direct object then "documents" is indirect and hence requires a preposition -"with".

"Provide with" or simply "Provide"


Geometry nodes Simulate project from view for UV map

Question: Is there a way to simulate the project from view for uvs with geometry nodes? I know you cant project the uvs from the viewport point of view in geometry nodes (actually I wont be surprised if it is possible), but is there a way to sort of project the uvs of your mesh from one axis?
Answer: I don't know if this will do. but it's a match for the UV Project modifier given a single orthoghraphic projector:

It inverts the relative transform of the provided 'Projector' object, gives that transform to a copy of the modified mesh, and transfers the positions of the transformed  face-corners to a pre-existing UV map on the modified object.

It does not match projection from a camera, which must involve other jiggery-pokery, including a perspective transform. However, your view can be set to that of an orthographic projector-object by selecting it, and hitting ShiftNumpad 7


How to use Finverse in Matlab?

Question: When using finverse code in matlab there might not be a unique answer for that, how can we use if to choose one of these?
Comment: have you tried to search it on internet first??
Answer: Here is the documentation of finverse which can of course be found using doc finverse.
It is mentioned that there will be no warning if the inverse is not unique, and it is not mentioned which one is chosen in that case. Hence I think it is safe to assume that you cannot instruct matlab on which inverse to choose.
If that is really required, you will probably not be able to use the standard implementation.

How to use Finverse in Matlab?


Change default Python interpreter on Windows XP

Question: I have two python versions: Python 2.5 and Python 2.7. When I'm setting up django, I want to use Python 2.7, but django is using Python 2.5 somehow.
How can I make sure that django use Python 2.7? I'm using Windows XP
Comment: Possible duplicate of [Changing python interpreter windows](http://stackoverflow.com/questions/1053794/changing-python-interpreter-windows)
Answer: Changing your PATH will help, if you always call python directly, rather than relying on
file association.
For example: "python foo.py" will run the 'foo' script with whichever python is first on your PATH.
However, if you just run "foo.py", the handler associated in the registry, for this file extension, will be the first one called.
In your case, it sounds like that would be python 2.5.  Have a look by opening regedit, and checking the
values of:
HKEY_CLASSES_ROOT\Python.File\shell\open\command

The (default) value listed will probably be something like "C:\Python25\python.exe" "%1" %*
A quick (and dirty?) fix for you would be to change these values to the python version you actually want.
A better fix would be to do something like what's outlined in this feature request:
http://bugs.python.org/issue4485
Since then, as long as you had admin rights, you could switch as you needed by pointing assoc at the version you want quickly.
Comment: BTW Quick way to find out handler for python file extension: `ftype|find /I "python"`
Comment: this answer provides more details on finding what is associated with .py http://stackoverflow.com/a/5088548/264607 and shitalshah answer is more current: http://stackoverflow.com/a/24277570/264607
Answer: Make two simple .cmd files:
python25.cmd:
@echo off
set PYTHONHOME=c:\python25
set PATH=%PATH%;c:\python25

python27.cmd:
@echo off
set PYTHONHOME=c:\python27
set PATH=%PATH%;c:\python27

Now you can switch between Python 2.5 and 2.7. :)
Answer: Change your PATH system environment variable to point to the version of Python you want to use.
Comment: Note that this won't change file extension associations.
Answer: Python installer does no change to PATH environment variable under windows.
When typing something like python setup.py windows first looks for python in PATH, then in current user registry hive
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\Python.exe

and then in local machine registry hive
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\Python.exe

Answer: Now that Python 3.3 is released it is easiest to use the py.exe utility described here:
http://www.python.org/dev/peps/pep-0397/
It allows you to specify a Python version in your script file using a UNIX style directive.  There are also command line and environment variable options for controlling which version of Python is run.
The easiest way to get this utility is to install Python 3.3 or later.
Answer: If you want to switch between Python 2.x and Python 3.x then easiest way is to use Python Launcher which is included since 3.3 version. This is basically py.exe in Windows folder. To start Python 3.x command prompt, just type
py -3

To execute script with Python 3.x, use
py -3 script.py

If you don't specify -3 then 2.x version is used by default. You can also make this explicit by using -2.7 switch.
py -2.7 script.py

Finally, you can now embed the version number to use in .script file itself. This works because after Python 3.3+ is installed, it associated py.exe with .py files.
#! python3
import sys
sys.stdout.write("hello from Python %s\n" % (sys.version,))

Comment: I would add that you can change the default in py.ini file included in the location of py.exe
Answer: Change the registry key at
HKEY_CLASSES_ROOT\Applications\python.exe\shell\open\command


How come "screw over" means "to cheat"?

Question: I looked it up in Wiktionary, and I've found out that the term "screw over" means "to cheat someone, or ruin their chances in a game or other situation."
I want to know how that term came about? What is its origin? And what does "over" mean here?
Comment: Comments here have been deleted because **answers go in the answer box.**
Comment: @LatiffaLe It looks like you can log in using a new identity. If you now have two accounts, you can ask the Stack Exchange staff for them to be [merged](https://english.stackexchange.com/help/merging-accounts).
Answer: I'm not sure anyone has researched this, but it is presumably related to the phrasal verb "fuck over." Green's dictionary of slang dates "fuck over" back to at least 1965. John Strachey's The End of Empire used it in 1960, though, so it appears to be older.
Answer: screw as such is of a somewhat uncertain origin. The mechanical sense could be an allusion to pig-tails, inasmuch as screws have windings. In this sense, to screw over can be torturing a piece of gear, destroying the nut. As a metaphor, this could easily mean to overstay one's welcome. That would be a plausible null hypothesis.
However, there is a range of German idioms with one refering to scheren "to shear, shave" collocated with über "over", though that's more often barbieren: jemanden über den Löffel barbieren "to screw somebody over".
Röhrich (Redewendungen) explains this, that barbers were generally not deemed trustworthy, and refers to a practice of shoving a spoon under the cheek of the person to be shaved so as to create a smooth surface in the case when there are no teeth to do the job. This doesn't impress me as very believable. Anyway, it means the idiom has a history because Röhrich didn't make it up. If the teeth bit is an implausible folkish element, the practice may simply serve to speed up the process—a quick job, perhaps a botch job.
It is in both cases easier to start from a common sense of cutting—indeed to cut somebody, to skim, to card, to shave a few coins (literally)—rather than to rely on colorful imagery.
There are so many idioms which use über respectively over to mark exaggeration that it may well be coincidence anyway. The same can be said for the sexual euphemism. I'll be fucked if that was on the books in time (NB: ~ up must mean open, as of a wound, which are homophone in German auf).
Besides, Yiddisch has schachern to cover a range of senses such as vb. "barter", adj. "greedy", from Hebrew sāḥar. I can only wonder what its result would be in English because both thiefscant and antisemitic slurs make liberal use of lexical replacement. E.g. German schröpfen "to bloodlet", related to scrape, now also means "to make pay through the nose" as does the literal verbal phrase jmd. zur Ader lassen.
The phonology would be quite a stretch because argot intentionally obscures; at best it connects back to the barber, quacks and other charlatans. Besides, Low German schäkern "to flirt" (and more?) likely belongs to the sense of "barter" vel sim. And, to check somebody out could belong to a related idiom though it has plausible deniability.
If you can find screwy in a sense of "greed", that would be darn close. So far, there is at least a possible parallel to the sexual euphemism. I mean, I get to nail, but to screw? Come on, what are you doing!? Of course this type of coincidence has to be deliberate.
From the word shape it is obvious that sk is at any rate not inherited from Old English, because that would become sh.

How come "screw over" means "to cheat"?


ubuntu won't boot

Question: So my configuration is such that my windows 7 is installed on a msata ssd drive and I am trying to install ubuntu on my regular sata hdd. Overall the windows installer copies the files but ubuntu doesn't show in the boot menu. Could you tell me the solution for that?
Comment: Are you using WUBI.EXE to install Ubuntu from within Windows, or are you booting from a Live USB/DVD and installing from there using the side-by-side option?
Answer: You need to use grub, its a boot manager. It will load a list of boot options eg win 7 win 8 ubunutu.
However grub works on a linux system, and your MBR (master boot record) is on the windows drive. So windows boots before even know there are other drives with other options.
for safety sake I say tell your bios to boot the sata hdd first, you will then need to configure grub to offer the option to boot the ssd.
Answer: My installation scenario is very similar to yours, Win7 On SSD, and Ubuntu 12.10 on an internal SATA drive. When I installed Ubuntu I opted to manually partition the HDD.
After installation I changed my bios to boot from HDD; since there are 2 distinct OSes installed GRUB presents the option to boot Ubuntu (1st option) or Win 7 (second option) without having to mess with bios settings. If you wish to have Win 7 as the first option (therby after a short timeout GRUB will automatically boot Win 7 - Grub Customizer is available for installation
<code>sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
</code>

ubuntu won't boot


ssh private-public key map for client

Question: In ssh communication between server and client, client gets authenticated by its private key. I want to know that how does the server knows that which public key belong to client, if the server has more than 1 public key in its authorized_keys file.
Answer: Client sends its public key ID and server checks if this key is in list of authorized_keys.

The client begins by sending an ID for the key pair it would like to authenticate with to the server.
The server check's the authorized_keys file of the account that the client is attempting to log into for the key ID.
If a public key with matching ID is found in the file, the server generates a random number and uses the public key to encrypt the number.
The server sends the client this encrypted message.
If the client actually has the associated private key, it will be able to decrypt the message using that key, revealing the original number.

https://www.digitalocean.com/community/tutorials/understanding-the-ssh-encryption-and-connection-process
Comment: Thanks for the explanation. Can you please confirm if the key ID you are talking about here is the fingerprint we calculate using ssh-keygen -lf public_key or is it something else. how can i see what is the keyID for my public/private key pair.
Comment: The first 2.5 bullets are almost right; the rest is wrong even for RSA, and is ludicrously impossible for DSA, ECDSA, and ED25519.
Answer: This is very nicely explained in the RFC4252 including the messages that are send back and forth by client and server:

The first message SSH_MSG_USERAUTH_REQUEST contains the public key blob which is used to compare with the key stored in authorized_keys
Server answers with SSH_MSG_USERAUTH_PK_OK or failure
Second SSH_MSG_USERAUTH_REQUEST contains again the public key (assuming it is the blob again) together with the signature over known data (including the public key).

The first two points are not mandatory and you can do only the last one (but probing which key to use saves a computation power).
Comment: Probing may also avoid forcing the user to enter the passphrase for a privatekey that won't be accepted (although if you keep all the keys in ssh-agent or keyring or such it doesn't matter).

ssh private-public key map for client


Install vim-latex in windows

Question: I'm stalling Vim-latex. I believe I have done steps 1 and 2 on http://vim-latex.sourceforge.net/index.php?subject=download&title=Download.
How can I do step 3 if I'm using Windows? Thanks.
Answer: You just need to type helptags ~/vimfiles/doc in command-line mode, that is
:helptags ~/vimfiles/doc

This step will generate help tags (see :h helptags) files which allow you to use tag jump (Ctrl+], Ctrl+T).
Plugin Manager
Note that plugin manager does this step for you (e.g. Vundle) and this is also recommended. For instance, after installing Vundle, you just need to put Plugin 'vim-latex/vim-latex' (in the appropriate place) in your .vimrc (in your case _vimrc or _gvimrc).
See the Vundle's wiki for more details to install Vundle under Windows.
P.S. I never use vim under Windows, so I may be wrong.

Install vim-latex in windows


Best practice for Undo Redo implementation in C#

Question: I need to implement Undo/Redo frame work for my window application(editor like powerpoint), what should be the best practice to follow, how would be handle all property changes of my objects and it reflection on UI.
Comment: Probably helpful: "Multilevel Undo and Redo Implementation in C#" [1](https://www.codeproject.com/Articles/33371/Multilevel-Undo-and-Redo-Implementation-in-C-Part) and [2](https://www.codeproject.com/Articles/33384/Multilevel-Undo-and-Redo-Implementation-in-Cshar-2)
Answer: There are two classic patterns to use.  The first is the memento pattern which is used to store snapshots of your complete object state.  This is perhaps more system intensive than the command pattern, but it allows rollback very simply to an older snapshot.  You could store the snapshots on disk a la PaintShop/PhotoShop or keep them in memory for smaller objects that don't require persistence.  What you're doing is exactly what this pattern was designed for, so it should fit the bill slightly better than the Command Pattern suggested by others.
Also, an additional note is that because it doesn't require you to have reciprocal commands to undo something that was previously done, it means that any potentially one way functions [such as hashing or encryption] which can't be undone trivially using reciprocal commands can still be undone very simply by just rolling back to an older snapshot.
Also as pointed out, the command pattern which is potentially less resource intensive, so I will concede that in specific cases where:

There is a large object state to be persisted and/or
There are no destructive methods and
Where reciprocal commands can be used very trivially to reverse any action taken

the command pattern may be a better fit [but not necessarily, it will depend very much on the situation].  In other cases, I would use the memento pattern.
I would probably refrain from using a mashup of the two because I tend to care about the developer that's going to come in behind me and maintain my code as well as it being my ethical responsibility to my employer to make that process as simple and inexpensive as possible.  I see a mashup of the two patterns easily becoming an unmaintainable rat hole of discomfort that would be expensive to maintain.
Comment: +1 If the state of your objects are not very large, this is drastically simpler to implement than the undo/redo command pattern which can get complex very easily. And often times you will have destructive commands that cannot be undone without a full state copy anyway. But for very large states, this can be impractical.
Comment: The link to the momento pattern is dead.
Comment: Take a look at purely functional data structures; they can give you considerable sharing between the current live data and the mementos.
Comment: Take a look at state diffing described in my answer. Might be the better alternative depending on your use case.
Comment: you could also go for a hybrid approach where commands can still be destructive, and the state is large, but you keep snapshots of the state every now and again. Meaning in order to undo one step you would revert to the last snapshot and then replay the commands until one step before the current. Then you can control a trade-off between memory consumption and a single undo operation performance, by choosing how often do you store a full snapshot.
Answer: There are three approaches here that are viable. Memento Pattern (Snapshots), Command Pattern and State Diffing. They all have advantages and disadvantages and it really comes down to your use case, what data you are working with and what you are willing to implement.
I would go with State Diffing if you can get away with it as it combines memory reduction with ease of implementation and maintainability.
I'm going to quote an article describing the three approaches (Reference below).
Note that VoxelShop mentioned in the article is open source. So you can take a look at the complexity of the command pattern here:
https://github.com/simlu/voxelshop/tree/develop/src/main/java/com/vitco/app/core/data/history
Below is an adapted excerpt from the article. However I do recommend that you read it in full.

Memento Pattern

Each history state stores a full copy. An action creates a new state and a pointer is used to move between the states to allow for undo and redo.
Pros

Implementation is independent of the applied action. Once implemented we can add actions without worrying about breaking history.
It is fast to advance to a predefined position in history. This is interesting when the actions applied between current and desired history position are computationally expensive.

Cons

Memory Requirements can be significantly higher compared to other approaches.
Loading time can be slow if the snapshots are large.

Command Pattern

Similar to the Memento Pattern, but instead of storing the full state, only the difference between the states is stored. The difference is stored as actions that can be applied and un-applied. When introducing a new action, apply and un-apply need to be implemented.
Pros

Memory footprint is small. We only need to store the changes to the model and if these are small, then the history stack is also small.

Cons

We can not go to an arbitrary position directly, but rather need to un-apply the history stack until we get there. This can be time consuming.
Every action and it's reverse needs to be encapsulated in an object. If your action is non trivial this can be difficult. Mistakes in the (reverse) action are really hard to debug and can easily result in fatal crashes. Even simple looking actions usually involve a good amount of complexity. E.g. in case of the 3D Editor, the object for adding to the model needs to store what was added, what color was currently selected, what was overwritten, if mirror mode active etc.
Can be challenging to implement and memory intensive when actions do not have a simple reverse, e.g when blurring an image.

State Diffing

Similar to the Command Pattern, but the difference is stored independent of the action by simply xor-nig the states. Introducing a new action does not require any special considerations.
Pros

Implementation is independent of the applied action. Once the history functionality is added we can add actions without worrying about breaking history.
Memory Requirements is usually much lower than for the Snapshot approach and in a lot of cases comparable to the Command Pattern approach. However this highly depends on the type of actions applied. E.g. inverting the color of an image using the Command Pattern should be very cheap, while State Diffing would save the whole image. Conversely when drawing a long free-form line, the Command Pattern approach might use more memory if it chained history entries for each pixel.

Cons / Limitations

We can not go to an arbitrary position directly, but rather need to un-apply the history stack until we get there.
We need to compute the diff between states. This can be expensive.
Implementing the xor diff between model states might be hard to implement depending on your data model.

Reference:
https://www.linkedin.com/pulse/solving-history-hard-problem-lukas-siemon
Comment: @b1nary.atr0phy Finally some constructive feedback! I've adjusted the answer and would appreciate if you could remove your down-vote!
Comment: Contextually speaking, this is miles better. Wish granted :)
Comment: I don't understand why this wasn't marked the correct answer. It provides nonpartisan pros and cons for all valid approaches that I'm aware of. BenAlabaster's answer omits the state diff approach and tends to be pretty self righteous towards the end.
Comment: These down-votes without explanation are really discouraging :/
Comment: I imagine it's because you aren't exactly explaining anything. OP specifically asked about best practices, whereas you're simply providing pros and cons without even summarizing these methodologies.
Answer: The classic practice is to follow the Command Pattern.
You can encapsulate any object that performs an action with a command, and have it perform the reverse action with an Undo() method.  You store all the actions in a stack for an easy way of rewinding through them.
Comment: This doesn't allow for one way functions such as hashing or mathematical functions that can't be 'undone' using a reciprocal method.  Therefore this pattern should be used with care for this approach.
Comment: @Ben that's usually the case with the command approach. For each command, you need to store a little bit of state to undo the command. Take for example a DeleteSelectedTextCommand whose undo command would need the text that was deleted. In some cases the undo state just needs to include the whole state. But for most cases, I think your suggestion of always using full state copies is the most practical solution.
Comment: That's quite true.  For general UI stuff it goes a long way though.
Comment: Random question from someone who never implemented one of those patterns: Couldn't the command pattern easily store a snapshot of the previous state it altered to facilitate undo? Kinda like an unholy alliance between Command and Memento? Especially if many commands can be trivially undone storing snapshots for every action might be a bit expensive.
Comment: @Johannes - I guess you could use a mashup, using the command pattern for trivial functions and the memento pattern for less trivial functions.  It should perform well, but it could potentially be a headache to maintain.  Considering the trivial cost of memory/disk space, I'd say go one way or the other.  If you don't have one way functions, use the Command Pattern, if you do, use the Memento Pattern.
Answer: Take a look at the Command Pattern.
You have to encapsulate every change to your model into separate command objects.
Comment: See my comment on Womp's answer for using the command pattern for 'undo' mechanisms
Answer: I wrote a really flexible system to keep track of changes. I have a drawing program which implements 2 types of changes:

add/remove a shape
property change of a shape

Base class:
public abstract class Actie
{
    public Actie(Vorm[] Vormen)
    {
        vormen = Vormen;
    }

    private Vorm[] vormen = new Vorm[] { };
    public Vorm[] Vormen
    {
        get { return vormen; }
    }

    public abstract void Undo();
    public abstract void Redo();
}

Derived class for adding shapes:
public class VormenToegevoegdActie : Actie
{
    public VormenToegevoegdActie(Vorm[] Vormen, Tekening tek)
        : base(Vormen)
    {
        this.tek = tek;
    }

    private Tekening tek;
    public override void Redo()
    {
        tek.Vormen.CanRaiseEvents = false;
        tek.Vormen.AddRange(Vormen);
        tek.Vormen.CanRaiseEvents = true;
    }

    public override void Undo()
    {
        tek.Vormen.CanRaiseEvents = false;
        foreach(Vorm v in Vormen)
            tek.Vormen.Remove(v);
        tek.Vormen.CanRaiseEvents = true;
    }
}

Derived class for removing shapes:
public class VormenVerwijderdActie : Actie
{
    public VormenVerwijderdActie(Vorm[] Vormen, Tekening tek)
        : base(Vormen)
    {
        this.tek = tek;
    }

    private Tekening tek;
    public override void Redo()
    {
        tek.Vormen.CanRaiseEvents = false;
        foreach(Vorm v in Vormen)
            tek.Vormen.Remove(v);
        tek.Vormen.CanRaiseEvents = true;
    }

    public override void Undo()
    {
        tek.Vormen.CanRaiseEvents = false;
        foreach(Vorm v in Vormen)
            tek.Vormen.Add(v);
        tek.Vormen.CanRaiseEvents = true;
    }
}

Derived class for property changes:
public class PropertyChangedActie : Actie
{
    public PropertyChangedActie(Vorm[] Vormen, string PropertyName, object OldValue, object NewValue)
        : base(Vormen)
    {
        propertyName = PropertyName;
        oldValue = OldValue;
        newValue = NewValue;
    }

    private object oldValue;
    public object OldValue
    {
        get { return oldValue; }
    }

    private object newValue;
    public object NewValue
    {
        get { return newValue; }
    }

    private string propertyName;
    public string PropertyName
    {
        get { return propertyName; }
    }

    public override void Undo()
    {
        //Type t = base.Vorm.GetType();
        PropertyInfo info = Vormen.First().GetType().GetProperty(propertyName);
        foreach(Vorm v in Vormen)
        {
            v.CanRaiseVeranderdEvent = false;
            info.SetValue(v, oldValue, null);
            v.CanRaiseVeranderdEvent = true;
        }
    }
    public override void Redo()
    {
        //Type t = base.Vorm.GetType();
        PropertyInfo info = Vormen.First().GetType().GetProperty(propertyName);
        foreach(Vorm v in Vormen)
        {
            v.CanRaiseVeranderdEvent = false;
            info.SetValue(v, newValue, null);
            v.CanRaiseVeranderdEvent = true;
        }
    }
}

With each time Vormen = the array of items that are submitted to the change.
And it should be used like this:
Declaration of the stacks:
Stack<Actie> UndoStack = new Stack<Actie>();
Stack<Actie> RedoStack = new Stack<Actie>();

Adding a new shape (eg. Point)
VormenToegevoegdActie vta = new VormenToegevoegdActie(new Vorm[] { NieuweVorm }, this);
UndoStack.Push(vta);
RedoStack.Clear();

Removing a selected shape
VormenVerwijderdActie vva = new VormenVerwijderdActie(to_remove, this);
UndoStack.Push(vva);
RedoStack.Clear();

Registering a property change
PropertyChangedActie ppa = new PropertyChangedActie(new Vorm[] { (Vorm)e.Object }, e.PropName, e.OldValue, e.NewValue);
UndoStack.Push(ppa);
RedoStack.Clear();

Finally the Undo/Redo action
public void Undo()
{
    Actie a = UndoStack.Pop();
    RedoStack.Push(a);
    a.Undo();
}

public void Redo()
{
    Actie a = RedoStack.Pop();
    UndoStack.Push(a);
    a.Redo();
}

I think this is the most effective way of implementing a undo-redo algorithm.
For an example, look at this page on my website: DrawIt.
I implemented the undo redo stuff at around line 479 of the file Tekening.cs. You can download the source code. It can be implemented by any kind of application.
Comment: Please note if you want to promote your own product/blog you **must disclose your affiliation in the answer**, otherwise, your answer may be flagged as spam. If you are not affiliated with the site, I recommend you say so to prevent this. Please read [How to not be a spammer](https://stackoverflow.com/help/promotion)


Bitcoin adder or bitcoin generator or bitcoin hacker software

Question: Nowadays I always see many persons selling bitcoin adder / bitcoin generator or bitcoin hacker software claiming that these are creating 1 bitcoin or more.
I am unable to believe authenticity of their claim.
Can any one make me clear whether these programs work or merely are scams.
Comment: It could theoretically work. https://www.youtube.com/watch?v=foil0hzl4Pg
Answer: AFAIK no such thing is possible. Could you please describe where this balance is supposed to be created?
You could obviously change your local record of the blockchain to reflect added balance, however, no other Bitcoin node would accept payments funded from that balance.
Answer: Well it's possible. See https://yourprivatekeys.online . If your went through the entire site, would take hundreds of thousands of years, you would have the private key to every bitcoin wallet that has a balance. The chances are very small that you would find some thing but you could get lucky.


Displaying different in-page content to cliente/admin

Question: i'm a young informatic engineer student who is developing his first wordpress website. It is a booking website when a client can see the available hours in certain local and book it, and the local can login with his account to check the books that he has and make new ones (for example, the ones booked by phone).
What i want is to display different content depending on the account which is logged in. For example, the local can see and modify all the schedule, but the client can only see the available hours and book it.
I dont know if it is possible, or if it is so difficult, so i would love any help or advice.
Thank you guys.
Comment: **A quick tip for getting great answers**: Consider starting by expanding on the summary you put in the title. Explain how you encountered the problem and any difficulties in solving it yourself. The first paragraph is the second thing most readers will see, so make it a good one. Check [our guide to asking good questions](https://wordpress.stackexchange.com/help/how-to-ask) if you need to.
Comment: This is a fairly broad question - more specific ones tend to get more responses. Are you wanting people to log in and manage all this on the back end, or trying to keep it all on the front end? There may already be plugins available that can do what you're needing, it may just take some research and experimenting. You could also build your own theme if you're wanting everything managed on the front end, and use simple conditionals checking the current user's capabilities.
Comment: It's not that broad. Surely the answer is just to check capabilities?
Answer: You are going to want to look at a few things. First, the WP_user object which will enable you to check if the user is even logged in. But you can also check capabilities with the has_cap method.
You can even define your own capabilities and apply them to users.
Then you would do something along these lines:
 <?php

 $user = wp_get_current_user();
 if($user->exists()){
      // logged in user
     if( $user->has_cap('edit_users') ){
          // user can edit users
     }else{
          // this user cannot do that
     }
 }else{
     // anon user
 }


Rinkeby authenticated Faucet is saying "insufficient funds for gas*price + value"

Question:
I am learning more about the blockchain so I just started a tutorial on Freecodecamp, in the following video I need to test Ethereum from Rinkeby authenticated Faucet, I did the following step but showed an error.
can anyone help?
Comment: Rinkeby Deprecated.
Answer: It's showing an error because Rinkeby Testnet is almost deprecated. Check this warning.
Migrate your contracts and deploy new ones on Goerli or Sepolia. The only two testnets, developers will maintain after the merge.
Use Goerli from now on, It is the most recommended testnet rn.
Goerli Testnet Faucet: https://goerlifaucet.com/
Comment: BTW I don't think that Rinkeby is deprecated fully. So as you said you are new, you can try to get some Rinkeby ETHs from here https://faucets.chain.link/rinkeby . Rinkeby authenticated Faucet has some of his own issues/bugs I think. It's showing me the same thing for the Gorli testnet ETHs request. So try Chainlink Rinkeby Faucet
Answer: FYI Goerli is officially the only Ethereum testnet, Rinkeby and all other testnets are deprecated. +1 for https://goerlifaucet.com


How would I figure out how many anagrams of mississippi don't contain the word psi?

Question: I'm really confused how I'd calculate this. I know it's the number of permutations of mississippi minus the number of permutations that contain psi, but considering there's repetitions of those letters, I'm not sure how I'd do it.
Answer: The property of "containing a word as a substring" is pretty hard for me to model mathematically without counting it out. I wonder if there is a nicer solution.
Anyway: basic strategy:
count permutations of MISSISSIPPI - permutations of the form PSIXXXXXXXX - permutations of the form XPSIXXXXXXX - ... - permutations of the form XXXXXXXXPSI + permutations with two copies of the word PSI (note that we need not worry about permutations with three copies of the word PSI as there are only two Ps in MISSISSIPPI).
Execution:
permutations of MISSISSIPPI = $\dfrac{11!}{4!4!2!}$
permutations of MISSISSIPPI starting with the word PSI = permutations of the remaining letters, which are MPSSSIII  = $\dfrac{8!}{3!3!}$
we multiply this number by $9$ for the possible first positions of P.
Now we need to count the double-PSIs.
If there is a double-PSI, there are 21 possibilities for the location of the double-Ps $(1, 4)$ through $(1, 9)$, $(2, 5)$ through $(2, 9)$, ..., $(6, 9)$.
For each such possibility, the remaining letters are just permutations of MSSII of which there are $\dfrac{5!}{2!2!}$.
So the "final" answer, scare quotes because I've probably made a mistake, is
$$
\frac{11!}{4!4!2!} - 9\frac{8!}{3!3!} + 21\frac{5!}{2!2!}
$$
Comment: I believe that the second term should be $-9\cdot\dfrac{8!}{3!3!}$, with a factor of $9$, not $8$: PSI can start in positions $1$ through $9$. If my arithmetic is correct, it then comes to $25,200$.
Comment: With Brian's correction, your answer is OK.
Comment: thanks for checking up on it! agreed that it's 9 and not 8, changing the answer now.
Answer: You start out from the permutations of the whole set of letters, and work through eliminating repetitions. Let's start, working slowly.
Your set is composed of the letters in the word: $S={M,I,S,S,I,S,S,I,P,P,I}$ This set has cardinality (element count): $|S|=11$
This set has $P_{11}=11!=39916800$ permutations.
Now, you have to remove repetitions caused by permutations of the same letter. Imagine the permutation: MIIIISSSSPP. You'll have permutations that will look the same when:

You switch the two Ps
You switch the four Ss between them
You switch the four Is between them

How many of these will there be? It's a combinatorics sub problem. There are two Ps, four Ss and four Is, so you have $P_2=2!=2$ permutations for the Ps and $P_4=4!=24$ for the Is and again for the Ss. You have $2\times24\times24=1152$ permutations of equal letters, per pattern.
Note that these repetitions occur for every different pattern. You have $1152$ repetitions that result in MIIIISSSSPP, but you have another $1152$ that result in MIIIIPPSSSS. To remove the repetitions, you have to divide the $39916800$ obtained above by $1152$ instead of subtracting $1152$ from the $39916800$ (which is a common error for beginners).
So, by now, we know how many permutations without repetition there are of $S={M,I,S,S,I,S,S,I,P,P,I}$. There are $\frac{P_{11}}{P_2 \times P_4 \times P_4}=\frac{39916800}{1152}=34650$.
The last part is solving the sub problem of how many permutations of MISSISSIPPI contain PSI. This is quite simple. It's the same problem as above, but with this set $S={PSI,M,I,I,I,S,S,S,P}$. This set has cardinality 9, so has $P_9=9!$ permutations, from which we have to remove repetitions caused by swapping equal letters (three Is, three Ss). These repetitions are $P_3 \times P_3=3!\times3!=36$ per pattern, so just like before, we divide $\frac{P_9}{P_3 \times P_3}=10080$
Now, there's a bit of a snag. The permutations above will produce, for example, this pattern: PSIMIISSPSI. You'll notice that PSI appears twice. For each of these, there will be a repetition, when the first PSI is swapped with the last PSI. We have to remove these. How many are there? Again, the same method: $S={PSI,PSI,M,I,I,S,S}$ cardinality $|S|=7$ with repetitions caused by the two PSIs, the two Is and the two Ss. The number of permutations without repetition is $\frac{P_7}{P_2 \times P_2 \times P_2}=\frac{7!}{8}=630$.
The number of permutations of MISSISSIPPI that do contain PSI is $10080-630=9450$.
The final answer is the number of permutations without repetitions of MISSISSIPPI minus the number of permutations without repetition of PSI and the letters MIIISSSP, after removing the duplicates caused by two PSIs: $34650-(10080-630)=25200$.
Bar any calculation error, this is the answer.
Comment: Care to post an example?
Comment: I got it on my own. I'll correct the text.
Answer: The simplest solution is very similar to user29743's.  The trick to counting permutations containing a given number of copies of "PSI" is to treat each "PSI" as a single symbol.  We want
(# of permutations of MISSISSIPPI) - (# of permutations of [PSI]SSSIIIMP) + (# of permutations of [PSI][PSI]SSIIM)
$$= {11\choose 4,4,2,1} - {9\choose 3,3,1,1,1} + {7\choose2,2,2,1} = 25200.$$
Answer: This can be computed directly in GAP by the following code:
L:=["m","i","s","s","i","s","s","i","p","p","i"];;
S:=PermutationsList(L);;
n:=Size(L);;
T:=Filtered(S,M->not ForAny([1..n-2],i->M[i]="p" and M[i+1]="s" and M[i+2]="i"));;
Print(Size(T),"\n");

This returns 25200 anagrams of "mississippi" that don't contain "psi", confirming countinghaus' answer.
Comment: I'm pretty sure this is not the kind of calculation OP is asking about (establishing an exhaustive list of anagram and striking out those that contain "psi"). So instead of an answer you could have just commented "Brute force enumeration gives $25200$" to the question, so that people can check their answer.


How can I force Thunderbird to re-download a corrupted message from the IMAP server?

Question: I have a mail message that is corrupted in Thunderbird, but correct on the IMAP server (which is Gmail). Is it possible for me to tell Thunderbird to discard its copy and re-download it from the server?
Comment: I have the same problem, I am on a very bad mobile connection, and half of the attachments are just missing. I have searched for how to make thunderbird resync a single broken mail.
Comment: I assume that you have local copies of the email messages on the computer, is this correct?
Answer: In Thunderbird, right-click on the IMAP folder in question and select "Properties". Under "General Information", click the "Repair Folder" button. This may repair the issue with the corrupted message, though I don't have corrupted messages to try it with. YMMV.
Comment: @divB Solution is to move the broken message to another empty folder, then do the repair to that folder (only this single message is repaired), then move the repaired message back! Worked for me.
Comment: Fixed it for me.
Comment: Yes but this re-downloads all messages which is problematic when you have 100s of MBs of messages in that folder.
Answer: Justin Pearce's solution did not work for me.
However, I found out that moving the e-mail from one IMAP folder to another and back worked and let me download/use the corrupted attachment.
Comment: Cool, that was my idea, but I was afraid of trying that and losing the correct mail completely. I tried it, and it happened as I feared!! But then I found the solution: Do the repair in the new folder, then just this broken message gets redownloaded! :-)
Answer: Another option is to download the original message from Gmail, open it in Thunderbird, and then copy the message within Thunderbird back in to the original folder.

Go to the menu for the message in Gmail (three dots in the top right) and select "show original"
Select "download original"
Select "Open with Thunderbird"
Message -> copy to -> find your account and then the folder you would like the message added to.


Bridge rectifier filter capacitor remove

Question: My question is very simple. What components should be removed from the following circuit diagram for this circuit to work only on DC voltage? I'm sure that the bridge rectifier should be removed further than that I do not know.
Comment: Welcome to EE.SE! Your question is far from simple. What does it do? What does work mean? What is the expected behavior after modification?
Answer: Why remove any components? It'll work on DC just fine without any component removals and you won't need to worry about someone putting DC onto the circuit with the wrong polarity because the bridge will protect against reverse polarity.
Comment: @SmekeriBezPrezimena Andy is saying you don't need to remove anything, just connect the DC where the AC currently goes.
Comment: Because for this circuit needs to be transformer, someone can not get a transformer. That's why I asked the question of what needs to be removed to work only DC voltage.
Answer: You can remove everything connected to pin 16, VCC, which is where your DC power will go.
Although, depending on your DC source, you may need a filter capacitor. So, leaving C12 would be a good bet.
If you want to keep the LED power indicator, do so, but you may need to adjust the resistor (R5) value depending on your DC voltage.
From the datasheet it looks your DC supply voltage should be between 3 and 15 V.
And, of course, you might want to keep the power switch.
Basically, placing your DC supply at pin 1 of the switch, would probably work fine (after verifying that the LED resistor is suitable).
Comment: As far as I understand, everything needs to be removed from the pins 16 but the C12 capacitor, and what value is R5 fo 15V?
Comment: You can keep R5 as it is. 15V/1000Ohm = 15mA, so there will never be more than 15mA passing through the LED. Common LEDs are specified for 20mA, and you have some drop across the LED (2-3V depending on color) so you can assume the current to never be more than (15V-2V)/1000Ohm = 13mA which is fine.


Does mind-body dualism entail supernaturalism?

Question: The concept of mind-body dualism emphasizes a profound division between the mental and physical dimensions of human existence, positing the body as physical and the mind as non-physical. With this understanding, one might wonder: does this characterization relegate the mind to the realm of the supernatural? Furthermore, does embracing mind-body dualism entail recognizing both a natural domain (the physical) and a supernatural domain (the non-physical)?
Comment: No. Substance dualism might lend itself to the supernatural, but the currently more popular property dualism is more or less naturalistic, see [SEP, Varieties of Dualism](https://plato.stanford.edu/entries/dualism/#VarDuaOnt). The claim is simply that objects have properties, like qualia, that cannot be studied by traditional methods of physics due to their non-relational nature, but there is nothing supernatural about them. Especially when they behave in predictable ways or are epiphenomenal.
Comment: @Conifold -- Thanks for pointing this out. Could you further clarify what "non-relational" means in this context?
Comment: This kind of question is at the root of all Indian philosophy, which intensely questions what is meant by "mind". Indians conclude that mind is in the same domain as the body, but that there is an "experiencer" beyond that, which necessarily falls into a different domain - supernatural, if you will, but not in a western sense. This is intriguingly similar to western ideas about qualia or the observer in quantum mechanics. Eventually, this whole issue arises due to the axiom that there is a separation between subjects and objects.
Comment: Which particular concept of mind-body dualism says anything about a division between mental and physical dimensions of human existence?

Why might any characterization 'relegate' the mind to anywhere, let alone specifically the supernatural realm?

Why might mind-body dualism entail recognizing both a natural domain (the physical) and a supernatural domain (the non-physical)?
Comment: "Non-relational" means that qualia do not relate something to something else (red to other colors, say), which is what physics, and science generally, typically describe, they are just about "what it is like" as such. "Non-representational" is a closely related characterization, qualia do not represent something else, as theories do, see [IEP, Qualia and Representationalism](https://iep.utm.edu/qualia/#H4). Here is Block's vivid illustration of the difference:"*"Orgasm is phenomenally impressive and there is nothing very impressive about the representational content that there is an orgasm.*"
Answer: Be careful not to conflate naturalism with physicalism. Physicalism is the doctrine that everything is reducible to physics: mass and energy, electric charge, gravitation, etc. Naturalism is the doctrine that there is nothing outside of nature, but does not presume what nature consists of. Physicalism can be construed as a subset of naturalism which maintains that nothing exists outside of nature, and all of nature is reducible to physics; however, the claim that all of nature is reducible to physics is something in addition to the claim that everything that exists is a part of nature.
Many westerners have an implicitly physicalist education, and have a hard time imagining anything of nature that is not physics, but this was once a very common view among naturalists. Vitalism--the doctrine that life is distinguished by non-life by a special "vital force"--existed among atheist biologists well into the 20th century, for example.
What after all, makes anyone think that mind is supernatural? It is an aspect of life that is experienced during the normal course of things, entirely independently of any gods or demons. Atheists have minds as surely as theists do, and except for a tiny subset of physicalist ideologues, none of them deny it.  Other things exist but are not physical. For example, some people deny that numbers "exist", but if you think there exists an even number that is also prime, then you think that at least the number two exists, but the number two is not physical. Another example: there exist two distinct states for any machine: it might be functioning properly or it might be broken. Is the state of proper functioning a physical object? If so, why is it impossible to describe it in physical language? So numbers and states of repair are two things that are neither physical nor supernatural.
If numbers and states of repair can be neither physical nor supernatural, why not minds? What makes something supernatural anyway? If gods exist and they are super-advanced beings with super-advanced technology able to accomplish anything, they too are a part of nature, aren't they? What if there are gods who are disembodied minds capable of doing almost anything just by willing it so. Are they a part of nature? Well, it depends on whether they came into being through natural processes following the Big Bang (which was the beginning of nature) and whether there are any natural limits at all to their power. Are they constrained by distance? By the amount of energy they can apply? If so, then they are parts of nature too.
For a god to be outside of nature, he must exist on his own, not dependent on any natural processes, and he must have no natural limits on his powers. That certainly does not describe minds. Minds have a definite beginning as part of a biological process and have very limited powers to know nature through their senses and effect nature through their bodies.
Comment: Excellent answer, but I offer an expansion.  One can apply methodological naturalism to studies of God, ghosts, and souls as well as minds.  And if the Big Bang was caused by a spiritual trigger OR a physical trigger then exploring what that could have been, is also part of naturalism.  Our physical universe is not a limit point for naturalist methodology.
Answer: Not really. I can see where you are coming from, but few people would equate the mind with the supernatural. Minds seem to be natural phenomena, and we encounter the apparent effects of the existence of minds every day. Supernatural is a term usually employed to denote something that is outside the realm of our everyday experience of nature, such as ghosts, gods, etc.
Comment: What if a person has experiences with ghosts, God, etc., rather frequently? Would that make them natural? Is the natural/supernatural distinction relative to the statistics of the experiences of a given person? What about winning the lottery? Is a very unusual occurrence supernatural?
Comment: No. Someone winning the lottery is an everyday occurrence. The statistics of an individual person are irrelevant. I have never listed to grunge music, but if I were to hear it some day, I would not consider the experience to be a supernatural one.
Comment: Then you need to make your understanding of the distinction between 'natural' and 'supernatural' clearer.
Comment: Doesn't my final sentence make it clear?
Comment: Nope, because you didn't define nature in the first place. You stressed the point of "every day", which sounds like you are appealing to statistics, but then I offered the counterexample of someone frequently experiencing ghosts, deities, etc., and you responded that statistics are irrelevant. Please clarify.
Answer: It is a bit outdated and misleading to contrast the bodily and the mental aspect of a person as the dichotomy "body - mind".
"Body" versus "mind" creates the impression that both are distinct substances. But the mental aspect is better understood as a set of dynamic processes than as a static substance. The mental aspect is the information processing of the person - cognitive, affectional, and behavioural.

These two aspects – bodily and mental - have a certain use for a
scientific anthropology. Notably in the context of psychology,
medicine and neuroscience.
The distinction "natural - supernatural" is a
discrimination from theology. It does not have any value within
science. I also doubt that it is useful at all to delimit science
from philosophy. Supernatural is the antonym to natural, it is the
domain of miracles.
The distinction "physical – non-physical" has a certain value to
establish a border between physics and disciplines like information
theory or certain humanities.
Comment: @YuriZavorotny Yes, I consider software under the heading non-physical, or better and self-contained under the heading "information".
Comment: Does "car and steering wheel" imply that they are two distinct substances? How about "computer and program" or "heat pump and cooling function"? I'm sorry, but giving names to things does not imply that they are "distinct substances". One could be part of the other, one could be an aspect of the other, one could be a function of the other, etc. Nothing at all can be inferred from the fact that two different names are used, not even that they are distinct things. The distinction is not at all outdated. It is, in fact, essential for clear communication.
Comment: I wonder, would you describe the difference between computer hardware and its software as physical–non-physical distinction?
Comment: @DavidGudeman Please note: What I characterize as "outdated and a bit misleading" is the use of the key words "body" and "mind" to denote the distinction between the bodily and the mental aspect in anthropology. Because opposing these two buzzwords creates the wrong conception, that both live on the same level and that both denote static substances. More useful is to consider the mental aspect as a dynamic entity, i.e. as a process.
Comment: There are still plenty of people who view the mind as an object, not a process, and an object that is at least conceptually distinct from any physical body. There is nothing outmoded about that concept.
Comment: @DavidGudeman To include "process" into one's ontology as a basic entity seems to me a big step forward.
Comment: I don't see the connection between saying that the mind is not a process and whether or
 not one includes processes into ones ontology.
Answer: No, you are conflating two different definitions of supernatural.
One definition is ontologic. It is that things that are spiritual, or mental, are in some non-physical category.  Many physicalists use this meaning of the word, but when doing so, often get tangled up is questions of whether abstract objects, information, etc. are "supernatural" or not.  This is a side effect of trying to equate physics with materialism.  Physics is not actually capable of being an ontic category, and materialism has also been refuted by physics with Einstein's E=mc^2. Note, spiritual dualism IS explicitly supernatural per this definition.  It is just not a very useful definition to use.
The more useful definition is epistemologic.  Per the epistemologic definition, natural things or subjects can be investigated with reasoning and empiricism, but supernatural things cannot be so investigated.  Whether spirits or Gods can be investigated by reason or empiricism would be an open question.
In the face of critiques of religion, theists often invoke "faith" or "untestability" or other features of the spiritual to avoid contrary test cases.  "Supernaturality" is therefore often adopted as a tactic to evade critique.  As anti-theists often encounter this evasion, in recent decades they have extrapolated and many now argue that religion cannot be natural, that it must in principle be epistemologically supernatural.
However, most theists generally base their religion on reasoning and evidence.  Religions doctrine is not arrived at by intuitive inspiration.   And anti-theists point to logical fallacies or contradictions in religious doctrine, falsified historical narrative claims, or immoral dogmas as counter-evidence against a religion. All citations of supporting evidence or refutations, reasoning or contradictions, are an explicit application of naturalism to the spiritual.  In practice, virtually all theists and anti-theists treat Gods, spirits, and religion as natural, not epistemically supernatural.
The assertion that spiritual dualism is epistemologically supernatural is often tied to the Logical Positivist "verification Principle" premise that if a claim cannot be verified naturally it is nonsense.  The Verification Principle famously fails its own test. Hence the question of whether naturalism can be our sole valid source of knowledge -- has an answer -- no it cannot.  What the valid alternatives are -- is not well settled though.
Note also that it is not just spiritual dualists, theists, or anti-theists who assert epistemic supernaturalism.  There is a movement among secular philosophers, called the New Mysterians, who hold that consciousness is simply beyond our understanding.  IE it is epistemically supernatural.
Comment: "In the face of critiques of religion, theists often invoke "faith" or "untestability" or other features of the spiritual to avoid contrary test cases." Do you have any examples of this? I don't believe it occurs in academic arguments.
Comment: @DavidGudeman My understanding and personal reading strongly suggest that arguments against falsifications based on the Ineffability of God became standard in "progressive" Protestant circles in the 1950s, which led to the "incoherence" argument against theism by Flew.   Conservative Protestants today are naturalist among themselves, but adopt protective Ineffability in the face of anti-theist critiques.  Catholic theology is so diverse, it is not really characterizable.
Comment: That's too generic to count as an answer. Ineffability is not the same as untestability. In order for untestability to be used as a defense, someone would have to propose a testable critique of God, and I can't think of one.
Comment: @DavidGudeman  If a concept or thing is ineffable, then it cannot be understood well enough to articulate clear claims about it, and therefore it is untestable in principle.  It is also un confirmable, which is why ineffability is only selectively invoked, to dismiss falsifications, while confirmations are embraced.
Comment: You are still avoiding specifics. I really have no idea what you are getting at here, unless you are referring to atheist arguments of the form, "If God exists, then why would *this* be true?" Those are not falsifications of God, and the response "We don't know why God does things" is a reasonable response. If you have some other argument in mind, please say what it is. I also can't think of any "confirmation" of God that is embraced by theists academically. Do you have an example of that?
Comment: @DavidGudeman  You did it just there.  EVERY effort to interpret holy script, or divine experience, involves indirect inference, and application of Theory of Mind to God.  Yet you claim we can't do this to arrive at a NEGATIVE conclusion about God, because we "don't know what God thinks".  Yet this is central to all religious doctrine, interpretational and practice.  And no, a selective invocation of immanence to deflect from all criticisms of your religion is not "reasonable".
Comment: We believe what God has told us about himself, and sometimes make inferences from what he has said, but that doesn't mean he has given us enough information to answer every question about him. This is a perfectly reasonable position, and your attempts to make it sound nefarious are unreasonable, especially since in every one of these cases there are good answers available that theists could use, so it's tendentious to suggests that they are somehow driven to that position by irrational impulses. They rationally evaluate the evidence and find that it is not conclusive.
Comment: @DavidGudeman -- The inference that an Omnibenevolent god would not create a universe in which living things always multiply beyond their resource supply, and therefore live forever on the edge of scarcity and often die in large numbers from starvation, requires denying so many aspects of "benevolence" and "inference to intentions" for God that any claim that sacred literature is actually intended to be communication, or that one can reasonably infer God to be omnibenevolent will also be caught up by the wholesale denial of inference.
Comment: The assertion of a universe designed with "single life with judgement" to be "wise", is so at odds with 40% of fertilized eggs spontaneously miscarrying, that one basically has to abandon reasoning to assert it.  The idea that humans are fitted to our world through evolution, as part of God's Plan (directed evolution), which requires multitudes of living things to die gruesome deaths due to failed genetic mutations, to get to the few useful ones, leads to the reasonable inference that God is a moral monster.
Comment: So, you think the fact that your personal moral convictions would have led you to make the universe different is an argument against the existence of God? I find that an astonishing position.
Comment: In his best book, The End of Faith, Sam Harris pointed out that neither "faith" nor immanence are invoked by the religious when parsing their own doctrines in intra-religious discussions, nor in inter-religious discussions when evaluating competing religions.  This is only done to deflect against anti-theist critiques.  As Karl Popper pointed out within science, confirmation bias is a major reasoning failure with us, and one needs to PRIORITIZE failing test cases, not rationalize ignoring them, if one wants to find the truth, hence **falsifications not verifications**.
Comment: @DavidGudeman -- Yes.  If your God is clearly morally vile, then It is not omnibenevolent.  Are you also denying that we have any idea what benevolence is?  If so, you cannot ALSO assert your God IS benevolent, rather than evil.  You are left with a Cthulhu God.    You are also in explicit contradiction to the first book of your scripture, in which we are described as having a valid and equal moral sense to God.
Comment: No, I'm saying that your personal moral qualms are not a guide to what is truly good. Omnibenevolence doesn't mean that everyone will approve of the way the world is put together. Beyond that, there are obvious counters to your position but I don't want to have a debate on it here. My point is just that these sorts of arguments have well-tread counters, but even if they did not, the alternative position, that there is no counter because we don't know the mind of God, would not be an irrational response.
Comment: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/151799/discussion-between-dcleve-and-david-gudeman).
Answer: This is an old debate, and one without a settled answer, despite what many may claim. To start with, we need to know what we mean by naturalism:

naturalism, in philosophy, a theory that relates scientific method to philosophy by affirming that all beings and events in the universe (whatever their inherent character may be) are natural. Consequently, all knowledge of the universe falls within the pale of scientific investigation. Although naturalism denies the existence of truly supernatural realities, it makes allowance for the supernatural, provided that knowledge of it can be had indirectly—that is, that natural objects be influenced by the so-called supernatural entities in a detectable way.
Naturalism presumes that nature is in principle completely knowable. There is in nature a regularity, unity, and wholeness that implies objective laws, without which the pursuit of scientific knowledge would be absurd.
https://www.britannica.com/topic/naturalism-philosophy

Many people in the modern world believe in a naturalistic universe, and many of those people believe that universe to be a physical monist one, or in other words, that all things in the world--including minds--are made of physical materials. However, many other people still find the physical reduction of mind to material to be unconvincing.
Mind-body dualism posits a universe where there are two wholly different fundamental substances, one physical and one mental. In principal, both could be fully naturalistic according to the above definition. However, that is not a necessary assumption. The form of mind-body dualism we are most familiar with was formulated by Descartes, who believed that the mental realm operated in rational ways that would make it knowable in the same way as the physical realm, and hence naturalistic. But there have certainly been other thinkers who have denied this. Plato's vision of the "ideal realm," was non-naturalistic in as much as he denied it was wholly knowable from within the natural realm (and certainly not through scientific inquiry). More recently, the (large, influential) spiritualist movement of the late nineteenth and early twentieth centuries was founded on a mind/body::natural/supernatural dualism. https://en.wikipedia.org/wiki/Spiritualism


Filter the friend returned by FBFriendPickerViewController in new Facebook 3.0

Question: I have an Facebook app on http://developer.facebook.com of type "Native iOS" which is connected to the actual iOS app using the new Facebook iOS SDK 3.0.
How can I know if the multiple people that already install the the app and authorize the Facebook app too so I can put them in some list, but this not my question because I know that there is a field called "installed" that return true when the user install the app.
So if I want to filter the returned friend by the FBFriendPickerViewController based on if the user use the app, so how I can use the installed field or something else to filter the friends.
Note: I know where to filter the friend (*) all I need is the field or the property that I need to check to make sure the user is install my app.
*- (BOOL)friendPickerViewController:(FBFriendPickerViewController *)friendPicker
                 shouldIncludeUser:(id<FBGraphUser>)user
Answer: I found a way to do this :
I create a method that send an FQL to those I need (for example my friends that they are male)
and then compare those returned by this request with the already exists by the FBFriendPickerViewController using the method :
- (BOOL)friendPickerViewController:(FBFriendPickerViewController *)friendPicker shouldIncludeUser:(id<FBGraphUser>)user
for the request :
NSDictionary *queryParam = [NSDictionary dictionaryWithObjectsAndKeys:@"query", @"q", nil];
[FBRequestConnection startWithGraphPath:@"/fql" parameters:queryParam HTTPMethod:@"GET"
completionHandler:^(FBRequestConnection *connection,  id result, NSError *error) {
             if (error)
             {
                 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Oops" message:@"Some thing go wrong !, Try again" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];

                 [alert show];
             }
             else
             {
                 NSArray *friendInfo = (NSArray *) [result objectForKey:@"data"];

                 for(int i = 0; i < [friendInfo count]; i++)
                 {
                     [self.friendsNames addObject:[[friendInfo objectAtIndex:i] objectForKey:@"name"]];
                 }
             }
 }];

As you see I have an NSArray that store the filtered friend, the next step is to compare them in the delegate method above.
Hope you find it useful.


Why it is not yet possible to produce ethanol selectively in the Fischer Tropsch reaction?

Question: The Fischer Tropsch reaction between $\ce{CO}$ and $\ce{H2}$ has the potential to give a wide range of products. However by judicious choice of catalytic metal it is possible to produce $\ce{CH4}$, $\ce{CH3OH}$, and other alkanes selectively. $\ce{Fe}$ and $\ce{Co}$ are most commonly used catalysts where $\ce{Fe}$ produces less $\ce{CH4}$, more oxygenated products and more alkenes and $\ce{Co}$ produces more $\ce{CH4}$, less oxygenated products and more alkanes. There are a number of other catalysts that can be used, for example $\ce{Rh}$ which can produce $\ce{C2}$ and higher oxygenates and hydrocarbons. This includes the production of $\ce{CH3OH}$. However, it is not selectively produced but is produced in a mixture of other products and in small amounts. My question is why can $\ce{CH3OH}$ not be produced selectively?
Comment: [Wikipedia](http://en.wikipedia.org/wiki/Fischer%E2%80%93Tropsch_process) says : <> However, you can obtain alcohols in small quantities, but that won't be satisfying for a synthesis. Do you ask about ethanol or ethane? Give more details about your research, and how did you think about this question.
Comment: The question is not about how you can produce ethanol, but why it cannot be done selectively. You can produce ethanol using a Rh catalyst I think but it can't be done selectively and that is what i want to know the reason for. I am not enquiring about ethane.
Comment: The Fischer Tropsch reaction between carbon monoxide and hydrogen has the potential to give a wide range of products. However by judicious choice of catalytic metal it is possible to produce methane, methanol and alkanes selectively. Fe and Co are most commonly used catalysts where Fe produces less methane, more oxygenated products and more alkenes and Co produces more methane, less oxygenated products and more alkanes. There are a number of other catalysts that can be used, for example Rh which can produce C2 and higher oxygenates and hydrocarbons. This includes the production of ethanol.
Comment: However, it is not selectively produced but is produced in a mixture of other products and in small amounts. My question is why can ethanol not be produced selectively?
Answer: in Fischer-Tropsch synthesis-like reaction there are (roughly) following processes:

$\ce{CO \rightarrow  Surf-CO}$
$\ce{H2 \rightarrow  2 Surf-H}$
$\ce{CO + Surf-(CH2)_{n}-H \rightarrow  Surf-CO-(CH2)_{n}-H}$
3'. $\ce{CO + Surf-H \rightarrow  Surf-CO-H}$
$\ce{Surf-CO-(CH2)_{n}-H + 4 Surf-H \rightarrow
    Surf-(CH2)_{n\,+1}-H + H2O }$
$\ce{Surf-CO-(CH2)_{n}-H + 3 Surf-H \rightarrow
    HO-(CH2)_{n\,+1}-H }$
$\ce{Surf-CH2-CH2-(CH2)_{n}-H \rightarrow Surf-H  +
    CH2=CH-(CH2)_{n}-H}$
$\ce{Surf-(CH2)_{n}-H + Surf-H \rightarrow H-(CH2)_{n}-H}$

All processes happen simultaneously, and tuning catalyst and reaction conditions it is possible to hinder some processes. However, as you can see, as long as you have chain growth at all (that is necessary to have $\ce{C2}$ products, like ethanol), you cannot stop $\ce{C2}$ surface particles to participate in further chain growth, producing $\ce{C_{3+}}$ products. So, if chain growth happens at all, a mixture of products with different chain length is always obtained, and there is no way around it. On the other hand, on proper catalyst in proper conditions it is possible to prevent chain growth, but still allow reduction of carbon monoxide, gaining either methane or methanol depending on catalyst. So, in practice it is possible to obtain one of the following

Methane
Mixture of terminal alkenes and alkanes
Methanol
Mixture of linear terminal alcohols (OK, this case is a bit more complicated, as other oxygenates may be produced as well, giving rather complex mixture, but that's beyond the point)

It is still possible to obtain pure ethanol indirectly (using hydration of isolated ethylene), or using other processes. It is also possible to obtain product mixture where some products, say C2-C4 alcohols, will be dominating.
Comment: The mechanisms you provide do offer a good explanation why ethanol isn't a common product, but your answer doesn't really draw this out.