How useful is wifi on a camera?

Question: I have to buy a camera for my daughter for Christmas but I have a problem: I do not know if the wifi (included in the camera) is useful. what do you think about it? is it advantageous?
Comment: Are you sure picking a camera for your daughter is the best choice? Have you considered taking her to a camera store so she can decide?
Comment: Assuming hardware and users are capable, the advantage for many people these days are the ability to quickly transfer to a phone or mobile device, do some quick editing, and post to Instagram, blog, website; or at least to get feedback from customers.
Answer: It is advantageous for several purposes, mainly remote live view and remote trigger.
For example:

Taking photographs on a tripod: usually when shooting far away objects with long exposure you use the 10-sec selfie timer to give the tripod+camera vibrations some time to die out, but when taking photographs of fireworks they happen instantaneously at a moment's notice so you cannot photograph fireworks with a 10-sec selfie timer and the only possibility is remote shutter release if you don't want to upset the balance of a tripod
Taking selfies in a more professional way than holding the camera at the end of a selfie stick or facing a mirror

There may be also some benefit in transferring the pictures wirelessly without having to remove the card from the camera.
I wouldn't buy a professional DSLR / mirrorless camera without Wi-Fi and the possibility to remotely trigger it from a smartphone. Some other remote trigger than smartphone could be a possibility, but they are just ... old-fashioned.
But if your daughter isn't planning to use a tripod, then the Wi-Fi could be something she doesn't need. I see Wi-Fi and tripod heavily related: you need both or neither.
Comment: I'd rather have Bluetooth for all those functions. Mine has WiFi & every time I breathe [take out battery or card, walk too far away with my phone, or if either of them falls asleep etc etc], it decides it's going to shut off & make me run the 'pairing' [not really pairing on wifi, but the connection to the hotspot, my phone] over again. it's borderline "more trouble than it's worth" & I'll hard-wire over USB if I can.
Comment: There are plenty of ways to trigger a camera remotely without using wifi. Infrared remotes, radio remotes using the shutter release port, or good old fashioned wired cable releases. All have advantages over using wifi for such a basic function.
Comment: Transferring photos via wifi is limited by either bandwidth and/or battery life. Most cameras with wifi won't even let you attempt to transfer raw image files via wifi, it's jpeg only, and that still eats the camera's battery very quickly.
Comment: I have Wi-Fi on my camera, and it's great for quickly copying photos to my phone to post on Facebook while traveling and similar, and for remote selfie type shooting, but for anything involving real distance, I use a dedicated remote, because Wi-Fi just doesn't have the range.  (Bluetooth?  Fuhgeddaboudit.)
Comment: Wifi is a nice-to-have feature. Unlike external triggers it doesn't need a separate device (which you may have left at home), it may support live view unlike IR triggers, and change settings without touching the camera. Though I used it mostly for group shots (with myself on the picture too) or to directly upload selected photos during events.
Comment: @Tetsujin What cameras use bluetooth for data transfer (or even control) rather than just using it to set up a wifi connection?
Comment: My EOS RP certainly uses it mainly to set up the wifi connection.
Comment: idk, I don't own one. I have the D5500 which is WiFi only, apparently they put Bluetooth in the 5600 too. Bluetooth is going to remain active whereas WiFi powers off; one can be used to wake the other with a handshake, making it 10 times more useful than WiFi alone.
Answer: The answer, as usual, is that it depends. In fact, it depends on multiple factors: what does the camera support doing over wifi? And what kind of situations will your daughter use the camera in?
On the first point: some cameras only support downloading photos over wifi. Some support remote triggering (i.e. using an app on your phone or computer to tell it when to take a photo) and maybe also controlling basic parameters without needing to use the buttons on the camera. And some have very advanced controls, allowing you to see a live stream from the camera's sensor, choose where to focus, etc.
On the second point: suppose that the camera only supports downloading photos. Whether or not this is useful depends greatly. I have a Nikon D5300 with built-in wifi, and 95% of the time I prefer to eject the SD card from the camera to copy the photos onto my computer. The rare occasions that I use the wifi to download photos are when I'm travelling: my main subject is wildlife, and after a day hiking and shooting I'll have between 500 and 1000 photos. Downloading previews to my tablet allows me to use the evenings or the journey home to makes notes of the best photos so that when I transfer them to my computer at home I already know which ones I want to post-process and upload.
If your daughter is a social media user, she may want to transfer the photos to her phone and upload them as soon as she takes them. I don't have personal experience with that use case, but I understand that it's generally frustrating: most phones don't have great support for simultaneously operating a wifi connection with no access to the Internet and an Internet connection over the mobile phone network. Unless the camera has direct support for uploading to social media (which would require the wifi connection to be from the camera to the phone – I don't know whether any cameras on the market support this), it's probably not worth spending much money to enable this specific use case.
Comment: connecting to non-internet wifi and simultaneously using mobile internet is no longer a problem since about 2012, at least on iphone. for me the ease of transfering photos to smartphone is the main advantage of having the wifi-enabled camera, mostly because the other alternatives (usb cable connection or a card reader) are particularly cumbersome on a phone (and try doing it while only having one free hand on the go)
Answer: I found wifi on camera useful for me for these applications:

Sharing photos to social networks right after taking. It's like sharing photos from smartphone, but from diffirent lens, and i do not want long process of copyng photos at desktop computer at night.
Use wifi as remote trigger for book photocopyng.
Answer: Wi-Fi isn't exactly an essential feature, but there's a number of uses for it:

If you're taking pictures to post them on Instagram or other social media, Wi-Fi allows the camera to transmit pictures to your phone as you shoot. This eliminates the need to physically connect the camera or memory card to your phone or laptop to transfer files, which can be cumbersome or impossible to do in the field. Likewise, Wi-Fi functionality allows you to easily download photos to your phone after the fact.
The camera can transmit a live-view feed to the phone, and you can use your phone to control it. This can come in handy if you need to put the camera in a particular location and you need to take pictures from a different position.
Some Wi-Fi-enabled cameras, such as those made by Panasonic, can even connect to and send pictures to an SMB (network) shared folder, whether on a Wi-Fi network or directly to a computer. This can be useful in a studio or on location when you want to be able to edit photos immediately after shooting. However, it can take some technical expertise to set up, especially if you want to send directly to a PC away from a Wi-Fi network; you might to look at my blog post on how to do this.
Answer: WiFi on a dedicated camera is not useful.

It's glitchy.
It's slow.
There's no web browser.
It disconnects your phone from the internet.
It's an additional drain on battery, which decreases the number of photos that can be captured.

I tried it once with my main camera.  Too unreliable and slow to be useful as a remote control or trigger.  The range is limited compared with normal WiFi, and it takes too long to connect. People get fidgety and start leaving when the wait is too long.
I used it a few times on another camera because it's the only way to apply firmware updates.  It obviously wasn't well thought out because it's impossible to download the update on the phone via WiFi while the camera is connected.  I ended up using my data plan.  It failed multiple times and didn't save the downloaded files, so I burned through lots of data to get it to work.
WiFi on a phone with a built-in camera is useful for browsing photography related websites, such as this one, not for anything directly related to the camera itself.
Comment: I think your point about a web browser is a bit besides the point. WiFi is usually used in regards to the operation of the camera, but a web browser is more about turning the camera into a device that can be used to browse the web, which I think has never been the use case for WiFi enabled cameras.
Answer: I use the WiFi connection on my camera for remote shooting, for transferring images to my phone when I'm not near my laptop or want to send them instantly, or for uploading them from camera directly to Flickr (in the case I have just a few images that I want to directly post, and continue shooting, without taking out the card).
Remote shooting has some limitations, with my camera at least -- you have to set shooting mode in advance, this cannot be done from the Canon Connect app. Zooming has to be done from the camera, not from the app.
It's still useful.
I don't know how serious your daughter is / will be about photography. It might well be, that for her the ability to upload will be the most useful, or that connecting the camera to the phone will be just too much of a hassle. Depends of on the camera.
So research the options.
Answer: The usefulness of WiFi in a camera is mostly a question of what your requirements are.
As already mentioned, some use it for remote shooting, where you can use a smartphone/tablet to control the camera and/or see on the screen what you would usually see on the camera screen. For me, this is not really necessary, but nice to have.
Another feature you will usually find, is the ability to transfer files from the camera to e.g. smartphone/tablet. This I find far more useful, if I want to post a picture straight away, instead of having to go through my usual workflow on my PC. I can simply transfer to my iPad, do light editing there and then post to social media.
This is really convenient, but it could be done with an SD card reader that can be attached to your smartphone as well.
Still, nothing beats a SD card reader attached to a PC.
Answer: For some folks wi-fi is a gimmick. For others, an indispensible feature. It depends on whether you need to use it or not. But a few functions that wi-fi capability in a camera are useful for are:

