Search Results

Search found 6 results on 1 pages for 'dtown'.

Page 1/1 | 1 

  • Which c# project files should I version control?

    - by DTown
    I have a project I'm looking to manually manage via perforce version control as I only have the Express edition. What I'm looking for is which files should be excluded in the version control as locking many of the files can result in a problem for visual studio compiling and debugging. What I have, so far, included. .cs files (except properties folder) .resx files .csproj files Excluded bin folder obj folder Properties folder .user file Let me know if there is something more that should be included that I have excluded or if there is a better way to do this.

    Read the article

  • Setting default radio button on edit

    - by DTown
    So I'm trying to setup scaffolding to use radio buttons for the format button. It definitely works to add a new and edit. The problem is when I go to edit an entry the correct radio button isn't selected by default. <% form_for(@cinema) do |f| %> <%= f.error_messages %> <p> <%= f.label :title %><br /> <%= f.text_field :title %> </p> <p> <%= f.label :director %><br /> <%= f.text_field :director %> </p> <p> <%= f.label :release_date %><br /> <%= f.date_select :release_date, :start_year => 1900, :end_year => 2010 %> </p> <p> <%= f.label :running_time %><br /> <%= f.text_field :running_time %> </p> <p>Blockquote <%= f.label :format %><br /> <%= f.radio_button :format, "black & white" %> <%= label :format_bw, "Black & White" %> <%= f.radio_button :format, "color" %> <%= label :format_color, "Color" %> </p> <p> <%= f.submit 'Create' %> </p> <% end % Controller def edit @cinema = Cinema.find(params[:id]) end Model class Cinema < ActiveRecord::Base validates_presence_of :title, :on => :create validates_presence_of :title, :on => :update # validates_presence_of :director, :on => :create validates_presence_of :director, :on => :update # validates_presence_of :release_date, :on => :create validates_presence_of :release_date, :on => :update # validates_presence_of :format, :on => :create validates_presence_of :format, :on => :update # validates_presence_of :running_time, :on => :create validates_presence_of :running_time, :on => :update validates_numericality_of :running_time, :on => :create, :on => :update, :less_than_or_equal_to => 300, :greater_than => 0 end

    Read the article

  • C# 4.0: Can I use a Color as an optional parameter with a default value?

    - by DTown
    public void log(String msg, Color c = Color.black) { loggerText.ForeColor = c; loggerText.AppendText("\n" + msg); } This results in an error that c must be a compile-time constant. I've read up on this a little and most examples are dealing with strings and ints. I've figured out I can use the colorconverter class but I'm not sure it will be very efficient. Is there a way to just pass a basic color as an optional parameter? public void log(String msg, String c = "Black") { ColorConverter conv = new ColorConverter(); Color color = (Color)conv.ConvertFromString(c); loggerText.ForeColor = color; loggerText.AppendText("\n" + msg); }

    Read the article

  • Random RAM usage amounts

    - by DTown
    I was hoping someone could explain why my application when loaded uses varying amounts of RAM. I'm speaking about a compiled version that uses the exe directly. It's a pretty basic applications and there are no conditional branches in the startup of the application. Yet every time I start it up the RAM amount varies from 6MB-16MB. I know it's on the small end of usage anyways but I'm curious of why this happens.

    Read the article

  • Performing periodic audits and best practice

    - by DTown
    I'm doing a windows form and would like an audit task to happen every 30 seconds. This audit is essentially checking a series of services on remote computers and reporting back into a richtextbox the status. Current I have this running in an endless background thread and using an invoker to update the richtextbox in the main form. Is this best practice? If I made an endless loop in my main form that would prevent any of my buttons from working, correct? I'm just curious if every time I want to create a periodic audit check I have to create a new thread which checks the status or file or what have you?

    Read the article

  • 2 Controls, 1 event

    - by DTown
    I have 2 input textboxes that take a host or IP. When the user leaves an input box an event is fired that checks the input to see if it is actually a live computer. The results are then put into the appropriate label. My question is, should I be using separate events for each input box, since they update different labels? Or, can I use 1 event and check who the caller was, then update the appropriate label?

    Read the article

1