text:
<?php
/**
 * Template loading functions.
 *
 * @package WordPress
 * @subpackage Template
 */

/**
 * Retrieve path to a template
 *
 * Used to quickly retrieve the path of a template without including the file
 * extension. It will also check the parent theme, if the file exists, with
 * the use of {@link locate_template()}. Allows for more generic template location
 * without the use of the other get_*_template() functions.
 *
 * @since 1.5.0
 *
 * @param string $type      Filename without extension.
 * @param array  $templates An optional list of template candidates
 * @return string Full path to template file.
 */
function get_query_template( $type, $templates = array() ) {
	$type = preg_replace( '|[^a-z0-9-]+|', '', $type );

	if ( empty( $templates ) )
		$templates = array("{$type}.php");

	$template = locate_template( $templates );

	/**
	 * Filter the path of the queried template by type.
	 *
	 * The dynamic portion of the hook name, `$type`, refers to the filename -- minus the file
	 * extension and any non-alphanumeric characters delimiting words -- of the file to load.
	 * This hook also applies to various types of files loaded as part of the Template Hierarchy.
	 *
	 * Possible values for `$type` include: 'index', '404', 'archive', 'author', 'category', 'tag', 'taxonomy', 'date',
	 * 'home', 'front_page', 'page', 'paged', 'search', 'single', 'singular', and 'attachment'.
	 *
	 * @since 1.5.0
	 *
	 * @param string $template Path to the template. See locate_template().
	 */
	return apply_filters( "{$type}_template", $template );
}

/**
 * Retrieve path of index template in current or parent template.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'index_template'.
 *
 * @since 3.0.0
 *
 * @see get_query_template()
 *
 * @return string Full path to index template file.
 */
function get_index_template() {
	return get_query_template('index');
}

/**
 * Retrieve path of 404 template in current or parent template.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. '404_template'.
 *
 * @since 1.5.0
 *
 * @see get_query_template()
 *
 * @return string Full path to 404 template file.
 */
function get_404_template() {
	return get_query_template('404');
}

/**
 * Retrieve path of archive template in current or parent template.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'archive_template'.
 *
 * @since 1.5.0
 *
 * @see get_query_template()
 *
 * @return string Full path to archive template file.
 */
function get_archive_template() {
	$post_types = array_filter( (array) get_query_var( 'post_type' ) );

	$templates = array();

	if ( count( $post_types ) == 1 ) {
		$post_type = reset( $post_types );
		$templates[] = "archive-{$post_type}.php";
	}
	$templates[] = 'archive.php';

	return get_query_template( 'archive', $templates );
}

/**
 * Retrieve path of post type archive template in current or parent template.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'archive_template'.
 *
 * @since 3.7.0
 *
 * @see get_archive_template()
 *
 * @return string Full path to archive template file.
 */
function get_post_type_archive_template() {
	$post_type = get_query_var( 'post_type' );
	if ( is_array( $post_type ) )
		$post_type = reset( $post_type );

	$obj = get_post_type_object( $post_type );
	if ( ! $obj->has_archive )
		return '';

	return get_archive_template();
}

/**
 * Retrieve path of author template in current or parent template.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'author_template'.
 *
 * @since 1.5.0
 *
 * @see get_query_template()
 *
 * @return string Full path to author template file.
 */
function get_author_template() {
	$author = get_queried_object();

	$templates = array();

	if ( $author instanceof WP_User ) {
		$templates[] = "author-{$author->user_nicename}.php";
		$templates[] = "author-{$author->ID}.php";
	}
	$templates[] = 'author.php';

	return get_query_template( 'author', $templates );
}

/**
 * Retrieve path of category template in current or parent template.
 *
 * Works by first retrieving the current slug, for example 'category-default.php',
 * and then trying category ID, for example 'category-1.php', and will finally fall
 * back to category.php template, if those files don't exist.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'category_template'.
 *
 * @since 1.5.0
 *
 * @see get_query_template()
 *
 * @return string Full path to category template file.
 */
function get_category_template() {
	$category = get_queried_object();

	$templates = array();

	if ( ! empty( $category->slug ) ) {
		$templates[] = "category-{$category->slug}.php";
		$templates[] = "category-{$category->term_id}.php";
	}
	$templates[] = 'category.php';

	return get_query_template( 'category', $templates );
}

/**
 * Retrieve path of tag template in current or parent template.
 *
 * Works by first retrieving the current tag name, for example 'tag-wordpress.php',
 * and then trying tag ID, for example 'tag-1.php', and will finally fall back to
 * tag.php template, if those files don't exist.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'tag_template'.
 *
 * @since 2.3.0
 *
 * @see get_query_template()
 *
 * @return string Full path to tag template file.
 */
function get_tag_template() {
	$tag = get_queried_object();

	$templates = array();

	if ( ! empty( $tag->slug ) ) {
		$templates[] = "tag-{$tag->slug}.php";
		$templates[] = "tag-{$tag->term_id}.php";
	}
	$templates[] = 'tag.php';

	return get_query_template( 'tag', $templates );
}

/**
 * Retrieve path of taxonomy template in current or parent template.
 *
 * Retrieves the taxonomy and term, if term is available. The template is
 * prepended with 'taxonomy-' and followed by both the taxonomy string and
 * the taxonomy string followed by a dash and then followed by the term.
 *
 * The taxonomy and term template is checked and used first, if it exists.
 * Second, just the taxonomy template is checked, and then finally, taxonomy.php
 * template is used. If none of the files exist, then it will fall back on to
 * index.php.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'taxonomy_template'.
 *
 * @since 2.5.0
 *
 * @see get_query_template()
 *
 * @return string Full path to taxonomy template file.
 */
function get_taxonomy_template() {
	$term = get_queried_object();

	$templates = array();

	if ( ! empty( $term->slug ) ) {
		$taxonomy = $term->taxonomy;
		$templates[] = "taxonomy-$taxonomy-{$term->slug}.php";
		$templates[] = "taxonomy-$taxonomy.php";
	}
	$templates[] = 'taxonomy.php';

	return get_query_template( 'taxonomy', $templates );
}

/**
 * Retrieve path of date template in current or parent template.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'date_template'.
 *
 * @since 1.5.0
 *
 * @see get_query_template()
 *
 * @return string Full path to date template file.
 */
function get_date_template() {
	return get_query_template('date');
}

/**
 * Retrieve path of home template in current or parent template.
 *
 * This is the template used for the page containing the blog posts.
 * Attempts to locate 'home.php' first before falling back to 'index.php'.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'home_template'.
 *
 * @since 1.5.0
 *
 * @see get_query_template()
 *
 * @return string Full path to home template file.
 */
function get_home_template() {
	$templates = array( 'home.php', 'index.php' );

	return get_query_template( 'home', $templates );
}

/**
 * Retrieve path of front-page template in current or parent template.
 *
 * Looks for 'front-page.php'. The template path is filterable via the
 * dynamic {@see '$type_template'} hook, e.g. 'frontpage_template'.
 *
 * @since 3.0.0
 *
 * @see get_query_template()
 *
 * @return string Full path to front page template file.
 */
function get_front_page_template() {
	$templates = array('front-page.php');

	return get_query_template( 'front_page', $templates );
}

/**
 * Retrieve path of page template in current or parent template.
 *
 * Will first look for the specifically assigned page template.
 * Then will search for 'page-{slug}.php', followed by 'page-{id}.php',
 * and finally 'page.php'.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'page_template'.
 *
 * @since 1.5.0
 *
 * @see get_query_template()
 *
 * @return string Full path to page template file.
 */
function get_page_template() {
	$id = get_queried_object_id();
	$template = get_page_template_slug();
	$pagename = get_query_var('pagename');

	if ( ! $pagename && $id ) {
		// If a static page is set as the front page, $pagename will not be set. Retrieve it from the queried object
		$post = get_queried_object();
		if ( $post )
			$pagename = $post->post_name;
	}

	$templates = array();
	if ( $template && 0 === validate_file( $template ) )
		$templates[] = $template;
	if ( $pagename )
		$templates[] = "page-$pagename.php";
	if ( $id )
		$templates[] = "page-$id.php";
	$templates[] = 'page.php';

	return get_query_template( 'page', $templates );
}

