text:
/** \file os/vxworks6.6/code/os_threadWaitExit.c
 *  \brief VxWorks RTP thread join management
 *
 * Implements pthread_join management for VxWorks RTP
 * varies from posix implementation because of known
 * issue within WindRiver's implementation of phread_join
 * (TSR 815826).  When resolved this should be removed.
 */

#include <pthread.h>
#include <stdlib.h>
#include <string.h>
#include "os_report.h"
#include "os_abstract.h"

/** \brief Wait for the termination of the identified thread
 *
 * \b os_threadWaitExit wait for the termination of the
 * thread \b threadId by calling \b pthread_join. The return
 * value of the thread is passed via \b thread_result.
 */
os_result
os_threadWaitExit (
    os_threadId threadId,
    void **thread_result)
{
    os_result rv;
    int result;
    struct sched_param sched_param;
    int policy = 0;
    int max = 0;

    assert (threadId);

    /* On VxWorks 6.x RTP mode, there is a known issue in the pthread_join system call.
     * From WindRiver : when pthread_join returns, it does not indicate end of a thread
     * in 100% of the situations.  It could appear that the parent process, which calls
     * pthread_join has a higher priority than the thread which is currently being terminated.
     * This means that the function pthread_join would return BEFORE pthread_exit has finished.
     * This is contrary to posix spec which says that pthread_join should only return
     * when the thread is REALLY terminated, which is not true in vxWorks.
     * This was submitted to WindRiver as TSR 815826.  Workaround suggested by WindRiver
     * Support : should increase priority of the task to be killed before giving the semaphore
     * back in order to force the exit of the thread before pthread_join exits.
     */

    /* Note that any possible errors raised here are not terminal since the thread
     * may have exited at this point anyway.  This is a best effort to raise the priority
     * of the thread about to be joined so that exit will only return when the thread
     * has definitely terminated
     */

    result = pthread_getschedparam(threadId, &policy, &sched_param);
    if (result == 0) {
        max = sched_get_priority_max(policy);
	if (max != -1) {
	    result = pthread_setschedprio(threadId, max);
	}
    }

    result = pthread_join (threadId, thread_result);
    if (result != 0) {
        OS_REPORT (OS_ERROR, "os_threadWaitExit", 2, "pthread_join failed with error %d", result);
        rv = os_resultFail;
    } else {
        rv = os_resultSuccess;
    }
    return rv;
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.codepath.apps.twitterApp.ReplyActivity">

    <ImageView
        android:id="@+id/ivProfileImage"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        app:srcCompat="@android:color/black" />

    <TextView
        android:id="@+id/tvUserName"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_marginLeft="5dp"
        android:layout_toEndOf="@+id/ivProfileImage"
        android:text="TextView" />

    <TextView
        android:id="@+id/tvBody"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/tvUserName"
        android:layout_marginLeft="5dp"
        android:layout_toEndOf="@+id/ivProfileImage"
        android:text="TextView" />

    <ImageView
        android:id="@+id/imageView2"
        android:layout_width="15dp"
        android:layout_height="15dp"
        android:layout_alignParentTop="true"
        android:layout_marginLeft="5dp"
        android:layout_marginRight="5dp"
        android:layout_toEndOf="@+id/tvUserName"
        app:srcCompat="@drawable/ic_launcher" />

    <TextView
        android:id="@+id/tvRelativeTime"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_toEndOf="@+id/imageView2"
        android:text="TextView" />

    <ImageButton
        android:id="@+id/ibReply"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:srcCompat="@android:drawable/stat_notify_chat"
        android:layout_below="@+id/tvBody"
        android:layout_alignParentEnd="true" />

    <TextView
        android:id="@+id/tvReplyTo"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Replying to"
        android:layout_above="@+id/etTweetBody"
        android:layout_alignParentStart="true" />

    <TextView
        android:id="@+id/tvAtReply"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="5dp"
        android:layout_toEndOf="@+id/tvReplyTo"
        android:text="user"
        android:layout_above="@+id/etTweetBody"
        android:textColor="@color/blue" />

    <EditText
        android:id="@+id/etTweetBody"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:layout_above="@+id/tvCharCount"
        android:hint="Tweet your reply"
        android:maxLength="140"></EditText>

    <Button
        android:id="@+id/btTweet"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentEnd="true"
        android:layout_marginBottom="5dp"
        android:text="Reply"
        ></Button>

    <TextView
        android:id="@+id/tvCharCount"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_above="@+id/btTweet"
        android:layout_alignParentEnd="true"
        android:text="140/140 characters" />

</RelativeLayout>

redpajama_set_name: RedPajamaGithub


text:
import sys
sys.path.insert(0, '../')
import versioneer
versioneer.VCS = 'git'
versioneer.versionfile_source = '../khmer/_version.py'
versioneer.versionfile_build = '../khmer/_version.py'
versioneer.tag_prefix = 'v'  # tags are like v1.2.0
versioneer.parentdir_prefix = '..'

print versioneer.get_version()


text:
<?php
include 'func.php';

$msg = "";
$error = "";

function get_page($p, $h, $msg = "", $error = "") {
	$appname  = get_appname($p, $h );
	$appemail = get_appemail($p, $h );

	$status = get_jobcondition($p);
	if ( ! $status ) {
		echo "
Welcome $appname, the position is now closed
\n";
		return;
	}

	echo "
Welcome $appname, you will be able to manage your application below
\n";

	if ($msg != "") {
		echo "
 $msg
";
	}
	if ($error != "") {
		echo "
 $error
";
	}

	echo "
";
	echo "
 File upload
\n";
	echo '<form enctype="multipart/form-data" action="applicant.php?p='.$p.'&h='.$h.'" method="post" name="form_resume">';
	echo 'Please upload the required documents as one PDF file (Max:20MB) (refer to job description below)
';
	echo 'You can use online resources like SmallPDF to merge your PDFs
';
	echo '
';
	echo '
';
	echo '<input type="hidden" name="action" value="upload_resume">';
	echo '<input type="hidden" name="p" value="' . $p . '">';
	echo '<input type="hidden" name="h" value="' . $h . '">';
	echo '<input type="hidden" name="MAX_FILE_SIZE" value="20000000" />';
	echo '<input name="resume" size="40" maxlength="50" type="file" accept="application/pdf">';
	echo "<input type='submit' value='Upload'>";
	echo '</form>';

	if (file_exists(file_apppdf($p, $h))) {
		echo "  🖺
Application PDF
";
	}
	echo "
";
	echo "
";

	$jobrefnumber = get_jobrefnumber($p);
	$refcount = 0;
	if ($jobrefnumber > 0) {
		echo "
";
		echo "
 $jobrefnumber Referee".($jobrefnumber>1?"s":"")." required for this position
\n";

		$jobrefearly = get_jobrefearly($p);
		echo "
 Add a referee
\n";
		if ( $jobrefearly == "1" ) {
			echo "An email will be sent automatically to the address provided.\n";
		} else {
			echo "Your nominated referees will be contacted at the appropriate stage of the assessment process by our HR section.
You will be notified in advance of us contacting your referees.

\n";
		}
		echo "<form action='applicant.php?p=$p&h=$h' method='post' name='formaddref'>\n";
		echo "Referee Name <input type='text' name='refname' maxlength='50' value=''>
\n";
		echo "Referee Email <input type='email' name='refemail' maxlength='50' value=''>
\n";
		echo "<input type='hidden' name='p' value='$p'>";
		echo "<input type='hidden' name='h' value='$h'>";
		echo '<input type="hidden" name="action" value="add_referee">';
		echo "<input type='submit' value='Add'>";
		echo "</form>";

		echo "
 List of current referees
\n";

		$referees = get_referees($p, $h);
		$referees = explode( "\n", $referees );
		$refname = "";
		echo "
\n";
		foreach ($referees as $refemail) {
			if ( $refemail == "" ) continue;

			$rh=do_hash($refemail);

			$refname = get_refname($p, $h, $rh);
			echo "
  $refname ($refemail) ";
			if (file_exists(file_refpdf($p, $h, $rh))) {
				echo "Cover letter received";
			} else {
				if ( $jobrefearly == "1" ) {
					echo "<form action='applicant.php?p=$p&h=$h' method='post' name='formsendrefmail'>";
					echo "<input type='hidden' name='action' value='sendrefmail'>";
					echo "<input type='hidden' name='p' value='$p'>";
					echo "<input type='hidden' name='h' value='$h'>";
					echo "<input type='hidden' name='rh' value='$rh'>";
					echo "<input type='submit' value='Re-Send link'>";
					echo "</form>";
				}
			}

			echo "<form action='applicant.php?p=$p&h=$h' method='post' name='formdelref'>";
			echo "<input type='hidden' name='action' value='del_referee'>";
			echo "<input type='hidden' name='p' value='$p'>";
			echo "<input type='hidden' name='h' value='$h'>";
			echo "<input type='hidden' name='rh' value='$rh'>";
			echo "<input type='submit' value='Delete'>";
			echo "</form>";

			echo "
";
			$refcount ++;
		}
		echo "
";
		echo "
";
	}

	if (!file_exists(file_appmonitoring($p, $h))) {
		echo "
";
		echo "
";
		echo "
 Recruitment Equality Monitoring Information (Optional)
\n";
		echo "Candidates are requested to complete this information which is required for us to monitor implementation of our Gender, Diversity and Inclusion Strategy.
";
		echo "Please note this data is solely for administrative records to enable us to measure achievement of Gender, Diversity & Inclusion objectives.
";
		echo "It does not form part of the candidate's application and is not presented or considered at any stage of the selection process.
\n";
		echo '
';
		echo '<form action="applicant.php?p='.$p.'&h='.$h.'" method="post" name="formmonitoring">';
		echo "Nationality ".select_nationality()."
\n";
		echo '
';
		echo "Gender ".select_gender()." ";
		echo "if you selected Other, please specify: <input type='text' name='genderother' maxlength='50' value=''>
\n";
		echo '
';
		echo '<input type="hidden" name="action" value="submit_monitoring">';
		echo '<input type="hidden" name="p" value="' . $p . '">';
		echo '<input type="hidden" name="h" value="' . $h . '">';
		echo "<input type='submit' value='Submit'>";
		echo '</form>';

		echo "
";
		echo "
";
	}

	$finalizable="disabled";
	if (file_exists(file_apppdf($p, $h)) && ($refcount >= $jobrefnumber)) {
		$finalizable="";
	}
	echo "
";
	echo "<form action='applicant.php?p=$p&h=$h' method='post' name='formfinish'>";
	echo "<input type='hidden' name='action' value='finish'>";
	echo "<input type='hidden' name='p' value='$p'>";
	echo "<input type='hidden' name='h' value='$h'>";
	echo "<input type='submit' value='Finalize' $finalizable>";
	echo "</form>";

	echo "
";
	echo "
";
	echo "
";
	echo "<form action='applicant.php?p=$p&h=$h' method='post' name='formrefresh'>";
	echo "<input type='hidden' name='action' value='refresh'>";
	echo "<input type='hidden' name='p' value='$p'>";
	echo "<input type='hidden' name='h' value='$h'>";
	echo "<input type='submit' value='Refresh page'>";
	echo "</form>";

	echo "
\n";
	show_job_title_description($p);
}

if ($_SERVER['REQUEST_METHOD'] == "GET") {
        $p = $_GET['p'];
        $h = $_GET['h'];
	valid_p_h($p, $h) or die("Invalid URL GET");

	get_page($p, $h);

} else if ($_SERVER['REQUEST_METHOD'] == "POST") {
        $p = $_POST['p'];
        $h = $_POST['h'];
	valid_p_h($p, $h) or die("Invalid URL POST - check php.ini : post_max_size");

	$action = "";
	$status = get_jobcondition($p);
	if ( $status ) {
	        $action = $_POST['action'];
	}

	switch ($action) {
		case "upload_resume" :
#			$msg="CV uploaded";
			$msg="Application uploaded. Please use the Application PDF link below to check that your upload is correct and complete, and re-upload the application if necessary";
			$error="";
			if (! move_uploaded_file( $_FILES['resume']['tmp_name'], file_apppdf($p, $h)) ) {
				$msg="";
				$error="CV couldn't be uploaded";
			}
			if (! is_pdf( file_apppdf($p, $h) ) ) {
				unlink( file_apppdf($p, $h) );
				$msg="";
				$error="CV was not in PDF format";
			}

			if ( $error == "") {
				mail_applicant_uploaded($p, $h);
			}
			break;
		case "add_referee" :

			$refname   = filter_var($_POST['refname'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH|FILTER_FLAG_STRIP_LOW|FILTER_FLAG_ENCODE_AMP );
		        $refemail = $_POST['refemail'];
			valid_name_email($refname, $refemail) or die("Invalid Referee Name/Email $refname/$refemail");

			# add address to referees
			$referees = get_referees($p, $h);
			if (strpos($referees, $refemail) === false) {
				$fh = fopen(file_referees($p, $h), 'a') or die("can't open file");
				fwrite($fh, $refemail . "\n");
				fclose($fh);

				# add name to position/$p/$app/$ref/name
				$rh = do_hash( $refemail );
				if (!is_dir(file_refdir($p, $h, $rh))) mkdir(file_refdir($p, $h, $rh)) or die("can't make referee folder");
				$fh = fopen(file_refname($p, $h, $rh), 'w+') or die("can't open file");
				fwrite($fh, $refname);
				fclose($fh);
				$fh = fopen(file_refemail($p, $h, $rh), 'w+') or die("can't open file");
				fwrite($fh, $refemail);
				fclose($fh);

				$jobrefearly = get_jobrefearly($p);
				if ($jobrefearly == "1") {
					sendrefmail($p, $h, $rh);
					$msg="Referee added and email sent";
				} else {
					$msg="Referee added";
				}
				$error="";
			} else {
				$msg="";
				$error="Referee already in the list";
			}

			break;

		case "sendrefmail" :

		        $rh = $_POST['rh'];
			valid_p_h_rh($p, $h, $rh) or die("Invalid URL");

			$jobrefearly = get_jobrefearly($p);
			if ($jobrefearly == "1") {
				sendrefmail($p, $h, $rh);
				$msg="Reminder sent to referee";
			} else {
				$msg="Referee reminders are disabled";
			}
			$error="";

			break;

		case "del_referee" :

		        $rh = $_POST['rh'];
			valid_p_h_rh($p, $h, $rh) or die("Invalid URL");

			$refemail = get_refemail($p, $h, $rh);

			# deld address from referees
			$referees = explode( "\n", get_referees($p, $h) );
			$key = array_search( $refemail, $referees );
			if ($key !== false) {
				unset($referees[$key]);
				$referees = implode( "\n", $referees );
				$fh = fopen(file_referees($p, $h), 'w+') or die("can't open file");
				fwrite($fh, $referees);
				fclose($fh);

				$msg="Referee has been deleted";
				$error="";
			}else{
				$msg="";
				$error="Referee $refemail not found";
			}
			break;

		case "submit_monitoring":
		        $nationality = clean($_POST['nationality']);
		        $gender      = clean($_POST['gender']);
		        $genderother = clean($_POST['genderother']);

			# TODO validate nationality, gender

			$fh = fopen(file_jobmonitoringnationality($p), 'a') or die("can't open file monitoring nationality");
			fwrite($fh, $nationality . "\n");
			fclose($fh);

			$fh = fopen(file_jobmonitoringgender($p), 'a') or die("can't open file monitoring gender");
			fwrite($fh, $gender. ($genderother!=""? " ". $genderother:"") . "\n");
			fclose($fh);

			$fh = fopen(file_appmonitoring($p, $h), 'w+') or die("Can't open monitoring file");
			fwrite($fh, $h);
			fclose($fh);

			$msg="Thank you for sharing this information with us.";
			$error="";

			break;

		case "finish" :

#			$msg="Thank you for your application. This page will be accessible until the final review by the assessors. You may come back and change your CV and referees until then.";

			$jobtitle = get_jobtitle($p);
			$msg="Thank you for your application for the position of $jobtitle We will be in touch in due course.";
			$error="";

			break;

		case "refresh" : break;
	}

	get_page($p, $h, $msg, $error);

}


text:
from exp_test_helper import ExpTestHelper

class TestBuild():

    def test_build_libaccessom2(self):
        helper = ExpTestHelper('1deg_jra55_ryf')
        exe, ret = helper.build_libaccessom2()
        assert ret == 0

    def test_build_1deg_cice(self):
        helper = ExpTestHelper('1deg_jra55_ryf')
        exe, ret = helper.build_cice()
        assert ret == 0

    def test_build_025deg_cice(self):
        helper = ExpTestHelper('025deg_jra55_ryf')
        exe, ret = helper.build_cice()
        assert ret == 0

    def test_build_01deg_cice(self):
        helper = ExpTestHelper('01deg_jra55_ryf')
        exe, ret = helper.build_cice()
        assert ret == 0

    def test_build_mom(self):
        helper = ExpTestHelper('1deg_jra55_ryf')
        exe, ret = helper.build_mom()
        assert ret == 0


text:
package com.google.checkstyle.test.chapter5naming.rule526parameternames;

import java.io.File;

import org.junit.BeforeClass;
import org.junit.Test;

import com.google.checkstyle.test.base.BaseCheckTestSupport;
import com.google.checkstyle.test.base.ConfigurationBuilder;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.api.Configuration;

public class ParameterNameTest extends BaseCheckTestSupport{

    private static final String MSG_KEY = "name.invalidPattern";
    private static String format;
    private static ConfigurationBuilder builder;
    private static Configuration checkConfig;

    @BeforeClass
    public static void setConfigurationBuilder() throws CheckstyleException {
        builder = new ConfigurationBuilder(new File("src/it/"));
        checkConfig = builder.getCheckConfig("ParameterName");
        format = checkConfig.getAttribute("format");
    }

    @Test
    public void parameterNameTest() throws Exception {

        final String[] expected = {
            "8:21: " + getCheckMessage(checkConfig.getMessages(), MSG_KEY, "$arg1", format),
            "9:21: " + getCheckMessage(checkConfig.getMessages(), MSG_KEY, "ar$g2", format),
            "10:21: " + getCheckMessage(checkConfig.getMessages(), MSG_KEY, "arg3$", format),
            "11:21: " + getCheckMessage(checkConfig.getMessages(), MSG_KEY, "a_rg4", format),
            "12:21: " + getCheckMessage(checkConfig.getMessages(), MSG_KEY, "_arg5", format),
            "13:21: " + getCheckMessage(checkConfig.getMessages(), MSG_KEY, "arg6_", format),
            "14:21: " + getCheckMessage(checkConfig.getMessages(), MSG_KEY, "aArg7", format),
            "15:21: " + getCheckMessage(checkConfig.getMessages(), MSG_KEY, "aArg8", format),
            "16:21: " + getCheckMessage(checkConfig.getMessages(), MSG_KEY, "aar_g", format),
            "26:21: " + getCheckMessage(checkConfig.getMessages(), MSG_KEY, "bB", format),
            "49:22: " + getCheckMessage(checkConfig.getMessages(), MSG_KEY, "llll_llll", format),
            "50:21: " + getCheckMessage(checkConfig.getMessages(), MSG_KEY, "bB", format),
        };

        String filePath = builder.getFilePath("ParameterNameInput_Simple");

        Integer[] warnList = builder.getLinesWithWarn(filePath);
        verify(checkConfig, filePath, expected, warnList);
    }
}


text:
class AddGenderToIInvestigator < ActiveRecord::Migration[5.0]
  def change
    add_column :i_investigators, :gender, :string, null: false, limit: 1
  end
end


text:
@interface ViewController ()

@end

@implementation ViewController

void (^positiveBlock)(ViewController *);
void (^negativeBlock)(ViewController *);
void (^naturalBlock)(ViewController *);

UIView *title;
UIView *conten;
UIButton *positiveButton;
UIButton *negativeButton;
UIButton *naturalButton;

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)didLabelClicked {

}

- (void) viewDidAppear:(BOOL)animated {
//    AlertDialog *dialog = [[AlertDialog alloc] initWithViewCountroller: self];
//    dialog.dialogTitle = [[NSAttributedString alloc] initWithString: @"Fuck" attributes:nil];
//    [dialog show];

}

- (void) show {

}

- (void) hide {

}

- (void) dismiss {

}

- (IBAction)button:(id)sender {
    AlertDialog *view = [AlertDialog new];
//    view.titleText = @"Use Google's location service";
    view.contentText = @"To use Google's location service, you muse agree below protocol.To use Google's location service, you muse agree below protocol.To use Google's location service, you muse agree below protocol.To use Google's location service, you muse agree below protocol";
    view.negativeText = @"取消";
    view.positiveBlock = ^(AlertDialog *myView) {
        NSLog(@"OK clicked");
    };
    view.negativeBlock = ^(AlertDialog *myView) {
        NSLog(@"Cancel clicked");
    };
    view.neturalText = @"帮助";
    view.neturalBlock = ^(AlertDialog *myView) {
        NSLog(@"Help Clicked");
    };
    view.onCancel = ^(AlertDialog *myView) {
        NSLog(@"Canceled");
    };
    view.onDismiss = ^(AlertDialog *myView) {
        NSLog(@"dismissed");
    };
    [view show];
}

@end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>All Classes</title>
<meta name="date" content="2014-05-08">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

All Classes

Point

StrokeManager

UploadCallback


text:
package server;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import main.Config;

import org.apache.log4j.Logger;

import client.Client;
import client.ClientManager;

public class Server {
	private static final Logger logger = Logger.getLogger(Server.class);
	private boolean run = false;
	private ServerSocket socketTCP;
	private ExecutorService executor = Executors.newFixedThreadPool(50);

	static {
		if (Config.DB_USE){
			DataBase.get();
		}
	}

	public Server() {

	}

	public void start() {
		logger.info("Lancement du serveur");
		run = true;
		try{
			socketTCP = new ServerSocket(Config.TCP_PORT);
			while (run) {
				Socket sock = null;
				try {
					sock = socketTCP.accept();
				} catch (IOException e) {
					run = false;
					return;
				}
				if (BanByIP.isBanned(sock.getInetAddress())) {
					System.err.println("IP " + sock.getInetAddress().getHostAddress() + " bannie, socket ignoree.");
				} else {
					logger.info("Accepting a new client : " + sock.getInetAddress() + ":" + sock.getPort());
					Client c = new Client(this, sock);
					executor.execute(c);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public void stop() {
		run = false;

		// Fermeture des sockets d'ecoute
		try {
			socketTCP.close();
		} catch (Exception e) {
		}

		ClientManager.get().removeClients();
		executor.shutdownNow();
	}
}


text:
namespace Fixtures.Azure.AcceptanceTestsLro.Models
{
    using System.Linq;

    /// <summary>
    /// Defines headers for putAsyncNoHeaderInRetry operation.
    /// </summary>
    public partial class LROsPutAsyncNoHeaderInRetryHeadersInner
    {
        /// <summary>
        /// Initializes a new instance of the
        /// LROsPutAsyncNoHeaderInRetryHeadersInner class.
        /// </summary>
        public LROsPutAsyncNoHeaderInRetryHeadersInner() { }

        /// <summary>
        /// Initializes a new instance of the
        /// LROsPutAsyncNoHeaderInRetryHeadersInner class.
        /// </summary>
        public LROsPutAsyncNoHeaderInRetryHeadersInner(string azureAsyncOperation = default(string))
        {
            AzureAsyncOperation = azureAsyncOperation;
        }

        /// <summary>
        /// </summary>
        [Newtonsoft.Json.JsonProperty(PropertyName = "Azure-AsyncOperation")]
        public string AzureAsyncOperation { get; set; }

    }
}


text:
package com.devoxx.views.cell;

import com.devoxx.DevoxxView;
import com.devoxx.control.EmojiListTile;
import com.devoxx.model.Conference;
import com.devoxx.model.Favorite;
import com.devoxx.model.Session;
import com.devoxx.model.TalkSpeaker;
import com.devoxx.service.Service;
import com.devoxx.util.DevoxxBundle;
import com.devoxx.util.DevoxxSettings;
import com.devoxx.views.SessionPresenter;
import com.devoxx.views.helper.SessionVisuals;
import com.gluonhq.charm.glisten.control.CharmListCell;
import com.gluonhq.charm.glisten.visual.MaterialDesignIcon;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.css.PseudoClass;
import javafx.geometry.HPos;
import javafx.geometry.Pos;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.control.ContentDisplay;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.Priority;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;

import java.util.List;

import static com.devoxx.views.helper.SessionTrack.fetchPseudoClassForTrack;

public class ScheduleCell extends CharmListCell<Session> {

    private static final PseudoClass PSEUDO_CLASS_COLORED = PseudoClass.getPseudoClass("color");
    private static final PseudoClass PSEUDO_CLASS_BREAK = PseudoClass.getPseudoClass("break");

    private final Service service;
    private final EmojiListTile listTile;
    private final BorderPane borderPane;
    private final SecondaryGraphic secondaryGraphic;
    private final Label trackLabel;
    private Label startDateLabel;
    private Label sessionTypeLabel;
    private Group trackLabelContainer;
    private HBox sessionType;
    private Session session;
    private SessionVisuals sessionVisuals;
    private boolean showDate;
    private boolean showSessionType;
    private PseudoClass oldPseudoClass;

    public ScheduleCell(Service service, SessionVisuals sessionVisuals) {
        this(service, sessionVisuals, false, false);
    }

    public ScheduleCell(Service service, SessionVisuals sessionVisuals, boolean showDate, boolean showSessionType) {
        this.service = service;
        this.sessionVisuals = sessionVisuals;
        this.showDate = showDate;
        this.showSessionType = showSessionType;

        trackLabel = new Label();
        trackLabelContainer = new Group(trackLabel);
        secondaryGraphic = new SecondaryGraphic();

        listTile = new EmojiListTile() {

            @Override
            protected double computeMinHeight(double width) {
                return computePrefHeight(width);
            }

            @Override
            protected double computePrefHeight(double width) {
                double trackLabelContainerWidth = trackLabelContainer.prefWidth(-1);
                double secondaryGraphicWidth = secondaryGraphic.prefWidth(-1);
                return getCenter().prefHeight(width - secondaryGraphicWidth - trackLabelContainerWidth);
            }

            @Override
            protected double computeMaxHeight(double width) {
                return computePrefHeight(width);
            }
        };
        listTile.setWrapText(true);
        listTile.setPrimaryGraphic(trackLabelContainer);
        listTile.setSecondaryGraphic(secondaryGraphic);

        trackLabel.maxWidthProperty().bind(listTile.heightProperty());

        borderPane = new BorderPane(listTile);
        if (showSessionType) {
            sessionTypeLabel = new Label();
            sessionType = new HBox(sessionTypeLabel);
            sessionType.getStyleClass().add("session-type");
        }

        setText(null);
        getStyleClass().add("schedule-cell");
    }

    @Override
    public void updateItem(Session item, boolean empty) {
        super.updateItem(item, empty);
        session = item;
        if (item != null && !empty) {

            if (item.getTalk() != null) {
                secondaryGraphic.updateGraphic(session);
                listTile.setPrimaryGraphic(trackLabelContainer);
                listTile.setSecondaryGraphic(secondaryGraphic);
                listTile.setOnMouseReleased(event -> {
                    DevoxxView.SESSION.switchView().ifPresent(presenter ->
                            ((SessionPresenter) presenter).showSession(session));
                });
            } else if (item.getBreak() != null) {
                listTile.setPrimaryGraphic(null);
                listTile.setSecondaryGraphic(null);
                listTile.setOnMouseReleased(null);
            }

            updateListTile();
            updateSessionType();
            setGraphic(borderPane);
        } else {
            setGraphic(null);
        }
    }

    private void updateSessionType() {
        if (showSessionType) {
            if (session.isShowSessionType() && session.getTalk() != null) {
                sessionTypeLabel.setText(session.getTalk().getTalkType());
                borderPane.setTop(sessionType);
            } else {
                borderPane.setTop(null);
            }
        }
    }

    private void updateListTile() {
        if (session.getTalk() != null) {
            if (session.getTalk().getTrack() != null) {
                final String track = session.getTalk().getTrack().toUpperCase();
                trackLabel.setText(track);
                changePseudoClass(fetchPseudoClassForTrack(track));
            }

            if (session.getTalk().getTitle() != null) {
                listTile.setTextLine(0, session.getTalk().getTitle());
            }

            List<TalkSpeaker> speakers = session.getTalk().getSpeakers();
            listTile.setTextLine(1, convertSpeakersToString(speakers));
            listTile.setTextLine(2, DevoxxBundle.getString("OTN.SCHEDULE.IN_AT",
                    session.getRoomName(),
                    DevoxxSettings.TIME_FORMATTER.format(session.getStartDate()),
                    DevoxxSettings.TIME_FORMATTER.format(session.getEndDate())));
            updateFavorite();
        } else if (session.getBreak() != null) {
            listTile.setTextLine(0, session.getBreak().getNameEN());
            listTile.setTextLine(1, "");
            listTile.setTextLine(2, DevoxxBundle.getString("OTN.SCHEDULE.IN_AT_BREAK",
                    DevoxxSettings.TIME_FORMATTER.format(session.getStartDate()),
                    DevoxxSettings.TIME_FORMATTER.format(session.getEndDate())));
            final VBox vBox = (VBox) listTile.getChildren().get(0);
            Label label = (Label) vBox.getChildren().get(vBox.getChildren().size() - 1);
            label.setGraphic(null);
            changePseudoClass(PSEUDO_CLASS_BREAK);
        }

        if (showDate) {
            initializeStartLabel();
            startDateLabel.setText(DevoxxSettings.DATE_FORMATTER.format(session.getStartDate()));
            // Hacky Code as it uses internals of ListTile
            ((VBox) listTile.getChildren().get(0)).getChildren().add(startDateLabel);
        }
        pseudoClassStateChanged(PSEUDO_CLASS_COLORED, session.isDecorated());
    }

    private void updateFavorite() {
        Favorite fav = sessionVisuals.getFavoriteFor(session);
        // Hacky Code as it uses internals of ListTile
        final VBox vBox = (VBox) listTile.getChildren().get(0);
        Label label = (Label) vBox.getChildren().get(vBox.getChildren().size() - 1);
        Label favLabel = new Label();
        favLabel.textProperty().bind(fav.favsProperty().asString());
        favLabel.visibleProperty().bind(fav.favsProperty().greaterThanOrEqualTo(favoriteThreshold()));
        favLabel.getStyleClass().add("fav-label");
        Node graphic = MaterialDesignIcon.FAVORITE.graphic();
        graphic.getStyleClass().add("fav-graphic");
        favLabel.setGraphic(graphic);
        label.setGraphic(favLabel);
        label.setContentDisplay(ContentDisplay.RIGHT);
    }

    private void initializeStartLabel() {
        if (startDateLabel == null) {
            startDateLabel = new Label();
            startDateLabel.getStyleClass().add("extra-text");
        }
    }

    private String convertSpeakersToString(List<TalkSpeaker> speakers) {
        if (speakers.size() > 0) {
            StringBuilder speakerTitle = new StringBuilder();
            for (int index = 0; index < speakers.size(); index++) {
                if (index < speakers.size() - 1) {
                    speakerTitle.append(speakers.get(index).getName()).append(", ");
                } else {
                    speakerTitle.append(speakers.get(index).getName());
                }
            }
            return speakerTitle.toString();
        }
        return "";
    }

    private void changePseudoClass(PseudoClass pseudoClass) {
        pseudoClassStateChanged(oldPseudoClass, false);
        pseudoClassStateChanged(pseudoClass, true);
        oldPseudoClass = pseudoClass;
    }

    private class SecondaryGraphic extends Pane {

        private final Node chevron;
        private StackPane indicator;
        private Session currentSession;

        public SecondaryGraphic() {
            chevron = MaterialDesignIcon.CHEVRON_RIGHT.graphic();
            indicator = createIndicator(SessionVisuals.SessionListType.FAVORITES, true);
            getChildren().addAll(chevron, indicator);
            InvalidationListener il = (Observable observable) -> {
                if (currentSession != null) {
                    updateGraphic(currentSession);
                }
            };
            if (service.isAuthenticated()) {
                service.retrieveFavoredSessions().addListener(il);
            }
        }

        @Override protected void layoutChildren() {
            final double w = getWidth();
            final double h = getHeight();

            double indicatorWidth = indicator.prefWidth(-1);
            double indicatorHeight = indicator.prefHeight(-1);
            indicator.resizeRelocate(w - indicatorWidth, 0, indicatorWidth, indicatorHeight);

            double chevronWidth = chevron.prefWidth(-1);
            double chevronHeight = chevron.prefHeight(-1);
            chevron.resizeRelocate(0, h / 2.0 - chevronHeight / 2.0, chevronWidth, chevronHeight);
        }

        public void updateGraphic(Session session) {
            // FIXME this doesn't work as the retrieve* calls return empty lists on first call, resulting in graphics
            // not being shown.
            currentSession = session;
            final boolean authenticated = service.isAuthenticated();

            if ( authenticated && service.retrieveFavoredSessions().contains(session)) {
                resetIndicator( indicator, SessionVisuals.SessionListType.FAVORITES);
                indicator.setVisible(true);
            } else {
                indicator.setVisible(false);
            }
        }

        private void resetIndicator(StackPane indicator, SessionVisuals.SessionListType style) {
            if (!indicator.getStyleClass().contains(style.getStyleClass()) ) {
                final Node graphic = style.getOnGraphic();
                StackPane.setAlignment(graphic, Pos.TOP_RIGHT);
                indicator.getChildren().set(0, graphic);
            }
        }

        private StackPane createIndicator(SessionVisuals.SessionListType style, boolean topRight) {
            Node graphic = style.getOnGraphic();
            StackPane node = new StackPane(graphic);
            StackPane.setAlignment(graphic, topRight ? Pos.TOP_RIGHT : Pos.BOTTOM_RIGHT);

            node.setVisible(false);
            node.getStyleClass().addAll("indicator", style.getStyleClass());

            GridPane.setVgrow(node, Priority.ALWAYS);
            GridPane.setHalignment(node, HPos.RIGHT);

            return node;
        }
    }

    private int favoriteThreshold() {
        return service.getConference().getEventType() == Conference.Type.DEVOXX ? 10 : 3;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<PRONOM-Report xmlns="http://pronom.nationalarchives.gov.uk">
  <report_format_detail>
    <FileFormat>
      <FormatID>772</FormatID>
      <FormatName>PostScript</FormatName>
      <FormatVersion>2.1</FormatVersion>
      <FormatAliases>
      </FormatAliases>
      <FormatFamilies>
      </FormatFamilies>
      <FormatTypes>Page Description</FormatTypes>
      <FormatDisclosure>
      </FormatDisclosure>
      <FormatDescription>This is an outline record only, and requires further details, research or authentication to provide information that will enable users to further understand the format and to assess digital preservation risks associated with it if appropriate. If you are able to help by supplying any additional information concerning this entry, please return to the main PRONOM page and select 'Add an Entry'.</FormatDescription>
      <BinaryFileFormat>Text</BinaryFileFormat>
      <ByteOrders>
      </ByteOrders>
      <ReleaseDate>
      </ReleaseDate>
      <WithdrawnDate>
      </WithdrawnDate>
      <ProvenanceSourceID>1</ProvenanceSourceID>
      <ProvenanceName>Digital Preservation Department / The National Archives</ProvenanceName>
      <ProvenanceSourceDate>11 Feb 2006</ProvenanceSourceDate>
      <ProvenanceDescription>
      </ProvenanceDescription>
      <LastUpdatedDate>11 Feb 2006</LastUpdatedDate>
      <FormatNote>
      </FormatNote>
      <FormatRisk>
      </FormatRisk>
      <TechnicalEnvironment>
      </TechnicalEnvironment>
      <FileFormatIdentifier>
        <Identifier>application/postscript</Identifier>
        <IdentifierType>MIME</IdentifierType>
      </FileFormatIdentifier>
      <FileFormatIdentifier>
        <Identifier>com.adobe.postscript</Identifier>
        <IdentifierType>Apple Uniform Type Identifier</IdentifierType>
      </FileFormatIdentifier>
      <FileFormatIdentifier>
        <Identifier>x-fmt/407</Identifier>
        <IdentifierType>PUID</IdentifierType>
      </FileFormatIdentifier>
      <Developers>
        <DeveloperID>7</DeveloperID>
        <DeveloperName>
        </DeveloperName>
        <OrganisationName>Adobe Systems Incorporated</OrganisationName>
        <DeveloperCompoundName>Adobe Systems Incorporated</DeveloperCompoundName>
      </Developers>
      <Support>
        <SupportID>7</SupportID>
        <SupportName>
        </SupportName>
        <OrganisationName>Adobe Systems Incorporated</OrganisationName>
        <SupportCompoundName>Adobe Systems Incorporated</SupportCompoundName>
      </Support>
      <ExternalSignature>
        <ExternalSignatureID>770</ExternalSignatureID>
        <Signature>ps</Signature>
        <SignatureType>File extension</SignatureType>
      </ExternalSignature>
      <InternalSignature>
        <SignatureID>192</SignatureID>
        <SignatureName>PostScript DSC 2.1</SignatureName>
        <SignatureNote>PostScript DSC header version comment + EOF comment</SignatureNote>
        <ByteSequence>
          <ByteSequenceID>246</ByteSequenceID>
          <PositionType>Absolute from BOF</PositionType>
          <Offset>0</Offset>
          <MaxOffset>
          </MaxOffset>
          <IndirectOffsetLocation>
          </IndirectOffsetLocation>
          <IndirectOffsetLength>
          </IndirectOffsetLength>
          <Endianness>
          </Endianness>
          <ByteSequenceValue>252150532D41646F62652D322E31</ByteSequenceValue>
        </ByteSequence>
        <ByteSequence>
          <ByteSequenceID>250</ByteSequenceID>
          <PositionType>Absolute from EOF</PositionType>
          <Offset>0</Offset>
          <MaxOffset>
          </MaxOffset>
          <IndirectOffsetLocation>
          </IndirectOffsetLocation>
          <IndirectOffsetLength>
          </IndirectOffsetLength>
          <Endianness>
          </Endianness>
          <ByteSequenceValue>2525454F46(0D|0A|0D0A)</ByteSequenceValue>
        </ByteSequence>
      </InternalSignature>
      <RelatedFormat>
        <RelationshipType>Has lower priority than</RelationshipType>
        <RelatedFormatID>86</RelatedFormatID>
        <RelatedFormatName>Encapsulated PostScript File Format</RelatedFormatName>
        <RelatedFormatVersion>1.2</RelatedFormatVersion>
      </RelatedFormat>
      <RelatedFormat>
        <RelationshipType>Has lower priority than</RelationshipType>
        <RelatedFormatID>331</RelatedFormatID>
        <RelatedFormatName>Encapsulated PostScript File Format</RelatedFormatName>
        <RelatedFormatVersion>3.0</RelatedFormatVersion>
      </RelatedFormat>
      <RelatedFormat>
        <RelationshipType>Has lower priority than</RelationshipType>
        <RelatedFormatID>332</RelatedFormatID>
        <RelatedFormatName>Encapsulated PostScript File Format</RelatedFormatName>
        <RelatedFormatVersion>2.0</RelatedFormatVersion>
      </RelatedFormat>
      <RelatedFormat>
        <RelationshipType>Is previous version of</RelationshipType>
        <RelatedFormatID>773</RelatedFormatID>
        <RelatedFormatName>PostScript</RelatedFormatName>
        <RelatedFormatVersion>3.0</RelatedFormatVersion>
      </RelatedFormat>
      <RelatedFormat>
        <RelationshipType>Is subsequent version of</RelationshipType>
        <RelatedFormatID>771</RelatedFormatID>
        <RelatedFormatName>PostScript</RelatedFormatName>
        <RelatedFormatVersion>2.0</RelatedFormatVersion>
      </RelatedFormat>
    </FileFormat>
    <SearchCriteria>Criteria</SearchCriteria>
  </report_format_detail>
</PRONOM-Report>


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>jsample.jersey</groupId>
	<artifactId>Jersey_Json_Service_Logging</artifactId>
	<packaging>war</packaging>
	<version>1.0</version>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>9</maven.compiler.source>
		<maven.compiler.target>9</maven.compiler.target>
		<jersey.version>2.26</jersey.version>
		<jaxb.version>2.3.0</jaxb.version>
	</properties>

	<dependencies>

		<dependency>
			<groupId>javax</groupId>
			<artifactId>javaee-web-api</artifactId>
			<version>7.0</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jersey.containers</groupId>
			<artifactId>jersey-container-servlet</artifactId>
			<version>${jersey.version}</version>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jersey.inject</groupId>
			<artifactId>jersey-hk2</artifactId>
			<version>${jersey.version}</version>
		</dependency>
		<!-- Dependency for JSON based Jersey -->
		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-json-jackson</artifactId>
			<version>${jersey.version}</version>
		</dependency>

		<!-- Jaxb is required by hk2 -->
		<!-- From Java 9, jaxb is not part of Java SE, it is part of Java EE -->
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>${jaxb.version}</version>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-core</artifactId>
			<version>${jaxb.version}</version>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<version>${jaxb.version}</version>
		</dependency>
		<dependency>
			<groupId>javax.activation</groupId>
			<artifactId>activation</artifactId>
			<version>1.1.1</version>
		</dependency>

	</dependencies>

	<build>
		<finalName>Jersey_Json_Service_Logging</finalName>
	</build>
</project>


text:
package org.bson.codecs.record.annotations;

import org.bson.BsonType;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * An annotation that specifies what type the record component is stored as in the database.
 *
 * @since 4.6
 * @deprecated Prefer {@link org.bson.codecs.pojo.annotations.BsonRepresentation}
 */
@Deprecated
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.RECORD_COMPONENT})
public @interface BsonRepresentation {
    /**
     * The type that the property is stored as in the database.
     *
     * @return the type that the property should be stored as.
     */
    BsonType value();
}


text:
/**
 * Created by nuintun on 2015/11/24.
 */

'use strict';

var states = require('../states');

module.exports = function (Terminal){
  // ESC D Index (IND is 0x84).
  Terminal.prototype.index = function (){
    this.y++;

    if (this.y > this.scrollBottom) {
      this.y--;
      this.scroll();
    }

    this.state = states.normal;
  };

  // ESC M Reverse Index (RI is 0x8d).
  Terminal.prototype.reverseIndex = function (){
    var j;

    this.y--;

    if (this.y < this.scrollTop) {
      this.y++;

      // possibly move the code below to term.reverseScroll();
      // test: echo -ne '\e[1;1H\e[44m\eM\e[0m'
      // blankLine(true) is xterm/linux behavior
      this.lines.splice(this.y + this.ybase, 0, this.blankLine(true));

      j = this.rows - 1 - this.scrollBottom;

      this.lines.splice(this.rows - 1 + this.ybase - j + 1, 1);
      this.updateRange(this.scrollTop);
      this.updateRange(this.scrollBottom);
    }

    this.state = states.normal;
  };
};


text:
*FIREtxt*

COGS 120/CSE 170

Written By: Andy Kwak Yacoub Oulad Daoud Helen Femmel

A mobile first web app that enables people to better understand the dynamic of their text-based conversations.

Based on labs from COGS 120 taught by Prof. Scott Klemmer at UC San Diego.


text:
#ifndef __MALI_MEMORY_SECURE_H__
#define __MALI_MEMORY_SECURE_H__

#include "mali_session.h"
#include "mali_memory.h"
#include <linux/spinlock.h>

#include "mali_memory_types.h"

_mali_osk_errcode_t mali_mem_secure_attach_dma_buf(mali_mem_secure *secure_mem, u32 size, int mem_fd);

_mali_osk_errcode_t mali_mem_secure_mali_map(mali_mem_secure *secure_mem, struct mali_session_data *session, u32 vaddr, u32 props);

void mali_mem_secure_mali_unmap(mali_mem_allocation *alloc);

int mali_mem_secure_cpu_map(mali_mem_backend *mem_bkend, struct vm_area_struct *vma);

u32 mali_mem_secure_release(mali_mem_backend *mem_bkend);

#endif /* __MALI_MEMORY_SECURE_H__ */


text:
package com.microsoft.azure.management.network.v2020_03_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * VPN client connection health detail.
 */
public class VpnClientConnectionHealthDetail {
    /**
     * The vpn client Id.
     */
    @JsonProperty(value = "vpnConnectionId", access = JsonProperty.Access.WRITE_ONLY)
    private String vpnConnectionId;

    /**
     * The duration time of a connected vpn client.
     */
    @JsonProperty(value = "vpnConnectionDuration", access = JsonProperty.Access.WRITE_ONLY)
    private Long vpnConnectionDuration;

    /**
     * The start time of a connected vpn client.
     */
    @JsonProperty(value = "vpnConnectionTime", access = JsonProperty.Access.WRITE_ONLY)
    private String vpnConnectionTime;

    /**
     * The public Ip of a connected vpn client.
     */
    @JsonProperty(value = "publicIpAddress", access = JsonProperty.Access.WRITE_ONLY)
    private String publicIpAddress;

    /**
     * The assigned private Ip of a connected vpn client.
     */
    @JsonProperty(value = "privateIpAddress", access = JsonProperty.Access.WRITE_ONLY)
    private String privateIpAddress;

    /**
     * The user name of a connected vpn client.
     */
    @JsonProperty(value = "vpnUserName", access = JsonProperty.Access.WRITE_ONLY)
    private String vpnUserName;

    /**
     * The max band width.
     */
    @JsonProperty(value = "maxBandwidth", access = JsonProperty.Access.WRITE_ONLY)
    private Long maxBandwidth;

    /**
     * The egress packets per second.
     */
    @JsonProperty(value = "egressPacketsTransferred", access = JsonProperty.Access.WRITE_ONLY)
    private Long egressPacketsTransferred;

    /**
     * The egress bytes per second.
     */
    @JsonProperty(value = "egressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY)
    private Long egressBytesTransferred;

    /**
     * The ingress packets per second.
     */
    @JsonProperty(value = "ingressPacketsTransferred", access = JsonProperty.Access.WRITE_ONLY)
    private Long ingressPacketsTransferred;

    /**
     * The ingress bytes per second.
     */
    @JsonProperty(value = "ingressBytesTransferred", access = JsonProperty.Access.WRITE_ONLY)
    private Long ingressBytesTransferred;

    /**
     * The max packets transferred per second.
     */
    @JsonProperty(value = "maxPacketsPerSecond", access = JsonProperty.Access.WRITE_ONLY)
    private Long maxPacketsPerSecond;

    /**
     * Get the vpn client Id.
     *
     * @return the vpnConnectionId value
     */
    public String vpnConnectionId() {
        return this.vpnConnectionId;
    }

    /**
     * Get the duration time of a connected vpn client.
     *
     * @return the vpnConnectionDuration value
     */
    public Long vpnConnectionDuration() {
        return this.vpnConnectionDuration;
    }

    /**
     * Get the start time of a connected vpn client.
     *
     * @return the vpnConnectionTime value
     */
    public String vpnConnectionTime() {
        return this.vpnConnectionTime;
    }

    /**
     * Get the public Ip of a connected vpn client.
     *
     * @return the publicIpAddress value
     */
    public String publicIpAddress() {
        return this.publicIpAddress;
    }

    /**
     * Get the assigned private Ip of a connected vpn client.
     *
     * @return the privateIpAddress value
     */
    public String privateIpAddress() {
        return this.privateIpAddress;
    }

    /**
     * Get the user name of a connected vpn client.
     *
     * @return the vpnUserName value
     */
    public String vpnUserName() {
        return this.vpnUserName;
    }

    /**
     * Get the max band width.
     *
     * @return the maxBandwidth value
     */
    public Long maxBandwidth() {
        return this.maxBandwidth;
    }

    /**
     * Get the egress packets per second.
     *
     * @return the egressPacketsTransferred value
     */
    public Long egressPacketsTransferred() {
        return this.egressPacketsTransferred;
    }

    /**
     * Get the egress bytes per second.
     *
     * @return the egressBytesTransferred value
     */
    public Long egressBytesTransferred() {
        return this.egressBytesTransferred;
    }

    /**
     * Get the ingress packets per second.
     *
     * @return the ingressPacketsTransferred value
     */
    public Long ingressPacketsTransferred() {
        return this.ingressPacketsTransferred;
    }

    /**
     * Get the ingress bytes per second.
     *
     * @return the ingressBytesTransferred value
     */
    public Long ingressBytesTransferred() {
        return this.ingressBytesTransferred;
    }

    /**
     * Get the max packets transferred per second.
     *
     * @return the maxPacketsPerSecond value
     */
    public Long maxPacketsPerSecond() {
        return this.maxPacketsPerSecond;
    }

}


text:
from __future__ import print_function

import argparse
import json
import os.path
import pathlib2 as pathlib
# import pygame
import subprocess
import os
import uuid

import google.oauth2.credentials

from google.assistant.library import Assistant
from google.assistant.library.event import EventType
from google.assistant.library.file_helpers import existing_file
from google.assistant.library.device_helpers import register_device

import picamera
import time
import configparser
import requests
import json
import tensorflow as tf
import numpy as np
from PIL import Image

from object_detection.utils import label_map_util

config = configparser.ConfigParser()
config.read('config.env')
input_name = config.get('model', 'input')
model_name = config.get('model', 'name')
host = config.get('model', 'host')

try:
    FileNotFoundError
except NameError:
    FileNotFoundError = IOError

WARNING_NOT_REGISTERED = """
    This device is not registered. This means you will not be able to use
    Device Actions or see your device in Assistant Settings. In order to
    register this device follow instructions at:

    https://developers.google.com/assistant/sdk/guides/library/python/embed/register-device
"""

def load_image_into_numpy_array(image):
    (im_width, im_height) = image.size
    return np.array(image.getdata()).reshape(
        (im_height, im_width, 3)).astype(np.uint8)

label_map = label_map_util.load_labelmap('./object_detection/data/mscoco_label_map.pbtxt')
categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=90, use_display_name=True)
category_index = label_map_util.create_category_index(categories)

def getLabels(boxes, classes, scores, score):
    labels = []
    for i, box in enumerate(np.squeeze(boxes)):
        if (np.squeeze(scores)[i] > score):
            labels.append(category_index[np.squeeze(classes)[i]]['name'])

    return labels

def process_event(event, assistant):
    """Pretty prints events.

    Prints all events that occur with two spaces between each new
    conversation and a single space between turns of a conversation.

    Args:
        event(event.Event): The current event to process.
    """
    global custom_response

    print(event)
    if event.type == EventType.ON_CONVERSATION_TURN_STARTED:
        print()

    if (event.type == EventType.ON_CONVERSATION_TURN_FINISHED and event.args['with_follow_on_turn']):
        print(event.args)

    if (event.type == EventType.ON_CONVERSATION_TURN_FINISHED and
            event.args and not event.args['with_follow_on_turn']):
        print(event.args)
        if custom_response != '':
            assistant.send_text_query('responder burbuja el elefante ha visualizado este bello ' + custom_response)
            custom_response = ''

    if event.type == EventType.ON_DEVICE_ACTION:
        for command, params in event.actions:
            print('Do command', command, 'with params', str(params))

    if event.type == EventType.ON_RENDER_RESPONSE:
        if event.args['text'] in 'Estoy procesando tu imagen, amuleto que dices?':
            # assistant.stop_conversation()
            imgname = ''
            with picamera.PiCamera() as camera:
                imgname = uuid.uuid4().hex.upper()[0:6]
                camera.start_preview()
                time.sleep(2)
                camera.capture('/home/pi/Desktop/' + imgname + '.jpg')
                camera.stop_preview()

            img = Image.open('/home/pi/Desktop/' + imgname + '.jpg')
            image_np = load_image_into_numpy_array(img)

            payload = {
                "instances": [{input_name: image_np.tolist()}]
            }
            r = requests.post('http://' + host + '/v1/models/' + model_name + ':predict', json=payload)

            # print(r.content)

            j = json.loads(r.content.decode('utf-8'))

            # print(j)

            boxes = j['predictions'][0]['detection_boxes']
            classes = j['predictions'][0]['detection_classes']
            scores = j['predictions'][0]['detection_scores']

            detection = getLabels(boxes, classes, scores, 0.3)

            if detection:
                custom_response = detection[0]
            else:
                custom_response = "algo que no puedo reconocer"

def main():
    parser = argparse.ArgumentParser(
        formatter_class=argparse.RawTextHelpFormatter)
    parser.add_argument('--device-model-id', '--device_model_id', type=str,
                        metavar='DEVICE_MODEL_ID', required=False,
                        help='the device model ID registered with Google')
    parser.add_argument('--project-id', '--project_id', type=str,
                        metavar='PROJECT_ID', required=False,
                        help='the project ID used to register this device')
    parser.add_argument('--device-config', type=str,
                        metavar='DEVICE_CONFIG_FILE',
                        default=os.path.join(
                            os.path.expanduser('~/.config'),
                            'googlesamples-assistant',
                            'device_config_library.json'
                        ),
                        help='path to store and read device configuration')
    parser.add_argument('--credentials', type=existing_file,
                        metavar='OAUTH2_CREDENTIALS_FILE',
                        default=os.path.join(
                            os.path.expanduser('~/.config'),
                            'google-oauthlib-tool',
                            'credentials.json'
                        ),
                        help='path to store and read OAuth2 credentials')
    parser.add_argument('-v', '--version', action='version',
                        version='%(prog)s ' + Assistant.__version_str__())

    args = parser.parse_args()
    with open(args.credentials, 'r') as f:
        credentials = google.oauth2.credentials.Credentials(token=None,
                                                            **json.load(f))

    device_model_id = None
    last_device_id = None
    try:
        with open(args.device_config) as f:
            device_config = json.load(f)
            device_model_id = device_config['model_id']
            last_device_id = device_config.get('last_device_id', None)
    except FileNotFoundError:
        pass

    if not args.device_model_id and not device_model_id:
        raise Exception('Missing --device-model-id option')

    # Re-register if "device_model_id" is given by the user and it differs
    # from what we previously registered with.
    should_register = (
            args.device_model_id and args.device_model_id != device_model_id)

    device_model_id = args.device_model_id or device_model_id

    with Assistant(credentials, device_model_id) as assistant:
        events = assistant.start()

        device_id = assistant.device_id
        print('device_model_id:', device_model_id)
        print('device_id:', device_id + '\n')

        # Re-register if "device_id" is different from the last "device_id":
        if should_register or (device_id != last_device_id):
            if args.project_id:
                register_device(args.project_id, credentials,
                                device_model_id, device_id)
                pathlib.Path(os.path.dirname(args.device_config)).mkdir(
                    exist_ok=True)
                with open(args.device_config, 'w') as f:
                    json.dump({
                        'last_device_id': device_id,
                        'model_id': device_model_id,
                    }, f)
            else:
                print(WARNING_NOT_REGISTERED)

        for event in events:
            process_event(event, assistant)

if __name__ == '__main__':
    main()


text:
import templateUrl from './atomic.jade';

export default ['igniteConfigurationClustersAtomic', [() => {
    return {
        scope: true,
        restrict: 'E',
        templateUrl,
        replace: true
    };
}]];


text:
using System;
using Microsoft.AspNetCore.Mvc;
using MvcTesting.StubApp.Views.Stub;

namespace MvcTesting.StubApp.Controllers
{
    public class StubController : Controller
    {
        [HttpGet]
        public IActionResult SimpleForm()
        {
            var model = new SimpleFormModel
            {
                Id = 123,
                Text = "existing",
            };

            return View(model);
        }

        [HttpPost]
        public IActionResult SimpleForm(SimpleFormModel model)
        {
            if (model.Text == "success")
                return Redirect("~/Stub/Success");
            else
                return View(model.SetError("Please enter 'success'"));
        }

        [HttpGet]
        public IActionResult Success()
        {
            return View();
        }

        public IActionResult Code(int id)
        {
            Response.StatusCode = id;
            return Content(id.ToString());
        }

        public IActionResult ViewRequest()
        {
            var model = new ViewRequestModel
            {
                Method = Request.Method,
                Query = Request.Query,
            };

            return View(model);
        }

        public IActionResult SetCookies()
        {
            Response.Cookies.Append("a", "2");
            Response.Cookies.Append("b", "3");
            return Content("done");
        }

        public IActionResult GetCookies()
        {
            var text = "";

            foreach (var cookie in Request.Cookies)
                text += $"{cookie.Key}={cookie.Value};";

            text = text == "" ? "none" : text.TrimEnd(';');
            return Content(text);
        }

        public IActionResult Throw()
        {
            throw new Exception("thrown from stub");
        }
    }
}


text:
package cn.com.smartdevices.bracelet.chart.base;

import java.util.Comparator;

public class
    implements Comparator
{

    public int compare( ,  1)
    {
        return . - 1.;
    }

    public volatile int compare(Object obj, Object obj1)
    {
        return compare((compare)obj, (compare)obj1);
    }

    public ()
    {
    }
}


text:
FreeSASA uses semantic versioning. Changelog added for versions 2.x

## 2.1.2

- Fix error where CLI options weren't parsed properly on ARM processors.
- Fix error in man pages.

## 2.1.1

- Fix error where compiling without multithread support still set the default number of threads to 2.
- Fix issue when stripping quotes from atom names in CIF-files, which sometimes caused memory errors.

## 2.1.0

The new features in this release were created on initiative by and in collaboration
with [Danny Diaz](https://github.com/danny305).

### Added

- Support for mmCIF input with the CLI option `--cif`.
  - The CLI was ported to C++ to allow using Gemmi for CIF import.
  - Gemmi is imported as a git submodule, see README for details.
  - A test runner was added to verify that CIF and PDB input files
    give the same result.
  - The C API does not support CIF for now (this would require conversion to C++).
- Add output option `--format=cif` that can be used when input is mmCIF.
  See documentation for an example.
- Added VdW-radii for all elements.
  - Using values from Gemmi when missing in paper by Mantina et al.
  - Correct Mg radius from 1.74 to 1.73 Å.

### Fixed

- Fix bug in JSON output where relative SASA for amino acids without sidechan
  were written as `NaN`, which is not valid JSON. These values are now
  simply skipped.
- Fix bug where elements with H or D as second letter, such as CD, were classified
  as hydrogens.
- Change some type definitions to be more C++ friendly.

## 2.0.3

This version separates the Python bindings into a separate
[module](https://github.com/freesasa/freesasa-python).
To be able to release Windows binaries of the python module,
the code has been changed to be C89 compatible where necessary,
with a few macros to allow using `restrict` and `inline` when
compiled with a C99 compiler. There are no changes to the behavior
of the CLI or C API in this release.

## 2.0.2

- Relative SASA values are now calculated using the same reference
  configurations as NACCESS. This means relative SASA values will
  differ slightly from those of previous versions.
- Python bindings compatible with Python 3.
- Man page added
- Bugs fixed:
  - CLI option `--separate-models` now outputs all models in PDB output.
  - On some platforms compilation failed when libxml and/or json-c was
    not present. Now fixed.
  - Some memory allocations were not checked for failure in S&R
    calculations. These are now properly checked, and done more
    seldomly, which should improve performance slightly.
- Residue numbers now include the iCode field for insterted residues
- Compatibility with Microsoft C Compiler:
  - No variable length arrays
  - Some macros and keywords are redefined when necessary
  - Lexer does not depend on header `unistd.h`
  - GNU getline not used, replaced by fgets()

## 2.0.1

- Add function `calcCoord()` to Python interface, wraps C function
  `freesasa_calc_coord()`.
- Expand selection syntax:
  - Allow negative residue numbers `resi \-10` (escaped with
    backslash), and expression such as `resi \-10-\-5+\-3-5`
  - Allow open-ended residue ranges `resi -10`, `resi 10-` and
    combined as `resi -10+15-20+30-`
  - Allow primes in atom names (i.e. `O5'`)
  - Allow selection names to be numbers or start with a number

## 2.0

### Changed

#### General

- Classifier configuration files now have new name field

#### C API

- Classifier interface changed.
  - Pointer is now opaque and classification done via
    `freesasa_classifier_class()` instead of
    `classifier->sasa_class()`.
  - Classifiers only classify polar/apolar/unknown. Arbitrary classes
    no longer allowed.
  - The static classifiers in `freesasa.h` have reference values for
    all residue types, allowing calculation of relative SASA for for
    example RSA output. At the moment no support for defining these
    values in classifier configuration file (TODO?).
  - Interface for classifying using string-value pairs has been
    removed (type `freesasa_strvp` and functions
    `freesasa_result_classifiy()` and `freesasa_strvp_free()`). The
    new tree-interface should be used instead.
- Structure interface changed: A structure is initialized with a
  classifier and the relevant classifier values are stored directly in
  the structure. This assures that the structure and results are
  always analyzed with consistent parameters. One effect is that the
  function `freesasa_calc_structure()` no longer takes the atomic
  radii as an explicit parameters.
- The logging functions `freesasa_log()`, `freesasa_write_result()`,
  `freesasa_write_parameters()`, `freesasa_write_rsa()`,
  `freesasa_write_pdb()`, `freesasa_per_residue()`,
  `freesasa_per_residue_type()` and `freesasa_per_chain()` have been
  removed from the interface. The same functionality can be achieved
  using `freesasa_tree_export()`.

#### CLI

- CLI output format is controlled by the option `-f` or
  `--format`. Options specifying files for specific outpt types have
  been removed, and the separate options controlling output format
  have been deprecated (see below). An option `--deprecated` can be
  used to list these. This has also made the option `-l` or `--no-log`
  obsolete.

### Added

#### General

- New output formats
  - XML using libmxl2 (optional)
  - JSON using JSON-C (optional)
  - RSA (was present already in 1.1, but interface now consolidated)
- To build FreeSASA 2.0 the libraries libxml2 and JSON-C need to be
  installed. These can be disabled by `./configure --disable-json --disable-xml` to build a dependency-free version of the library.

#### C API

- New node interface. Results in tree form can be generated using
  `freesasa_calc_tree()` or `freesasa_tree_init()`. The feature was
  added to facilitate generation of XML and JSON output, but can be
  used directly to analyze results as well. The results of a
  calculation are to now best exported using `freesasa_tree_export()`.

### Fixed

- `structure.c` was refactored, hopefully code is slightly more
  transparent now
- general bug cleaning, some minor memory leaks removed.
- Memory error mocking is now more sophisticated: uses dlsym instead
  of macros, allowing more uniform test structure.

### Deprecated

#### CLI

- options `-B`, `-r`, `-R`, `--rsa` and `-l` are deprecated (use
  `-f` or `--format` instead)

#### C API

- Logging using structure and results now deprecated in favor of
  using tree interface
- Function `freesasa_select_area()` is deprecated


text:
<?php

namespace Google\Service\Dfareporting;

class TargetableRemarketingListsListResponse extends \Google\Collection
{
  protected $collection_key = 'targetableRemarketingLists';
  /**
   * @var string
   */
  public $kind;
  /**
   * @var string
   */
  public $nextPageToken;
  protected $targetableRemarketingListsType = TargetableRemarketingList::class;
  protected $targetableRemarketingListsDataType = 'array';

  /**
   * @param string
   */
  public function setKind($kind)
  {
    $this->kind = $kind;
  }
  /**
   * @return string
   */
  public function getKind()
  {
    return $this->kind;
  }
  /**
   * @param string
   */
  public function setNextPageToken($nextPageToken)
  {
    $this->nextPageToken = $nextPageToken;
  }
  /**
   * @return string
   */
  public function getNextPageToken()
  {
    return $this->nextPageToken;
  }
  /**
   * @param TargetableRemarketingList[]
   */
  public function setTargetableRemarketingLists($targetableRemarketingLists)
  {
    $this->targetableRemarketingLists = $targetableRemarketingLists;
  }
  /**
   * @return TargetableRemarketingList[]
   */
  public function getTargetableRemarketingLists()
  {
    return $this->targetableRemarketingLists;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TargetableRemarketingListsListResponse::class, 'Google_Service_Dfareporting_TargetableRemarketingListsListResponse');


text:
<?php

namespace Intacct\Functions\InventoryControl;

use Intacct\Xml\XMLWriter;
use InvalidArgumentException;

/**
 * Delete an existing item record
 */
class ItemDelete extends AbstractItem
{

    /**
     * Write the function block XML
     *
     * @param XMLWriter $xml
     * @throw InvalidArgumentException
     */
    public function writeXml(XMLWriter &$xml)
    {
        $xml->startElement('function');
        $xml->writeAttribute('controlid', $this->getControlId());

        $xml->startElement('delete_item');

        if (!$this->getItemId()) {
            throw new InvalidArgumentException('Item ID is required for delete');
        }
        $xml->writeAttribute('itemid', $this->getItemId());

        $xml->endElement(); //delete_item

        $xml->endElement(); //function
    }
}


text:
package org.knopflerfish.bundle.eventadmin_test.scenario14;

/**
 * Interface for scenario1 test case
 *
 * @author Magnus Klack
 *
 */
public interface Scenario14 {

}


text: Put on indefinite hold because I found HearthPwn.


text:
var searchData=
[
  ['lightsensor',['LightSensor',['../class_light_sensor.html',1,'']]]
];


text:
'use strict';

var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';

var isPrimitive = require('./helpers/isPrimitive');
var isCallable = require('is-callable');
var isDate = require('is-date-object');
var isSymbol = require('is-symbol');

var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {
	if (typeof O === 'undefined' || O === null) {
		throw new TypeError('Cannot call method on ' + O);
	}
	if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {
		throw new TypeError('hint must be "string" or "number"');
	}
	var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
	var method, result, i;
	for (i = 0; i < methodNames.length; ++i) {
		method = O[methodNames[i]];
		if (isCallable(method)) {
			result = method.call(O);
			if (isPrimitive(result)) {
				return result;
			}
		}
	}
	throw new TypeError('No default value');
};

var GetMethod = function GetMethod(O, P) {
	var func = O[P];
	if (func !== null && typeof func !== 'undefined') {
		if (!isCallable(func)) {
			throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');
		}
		return func;
	}
};

// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive
module.exports = function ToPrimitive(input, PreferredType) {
	if (isPrimitive(input)) {
		return input;
	}
	var hint = 'default';
	if (arguments.length > 1) {
		if (PreferredType === String) {
			hint = 'string';
		} else if (PreferredType === Number) {
			hint = 'number';
		}
	}

	var exoticToPrim;
	if (hasSymbols) {
		if (Symbol.toPrimitive) {
			exoticToPrim = GetMethod(input, Symbol.toPrimitive);
		} else if (isSymbol(input)) {
			exoticToPrim = Symbol.prototype.valueOf;
		}
	}
	if (typeof exoticToPrim !== 'undefined') {
		var result = exoticToPrim.call(input, hint);
		if (isPrimitive(result)) {
			return result;
		}
		throw new TypeError('unable to convert exotic object to primitive');
	}
	if (hint === 'default' && (isDate(input) || isSymbol(input))) {
		hint = 'string';
	}
	return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);
};