|
Hmmmm not working for
2221.1.1:3000
Sorry!
Develop2Program & Program2Develop
|
|
|
|
|
Navneet Hegde wrote: Hmmmm not working for
2221.1.1:3000
Well, that is not suppose to work...
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Sorry make that 123a123a123a123:1
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
This should work
@"^[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[:][0-9]{1,5}$"
Thanks!
Develop2Program & Program2Develop
|
|
|
|
|
Navneet Hegde wrote: This should work
Rather use \. than [.] . Some regex implementations might see [.] as .
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Sure
thx!
Develop2Program & Program2Develop
|
|
|
|
|
I'd just try to open the port and let the framework figure it out.
|
|
|
|
|
PIEBALDconsult wrote: let the framework figure it out.
and miss all the fun regexing IPv6?
|
|
|
|
|
I'm more concerned about, "that which will come after IPv6".
Let Microsoft do all the work, that's why I pay them.
|
|
|
|
|
Another thread came up with:
@"^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}[:][0-9]{1,5}$"
But what if you want to constrain the octets to ONLY values from 0 to 255? And what if you really wanna go whole hog and constrain the port to 0 to 65535?
I don't know regular expressions that well, so I am curious.
Roink
Roink
|
|
|
|
|
Roink wrote: But what if you want to constrain the octets to ONLY values from 0 to 255? And what if you really wanna go whole hog and constrain the port to 0 to 65535?
Then you head over to www.regexplib.com and you do a search[^]
|
|
|
|
|
As they say in Britain, Brilliant! Everything a growing RegEx coder needs! Thank you! Muchas gracias! Merci beaucoup!
Roink
|
|
|
|
|
Roink wrote: As they say in Britain, Brilliant
I think they say that in other countries too, not just here in GB!
|
|
|
|
|
No, it's only there.
|
|
|
|
|
Roink,
Thanks for the solution.
Following is working to check proper ip & port. I found this from regexlib.com.
But still need to do varification for port as 0,00,000, etc or 0*.
<br />
@"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]):(\d{1,4}|[0-5]\d\d\d\d|[0-5]\d\d\d\d|6[0-4]\d\d\d|65[0-4]\d\d|655[0-2]\d|6553[0-5])$"<br />
Thanks & Regards,
Aniket A. Salunkhe
modified on Wednesday, December 3, 2008 4:47 AM
|
|
|
|
|
Hi guys,
This is a quick question:
I was wondering if it's possible to remove that dotted border on a listview selected item, anyone knows how?
Sorry if I missed some simple thing :P
|
|
|
|
|
You can modify the list view by making is partially owner drawn.
You set the OwnerDraw property on the list view to true, then handle the various Draw events.
listView1.DrawColumnHeader += new DrawListViewColumnHeaderEventHandler(listView1_DrawColumnHeader);
listView1.DrawItem += new DrawListViewItemEventHandler(listView1_DrawItem);
listView1.DrawSubItem += new DrawListViewSubItemEventHandler(listView1_DrawSubItem);
void listView1_DrawSubItem(object sender, DrawListViewSubItemEventArgs e)
{
e.DrawDefault = true;
}
void listView1_DrawItem(object sender, DrawListViewItemEventArgs e)
{
e.DrawDefault = true;
}
void listView1_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
{
e.DrawDefault = true;
}
The events are triggered each time that part of the list view needs redrawing, and you just draw what ever you want onto the graphics object provided. You can call handy methods on the event args object like DrawText() to do the text drawing for you. Then all you do is leave out the focus rectangle, and if required, draw your own focus rectangle in the style you want.
You will need to check e.Item.Selected to see if the item being drawn is selected and if it needs a focus rectangle drawing or not.
Simon
|
|
|
|
|
I'm trying that now,
thanks alot for your quick answer.
|
|
|
|
|
|
i have made setup of my project but i want to add copy protection like no body will able to copy cd or it will be installed only once like that so how can i do this?
Thanks & Regards,
Prashant B. Lavate
Software Engineer
Mobile : +919423872257
Pune(India)
|
|
|
|
|
There are companies that provide services like this such as SafeDisc[^] and SecuROM[^] (http://www.securom.com/[^]).
There are also companies that provide USB key protection like Nexcopy[^] and KeyLok[^].
You could include some form of serial number, and you can obfuscate your code to discourage reverse engineering. and you could include a live validation check with a server you own to watch for duplicate keys.
Nothing is perfect though, there is always someone who finds a way round these things. And all of these things impact negatively on genuine paying customers.
You're better off encouraging your customers to pay through excellent support and customer service, good follow ups, regular updates and sensible prices. Forget the people who copy it, they are a minority anyway.
Simon
|
|
|
|
|
If there is only one if statement that does the check, it really doesn't matter whether you use system registry, usb dongle or computer hash. Every application written in .Net can be easily decompiled and it only takes putting ! in the if statement to make an application work on every computer. Obfuscators make it more difficult but not very much. Even application written in native c++ or vb can be easily cracked. In case it's assembler that does the cracking.
The fact that general users will not be able to make necessary registry manipulation does not mean anything as usually it's crackers you crack the program and not users. Users just download them from warez websites. Crackers on the other hand have much more knowledge than general users and use advanced tools for cracking.
What I suggest is that you put checks at different places in the program and not so obvious. Having a dll called license.dll will attract crackers. On the other hand you can put some code in license.dll which looks like license check but does nothing in reality.
Good luck!
P.S. Remember that it is very difficult to make an application that can not be cracked. The only thing you can and should do is make more difficult your program to crack and put reasonable price on it so that it really does not make sense to crack it.
|
|
|
|
|
Giorgi Dalakishvili wrote: Crackers on the other hand have much more knowledge than general users and use advanced tools for cracking.
Like their brains
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Giorgi Dalakishvili wrote:
What I suggest is that you put checks at different places in the program and not so obvious. Having a dll called license.dll will attract crackers. On the other hand you can put some code in license.dll which looks like license check but does nothing in reality.
I agree.
Giorgi Dalakishvili wrote: Obfuscators make it more difficult but not very much.
Sure they can. I like Skater since it allows you to obfuscate methods and properties with "unprintable" characters and can cause Reflector to crash. I'm sure there's probably ways around it, but making it more difficult can deter the lesser motivated crackers.
"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
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
OTOH multi megabuck protection systems like SecureOmgWtfLolBbqDisk don't stop the no cd hacks for more than a few hours or days, so I'd rate it as a lost cause.
The only way to effectively limit piracy is to design an app that can't work without talking to servers owned by the company that wrote it.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|