What is safe area / minimum distance for iPhone 4

Question: What is safe area / minimum distance for iPhone 4 canvas?
Comment: So you're asking for the  touch area Margin, right?
Comment: Yes, I am asking actually for margins.
Answer: I believe your "safe zone", or the margin/padding (referred to as "insetting/outsetting" I believe in iOS land) between your content and the edge of the screen, has not been specified by Apple  in their Human Interface Guidelines. Apple loosely uses the term in their guidelines to refer to the area in which you need not be concerned about them eating into your icon's design space (more on that below).
I would tend to think that depending on the type of app you create, you should be able to be fairly comfortable using the whole screen for your application as far as content placement and touch targets go. Any padding/margin you place around your content is up to your discretion. However, I think the padding I've seen on most apps is about at least 10px on each side -- although I haven't yet found a best practice or reference on this.
Definitely keep in mind however that the minimum size for a touch target as defined in Apple's Human Interface Guidelines is 44 x 44 points (not pixels). Ensuring a large enough target is the probably the most important sizing guideline to follow. More on touch targets .
As a side note, there is a "safe zone" defined by Apple for the app icons in the Human Interface Guide, see the section on Document Icon Specifications for iPad.
Comment: Technically that safe zone isn't for this purpose; it's so things aren't improperly cropped/scaled and so icons don't bump into eachother. It's not really about touch area.
Comment: @BenBrocka I believe I covered both in the answer, I apologize if that's not clear.
Comment: Oh, you answered the question, I just wanted to clarify the two "safe zone" concepts aren't referring to the same thing
Answer: In an iPhone,
If a finger can reach and tap effectively then its in the safe area, I would recommend you to utilize the full screen and follow the principles of iPhone UI
Answer: The "safe zone" or minimum touch distance from the edge of the screen in iOS is effectively the entire screen area of the device. The whole device is meant to be tapable, hence the Tab Bar appearing at the exact bottom of the screen, not floating a bit above it.
However, note the iOS Human Interface Guideline about touch target size:

The comfortable minimum size of tappable UI elements is 44 x 44 points.

That's points, not pixels; for any control in the safe zone, the size should be at least 44 x 44 like other controls. Even if it's at the edge of the screen it will remain easy to touch.
Note certain gestures use smaller areas, intentionally using the edge of the screen; tapping the very top of the screen (which seems a bit smaller than 44 points tall) scrolls back to top, and some apps have a "slide from the edge of the screen" gesture like Dolphin. The edge of screen gestures work better on iPad because of the wide physical margins on the device, they're a bit more clumsier on phones (especially if your users use those god-awful cases).
Note on Android the same isn't quite true; the bottom of the screen is a riskier touch target (the sides and top are still okay) because of the "soft buttons" most devices have (especially Ice Cream Sandwich devices).
On Android, staying too close to the bottom means you might hit the Home or Back key, which could be disastrous or at least annoying. On iOS you don't have this problem; the Home key must be physically pressed in, and it's convex, probably exactly so it doesn't have this problem. This is probably why Tab Bars are at the bottom on iOS (no buttons to hit) whereas they're often at the top (or pan gestures) on Android.
Answer: It's about consistency and using finger-friendly target sizes.
http://uxdesign.smashingmagazine.com/2012/02/21/finger-friendly-design-ideal-mobile-touchscreen-target-sizes/
Use those conventions to your advantage.


GAM: Random effects despite single observations

