DaveAmour 160 Mmmmmm beer Featured Poster

I canot give you the code unless you tell me if you can use jquery or not.

Its like asking me to translate a menu for you in a restaurant but not telling me into which language.

DaveAmour 160 Mmmmmm beer Featured Poster

Sorry got a bit distracted yesterday so thanks for stepping in tinstaafl.

Don't forget to wrap IDisposbale objects in a using statement thouhg.

DaveAmour 160 Mmmmmm beer Featured Poster

A good nights sleep later and all is well.

Car crash was a little sureal as the bloke who drove into my wife's car is a George Michael impersonator so I guess he is doing method acting!

DaveAmour 160 Mmmmmm beer Featured Poster

Are you able to use jQuery for this or just native JavaScript?

DaveAmour 160 Mmmmmm beer Featured Poster

I have sometimes replaced these - even if it is spinning a new one can breathe new life into it. They only work for so many million spins.

Try installing SpeedFan - useful for checking temperatures.

Also what about graphic cards - any of those with fans?

Finally get some compressed air and clean out all the dust - make sure you get proper compressed air thouhg - it has antistatic properties.

DaveAmour 160 Mmmmmm beer Featured Poster

"my instructor is wrong and can't teach properly." - Excellent!

Well keep up the coding, it takes many years and just when you think you have mastered it, something new comes along!

DaveAmour 160 Mmmmmm beer Featured Poster

Ok sorry I have had a bad day. So the CPU has a fan that sits over it right?

DaveAmour 160 Mmmmmm beer Featured Poster

I have written code to solve this.

Its yours for £1000

DaveAmour 160 Mmmmmm beer Featured Poster

Wife had car crash

Cat collapsed and had to be rushed to the vets

Ordered takeaway food to be delivered for 19.30, delivered at 18.15 when no one is in.

