<%@ Language=VBScript %><% option explicit %> <% Response.Buffer = FALSE %> <% Response.ContentType = "image/svg+xml" %> <% DIM ScreenWidth, ScreenHeight DIM timeout DIM gen_parent, gen_child DIM x1, x2 'horizontal DIM y1, y2 'vertical DIM msg '-- for errors DIM CS_1 'Connection String DIM RS_0, RS_1, RS_2, RS_X, RS_A 'RecordSet DIM Q_0, Q_1, Q_2, Q_X, Q_A 'SQL query against the db DIM RWline1, RWline2, RWline3 DIM opt_A, opt_B DIM popCount, popCount1, popCountX, popCount2 DIM copyStepCount, copyStepGen_x '' extend the timeout to allow for long files timeout = Server.ScriptTimeout '' Response.Write "Initial timeout=" & timeout & "
" Server.ScriptTimeout = 1200 ScreenWidth = Request.Cookies("Humble")("ScreenWidth") ScreenHeight = Request.Cookies("Humble")("ScreenHeight") opt_A = Request.Cookies("Humble")("Opt_A") opt_B = Request.Cookies("Humble")("Opt_B") popCount = Request.Cookies("Humble")("urPopCount") copyStepCount = Request.Cookies("Humble")("CopyStepCount") copyStepGen_x = Request.Cookies("Humble")("CopyStepGen_x") CS_1 = "DSN=evolve" gen_parent = 1 gen_child = 2 '-- ur-pop table Q_0 = "SELECT * FROM gen_0" 'ur-population ' Response.Write Q_0 & "
" SET RS_0 = Server.CreateObject("ADODB.Recordset") RS_0.Open Q_0, CS_1, adOpenKeySet, adLockPessimistic, adCmdText ' msg = " *** found data *** " IF RS_0.EOF THEN msg = " *** no data ur-pop=0 *** " END IF '-- main gen_x table with log data Q_X = "SELECT * FROM gen_x" ' Response.Write Q_X & "
" '--causes SVG error, see with copy SVG SET RS_X = Server.CreateObject("ADODB.Recordset") RS_X.Open Q_X, CS_1, adOpenStatic, adLockOptimistic, adCmdText IF RS_X.EOF THEN msg = msg & " *** no data gen_parent=" & gen_parent & " *** " END IF '-- main child table Q_2 = "SELECT * FROM gen_2" ' Response.Write Q_2 & "
" '--causes SVG error, see with copy SVG SET RS_2 = Server.CreateObject("ADODB.Recordset") RS_2.Open Q_2, CS_1, adOpenStatic, adLockOptimistic, adCmdText IF RS_2.EOF THEN msg = msg & " *** no data gen_child=" & gen_child & " *** " END IF '-- get Admin table to get stats Q_A = "SELECT * FROM Admin" SET RS_A = Server.CreateObject("ADODB.Recordset") RS_A.Open Q_A, CS_1, adOpenKeySet, adLockPessimistic, adCmdText RS_A.Move copyStepGen_x popCountX = RS_A.Fields("popCount") RS_A.MoveLast popCount2 = RS_A.Fields("popCount") ' set it up for a graph bounding box of 2000 horizontal by 1000 vertical ' the viewBox has to be larger, to allow for left (and right?) parameter stuff ' the graph should have 20 by 10 internal dividers (grid pattern) %> 100 90 80 70 60 50 40 30 20 10 0 0 10 20 30 40 50 60 70 80 90 100 generations: parent=0 & child=<%=copyStepCount%> parent=X=<%=copyStepGen_x%> & child=<%=copyStepCount%> populations: <%=popCount%>; X=<%=popCountX%>; child=<%=popCount2%> Attribute A Attribute B <%'----------------------------------------------------------------------%> <%'----------------------------------------------------------------------%> <%'----------------------------------------------------------------------%> <% Response.Write msg RWline1 = " " & vbCrLf RS_0.MoveFirst FOR popCount1 = 1 TO popCount x1 = RS_0.Fields("A") y1 = 1000 - RS_0.Fields("B") IF NOT IsNull( y1) THEN Response.Write RWline1 & x1 & RWline2 & y1 & RWline3 END IF RS_0.MoveNext NEXT Response.Write msg RWline1 = " " & vbCrLf RS_2.MoveFirst FOR popCount1 = 1 TO popCount2 x1 = RS_2.Fields("A") y1 = 1000 - RS_2.Fields("B") IF NOT IsNull( y1) THEN Response.Write RWline1 & x1 & RWline2 & y1 & RWline3 END IF RS_2.MoveNext NEXT %> <% Response.Write msg RWline1 = " " & vbCrLf RS_X.MoveFirst FOR popCount1 = 1 TO popCountX x1 = RS_X.Fields("A") y1 = 1000 - RS_X.Fields("B") IF NOT IsNull( y1) THEN Response.Write RWline1 & x1 & RWline2 & y1 & RWline3 END IF RS_X.MoveNext NEXT Response.Write msg RWline1 = " " & vbCrLf RS_2.MoveFirst FOR popCount1 = 1 TO popCount2 x1 = RS_2.Fields("A") y1 = 1000 - RS_2.Fields("B") IF NOT IsNull( y1) THEN Response.Write RWline1 & x1 & RWline2 & y1 & RWline3 END IF RS_2.MoveNext NEXT %> <% '' reset the timeout Server.ScriptTimeout = timeout Response.End '-----------------------------------------------------------%>