How can I fix a towel bar pulled from the wall?

Question: My father-in-law leaned on the towel bar to rise from the toilet, which ripped both sides out of the wall. The holes are pretty large, almost an inch on one side, and this is the second time it's been repaired (originally with mesh tape on the right side, and I think spackle on the left, the side with the larger hole. What would be the best way to mend this?
Answer: Towel bars are always reached-for and therefore always vulnerable. My approach is to make all towel bars capable of resisting the inevitable grabs and pulls.
In my house, the towel bars are all ADA-compliant grab bars, like this, mounted with wood screws into studs.

image from Google Images
Some are horizontal; these hold towels:

Some are vertical: no towels, but very useful for steadying and assistance when rising from the toilet. Vertical mounting sometimes permits placement on walls otherwise unusable for horizontal bars.

In addition, there are two vertical bars at the end of the tub/shower, so the user can move safely hand-over-hand from the green-towel bar into the shower.

The bars and mounts are sturdy. These have been in place without any issues for more than two decades.
Comment: Don't get me wrong, I didn't downvote. I'm just missing an explanation how to place a grab bar in the place the OP had a towel bar. I mean what kind of extra work needs to be done. How to anchor it, how to ensure it can take the load etc.
Comment: @DRF I think it's responsive enough. This stack's [How to Answer page](https://diy.stackexchange.com/help/how-to-answer) contains this: "What, specifically, is the question asking for? Make sure your answer provides that – **or a viable alternative**. The answer can be "don't do that", but _**it should also include "try this instead"_**. Other readers have clearly found this alternative approach useful.
Comment: This is a great piece of advice, but doesn't really answer the OP's question at all.
Answer: The best option is to put backing blocks in the wall prior to drywall/ wall finish when building or remodeling a house. Of course, this is not always possible in existing houses.
Another option is to mount the towel bar to a 1x4 (or 1 x 6) piece of nice wood that you either stain or paint. Make sure you put good fastening for the wood piece into any studs you can find. The beauty of this is that if you make your wood piece big enough it will cover right up those ugly holes in the drywall and save you some time.
Comment: Having played "older folks (even just visiting ones) bathroom modifications" definitely put in solid blocking to support a proper grab bar, and move the towel bar somewhere that it won't be mis-used as a grab bar. The "getting up from the toilet" one was recommended to be set at 45 degrees and where you'd naturally reach for one, as far as I recall. Needs are different for "aiding standing up" rather than "wheelchair transfer" if looking to codes for help, where a lot of the information is targeted to the latter application for handicap accessibility. But one of that sort will work.
Comment: "move the towel bar somewhere that it won't be mis-used as a grab bar." I have learned this the hard way.
Comment: +1 to putting in blocking. The labor difference between cleaning up the two sides versus taping/skimming a new clean piece is negligible. (And if you can pull off that wood trim above, there's one seam out of four you don't have to do much work on.) You can then choose to put in the same towel rail (still too flimsy to be a body weight support) or a real grab bar.
Comment: That's a great, creative answer, thank you! Unfortunately, the space I need to mount the bar is quite narrow, and there are no studs in that section (faced by the tub on one side and the toilet on the other.) Love the idea, though!
Comment: *i.e.* (IMHO) you need to remodel this part of the house that much. They do also make bent bars, as opposed to setting a straight bar at 45 degrees.
Answer: Prevention usually being better than cure, could the rail be put somewhere else - you admit it's for towels, not hauling yourself off the loo!
That solves one problem, but creates another - how does dad-in-law rise safely?
Need to open up the stud wall round the damaged area, to reveal a couple of strong uprights. Fix battens between them, in line with a proper grab handle - such as found in disabled public toilets - maybe two battens would be better. Then fix in a new piece of drywall to level the wall, keeping notes of exactly where the strengthened parts are - or use a wood finder, to establish where the handle can securely be fixed.
If that's the only towel place, the same idea will work - with the knowledge that towel rails are not generally designed to be grab handles.
Answer: The wall's already repaired once.  I'd suggest cutting into the drywall and completely remove that whole area, including the previous patch.   If you can remove the dado / wooden trim rails visible above, that will help cover the joints later.  Or you might be able to sneak in there and cut it off, if that's not already a join between panels.
Once you have a good access hole, add extra framing in the back to support a good grab handle at both ends.  You might choose to add additional 4x2 framing nods/dwangs firmly nailed to the existing studs, or a vertical backing board that spans a larger area and also secures to the studs on both side.
Remember this handle could be required to hold a hundred kilograms / 200 lbs of weight, so don't underdo it.   Take a photo of the framing before you cover it up - can be helpful later.
Once the framing is done, resurface this area with a fresh piece of drywall and tape+plaster the joints.  Topcoat the plaster, and sand to a good smooth finish.
Tape off the corners/edges and undercoat with a sealant suitable for a bathroom, then light sand and topcoat again with bathroom-compatible paint.
If you removed dado, then reinstall after painting.
Lastly, fit your new beefy-grade handles with enough stainless-steel screws to keep them secure under load.  You might choose to use the handle as a towel rail, or separate the functions.
I kind-of like dual duty because the sides of the towel are apart so it will stay drier longer and saves space.
You can still use the room while this repair is in progress, so it doesn't all have to be done in a day.
Answer: This is a supplementary answer.
I'm not sure how often your father-in-law visits.  Based on the frequency, you can decide whether to borrow or purchase.  Here's the thing you need:

This has several different names, one of which is "Toilet seat riser with handles."  These are also available without handles, but it sounds like handles would be a plus.
Where I live, you can borrow one for several months from the county "independence center."
There are towel bars that can hang from the top of a door.  That's if you choose to patch the drywall but not put another towel bar in the same location.
Answer: This sheetrock will have to be fixed-- good recommendations for that already on here. But for future attachment, consider a MUCH heavier duty wall anchor, if you can't attach it to studs.  I really liked the GeeFix anchors-- great anchors.  They are newer, more pricy.
An advantage of these is that towel racks typically require 2 screws to secure each mount.   You can drive BOTH screws into a single GeeFix anchor, so it's a bit more secure that 2 separate wall anchors.
Comment: Are you in any way associated with the company? If so, the rules here require that you disclose that affiliation, if not, saying so will help people understand that this is _not_ spam. Some might consider it so without any other indicator. Please [edit] your answer to tell us one way or the other.
Answer: It depends on how much time and money you want to spend and the result you want.
As others have said, a ADA bar would be a good choice if your father-in-law is staying with you and this is likely to happen again. Reinforcing with wood, and replacing the dry wall are good options but will take more time and money. You can use an app like Thumbtack to get bids from multiple contractors if you have more money and less time.
The simplest option if you just need a quick fix is to stuff the whole with wadded up newspaper and spackle over it again. Then reinstall the towel handle slight away from (above, below, or to the side) the repaired area with a pair of new drywall anchors from Walmart, Amazon, or the kitchen junk drawer.
A quick search on Youtube will also deliver many options with detailed instructions and visuals.


insert or touchin private part

Question: Assalamu Alaikum.
Can i insert my right hands finger into my wife vagina? Is it permissible to finger with the right hand if vaginal fluid (Madhy/Semen) comes out of the vagina while fingering the wife? The right hand can be stimulated better than the left hand.  So can a husband and wife touch each other's private part with the right hand, even if there is semen or impure fluid in the genitals?
Answer: I think u had to find hadiths on using hands. Generally to be spoken, In hadiths left hand is seen to be used in seemingly impure activities. But it is better not to categoried all the impure activities that you take or think as impure to be thought as your left hand job. In hadiths which particular acts are mentioned u have to do those acts with Ur left hand. Outside of the domain of those mentioning acts,  u are not obliged to do with left though you take any of that to be impure. I recommend you this because in Islam Haram things are particular and mentioned or speial cases are also specific.
Answer: as far as we are concerned in east Asia as Muslims, we are allowed to do that. especially if you have ED or other blockages from having it the proper way. as long as your wife wants to. I don't see any problem with this.
as you may know, some people are left-handed, while the rest are right-handed. I don't think such hadith will elaborate this act deeply but for me, it doesn't make sense if you're not allowed to do with right hand

insert or touchin private part


Is it safe for my cat to lick my skin when it has lotion on it?

Question: After I've put lotion on following a shower, my cat likes to lick my arms, even several hours later.  It does seem to matter which brand of lotion I use, though I haven't tried many.
What is in the lotion that attracts the cat's tongue?
Are the ingredients of the lotion safe for the cat?
Comment: He probably likes the oil in the lotion. Cats generally aren't fans of strong citrus or pine scents. My cats wouldn't let me hold them after I put on an orange-scented lotion I used to have. You could try buying a strongly scented lotion and see if that proves unpalatable.
Answer: Among the things harmful to cats, the American Humane Association states the following:

Cats tend to be attracted to unusual flavors, so keep them away from
  calamine lotion, diaper rash ointments, sunblock and analgesic
  ointments. These products contain an acid related to those in aspirin
  and will prove toxic if ingested.

The ASPCA Animal Poison Control Center also says that:

We would not expect to see problems as a result of your cats coming
  into contact with your hands after you've applied non-medicated
  lotion. Should they happen to ingest a small amount of this lotion, it
  could potentially have a bit of a laxative effect, and may cause
  stomach upset. However, we would not anticipate systemic or
  life-threatening problems.

So in general, if it is a non-medicated lotion, you should be safe. It's not something the cat should likely get a lot of, but if they are just licking your skin after you have applied it and it has soaked into your skin, the cat should be okay.
However, if the cat suddenly appears to be ill after licking the lotion, taking proper steps to ensure its safety and health are always top priority, of course!
Comment: It doesn't seem to bother the cat at all.  It would be dangerous to generalize; I use a lesser known brand from an organics-friendly store, which might not have ingredients found in mainstream brands.
Answer: I've switched to using coconut oil as a moisturizer. They LOVE to lick that off, but it isn't harmful, since some people use it as a curative for cats. (I'm not recommending that, but it shouldn't be a problem if they lick it off)


Earth rotation speed on the same longitude

Question: Do all points on the earth surface have with the same longitude the same day and night times, i.e. does the earth rotate around it's own axis with the same speed for all points on the same longitude?
Comment: The night is slightly shorter on a mountain summit.
Comment: Think about the circles of latitude. Does one close to the Equator seems the same length as one close to a pole? Do two points with the same longitude on these two small circles make a rotation in the same time? If the length is different and the time is the same, then their rotation speed is different.
Answer: It is not as simple as Earth axis is not normal to our rotation plane around the Sun (ecliptic).
Earth axis is tilted 23.4 degres (aprox):

Sunlight impact to Earth parallel (aprox) to the ecliptic, but our rotation axis is tilted. It seems that everypoint at the same meridian should have same daylight, but depends on lattitude. According to the figure above, someone at Venezuela should have same daylight that someone at Labrador (Canada), as they are in the same meridian.

But the fact is that, due to this tilting, they are not transitting the same time:

Point at a higher lattitude (Canada), in this case, it is exposed less time to the sun due to Earth tilting. This figure will be at North Hemisphere winter. Yellow line is representing path exposed to sunlight and light blue is path not exposed to sunlight.
This is a simple representation not considering Earth atmosphere. If we consider Earth atmosphere, everything is a little bit more complicated, as there are different dawn times. Check this link: https://en.wikipedia.org/wiki/Dawn
With the same example, today daylight looks like:

Hope it helps!
Answer: You are asking if locations on Earth with the same longitude (East/West position) but different latitude (North/South position) have the same length of day. The answer is no.
At the equator, the length of day (from sunrise until sunset) is approximately 12 hours regardless of the time of year. At the northern hemisphere summer solstice, latitudes north of the Artic Circle have 24 hour sunlight. That is, the Sun never sets.
Thus, the length of day is dependent on the date and the latitude. The length of the day is not dependent on the longitude. The time of sunrise and sunset depend on the longitude though.


How To Start Writing

Question: I'm new here and have been writing for around two years. I'm still fairly young, and I developed a love of writing around 6th grade. I've gone through many trials and errors, and I have a story I'm currently working on that's a little bit different than the others. I have clear characters and scenes and a general plotline to follow, but the part that always trips me up is actually writing. Does anyone have any tips as to where to start out?
Thanks
Comment: Start with this https://writing.stackexchange.com/questions/54208/how-to-i-get-motivated-to-start-writing-my-book and https://writing.stackexchange.com/questions/47544/what-should-come-first-characters-or-plot or https://writing.stackexchange.com/questions/1621/are-there-good-tips-on-being-a-better-creative-writer and see if any of that helps. If not, I'll try to swing by later and get an answer.
Comment: Thank you, I'll take a look!
Comment: Welcome to Writing SE! Please note that you have to be 13+ to use the site. Thanks for the question.
Comment: @Nai45, Thank you, I am.
Comment: @DWKraus, that first link helped a ton! Thank you so much!!!
Answer: I would suggest doing an outline of each chapter and what important events happen in each chapter.   Think about a one to two line blurb over what points you want to hit then.  I modeled my writing a lot on tvshows with season and multi-season long arcs.  I'd also recomend doing your homework about every aspect of the show.  If I was writing military scifi, I'd look at the military units I'm modeling, establish the rank hierarchy, and look at what kind of terms and jargon people in that service might use (Some militaries, like the U.S. military are so large, they have seperate dialects for each service that's based on tons of in jokes).
6th grade is a great age to start... I speak from experience... but don't be dicouraged if you don't have stories.   I started 20 years ago when I was about your age, I'm still not published, I've tossed out two completed manuscripts, and the only character I kept over all this time is a silly ineffective villain who's easy to stick in as he could be a real threat to my heroes, but has a fatal flaw in being increadibly short sighted in planning.  He's good as a first post-origin story starter villain, followed up with a few woefully one sided battles with the hero when I need a quick scrap for the scene.
Answer: It will be easier with more education and more experience.  Also doing the actual writing will make it easier to do future writing.
There are many sites that give a method to do the writing itself for a story.
I suggest you look at several and see if any of them seem to fit you well.
Snowflake is very good.  A couple of others are slightly better for me. YMMV
If you can take what you have done so far and finish a complete beat sheet then you would be well on your way to writing.  With the beat sheet you have every scene in a logical sequence to follow your plot, and goes through the key gates,  with no holes and no needless detours.
Make sure you have bullet points as phrases that tell who what where when how something happens in each scene.  The why should be implied from those.
Then if you have that just start writing scene 1.  Describe what you see in your head is being done by/to the characters.  Describe the location, motivation, imply the time, and describe the action.  Try to do this by showing what is happening not give a core dump or lecture. Scenes often will be in pairs of the form of action and reaction. So not every scene will have to cover all the 5W2H questions.

