335 Posted Topics
Re: It is shared because you used "static" | |
Re: 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 for the more decoupled design. | |
Re: Vb.net is an OOP language. So model the real world and create your classes that way. | |
Re: Its a subjective decision as far as I'm aware | |
Re: 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 void Update(Contact contact) { using (var context = new EfContext()) { Contact existingContact = context.Contacts.Single(c => c.Id == contact.Id); context.Entry(existingContact).CurrentValues.SetValues(contact); … | |
Re: What actually happens? | |
Re: How you define "SALES are performed" - is that via someone filling in a form and clicking a button? | |
Re: Add System.Windows.Forms as a Reference https://msdn.microsoft.com/en-us/library/wkze6zky.aspx?f=255&MSPPError=-2147217396 | |
Re: DELETE FROM POS FROM [Name]=@Name - you have FROM in there twice. I think you need a WHERE as well! | |
Re: Line 7 you declare bytes as Byte. I think that should be an array of Bytes. | |
Re: Try this: <script> $(document).ready(function() { $('p').css("font-style", "italic"); }); </script> | |
Do we have any TDD experts here? I have some questions but need an expert. | |
Re: What is the code doing? If it is on the main thread and it is doing a lot it can freeze the UI. Consider running the code on another thread. | |
Re: In your code above is line 2 being run multiple times? Are you wiring the even handler up again and again somehow? Difficult to say without seein the whole thing in context but that's what it sounds like to me. | |
Re: Ive not seen `**Local**` before. Does that actually work?? | |
Re: Try if (conn.State != ConnectionState.Open) { conn.Open(); } sql.ExecuteNonQuery(); | |
![]() | Re: I noticed this too on my 27" monitor! It looks fine, I'm just so used to seeing it how it was before that it just takes some getting used to. |
Re: It means it could be unassigned. What if someone entered 4? Try: switch (classChoice) { case 1: classChosen = "Fighter"; break; case 2: classChosen = "Priest"; break; case 3: classChosen = "Wizard"; break; default: classChosen = "Unknown"; break; } | |
Re: @Slavi - There is a famous chess opening called the Slav | |
![]() | Re: Do you have a connection string? ![]() |
Re: Is this online anywhere so I can see it? ![]() | |
Re: You can set this in your web.config eg: <system.web> <customErrors mode="Off" ></customErrors> <compilation debug="true" targetFramework="4.5" ></compilation> <httpRuntime targetFramework="4.5" ></httpRuntime> <authentication mode="Forms"> <forms loginUrl="~/Account/Login" timeout="2880" ></forms> </authentication> <pages> <namespaces> <add namespace="System.Web.Helpers" ></add> <add namespace="System.Web.Mvc" ></add> <add namespace="System.Web.Mvc.Ajax" ></add> <add namespace="System.Web.Mvc.Html" ></add> <add namespace="System.Web.Optimization" ></add> <add namespace="System.Web.Routing" ></add> <add namespace="System.Web.WebPages" ></add> </namespaces> … | |
Re: Works for me: https://jsfiddle.net/xyt0527j/ FF Version 33.1.1 | |
# Performing Selective Includes in Entity Framework with the Fluent API # When we are using Entity Framework as our data access choice to work with SQL Server then there are some potential pitfalls. One of these pitfalls is doing selective includes. What do I mean by selective includes? To … | |
I finally saw a paypal button on my $Rewards. Perhaps rather optimistically I clicked on it. The page then changed to show the following: "Last Cash Out: Pending for $5.58" Any ideas anyone. | |
I am tinkering with prototypal inheritance in JavaScript. I have the code below and I am trying to find out if there is a way of getting the code which makes Cat inherit Animal actually inside the Cat function - so that it is all niceley encapsulated as one unit … | |
Re: Actualy just noticed in your first bit of code you have this: double food [monkeytot][Wdays]; But then in your second bit you have this: double food[monkeys][Wdays]; Try changing that. | |
Re: I think to do this you need to do a cartesian join with the table on itself and implement the where condition. | |
Re: Have you actually used your IsNumeric function? | |
Re: What do you mean by manually? | |
Re: Here's my go: <script> function CustomDate() { this.date = new Date(); this.dayPart = this.date.getHours() < 12 ? "AM" : "PM"; this.toString = function() { return this.date.getMonth() + "/" + this.date.getDate() + "/" + this.date.getFullYear() + " - " + this.date.getHours( ) + ":" + this.date.getMinutes() + ":" + this.date.getSeconds() + … | |
Re: Hi I'm not a Java Programmer so can't comment on the specifics of your code. However, you should not have any UI code in such a class as it is then tightly coupled to that particular UI. UI operations should be done outside of this class and you should interact … | |
Re: Can you be a little more specific. For example have you already a) Created a MVC project? b) Created a Controller? c) Created a Controller Action? d) Created a View And so on... | |
Re: You will hate it at first, then find it tolerable then you will love it! Do try putting this on though as it will give you an easier transition: http://classicshell.net/ | |
Re: Not sure if this is what you mean or not but try setting the following on topwrapper div: position: fixed; top: 1px; background-color: #414141 Does that help? | |
Re: Always code as if the person who will maintain your code is a violent psychopath who knows where you live. ![]() | |
Re: How about this: using System; using System.Linq; namespace Palindrome { public class Program { static void Main(string[] args) { Console.WriteLine("racecar: " + "racecar".IsPalindrome()); Console.WriteLine("dad: " + "dad".IsPalindrome()); Console.WriteLine("mum: " + "mum".IsPalindrome()); Console.WriteLine("dog: " + "dog".IsPalindrome()); Console.WriteLine("floor: " + "floor".IsPalindrome()); Console.WriteLine("Racecar: " + "Racecar".IsPalindrome()); Console.WriteLine("Rac ecar: " + "Rac ecar".IsPalindrome()); Console.WriteLine("Racecar': … | |
Re: If you are iterating over a collection which has enumerable properties then you can use foreach. For example: foreach (var customer in customers) { Console.WriteLine(customer.FirstName + " " + customer.LastName); } You could also achieve the same with a for loop: for (var i = 0; i < customers.Count; i … | |
Re: I haven't done this for a long time but used to use something called Index Server. This indexed certain folders which you specified and you queried index server much like you query a database - this was mainly for searching file contents I think. You can certainly see what kind … | |
Re: Can you debug this and show what the SQL statement parses out to please? | |
Re: Do you have to encrypt BEFORE serializing? Serializing and then encrypting makes far more sense to me. See this for how to serialize: http://www.paxium.co.uk/PublicArticle/Article/493 Then just encrypt the xml. This way you can write one piece of code which will work for anything. | |
Re: Don't know if this is any help but this works for me. Connection string is: <add name="OracleConnection" connectionString="User Id=MyUserId; password=MyPassword; Data Source=MyServer:1521/orcl.MyUrl.co.uk; Pooling=false;"/> And code is: private static IEnumerable<Document> GetDocuments(string selectText) { var documents = new List<Document>(); using (var oracleConnection = new Oracle.ManagedDataAccess.Client.OracleConnection(ApplicationConfiguration.ConnectionString)) { using (var oracleCommand = new Oracle.ManagedDataAccess.Client.OracleCommand(selectText)) … | |
Re: Delete Line 30, 31 and 33 Move Line 32 to after your loop Change "else if ( Number <0)" to "else" - no need to check as it must be less than 0 | |
The End.