|
i want to retrieve associated program path from registry and i did, output comes as it should but i have to use tricks to get it in use, the path comes as
"C:\abc\efg.exe" "%1"
ok i can just use Split() with " as param but some paths come as
C:\abc\efg.exe %1
now i can use use Split() with % as param
are these ways correct ? or anyother good way ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Xmen wrote: are these ways correct ?
If they work correctly they are correct, mostly.
Xmen wrote: or anyother good way ?
Maybe Regular Expressions, maybe?
led mike
|
|
|
|
|
oh but what if path have '%' then split function wont work properly
edited :
i got better way :
tmp_string = tmp_string.Replace("\" \"%1\"", "").Replace(" \"%1\"", "").Replace(" %1", "");
if (tmp_string.StartsWith("\""))
tmp_string = tmp_string.Remove(0, 1);
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Split on SPACE, honoring QUOTEs... oh, yeah, Split ignores QUOTEs ... that's why I wrote my own!
I still hope to find a Regular Expression that will do it.
|
|
|
|
|
my way is better, spilitting Space may give incorrect output because path can have space too
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Which is why you have to honor the QUOTEs.
|
|
|
|
|
what is honor ????
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Recognizing that everything between the QUOTEs is one value and is not to be split.
|
|
|
|
|
class MyClass
{
public MyClass(int b)
{
Console.WriteLine(b);
}
public MyClass()
: this(43)
{
Console.WriteLine("Default Const");
}
}
class MyClass2 : myClass
{
public MyClass2(int b) : base(b)
{
Console.WriteLine(b);
}
public MyClass2()
{
Console.WriteLine("Default Const");
}
}
In the above code in my MyClass2 non- default constructor. It is giving a value back to the base class. I want to know if at the same time can I make the default constructor run.
I mean something like this
public MyClass2(int b) : base(b),this()
or this
public MyClass2(int b) : base(b) : this()
How do I do it
|
|
|
|
|
humayunlalzad wrote: How do I do it
Best practice would be to refactor the code out into a member function so that it can be called.
led mike
|
|
|
|
|
humayunlalzad wrote: public MyClass2(int b) : base(b),this()
or this
public MyClass2(int b) : base(b) : this()
Does not compute!
Why not just set the values in the constructor and make life easier for yourself?
|
|
|
|
|
The best approach would be something like this:
;
class MyClass2 : myClass
{
public MyClass2(int b) : base(b)
{
Console.WriteLine(b);
}
public MyClass2() : base(THE CONST VALUE)
{
Console.WriteLine("Default Const");
}
private void
}
"Make it as simple as possible, but no simpler" Issac Newton
|
|
|
|
|
Hello all,
I'm writing a membership app. As the user(s) moves through the data, a central log is updated, showing who the user is and what actions have been performed. The problem is that if the user is not logged into Windows as an admnistrator, I get an access denied exception. I understand that the standard user should be restricted from certain directories but I have the Log.txt file stored in the AllUsers directory! How can I implement this feature where all users can access this central log?
"Make it as simple as possible, but no simpler" Issac Newton
|
|
|
|
|
Add the account that runs IIS or whatever to the Users group. (probably not a good idea, security should be more fine grained).
|
|
|
|
|
What kind of app is this? When it's a local windows forms app trying to write a central log every time a user starts it, it's bound to fail. The all users folder is just the one that needs admin rights.
You could implement the logical part as a windows service running under the system account, and the UI part communicating with it via remoting.
|
|
|
|
|
Thanks a million for the reply! The structure I'm designing is a standard windows form app. I was assuming that the AllUsers folder would allow any user to read/write to it. The "windows service" and "remoting" option is of great interest to me! Those are topics that I'm not too familiar with. I plan to do some research on this issue but do you know of any good resources that explain these topics?
"Make it as simple as possible, but no simpler" Issac Newton
|
|
|
|
|
Well, the all user folder is there for application wide data, so logically some poor user must not have writing access. Otherwise they could place settings there from which all other users would suffer.
As to the concepts of services and remoting: There may be books, but I don't know. My policy has always been to read a little MSDN, try it out, read a little more MSDN, or someting else (like a code project article), and try it out again.
There are examples for services in Visual Studio online help, and examples for remoting as well. And you may find introductions to both in the code project data base.
Meaning I can't help you there on the spot; I'd have to write a textbook to do so. But you can look at the examples in MSDN and Code Project, and when you get stuck you can post back here and get some help.
|
|
|
|
|
Hello,
I use a datagridcheckbox column but I don't know how to get and set the value of each check box.
Thanks.
Dad
|
|
|
|
|
dataGridView1[Cindex, Rindex].Value = 1;
dataGridView1[Cindex, Rindex].Value = 0;
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Thanks for help,I use the rowheaderdoubleclick event to allow user check the cell when double clicking its header your code works well but after I leave the row and click an other.
Dad
|
|
|
|
|
|
Did you know, CodeProject has an ASP.NET forum for these kinds of questions?
|
|
|
|
|
Sorry. Message was deleted and posted in ASP.NET.
Thanks.
King Regards!
countNazgul
|
|
|
|
|
countnazgul wrote: Message was deleted
Don't do that once someone replies. Just remember to post in correct forum next time
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi guys,
I am working on a program which reads and writes XML for plugin objects. In some instances a plugin might not be available, for example if a document is loaded on a computer which does not have the plugin installed. So to remedee this situation I am writing a class which will store all of the origionally read XML and then later restore that XML to the document.
Is there a simple way to read an entire XML subtree (of a particular XML element) into a string using an object of the XmlReader class? This would be fantastic because this would solve my problem instantly.
From past work I seem to remember something about writing raw XML into a file, however I cannot find anything about reading an entire subtree as a string in MSDN. Any help would be fantastic!
Best regards!
Lea Hayes
|
|
|
|