How To Start Writing


A Dark Room didn't autosave?

Question: After getting pretty far into The Dusty Path on A Dark Room yesterday, I was incredibly disappointed upon opening the game today on the same computer and finding that all my progress had vanished!!! Can I not close the game without losing my progress? I'd rather not have to leave it open for days on end while I beat it.
Comment: Procedurally casting close vote per Vemonous' comment
Comment: Only the title of the proposed duplicate seems relevant. This question appears distinct.
Comment: Agreeing with RoddyoftheFrozenPeas. That linked question is more like asking if there is autosave; this asker knows that there is autosave, but accusing that autosave did not work for the asker, thus asking for alternate method to save the game, I think.
Answer: The game is saved when you stoke the fire.  I've never had this problem before with the game (I play on IOS), so I'm sorry if I'm not much help.  I would assume that you haven't been manually saving.
Comment: I don't know about mobile, but on PC stoking the fire does nothing than the original mechanic of heating up the room.
Answer: The game automatically saves every one minute, and you will see the words "game saved" in the top right corner of your screen. If you are playing in incognito mode, private mode, or any mode that doesn't save cookies, the the game will not save.
If you do want to play on incognito/private mode, you can click save, then export, to get the save code. Copy the code and paste it somewhere else, then when you want to play again, copy the code and go to save, then import. That method also works to transfer your game from different devices.
Answer: It autosaves for me when I stoke the fire on a PC. The other way that I know is to click the save button on the bottom of the screen and pasting it into a Google docs.
Comment: Hi Juju, can you explain what "stoke the fire" means? And pasting what into Google Docs?
Answer: There are different online versions to the game. Each of them save cookies separately. Try to backtrack to where you originally clicked on a link to the game, and your old save will be there.

A Dark Room didn't autosave?


Python muluthreading starts fast but gets slow

Question: I am using threading to run many instances of a while loop. It starts off fast, but it gets extremely slow, slower than it would be using a single thread. I am unable to provide code but I will when I can. Any help is appreciated.
Comment: Please add code related to your issue being addressed
Comment: Welcome to [so]. Please be aware that the Q&A format is not suitable for open-ended questions where we *guess* what your problem is. Please [edit] your question to provide an [mcve] – even (and especially) if you cannot show your *actual* code, you should provide sample code that demonstrates the problem in isolation. See the [ask] page how to best help us help you.
Answer: As you have not added code yet, I can't help with the specific problem. With that being said, using a single thread is most of the time a better choice with Python ,with the exception of networking, where it might have the largest benefit (as well as other IO cases).
The main reason for that is that Python has a Global Interpreter Lock that prevents two threads in the same process from running Python code at the same time. While in other languages (like Java for example), multithreading can work across multiple processors and gain the most benefit. Additionally, multithreading has an overhead when run in Python, and may sometimes provide you with strange results due to race conditions or other errors that are harder to debug. As an alternative to multithreading you can attempt using multiprocessing, where that topic has been covered extensively in other stackoverflow question like: What are the differences between the threading and multiprocessing modules?
.


Display the borders of more than one city in Google Maps

Question: If I click on a city's name in Google Maps, the area of the city will be highlighted, its borders are shown in red, and the view adjusted to center on the city. Is there a way to select more than one city and in such a way that the borders for both are shown?
Answer: No, this is not possible to achieve in Google Maps. But you can play with Google Map Wizard


Is it okay to record audio for a lecture?