Remote shooting with visibility from the camera sensor.  Most wi-fi enabled cameras can be used with a smartphone (or tablet) app as a wireless remote. The app will give access to focusing the camera, adjusting exposure settings, and taking the shot. This can eliminate the need for a cable remote or 3rd-party wireless remote.
Geo-tagging photos.  The phone's GPS location data can be sent to the camera and embedded in image file EXIF.
Transferring photos between the camera and a phone or computer, making camera photos accessible for posting on social media, email, or texting. Wi-fi, though, is much slower than a card reader and RAW files may not be useful on a phone. However, if you shoot RAW+JPEG, and, say, use smaller JPEGS, you can have the best of both worlds: small fast JPEG for now on the phone; RAW for later on the desktop box.
Wireless printing directly from the camera. I often use my Fuji X100T's playback menus to shoot a fast little print to my Instax SP-2 in social or street shooting situations, so I can hand off mini polaroid as an icebreaker.  I keep the big RAW file for later on the computer and making big prints with my Canon Pro-100.

But whether this is useless, must-have or something in between really does depend on the individual user's needs.
Answer: Christmas is over, but my answer might be useful for similar situations.
As many said before: it depends.
Try to figure out her desires and needs. As her mother you probably already know about them.
If the daughter is a child, then she might prefer to just shoot and share pics. Instead of a camera consider a smartphone with a sufficient on-board camera. It usually has WiFi included.
If she likes to do more with photography: as first camera a compact camera or a smartphone are the best way as interests still evolve.
If she is more serious about photography and has already gone her first steps, then she probably has some needed features and/or cameras in mind. The best support here would be financial.

How useful is wifi on a camera?


When to refrigerate bottled sauces?

Question: When the bottle doesn't say, how does one know when to refrigerate sauces?
For example: soy sauce, fish sauce, etc.
Answer: I usually assume that if the bottle doesn't specify (and you bought it off a shelf, not out of a refrigerated area), then it's safe to store in the cupboard.  You can also ask at the store if you want to be sure, though I suspect unless it's a small, specialty store with knowledgeable personnel, they will err on the side of caution and just tell you to refrigerate it.
For your specific examples: Soy sauce is definitely fine to store in the cupboard, though some brands will recommend refrigeration for "best quality".  Fish sauce I'd usually store in the fridge once opened.
Answer: funny -- until you mentioned this, i never realized my own hypocrisy: i store soy sauce in the fridge, but fish sauce in the cupboard. i now realize that i should probably choose a side and stick with it, haha. both are so high in salt, it's probably fine to store them in the cupboard, but it certainly wouldn't hurt them to keep them in the fridge.
Comment: funny2 - I always put ketchup in the fridge, but always put soy sauce in the cupboard - never thought of this!

When to refrigerate bottled sauces?


Database modeling question - different data required deppending on the user type

Question: What's the best database model to use for an user registration process that deppending on the user's type selected, some fields will be required or not.
Example:
User Type A requires: Name, Email, Birth date and Gender
User Type B requires: Company Name, Contact Person, Email, N. employees
I think the most commom is to create a table with all these fields and make them allow NULL.
What would you guys suggest?
Answer: You could create a base "User" table that holds any common fields, and other tables that hang off User with a FK to the base User.ID.  If there are no common fields, it might make sense to just have different tables, rather than one table with a bunch of nullable fields.
Answer: For consistency it is better to have one "main table" for users, in which the only field will be some unique user identifier that is common to users of both types (E.g., an ID, SSN or whatever).
It is then up to you how to represent the specialization.
One option is to have a second field in that table representing the type, and then two more tables with details, one for each type. When you query, you'll ensure that you are only looking in the TYPE_A table for details of a user if that user has a type of A.
A second option is to not have that field, and count on the fact that there is a record in a specific table to represent the type, but that is fairly risky.
Answer: I've previously done the same thing. As long as you store the customer type then it's not difficult to get the correct details.
You may consider 2 tables and use views to union them if there is going to be one table that is much larger than the other, although an index on the customer type will do much the same thing. By 'much the same ting' i mean make data of one type quick to access.
The nice thing about putting all the data in one table is you don't have to do any joins to get to the data, which helps with the speed of the query and ease of writing.


Principle of Least Action

