I have a table of members for a small website, it was hit pretty hard by spammers recently. I've noticed that many (but not all) of the spammer email addresses have 3 or more groups after the '@' character, like these:
someone@d.beardtrimmer.com
someone@get.cheap.meds.biz
I'm trying to run a...
Ok, I got rid of all the delegate stuff and added the following sort method:
Public Sub SortWidgets(ByVal sortFunction As System.Comparison(Of Widget))
_widgetList.Sort(sortFunction)
End Sub
Now I can write my own sort function and pass it in like this:
myObject.Sort(AddressOf...
And here's some code where I've tried to use a delegate, but I get an Invalid Cast Exception: unable to cast object of type 'CustomSort' to type 'System.Collections.Generic.IComparer'. I don't understand why the previous code works by passing in the "AddressOf" the sort function, but this code...
I have a class that has a collection of objects (a generic list). I'd like the user of my class to be able to supply a custom sort function, similar to the example code below. However, in my actual code, I'd like to keep the list of objects private, since the user doesn't really need access to...
Create a small project that takes one of these strings as input and loop through the string character by character to see what the problem is. Use the Asc and/or the AscW functions to identify the characters.
http://msdn.microsoft.com/en-US/library/zew1e4wc(v=vs.80).aspx
Once you know what the...
For a good regex reference, I suggest Mastering Regular Expressions by Jeffrey Friedl. It explains not only the syntax of regex, but also explains how to write efficient regex based on how the underlying "engine" works.
When testing scripts it is best to temporarily remove (comment out) the "on error resume next" statement(s) and add message boxes or other output so that you see what is happening.
In general, it is not a good idea to modify a collection of files (move, add, or delete files) while you are iterating through it. I'd suggest marking the files that you want to delete within the loop (add the file names to a new array or dictionary) then when the loop that checks the file dates...
You can use the InStr function to find the positions of the "[", "]", "(", and ")" characters. With this information you can use the Mid function to extract portions of the string between those positions.
While regex is certainly an option, there may be an easier solution here. From the example data given, it appears that you could split your string into 2 parts: 1)everything before REV and 2)everything after REV. Then you could base your comparison on the first part of the string and if there is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.