Author Topic: The True OP object....  (Read 24813 times)

Offline Lord Dick Tim

  • CA Mod
  • Salutes: 119
    • 7
    • View Profile
Re: The True OP object....
« Reply #15 on: March 22, 2013, 01:54:01 am »
Now we just need a thread filled solely with code.

Offline Shinkurex

  • CA Mod
  • Salutes: 102
    • [MM]
    • 45 
    • 20
    • 43 
    • View Profile
Re: The True OP object....
« Reply #16 on: March 22, 2013, 07:42:24 am »
#Copying report to reports folder
cd "c:\Users\nathan.pettit\Downloads\"

$report = (ls | sort "LastWriteTime" -Descending)[0]

move $report C:\Users\nathan.pettit\Documents\Reports\T1-Cases\

# Changing directory to grab the report
cd "C:\Users\nathan.pettit\Documents\Reports\T1-Cases"


# Variables
$OldCSVFile = (ls | ?{$_.CreationTime.ToShortDateString()})[0]
$NewCSVFile = (ls | ?{$_.CreationTime.ToShortDateString()})[-1]


$Engineers = @{}
$Data = Import-Csv $NewCSVFile -Delimiter "," | ?{$_."Case Owner" -notlike "Cases Taken In a Day" -and $_."Case Owner" -notlike "Copyright (c) 2000-2013 salesforce.com, inc. All rights reserved." -and $_."Case Owner" -notlike "Confidential Information - Do Not Distribute" -and $_."Case Owner" -notmatch "Generated By:  Nathan Pettit "  -and $_."Case Owner" -notlike "Veeam" -and $_."Case Owner" -notlike ""}

# Getting list of owners
foreach($ticket in $Data){
 if(!($Engineers.ContainsKey($ticket."Case Owner"))){
  $Engineers.Add($ticket."Case Owner", (New-Object System.Collections.ArrayList))
 }
}

foreach($ticket in $Data)
{
 if(!($Engineers.($ticket."Case Owner").Contains($ticket."Case Number")))
 {
  [Void]($Engineers.($ticket."Case Owner").Add($ticket."Case Number"))
 }
}

$total = 0
$EngineerCallData = $Engineers.Clone()
$RawReport = @()

foreach($engineer in $Engineers.Keys)
{
 $EngineerCallData.($engineer) = $Engineers.($engineer).Count
 $total += $Engineers.($engineer).Count
 
 $row = "" | Select Name, TicketCount
 $row.Name += ($engineer).ToString()
 $row.TicketCount += ($Engineers.($engineer).Count)
 $RawReport += $row
}

$RawReport | sort "TicketCount" -Descending

good?

Offline HamsterIV

  • Member
  • Salutes: 328
    • 10 
    • 45
    • 45 
    • View Profile
    • Monkey Dev
Re: The True OP object....
« Reply #17 on: March 22, 2013, 11:40:49 am »
- .... .   ... -.- -.--   .-- .... .- .-.. .   .-- .- ...   .-.. .- ... -   ... .--. --- - - . -..   .... . .- -.. .. -. --.   . .- ... -   .. -. - ---   - .... .   -... .- .-. .-. . -. ... .-.-.-   .-. . .--. --- .-. - ...   .. -. -.. .. -.-. .- - .   .. -   .--. .- ... ... . -..   --- ...- . .-.   .-   -.-. .- .-. .- ...- .- -.   ..-. .-. --- --   -. .- .-.. -- --..--   - .... . .-. .   .-- . .-. .   -. ---   ... ..- .-. ...- .. ...- --- .-. ... .-.-.-

Offline N-Sunderland

  • Member
  • Salutes: 281
    • [Duck]
    • 15 
    • 45
    • 23 
    • View Profile
Re: The True OP object....
« Reply #18 on: March 22, 2013, 12:00:40 pm »
- .... .   ... -.- -.--   .-- .... .- .-.. .   .-- .- ...   .-.. .- ... -   ... .--. --- - - . -..   .... . .- -.. .. -. --.   . .- ... -   .. -. - ---   - .... .   -... .- .-. .-. . -. ... .-.-.-   .-. . .--. --- .-. - ...   .. -. -.. .. -.-. .- - .   .. -   .--. .- ... ... . -..   --- ...- . .-.   .-   -.-. .- .-. .- ...- .- -.   ..-. .-. --- --   -. .- .-.. -- --..--   - .... . .-. .   .-- . .-. .   -. ---   ... ..- .-. ...- .. ...- --- .-. ... .-.-.-

Why no survivors?

Offline HamsterIV

  • Member
  • Salutes: 328
    • 10 
    • 45
    • 45 
    • View Profile
    • Monkey Dev
Re: The True OP object....
« Reply #19 on: March 22, 2013, 01:12:12 pm »
The Sky Whale is a soulless killing machine. Concepts like of mercy and honor are as alien to its mind as what ever the dark yearnings that drive it on are alien to ours. To a Sky Whale we are mere play things to be toyed with and later smashed for its amusement. Know that this planet is no longer the dominion of man, that creatures wander the skies to whom we are but ants.

Offline Lord Dick Tim

  • CA Mod
  • Salutes: 119
    • 7
    • View Profile
Re: The True OP object....
« Reply #20 on: March 23, 2013, 05:05:09 am »
That's so awesome hamster.

Just recently I posted a pic on StarDrive of one of the titans I had customized for play, somebody noticed the name of my ship was God in binary immediately.  I was a little stunned somebody could casually translate it in seconds after a post, a little obscure name box in the corner.