Question: I try to model beak length in tropical birds by sampling year and age of the birds to see if beaks changed in size over the years using GAMMs. The data was collected for a number of birds (usually 20 birds per sampling site and sampling year) at 6 different sampling sites over 25 years. Unfortunately, the sampling was not done consistently so that I have two locations which have only been sampled once in the 25 years. I have no reason to believe that beak length is severely impacted by sampling site but in my model I included sampling site as random effect as in: s(sampling_site, bs="re").
However, I am not sure if this really makes sense considering that two locations have only been sampled once. Any advise would be much appreciated.
Answer: From what you describe, this should be fine. In fact, a main advantage of random effects is that they induce shrinkage (a nice illustration an be found here), which has also been called partial pooling: Information from the other sites is used to estimate the random intercept for the site with only one observation, because you are modelling them as coming from the same normal distribution (actually, it's not even clear from your description whether there is only one observation for a certain site, or if there are mutliple, but all from the same sampling date).
Due to this, you will probably have no model identifiability or convergence issues. But be aware that estimates of random intercepts for sites with one or few observations are pulled more strongly towards the overall mean than those with many. In case you are treating site as a mere nuisance variable, though, as typical in ecological studies, this should be irrelevant, because you are not going to interpret site effects.
Note that, as in any mixed model, you should ask yourself whether it is plausible that the site-specific effect is not correlated with your predictor of interest, i.e., bird age (the "random effects assumption"). This becomes especially relevant under stronger shrinkage.


Limitations of running a dedicated server from a virtual machine in Steam?

Question: What are the limitations one will come across when running a dedicated server from with a virtual machine on Steam?
Comment: Why the close vote?
Answer: The wonderful thing about virtual machines is that they are "virtually" identical to real machines. Assuming the host is a powerful enough computer, there should be no problems. However if you run it alongside other virtual machines you may run into the obvious problems such as bandwidth starvation (if multiple machines share one network adapter) or CPU starvation (as they all share one machine's CPU(s)).
There should be no problems that are unique to the fact that it's a virtual machine, though!
Answer: In theory there'll be no limitations at all when it comes to the software, it'll all run just as it should. Unfortunately if you're running a game server inside a virtual machine you've got to consider that you'll be running 2 operating systems which means 2 large sets of processes, a dedicated machine inside one of those large sets of processes which is generating it's own set of processes.
However this is only a problem if the server is run from a private machine. If you are paying for a VPS service this will not be as big of a problem.
Comment: VPN stands for "virtual private network" and has nothing to do with virtual machines. I think you mean VPS ("virtual private server")?
Comment: A virtual private network contains many virtual machines therefore if you are paying for a VPN service then you would have more resources at your disposal than you would if you were running the virtual machine on you own personal computer, at least this would be the case in most average scenarios.


How do I use the TranslateBehavior in CakePHP?

Question: There is no documentation on cakephp.org and I am unable to find one on google. Please link me some documentation or supply one!
Answer: The translate behavior is another of CakePHP's very useful but poorly documented features. I've implemented it a couple of times with reasonable success in multi-lingual websites along the following lines.
Firstly, the translate behavior will only internationalize the database content of your site. If you've any more static content, you'll want to look at Cake's __('string') wrapper function and gettext (there's some useful information about this here)
Assuming there's Contents that we want to translate with the following db table:
CREATE TABLE `contents` (
    `id` int(11) unsigned NOT NULL auto_increment,
    `title` varchar(255) default NULL,
    `body` text,
  PRIMARY KEY  (`id`),
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

The content.php model then has:
var $actsAs = array('Translate' => array('title'   => 'titleTranslation',
                     'body'    => 'bodyTranslation'
                     ));

in its definition. You then need to add the i18n table to the database thusly:
CREATE TABLE `i18n` (
  `id` int(10) NOT NULL auto_increment,
  `locale` varchar(6) NOT NULL,
  `model` varchar(255) NOT NULL,
  `foreign_key` int(10) NOT NULL,
  `field` varchar(255) NOT NULL,
  `content` mediumtext,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

Then when you're saving the data to the database in your controller, set the locale to the language you want (this example would be for Polish):
$this->Content->locale = 'pol';
$result = $this->Content->save($this->data);

This will create entries in the i18n table for the title and body fields for the pol locale. Finds will find based on the current locale set in the user's browser, returning an array like:
[Content]
  [id]
  [titleTranslation]
  [bodyTranslation]

We use the excellent p28n component to implement a language switching solution that works pretty well with the gettext and translate behaviours.
It's not a perfect system - as it creates HABTM relationships on the fly, it can cause some issues with other relationships you may have created manually, but if you're careful, it can work well.
Comment: thanks. even finding out the i18n table's name and fields was hard.. talk about hidden functionality..
Comment: @AlexanderMorland run this command from project app folder `./Console/cake i18n`. This command can initialize i18n table and extract all translations from your app to Locale file.
Answer: For anyone searching the same thing, cakephp updated their documentation. For Translate Behavior go here..


Relation between momentum and impact force

Question: If we knew the momentum of a moving object, how would we calculate the force exerted by that object upon impact with a surface?
Comment: If you know the rate of change  in momentum, you can calculate the impact force
Comment: @Razz Oh okay, I see what you're saying. I think I misunderstood your previous comment. When you mentioned rate of change in momentum, I thought you implied that the velocity of the object was changing as it approached the surface, but now I realize that the change in momentum is caused by the impact with the surface, which is what you meant.
Comment: @BobD Wouldn't the rate of change in momentum just highlight the difference in force between the initial and final points, as opposed to the force itself?
Comment: You need a model of the force, as it depends on the details. The force will be a function of time. For instance, the  dynamics and forces from a rubber ball and a billiard ball will be different. For a billiard ball you will have a larger force acting for a shorter time than for a rubber ball (smaller force acting along longer times), so that the total change in momentum is the same.
Comment: @VV_721 Rate of change in momentum tells us the force , an external force is responsible for this rate of change in momentum of the object. momentum in initial and final points wouldn't be force itself only the *change* in momentum for a short time yields a force
Comment: @Razz My intention is not to calculate the force applied to the moving object. My intention is to calculate how much force that moving object would apply to a surface upon impact.
Comment: @VV_721 Newton's Third Law states that , the rate of change in momentum is the force experienced by both the objects during a collision , simply the direction would be negative
Answer: If you know the change in momentum of the object and the time interval over which this change takes place, then the average external force exerted on the object during this time interval is the change in momentum divided by the time interval. And, by Newton's Third Law, this is the same magnitude as the average force exerted by the object on whatever it impacts.
Answer: As various people (@Bob D, @Pato Galmarini, @Razz) the force is the rate of change of the momentum.  So, we need to not only know the momentum (before and after the collision with the surface) we also have to know how long the collision takes.  In any semi-realistic situation the force will be varying with time, possibly in rather complicated ways, which I think is what @Pato Galmarini is hinting at by saying that we need to model the force.
Note that if you know the force applied to the moving object you know the force that the moving object applies to the surface, because of Newton's 3rd Law.  The two forces have the same magnitude and point in opposite directions.
But without more information the question can't be answered.  At minimum we would need the momentum of the object just before it hits the surface, the momentum just after it leaves the surface, and the amount of time it is in contact with the surface.  That would not be enough information to find the force at any particular time, but it would allow us to find the average force.  To find the force at any particular time we need some model for how the force depends on deformation of the object and the surface, and things become horrendously complicated.
Comment: Horrendously complicated is an accurate description. I sat through a presentation describing instantaneous force modelling for the (semi)-elastic collision of two quartz spheres. The impulse forces were very non-linear as a function of time.
Comment: Yes @Penguino, I totally agree.  Even if you do something really simple like model two particles colliding with an elastic Hooke's Law spring between them, a full analysis of the motion is much more difficult than one might at first imagine.  With a semi-elastic collision between extended bodies like what you are describing I imagine the math to describe the local stresses must get truly awful!


Fan speed is not constant

Question: I'm using Dell Lattitude 5480 and I think that I have a problem with fan speed. For example :
CPU gets to the temperature around ~75 C -> fan starts to work as fast as he can
Then temp goes down to ~70 and fan's speed starts to vary. Until it's down to ~50 C it vary around 2300 RMP - 2700 RMP (I am monitors fan's speed with sensors ) in very short periods of time. It's quite annoying, is there any way to make this speed constant? I wouldn't thought that its Linux Mint's fault, but on Windows 10 everything works just fine.
Comment: On the Windows 10 system that you're happy with, can you show us the  System Cooling Policy and other Power options?
Comment: Fan speed is generally _not_ intended to be constant; higher temperature readings cause the fans to work harder in order to dissipate more heat.
Comment: Would you mind telling me how to find 'System Cooling Policy' ? I rarely use Windows and have no idea where to look for it.
Comment: The issue is that in 1 seconds in can be changed from quick to slow, I know that when its 60 C and you want your CPU at 50 C u dont have to use 1000% of fan power, but when in 1 second it can vary from (for example) 40% to 60% its quite annoying.
Answer: Try installing fancontrol package and use
sudo pwmconfig
there is a tutorial to change fan settings here : Control fan speed Youtube video
Edit 1:
According the video you first install lm-sensors and fancontrol using sudo apt install
Then you do sudo pwmconfig and you put y answering the questions. After that you put the path of the file e.g  /home/**Your user name**/Desktop/fancontrol
Then you will get something like this:

select 1 which is the controller of the fan and insert the values according to the following image:

Then you copy the code generated in the file on desktop open the terminal and use this command: sudo nano /etc/fancontrol
Finally paste what you copied and press cntl+x to save and exit.
Now you can run sudo fancontrol
Comment: I have edited the answer and added the details of the youtube video.
Comment: Please import the relevant details from the youtube video to your answer, otherwise it's ... not much of an answer.
Answer: Check to see if there is something stressing your cpu (or gpu) when this happens.  It could be chrome or slack.  Remember that the CPU can instantly go from 50 C to 90 C under heavy load. The system temperature takes a little while to catch up.
Usually there are fan settings in the BIOS that allow you to change the fan speed characteristics, but YMMV.
Found an answer for Ubuntu to use fancontrol - https://askubuntu.com/questions/22108/how-to-control-fan-speed
Comment: I will try it, I used i8kutils but sadly when i use `sudo i8kfan 2 2` I get the same issue with fan. It's slow-fast-slow-fast and it changes quickly and thats what I wan't to get rid off. I think that BIOS can be the issue, but then why  Windows can handle it?
Comment: Sadly when i write `sudo pwmconfig` my fan start working only for really short period of time so th test won't pass and it makes using fancontrol impossible.

Fan speed is not constant


Send package from China to Europe

Question: During my trip in China I wouldn't like to carry all my gifts in my bag, so I'm planning to send them by post. Where is the best place I could do this with minimum problems? I'm planning to send it in the cheapest way possible. I will visit most big cities like Beijing, Xi'an, HK and others. Should I pay any taxes when I will receive the package?
Comment: What items are you planning to ship? What is their total cost and weight? To which country are you sending the items?
Answer: Most any post office can send a parcel for you, but the cheapest method would be sea mail, which will take a fairly long time to reach your home address (possibly a couple of months).
Duty that might be due upon receipt of the package will depend on where you live, as each country has different rules, and what exactly you are sending.  Most countries allow a reasonable amount of personal items to be sent duty free, but the limits depend on what it is.  Jewelery is much more controlled than say t-shirts, high tech electronics more limited than handicrafts, etc.  Your best source for information would be the customs website for your country.
Answer: If you go to the local post office, you should be able to get all the infos you need.
I travelled to china some years ago and staid there for 3 months, basically I had the same problem.
I just went to a post office and asked for infos.
Answer: Assuming "Europe" means EU, sending by post instead of carrying things in your luggage does have drawbacks as far as taxes and duties are concerned.
Travelling by air, you have a €430 duty and VAT-free allowance. For things sent by post, the threshold for import duties is €150. VAT depends on the country but might need to be paid even for postal consignment with very small value. This also means that even if the goods you want to send are very cheap and intended for your personal use, you still need to do some paperwork in advance (which is not the case if you carry them with you).
That's not to say you will definitely get in trouble if you try to cheat, but those are the rules.

Send package from China to Europe


Is there a society of thinking and free droids in the Old Republic?

Question: Is there a society of thinking and free droids in the Old Republic? In the Star Wars galaxy, is the threat of a technological singularity ever speculated on? Is there a planet sized A.I. machine and finally-artificial animal intelligence?
Comment: You are asking many questions. I suggest you split them up. Also, I took the liberty of changing the title to make it more specific.
Answer:
Is there a planet sized A.I. machine and finally-artificial animal intelligence?

Sort of and sort of.
In X-Wing series of books, there is a project Chubar by scientists working for warlord Zsinj, who manage to significantly elevate the intelligence of various less-intelligent species. They produce a genius-level intellect in Gamorrean (whose baseline as species is near-idiocy); and a good intelligence in an Ewok (who are known to not be intelligent enough to pilot a starfighter, ordinarily).

As far as AI machine, depends on the size you care about
There was an "asteroid-sized" (it was said to be slightly bigger than "Executor SSD") drednaught called "Eye_of_Palpatine" which had an AI controlling it called The Will. It was featured in "Children of the Jedi" book. It was Palpatine's first superweapon and precursor to Death Stars.
If you go slightly smaller, "X-Wing: The Bacta War" had Alderaanian War Frigate "Another Chance" and its Thranta-class War Cruiser Valiant ; both were flown automatically. Whether there were true AIs flying them isn't made clear.
Comment: Also, as another answer kind of alludes to: the implied attack of Abominor that caused Vong to become as they became, can possibly be considered as allusion to singularity. If you squint hard enough.
Comment: SWEET. I squinted and I found it!!!
Answer:
No, not in the Old Republic itself. There are two separate droid societies in the Unknown Regions, the Silentium and the Abominor. Both are originally extra-galactic in origin, and it is implied - though never explicitly stated - that they are from the Yuuzhan Vong home galaxy. It was probably the Abominor who invaded Yuuzhan'tar, provoking the Yuuzhan Vong counterattack that led to the eventual Yuuzhan Vong war in the Star Wars galaxy.
Not really. There are droids that achieved sapience and became threats, such as IG-88, but no singularity as such.
No. The largest droids ever created were the aforementioned Silentium, and larger constructs, such as the Death Stars, weren't entirely AI-based.
No. To my knowledge, there has never been an artificial animal intelligence in a Star Wars production of any kind.


Setup 2008 Server with Remote Desktop Services/Terminal Server

Question: I have a 2008 server that I can access via remote desktop as I am the domain admin at my work environment. We are installing some software that will require a handful of users to login and use the software. I've always been confused to what type of licenses I need and the steps to install Remote Desktop Services. Do I just need to buy 5 CALs and install them once I install the required features? It looks like I'll need to install the Remote Desktop Session Host and Remote Desktop Licensing Service? Do I need any license for this part of the install, or does the 5 CALs cover me if I only need 5 concurrent users max?
Comment: This is a ***programming Q&A site*** - [take the 5 minute tour](http://stackoverflow.com/tour) .This is not the place to ask sysadmin / server questions. Check out [serverfault.com](http://serverfault.com) for these kind of questions
Answer: Yes you need to install both Remote Desktop Session Host and Remote Desktop License Server. Please use the steps mentioned in  this article to setup your license server.
You would need as many number of Per User licenses as many users you want to have access to RDSH.
Thanks
Silvia Doomra


How can the frequency of dandelion++ stem tx observations in mainnet be increased?

Question: I am interested in the anonymity of dandelion++ and am trying to find out how stem tx can be viewed in real communication.
From the monero github source code changes made during the introduction of dandelion++, I found that for stem tx, I can observe packets where the value of the "dandelionpp_fluf" section is 00 (false).
Then, I set up a full node on mainnet (GUI version: 0.18.3.1-unknouwn(Qt 5.15.10)) and waited for the arrival of the corresponding packet while monitoring the communication with wireshark.
However, the relevant packets can only be observed once a day at most, which is too few samples to analyze.
Please let me know if there is any way to set up the system so that we can observe more stem tx.
Answer: Generally, you can observe more by running a reliable, well-connected node. Increase your incoming and outgoing connections.


Adding a Geopackage layer as a hardwired input to an algorithm in the QGIS graphical modeler

Question: Update- August 2020-  you can now load vector geopackage layers directly in 3.14 https://github.com/qgis/QGIS/issues/30827
I have a geopackage layer that I want to always be used in an algorithm in the QGIS 3.6 graphical modeler. When I use the triple dots to navigate to the geopackage it doesn't give me the option to choose a layer in the geopackage. Is there syntax I can use in the file path to identify the layer? In the example screenshot I want to use the layer AOI_Poly2 from the geopackage AOI as the mask layer. It seems like it will work but it chooses the first polygon layer in the gpkg (AOI_poly). I have tried appending  "|layername=AOI_poly2" to the file path but the dialog won't let me save. I am using windows 10.
Comment: I don't understand when the windows file explorer is coming. Can you edit your question? You mean you need to add the layer name to the path geopackage path?
Comment: Yes- I hope the question is clearer now.
Comment: Yes, better indeed.
Answer: I tried to create a string input, with the default value /home/etienne/test.gpkg|layername=layer4, I can use this input as Input layer, but yes I can't select it for Mask layer. This looks like a bug to me.
What I could do is to use the string concatenation algorithm. Use a string input with the geopackage path and append the name of the layer you would like to use. I don't know why, but the model will allow to use the output of the algorithm. It is a workaround. Maybe you can report this bug to QGIS on github?
Comment: Thanks that is a valid work around. - I'll add this to the Qgis bug report. Really l think it is that this is just one of the places that geopackage hasn't been fully implemented yet.
Comment: Added this as a feature request: https://github.com/qgis/QGIS/issues/30827


Can you use CFUserNotification with IOS 5.1

Question: I am trying to get a notification to appear when the app is in the background or suspented, as the LocalNotification does not work, I seen mention the CFUserNotification as a potential solution, but when i include the corefoundation framework to my app the CFUserNotification is still no-where to be found, can someone show me how to include CFUserNotification in my project ?
Answer:
Can you use CFUserNotification with IOS 5.1?

No
Comment: @Nate there may be some references in the *binaries*, but the CFUserNotification APIs are not in the CoreFoundation headers (on iOS). thus, i'd assume that it's not part of the public APIs (and therefore private, if any symbols you need exist). that also explains my response 'No'. if you explain how *you* use it on the device, that could qualify as an answer…
Comment: thanks for the response.  that's what I needed.  I have a non-App Store app that uses `CFUserNotification`, but I haven't updated to 5.1 yet, so I just wanted to make sure that you weren't saying that it disappeared in 5.1.  it's private, and has been for some time.
Comment: Did it go away in 5.1, or are you commenting that it's not approved for **App Store** usage?  I have a 5.0 device that it still is available on.
Comment: @Nate you're welcome. i don't remember it ever being available (read: public) on iOS.
Answer: If you're not making this for the App Store, you can use private APIs.  The way I have used CFUserNotifications is to

Add CoreFoundation.framework to the list of frameworks I link against (maybe this framework is automatically included ... I'm not sure ... I just know that it doesn't hurt to add it explicitly to your project).
The CoreFoundation public APIs still don't have the CFUserNotification functions in the headers, as Justin said.  So, you need to manually include a complete CFUserNotification.h header.  You can find a copy here.  Just copy that whole header file, and include it in your project source directory.  Then #import "CFUserNotification.h" where you want to use it.

Then, the compiler will let you access those CFUserNotification APIs.  I've done this on iOS 5.0 with success (on a device).


what geomatric series formula is used?

Question: trying to follow a solution related to geometric series, but not sure what formula is used here. Any pointer is appreciated.Image here, can't embed image yet.   I do try to plug in the Sn formula, but didn't get it to work
Answer: Sum of first n terms of a geometric series is given by:
$$S_n = \frac{a(r^n-1)}{r-1}.$$
Here $a$ is the first term of the series and $r$ is the common ratio.
In your question, $r = \frac{2}{3}$, $a=3^n$ and the number of terms is $n+1$ (you probably messed up in this part).
Comment: yes, did you notice that it was stated as $T(2^n)$ = ...,  I do try to plug in the $S_n$ formula, but didn't get it to work
Comment: Perhaps it would be helpful to identify $a$ and $r$ in the given problem.
Comment: as stated in the solution, r is 2/3 and, as a, which I can't find. but it states as T($2^n$) instead of $S_n$ though.
Comment: It doesn't matter what it is stated as. You can just calculate the sum of the RHS. (Also, see edit)
Answer: Notice:
$$3^n + 2(3^{n-1}) + 2^2 (3^{n-2}) + ... 2^{n-1}(3) + 2^n$$
can be effectively rewritten as
$$\sum_{k=0}^n 3^{n-k} \cdot 2^k = \sum_{k=0}^n 3^{n} \cdot 3^{-k}  \cdot 2^k  =\sum_{k=0}^n 3^{n} \cdot \frac{2^k}{3^k}  = \sum_{k=0}^n 3^n \cdot \left( \frac{2}{3} \right)^k$$
This is a finite geometric series, then, with ratio $r=2/3$ and first term $2^03^n = 3^n$. The sum of a finite geometric series $a + ar + ar^2 + ... +ar^n$ is given by
$$\sum_{k=0}^n ar^k = \frac{a(r^{n+1} - 1)}{r-1}$$
Thus,
$$\sum_{k=0}^n 3^n \cdot \left( \frac{2}{3} \right)^k = \frac{3^n((2/3)^{n+1} - 1)}{2/3-1}$$
This is essentially the same expression as presented to you, just needing some manipulations to make the equivalence clear.
Multiply by $3$ on the top and bottom:
$$\frac{3^n((2/3)^{n+1} - 1)}{2/3-1} = \frac{3^{n+1} \cdot ((2/3)^{n+1} - 1)}{2 - 3}$$
Multiply by $-1$ on the top and bottom. We distribute this into the $()$ on top to reverse the order.
$$\frac{3^{n+1} \cdot ((2/3)^{n+1} - 1)}{2 - 3} = \frac{3^{n+1} \cdot (1 - (2/3)^{n+1})}{3 - 2}$$
Next:
$$1 - (2/3)^{n+1} = \frac{3^{n+1}}{3^{n+1}} - \frac{2^{n+1}}{3^{n+1}} = \frac{3^{n+1} - 2^{n+1}}{3^{n+1}}$$
The denominator cancels owing to the outside $3^{n+1}$ term, and of course $3-2=1$, leaving us with
$$\frac{3^{n+1} \cdot (1 - (2/3)^{n+1})}{3 - 2} = \frac{3^{n+1} \cdot \frac{3^{n+1} - 2^{n+1}}{3^{n+1}}}{1} = 3^{n+1} - 2^{n+1}$$
Thus,
$$3^n + 2(3^{n-1}) + ... +2^{n-1}(3) + 2^n = \sum_{k=0}^n 3^n \cdot \left( \frac{2}{3} \right)^k = 3^{n+1} - 2^{n+1}$$
Comment: It looks like your sum has an extra $(2/3)^k$ in it.
Comment: Where, exactly?
Comment: Oh, I see. I'll try to figure out how to resolve it.
Comment: Okay, I believe I fixed it. It didn't really affect my approach, just more how it was being written in the summation. I suck at writing summations when they're a bit awkward like the one givenn.
Answer: One gets $T(2n)=3^n\sum_{k=0}^n(\frac23)^k=3^n(\frac{1-(\frac23)^{n+1}}{1-\frac23})=3^{n+1}-2^{n+1}$.

what geomatric series formula is used?


How do I stop my headlights from turning on automatically when my key is in the on position?

Question: My 2004 Nissan pulsar headlights turn on automatically when my key is turned to the ON position. The headlights stay on while I'm driving but I don't want them to be on. Please help me get this fixed.
Comment: It does not need fixing. It is there to « help » those who are not smart enough to remember to turn their headlights on when they need to be. Actually saw two like that last night...
Comment: This is called daytime running lights and they are the law in some places, you should find out if you are legally required to have them before you turn them off.
Comment: Solar Mike, I see people running around at night with no lights on, apparently because "they're too cool" to turn the lights on and want to be different. I can tell because of getting cussed out when I tell them about it. It's the inverse of those types who run the fog lights on a perfectly clear night.
Answer: You need to find the DRL module and pull its connector right out. Alternatively, you may play with the fuse marked 10 or 21, but this may disable other stuff as well.
Here's the wiring diagram, which I assumed to be from the right vehicle:


Is "they" use correct in the sentence of "If the current player is unable to make a move, they lose the game"

Question: I encountered a sentence, it says "If the current player is unable to make a move, they lose the game". I wonder whether they usage is correct.
Answer: Yes, this is correct.  While "they" is usually plural, there is a singular form of they as well, which acts as a gender neutral pronoun.
You could substitute this singular "they" with the phrase "he or she", although you have to match the count and change "lose" to "loses".

If the current player is unable to make a move, he or she loses the game.

This sentence is functionally identical to the one you encountered, however many people find the phrase "he or she" to be needlessly awkward and long.
Note that this is an actual shift in the language, and a fairly recent one.  100 years ago, the singular they would not have been considered acceptable, and you would be required to use "he or she", or more commonly just "he" as a catchall for both genders.  This gender inclusive use of "he" is no longer considered acceptable and has led to the rise of the singular they as a substitute.
Comment: The Oxford English Dictionary people, in a blog, trace singular they back to 1375, where it appears in the medieval romance William and the Werewolf. It's older than many people think. https://public.oed.com/blog/a-brief-history-of-singular-they/
Comment: Yes, it's old.  It's also new.  Singular they was used hundreds of years ago, then it fell out of use for a few hundred years, and now its coming back again.  Language changes aren't necessarily linear... it can go back and forth like this.


Accessing Web application on a NLB Environment having Session values

Question: I am having a multi server production environment with 2 WFEs ,2 Index Servers, 2 SQL Server boxes. I have deployed my wsp on these 2 WFEs. The issue I am facing is when the NLB switches from one IP address to another my web application is crashing. I have used session variables in my custom solution. So  how to enable my web site working with these kind of environment. How can I enable session state in this NLB environment.Here,in my customer environment NLB is being configured as combination of software and hardware.
Comment: Did you enable the SessionState Service?
Comment: russellg, Yes,I already enabled SessionState Service.But that did not help me.
Answer: Try enabling session affinity / sticky sessions in your NLB. You don't mention any details here. Are you on 2013?
Comment: Peter, Yes , am using SP 2013 environment.Will try enabling affinity.


What common backend can be accessed securely from an iPhone and Android application?

Question: I'm thinking about creating an application for the iPhone and Android that will need to access a common backend to retrieve account information.  Can both access a web service over https?  What other way would allow me to have one interface to the backend that is accessible by both?
Answer: They both work over http and https which is a common enough protocol. I would suggest you go with a RESTful web service so you expose your service via URI's like http://www.myservice.com/weather/zip/98007 which would return an XML blob that can be parsed by the client.
Comment: If it is possible try to use json instead of xml. This will reduce the data size that is transmitted and if you are using google gson also reduce the work needed to get your data.
Answer: if you are starting from nothing, i'd definitely go with RESTful service that returns/accepts JSON... there are plenty of libraries for both platforms that will accept JSON and turn it into arrays and dictionaries.
Answer: I'd recommend using a RESTful web service backend, which is all standard HTTP and/or HTTPS.  If you can use Ruby on Rails, its default scaffolding will get you about 99% of the way there and for the iPhone there is an open source project called ObjectiveResource that will automate your communication with this Rails backend.  I haven't investigated yet what options are available on Android but since it is all simple HTTP it should be straightforward.  I am not the maintainer of ObjectiveResource but I have contributed some code.  You can check it out here:
http://iphoneonrails.com
Answer: One good approach I have seen used with other services is to write the backend in such a way that it can feed data back in different types - for Android an XML response is best, but for the iPhone sending back plist data is preferred (though it can also work with XML if required).  In both cases it's easier to simply POST updates back to the server than to wrap an update in XML.
Both platforms should be able to use whatever form of authentication you wish to use, the iPhone I know supports all methods of HTTP authentication.
Comment: JSON is a preferable format to plists, since it is only marginally less space efficient than binary plists, it can (almost) as easily be parsed into native Cocoa objects (using json-framework), and it is a web standard, so you can use the same data easily on iOS, Android, and any other client platform.
Comment: @kendall: but for the iPhone sending back plist data is preferred - can you let me know why plist is preferred over xml?
Comment: Using plist data means you automatically have the return data easily parsed into an array or dictionary.  If you use XML you have to spend more effort parsing results.  Also using plists gives you the potential to use binary plists to minimize the amount of data to transfer and lower parse time.
Comment: After going through a lot of projects I would say technically plists are still preferable, just because they are more robust in terms of types coming back, and generally you'll not get back NSNull objects like you can from a JSON parse under some conditions.  But, most server side people only know JSON and it's probably better to stick with what they are most happy and comfortable with.


node in quadrilateral

Question: Let $(x_1,y_1),(x_2,y_2),(x_3,y_3),(x_4,y_4)$ be the vertices of a quadrilateral.
How could I know that an arbitrary point $(x_5,y_5)$ is inside this quadrilateral or outside? Is there any formula to do this?
Answer: One way is to calculate area of quadrilateral $\square P_1P_2P_3P_4$ and four triangles $\triangle P_1P_2P_5, \triangle P_2P_3P_5, \triangle P_3P_4P_5, \triangle P_4P_1P_5$ by Shoelace formula. If sum of areas of four triangles $ = $ area of quadrilateral, then the point $P_5$ is inside.
I think this works only for convex quadrilaterals. Works for convex as well as concave quadrilaterals.
Answer: Triangulate the quadrilateral, i.e., draw a diagonal. First check whether the point lies within the first triangle, if not then check whether it lies in the second triangle. Note that if the equation of a straight line is $ax+by+c=0$, and suppose that it divides the plane into two half planes, $H_1$ and $H_2$, then for two points $(x_1,y_1)\in H_1$, $(x_2,y_2)\in H_2$, $(ax_1+by_1+c)(ax_2+by_2+c)<0$. Using this fact can you now find out how to check whether a point lies inside a triangle whose vertices are given?

node in quadrilateral


Render HTML + CSS + JS to Image File

Question: Does there exist a tool that can render HTML code to an image file? I'm writing a scifi novel and I have an idea to include images of social media threads as chapter headings. I have some experience with web development, and I want to create my own version of Twitter for the story (it can't actually be twitter since the story is set a couple centuries in the future).
A while back I looked for Chrome extensions that could do something like this, and I found several that take screenshots. I was dissatisfied with this solution because (if I'm remembering correctly) I had to scroll my webpage up and down to get the whole thing as one screenshot. The dimensions of the resulting image were inconsistent and completely tied to my input. The whole procedure was undesirable since I might need to suddenly revise the text of these social media comments, reload my website in Chrome, and use the extension to screenshot.
What I'm envisioning instead is something like a command line tool where I specify the path to an index.html. The tool would start up the website, draw all of it to a PNG image in some directory, and then finish. I imagine that it would be built on top of the v8 javascript engine.
I would prefer something that can handle an entire JS framework such as vue, but I will settle for anything that does html and css. Does such a tool exist or am I stuck using screenshots?
Answer: This creates /tmp/output.png as an image of the given web page:
<code>$ google-chrome --headless --screenshot=/tmp/output.png https://en.wikipedia.org
</code>
Is that what you're trying to do?
Comment: Would this work with Chromium, too?
Answer: I think that API Flash should do what I need.
https://apiflash.com/
The downside is that I will need to deploy my websites somewhere, probably as static sites in AWS s3

Render HTML + CSS + JS to Image File


React: useState value doesn't update on parameter value change

Question: In the example below, the value of the display state on Child component never updates, even if the show parameter toggles between true and false.
I expect it to receive the value and to update accordingly. Can someone please elaborate on why this is not working?
(I know I can use a useEffect callback and setDisplay(show) from inside it, but I'd like to know why a simpler approach like this doesn't work)
function Child({ show }) {
  const [display] = React.useState(show);

  console.log({ show, display });
  return display ? "Message!" : null;
}

function Parent() {
  const [show, setShow] = React.useState(false);

  const handleClick = () => {
    setShow(!show);
  };

  return (

        <button onClick={handleClick}>Toggle</button>

      <Child show={show} />

  );
}

Working example: https://codesandbox.io/s/react-boilerplate-4hexp?file=/src/index.js
Answer: Well the value of display is set only on the first render of the component (because it is state and state doesnt change with renders, but only when you tell it to change). If you want it to be changing with changing props  just use a normal constant instead.
Answer: I believe it's because the useState in the Child component is reading show when it first loads but then never updates because it's just set, it doesn't automatically update.
You could either just use show directly which should be used for return show ? 'message' : <></>
Or you could still use the local state with useState, but you would need to add a useEffect to listen to the props change then change the local state of that child.
Update:
Third option for your current code to work would also be to do:
{show && <Child show={show} />}

That way at the time when it's true, the component will read the latest data.
Answer: display is local component state of Child, given an initial value from props.show when Child mounted. There is never a state update within Child to render any other value of display. This is actually an anti-pattern to store passed props in local component state, but there are two alternatives/solutions to getting display to update.
Use an effect to update state when the props update
function Child({ show }) {
  const [display, setDisplay] = React.useState(show);
  useEffect(() => setDisplay(show), [show]);

  console.log(show, display);
  return display ? "Message!" : null;
}

Or better, just consume the prop show directly
function Child({ show }) {
  console.log(show);
  return show ? "Message!" : null;
}

The benefit of the latter is that the new value of show and the updated/rerendered UI occur in the same render cycle. With the former (the anti-pattern) the state needs to update then the component rerenders, so the updated UI is a render cycle delayed.


Why can't the speed of gravitational waves be greater than the speed of light if the universe can expand faster than the speed of light?

Question: Since the expansion speed of the universe can be greater than the speed of light, why can't gravitational waves, which also uses space as the medium, travel faster than the speed of light?
Comment: @aystack That's not a bad intuition to have. The way I would say it is that in GR, we can only really define the relative velocity of two objects **locally**. In more detail, we need to be able to find a patch of spacetime containing both objects where the curvature in this patch is small enough that we can ignore it. In any local frame, GWs travel at the speed of light. Conversely, since the expansion of the Universe *is* due to spacetime curvature, we can't talk about it in a local frame. "The universe expanding faster than light" is something people like to say, but doesn't mean much.
Comment: I am not expert on this, but I am guessing that while superluminal expansion of the universe does not allow _superluminal transmission of information_, superluminal propagation of gravitational waves _would_ allow, and thus is forbidden by causality?
Answer: Gravitational waves are solutions to the linearized field equations
$\Box h_{\mu \nu} = 0,$
where $\Box$ is the d'Alembertian differential operator.
They are of the form
\begin{align}
h_{\mu \nu}= \text{Re}[H_{\mu \nu} e^{i k_{\rho} x^{\rho}}] ,
\end{align}
where $H_{\mu \nu}$ is just a complex symmetric matrix setting the polarization of the wave and $k_{\rho}$ is its wave-vector.
For the above ansatz to satisfy the equations, we plug it into the equations to get the condition $k_{\mu} k^{\mu} =0$. This is just the statement that the wave-vector must be null, meaning the wave propagates at the speed of light.
Answer: Gravitational waves propagate at the same speed as light and in a similar manner. The point here is that the speed $c$ is only measured locally. The speed of objects with mass is also only limited to be $\lt c$ locally. The relative speed of two objects separated by great distance is not well-defined. See this post for a detailed explanation.
The expansion of the universe does not give objects any "speed" because the universe does not lie in a higher-dimensional space. For the same reason, there is no "central point" in the expansion. However, that being said, gravitational waves do experience cosmological redshift just like light.
Answer: While gravitational waves and cosmic expansion are both gravitational phenomena, they are not the same.
The universe "expanding faster than the speed of light" is not a local issue.  The Hubble parameter describes the expansion rate now $H_0 \sim 70$ km/s/Mpc (kilometers per second per megaparsec). So for every megaparsec of empty space between two points the expansion makes them appear to recede from each other at a speed of $70$ km/s.  For reference the Milky Way has a radius of about $30$ kiloparsecs ($0.03$ Mpc, but it's not really empty).
This is apparent motion.  The two points don't actually move.  A person at each point would perceive themselves to be at rest.  Each point is stationary with respect to its local spacetime.  The addition of new space between the points makes the distance between them get bigger, but nothing is actually moving.
We can calculate the current separation required for the apparent recessional velocity to be the speed of light $c$
$$ d_\mathrm{horizon} = \frac{c}{H_0} =
\frac{300\,000 \,\,\mathrm{km/s}}{70\,\,\mathrm{km/s/Mpc}} = 4300\,\,\mathrm{Mpc}
$$
Something $4400$ Mpc away appears to move faster than the speed of light away from us.  The light it emits will never reach us.  But its speed relative to the local spacetime will always be less than the speed of light.
(We can see things farther away than this distance, because they were closer when they emitted the light that we see, but that's a different question)
Gravitational waves (GWs) are another aspect of spacetime.  The waves move across spacetime, but they don't carry spacetime with them.  The wave speed of GWs is a consequence of general relativity and is a fundamental property of spacetime itself (like the wave speed on a string depends on the properties of the string like its density and tension).


Can wish be used to recharge magic weapons, armor, or items that use charges?

Question: Wish explicitly states that it cannot be used to create magic items, however, it doesn't say anything about using the wish to recharge a magic item (if it uses the charges system). Is it with the bounds of the spell to accomplish this or would it be up to the DM?
Comment: The wish spell actually says you CAN wish for a magic item, but that could lead you to being transported to the footsteps of the current and quite possibly deadly owner of said magic item. Remember that it's also your DM's discretion. Maybe he DOES allow the magic item to be recharged, but to do this, he takes your character back in time to a point where the weapon WAS charged. The wish spell is just as dangerous as it is wondrous, so be weary when using it for any purposes other than it's already described uses.
Answer: DM decides
Wish says:

You might be able to achieve something beyond the scope of the above examples. State your wish to the DM as precisely as possible. The DM has great latitude in ruling what occurs... This spell might simply fail

Since recharging magic item charges is not within the scope of the spell, it is entirely up to the DM. This is unrelated to creating magic items, so there is no RAW that says it can't.
Answer: I'd communicate with your DM regarding the specific use of the wish spell to recharge your item. For example, the Luck Blade:

Luck Blade
Weapon (any sword), legendary (requires attunement)
You gain a +1 bonus to attack and damage rolls made with this magic
weapon. While the sword is on your person, you also gain a +1 bonus to
saving throws.
Luck. If the sword is on your person, you can call on its luck (no
action required) to reroll one attack roll, ability check, or saving
throw you dislike. You must use the second roll. This property can't
be used again until the next dawn.
Wish. The sword has 1d4-1 charges. While holding it, you can use an action to expend 1 charge and cast the Wish spell from it. This
property can't be used again until the next dawn. The sword loses this
property if it has no charges.

If you were trying to recharge this item, then I'd imagine you'd be out of luck
Comment: Was that a pun I see at the end?


state of Washington early term fee

Question: I am POA for my father who recently moved to Long Term Care after being to sick to take care of himself in state of Washington which require me to cancel all his apartment obligations and move him to facility which takes state assistance, does he have to  pay early termination fees on his internet etc?
Answer: There are no special laws in Washington state which relieve a person of contractual obligations in case of disability. You would need to look in e.g. the minimum term addendum if the service is Comcast and you have an obligation to stay with them for some period, to see what your legal obligations are. However, the service provider can waive early termination fees.
Typically, these kinds of contracts don't involve signing anything; agreeing (on the phone) is sufficient. It would not matter whether a person can remember any such terms, the question is whether they could have been aware of them when the agreement was reached. A person's mental state might be such that they are incapable of understanding or consenting, in which case there would not be a contract. I would say that it constitutes a completely separate question (i.e. it would overload this question to add that on), to investigate how the law deals with contracts and people with dementia (whether or not applicable in the instant case).
Setting aside the mental-state question, there is also an open legal question as to what a given customer has agreed to. The benefit of a printed contract to sign is that this question is clearly known. The problem with phone sales is that salesmen do not in fact read out the terms of the contract, and often fail to mention material details, so it may be that a person has not been told of an early termination fee. Some companies have such information available online (my ISP does not), but you can't go from "could theoretically find" to "was given notice". If it's not reasonably knowable that there is such a fee, then the  clause might not be enforced. However, it could require a lawsuit (and probably appeals) to establish such case law (if it hasn't been – I don't know of a precedent here). The odds are fairly good that they mailed a (fine-) printed copy of the contract when the service started, maybe along with a lot of advertising, so that the terms of the contract were available.
Comment: Thank you for your help, I looked up Hughes net early termination fees of which my dad did not sign for this and knowing his mind he would never remember anyone explaining this to him.  The office said this was a verbal binding contract is that true?

state of Washington early term fee


Obnoxiously loud music from a festival

Question: There's a local annual festival that plays their music really loudly. I can hear it from three and a half miles away, and it's really annoying. There are houses just a few hundred feet away; I'm sure it's far worse for them. Is that illegal? I don't plan to take legal action, but I'm curious if it would be possible.
Comment: @DaleM why did you delete your answer?
Answer: It is not illegal to make sound, but there may be limits on what sound you can make, when and where. At the state level, in Oregon, you can see what the general limitations on "noise" are here. State law is basically irrelevant, you have to consult local law. Let's say that the event is in Cannon Beach, then here are the restrictions. Between 10pm and 7am, the amplitude limit is 50 dB. Note however that exceptions are allowed, for example:

Sounds caused by organized athletic or other group activities, when
such activities are conducted on property generally used for such
purposes, including parks, schools, churches, athletic fields and
waterways; provided, however, that said exception shall not impair the
city's power to declare such events or activities otherwise to violate
other laws, ordinances or regulations

and one can apply for a variance, which upon due consideration by the chief of police can allow e.g. a music festival. But that's only Cannon Beach. Unincorporated areas are only subject to county-wide restrictions, which tend to also be quite minimal (owing to the fact that farms are typically "out in the county", and county governments tend not to ticket farmers when their cows are noisy).
The first step would be to determine whether the event was in (prima facie) violation of the local noise ordinance, if any. The second would be to determine whether – assuming a variance had been granted – the person granting the ordinance had abused their discretion.
Comment: What about nuisance law? The right to enjoy your home or something? (I'm not a lawyer, nor from the US, just vaguely recall something like that from a YouTube binge)
Comment: Noise law is a subcase of nuisance law: the rules regarding nuisance noise are encoded in e,g, those municipal ordinances. The right to enjoy property is a two-edged sword, so infringement of the right to have a music festival has to be somehow balanced with another person's right to not hear music.
Comment: I'm not sure if it matters or not, but it's not a music festival; it's a non-music-focused festival with music playing in the background. Really loudly.
Comment: So, this sounds like one of two things: either blame the municipality for issuing such a permit, or the festival organizers overdid it with the sound level and nobody bothered to check?
Comment: In the real world of law, you cannot just stipulate that the noise exceeded limits, and the above testimony is not sufficient. For the sake of discussion, we pretend that someone measured sound level and found it to be above the regulatory limit. Also, feel free to personally blame whoever you want: here, we look at the question "what can you legally do about it?". Someone should have officially filed a complaint, *then* if the municipality ignored the complaintm there is a potential cause of action.

Obnoxiously loud music from a festival


Properties of a distributed spell altering the appearance of creatures

Question: In my story, a man lived under the influence of an evil sorcerer. In this world, magic takes energy to cast, and the energy required increases over distance, the sorcerer casted a spell focused around the capital, to suppress all magical beings, including making them assume a more humanoid appearance at birth, if they were born in the sphere of influence. The farther out the "humans" go, the more the influence lifts, and eventually, can be broken and warded against. The protagonist, still, manages to use a weak variant of magic discovered in the capital's prison to break out and escape to the fringe rebellion. While there,a Druidic being noticed his strong magic and lifted his enchantment, revealing him as a humanoid-yet-Gilled and with webbed fingers creature. What mythological creature most closely matches that I mentioned above?
Comment: My current explanation is that his father was a water-lord of the deep, a cross between a wizard and a human, but that doesn't seem to work on that question.
Comment: You seem to have two questions here, whereas we like top deal with one per thread.You're welcome to ask a seperate question for one of the if you like. Please [edit] this down to one though.
Answer: As regards mythical humanoid water people, there are plenty.  I am pretty sure your protagonist looks like this guy, from a 15th century French bestiary.

https://www.bodleian.ox.ac.uk/whatson/whats-on/online/magical-books/magical-beasts#gallery-item=144653
I think when his true form is revealed all parties will be surprised; hopefully a pleasant surprise.   Look in the background - the ladies and his buddy want him to quit laying out and go for a swim.
As regards magic, it seems fine the way you have it.  The sorcerer is working over a lot of creatures over a great area.  The druidic creature is not that strong, but he is up close and personal, and focused just on your awesome merperson.  He has leverage, so to speak.  And of course it is magic (no doubt of one of the types recently laid out by AlexP) and so you can have the reversion to true form be permanent, or have what the druid did gradually wear off as long as your protagonist stays in the sorcerer's influence.
Answer: A Shalarin or a Kappa
A character that is humanoid, has traits that indicate it as aquatic and uses magic all are present on the Shalarin, with the only defect from this creature being that it belongs to a scenario in a dnd campaign.
However, a Japanese kappa more or less checks all of the requirements: possess magic (magic fluid in its head, which is the source of its power), is an aquatic humanoid with webbed fingers and is a creature from Japanese mythology.
As to how the spell can be broken, that's mostly up to you depending on your magic system, but you could make it so that, instead of completely breaking the spell, you could be instead temporarily nullifying it's effects on the protagonist, something that theoretically requires less power than breaking the spell altogether and can add a constraint to for how long your protagonist can use his Shalarin/Kappa powers.
Answer: The question is just about the kind of creature? I would suggest changing the tittle, it makes it seems that you are going to ask something about the spell.


Why is pressure over the wing lesser than the pressure on the bottom?

Question: Why is the flow above the wing faster than the lower one?
Most people say it's because the pressure above is lesser than the bottom one
But for the pressure to be low... The velocity must be high.So its like the chicken and egg question for me. Can't understand which one is the cause and which one is the effect.
Comment: Read [*this*](https://www.av8n.com/how/) It's the simplest and best explanation I know of.
Answer: The answer to this is "it's complicated."  Indeed NASA has a 4 page trail devoted to the many oversimplifications, such as the assumption that the air flowing over the top must move faster to "catch up" to the air moving across the lower side of the wing.
There are certainly two major aspects of this lift.  The first is that air flowing laminarly over a curved surface will exert a lower pressure on the surface than it would if it were flat.  This accounts for some of the lift.  There is also what NASA calls the "skipping stone" argument, which notes that the air leaving an airfoil is directed downward.
In reality, neither model fully captures the effect of air flowing over a wing.  To do that, we need to simply integrate the Euler equations (or Navier Stokes, in materials where we cannot ignore viscosity) to get the full description of lift.  However, in a pinch, one can recognize that those two models both describe part of the story, like two blind men describing the leg and the trunk of the elephant in the famous story.
Comment: Nice answer, +1 from me. So the Bernoulli story many of us have been told is BS?
Comment: @Gert That is what I am lead to believe.  The arguments against the Bernoulli seem sound, but I admit that I have a soft spot for the Bernoulli argument for wings because it is indeed what I was raised on.  I keep hoping that someone will provide a counterargument that permits my childhood upbringing to be the true story, downvoting my answer like mad, but the best I am able to do is say "it's complicated!"
Comment: Yup, same here: its hard to let go of the BP on wings!


Ubuntu 12.10 installation options

Question: I got a 400 GB hard disk with 200 GB allocated to windows vista and 200 GB unpartitioned space. During the installation I selected "Install ubuntu alongside windows vista". Then I clicked on Install now but I was not given the choice of choosing the size of /, swap and home partitions. Are the sizes automatically chosen for you? Thanks.
Answer: Instead of Install ubuntu alongside windows vista try do something else. That will hopefully provide the option for choosing the size of /, swap and home partitions. Thanks.
Answer: Yes, "install alongside *" is an automated installation option and the sizes are chosen for you. As @REGZEN said, if you want to control the way your HD is partitioned choose "do something else".

Ubuntu 12.10 installation options


How to make a particular role user and their content not accessible/viewable to other users?

Question: How do I make the user page (/user/uid) of a particular role (PendingFreelancer) and the content they create not accessible/viewable to other users?
Comment: This makes interesting reading: http://drupal.stackexchange.com/questions/51330/is-there-hook-node-access-equivalent-for-users-in-drupal7
Answer: Content Access

This module allows you to manage permissions for content types by role and author. It allows you to specifiy custom view, edit and delete permissions for each content type. Optionally you can enable per content access settings, so you can customize the access for each content node.

Video Tutorial
I think content access is only for content type nodes. So for the user page umm.... I can't think of anything of the top of my head. I will edit this if I can think of something. Perhaps the only solution is doing it with a custom module programmatically.

If you use pathauto you could make so the user page path is user/[user:role]/[user:name]
then you could use
Path Access

Path_access provides the means to restrict pages based on their path
alias - meaning you can lock out certain user role groups from whole
sections of a site using wildcards.

and lock them out from certain [user:role] paths.
Comment: Had a look at Content Access. It restricts what content you can see based on your role, but not based on the role of the author of the content right?
Comment: yes, it's based on your own role, not authors role.
Answer: Check out the Group module which help to build community based drupal sites.

The Group module allows you to create arbitrary collections of your
  content and users on your site and grant access control permissions on
  those collections

I believe Group works with any Drupal 7 entity.
Answer: If you are already using rules, then adding redirect rules for certain roles if they don't match the viewed user's role or a node's author's role would work.
Combine this with views filtering per role / block visibilities and panel varients per role would allow you to lock down a site pretty effectively.
I found that "content is viewed" rules add less than 10ms to a page load (or that's what rules debugging shows me). I think that's acceptable for the large majority of sites.


Sharepoint Foundation Databases, is more better?

Question: Accidental sharepoint admin here trying to get familiar and fix some issues.
Here is a pic from servers in our Farm screen. I'm noticing that we have two sharepoint foundation server databases? Is this a no no? Should we remove one of these databases? Any insight is appreciated. Thanks!
Answer: As one is named "DEV", you probably only have one for your production SharePoint. We would need to know more about your system to understand its setup.
In general, multiple databases can be a good thing:

Each web application will have its own database. If you have one web application for internal sites, one for internet facing sites and one for the My Sites, you will have three databases and each can be backed up and restored without impacting the other applications.
A single web application can have multiple databases to avoid creating a database too large to practically backup. If you created three databases for your internal web application, site collections will be created "round robin" across the three databases. Site collection 1 will be in DB1, Site Collection 2 will be in DB2, Site Collection 3 be in DB3 and Site Collection 4 will be in DB1 ...  Now instead of one very large database to backup, you have three smaller and easier to manage databases.
A single web application might have two databases to isolate content for legal, business or backup/restore reasons. All of the general team sites go in DB1 and all of the financial sites go in DB2.
Companies with tens of thousands of employees and MySites might have a large number of databases just to keep the backup size small. If you estimate 2TB of total content, and want to keep the databases under 200GB, then you would use ten or more databases.

So... it depends on your business and database maintenance requirements.
Answer: There are reasons this both SQL server showed up there.

If you create / attach a content database / Service / Config database then that server will be listed here.
Sometime, Admin for testing purpose connect a content database from different sql server and later remove the database from the farm. But this will not delete the server from server list.

How this impact the farm.

It will not impact your farm but it is more annoying why a dev sql server showing here and confused the new admins.
SharePoint farm can have multiple SQL servers, like you have large farm where single SQL server not fullfill the storage requirement then you add another one or so forth. There is limit of number of databases not the server (but less is better). In one of my farm we have 4 SQL servers which are hosting the content databases.

Now what you can do.

Check the farm, if it using that Sql server. You can run Get-SPdatabase  | Select Name, Server  This will list all the database in the farm, Now you can check if any of the database from that SQL server attached to the farm.

If yes then you cannot remove this server. 1st you have to decide what you want with the database.
If no database is being used from that server in this farm then you can remove it by clicking remove server link in front of that Dev SQL server. If you are not seeing that link, you need to login with farm admin account.
If you add a new database from that sql again, this SQL server will be listed here again.

Update:
Looks like you have only 2 content database Wss_content and SharePoint_Admin_.. while all other are services database.
Now why you are seeing the server name differently:
It is not SQL rather SharePoint, SharePoint store the Database server name like this "Server Name= Ice" for all the services related databases. This is expected and default behavior while for content database it store it as "ICE". run below script to get the data in a clean way.
$db = get-spdatabase
foreach($d in $db)
{
  write-host "Database Name=" $d.name "Server Name=" $d..Server.Name
}

Comment: Thanks. I ran the command and added a pic to the question. Do you know why some of the Servers return "SPServer Name=ice" and some just return "ice" as a hostname? I know that another admin had renamed the server hostname but didn't change the sql server instance. If I run @@ServerName in sql, it shows "ice" even though the hostname is "ice2". This is a fairly small install so we want to try and consolidate all DB's onto one sql server.
Comment: check my updated answer, what you are seeing is expected behavior
Comment: Awesome info thanks! I'm going to be tasked with moving the databases off sql-dev which is a dev server and has caused issues having these db's on it. I'm going to open a case with MS for this but at least I have some basic info now.
Comment: One last question: As you can see, there are 3 service databases on sql-dev which appear to be reporting services but I checked the sql-dev server reporting services configuration and there are none? How can I tell what server is running the sharepoint integrated report server? Thanks!
Comment: from your DB screen shot and CA screen shot, it is clear that reporting service is configured in your SharePoint 2013 and Server name "SharePoint". go to manage Service application on central admin and see if you really provisioned that service application and using it?
Comment: I added another screenshot, it's showing report services running. I'm assuming this requires a sharepoint integrated report server running, just not sure what server this is running on. Is there a config file or something that will tell me in sharepoint? Thanks!


Where does the factor of half appear from in the Klein-Gordon Lagrangian for a real scalar field?

Question: The lagangian density of a scalar field or a Klein-Gordon field has the form of
$$\begin{align}
\mathcal{L} = \frac{1}{2} \partial_\mu \phi \partial^\mu \phi - \frac{1}{2} m^2 \phi^2.
\end{align}$$
Why is there a factor of half appearing in the lagrangian? Being a constant, when entered into the Euler-lagrange equation, should yield the same equation when compared to a lagrangian without the factor of half, so what is the reason for having that factor in the equation?
Comment: For that Lagrangian it is in fact irrelevant. It might come into play when adding some interaction terms, where the factor $1/2$ has to even out the Leibniz rule for the derivative in the first term (but even in that case one could define the interaction terms as twice as much, sparing the $1/2$ in front).
Comment: @GennaroTedesco So I can commit that term? What if I want to define something that depends on the form of the lagrangian, for example the Hilbert stress tensor?
Comment: Well, anything else defined from the Lagrangian will of course depend on the Lagrangian and its multiplicative constant factors (although these don't enter the equation of motion they might enter the derived quantities, which can also be a good decision criteria to consider whether or not to include them in the first place).
Answer: This normalization is convenient when you work in Fourier space, since it implies that
$$ \langle \phi(p) \phi(q) \rangle = \frac{1}{p^2 + m^2} \delta(p+q)$$
which is easy to remember.  You normally derive this using path integrals/functional integration, and in that way the factor of $1/2$ comes from a Gaussian integral -- where ultimately it's more natural to have $\int dx \exp(-x^2/2)$ than $\int dx \exp(-x^2)$. Of course, it's possible to use an arbitrary normalization, and you could write
$$ \mathcal{L} = A (\partial \phi)^2 + B \phi^2 $$
for arbitrary constants $A,B$. In perturbation theory, the Feynman rules would be a bit more complicated, and all observables would depend on the ratio $B/A$. The usual normalization is nice because the Lagrangian parameter $m^2$ is actually the mass of the one-particle state in the free theory.
Answer: According to these Cambridge lecture notes it's "conventional". I'm guessing that choice of constant gives you the right T-V energy when you integrate the Lagrangian density over a certain volume.
Comment: Just like the classical $(m\dot{x}^2-kx^2)/2$.


3-star hotels in Dubai, UAE

Question: How expensive are 3-star hotels in Dubai,UAE? And are they generally nice and clean?
Do American citizens need a visa for a 2-night stay in Dubai?
Comment: You can instantly see every single price of every hotel on expedia.com.
Comment: This question is too broad. Questions here should not ask multiple distinct questions at once.
Answer: I'll answer the latter part of the question first, no you won't need a visa. US citizens are entitled to a visa-free entry to Dubai i.e. UAE. Just show your passport to the immigration officer and he will stamp it with a tourist visa valid for 30 days.

US citizens with a US passport that is valid for more than six months
  do not need to obtain a visa prior to entry to the UAE if the duration
  of their visit will be less than one month. This includes US citizens
  with visas or entry stamps from other countries in their passports.
SOURCE

About the hotels, yes they are generally clean and the cost really depends on the season you are traveling and the location of the hotel but roughly it will vary between USD 50-200 per night. You can have a better price idea and booking experience if you use trivago or expedia
Answer: Dubai is a fairly clean and modern city, so 3-star is pretty much the lowest you an find and there are really plenty of them. Prices start at around $50 USD per night but I have paid less and a little more.
The hotels themselves are usually pretty well-maintained and clean. Personally I have found service to be slower than elsewhere but really never had anything to complain about hotels themselves.
As @Newton already answered, you do not need a visa for a stay under one month.

3-star hotels in Dubai, UAE


what's going on with tor?

Question: <code>root@kali:~# tor
Feb 02 07:18:55.029 [notice] Tor 0.4.2.5 running on Linux with Libevent 2.1.11-stable, OpenSSL 1.1.1d, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.4.4.
Feb 02 07:18:55.029 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Feb 02 07:18:55.029 [notice] Read configuration file "/etc/tor/torrc".
Feb 02 07:18:55.030 [warn] /var/lib/tor/hidden_service is not owned by this user (root, 0) but by debian-tor (131). Perhaps you are running Tor as the wrong user?
Feb 02 07:18:55.030 [warn] Failed to parse/validate config: Failed to configure rendezvous options. See logs for details.
Feb 02 07:18:55.030 [err] Reading config failed--see warnings above.
</code>
Comment: What command did you use to start Tor? Tor should not be run as root which is what you did according to the output that you pasted.
Answer: You are not starting tor properly, try to start it as a service so that it runs as the correct user.
<code># systemctl start tor
</code>

what's going on with tor?


NSDateFormatter Question

Question: i am using the following code to get the current time..
<code>NSDate *myDate = [NSDate date];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT+0200"]];

// Set date style:
[dateFormatter setDateStyle:NSDateFormatterShortStyle];
[dateFormatter setTimeStyle:NSDateFormatterLongStyle];

NSString *GMTDateString = [dateFormatter stringFromDate: myDate];
</code>
My problem is :
I want the time in HH:MM:SS:(milliseconds if possible)
When i run the project, it displays the date and the right time but it also prints "MESZ" which i assume means Middle European System time in My language.
How od i get rid of MESZ and print the time with miliseconds?
Any help is appreciated
thanks in advance
h4wkeye
EDIT :
All i need now is an advice on how to print the milliseconds as well! Thanks for all your helpful answers
Answer: Looks like nobody has answered you about milliseconds... use "S" in your format string, like this:
<code>[dateFormatter setDateFormat:@"yyyy/MM/dd HH:mm:ss:SSS"];
</code>
Answer: You set one more property for dateFormatter like this
<code>[dateFormatter setDateFormat:@"yyyy/MM/dd HH:mm:ss"];
</code>
Answer: Use the "setDateFormat:" of NSDateFormatter with your custom attributes, an explanation of how to use it can be found here: http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/DataFormatting/Articles/dfDateFormatting10_4.html#//apple_ref/doc/uid/TP40002369-SW1

NSDateFormatter Question


How do you reference a Wikimedia image if the file name is non-Latin?

Question: I am trying to reference the wikipedia commons image in an english wikipedia info box. The image is a wikimedia commons picture with a Japanese name. Somehow it does not allow it to be placed there. Is there a special way to reference non romantic language file names in images?
Comment: Could you show us what exactly did you try and how did that fail?
Comment: Nassign, you may want to check the meaning of `romantic` on english.stackexchange.com ...
Comment: I replaced "romantic" with "latin".
Answer: You can reference pictures with non-latin names in infoboxes and anywhere, no problem.
Just use copy-paste like you would do for a latin characters URL.
Answer: You should ask this on en-wp, not here! see WP:PICTURE, you can use the methods described on that page for any kind of file name, just copy the complete file name and paste it in the wiki code.
If you have more questions like this, see these pages on English Wikipedia:

Wikipedia:Village pump
Wikipedia:IRC
Comment: I think this question is okay here. Though asking directly on Wikipedia is certainly a valid option too (and probably a better one).


Including a text file in LaTeX

Question: I write a program by DevC++ compiler and save it by .cpp format, and want to paste the code in my editor, Do I have to paste all the code each time?
Is there a way to include the file instead of copying and pasting the code over and over?
I suppose there should be a way because for a program of about 100 lines the including the file is more convenient.
Comment: You are probably looking for `lstinputlisting`. Just do a quick search here on the site: http://tex.stackexchange.com/search?q=lstinputlisting
Answer: Normally this is done using the listings package. It provides a lstlisting environment for verbatim code and also a \lstinputlisting[<options,...>]{<file name>} to include an external file verbatim. As options you can select language=C++ to get specific syntax highlighting. I also usually use basicstyle=\ttfamily. See the listings package manual for more details.
Comment: I actually use this package , all I didn't know was how include my c++ file instead of pasting the code each time .

Including a text file in LaTeX


Abbreviation Classification using machine learning

Question: I would like to classify abbreviations using machine learning. For example:
I have watermel. and I ask for user what is watermel.(my application context is about food). Then He classify as watermelon.
In other time, If Other user insert waterme. Is It exist a way to infer that waterme is the same as watermelon using machine learning techniques?
Comment: You could use Machine Learning in general to solve this problem, but I feel your problem will have a more elegant solution in NLP. Please check that out first. Things like semantic analysis etc
Answer: Look into this package for Python:
https://pypi.python.org/pypi/Distance/
You can use this to generate a numeric value representing the similarity between word.
Here is a similar post that should help:
https://stats.stackexchange.com/questions/123060/clustering-a-long-list-of-strings-words-into-similarity-groups
Additionally, a level up in complexity would be to use t-SNE on an array generated using word2vec (this is word embedding).  Examples and resources for this are:
https://www.codeproject.com/tips/788739/visualization-of-high-dimensional-data-using-t-sne
http://sebastianruder.com/word-embeddings-1/
Comment: Thaks for these references. I'll learn study about it.
Answer: Natural Language Processing/Text Mining may help you to find out a possible solution to your problem. Because, in your case, it is inevitable to handle them with lexical parsers and analysers.
Hope this may helps!!
Comment: Ty Man I'll search about NLP


How InfoPath data is stored in database?

Question: How InfoPath data is stored in database? Is it XML or some other format? Can I import excel data to an existing InfoPath web template?
Answer: An InfoPath form that is not based off a database cannot be submitted to a database out of the box. InfoPath forms generate XML files. These are often submitted to a SharePoint form library, but can also be saved other locations.
If you know the schema for your form, you could generate XML from an Excel file - there are third party tools that can do this (note, I work for a company that sells one) or you can write your own....
I think depending on the complexity of the schema, you could probably even use a somewhat complex Excel concatenate formula to create the XML string and just paste each result into a new file in a text editor and save as XML.
If you take a look at an InfoPath form's XML in a text editor, you will see there are processing instruction in it that reference the form template and indicate the file should be opened with InfoPath.


How to access sync'd Nextcloud files in termux

Question: I am syncing files to my phone (Fairphone 4) with Nextcloud, and wish to access these files using termux. Currently access is denied, is there a way to set this up to work other than rooting the device or is that the way forward?
Answer: Unfortunately Termux cannot pass SAF-based storage access (like you would do with a file explorer by selecting - for example - a file using Google Drive app).
But there is an alternative : Rclone.
Rclone can give you access to many and many online drives (including NextCloud). It is only a command-line utility.
To install it in Termux, simply run pkg in rclone.
Then, you need to set the remotes (= online drives) you want : rclone config. See the docs to know how to add remotes correctly.
Say you now have a remote with the name "myRemote", you can do whatever you want :

Copy a file to current local directory in Termux : rclone copy myRemote:file2Copy.txt .
List the files on the remote : rclone ls myRemote:
Etc...

The only drawback, is that you can only access to rclone remotes using a terminal.
There is a way to mount rclone remotes on the device, but you need to be rooted. Check this great answer here if you are interested.


How does belt of giant strength interact with wildshape?

Question: Assume I have a belt of giant's strength +2 on a lvl 5 druid. Does the form I shape into also get +2 strength?
Answer: First Answer -- If not Wild-Clasped/Wilding, no
So, there is another layer to this question, which is this:

Do my items work while I'm Wild Shaped?

The simple answer is, generally, no. Unless you get into things like Fangshields druids, Planar Shepherd, Master of Many Forms, or simply ape-ish forms (aka, any form that could feasibly wear the gear in the first place), most of them will not work while Wild-Shaped normally.
To make them work while Wild Shaped, you have to add either
1) Wilding Clasps from MIC (slotless, added to an item/slot, costs 4000 GP)
or
2) Wilding enchantment (only applicable to armor/shields/weapons, as far as I know).
A few druid-themed items will specifically state they work while Wild-Shaped (essentially having the Wilding quality), but Belt of Giant's Strength is not one of them.
Second Answer -- If it IS Wild-Clasped/Wilding, YES!
So, the fact is that because you retain your type when Wild-Shaped, literally anything that worked for you while in normal form (aside from things you literally could not use like a dagger or something) will also work on your Wild-Shape.
This is why wilding-clasps are essentially item-taxes for Druids, and also why the MIC rules for combining items is such a HUGE deal for Druids, because it maximizes the amount of stuff they can cram into a few slots that will be wild-clasped.
If you Wild-Clasp something, though, the general answer is that it will absolutely work in Wild-Shape!
As a bit of an addendum...
The SRD tells us that items you cannot use in Wild-Shape are either melded or dropped. If you assume a form that is humanoid...or a lot like a humanoid, chances are your items will be wearable.
The SRD also states that magic items can change size, so that's not a problem, thankfully.
In general, just think about the form, and use some logic. I love to play Planar Shepherds, which means most of my time is spent in Outsider forms. Now, some of these are really, really impossible to wear anything in, but most Outsiders are humanoid. Right now in a campaign I'm Wild-Shaped into a Kelvezu (type of demon).
In this case, my armor and cloak wouldn't be wearable because of my wings, but everything else would be wearable because the rest of the body isn't notably different from a Human (my character race). This means that some of the stuff I don't have wild-clasped, like my rod of lesser extension, are still hanging on my belt ready to be used. My armor and cloak are both wild-clasped, so they still work despite my wings.
If I were to take another favorite form, that of the Elder Viper Tree, then EVERYTHING would have to be melded unless it was wild-clasped/wilding because trees simply don't have shoulder slots, head slots, etc.
Comment: Unlike Alternate Form, Wild Shape melds all of your gear _even if_ your new shape could have worn it. (This clause is in the SRD, and was introduced in the same errata that made Wild Shape be based on Alternate Form.) Fangshields, Planar Shepherd, and MOMF  don't grant an exception to this either. And this rule isn't just a rare edge case, because most quadrupeds have all of the same item slots as humanoids; e.g. a wolf can still wear gloves, rings and bracelets on his paws (MIC p.219).
Comment: @topquark In the SRD, Wild Shaping *only* applies to animals, hence this reference -- in the eyes of the SRD/PHB, there AREN'T any forms that could wear gear normally (from my understanding of the MIC part you reference, in light of most other errata a wolf could wear those items, but it would be considered different slots....otherwise thinks like Gloves of Man wouldn't be necessary). Fanghsields, PlanShep, and MOMF all are from errata that was created later. In this case, I would interpret the Alternate Form analogy to be dominant since this is something beyond the scope of the SRD.


How to find name of currently-active network interface?

Question: I need to get the name of the network interface (e.g. eth0, wlan0) that is the currently-active one, the one sending and receiving traffic at the moment. When it's connected to WiFi, it would be wlan0 but when it's connected directly it would be eth0. Or something else, depending on the network devices on the system and which one is active. How can I find this out?
Answer: Open a terminal and run the command:
ifconfig

The active interface will have an IP address and transmitted and received bytes. Here is an example:
eth0  Link encap:Ethernet  HWaddr xx:a8:6b:fe:06:xx
      inet addr:192.168.1.14  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::eea8:6bff:fefe:696/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:449232 errors:0 dropped:0 overruns:0 frame:0
      TX packets:309483 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:633900275 (633.9 MB)  TX bytes:27944824 (27.9 MB)

Check if the ethernet interface is used:
ping -c3 -I eth0 www.google.com
ping: Warning: source address might be selected on device other than eth0.
PING www.google.com (188.8.131.52) from 192.168.1.100 eth0: 56(84) bytes of data.Wi-Fi
From Think410 (192.168.1.100) icmp_seq=1 Destination Host Unreachable
From Think410 (192.168.1.100) icmp_seq=2 Destination Host Unreachable
From Think410 (192.168.1.100) icmp_seq=3 Destination Host Unreachable

Verify that the wireless interface is used:
ping -c3 -I wlan0 www.google.com
PING www.google.com (22.214.171.124) from 192.168.1.100 wlan0: 56(84) bytes of data.
64 bytes from iad23s17-in-f20.1e100.net (22.214.171.124): icmp_seq=1 ttl=50 time=37.5 ms
64 bytes from iad23s17-in-f20.1e100.net (220.127.116.11): icmp_seq=2 ttl=50 time=36.8 ms
64 bytes from iad23s17-in-f20.1e100.net (126.96.36.199): icmp_seq=3 ttl=50 time=35.9 ms

So, obviously, internet traffic is currently routed through wlan0, my wireless interface.
It is possible to have both ethernet and wireless connected simultaneously. Normally, Network Manager will disallow it, preferring ethernet over wireless because it is generally faster and more secure. If one wanted to use ethernet for the LAN and wireless for the WAN (internet), one would typically remove NM and set all the details manually in /etc/network/interfaces.
Comment: In my system I see a large number of RX and TX packets for both eth0 and wlan0. I guess these numbers are not cleared when switching between wired/wireless networks? So I can't use that to tell. However, inet addr only appears for the one I'm currently connected to, so that looks like that could work. However, couldn't there be times when both show an IP? Like if I'm connected by a cable to another device but WiFi is to the internet? Is there a way to tell which of the 2 is sending you online?
Comment: Please see my edit.
Answer: A good way to figure out the interface where particular traffic would go is to use ip route get Just use say Google (184.108.40.206) or Cloudflare (22.214.171.124) DNS servers to figure out which interface internet traffic would go through:
$ ip route get 220.127.116.11
184.108.40.206 via 192.168.2.1 dev eth0 src 192.168.2.155 uid 0
    cache

Then you can do stuff like set a variable with the interface that is used for internet:
LANIFACE=$(ip route get 220.127.116.11 | grep -Po '(?<=dev\s)\w+' | cut -f1 -d ' ')

Then you can also get the IP address of the interface:
LANIP=$(ip addr show "$LANIFACE" | grep "inet " | cut -d '/' -f1 | cut -d ' ' -f6)

Don't forget the same method can also work for other networks, not just ones on the internet.
Comment: alternatively `ip route get 188.8.131.52  |grep -oP 'dev\s+\K[^ ]+'`
Answer: No need for ping to hunt-and-peck.  Use ip link; it has more germane info than ifconfig.  Each interface will report something like

LOOPBACK, meaning active but never goes external (wired or wireless)
NO-CARRIER, meaning external but no signal being generated
BROADCAST, meaning external and is active
LOWER-UP, meaning PHY is enabled

You can have two or more external interfaces with LOWER-UP but generally a bad idea.  Here's my laptop with loopback (notice LOWER_UP), down ethernet, wlan0 up and generating a signal, wlan4 (USB wifi) UP but NOT generating a signal, wlan4.mon monitor mode sniffing all stations on BSS (notice LOWER-UP).  wlan4.mon does not transmit.
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 24:b6:fd:24:59:b9 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 4c:eb:42:32:0c:9e brd ff:ff:ff:ff:ff:ff
26: wlan4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 00:26:f2:b3:d7:93 brd ff:ff:ff:ff:ff:ff
27: wlan4.mon: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UNKNOWN qlen 1000
    link/ieee802.11/radiotap 00:26:f2:b3:d7:93 brd ff:ff:ff:ff:ff:ffter code here

Answer: If you want a little more detail try jnettop this tool shows you detailed traffic monitoring in the terminal.
sudo apt-get install jnettop
once installed simply type jnettop in the terminal
Answer: nmcli device status might help.
Answer: If you have only one interface that is being used to reach internet, you can try the following commands.

ip route get 22.214.171.124| awk '{print $5}'|awk /./

The above will tell you about interface through which the traffic is routed.
In-order to get the ip of the interface you can do the following

ip a s ens33| grep -w inet|awk '{print $2}'

Here ens33 is the interface name that you found from the first command.
If you have multiple interfaces that can reach internet.
You can find the interfaces as follows.

route -n | grep -E  '^0.0.0.0'|awk '{print $8}'

The above will provide you the list of the interfaces with access to internet and active.
You can find the Ip's assigned to the interface as follows.

myinterf=$(route -n | grep -E  '^0.0.0.0'|awk '{print $8}') ; for i in $myinterf ; do ip a s ${i}| grep -w inet|awk '{print $2}' ; done

Note: You will be able to see only ipv4 address using grep -w 'inet', in-order to find ipv6 you need to enter the command as grep -w 'inet6'. The rest remains same.


Arcgis JS API WMS Layer zoom without basemap

Question: I have an OGC WMS resource which I am adding to a map without any basemap. To view this resource I have to zoom in, so I have decided to set a center point and zoom to this point.
The problem is that instead of zooming in to the point I have set, it zooms out  because the map has -1 zoom value.
I would like to know if someone knows any way to avoid this and set a real zoom value to the map.
Answer: When you set center and zoom via the map's constructor options, the map assumes web mercator and the de-facto standard map zoom levels. Probably the easiest way to do what you want is to use an extent instead of using center and zoom when creating your map.
There's a sample that let's you select your spatial reference and then prints the map's extent so you can create an extent from that.


What's special about the chosen people?

Question: Why are Jews called the chosen people?  What makes them special and different from everybody else?
Comment: "Why are people called 'orthodox Jews' calling themselves the chosen ones?" Citation? I've never heard of this.
Comment: Can you perhaps reword your question to be less harsh and offensive?  You might get fewer downvotes if you were asking a question and not making an accusation.
Answer: The term "chosen people" isn't something that orthodox Jews invented to label themselves, it is a textual reference to a status conferred by the divine (if one accepts the authority of the text in question). Why do Americans call America "the home of the brave"? Because there is a poem which uses that phrase about America and Americans see that poem as an accurate and authoritative statement about themselves.
Does this mean that America is "special" or just that Americans see it as having a particular position in their lives and their world view?
The term "chosen" seems to offend some people. And yet it doesn't mean "special" any more than a student who is "chosen" to go to an Ivy League college is "special" while someone going to any other school isn't. Or someone who feels a calling to go into politics vs. someone who stumbles into a life as a lawyer.
Comment: Thanks, it's only your personal view, or you can back it up with some proof from a holy book or something similar?
Comment: any proof from a faith based text would not be helpful if you don't see authority in the text. I could quote deut 7:7-8 but what good would that do?
Comment: Can you quote that?
Comment: yes, I can. לֹא מֵרֻבְּכֶם מִכָּל הָעַמִּים חָשַׁק יְהֹוָה בָּכֶם וַיִּבְחַר בָּכֶם כִּי אַתֶּם הַמְעַט מִכָּל הָעַמִּים
Comment: @Danno: Your answer isn't just for Derfder, but for everyone else who finds this while searching on the internet. If you feel you have something that will improve the answer, add it into the answer, even if you feel the asker won't accept it
Answer: noone is more "special" than anyone else. some people have different jobs to do. if a nonjew does what he's supposed to do, he's considered among the righteous of the nations and has completely fulfilled his purpose.
this audio explains it much better than i could. Three flaws of Man - the role of the Jews. by Rabbi Uziel Milevsky O.B.M. former chief rabbi of mexico
http://dafyomireview.com/audio/m04-3_flaws_of_man_and_role_of_jews.mp3
Comment: Please, provide some evidence

What's special about the chosen people?


Can I use a strange specialized killstreak weapon to fabricate a professional killstreak kit?

Question: Can I use a strange specialized killstreak weapon to fabricate a professional killstreak kit?
Comment: You should always *try* to include more information in your question body (Why do you want to do this? What have you tried so far? That kind of stuff).  Whether or not the question title is enough, short question bodies are almost always frowned upon.
Answer: Basing this answer off of https://wiki.teamfortress.com/wiki/Killstreak_Kit_Fabricator as well as when I created my own specialized and professional kits.
Long story short, you need to have it in Unique quality, as no other quality will fit the criteria for the fabricator. The easiest way to obtain them would be to buy an already killstreak or already specialized killstreak unique quality weapon off of the steam community market, as this is generally cheaper than buying the killstreak / specialized killstreak kit of one and applying it to your own item, only to then use that weapon in the fabricator.