/**
 * Retrieve path of paged template in current or parent template.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'paged_template'.
 *
 * @since 1.5.0
 *
 * @see get_query_template()
 *
 * @return string Full path to paged template file.
 */
function get_paged_template() {
	return get_query_template('paged');
}

/**
 * Retrieve path of search template in current or parent template.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'search_template'.
 *
 * @since 1.5.0
 *
 * @see get_query_template()
 *
 * @return string Full path to search template file.
 */
function get_search_template() {
	return get_query_template('search');
}

/**
 * Retrieve path of single template in current or parent template.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'single_template'.
 *
 * @since 1.5.0
 * @since 4.4.0 `single-{post_type}-{post_name}.php` was added to the top of the template hierarchy.
 *
 * @see get_query_template()
 *
 * @return string Full path to single template file.
 */
function get_single_template() {
	$object = get_queried_object();

	$templates = array();

	if ( ! empty( $object->post_type ) ) {
		$templates[] = "single-{$object->post_type}-{$object->post_name}.php";
		$templates[] = "single-{$object->post_type}.php";
	}

	$templates[] = "single.php";

	return get_query_template( 'single', $templates );
}

/**
 * Retrieves an embed template path in the current or parent template.
 *
 * By default the WordPress-template is returned.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'embed_template'.
 *
 * @since 4.5.0
 *
 * @see get_query_template()
 *
 * @return string Full path to embed template file.
 */
function get_embed_template() {
	$object = get_queried_object();

	$templates = array();

	if ( ! empty( $object->post_type ) ) {
		$post_format = get_post_format( $object );
		if ( $post_format ) {
			$templates[] = "embed-{$object->post_type}-{$post_format}.php";
		}
		$templates[] = "embed-{$object->post_type}.php";
	}

	$templates[] = "embed.php";

	return get_query_template( 'embed', $templates );
}

/**
 * Retrieves the path of the singular template in current or parent template.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'singular_template'.
 *
 * @since 4.3.0
 *
 * @see get_query_template()
 *
 * @return string Full path to singular template file
 */
function get_singular_template() {
	return get_query_template( 'singular' );
}

/**
 * Retrieve path of attachment template in current or parent template.
 *
 * The attachment path first checks if the first part of the mime type exists.
 * The second check is for the second part of the mime type. The last check is
 * for both types separated by an underscore. If neither are found then the file
 * 'attachment.php' is checked and returned.
 *
 * Some examples for the 'text/plain' mime type are 'text.php', 'plain.php', and
 * finally 'text-plain.php'.
 *
 * The template path is filterable via the dynamic {@see '$type_template'} hook,
 * e.g. 'attachment_template'.
 *
 * @since 2.0.0
 *
 * @see get_query_template()
 *
 * @global array $posts
 *
 * @return string Full path to attachment template file.
 */
function get_attachment_template() {
	$attachment = get_queried_object();

	$templates = array();

	if ( $attachment ) {
		if ( false !== strpos( $attachment->post_mime_type, '/' ) ) {
			list( $type, $subtype ) = explode( '/', $attachment->post_mime_type );
		} else {
			list( $type, $subtype ) = array( $attachment->post_mime_type, '' );
		}

		if ( ! empty( $subtype ) ) {
			$templates[] = "{$type}-{$subtype}.php";
			$templates[] = "{$subtype}.php";
		}
		$templates[] = "{$type}.php";
	}
	$templates[] = 'attachment.php';

	return get_query_template( 'attachment', $templates );
}

/**
 * Retrieve the name of the highest priority template file that exists.
 *
 * Searches in the STYLESHEETPATH before TEMPLATEPATH and wp-includes/theme-compat
 * so that themes which inherit from a parent theme can just overload one file.
 *
 * @since 2.7.0
 *
 * @param string|array $template_names Template file(s) to search for, in order.
 * @param bool         $load           If true the template file will be loaded if it is found.
 * @param bool         $require_once   Whether to require_once or require. Default true. Has no effect if $load is false.
 * @return string The template filename if one is located.
 */
function locate_template($template_names, $load = false, $require_once = true ) {
	$located = '';
	foreach ( (array) $template_names as $template_name ) {
		if ( !$template_name )
			continue;
		if ( file_exists(STYLESHEETPATH . '/' . $template_name)) {
			$located = STYLESHEETPATH . '/' . $template_name;
			break;
		} elseif ( file_exists(TEMPLATEPATH . '/' . $template_name) ) {
			$located = TEMPLATEPATH . '/' . $template_name;
			break;
		} elseif ( file_exists( ABSPATH . WPINC . '/theme-compat/' . $template_name ) ) {
			$located = ABSPATH . WPINC . '/theme-compat/' . $template_name;
			break;
		}
	}

	if ( $load && '' != $located )
		load_template( $located, $require_once );

	return $located;
}

/**
 * Require the template file with WordPress environment.
 *
 * The globals are set up for the template file to ensure that the WordPress
 * environment is available from within the function. The query variables are
 * also available.
 *
 * @since 1.5.0
 *
 * @global array      $posts
 * @global WP_Post    $post
 * @global bool       $wp_did_header
 * @global WP_Query   $wp_query
 * @global WP_Rewrite $wp_rewrite
 * @global wpdb       $wpdb
 * @global string     $wp_version
 * @global WP         $wp
 * @global int        $id
 * @global WP_Comment $comment
 * @global int        $user_ID
 *
 * @param string $_template_file Path to template file.
 * @param bool   $require_once   Whether to require_once or require. Default true.
 */
function load_template( $_template_file, $require_once = true ) {
	global $posts, $post, $wp_did_header, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;

	if ( is_array( $wp_query->query_vars ) ) {
		extract( $wp_query->query_vars, EXTR_SKIP );
	}

	if ( isset( $s ) ) {
		$s = esc_attr( $s );
	}

	if ( $require_once ) {
		require_once( $_template_file );
	} else {
		require( $_template_file );
	}
}


text:
@interface PodsDummy_Pods_FloatingHintTextField_Tests : NSObject
@end
@implementation PodsDummy_Pods_FloatingHintTextField_Tests
@end

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.grnrt.epuml</groupId>
    <artifactId>app</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.2.2.RELEASE</version>
    </parent>
    <properties>
        <docker.image.prefix>epuml</docker.image.prefix>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>bootstrap</artifactId>
            <version>3.3.2</version>
        </dependency>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>jquery</artifactId>
            <version>2.1.1</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>15.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.3.2</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.plantuml</groupId>
            <artifactId>plantuml</artifactId>
            <version>8004</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>1.2.2.RELEASE</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.2.3</version>
                <configuration>
                    <imageName>${docker.image.prefix}/${project.artifactId}</imageName>
                    <dockerDirectory>src/main/docker</dockerDirectory>
                    <resources>
                        <resource>
                            <targetPath>/</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.jar</include>
                        </resource>
                    </resources>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>


text:
package gui;

import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SpringLayout;

import utilities.Crypto;
import utilities.FileHandler;

public class DecryptionWindow {

	JFrame frmDecryptMessage;
	private String password;
	private FileHandler fileHandler;