Question: Sometimes the Professor will say things quickly, or say things before I can write them down. It would be of great benefit if I could record audio for the course, but I am not sure the legal guidelines around doing so.
Comment: When I was a student and smartphones had not yet populated the Earth, it was not uncommon, at least in my country, to see a professor's desk covered with cassette recorders. Students had just to politely ask the professor consent to record the lectures.
Comment: Related: [Under what circumstances would a professor be offended at students taping or recording his or her lecture?](http://academia.stackexchange.com/questions/30682/under-what-circumstances-would-a-professor-be-offended-at-students-taping-or-rec)
Comment: If the lectures are open to the general public, I don't see how any (reasonable) law could prevent you from recording them (as long as you don't publish the recording). You are, after all, able to record with your own ears. Of course, there is a matter of courtesy.
Comment: FYI: [Is consent required by law to take a picture or to record audio / video of a conference talk?](https://law.stackexchange.com/q/6316/31)
Comment: @MassimoOrtolano True. And it always reminds me of the tape-recorder  scenes from Real Genius: https://www.youtube.com/watch?v=Gt4vXaoPzF8
Comment: Making the polite request via email has the advantage that you can include a written commitment to use the recordings for personal use only.  If you were asking me for permission to record, that commitment would be important to me.
Answer: The legal issues involved will, of course, depend on what legal jurisdiction you are asking about. However, there are some common factors that can be considered.
In the UK many institutions take the interpretation of the Disability Discrimination Act (DDA) that teaching staff cannot prevent students making private recordings (Audio or Video) of any teaching activity. The reasoning is that students are entitled to keep their condition confidential (as it may be a private medical matter) but also must be permitted to receive the appropriate adjustment for their condition. It would be expected, as a courtesy, that the student would inform the staff concerned that recording was taking place, but that this could not be enforced. (*)
Conversely, the Intellectual Property (IP) of the class and the material contained therein would be held by the University and the individual teacher to varying degrees. The recording could not be published or used for any means other than private study as this would then violate the rights of the owner of the IP.
Many aspects of disability discrimination, privacy and intellectual property legislation is common across many EU states, but there are variations in practice. I can imagine how these different statutes might interact in (say) the US, but I suspect it might vary from state to state and not always be a federal matter, and so I decline to speculate.
(*) I have responsibilities for assisting academic staff understand these issues in my department...
Comment: Thank you for the informative answer. Legality is probably the primary concern, followed by university policy, and in turn followed by the ethical concern with publishing such information.
Answer: The first step should be to ask your professor. This is not just a common courtesy. If s/he is OK with it, great. If not, then you can probably gauge from the answer what the concerns are. That will show you how you might go forward. Often professors make available powerpoint presentations or other such visual aids. Perhaps it is a matter of the professor not speaking clearly or loudly enough, and sometimes they are not even aware of the problem. Etc.
What you should not do: just turn on your recording device without fair warning. This may set you up for all sorts of misunderstandings and repercussions. Don't go there.
Comment: But it's very complementary, I think. I voted them both up.
Comment: This really seems to contradict Brian Tompsett's answer.
Comment: Interesting. I have never considered this to be a problem since it would be only me who would listens to it, which is not different from listening in person. Is a person with an exceptional memory inherently rude? It is, of course, something different if one shares the recording.
Comment: This is the correct approach. You should _ask_ before doing anything.
Comment: @djechlin I don't think it contradicts my answer as it is good advice, and may be quite correct in different legal jurisdictions. If students don't know they should ask. My advice was more slanted towards the teacher's perspective.
Answer: In the US, allowing such recordings would probably be in the realm of "reasonable accomodation" as required under ADA. To claim such an accomodation, you would have to follow the procedure and have the Disability coordinator intervene, and you would have to have a disability (so the inconvenience of having to ask for a repetition would not be sufficient).
When it comes to copyright, you can't copyright an idea, only the expression of one, so it could depend on whether the professor had put the lecture in writing or other fixed form. If the professor has written his lectures down, they have fixed form and are protected by copyright law. If he lectures extemporaneously, the copyright is held jointly between the professor and the person who first fixes that form of expression. (I recognize that that has ludicrous implications, but I didn't write the law. It would be unwise to test the copyrightable status of unwritten lectures). In addition, contract law may supercede copyright considerations, the relevant question being whether the university has a policy allowing or prohibiting such recordings. Universities might make money from recording and selling access to lectures, so they might have an economic interest in forbidding recording.
Unilateral recording potentially conflicts with the privacy rights of students and the professor in the course. The major concern is that recording lectures can have a chilling effect on students' willingness to speak in class (hence the need to obtain permission from all of the students in the class, in Missouri). In some states (two-party consent states) you would have to obtain consent from all parties in a conversation: you could legally test whether a lecture with or without questions from the audience constitutes a "conversation". The problem is that if you're not in a two-party consent state, then you're in a one-party consent state, which means that you need consent from one of the parties -- and if it's just the professor talking, he may be the only "party" (it is not clear whether just showing up makes you a "party" to a conversation). Also, bear in mind that wiretap laws are potentially applicable because they don't exclusively refer to speech over wires. I would suggest getting the expert opinions of a panel of lawyers.
Comment: Doesn't copyright only comes into play if the recording is distributed, which is note necessarily the case for the OP?
Comment: "Copyright" is the right to make copies, any copy, and is not just about "copy and distribute". As a tort act, it could be the predicate for prosecution under wiretapping statutes.
Answer: It doesn't have to be "okay" if no one knows it is being done.  Record discreetly and don't publish the recording.
Comment: It is rude, to say the least, to record somebody without asking.
Comment: Can you please post some information on what the consequences are if caught? If the consequences are severe this answer really needs to acknowledge that. If not, this answer really needs to explain why not, with some credible authority.
Comment: It's probably a terrible answer, but that's at least an explanation why, agnostic to my opinion of the advice being given.


Sitecore: The AD membership provider couldn't be initialized: Directory server "X" does not exist or cannot be contacted

Question: I am trying to connect to two different LDAP connection strings from on my CM server which is behind the firewall. I'm able able to connect to the one connection string which points to an AD Server in the same domain but the second one throws the following error:

3248 16:01:52 ERROR The AD membership provider couldn't be initialized: Directory server "" does not exist or cannot be contacted.
  Exception: System.DirectoryServices.ActiveDirectory.ActiveDirectoryObjectNotFoundException
  Message: Directory server "" does not exist or cannot be contacted.
  Source: System.DirectoryServices
     at System.DirectoryServices.ActiveDirectory.ActiveDirectorySchema.GetSchema(DirectoryContext context)
     at LightLDAP.SitecoreADProfileProvider.Initialize(String name, NameValueCollection config)

I am able to connect to both the connection strings using Softerra's LDAP Browser which tells me that all required ports are accessible on all servers. Not sure what the problem is with Sitecore's LDAP Module. Has anyone come accros this scenario?
Answer: As per Sitecore, the LDAP Browser uses port 389 while Sitecore's LDAP Modules requires access to port 389 and port 445 and hence LDAP browser installed on the CM and CD servers was able to connect while the AD module was throwing an error. These ports needed to be opened on all AD servers and CM/CD servers as well (outbound for CM and CD).
Further more, the port 445 is used exclusively by the profile providers. So in case you do not absolutely need the profiles integrated you can simply disable the profile provider config elements and you should have authentication working with AD. We needed this workaround since one of data centers hosting one of the AD servers had no way of granting access to port 445.


After Opening My Minecraft World to LAN, How Can My Friends Join? (Minecraft Java Edition)

Question: I opened my Minecraft singleplayer world to LAN so that my friend could join, but we don't know how she can join my world directly. How can this be done?
Comment: The wiki tells you.
Answer: I'm not sure if you're aware, so I'll let you know here, if she is not on the same network as you, she will not be able to connect unless you port forward. I cannot provide help on port forwarding, as I don't know the model of your router.
If you are on the same network, you can try opening the 'Multiplayer' tab from the main menu and seeing if it shows up there. If it doesn't show up under this, here are some steps to figure out what your address is on your local network.

Windows:

Open the command line (In the Start Menu, type "Command Prompt" and open it)
In the command line type ipconfig | findstr "IPv4"

Something like this should show up:

You'll want to enter the number at the end of your output, including the periods, into the 'Direct Connect' prompt under the 'Multiplayer' tab in minecraft.

I'm afraid I'm not very versed in Linux, but here's a stackoverflow post that may help: "How to get the primary IP address of the local machine on Linux and OS X?"

If you aren't on the same network, you'll need to port forward, instructions per router can be found on this website.
Once you've port forwarded, go to this website. to get your public IP address, and enter this into the 'Direct Connect' prompt.
Answer: On the other device, go to multiplayer and the world should pop up below where it says: "Scanning for games on your local network."

If it does not come up, you may have to manually enter the game address by going to "Direct Connect"


Designing a cryptographic S-Box in Logisim

Question: I am currently working in Logisim and was wondering if I can design some ciphers in the same. One such cipher is PRESENT cipher which is essentially a block cipher. I did get that I need to design the S and P boxes for the same but I am having difficulty starting with the same. The issue is that I am not sure which electronic parts I should use to get the desired output. I'd appreciate it if I could get a starting point for the cipher which would then make things a bit more clearer to me. Thanks!
Comment: It's not clear what exactly you are asking. Can you write a Boolean equation for the function you want to implement?
Comment: I suggest these instead https://www.schneier.com/academic/twofish/download.html  This is proven technology that is proven secure so far..
Answer: Since you are asking how to create the S-box of the linked document: This S-box is a lookup table of 4 bits input to 4 bits output.
The P-layer is "just" wiring. I would generate a sub-circuit for this.
Please be aware that Logisim is limited to 32 bits per multibit-wire. You will need multiple wires.

Alternative 1:
Use the ROM component with 4 bits input and 4 bits output for the S-box.

Alternative 2:
You can use the Combinatorial Analysis window to enter the translation table for the S-box. Then let Logisim build the circuit.
Use it as a component for your main circuit.

Note: Admittedly it is simpler to use a high level hardware description language. To look into the bits, it is still a good exercise to do this on lower levels. Some years ago I built a simple 4-bit computer with Logisim.
Answer: Implementing cryptographic components in hardware is hard enough – use a hardware description language like Verilog or VHDL, or the more modern Chisel or migen.
You'd be crazy and, if I was your advisor, prone to wasting time, to try and implement something of that complexity in Logisim GUI. Use logisim-evolution (logisim itself is pretty dead), and place a "VHDL component" or whatsitcalled. Implement your S-Box using VHDL (or something that compiles to VHDL), and simulate it with the tools of the digital design trade. Logisim is a purely educational tool for small circuits.
Still, this is not really a useful thing to do. S-Boxes, even trivial ones, will be too complex to understand visually.


Receiving Google Voice calls to my EVO

Question: I recently set up a GV number and seemingly activated the number for my cell phone, HTC Evo. I can make outgoing calls using the GV# and send/receive texts fine but whenever someone calls the number it gives an 'unable to connect' error and hangs up. Anyone have a solution for this issue?
Comment: This works on my EVO. Did you set up your GV# to forward to your cell number? You might need to log into GV from a computer (or at least the phone's browser) to check.
Comment: I don't think *28 sets up forwarding from your GV# to your cell. That is for (as far as I know) forwarding from your cell number to wherever you want in the event that you do not answer or are out of service.
Comment: @Matthew: Yeah, I still don't know if it's the actual problem, but it's my best guess at this point. Went ahead and posted an answer.
Comment: @eldarerathis Pretty sure that is it, I suggest posting it as an answer :)
Comment: I have already set up forwarding to my mobile and activated it by calling in *28.... I can make calls already from my cell. I also setup my voicemail recording.
Answer: This is still just my best guess, but I would definitely check to be sure that Google Voice is linked to your cell number and that it is set up to forward your calls. You should see something like this in your settings:

If that's all set up properly then you might want to consider starting a discussion thread over at Google's support forum.
Comment: The google forum shows that sprint phones making calls into GV get this error. all my tests have been from sprint devices so I will have to try outside sprint.
Comment: Mine looks just like that in my GV account. I'm nearly certain it's set up right. I must be missing something. Only been set up for 24 hours though, but I doubt it is about time.

Receiving Google Voice calls to my EVO


Programming language for HPC

