|
String 1 is the regex parsing string. String 2 is the string I am trying to parse. Note that String 2 is a continuous line and therefore it is matching almost everything in (?<report_desc>.+) part of the parser.
Anyone know how I can get around this?
String 1:
StatusArray\[\d+\] = "(?<status>.)";JodIdArray\[\d+\] = "(?<job_id>\d+)";FormatTypeArray\[\d+\] = "(?<format_type>\d+)";FileNameArray\[\d+\] = "(?<filename>\w*)";FileExtArray\[\d+\] = "(?<file_extension>\w{3})";ReqNameArray\[\d+\] = trimAll\(\"(?<report_desc>.+)"\);ApplId\[\d+\] = "(?<app_id>\d+)";ExeId\[\d+\] = "(?<exe_id>\d+)";Qid\[\d+\] = "(?<query_id>\w+)";DivId\[\d+\] = "(?<div_id>\d+)";CountryId\[\d+\] = "(?<country_id>..)"
String 2:
StatusArray[0] = "E";JodIdArray[0] = "98155582";FormatTypeArray[0] = "1";FileNameArray[0] = "_98155582_";FileExtArray[0] = "zip";ReqNameArray[0] = trimAll(" WF Product Characteristics- Comp Stores ");ApplId[0] = "300";ExeId[0] = "264";Qid[0] = "Q680";DivId[0] = "1";CountryId[0] = "US";StatusArray[1] = "N";JodIdArray[1] = "98110301";FormatTypeArray[1] = "1";FileNameArray[1] = "_98110301_";FileExtArray[1] = "xls";ReqNameArray[1] = trimAll(" Trash supply metrics - total stores D14 ");ApplId[1] = "300";ExeId[1] = "263";Qid[1] = "Q10001";DivId[1] = "1";CountryId[1] = "US";StatusArray[2] = "N";JodIdArray[2] = "98110298";FormatTypeArray[2] = "4";FileNameArray[2] = "_98110298_";FileExtArray[2] = "zip";ReqNameArray[2] = trimAll(" IT - US - WM - POS Sales - ItemWeekStoreType - Dept 93-99 - LY ");ApplId[2] = "300";ExeId[2] = "264";Qid[2] = "Q680";DivId[2] = "1";CountryId[2] = "US";StatusArray[3] = "N";JodIdArray[3] = "98110290";FormatTypeArray[3] = "4";FileNameArray[3] = "_98110290_";FileExtArray[3] = "zip";ReqNameArray[3] = trimAll(" IT - US - WM - POS Sales - ItemWeekStoreType - Dept 93-99 - TY ");ApplId[3] = "300";ExeId[3] = "264";Qid[3] = "Q680";DivId[3] = "1";CountryId[3] = "US";StatusArray[4] = "E";JodIdArray[4] = "98110213";FormatTypeArray[4] = "4";FileNameArray[4] = "_98110213_";FileExtArray[4] = "zip";ReqNameArray[4] = trimAll(" IT - US - Sales - Velocity by ItemStoreWeek - TY ");ApplId[4] = "300";ExeId[4] = "264";Qid[4] = "Q680";DivId[4] = "1";CountryId[4] = "US";StatusArray[5] = "E";JodIdArray[5] = "98110212";FormatTypeArray[5] = "4";FileNameArray[5] = "_98110212_";FileExtArray[5] = "zip";ReqNameArray[5] = trimAll(" IT - US - Sales - Velocity by ItemWeek ");ApplId[5] = "300";ExeId[5] = "264";Qid[5] = "Q680";DivId[5] = "1";CountryId[5] = "US";StatusArray[6] = "N";JodIdArray[6] = "98076304";FormatTypeArray[6] = "4";FileNameArray[6] = "_98076304_";FileExtArray[6] = "zip";ReqNameArray[6] = trimAll(" BR - Instocks ");ApplId[6] = "300";ExeId[6] = "313";Qid[6] = "Q10401";DivId[6] = "1";CountryId[6] = "BR";StatusArray[7] = "N";JodIdArray[7] = "98042022";FormatTypeArray[7] = "4";FileNameArray[7] = "_98042022_";FileExtArray[7] = "zip";ReqNameArray[7] = trimAll(" EDM_EVERYDAY_Daily_WM_POS_DOWNLOAD ");ApplId[7] = "300";ExeId[7] = "264";Qid[7] = "Q680";DivId[7] = "1";CountryId[7] = "US";StatusArray[8] = "N";JodIdArray[8] = "98042017";FormatTypeArray[8] = "4";FileNameArray[8] = "_98042017_";FileExtArray[8] = "zip";ReqNameArray[8] = trimAll(" EDM_FRI_Daily_WM_POS_DOWNLOAD ");ApplId[8] = "300";ExeId[8] = "264";Qid[8] = "Q680";DivId[8] = "1";CountryId[8] = "US";
|
|
|
|
|
Randy Walker wrote:
Anyone know how I can get around this?
Looks like your fields are ; delimited, search for anything bar ;, instead of using .*.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
This is driving me crazy ...
Why does the following code :
UdpClient uc = new UdpClient ();
try
{
uc.JoinMulticastGroup (IPAddress.Parse ("239.255.255.250"));
}
catch (Exception e)
{
Console.WriteLine (e.ToString ());
}
creates the following exception :
System.Net.Sockets.SocketException: An invalid argument was supplied
at System.Net.Sockets.Socket.setMulticastOption(SocketOptionName optionName, MulticastOption MR)
at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Object optionValue)
at System.Net.Sockets.UdpClient.JoinMulticastGroup(IPAddress multicastAddr)
If I go and create a UDP socket and try to set the multicast option I get the same exception. I'm puzzled.
Sylvain
|
|
|
|
|
The socket hasn't been created. For multicast to work practically, you need to specify a port - you can't just use a dynamic port. Specify the port number in the UdpClient constructor, and it should work.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Anyone know how to sum as decimal in SQLCE database?
I had try using below statement:
SELECT SUM(decimal(eAmount),9,6) AS Total FROM ExpenseDetail WHERE catID = 1
It give the error that it is not regcognize by SQLCE.
Please help!! Thanks in advance.
|
|
|
|
|
I have completed a .NET C++ project however the icon for the executable is the old DOS icon. How would I make it so that an icon I created would be the executable icon instead of the old DOS icon? Thank you very much. Also, my program gets much of the information needed from text files. Is there a way to bind those text files to the executable as well? Thank you again.
|
|
|
|
|
pcxboy wrote:
I have completed a .NET C++ project
A VS.NET project ?
If so ,then just go to Project menu and then Properties and then you will find app.ico name asociated with the Icon property of the project ,there you can replace the icon of the exe itself by yours.
|
|
|
|
|
I wasnt able to find the Icon propert of the project.
|
|
|
|
|
Right click your project in the solution explorer and click properties,then you will find in the right pan a field called Application Icon,just browse to your icon and it will be as well.
|
|
|
|
|
pcxboy wrote:
Is there a way to bind those text files to the executable as well? Thank you again
You can just put them in the same directory,and open them by StreamReader object.
|
|
|
|
|
|
if it can, I wouldnt know how to go about doing it, nor how to access that information
|
|
|
|
|
Cheat, Make your icon and rename it app.ico and place it in the project folder.
|
|
|
|
|
HA HA HA ha . Yes, thats exactly what I did. I couldn't figure out how to do the other suggestions, even the online ones. Also, I decided to turn each text file into its own seperate class . Very time consuming and increased the size of the program, but it worked. Thanks for all the help.
|
|
|
|
|
Hi,
I'm trying to activate a process on a remote machine and doing so successfuly. The only problem is that I' havn't figured out how to know when the process has ended.
here is an example of the code:
private void run_notepad(string machina)
> {
> ManagementOperationObserver observer = new
> ManagementOperationObserver();
> completionHandler.MyHandler completionHandlerObj = new
> completionHandler.MyHandler();
> observer.ObjectReady += new
> ObjectReadyEventHandler(completionHandlerObj.Done);
>
> string stringMachineName;
> string stringCommandLine;
> stringCommandLine="c:\\winnt\\notepad.exe";
> //Connect to the remote computer
> ConnectionOptions co = new ConnectionOptions();
> stringMachineName = machina;
> //get user and password
> if (machina!="")
> {
> co.Username = "aaa";
> co.Password = "******";
> }
> //Point to machine
> System.Management.ManagementScope ms = new
> System.Management.ManagementScope("\\\\" + stringMachineName +
> "\\root\\cimv2", co);
> //get process path
> ManagementPath path = new ManagementPath( "Win32_Process");
> //Get the object on which the method will be invoked
> ManagementClass processClass = new ManagementClass(ms,path,null);
> //Create an array containing all arguments for the method
> object[] methodArgs = {stringCommandLine, null, null, 0};
> //Execute the method
> processClass.InvokeMethod (observer, "Create", methodArgs);
>
anybody knows how to tell when the process exited?
Thanks,
Haim
|
|
|
|
|
can anyone guide me how to access .net webservice from my pocket pc that is ofcourse using .net compact framework. give a simple example of code. your quick response will be highly appreciated.
|
|
|
|
|
Just like you would in a Windows app. Add a web reference. I ran into some trouble once, where the client just threw some exception. Solved that by using a tool that generated a C# code file from the webservice.
|
|
|
|
|
hi,
We are doing a project on Live video conferencing in LAN.File is recoreded on a single PC but the actual thing must do is to send the data on a network.I m using directshow for this in which "IMediaControl Interface" is used for run and stop the file to record.But i need the actual data(streams).The question is:
1.How to get Audio & Video Stream data using Directshow?
2.How to send,replay this data on network?
plz reply me soon.
best regards
shumyla
|
|
|
|
|
Hi all,
I am developing a c# application and there are two version of .net Framework installed in my computer. They are <1.0> and <1.1> I want to know exactlly which .net framework I am using and how to choose a framework to run.
I can run my application successfully with the enviroment that <1.0> and <1.1> frame are installed together.But when I install my application onto anther computer which only <1.1> framework is installed.The applicaiton can not run as same as the previous one.I am wondering?
Any suggestions.Thanks in advance.
|
|
|
|
|
Unless you set up your app.config to target a specific framework version, the one with the highest number is the one you'll be using. But if you specifically target 1.1, then it will refuse to run unless 1.1 is installed, even if 1.0 is installed ( or 2.0 for that matter )
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hello christian,
how to create a app.config and were to save it? in witch folder? if i have more projects in one soulution explorer should i create for any project own config file?
thanx for help
mirso
|
|
|
|
|
Each project should have an app.config file already, if not, just create a new config file from the add/new menu. Each project has a config file, and for a web app, you can have config files for multiple directories as well. I recommend using google to find some MSDN info on the subject.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hallo Christian,
thanx very mutch for help, i create an App.config file for every Project in my Solutionmap, but they dont work? This is the App.config file for any Projekt:
<xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<suportedRuntime version="v1.1.4322" />
<requiredRuntime imageVersion="v1.1.4322" version="v1.1.4322" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v1.1.4322">
in the *.msi is, when i open them with the notepad :
<xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<suportedRuntime version="v1.1.4322" />
<requiredRuntime imageVersion="v1.1.4322" version="v1.1.4322" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v1.0.3705"> // the old version from framework???
My App.config does not take changes?! What make i wrong????
With best regards
mirso
-- modified at 3:46 Thursday 8th September, 2005
|
|
|
|
|
Hello folks
Did anyone try to detect IP address change events? .NET Framework 2.0 has a class for this but I'm on 1.1 and trying to find out a way with WMI / SENS.
If anyone shed some light, I'll be glad
|
|
|
|
|
Demachina just released a new tool that exposes a large number of Device and Compact Framework statistics remotely using the standard windows performance monitor.
Get it at www.demachina.com/products/perfy
|
|
|
|