	/**
	 * Create the application.
	 */
	public DecryptionWindow(String password, FileHandler fileHandler) {
		this.password = password;
		this.fileHandler = fileHandler;
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frmDecryptMessage = new JFrame();
		frmDecryptMessage.setResizable(false);
		frmDecryptMessage.setTitle("Hidden Message");
		frmDecryptMessage.setBounds(100, 100, 330, 290);
		frmDecryptMessage.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		SpringLayout springLayout = new SpringLayout();
		frmDecryptMessage.getContentPane().setLayout(springLayout);

		JLabel lblMessage = new JLabel("Message:");
		springLayout.putConstraint(SpringLayout.NORTH, lblMessage, 10, SpringLayout.NORTH, frmDecryptMessage.getContentPane());
		springLayout.putConstraint(SpringLayout.WEST, lblMessage, 10, SpringLayout.WEST, frmDecryptMessage.getContentPane());
		frmDecryptMessage.getContentPane().add(lblMessage);

		JScrollPane scrollPane = new JScrollPane();
		springLayout.putConstraint(SpringLayout.NORTH, scrollPane, 6, SpringLayout.SOUTH, lblMessage);
		springLayout.putConstraint(SpringLayout.WEST, scrollPane, 10, SpringLayout.WEST, frmDecryptMessage.getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, scrollPane, 126, SpringLayout.SOUTH, lblMessage);
		springLayout.putConstraint(SpringLayout.EAST, scrollPane, -10, SpringLayout.EAST, frmDecryptMessage.getContentPane());
		frmDecryptMessage.getContentPane().add(scrollPane);

		JTextArea textArea = new JTextArea();
		scrollPane.setViewportView(textArea);

		JButton btnOk = new JButton("OK");
		frmDecryptMessage.getContentPane().add(btnOk);

		JButton btnCancel = new JButton("Cancel");
		springLayout.putConstraint(SpringLayout.WEST, btnCancel, 152, SpringLayout.WEST, frmDecryptMessage.getContentPane());
		springLayout.putConstraint(SpringLayout.NORTH, btnOk, 0, SpringLayout.NORTH, btnCancel);
		springLayout.putConstraint(SpringLayout.EAST, btnOk, -6, SpringLayout.WEST, btnCancel);
		frmDecryptMessage.getContentPane().add(btnCancel);

		JComboBox<String> comboBox = new JComboBox<String>();
		springLayout.putConstraint(SpringLayout.NORTH, btnCancel, 6, SpringLayout.SOUTH, comboBox);
		springLayout.putConstraint(SpringLayout.WEST, comboBox, 10, SpringLayout.WEST, frmDecryptMessage.getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, comboBox, 0, SpringLayout.EAST, scrollPane);
		comboBox.setToolTipText("Select operation");
		frmDecryptMessage.getContentPane().add(comboBox);
		comboBox.addItem("Save message to file");
		comboBox.addItem("Remove message from file");

		JLabel lblOperation = new JLabel("What do you want to do with message:");
		springLayout.putConstraint(SpringLayout.NORTH, comboBox, 6, SpringLayout.SOUTH, lblOperation);
		springLayout.putConstraint(SpringLayout.NORTH, lblOperation, 6, SpringLayout.SOUTH, scrollPane);
		springLayout.putConstraint(SpringLayout.WEST, lblOperation, 0, SpringLayout.WEST, lblMessage);
		frmDecryptMessage.getContentPane().add(lblOperation);

		byte[] encryptedData;
		String message = "";
		try {
			encryptedData = fileHandler.extractMessage();
			message = new String(Crypto.decrypt(password, encryptedData));
		} catch (IOException e) {
			JOptionPane.showMessageDialog(null,
				    "IOException has ocurred",
				    "FAIL",
				    JOptionPane.WARNING_MESSAGE);
		} catch (NullPointerException e) {
			JOptionPane.showMessageDialog(null,
				    "Did you insert the correct password?",
				    "FAIL",
				    JOptionPane.WARNING_MESSAGE);
		}
		textArea.setText(message);

		//Action listeners
		btnOk.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				int selection = comboBox.getSelectedIndex();
				switch (selection) {
					case 0:		// Save message to file
						JFileChooser fileChooser = new JFileChooser();
						fileChooser.setDialogTitle("Specify a file to save");
						int userSelection = fileChooser.showSaveDialog(null);
						if (userSelection == JFileChooser.APPROVE_OPTION) {
							try {
						    File fileToSave = fileChooser.getSelectedFile();
						    FileWriter fileWritter = new FileWriter(fileToSave.getAbsolutePath());
						    BufferedWriter bufferedWritter = new BufferedWriter(fileWritter);
						    bufferedWritter.write(textArea.getText());
						    bufferedWritter.close();
							JOptionPane.showMessageDialog(null,
								    "File saved.",
								    "Done",
								    JOptionPane.INFORMATION_MESSAGE);
							frmDecryptMessage.dispose();
							} catch (IOException ex) {
								ex.printStackTrace();
							}
						}
						break;
					case 1:		// Remove message from file
					try {
						fileHandler.removeMessage();
						JOptionPane.showMessageDialog(null,
							    "Removed message from image.",
							    "Done",
							    JOptionPane.INFORMATION_MESSAGE);
						frmDecryptMessage.dispose();
					} catch (IOException e1) {
						e1.printStackTrace();
					}
						break;
					default:
						break;
				}
			}
		});

		btnCancel.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				frmDecryptMessage.dispose();
			}
		});
		centerFrame();
	}

	private void centerFrame() {
        Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension window = frmDecryptMessage.getSize();
        frmDecryptMessage.setLocation((screen.width - window.width) / 2, (screen.height - window.height) / 2);
	}
}


text:
{
    'name': 'Notes',
    'version': '1.0',
    'category': 'Tools',
    'description': """
This module allows users to create their own notes inside OpenERP
=================================================================

Use notes to write meeting minutes, organize ideas, organize personal todo
lists, etc. Each user manages his own personal Notes. Notes are available to
their authors only, but they can share notes to others users so that several
people can work on the same note in real time. It's very efficient to share
meeting minutes.

Notes can be found in the 'Home' menu.
""",
    'author': 'OpenERP SA',
    'website': 'http://openerp.com',
    'summary': 'Sticky notes, Collaborative, Memos',
    'sequence': 9,
    'depends': [
        'mail',
    ],
    'data': [
        'security/note_security.xml',
        'security/ir.rule.xml',
        'security/ir.model.access.csv',
        'note_data.xml',
        'note_view.xml',
    ],
    'demo': [
        'note_demo.xml',
    ],
    'test': [
    ],
    'css': [
        'static/src/css/note.css',
    ],
    'images': [
        'images/note_kanban.jpeg',
        'images/note.jpeg',
        'images/categories_tree.jpeg'
    ],
    'installable': True,
    'application': True,
    'auto_install': False,
}

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:


