Wednesday, October 1, 2014

Overview of Project Keystone handshake

<html>
<header>Congratulations you logged in</header>
<script type="text/javascript">function function(){
while(1){
       setTimeout(function,1000)
}
<?php
//create an ADO connection and open the database
$conn = new COM("ADODB.Connection");
$conn->open("our database");
//execute an SQL statement and return a recordset
$rs = $conn->execute("SELECT Name, Num, timediff FROM Personel");
$num_columns = $rs->Fields->Count();
echo "<table border='1'>";
echo "<tr><th>Name</th><th>Num</th><th>timediff</th></tr>";
while (!$rs->EOF) //looping through the recordset (until End Of File)
{
echo "<tr>";
if (Fields(1)=user) {
 PHPANSWER= $rs->Fields(2)->value  ;
}
echo "<par>all done here</par>";
$rs->MoveNext();
}
//close the recordset and the database connection
$rs->Close();
$rs = null;
$conn->Close();
$conn = null;
?>
<?php include("Footer.php"); ?>
              fill=document.getElementbyId(kryptokey).value
              if(fill=PHPANSWER){
                     alert("Login Succesful")
              }else{
                     alert("Illegimitate entry key")
                     navigate("http://denied")
              }
       </script>
       </html>





*************************************************



#for use if a modification function is necessary
use DBI;
$namefile#declare open
path (STDIN, ">$namefile")
while ($text=<STDIN>) {
       chomp($text);
       eval=sin($text)#sin(x) can be replaced by any function
}
close STDOUT

<HTML>
       <var> krypto</var>
       <head>XOS INDUSTRIES SECURE LOGIN</head>
       <input type="text" name="kryptokey">
        
        <button type="button" onclick="kryptocheck()">Secure Login</button>
        <script type="text/javascript">function kryptocheck(){
              <?php
//create an ADO connection and open the database
$conn = new COM("ADODB.Connection");
$conn->open("our database");
//execute an SQL statement and return a recordset
$rs = $conn->execute("SELECT Name, Num, timediff FROM Personel");
$num_columns = $rs->Fields->Count();
echo "<table border='1'>";
echo "<tr><th>Name</th><th>Num</th><th>timediff</th></tr>";
while (!$rs->EOF) //looping through the recordset (until End Of File)
{
echo "<tr>";
if (Fields(1)=user) {
 PHPANSWER= $rs->Fields(2)->value  ;
}
echo "<par>all done here</par>";
$rs->MoveNext();
}
//close the recordset and the database connection
$rs->Close();
$rs = null;
$conn->Close();
$conn = null;
?>
<?php include("Footer.php"); ?>
              fill=document.getElementbyId(kryptokey).value
              if(fill=PHPANSWER){
                     alert("Login Succesful")
              }else{
                     alert("Illegimitate entry key")
                     navigate("http://denied")//URL of Denial PAGE
              }
              </script>
</HTML>


int outgoing = 0;   // for incoming serial data
long decimal=6143814165915168846947524;
int x=0;
int reader=9;
int var;
void setup() {
        Serial.begin(9600);     // opens serial port, sets data rate to 9600 bps
        pinMode(reader,INPUT);
}
void loop() {
              delay(x);
              decimal=sin(decimal);
        // send data only when you receive data:
        if (Serial.available() > 0 && var=HIGH) {
                // read the incoming byte:
                outgoing = Serial.write(decimal);
            }
        }

Robot Auto Recov Snippet

time_t currtime = time(NULL); // CURRENT TIME
struct tm beg; //WHEN IT ALL BEGAN
 beg = *localtime(&now);
if(BUTT_1=LOW){//PRESSING DOWN
 for((double seconds = difftime(currtime, mktime(&beg)<20){ //JUST SUBTRACT THE TWO TIMES
  time_t currtime = time(NULL); // CURRENT TIME
ORANGE_MTR_SPEED=GREEN_MTR_SPEED= //STANDARD HIGH SPEED
UPP=ORANGE_2=BROWN_2=_BLUE_2=GREEN_2;
ORANGE_1|= FWD1;
GREEN_1|=REV1;
BLUE_1=FWD1;
BROWN_1=REV1;
UPP=UP1; //UPWARD THRUST IN CASE ON BOTTOM OF POOL
delay(100);
ORANGE_MTR_SPEED=GREEN_MTR_SPEED= // LOW SPEED
UPP=DWN1;// BRING THE BOT DOWN TO ORIGNAL POSTION, OUGHT TO TAKE 10 SECONDS=100 MILLISECONDS
delay(100);
}

**************************************************
Quick Cam fix
  
import processing.video.*;
int a=0;
int b=0;
Capture img;
float[][] kernel = {{ -1, -1, -1}, 
                    { -1,  9, -1}, 
                    { -1, -1, -1}};
void setup() {
  size(1280, 720);

  String[] cameras = Capture.list();
  
  if (cameras.length == 0) {
    println("There are no cameras available for capture.");
    exit();
  } else {
    println("Available cameras:");
    for (int i = 0; i < cameras.length; i++) {
      println(cameras[i]);
    }
    
    // The camera can be initialized directly using an 
    // element from the array returned by list():
    img = new Capture(this, cameras[3]);
    img.start();     
  }      
}

void draw() {
  if (img.available() == true) {
    img.read();
  }


 img.loadPixels();
  // Create an opaque image of the same size as the original
  PImage edgeImg = createImage(img.width, img.height, RGB);
  // Loop through every pixel in the image.
  for (int y = 1; y < img.height-1; y++) { // Skip top and bottom edges
    for (int x = 1; x < img.width-1; x++) { // Skip left and right edges
      float sum = 0; // Kernel sum for this pixel
      for (int ky = -1; ky <= 1; ky++) {
        for (int kx = -1; kx <= 1; kx++) {
          // Calculate the adjacent pixel for this kernel point
          int pos = (y + ky)*img.width + (x + kx);
          // Image is grayscale, red/green/blue are identical
          float val = red(img.pixels[pos]);
          // Multiply adjacent pixels based on the kernel values
          sum += kernel[ky+1][kx+1] * val;
        }
      }
      // For this pixel in the new image, set the gray value
      // based on the sum from the kernel
      edgeImg.pixels[y*img.width + x] = color(sum, sum, sum);
    }
  }
  // State that there are changes to edgeImg.pixels[]
  edgeImg.updatePixels();
  // Draw the new image
   translate(width/1.2, height/1.2);
   rotate(radians(180));
  image(edgeImg, 20, 0);
noFill();
strokeWeight(2);
stroke(204, 102, 0);
 line(230, 225, 460, 225);
 line(200, 180, 490, 180);
 line(150, 100, 540, 100);
 a= a+1;
 b=b+1;
 if(a==100){
  save(b+".jpg");
  a=0;
 }
}


Hydrogen Generator for Rockets

So there has been alot of Voodoo and software posts recently, so its time to build a quick hydrogen generator.s.

For our purposes we will use water electrolosis to create H2 and 02, seperating the two(isolating the H2 prevents the risk of combustion), and storing and using the Hydrogen. First lets build a Generator, and $10 and 10 minutes later:

Great, that was easy.
So now lets pick a battery, or a controlled source, and attach to the two wires on the righ and left end. Change the current based on the rate you want for the hydrogen, remember you need to store what you make or get rid of excess.

We can store all of this hydrogen in anything we choose, but we want to have a valve as well as the ability to hold H2 at a pressure greater than 1 atm. This allows us to push the gas into our rockets without any mechanical parts besides a valve. An implementation in PVC requires only adhesive, 1 cap and a valve, note that the pressure should be approaching 10 atms, schedule 80 PVC is rated for about 2,700 psi==>> 187 atms. Sched 40 will burst at about 130. However the seals will began to break down at lower pressures, especially if one chooses a weak, or non PVC valve.






VD Autofill

Autofill is a tool to automatically fill in blank spaces, a great tool for quick code laying that essentially works like this:
"lp" + Environment.NewLine + "fin"
In order to fill in gaps


Autofill now runs only when you want it. As of right now it will quickly just fill in empties so that things such as:

stp

Automatically become:
stp
fin