<commit_before><?php
date_default_timezone_set('America/New_York');
// define location of Parse PHP SDK, e.g. location in "Parse" folder
// Defaults to ./Parse/ folder. Add trailing slash
define( 'PARSE_SDK_DIR', 'vendor/parse/' );

require 'vendor/autoload.php';
  
// Add the "use" declarations where you'll be using the classes
use Parse\ParseClient;
use Parse\ParseObject;
use Parse\ParseQuery;

ParseClient::initialize('<KEY>', 
	'<KEY>', 
	'<KEY>');

session_start();
// start a session for each user(end when your close brower).
$flashKey = isset($_GET['key1']);

if ($flashKey) { 
	// Get Data from Flash
	$saveKey = $_GET['key1'];
	$_SESSION["pipeNum"] = $_GET['key1'];
	// save something to class TestObject
	$pipeNumObj = ParseObject::create("PipeNumObj");
	$pipeNumObj->set("UserID", "flashKey");
	$pipeNumObj->set("pipeNum", $saveKey);
	$pipeNumObj->save();
}

// // get the object ID
// echo $testObject->getObjectId();

// echo '<h1>Users</h1>';

// // get the first 10 users from built-in User class
// $query = new ParseQuery("_User");
// $query->limit(10);
// $results = $query->find();

// foreach ( $results as $result ) {
//   // echo user Usernames
//   echo $result->get('username') . '<br/>';
// }

// Get Data from Unity
if (isset($_GET['getkey'])) {
	$pipeNumQuery = new ParseQuery("PipeNumObj");
	$pipeNumQuery->limit(1);
	$resultsNum = $pipeNumQuery->first();
	if(isset($_SESSION["pipeNum"])){
		echo $_SESSION["pipeNum"];
	}else if($resultsNum){
		echo $resultsNum;
	}
	# code...
}

?>
<commit_msg>add POST accept method<commit_after><?php
date_default_timezone_set('America/New_York');
// define location of Parse PHP SDK, e.g. location in "Parse" folder
// Defaults to ./Parse/ folder. Add trailing slash
define( 'PARSE_SDK_DIR', 'vendor/parse/' );

require 'vendor/autoload.php';
  
// Add the "use" declarations where you'll be using the classes
use Parse\ParseClient;
use Parse\ParseObject;
use Parse\ParseQuery;

ParseClient::initialize('<KEY>', 
	'<KEY>', 
	'<KEY>');

session_start();
// start a session for each user(end when your close brower).
$flashKey = isset($_GET['key1']);

if ($flashKey) { 
	// Get Data from Flash
	$saveKey = $_GET['key1'];
	$_SESSION["pipeNum"] = $_GET['key1'];
	// save something to class TestObject
	$pipeNumObj = ParseObject::create("PipeNumObj");
	$pipeNumObj->set("UserID", "flashKey");
	$pipeNumObj->set("pipeNum", $saveKey);
	$pipeNumObj->save();
}

// // get the object ID
// echo $testObject->getObjectId();

// echo '<h1>Users</h1>';

// // get the first 10 users from built-in User class
// $query = new ParseQuery("_User");
// $query->limit(10);
// $results = $query->find();

// foreach ( $results as $result ) {
//   // echo user Usernames
//   echo $result->get('username') . '<br/>';
// }

// Get Data from Unity
if (isset($_GET['getkey'])) {
	$pipeNumQuery = new ParseQuery("PipeNumObj");
	$pipeNumQuery->limit(1);
	$resultsNum = $pipeNumQuery->first();
	if(isset($_SESSION["pipeNum"])){
		echo $_SESSION["pipeNum"];
	}else if($resultsNum){
		echo $resultsNum;
	}
	# code...
}

if (isset($_POST['UserID'])) {
	$userInput = $_POST['UserID'];
	$pipeNumQuery = new ParseQuery("PipeNumObj");
	$pipeNumQuery->limit(1);
	$resultsNum = $pipeNumQuery->first();
	if(isset($_SESSION["pipeNum"])){
		echo $_SESSION["pipeNum"];
	}else if($resultsNum){
		echo $resultsNum;
	}
	# code...
}

?>

{'fraction_non_alphanumeric': 0.19869125520523498, 'fraction_numerical': 0.006246281975014872, 'mean_word_length': 4.398073836276083, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5780918', 'n_tokens_mistral': 1182, 'n_tokens_neox': 1158, 'n_words': 285}