text:
DROP TABLE IF EXISTS pivoted_lab CASCADE;
CREATE TABLE pivoted_lab as
-- remove duplicate labs if they exist at the same time
with vw0 as
(
  select
      patientunitstayid
    , labname
    , labresultoffset
    , labresultrevisedoffset
  from lab
  where labname in
  (
      'albumin'
    , 'total bilirubin'
    , 'BUN'
    , 'calcium'
    , 'chloride'
    , 'creatinine'
    , 'bedside glucose', 'glucose'
    , 'bicarbonate' -- HCO3
    , 'Total CO2'
    , 'Hct'
    , 'Hgb'
    , 'PT - INR'
    , 'PTT'
    , 'lactate'
    , 'platelets x 1000'
    , 'potassium'
    , 'sodium'
    , 'WBC x 1000'
    , '-bands'
    -- Liver enzymes
    , 'ALT (SGPT)'
    , 'AST (SGOT)'
    , 'alkaline phos.'
  )
  group by patientunitstayid, labname, labresultoffset, labresultrevisedoffset
  having count(distinct labresult)<=1
)
-- get the last lab to be revised
, vw1 as
(
  select
      lab.patientunitstayid
    , lab.labname
    , lab.labresultoffset
    , lab.labresultrevisedoffset
    , lab.labresult
    , ROW_NUMBER() OVER
        (
          PARTITION BY lab.patientunitstayid, lab.labname, lab.labresultoffset
          ORDER BY lab.labresultrevisedoffset DESC
        ) as rn
  from lab
  inner join vw0
    ON  lab.patientunitstayid = vw0.patientunitstayid
    AND lab.labname = vw0.labname
    AND lab.labresultoffset = vw0.labresultoffset
    AND lab.labresultrevisedoffset = vw0.labresultrevisedoffset
  -- only valid lab values
  WHERE
       (lab.labname = 'albumin' and lab.labresult >= 0.5 and lab.labresult <= 6.5)
    OR (lab.labname = 'total bilirubin' and lab.labresult >= 0.2 and lab.labresult <= 70.175)
    OR (lab.labname = 'BUN' and lab.labresult >= 1 and lab.labresult <= 280)
    OR (lab.labname = 'calcium' and lab.labresult > 0 and lab.labresult <= 9999)
    OR (lab.labname = 'chloride' and lab.labresult > 0 and lab.labresult <= 9999)
    OR (lab.labname = 'creatinine' and lab.labresult >= 0.1 and lab.labresult <= 28.28)
    OR (lab.labname in ('bedside glucose', 'glucose') and lab.labresult >= 25 and lab.labresult <= 1500)
    OR (lab.labname = 'bicarbonate' and lab.labresult >= 0 and lab.labresult <= 9999)
    OR (lab.labname = 'Total CO2' and lab.labresult >= 0 and lab.labresult <= 9999)
    -- will convert hct unit to fraction later
    OR (lab.labname = 'Hct' and lab.labresult >= 5 and lab.labresult <= 75)
    OR (lab.labname = 'Hgb' and lab.labresult >  0 and lab.labresult <= 9999)
    OR (lab.labname = 'PT - INR' and lab.labresult >= 0.5 and lab.labresult <= 15)
    OR (lab.labname = 'lactate' and lab.labresult >= 0.1 and lab.labresult <= 30)
    OR (lab.labname = 'platelets x 1000' and lab.labresult >  0 and lab.labresult <= 9999)
    OR (lab.labname = 'potassium' and lab.labresult >= 0.05 and lab.labresult <= 12)
    OR (lab.labname = 'PTT' and lab.labresult >  0 and lab.labresult <= 500)
    OR (lab.labname = 'sodium' and lab.labresult >= 90 and lab.labresult <= 215)
    OR (lab.labname = 'WBC x 1000' and lab.labresult > 0 and lab.labresult <= 100)
    OR (lab.labname = '-bands' and lab.labresult >= 0 and lab.labresult <= 100)
    OR (lab.labname = 'ALT (SGPT)' and lab.labresult > 0)
    OR (lab.labname = 'AST (SGOT)' and lab.labresult > 0)
    OR (lab.labname = 'alkaline phos.' and lab.labresult > 0)
)
select
    patientunitstayid
  , labresultoffset as chartoffset
  , MAX(case when labname = 'albumin' then labresult else null end) as albumin
  , MAX(case when labname = 'total bilirubin' then labresult else null end) as bilirubin
  , MAX(case when labname = 'BUN' then labresult else null end) as BUN
  , MAX(case when labname = 'calcium' then labresult else null end) as calcium
  , MAX(case when labname = 'chloride' then labresult else null end) as chloride
  , MAX(case when labname = 'creatinine' then labresult else null end) as creatinine
  , MAX(case when labname in ('bedside glucose', 'glucose') then labresult else null end) as glucose
  , MAX(case when labname = 'bicarbonate' then labresult else null end) as bicarbonate
  , MAX(case when labname = 'Total CO2' then labresult else null end) as TotalCO2
  , MAX(case when labname = 'Hct' then labresult else null end) as hematocrit
  , MAX(case when labname = 'Hgb' then labresult else null end) as hemoglobin
  , MAX(case when labname = 'PT - INR' then labresult else null end) as INR
  , MAX(case when labname = 'lactate' then labresult else null end) as lactate
  , MAX(case when labname = 'platelets x 1000' then labresult else null end) as platelets
  , MAX(case when labname = 'potassium' then labresult else null end) as potassium
  , MAX(case when labname = 'PTT' then labresult else null end) as ptt
  , MAX(case when labname = 'sodium' then labresult else null end) as sodium
  , MAX(case when labname = 'WBC x 1000' then labresult else null end) as wbc
  , MAX(case when labname = '-bands' then labresult else null end) as bands
  , MAX(case when labname = 'ALT (SGPT)' then labresult else null end) as alt
  , MAX(case when labname = 'AST (SGOT)' then labresult else null end) as ast
  , MAX(case when labname = 'alkaline phos.' then labresult else null end) as alp
from vw1
where rn = 1
group by patientunitstayid, labresultoffset
order by patientunitstayid, labresultoffset;


text:
from __future__ import unicode_literals

from django.db import models, migrations

class Migration(migrations.Migration):

    dependencies = [
        ('equipment', '0003_auto_20160906_0833'),
    ]

    operations = [
        migrations.AddField(
            model_name='equipmentreservation',
            name='reservation_details',
            field=models.TextField(blank=True, null=True),
        ),
    ]


text:
module Rubinius
  module AST
    class Evaluator
      attr_accessor :self

      def initialize(generator, names, arguments)
        @self = generator
        @locals = {}

        names.each_with_index do |name, index|
          set_local name, arguments[index]
        end
      end

      def execute(node)
        node.execute self
      end

      def get_local(name)
        @locals[name]
      end

      def set_local(name, value)
        @locals[name] = value
      end
    end

    class Container
      def execute(e)
        @body.execute(e)
        return true
      end
    end

    class TrueLiteral
      def execute(e)
        true
      end
    end

    class FalseLiteral
      def execute(e)
        false
      end
    end

    class NilLiteral
      def execute(e)
        nil
      end
    end

    class Self
      def execute(e)
        e.self
      end
    end

    class And
      def execute(e)
        @left.execute(e) and @right.execute(e)
      end
    end

    class Or
      def execute(e)
        @left.execute(e) or @right.execute(e)
      end
    end

    class Not
      def execute(e)
        not @child.execute(e)
      end
    end

    class Negate
      def execute(e)
        -@child.execute(e)
      end
    end

    class NumberLiteral
      def execute(e)
        @value
      end
    end

    class Literal
      def execute(e)
        @value
      end
    end

    class RegexLiteral
      def execute(e)
        ::Regexp.new(@source, @options)
      end
    end

    class StringLiteral
      def execute(e)
        @string.dup
      end
    end

    class DynamicString
      def execute(e)
        str = @string.dup
        @body.each do |x|
          str << x.execute(e)
        end

        str
      end
    end

    class DynamicRegex
      def execute(e)
        ::Regexp.new super(e)
      end
    end

    class DynamicOnceRegex
      def execute(e)
        @value ||= super(e)
      end
    end

    class If
      def execute(e)
        if @condition.execute(e)
          @then.execute(e) if @then
        else
          @else.execute(e) if @else
        end
      end
    end

    class While
      def execute(e)
        if @check_first
          while @condition.execute(e)
            @body.execute(e)
          end
        else
          begin
            @body.execute(e)
          end while @condition.execute(e)
        end
      end
    end

    class Until
      def execute(e)
        if @check_first
          until @condition.execute(e)
            @body.execute(e)
          end
        else
          begin
            @body.execute(e)
          end until @condition.execute(e)
        end
      end
    end

    class Block
      def execute(e)
        val = nil
        @array.each do |x|
          val = x.execute(e)
        end

        return val
      end
    end

    class LocalVariableAccess
      def execute(e)
        e.get_local @name
      end
    end

    class LocalVariableAssignment
      def execute(e)
        e.set_local @name, @value.execute(e)
      end
    end

    class ArrayLiteral
      def execute(e)
        @body.map { |x| x.execute(e) }
      end
    end

    class EmptyArray
      def execute(e)
        []
      end
    end

    class HashLiteral
      def execute(e)
        args = @array.map { |x| x.execute(e) }
        Hash[*args]
      end
    end

    class SymbolLiteral
      def execute(e)
        @value
      end
    end

    class InstanceVariableAccess
      def execute(e)
        e.self.instance_variable_get @name
      end
    end

    class InstanceVariableAssignment
      def execute(e)
        e.self.instance_variable_set @name, @value.execute(e)
      end
    end

    class GlobalVariableAccess
      def execute(e)
        ::Rubinius::Globals[@name]
      end
    end

    class GlobalVariableAssignment
      def execute(e)
        ::Rubinius::Globals[@name] = @value.execute(e)
      end
    end

    class ConstantAccess
      def execute(e)
        Object.const_get @name
      end
    end

    class ScopedConstant
      def execute(e)
        parent = @parent.execute(e)
        parent.const_get @name
      end
    end

    class ToplevelConstant
      def execute(e)
        Object.const_get @name
      end
    end

    class Send
      def execute_receiver(e)
        if @receiver.kind_of? Self
          e.self
        else
          @receiver.execute(e)
        end
      end

      def execute(e)
        receiver = execute_receiver(e)

        receiver.__send__ @name
      end
    end

    class SendWithArguments
      def execute(e)
        arguments = @arguments.execute(e)
        receiver = execute_receiver(e)

        receiver.__send__ @name, *arguments
      end
    end

    class ActualArguments
      def execute(e)
        array = @array.map { |x| x.execute(e) }
        array << @splat.execute if @splat.kind_of? SplatValue
        array
      end
    end

    class Yield
      def execute(e)
        # TODO
        e.block.call(*@arguments.execute(e))
      end
    end

    class ExecuteString
      def execute(e)
        `#{@string.execute(e)}`
      end
    end

    class ToString
      def execute(e)
        @child.execute(e).to_s
      end
    end

    class DynamicExecuteString
      def execute(e)
        `#{super(e)}`
      end
    end
  end
end


text:
{{extend 'layout.html'}}

{{include 'oeemenubar.html'}}

            Download Article/Order import template:

            Upload Article/Order template:

            {{=form}}

            {{=formupload}}


text:
using System.IO;
using System.Linq;
using PatchKit.Unity.Patcher.AppData;
using PatchKit.Unity.Patcher.AppData.FileSystem;
using PatchKit.Unity.Patcher.AppData.Local;
using PatchKit.Unity.Patcher.AppUpdater.Status;
using PatchKit.Unity.Patcher.Cancellation;
using PatchKit.Unity.Patcher.Debug;

namespace PatchKit.Unity.Patcher.AppUpdater.Commands
{
    public class UninstallCommand : BaseAppUpdaterCommand, IUninstallCommand
    {
        private static readonly DebugLogger DebugLogger = new DebugLogger(typeof(UninstallCommand));

        private readonly ILocalDirectory _localData;
        private readonly ILocalMetaData _localMetaData;

        private OperationStatus _statusReporter;

        public UninstallCommand(ILocalDirectory localData, ILocalMetaData localMetaData)
        {
            Checks.ArgumentNotNull(localData, "localData");
            Checks.ArgumentNotNull(localMetaData, "localMetaData");

            DebugLogger.LogConstructor();

            _localData = localData;
            _localMetaData = localMetaData;
        }

        public override void Prepare(UpdaterStatus status, CancellationToken cancellationToken)
        {
            base.Prepare(status, cancellationToken);

            Checks.ArgumentNotNull(status, "statusMonitor");

            DebugLogger.Log("Preparing uninstallation.");

            _localData.PrepareForWriting();

            _statusReporter = new OperationStatus
            {
                Weight = {Value = StatusWeightHelper.GetUninstallWeight()}
            };
            status.RegisterOperation(_statusReporter);
        }

        public override void Execute(CancellationToken cancellationToken)
        {
            base.Execute(cancellationToken);

            DebugLogger.Log("Uninstalling.");

            var entries = _localMetaData.GetRegisteredEntries();

            var files = entries.Where(s => !s.EndsWith("/")).ToArray();
            // TODO: Uncomment this after fixing directory registration in install content command
            //var directories = entries.Where(s => s.EndsWith("/"));

            int counter = 0;

            _statusReporter.IsActive.Value = true;
            _statusReporter.Description.Value = "Uninstalling...";

            foreach (var fileName in files)
            {
                cancellationToken.ThrowIfCancellationRequested();

                var filePath = _localData.Path.PathCombine(fileName);

                if (File.Exists(filePath))
                {
                    FileOperations.Delete(filePath, cancellationToken);
                }

                _localMetaData.UnregisterEntry(fileName);

                counter++;
                _statusReporter.Progress.Value = counter / (double) entries.Length;
                _statusReporter.Description.Value = string.Format("Uninstalling ({0}/{1})...", counter, entries.Length);
            }

            // TODO: Delete this after fixing directory registration in install content command
            // Temporary solution for deleting directories during uninstallation.
            foreach (var fileName in files)
            {
                cancellationToken.ThrowIfCancellationRequested();

                string parentDirName = fileName;

                do
                {
                    parentDirName = Path.GetDirectoryName(parentDirName);

                    var parentDirPath = _localData.Path.PathCombine(parentDirName);

                    if (Directory.Exists(parentDirPath))
                    {
                        if (DirectoryOperations.IsDirectoryEmpty(parentDirPath))
                        {
                            DirectoryOperations.Delete(parentDirPath, cancellationToken, false);
                        }
                        else
                        {
                            break;
                        }
                    }
                } while (parentDirName != null);
            }

            // TODO: Uncomment this after fixing directory registration in install content command
            /*
            foreach (var dirName in directories)
            {
                cancellationToken.ThrowIfCancellationRequested();

                var dirPath = _localData.Path.PathCombine(dirName);

                if (Directory.Exists(dirPath) && DirectoryOperations.IsDirectoryEmpty(dirPath))
                {
                    DirectoryOperations.Delete(dirPath, false);
                }

                _localMetaData.UnregisterEntry(dirName);

                counter++;
                _statusReporter.OnProgressChanged(counter / (double)entries.Length);
            }*/

            _statusReporter.Progress.Value = 1.0;
            _statusReporter.IsActive.Value = false;
        }
    }
}


text:
import React, { Component } from 'react';
// MATERIAL
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import TextField from 'material-ui/TextField';
import RaisedButton from 'material-ui/RaisedButton';
// Components
import EditAvatar from './EditAvatar';

class EditKeymapModal extends Component {

  constructor() {
    super();
    this.state = {
      open: true,
      openIconModal: false,
      name: '',
      command: '',
      keyID: '',
      iconClass: '',
      waitingInput: false,
    };
    this.handleChangeName     = this.handleChangeName.bind(this);
    this.handleChangeCommand  = this.handleChangeCommand.bind(this);
    this.handleSubmit         = this.handleSubmit.bind(this);
    this.handleDelete         = this.handleDelete.bind(this);
    this.handleBindMidiKey    = this.handleBindMidiKey.bind(this);
    this.handleError          = this.handleError.bind(this);
    this.handleOpenIconModal  = this.handleOpenIconModal.bind(this);
    this.handleCloseIconModal = this.handleCloseIconModal.bind(this);
    this.handleChangeIcon     = this.handleChangeIcon.bind(this);
  }

  componentWillMount() {
    if (this.props.action === 'edit') {
      this.setState({
        name: this.props.keymap.name,
        command: this.props.keymap.command,
        iconClass: this.props.keymap.iconClass,
        keyID: this.props.keymap.keyID,
      });
    }
  }

  componentDidMount() {
    this.props.stopExecuteBindings();
  }

  componentWillUnmount() {
    this.props.startExecuteBindings();
  }

  componentWillReceiveProps(nextProps) {
    this.handleMidiEvent(nextProps);
  }

  handleMidiEvent(nextProps) {
    if (this.state.waitingInput &&
      nextProps.events[nextProps.events.length-1].action === 'keyUp') {

      const redundancyKeymaps = this.props.keymaps.filter((keymap) => {
        return(keymap.keyID === nextProps.events[nextProps.events.length-1].key);
      }).length;

      if (redundancyKeymaps === 0) {
        this.setState({
          waitingInput: false,
          keyID: nextProps.events[nextProps.events.length-1].key
        });
        this.props.stopListeningEvents();
      }
      else {
        this.handleError('This key is already used.')
      }
    }
  }

  handleBindMidiKey() {
    this.props.startListeningEvents();
    this.setState({
      waitingInput: true,
      keyID: ''
    });
  }

  handleChangeName(event) {
    this.setState({
      name: event.target.value,
    });
  };

  handleChangeCommand(event) {
    this.setState({
      command: event.target.value,
    });
  };

  handleChangeIcon(icon) {
    this.setState({
      iconClass: icon,
      openIconModal: false
    });
  }

  handleError(error) {
    console.log(error);
  }

  handleDelete() {
    this.props.removeKeymap(this.props.index);
    this.props.closeDialog();
  };

  handleSubmit() {
    const newKeymap = {
      name: this.state.name,
      command: this.state.command,
      iconClass: this.state.iconClass,
      keyID: this.state.keyID
    };
    this.props.action === 'edit' && this.props.index && this.props.editKeymap(this.props.index, newKeymap);
    this.props.action === 'add' && this.props.addKeymap(newKeymap);
    this.props.closeDialog();
  };

  handleOpenIconModal() {
    this.setState({
      openIconModal: true
    })
  }

  handleCloseIconModal() {
    this.setState({
      openIconModal: false
    })
  }

  render() {

    // If all the form are filled => true
    const formFilled = !(
      this.state.name.length > 2 &&
      this.state.command.length > 2 &&
      this.state.keyID !== null
    );

    // Assigning text depending on the action
    let titleText;
    let principalButtonText;

    if (this.props.action === 'add') {
      titleText = 'Add a new keymap';
      principalButtonText = 'Add';
    }
    if (this.props.action === 'edit') {
      titleText = 'Edit keymap';
      principalButtonText = 'Save';
    }

    // Changing text on the binding midi button
    const labelBindingKeyButton = () => {
      if (this.state.keyID === '' && !this.state.waitingInput) return 'Bind MIDI Key';
      if (this.state.keyID !== '' && !this.state.waitingInput) return 'Key : '+ this.state.keyID;
      if (this.state.waitingInput) return 'Press the key to assign...';
    };

    const actions = [
      <FlatButton
        label="Delete"
        style={{float: 'left'}}
        secondary={true}
        onTouchTap={this.handleDelete}
      />,
      <FlatButton
        label="Cancel"
        onTouchTap={this.props.closeDialog}
      />,
      <FlatButton
        label={principalButtonText}
        primary={true}
        disabled={formFilled}
        onTouchTap={this.handleSubmit}
      />,
    ];

    return (
      <div>
        <Dialog
          title={titleText}
          actions={actions}
          modal={true}
          open={this.state.open}
        >
          <EditAvatar
            iconClass={this.state.iconClass}
            open={this.state.openIconModal}
            handleChangeIcon={this.handleChangeIcon}
            requestOpen={this.handleOpenIconModal}
            requestClose={this.handleCloseIconModal}
          />
          <TextField
            floatingLabelText="Name"
            value={this.state.name}
            onChange={this.handleChangeName}
            style={{width: '100%'}}
          />
          <TextField
            floatingLabelText="Command"
            value={this.state.command}
            onChange={this.handleChangeCommand}
            style={{width: '100%'}}
          />
          <RaisedButton
            label={labelBindingKeyButton()}
            labelPosition="before"
            containerElement="label"
            onTouchTap={this.handleBindMidiKey}
            disableTouchRipple
            style={{
              marginTop: '1em'
            }}
          />
        </Dialog>
      </div>
    );
  }
}
export default EditKeymapModal;


text:
package org.fest.swing.finder;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.fest.assertions.Assertions.assertThat;
import static org.fest.swing.query.ComponentShowingQuery.isShowing;

import javax.annotation.Nonnull;
import javax.swing.JFrame;

import org.fest.swing.core.GenericTypeMatcher;
import org.fest.swing.exception.WaitTimedOutError;
import org.fest.swing.fixture.FrameFixture;
import org.fest.swing.test.swing.WindowLauncher.WindowToLaunch;
import org.junit.Test;

/**
 * Tests for {@link WindowFinder#findFrame(org.fest.swing.core.GenericTypeMatcher)}.
 *
 * @author Alex Ruiz
 */
public class WindowFinder_findFrame_withMatcher_Test extends WindowFinder_TestCase {
  private MyMatcher matcher;

  @Override
  void extraSetUp() {
    matcher = new MyMatcher();
  }

  @Test
  public void should_find_Frame() {
    clickLaunchFrameButton();
    FrameFixture found = WindowFinder.findFrame(matcher).using(robot);
    assertThat(found.target()).isInstanceOf(WindowToLaunch.class);
  }

  @Test
  public void should_find_Frame_before_given_timeout_expires() {
    clickLaunchFrameButton();
    FrameFixture found = WindowFinder.findFrame(matcher).withTimeout(500, MILLISECONDS).using(robot);
    assertThat(found.target()).isInstanceOf(WindowToLaunch.class);
  }

  @Test
  public void should_find_Frame_before_given_timeout_in_ms_expires() {
    clickLaunchFrameButton();
    FrameFixture found = WindowFinder.findFrame(matcher).withTimeout(500).using(robot);
    assertThat(found.target()).isInstanceOf(WindowToLaunch.class);
  }

  @Test(expected = WaitTimedOutError.class)
  public void should_fail_if_Frame_not_found() {
    WindowFinder.findFrame(matcher).using(robot);
  }

  private static class MyMatcher extends GenericTypeMatcher<JFrame> {
    private MyMatcher() {
      super(JFrame.class);
    }

    @Override
    protected boolean isMatching(@Nonnull JFrame frame) {
      return "frame".equals(frame.getName()) && isShowing(frame);
    }
  }
}


text:
#ifndef MANAGER_HPP
#define MANAGER_HPP

#include <MinoES/EntityDispatcher.hpp>

namespace MinoES
{
    class Manager : public EntityDispatcher
    {

        public:
            void addEntity(Entity* entity);

        private:

    };
}

#endif /* MANAGER_HPP */


text:
using Serenity.Services;
using System;
using System.Collections.Generic;

namespace Serenity.Data
{
    /// <summary>
    ///   Contains static extension methods for DbField and Meta objects.</summary>
    public static class ServiceRequestExtensions
    {
        public static TRequest IncludeField<TRequest>(this TRequest request, Field field)
            where TRequest : ServiceRequest, IIncludeExcludeColumns
        {
            request.IncludeColumns = request.IncludeColumns ?? new HashSet<string>(StringComparer.OrdinalIgnoreCase);
            request.IncludeColumns.Add(field.PropertyName ?? field.Name);
            return request;
        }
    }
}


text:
from pathlib import Path

import pytest

import peeringdb
from peeringdb.util import client_load

SQL_COUNT_ROWS = "select count(*) from peeringdb_facility"

CONFIG = {
    "orm": {
        "backend": "django_peeringdb",
        "database": {
            "engine": "sqlite3",
            "host": "",
            "name": ":memory:",
            "password": "",
            "port": 0,
            "user": "",
        },
        "secret_key": "",
        "migrate": True,
    },
    "sync": {
        "url": "https://test.peeringdb.com/api",
        "user": "",
        "password": "",
        "only": [],
        "strip_tz": 1,
        "timeout": 0,
    },
}

_DATA_PATH = None

def set_data_path(path, *parts):
    if not isinstance(path, Path):
        path = Path(path)
    assert path.exists(), path

    path = path.resolve()
    if not path.is_dir():
        path = path.parent
    path = path.resolve() / Path(*parts)
    global _DATA_PATH
    _DATA_PATH = path.absolute()

set_data_path(__file__, "../data")

def data_path():
    if _DATA_PATH is None:
        raise RuntimeError("data path not set")
    return _DATA_PATH

def reset_data(dumppath=None):
    from django.db import connection  # FIXME django-specific

    # Make sure db is empty
    client = peeringdb.client.Client(CONFIG)
    client.backend.delete_all()

    if dumppath is None:
        print("Resetting database to empty")
        return

    path = data_path() / dumppath
    assert path.is_dir(), path
    print("Resetting database from", path)

    client_load(client, path)

# Fixture factory
def client_fixture(filename, scope="function"):
    def func():
        reset_data(filename)
        return peeringdb.client.Client(CONFIG)

    return pytest.fixture(scope=scope)(func)


text:
/*
 * layer3.c
 *
 *  Created on: Jan 31, 2014
 *      Author: nathan
 *
 *  PROTOCOL: [DATA CHUNKS]... [SHORT DATA CHUNK]
 *  Writes data as a series of length 16 chunks followed by a length 0-15 chunk
 *
 */

