|
Hi,
Thank you very much for your help... I managed to connect to DB2 using your code.
I have question now, how can get more information about the DB2 database file (object), date last modified, file size, user last updated, etc?
Many Thanks,
Jassim Rahma
Jassim Rahma
|
|
|
|
|
Can someone please give me a regular expression that I can use with the split() method to delimit the a string such as the one that follows into 20 separate fields. It is comma-quote delimited, however nulls are not quoted (,,) and it is possible to have commas inside a quoted value ("1,2,7,7,8-PECDD"). Thanks...David
"42679","A106037#2","-9999","BL0414WJ","BL0414WJLB1","Laboratory Blank","DIOXINS/FURANS (GHK)","04/14/2000","04/19/2000","pg/l","1,2,7,7,8-PECDD","40321-76-4","6.016","6.016","U",,,"NO","YES"
David
|
|
|
|
|
,?"(?<value>.*?)"|,?(?<value>.*?)
This will let you extract the values as named groups, but will not work as a split separator.
I see dumb people
|
|
|
|
|
Daniel Turini wrote:
,?"(?<value>.*?)"|,?(?<value>.*?)
I have just added CodeProject support to your regexp :
,?"(?<value>.*?)"|,?(? <value>.*?)
|
|
|
|
|
Oh, I just love regex, it's an art form. Here's a regex which can validate (it's not mine, I found it on the web):
1. All valid dates from 1/1/0001 to 31/12/9999
2. Correctly validates leap years
3. It's valid for the regex classes on .NET framework
^(?: (?: (? ?[13578]|1[02])(\/|-)31)|(?: (? ?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?: (? ?[1-9]|1[0-2])(\/|-)(? ?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?: (? [48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(? [48]|[2468][048]|[13579][26]))$
Remove all the spaces from it, I've added some to bypass the emoticons.
I see dumb people
|
|
|
|
|
Who needs MSIL obfuscation when you've got RegExp. Of course, the trouble is you obfuscate your code to yourself
|
|
|
|
|
Was not sure what form this would belong to but since I code exclusively in C# nowadays and they will be written in C#, I thought I would try here.
What is the best way to send/receive binary data (like images or files) with web services? Just simply pass as a parameter or is there a better way?
Rocky Moore <><
|
|
|
|
|
Perhaps have a look at DIME[^].
"Direct Internet Message Encapsulation (DIME) is a lightweight, binary message format that can be used to encapsulate one or more application-defined payloads of arbitrary type and size into a single message construct."
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
my svg article
|
|
|
|
|
sorry about the title...its a little long
i have a quick question reguarding a program im working on. it is a simple text editor...(not much more complicated then notpad) its fine but the question is how do i add support for opening files. I.E when you double click a .TXT file notepad automaticly loads and load the contents of that file too the text field... how can i accomplish this ? if i was unable to explain this clear enough leave a post and ill try my best to clearify... thanks alot for your time
Jesse M
p.s im not talking about using a openFile dialog
file associations with command line args ?
|
|
|
|
|
You can get at your commandline arguments using Environment.GetCommandLineArgs()
To register your program for a shell operation during install you need to add a reference to it in the registry key HKEY_CLASSES_ROOT\txtfile\shell. Have a look at what's already in there for some clues.
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
i got the command lines too work...but is there a exsample of how i can load the selected files txt/rtf into my textfield.. how can i find the selected files location (atleast then i can tell the program too load it).. ill be looking around =) thanks for awnser my question on command line arguments
|
|
|
|
|
Hello,
I have one tab Control on a form. After adding a tab page to the tab control it is compiling but, I am getting the following error.
Code generation for property 'Controls' failed. Error was object reference not set to an instance of object. when i double click on the error it is showing code section of form.
Please help,
Chito
|
|
|
|
|
Does anyone know any good tutorials/references for packaging a windows form application that requires full permissions so that it may be started from a webpage?
What I am looking for is something that will allow me to do the following:
1) User clicks a link
2) Something pops up saying "do you trust this company" or "can this program have full permissions"
3) If permission granted, then the program is run from the user's hard drive with full permissions.
Any help or direction will be greatly appreciated!
-Dethsta
|
|
|
|
|
dethsta wrote:
2) Something pops up saying "do you trust this company" or "can this program have full permissions"
This is not really what CAS (Code Access Security) is about. The whole idea is that people will run something, even if warned not to. The security model is placed solely in the hands of the admin to allow or disallow what code can run from where. The user is not asked.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
I totally agree with you . . . CAS is definately the way to go when under the supervision of an admin. However, for a home user with minimal knowledge of .NET security . . . I would prefer that the are just prompted for trust, letting me handle the rest. Much like how the Windows Update site works.
I believe this can be done with a signed CAB file and an embedded object in a web page. Does anybody know the pros/cons of this approach and where to find good .NET tutorials on the subject? I am slowly getting closer to a solution.
-Dethsta
|
|
|
|
|
I remember seeing an article about this at:
http://www.sellsbrothers.com/[^]
Don't remember which one but I am sure you can find it while browsing there. It was a fairly indepth article.
Rocky Moore <><
|
|
|
|
|
Hi,
I'm adding some controls on Panel at runtime. This works fine, but after removing this controls, Application can't be closed (and Closing event isn't called).
Creating controls:
MyControl ctrl=new MyControl();
ar.Add(ctrl);
panel1.Controls.Add(ctrl);
Removing all controls:
panel1.Controls.Clear();
foreach(MyControl ctrl in ar) ctrl.Dispose();
ar.Clear();
When I'm not removing controls it works
i'm only pointer to myself
|
|
|
|
|
Tomas Petricek wrote:
MyControl ctrl=new MyControl();
// MyControl is derived from UserControl
ar.Add(ctrl);
panel1.Controls.Add(ctrl);
You are duplicating code.....
Tomas Petricek wrote:
panel1.Controls.Clear();
foreach(MyControl ctrl in ar) ctrl.Dispose();
ar.Clear();
It seems the GC might be invoked too early, therefore modifying the collection while enumerating thru it, which is illegal.
Rather use a while loop:
while (Controls.Count > 0)
{
Control ctrl = Controls[0];
Controls.Remove(ctrl);
ctrl.Dispose();
}
Hope this helps
Who is this miscrosoft, and what devilish plans have they for us?
|
|
|
|
|
I heard somewhere that this can happen if controls are hidden.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
There is a bug where a Form can't be closed if you remove a control that has the current focus.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
Thank you !
Setting focus to another control solved my problem.
i'm only pointer to myself
|
|
|
|
|
I'm very new to programming in general but if I get a push in the right direction I think I will manage. I'm trying to build a windows application that will output a sequence of keyboard/mouse presses. What I need to know is where in C# do I find the functions that outputs the pressing?
|
|
|
|
|
Not the only option but probably the easiest. Consider DirectInput, part of the DirectX 9 SDK[^].
Of course, the downside is that anyone who wants to use your software needs the DirectX 9 runtime, which is a 32Mb download. But if that isn't a problem, DX9 will do the job.
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
I was wondering if anyone has input on howto
pass SafeArrays into .Net assemblies ???
Example:
Create a Javascript file which creates then passes in an Array
to a C# .Net assembly (assembly is set to use COM interopt)
-------------------------------------------------------
Begin js code
-------------------------------------------------------
var javascript2csharp = new ActiveXObject("MyCSharpComp.DoIt");
anArray = new Array();
anArray[0] = "Weeee";
anArray[1] = "Arggg";
javascript2csharp.PassArray(anArray);
-------------------------------------------------------
End js code
-------------------------------------------------------
Any help would be great !!!!
Thanks
|
|
|
|
|
HI,
I am writing an application which actually connects to a oracle db hosted on a unix machine. There will be around 1000 desktop clients(win XP) hosting the application. Right now the database username and pwd are stored in app.config to connect to db. How can i hide these details from client mahine user? I mean how can i prevent desktop user to know the db passwords from config file..?
encryption is taking very big maintenance work, every time they change db password...each time they need to change the config file with encrypted passwod.
Webservice scenario doesn't work in this context as there are no web servers.
please help me finding someway
regards
sudhakar
|
|
|
|