Question: Is the principle of least action actually a principle of least action or just one of stationary action? I think I read in Landau/Lifschitz that there are some examples where the action of an actual physical example is not minimal but only stationary. Does anybody of know such a physical example?
Comment: It is a principle of stationary action. Perhaps more excitingly, it can also be thought of as a principle of XTREME ACTION!
Comment: Classically, one may always change the overall sign of the action without affecting the Euler-Lagrange eqs., thereby turning a local minimum into a local maximum. The Lagrangian $L(q)=\cos(q)$ has both local minimums and local maximums.
Comment: @wsc That's not really true. Sometimes the classical trajectory corresponds to a saddle point of the action, so the action is stationary but not XTREMEized.
Comment: thank you for your affirmation. still, i would be highly interested in seeing an example that actually shows that it is not in general a principle of least action
Comment: In General Relativity I think that it's a maximum.
Comment: But what we are considering is the action, not Lagrangian.
Answer: By convention we try to set things up so that it's usually a minimum, but we can't make any definition of the action that would make that hold in all cases.
In optics, consider a situation in two dimensions where you have an ellipsoidal cavity with reflecting walls. If you release a ray of light from the center, along the major axis, it gets reflected back to the center by following a path of maximum time. If you start a ray from the center, along the minor axis, it comes back after following a path of minimum time. You can choose the action to be the time or minus the time, but no matter what, one of these rays will be a minimum of the action and the other will be a maximum.
In special relativity, you can take the action for a particle to be the proper time $s=\int ds$ (with $ds$ positive), or you can take it to be $-s$ or other possibilities such as $-mcs$ (Landau and Lifschitz's choice). It doesn't matter which sign you choose, because the physical predictions are the same either way.
In both of these examples (optics and SR), you can make a choice of sign such that the action is minimized for infinitesimally short trajectories in free space. However, the example of the ellipsoidal cavity shows that you cannot in general make it a minimum for all paths of finite length.
In relativity, the metric only defines $ds$ in absolute value, $ds^2=g_{ab}dx^a dx^b$. Also, we'd like to be able to talk about timelike, lightlike, and spacelike geodesics. If we choose the action for timelike geodesics to be real, then it has to be imaginary for spacelike ones -- or we could define it as $\int\sqrt{|ds^2|}$, but the absolute value could be a nuisance because it isn't a smooth function.
For L&L's discussion of this, see Mechanics (3rd ed.), section 2; and Classical theory of fields (2nd ed.), sections 8, 53, and 87.
Comment: More to the point, a *single* classical trajectory is sometimes a saddle point of the action, so it isn't a local extremum at all.

Principle of Least Action


Macbook pro 2016 0% battery 350 cycles

Question: today my mac didnt turn on, i plugged în and turned on then i saw 0% battery. Why? At only 350 cycles and 2 years.
Comment: Just charge it! The design capacity looks ok.
Comment: @lhf the design capacity is what the label says, not what current degradation state is
Answer: The battery status of Poor indicates that something isn't lining up in how the measurement circuit sees the voltage profile change.
The mAh are all estimates / derived / statistical numbers and the only thing the system can really measure directly are voltage - current in - current out and estimated wattage of the CPU. When those 4 values are not aligned or our of what the "model" predicts - you get a Poor / Check Battery / Replace Battery status.
If I didn't see the "poor" I would say you probably are fine. Also, if you get no charge when there should be charge - examine the pins and cords and cables that are external and then seek service. Make sure you have a great backup in case you can't turn on the Mac again. Also, once you're backed up, you might reset the SMC one time (or once every 3 months) if you haven't recently. The SMC measures and integrates the voltage / time measurements to derive the mAh so it can get stuck and need a restart on occasion or when you see something amiss like you see now.
If none of these work, there's a hardware failure that could be a cable disconnected or a part or two that need to be swapped.
Comment: I have no charge and i reseted The SMC
Comment: @AndreiPenică That leaves hardware repair - reconnecting things internally I'm afraid. I've added that as the last step in my triage for this issue.
Answer: There is probably a dead cell / pack that disables the battery. Since it's a balanced setup you are going to have to replace it. Be sure to check the case for swelling

Macbook pro 2016 0% battery 350 cycles


Coffee with colors?

Question: I've heard some types of coffee have blue color (after brewing), does anyone know the name of it? Also is there any coffee that have color other than brown?
Answer: As the best of my knowledge, no.
There is a bean variety named Jamaican Blue Mountain. Maybe its name could make people misunderstood... Nothing that is blue I've heard of.
Other than that, not the regular coffee as we know it, but some of its variations may have different colors.

Green coffee: This is the coffee brewed from the unroasted coffee beans. This looks pale yellowish/green. Its taste is more close to tea than coffee.

You may check the green-coffee tag on Coffee SE for further information on that.

Coffee cherry tea (aka Cascara or Sultana in Bolivia): This is the tea made from the dried coffee cherries. Its color is pale red when brewed. It tastes like raisins or raspberries.

A previous discussion on this is made in What does a coffee cherry taste like? question on Coffee SE.
Also, the Wikipedia entry may be helpful.
Answer: I've heard of white espresso before.It's basically any bean that is severely under roasted.Just long enough to take out some of the grass and bitter notes.
It's not actually white though, it looks more pale and kinda greenish to me.

Coffee with colors?


Different appliances for a kitchen in stainless

Question: I am redoing my kitchen and looking for the best reviews of the various appliances. If I get them all in stainless, but from different manufacturers, will they match? Or do different companies have different stainless finishes that could clash?
Answer: Different companies and even lines within companies use various grades and finishes of stainless. There aren't so many that you can't get pretty good matches. A lot of appliances these days are white label and will actually be the same unit with different bezels. That is particularly true with front-load washers but is seen across the appliance industry.


Do primer + paint products work well?

Question: Are primer + paint products as effective as using separate primer and paint
Answer: I was quite skeptical about the paint and primer combo's, but Valspar gave me a couple of gals to try out.  I was surprised how well it covered over dark colors.  The down side was that it is not as smooth as regular premium grade paints. It seemed a bit dry going on, but that is because it is very high in clay content.  I decided the best combo was to use it for the first coat and then use regular paint treated with Flowtrol for my finish coat.  The application that I would never use it on is covering new drywall. I still prefer quick drying PVA drywall sealer. The paint/primer combo is too heavy and stays wet too long for new drywall, and is about twice the price of PVA primer.
Comment: Thank You again, shirlock homes (great name).  I read your bio and it explains how you have so much knowledge.  I like straight, easy, logical answers.

Do primer + paint products work well?


2000 Pontiac Grand Prix Idles at a higher temp than normal

Question: I've just changed my oil and originally put diesel oil into my 2000 Pontiac Grand Prix accidentally, but removed it before ever turning it on and put the correct oil in. Now 1000 miles later, it sits at a higher temp than normal but only when idling or driving rather slow. It smells like burning oil sometimes, but it's not low or anything. I don't know what's going on.
Comment: are the electric cooling fans(s) working? (I suppose that car has two?). They are thermostatically controlled and at least one should certainly be coming on if you are getting warm at idle.
Answer: Slight overtemp corrected by moving the vehicle suggests to me that your cooling system is not operating properly and that it needs the extra cooling coming from moving air. Inspect the following:

coolant level: extreme low coolant can introduce air into the system and compromise cooling.
radiator cap: the cooling system needs to be pressurized in order to prevent the coolant from boiling. Rad caps are about $10, test yours, you may want to replace it if it's suspect. Only remove it when the engine is cool, otherwise the whole works may literally blow up in your face.
thermostat: these wear out, but are usually inexpensive and easy to replace. You will need to drain the coolant to have access, so you may as well do this in conjunction with something else that requires draining the coolant anyways.
water pump: this moves the coolant around the system. With the engine off, make sure the belt is tight and that there is no coolant splashed onto nearby parts. A leaky water pump needs to be replaced. This is one of those things that needs the coolant drained for access.
radiator flow: with age, the cooling system accumulates all kinds of crud and internal deposits, especially vehicles using DEX-COOL (as I believe yours is). Crud and deposits will restrict coolant flow, and that will restrict cooling. Drain your coolant, fill-up the system with a cleaning product that removes calcium deposits, lime and rust, and run the engine to temperature. Once the engine is at temperature, turn on the heater set to max heat and keep running the engine for a few minutes. Then drain the system again and fill it up with new coolant.


Solspace-Rating Spam

Question: I've implemented the solspce-ratings plugin on a client website and have enabled the captcha, but am still getting spammed.
Any ideas on what else I can do to avoid getting spam ratings ?
Answer: The best way to beat form spam for EE imho is to use http://devot-ee.com/add-ons/accessible-captcha, which turns captcha into a much better working q&a. This has solved all automated spam for me.
Answer: I am using the add-on Snaptcha, 14 US$. The user has to type nothing, it uses the honeypot-principle and generates a invisible field; spambots trying to fill out this field are blocked.
It blocks literally 100-thousands of spam-attempts on my site, every some weeks one gets through. I could highly recommend this one.

Solspace-Rating Spam


Do newly hired professors have to take a drug test before they start?

Question: In U.S., Canadian and European universities do new professors have to pass a drug test before starting their career?  Or is it only required when they are promoted to full-time tenure professors?
Comment: Every country is different. Every university is different.
Comment: Voting to close because this question is attracting a lot of junk, in particular the apology of psychotropic drugs use which is not what this website should be archiving in my opinion.
Comment: @CapeCode voting to reopen because there are good answers.  Vote down the junk, not the question.  The answers effectively cover the breadth of the question, and also some interesting details.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/43178/discussion-on-question-by-user58623-do-newly-hired-professors-have-to-take-a-dru).
Answer: Is this a serious question? I would refuse to work anywhere where my employer would require me to do such a test. It is simply none of their business.
I am actually not aware of any (European) university that would require anyone to take a drug test. In fact, it would be illegal in many countries to do this (or at least, there are very strict rules about the circumstances in which it would be legal).
Comment: This is absolutely a serious question.  For many types of jobs, in many parts of the world, drug testing is nearly universal, or even *required* by law.  Not everyone's willing to starve for the sake of high moral principles like you are. It so happens that this doesn't apply to *academic* jobs anywhere I know, but how is someone to know that unless they ask?
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/43214/discussion-on-answer-by-damian-do-newly-hired-professors-have-to-take-a-drug-tes).
Answer: In Germany you will be subjected to a medical examination if you become a civil servant. Full professors (W3) are typically civil servants. The levels below that (W1 and W2), are typically also civil servants, though not permanent and the examination tends to be a bit easier. Post-docs (TVL 13 or 14) are typically "normal" employees, and those are not subjected to the examination.
I believe that it is in principle possible to refuse the civil servant status and become a professor as a normal employee, and thus avoid the medical examination. However, I don't know of anyone who has done so voluntarily as the financial benefits of civil servant status are substantial (job security, lower tax rate, better pension).
Comment: Does the medical exam include drug testing?
Comment: @MaartenBuis the urine sample is probably for sugar/protein in urine, not for drug testing.
Comment: It involved a urine sample...
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/43213/discussion-on-answer-by-maarten-buis-do-newly-hired-professors-have-to-take-a-dr).
Answer: While drug testing is very common in the USA, this is not the case world wide. In the UK it is rare. The uk government advises

Employers should:

limit testing to employees that need to be tested
ensure the tests are
random
not single out particular employees for testing unless this is
justified by the nature of their jobs

Workers can't be made to take a
drugs test but if they refuse when the employer has good grounds for
testing, they may face disciplinary action.

Part of the difference is that trade union membership is much higher in Europe, particularly in white collar jobs, such as teaching.
The Trade Union congress notes that it drug tests are rare in the uk, outside of transport and energy generation.
It further notes that in many European countries, pre-employment testing is not allowed, however in the UK the law is less clear. Employment tribunals have established that possession of drugs outside the workplace cannot in itself be grounds for dismissal. There must be evidence of impairment.
This implies that a university lecturer would not be asked to provide a sample for drug testing prior to employment, nor during employment nor prior to gaining promotion, since a univiersity would not be able to convince an employment tribunal that such testing is needed.
Comment: In Australia, the case is similar. Drug testing by employers would usually be legal only if there is a clear health and safety case, and is, as far as I know, unheard of in academia: http://workplaceinfo.com.au/resources/employment-topics-a-z/alcohol-and-drug-testing
Answer: I did some web searching.  I found cases in the US where primary and secondary teachers were subject to pre-emplyment drug tests.  I found cases in the US where student employees at a university were subject to drug tests.  I found cases in the US where those in "high risk" jobs at a university were subject to tests.  But I did not find blanket drug tests for prospective university faculty.
Comment: @MassimoOrtolano Oh, thanks.  I was thinking positions which have a high-risk of drug use, and then I thought, teaching freshman calculus engenders a strong desire for mood alteration, but it can't be that...
Comment: @MassimoOrtolano in the US "high risk" jobs/jobs requiring drug testing are  jobs that require a commercial drivers license. The US department of transportation requires drug testing for CDL jobs.
Comment: While likely an outlier, faculty positions at [USUHS](https://www.usuhs.edu) are usually (possibly always) classified as test designated positions. It wouldn't surprise me if the same policies applied to the US military academis.
Comment: @Kimball High risk jobs are typically jobs where you have to manipulate hazardous materials, operate machinery etc. Every job where you can cause damage to people if you are in an altered state.
Comment: What are "high risk" jobs?
Answer: For the N=1 data point of a newly hired assistant professor at a U.S. state university: Nope.
Comment: @DavidRicherby Technically, a single negative data point is an answer of "No" to the question, as it is implicitly asking about a universal policy.
Comment: @DavidRicherby To use your example, the question is more like "Do Americans have to eat pizza, or do they only eat it if they move to Canada?". The *have* is an important word in the OP, and one where a counter example is perfectly valid.
Comment: -1 This is a Stack Exchance site, not a survey.
Comment: Such questions are usually taken as asking if something is usually true, not universally. For example, if I asked you "Do Americans eat pizza?" are you seriously saying that your answer would be "No", on grounds that there is at least one American (say, a new-born baby) who does not?
Comment: @DavidRicherby The way the question is worded clearly makes it sound like the OP thinks it's a job requirement (see also the "or" part of his question).
Answer: The City Colleges of Chicago are one of the largest community college in the US and they require a drug test for new employees including professors or adjunct, so I think it's not that uncommon in the States.
Comment: On the other hand, the actual largest community colleges of CUNY in New York do not require that.
Answer: You ask a very broad question covering the US, Canada and Europe. I (obviously) don't know the law and practices in each and every country but note that drug tests are extremely uncommon and widely considered unacceptable in most of Europe (cf. Damian's answer, which seemed unrealistic to many US commenters but shows how this sounds to European ears).
To give you an idea of the way this is perceived, the European Court of Human Rights heard several cases pertaining to drug testing at work. It did allow some in the end but only in very limited cases (think a ship's captain who is suspected by his employer of putting many lives in danger, not routine screening prior to employment). Very often, a test would be performed when an employee holding a job with particular security implications already seems to be intoxicated and the employer needs some hard evidence to initiate disciplinary action (and, again, not for prospective employees).
Answer: Another data point: In Finland, I think there is a drug test for persons managing research-purpose drugs, who are sometimes also professors. So the answer could be yes for some particular positions. Though, I am not sure if this practice is shared by all Finnish universities.
Comment: This is clearly an edge case, and does not tell you much about the average professorial post.
Answer: In the academical sphere, I never heard any similar. I know only Middle Europe, but multiple countries there.
Its reason isn't that the Profs here would be addict, but its exact opposite: it is unthinkable on such a level, that nobody thinks it would be needed.
The wider context:
The long-term mental harms of drugs would make you probably ineligible to fulfill a full-time academical job.
Most of the drugs have a time until they are emptied from your body. You can google for that on the net. After that, the test will be negative. But it would be much better if you wouldn't need such tricks, i.e. you could simply pass the test without any problem.
Employers often have similar traditions, for example they can wish some papers from the police that you aren't an offender.
Considering things like these are in our cultural circles nearly unheard, it is really no more as a tradition. Maybe it could serve as a little positive psychological effect to show for everybody, that your university/company is perfectly "pure". Although knowing, that everybody laughs on this little ritual behind your back, can cause maybe more harm.
I suggest don't play the idealist liberal, allow them this show. They need it for the feeling that they are "clean", it doesn't cost for you anything, and they are your employer. There is no real reason to reject the test.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/43211/discussion-on-answer-by-peterh-do-newly-hired-professors-have-to-take-a-drug-tes).


