Microsoft Most Valuable Professional

Chris Pietschmann

An MVP From Wisconsin

Prevent Windows Kernel From Using The Page File (PagingExecutive Function)

Description
Placing the Windows (2000/XP) Kernel into RAM is quicker than allowing it to be paged.
Directions
If you system has more than 256MB of RAM, then you should try this tweak. In theory, the kernel (and thus Windows) should run faster if it kept in RAM instead of the slower page memory.

This involves editing the registry so make a registry backup before trying this.

Navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\DisablePagingExecutive

Setting the value to 1 will prevent the kernel from using slower page memory.

Changing it back to the default value of 0 will return your system back to normal.

Remember that registry changes require reboot before you will see their effects.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: General
Posted by crpietschmann on Monday, August 30, 2004 2:00 PM
Permalink | Comments (1) | Post RSSRSS comment feed


True Programming Language Independent IDE

I watch a video on http://channel9.msdn.com about how we will be able to mix C++, C# and VB.NET code files within the same project in Visual Studio 2005. Watch the video here: http://channel9.msdn.com/ShowPost.aspx?PostID=19445

I have an idea to take this one step further. It would be cool if the IDE would be able to convert C#, VB.NET and C++.NET code to any of the others. This way a VB.NET developer could load a C# application, edit in VB.NET, then save it back to C#. Then a C++.NET developer could load the the same C# application, edit in C++.NET, then save it back to C#. Then finally the C# developer could edit the app in C#. You could have three developers (one VB.NET, one C# and one C++ developer) work on the same project and they would never have to know the syntax of any of the other language to edit any of the code in the application. This way you could achieve true language independance.

Now wouldn't that be AWESOME??

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: General
Posted by crpietschmann on Friday, August 27, 2004 12:25 AM
Permalink | Comments (1) | Post RSSRSS comment feed


Write to the Event Log in .NET (VB.NET and C#.NET)

It is as simple as this to write to the Windows Event Log in .NET

Declaration:

Imports System.Diagnostics

Code:

Public Function WriteToEventLog(ByVal Entry As String, _
Optional ByVal AppName As String = "APlusFeeCalc", _
Optional ByVal EventType As EventLogEntryType = EventLogEntryType.Information, _
Optional ByVal LogName As String = "Application") As Boolean
     Dim objEventLog As New EventLog
     Try
          'Register the App as an Event Source
          If Not objEventLog.SourceExists(AppName) Then
               objEventLog.CreateEventSource(AppName, LogName)
          End If
          objEventLog.Source = AppName
          'WriteEntry is overloaded; this is one of 10 ways to call it
         objEventLog.WriteEntry(Entry, EventType)
          Return True
     Catch Ex As Exception
          Return False
     End Try
End Function

Currently rated 3.0 by 2 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: General
Posted by crpietschmann on Tuesday, August 24, 2004 6:03 PM
Permalink | Comments (0) | Post RSSRSS comment feed


HVD: Holographic Versatile Disc

Left the HVD, right ordinary DVD.

A Japanese company has achieved the world's first reliable recording and playback of digital movies on a transparent holographic recording disc.

Optware plans to offer reader/writer players and 200Gbyte holographic versatile discs (HVD) in 2006 for enterprise users.

Much less expensive consumer versions could be on the market by 2007, said Yasuhide Kageyama, manager of business development and marketing at Optware.

The company has developed a collinear holographic data storage system that uses a green 532 nanometer laser to read holographic data on a 12-centimetre disc.

Light from the laser is split into two beams. Data to be recorded is encoded onto one of the beams while the other beam is used as a reference. The two beams interfere with each other inside the disc's recording layer and in this way data is stored.

Below the recording layer is a pre-formatted layer that stores servo data and is read by a red laser. This enables accurate tracking of the disc.

Between the data layer and servo layer is a mirror layer, which reflects the green laser but is transparent to the red laser. It is this mirror layer that is the secret to HVD, said Kageyama, because it stops the scattering of light within the disc that could cause noise and deteriorate the signal quality.

The company is initially planning to use the technology for enterprise applications. Drives for this market will cost about $20,000 (£11,075) and initially use 200Gbyte HVDs, with a target cost of about $100 per disc.

Drives for home users will cost about $2,700, about the same as commercially available Blu-ray Disc players now.

To read more: http://www.optware.co.jp/english/what_040823.htm

Currently rated 4.0 by 2 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: General
Posted by crpietschmann on Tuesday, August 24, 2004 1:46 PM
Permalink | Comments (1) | Post RSSRSS comment feed

Why do we need to handle the RowUpdated event of our DataAdapter in order to reflect the ID in a Primary/Foriegn key relationship??

Why do we need to handle the RowUpdated event of our DataAdapter in order to reflect the ID in a Primary/Foriegn key relationship?? Well, anyway here is a page that tells you how to do this.

AddHandler daChargeAttendance.RowUpdated, AddressOf FeeChargeAttendanceRowUpdated

Private Sub FeeChargeRowUpdated(ByVal sender As Object, ByVal e As SqlRowUpdatedEventArgs)
     Dim oCmd As SqlCommand = New SqlCommand("SELECT @@IDENTITY", e.Command.Connection)
     e.Row("ID") = oCmd.ExecuteScalar()
     e.Row.AcceptChanges()
End Sub

http://codeproject.com/cs/database/relationaladonet.asp

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: General
Posted by crpietschmann on Monday, August 23, 2004 5:39 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Fill DataSet with multiple Tables and update them with DataAdapter

One way to fill a DataSet with multiple tables is to send the database multiple requests. Another way to do this is to use multiple SELECT statements in a single request.

There are a couple of problems with doing it this way:

  • The DataTables don't have the same name as the tables in the database, you have to set them yourself
  • You can't update/save the tables to the database; to do that you must use a seperate DataAdapter for each table.

Dim myAdapter as SqlDataAdapter = new SqlDataAdapter(
      “
SELECT * FROM Customers; SELECT * FROM Orders“, connection)

myAdapter.Fill(dsTables)
dsTables.Tables(0).TableName = “Customers“)
dsTables.Tables(1).TableName = “Orders“)

