I have WCF service hosted as windows service, I am trying to get clients (WPF client) Mac address at server end (WCF side). I have tried using following line of code but it gives me IP address of client that too in ::1 format. RemoteEndpointMessageProperty prop = OperationContext.Current.IncomingMessageProperties[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty; prop.Address is ::1 How can I get client Mac address so that I can differentiate among the client hitting my service. There could be scenarios where clients under same network may give me same IP address and that is reason I am looking for Mac address to identity client's call.
Apparently you can easily obtain a client IP address in WCF 3.5 but not in WCF 3.0.  Anyone know how?
Calculating polygon area within polygons in QGIS? I am new to QGIS - I want to estimate the area of the reef under a polygon grid. My shapefiles are already in meters, however I am having a hard time calculating the area under the grid layer. Attached are the photos. I want to calculate the total area of the bold black polygons (reefs) under each grid square (image 2). How much reef is inside each square, for example, grid1: 25 sq.km, grid 1 sq.km, etc. Each reef polygon has its corresponding area in the layer attribute table.    ADDITIONAL PHOTO: RED IS THE REEF  THE ATTRIBUTES OF THE REEF LAYER Downgrade Windows 7 Ultimate to Home Premium without a clean install Currently I've got an installation of Windows 7 Ultimate x64. I would like to downgrade to Windows 7 Home Premium x64 without a clean install. I've got a (legal) retail disc and tried the following tricks:        Still the Windows setup keeps telling me I can't upgrade because I've got a higher version installed (Ultimate). The trick seems dead. Does anyone know a way to change from Ultimate to Home Premium without the hassle of a clean install? When to Garbage Collect Grub: reboot to specific kernel I'd like to ask for help getting grub-reboot to work.  The theory: According to  (and other sources) I should be able to choose the kernel for the next reboot, using grub-reboot. However, this does not work for me; grub always boots to the default kernel.  Here's what I tried:  $ grep GRUB_DEFAULT /etc/default/grub GRUB_DEFAULT=saved $ grep "menuentry " /boot/grub/grub.cfg  menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f3a807d1-3fd6-4970-b741-5382e9801060' {     menuentry 'Ubuntu, with Linux 4.4.0-43-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-43-generic-advanced-f3a807d1-3fd6-4970-b741-5382e9801060' {     menuentry 'Ubuntu, with Linux 4.4.0-43-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-43-generic-recovery-f3a807d1-3fd6-4970-b741-5382e9801060' {     menuentry 'Ubuntu, with Linux 4.4.0-36-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-36-generic-advanced-f3a807d1-3fd6-4970-b741-5382e9801060' {     menuentry 'Ubuntu, with Linux 4.4.0-36-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-36-generic-recovery-f3a807d1-3fd6-4970-b741-5382e9801060' {  # Version 1, using the name $ sudo grub-reboot "Ubuntu, with Linux 4.4.0-36-generic"  # Version 2, using the id $ sudo grub-reboot gnulinux-4.4.0-36-generic-advanced-f3a807d1-3fd6-4970-b741-5382e9801060  # Version 3, counting $ sudo grub-reboot 3   Neither of these commands seem to have an effect; after reboot, I always end up with the 4.4.0-43 kernel.  Note: This is on Ubuntu 16.04 Xenial. It is a server machine and I don't have access to the console during boot, so I can't look at the grub menu :( What is necessary and/or sufficient for polynomials to provide isomorphic quotient rings? Iterating through a Collection, avoiding ConcurrentModificationException when removing objects in a loop We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection&lt;Integer&gt; l = new ArrayList&lt;&gt;();      for (int i = 0; i &lt; 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get. Split polygons into equal areas within each region I've a set of regions within a city. I'd like to split each region into five subregions and then get the centroid of each one of them.  I know how to make a vector grid, but the problem I have is that the generated points are not taking into account the regions, they're only related to the general map.  I have this:    And I want to split each region in five equal size areas. Something like this:    I'd like to build a visualization similar to this one: . In order to accomplish that, I need to split each region, because the original ones are pretty big. What is it called when a non-verb is used as a verb? This is in very common use on the internet. I just read this:     "[The] hotel employee walks in, I say "uh, puppy" and she just NOPEd the [heck] out of the room."   This is often done by adding 'd to the word. Affiliation for a retiree This question is similar to   and  except that I am a retiree.  I intend to submit a paper to a journal without mentioning any affiliation because I am no longer employeed. I have been thinking about a footnote in the paper indicating I am a retiree from my former employer for two reasons: I am receiving pension from the company pension fund and it is a well-known company in U.S. Using their name may make me look good. On the other hand, I feel like it's cheating because I am not their employee anymore. Is there an comparison of the various mapping libraries for Android? I am currently looking at the various libraries that I can use to show a map in my custom Android App. I have found several like Mapsforge, OSMDroid, ArcGIS runtime for Android, Google Maps for Android and so on. I'm sure that I am missing a few.   Is there a comparison chart somewhere about the differences in functionalities and pros and cons of each one?   If there isn't one, we could make this question community wiki, to serve alongside  &amp; . How many ways to arrange people on a bench so that no woman sits next to another woman? Initializing a member array in constructor initializer Support for N-Gons (polygons consisting of more than 4 vertices) has been in Blender for a while now, but many of us still may not know when to use them, and how to do so effectively.  In what situations do N-Gons really come in handy? When should they be just plain left out? Do they have any place in finished models? Should I use 'or' or 'nor' after a negative statement? Existence of elements of order $p^k$ in a finite group By Cauchy's theorem, if a prime number $p$ divides the order of a group $G$, then there is an element $g$ in $G$ whose order is $p$. In addition, if $|G|$ admits a prime decomposition with a factor $p^k$, then Sylow's theorem tells us that a subgroup of order $p^k$ must exist.   My question is the following. If $|G|$ admits a prime decomposition with a factor $p^k$, does this imply that an element of order $p^k$ must exist in $G$?   Update: As explained in Mindlack's answer (among others), the implication does not hold and simple counterexamples exist. In the comments, Mindlack discusses special cases where such an element exists. Set::setraw error in implementation of bisection method What is the best way to solve modular arithmetic equations such as $9x \equiv 33 \pmod{43}$? What is the best way to solve equations like the following:  $9x \equiv 33 \pmod{43}$  The only way I know would be to try all multiples of $43$ and $9$ and compare until I get $33$ for the remainder.  Is there a more efficient way ?   Help would be greatly appreciated! Is there a way to run Python on Android? We are working on an  version and this platform has a nice Python API..  However, there is nothing official about Python on Android, but since  exists, is there a way to let the snake and the robot work together?? Are there any clones/alternatives for running a Stack Exchange style Q&A site? How can I invest in country A to take advantage of their great interest rate while I live in country B? If I live in the US, for example, where current interest rates are practically nil, how can I take advantage of the fact that ?