How to manage a project with no existing structure?

Question: I have been asked to takeover managing a project that has no structure in place; the only documentation is the initial brief, contract and a broad schedule including a product layout. The owner of the project has now left and there was no handover. The project is still viable and the team have been working on the project ad-hoc, where should I focus   for the remainder of the project?
Comment: How does this situation differ from just "managing a project"?
Comment: @yegor256 : At least, there is already a bunch of work done, with unknown results, since there is no documentation available.
Answer: My first piece of advice is to resist any temptation to implement a formal structure just to make everything look official. Start by evaluating the health of the project; determine what has been working well, and what has not, if anything.
To answer your question of where to focus: focus on what is working well and keep those things the same. Make sure you are comfortable with whatever status update tools are in place, and if there are none, start there. If the project is going well, don't rock the boat by introducing a new set of rules.
If there are a bunch of things that are not working well, take a pragmatic approach to implementing tools to address those needs. Are there unaddressed risks? Create a Risk Register. Is there a lack of communication? Develop a communication plan. Are there unclear expectations of the project team? You get the idea...
Good luck!
Answer:
Meet with the client / the person you're doing the project for
Find out and confirm what they are expecting and what they want done
See if that is doable or not
Get back to them and let them know what you found out in terms of feasibility (of scope, schedule and budget).
Iterate until you come to a realistic plan (this process will also allow you to build a relationship with them)
If feasible, execute. If not, stop the project.
Comment: @Laura, Like Mark Philips I believe that the first thing you absolutely need is a sense of direction. Where are you heading? You must at least know a basic set of requirements, whether this can be done and does the sponsor support it fully in the way that you understand it?
Answer: You don't say how much longer the project will continue, the scope or what happens after the project ends...making a response a little difficult.  If the project is delivering as 'expected' (based on some upper managers perception since there's nothing documented to gauge it against), focus on the post-live hand over.  Help with communication in anyway possible (without interfering with existing communication lines), keep your eyes/ears open for any rough areas/risk points that you can apply your time to...and help QA as much as possible (end of an un-managed project often delivers interesting results)
Comment: Good point.  If this project is a week from delivery, it is a different story!
Comment: Thank you for your answers, i will endeavour to include more information in future posts.
Answer: Since there was no official hand off from PM to PM, you're in a position where you're going to have to go through the hand off procedure with one or more team members on the project.
There's a strong likelihood that some of the team members know more about the direction of the project than you do.  Initially, you're going to need to meet with these team members more often than you normally would.
Just like switching any resource in the middle of a project, switching project managers will cause delays as well.  Make sure the change is communicated to everyone you'll be working with.  Introduce yourself and clarify that you're in the process of picking up where the old PM left off.  Let people know you're interested to hear their opinion on the project.
Ask questions about where the previous project manager was going with the project.  What goals did he/she set?  What was the plan for the next 3 months?  What are the major problems on the project?  What blockers are impeding progress?  Ask their recommendations.
First and foremost, document everything.  Documentation will help you make notes in your own words.  This will not only serve as a reference to you, but the act of documenting things will actually help you commit things to memory and facilitate a greater understanding of the project.
At this point in time, the single, worst thing you can do is start blindly, arbitrarily implementing changes.  Your job right now is to observe, ask questions, and learn as much as you can about the project so that you make educated decisions in the near future.
Answer: I would say take your time before you come to conclusions. No documentation and no structure are not the same thing. Most managers often tend to mix up the two when in reality most experienced development teams tend to have their own silent structures which are not evidently visible when seen from the outside.
I would have to agree with Criag that trying to put too much structure too soon often creates more problems than it solves. See what is working and do it more often.  One advice I can give you is spending a lot of time playing with the actual product or application and understands it's functionality inside out. Use verbal communication and quick one on one questions instead of calling meetings. Maybe even start filing a couple of bugs along the way if you bump into bugs.
There are multiple benefits to this.
One is you can focus on the project by being hands on and without intruding into the time and space of others in the team who might already be busy.
Plus, that way you get to work on the application, know it inside out.
Not just that you get to know and work with the development team directly. If they are any good and if the project has survived thus far, chances are that they are using some sort of a structure (Test Driven Development, Unit Test Cases etc.) already. It just isn't evident or visible to you. Working with the team will allow you to get to know them, know what existing development methodology they are using and what their skill levels are.  Maybe they are talented programmers who are getting away by using a very light weight process and trying to rush in to add more management structure might add more problems than it might solve.
After spending some time being involved with the project hands on you might be in a much better position to take better decisions on the kind of changes that might benefit the project rather than rushing in and trying to make changes to the structure and workflow of how work is getting done. Then start making very small incremental changes, one step at a time.
On the client side, focus on constant communication and see if they are happy with the current output that they are getting. Again, if they are happy, I don't see any reason to rush in and make radical changes to the overall process. If they aren't happy, it would boil down to addressing one concern at a time. Very simply, avoid big bang changes on either side if possible.
Answer: Start by trying to capture top-level requirements.  Then do what the other posters suggest.
Answer: Begin by knowing the current status of the project:

Ask the team about the situation, especially what are the current issues which could jeopardize the project
Check with stakeholders to confirm what is to deliver, and if they already saw anything working

Once you got these infos, you have to address the issues you learnt about.


Applying for PhD programs after graduating from a small/unknown college

Question: I have just entered my final year of Undergraduate degree in Computer Science and engineering from a rather unknown/not-popular college in India and I want to get admittance in a PhD program in Computer Science. I'm thinking of applying for colleges in the USA and I'm worried that graduating from an unknown college will affect how universities will perceive my application and I regret my decision of joining this college in the first place. I still have one year before I apply. I want to know what I need to do to maximize my chances of admission. And any general suggestions you'd give for a fourth year student who is looking to get into research programs.
Comment: Have previous students from your institution gone to PhD programs in the US? Talk to their advisors (or the students themselves).
Comment: Most of the students who have gone to US have gone to do their Masters (MS programs) and not PhD. There were a few students who have persued PhD but all of them tend to do it India. So I don't have many people in my contacts to ask about what to do
Answer: Things may not be as bad as you fear. I was in a similar situation long ago. One advantage you have is that, at a small place, you probably have good access to your professors and they know your work pretty well.
First, check to see what connections your own professors have to other schools. These could be places that they went to school, or personal contacts at conferences or co-authors of papers. Enlist the help of your profs in promoting your candidacy.
Second, find out if other students from your current place have gone to universities you would find interesting. Find out how they did. If someone before you has set a good example at another university it can work in your favor.
Failing that, write application materials stressing heavily what you can do, mostly by stressing what you have done. Ask your professors to analyze these to see how your projects and performance will be perceived.
And since you have a bit of time, do what you can to do interesting things that others might find impressive.
In general, though, the reputation of your current institution is only one thing among many that will be used in the selection process. I doubt that very many places sort candidates first by the prestige of the applicants undergraduate university.


Mobile tethering [Internal implementation]

