Jonathan MacCollum's Q&A profile
Visual Basic Generating a Unique String
I have a source text file in the following format (irrelevant fields removed) CODE,DESC,COLOR,SIZE 1234,FRED,BLACK,8 1234,FRED,BLACK,10 1234,FRED,BLACK/WHITE,8 1234,FRED,BLACK/WHITE,10 1234,FRED,BLACK/BLACK,8 1234,FRED,BLACK/BLACK,10 1234,FRED,BLACK/BROWN,8 1234,FRED,BLACK/BROWN,10 1234,FRED,BLACK/BLUE,8 1234,FRED,BLACK/BLUE,10 I need to create a unique 3 character code, for each of the BLACK, BLACK/WHITE, BLACK/BROWN, BLACK/BLUE etc So my result would look something like this CODE,DESC,SHORTCOLOR,COLOR,SIZE 1234,FRED,BLK,BLACK,8 1234,FRED,BLK,BLACK,10 1234,FRED,B/W,BLACK/WHITE,8 1234,FRED,B/W,BLACK/WHITE,10 1234,FRED,B/B,BLACK/BLACK,8 1234,FRED,B/B,BLACK/BLACK,10 1234,FRED,BBW,BLACK/BROWN,8 1234,FRED,BBW,BLACK/BROWN,10 1234,FR ...Show All
Windows Forms Older version of terrarium that supports C++
Hi, I am a lecturer at the University of Glamorgan and a little less than two years ago I planned on presenting Terrarium in C++ as part of a 2nd year module. I now find that the latest version only supports C# and VB, which makes my life very problematic. I understand that there were issues which resulted in support for C++ being dropped on the public server, but I would be very grateful if someone has the earlier version or the client and server files so that I can set up a server behind our firewall just for our students. Any help would be very much appreciated for obvious reasons. Thanks Ian ...Show All
.NET Development Performance question about string
Hi, I wonder,.. what code has the highest performance public class Test { private static readonly string MyStr = "abcdefghijklmnop"; public void DoTest() { StringBuilder sb = new StringBuilder(); for (int i=0;i<10000;i++) sb.Append(MyStr); } } -or- public class Test { public void DoTest() { const string MyStr = "abcdefghijklmnop"; StringBuilder sb = new StringBuilder(); for (int i=0;i<10000;i++) sb.Append(MyStr); } } Stephan Smetsers stephansmetsers@hotmail.com http://www.inchl.nl Hi Stephan Rico, a Microsoft performance architect, has a great blog post on performance ...Show All
Visual Studio 2008 (Pre-release) creating complex lookless controls
Hey, What would be the best practice for collecting events from the template controls for a lookless custom control. Say I have 3 text areas on the custom control whose text is bound to some properties. That part is easy enough to do, but say I want to know if any of these areas have lost focus, and which one lost the focus Since these controls that are holding the text are defined in the template I don't have an easy way of discriminating between them. I can handle previewlostfocus or whichever, but to determine which was the control that lost fous means to me I'm left with the rather unsatisfactory solution of relying that they have some identifier in their control name, or something of that nature. Is there any way of rerouting an even ...Show All
Visual Studio Team System The difference in purposes of the "Analysis" and "Plan an Iteration" workstreams (MSF for CMMI)?
Hi again, Another thing I am trying to grasp is why both "Analysis" and "Plan an Iteration" workstreams are needed Or, rather, why in both of them scenarios and QoS requirements are broken down into smaller tasks, but this is done by different roles Wouldn't it be more logical to prepare the task breakdown first in the "Analysis" workstream, and reuse it later in the "Plan an Iteration" workstream Regards, Dmytro Lapshyn Shame on me - looks like I wasn't attentive enough when I was reading the MSF for CMMI Process Guidance. Now it looks like the "Analysis" workstream is spawned from the "Iteration Analysis" activity of the "Plan an I ...Show All
Visual Studio 2008 (Pre-release) Customize LINQ to SQL
Is there any possibility to customize LINQ to SQL in terms of both query and sql text translation For query customization it is possible, but what about sql text translation I hope there is not only one way to do the same thing in LINQ to SQL. Due to the use of expression trees on IQueryable, you can evaluate the LINQ query expression and formulate your own implementation to meet your specific needs. I believe at least one of the popular OR/M tools developers is working on such an implementation at this point. Additionally, they are planning a provider model that you can tie into to make your own mapping implementations. This is not a small task, but it is possible. It just depends on how much time and effort you are wantin ...Show All
Visual FoxPro Update AND Insert SQL text field (over 256 characters) into FoxPro memo field using OLEDB - VBScript version
I've seen many responses in the various 200+ documents I've reviewed to solve this issue, but I can't seem to find an example that actually works. Just a simple example of using VBScript to insert more than 256 characters into a FoxPro text field. I'm using SQL DTS ActiveX Script task to export data from SQL 2000 into FoxPro (there are many reasons for using this method as I have various tables to update and people to notify) I'm using the latest FoxPro OLEDB provider. I've attempted using a recordset and updating using appendchunk. That didn't work. I have to test each line for an error and I originally thought that there was an issue with the appendchunk method, but I discovered that none of the recordset type ...Show All
.NET Development System::IO::Ports::SerialPort::ReadLine() polling problem
I have a problem with a simple application reading a GPS NMEA 2.0 device through the serial port. On the idle event, my delegate function is invoked and reads the serial port, parses the GPS data (no looping in the parsing fucntion) and undates some text fields as well as a compass control. All is well when I randomly generate the GPS text data. In other words, there is a constant and consistant updating of the windows form, with no user interactions. However, when ever, I use the command ReadLine(), the program does not update the windows form, unless I create a mouse event over the form, like move mouse, right click, ect... (any will do). I did some breakpoint checking, and it appears as though the message pump has suspended, unless it r ...Show All
Visual Basic Create new Webbrowser
I want to create a new webbrowser and display it in a tab I tried this Dim browser as New Webbrowser in TabControl1.SelectedTab But that doesnt work... hopefully based on that code you know what i'm trying to accomplish.. I tried this already and it gave me a few errors I wrote Dim browser as New webbrowser TabControl1.SelectedTab.Controls.Add(browser) browser.dock.fill() It gives me an error that expression is not a method, and some other exclamation mark error browser.Dock.Fill = DockStyle.Fill <---- I tried that too ...Show All
SQL Server SQL Server 2000 Enterprise
I have an MSDN License from Microsoft and I am trying to install SQL 2000 enterprise edition to my XP laptop. I get an error stating that SQL is not compatable with this operating system. It is only offering to install the client tools. Can someone give me a heads up here and let me know what is going on, because I know I had this installed before. Thanks Curt You will need to download the developer edition (which has nearly the same featureset as the enterprise edition). EE is not installable on Windows XP Pro. HTH, Jens K. Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
Visual C++ C2027 Error: Full class declaration required: Bug?
Hi, This may touch on some obscure corners of the C++ standard, but I believe the example below should compile as is, without the full declaration of class Atom. Comments Thanks. Stuart ____________________ // Shows VC++ 2005 Bug Requiring Full Class Declaration Where Forward Declaration Should Suffice // Compile: cl /EHsc forward.VC.bug.cc (other options didn't make a difference) // Error: error C2027: use of undefined type 'rosetta::conformation::Atom' // Compiles without warning on: GCC 3.4 and 4.0, and Intel C++ 9.1 // Compiles if: // . Full Atom.hh header is included // , std::vector is used instead of vector1, // . vector1 dtor is made non-virtual // . typedef for Atoms_Iterator is removed // Something about the vector class hierarc ...Show All
SQL Server How to list all table without a primary key within SQL Server 2005 database?
Hi, All, Would please any expert give me any advice and guidance for how can we list all tables without any primary key within a SQL Server 2005 database Thanks a lot in advance for that. With best regards, Yours sincerelyd, You can also run USE <database_name>; GO SELECT SCHEMA_NAME(schema_id) AS schema_name,name AS table_name FROM sys.tables WHERE OBJECTPROPERTY(object_id,'TableHasPrimaryKey') = 0 ORDER BY schema_name, table_name; Please take a look at the FAQ in msdn2 for catalog views. The FAQ is at http://msdn2.microsoft.com/en-us/library/ms345522.aspx . It answers a lot of catalog view related queries. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Many compile errors with Visual Studio Express
Hello. Whenever i try to compile ANY example from the directx sdk (Direct 3d), i get a lot of errors, the specific errors depend on the project i'm trying to build. I'm currently using: Visual Studio Express Directx SDK Oct 2006 Latest Platform SDK Windows XP SP2 This is the Build log from when i try to build the "EmptyProject" in Samples\C++\Direct3D: http://dexxhole.tjbp.net/dx9/BuildLog_debug.htm I have been writing hlsl shaders in a 3rd party app (FX Composer) and would like to try going deeper into direct 3d. i would like to create a program that loads my sample models and renders them with the shaders and textures i have created, and distribute the entire thing on my demo reel, although i wouldn't mind learning more direct 3d any ...Show All
Windows Forms Getting ToolStripMenuItems from other Process ( Spy++ or ManagedSpy )
I'm trying to write a spy++ like application that is able to se all the controls in a running process. I can see most controls, but I'm not able to see ToolStripMenuItems residing under at menustip control. To get the other controls I've used the ManagedSpy sample: (Manage Spy sample ) http://msdn.microsoft.com/msdnmag/issues/06/04/ManagedSpy/ Does anyone know how to get information about the menustrips menuitems throu the spy framework Found another way to go. I'm now spying on the application from within useing Reflection. This means that I have to add a messagehandler to the application, that activates everytime a form is created. When a form is created, Reflection is used to browse throu every control including menui ...Show All
Visual Studio Express Editions ASPNETDB.mdf file missing
In personal web site kit in Visual express, in the solution explorer under App_Data, ASPNETDB.mdf file is missing , how can i get it and why has this happened I am getting server error when trying to run personal web site kit , is this the reason! you can see the error in the previous threads.... I am trying hard to get this site running, please help......... Try using the web configuration tool to set up your security provider, Also if you have any problems you should ask your question on http://forums.asp.net as that is the home for most of the web developers. ...Show All
