I AM A STRANGE LOOP by Douglas Hofstadter
Available on Amazon
Photo of Kurt Gödel taken from Wikipedia. The copyright of this work has expired in the European Union because it was published more than 70 years ago without a public claim of authorship (anonymous or pseudonymous), and no subsequent claim of authorship was made in the 70 years following its first publication.
If everything works, congratulations! If not, go to the trouble shooting section.
<?php // edit the lines between here and the next comment // using values from your installation $DBName = "MyDatabase"; $user = "TestUser"; $pass = "Tpass_PHPConnect"; $host = "localhost"; $stmt = "select * from TestTable"; // edit the lines between here and the previous comment $conn = DBConnect($DBName, $user, $pass,$host); echo "$conn <br>"; DBError(); $userData = sqlsrv_query($conn,$stmt, array(), array("Scrollable"=>"buffered")); DBError(); $gotrows = sqlsrv_has_rows($userData); if (!$gotrows) { $e = "WARNING No Rows found for SQL statement $stmt"; echo "$e <br>"; } While( $row = sqlsrv_fetch_array( $userData, SQLSRV_FETCH_ASSOC) ) { $t = $row['returnoptions']; echo "Selected Value => $t<br>"; } $d = DBDisconnect($conn); DBError(); function DBDisconnect($conn) { $rtn = sqlsrv_close( $conn ); if ($rtn) { $result = "SUCCESS $conn"; } else { $result = "ERROR $conn"; } echo $result; return $result; } function DBError() { //echo "entering dberror"."<br />"; $errmessage = ""; $rtn = false; // returns true if no errors are found, else false if( ($errors = sqlsrv_errors() ) !== null) { $rtn = true; //there was an error foreach( $errors as $error ) { $errmessage = "SQLSTATE ERROR: ".$error[ 'SQLSTATE']; echo $errmessage; $errmessage = "code: ".$error[ 'code']; echo $errmessage; $errmessage = "message: ".$error[ 'message']; echo $errmessage; } } return $rtn; } function DBConnect($DBName, $user, $pass, $host) { $connectinfo = array( "Database"=>$DBName, "UID"=>$user, "PWD"=>$pass); $r = sqlsrv_connect( $host, $connectinfo); if( ($errors = sqlsrv_errors() ) !== null) { $rtn = true; //there was an error foreach( $errors as $error ) { $errmessage = "SQLSTATE ERROR: ".$error[ 'SQLSTATE']; echo $errmessage."<br>"; $errmessage = "code: ".$error[ 'code']; echo $errmessage."<br>"; $errmessage = "message: ".$error[ 'message']; echo $errmessage."<br>"; } } return $r; } ?>
nt dex0=-1; boolean comComplete0 = false; char buffer0[200]; byte sum01, sum02; void setup() { // initialize both serial ports: Serial.begin(9600); //Serial1.begin(9600); } void loop() { // if the SerialEvent() function detected a string // that ended in a line feed ('/n'), then // print the fletcher-16 checksum and the serial data // to port 0 if (comComplete0) { Serial.print(“sum1="); Serial.print(sum01); Serial.print(","); Serial.print(“sum2="); Serial.print(sum02); Serial.print(“: “); Serial.println(buffer0); dex0 = -1; //reset the comComplete flag comComplete0 = false; //reset the checksum sum01 = 0; sum02 = 0; } void serialEvent() { while (Serial.available()) { dex0 ++; byte inChar = Serial.read(); //The next lines calculate the fletcher checksum and //as each character is read from the com port. //put it into the global variables sum01 and sum01 // sum01 = (sum01 + inChar) % 255; sum02 = (sum01 + sum02) % 255; if (inChar == '\n') { //line feed buffer0[dex0] = inChar; dex0++; buffer0[dex0] = '\0'; dex0--; comComplete0 = true; return; } buffer0[dex0] = inChar; } return; }
Maybe the most magical of all Van Morrison’s magical tunes.
Copyright(c) 1991 by Chuck Elliott
In October, 1996 I had a chance to interview Joe Cocker at the Mad Dog Ranch in Crawford, Colorado.
Joe started out speaking about Ed Sullivan, finding Ray Charles’ music in Sheffield, England, and the influences that shaped his early days. He finished up speaking about his current music just before the time his album “Organic” came out.
These Things Will Help You Avoid Issues When Using PHP to Download Files