Search Results

Search found 64 results on 3 pages for 'joan natalie'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • Converting from a string to boolean in Python?

    - by Joan Venge
    Does anyone know how to do convert from a string to a boolean in Python? I found this link. But it doesn't look like a proper way to do it. I.e. using a built in functionality, etc. EDIT: The reason I asked this is because I learned int("string"), from here. I tried bool ("string") but always got True.

    Read the article

  • Why is Microsoft not developing a Halo-like next gen title using C#? [closed]

    - by Joan Venge
    The question might look subjective but considering Microsoft: Owns the Xbox 360 platform Owns the Windows platform Have their own game studio (MGS) Own other 3rd party developers Is a major publisher makes me wonder why Microsoft doesn't push their flagship language to prove that not only you can cut down significant development time, and therefore money, but also show that you can release a next gen title where the real time interactivity doesn't suffer. If Microsoft were to do this once, I am sure many AAA developers would jump on that wagon too.

    Read the article

  • How to get checked items in a WPF ListBox?

    - by Joan Venge
    I have a WPF ListBox where I have checkboxes, but what's the way to get the list of items that are checked? The ListBox is data binded to a Dictionary<T>. Here is the XAML: <Window x:Class="WpfApplication.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid Margin="10"> <ListBox ItemsSource="{DynamicResource Nodes}" Grid.IsSharedSizeScope="True" x:Name="MyList"> <ListBox.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition SharedSizeGroup="Key" /> <ColumnDefinition SharedSizeGroup="Name" /> <ColumnDefinition SharedSizeGroup="Id" /> </Grid.ColumnDefinitions> <CheckBox Name="NodeItem" Click="OnItemChecked"> <StackPanel Orientation="Horizontal"> <TextBlock Margin="2" Text="{Binding Value.Name}" Grid.Column="1"/> <TextBlock Margin="2" Text="-" Grid.Column="2"/> <TextBlock Margin="2" Text="{Binding Value.Id}" Grid.Column="3"/> </StackPanel> </CheckBox> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Grid> </Window>

    Read the article

  • Immutability of structs

    - by Joan Venge
    I read it in lots of places including here that it's better to make structs as immutable. What's the reason behind this? I see lots of Microsoft-created structs that are mutable, like the ones in xna. Probably there are many more in the BCL. What are the pros and cons of not following this guideline?

    Read the article

  • Best disassembler tool for the .NET reflector?

    - by Joan Venge
    What's the best disassembler tool for the .NET reflector? By best I mean, saving a .NET assembly in a disassembled state in most readable, most likely to compile with fewer changes. The current one I use doesn't show simplified enumeration but shows the full IEnumerable implementations with MoveNext, etc with member names like: this.<4_state CS$<9_CachedAnonymousMethodDelegate3 Btw I am not trying to steal code, just trying out certain things on an already existing assembly instead of writing a similar thing from scratch. In the end, it's what I will learn from this that will stay, not the modified assembly.

    Read the article

  • How to have a transparent number on top of a winform?

    - by Joan Venge
    So I have a winform that has some winforms controls on it. But in the center of it, I want to show a transparent number on top of everything. Say 60 pixels size. I tried a label and even tried to create a custom control but the transparency didn't work. Any ideas how to do this? This number will change programmatically at runtime several times.

    Read the article

  • How does the method overload resolution system decide which method to call when a null value is passed?

    - by Joan Venge
    So for instance you have a type like: public class EffectOptions { public EffectOptions ( params object [ ] options ) {} public EffectOptions ( IEnumerable<object> options ) {} public EffectOptions ( string name ) {} public EffectOptions ( object owner ) {} public EffectOptions ( int count ) {} public EffectOptions ( Point point ) {} } Here I just give the example using constructors but the result will be the same if they were non-constructor methods on the type itself, right? So when you do: EffectOptions options = new EffectOptions (null); which constructor would be called, and why? I could test this myself but I want to understand how the overload resolution system works (not sure if that's what it's called).

    Read the article

  • How to bind a List to a WPF treeview using Xaml?

    - by Joan Venge
    I don't know how to bind a List of Drink to a WPF TreeView. struct Drink { public string Name { get; private set; } public int Popularity { get; private set; } public Drink ( string name, int popularity ) : this ( ) { this.Name = name; this.Popularity = popularity; } } List<Drink> coldDrinks = new List<Drink> ( ){ new Drink ( "Water", 1 ), new Drink ( "Fanta", 2 ), new Drink ( "Sprite", 3 ), new Drink ( "Coke", 4 ), new Drink ( "Milk", 5 ) }; } } I have searched the web, for instance saw here. But what's this even mean: ItemsSource="{x:Static local:TreeTest.BoatList}" x:? static? local? How do you specify a collection in your code in the xaml?

    Read the article

  • How to setup a WPF datatemplate in code for a treeview?

    - by Joan Venge
    struct Drink { public string Name { get; private set; } public int Popularity { get; private set; } public Drink ( string name, int popularity ) : this ( ) { this.Name = name; this.Popularity = popularity; } } List<Drink> coldDrinks = new List<Drink> ( ){ new Drink ( "Water", 1 ), new Drink ( "Fanta", 2 ), new Drink ( "Sprite", 3 ), new Drink ( "Coke", 4 ), new Drink ( "Milk", 5 ) }; } } So that I can see the Name property for treeview item names.

    Read the article

  • parsing a xml to get some values

    - by Joan Silverstone
    Hello, i have this xml: http://www.managerleague.com/export_data.pl?data=transfers&output=xml&hide_header=0 These are player sales from a browser game. I want to save some fields from these sales. I am fetching that xml with curl and storing on my server. Then do the following: $xml_str = file_get_contents('salespage.xml'); $xml = new SimpleXMLElement($xml_str); $items = $xml->xpath('*/transfer'); print_r($items); foreach($items as $item) { echo $item['buyerTeamname'], ': ', $item['sellerTeamname'], "\n"; } The array is empty and i cant seem to get anything from it. What am i doing wrong?

    Read the article

  • One class per file rule in .NET?

    - by Joan Venge
    I follow this rule but some of my colleagues disagree with it and argue that if a class is smaller it can be left in the same file with other class(es). Another argument I hear all the time is "Even Microsoft don't do this, so why should we?" What's the general consensus on this? Are there cases where this should be avoided?

    Read the article

  • how to determine if forum has new posts

    - by Joan Silverstone
    Hey, i am coding a small php forum from scratch and would like to show readers what posts he hasnt read yet and what forum categories have unread posts since this visit, pretty much how phpbb or invision boards work. How do i approach this, cookies? phpbb doesnt seem to use cookies for this, not very a good idea do have a cookie for each post... maybe use css visited attribute? but i dont see how would that work if a new post pops up. Thanks.

    Read the article

  • Which one has a faster runtime performance: WPF or Winforms?

    - by Joan Venge
    I know WPF is more complex an flexible so could be thought to do more calculations. But since the rendering is done on the GPU, wouldn't it be faster than Winforms for the same application (functionally and visually)? I mean when you are not running any games or heavy 3d rendering, the GPU isn't doing heavy work, right? Whereas the CPU is always busy. Is this a valid assumption or is the GPU utilization of WPF a very minor operation in its pipeline?

    Read the article

  • git merge, git rebase none seems to work, should I delete my github fork and refork from the upstream master?

    - by Joan Yin
    I have to confess my github sins. 4 month ago, I forked a upstream repo, without knowing much of git and pull request, i did some work on master branch locally, later on I realized the mistake, created a new branch, and squashed the changes to one and successfully send a PR later from that branch. the PR is accepted, and I moved on. Now I need to submit another PR. But my master branch is so messed up, when I do merge, or rebase, there are so many mistakes. I probably committed a few more sins this morning. I have been battling this for the whole morning now. so it comes to the point that I want a clean start. Can I delete the github fork and refork from the upstream master? What are the correct steps?

    Read the article

  • Class.Class vs Namespace.Class for top level general use class libraries?

    - by Joan Venge
    Which one is more acceptable (best-practice)?: namespace NP public static class IO public static class Xml ... // extension methods using NP; IO.GetAvailableResources (); vs public static class NP public static class IO public static class Xml ... // extension methods NP.IO.GetAvailableResources (); Also for #2, the code size is managed by having partial classes so each nested class can be in a separate file, same for extension methods (except that there is no nested class for them) I prefer #2, for a couple of reasons like being able to use type names that are already commonly used, like IO, that I don't want to replace or collide. Which one do you prefer? Any pros and cons for each? What's the best practice for this case? EDIT: Also would there be a performance difference between the two?

    Read the article

  • Secrets of delivering .NET size large products?

    - by Joan Venge
    In software companies I have seen it's really hard to work on very large products where everything depends on everything else. For instance Microsoft works on C#, F#, .NET, WPF, Visual Studio where these things are interconnected. I don't know how many people are involved, but if it's in 100s, how do they keep in sync with everything, so they design and implement features without conflicting with other dependencies and future plans of other products? I am wondering that if MS is able to do this, they must have a very good system. Any guidelines or secrets for MS or non-MS very large software product delivering?

    Read the article

  • How to format complex chained Linq statements for readibility?

    - by Joan Venge
    I have some code like this: var effects = xElement.Elements ( "Effects" ).Elements ( "Effect" ).Select ( e => new Effect ( ( EffectType ) Enum.Parse ( typeof ( EffectType ), ( string ) e.Elements ( "Type" ).FirstOrDefault ( ) ), e.Elements ( "Options" ).Any ( ) ? e.Elements ( "Options" ).Select ( o => ( object ) o.Elements ( "Option" ).Select ( n => n.Value ).First ( ) ) : null ) ) .ToList ( ); But currently this doesn't look as readable and I am not sure where I should add a new line and/or indent for readability. Any suggestions I could use to make consistent, readable linq blocks?

    Read the article

  • How to bind WPF TreeView to a List<Drink> programmatically?

    - by Joan Venge
    So I am very new to WPF and trying to bind or assign a list of Drink values to a wpf treeview, but don't know how to do that, and find it really hard to find anything online that just shows stuff without using xaml. struct Drink { public string Name { get; private set; } public int Popularity { get; private set; } public Drink ( string name, int popularity ) : this ( ) { this.Name = name; this.Popularity = popularity; } } List<Drink> coldDrinks = new List<Drink> ( ){ new Drink ( "Water", 1 ), new Drink ( "Fanta", 2 ), new Drink ( "Sprite", 3 ), new Drink ( "Coke", 4 ), new Drink ( "Milk", 5 ) }; } } How can I do this in code? For example: treeview1.DataItems = coldDrinks; and everything shows up in the treeview.

    Read the article

  • Is C# compiler not reporting all errors at once at each compile?

    - by Joan Venge
    When I am compiling this project, it show like 400+ errors in the Error List window, then I go to error sites, fix some, and the number goes to say 120+ errors, and then after fixing some more, the next compile reports like 400+ again. I can see that different files are coming in in the Error List window, so I am thinking the compiler aborts after a certain number of errors? If so, what's the reason for this? Is it not supposed to gather all the errors that are present in the project even if they are over 10K+?

    Read the article

  • Simple line matching using Regex

    - by Joan Venge
    I have this string stream: "do=whoposted&amp;t=1934067" rel=nofollow>61</A></TD><TD class=alt2 align=middle>5,286</TD></TR><TR><TD id=td_threadstatusicon_1911046 class=alt1><IMG id=thread_statusicon_1911046 border=0 alt="" src="http://url.com/forum/images/statusicon/thread_new.gif"> </TD><TD class=alt2><IMG title=Node border=0 alt=Node src="http://url.com/forum/images/icons/new.png"></TD><TD id=td_threadtitle_1911046 class=alt1 title="http://lulzimg.com/i14/7bd11b.jpg &#10; &#10;Complete name : cool-thread...."><DIV><A id=thread_gotonew_1911046 href="http://url.com/forum/f80/cool-topic-new/"><IMG class=inlineimg title="Go to first new post" border=0 alt="Go to first new post" src="http://url.com/forum/images/buttons/firstnew.gif"></A> [MULTI] <A style="FONT-WEIGHT: bold" id=thread_title_1911046 href="http://url.com/forum/f80/cool-topic-name-1911046/">Cool Topic Name</A> </DIV><DIV class=smallfont><SPAN style="CURSOR: pointer" onclick="window.open('http://url.com/forum/members/u2031889/', '_self')">m3no</SPAN> </DIV></TD><TD class=alt2 title="Replies: 11, Views: 1,554"><DIV style="TEXT-ALIGN: right; WHITE-SPACE: nowrap" class=smallfont>Today <SPAN class=time>08:04 AM</SPAN><BR>by <A href="http://url.com/forum/members/u1131830/" rel=nofollow>karetsos</A> <A " The lines I am interested are similar to this: <A style="FONT-WEIGHT: bold" id=thread_title_1911046 href="http://url.com/forum/f80/cool-topic-name-1911046/">Cool Topic Name</A> From here all I am trying to extract are: Thread id: 1911046 (could be from either location in the string) Thread name: "Cool Topic Name" Thread link: "http://url.com/forum/f80/cool-topic-name-1911046/" Currently I use this: Regex pattern = new Regex ( "<A\\s+href=\"([^\"]*)\">([^\\x00]*?)\\s+id=thread_title_(\\S+)</A>" ); MatchCollection matches = pattern.Matches ( doc.ToString ( ) ); foreach ( Match match in matches ) { int id = Convert.ToInt32 ( match.Groups [ 1 ].Value ); string name = match.Groups [ 3 ].Value; string link = match.Groups [ 2 ].Value; ... } I would appreciate if someone can help me fix the pattern to match it. This used to work but it returns 0 matches.

    Read the article

< Previous Page | 1 2 3  | Next Page >