• Member Avatar for DaveAmour
    DaveAmour

    Began Watching Customizing simple MVC app

    Hello all, I decided to open a new thread which I could use to ask questions about how to customize this new MVC application I created https://www.daniweb.com/web-development/aspnet/threads/497464/much-simpler-first-mvc-application, add HTML and …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Customizing simple MVC app

    Have a look at T4MVC and @Url.Action
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Inheritance Question

    Some more tinkerings - might also help. Look at the DoSomething methods. In OO you shouldn't be asking if something is of a certain type and then acting accordingly, much …
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching Inheritance Question

    Hi, I have three classes `public class Player` , `public class Computer : Player`, and `public class Game`. In `Game` I have a List: `public List<Player> PlayerList` and a variable …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Inheritance Question

    I'm not really sure what you are after but I did some tinkering - might help, might not. void Main() { var game = new Game(); Player dave = new …
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching How to use two models in a view?

    How to use two models in a view using Tuple and view model and what is there diffences?
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in How to use two models in a view?

    public class MyModel { public Model1 Model1 { get; set;} public Model2 Model2 { get; set;} }
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching C# List of objects to List<string[]>

    Hi is possible to cast List of objects to List of string array?
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in C# List of objects to List<string[]>

    Yes. What do you want to be in the strings though - one specific property of the objects, or there ToString representation? Here are some examples: void Main() { List<Person> …
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching Generic Method <T>()

    Hello Everyone, Actually i have one question. I create one generic method like below:- public static dynamic ExecuteSelectProcedure<T>(string procedureName) where T: class { SqlDataReader reader = ExecuteSelectCommand(procedureName, CommandType.StoredProcedure); if (typeof(T).FullName.Equals("System.Data.DataTable")) …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Generic Method <T>()

    I was thinking alot about this post and had already come to the same conclusion as gusano79 so just adding my support for his answer, you are definatley misusing generics.
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching How do I decrypt encrypted passwords in my database.

    I forgot what type of hashing used for passwords in my database. How can I recover passwords in my database? -Any solution to my problem? or any suggestions? -Thanks in …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in How do I decrypt encrypted passwords in my database.

    Look at the code that hashed them in the first place.
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching Are there any advantages in using ASP.net over PHP?

    Are there any advantages in using ASP.net or (any other language, for that matter) over PHP?
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Are there any advantages in using ASP.net over PHP?

    Also depends if you are talking asp.net webforms or asp.net mvc.
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching How to implement interface member

    Hi, I get an error when trying to compile a class that I have created: "EWrapperImpl.cs" **Error: TestCsharp.EWrapperImpl' does not implement interface member 'IBApi.EWrapper.currentTime(long)** It is documented in an example …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in How to implement interface member

    Can you show us EWapper? Is that an interface? If so click on it above and hit Ctrl period. If it is an interface, then its a convention to name …
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching explicit cast in c#

    assume latgeInt=2147483647 Debug.Log(largeInt); //2147483647 float largeFloat = largeInt; Debug.Log(largeFloat); ///2.147484E+09 int backAgain = (int)largeFloat; Debug.Log(backAgain); //-2147483648 *This part i did not get. I assume there was some data loss when …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in explicit cast in c#

    This might help http://www.programminglogic.com/how-computers-represent-negative-binary-numbers/
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching building web application question

    Hi Folks, I recently completed few e-learnings on HTML, CSS, JavaScript, Twitter bootstrapping to learn about how to build a web form. What I am not sure is that how …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in building web application question

    You need to look at server side web technologies/languages. DaniWeb for example is written in PHP and that is a good choice for MySQL. You can also look at Asp.net …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Cannot Bulk Load. The File "D:\xyz.pdf" does not exist.

    Use an absolute network path?
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching Multi threading task takes much longer than 1 thread

    Hello, I have a very strange problem. I have created a code that I beleive is multicore/parallell threading to make a task to run faster using more cores in the …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Multi threading task takes much longer than 1 thread

    I'm a bit late here but the disk has to be the issue. If you copy a file from one drive to another manually with explorer - eg a video …
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching Why is this code creating duplicate keys?

    I have a program that creates a unique key for a database. However I get an error that I am trying to write duplicate data to the database. How can …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Why is this code creating duplicate keys?

    Databases can generate their own unique keys. Any reason why you can't do this? Sounds like you are making hard work for yourself. If you really do want to generate …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Separate Instances strangely use same variable

    Youre welcome - and now you do know how to share something - this is often more efficient if you have data which doesn't change from instance to instance.
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Cannot Bulk Load. The File "D:\xyz.pdf" does not exist.

    I think bulk uploads look for files on the machine SQL is running on.
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching Cannot Bulk Load. The File "D:\xyz.pdf" does not exist.

    Hi I have below code to save pdf file in sql. but getting error **"Cannot Bulk Load. The File "D:\xyz.pdf" does not exist."** Private Sub ButBouncePdfAdd_Click(ByVal sender As System.Object, ByVal …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Cannot Bulk Load. The File "D:\xyz.pdf" does not exist.

    Does it exist on the database server?
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching Separate Instances strangely use same variable

    Hello, I have an instance called "Instance". From the button event I try to create 2 Instances of "Instance". I want those 2 Instances to be completely separate from eachother …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Separate Instances strangely use same variable

    It is shared because you used "static"
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Have I applied this 3-layer design pattern properly?

    The point is there are different ways to arcitect things. A simple n-tier (typically 3) was favoured for a long time but more recently a service based approach with looseley …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Container for Questions in Trivia Game

    Jim is spot on "efficiency is irrellevent. Focus more on clear code" - that's exactly the mindset to be in. Also in a real trivia game you have a Deck …
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching Container for Questions in Trivia Game

    I'm currently writing a trivia game for someone in VB.net (will follow similar pattern to TriviaCrack). My question is, what is the best way to contain the questions to have …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Container for Questions in Trivia Game

    Vb.net is an OOP language. So model the real world and create your classes that way.
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching What makes a post qualify for down voting?

    Please what rules guide the down voting action.
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in What makes a post qualify for down voting?

    Its a subjective decision as far as I'm aware
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching Function Firing Before Button Clicked

    I have this .js file called by my page. The function I'm caling with my onclick is working before the button is clicked. window.onload = function() { document.getElementById('clickMe').onclick = testOne(); …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Function Firing Before Button Clicked

    Not sure if this is right but try emoving brackets: document.getElementById('clickMe').onclick = testOne;
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching Contact Form Not Workin'

    Hey guys, I am working on my contact form for a site of mine (i am designing the form differently) that is for a child care, and I can't seem …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Contact Form Not Workin'

    You have two action attribues in your form tag - is that right?
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching Have I applied this 3-layer design pattern properly?

    Hello everyone. I am modeling a simple dictionary application using the presentation-business logic-data layer pattern. I already have the design but am not sure it is correct: My presentatioon layer …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in Have I applied this 3-layer design pattern properly?

    This can be quite a subjective topic sometimes. Have a look at Active Record versus Repository Pattern eg: http://stackoverflow.com/questions/6522009/active-records-vs-repository-pros-and-cons I think Active Record is not so good anymore so go …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in how to update selected field in mvc, c#, mssql using linq

    In this case Contact is class. It represents a contact in my domain. It would be a User, Person, Company, Book, Item etc I have made the assumption you are …
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching How to Load Pdf From url ?

    How to load pdf directly from url? I use C#. eg:http://beta.wms.egobzmail.com/files/deexp/2015_04/2015_04_16/DE14291484222756.pdf Thank you.
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in How to Load Pdf From url ?

    Load it where?
  • Member Avatar for DaveAmour
    DaveAmour

    Began Watching how to update selected field in mvc, c#, mssql using linq

    for example. name of field: f1 = "field1", f2 = "field2", f3 = "field3", f4 = "field4" how can I update the value of f2 and f3 without changing the …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in how to update selected field in mvc, c#, mssql using linq

    1. Get the current item from the database 2. Update just the properties you want to change 3. Use the Repository Pattern to execute code simillar to that below public …
  • Member Avatar for DaveAmour
    DaveAmour

    Replied To a Post in why I cant access my logout page?

    Ok nice one.

The End.