NickNotYet's Q&A profile
.NET Development Efficiently handling xml fragments in a file
I'm looking good way of reading a sequence of serialized XML fragments (subtrees) one at a time from a file containing a sequence of serialised XML nodes. I will be performing XPath queries on each of the subtrees. I have a program that reads XML subtrees (fragments) from a log file as it is being written. Currently, it uses a File System Watcher to be notified that data has been added to a file, reads it through a FileStream, splits events using Regular Expressions and runs each event into an XmlTextReader. At this point it uses an XPathDocument, Xpath and an XMLNavigator to select information for display. I was hoping to improve the program by eliminating the use of Regular Expressions to improve efficiency and the accuracy of spli ...Show All
SQL Server Separate data stuff from applications
Hi, This is probably for most of you a very basic question. My goal is to define in a seperate instance from application all infos related to DataSets and DataAdapters that are needed when connecting to a specific database. Why First, I would like to be able to have in a single instance everything needed when hooking to a SQL Server Express database and in an other everything needed when hooking to a SQL Server CE database. Then, from application, I would like to be able following a few basic configuration steps to choose from one or the other, or even both in specific cases. Second, I want to be able to seperate Database related stuff from application so that I can re-use everything from any other application when needed. ...Show All
Visual C++ "error LNK2005"...How to fix it?please help me...
I'm using Visual C++ Express Edition..I'm programming in Win32 Console Application.When I compile the appliacation,compiler informs that: error LNK2005: "public: class String & __thiscall String::operator=(class String const &)" ( 4String@@QAEAAV0@ABV0@@Z) already defined in UseString.obj 1>String.obj : error LNK2005: "public: __thiscall String::String(char const *)" ( 0String@@QAE@PBD@Z) already defined in UseString.obj 1>String.obj : error LNK2005: "public: __thiscall String::String(class List<char> &)" ( 0String@@QAE@AAV $List@D@@@Z) already defined in UseString.obj 1>String.obj : error LNK2005: "public: char const * __thiscall String::c_str(void)const " ( c_str@String@@ ...Show All
Smart Device Development Sample sdk code "Mapirule" works only on PPC. Facing problem on SP 3.0 and 5.0. Need help
Hi, I am working on the sample application "MapiRule" supported by Windows Mobile SP0.3 and 0.5, PPC0.3 and 0.5. It will be available in \Program Files\Windows CE Tools\wce420\SMARTPHONE 2003\Samples\Win32\Mapirule This is working perfectly on PPC 2003 device but not on Smart Phone 2003 and 2005. After deploying it on PPC3 it helps me filter sms messages with subject/msg as "zzz" . It displays the sms in message box and later deletes it. So it helps me filtere the sms message for which i register. This filtered sms is thus not seen in PPCs native Inbox. In case of SP3.0 and 5.0 its doing the registery entries as mentioned in msdn help but its not calling the processmessage() which actually recives the sms ...Show All
Windows Forms How to encrypt app.config(Winform, visual studio 2005)
Hello, I wanna encrypt the app.config (in visual studio.net 2005). It's because the app.config will be deployed to client PC. I wanna encrypt the file with winform application (NOT in ASP.NET) I know ASP.NET 2.0 has the solution (aspnet_regiis.exe) It's POSSIBLE to make the encryption myself with some code. The problem is.... if I encrypt the app.config with my code, what happen with the codes that Visual Studio's Desinger generate (for example tableadapter's code) It will NOT WORK!!! (They don't know how to decrypt app.config) Maybe I will have to modify the generated code, so they can decrypt the encrypted app.config. DO I HAVE TO MODIFY all codes that is generated by Visual Studio.net de ...Show All
Visual Studio Team System Does the difference script leave partial changes?
Here's an example of one script to resolve one difference, out of hundreds, in a database: PRINT N'Creating index [IX_ActiveAssets] on [dbo].[Asset]' GO CREATE NONCLUSTERED INDEX [IX_ActiveAssets] ON [dbo].[Asset] ([org_level], [asset_active]) ON [PRIMARY] GO IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION GO IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END GO What worries me is that this script appears to leave the database in an inconsistent state. As I see it, here's the flow: 1. print what we're going to do next 2. Create the specified index 3. If there was an error creating the index, then roll back the transaction thus far. 4. If, as described in step 3, there was an ...Show All
Game Technologies: DirectX, XNA, XACT, etc. On Quaternions and Vectors in 1.0
First: Congrats to the team for getting 1.0 out. It's always a mad push. Second: Is there a "release notes" document somewhere, that documents all the changes between beta 2 and 1.0 The Readme document contains almost nothing like that, and neither does the supplied help file documentation (at least that I can find). Third: I'd like to understand how the connect feedback system works. I suggested you add a vector-by-quaternion transform function to make it easy to rotate a vector by a quaternion. Doing it that way is a lot more efficient than going to matrix and multiplying. This suggestion was closed as "resolved" in connect a while back. However, in 1.0, there is no Vector3.Transform() function to transform by a quate ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Draw a JPEG using alpha
I am trying to draw a JPG photo semi-transparently over a background with the following code: Batch.Draw(CurrentPhoto, photoPos, null , fadeColor, 0f, Vector2 .Zero, scale, SpriteEffects .None, 0f); where fadeColor will be (255,255,255,alpha). The RGB color values of fadeColor seem to modulate the color of the photo fine, but the alpha doesn't seem to do anything. Of note, the CurrentPhoto is a Texture2D object created from a JPG file using FromFile(). Does the Texture2D object have to have a format that includes alpha Any other ideas why the alpha doesn't seem to work Thanks, John Lund The input file format shouldn't matter because the content pipeline converts it to an XNA standard format anyway. I have a blog p ...Show All
SQL Server Restore only data on a database
Hi to all, I have created a program that weekly restore a database with differential backup. It works fine the only thing is that when I restore the database the new user are dropped. There is a way to restore only the data code: use master ALTER DATABASE GOROB SET SINGLE_USER WITH ROLLBACK IMMEDIATE RESTORE DATABASE GOROB FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\GOROBFULL' with NORECOVERY RESTORE DATABASE GOROB FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\Differential' WITH FILE =1 , RECOVERY ALTER DATABASE GOROB SET MULTI_USER Thank you in advance Anrie thank you for your reply, there is a way to look insite the users of the database and g ...Show All
Windows Forms BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress.
Don't know if this is right group to post this question. My program is in .Net 2.0, It is data entry form that has no code related to graphic manupilation. But my clients sometimes get this error. and it will show some big red X over some controls. I've never seen it in my development machine though. "BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress." What could cause this problem Thanks This looks like a threading problem to me. BufferedGraphicsContext is a shared resource for all forms in your app. Closing a form while another form is busy painting would trip this exception. It would be a "once in a while" kind of error. As threading problems always ...Show All
Visual Studio Express Editions FontStyle
Here is what I am using Dim font_style As FontStyle = FontStyle.Regular and here is the errorr that I am getting Font 'Monotype Corsiva' does not support style 'Regular'. My question is how do I tell the program to load the font in it's default style Cheers Tall Dude, That's now working fine, need to alter the rest of the code for Bold, Italic, Underline, Size etc but that will make the program better and the code tidier and easier to understand. So after the Christmas celebrations I could be back. All the best Graham ...Show All
SQL Server Error from sys.dm_db_index_physical_stats "No exceptions should be raised by this code"
I'm setting up a routine to do some reindexing. To get the info I need I'm trying to use the new function. The DB I think is causing the problem does pass DBCC CHECKDB. I'm not sure why I'm getting this but can not find anyone else that is getting this same error. When I run this.... SELECT * FROM sys.dm_db_index_physical_stats (NULL, NULL, NULL, NULL, 'detailed' ) I get this.... Location: qxcntxt.cpp:954 Expression: !"No exceptions should be raised by this code" SPID: 236 Process ID: 1060 Msg 0, Level 11, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discarded. Msg 0, Level 20, State 0, Line 0 A severe error occurred on the current ...Show All
SQL Server any *simple* external activation examples available?
BOL only seems to say that you can do it w/o really showing how, and the ExternalActivator sample at gotdotnet.com contains so much functionality I'm not sure what's required just for the external activation. Are there any docs or samples out there that focus on how to do it w/o obscuring the matter with a bunch of other functionality (I prefer docs to project samples, b/c the samples tend to have hacks like hardcoded paths and connection strings so that they rarely work correctly right out of the box.) TIA The sample tries to do it correctly. That is, it must gaurantee that it will try to launch the process even under memory pressure and process failure. If it didn't, there is the danger of orphaning ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA Creators Club without Xbox Live?
Is it possible to subscribe to the XNA Creators Club without holding an Xbox Live subscription XNA is not just for Xbox development, it covers Windows too. And for me, running an XNA game on Xbox is secondary to obtaining access to sample games (e.g. XNA Racer) and game assets (I'm a developer, not an artist). I'm very keen to work with XNA, and I'm happy to drop $100 on it, but I'm not keen to purchase an Xbox 360, Xbox Live silver subscription AND Creators Club subscription. Any insight is appreciated. Regards, Chris Creator's Club, as it stands right now, gives you nothing besides deploy/debug/run on Xbox 360. Other than that, there is the "tease" about the longer you remain a member, the mor ...Show All
.NET Development .NET equivalent for API
Hie, does anyone know the .NET equivalent for the following API: FindWindow (Ex) SendMessage FlashWindow FindFirstFile (for file enumeration) i dont want to use THE API.. in the C#.. when the .NET classes exist... i want the equivalents Thanx Mattias Sjogren wrote: Instead of FindFirstFile you may be able to use System.IO.Directory.GetFiles or System.IO.DirectoryInfo.GetFiles. SendMessage is such a general API with so many different uses. There's no direct equivalent that covers any message, but if you let us know how you use it there may be alternatives. I don't know any replacements for FindWindow or FlashWindow. Watch out on GetFiles () by the way. It returns all the files matching the search spec in one go ...Show All