Question: I'm planning on building a program that will carry out HPC. I'm aware that C/C++ is significantly better than Python in terms of the speed of computation. However, I'm not yet proficient in C/C++, so do you think it'll be wise to build a fully functioning prototype of sorts in Python and then get it rewritten in C/C++ by others/me in the future.
Comment: Short is yes.  Something to think about as well is there are a growing number of examples where Python is used extensively in HPC environments.  My co-authors and I did something along these lines in http://arxiv.org/abs/1111.6583 with the caveat that some of the underpinnings were in Fortran.  Also check out https://github.com/mikaem/spectralDNS as another example.
Comment: What is your definition of HPC? 36-core workstation, Linux cluster, custom supercomputer?
Comment: It really all depends on what your skill level is in each language, what you plan on running it on, and what libraries you end up using. I think I used to align more with the PyClaw authors (I nearly worked with some of them), but the more HPC work I do, the more I tend to just write codes in C or C++. Plus, IIRC, Aron mentioned having to fiddle with loading the Python interpreter at scale for large-scale PyClaw runs on Shaheen. For small scale HPC work, I didn't have any trouble getting mpi4py running.
Answer: It is probably a good idea to stick with Python if you have expertise with that. I am assuming that this means you are using numpy/scipy. Depending on what you exactly want to do, well-written numpy/scipy code can be very fast and even comparable to C performance.
If you really need the extra speed of C, you can use Cython so that you keep the majority of the code in Python and write only the bottleneck in C.
Answer: Python can be used for HPC with no problem. Most computation intensive work will be done with libraries written in C/C++ such as Numpy/Scipy. You can write your key algorithm in C/C++ also. Even if you want to write algorithms in python, there are plenty of methods to gain comparable performance to C/C++. Cython compiles program written with python-like syntax to C; Numba compiles your key algorithms (a python function for example) to C when needed.
HPC is not only about performance on a single computer, you have the choice to use cluster or GPUs to further enhance the computation performance. Python is good at that also.

Programming language for HPC


Why does body with continuous speed generate force?

Question: So... sorry if the question seems a bit stupid, but it's been nagging me all day and I couldn't find an answer on the net. It goes like this: If a body, say, a car is moving with constant speed. This means its acceleration is 0. And say that an object, like a wall or a stone is in the way. In this case, when the car and wall/stone collide, the car obviously exerts force on the stone.
But, since F = ma, and a= 0, F also becomes 0. In this case, what am I missing? Shouldn't the force on the wall be 0?
Comment: You are assuming the "trivial" answer that I have heard so many times in my physics class room.  Everybody knows that the speed and acceleration of the car is zero AFTER the collision.  The question is: what is the acceleration DURING the collision?
Comment: You are missing the wall. Does $a=0$ when you hit it?
Comment: Also you are missing that continuous force is applied to keep a car moving at constant velocity, because it is continuously decelerated by the friction of the road on the tires.
Comment: Why are you assuming no acceleration during the collision?
Answer: Many are pointing out the importance of friction of the car against the road and the need to apply a constant force in the real situation to mantain the car moving uniformly.
I think this is not the point of the question, an object (let's say a micrometeoroid) moving in the vacuum of space and hitting a "wall" (let's say the solar panel of an artificial satellite) wouldn't have any important source of friction until the collision itself and still the question would hold.
The thing is that the change in speed from $v_0$ (previous to the collision) to $0\; m/s$ (when the wall finally stops you) is $\Delta v = 0-v_0=-v_0$ and since acceleration on average is that change in velocity between tome $t_0$ and time $t_1$ then there is indeed an acceleration $a_{average} = \Delta v/(t_0-t_1) = -v_0/\Delta t$. The thing is that you don't whan the average but the acelleration at each particular moment in time. For any time before and after the collision it is clear that $a=0$ as you said, but then the entirety of the acceleration (and thus the force) should appear during the collision itself.
In an idealistic world this change in motion is instantaneus ($\Delta t = 0$), so the acceleration must be $a=\Delta v/ \Delta t = \infty$. But the reality is that objects compress when they collide (both the wall and the object), that means that the contact between both (and thus the interaction between both) happens for a timespan greater than zero. As the object deforms and the wall absorbs the kinetic energy of the object both are stressing their structure by pressing, flexing, etc... This compression is the source of a reactive elastic force coming from the wall that will be the greatest in the moment of maximum compression/deformation and would fade as both objects lose contact until the force dissapears completely as they detatch from each other.
So, calculating the actual aceleration in a realistic scenario is extremely complicated. It involves knowing the mass and material properties of the impactor and the wall.
So I would think of this as if the impactor was heading towards a wall full of springs and then bouncing on them. The only difference is that the springs on the wall are extremely stiff, so stiff that you don't really see any compression and expansion of them. That's more or less what's going on. But why the wall acts like a wall of stiff springs? Because of the electric potentials of the molecules of the wall acting like that. I reccomend you reading this answer in case you want to go deeper on this last point.
Answer: Friction and air resistance are irrelevant.
If a body is coasting through space (no friction and air resistance) at a constant speed relative to the wall, then hits the wall, the wall speeds up and the car slows down, so they both accelerate.
Answer: F=dp/dt  and we get F=mdv/dt, which is equal to Ma, whenever there is change in momentum the body will simultaneously applied and experience the force, that's what Newton third law describe, now coming to your question it is OK acceleration is zero before collision with wall, but
during the Collison momentum changes like this
Final momentum - initial momentum which gives Mv(momentum of car before collision) + 0(momentum of wall/car2) - final. Momentum (let us take it as inelastic collision so both car stops) =dp now during collision
dv/dt
 is non zero because v continuity decrease.
Assumption :since you have not mention about friction,  so I assume track to be frictionless.
Answer: The acceleration a = 0 is for the motion of the car when the wall doesn't exist, that it , there is no external force acting on the car which leads to it having a constant speed.
When the car collides with the wall, it experiences a force opposite to the direction of it's velocity which causes it's velocity to slow down over a very small period of time. This force changes it's speed and hence imparts deceleration or negative acceleration. So, the acceleration of the car after collision is not 0


What filesystems would Google Chrome OS work with?

Question: When Google releases their Chrome OS, my first prerequisite would be to work with my current files. What filesystems would it work with? (have read-write access). Would it support Windows partitions? (NTFS) and Unix partitions? (EXT/UFS). And lastly, which filesystem would it use natively and/or perform best with?
Comment: maybe the title "What filesystems should Google Chrome OS work with?" would be better?
Answer: As it's going to be based on the Linux kernel, I think you would be pretty safe in assuming it will support the usual ext3 filesystem.
It's impossible to guess what Google are going to do, but if they want to make any progress with their 'OS' they will need to ensure a maximum level of interoperability with existing systems to make the changeover as easy as possible for new users.
Comment: +1 for "It's impossible to guess what Google are going to do"
Answer: My understanding is that Google OS will be built on top of Linux kernel, so file system support will be provided in the kernel layer. Expect anything typical for linux.
Answer: Depending on what exactly it is, it's possible that most of its storage will be "in the cloud".
That aside, as others have said, it's probably going to use the normal Linux-ey file systems. You'll likely be able to use FUSE to use other file systems with it.
Comment: Yeah, I'm pretty sure they'll publish some sort of *GDrive* service, but they'll definitely continue supporting all file systems common today. It wouldn't work otherwise.
Answer: It really depends on how easy Google wants to make for people to switch to their operating system.
If we look at when Microsoft introduced NT for the first time, it supported as much hardware and file systems as possible, and it continues to support both HFS, NTFS and FAT32 out of the box.
So if Google wants to build bridges to the ChromeOS, they should support HFS+, NTFS, FAT32 and ext3 that way it will ease transition and compatibility with other operating systems and maximise their chances of commercial success.
Comment: Wasn't it HPFS, not HFS, that Windows NT used? (HPFS isn't supported anymore though)
Comment: I'm not sure about HPFS but HFS+ is the mac file system and windows server 2003 still supports it for its services for macintosh file sharing
Answer: Given that it is going to be targeted at Netbooks I don't think that native Windows FS support will be that high on the agenda.  NTFS support is mainly useful if you are dual-booting and want to be able to access the other OS.
I would expect ext3 (possibly 4) for the native partition as well as CIFS for network shares, FAT(16/32) for mounting USB devices and possibly a FUSE based cloud storage (GDrive has been rumoured for a long time but I'm still not convinced it is coming).
Given that it is a Linux Kernel many other filesystems are potentially available but many will probably be dropped to minimise the install size and boot time.
Comment: I would argue that NTFS would be useful for attaching external harddrives and using those properly.
Comment: It would support NTFS, and the rest of the range that Linux works with, but there's no reason to use it internally.
Comment: NTFS runs nicely nowadays through ntfs-3g. Plus FAT and NTFS are useful for external HDDs.


Calculating the limit $\lim_{n\to\infty}[\sum_{k=0}^{n-1}(-1)^k\frac{1}{n-k}]$

Question: So, I have got the series: $$I_n = \int_0^1\frac{x^n}{1+x}dx$$ and my task is to find the limit
$$\lim_{n\to\infty}(I_n)$$
I have added 1 and subtracted 1 from the numerator and factorised $x^n - 1$ as $(x+1)(x^{n-1}-x^{n-2}+x^{n-3} - ...+(-1)^n)$. Then i did the reduction, and I'm left with calculating the limit:
$$\lim_{n\to\infty}[\frac{1}{n}-\frac{1}{n-1}+\frac{1}{n-2} -...+(-1)^{n-1}\frac{1}{2} + (-1)^n] = \lim_{n\to\infty}[\sum_{k=0}^{n-1}(-1)^k\frac{1}{n-k}]$$
I know I can calculate the fraction as a Riemann Sum using the integral of the function $\frac{1}{1-x}$, however I don't know how to deal with the changing signs. How should i approach this? Is there some sort of rule or common practice to deal with alternating signs?
Answer: $$I_n\leq\int_0^1x^ndx=\frac 1{n+1}$$ so $$\lim_{n\rightarrow +\infty}I_n=0$$
Comment: Just to make sure: you are basing this on the squeeze theorem? 0 <= In <= 1/(n+1) therefore 0 <= lim(In) <= 0 when n goes to infinity?
Comment: That's right. You got it.
Answer: Note that for all $n$ we have :
$$\forall x\in [0,1], \frac{x^n}{1+x} \leq 1$$
A constant function is clearly integrable, hence we can apply the dominated convergence theorem to get :
$$\lim_{n \to \infty}\int_0^1 \frac{x^n}{1+x} \mathrm{d}x = \int_0^1, \lim_{n \to \infty} \frac{x^n}{1+x} \mathrm{d}x = 0$$
Answer: Proceeding as in the OP, note that we have two cases
$$\frac{1+x^n}{1+x}=\begin{cases}\sum_{k=1}^{n} (-1)^{k-1}x^{k-1}&,n\,\,\text{odd}\\\\
\frac2{1+x}-\sum_{k=1}^{n}(-1)^{k-1}x^{k-1}&,n\,\,\text{even}\end{cases}$$
Integrating over $[0,1]$, letting $n\to \infty$, and using the Taylor series representation for $\log(1+x)$ for $x=1$ reveals
$$\lim_{n\to\infty}\int_0^1 \frac{1+x^n}{1+x}\,dx=\log(2) $$
Hence, we have
$$\lim_{n\to\infty}\int_0^1 \frac{x^n}{1+x}\,dx=\log(2)-\log(2)=0$$

Rather than proceed as in the OP, we write $\frac1{1+x}=\sum_{m=0}^{\infty}(-x)^m$.  Then, we see that
$$\begin{align}
\int_0^1 \frac{x^n}{1+x} \,dx&=\sum_{m=0}^{\infty} (-1)^m \int_0^1 x^{n+m}\,dx\\\\
&=\sum_{m=n+1}^{\infty}(-1)^{m-n-1} \frac1{m}\tag1
\end{align}$$
As the series $\sum_{m=1}^{\infty}\frac{(-1)^{m-n-1}}{m}$ converges, the series on the right hand side of $(1)$ approaches $0$ as $n\to \infty$.
Comment: Please let me know how I can improve my answer.  I really want to give you the best answer I can.  And Happy New Year! ;-)


