Skip to content

Instantly share code, notes, and snippets.

@aurorapar
aurorapar / Client.java
Created March 26, 2018 05:44
TFTP Server
// Client
import java.net.*;
import java.io.*;
import java.util.*;
import java.nio.charset.*;
public class Client
{
public static int serverPort = 69;
// Client
import java.net.*;
import java.io.*;
public class Client
{
public static void main(String args[])
{
byte buffer[] = new byte[100];
<?php
$songs = ('Song1', 'Song2');
$artists = ('Artist1', 'Artist2');
for($x = 0; $x < sizeof($songs); $x++)
{
echo $songs[x] . ' by ' $artists[x] . '\n';
}
?>
$(document).ready( function() {
$( "#updateForm" ).submit(sendValues);
});
function sendValues(e)
{
data = $( "#updateForm" ).serialize();
var request = $.ajax({
url: "createaccount.php",
type: "POST",
USE acore_auth;
SELECT testOne.username, testTwo.username
FROM account as testOne,
account as testTwo
WHERE
testOne.username=testTwo.username
OR testOne.last_ip=testTwo.last_ip
OR testOne.last_ip=testTwo.last_attempt_ip
OR testOne.last_attempt_ip=testTwo.last_ip
/**
* Client program requesting current date from server.
*
* Figure 3.27
*
* @author Gagne, Galvin, Silberschatz
* Operating System Concepts with Java - Eighth Edition
* Copyright John Wiley & Sons - 2010.
*/
'''
PREFACE
This is probably the worst code I have ever written. The optimiation is non-existant,
the rules have little forethought and planning, and only the minimal of the procedures
that were studied in class were applied.
This software should not be taken as representation of my abilities, but more as
what a caffiene binge throughout the night can produce.
@aurorapar
aurorapar / assignment6.txt
Created April 28, 2017 11:22
Pattern matching one read file in another read file
#not /usr/local/bin/perl
# Reports a match and position of a Motif
#
# Input:
# One motif pattern file
# One sequence file
$patternFile;
$searchFile;
@aurorapar
aurorapar / assignment6.pl
Created April 28, 2017 10:31
motif finder
#not /usr/local/bin/perl
# Reports a match and position of a Motif
#
# Input:
# One motif pattern file
# One sequence file
$patternFile;
$searchFile;
import java.util.*;
class tables
{
public static void main(String[] args)
{
Random rng = new Random();
for(int i = 1; i <= 10; i += 1)