DaveAmour 160 Mmmmmm beer Featured Poster

If you have a look at Altova xml spy, with that you can point and click at items and it will tell you what the xpath is. Its free for a 1 month trial.

DaveAmour 160 Mmmmmm beer Featured Poster

No

DaveAmour 160 Mmmmmm beer Featured Poster

Thanks :)

DaveAmour 160 Mmmmmm beer Featured Poster

@humorousone - I agree - I couldn't spot an easy algorithm and even had 2 minutes trying to code it and its not easy to code it in an elegant way - a bit of brute force is needed as far as I can tell!

DaveAmour 160 Mmmmmm beer Featured Poster

Try right click Refactor!

DaveAmour 160 Mmmmmm beer Featured Poster

Suzie you got my name wrong :(

DaveAmour 160 Mmmmmm beer Featured Poster

Thats a good looking pdf - shall have a proper read later.

It's normally called the "Liskov substitution principle" but I like the "Barbara Liskov Principle".

We would have to change SOLID to SOBID though which doesn't have quite the same punch!

DaveAmour 160 Mmmmmm beer Featured Poster

Sorry one last thing to add!

You can use File.ReadAllLines which already returns a string array so no need for lines 2 and 3.

DaveAmour 160 Mmmmmm beer Featured Poster

I don't know anything about those objects but my tip would be to consider the Liskov substitution principle in making your decision.

ddanbe commented: Thanks for the tip. +15
DaveAmour 160 Mmmmmm beer Featured Poster

Ok cool as least I'm not going mad!

Of course there are workarounds as you suggest, I was just mentioning it in case someone wanted to fix it.

DaveAmour 160 Mmmmmm beer Featured Poster

It may help if you break your questions into smaller more easily answered chunks rather than one monolithic question.

DaveAmour 160 Mmmmmm beer Featured Poster

Can you not just copy and paste?

DaveAmour 160 Mmmmmm beer Featured Poster

Is there a bug when editing a post?

To reproduce follow these steps.

a) Reply to post

b) Edit to correct a typo maybe

c) Save

d) Edit again as you spotted another typo - the editable text then does not load the latest correction.

I am using IE 11. Not sure if it happens all the time but I have noticed it a few times. The only way to be sure would be to test more thoroughly but that would mean a thread with lots of test posts which I'm sure you don't want.

DaveAmour 160 Mmmmmm beer Featured Poster

You could do it like this

            string[] wibble = { "AAAA", "BBB,B", "CCCCC" };

            Console.WriteLine(CommaCount(wibble.ToArray()));

Or like this:

        public static int CommaCount(string[] sarray)
        {
            var copy = sarray.ToArray();

            int count = 0;
            int commas = 0;

            for (int i = 0; i < copy.Length; i++)
            {
                commas = copy[i].Count(c => c == ',');

                if (commas > count)
                {
                    count = commas;
                }
            }

            return count;
        }
DaveAmour 160 Mmmmmm beer Featured Poster

The scope of JavaScript code is per page so refreshing the page is like making the code start again - like switching it off and on again.

So if you want to persist some value - ie the state of your counter - then you will need to store it somewhere and load it up again when the page is loaded.

The counter needs to be per user of course otherwise everyone will get the same value! So one option could be a cookie and another could be to store it on a server somewhere but that depends what technologies you are using, is your user signed in etc.

Reading and writing cookies with JavaScript - http://www.w3schools.com/js/js_cookies.asp

Hope that helps.

DaveAmour 160 Mmmmmm beer Featured Poster

Actually my joke about it being 1 minute is way off as just noticed one time is AM and the other is PM!

DaveAmour 160 Mmmmmm beer Featured Poster

You are declaring your variable inside the curly brackets. This is the scope of the variable.

Move it onto line 25 with

string theamount;

then assign it in your if statements as you are but remove the "var "

DaveAmour 160 Mmmmmm beer Featured Poster

What knight tour do you want - can you be a bit more specific about the requirements?

DaveAmour 160 Mmmmmm beer Featured Poster

Are you talking about chess?

DaveAmour 160 Mmmmmm beer Featured Poster

If you show us your code that might help.

DaveAmour 160 Mmmmmm beer Featured Poster

What is the current domain and the new one?

DaveAmour 160 Mmmmmm beer Featured Poster

The code for this would be quite involved and I would assume would be web based?

If so I'm confused why you posted in C++?

DaveAmour 160 Mmmmmm beer Featured Poster

That's right as the first if condition is satisfield.

Try putting the last one at the start instead.

