-
Replied To a Post in for loop vs foreach c#
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); … -
Began Watching Would Love To See Old DaniWeb
Hey, I was just wondering, If you have any old screen dumps of DaniWeb roughly around the time when it kicked off. I'd love to see what now and then … -
Replied To a Post in Would Love To See Old DaniWeb
I think web.archive.org doesn't work as well as it used to. Are there any alternatives to that? -
Began Watching ASP.NET connection to a database
So I am having trouble connecting to an Oracle XE 11g database in visual studio. The Ultimate aim here is to make a webpage I can run on my local … -
Replied To a Post in ASP.NET connection to a database
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 … -
Replied To a Post in Having a problem with this class assignment
The question is really about if statements and counters. We could be counting bananas instead. The questions of whether zero is positive or negative or neither has already been dealt … -
Replied To a Post in Click here to no longer receive any community emails from DaniWeb
Thanks Dani -
Replied To a Post in Having a problem with this class assignment
Whether zero is positive, negative or neither is outside the scope of this question. -
Began Watching Record delete problem
Hello, I was wondering if anyone can gude e about a puzzle i am trying to create and think let me know if this is possible or not. Well there … -
Replied To a Post in Record delete problem
You can also do thing like this: Delete From Agents Where Id = 2 And (Select Count(*) From Agents) > 1 -
Created Click here to no longer receive any community emails from DaniWeb
I accidentally clicked on: Click here to no longer receive any community emails from DaniWeb. In an email I received. How can I undo this? Is it the checkbox in … -
Began Watching Click here to no longer receive any community emails from DaniWeb
I accidentally clicked on: Click here to no longer receive any community emails from DaniWeb. In an email I received. How can I undo this? Is it the checkbox in … -
Began Watching Having a problem with this class assignment
The idea is to write a program that asks a user for 10 numbers and then displays how many positive and negative numbers were entered. Not really sure where I'm … -
Replied To a Post in Having a problem with this class assignment
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 … -
Replied To a Post in Script Manager
I'm really sorry but your sentence doesn't make much sense. Try writing it in your native langauge and then running it through google translate maybe? -
Began Watching Suggestion and ideas needed
I like this menu and how it's done: http://www.peterstone.com/ Does somebody has any idea and suggestion, how the easiest way is, to realize this kind of main nav they have? … -
Replied To a Post in Suggestion and ideas needed
That's a bootstrap menu. http://www.w3schools.com/bootstrap/bootstrap_case_navigation.asp -
Replied To a Post in convert $.post to $.ajax is it possible?
What does it return then? Is it working or Erroring? -
Replied To a Post in convert $.post to $.ajax is it possible?
In what way is it not working? -
Began Watching convert $.post to $.ajax is it possible?
Is there anyway i can change this code to a ajax format? $(document).ready(function(){ $("td[contenteditable=true]").blur(function(){ var msg = $(".alert"); var newvalue = $(this).text(); var field = $(this).attr("id"); $.post("update.php",field+"="+newvalue,function(d){ var data = … -
Replied To a Post in convert $.post to $.ajax is it possible?
That already is ajax. Can you be more specific? -
Replied To a Post in Script Manager
Sorry I still don't understand. -
Began Watching Query records with time difference
Hello I am creating a little application, using VB.net, and Access database. I want to count the number of records whitch have more than 6 hours difference between records. Is … -
Replied To a Post in Query records with time difference
I think to do this you need to do a cartesian join with the table on itself and implement the where condition. -
Replied To a Post in Script Manager
Sorry I don't understand what you are asking :( -
Began Watching Script Manager
I need to ScriptManager.RegisterStartupScript(this, GetType(), "getTextValue()", "getTextValue();", true); this value in variable -
Replied To a Post in Script Manager
Ok so what's the actual problem? -
Began Watching recursive function
Hello! I am a new c leaner. Can I call a function from a different function apart from the main ? And is this also part of recursive? -
Replied To a Post in recursive function
You can call a function from anywhere. You can call a function from main and this function inside it's body can call other functions. Those other functions can also call … -
Replied To a Post in Application base class
Hi TekknoDraykko I wasn't really suggesting the use of Nuget in the way you think. I was just asking if Suzie used it to load other 3rd party libraries. However … -
Began Watching Business Logic Set New Criteria
I have a code that can add and update record into database.All the database and code had been done but there is a problem is i need to assign the … -
Replied To a Post in Business Logic Set New Criteria
Which object is null? The debugger is your friend - use it to see. -
Began Watching problem with db table id
Hello everybody! There is a problem with my db table. For example i send 6 posts (with title, author and content) to the db table one after an other, so … -
Replied To a Post in problem with db table id
Auto incrementing ids work this way by design. If you want more control then use a column you can explicitly control. -
Began Watching Two applications - One database
I am developing a software which will connect to the same database as another application. Is there a term for that? Also any tips on what sort of methods I … -
Replied To a Post in Two applications - One database
Database Replication is one term for synching databases - particularly when talking about SQL Server. Not sure about the other term - could be multi tenant? -
Replied To a Post in How to add a "foreach line" loop
Youre welcome. -
Replied To a Post in how this come?
Ok cool, this is what I said right from the start! -
Replied To a Post in How to add a "foreach line" loop
The following should guide you with some ideas. Its is not a solution to your problem but an example of what you can do. It should be enough to get … -
Replied To a Post in Prototypal Inheritance
Thanks diafol that's an interesting post. The thing that really bugs me though is that whatever technique you use involving prototypes to simulate classes and facilitate code reuse, you have … -
Replied To a Post in how this come?
Show me the design of the table in the GUI please. -
Replied To a Post in Prototypal Inheritance
I often find some guys either annoying or funny, it's a fine line sometimes. Why is it so complicated? Good question! Let me know if you figure it out! -
Replied To a Post in How to add a "foreach line" loop
Youre welcome. You don't actually need that ToArray as Split returns an array already, don't know why I put that on. foreach (var line in s.Split('\n')) -
Began Watching Insert Image hyperlinks in javascript
Following is the javascript that will change the images in a specific time function startTime() { var timerid = 0; var images = new Array("CSS/Images/shy-baby.jpeg", "CSS/Images/yao-ming.png", "CSS/Images/success.jpg"); var countimages = … -
Replied To a Post in Insert Image hyperlinks in javascript
<a href="http://www.success.com"><img class="headlineimage" id="img1" src="success.jpg" width="200" height="150" /></a> You can change the href with code too. -
Began Watching How to add a "foreach line" loop
hello, let's say I have a string which contains: string s="111\n222\n333"; and I wanna add something like: foreach(Line ln in s) { if(ln="111") { MessageBox.Show("Found the 111 number"); } } … -
Replied To a Post in How to add a "foreach line" loop
Here is one way. using System; using System.Linq; namespace ForEach { class Program { static void Main(string[] args) { const string s = "111\n222\n333"; foreach (var line in s.Split('\n').ToArray()) { … -
Replied To a Post in Encrypting an object
Does CryptoStream implement IDisposable? If so then wrap that in a using statement too. So after that, does the code actually work? -
Replied To a Post in Prototypal Inheritance
@Maurits - just looked at your curly braces on new line issue. I do know to not put these on new lines for my return statements eg: return { breathe: … -
Replied To a Post in Prototypal Inheritance
In my Animal, Cat example, if Animal were to be a kind of abstract class and I would only ever be creating Cats, Dogs etc then I suppose it doesn't …
The End.