Matthew Wright's Q&A profile
.NET Development Ping timeout < 500 ms
Hi, I have to connect to many machines defined in IP addresses ranges at startup. In these ranges, it is possible that some IP addresses does not exist or some machines are not started so I Ping (using System.Net.NetworkInformation.Ping) each IP address before trying to connect to it to prevent big Tcp timeout. It seems that, whatever timeout I specified < 500 ms, a Ping timeout is always at least 500 ms ! As I have to ping a lot of machines, I would like to specify a timeout of about 100 or 200 ms. To avoid too many threads, I send the ping sequentially in 1 dedicated thread. Thanks in advance, Droopy. OK though 25 times the average response timeout doesn't seem to me really small timeout. Thanks a lot ...Show All
SQL Server Fetch text from HTML [URGENT]
Hello everybody, I have data in my sql server table that is entered with a rich text editor so it contains html formatting. I need to show this data on the form with the formatting user has specified while entering the data. On the crystal report, I need to show the data not in the html format but simple text. I created a stored procedure to fetch the data and binded the report with the stored procedure. When data is printed on the report, it shows HTML tags with the data. Is there a way to fetch text in SQL so that report will only show text without HTML formatting Thanks. You can use the following code to replace all the HTML tags.... CREATE Function dbo.Html2Text(@HtmlString As Varchar(8000) ...Show All
.NET Development Regex character classes in C#
Hi! I'm trying to get certain texts from an html source file. I tried to use regex and came up with a pretty good formula. It is as follows: ( <=person_id=)"[^"\r\n]*" It extracts the values of the person id fields by checking if the string is after "person_id=" and if that's correct, it checks right after "person_id" for any string between double quotes, excluding the stuff I enclosed in square brackets. For example from person_id="443245" it gives back "443245". This works all good in PowerGREP (a regex editor) but when I try to use it in c# I get error after error. My whole code is somewhat like this: string SourceString = File .ReadAllText( @"C:\textfile.txt ...Show All
Visual Studio Express Editions Preserving File byte value - Help.
My application reads and writes files of any type as array<wchar_t>, through the Binary Reader and Writer. The intent is to read in most of the information and then write it out to a new file unchanged. I find however that this doesn't work with all files. Files with text characters - such as the .sln file of VC++ 2005 express- work fine. However files such as the .suo file do not. Information is lost entirely. The final file sizes should be identical but in fact the output file is smaller by at least 1K. The application reads into one buffer and then writes out to the new file from the same buffer. The buffer is quite large (30K bytes) compared to the file (17K) so it should read in the whole file and spit most of it out without a p ...Show All
Visual Studio 2008 (Pre-release) Dynamic Style and DataTemplate
Hello people, may be one of you could help me with this problem. I've a FlowDocument with a picture and a text. I want to consume a webservice that return to me a xaml of a Style (or a DataTemplate if apply); than I want to use that style and apply it to the FlowDocument. For example the webservice return me a style call RightPhoto and I have an object InformArticle with and atribute that say to me that this document has to use the RightPhoto Template/style. Like you see I have to use a dynamic resource form to download the style from the webservice and apply to the FlowDocument. Any idea will be welcome. Thanks a lot !!! For most XXXStyle or XXXTemplate properties in WPF there is a corresponding XXX ...Show All
Visual C# How can I "dribble" this problem? :P
Hi ! Me again... I'm doing something like this: while(true) { SerialPort.Write(my_string); Threading.Thread.Sleep(50); } But, after some minutes happend this error: "Make sure you do not have an infinite loop or infinite recursion." Exception datail : System.StackOverflowException was unhandled Ok... i knows that I'm doing a infinite loop, and I want... What I need to do for this message not apper again Hug, Joao Mello Hi, you must be calling a function that is directly or indirectly calling itself which is going into a stackoverflow. What else are you doing inside the while loop Mark. ...Show All
Visual Basic Accessing registry using VB2005
Hi, I want to search for the installed software via registry. I don't know what should be exact path where i can locate the installed software in registry or what will be the keys which will help me to search all the installed software on the specific system. Please help me out. Sorry, I thought you mentioned the explorer path like C:\... . This doesn 't contain all the applications on my pc. I have a lot of applications that are not mentioned on the AppPath but are mentioned in the Uninstall. NOTE: You will never be able to install that don't use an installer. Greetz, Geert Geert Verhoeven Consultant @ Ausy Belgium My Personal Blog ...Show All
Software Development for Windows Vista Can't create more then seven VMR9 renderes.
Hello, I have to create 16 preview panels on main window with images drawn from specific data. I am able to see 7 panels filled with data, but I get error: -2147220969 while doing hres = g_pCapture->RenderStream(0, 0, pSrcFilter, 0, g_pVmr). Is there any limit with number of VMR9 instance I need to display 16 previews of different data result. Regards, Peter I have seen this discussed in other boards, and have done some tests myself. The limit seems to be hardware dependent, but always in the same order (7 to 9 instances). You might be able to create a few more instances (up to 12 or 15), but the last ones are non-functional. You do not get this problem with VMR7, you can create tens or even hundreds of functional instan ...Show All
SQL Server Formatting a Subscription Comment
I have looked everywhere for an answer for this one, so if it's out there and I've missed it, sorry. I want to include a list of instructions with a report that I am sending out to a list of subscribers (not Data Driven, each is an individual subscription). It seems no matter how I enter the text in the Comments box, the body of the email comes out as a continuous stream of text with no line breaks, which is difficult for the recipients to read. Is there a way to embed line breaks as a minimum, but preferrably additional formatting, in a subscription comment Thanks Trevor Trevor, Did anyone answer this I have the same question. Thanks. MC ...Show All
Visual Studio 2008 (Pre-release) No error provider for wpf controls?!
Does any one know when will error providers be avaible for XAML controls Thanks! Hugo, Error Providers are a Windows forms technologies. For the WPF equivalent, you might want to have a look on this article: http://www.codeproject.com/WPF/wpfvalidation.asp ...Show All
Windows Forms Customized PropertyGrid
Hello, I need to wrap the user-entered text in one of the propertyGrid rows and resize the height of that row to make all user-entered text visible. Can someone suggest the way to do it Thank you. ...Show All
SQL Server Anyone know a self extracting tool for a zip file?
I have a zip file that requires a password to extract the file inside of it. Is there away to do this automatically Can't find any software that does this. Mike 7-zip is free and has the same switch: http://www.7-zip.org/ -p (set Password) switch Specifies password. Syntax -p{password} {password} Specifies password. Example 7z x archive.zip -psecret extracts all files from archive.zip using password "secret". ...Show All
SQL Server Creating a model in Report Manager
Can anyone help me I've read the instructions on the following page http://msdn2.microsoft.com/en-us/library/ms159118.aspx about how to generate a report model from a cube. I can set up the cube as a data source but when I look at the properties there is no option to "Generate Model". I am running SQL 2005 DE SP2(CTP). The option is just not there for me. Any ideas Thanks in advance The following conditions need to be satisfied for the button to be shown: 1) you must be using a shared data source 2) the data source must point to either a SQL server database, or a SQL Server 2005 Analysis Services cube, or if using SQL Server 2005 SP2 you can also u ...Show All
Visual C# Deploy Crystal Reports
Hello I have developed a windows application in VS.NET 2005. I have added some Crystal Reports.I made a setup project for deployment, and added the merge modules required for Crystal Reports. It is working properly. The problem is , I have to edit the App.config file during installation of my project.It is working properly in machines having VS.NET 2005 installed. But in machines having only .Net Framework, some error occures during installation and it rolls back. If I remove the Custom Action of editing the config file it is working properly. The erro message is "Unable to get installer types in the <project_name.exe> assembly. -->Unable to load one or more of the requsted types.Retrieve the LoaderEx ...Show All
.NET Development why doesnt System.Drawing work on Console Application?
hi all i wanna do a project with openGL in console application.but System.Drawing doesnt work.what must i do i'm waiting for ur replies. thnx for ur reply.i'm using windows application any more.if u have code samples in C# with openGL,can u send me i'll be too glad. ...Show All
