Search

You searched for the word(s): userid:740234

Matching Posts

  • Re: double addition or string concatenation? what point am I missing?

    Pay attention to this line: WITH STR PREFIX WITHOUT PARENTHESIS: 360084 I noticed that d1 turns to be 3600, which indicated me there is something going wrong with double.Parse Well I checked the computers I was trying to execute my code. They were all using non-us number format which was my problem. Then Instead of direct cast: double.Parse(str) I used: double.Parse(str, new CultureInfo("en-US")) then the problem disappeared!!! Thanks for all ; )
    Posted to C# (Forum) by Aleyna on 4/6/2009
  • Re: double addition or string concatenation? what point am I missing?

    Purely console ; ) okay I somehow debugged it using the code segment: double d1 = truck2CustomerMapping.Select(p => p.Customer.Costs[p.Truck.TruckIndex]).Sum(); double d2 = truck2CustomerMapping.Select(p => p.Truck).Distinct().Sum(t => t.SetupCost); upperBound = d1 + d2; Console.WriteLine("Type of d1: " + d1.GetTypeCode().ToString()); Console.WriteLine("Type of d2: " + d1.GetTypeCode().ToString()); Console.Write("WITHOUT STR PREFIX:"); Console.WriteLine(d1
    Posted to C# (Forum) by Aleyna on 4/6/2009
  • Re: double addition or string concatenation? what point am I missing?

    As VS is installed on my development PC and I'm running compiled executables on other computers, I guess I cannot do this directly. Do you know any other way to debug?
    Posted to C# (Forum) by Aleyna on 4/6/2009
  • Re: double addition or string concatenation? what point am I missing?

    no problem ;) Well I now double checked the versions. My machine runs on .NET 3.5 SP1. I cloned all the things, tried .NET 3.5 as well but no way. I also tried the way you suggested and used two separate double but it concatenated the numbers again and printed 3684 :s what's going on :D???
    Posted to C# (Forum) by Aleyna on 4/6/2009
  • Re: double addition or string concatenation? what point am I missing?

    [quote user="Naom"] Are you sure it's C# code and not C++ code? Looks like pointer arithmetic to me... [/quote] Of course C# not C++ I'm simply using a LINQ query to calculate total cost as follows: Below two instructions both return a double type thus isn't it a simple double addition :? double uppoerBound = 0; upperBound = truck2CustomerMapping.Select(p => p.Customer.Costs[p.Truck.TruckIndex]).Sum() + truck2CustomerMapping.Select(p => p.Truck).Distinct().Sum(t =>
    Posted to C# (Forum) by Aleyna on 4/6/2009
  • double addition or string concatenation? what point am I missing?

    Hello I have the following code: double upperBound = 0; upperBound = truck2CustomerMapping.Select(p => p.Customer.Costs[p.Truck.TruckIndex]).Sum(); upperBound += truck2CustomerMapping.Select(p => p.Truck).Distinct().Sum(t => t.SetupCost); Console.WriteLine("Total Cost: {0}", upperBound); It compiles perfectly however when it comes to run, it outputs say 'Total Cost: 3684' that originally should be (36+84 = 120) Total Cost: 120 Well, it just concatenates the double values
    Posted to C# (Forum) by Aleyna on 4/6/2009
    Filed under: string concatenation, c# 3.5, double addition
  • Re: Authenticated WCF with AJAX

    Hey ;) it took really long time to get all these answers but anyways thanks for your share and help : ) [quote user="cb3431"] Did you find a way to do this? [/quote] First you need to activate ASP.NET compatibility on WCF and then you can use ordinary path based authorization as mentioned in the previous post. To host a WCF service in ASP.NET compatible mode, have a look at the following page http://msdn.microsoft.com/en-us/library/aa702682.aspx basically use AspNetCompatibilityRequirements
  • Authenticated WCF with AJAX

    Hi all, I want to use .NET AJAX framework with WCF services. I got stuck at a really critical point due to lack of experience :-) Now that, in order to use any feature at website user must be authenticated. This is done with standart asp.net not with ajax and then home page is displayed. In my secret page, I want only the authenticated users can be able to use any WCF service that I deploy to the website, in other words anonymous access will not be allowed. Service header, sessionId or any other
    Posted to ASP.NET AJAX Networking and Web Services (Forum) by Aleyna on 3/4/2008
    Filed under: ajax, asp.net, WCF, Authentication, webservice
  • Re: Announcing - SQL Server Database Publishing Wizard CTP 1

    ;) Good to hear. Very appreciated. I will have a look at it
  • Re: Urgent: mssql error need help

    Problem solved. The catch is that this error is thrown only when I logged in so I focused on the providers that are triggered after login process. It is only RoleManager to deal with. First I checked RoleManager section in web.config and I noticed that I have no connectionStringName attribute assinged and it tries to use default one, that is LocalSqlServer. Therefore I user the following lines to solve the problem. To ensure this never gonna happen again. I used this XMembershipConnStr is assigned
Page 1 of 2 (14 items) 1 2 Next >