Create an infopath form using existing SharePoint 2013 list

Question: I have a new SharePoint 2013 list from which I created an InfoPath 2013 form and added all the field, and then associated some rules to those fields (hidden when condition x =y type , etc.). However when I then published the form, I cannot enter any data in the form, its as if all that exists are the headings, with no data entry fields available - please help?
Answer: "x" and "y" in your condition example (hidden when condition x = y type , etc.) are fields. Is it right?
If you have not set the default value for a field, the field value is empty (blank). So, x = empty and y = empty. The condition is met because x = y (empty = empty), then the relative field will be hidden.
Set the default values for the fields to make these fields have different values.
Comment: As the fields (There are around 80 of them) which I want to hide are all drop down boxes - could I add a default value of "Select Option" which will then allow the field to show and then be hidden when the intial field which is also a drop down box has its option (From around 70 options) selected?


Prove that $\text{tr} (\phi \otimes \psi) = \text {tr} \phi \text {tr} \psi $.

Question: Let $E,F$ be two vector spaces of dimension $n$ and $m$ respectively and let $\phi : E \rightarrow E$,
$\psi : F \rightarrow F $ be two linear transformations. Prove that $\text{tr} (\phi \otimes \psi) = \text {tr} \phi \text {tr} \psi $  and $\text {dt}(\phi \otimes \psi) = (\text {dt} \phi)^m (\text{det} \psi)^n$.
Looking at one of my old books I found this exercise and I found it interesting because it involves one of the fundamental concepts of linear algebra: trace and determinant.
I have been trying to do the first equality by direct method, however I have not had a result yet. I am clear that $ \text{tr} (AB) = \text{tr} (BA) $, and $ \text{im} (\phi \otimes \psi) = \text{im} \phi \otimes \text{im} \psi $, but could this help me?
I am in need of help with this exercise please. I am not very familiar with the subject.
Comment: The determinant follows immediately from the mixed product rule $A\otimes B = (A\otimes I_m)\cdot (I_n \otimes B) $
Comment: For the trace, you can literally just list the diagonal elements of $\phi\otimes\psi$, and the result is nearly immediate. The determinant seems more interesting.
Answer: One approach to compute the trace is as follows:
Suppose we have bases $\{e_1,\dots,e_n\},\{f_1,\dots,f_m\}$ and associated dual bases $\{\alpha_1,\dots,\alpha_n\},\{\beta_1,\dots,\beta_m\}$ respectively. It follows that the sets $\{e_i \otimes f_j\}$  and $\{\alpha_i \otimes \beta_j\}$ form a basis and associated dual basis for $E \otimes F$. It follows that
$$
\begin{align}
\operatorname{tr}(\phi \otimes \psi) &= \sum_{i=1}^n \sum_{j=1}^m (\alpha_i \otimes \beta_j)(\phi \otimes \psi)(e_i \otimes \beta_j)
\\&=
\sum_{i=1}^n \sum_{j=1}^m (\alpha_i \otimes \beta_j)(\phi(e_i) \otimes \psi(f_j))
\\&= \sum_{i=1}^n \sum_{j=1}^m \alpha_i(\phi(e_i)) \beta_j(\psi(f_j))
\\ & =
\left(\sum_{i=1}^n \alpha_i(\phi(e_i)) \right)
\left(\sum_{j=1}^m \beta_j(\psi(f_j)) \right)
= \operatorname{tr}(\phi)\operatorname{tr}(\psi).
\end{align}
$$

For the determinant, use the fact that for maps $\Phi,\Psi$ over $E \otimes F$, $\det(\Phi_1 \circ \Phi_2) = \det(\Phi_1) \det(\Phi_2)$.  Now, define $\Phi = \phi \otimes \operatorname{id}_F$, so that
$$
\Phi(x \otimes y) = \phi(x) \otimes y.
$$
Similarly, define $\Psi = \operatorname{id}_E \otimes \psi$. It suffices to show that $\det(\Phi) = \det(\phi)^m$, and $\det(\Psi) = \det(\psi)^n$.
To show that $\det(\Phi) = \det(\phi)^m$, note that the spaces $V_i =  \{x \otimes \beta_i : x \in E\}$ are invariant subspaces of $\Phi$. So, we can write $\Phi$ as a direct sum of maps
$$
\Phi = \overbrace{\phi \oplus \cdots \oplus \phi}^m.
$$
It follows that $\det\Phi = \det(\psi)^m$, which was what we wanted. The proof for $\det \Psi$ is similar. The conclusion follows.
Answer: Writing $\operatorname{tr}(\phi\otimes \psi)$ is technically not 100% correct. By definition, the trace on a K-vector space $V$ is the unique linear map $\operatorname{tr}_V\colon (V\otimes V^*) \to K$ which sends $(v\otimes f)\to f(v)$, i.e. by extending through linearity $\operatorname{tr}_V\big(\sum_i \gamma_i (v_i\otimes f_i)\big) = \sum_i\gamma_if_i(v_i)$. Or, if you like bra-ket notation we have
$$ \operatorname{tr}_V(|v\rangle\langle f|) = \langle f| v\rangle $$
However $\phi\otimes \psi \in  (E\otimes E^*) \otimes (F\otimes F^*)$ which is not of the form $V\otimes V^*$, but the space is isomorphic to $(E\otimes F) \otimes (E\otimes F)^*$. By definition, the canonical/induced inner product on the tensor product is:
$$ \left\langle\phi_{1} \otimes \phi_{2}, \psi_{1} \otimes \psi_{2}\right\rangle_{V_1\otimes V_2}=\left\langle\phi_{1}, \psi_{1}\right\rangle_{V_1}\cdot \left\langle\phi_{2}, \psi_{2}\right\rangle_{V_2} $$
And then immediately we have
$$ \operatorname{tr}_{E\otimes F}(|u\otimes v\rangle \langle f\otimes g|)
\overset{\text{def}}{=} \langle f\otimes g|u\otimes v\rangle_{E\otimes F}
\overset{\text{def}}{=} \langle f|u\rangle_E\langle g|v \rangle_F
\overset{\text{def}}{=} \operatorname{tr}_E(|u\rangle\langle f|)\operatorname{tr}_F(| v \rangle\langle g|)
$$
So this property is pretty much equivalent to the definition of the inner product on the tensor product space. The determinant follows from the mixed product property:
$$ A\otimes B = (A\otimes I_m)\cdot (I_n \otimes B) $$
Comment: There is nothing wrong with writing $\operatorname{tr}(\phi \otimes \psi)$. The universal definition of trace exploits the canonical isomorphism with $V \otimes V^*$, but in any literature in linear algebra I have seen, the "trace" refers to a map over a space of endomorphisms


How to prevent Illustrator from converting text to path when saving project as SVG?

Question: When saving an Illustrator file which contains some text as SVG, the text is converted to outlines. How can this be avoided? It is possible in Inkscape.
Comment: Have you already converted the font to outlines before you have tried to save it as svg (Can you still edit the text in illustrator)?
My svg options dialog looks slightly different and produces the desired output. Are you using the latest version of illustrator?
Comment: I did not convert it. How can I restore the defaults without reinstalling?
Comment: I reinstalled illustrator but it's still not working(when I uninstalled it I chose to delete preferences). Your svg options dialog look different because I clicked "more options". I am using 2015 verison.
Comment: Which font do you use?
Comment: Tested it with the same font as used in your example.
Noticed that some individual characters were transformed in position when exported to svg, maybe older versions of Illustrator could not handle that correctly and convert them to outlines.
Have you tried using another font?
Comment: Yes, I tried: Adobe Caslon Pro, Arial, Comic Sans MS, Open Sans.
Answer: I changed the language to English and now it's working!  (and I still can to write in non-English language)    (:
Answer: I have had the same problem for more than a year now, where Illustrator seems to randomly convert some text to path when exporting to SVG. (There are some patterns in this random behaviour though, it often happens when texts contain sub/superscript or when they are multiline, separated by soft returns).
It seems to be solved by using the Save As dialog instead of the Export for Screens dialog. When Saving As, the 'more options' you can choose for All Glyphs under Fonts > Subsetting. Now all text is saved as text, and not sometimes as outlines.


Difference between #temptable and ##TempTable?

Question: What is the difference between #temptable and ##TempTable in SQL Server?
Answer: #table refers to a local temporary table - visible to only the user who created it
##table refers to a global temporary table - visible to all users
Answer: #TempTables aren't just local to the User, or connection.  They are local to the process that created them and any processes that the creating process spawns.  For example if I have the following:
Declare @strDynamicSQL as varchar(8000)

Set @strDynamicSQL = 'Select GetDate() As TheDate Into #TheDateTable'
Execute(@strDynamicSQL)

Select *
From #TheDateTable

I get the following error:

Msg 208, Level 16, State 0, Line 7 Invalid object name
  '#TheDateTable'.

But if I do:
Declare @strDynamicSQL as varchar(8000)

Create Table #TheDateTable (
    TheDate     DateTime
)

Set @strDynamicSQL = 'Insert Into #TheDateTable Select GetDate() As TheDate'
Execute(@strDynamicSQL)

Select *
From #TheDateTable

I get no errors.
In the first example the Execute statement happens in a spawned process.  Since the table is created in that process when it returns that process goes away.  And with the process the table is "bye-bye".
In the second example the table is created by the top level process.  It's then interacted with in the spawned process.  The table is available to the process that it was created in and any process it spawns.
##tables break this.  The process a ## table is created in will be the controlling process.  The table will not get flagged for removal if this process is still alive even if there are no tasks against that process.  Once the process that the ## table was created in goes away, the table is tagged for removal when the last task is executed against it.
Here is a simple way to see it.  # tables are available only in the scope of the process that it was created in.  ## are available in the same way as any other table except that the existence comes and goes with the process it was created in.
Answer: Local temporary tables are visible only to their creators during the same connection to an instance of SQL Server as when the tables were first created or referenced. Local temporary tables are deleted after the user disconnects from the instance of SQL Server. Global temporary tables are visible to any user and any connection after they are created, and are deleted when all users that are referencing the table disconnect from the instance of SQL Server.
 Taken from here
 More on this
Answer: simple way of testing #localtable and ##globaltable
Try this in a different SQL Query  Window
create table ##globaltemptable (id int )
go
insert into ##globaltemptable values (1)
go
select * from ##globaltemptable

Try this in a different SQL Query  Window
create table #localtemptable (id int )
go
insert into #localtemptable values (1)
go
select * from #localtemptable

Now if you run the select query for the table : #localtemptable in the global window syntax , you will get an error as follows :-
Invalid object name '#localtemptable'.

While you run the select query for the table : ##globaltemptable in any query window of the same session, you will get the query results return.
Answer: "#tempTable" denotes Local Temporary Tables

It starts with single hash value "#" as the prefix of the table name.

A Local Temporary Table is only for the connection in which it was
created. Each Local Temporary Table has a random value at the end of
the table name.

A Local Temporary Table is automatically dropped when    the existing
connection is closed, or the user can explicitly drop it    with the
following command "drop table #TempTable".

If the Temporary    Table is created in a Stored Procedure then it is
automatically    dropped on the completion of the Stored Procedure
execution.

You can    create a Local Temporary Table with the same name but in a
different    connection, and it is stored with the same name along
with various    random values.

"##tempTable" denotes Global Temporary Tables

It starts with the single hash value "##" as the prefix of the table
name and its name is always unique.
There is no random number appended to the name.Global Temporary
Tables are visible to all connections of SQL Server.
Global Temporary Tables are only destroyed when the last connection
referencing the table is closed (in which we have created the Global
Temporary Table).
You can access the Global Temporary Tables from all connections of
SQL Server until the referencing connection is open.
Answer: The table will be visible/available up until the process/connection that created it ends and only to the session that created it.
The table is global and will be available to everyone until the process/session that created it is ended.


Enforcing fixed text width in source files

Question: How strictly should one should stick to a fixed text width in source code files? More specifically, do you always abide by the 80-character limit for code and the 100- or 120-character limit for comments? Sometimes there are lines in my code in which I am hesitant to introduce a line break since it would disrupt the uniformity or reduce the legibility of the surrounding code. Do you use your discretion in these cases, or always choose to abide by the text width?
Answer: It would depend on why you are seeking to enforce a limit?
Is the code yours alone, or is it shared with many others?  Are you creating source that will be viewed and augmented by one other person, a dozen people, hundreds?  The more people who are using/viewing, the better it is to have uniformity.
Of course, you also make a good argument for not limiting...

Sometimes there are lines in my code
  in which I am hesitant to introduce a
  line break since it would disrupt the
  uniformity or reduce the legibility of
  the surrounding code.

My two cents.
Answer: I've run into these situations before as well. While I use the 80 characters as a guideline, I give uniformity a higher priority, so I feel free to exceed the limit if it maintains clarity.
The reason I'm okay with exceeding the limit is that most people these days (at least people I work with) have editors / screens which are easily capable of displaying well over 100 chars, so exceeding 80 does not impede the readability of the code.
While the limit generally helps to keep code readable, I find that if I always try to maintain the limit, then, like you said, the flow of the code, and therefore it's readability, is disrupted.


How to find a explicit bijection for some $f:A\times B \rightarrow B \times A$

Question: The question I have states:
"Describe a bijection $f:A\times B\rightarrow B\times A$"
The simplicity and lack of a domain or codomain that I can look at has caused this question to throw me off.
Is describing $f(a,b)=(b,a)$ where $a\in A, b\in B$ enough to do this? To what extent do I have to prove that this is a bijection?
I can say that $(x,y)=(x',y')$ if and only if $(x=x')\ \cap \ (y=y')$ and prove injectivity and surjectivity and so on, but I am a bit confused..
Answer: Yes, you're right on with defining $f$.
To check that $f$ is onto, pick an arbitrary element of the codomain (say, $(b,a)$ where $b\in B$ and $a\in A$) and show that there exists an element of $A\times B$ so that $f$ maps that element to $(b,a)$.
To check that $f$ is 1-1, pick two distinct elements in the domain, and show that $f$ evaluated at one is different from $f$ evaluated at the other.
Answer: Whether or not $f(a,b) = (b,a)$ is enough to complete this exercise depends on whether or not it's obvious that you know why it's a bijection and can fill in the rest of the details if asked.
Incidentally, it is often simpler to prove a function is invertible than to prove it is bijective. Defining $g(b,a) = (a,b)$ and showing that $g$ and $f$ are inverses shows that they are both bijective.
Answer: $f(a,b) = (b,a)$ is enough.
Maybe you want to prove that it's a bijection though. This is easy because $f(a,b)=f(c,d) \Rightarrow (b,a) = (d, c)$, so clearly $b=d$ and $a=c$. It follows that $f(a,b) = f(c,d) \Rightarrow (a,b)=(c,d)$, so it's injective.
Let $(b,a) \in B\times A$. Then choose $(a, b) \in A\times B$. Now $f(a,b) = (b, a)$, so f is surjective and you are done!


Calculate distances between series of points in postgis

Question: I have a postgres/postgis table containing a series of sequential points. I want to add a new column to the table which contains the distance between each point and the first one, and so forth until all the points are processed (the first point should have a distance of 0). Can this be done with a query or do I need to use Python or equivalent to create a loop?
Many thanks
Comment: Welcome to gis.stackexchange @william! Do your mean "distance between each point and the first one" or "distance between each point and the previous one"? Are your points numbered, indicating sequence?
Comment: Or are you looking for a matrix, using each point as a start point and measuring the distance to each point in the layer?
Answer: Hallo
If  assume that you have an id field called gid and that the first point has gid 1 then you can do something like:
<code>ALTER table my_table ADD COLUMN dist DOUBLE PRECISION;

UPDATE my_table SET dist=ST_Distance(my_table.geom, b.geom)
FROM (SELECT geom FROM my_table WHERE gid = 1) b;
</code>
That will add a column called dist and fill that column with the distance to the point with gid=1
HTH
Nicklas


JodaTime Persisting DateTime as multi column