#include <string.h>
#include "layers.h"

static inline int min(int a, int b) { return a < b ? a : b; }

int layer3_write(char* msg, int len)
{
	INIT_ERROR();

	//Total number on unwritten bytes
	int bytes_remaining = len;

	//ptr to the next chunk
	char* msg_seek = msg;

	//Keep sending chunks until a short one is sent
	int bytes_to_write;
	do
	{
		//How many bytes in this chunk
		bytes_to_write = min(MAX_CHUNK_SIZE, bytes_remaining);

		//Write the chunk
		CHECK_LAYER_ERROR(layer2_write(msg_seek, bytes_to_write));

		//Update counters
		msg_seek += bytes_to_write;
		bytes_remaining -= bytes_to_write;
	} while(bytes_to_write == MAX_CHUNK_SIZE);

	return len;
}

int layer3_read(char* msg, int max)
{
	INIT_ERROR();

	//Total number of bytes before we go over max
	int bytes_remaining = max;

	//ptr to where the next chunk will be written
	char* msg_seek = msg;

	/*
	 * Note: an old implementation of layer3_read used buffering to read the
	 * whole message, even if max was too small. Decided to not bother.
	 */

	//Keep reading until a short chunk is read
	int bytes_read;
	do
	{
		//Read the chunk into the client array
		//If the size of the chunk is < bytes_remaining, permafail.
		CHECK_LAYER_ERROR(bytes_read = layer2_read(msg_seek, bytes_remaining));

		//Update counters
		msg_seek += bytes_read;
		bytes_remaining -= bytes_read;
	} while(bytes_read == MAX_CHUNK_SIZE);

	//Compute length based on how far msg_seek moved
	return msg_seek - msg;
}


text:
<?php

namespace Tienvx\Bundle\MbtBundle\MessageHandler;

use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Tienvx\Bundle\MbtBundle\Message\ReportBugMessage;
use Tienvx\Bundle\MbtBundle\Service\Bug\BugHelperInterface;

class ReportBugMessageHandler implements MessageHandlerInterface
{
    public function __construct(protected BugHelperInterface $bugHelper)
    {
    }

    public function __invoke(ReportBugMessage $message): void
    {
        $this->bugHelper->reportBug($message->getBugId());
    }
}


text:
package com.gs.fw.common.mithra.test.domain;
import java.sql.Timestamp;

public class PositionDriver extends PositionDriverAbstract
{
	public PositionDriver()
	{
		super();
	}
}


text:
#import "AppAgent.h"

#pragma mark -
#pragma mark get object

#define AGENT   [AppAgent sharedAppAgent]

#define TABLEVIEW               AGENT.tableView
#define VIEWCONTROLLER          AGENT.visibleViewController
#define TABLEVIEWCONTROLLER     AGENT.tableViewController

#define TABLEVIEW_CELL(r,s) [AGENT.tableViewController tableView:AGENT.tableViewController.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:r inSection:s]]

#define TEXTFIELD_IN_VIEW(v)    [AGENT textFieldInView:v]
#define SWITCH_IN_VIEW(v)       [AGENT switchInView:v]

#define ALERTVIEWS              AGENT.alertViews

#pragma mark -
#pragma mark actions

#define _SEND_ACTION(obj) do {\
    UIBarButtonItem *item = obj;\
    [item.target performSelector:item.action withObject:NULL];\
} while(0)

#define TOUCH_BACK_BAR_BUTTON_ITEM()    _SEND_ACTION(AGENT.visibleViewController.navigationItem.backBarButtonItem)

#define TOUCH_LEFT_BAR_BUTTON_ITEM()    _SEND_ACTION(AGENT.visibleViewController.navigationItem.leftBarButtonItem)

#define TOUCH_RIGHT_BAR_BUTTON_ITEM()   _SEND_ACTION(AGENT.visibleViewController.navigationItem.rightBarButtonItem)

#define TOUCH_CELL(r,s) do{\
    UITableViewController *controller = TABLEVIEWCONTROLLER;\
    [controller tableView:controller.tableView didSelectRowAtIndexPath:[NSIndexPath indexPathForRow:r inSection:s]];\
} while(0)

#define TOUCH_ACCESSORY_BUTTON_OF_CELL(r,s) do{\
    UITableViewController *controller = TABLEVIEWCONTROLLER;\
    [controller tableView:controller.tableView accessoryButtonTappedForRowWithIndexPath:[NSIndexPath indexPathForRow:r inSection:s]];\
} while(0)

#define CLOSE_ALL_ALERTVIEWS()  [AGENT closeAllAlertViews]


text:
package org.apache.sysds.test.functions.mlcontext;

import static org.apache.sysds.api.mlcontext.ScriptFactory.dml;

import java.util.ArrayList;
import java.util.List;

import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.ml.linalg.DenseVector;
import org.apache.spark.ml.linalg.VectorUDT;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.RowFactory;
import org.apache.spark.sql.SparkSession;
import org.apache.spark.sql.types.DataType;
import org.apache.spark.sql.types.DataTypes;
import org.apache.spark.sql.types.StructField;
import org.apache.spark.sql.types.StructType;
import org.junit.Test;
import org.apache.sysds.api.mlcontext.FrameFormat;
import org.apache.sysds.api.mlcontext.FrameMetadata;
import org.apache.sysds.api.mlcontext.Matrix;
import org.apache.sysds.api.mlcontext.Script;
import org.apache.sysds.conf.ConfigurationManager;
import org.apache.sysds.common.Types.ValueType;
import org.apache.sysds.runtime.instructions.spark.utils.RDDConverterUtils;
import org.apache.sysds.runtime.matrix.data.MatrixBlock;
import org.apache.sysds.runtime.meta.MatrixCharacteristics;
import org.apache.sysds.runtime.util.DataConverter;
import org.apache.sysds.runtime.util.UtilFunctions;
import org.apache.sysds.test.TestConfiguration;
import org.apache.sysds.test.TestUtils;

public class DataFrameVectorScriptTest extends MLContextTestBase
{
	private final static String TEST_DIR = "functions/mlcontext/";
	private final static String TEST_NAME = "DataFrameConversion";
	private final static String TEST_CLASS_DIR = TEST_DIR + DataFrameVectorScriptTest.class.getSimpleName() + "/";

	//schema restriction: single vector included
	private final static ValueType[] schemaStrings = new ValueType[]{ValueType.UNKNOWN, ValueType.STRING, ValueType.STRING, ValueType.STRING};
	private final static ValueType[] schemaDoubles = new ValueType[]{ValueType.FP64, ValueType.FP64, ValueType.UNKNOWN, ValueType.FP64};
	private final static ValueType[] schemaMixed1 = new ValueType[]{ValueType.UNKNOWN, ValueType.INT64, ValueType.STRING, ValueType.FP64, ValueType.INT64};
	private final static ValueType[] schemaMixed2 = new ValueType[]{ValueType.STRING, ValueType.UNKNOWN, ValueType.FP64};

	private final static int rows1 = 2245;
	private final static int colsVector = 7;
	private final static double sparsity1 = 0.9;
	private final static double sparsity2 = 0.1;
	private final static double eps=0.0000000001;

