default

PHP default document (index.php) displaying code as plain text in IIS7

Hi, I've recently setup PHP 5.2.9-2 on IIS 7 on Windows Server 2008 SP2. Most everything seems to be working fine -- PHP is running great, just about all PHP code runs perfectly... EXCEPT for default pages. Any default document (index.php) is not interpreted by PHP and the page merely displays the underlying PHP code in the browser. Be...

how do i change default browser using c# or batch file

title speaks it all. ...

[WPF/C#] Default ValueConverter for a binding

Is there a way to get WPF to automatically apply a Converter to all bindings of a specific type? I've seen this question, but it covers a different case (localisation) and thus has no satisfying answers. My problem: I've got model classes containing Commands, which I would like to bind to WPF Commands. Since the model classes are toolk...

Does Java support default parameter values?

I came across some Java code that had the following structure: public MyParameterizedFunction(String param1, int param2) { this(param1, param2, false); } public MyParameterizedFunction(String param1, int param2, boolean param3) { //use all three parameters here } I know that in C++ I can assign a parameter a default value. F...

Can you Create Your Own Default T where T is your own class

lets say I have the following public class A { private string _someField; public string SomeField { get { return _someField; } } } For some reason I am checking the default of this class and I would like to set the default for a class, just like a default of type int is 0, I would like in the above class for my default of Som...

Windows Forms: Multiple default buttons?

In a simple Guess-The-Number game I'm making, the user inputs a couple of numbers and hits a button. A second panel becomes enabled and the original one is disabled. The user now enters a number and hits another button, multiple times. Since the two panels will never be enabled at the same time, I'd like for both buttons to be "default",...

InstallShield 2009 basic MSI silent install: how to set "Repair" by default

Install shield premiere 2009: Basic MSI from command line typing setup.exe /s /v/qn installs silently. But if its installed once before it chooses "Modify" by default and doesn't go for replacing files. But i need to copy again the files. How to perform "Repair" on second silent install by default? ...

C#/.NET Server Path to default/index page

In my attempt to further future-proof a project I am trying to find the best way to retrieve the full path and filename of the index/default page in a web directory using C# and without knowing the web server's list of filename possibilities. 'Server.MapPath("/test/")' gives me 'C:\www\test\' ...so does: 'Server.MapPath(Page.ResolveUrl...

How do you change default stack size for managed executable.net

We have discovered that one of our auto generated assemblies is throwing a StackOverflowException on new(). This class has (bear with me please) 400+ simple properties that are initialised (most by default(string) etc) in a constructor. We notice that its fine on 64 bits but on 32 bits it goes bang! We need to test if it's reasonable ...

How do I tell my application which resx file to use when it is passed a culture it doesn't understand? (WPF)

Subject says it all. I have Resources.en-US.resx, Resources.de-DE.resx, etc. I don't ever want the basic Resources.resx file to be referenced. If someone passes me a language that I don't have a resx for I want it to drop back and use Resources.en-US.resx. Anyone? ...

Prevent default behavior in text input while pressing arrow up

I’m working with basic HTML <input type="text"/> text field with a numeric value. I’m adding JavaScript event keyup to see when user presses arrow up key (e.which == 38) – then I increment the numeric value. The code works well, but there’s one thing that bugs me. Both Safari/Mac and Firefox/Mac move cursor at the very beginning when I...

WPF : Define binding's default

Hi, In WPF, I would like to be able to template how my bindings are applied by default. For instance, I want to write : Text="{Binding Path=PedigreeName}" But it would be as if I had typed : Text="{Binding Path=PedigreeName, Mode=TwoWay, UpdateSourceTrigger=LostFocus, NotifyOnValidationError=True, ValidatesOnDataErrors=True, Valid...

Why should default parameters be added last in C++ functions?

Why should default parameters be added last in C++ functions? ...

Instantiate singleton object using Class.forName()?

I want to instantiate one instance of a class from the string name of the class. ( using Class.forName().newInstance(). ) Here's the problem: I want that instance to be a singleton.. I could do this using a singleton pattern, except that newInstance calls the default constructor for a class, and with a singleton, that constructor must ...

Is it safe to delete the 3 default databases created during a PostgreSQL install?

I installed a default installation of PostgreSQL 8.4 on Windows 2003 Server, using the one-click installer provided. Running psql -l for the first time, I noticed there are three databases installed by default: postgres, template0, and template1. Being security-minded, my initial reaction is to delete or change default configurations. H...

C++: member pointer initialised?

Code sample should explain things: class A { B* pB; C* pC; D d; public : A(int i, int j) : d(j) { pC = new C(i, "abc"); } // note pB is not initialised, e.g. pB(NULL) ... }; Obviously pB should be initialised to NULL explicitly to be safe (and clear), but, as it stands, what is the value of p...

How can default values in Sequel Models be set?

Given the code below, how can default values be defined for the Model. (let's say the default for :name should be 'Thing'). require 'pp' require 'sequel' DB = Sequel.sqlite DB.create_table :items do primary_key :id String :name end items = DB[ :items ] class Item < Sequel::Model end Item.create :name => 'foobar' Item.create ...

How do you pre-set values on the right-hand side of a Shuttle Item in Oracle APEX?

I've looked at numerous forums and tutorials, but it doesn't display the values on the right hand side of the shuttle. However, if I look at the Session values, it seems to set the values properly, it just doesn't show it in the Shuttle Item itself. I've done exactly what I found here: http://dgielis.blogspot.com/2008/01/apex-by-exampl...

Error setting a default null value for an annotation's field

Why am I getting an error "Attribute value must be constant". Isn't null constant??? @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface SomeInterface { Class<? extends Foo> bar() default null;// this doesn't compile } ...

How can I specify a printer other than the default printer?

I'd like to be able to specify two different printers for two different jobs. I'm using the following class to handle printing these, but regardless of what I do, the default printer is always the one that's printed to. Public Class Receipt : Inherits Printing.PrintDocument Private _font As Font = New Font("Courier", 8) Private _text As...