About Me

My photo
Northglenn, Colorado, United States
I'm primarily a BI Developer on the Microsoft stack. I do sometimes touch upon other Microsoft stacks ( web development, application development, and sql server development).

Friday, October 31, 2008

Updated Fractal Viewer

I just updated my Fractal Viewer and is now downloadable from my SkyDrive.

What I did:

  • Convert from .Net 1.1 to .Net 3.5
  • Add little performance enhancements (parallel processing, bit shifting, less use of division, less converting, etc…)
  • Changed the structure of the program. Where before it was more like a C style program with one large Main() function. Now it incorporates a more OOP style.
  • Remove unnecessary imports.
  • Add “precision” functionality to the Fractals.
  • Move the Complex Systems on the screen to take up more room.
  • Made color changes take effect immediately, instead of having to refresh.

I don’t see much of a speed improvement, since there is not much I can do the functions to improve them. I was hoping to incorporate other techniques like asynchronous,  threading, background workers, or better use of parallel processing,  but this couldn’t be done because only one use of the control’s graphics can be used at a time.

box julia mandel newton sierp

Check list of what I still want to do:

  • Look into more improvements by trying to separate  the drawing and point generating.
  • Add more Complex Systems and Fractals.
  • Try getting a zoom and move feature.
  • Improve color picking technique.
  • Improve image saving and add location to save to.
  • If possible, improve image detail of complex systems.

Friday, October 03, 2008

Some Cool Powershell Commands

A list of useful and fun commands to remember.

1) Using wmiobject

get-wmiobject -list | where {$_.name -like "win32*"} | more
to get a list of classes that provide great information about your computer. Some uses are…


get-wmiobject -class win32_quickfixengineering

(return a history of all patches installed on your computer)


get-wmiobject -class win32_service | where {$_.name -like 'IISADMIN'}

(return if you are running IIS)

2) Using get-childitem

get-childitem c:\ Measure-Object -Character -Word -Line

Lines
-----

89

get-childitem c:\ -force Measure-Object -Character -Word -Line

Lines
-----
141

force hidden files to be visible.

(get-childItem c:\Eftmcon).Count
counting how many items are in a folder.

3) Using select-string and out-string

select-string -path 001460_20081002_1.dat -pattern "2007[0-9]*"
find all lines from a file matching 2007 followed by zero or more numbers and display what that line would look like.

gc crm3.txt | out-string -stream | foreach {$_ -replace "2007","2008"} > text.txt

This will at least replace all 2007 for 2008 and write it out to a file of your choice. Here I use get-content to read in a file in which I then pipe it to out-string to send it out as one string and do my replace.

4) Playing with Merlin

$agent = new-object -com Agent.Control.2
$agent.Connected = 1
$agent.Characters.Load("Merlin")
$merlin = $agent.Characters.Character("Merlin")
$merlin.Show()
$merlin gm

Display Merlin

$merlin.Play("DoMagic1")
Make him animate a move from the $merlin.AnimationNames list

Sources:

Edited: Removed an extra PS in the Merlin.

Edited (10/14/2008): Added the missing "pipes" and "greater than" sign back in, since they were missing.