It would be so much easier if they made it so you can use the same DataAdapter to update all the tables you load into the DataSet with the DataAdapter.

If you do try to update all the tables with the same DataAdapter, then you will get an error like the one below (this error really frustrated me for a couple hours):

An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll

Additional information: Missing the DataColumn 'Date' in the DataTable 'FeeChargeAttendance' for the SourceColumn 'Date'.

 

I wonder if Mono has this same issue??

Currently rated 3.7 by 3 people

  • Currently 3.666667/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: General
Posted by crpietschmann on Sunday, August 22, 2004 11:48 PM
Permalink | Comments (2) | Post RSSRSS comment feed

JavaScript: How to get value from nested form in iframe?

Here is an example of how to get a value from a nested form in an iframe. It works in IE6, but not Netscape 7.1.

PageOne.htm
<html>
<head>
<script language='JavaScript'>

 function Search() {
  alert(document.frames("PageTwo").document.forms("Members").elements("Search").value);
 }

</script>
</head>
<body>
<input type='button' value='Search' onclick='Search();'>
<iframe name='PageTwo' src="PageTwo.htm" width='100%' height='100'>
</body>
</html>

PageTwo.htm
<html>
<body>
<form name='Members'>
    <input type='text' name='Search' value='Chris'>
</form>
</body>
</html>

Currently rated 3.3 by 4 people

  • Currently 3.25/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: General
Posted by crpietschmann on Thursday, August 12, 2004 11:12 PM
Permalink | Comments (6) | Post RSSRSS comment feed

Create your very own Supercomputer with MPICH

Early supercomputers used parallel processing and distributed computing and to link processors together in a single machine. Using freely available tools, it is possible to do the same today using inexpensive PCs - a cluster. Glen Gardner liked the idea, so he built himself a massively parallel Mini-ITX cluster using 12 x 800Mhz nodes.

The machine runs FreeBSD 4.8, and MPICH 1.2.5.2. After working with his machine and running some basic tests, Glen's cluster looks to be equivalent to at least 4 (maybe 6) 2.4Ghz Pentium IV boxes in parallel on a similar network - achieving a performance of around 3.6 GFLP. With the exception of the metalwork, power wiring, and power/reset switching, everything is off the shelf. Rather impressive we'd say - though he *is* root on a 1.1 TFLP 528 CPU monster, the 106th fastest computer in the world...

http://www.mini-itx.com/projects/cluster/

MPICH Site: http://www-unix.mcs.anl.gov/mpi/

You can even do this with Windows machines. If I had the resources and time, I would create my own supercomputer. You could build some cheap ($300) Athlon XP 2000+ computers. Five of them would cost around $1500, and it would be the equivelant to a 8-10 Ghz system. This would be pretty sweet. I think you might be able to get the best performance if you were to use a couple of Dual processor systems with Gigabit ethernet connecting them.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: General
Posted by crpietschmann on Thursday, August 12, 2004 6:14 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Homestarruner.com - pretty cool toons

These are just plain funny toons here.

http://www.homestarrunner.com/main1.html

GO STRONGBAD!!

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: General
Posted by crpietschmann on Thursday, August 12, 2004 5:34 PM
Permalink | Comments (21) | Post RSSRSS comment feed

Wisconsin .NET User Group meeting tonight

WI-INETA meeting tonight, I'm leavin in a little while to go. This months topic is GDI+ in Microsoft .NET
If you live in Wisconsin and are interested in learning about .NET you should check out the group.

http://wi-ineta.org

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: General | WI-INETA
Posted by crpietschmann on Tuesday, August 10, 2004 8:37 PM
Permalink | Comments (1) | Post RSSRSS comment feed

About the author

I'm Chris Pietschmann, go to the About Me page to learn more about me.

Search

Sponsors

Web.Maps.VE - ASP.NET AJAX Virtual Earth Mapping Server Control

Recent comments

Disclaimer


This work is licensed under a Creative Commons Attribution 3.0 United States License, unless explicitly stated otherwise within the posted content.
© Copyright 2004 - 2008 Chris Pietschmann