Question: So here's what I'm trying to do. I have a gsp view with a form that's posting the following with some example values:
params.startTime: 01:00:00 AM, params.startDate: 2013-01-01, params.timeZone: US/Central
Here's some code from my domain class
<code>    class MyClass {
     DateTime startDate
    }
    static mapping {
     startDate type: PersistentDateTimeWithZone, {
      column name: "start_date_time"
      column name: "start_date_zone"
    }
</code>
And here's some code from my controller
<code>    //This is a service i created to return the UTC id of a long time zone
    def tzs = new TimeZoneService()
    params.timeZone = tzs.getTimeZoneId(params.timeZone)
    def startTimeZone = DateTimeZone.forID(params.timeZone)

    def startDate = new DateTime(params.startDate + "T" + params.startTime, startTimeZone)
</code>
This is what this looks like in my database:
<code>    start_date_time: 2013-01-01 01:00:00
    start_date_zone: -06:00
</code>
So here's the problem. When I format startTime with the following pattern
<code>    DateTimeFormatter fmt = DateTimeFormat.forPattern("MMM dd, yyyy  h:mm a z");
</code>
My time zone comes up as -06:00 and not US/Central. Here are my questions: I'm trying out different approaches to persisting my DateTime. If i want to just use one column to persist date time and zone together how would I do that? If my properties for date-time-zone comes in as separate params, what's the right way to build a DateTime with those three params? Please help! Thanks in advance.
Answer: In order to fix this error, you need to get the UTC value for the time zone offset.  I believe the output that it gives you through Joda DateTimeZone is America/Chicago, America/Eastern, America/Pacific, etc. though, so if you want to have a custom value such as US/Central, you'll have to create a map for whatever values you want to match those offsets.
Hope this helps!


Classification of Platonic solids

Question: My question is very basic: where can I find a complete (and hopefully self-contained) proof of the classification of Platonic solids? In all the references that I found, they use Euler's formula $v-e+f=2$ to show that there are exactly five possible triples $(v,e,f)$. But of course this is not a complete proof because it does not rule out the possibility of different configurations or deformations. Has anyone ever written up a complete proof of this statement?!
Comment: @Ryan:  I'm reading her questions not as objecting to the use of Euler's formula, but rather objecting to stopping with determining the combinatorial type of the polytopes.  (Basically, determining the f-vector.)  E.g.: why is the cube the only way to fit 6 4-faces together?
Comment: Here is a sketch argument for uniqueness:

From the combinatorics you know the number of faces and the number of sides on each face (say n).  Once you know the number of faces, that determines the spherical area of each face.  Up to rotation of the sphere, there is then a unique regular spherical n-gon of the given area.  The configuration of faces is unique because there is at most one way to tile the sphere so that the edges match up: start with one face and then reflect repeatedly in its sides.
Comment: If you're ruling out Euler's formula you might be starting off with a not-entirely-standard definition of a Platonic solid.  Are you not taking Platonic solids to mean a regular convex polyhedron?
Comment: Are you not happy with Euclid's original proof (well, an adaptation of that)? http://en.wikipedia.org/wiki/Platonic_solid#Geometric_proof
Answer: This is a classical question.  Here is my reading of it: Why is there a unique polytope with given combinatorics of faces, which are all regular polygons?  Of course, for simple polytopes (tetrahedron, cube, dodecahedron) this is clear, but for the octahedron and icosahedron this is less clear.
The answer lies in the Cauchy's theorem. It was Legendre, while writing his Elements of Geometry and Trigonometry, noticed that Euclid's proof is incomplete in the Elements.  Curiously, Euclid finds both radii of inscribed and circumscribed spheres (correctly) without ever explaining why they exist.  Cauchy worked out a proof  while still a student in 1813, more or less specifically for this purpose.  The proof also had a technical gap which was found and patched up by Steinitz in 1920s.
The complete (corrected) proof can be found in the celebrated Proofs from the Book, or in Marcel Berger's Geometry.  My book gives a bit more of historical context and some soft arguments (ch. 19).  It's worth comparing this proof with (an erroneous) pre-Steinitz exposition, say in Hadamard's Leçons de Géométrie Elémentaire II, or with an early post-Steinitz correct but tedious proof given in (otherwise, excellent) Alexandrov's monograph (see also ch.26 in my book which compares all the approaches).
P.S. Note that Coxeter in Regular Polytopes can completely avoid this issue but taking a different (modern) definition of the regular polytopes (which are symmetric under group actions).  For a modern exposition and the state of art of this approach, see McMullen and Schulte's Abstract Regular Polytopes.
Answer: I believe Hermann Weyl's classic book 'Symmetry' discusses this question but I can't recall what his approach is (ie, whether he makes use of the Euler formula).
Comment: I don't think he uses Euler's formula (and the Greeks did not either...)
Comment: Thanks for the clarification, I will need to have a look back to see what he does say!
Answer: One place I have seen such results is in Conway et al., Symmetry of things. I am not enough of an expert to be able to comment on the details of the proof.

Classification of Platonic solids


IPSec site to site VPN

Question: I am trying to connect our server to cisco site-to-site IPSec VPN with one of our partners servers, they asked us to implement the settings they gave us into our router, but actually we don't have access to the router, we are just connected directly with our ISP. alternatively, we were informed that we can use software VPN instead, and yes we found a working one, tested and verified, but we have to pay for it to keep running.
Now my question is, having that we are running windows server 2012 R2, how can we establish this VPN connection directly from windows without the need to use third parties tools?
The only parameter that we have to connect are:
Gateway IP: xxx.xxx.xxx.xxx
Authentication Pre-shared Key: ######
Encryption: 3DES
Hash authentication: MD5
DH: Group1
No username or password is needed with this type of VPN.
Any help is appreciated.
Best regards,
Abed
Answer: This is a very similar question. You'll just need to change the encryption types in the steps of the answer there to the ones you need.

IPSec site to site VPN


Is there a pole version of marrow beans?

Question: Any other rich-flavoured, white dry bean would do as well.  I'm in zone 5a or 5b, ample growing season.  I grew a few types of dry bush beans this year and even got a second crop off some of them.  Next year I want to do only pole beans. I would prefer an open-pollinated variety.  I have found white runner beans, but I don't think they have the flavour I'm thinking of.
Comment: where do you live,  do you require that the type is heirloom or commercial?
Answer: No. Marrow beans, as well as most shell/dry beans, were developed for field cultivation, and bush types were (and still are) more efficient. I can think of one variety that may interest you, and that is the 'White Emergo' runner bean, Which can be used as a dry bean, with qualities described as similar to cannellini. This pole veriety can climb up to 8-10 feet. It can be harvested green, or left to dry. If that isn't what your after, you may be out of options.


Why do requests and responses get lost?

Question: Even on big-time sites such as Google, I sometimes make a request and the browser just sits there.  The hourglass will turn indefinitely until I click again, after which I get a response instantly.  So, the response or request is simply getting lost on the internet.
As a developer of ASP.NET web applications, is there any way for me to mitigate this problem, so that users of the sites I develop do not experience this issue? If there is, it seems like Google would do it. Still, I'm hopeful there is a solution.
Edit: I can verify, for our web applications, that every request actually reaching the server is served in a few seconds even in the absolute worst case (e.g. a complex report). I have an email notification sent out if a server ever takes more than 4 seconds to process a request, or if it fails to process a request, and have not received that email in 30 days.
Answer: It's possible that a request made from the client took a particular path which happened to not work at that particular moment. These are unavoidable - they're simply a result of the internet, which is built upon unstable components and which TCP manages to ensure a certain kind of guarantee for.
Like someone else said - make sure when a request hits your server, you'll be ready to reply. Everything else is out of your hands.
Answer: They get lost because the internet is a big place and sometimes packets get dropped or servers get overloaded.  To give your users the best experience make sure you have plenty of hardware, robust software, and a very good network connection.
Answer: You cannot control the pipe from the client all the way to your server.  There could be network connectivity issues anywhere along the pipeline, including from your PC to your ISP's router which is a likely place to look first.
The bottom line is if you are having issues bringing Google.com up in your browser then you are guaranteed to have the same issue with your own web application at least as often.
That's not to say an ASP application cannot generate the same sort of downtime experience completely on it's own... Test often and code defensively are the key phrases to keep in mind.
Let's not forget browser bugs.  They aren't nearly perfect applications themselves...
Answer: This problem/situation isn't only ASP related, but it covers the whole concept of keeping your apps up and its called informally the "5 nines" or "99.999% availability".
The wikipedia article is here
If you lookup the 5 nines you'll find tons of useful information, which you can apply as needed to your apps.

Why do requests and responses get lost?


How to create an connection frm WIT2140 cirronet radio to a serial port

Question: I am using WIT2410 cirronet radio to transfer the data wirelessly.
But now i need to interface this radio wiht my PC's serial port.
I need help in how can i make the connection and wat all additional parameters needed for it.
Answer: First you need to connect it to the PC. You need to connect at least pins 1,2,3,16 for communication and power.
Depending on your application, you might need to configure it on the fly so connect CFG to DTR on
the serial port.
RTS and CTS are good to use for flow control if you send a lot of data or have a slow data handeling power.
I would recommend to connect as many pins as possible of the ones below.
From cirronets W2410 manual:
Pin Signal Type Description
1 Gnd-Signal and chassis ground
2 TxD Input Transmit data
3 RxD Output Receive data
4 CFG Input Configuration selector. Used to switch radio between data and control mode
5 RTS Input Request to send. Used for receive flow control by the host
6 Sleep Input Sleeps/wakes the radio transceiver
7 DCDO utput Data carrier detect. For remotes, indicates successful synchronization
8 CTSO utput Clear to send. Used for receive flow control by the radio
10 Reset Input Resets module
16 Vcc-Positive supply. Min 3.3 v, Nom 5.0 v, Max 10.0
There are a lot of parameters to configure. Once again, depending on your application you need to
configure it differently. If you are planing to set up a reliable radio network I realy recommend
using protocol mode 02. If you just want to get it working as fast as possible, try protocol mode 00 which is a transparent mode for point-to-point networks.
You need to set one radio as base and the other(s) as remotes using the 'wb' command.
Be sure to use the same hop pattern. Set the hop pattern with the 'wn' command.
Set protocol mode with 'sp' command.
Switch it back to data mode using the CFG signal pin.
Read the excelent manual here for more information:
http://www.rfm.com/products/data/wit2410dk_manual.pdf
Excelent radio of choice.


What is the most important aspects of Ph.D. application other than previous university and GPA?

Question: I'm just curious to know what are the most important requirements for filling up Ph.D. application, generally. is job resumes important if available? Or for example GRE, Publications or Research interest? What is more important?
Answer: Acceptance into a doctoral program isn't a matter of accounting and counting chits. Someone, or a group, needs to make the assessment that you are highly likely to be successful. To that end your GPA is relevant, but so is everything you write or say as part of the process. If you are considered to be a serious candidate with a fairly easily predictable good future, you will be considered.
After that, it can be a matter of competition. There will be a lot of other candidates that have excellent records and they are also being "weighed".
But certainly, anything that shows past success in the kinds of things that doctoral students actually do (pubs, research) is a big plus. But don't neglect your SOP, where you talk about your envisioned future.
Answer: Recommendation Letters and Research Experience
The PhD admissions committee wants to know if an applicant will be a successful researcher. That is a nebulous quality. GPA, GRE, and other numerical scores only give a partial picture, since coursework and exam-taking are very different from open-ended research.
The best indicator of research ability is prior research experience and how well that went. How well your prior research went is best indicated by the recommendation letters of the people who worked with you.
Answer: Taking a graduate student is a big investment for a PI. That person will consume financial resources, affect lab culture, and will be responsible for forwarding the PIs own agenda and reputation. And, grad students stick around a long time, so personality/fit is important.
Aside from test scores, most PIs want someone who

Has demonstrated interest and capability in the field (demonstrated through publications, manuscripts, or personal conversations)
An understanding of what they're getting themselves into (demonstrated through undergrad research, conference attendance, etc)
Passion to work hard and grow intellectually and professionally (demonstrated through personal conversations and letters of recommendation)

I would say these points weigh equally if not more than raw test scores. I have no shortage of examples of highly successful students with less than stellar test scores (though institutions also have their own bar for that).
Most important is that you pursue a personal approach. Call the PI personally and express your limitless interest and excitement.
Answer:
Or for example GRE, Publications or Research interest?  What is more important?

Previous publications can be a very strong indicator of ability to do well in a PhD program, particularly if they are well written and in reasonable journals.  When a student applies for a PhD program with published papers already under their belt, this can be a strong factor.
Answer: The ability to conduct high-quality independent research is probably one of the most important aspects most advisors (PIs) look for in potential candidates. Of course, there are several ways to gauge that aspect; for example, prior research experience, publications, the ability to formulate research problems, etc. After all, your PhD success will depend on how good you are as a researcher.
I should also add that the answer will probably be field-dependent.


JSONKit for iphone app?

Question: Will apple choose to not allow an app to go to the app store if we use JSONKit to parse JSON's from our php document? I would like to use JSONSerializable but that is for ios5 and I am not going to alienate ios4 members on 3gs by doing that.
Answer: You can use JSONKit in an iPhone app. Apple will not reject it based on that.
It's using private APIs they get upset about. :)
Comment: Sure. If you consider this answered, please click the checkmark. It lets other SO users know the question is answered to your satisfaction.
Answer: No. You can import your own class or library to parse JSON that you want. So long as you aren't using anything within Apple API's that are undocumented, you will be more than fine. Those are all well established parsers. No worries.
Answer: Nope, assumably they are unable to tell what source files you use in your application. JSONKit  is licensed under the BSD License which allows redistribution;
Redistribution and use in source and binary forms are permitted
provided that the above copyright notice...

JSONKit for iphone app?


Structural Equation Modeling (SEM) with betareg in R

Question: We have an SEM model and we were using Lavaan but we learned that the distribution of the residuals of one of the regressions is far from normal. The response variable in that equation is students' exam grades and if we transfer them to range (0, 1) it well-fits a beta distribution.
I'd appreciate it if you let us know how we can use betareg for one of our regressions or somehow indicate that the distribution of the response variable is Beta in an SEM model in R. Also, an example code snippet will be highly appreciated.
Comment: I don't think you can.
Answer: If you want to fit an SEM model with beta distributed residuals, I guess your best bet is to use Stan and program your model in a Bayesian framework.


What's the difference between a grab and a command grab?

Question: What are the differences between a grab and a command grab?
Comment: Where did you see these terms? Which specific games or genres of games were they in reference to? When the body of your question just repeats the title, that might be a sign that a bit more information would make the question understandable and useful to a much broader audience.
Answer: Command grab in other fighting games is a grab that's either specific to a certain character or one that requires more inputs than your typical grab.
Answer: The specific meaning is probably dependent on which game you're talking about. When it comes to fighting games, I've only gone deeply into one, and that's Smash Bros.
In Smash Bros, a normal grab is executed by pressing r1. This grab goes through sheilds, but it's generally slower than most attacks and if the enemy attacks while you're grabbing, their attack hitbox takes precedence over your grab, so they win that exchange.
Command Grabs in smash bros are available to some characters as a special attack (with the B button). Like normal grabs, they usually (but not always) go through shields. Often they have more range than a normal grab, but more startup time, and they often don't give you options about what to do when you've grabbed someone -- the rest of the attack is decided for you if you land the grab. With normal grabs, in contast, you can choose to throw them up, down, to the side or not at all. Usually not with command grabs (I believe there are exceptions to this).
So yeah, in Smash Bros a command grab is a special attack that has some properties of a normal grab, but some differences.


Why I am getting a http request exception in Xamarin Forms

Question: I am trying to execute this simple code but it fails and i get System.Net.Http.HttpRequestException: An error occurred while sending the request.
The code simply declares an HttpCLient and then I use the GetStringMethod. the same code used to work. I don't know why it doesn't now.
I searched google and stackoverflow and couldn't get the answer.
Here is my .cs file
<code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using FetchActor.Models;
using Newtonsoft.Json;
using System.Collections.ObjectModel;
using System.Collections;

namespace FetchActor
{
    public partial class MainPage : ContentPage
    {

        HttpClient connection = new HttpClient();
        MovieService movieService = new MovieService();

        public MainPage()
        {
            InitializeComponent();

        }

        private async void searchBarByActor_SearchButtonPressed(object sender, EventArgs e)
        {

            var _connection = await connection.GetStringAsync("https://api.themoviedb.org/3/search/keyword?api_key=ab3da1af35c55cc8b3780fbc9a2bf259&query=Charlize%20Theron&page=1");
        }

    }
}
</code>
the code never goes past GetStringAsync and i get the error.
any ideas on what could this be please ?
Answer: It seems the emulator wasn't get data from the connection. I turned the Wifi on and off and restarted the computer and the project. it still didn't work. it was showing connected but no internet.
the solution was turning off mobile data in the emulator so that it could be connected only with wifi.


Can anyone tell me what this problem statement means? Our professor wants us to transmit wind speed sensor data over rf.

Question: "A radio transmitter shall be added to transmit the wind speed by changing its
frequency. The frequency change shall be 1 Hz per 0.1 meter/sec. The transmitter must be
custom designed and built. It cannot be a commercial product. The frequency must be in the
433 MHz ISM band or if a team member has an amateur radio license, an amateur radio free can be used. The transmitter must be able to be set to 8 different frequencies in the 433 MHz
ISM band with 25 KHz separation. The team can use a commercial receiver."
I cannot make heads or tails of this. Any help will be appreciated! Thanks.
Comment: *I cannot make heads or tails of this* Hmm, perhaps you ventured into the wrong class then ? If you do not understand any of it then I truly wonder what you're doing in that class. You must know what 433 MHz means. If you don't then you lack so much knowledge that it cannot be answered here either.
Comment: @bim or anyone who can address my curiosity - what I understand from this question is that his frequency should shift from 433000000 Hz at zero wind speed to 433000010 at a wind speed of 1 m/s. Will a receiver be able to differentiate between such close frequencies?
Comment: While the specs are ridiculous (1 kHz/0.1 m/sec would be much more reasonable), they are very clear. That you cannot understand them suggests that either the course has horribly presented, or you have not been paying attention. Or the course requires prerequisites which you do not have.
Comment: @Whiskeyjack Maybe it can modulate 433MHz with 100 Hz for example and change that 100 Hz with 1 Hz / 0.1 m/s. It does not say that the carrier frequency must be changed, it just says "its frequency". I would consider a 100 Hz modulation also part of the transmitter frequency. Changing the carrier can be done as well but the absolute error will be an issue because it requires a very high frequency stability. Transmitter and receiver rely on their clocks to be very well synchronized and tracking. That is not a practical idea. A typical crystal oscillator is 10 ppm so 4.3 kHz at 433 MHz.
Comment: "The team can use a commercial receiver" - that's a clue. If you use a commercial receiver then your transmitter must be compatible with it. So if for example your receiver expects an OOK (On Off Keyed) signal, the transmitter must _produce_ an OOK signal. Then think about how you can send a varying frequency over this rf link.
Comment: @BruceAbbott A very good clue...but your suggestion for receiver type may lead OP to not meet some of the spec.
Comment: https://en.wikipedia.org/wiki/LPD433
Comment: So you basically want us to make it for you?
Answer: Academics.... sigh...

A radio transmitter shall be added to transmit the wind speed by changing its frequency. The frequency change shall be 1 Hz per 0.1 meter/sec. The transmitter must be custom designed and built. It cannot be a commercial product. The frequency must be in the 433 MHz ISM band

OK, so:

WS is the wind speed in m/s
B is the band setting (0 to 7) as they want 8 settings spaced by 25 kHz
C is the carrier (let's say 433MHz)

You need a transmitter which outputs a continuous wave at a frequency of :
C + 25kHz*B + 10*WS
Now, the first and obvious issue here is that, if we want an accuracy of 1m/s on the wind speed, then our 433MHz local oscillator will have to have an accuracy of 10Hz. Same for the receiver. So 5Hz error for both.
That's 1.15e-8 or 0.01ppm accuracy... It can be done, think about custom made crystals lapped under a full moon with some fairy dust on top (very low yield, you can always ask Laptech for a quote), temperature-stabilized ovenized enclosure... ultra low noise circuits... like those. When the applications mention "Radar/Military" and it comes in a thick heavy metal brick with 50 screws on each side, you know it's more expensive than your car.
So your job as a budding engineer is to make a realistic cost estimate for the idiotic requirements you are provided. And then come up with a solution that will work for a budget under $10.
This happened at one of my jobs: every time the boss came back from a ski weekend and suggested a "stupendously innovative" idea, the database administrator would pop up from their screen and quip "no problem boss, that's gonna need about twelve extra servers, plus oracle licenses, sign here".
I mean, if you ask Wenzel for a quote explaining your purpose is to have the teacher learn about some hard facts of life, they'll probably have a good laugh and give you the quote.
Options include:

Use a less dumb modulation scheme, for example encode the wind speed information into pulses or binary and transmit that by using FM or AM on your 433MHz carrier.
It can be as simple as "every time the anemometer makes a turn, transmit a short pulse of RF."
As said in the comments, modulate the 433MHz with a frequency like "1kHz+10*windspeed".
Put a ESP8266 on the focal point of a parabolic dish.
Etc.
Comment: Gotta love the people who are tasked with training the next generation of engineers but don't understand realistic design specifications. +1 for your excellent answer!
Comment: "The transmitter must be able to be set to 8 different frequencies in the 433 MHz ISM band with 25 KHz separation"  Other than that, accuracy is not specified.  The question has plenty of stand alone educational value.
Comment: @ScottSeidman with just a little adjustment it would have had so much more value and have actual applicability outside of academia. Given that the instructor is asking them to design the system from scratch this is not a 1st year course. I'd call this a very poor assignment in that context.
Comment: I think its main educational value is to teach the students how to deal with unclear, badly worded specs... and help the client come up with better specs!


When using online dictionaries to verify word meanings, do different geographical regions turn to different dictionaries?

Question: Does anyone have a good map of which online dictionary will most likely apply to a given English speaking community?
Comment: Good question. I hope someone has a good answer. +1
Comment: The question of which dictionary *applies* to a community (the question in the body) is different from which dictionary people *turn to* (the question in your title). Which one are you actually interested in? If it's the latter, then something like Google Trends (or book sales) seems the only way towards an answer, while if it's the former, there may be more authoritative answers.
Comment: I'm surprised nobody's brought up Canada.
Answer: I'd say the Oxford English Dictionary is the definitive British English dictionary.  Merriam Webster's might be the definitive American English dictionary.
Using Gomez's technique, it seems that the Macquarie Dictionary is the one preferred in Australia.
Comment: +1. Useful synthesis based upon ShreevatsaR's and my own proposed method. Thanks for doing that!
Comment: I would disagree. If you search for an online dictionary in the US, the Oxford English Dictionary that comes up is American. For online usage, the Cambridge Dictionary is the definitive British English dictionary. Oxford is now universal and regional.
Comment: @Jimi Oke: Even if there is a regionalized OED for American English, Gomez's method shows that Merriam Webster's is much more popular.  Similarly, the OED is slightly more popular in the UK than the Cambridge Dictionary.
Answer: Here's a pseudo-scientific, fascinating look at dictionary use by region using Google Trends. For clarity, each phrase was crafted to return a dictionary as the first hit in (American, Western Washington) Google.
(A second graph, featuring different dictionaries)
Especially interesting are the usage statistics for the Philippines and India, though the former seems heavily skewed by Tagalog search results.
As a bonus, adding the term "Google dictionary" has some interesting results. And if we add Dictionary.com, suddenly things become amazingly skewed.
Answer: Hopefully
The languages vary tremendously in both spelling and meaning, in some areas (such as cookery and food) more than others.  The language is relatively common and certainly in the modern age with the perfusion of international television, we understand many of the differences orally due to exposure.  This does not mean we see the spellings everyday, or have a firm grasp of the usage differences, particularly when obscure.
Using a dictionary tailored for another region than your own is unwise at best.  The languages are not the same, though are mutually corruptive.