Giving up now and just drinking lots of wine :(

DaveAmour 160 Mmmmmm beer Featured Poster

I think parameter 1 should be a mysqli_result but you gave it a boolean!

DaveAmour 160 Mmmmmm beer Featured Poster

Buy a new one

DaveAmour 160 Mmmmmm beer Featured Poster

What type of program is going to host this?

DaveAmour 160 Mmmmmm beer Featured Poster

Can you try with a different browser?

Also can you see any of these sites?

http://www.rugeleychessclub.co.uk/
http://www.katmaid.co.uk/

DaveAmour 160 Mmmmmm beer Featured Poster

I still don't like ForEachElement, I would prefer something that describes what it does and definatley don't like "A" as an argument name!

DaveAmour 160 Mmmmmm beer Featured Poster

We can help yes, we can't do it for you though.

Post your code so far please.

DaveAmour 160 Mmmmmm beer Featured Poster

Which course is this for?

DaveAmour 160 Mmmmmm beer Featured Poster

It is in C#

DaveAmour 160 Mmmmmm beer Featured Poster

Really? What happens? Which country are you in?

DaveAmour 160 Mmmmmm beer Featured Poster

There are many ways to do this but a good way of seeing one in action is to create an out of the box MVC app in Visual Studio. It will create a templated app with logins all setup and done so you can look at that and see how that works.

DaveAmour 160 Mmmmmm beer Featured Poster
DaveAmour 160 Mmmmmm beer Featured Poster

You have asked this in another post - I have replied there...

DaveAmour 160 Mmmmmm beer Featured Poster

I know how.

Depends how you want to architect/tier this though - any thoughts?

Also what database are you using and do you want to use stored procedures?

Finally what is your level of programming skill and which language do you want this in?

DaveAmour 160 Mmmmmm beer Featured Poster

I'm so glad I don't do php if this is what it looks like!

DaveAmour 160 Mmmmmm beer Featured Poster

I have some working gmail code as below.

See if this helps you fix your problem.

        using (var mailMessage = new MailMessage(ApplicationConfig.Instance.EmailSenderAddress, recipient, subject, body))
        {
            mailMessage.IsBodyHtml = true;

            var basicCredentials = new NetworkCredential("myusername@gmail.com", "XXXXXXXXXXXXXXXXXXX");

            var smtpClient = new SmtpClient("smtp.gmail.com")
            {
                UseDefaultCredentials = false,
                Credentials = basicCredentials,
                EnableSsl = true
            };

            smtpClient.Send(mailMessage);
        }
DaveAmour 160 Mmmmmm beer Featured Poster

Hi Suzie

If I have read things right you are asking for a good way to reuse some code library you have written right? Eg a logging utility for example.

I can show you a few ways of doing this but have you also considered using nuget with third party code as well? If you don't use nuget I can happily explain what it is an how to use it.

DaveAmour 160 Mmmmmm beer Featured Poster

Thankyou, I would definatley recomend the fluent API for linq, its very compact and elegant.

DaveAmour 160 Mmmmmm beer Featured Poster

That won't work I'm afraid. There are various syntax errors. On line 27 for example you call slideshow(). JavaScript is case sensitive so this won't work as your actual function name is slideShow().

Also on line 19 you have i++; but this should be i++: - ie with a colon not a semi-colon.

Also once you get this actually working, this doesn't slide the images, it fades them in an out. You wanted a slideshow, the clues in the name!

There is also a lot of unnecesary code - placing the images into a container is not needed as they are already in a jquery collection.

And finally once you do get this running you will get a stack overflow!

On line 21 you call slideShow - ie it calls itself, thats how it keeps looping. However you need to do this with a callback eg:

$("#pic").attr("src", slideHolder[i]).fadeIn(1000, function() { slideShow(); }).delay(2000);

And finally you never had an html element with an id of pic in the html you showed me at the start.

So anyway mine is working perfectly and is good code.

You can see it here:

http://www.paxium.co.uk

And the code is as follows:

$(function ()
{
    var slideShowContainer = $('#slideshow');
    var slideShowItem = $('#slideshow img');
    var transitionTime = 1000;
    var pauseTime = 4000;
    var curSlide = 0;

    var init = function ()
    {
        setInterval(function ()
        {
            if (curSlide === parseInt($(slideShowItem).length - 1))
            {
                curSlide = 0;
            }
            else
            {
                curSlide++;
            }

            slideShowContainer.animate({ scrollLeft: 400 …
DaveAmour 160 Mmmmmm beer Featured Poster

That is a language, not a UI

DaveAmour 160 Mmmmmm beer Featured Poster

I bet its here v.elementAt(i + 1)

DaveAmour 160 Mmmmmm beer Featured Poster

Which UI are you using?

DaveAmour 160 Mmmmmm beer Featured Poster

5 posts and no replies. Felt sorry for you so thought I would at least say hello!

DaveAmour 160 Mmmmmm beer Featured Poster

Hi

Sorry I'm a bit late coming to this thread now but pretty much agree with everything that has been said.

Do use self describing names for variables and methods though. So Iterate is maybe not the best method name - I would rethink that one.

Also naming conventions for things like variable names and method names etc are not set in stone and there are many standards out there. For me though and for most programmers I work with we tend to stick to the same standards as the framework code. Since our code is interspersed with framework code this makes sense. It is also I find a pretty well used standard across the industry. How do I know this? I've had about 40 jobs in IT as I'm a contractor so its based on experience.

So for:

MMatrix MA = new MMatrix(r, c);

I would use lower case for ma and also would use a whole, self describing word.

If you have time the video below is full of fantasic advice from a talented programmer and teacher and is also very funny too. He does also include a section on naming variables, methods etc.

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

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

Ok wow that is a lot of questions. I think what you really need is a good all round grounding in MVC. I cannot give you that in this kind of forum.

I can point you in the direction of some good videos though. Try:

https://www.youtube.com/watch?v=-pzwRwYlXMw&list=PL6n9fhu94yhVm6S8I2xd6nYz2ZORd7X2v and all the tutorials by that guy, there are lots and they all look good.

DaveAmour 160 Mmmmmm beer Featured Poster

This is deserialisation code - do you have serialization code?

DaveAmour 160 Mmmmmm beer Featured Poster

Yes I would think so.

Can you show use your code?

DaveAmour 160 Mmmmmm beer Featured Poster

Here it is in a cleaner, more elegant way. It's much better this way.

if (ModelState.IsValid)
{
    if(db.products.Any(p => p.Name == product.Name))
    {
        ModelState.AddModelError("txtName","Product Name already exists.");
    }
    else
    {
        db.products.Add(product);
        db.SaveChanges();
        return RedirectToAction("Index");
    }
}
DaveAmour 160 Mmmmmm beer Featured Poster

Well done.

You should not use try catch like that though.

A more elegant way would be to use the linq Any function eg:

var exists = db.products.Any(p => p.Name == product.name);

Also with your linq you are selecting a product so don't use the letter c, use a p instead - its much clearer then for other people reading your code.

DaveAmour 160 Mmmmmm beer Featured Poster

Is it possible. Certainly. Operating systems are not trival though.

The ones we have today are the result of probably millions of man hours so I wish you the best of luck!

Mpradeep commented: thanks sir.....mr.daveAmour +0
DaveAmour 160 Mmmmmm beer Featured Poster

Well done :)

DaveAmour 160 Mmmmmm beer Featured Poster

I understand what duplicates are, but what I don't understand is what your data entry form and insertion code looks like.

Show me your EF code for inserting data please.

DaveAmour 160 Mmmmmm beer Featured Poster

So by a free template, what do you mean exactly?

DaveAmour 160 Mmmmmm beer Featured Poster

Which image should change?

DaveAmour 160 Mmmmmm beer Featured Poster
DaveAmour 160 Mmmmmm beer Featured Poster

Ok no problem I will show you an example.

Can I check what UI you are coding though - WPF, WinForms etc?

Also I think you already added me on Skype. Its best if I help you on this forum though then my answers remain for other people to view in the future.

Also I am pretty busy and cannot dedicate one to one time with people.

DaveAmour 160 Mmmmmm beer Featured Poster

I find the best reason to give when you don't know what it is "too much klunk in the stuffit expander" - give it a go it's weirdley satisfying!

DaveAmour 160 Mmmmmm beer Featured Poster

Sure you can have a for loop. Which particular kind of for loop though and for which part of the logic?

DaveAmour 160 Mmmmmm beer Featured Poster

Why are there periods in there? People don't put a period between two words when they swear.

Also why have two arrays? Why not just one array - you don't need to check for combinations of swear words - just if at least one is in there right?

DaveAmour 160 Mmmmmm beer Featured Poster

So have you move everything to SQL server - ie no more Access and Excel at all?

DaveAmour 160 Mmmmmm beer Featured Poster

Can you elaborate please?

What kind of data is this?
Where is it coming from?
Are you using Entity Framework or plain Ado.net?

Thanks

DaveAmour 160 Mmmmmm beer Featured Poster

You say you are using Vb.net but what is your UI technology?

WinForms, WPF, WebForms, MVC etc?