Upgraded to Visual Studio 2005. With a large project, I kept getting this error when building. No clues as to what was wrong or how to fix it.
Googled the message but little joy. Eventually found a link that suggested that virtual memory was the problem so changed my XP virtual memory.
Path is Control Panel / System / Advanced / Performance / Settings / Advanced / Virtual memory and selected "System managed size".
Seems to have fixed the problem.
Enjoy!
Ideas and thoughts about Microsoft Identity, C# development, cabbages and kings and random flotsam on the incoming tide
Wednesday, August 30, 2006
Monday, August 14, 2006
C# : Visual Studio Express
If you want to take the first steps to getting familiar with C# and Visual Studio, check out these Visual Studio Express downloads.
There is one for:
Web developer
SQL
Visual Basic
Visual C#
Visual C++
Visual J#
MSDN Express Library (optional)
And best of all, they are FREE.
There is one for:
Web developer
SQL
Visual Basic
Visual C#
Visual C++
Visual J#
MSDN Express Library (optional)
And best of all, they are FREE.
Thursday, August 10, 2006
C# : NUnit - integrating with Visual Studio
There are a number of ways of doing this but one of the simplest is to go to the NUnit site, click on "Documentation" then "Current Release" then "Features" then "Visual Studio Support" e.g. something like
this.
Add a custom tool entry specifying the path as described and then run nunit-gui.exe by clicking the NUnit entry which will now be under the "Tools" menu.
If you want to debug using NUnit, the procedure is also described here. Essentially, you first set the breakpoint, run an instance of NUnit as described above and then you click "Tools / Attach to Process" and then select the nunit-gui.exe line in the dropdown. Then re-run NUnit by clicking the "Run" button.
this.
Add a custom tool entry specifying the path as described and then run nunit-gui.exe by clicking the NUnit entry which will now be under the "Tools" menu.
If you want to debug using NUnit, the procedure is also described here. Essentially, you first set the breakpoint, run an instance of NUnit as described above and then you click "Tools / Attach to Process" and then select the nunit-gui.exe line in the dropdown. Then re-run NUnit by clicking the "Run" button.
C# : NUnit
NUnit is a very powerful way of testing using extreme programming. Check out:
NUnit
The simple sample isn't all that clear. If you wanted to test a method Return0 in a class called CSharp1 which looked like:
public int Return0 ()
{
}
use the following in CSharp1Test:
[Test]
public void CheckReturn()
{
}
NUnit
The simple sample isn't all that clear. If you wanted to test a method Return0 in a class called CSharp1 which looked like:
public int Return0 ()
{
return 0;
}
use the following in CSharp1Test:
[Test]
public void CheckReturn()
{
CSharp1 cs = new CSharp1 ();
int ret = cs.Return0();
Assert.AreEqual(0, ret, "Should return 0");
}
Monday, July 03, 2006
Unix : List symbols from object files
Often when adding a method to a shared library, the method can't be found when accessed from another program. You start to wonder whether you made a mistake and whether the new method was indeed added. A simple way to check is to use the "nm" command e.g.
nm libraryname.sl
This lists all the symbols so best to do something like:
nm libraryname.sl | grep nameofmethod
Enjoy!
nm libraryname.sl
This lists all the symbols so best to do something like:
nm libraryname.sl | grep nameofmethod
Enjoy!
Unix : Sorting directory by date (ls -ltr)
Almost everyone knows the
ls -l
command to display information about the contents of a directory. Sometimes you need to display it in date order so
ls -lt
To display in ascending date order (i.e. most recent last)
ls -ltr
Enjoy!
ls -l
command to display information about the contents of a directory. Sometimes you need to display it in date order so
ls -lt
To display in ascending date order (i.e. most recent last)
ls -ltr
Enjoy!
Monday, May 29, 2006
C - Premature end-of-file (EOF)
So there I was writing a C program on Windows to change some fields in a binary file and copy the rest over as is. The problem was that the output file was always smaller than the input file? A little research showed that the problem was a 0x1A in the file. This is interpreted as an EOF.
Aside: This dates from MS-DOS days. The ASCII character 0x1A or 26 decimal (the "SUB") character was used as the end of file marker for text files. This mode also translates "\r\n" to "\n" for reading and translates "\n" to "\r\n" for writing.
The solution is to read and write the file as binary i.e.
fopen ("File", "rb") or fopen ("File", "wb") where the "b" indicates binary.
Enjoy!
Aside: This dates from MS-DOS days. The ASCII character 0x1A or 26 decimal (the "SUB") character was used as the end of file marker for text files. This mode also translates "\r\n" to "\n" for reading and translates "\n" to "\r\n" for writing.
The solution is to read and write the file as binary i.e.
fopen ("File", "rb") or fopen ("File", "wb") where the "b" indicates binary.
Enjoy!
Thursday, May 25, 2006
Unix : bdf - free disc space
To see a report of free disc space, the "df" command is the UNIX standard. However, for HP-UX use "bdf". It's more useful.
Enjoy!
Enjoy!
Monday, May 08, 2006
Unix : httpget
Very useful utility to check if a server can access URL's programmatically i.e. without using standard IE browser port 80. Useful if you think firewalls, proxies etc. will get in the way.
Usage : httpget http://www.testsite.com
Enjoy!
Usage : httpget http://www.testsite.com
Enjoy!
Monday, May 01, 2006
Unix : Find a list of files and compile them
Very easy way to find a list of files in a directory and compile them all via a shell script without having to manually find and compile each one:
for i in $(ls *.c); do
done
This looks for a list of C files and then compiles them. You need to substitute the actual name of your compiler for the "compile" part of the script.
Enjoy!
for i in $(ls *.c); do
compile $i
done
This looks for a list of C files and then compiles them. You need to substitute the actual name of your compiler for the "compile" part of the script.
Enjoy!
Friday, April 28, 2006
Unix : Find files modified within a certain time period
So there I was trying to find where this application stored its @#$% log file.
Eventually had a brainwave and decided to search for all files recently modified.
A quick Google bought up the Find command:
Find / -mtime [+|-] value
The "+" or "-" indicates before or after e.g.
-4 indicates all files modified within the last 4 days
+4 indicates all files modified more than 4 days ago
4 indicates all files modified 4 days ago only
0 indicates all files modified in the last 24 hours.
Enjoy!
Eventually had a brainwave and decided to search for all files recently modified.
A quick Google bought up the Find command:
Find / -mtime [+|-] value
The "+" or "-" indicates before or after e.g.
-4 indicates all files modified within the last 4 days
+4 indicates all files modified more than 4 days ago
4 indicates all files modified 4 days ago only
0 indicates all files modified in the last 24 hours.
Enjoy!
Monday, April 03, 2006
Misc : Multiple IDE's
I rarely have less than 3 open at any one time covering a range of languages:
Java , C, C++ , C#, Cobol ...
What's really confusing is when you write a correct statement in the wrong language
e.g. in the Cobol IDE, I wrote:
Temp = 1;
and then you wonder why the compiler complained!
If you don't have your orientation correct, it's a puzzle because it *looks* correct. The moment you realise you are in the Cobol IDE, the penny drops.
The correct statement is of course:
Move 1 to Temp.
Enjoy!
Java , C, C++ , C#, Cobol ...
What's really confusing is when you write a correct statement in the wrong language
e.g. in the Cobol IDE, I wrote:
Temp = 1;
and then you wonder why the compiler complained!
If you don't have your orientation correct, it's a puzzle because it *looks* correct. The moment you realise you are in the Cobol IDE, the penny drops.
The correct statement is of course:
Move 1 to Temp.
Enjoy!
Subscribe to:
Posts (Atom)