Coded Smorgasbord: A Spiritual Journey
Hold your souls tightly, for today, we pierce the veil into the great beyond. We shall examine existential questions and commune with spirits. We shall learn what eternity holds for us all.
First, we must bring ourselves to the edge of death, into a liminal state where time does not pass, where the conscious mind takes a back-seat to the spiritual realm. Mark found this C# code to do the job:
if (Thread.CurrentThread.ThreadState != ThreadState.Running) return false;
Are we alive? Are we dead? What is this darkness? Where are we? Surely, we must now find our path. Many languages, like Python, have useful libraries to help us parse out and understand the structure of our path. Chris sent us this code, which eschews the well traveled os.path library, and reinvents that wheel:
samp = file[file.find('intFiles')+9:].split("/")[0] fName = file.split("/")[-1]
This code pulls off the portion of the path that occurs after intFiles, and splits off the last portion, which we hope is a filename. Now, with that filename, the collective sin on our souls must be weighed, and our eternal reward- or punishment- will be delivered.
Brandon knows what the afterlife holds for us all" welcome to hell:
If Error=0 Then Error = DeleteSummaryTables(Conn, sJobId, "Summary_Grips") If Error = 0 Then Error = DeleteSummaryTables(Conn, sJobId, "Summary_GroundType") If Error = 0 Then Error = DeleteSummaryTables(Conn, sJobId, "Summary_Enviroment") If Error = 0 Then Error = DeleteSummaryTables(Conn, sJobId, "Summary_FloorType") If Error = 0 Then Error = DeleteSummaryTables(Conn, sJobId, "Summary_Control") If Error = 0 Then Error = DeleteSummaryTables(Conn, sJobId, "Summary_HandToolType") If Error = 0 Then Error = DeleteSummaryTables(Conn, sJobId, "Summary_FingerMovement") If Error = 0 Then Error = DeleteSummaryTables(Conn, sJobID, "Summary_LiftHeights") If Error = 0 Then Conn.CommitTrans Else DisplayError "Error deleting record from the Summary_LiftHeights tables.", err.number, err.Description Conn.RollbackTrans End If Else DisplayError "Error deleting record from the Summary_FingerMovement tables.", err.number, err.Description Conn.RollbackTrans End If Else DisplayError "Error deleting record from the Summary_HandToolType tables.", err.number, err.Description Conn.RollbackTrans End If Else DisplayError "Error deleting record from the Summary_Control tables.", err.number, err.Description Conn.RollbackTrans End If Else DisplayError "Error deleting record from the Summary_FloorType tables.", err.number, err.Description Conn.RollbackTrans End If Else DisplayError "Error deleting record from the Summary_Enviroment tables.", err.number, err.Description Conn.RollbackTrans End If Else DisplayError "Error deleting record from the Summary_GroundType tables.", err.number, err.Description Conn.RollbackTrans End If Else DisplayError "Error deleting record from the Summary_Grips tables.", err.number, err.Description Conn.RollbackTrans End IfElse DisplayError "Error deleting record from the Summary_Grips tables.", err.number, err.Description Conn.RollbackTransEnd If Else DisplayError "Error deleting record from the JobHeader_WorkAReas tables.", err.number, err.Description Conn.RollbackTrans End If Else DisplayError "Error deleting record from the Tasks tables.", err.number, err.Description Conn.RollbackTrans End If Else DisplayError "Error deleting record from the subtask tables.", err.number, err.Description Conn.RollbackTrans End IfEnd If[Advertisement] Manage IT infrastructure as code across all environments with Puppet. Puppet Enterprise now offers more control and insight, with role-based access control, activity logging and all-new Puppet Apps. Start your free trial today!