Search Results

Search found 9 results on 1 pages for 'oyvind hauge'.

Page 1/1 | 1 

  • Best way to represent Gender in a class library used in multilingual applications

    - by Hauge
    I'm creating class library with some commonly used classes like persons, addresses etc. This library will be used in an multilingual application, and I am looking for the most convenient way to represent a persons gender. Ideally I would like to be able to code like this: Person person = new Person { Gender = Genders.Male, FirstName = "Nice", LastName = "Dude" } if (person.Gender == Genders.Male) Console.WriteLine("person is Male"); Console.WriteLine(person.Gender); //Should output: Male Console.WriteLine(person.Gender.ToString("da-DK")); //Should output the name of the gender in the language provided List<Gender> genders = Genders.GetAll(); foreach(Gender gender in genders) { Console.WriteLine(gender.ToString()); Console.WriteLine(gender.ToString("da-DK")); } What would you do? An enumeration and a specialized Gender class, but what about the localization then? Regards Jesper Hauge

    Read the article

  • Best open source ASP.NET MVC e-commerce projects

    - by Øyvind Knobloch-Bråthen
    I need to get a e-commerce site up and running, but I really don't want to program it from the bottom up if I don't need to. I want to program it using ASP.NET MVC. I'm looking for a good open source alternative (or one for purchase if it's modular enough) that I can use as a base and enhance with the needed functions? It has to have all "normal" e-commerce functions, and also the possibility to integrate with a credit card API of my choice. If anyone have any recommendations for me here, I would appreciate it :)

    Read the article

  • The action can't be completed because the file is open in IIS Worker Process

    - by Bjørn Øyvind Halvorsen
    I have a windows server 2008 R2 running a couple of sites for me, while developing i usually post updates to this server. Now, i tried posting an update but it failed said it has a file in use and the error msg is as follows: "The action can't be completed because the file is open in IIS Worker Process" "Close the file and try again." I have tried stopping the site but this does not help. The site is running in the same application pool as the site that should stay online so a recycle might be breaking the running site (If this is wrong, please correct me). Question is: Is there a way to "Release" the lock that is put on the file without stopping other currently running sites?

    Read the article

  • Hosting several domains on one server using IIS 7

    - by Øyvind Knobloch-Bråthen
    I have created several web sites inside IIS7 on my server. All of them use the same ip and port, but different host names. Currently I have set the host name to www.mydomain.com. Now my question is, how do I get my actual domains to target the different sites on my server. Second question. Can I set my host name to only mydomain.com to make sure that all requests to that domain is handeled by the same application? Primarily, I want both www.mydomain.com and mydomain.com to work when the user types the address in their browser.

    Read the article

  • Prolog: using the sort/2 predicate

    - by Øyvind Hauge
    So I'm trying to get rid of the wrapper clause by using the sort library predicate directly inside split. What split does is just generating a list of numbers from a list that looks like this: [1:2,3:2,4:6] ---split-- [1,2,3,2,4,6]. But the generated list contains duplicates, and I don't want that, so I'm using the wrapper to combine split and sort, which then generates the desired result: [1,2,3,4,6]. I'd really like to get rid of the wrapper and just use sort within split, however I keep getting "ERROR: sort/2: Arguments are not sufficiently instantiated." Any ideas? Thanks :) split([],[]). split([H1:H2|T],[H1,H2|NT]) :- split(T,NT). wrapper(L,Processed) :- split(L,L2), sort(L2,Processed).

    Read the article

  • Problem with extended ASCII characters in web page/master page

    - by Oyvind Brathen
    I have some localization problems in my webpage. There are basically two problems (that I suspect have a different sulution, but they are conseptually linked) First problem is this: I have a website that is using a master page. All text from the page is fine, but all text that comes from the master page file, get scrambled norwegian characters. For example Ø shows up as Ø. It seems that all characthers in the extended ASCII table gets scrambled this way. Afterwards, if I open the master page in Notepad the Ø looks normal, but if I remove the Ø and write a new Ø manually, then save the file from Notepad, and then open the website in the browser, it looks fine and the Ø is shown properly. So it seems that Visual Studio saves the characters wrongly in the master file, but correct for the aspx file. Any clue here? The second issue is norwegian characters coming from jQuery. All of these characters get's replaced by a questionmark with a black box around it. Here, modifying the js file in Notepad does not help, and it still display scrambled in the browser. Any input here would be appreciated.

    Read the article

  • SQL Server, varchar data to nvarchar data

    - by Øyvind
    I've got a database with collation Danish_Norwegian_CS_AS and lots of varchar columns. I'd like to convert all this data to unicode, but haven't found a way to convert this data yet. If I've understood correctly, the encoding used is UCS-2 little endian. For example I've got a column containing 'PÃ¥l-Trygve' which is easily converted with C# to 'Pål-Trygve' using Encoding.Default.GetString(Encoding.UTF8.GetBytes("PÃ¥l-Trygve")); Is there a way to do this conversion in the Microsoft SQL Server client?

    Read the article

  • MSTest on x64 C++/CLI

    - by Oyvind
    I got a problem using MSTest on x64: The test project depends on a couple of C++/CLI assemblies, and fails to load for some reason. In Visual Studio, I get (stripped down): Error loading D:\xxx\Xxx.Test.dll: Unable to load the test container 'D:\xxx\Xxx.Test.dll' or one of its dependencies. Error details: System.BadImageFormatException: Could not load file or assembly 'Common.Geometry.Native, Version=1.1.4574.22395, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. Running MSTest manually in a command prompt, I get: Unable to load the test container 'D:\xxx\Xxx.Test.dll' or one of its dependencies. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'Common.Geometry.Native, Version=1.1.4574.22395, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. Details worth mentioning: The test project itself is compiled using 'Any Cpu'. I use a x64 specific testrunconfig Dependency walker shows no missing native dependencies in the C++/CLI assembly (Common.Geometry.Native) Even more interesting, there is another test project in the same solution using the same C++/CLI assembly (Common.Geometry.Native), and it runs without any problems. I have also verified that there are no 32bit assemblies/dlls interfering. Any suggestions is welcome !

    Read the article

  • MSSQL, varchar data to nvarchar data

    - by Øyvind
    I've got a database with collation Danish_Norwegian_CS_AS and lots of varchar columns. I'd like to convert all this data to unicode, but haven't found a way to convert this data yet. If I've understood correctly, the encoding used is UCS-2 little endian. For example I've got a column containing 'PÃ¥l-Trygve' which is easily converted with C# to 'Pål-Trygve' using Encoding.Default.GetString(Encoding.UTF8.GetBytes("PÃ¥l-Trygve")); Is there a way to do this conversion in the microsoft SQL client?

    Read the article

1