Discovering all computers and their shares on local network in C#
In C# how do I get the list of local computer names like what one gets viewing the Network in windows explorer
Edited vs emitted - why one t vs two t's Why does "edited" have one "t" and  and "emitted" has two? "Edit" and "emit" are so similar in spelling and pronunciation.  I keep wanting to type "editted" for some reason. Ok, so I have made a .tmx file for my first level, but I am unsure how I would load it into my game. Currently I am iterating through an internal array to set the blocks, but I need to know how to load the .tmx file into the code.  Here is my World.java:  import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import javax.imageio.ImageIO; import java.io.*;  class World {     Image ground;     Block[] blocks = new Block[46];     int map[][] = {             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},             {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},         };     World() {         int enc = -1;         for (int i = 0; i &lt; map.length; i++) {             for (int j = 0; j &lt; map[i].length; j++) {                 if (map[i][j] == 1) {                     enc++;                     blocks[enc] = new Block(j * 32, i * 32, 32, 32, 1);                 } else if (map[i][j] == 2) {                     enc++;                     blocks[enc] = new Block(j * 32, i * 32, 32, 32, 2);                 }             }         }     } } Does Metal have to be Hemalurgically charged for Ruin to control someone? I've got a custom loop that I'm using to display some Real Estate listings that will be available within 60 days. I'm calling it with the following function:   &lt;?php  $sixtydays = date('Y/m/d', strtotime('+60 days')); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $query = new PostsOrderedByMetaQuery(array(   'post_type' =&gt; array('post', 'real-estate'),   'meta_key' =&gt; 'Time Available',   'meta_compare' =&gt; '&lt;=',   'meta_value' =&gt; $sixtydays,   'paged' =&gt; $paged,   'orderby_meta_key' =&gt; 'Price',   'orderby_order'    =&gt; 'ASC' )); ?&gt; &lt;?php while ($query-&gt;have_posts()) : $query-&gt;the_post(); ?&gt;   While the loop works great, I can't get it to paginate. It shows the first 10 (my default) posts but doesn't show the pagination. The only way to display all posts is to show them on one page by adding 'posts_per_page' =&gt; -1, I have similar loops on other pages that have no problem paginating. The only difference with this one is that there are two meta keys that are filtering the posts.   I'm using WP Page Navi for this and the rest of my pages. I'm closing the loop and adding the pagination using the following code:   &lt;?php endwhile; // End the loop. Whew. ?&gt; &lt;?php wp_pagenavi(); ?&gt; &lt;?php wp_reset_query(); ?&gt;   How can I go about fixing this? Controversy over verb choice in "neither you nor I {is/am/are} in control" Using Fermats prime numbers to prove that there is infinitely many prime numbers Limit of a Piecewise Function defined on Rationals and Irrationals How does LSTM prevent the vanishing gradient problem? LSTM was invented specifically to avoid the vanishing gradient problem. It is supposed to do that with the Constant Error Carousel (CEC), which on the diagram below (from ) correspond to the loop around cell.  (source: ) And I understand that that part can be seen as a sort of identity function, so the derivative is one and the gradient stays constant. What I don't understand is how it does not vanish due to the other activation functions ? The input, output and forget gates use a sigmoid, which derivative is at most 0.25, and g and h were traditionally tanh. How does backpropagating through those not make the gradient vanish ? From :      ‘We all believe, up at the Lodge, Rachael, that he will be freed from suspicion, sooner or later.’    ‘The better I know it to be so believed there, my dear,’ said Rachael, ‘and the kinder I feel it that you come away from there, purposely to comfort me, and keep me company, and be seen wi’ me when I am not yet free from all suspicion myself, the more grieved I am that I should ever have spoken those mistrusting words to the young lady. And yet I— ’   We usually use should have to say that something was not done, despite being desirable. But in this example, the mistrusting words were indeed spoken (earlier in the book). How would one explain the use of the should have construction then?   Would the following be fully equivalent to the above quote:     ‘We all believe, up at the Lodge, Rachael, that he will be freed from suspicion, sooner or later.’    ‘The better I know it to be so believed there, my dear,’ said Rachael, ‘and the kinder I feel it that you come away from there, purposely to comfort me, and keep me company, and be seen wi’ me when I am not yet free from all suspicion myself, the more grieved I am that I have spoken those mistrusting words to the young lady. And yet I— ’ Python: Find a substring in a string and returning the index of the substring I want to clear all previous commands from the history of my server. I used history -c and it seems all things are cleared but when I ssh to the server, all the commands are still there.  How can I clear them permanently? Install software from packages, or build it from source? Let $X$ and $Y$ be finite sets. Then the set $Y^X$ is finite and $\#(Y^X) = (\#Y)^{\#X}$.  I can see how to do it combinatorially. Let $y \in Y$. There are $\#(X)$ choices for such y to come from x, therefore we have $\#Y^{\#X}$ choices. I am not sure how to do it bijectively. WPF Binding to Grid Column Width I'm attempting to bind a DependancyProperty in one of my usercontrols to the Width property of a Column in a Grid.   I have code similar to this:  &lt;Grid x:Name="MyGridName"&gt;     &lt;Grid.ColumnDefinitions&gt;         &lt;ColumnDefinition x:Name="TitleSection" Width="100" /&gt;         &lt;ColumnDefinition Width="*" /&gt;     &lt;/Grid.ColumnDefinitions&gt;      &lt;Grid.RowDefinitions&gt;...&lt;/Grid.RowDefinitions&gt;      &lt;GridSplitter x:Name="MyGridSplitter" Grid.Row="0" Grid.Column="0" ... /&gt; &lt;/Grid&gt;   In a separate Usercontrol I have the followingDependancyProperty defined.  public static readonly DependencyProperty TitleWidthProperty = DependencyProperty.Register("TitleWidth", typeof(int), typeof(MyUserControl));  public int TitleWidth {     get { return (int)base.GetValue(TitleWidthProperty); }     set { base.SetValue(TitleWidthProperty, value); } }   I am creating instances of the Usercontrol in code, hence I have a binding statement similar to this :  MyUserControl Cntrl = new MyUserControl(/* Construction Params */); BindingOperations.SetBinding(Cntrl , MyUserControl.AnotherProperty, new Binding { ElementName = "objZoomSlider", Path = new PropertyPath("Value"), Mode = BindingMode.OneWay }); BindingOperations.SetBinding(Cntrl , MyUserControl.TitleWidthProperty, new Binding { ElementName = "TitleSection", Path = new PropertyPath("ActualWidth"), Mode = BindingMode.OneWay }); /* Other operations on Cntrl */   The first binding defined works fantastically, although that is binding to an actual UIElement (in this case a Slider), but the Binding to "TitleSection" (which is the ColumnDefinition defined in the Grid) fails. Putting a breakpoint in the code and doing a watch on "TitleSection" returns the expected object.   I am beginning to suspect that a x:Name'd ColumnDefinition can't be bound to. Can anyone suggest how I might be able to bind to the changing width of the first column in my grid?  EDIT #1 - To answer comments  The databinding 'fails' in the sense that with a breakpoint set on the setter for the TitleWidth property, and using the GridSplitter control to resize the first column, the breakpoint is never hit. Additionally, code I would expect to be fired when the DependancyProperty TitleWidth changes does not get executed.  The usercontrol is being created and added to a Stackpanel within the Grid in the Window_Loaded function. I would expect that the Grid has been rendered by the time the Usercontrols are being constructed. Certainly the x:Name'd Element TitleSection is watchable and has a value of 100 when they are being constructed / before the binding is happening.  EDIT #2 - Possibly something to do with this?  I've been having a sniff round the MSDN pages for the Grid ColumnDefinition documentation and have come across  but I can't get my head around how I can use this in a binding expression. I cannot use the associated GridLengthConverter as a converter in the binding code as it does not derive from IValueConverter.   I am leaning towards somehow binding to the ActualWidth property of one of the cells in the Grid object. It doesn't seem as clean as binding to the column definition, but at the moment I cannot get that to work. How to navigate to C drive in bash on WSL-Ubuntu? Editing old questions How do we know that $F = ma$, not $F = k \cdot ma$ Use worksheet name as a variable in a lookup Is there a way to indicate to  how/where to find (paths to)  tools such as python, nmap, php and so on?  I ask this because when I schedule a job using crontab -e, I always need to specify the full path of python, nmap and whatever other tool I want to use. Constructing $g$ holomorphic differentials on $\omega^3=(z-1) \cdots (z-8)$ Let us have a surface $X$ which satisfy the equation $\omega^3 = (z-1)(z-2)\cdots (z-8)$ It's stated in the task, that there are exactly $g$ holomorphic differentials on the curve. How can I find $g$ and construct them?  The genus $g$ of this curve (I tried to use Riemann-Hurwitz theorem)  The map $X(z,\omega) \to CP^1(\omega)$ has degree 3. and we have 8 branching points with 3 leaves at each. $\chi(Domain) = DegreeOfMap * \chi(Target) - \sum_{points}(BranchingLeaves - 1) $ $2-2g = 3 *(2) - 8*2 $ hence $ 12 = 2g$ and  $g = 6$ I know that in case of hyperelliptic curve there are $g-2$ (If i'm not mistaken) holomorphic differetials and they are of sort $\frac{z^k dz}{w}$. But the form of the curve equation was heavily used. UPD: there is a branhing point at $\infty$, because if we go around all points $ 1 \cdots 8$ at once, we get that cubic root of the right side is multiplied by $\exp{4 \pi /3}$ $2-2g = 3 *(2) - 9*2 $ hence $ 12 = 2g$ and  $g = 7$ (I hope that this is true)