Search Results

Search found 54118 results on 2165 pages for 'default value'.

Page 6/2165 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Making one of the folders default in Apache

    - by OmerO
    Hello, The file & directory structure of my website is as follows: /Library/WebServer/mysite/joomla .. /Library/WebServer/mysite/wiki .. /Library/WebServer/mysite/forum .. /Library/WebServer/mysite/index.php As you see, there are various applications each residing in separate folders. Now, in order to define this structure, I have made this entry in Apache http-vhosts.config file: ServerName mysite.com DocumentRoot "/Library/WebServer/mysite" ** And I already have the DirectoryIndex defined: DirectoryIndex index.html index.php, and so on. So far so good but I want this specific functionality: When someone visits mysite, he/she should automatically directed to: /Library/WebServer/mysite/joomla (and therefore /Library/WebServer/mysite/joomla/index.php) I don't want to achieve that functionality by putting a redirection code inside /Library/WebServer/mysite/index.php or /Library/WebServer/mysite/index.htm because that causes time delays (because of the redirection, of course) But in this case, the only proper way of achieving it seems to set DocumentRoot this way: DocumentRoot "/Library/WebServer/mysite/joomla" But when I set it that way, then the other folders (/wiki, /forum, etc.) are simply not served by Apache. To work around it, I put directives like: Alias /wiki /Library/WebServer/mysite/wiki .. Alias /forum /library/WebServer/mysite/forum and it did work actually the way I wanted. But... I still cannot use it that way because in this case I just couldn't manage to make the wiki use Short URLs (as described in link text) So, I have to set the DocumentRoot back to /Library/WebServer/mysite and shoud be able to assign /Library/WebServer/mysite/joomla as the "default directory" (my own terminology :) Can I do it in Apache? Is there any other way you might suggest? Thanks.

    Read the article

  • Missing Fields and Default Values

    - by PointsToShare
    © 2011 By: Dov Trietsch. All rights reserved Dealing with Missing Fields and Default Values New fields and new default values are not propagated throughout the list. They only apply to new and updated items and not to items already entered. They are only prospective. We need to be able to deal with this issue. Here is a scenario. The user has an old list with old items and adds a new field. The field is not created for any of the old items. Trying to get its value raises an Argument Exception. Here is another: a default value is added to a field. All the old items, where the field was not assigned a value, do not get the new default value. The two can also happen in tandem – a new field is added with a default. The older items have neither. Even better, if the user changes the default value, the old items still carry the old defaults. Let’s go a bit further. You have already written code for the list, be it an event receiver, a feature receiver, a console app or a command extension, in which you span all the fields and run on selected items – some new (no problem) and some old (problems aplenty). Had you written defensive code, you would be able to handle the situation, including similar changes in the future. So, without further ado, here’s how. Instead of just getting the value of a field in an item – item[field].ToString() – use the function below. I use ItemValue(item, fieldname, “mud in your eye”) and if “mud in your eye” is what I get, I know that the item did not have the field.   /// <summary> /// Return the column value or a default value /// </summary> private static string ItemValue(SPItem item, string column, string defaultValue) {     try     {         return item[column].ToString();     }     catch (NullReferenceException ex)     {         return defaultValue;     }     catch (ArgumentException ex)     {         return defaultValue;     } } I also use a similar function to return the default and a funny default-default to ascertain that the default does not exist. Here it is:  /// <summary> /// return a fields default or the "default" default. /// </summary> public static string GetFieldDefault(SPField fld, string defValue) {     try     {         // -- Check if default exists.         return fld.DefaultValue.ToString();     }     catch (NullReferenceException ex)     {         return defValue;     }     catch (ArgumentException ex)     {         return defValue;     } } How is this defensive? You have trapped an expected error and dealt with it. Therefore the program did not stop cold in its track and the required code ran to its end. Now, take a further step - write to a log (See Logging – a log blog). Read your own log every now and then, and act accordingly. That’s all Folks!

    Read the article

  • NULL-keys for key/value table

    - by user72185
    (Using Oracle) I have a table with key/value pairs like this: create table MESSAGE_INDEX ( KEY VARCHAR2(256) not null, VALUE VARCHAR2(4000) not null, MESSAGE_ID NUMBER not null ) I now want to find all the messages where key = 'someKey' and value is 'val1', 'val2' or 'val3' - OR value is null in which case there will be no entry in the table at all. This is to save space; there would be a large number of keys with null values if I stored them all. I think this works: SELECT message_id FROM message_index idx WHERE ((key = 'someKey' AND value IN ('val1', 'val2', 'val3')) OR NOT EXISTS (SELECT 1 FROM message_index WHERE key = 'someKey' AND idx.message_id = message_id)) But is is extremely slow. Takes 8 seconds with 700K records in message_index and there will be many more records and more search criteria when moving outside of my test environment. Primary key is key, value, message_id: add constraint PK_KEY_VALUE primary key (KEY, VALUE, MESSAGE_ID) And I added another index for message_id, to speed up searching for missing keys: create index IDX_MESSAGE_ID on MESSAGE_INDEX (MESSAGE_ID) I will be doing several of these key/value lookups in every search, not just one as shown above. So far I am doing them nested, where output id's of one level is the input to the next. E.g.: SELECT message_id from message_index WHERE (key/value compare) AND message_id IN ( SELECT ... and so on ) What can I do to speed this up?

    Read the article

  • Default value list for pipeline param in Powershell

    - by fatcat1111
    I have a Powershell script that reads values off of the pipeline: PARAM ( [Parameter(ValueFromPipeline = $true)] $s ) PROCESS { echo "* $s" } Works just fine: PS my.ps1 foo * foo I would like the script to have list of default values, as the most common usage will always use the same values and storing them in the default will be most convenient. I did the usual assignment: PARAM ( [Parameter(ValueFromPipeline = $true)] $s = 'bar' ) PROCESS { echo "* $s" } Again, works just fine: PS my.ps1 * bar PS my.ps1 foo * foo However when setting the default to be a list, I get back something entirely reasonable but not at all what I want: PARAM ( [Parameter(ValueFromPipeline = $true)] $s = @('bar', 'bat', 'boy') ) PROCESS { echo "* $s" } Result: PS my.ps1 * bar bat boy I expected: PS my.ps1 * bar * bat * boy How can I get one call in to the Process loop for each default value? (This is somewhat different than getting one call in to Process, and wrapping the current body of in a big foreach loop over $s).

    Read the article

  • const return value and template instantiation

    - by Rimo
    From Herb Sutter's GotW #6 Return-by-value should normally be const for non-builtin return types. .... Note: Lakos (pg. 618) argues against returning const value, and notes that it is redundant for builtins anyway (for example, returning "const int"), which he notes may interfere with template instantiation. .... While Sutter seems to disagree on whether to return a const value or non-const value when returning an object of a non-built type by value with Lakos, he generally agrees that returning a const value of a built-in type (e.g const int) is not a good idea. While I understand why that is useless because the return value cannot be modified as it is an rvalue, I cannot find an example of how that might interfere with template instantiation. Please give me an example of how having a const qualifier for a return type might interfere with template instantiation.

    Read the article

  • How to import a class from default package

    - by mykhaylo
    Hi, I am using Eclipse 3.5 and I have created a project with some package structure along with the default package. I have one class in default package - Calculations.java and I want to make the use of that class in any of the package (for instance in com.company.calc). When I try to make the use of the class which is default package, its giving me compile error. Its not able to recognise the class in default package. Where is a problem? Calculations.java - source code public class Calculations{ native public int Calculate(int contextId); native public double GetProgress(int contextId); static { System.loadLibrary("Calc"); } } I can put my class in any other package. This class has some native method which is implemented in Delphi . If I put that class in any of the folder,I will have to make the change that DLL which I want to avoid(really - I can not). Thats why I put my class in the default package.

    Read the article

  • remove default.aspx from a request

    - by b0x0rz
    i am trying to remove default.aspx from any request that might have it. protected void Application_BeginRequest(object sender, EventArgs e) { HttpContext context = HttpContext.Current; string url = context.Request.Url.ToString(); // remove default.aspx if (url.EndsWith("/default.aspx", StringComparison.OrdinalIgnoreCase)) { url = url.Substring(0, url.Length - 12); } context.Response.Redirect(url); } gives an error: **too many redirects occurred trying to open...** what can i change to make it work? thnx

    Read the article

  • Can a single argument constructor with a default value be subject to implicit type conversion

    - by Richard
    I understand the use of the explicit keyword to avoid the implicit type conversions that can occur with a single argument constructor, or with a constructor that has multiple arguments of which only the first does not have a default value. However, I was wondering, does a single argument constructor with a default value behave the same as one without a default value when it comes to implicit conversions?

    Read the article

  • Drop down value setting

    - by Harish
    Whenever a new window is opened and the drop value by default is 'yyyy'(For eg: yyyy for years), onclick of the drop down the value should automatically change to current year, which will be one of the values in the dropdown list (any place in the drop down). So now the value will be set to the current year. Again if the user clicks on the dropdown, the user can change the value to any(For eg: select 'yyyy'). So now the value set in drop down is 'yyyy'. condition 3, if the user clicks on the drop down since the value is 'yyyy' , focus should be the current year and also the value automatically. Please give the sloution for the mentioned requirement????

    Read the article

  • how to use a parameterized function for the Default Binding of a Sql Server column

    - by Walt Gaber
    I have a table that catalogs selected files from multiple sources. I want to record whether a file is a duplicate of a previously cataloged file at the time the new file is cataloged. I have a column in my table (“primary_duplicate”) to record each entry as ‘P’ (primary) or ‘D’ (duplicate). I would like to provide a Default Binding for this column that would check for other occurrences of this file (i.e. name, length, timestamp) at the time the new file is being recorded. I have created a function that performs this check (see “GetPrimaryDuplicate” below). But I don’t know how to bind this function which requires three parameters to the table’s “primary_duplicate” column as its Default Binding. I would like to avoid using a trigger. I currently have a stored procedure used to insert new records that performs this check. But I would like to ensure that the flag is set correctly if an insert is performed outside of this stored procedure. How can I call this function with values from the row that is being inserted? USE [MyDatabase] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[FileCatalog]( [id] [uniqueidentifier] NOT NULL, [catalog_timestamp] [datetime] NOT NULL, [primary_duplicate] nchar NOT NULL, [name] nvarchar NULL, [length] [bigint] NULL, [timestamp] [datetime] NULL ) ON [PRIMARY] GO ALTER TABLE [dbo].[FileCatalog] ADD CONSTRAINT [DF_FileCatalog_id] DEFAULT (newid()) FOR [id] GO ALTER TABLE [dbo].[FileCatalog] ADD CONSTRAINT [DF_FileCatalog_catalog_timestamp] DEFAULT (getdate()) FOR [catalog_timestamp] GO ALTER TABLE [dbo].[FileCatalog] ADD CONSTRAINT [DF_FileCatalog_primary_duplicate] DEFAULT (N'GetPrimaryDuplicate(name, length, timestamp)') FOR [primary_duplicate] GO USE [MyDatabase] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE FUNCTION [dbo].[GetPrimaryDuplicate] ( @name nvarchar(255), @length bigint, @timestamp datetime ) RETURNS nchar(1) AS BEGIN DECLARE @c int SELECT @c = COUNT(*) FROM FileCatalog WHERE name=@name and length=@length and timestamp=@timestamp and primary_duplicate = 'P' IF @c > 0 RETURN 'D' -- Duplicate RETURN 'P' -- Primary END GO

    Read the article

  • Symfony2 Setting a default choice field selection

    - by Mat
    I am creating a form in the following manner: $form = $this->createFormBuilder($breed) ->add('species', 'entity', array( 'class' => 'BFPEduBundle:Item', 'property' => 'name', 'query_builder' => function(ItemRepository $er){ return $er->createQueryBuilder('i') ->where("i.type = 'species'") ->orderBy('i.name', 'ASC'); })) ->add('breed', 'text', array('required'=>true)) ->add('size', 'textarea', array('required' => false)) ->getForm() How can I set a default value for the species listbox? Thank you for your response, I apologise, I think I should rephrase my question. Once I have a value that I retrieve from the model, how do I set that value as SELECTED="yes" for the corresponding value in the species choice list? So, that select option output from the TWIG view would appear like so: <option value="174" selected="yes">Dog</option>

    Read the article

  • DataGridView validating old value insted of new value.

    - by Scott Chamberlain
    I have a DataGridView that is bound to a DataTable, it has a column that is a double and the values need to be between 0 and 1. Here is my code private void dgvImpRDP_InfinityRDPLogin_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) { if (e.ColumnIndex == dtxtPercentageOfUsersAllowed.Index) { double percentage; if(dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].Value.GetType() == typeof(double)) percentage = (double)dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].Value; else if (!double.TryParse(dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].Value.ToString(), out percentage)) { e.Cancel = true; dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].ErrorText = "The value must be between 0 and 1"; return; } if (percentage < 0 || percentage > 1) { e.Cancel = true; dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].ErrorText = "The value must be between 0 and 1"; } } } However my issue when dgvImpRDP_InfinityRDPLogin_CellValidating fires dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].Value will contain the old value before the edit, not the new value. For example lets say the old value was .1 and I enter 3. The above code runs when you exit the cell and dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].Value will be .1 for that run, the code validates and writes 3 the data to the DataTable. I click on it a second time, try to leave, and this time it behaves like it should, it raises the error icon for the cell and prevents me from leaving. I try to enter the correct value (say .7) but the the Value will still be 3 and there is now no way out of the cell because it is locked due to the error and my validation code will never push the new value. Any recommendations would be greatly appreciated. EDIT -- New version of the code based off of Stuart's suggestion and mimicking the style the MSDN article uses. Still behaves the same. private void dgvImpRDP_InfinityRDPLogin_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) { if (e.ColumnIndex == dtxtPercentageOfUsersAllowed.Index) { dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].ErrorText = String.Empty; double percentage; if (!double.TryParse(dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].FormattedValue.ToString(), out percentage) || percentage < 0 || percentage > 1) { e.Cancel = true; dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].ErrorText = "The value must be between 0 and 1"; return; } } }

    Read the article

  • OSX: Selecting default application for all unknown and different file types (extensions)

    - by Leo
    I work in cluster computing and am using Mac OS X 10.6. I send off hundreds of computing jobs a day, and each one comes back with with a different extension. For example, svmGeneSelect.o12345 which is the std output of my svmGeneSelect job which is job number 12345. I don't control the extensions. All files are plain text. I want OSX to open any file extension that it hasn't seen before with my favorite text editor when I click on it. Or even better set up file association defaults for extension patterns ie textEdit for extensions matching *.o*. I do NOT want to create file associations for individual files since this extension will only ever exist once, and I do not want to go through the process of selecting the application to use for each file. Thanks for any help you can offer.

    Read the article

  • Default Parameters vs Method Overloading

    - by João Angelo
    With default parameters introduced in C# 4.0 one might be tempted to abandon the old approach of providing method overloads to simulate default parameters. However, you must take in consideration that both techniques are not interchangeable since they show different behaviors in certain scenarios. For me the most relevant difference is that default parameters are a compile time feature while method overloading is a runtime feature. To illustrate these concepts let’s take a look at a complete, although a bit long, example. What you need to retain from the example is that static method Foo uses method overloading while static method Bar uses C# 4.0 default parameters. static void CreateCallerAssembly(string name) { // Caller class - Invokes Example.Foo() and Example.Bar() string callerCode = String.Concat( "using System;", "public class Caller", "{", " public void Print()", " {", " Console.WriteLine(Example.Foo());", " Console.WriteLine(Example.Bar());", " }", "}"); var parameters = new CompilerParameters(new[] { "system.dll", "Common.dll" }, name); new CSharpCodeProvider().CompileAssemblyFromSource(parameters, callerCode); } static void Main() { // Example class - Foo uses overloading while Bar uses C# 4.0 default parameters string exampleCode = String.Concat( "using System;", "public class Example", "{{", " public static string Foo() {{ return Foo(\"{0}\"); }}", " public static string Foo(string key) {{ return \"FOO-\" + key; }}", " public static string Bar(string key = \"{0}\") {{ return \"BAR-\" + key; }}", "}}"); var compiler = new CSharpCodeProvider(); var parameters = new CompilerParameters(new[] { "system.dll" }, "Common.dll"); // Build Common.dll with default value of "V1" compiler.CompileAssemblyFromSource(parameters, String.Format(exampleCode, "V1")); // Caller1 built against Common.dll that uses a default of "V1" CreateCallerAssembly("Caller1.dll"); // Rebuild Common.dll with default value of "V2" compiler.CompileAssemblyFromSource(parameters, String.Format(exampleCode, "V2")); // Caller2 built against Common.dll that uses a default of "V2" CreateCallerAssembly("Caller2.dll"); dynamic caller1 = Assembly.LoadFrom("Caller1.dll").CreateInstance("Caller"); dynamic caller2 = Assembly.LoadFrom("Caller2.dll").CreateInstance("Caller"); Console.WriteLine("Caller1.dll:"); caller1.Print(); Console.WriteLine("Caller2.dll:"); caller2.Print(); } And if you run this code you will get the following output: // Caller1.dll: // FOO-V2 // BAR-V1 // Caller2.dll: // FOO-V2 // BAR-V2 You see that even though Caller1.dll runs against the current Common.dll assembly where method Bar defines a default value of “V2″ the output show us the default value defined at the time Caller1.dll compiled against the first version of Common.dll. This happens because the compiler will copy the current default value to each method call, much in the same way a constant value (const keyword) is copied to a calling assembly and changes to it’s value will only be reflected if you rebuild the calling assembly again. The use of default parameters is also discouraged by Microsoft in public API’s as stated in (CA1026: Default parameters should not be used) code analysis rule.

    Read the article

  • Default Keyboard for new users in Windows 7

    - by xited
    I just installed Windows 7 and I want all users signing in to the computer to see the Language Bar customized with the following three languages: "English (American)" "French (Standard)" "Chinese (Simplified PRC)" I am running the following four lines of code at log on in order to change the registry such that each user will see the language bar, and then have access to the three keyboard layouts mentioned above. reg add "HKCU\Software\Microsoft\CTF\LangBar" /v ShowStatus /t REG_DWORD /d 4 /f reg add "HKCU\Keyboard Layout\Preload" /v 2 /d 0000040c reg add "HKCU\Keyboard Layout\Preload" /v 3 /d 00000c0a reg add "HKCU\Keyboard Layout\Preload" /v 4 /d 00000804 The above works fine, but with one small/major inconvenience: the user has to log off and then log back on in order for these changes to take effect and see the language bar, as described above. The question becomes: How can I force these changes to take effect so that users don't have to log off and then log back in to see the language bar. This has to be done automatically when users log in.

    Read the article

  • Assign default program to scanner button

    - by Juancito
    When I press the start button on my Epson V500 Photo scanner, I am confronted with 4 choices of which I always need the same one. How can I make the start button on my scanner automaticaly start the same application without user intervention? I am using win7 home 64bit.

    Read the article

  • How can I convert XML files to one CSV file in C#?

    - by TruMan1
    I have a collection of strings that are XML content. I want to iterate thru my collection and build a CSV file to stream to the user for download (sometimes it can be hundreds in the collection). This is my loop: foreach (string response in items.Responses) { string xmlResponse = response; //BUILD CSV HERE } This is what my XML content looks like for each iteration (xmlResponse). I want to put it in a flat file including the "properties" attributes: <?xml version="1.0"?> <response> <properties id="60375c90-9dd7-400f-aafb-a8726df409a9" name="Account Request" date="Thursday, March 04, 2010 2:14:07 PM" page="http://mydomain/sitefinity/CreateAccount.aspx" ip="192.168.1.255" browser="Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8" referrer="http://mydomain/sitefinity/CreateAccount.aspx" confirmation="True" subject="Email from website: Account Request Form" sender="[email protected]" recipients="[email protected], , " /> <fields> <field> <label>Personal Details</label> <value>Personal Details</value> </field> <field> <label>Name</label> <value>Tim Wales</value> </field> <field> <label>Email</label> <value>[email protected]</value> </field> <field> <label>Website</label> <value></value> </field> <field> <label>Password</label> <value></value> </field> <field> <label>Phone</label> <value></value> </field> <field> <label>Years in Business</label> <value></value> </field> <field> <label>Background</label> <value>Background</value> </field> <field> <label>Place of Birth</label> <value>Earth</value> </field> <field> <label>Date of Birth</label> <value></value> </field> <field> <label>Some Label</label> <value>Some Label</value> </field> <field> <label>Industry</label> <value> Technology Other</value> </field> <field> <label>Pets</label> <value>Dog</value> </field> <field> <label>Your View</label> <value>Positive</value> </field> <field> <label>Misc</label> <value>Misc</value> </field> <field> <label>Comments</label> <value></value> </field> <field> <label>Agree to Terms?</label> <value>True</value> </field> </fields> </response> <?xml version="1.0"?> <response> <properties id="60375c90-9dd7-400f-aafb-a8726df409a9" Form="Account Request" Date="Tuesday, March 16, 2010 6:21:07 PM" Page="http://mydomain/sitefinity/Home.aspx" IP="fe80::1c0f57:9ee3%10" Browser="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30729)" Referrer="http://mydomain/sitefinity/Home.aspx" Subject="Email from website: Account Request Form" Sender="[email protected]" Recipients="[email protected]" Confirmation="True" /> <fields> <field> <label>Personal Details</label> <value>Personal Details</value> </field> <field> <label>Name</label> <value>erger</value> </field> <field> <label>Email</label> <value></value> </field> <field> <label>Website</label> <value></value> </field> <field> <label>Password</label> <value></value> </field> <field> <label>Phone</label> <value></value> </field> <field> <label>Years in Business</label> <value></value> </field> <field> <label>Background</label> <value>Background</value> </field> <field> <label>Place of Birth</label> <value>Earth</value> </field> <field> <label>Date of Birth</label> <value></value> </field> <field> <label>Some Label</label> <value>Some Label</value> </field> <field> <label>Industry</label> <value> Technology Service</value> </field> <field> <label>Pets</label> <value>Dog</value> </field> <field> <label>Your View</label> <value>Positive</value> </field> <field> <label>Misc</label> <value>Misc</value> </field> <field> <label>Comments</label> <value></value> </field> <field> <label>Agree to Terms?</label> <value>True</value> </field> </fields> </response> <?xml version="1.0"?> <response> <properties id="60375c90-9dd7-400f-aafb-a8726df409a9" Form="Account Request" Date="Tuesday, March 16, 2010 4:50:17 PM" Page="http://mydomain/sitefinity/Home.aspx" IP="fe80::1c0f:ee3%10" Browser="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30729)" Referrer="http://mydomain/sitefinity/Home.aspx" Subject="Email from website: Account Request Form" Sender="[email protected]" Recipients="[email protected]" Confirmation="True" /> <fields> <field> <label>Personal Details</label> <value>Personal Details</value> </field> <field> <label>Name</label> <value>esfs</value> </field> <field> <label>Email</label> <value></value> </field> <field> <label>Website</label> <value></value> </field> <field> <label>Password</label> <value></value> </field> <field> <label>Phone</label> <value></value> </field> <field> <label>Years in Business</label> <value></value> </field> <field> <label>Background</label> <value>Background</value> </field> <field> <label>Place of Birth</label> <value>Earth</value> </field> <field> <label>Date of Birth</label> <value></value> </field> <field> <label>Some Label</label> <value>Some Label</value> </field> <field> <label>Industry</label> <value> Technology Service</value> </field> <field> <label>Pets</label> <value>Dog</value> </field> <field> <label>Your View</label> <value>Positive</value> </field> <field> <label>Misc</label> <value>Misc</value> </field> <field> <label>Comments</label> <value></value> </field> <field> <label>Agree to Terms?</label> <value>True</value> </field> </fields> </response> Can anyone help with this?

    Read the article

  • Value objects in DDD - Why immutable?

    - by Hobbes
    I don't get why value objects in DDD should be immutable, nor do I see how this is easily done. (I'm focusing on C# and Entity Framework, if that matters.) For example, let's consider the classic Address value object. If you needed to change "123 Main St" to "123 Main Street", why should I need to construct a whole new object instead of saying myCustomer.Address.AddressLine1 = "123 Main Street"? (Even if Entity Framework supported structs, this would still be a problem, wouldn't it?) I understand (I think) the idea that value objects don't have an identity and are part of a domain object, but can someone explain why immutability is a Good Thing? EDIT: My final question here really should be "Can someone explain why immutability is a Good Thing as applied to Value Objects?" Sorry for the confusion! EDIT: To clairfy, I am not asking about CLR value types (vs reference types). I'm asking about the higher level DDD concept of Value Objects. For example, here is a hack-ish way to implement immutable value types for Entity Framework: http://rogeralsing.com/2009/05/21/entity-framework-4-immutable-value-objects. Basically, he just makes all setters private. Why go through the trouble of doing this?

    Read the article

  • How do I set a wine program (ex. Foxit Reader for Windows) as the default program?

    - by To Do
    I regularly annotate pdf files and unfortunately there is no good linux pdf reader that supports decent annotations. Evince has a very rudimentary and buggy annotation feature. So I'm stuck using a Windows viewer through wine. This works pretty well but, when I simply right-click a file (in this case a pdf), properties, open with and selected Foxit Reader, the Unity Launcher icon remained the wine icon instead of the application icon. Has anyone set a wine program as the default program for any file? Any ideas?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >