Reputation: 310 Architect
- Active Posts:
- 1,290 (1.93 per day)
- 12-September 12
- Profile Views:
- Last Active:
- Jul 07 2014 04:40 PM
- OS Preference:
- Who Cares
- Favorite Browser:
- Favorite Processor:
- Who Cares
- Favorite Gaming Platform:
- Who Cares
- Your Car:
- Dream Kudos:
Posts I've Made
Posted 3 Dec 2013Another, easy way is to use the StopWatch class.
Public sw As New Stopwatch
Posted 11 Nov 2013Any ideas on increasing the speed of the code I displayed? Thanks!
As I said, you don't need to know what's in the file to shred it. You can write to the bytes without reading them, farting around with shifting bits around, and so on. That will increase your speed a LOT.
Posted 11 Nov 2013OK - but even still how might one make asynchronous calls to a file for write purposes or is this even possible? What about SSD's? Obviously there are shredders out there that work for this hardware right?
I can't comment on the efficacy of your shredding algorithm, except to say that you really don't need to know what's in the file in order to shred it.
And yes, there are shredders out there. I can think of a few ways one might properly shred a file, though I'd have to test to see if they could be done on all operating systems.
The first thought would be to bypass the OS to write directly onto the file's sectors. This may or may not be feasible on all OSes, like Windows 7 or 8. The second idea would be to open the file for binary read/write access, and to take care not to change the size of the file by writing past the end of the current contents.
Not sure if those are do-able, and I have no need of a shredder, so I won't be writing one any time soon.
Posted 10 Nov 2013
Option Strict On Public Class Form1 Private splits() As String Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click splits = TextBox1.Text.Trim().Split(CChar("@")) If splits.Count = 2 Then TextBox2.Text = splits(0) TextBox3.Text = splits(1) Else MessageBox.Show("Please enter a valid email address.") End If End Sub End Class
Posted 23 Oct 2013
QuoteAnd if option strict is on you do need to convert or tryparse the string to a number type
And if it isn't on, it SHOULD be!
See the link in my signature to find out why.
- Member Title:
- Coding Geezer
- Age Unknown
- Birthday Unknown
- Years Programming:
- Programming Languages:
- Various Assemblers, Fortran, Basic, Icon, Logo, PostScript, Rexx, COMAL, Pilot, C, C++, VB, VB.NET