default-value

Write Conflicts - even with me.dirty

In an application that I am writing, I am getting Write Conflicts when I use VBA code to change the value of a checkbox on a form. I have tried inserting the following code into the events that have VBA changing the values of any object on the form: If Me.Dirty Then Me.Dirty = False End If But the problem persists - as if the rec...

Updates to Records not allowed - Write Conflict

This stems from a previous question I asked - about a write conflict with a form, but the problem seems to be originating from the fact that I can update existing records in a linked table provided by one System DSN, but not another linked table provided by another DSN (different database) - allowing me to enter records at first, but the...

C# Variable Initialization Question

Good Day, Is there any difference on whether I initialize an integer variable like: int i = 0; int i; Does the compiler or CLR treat this as the same thing? IIRC, I think they're both treated as the same thing, but I can't seem to find the article. coson ...

Is it possible to have a default parameter for a mysql stored procedure?

I have googled this and keep coming up with "No it is not possible" but these posts were dated 2005-2007 so I'm wondering if this has been changed. A code example: CREATE PROCEDURE `blah` ( myDefaultParam int = 0 -- This breaks the code for some reason ) BEGIN -- Do something here END One of the solutions has been to pass null and...

How do you deal with the fact that default parameters are not possible for Mysql SPs?

Any Ideas? I asked the question "Is it possible to have a default parameter for a mysql stored procedure?" today and the answer was a very strong "no this is not possible." So my next question then is how do you as a php/mysql developer handle this problem? Do you pass null and in the SP have an IF block that sets the variable if its nu...

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...

What's the default value of the Hibernate property hibernate.jdbc.factory_class?

I want to provide a custom Batcher for Hibernate to use (for this reason: http://stackoverflow.com/questions/83093/hibernate-insert-batch-with-postgresql), but I want to create a modification of whatever it's already using (BatchingBatcher or NonBatchingBatcher). What's the default value of hibernate.jdbc.factory_class, or how can I fig...

.NET MVC - Default .onError handler for javascript?

Hi, is it possible to set a default .OnError handler for AjaxOptions in ActionLinks etc. ? ...

How to populate/instantiate a C# array with a single value?

I know that instantiated arrays of value types in C# are automatically populated with the default value of the type (eg false for bool, 0 for int, etc etc). Is there a way to autopopulate an array with a seed value that's not the default? Either on creation or a built in method afterwards (I believe Java has something like Array.Fill() ...

how to set default method argument values?

Hi, Is it possible to set the default method parameter values in Java? Example: If there is a method public int doSomething(int arg1, int arg2) { //some logic here return 0; } is it possible to modify the given method in order to be able to call it with and without parameters? example: doSomething(param1, param2); doSomething(); ...

JAXB Java to XML: How not printing primitive type members when default

Hi guys, First attempt to use this cool site - after searching for 2 hours: So I have a Java Bean that is given (I can only annotate not change) and need to map it to XML using JAXB. I would like primitives types not to be printed when they contain their language default, or a user-defined default. As said I cannot change the java bea...

Default value to a parameter while passing by reference in C++

Is it possible to give a default value to a parameter of a function while we are passing the parameter by reference. in C++ For eg. when i try to declare a function like virtual const ULONG Write(ULONG &State = 0, bool sequence = true); when i do this it gives an error error C2440: 'default argument' : cannot convert from 'const i...

C/C++ initialization of a normal array with one default value

http://www.fredosaurus.com/notes-cpp/arrayptr/array-initialization.html 1: Page above has a nice list over initialization of arrays. So I have a int array[100] = {-1}; expecting it to be full with -1's but its not, only first value is and the rest are 0's mixed with random values. The code int array[100] = {0}; works just fine a...

How would I skip optional arguments in a function call?

OK I totally forgot how to skip arguments in PHP. Lets say I have: checkbox_field ( $name, $value = '', $checked = false, $compare = '', $parameter = '' ) How would I call this function and skip the second last argument? checkbox_field('some name', 'some value', FALSE, '' , 'some parameter'); Would the above be correct? I c...

Preselect radio button in Struts2

Using Struts2, I have a very simple radio tag like following <s:radio label="correctOption" name="correctAnswer" list=" #{'1':'1','2':'2','3':'3','4':'4'}" value="questionVo.correctAnswer"/> questionVo.correctAnswer returns 2. So I want the second radio button to be preselected but it is not happening. I even tried: <s:radi...

Default Value Storage

I have the following three tables: Item Code ItemCode (many to many relationship between Item and Code) And then I have the following sample data on the third table: Item | Code -----+----- 001 | A 002 | A 003 | B There's a possibility that a new Item is added but does not have a code yet. I will assign a default code for this ...

Unknown file type MIME?

Do I have to specify a MIME type if the uploaded file has no extension? In other words is there a default general MIME type? ...

Magento custom attribute default value not showing in front end

Hi there, I have added some custom attributes to the products in the admin section of our Magento 1.3.2.1 installation and I've given some of those attributes default values. The problem is that the default values aren't being returned when I try to get the attribute from the product object as follows: $_product->getCode() Logically...

Display a default DataTemplate in a ContentControl when its content is null or empty?

I would think this is possible, but the obvious way isn't working. Currently, I'm doing this: <ContentControl Content="{Binding HurfView.EditedPart}"> <ContentControl.Resources> <Style TargetType="ContentControl" x:Key="emptytemplate"> <Style.Triggers> <DataTrigger ...

Soaplib functions with default arguments

I have to write soaplib method, that has many arguments. The idea is that the user should able able to choose, which arguments he wants to provide. Is that even possible? I know it is possible in python generally, but there is an error, when i try to set it up like normal python method with default arguments. ...