if ($_POST['price'] =="see all" AND $_POST['accommodation"]=="see all")
{ 
    //show henry    
}
else if ($_POST['price'] =="see all")
{
    //show okolo 
} 
else if ($_POST["accommodation"] =="see all")
{
    //show chibuzo 
} 
DaveAmour 160 Mmmmmm beer Featured Poster

Hi

This is indeed a Generic List.

You can create a List of anything eg List<Customer> or List<Invoice>

To Add things you just use:

var model = new StoreIndexViewModel();

model.Genres.Add("Horror");
model.Genres.Add("Romance");
model.Genres.Add("Drama");

You can pull them all out with things like:

foreach (var genre in mode.Genres)
{
    //Do something with genre here
}

Why is this better than an array? Many reasons. Check out this video:

https://www.youtube.com/watch?v=J9Cwi45UtZU

DaveAmour 160 Mmmmmm beer Featured Poster

Is what a serious suggestion?

DaveAmour 160 Mmmmmm beer Featured Poster

Always code as if the person who will maintain your code is a violent psychopath who knows where you live.

DaveAmour 160 Mmmmmm beer Featured Poster

Counter arguments suggests that you put forward an argument. I didn't see any, I just saw oppinion.

If you want to put forward an actual argument feel free to start a thread on that and I shall give it some consideration. This thread is supposed to be about Go so let's not hijack it.

DaveAmour 160 Mmmmmm beer Featured Poster

I'm cancelling my interview, can you not read?

DaveAmour 160 Mmmmmm beer Featured Poster

Thanks iamtwee, that was a valuable contribution. I shall stop coding in C# immediatley. I do have an interview tomorrow paying £400 per day but I shall ring and cancel straight away. Thanks for your advice!

DaveAmour 160 Mmmmmm beer Featured Poster

Don't you ask this question every day?

I can find it in 10 seconds with Google, it doesn't need a discussion!

DaveAmour 160 Mmmmmm beer Featured Poster

What music does everyone like?

I have a very wide spectrum of tastes including the following:

The Beatles
David Bowie
Jewel
Simon and Garfunkel
Alanis Morisette
Alisha's Attic
I Nine
Texas
Elvis Costello
Squeeze

To name just a random few.

I think Jewel is my all time favorite though.

DaveAmour 160 Mmmmmm beer Featured Poster

Prosecco and Lasagne with beef AND chicken - WTF?

DaveAmour 160 Mmmmmm beer Featured Poster

Sounds like some kind of MVC architecture - is this right? If so which specific one?

DaveAmour 160 Mmmmmm beer Featured Poster

I watched Nightcrawler yesterday, a fantasic performance from Jake Gyllenhaal!

DaveAmour 160 Mmmmmm beer Featured Poster

I'm old school so chess for me!

DaveAmour 160 Mmmmmm beer Featured Poster

And finally

There are only 10 types of people. Those who understand binary and those who don't.

DaveAmour 160 Mmmmmm beer Featured Poster

Or sometimes in real production code I have been know to use silly variables like Underpants particularly with foreach...

foreach (var item in pairOfUnderPants)
{

}
DaveAmour 160 Mmmmmm beer Featured Poster

Not a joke as such but one I use a lot.

"Ahh that' would be a PICNIC error"?

Problem In Chair, Not In Computer.

DaveAmour 160 Mmmmmm beer Featured Poster

Youre welcome. I also added return true since you were not doing that.

DaveAmour 160 Mmmmmm beer Featured Poster

Sounds good and I think this is already in modern .net langugaes too with the relativeley new parallelization classes and methods.

Have you been using Go or just looking into it?

DaveAmour 160 Mmmmmm beer Featured Poster

Ok I see - will wait for this reply then.

DaveAmour 160 Mmmmmm beer Featured Poster

Based on years of experience and many discusions with other experienced developers both face to face and online and through working in many different companies as a contractor and seeing them both in use.

Database first has it's place of course in certain scenarios but for the most part code first is far superior.

DaveAmour 160 Mmmmmm beer Featured Poster

How can you tell it is a scripting version?

DaveAmour 160 Mmmmmm beer Featured Poster

You are using database first - we are not telling you to change that. We are just saying that code first is better.

To answer your original question (which I have done already) - just right click on your edmx and click update model from database. Ok?

DaveAmour 160 Mmmmmm beer Featured Poster

Try this

    function validate(dt1, dt2)
    {
        var jdt1 = Date.parse('20 Aug 2000 ' + dt1);
        var jdt2 = Date.parse('20 Aug 2000 ' + dt2);
        var diffMs;
        var diffMins

        if (isNaN(jdt1))
        {
            alert('invalid start time');
            return false;
        }

        if (isNaN(jdt2))
        {
            alert('invalid end time');
            return false;
        }

        if (jdt1 > jdt2)
        {
            diffMs = (jdt1 - jdt2);

            diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes

            alert('start is greater by ' + diffMins + ' minutes');
        }
        else
        {
            diffMs = (jdt2 - jdt1);

            diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes

            alert('start is less equal by ' + diffMins + ' minutes');
        }

        return true;
    }
DaveAmour 160 Mmmmmm beer Featured Poster

Ok an some more thing.

I don't have VB6 installed. Can I code this in Vb.net for you? If it has to be VB6 I won't be able to do it.

DaveAmour 160 Mmmmmm beer Featured Poster

Yes code first is definatley best.

DaveAmour 160 Mmmmmm beer Featured Poster

You just hit update model from database as far as I remember - no need to delete.

I am doing code first now though which is much better but I'm sure that's right.

DaveAmour 160 Mmmmmm beer Featured Poster

I had a very quick look at the tutorial. Looks like a cross between JavaScript and C.

DaveAmour 160 Mmmmmm beer Featured Poster

Make sure all the vents are clear - buy some compresssed air to clean it out. You must buy the correct stuff as it has anti static properties.

http://www.ebuyer.com/649796-ebuyer-com-air-duster-400ml-ebairduster

After that install speedfan which will give you an idea of temperatures

http://www.almico.com/speedfan.php