|
Hi,
On the "large objects heap": I have managed to miss that somehow. Thanks a lot for the enlightenment! Will keep it in mind for the future.
On RAM sizes: My first programming was done on a Norsk Data ND-100 minicomputer with 512KB RAM (IIRC) and an 80MB disk running the SINTRAN-III OS. It had an ND-50 number-cruncher for a side-car (same one that did the F-16 simulations a few years earlier). We were approximately 200 student groups writing, compiling and testing BASIC and Pascal programs on it (50-60 groups at a time, on DEC VT-100 and ND terminals using current loop cables from the terminal room to the computer room). I ended up being an assistant teacher there for a few years... we're talking 1981 or so.
My first experience with a PC:
- Hmmm... wonder if it's like Unix: C:\>ls
- No, let's try SINTRAN III syntax: C:\>LIST-FILES
- Nope, not that. Let's do VMS then: C:\>DIR
- WOW, it worked. Let's run it in the background: C:\>BG DIR
- Nope. Maybe some Unix influence after all: C:\>DIR &
- Not that. Now let's see... where's the manual. WHAT?!?! No multi-tasking?!?!? Are you f*ing serious?!?!
And I had just promised writing actual software for the thing... I have never felt so lost in my life...
Later,
--
Peter
|
|
|
|
|
Thank you for the response, it is very helpful, many many thanks.
When the game is over the Pawn and the King go into the same box.
|
|
|
|
|
I have been looking at http://msdn.microsoft.com/en-us/library/aa288453(VS.71).aspx trying to figure this out but I just seem to get it.
I have a function that I would like it to return the information in an array or something like it, but I can't figure out how to add the data. The only way I can think to explain it is more like XML. One function will return different items from a XML feed, and the other will return one record from an XML feed with the information
Example for multiple records:
[Message]
[ID]44562[/ID]
[/Message]
[Message]
[ID]44562[/ID]
[/Message]
[Message]
[ID]44562[/ID]
[/Message]
Example for single records:
[Message]
[ID]44562[/ID]
[From]Scott[/From]
[To]Scott[/To]
[Subject]Test[/Subject]
[/Message]
|
|
|
|
|
Brad Wick wrote: I have a function that I would like it to return the information in an array or something like it, but I can't figure out how to add the data.
If you can't figure out how to add data to an array then I suggest you get a beginners book. Look for book reviews here on the site.
led mike
|
|
|
|
|
Adding items to an array I can do, but not a Multidimensional Array. Some people do not read books, but search the internet and learn from each time they tackle something. I have been playing around in C# for some time and can do pretty much anything that is needed, but trying to learn some other items. Why dont you just respond to every post "go buy a book" that is so much more helpful then actually helping someone out.
|
|
|
|
|
Brad Wick wrote: Some people do not read books, but search the internet and learn from each time they tackle something.
Ok, good luck.
led mike
|
|
|
|
|
Just look at your XML examples (hierarchy). It's just a name/value pair array.
|
|
|
|
|
So you think it would be better to store the information in XML to pass between different functions/objects?
|
|
|
|
|
No. I don't know your application so it's hard to say what's better. What I was getting at was that if you're confused about multi-dimensional arrays, just look at your XML to visualize what it would look like.
In 2.0 forward, you could use a generic list, but I think you said you're using 1.0+
[Edit] No, the 1.0 was from another question. Sorry.
|
|
|
|
|
The way I normally handle this is to create a class (or struct if more appropriate) for a single item, then create a class that is a generic list of single items.
e.g.
public class MyMessage
{
}
using System.Collections.Generic;
public class MyMessageCollection : List<MyMessage>
{
public MyMessage FindItemFromID(int id)
{
MyMessage found = this.Find(c => c.ID == id);
return found != null ? found : new MyMessage();
}
}
Dave
|
|
|
|
|
Note: This method is new in the .NET Framework version 2.0. and I am using .NET Framework version 2.0.50727.
http://msdn.microsoft.com/en-us/library/1ffy6686(VS.80).aspx
Array.Resize(ref m_yData, m_points);
I get this compile error message "'System.Array' does not contain a definition for 'Resize'".....What am I missing or doing wrong?
Thanks
|
|
|
|
|
C++NewBe wrote: What am I missing or doing wrong?
It's a Generic method so you need a type initializer. The example code in the documentation appears to be wrong also.
int[] ints = { 1, 2, 3 };
Array.Resize<int>(ref ints, 5);
led mike
|
|
|
|
|
You don't need to specify the generic type for a generic method call - you can do this, but in most cases the compiler is smart enough to figure it out. Explicitly specifying the generic type in a method call is only necessary in ambiguous cases where the compiler can't compute the type.
e.g.,
Array.Resize(ref ints, 5);
will work just fine.
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
VB to Java Converter
Java to VB & C# Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: convert VB, C#, or Java to C++/CLI
|
|
|
|
|
David Anton wrote: You don't need to specify the generic type for a generic method call - you can do this, but in most cases the compiler is smart enough to figure it out. Explicitly specifying the generic type in a method call is only necessary in ambiguous cases where the compiler can't compute the type.
Sweet. Missed that one and it makes a huge difference.
led mike
|
|
|
|
|
Use a collection instead of an arraylist. Then you don't have to resize manually.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I use sql 2005 along with DAAB using asp.net (c#.Net)
But when i attempt to run the app, i got this error " Instance Failure".
How do I resolve this and what could be responsible.
Thanks
|
|
|
|
|
Banjo Ayorinde wrote: How do I resolve this
I would start by debugging
led mike
|
|
|
|
|
I want to make a transaction/entry in Microsoft Office Accounting 2007/2008 using C#.Net Application. Please give any idea about it.
|
|
|
|
|
dinker batra wrote: Please give any idea about it.
Are you an experienced software developer? If not get beginners books on Computer Science and Software Logic and Design.
Are you an experienced C# developer? If not get a beginners book on C# and .NET
Have you searched for any programming interface documentation for Microsoft Office Accounting? If not I recommend using Google and start every search phrase you try with MSDN , so an example would be: MSDN Office Accounting Object Model
led mike
|
|
|
|
|
|
HI,
I want to create a program so that I can determine if my website is down or up using C#.
Can any one give me an idea where to start. Any idea is greatly appreciated.
Thanks
Pavel
|
|
|
|
|
mdpavel wrote: Can any one give me an idea where to start.
class Program
{
static void Main(string[] args)
{
}
}
led mike
|
|
|
|
|
Vague question, but you can use tcpclient to extrapolate the status.
Namespace: System.Net.Sockets
|
|
|
|
|
Thanks Bert.
What I meant is "is there any way I can ping a website and know the status of the site?.Or anything else I can call that will tell me the status of the website(if it's up or down)?"
|
|
|
|
|
I would use tcpclient connect instead of a ping.
A ping to an ip address could just means it's responding (e.g a router) but doesn't mean the server is really active.
Connecting to an address/port/content means the server is serving content back to your client, so it's active and available.
|
|
|
|