default

default selected option for html select using javascript in IE

Hello I have a select element and I am trying to set a default option for that select element. But my code isn't working in IE. Is there any way around for this?? if(objOption.value == selectedoption) { alert(objOption.value); objOption.defaultSelected = true; } I am able to retreive the option, and its value, but am unable to set the...

Using AppleScript to send mail attachment through default email client

Is it possible in any way to send an email attachment through the user's default email client using AppleScript? I'm assuming there is no easy way of doing this, as the programs themselves have to implement AppleScript and every email client will implement it differently and require a different script for sending an email with an attachm...

Why no initial values on {get;set;} accessors (VS 2010 C#)

This must have been asked many times but I cannot find it....sorry... Why is the following not permitted? public string MyString = "initial value" {get; private set;} (Visual C# Express 2010) ...

What is default storage class for global variables?

Hi, What is default storage class of a global variable? While searching on web I found, some sites say it is static. But, static means internal linkage and the variable can not be available outside the file scope i.e it should not be available to other object files. But, they still can be accessed to other files using declarations like...

C#: new file() - where is the root save location?

If i make the call File myFile = new File('myfile.txt'); where is does this get saved to? ...

How to create a default method in SpringMVC using annotations?

I can't find a solution to this, and it's driving me crazy. I have @Controller mapped that responds to several methods using @RequestMapping. I'd like to tag one of those methods as default when nothing more specific is specified. For example: @Controller @RequestMapping("/user/*") public class UserController { @RequestMapping("l...

Change default font type/size in TinyMCE

How do you change the default font type and font size in TinyMCE? I'm using the advanced skin and I've changed the body, td, pre style in default/content.css but it still doesn't change. ...

Do all objects have a default value?

Do all objects have a default value? Example; Guid guid = default(Guid); Gives; 00000000-0000-0000-0000-000000000000 DateTime dt = default(DateTime); Gives; 01/01/0001 00:00:00 Is this true for all objects, do all objects give some value as a default? I'm right in assuming yes...? ...

Set a default value to a property and make it serializable.

Hi, I need to set a default value for a property, but I can't do it like this: private int prop = 1; public Prop { get {return prop;}... } Because I need to serialize this class, and if I do it, I loose the default value. Exists any solution that works after the serialization and before, adding an attribute to the property or somet...

[django] How do I override a default value of a form?

Can someone help me here? My form looks like this: class RecieveLineForm(forms.ModelForm): purchaseorderline = forms.IntegerField(widget=forms.HiddenInput()) rl_quantity = forms.IntegerField(label='Quantity') class Meta: model = RecieveLine Now, I need to set a default value for my purchaseorderline which is origi...

What is an iterator's default value?

For any STL container that I'm using, if I declare an iterator (of this particular container type) using the iterator's default constructor, what will the iterator be initialised to? For example, I have: std::list<void*> address_list; std::list<void*>::iterator iter; What will iter be initialised to? ...

Change Default "Default.aspx" to "Index.aspx" on Visual Studio 2010

Whenever I create a new Web Form on Visual Studio 2010, the default name is always "Default.aspx". This is a slight pain as I'm having to change it to "Index.aspx" each time. How can I change this so that "Index.aspx" is the default name? Thanks. ...

Localization of Default.png is not working

Hi I wonder if anyone has encountered the same problem and how they solve it. I want to localize Default.png so I do the following steps which from what I understand should be the correct way (please correct me if I'm wrong). Select Default.png in xcode Command-I to Get Info Click on Make File Localizable Go back to General Tab (wh...

C++ Template Default Constructor

Hi there! I got a little problem with templates: template <typename T> T Func(){ std::string somestr = ""; // somestr = ... if (somestr != ""){ return boost::lexical_cast<T>(somestr); } else{ T ret; // warning: "ret may be uninitialized in this function" return ret; } } If this functio...

jboss 5 changing default port

Hi everyone I am trying to change the default port on my jboss server to port 80. i have had a look around the web and i have had suggestions of editing this file jboss5\server\default\deploy\jbossweb.sar\server.xml which is fine. changing this file alone still does not fix the issue. There have also been suggestion to also change thi...

Adobe AIR default browser action

I am working on air project based on html/javascript support. I have created undo/redo system on javascript classes, but it is interfered by browser (webkit) own undo(ctr+z) action (it focuses on last modified input element). Can I somhow turn off browser default behavior? ...

How to change( and later restore) default context menu in textbox

Hi I wanted to change default textbox context menu, so I created my own menu and them I assigned it like that texbox.ContextMenu = myContextMenu However I don't know how to restore default textbox menu (in a runtime). I need myContextMenu to show only when I click textbox with right mouse button (while holding Control button). In othe...

setting html parameter option dropdown value via url

Hi, I would like to set the default of a drop-down menu of a webpage by passing the default value in the url. Id like to put a link on a another webpage to this site where the: "I would like my contribution to go to:" option is set to Pakistan: moonsoon floods e.g. by doing something like: http://donate.ifrc.org/?desc=Pakistan: mon...

Macros as default param for function argument

Hello, I'm writing logger file. I'd prefer to use macros _FUNCTION_ there. I don't like the way like: Logger.write("Message", __FUNCTION__); Maybe, it's possible to make something like: void write(const string &message, string functionName = __FUNCTION__) { // ... } If not, are there any ways to do that stuff not by hands (I mea...

Overriding default value in derived class (c#)

If i have an accessor and default property in a base class as follows: class base{ protected int _foo = 5; public int foo {get{return _foo;}set{_foo = value;}} } Then I derive this class, is it possible to override the default value of _foo? class derived:base{ // foo still returns 5? protected new int _foo = 10; } ...