	@Override
	public void setUp() {
		addTestConfiguration(TEST_NAME, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME, new String[] {"A", "B"}));
	}

	@Test
	public void testVectorStringsConversionIDDenseUnknown() {
		testDataFrameScriptInput(schemaStrings, true, false, true);
	}

	@Test
	public void testVectorDoublesConversionIDDenseUnknown() {
		testDataFrameScriptInput(schemaDoubles, true, false, true);
	}

	@Test
	public void testVectorMixed1ConversionIDDenseUnknown() {
		testDataFrameScriptInput(schemaMixed1, true, false, true);
	}

	@Test
	public void testVectorMixed2ConversionIDDenseUnknown() {
		testDataFrameScriptInput(schemaMixed2, true, false, true);
	}

	@Test
	public void testVectorStringsConversionIDDense() {
		testDataFrameScriptInput(schemaStrings, true, false, false);
	}

	@Test
	public void testVectorDoublesConversionIDDense() {
		testDataFrameScriptInput(schemaDoubles, true, false, false);
	}

	@Test
	public void testVectorMixed1ConversionIDDense() {
		testDataFrameScriptInput(schemaMixed1, true, false, false);
	}

	@Test
	public void testVectorMixed2ConversionIDDense() {
		testDataFrameScriptInput(schemaMixed2, true, false, false);
	}

	@Test
	public void testVectorStringsConversionIDSparseUnknown() {
		testDataFrameScriptInput(schemaStrings, true, true, true);
	}

	@Test
	public void testVectorDoublesConversionIDSparseUnknown() {
		testDataFrameScriptInput(schemaDoubles, true, true, true);
	}

	@Test
	public void testVectorMixed1ConversionIDSparseUnknown() {
		testDataFrameScriptInput(schemaMixed1, true, true, true);
	}

	@Test
	public void testVectorMixed2ConversionIDSparseUnknown() {
		testDataFrameScriptInput(schemaMixed2, true, true, true);
	}

	@Test
	public void testVectorStringsConversionIDSparse() {
		testDataFrameScriptInput(schemaStrings, true, true, false);
	}

	@Test
	public void testVectorDoublesConversionIDSparse() {
		testDataFrameScriptInput(schemaDoubles, true, true, false);
	}

	@Test
	public void testVectorMixed1ConversionIDSparse() {
		testDataFrameScriptInput(schemaMixed1, true, true, false);
	}

	@Test
	public void testVectorMixed2ConversionIDSparse() {
		testDataFrameScriptInput(schemaMixed2, true, true, false);
	}

	@Test
	public void testVectorStringsConversionDenseUnknown() {
		testDataFrameScriptInput(schemaStrings, false, false, true);
	}

	@Test
	public void testVectorDoublesConversionDenseUnknown() {
		testDataFrameScriptInput(schemaDoubles, false, false, true);
	}

	@Test
	public void testVectorMixed1ConversionDenseUnknown() {
		testDataFrameScriptInput(schemaMixed1, false, false, true);
	}

	@Test
	public void testVectorMixed2ConversionDenseUnknown() {
		testDataFrameScriptInput(schemaMixed2, false, false, true);
	}

	@Test
	public void testVectorStringsConversionDense() {
		testDataFrameScriptInput(schemaStrings, false, false, false);
	}

	@Test
	public void testVectorDoublesConversionDense() {
		testDataFrameScriptInput(schemaDoubles, false, false, false);
	}

	@Test
	public void testVectorMixed1ConversionDense() {
		testDataFrameScriptInput(schemaMixed1, false, false, false);
	}

	@Test
	public void testVectorMixed2ConversionDense() {
		testDataFrameScriptInput(schemaMixed2, false, false, false);
	}

	@Test
	public void testVectorStringsConversionSparseUnknown() {
		testDataFrameScriptInput(schemaStrings, false, true, true);
	}

	@Test
	public void testVectorDoublesConversionSparseUnknown() {
		testDataFrameScriptInput(schemaDoubles, false, true, true);
	}

	@Test
	public void testVectorMixed1ConversionSparseUnknown() {
		testDataFrameScriptInput(schemaMixed1, false, true, true);
	}

	@Test
	public void testVectorMixed2ConversionSparseUnknown() {
		testDataFrameScriptInput(schemaMixed2, false, true, true);
	}

	@Test
	public void testVectorStringsConversionSparse() {
		testDataFrameScriptInput(schemaStrings, false, true, false);
	}

	@Test
	public void testVectorDoublesConversionSparse() {
		testDataFrameScriptInput(schemaDoubles, false, true, false);
	}

	@Test
	public void testVectorMixed1ConversionSparse() {
		testDataFrameScriptInput(schemaMixed1, false, true, false);
	}

	@Test
	public void testVectorMixed2ConversionSparse() {
		testDataFrameScriptInput(schemaMixed2, false, true, false);
	}

	private void testDataFrameScriptInput(ValueType[] schema, boolean containsID, boolean dense, boolean unknownDims) {

		//TODO fix inconsistency ml context vs jmlc register Xf
		try
		{
			//generate input data and setup metadata
			int cols = schema.length + colsVector - 1;
			double sparsity = dense ? sparsity1 : sparsity2;
			double[][] A = TestUtils.round(getRandomMatrix(rows1, cols, -10, 1000, sparsity, 2373));
			MatrixBlock mbA = DataConverter.convertToMatrixBlock(A);
			int blksz = ConfigurationManager.getBlocksize();
			MatrixCharacteristics mc1 = new MatrixCharacteristics(rows1, cols, blksz, mbA.getNonZeros());
			MatrixCharacteristics mc2 = unknownDims ? new MatrixCharacteristics() : new MatrixCharacteristics(mc1);

			//create input data frame
			Dataset<Row> df = createDataFrame(spark, mbA, containsID, schema);

			// Create full frame metadata, and empty frame metadata
			FrameMetadata meta = new FrameMetadata(containsID ? FrameFormat.DF_WITH_INDEX :
				FrameFormat.DF, mc2.getRows(), mc2.getCols());
			FrameMetadata metaEmpty = new FrameMetadata();

			//run scripts and obtain result
			Script script1 = dml(
					"Xm = as.matrix(Xf);")
				.in("Xf", df, meta).out("Xm");
			Script script2 = dml(
					"Xm = as.matrix(Xf);")
					.in("Xf", df, metaEmpty).out("Xm");  // empty metadata
			Matrix Xm1 = ml.execute(script1).getMatrix("Xm");
			Matrix Xm2 = ml.execute(script2).getMatrix("Xm");
			double[][] B1 = Xm1.to2DDoubleArray();
			double[][] B2 = Xm2.to2DDoubleArray();
			TestUtils.compareMatrices(A, B1, rows1, cols, eps);
			TestUtils.compareMatrices(A, B2, rows1, cols, eps);
		}
		catch( Exception ex ) {
			ex.printStackTrace();
			throw new RuntimeException(ex);
		}
	}

	private static Dataset<Row> createDataFrame(SparkSession sparkSession, MatrixBlock mb, boolean containsID, ValueType[] schema) {
		//create in-memory list of rows
		List<Row> list = new ArrayList<>();
		int off = (containsID ? 1 : 0);
		int clen = mb.getNumColumns() + off - colsVector + 1;

		for( int i=0; i<mb.getNumRows(); i++ ) {
			Object[] row = new Object[clen];
			if( containsID )
				row[0] = (double)i+1;
			for( int j=0, j2=0; j<mb.getNumColumns(); j++, j2++ ) {
				if( schema[j2] != ValueType.UNKNOWN ) {
					row[j2+off] = UtilFunctions
						.doubleToObject(schema[j2], mb.quickGetValue(i, j));
				}
				else {
					double[] tmp = DataConverter.convertToDoubleVector(
							mb.slice(i, i, j, j+colsVector-1, new MatrixBlock()), false);
					row[j2+off] = new DenseVector(tmp);
					j += colsVector-1;
				}
			}
			list.add(RowFactory.create(row));
		}

		//create data frame schema
		List<StructField> fields = new ArrayList<>();
		if( containsID )
			fields.add(DataTypes.createStructField(RDDConverterUtils.DF_ID_COLUMN,
					DataTypes.DoubleType, true));
		for( int j=0; j<schema.length; j++ ) {
			DataType dt = null;
			switch(schema[j]) {
				case STRING: dt = DataTypes.StringType; break;
				case FP64: dt = DataTypes.DoubleType; break;
				case INT64:    dt = DataTypes.LongType; break;
				case UNKNOWN: dt = new VectorUDT(); break;
				default: throw new RuntimeException("Unsupported value type.");
			}
			fields.add(DataTypes.createStructField("C"+(j+1), dt, true));
		}
		StructType dfSchema = DataTypes.createStructType(fields);

		//create rdd and data frame
		JavaSparkContext sc = new JavaSparkContext(sparkSession.sparkContext());
		JavaRDD<Row> rowRDD = sc.parallelize(list);
		return sparkSession.createDataFrame(rowRDD, dfSchema);
	}
}