Question: I use mobile tethering sometime from remote. Recently, I had some strange behaviour.
For my older connection when I used to get IPv4 from the operator, on tethering, all the connected devices had a local IP. However, the global IP remained same for the devices.
With my new network operator, I am given IPv6 and here is a twist. All the devices have a different global presence. Does this mean, with tethering on IPv6 connection, LAN concepts are removed?
If yes, how can we create LAN with IPv6 connection?
I no, why am I getting a different global presence inspite of tethering?
I am using OnePlus 3T.
Answer: That's just how IPv6 works. Every device gets a unique global address by design.


"I think ..." or "In my opinion..." or "From my point of view..."

Question: If I want to express my opinion about something, what's the most correct form? What are the differences? What is more formal and what more colloquial? For example, in Italian, nobody says In my opinion..., but My opinion is...
Comment: The formal version is *"In the opinion of the author"*, since it's still common in formal writing to avoid personal pronouns completely. Outside of that, I would say that *"From my point of view"* is the least formal way of phrasing things. I think a more formal version, if you're going to use a pronoun at all, is to simply say *"I believe..."*.
Comment: I'm not sure it's that common... I haven't encountered a professional or academic style guide in years that promotes such circumlocution, they mostly prefer active, concise language these days.
Answer: As FumbleFingers commented, none of I think … or In my opinion… or From my point of view… is as formal as In the opinion of the author.  That aside, I think you have them listed in very-slightly-increasing order of formality.
More important than any differences in formality are differences in nuance and meaning.  I think … may be seen as lighter-weight, more off-the-cuff, than In my opinion…, while From my point of view… may be seen as introducing a personal viewpoint or preference, possibly less objective than for either of the other phrases.
If you seek less formal expressions, consider It seems to me …, It appears that …, Apparently, …, Evidently, …, It sure looks like ….
But of course for formal phrasing, rather than I think plus a conclusion, instead give a supporting argument or reason, followed by the word hence, followed by a conclusion.
Answer: All three are normal English constructions. Of the three, I think is probably the least formal.
Answer: "In the opinion of the author"?
This isn't formal writing. It's presumptuous writing. If a document needs a level of formality that avoids personal pronouns, then it probably also doesn't permit personal opinions. Personal pronouns are completely acceptable in formal writing. See any professional journal. Even doctoral dissertations allow personal pronouns.
Now, to your question. Each of these is acceptable, and each of these should be avoided.
I would avoid "I think" because it is a weak expression. It allows the reader to disregard your ideas completely. "In my opinion" is slightly better if you have sufficient credibility in the subject that your opinion matters.
All of these expressions tell the reader "I might be wrong, but here is my idea." All of them should be avoided as a form of hedging. See the article "In my opinion, I think that I believe this is bad writing." http://preciseedit.wordpress.com/2009/06/19/in-my-opinion-i-think-that-i-believe-this-is-bad-writing/
If you have a good reason for your idea, simply state your idea. If you're not sure about your idea, attribute it to someone else.
Comment: Without hedging, much communication would be impossible. It's a normal part of both formal and informal discourse.


How to find the PHP version that is used by the latest `phpdoc/phpdoc` docker image?

Question: How do I get php version used by docker image phpdoc/phpdoc?
Answer: The Dockerfile provided in the Q&A indicates that the image uses the latest php:7 as a base image. One could inspect the version as follows:
docker run -it php:7 php -v

Result
PHP 7.3.11 (cli) (built: Oct 25 2019 02:24:51) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies

How to use an older version of php in conjunction with this container?
It is possible to use a specific version by checking the tags of php on dockerhub. According to this list, 7.2.25 is currently the latest 7.2. If one changes the from of the Dockerfile to FROM php:7.2.25 and build the image again, then 7.2.25 instead 7.3.11 will be used inside the container.
Comment: Therefore the image phpdoc/phpdoc use PHP 7.3.11?
I could force you to use another version (e.g. 7.2)?
Or there's some old version of the image phpdoc/phpdoc that uses PHP 7.2?
Comment: But how can I download the Dockerfile related to the phpdoc/phpdoc image?


http password protection causing 'too many redirects'

Question: I have a Wordpress site on a VPS which keeps getting attached on xmlrpc and wp logins. As part of combatting this I password protected the wp-admin directory (via Cpanel 'Directory Privacy') - but when I go to test it I get browsers not loading the page due to 'too many redirects' (Safari and Chrome). As a plan B I've installed a WP plugin to rename the wp-admin address, but logging in to that redirects back to the same login page instead of successfully going to the dashboard, which also seems like a redirection.
Any possible solutions or logs I can look in that might shed some light?
Answer: Password protecting the wp-admin directory is not very helpful because wp-admin redirecting to yourdomain.com/wp-login.php
It is best to use two steps authentication or limit the number of login attempts.
Comment: OK, so its behaving as you'd expect - not an error? Think I;ll go and leave a comment on the website that suggested it! Thanks!
Answer: The "too many redirects" error can happen depending on server settings. The way to fix it is:

Find the .htaccess file in your Wordpress installation (by default it'll be in the document root).
Edit this file, by adding the below line to it:
<code>ErrorDocument 401 default
</code>


What is the Elliptic Curve algorithm used in Ripple to generate public / private key pairs?

Question: The algorithm used by bitcoin to generate keys is secp256k1, is it the same for ripple?
Answer: Yes in ripple-lib the default elliptic curve is set in sjcl-custom/sjcl-secp256k1.js
// Overwrite NIST-P256 with secp256k1 so we're on even footing
sjcl.ecc.curves.c256 = new sjcl.ecc.curve(...)

Then in keypair.js when a new key pair is instantiated its _curve attribute is set to secp256k1.
function KeyPair() {
  this._curve  = sjcl.ecc.curves['c256'];
  this._secret = null;
  this._pubkey = null;
};


Set cookie for visitor

Question: I'm writing a new plugin that will allow visitor to vote. After a visitor rated a post, I'd like to block double voting.
I think the better way to do it is using cookie, but of course I can't insert the code in functions.php or in the theme header.
In my case it's better to set cookie via jquery or php?
Answer: If you are looking for user only comments then you could try this one ( http://codex.wordpress.org/Function_Reference/wp_set_auth_cookie). This function can be replaced via plugins. If plugins do not redefine these functions, then this will be used instead.
Sets the authentication cookies based User ID.
The $remember parameter increases the time that the cookie will be kept. The default the cookie is kept without remembering is two days. When $remember is set, the cookies will be kept for 14 days or two weeks.
but this can only be comment by logged in user.
Also if you are using by cookie then you have to ask the client to store the cookies permission by accepting it. ( http://wordpress.org/plugins/cookie-law-info/faq/ ) according to cookie law.
I think you could do with the IP address blocking as well. There are couple of plugin available where you can take idea how they have implement. for eg : WP-PostRatings ( Adds an AJAX rating system for your WordPress blog's post/page. )
I guess this will help you.

Set cookie for visitor


Divi change project slug based on category

Question: My first help-question here :)
Using Divi theme, i found that Project custom post type let you add your portfolio projects, while having PROJECT slug in the URL.
The web is full of tutorial about changing that slug, but i'd love tu change the project slug with the category of that posted project.
I found this on StackExchange but it didn't work out for me :( Change the url of Projects in Divi Theme
My issue is the same:

I have 2 different project with 2 different categories. Project 1 with Category A, and Project 2 with Category B.
The url, right now, is homepage.com/project/project-1
I'd love to be homepage.com/category-a/project-1 and homepage.com/category-b/project-2

Is it even possible?
Thank you for your time and your help!
Answer: You can use Custom Post Type Permalinks extension. Open breadcrumbs settings and add /%project_category% in Permalink Settings for Custom Post Types. Save. Done. That's how I figured it out.


Why separate lexing and parsing?

Question: It's possible to parse a document using a single pass from a state machine. What is the benefit of having two passes, ie. having a lexer to convert text to tokens, and having a parser to test production rules on those tokens? Why not have a single pass that applies production rules directly to the text?
Comment: Related: http://programmers.stackexchange.com/questions/128888/are-separate-parsing-and-lexing-passes-good-practice-with-parser-combinators
Comment: This has already been discussed on CS,stackexchange, with many very technical comments in an answer to **[Expressive power of lexer + parser](http://cs.stackexchange.com/questions/28858)**. But there may be room there for further answers.
Comment: I wonder if pipeline-style parallelism (albeit highly imbalanced stages) might be a side advantage. Both instruction and data cache behavior might also be interesting. How much (if at all) such would reduce compile time would depend on the specific hardware.
Comment: One fairly obvious (at least to me) reason is that you can then use the scanner tool separately.  In practice, I frequently use flex to scan input, but seldom need the full power of yacc.
Answer: You don't have to separate them. People combine them into scannerless parsers.
The key disadvantage of scannerless parsers appears to be that the resulting grammars are rather complicated -- more complicated than the corresponding combination of a regular expression doing lexing and a context-free grammar doing parsing on the token-stream. In particular, grammars for scannerless parsing tend towards ambiguity. It's easier to remove ambiguity for grammars working on a token-stream.
A pragmatic benefit of using a dedicated upfront lexing phase is that you don't couple the subsequent parser with lexical detail. This is useful during early programming language development, when the lexical and syntactic details are still changing frequently.
Comment: Having one pass instead of two passes involves closure properties.  If
you consider that lexers are transducers belonging to a formal family
$T$, that can be combined with parsers belonging to a formal family
$P$, you must wonder whether composing them stays in the same family
$P$, or requires a more complex formal family $P_T$, thus requiring
different algorithmics, and possibly more difficult tuning of syntax.
Parsing technology often relies on specialized families (such as LR or
LL variants) that may not have the right closure properties.
Comment: If your look-ahead involves reading an identifier, the composition will require unbounded look-ahead, since there is (in principle) no bound on the length of identifiers.
Comment: @babou Yes that is correct. I don't know any formal results of the form regular-expression composed with LL(k) goes out of LL(k), or similar. Moreover, lexing is usually not done with regular languages, but with something more powerful, namely regular languages extended with longest-match and keyword-first priorities. I'm not sure what exact language class that is and what its closure properties are.
Comment: @babou I'm not sure. If the longest keyword is 17 characters long, then any string that is longer must be an identifier, or lexically invalid.
Comment: But you identifier, or possibly a string, number or other literal, is a sequence more than 17 individual symbols, that may stand before the token you actually need. That is a big look-ahead, unbounded. You may end up with a non-deterministic language.
Comment: @babou I'm not sure I understand what you mean. All I wanted to say is that I don't know what the closure properties of the languages we use for lexing and parsing are when we separate those two, indeed I'm not sure exactly what the languages for pure lexing are, since they use priorities. This does not seem to be discussed in compilers or formal languages books.
Comment: Take the following grammar fragment: $\{X\to BAb; X\to CAc; B\to d;
C\to d\}$. Now you can choose the rule for $A$ as reading a single
token $A\to t$, or as reading all individual characters of that token
$A\to a\mid aA$. In the first case you can do the reduction of $d$ to $B$ or
$C$ with a small lookahead, and in the other case you need unbounded
look-ahead, to decide on how it should be parsed. But I agree that the informal character of that technology is an issue ... and I still doubt there is any good reason for it, other than technical ideology.
Comment: I think it would be nice for a modern compiler textbook to have a unified formal treatment that covers lexing with priorities, incremental lexing, the relationship with lexing and parsing etc.

Why separate lexing and parsing?


mymonero.com x number of blocks behind can i use the wallet?

Question: im new to Monero,  I opened a wallet on mymonero.com and ever since it says you are x number of blocks behind and you have to wait until its complete.
my question is can I receive money when it gives me this notification?
Answer: You can still receive Monero for your wallet address. It just doesn't show up until it's fully synced with the blockchain. So as long as you get this message you are not in sync with the blockchain but if someone sends you Monero, that transaction will be on the blockchain. You just need to wait in order to see it there.
Answer: You just need to open up the wallet and wait until the message disappears. For me, I always get that message when logging in, then it disappears within a few minutes. So open up the wallet, maybe navigate to transactions or something like that, and the message will eventually disappear.
Comment: I know it will disappear my question is if someone sends me Monero to my wallet will I receive it?
Answer: If someone sends money to your bank account, you don't have to be standing at an ATM while they send it. They can send it while you're asleep, and you will see it next time you check your balance, even if your local ATM is broken. Monero is the same, except that you can't see your balance while your wallet is lagging — a side effect of the privacy features.
If the person who sent you moneros tells you the Transaction Hash, you can look it up on a blockexplorer, which will confirm the existence of the transaction (but not the amount or the to/from addresses). This works even when your wallet is lagging because moneros are stored on the blockchain, not in wallets. A wallet is just a tool for viewing &/or spending the coins at your address on the blockchain.


Do transfer edges add to the distance cost of a route?

Question: Transfer edges are commonly used in a network dataset to carry a time cost in one direction only (either to-from or from-to). This is fine if the impedance used is time, i.e. find the route that will take the shortest time. However, if the impedance is now set to distance (find the shortest route), will the length of the transfer edges unfairly impact the length of the route?
Answer: How do you mean "unfairly"? The solve will take into account a distance field that you set as an evaluator. You could use Shape_Length for the actual length of the edge, or you could create your own field that has some other distance attribute and set the evaluator to that.
Comment: Haha, thank you. And I do not think that if the stop was offset 2m from the edge it would add an additional 2m to the route distance. This is because of what I said above, that the length is calculated based on the actual network (or attributes assigned to it), and that you have the option of stops being located even when placed not directly on the network. Because you set the search/snapping tolerance yourself, you are assigning the degree of (true) travel that is being omitted from the directions.
Comment: I'm not actually sure what I meant when I asked this question, I was feeling quite overwhelmed by NA at the time. I think I was worried that if the stop was offset from the route, and a transfer edge of say 2m connected them, would that lengthen the route by 2m? I don't think that makes sense,  but you have answered the question in terms of how the solve works, so I will accept :)


Move home directory to shared storage partition in Dual Boot Windows/Fedora

Question: I am dual booting Windows 7 and Fedora with a shared storage partition. In Windows 7 I've adjusted my libraries to point to the shared storage partition. I'd like to do the same for Fedora, so by default my /home/username will always display the contents of my shared storage and nautilus will show it in the file browser window.
Answer: You could just edit /etc/passwd to update the home directory, but this may cause issues.
test:x:1004:1004::/home/test:/bin/bash
In this example you need to change the /home/test to point to your shared location/
You don't say what filesystem type you are using for your shared filesystem, but I'll assume it's going to be FAT32 as it's probably the easiest to mount on both Linux and Windows.
FAT32 does not support the same level of permissions (user,group,all) as native unix filesystem types and this may lead to problems with for example things like SSH which insists on the .ssh directory having very restrictive permissions so only that single user can read it.
Answer: You can do:
mv /home/username/* LOCATION_OF_SHARED_STORAGE
ln -sf LOCATION_OF_SHARED_STORAGE /home/username

But as hardlib notes in his answer, this might not be a really good idea, because the shared partition will not support the full set of UNIX permissions if it is FAT32 or NTFS. Instead, it might be better to do:
ln -s /home/username/Documents LOCATION_OF_SHARED_STORAGE

to have the shared storage as a subdirectory of your home directory.


WHICH PLAYER TAKES THE HAND?

Question: If one player is holding a jack and a three and the other player is holding a jack and an ace and the cards on the table are showing a jack, a three, two 7's and a ten. The first player then has a pair of jacks, a pair of three's and a pair of 7's on the table.  The second player has a pair of jacks, and the same two 7's on the table, with an ace high. They both have a pair of jacks and a pair of 7's but the first player also has a pair of three's, which should trump the ace high. Who has the winning hand?
Answer: Every combination is maximum 5 cards. You cant have 3 pairs. Here the player with the highest kicker wins. The highest kicker is the ace.
JJ77A vs JJ773
Ace wins

WHICH PLAYER TAKES THE HAND?


How can I install MySQL on my Android device(s)?

Question: There are good and bad choices available for the design of my system and MySQL seems to be the best available.  I need it to run client/server and support stored procedures & triggers and a host of other features.  But I also need a database that will run single-user on mobile devices when off-line, then synchronize with the on-line server when reconnected to the Internet.  The only database provided with Android is SQLite - which doesn't even come close to providing the features required.  Also, installing MySQL on Android devices would mean that I wouldn't have to support any incompatibilities between two different databases.  I do not need other features installed (HTML server, PHP, etc)... just MySQL.  How can I get that installed (and with my apps(s)) and have it work easily and efficiently (and not have to root or install a new ROM on the device)?
Comment: This answer should answer you: https://android.stackexchange.com/questions/61056/install-mysql-or-any-other-lite-weight-database/173658#173658
Answer: A search for "mysql" on the stores can answer this: there are several packages available, usually together with a web server and PHP. Best candidates are probably AndroPHP and Palapa.
My list of web servers with scripting support also have some of them (e.g. the two I mentioned), together with links to reviews, video demos, etc – which might make your decision easier.
Answer: This is a Free and very lite Mysql Server for Android that

support all cpus (armv6, armv7, armv8/aarch64, and x86).
no root needed
support Innodb
Comment: What is your connection to this product? You seem to have responded similarly to recommend this product multiple times today.
Comment: yes, I recommended it TWO times for different questions which haven't set as duplicated. I would like to give only a link to my first answer, but it will only show as a comment that people may miss.


Retrieve my phone contacts lost in previous phone

Question: Please send me _ how to ? I don't want to lose info stored on lost phone
Answer: If you backed up your contacts to Google:
(You have tagged the question with Google-account tag, so I'm assuming that you have stored the contacts there.)
First, make sure you actually have saved your contacts to Google. To do so, go to contacts.google.com and log into your Google account. If you see your contacts there, then follow the steps below:
Go into your phone settings → accounts → Google → sync, and make sure that contacts sync, is on, if it's on, but the last sync date was a long time ago, make sure to refresh sync. Your contacts should now appear in the contacts app.
If you have not backed up your contacts to Google:
If you checked in contacts.google.com and the contacts are not there, that would mean that you have saved the contacts to the internal memory of your lost phone, and in that case there's not much you can do to get them back.


Is there an advantage of the operating system understanding the characteristics of how a thread may be used?

Question: Is there an advantage of the operating system understanding the characteristics of how a thread may be used? For example, what if there were a way in Java when creating a new thread to indicate that it would be used for intensive CPU calculations vs will block for I/O. Wouldn't thread scheduling improve if this were a capability?
Comment: The ability for an application to have further "influence" over the operating system thread scheduler feels like it would be a good idea. Maybe the question is if this capability exists, what would be a characteristic other than thread priority would an application want to exploit?
Answer: That's what OS processes do.  The OS has sophisticated scheduling for the processes.  The OS tracks I/O use and CPU use and dynamically adjusts priorities so that CPU-intensive processing doesn't interfere with I/O.
If you want those features, use a proper OS process.
Answer: I'm not sure what you're actually expecting the OS to do with the information that a thread is I/O or compute.  The things which actually make the most difference to how threads get scheduled (ie thread priority and thread CPU affinity) are already exposed by APIs (and support for NUMA aspects are starting to appear in mainstream OS APIs too).
If by a "compute thread" you mean it's something doing background processing and less important than a GUI thread (from the point of view of maintaining app responsiveness) probably the most useful thing you can do is lower the priority of the compute threads a little.
Answer: Is that even necessary?  Threads blocking on I/O will cause CPU-intensive threads to run.  The operating system decides how to schedule threads.  AFAIK there's no way to give any hints with Java.
Answer: Yes, it is very important to understand them specially if you are one of those architects who like opening lot of threads, specially on windows.
Jeff Richter over at Wintellect has a library called PowerThreading. It is very useful if you are developing applications on .NET, but since you are talking about JAVA, it is still better to understand OS threads, kernel models and how the interrupts work.


Determine field type lightning-record-edit-form

Question: On a lightning-record-edit-form page, how you determine the field type(text, lookup, picklist)?
Thank you,
P
Answer: The beauty of using the lightning-record-edit-form component is that you don't need to worry about the types of any of the fields. Using lightning-input-field inside of the component is enough - Salesforce will handle the rest and show the appropriate UI based on the type of the field. For example, a combo box for a picklist, an input[type="text"]  for text, and a textarea for long text.
That said, there isn't any way in the lightning-record-edit-form component to tell what type a field is. All of the logic is handled internally to the component. Your best option is to use the uiObjectInfoApi module in your LWC and call getObjectInfo to find out information about an object. getObjectInfo will return an Object Info object which will let you access metadata on the object and its fields. Follow the pattern in the example below.
import { LightningElement, wire } from 'lwc';
import { getObjectInfo } from 'lightning/uiObjectInfoApi';
import ACCOUNT_OBJECT from '@salesforce/schema/Account';

export default class Example extends LightningElement {
    @wire(getObjectInfo, { objectApiName: ACCOUNT_OBJECT })
    accountObjectInfo({data, error}) {
        if(data) {
            console.log(data.fields['Name'].dataType); //String
            console.log(data.fields['Fax'].dataType); //Phone
            console.log(data.fields['AccountSource'].dataType); //Picklist
            console.log(data.fields['NumberOfEmployees'].dataType); //Int
            // etc.
        }
    }
}

Comment: That really depends on your other component, but in general yes. Can you ask a new question or update your question with more clarity?
Comment: Thanks for the reply nbrown.  I am trying to add a custom LWC to the html based on the field type.
Comment: I would post your code and more of an explanation of what you want to do.


Malicious Infection Transmitted Across Outer Space

Question: If an extraterrestrial race were to send a signal to earth containing a virus (technological or psychological), how could that signal then infect our technology and then be received by humans?
Comment: What is a psychological virus?
Comment: Like a thought virus, something that force's you to do a certain thing, something like attack the person nearest you.
Comment: So...mind control?
Answer: They are sending (trading? donating?) scientific information. The first is a blueprint for a fusion reactor. People are suspicious, they analyse it, they understand it, and it works. The second is the algorithm to maximize advertising revenue for your social media platform while keeping hate speech away. People look at it, they cannot quite grasp why it works, but they use it anyway. Then, when the suspicion dies down, they send the DNA of a microbe which solves global warming with absolutely no side effects. Guess how that one works out.

Then there is the kind of "virus" that is called a meme. I mention Last Christmas and some readers won't be able to get it out of their mind for the rest of the day, even in February.
Where a physical virus hijacks cells of the host body to replicate itself, a meme hijacks thought processes to replicate itself.
Comment: Good summary of memetics on the scp foundation website.  They have some creepy memetic scps.  http://www.scp-wiki.net/understanding-memetics
Answer: A technological virus is out of question for nowadays, unless they hack into the internet in a way that only works in Hollywood.
However, if this were done in the 70's or 80's it might just work! Back then a lot of computer programs were stored in cassete tapes, the type you would use in a stereo (floppies were a thing, but hadn't dominated the market yet). Some programs were broadcast by radio stations. All you had to do was putting your stereo in record mode while tuned to the station at the right time to download it. This was usually done by/in/for university engineering courses, and government it professionals handling data. It was less cumbersome than most alternatives.
All the aliens would need to do was sending a strong AM/FM signal with some malware at the right frequency and modulation and at the right time. Granted, the damage they could do would be limited to bad data processing, but still, that would be fun to watch.
Or, if your story is set in the early 2000's, you could keep some people from watching satellite TV.
As for a "psychological virus", it has been done before. By us. Just spread rumors that vaccines cause autism, GMO's cause cancer and that condoms don't reduce the chance of HIV transmission. A lot of people will believe, and that will cause as many deaths as wars do. Just broadcast it in AM/FM.
Answer: Perhaps just sending certain data encoded into the virus RNA might be sufficient to cause mayhem. Assuming that the virus arrived in some way that made it obvious that it was of extra terrestrial origin and that Terrestrial scientists were then asked to study it and discover its contents reading the code could potentially be very disruptive.
Step one would be realisation that we are not alone which of itself might be unsettling.
Step two might be the discovery that the virus actually contained a message and was not just an alien life form.
Step three might be decoding that message in stages some parts deliberately harder than others initially some new physics perhaps or some other item of high technology proving that the message was not a fake.
Then time for the religious message asserting that the messiah would rise again but the infidels had to be destroyed first and that anyone who did not believe in Christianity or Islam was an enemy.
Obviously the message would have to be more subtle that that, but with billions of characters to play with and an advanced alien intelligence it might be possible. Ideally and most likely that data in the code would be widely disseminated for deciphering so would not be easily suppressed when the translations started to come up with disruptive and dangerous content.
Answer:
a virus (technological or psychological), how could that signal then infect our technology and then be received by humans?

The realistic answer is that it couldn't. It is hard enough to communicate, let alone abuse the communication as in, say, The Astronaut's Wife.
In A for Andromeda, thanks to their extensive knowledge, the aliens send several alternative designs covering all reasonable possibilities for a biochemistry, allowing Earthmen to build from the bottom up a self-improving system that then further leverages the information available until it is able to replicate a human being

 and, yes, a plague too.

In Factoring Humanity and Golden Fleece (both by Robert J. Sawyer) some information is transmitted that has interesting and hand-waved "universal" properties - it will act on a human mind, or on a computer in the second novel, whatever its ultimate nature and development because it plugs into some universally shared trait by either biological sentiences or computer systems.
In other words, there is only (almost) only one fundamental way for computer programs to function (RAM, ROM, binary code and CPU organization plus the technological way to realize all of that, at least past a certain technological level) and there is (almost) only one fundamental way for sentience to function. Plus that fundamental way is flawed in some way or other. So, by abusing that underlying common level, you can force the computer or sentience to do your bidding.
Now yes, assuming that such ultimate traits do exist and the aliens are aware of them, then they might exploit them somehow. For example some joke so good or some concept so stimulating that anyone coming across it (except somehow the aliens, which might be the exception to that 'almost'?) cannot but laugh themselves to death or freeze and stare at their collective navels. This is not a novel concept, since it's referred to in the Comedìa by Dante (XIVth century) (Paradise XXXIII: "Such in that Light doth one at last become / that one can never possibly consent / to turn therefrom for any other sight"): once you see God, you cannot look to anything else because you no longer want to.
The same could happen, intentionally or not, for some kind of ideas - they are known as memetic infections. Something the target species somehow never came round to thinking, and yet so enticing that they can't stop themselves from enacting as soon as they are made to think of it - and that can have self-reproducing qualities; for example a really convincing evangelic religion. A race hit by that (or particularly sensitive to it) would dedicate vast resources to the endeavour of retransmitting the same "infection" to the whole Universe.
Something of that kind sort of tries to happen in David Brin's Existence, where umpteen alien races

 start sending us unsolicited sentient chain emails .


Google Page speed test showing 0 page speed

Question: I tried to test the speed of a website and it appeared to show 0 speed. Why would a site have 0 speed? Please guide me. Thanks.
Answer: Not to be rude, but because you score terribly for speed. Images thát big? Those images sizes are INSANE. Kinda harsh, but how did you even manage this?
To solve this, follow their suggestions as much as possible and your rank will increase. The list they give is a very good start.
You should at least:

Opitimize images. This is the first thing. Just drop your images in kraken.io, they'll do it for you. Save your images for web if you use Photoshop, don't just save as jpg.
Caching more than 24 hours, at least 1 week, I suggest you read about caching and best practices. Longer is better
Find a way to speed up your site. 4,8sec isn't doable in 2015 ;)
Answer: Following functions could help you hopefully a little on your way, because GTmetrix is also not that happy.
Remove query strings from static resources (?ver=x.x.x)
Text source Gtmetrix.com

Most proxies, most notably Squid up through version 3.0, do not cache
  resources with a "?"  in their URL even if a Cache-control: public
  header is present in the response.  To enable proxy caching for these
  resources, remove query strings from references to static resources,
  and instead encode the parameters into the file names themselves.

This function takes care of that, add to functions.php
function remove_version_parameter( $src ){
    // Check if version parameter exist
    $parts = explode( '?ver', $src );
    // return without version parameter
    return $parts[0];
}
// filter .js files
add_filter( 'script_loader_src', 'remove_version_parameter', 15, 1 );
// filter .css files
add_filter( 'style_loader_src', 'remove_version_parameter', 15, 1 );

Defer parsing of JavaScript files
Text source Gtmetrix.com

In order to load a page, the browser must parse the contents of all
   tags,  which adds additional time to the page load. By
  minimizing the amount of JavaScript  needed to render the page, and
  deferring parsing of unneeded JavaScript until it  needs to be
  executed, you can reduce the initial load time of your page.

Following function takes care of that, add to functions.php
function add_defer_to_js( $url ) {

        if ( FALSE === strpos( $url, '.js' ) ) {
        return $url;
        }

        // Must be a ', not "!
        return "$url' defer='defer";
    }
}
add_filter( 'clean_url', 'add_defer_to_js', 11, 1 );

Just a note:

Do not resize your images with css, just make them the size as needed and add at least the width to them.
Take a look here for some information about how to do 'stuff'. (optimization)
Use the hints from other answers also and you will do pretty well afterwards.


Is "node embedding" in GNN analogous to "hidden layer" of FFN?

Question: So in Graph Neural Network (GNN) we have node embeddings which is a feature vector that describes the node, is it analogous to hidden layer of Artificial neural network such as feed-forward neural network? After all hidden layer stores set of weights and biases to extract some "feature", which begs the question if node embeddings are analogous to a hidden layer?
Comment: In my understanding embedding is a static vector, but hidden layer is a function. But this is a good question as hidden layer is indeed extracting a feature, while node embedding represents features of the node.
Answer: Embeddings are vectors. Layers are functions.
So, node embeddings (e.g. produced by TransE) are analogous to word embeddings or code embeddings, i.e. they are vector (and lower-dimensional) representations of the original objects, such that similar objects have similar embeddings, for some notion of similarity.
Your question is analogous to "Are convolutional layers analogous to feature maps?". So, you could use neural networks with layers to learn embeddings, but this does not have to be the case. For example, TransE does not "really" use a neural network (i.e. a sequence of layers that compute a non-linear function of the inputs), but it just optimizes the $L_2$ norm of a simple function of the vector representation of the nodes and edges, although it uses gradient descent.
Comment: makes so much sense, so that means embeddings are linked to model they are learned with? I thought embeddings are more universal as a space that separate two dissimilar things but here it appears that to use the embedding we need, the network on which it has been learned on, as well


Bluetooth Mouse Lag

Question: I have a BlueTooth mouse (Dell WM524). Works like a charm on my notebook with Ubuntu 15, but I have a little issue...
Recently I've bought a 23' full HD monitor and started using on notebook, no problems with system performance, Ubuntu crashes, or everything else, except for the BlueTooth mouse, that has a lot of lag
Probably is a problem about hardware performance, but all the system is going fine, why the BT needs to lag? Is there a way to increase BT priority on Ubuntu?
Important: It's only BlueTooth mouse that lags, wired mouse doesn't have any problem. When the monitor is disconnected that problem doesn't happen.
So, can I fix this increasing the BlueTooth priority process, or doing anything else.
Answer: This could be related to the "Sync To VBlank" setting in "OpenGL", which you can deactivate via the CompizConfig Settings Manager as reported in Mouse lag after upgrading to Ubuntu 14.04.

Note: I say, "could be", because you're mentioning the monitor, hence it may be graphics related. I have the same problem, though without an external monitor, and the bluetooth mouse (Logitech Ultrathin Touch Mouse) just worked fine before upgrading from 14.04 LTS, and lagging afterwards. Unfortunately, for me the OpenGL setting doesn't solve the problem.
I tried the approach in Ubuntu 14.04 bluetooth mouse lags time by time, which remediated the mouse lag slightly, almost unnoticeably. The lag is still there. On my system, the problem seems to be that the driver is not loaded:
<code>$ dmesg | grep bluetooth
[    5.159573] bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0a5c-216f.hcd failed with error -2
[  292.300110] input: Ultrathin Touch Mouse as /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0/bluetooth/hci0/hci0:11/0005:046D:B00D.0004/input/input18
</code>

Bluetooth Mouse Lag


Will iOS, jailbroken or not, work on RP Model B?

Question: I want to purchase a RasberryPi Model B, to explore the programming and robotics capabilities. I was just wondering about iOS and maybe even android, will it work on a Model B?
Answer: You won't get iOS to run on the Pi hardware, but you can get Android running with various levels of usefulness.
There's a Pi blog post available. The wiki page (CC-BY-SA license) states:

CyanogenMOD 9 (based on Android 4.0): Boots, unusable Framebuffer
  issues: possibly due to the lack of double buffering and/or page
  flipping in the bcm2708 framebuffer driver Proper libEGL library not
  present: libraries are available, but those are linked against glibc
  instead of android's bionic libc (issue filed here) UI Crashes
CyanogenMOD 7.2 (based on Android 2.3): Boots, very slow, barely
  usable.(unstable) Same problem with the hardware acceleration
  libraries.
Official Android 4.0.3 (built by Broadcom): Boots, very
  fast with hardware acceleration, lacks AudioFlinger support. NOTE: Not
  yet released by Broadcom! More info: Broadcom Announcement
Ice Cream Sandwich (based on aosp): Very Doubtful That any Android that
  will be usable will ever be released.
Jellybean (based on aosp): Dream on.
Answer: The answer to this question answers whether or not iOS can be put on a Raspberry Pi pretty well.
If you looking to play with Android on Pi in advance of the source code release for Android 4.0 on the Raspberry Pi, you might want to check out the community Razdroid project, which last month produced its first non-accelerated port of Gingerbread on top of the publicly released VideoCore binary.


What distance can you see aircraft lights from?

Question: My parents bought a house and it's approximately 50-60 km from the nearest airport and one day when it was dark I've noticed lights on the sky and because I live in a big city close to the airport I came to the conclusion that this have to be airplane lights. Is it possible to see them from that far?
Comment: Sure, but how do you know the lights were 50-60km away? Airplanes fly all over the place, not just near airports...
Comment: 50–60 km from airport is pretty close! The descent angle is around 3°, which means 1000 ft altitude per 3 NM or 50 m altitude per 1 km. From the typical cruise altitude, the aircraft starts to descend more than 100 NM/200 km from the airport and just the final approach is usually more than 10 km. So the aircraft may be passing at relatively low altitude (9—10,000 ft/~3 km at that distance) somewhere close by. With precise location it would be possible to find where the typical arrival and departure routes come closest.
Answer: Aircraft lights can be easily spotted 50-60 km away during clear nights.
I used to live in Rotterdam and could spot aircraft at night when they turned exactly towards me at ARTIP which is an initial approach fix of Amsterdam airport Schiphol. ARTIP was exactly 100 km from my house.
Answer: Aircraft lights can be seen from substantial distances. How far will depend primarily on two variables: visibility, and how bright the aircraft lights are.
When I am flying at night in good visibility, I can often see aircraft lights at great distances from my aircraft. I do not know how far the furthest are, but some of the nearer ones I have been able to establish at 30 NM (55 km), for example. I am confidant that some of the further ones are 50+ NM (92+ km). The aircraft in these examples would be aircraft with beacon, strobes, and nav lights on.
Now, in the same good visibility conditions, with visibility at 100-150 NM (180-270 km), I can often see city or town lights at 150 NM (270 km), and at 100 NM (180 km) may be able to positively identify that city or town. Cities give off much more light than typical aircraft lights, but aircraft lights against a dark sky may be visible from quite a distance. Unfortunately I cannot offer a definitive maximum distance from personal experience.
When viewed from the ground in good visibility conditions, there is a strong possibility that you could see aircraft in cruise at distances of 30-50 NM (55-92 km) or more. The brightest aircraft lights will typically be the landing lights, and since some aircraft extend or turn these on below 10000 ft, these may be visible when the aircraft is as far as 60 NM (110 km), or more, from the airport.
In your case, if you are positioned 50-60 km (27-32 NM) from the airport, you may very well see aircraft overflying you in the descent towards the airport. Depending on the aircraft's orientation, especially if the landing light is pointed in your direction, you may also be able to see them beyond the airport on the approach.