Dec 302008
 

This is actually a lot simpler than I expected (gimme a break, this is my second foray into VBS!)

Set fs = WScript.CreateObject ("Scripting.FileSystemObject")

Sub ShowSubFolders(Folder)
	For Each Subfolder In Folder.SubFolders
		Set files = SubFolder.Files
		For Each file In files
			WScript.Echo file.Name, file.Size
		Next
		ShowSubFolders Subfolder
	Next
End Sub

ShowSubFolders fs.GetFolder("C:\your\path\here")
Dec 202008
 

Taking the code from this other blog … It’s pretty elegant Ruby!

I won’t waste your time repeating what the guy wrote in his blog – you’re welcome to go read it. I just felt that I should help spread a little this elegant implementation of the standard permutation algorithm, fixing a small bug within it in the process. If, like me, you have issues understanding how to use this, well – you have to use this function and call a block of code on it. It runs the block of code on each permutation it finds.

def permutations array
  if array.sizeĀ < 2
    yield array
  else
    array.each do |element|
      permutations(array.select() {|n| n != element}) \
      {|val| yield([element].concat val)}
    end
  end
end
Dec 192008
 

This week two more students tested. We have a new green belt and a new blue belt. They did pretty well, but I am completely amazed at how many excuses adults have. Their heads are full of them. Can’t they just listen and say ‘yes’ like they were taught when they were kids? Talking back is a privilege, not a right.
Ooh.. That’s good.. I’ll reuse that.

Dec 072008
 

I’m taking this from this page but thought I should try to propagate it a little since it took me forever to find it.

Assume in this example that the username is ‘atiensivu’, the domain is ‘staff’, and the user profile is located in %systemdrive%\users\atiensivu. %systemdrive% is typically C: on standard Vista installs. Replace every instance ‘atiensivu’ with the username of the corrupt profile.
Continue reading »

%d bloggers like this: