text:
<?php if( get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) == 'invalid_api_key' ) { ?>

		<?php printf( __( "Before you can create any opt-in forms, you'll first need to enter your MailChimp API key into the settings page" , 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp-settings&section=general-settings' ) ) ); ?>

<?php } ?>

<?php _e( 'Creating Your First Opt-In Form' , 'yikes-inc-easy-mailchimp-extender' ); ?>

		<img src="<?php echo YIKES_MC_URL . 'includes/images/Welcome_Page/create-first-optin-form.jpg'; ?>" alt="<?php _e( 'Create first optin form screenshot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-easy-mc-feature-image">

<a href="<?php echo esc_url_raw( admin_url( 'admin.php?page=yikes-inc-easy-mailchimp' ) ); ?>" title="<?php _e( 'Manage Forms' , 'yikes-inc-easy-mailchimp-extender' ); ?>">Easy MailChimp → <?php _e( 'Forms', 'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( "Before you can start collecting users email addresses and building your mailing list, you'll need to create your first form. You can create as many forms as you'd like and assign each form to the same or different mailing lists.",  'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( 'Additional Options' , 'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( "Once you create a form, you can choose which fields you want to add to it and customize the success and error messages returned by MailChimp.",  'yikes-inc-easy-mailchimp-extender' ); ?>

		<img src="<?php echo YIKES_MC_URL . 'includes/images/Welcome_Page/optin-settings.png'; ?>" alt="<?php _e( 'Optin settings screenshot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-easy-mc-feature-image yikes-easy-mc-feature-image-left">

<?php _e( 'Customize the Form' , 'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( "Once created, you can customize the form. This includes editing the success and error messages displayed to the user, choosing which fields or interest groups are displayed, adding CSS classes to fields, assigning default values amp; placeholders and tons more!",  'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( "Quickly and easily switch which list the form is associated with, toggle single or double optin, whether the welcome email should be sent, toggle AJAX form submissions and more. Get customizing!",  'yikes-inc-easy-mailchimp-extender' ); ?>

		<img src="<?php echo YIKES_MC_URL . 'includes/images/Welcome_Page/add-field-to-page.png'; ?>" alt="<?php _e( 'Add field to form screenshot', 'yikes-inc-easy-mailchimp-extender' ); ?>" class="yikes-easy-mc-feature-image">

<?php _e( 'Add Form to Page/Post' , 'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( "When you're ready to add your MailChimp opt-in form to a page or post, you can click on the small MailChimp button in the content editor toolbar.",  'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( 'Add Form to Widget' , 'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( "We've created a MailChimp widget to easily add forms to any sidebar or widgetized area on your site. The widget allows you to select from any created forms.",  'yikes-inc-easy-mailchimp-extender' ); ?>

 <?php _e( "Need Support?" , 'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( 'Free Support' , 'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( "If you need help using the free version of the plugin, you can post support inquiries to one of two locations.",  'yikes-inc-easy-mailchimp-extender' ); ?>

<a href="https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/" title="<?php esc_attr_e( 'WordPress Plugin Directory' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'WordPress Plugin Directory' , 'yikes-inc-easy-mailchimp-extender' ); ?>

<a href="https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/issues" target="_blank" title="<?php esc_attr_e( 'GitHub Issue Tracker' , 'yikes-inc-easy-mailchimp-extender' ); ?>"><?php _e( 'GitHub Issue Tracker' , 'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( 'Priority Support' , 'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( "If you want immediate support, please consider purchasing an add-on or developer License. Not only will you get 1 full year of automatic updates and priority support, you will enjoy the tons of features packed into our add-ons that are not available in the free version." , 'yikes-inc-easy-mailchimp-extender' ); ?>

<?php _e( 'Knowledge Base' , 'yikes-inc-easy-mailchimp-extender' ); ?>

<?php printf( __( 'For plugin documentation, visit our knowledge base.' , 'yikes-inc-easy-mailchimp-extender' ), esc_url_raw( 'https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/' ) ); ?>


text:
package org.apache.geronimo.farm.config;

import java.io.Serializable;
import java.io.IOException;

import javax.management.remote.JMXConnector;

import org.apache.geronimo.jmxremoting.JMXConnectorInfo;
import org.apache.geronimo.kernel.Kernel;

/**
 *
 * @version $Rev:$ $Date:$
 */
public interface ExtendedJMXConnectorInfo extends JMXConnectorInfo, Serializable {
    String getUsername();

    void setUsername(String username);

    String getPassword();

    void setPassword(String password);

    boolean isLocal();

    void setLocal(boolean local);

    JMXConnector connect() throws IOException;

    Kernel newKernel(JMXConnector jmxConnector) throws IOException;
}

redpajama_set_name: RedPajamaGithub


text:
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

describe "Numeric#eql?" do
  before :each do
    @obj = NumericSpecs::Subclass.new
  end

  it "returns false if self's and other's types don't match" do
    @obj.should_not eql(1)
    @obj.should_not eql(-1.5)
    @obj.should_not eql(bignum_value)
    @obj.should_not eql(:sym)
  end

  it "returns the result of calling self#== with other when self's and other's types match" do
    other = NumericSpecs::Subclass.new
    @obj.should_receive(:==).with(other).and_return("result", nil)
    @obj.should eql(other)
    @obj.should_not eql(other)
  end
end


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using TweetLib.Utils.Serialization.Converters;
using TweetLib.Utils.Static;

namespace TweetLib.Utils.Serialization {
	public sealed class SimpleObjectSerializer<T> {
		private const string NewLineReal = "\r\n";
		private const string NewLineCustom = "\r~\n";

		private static string EscapeLine(string input) => input.Replace("\\", "\\\\").Replace(Environment.NewLine, "\\\r\n");
		private static string UnescapeLine(string input) => input.Replace(NewLineCustom, Environment.NewLine);

		private static string UnescapeStream(StreamReader reader) {
			string data = reader.ReadToEnd();

			StringBuilder build = new StringBuilder(data.Length);
			int index = 0;

			while (true) {
				int nextIndex = data.IndexOf('\\', index);

				if (nextIndex == -1 || nextIndex + 1 >= data.Length) {
					break;
				}
				else {
					build.Append(data[index..nextIndex]);

					char next = data[nextIndex + 1];

					if (next == '\\') { // convert double backslash to single backslash
						build.Append('\\');
						index = nextIndex + 2;
					}
					else if (next == '\r' && nextIndex + 2 < data.Length && data[nextIndex + 2] == '\n') { // convert backslash followed by CRLF to custom new line
						build.Append(NewLineCustom);
						index = nextIndex + 3;
					}
					else { // single backslash
						build.Append('\\');
						index = nextIndex + 1;
					}
				}
			}

			return build.Append(data[index..]).ToString();
		}

		private readonly TypeConverterRegistry converterRegistry;
		private readonly Dictionary<string, PropertyInfo> props;

		public SimpleObjectSerializer(TypeConverterRegistry converterRegistry) {
			this.converterRegistry = converterRegistry;
			this.props = typeof(T).GetProperties(BindingFlags.Instance | BindingFlags.Public).Where(static prop => prop.CanWrite).ToDictionary(static prop => prop.Name);
		}

		public void Write(string file, T obj) {
			if (props.Count == 0) {
				File.Delete(file);
				return;
			}

			var errors = new LinkedList<string>();

			FileUtils.CreateDirectoryForFile(file);

			using (StreamWriter writer = new StreamWriter(new FileStream(file, FileMode.Create, FileAccess.Write, FileShare.None))) {
				foreach (KeyValuePair<string, PropertyInfo> prop in props) {
					var type = prop.Value.PropertyType;
					var converter = converterRegistry.TryGet(type) ?? ClrTypeConverter.Instance;

					if (converter.TryWriteType(type, prop.Value.GetValue(obj), out string? converted)) {
						if (converted != null) {
							writer.Write(prop.Key);
							writer.Write(' ');
							writer.Write(EscapeLine(converted));
							writer.Write(NewLineReal);
						}
					}
					else {
						errors.AddLast($"Missing converter for type: {type}");
					}
				}
			}

			if (errors.First != null) {
				throw new SerializationSoftException(errors.ToArray());
			}
		}

		public void Read(string file, T obj) {
			string contents;

			using (StreamReader reader = new StreamReader(new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.Read))) {
				contents = UnescapeStream(reader);
			}

			if (string.IsNullOrWhiteSpace(contents)) {
				throw new FormatException("File is empty.");
			}
			else if (contents[0] <= (char) 1) {
				throw new FormatException("Input appears to be a binary file.");
			}

			var errors = new LinkedList<string>();
			int currentPos = 0;

			do {
				string line;
				int nextPos = contents.IndexOf(NewLineReal, currentPos);

				if (nextPos == -1) {
					line = contents[currentPos..];
					currentPos = -1;

					if (string.IsNullOrEmpty(line)) {
						break;
					}
				}
				else {
					line = contents.Substring(currentPos, nextPos - currentPos);
					currentPos = nextPos + NewLineReal.Length;
				}

				int space = line.IndexOf(' ');

				if (space == -1) {
					errors.AddLast($"Missing separator on line: {line}");
					continue;
				}

				string property = line[..space];
				string value = UnescapeLine(line[(space + 1)..]);

				if (props.TryGetValue(property, out var info)) {
					var type = info.PropertyType;
					var converter = converterRegistry.TryGet(type) ?? ClrTypeConverter.Instance;

					if (converter.TryReadType(type, value, out object? converted)) {
						info.SetValue(obj, converted);
					}
					else {
						errors.AddLast($"Failed reading property {property} with value: {value}");
					}
				}
			} while (currentPos != -1);

			if (errors.First != null) {
				throw new SerializationSoftException(errors.ToArray());
			}
		}

		public void ReadIfExists(string file, T obj) {
			try {
				Read(file, obj);
			} catch (FileNotFoundException) {
				// ignore
			} catch (DirectoryNotFoundException) {
				// ignore
			}
		}
	}
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Statistics of nmod:poss in UD_Swedish_Sign_Language</title>
    <link rel="root" href=""/>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/jquery-ui-redmond.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style-vis.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/hint.css"/>

          home

          edit page
          issue tracker

          <gcse:search></gcse:search>

        This page pertains to UD version 2.

            It appears that you have Javascript disabled.
            Please consider enabling Javascript for this page to see the visualizations.

Treebank Statistics: UD_Swedish_Sign_Language: Relations: nmod:poss

This relation is a language-specific subtype of <tt>nmod</tt>.

6 nodes (0%) are attached to their parents as nmod:poss.

6 instances of nmod:poss (100%) are right-to-left (child precedes parent).
Average distance between parent and child is 1.33333333333333.

The following 2 pairs of parts of speech are connected with nmod:poss: <tt>NOUN</tt>-<tt>PRON</tt> (5; 83% instances), <tt>NOUN</tt>-<tt>NOUN</tt> (1; 17% instances).

# visual-style 1	bgColor:blue
# visual-style 1	fgColor:white
# visual-style 3	bgColor:blue
# visual-style 3	fgColor:white
# visual-style 3 1 nmod:poss	color:blue
1	POSS1	_	PRON	PN	_	3	nmod:poss	_	_
2	EGEN	_	ADJ	JJ	_	3	amod	_	_
3	SPRÅK	_	NOUN	NN	_	4	obl	_	_
4	VETA-INTE	_	VERB	VB	_	0	root	_	_
5	PRO1	_	PRON	PN	_	4	nsubj	_	_

# visual-style 1	bgColor:blue
# visual-style 1	fgColor:white
# visual-style 2	bgColor:blue
# visual-style 2	fgColor:white
# visual-style 2 1 nmod:poss	color:blue
1	GRODA	_	NOUN	NN	_	2	nmod:poss	_	_
2	MAMMA*PAPPA	_	NOUN	NN	_	3	nsubj	_	_
3	SITTA(VVb)	_	VERB	VBAV?/VB?	_	0	root	_	_
4	SITTA(Vb)@hd	_	VERB	VBAV	_	3	conj	_	_
5	UNGE	_	NOUN	NN	_	6	nsubj	_	_
6	SITTA(Vb).FL	_	VERB	VBAV	_	3	conj	_	_
7	HEJ-DÅ@g@z	_	X	G	_	3	conj	_	_
8	EN-TILL	_	NUM	RG	_	9	nummod	_	_
9	UNGE	_	NOUN	NN	_	11	nsubj	_	_
10	BAKOM	_	ADP	PP	_	11	advmod	_	_
11	SITTA(Vb)	_	VERB	VBAV	_	3	conj	_	_
12	SYNS	_	VERB	VB	_	13	cop	_	_
13	TJOCK	_	ADJ	JJ	_	9	acl:relcl	_	_
14	OMÖJLIG	_	ADV	AB	_	16	aux	_	_
15	SITTA(Vb)@hd	_	VERB	VBAV	_	3	conj	_	_
16	VARELSE(Vb)+HOPPA-UPP@p	_	VERB	VBAV	_	3	conj	_	_
17	PASSIVERAD@z	_	ADJ	JJ	_	3	conj	_	_

© 2014–2021
            Universal Dependencies contributors.
            Site powered by Annodoc and brat
.


text:
from __future__ import unicode_literals

import re
from datetime import datetime

import six
import praw
from praw.errors import InvalidSubreddit
from kitchen.text.display import wrap

from . import exceptions

class Content(object):

    def get(self, index, n_cols):
        """
        Grab the item at the given index, and format the text to fit a width of
        n columns.
        """
        raise NotImplementedError

    def iterate(self, index, step, n_cols=70):
        """
        Return an iterator that starts and the current index and increments
        by the given step.
        """

        while True:
            if step < 0 and index < 0:
                # Hack to prevent displaying a submission's post if iterating
                # comments in the negative direction
                break
            try:
                yield self.get(index, n_cols=n_cols)
            except IndexError:
                break
            index += step

    @property
    def range(self):
        """
        Return the minimm and maximum valid indicies.
        """
        raise NotImplementedError

    @staticmethod
    def flatten_comments(comments, root_level=0):
        """
        Flatten a PRAW comment tree while preserving the nested level of each
        comment via the `nested_level` attribute.
        """

        stack = comments[:]
        for item in stack:
            item.nested_level = root_level

        retval = []
        while stack:
            item = stack.pop(0)

            # MoreComments item count should never be zero, but if it is then
            # discard the MoreComment object. Need to look into this further.
            if isinstance(item, praw.objects.MoreComments) and item.count == 0:
                continue

            # https://github.com/praw-dev/praw/issues/391
            # Attach children replies to parents. Children will have the
            # same parent_id, but with a suffix attached.
            # E.g.
            #   parent_comment.id = c0tprcm
            #   comment.parent_id = t1_c0tprcm
            if item.parent_id:
                level = None
                # Search through previous comments for a possible parent
                for parent in retval[::-1]:
                    if level and parent.nested_level >= level:
                        # Stop if we reach a sibling or a child, we know that
                        # nothing before this point is a candidate for parent.
                        break
                    level = parent.nested_level
                    if item.parent_id.endswith(parent.id):
                        item.nested_level = parent.nested_level + 1

            # Otherwise, grab all of the attached replies and add them back to
            # the list of comments to parse
            if hasattr(item, 'replies'):
                for n in item.replies:
                    n.nested_level = item.nested_level + 1
                stack[0:0] = item.replies

            retval.append(item)
        return retval

    @classmethod
    def strip_praw_comment(cls, comment):
        """
        Parse through a submission comment and return a dict with data ready to
        be displayed through the terminal.
        """

        data = {}
        data['object'] = comment

        if isinstance(comment, praw.objects.MoreComments):
            data['type'] = 'MoreComments'
            data['level'] = comment.nested_level
            data['count'] = comment.count
            data['body'] = 'More comments'
            data['hidden'] = True

        elif hasattr(comment, 'nested_level'):
            author = getattr(comment, 'author', '[deleted]')
            name = getattr(author, 'name', '[deleted]')
            sub = getattr(comment, 'submission', '[deleted]')
            sub_author = getattr(sub, 'author', '[deleted]')
            sub_name = getattr(sub_author, 'name', '[deleted]')
            flair = getattr(comment, 'author_flair_text', '')
            permalink = getattr(comment, 'permalink', None)
            stickied = getattr(comment, 'stickied', False)

            data['type'] = 'Comment'
            data['level'] = comment.nested_level
            data['body'] = comment.body
            data['created'] = cls.humanize_timestamp(comment.created_utc)
            data['score'] = '{0} pts'.format(
                '-' if comment.score_hidden else comment.score)
            data['author'] = name
            data['is_author'] = (name == sub_name)
            data['flair'] = flair
            data['likes'] = comment.likes
            data['gold'] = comment.gilded > 0
            data['permalink'] = permalink
            data['stickied'] = stickied
            data['hidden'] = False
            data['saved'] = comment.saved
        else:
            # Saved comments don't have a nested level and are missing a couple
            # of fields like ``submission``. As a result, we can only load a
            # subset of fields to avoid triggering a seperate api call to load
            # the full comment.
            author = getattr(comment, 'author', '[deleted]')
            stickied = getattr(comment, 'stickied', False)
            flair = getattr(comment, 'author_flair_text', '')

            data['type'] = 'SavedComment'
            data['level'] = None
            data['title'] = comment.body
            data['comments'] = ''
            data['url_full'] = comment._fast_permalink
            data['url'] = comment._fast_permalink
            data['nsfw'] = comment.over_18
            data['subreddit'] = six.text_type(comment.subreddit)
            data['url_type'] = 'selfpost'
            data['score'] = '{0} pts'.format(
                '-' if comment.score_hidden else comment.score)
            data['likes'] = comment.likes
            data['created'] = cls.humanize_timestamp(comment.created_utc)
            data['saved'] = comment.saved
            data['stickied'] = stickied
            data['gold'] = comment.gilded > 0
            data['author'] = author
            data['flair'] = flair

        return data

    @classmethod
    def strip_praw_submission(cls, sub):
        """
        Parse through a submission and return a dict with data ready to be
        displayed through the terminal.

        Definitions:
            permalink - URL to the reddit page with submission comments.
            url_full - URL that the submission points to.
            url - URL that will be displayed on the subreddit page, may be
                "selfpost", "x-post submission", "x-post subreddit", or an
                external link.
        """

        reddit_link = re.compile(
            r'https?://(www\.)?(np\.)?redd(it\.com|\.it)/r/.*')
        author = getattr(sub, 'author', '[deleted]')
        name = getattr(author, 'name', '[deleted]')
        flair = getattr(sub, 'link_flair_text', '')

        data = {}
        data['object'] = sub
        data['type'] = 'Submission'
        data['title'] = sub.title
        data['text'] = sub.selftext
        data['created'] = cls.humanize_timestamp(sub.created_utc)
        data['comments'] = '{0} comments'.format(sub.num_comments)
        data['score'] = '{0} pts'.format('-' if sub.hide_score else sub.score)
        data['author'] = name
        data['permalink'] = sub.permalink
        data['subreddit'] = six.text_type(sub.subreddit)
        data['flair'] = '[{0}]'.format(flair.strip(' []')) if flair else ''
        data['url_full'] = sub.url
        data['likes'] = sub.likes
        data['gold'] = sub.gilded > 0
        data['nsfw'] = sub.over_18
        data['stickied'] = sub.stickied
        data['hidden'] = False
        data['xpost_subreddit'] = None
        data['index'] = None  # This is filled in later by the method caller
        data['saved'] = sub.saved

        if sub.url.split('/r/')[-1] == sub.permalink.split('/r/')[-1]:
            data['url'] = 'self.{0}'.format(data['subreddit'])
            data['url_type'] = 'selfpost'
        elif reddit_link.match(sub.url):
            # Strip the subreddit name from the permalink to avoid having
            # submission.subreddit.url make a separate API call
            url_parts = sub.url.split('/')
            data['xpost_subreddit'] = url_parts[4]
            data['url'] = 'self.{0}'.format(url_parts[4])
            if 'comments' in url_parts:
                data['url_type'] = 'x-post submission'
            else:
                data['url_type'] = 'x-post subreddit'
        else:
            data['url'] = sub.url
            data['url_type'] = 'external'

        return data

    @staticmethod
    def strip_praw_subscription(subscription):
        """
        Parse through a subscription and return a dict with data ready to be
        displayed through the terminal.
        """

        data = {}
        data['object'] = subscription
        if isinstance(subscription, praw.objects.Multireddit):
            data['type'] = 'Multireddit'
            data['name'] = subscription.path
            data['title'] = subscription.description_md
        else:
            data['type'] = 'Subscription'
            data['name'] = "/r/" + subscription.display_name
            data['title'] = subscription.title

        return data

    @staticmethod
    def humanize_timestamp(utc_timestamp, verbose=False):
        """
        Convert a utc timestamp into a human readable relative-time.
        """

        timedelta = datetime.utcnow() - datetime.utcfromtimestamp(utc_timestamp)

        seconds = int(timedelta.total_seconds())
        if seconds < 60:
            return 'moments ago' if verbose else '0min'
        minutes = seconds // 60
        if minutes < 60:
            return '%d minutes ago' % minutes if verbose else '%dmin' % minutes
        hours = minutes // 60
        if hours < 24:
            return '%d hours ago' % hours if verbose else '%dhr' % hours
        days = hours // 24
        if days < 30:
            return '%d days ago' % days if verbose else '%dday' % days
        months = days // 30.4
        if months < 12:
            return '%d months ago' % months if verbose else '%dmonth' % months
        years = months // 12
        return '%d years ago' % years if verbose else '%dyr' % years

    @staticmethod
    def wrap_text(text, width):
        """
        Wrap text paragraphs to the given character width while preserving
        newlines.
        """
        out = []
        for paragraph in text.splitlines():
            # Wrap returns an empty list when paragraph is a newline. In order
            # to preserve newlines we substitute a list containing an empty
            # string.
            lines = wrap(paragraph, width=width) or ['']
            out.extend(lines)
        return out

class SubmissionContent(Content):
    """
    Grab a submission from PRAW and lazily store comments to an internal
    list for repeat access.
    """

    def __init__(self, submission, loader, indent_size=2, max_indent_level=8,
                 order=None, max_comment_cols=120):

        submission_data = self.strip_praw_submission(submission)
        comments = self.flatten_comments(submission.comments)

        self.indent_size = indent_size
        self.max_indent_level = max_indent_level
        self.name = submission_data['permalink']
        self.order = order
        self._loader = loader
        self._submission = submission
        self._submission_data = submission_data
        self._comment_data = [self.strip_praw_comment(c) for c in comments]
        self._max_comment_cols = max_comment_cols

    @classmethod
    def from_url(cls, reddit, url, loader, indent_size=2, max_indent_level=8,
                 order=None, max_comment_cols=120):

        url = url.replace('http:', 'https:')  # Reddit forces SSL
        # Sometimes reddit will return a 403 FORBIDDEN when trying to access an
        # np link while using OAUTH. Cause is unknown.
        url = url.replace('https://np.', 'https://www.')
        submission = reddit.get_submission(url, comment_sort=order)
        return cls(submission, loader, indent_size, max_indent_level, order,
            max_comment_cols)

    @property
    def range(self):
        return -1, len(self._comment_data) - 1

    def get(self, index, n_cols=70):
        """
        Grab the `i`th submission, with the title field formatted to fit inside
        of a window of width `n`
        """

        if index < -1:
            raise IndexError

        elif index == -1:
            data = self._submission_data
            data['split_title'] = self.wrap_text(data['title'], width=n_cols-2)
            data['split_text'] = self.wrap_text(data['text'], width=n_cols-2)
            data['n_rows'] = len(data['split_title'] + data['split_text']) + 5
            data['h_offset'] = 0

        else:
            data = self._comment_data[index]
            indent_level = min(data['level'], self.max_indent_level)
            data['h_offset'] = indent_level * self.indent_size

            if data['type'] == 'Comment':
                width = min(n_cols - data['h_offset'], self._max_comment_cols)
                data['split_body'] = self.wrap_text(data['body'], width=width)
                data['n_rows'] = len(data['split_body']) + 1
            else:
                data['n_rows'] = 1

        return data

    def toggle(self, index, n_cols=70):
        """
        Toggle the state of the object at the given index.

        If it is a comment, pack it into a hidden comment.
        If it is a hidden comment, unpack it.
        If it is more comments, load the comments.
        """
        data = self.get(index)

        if data['type'] == 'Submission':
            # Can't hide the submission!
            pass

        elif data['type'] == 'Comment':
            cache = [data]
            count = 1
            for d in self.iterate(index + 1, 1, n_cols):
                if d['level'] <= data['level']:
                    break

                count += d.get('count', 1)
                cache.append(d)

            comment = {
                'type': 'HiddenComment',
                'cache': cache,
                'count': count,
                'level': data['level'],
                'body': 'Hidden',
                'hidden': True}

            self._comment_data[index:index + len(cache)] = [comment]

        elif data['type'] == 'HiddenComment':
            self._comment_data[index:index + 1] = data['cache']

        elif data['type'] == 'MoreComments':
            with self._loader('Loading comments'):
                # Undefined behavior if using a nested loader here
                assert self._loader.depth == 1
                comments = data['object'].comments(update=True)
            if not self._loader.exception:
                comments = self.flatten_comments(comments, data['level'])
                comment_data = [self.strip_praw_comment(c) for c in comments]
                self._comment_data[index:index + 1] = comment_data

        else:
            raise ValueError('%s type not recognized' % data['type'])

class SubredditContent(Content):
    """
    Grab a subreddit from PRAW and lazily stores submissions to an internal
    list for repeat access.
    """

    def __init__(self, name, submissions, loader, order=None, max_title_rows=4):

        self.name = name
        self.order = order
        self.max_title_rows = max_title_rows
        self._loader = loader
        self._submissions = submissions
        self._submission_data = []

        # Verify that content exists for the given submission generator.
        # This is necessary because PRAW loads submissions lazily, and
        # there is is no other way to check things like multireddits that
        # don't have a real corresponding subreddit object.
        try:
            self.get(0)
        except IndexError:
            full_name = self.name
            if self.order:
                full_name += '/' + self.order
            raise exceptions.NoSubmissionsError(full_name)

    @classmethod
    def from_name(cls, reddit, name, loader, order=None, query=None):
        """
        Params:
            reddit (praw.Reddit): Instance of the reddit api.
            name (text): The name of the desired subreddit, user, multireddit,
                etc. In most cases this translates directly from the URL that
                reddit itself uses. This is what users will type in the command
                prompt when they navigate to a new location.
            loader (terminal.loader): Handler for the load screen that will be
                displayed when making http requests.
            order (text): If specified, the order that posts will be sorted in.
                For `top` and `controversial`, you can specify the time frame
                by including a dash, e.g. "top-year". If an order is not
                specified, it will be extracted from the name.
            query (text): Content to search for on the given subreddit or
                user's page.
        """
        # TODO: refactor this into smaller methods

        # Strip leading, trailing, and redundant backslashes
        parts = [seg for seg in name.strip(' /').split('/') if seg]

        # Check for the resource type, assume /r/ as the default
        if len(parts) >= 3 and parts[2] == 'm':
            # E.g. /u/multi-mod/m/android
            resource_root, parts = '/'.join(parts[:3]), parts[3:]
        elif len(parts) > 1 and parts[0] in ['r', 'u', 'user', 'domain']:
            resource_root = parts.pop(0)
        else:
            resource_root = 'r'

        if resource_root == 'user':
            resource_root = 'u'

        # There should at most two parts left, the resource and the order
        if len(parts) == 1:
            resource, resource_order = parts[0], None
        elif len(parts) == 2:
            resource, resource_order = parts
        else:
            raise InvalidSubreddit('`{}` is an invalid format'.format(name))

        if not resource:
            # Praw does not correctly handle empty strings
            # https://github.com/praw-dev/praw/issues/615
            raise InvalidSubreddit('Subreddit cannot be empty')

        # If the order was explicitly passed in, it will take priority over
        # the order that was extracted from the name
        order = order or resource_order

        display_order = order
        display_name = '/'.join(['', resource_root, resource])

        # Split the order from the period E.g. controversial-all, top-hour
        if order and '-' in order:
            order, period = order.split('-', 1)
        else:
            period = None

        if order not in ['hot', 'top', 'rising', 'new', 'controversial', None]:
            raise InvalidSubreddit('Invalid order `%s`' % order)
        if period not in ['all', 'day', 'hour', 'month', 'week', 'year', None]:
            raise InvalidSubreddit('Invalid period `%s`' % period)
        if period and order not in ['top', 'controversial']:
            raise InvalidSubreddit('`%s` order does not allow sorting by'
                                   ' period' % order)

        # On some objects, praw doesn't allow you to pass arguments for the
        # order and period. Instead you need to call special helper functions
        # such as Multireddit.get_controversial_from_year(). Build the method
        # name here for convenience.
        if period:
            method_alias = 'get_{0}_from_{1}'.format(order, period)
        elif order:
            method_alias = 'get_{0}'.format(order)
        else:
            method_alias = 'get_hot'

        # Here's where we start to build the submission generators
        if query:
            if resource_root == 'u':
                search = '/r/{subreddit}/search'
                author = reddit.user.name if resource == 'me' else resource
                query = 'author:{0} {1}'.format(author, query)
                subreddit = None
            else:
                search = resource_root + '/{subreddit}/search'
                subreddit = None if resource == 'front' else resource

            reddit.config.API_PATHS['search'] = search
            submissions = reddit.search(query, subreddit=subreddit,
                                        sort=order, period=period)

        elif resource_root == 'domain':
            order = order or 'hot'
            submissions = reddit.get_domain_listing(
                resource, sort=order, period=period, limit=None)

        elif resource_root.endswith('/m'):
            redditor = resource_root.split('/')[1]
            multireddit = reddit.get_multireddit(redditor, resource)
            submissions = getattr(multireddit, method_alias)(limit=None)

        elif resource_root == 'u' and resource == 'me':
            if not reddit.is_oauth_session():
                raise exceptions.AccountError('Not logged in')
            else:
                order = order or 'new'
                submissions = reddit.user.get_submitted(sort=order, limit=None)

        elif resource_root == 'u' and resource == 'saved':
            if not reddit.is_oauth_session():
                raise exceptions.AccountError('Not logged in')
            else:
                order = order or 'new'
                submissions = reddit.user.get_saved(sort=order, limit=None)

        elif resource_root == 'u':
            order = order or 'new'
            period = period or 'all'
            redditor = reddit.get_redditor(resource)
            submissions = redditor.get_submitted(
                sort=order, time=period, limit=None)

        elif resource == 'front':
            if order in (None, 'hot'):
                submissions = reddit.get_front_page(limit=None)
            elif period:
                # For the front page, praw makes you send the period as `t`
                # instead of calling reddit.get_hot_from_week()
                method_alias = 'get_{0}'.format(order)
                method = getattr(reddit, method_alias)
                submissions = method(limit=None, params={'t': period})
            else:
                submissions = getattr(reddit, method_alias)(limit=None)

        else:
            subreddit = reddit.get_subreddit(resource)
            submissions = getattr(subreddit, method_alias)(limit=None)

            # For special subreddits like /r/random we want to replace the
            # display name with the one returned by the request.
            display_name = '/r/{0}'.format(subreddit.display_name)

        # We made it!
        return cls(display_name, submissions, loader, order=display_order)

    @property
    def range(self):
        # Note that for subreddits, the submissions are generated lazily and
        # there is no actual "end" index. Instead, we return the bottom index
        # that we have loaded so far.
        return 0, len(self._submission_data) - 1

    def get(self, index, n_cols=70):
        """
        Grab the `i`th submission, with the title field formatted to fit inside
        of a window of width `n_cols`
        """

        if index < 0:
            raise IndexError

        while index >= len(self._submission_data):
            try:
                with self._loader('Loading more submissions'):
                    submission = next(self._submissions)
                if self._loader.exception:
                    raise IndexError
            except StopIteration:
                raise IndexError
            else:
                if hasattr(submission, 'title'):
                    data = self.strip_praw_submission(submission)
                else:
                    # when submission is a saved commment
                    data = self.strip_praw_comment(submission)

                data['index'] = len(self._submission_data) + 1
                # Add the post number to the beginning of the title
                data['title'] = '{0}. {1}'.format(data['index'], data['title'])
                self._submission_data.append(data)

        # Modifies the original dict, faster than copying
        data = self._submission_data[index]
        data['split_title'] = self.wrap_text(data['title'], width=n_cols)
        if len(data['split_title']) > self.max_title_rows:
            data['split_title'] = data['split_title'][:self.max_title_rows-1]
            data['split_title'].append('(Not enough space to display)')
        data['n_rows'] = len(data['split_title']) + 3
        data['h_offset'] = 0

        return data

class SubscriptionContent(Content):

    def __init__(self, name, subscriptions, loader):

        self.name = name
        self.order = None
        self._loader = loader
        self._subscriptions = subscriptions
        self._subscription_data = []

        try:
            self.get(0)
        except IndexError:
            raise exceptions.SubscriptionError('No content')

        # Load 1024 subscriptions up front (one http request's worth)
        # For most people this should be all of their subscriptions. Doing thi
        # allows the user to jump to the end of the page with `G`.
        if name != 'Popular Subreddits':
            try:
                self.get(1023)
            except IndexError:
                pass

    @classmethod
    def from_user(cls, reddit, loader, content_type='subreddit'):
        if content_type == 'subreddit':
            name = 'My Subreddits'
            items = reddit.get_my_subreddits(limit=None)
        elif content_type == 'multireddit':
            name = 'My Multireddits'
            # Multireddits are returned as a list
            items = iter(reddit.get_my_multireddits())
        elif content_type == 'popular':
            name = 'Popular Subreddits'
            items = reddit.get_popular_subreddits(limit=None)
        else:
            raise exceptions.SubscriptionError('Invalid type %s', content_type)

        return cls(name, items, loader)

    @property
    def range(self):
        return 0, len(self._subscription_data) - 1

    def get(self, index, n_cols=70):
        """
        Grab the `i`th object, with the title field formatted to fit
        inside of a window of width `n_cols`
        """

        if index < 0:
            raise IndexError

        while index >= len(self._subscription_data):
            try:
                with self._loader('Loading content'):
                    subscription = next(self._subscriptions)
                if self._loader.exception:
                    raise IndexError
            except StopIteration:
                raise IndexError
            else:
                data = self.strip_praw_subscription(subscription)
                self._subscription_data.append(data)

        data = self._subscription_data[index]
        data['split_title'] = self.wrap_text(data['title'], width=n_cols)
        data['n_rows'] = len(data['split_title']) + 1
        data['h_offset'] = 0

        return data


text:
import { isServer } from './isServer';

const ORIENTATION_PORTRAIT = 0;
const ORIENTATION_LANDSCAPE = 1;

const HTML = isServer() ? undefined : document.documentElement;

class OrientationHelper {
    constructor() {
        if (
            !isServer() &&
            (window.chayns?.env.isMobile || window.chayns?.env.isApp)
        ) {
            window.addEventListener('orientationchange', this.update);
            this.update();
        }
    }

    // eslint-disable-next-line class-methods-use-this
    getOrientation() {
        if (
            window.screen &&
            window.screen.orientation &&
            (window.screen.orientation.angle ||
                window.screen.orientation.angle === 0)
        ) {
            const angle = window.screen.orientation.angle % 360;

            if (angle === 90 || angle === 270 || angle === -90) {
                return ORIENTATION_LANDSCAPE;
            }

            return ORIENTATION_PORTRAIT;
        }

        if (window.orientation || window.orientation === 0) {
            return window.orientation === -90 || window.orientation === 90
                ? ORIENTATION_LANDSCAPE
                : ORIENTATION_PORTRAIT;
        }

        if (window.innerHeight > window.innerWidth) {
            return ORIENTATION_LANDSCAPE;
        }

        return ORIENTATION_PORTRAIT;
    }

    update = () => {
        const orientation = this.getOrientation();

        if (orientation === ORIENTATION_LANDSCAPE) {
            HTML.classList.add('chayns--landscape');
            HTML.classList.remove('chayns--portrait');
        } else {
            HTML.classList.add('chayns--portrait');
            HTML.classList.remove('chayns--landscape');
        }
    };
}

export default new OrientationHelper();


text:
@interface GroupRow : NSObject

@property (unsafe_unretained, nonatomic) IBOutlet WKInterfaceImage *groupImage;
@property (unsafe_unretained, nonatomic) IBOutlet WKInterfaceLabel *groupName;

@end


text:
package org.apache.camel.generator.swagger;

import io.swagger.models.Swagger;
import org.apache.camel.CamelContext;
import org.apache.camel.model.rest.RestsDefinition;

public final class RestDslDefinitionGenerator extends RestDslGenerator<RestDslDefinitionGenerator> {

    RestDslDefinitionGenerator(final Swagger swagger) {
        super(swagger);
    }

    public RestsDefinition generate(final CamelContext context) {
        final RestDefinitionEmitter emitter = new RestDefinitionEmitter(context);

        final PathVisitor<RestsDefinition> restDslStatement
                = new PathVisitor<>(swagger.getBasePath(), emitter, filter, destinationGenerator());

        swagger.getPaths().forEach(restDslStatement::visit);

        return emitter.result();
    }

}


text:
FOUNDATION_EXPORT double Pods_CWNotificationBanner_TestsVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_CWNotificationBanner_TestsVersionString[];


text:
from datetime import datetime, timedelta

from amsoil.core import pluginmanager as pm
from amsoil.core import serviceinterface
from amsoil.core.exception import CoreException
from amsoil.config import expand_amsoil_path

import amsoil.core.log
logger=amsoil.core.log.getLogger('schedule')

import scheduleexceptions as sex
from attributedict import AttributeDict

class Schedule(object):
    """

    Please see the wiki for more information: https://github.com/motine/AMsoil/wiki/Schedule
    Please create one instance of this class for each schedule_subject.

    NOTE:
    This class will never deliver a Database record to the outside.
    It will copy the contents of the database record, so the plugin user can not accidentally change the database.
    For problem statement see https://github.com/motine/AMsoil/wiki/Persistence#expunge
    """

    @serviceinterface
    def __init__(self, schedule_subject, default_duration):
        """
        There is one schedule for each subject (resource classification/type).
        {schedule_subject} This paramenter limits the scope of this class to the given subject (see above).
        {default_duration} (number in seconds) If no {end_time} is given in subsequent methods, this value will be added to the {start_time} to get the end of the reservation.
        """
        self.schedule_subject = schedule_subject
        self.default_duration = default_duration

    @serviceinterface
    def reserve(self, resource_id, resource_spec=None, slice_id=None, user_id=None, start_time=None, end_time=None):
        """
        Creates a reservation.
        Raises an ScheduleOverbookingError if there is already an entry for the given subject, resource_id and time (see constraints above).
        Returns the reservation id.

        Please see class description for info on parameters.
        """
        if start_time == None:
            start_time = datetime.utcnow()
        if end_time == None:
            end_time =  start_time + timedelta(0, self.default_duration)

        if len(self.find(resource_id=resource_id, start_time=start_time, end_time=end_time)) > 0:
            raise sex.ScheduleOverbookingError(self.schedule_subject, resource_id, start_time, end_time)

        new_record = ReservationRecord(
            schedule_subject=self.schedule_subject, resource_id=resource_id,
            resource_spec=resource_spec,
            start_time=start_time, end_time=end_time,
            slice_id=slice_id, user_id=user_id)
        db_session.add(new_record)
        db_session.commit()
        db_session.expunge_all()
        return self._convert_record_to_value_object(new_record)

    @serviceinterface
    def find(self, reservation_id=None, resource_id=None, slice_id=None, user_id=None, start_time=None, end_time=None):
        """
        Returns a list of reservation value objects (see class description).
        If all parameters a None, all reservations for this schedule_subject will be returned.
        If given parameters are not-None the result will be filtered by the respective field.
        If multiple params are given the result will be reduced (conditions will be AND-ed).
        If the times are given, all records which touch the given period will be returned.
        If {start_time} is given, but {end_time} is omitted, all records which span start_time will be returned.

        Limitations:
        - This method can not be used to filter records with NULL fields. E.g. it is not possible to filter all records to the ones which have set user_id to NULL.
        """
        q = db_session.query(ReservationRecord)
        q = q.filter_by(schedule_subject=self.schedule_subject)
        if not reservation_id is None:
            q = q.filter_by(reservation_id=reservation_id)
        if not resource_id is None:
            q = q.filter_by(resource_id=resource_id)
        if not slice_id is None:
            q = q.filter_by(slice_id=slice_id)
        if not user_id is None:
            q = q.filter_by(user_id=user_id)

        if (not start_time is None) and (end_time is None):
            end_time = start_time
        if (not start_time is None) and (not end_time is None):
            q = q.filter(not_(or_(ReservationRecord.end_time < start_time, ReservationRecord.start_time > end_time)))

        records = q.all()
        result = [self._convert_record_to_value_object(r) for r in records]
        db_session.expunge_all()
        return result

    def update(self, reservation_id, resource_id=None, resource_spec=None, slice_id=None, user_id=None, start_time=None, end_time=None):
        """
        Finds the reservation by its {reservation_id} and updates the fields by the given parameters.
        If a parameter is None, the field will be left unchanged.
        Raises ScheduleNoSuchReservationError if there is no such reservation.
        Returns the changed reservation as value object (see class description).

        Limitation:
        - It is not possible make a field None/NULL with this method, because the None parameter will be interpreted as 'please leave unchanged'.
        """
        reservation = self._find_reservation(reservation_id)
        # this could be done shorter with setattr, but I rather have it expicit
        if not resource_id is None:
            reservation.reservation_id = reservation_id
        if not resource_spec is None:
            reservation.resource_spec = resource_spec
        if not slice_id is None:
            reservation.slice_id = slice_id
        if not user_id is None:
            reservation.user_id = user_id
        if not start_time is None:
            reservation.start_time = start_time
        if not end_time is None:
            reservation.end_time = end_time
        db_session.commit()
        db_session.expunge_all()
        return self._convert_record_to_value_object(reservation)

    def cancel(self, reservation_id):
        """
        Removes the reservation with the given id.
        Raises ScheduleNoSuchReservationError if there is no such reservation.
        Returns the values of the removed object as value object (see class description).
        """
        reservation = self._find_reservation(reservation_id)
        result = self._convert_record_to_value_object(reservation)
        db_session.delete(reservation)
        db_session.commit()
        db_session.expunge_all()
        return result

    def _find_reservation(self, reservation_id):
        try:
            return db_session.query(ReservationRecord).filter_by(schedule_subject=self.schedule_subject).filter_by(reservation_id=reservation_id).one()
        except MultipleResultsFound, e: # this should never happen, because reservation_id is the primary key in the database
            raise RuntimeError("There are multiple primary keys %d" % (reservation_id,))
        except NoResultFound, e:
            raise sex.ScheduleNoSuchReservationError(reservation_id)

    def _convert_record_to_value_object(self, db_record):
        """Converts a given database record to a value object (see class description)."""
        result_dict = {c.name: getattr(db_record, c.name) for c in db_record.__table__.columns}
        del result_dict['schedule_subject']
        return AttributeDict(result_dict)

# ----------------------------------------------------
# ------------------ database stuff ------------------
# ----------------------------------------------------
from sqlalchemy import Column, Integer, String, DateTime, PickleType, create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.sql import exists
from sqlalchemy.sql.expression import and_, or_, not_

from amsoil.config import expand_amsoil_path

# initialize sqlalchemy
DB_PATH = expand_amsoil_path(pm.getService('config').get('schedule.dbpath'))
DB_ENGINE = create_engine("sqlite:///%s" % (DB_PATH,)) # please see the wiki for more info
DB_SESSION_FACTORY = sessionmaker(autoflush=True, bind=DB_ENGINE, expire_on_commit=False)
db_session = scoped_session(DB_SESSION_FACTORY)
DB_Base = declarative_base() # get the base class for the ORM, which includes the metadata object (collection of table descriptions)

class ReservationRecord(DB_Base):
    """Encapsulates a record in the database."""
    __tablename__ = 'reservations'

    reservation_id = Column(Integer, primary_key=True)

    schedule_subject = Column(String(255))
    resource_id = Column(String(255))

    start_time = Column(DateTime)
    end_time = Column(DateTime)
    slice_id = Column(String(255))
    user_id = Column(String(255))

    resource_spec = Column(PickleType())

DB_Base.metadata.create_all(DB_ENGINE) # create the tables if they are not there yet


text:
import { typeName, isActionType, Action, Reducer } from 'redux-typed';
import { ActionCreator } from './';

// -----------------
// STATE - This defines the type of data maintained in the Redux store.

export interface CounterState {
    count: number;
}

// -----------------
// ACTIONS - These are serializable (hence replayable) descriptions of state transitions.
// They do not themselves have any side-effects; they just describe something that is going to happen.
// Use @typeName and isActionType for type detection that works even after serialization/deserialization.

@typeName("INCREMENT_COUNT")
class IncrementCount extends Action {
}

// ----------------
// ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition.
// They don't directly mutate state, but they can have external side-effects (such as loading data).

export const actionCreators = {
    increment: (): ActionCreator => (dispatch, getState) => {
        dispatch(new IncrementCount());
    }
};

// ----------------
// REDUCER - For a given state and action, returns the new state. To support time travel, this must not mutate the old state.
export const reducer: Reducer<CounterState> = (state, action) => {
    if (isActionType(action, IncrementCount)) {
        return { count: state.count + 1 };
    }

    // For unrecognized actions (or in cases where actions have no effect), must return the existing state
    //  (or default initial state if none was supplied)
    return state || { count: 0 };
};


text:
/**
 * @author Evgeniya G. Maenkova
 * @version $Revision$
 */
package javax.swing.plaf.basic;

import java.awt.KeyboardFocusManager;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.Set;
import javax.swing.JEditorPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.KeyStroke;
import javax.swing.SwingTestCase;
import javax.swing.text.AbstractDocument;
import javax.swing.text.JTextComponent;

public class BasicTextUIRTest extends SwingTestCase {
    private void checkEditableFTK(final JTextComponent comp, final int hashCode1,
            final int hashCode2) {
        Set<?> keys = comp.getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS);
        assertEquals(1, keys.size());
        assertEquals(hashCode1, keys.hashCode());
        assertTrue(keys.contains(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
                InputEvent.CTRL_DOWN_MASK)));
        keys = comp.getFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS);
        assertEquals(1, keys.size());
        assertEquals(hashCode2, keys.hashCode());
        assertTrue(keys.contains(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
                InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK)));
    }

    private void checkNotEditableFTK(final JTextComponent comp) {
        Set<?> keys = comp.getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS);
        assertEquals(2, keys.size());
        assertTrue(keys.contains(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
                InputEvent.CTRL_DOWN_MASK)));
        assertTrue(keys.contains(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0)));
        keys = comp.getFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS);
        assertEquals(2, keys.size());
        assertTrue(keys.contains(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
                InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK)));
        assertTrue(keys.contains(KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
                InputEvent.SHIFT_DOWN_MASK)));
    }

    public void testFocusTraversalKeys() {
        JTextComponent textComp = new JTextArea();
        int forwardFTKHashCode = textComp.getFocusTraversalKeys(
                KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS).hashCode();
        int backwardFTKHashCode = textComp.getFocusTraversalKeys(
                KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS).hashCode();
        checkEditableFTK(textComp, forwardFTKHashCode, backwardFTKHashCode);
        textComp.setEditable(false);
        checkNotEditableFTK(textComp);
        textComp.setEditable(true);
        checkEditableFTK(textComp, forwardFTKHashCode, backwardFTKHashCode);
        textComp = new JEditorPane();
        forwardFTKHashCode = textComp.getFocusTraversalKeys(
                KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS).hashCode();
        backwardFTKHashCode = textComp.getFocusTraversalKeys(
                KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS).hashCode();
        checkEditableFTK(textComp, forwardFTKHashCode, backwardFTKHashCode);
        textComp.setEditable(false);
        checkNotEditableFTK(textComp);
        textComp.setEditable(true);
        checkEditableFTK(textComp, forwardFTKHashCode, backwardFTKHashCode);
        textComp = new JTextField();
        forwardFTKHashCode = textComp.getFocusTraversalKeys(
                KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS).hashCode();
        backwardFTKHashCode = textComp.getFocusTraversalKeys(
                KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS).hashCode();
        checkNotEditableFTK(textComp);
        textComp.setEditable(false);
        checkNotEditableFTK(textComp);
        textComp.setEditable(true);
        checkNotEditableFTK(textComp);
    }

    public void testUninstallUI() {
        // Regression for HARMONY-1475
        JTextComponent textComp = new JTextField();
        AbstractDocument doc = ((AbstractDocument) textComp.getDocument());
        assertTrue("listeners installed", doc.getDocumentListeners().length > 0);
        textComp.getUI().uninstallUI(textComp);
        assertEquals("no listeners installed", 0, doc.getDocumentListeners().length);
    }
}


text:
cd here
 C:\Users\Julius\Google Drive\JupyterNotebooks\FastAi\mlruns>


text:
dockerfiles-centos-nodejs
=========================

CentOS 6 dockerfile for nodejs

Get Docker version

    # docker version

To build:

Copy the sources down and do the build-

    # docker build -rm -t <username>/nodejs:centos6 .

To run (if port 8888 is open on your host):

    # docker run -d -p 8888:8888 <username>/nodejs:centos6

or to assign a random port that maps to port 80 on the container:

    # docker run -d -p 8888 <username>/nodejs:centos6

To the port that the container is listening on:

    # docker ps

To test:

    # curl http://localhost:8888


text:
find_path(LIBSERIAL_INCLUDE_DIR SerialPort.h
          PATH_SUFFIXES include
                    PATHS /usr)

# find the LibSerial library
find_library(LIBSERIAL_LIBRARY
            NAMES libserial.so
            PATH_SUFFIXES lib
            PATHS /usr/lib)

# handle the QUIETLY and REQUIRED arguments and set LIBSERIAL_FOUND to TRUE if all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSERIAL
                                  DEFAULT_MSG
                                  LIBSERIAL_INCLUDE_DIR
                                  LIBSERIAL_LIBRARY)
mark_as_advanced(LIBSERIAL_INCLUDE_DIR
                 LIBSERIAL_LIBRARY)


text:
//
//  GSTransaction.h
//  GoSquared
//
//  Created by Giles Williams on 13/10/2014.
//  Copyright (c) 2014 Urban Massage. All rights reserved.
//  Copyright (c) 2015-2016 Go Squared Ltd. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GSTransactionItem.h"

/**
 GSTransaction manages an ecommerce transaction. Once initialised, you can add
 items to the transaction before tracking it on GoSquared.
 */
@interface GSTransaction : NSObject

/// The unique id for the transaction
@property (nonnull) NSString *transactionId;

/// Optional additional properties for the transaction
@property (nullable) NSDictionary *properties;

/**
 Creates and returns a new transaction with the specified transaction id

 @param transactionId The unique id for the transaction

 @return The new GSTransaction
 */
+ (nonnull instancetype)transactionWithId:(nonnull NSString *)transactionId;

/**
 Creates and returns a new transaction with the specified transaction id and additional properties

 @param transactionId The unique id for the transaction
 @param properties Optional additional properties for the transaction

 @return The new GSTransaction
 */
+ (nonnull instancetype)transactionWithId:(nonnull NSString *)transactionId properties:(nullable NSDictionary *)properties;

/**
 Adds a GSTransactionItem to the transaction

 @param item The item to add to the transaction
 */
- (void)addItem:(nonnull GSTransactionItem *)item;

/**
 Adds an array of GSTransactionItems to the transaction

 @param items An array of GSTransactionItems to add to the transaction
 */
- (void)addItems:(nonnull NSArray<GSTransactionItem *> *)items;

/**
 Serialise object into a JSON-valid NSDictionary

 @param visitorId The visitor id of the user making the transaction
 @param personId Your own id for the user making the transaction
 @param pageIndex The index of the screen the user is on when making the transaction
 @param lastTransactionTimestamp The unix timestamp of the last transaction

 @return JSON-valid NSDictonary
 */
- (nonnull NSDictionary *)serializeWithVisitorId:(nonnull NSString *)visitorId
                                        personId:(nullable NSString *)personId
                                       pageIndex:(nullable NSNumber *)pageIndex
                        lastTransactionTimestamp:(nullable NSNumber *)lastTransactionTimestamp;

@end


text:
layout: main
title: Nos partenaires
section: Nos partenaires
index: 3
icon: fa-institution
---

Nos partenaires en France
-------------------------

Nous avons pu réaliser notre premier projet de bibliothèque publique à Chagüitillo notamment grâce aux soutiens renouvelés du CONSEIL GENERAL DU BAS-RHIN, du CONSEIL REGIONAL D'ALSACE et de la VILLE DE STRASBOURG.
Pour notre projet de bibliothèque mobile pour les communautés indigènes, le CONSEIL GENERAL, le CONSEIL REGIONAL et la VILLE de Strasbourg ont à nouveau soutenu notre action en 2015. L'association alsacienne [JOSSH](http://www.jossh.fr) a participé aussi à notre projet de bibliothèque mobile en finançant l'achat de livres éducatifs sur la santé et l'hygiène ainsi que l'organisation d'ateliers de sensibilisation pour les mères de famille. L'ONG Bibliothèques Sans Frontières, l'organisation Goodeed ainsi que L'Agence des micro-projets nous ont soutenus pour assurer le financement de Bibliothèques Numériques.

Nous faisons partie du collectif [HUMANIS](http://www.humanis.org) grâce auquel nous pouvons participer à des évènements tels que le *Forum Humani-Terre*, la *Rentrée des Associations*….

Nous avons le soutien de l'association ARTISANS DU MONDE de Strasbourg. *Humanis* nous a également soutenus en nous octroyant une bourse en 2017.

Nos partenaires au Nicaragua
----------------------------

**[A D C H](http://www.adchchaguitillo.com) (Asociación para el Desarrollo de Villa Chagüitillo)** -
Association pour le Développement de Villa Chagüitillo
Les principales actions d' ADCH concernent l'éducation, la santé, la culture, l'habitat, le tourisme et les services communautaires aux personnes qui en ont le plus besoin pour la ville de Chagüitillo. Pour assurer le succès de ces activités, elle travaille en coordination avec différents organismes, d'état, privés, nationaux ou internationaux. ADCH a mis  à disposition de Nicarali les locaux d'une ancienne bibliothèque située à coté du collège au centre ville,  nous a relayés localement pour les travaux de réhabilitation, et nous accompagne pour le fonctionnement de la bibliothèque de Chagüitillo.

**La COMUNIDAD INDIGENA DE SEBACO (CIS)** est une organisation officielle certifiée par l'état du Nicaragua. La CIS représentée par son président Victor Manuel Chavarria Davila et NICARALI ont signé en Août 2014 une convention de partenariat pour la création d'une bibliothèque mobile pour les populations indigènes de 16 communautés.

La **Bibliothèque de San Juan del Sur** nous a apporté son soutien et ses conseils ainsi que l'ONG **Fondo Libros para niños**.

En France et au Nicaragua nous comptons sur le soutien, la coopération et l'amitié sans faille de René et Annick Dufour de l'association VAULT EN VELIN-SEBACO, SOLIDARITE-DEVELOPPEMENT.

*[CIS]: Comunidad Indigena de Sebaco
*[ADCH]: Asociación para el Desarrollo de Villa Chagüitillo


text:
title: Aldepe.com - Mentoring 21 Januari 2013
date: 2013-01-21
categories:
- laporan
- mentoring
- Aldepe.com
---

     Dari Eva Danayanti kepada Latifah Anum Siregar via surel subyek: Program AlDP 2012

Dear mbak Anum,

Kami tim Cipta Media Bersama sudah menyepakati untuk mengakomodir pengajuan perpanjangan periode hibah
Cipta Media Bersama.

Ada beberapa catatan yang perlu kami sampaikan terkait perpanjangan ini:
* Penerima hibah diminta mengirimkan email pengajuan perpanjangan periode hibah.
* Perpanjangan hanya untuk periode hibah, bukan untuk penambahan budget hibah dari nilai yang disetujui sejak awal
* ALDP sudah mengajukan dalam email sebelumnya untuk perpanjangan periode hibah hingga 26 Februari 2013.
* Jika kemungkinan ada dana yang akan tidak habis terpakai, dapat diajukan untuk kegiatan lainnya. Apabila kegiatan tersebut masih
dalam kerangka proposal, maka pengajuan berupa rencana budget dan alasan penambahan aktivitas tersebut.

Jika merupakan kegiatan yang baru dan tidak ada dalam kerangka proposal sebelumnya, maka pengajuan berupa proposal lengkap
dan budgetnya.

Pengajuan paling lambat ditunggu hingga 15 Februari 2013.

Kami sudah menerima laporan naratif ALDP hingga periode Desember 2012. Namun laporan keuangan belum kami terima.
Mohon ALDP bisa segera mengirimkan laporan keuangan per Desember 2012, sehingga nantinya kami bisa memberikan saran dan
input terkait realokasi dana sisa (jika ada).

Oh ya, informasi dari Wikimedia bahwa laporan versi online di wiki untuk ALDP belum diupdate, tolong agar bisa segera
dilengkapi updatenya.

Jika ada kesulitan bisa dikonsultasikan ke Siska atau Hendra.

Demikian informasi ini kami sampaikan. Kami tunggu responnya.

Salam,
Eva

Balasan

    Dari Latifah Anum Siregar kepada Eva Danayanti via surel subyek: Program AlDP 2012

Dear Mbak Eva
Terima kasih atas informasinya mengenai persetujuan perpanjangan dana hibah buat AlDP hingga 26 pebruari 2013,
sesuai dengan permintaan AlDP sebelumnya.
Laporan keuangan akan dikirim berikut bukti2 dan pengajuan dana sisa, dana sisa yang ada akan tetap
kami gunakan untuk peliputan harian dan daerah (kelanjutan dari kegiatan sebelumnya) bukan merupakan
kegiatan yang baru.

Kami akan segera meng update laporan versi online di wiki.

Terima kasih

salam
anum


text:
package org.spongepowered.despector.ast.insn.var;

import static com.google.common.base.Preconditions.checkNotNull;

import org.spongepowered.despector.ast.AstVisitor;
import org.spongepowered.despector.ast.Locals.LocalInstance;
import org.spongepowered.despector.ast.generic.TypeSignature;
import org.spongepowered.despector.ast.insn.Instruction;
import org.spongepowered.despector.ast.insn.InstructionVisitor;
import org.spongepowered.despector.util.serialization.AstSerializer;
import org.spongepowered.despector.util.serialization.MessagePacker;

import java.io.IOException;

/**
 * An instruction for accessing a local.
 */
public class LocalAccess implements Instruction {

    private LocalInstance local;

    public LocalAccess(LocalInstance local) {
        this.local = checkNotNull(local, "local");
    }

    /**
     * Gets the {@link LocalInstance} accessed.
     */
    public LocalInstance getLocal() {
        return this.local;
    }

    /**
     * Sets the {@link LocalInstance} accessed.
     */
    public void setLocal(LocalInstance local) {
        this.local = checkNotNull(local, "local");
    }

    @Override
    public TypeSignature inferType() {
        return this.local.getType();
    }

    @Override
    public void accept(AstVisitor visitor) {
        if (visitor instanceof InstructionVisitor) {
            ((InstructionVisitor) visitor).visitLocalAccess(this);
            ((InstructionVisitor) visitor).visitLocalInstance(this.local);
        }
    }

    @Override
    public void writeTo(MessagePacker pack) throws IOException {
        pack.startMap(2);
        pack.writeString("id").writeInt(AstSerializer.STATEMENT_ID_LOCAL_ACCESS);
        pack.writeString("local");
        this.local.writeToSimple(pack);
        pack.endMap();
    }

    @Override
    public String toString() {
        return this.local.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof LocalAccess)) {
            return false;
        }
        LocalAccess insn = (LocalAccess) obj;
        return this.local.equals(insn.local);
    }

    @Override
    public int hashCode() {
        return this.local.hashCode();
    }

}


text:
<!doctype html>

    <meta charset="utf-8">

    <title>Exploring NoSQL & the Bible - Keller Davis's 2013 BibleTech Presentation</title>
    <meta name="author" content="Keller Davis">
    <meta name="description" content="Discussion of NoSQL and how it relates to the Bible, given at Bibletech Conference 2013">

    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="css/theme/serif-keller.css" id="theme">

Exploring NoSQL and the Bible

Keller Davis - BibleTech 2013

About me

Seattleite

Husband

Own a dog

Senior web developer for Bible Gateway

Past year worked on NoSQL

Exploring NoSQL and the Bible

About NoSQL

My experiences

Questions/discussion

Relational Databases vs NoSQL

Relational Databases

We know and love them

Robust

Consistent and durable

Tried and true

Battle hardened

NoSQL Databases

Non-relational databases or NoSQL

Vary in design and principle quite a bit

Trendy

Used for "Big Data"

NoSQL

              Some popular and very different NoSQL databases.

              Many relation databases, but they fundamentally very similar. NoSQL varies a lot.

Scaling Systems

Vertical (scaling up) VS Horizontal (scaling out)

            There are 2 ways to scale something. Vertical scaling is making your server bigger and beefier. Important, but can only get you so far and gets expensive fast. The other way to scale is to scale out, by adding more servers. This gets complicated since you have to partition your data and have to handle more complicated failure scenarios. But allows you to scale indefinitely and linearly.

ACID

Atomicity - Each transaction is all or nothing

Consistency - After transaction, the system always sees the same data

Isolation - Transactions don't affect each other

Durability - Once a transaction is committed, data will remain, even on failures

            Separate from relational databases, but relational databases frequently focus on these concepts. This the gold standard when it comes to relational databases. These are all good things.

CAP Theorem

Eric Brewer - <q>You can have at most two of these properties for any shared-data system</q>

Consistency - The system always sees the same data, regardless of inserts, updates, and deletes

Availability - Requests to non-failing node returns a response

Partition tolerance - The system can be divided into nodes

              You must choose what is a priority

Example

Building a Scalable System

CAP applies to both relational databases and NoSQL

NoSQL can be either CP or AP (or even CA)

Historically speaking, relational databases have been focused on ACID principles

NoSQL often focuses on the P (scaling) in CAP and helps with with the lack or C or A

Why We Chose NoSQL

NoSQL solves many problems...

Scaling and performance

High Availability

Eventually Consistent

Schema-less

...but introduces new problems.

Bible Gateway's NoSQL Project

We wanted a new data store to attach data to Bible references. Could be any type of data...

User annotations

User history

Extrabiblical works

Analytics

Other...

How Key-Value Store Work

NoSQL is a fancy key-value database

No range queries!
(Get all items for Matt.5.1-Matt.5.48)

How (Many) NoSQL Databases Work

Most allow range queries

Only single index queries!

Our Data

Data has multi-dimensional indexes

Solution 1

Combine the keys into a single key and use math to query

Couldn't get math to work

Not a unique problem, geospatial data

Nobody was solving it this way

Solution 2

Group all items by user/resource and filter out undesired items

Solution 2

Group all items by user/resource and filter out undesired items

Many NoSQL can easily append/remove data to the value

Gets around range queries and multi-dimensional indexing

Potentially problematic if user/resource has lots of items

Penalizing power users

Solution 3

Solution 3

Solution 3

Partition the data

Creates a tree structure

As data grows, searching for it is manageable

Doesn't penalize too much for heavy usage

Searching through less data VS more requests

Probably have to rebalance tree

Too complex

Solution 4

Solution 4

Bible has built-in partitions

Much simpler

If always returning single chapters, don't have to filter

Multi-index and range queries are non-issues

No penalization for power users

Winner!

Other Complexities

Secondary indexes

Other Complexities

Secondary indexes

Solution 4.5

            Uses range queries for single verse items and benefits from Bible hierarchy for complicated spans.

Questions?

keller.davis@biblegateway.com


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="[PROJECT_NAME_CLASSNAME_PREFIX]DummyFactoryTest.cs" company="Naos Project">
//    Copyright (c) Naos Project 2019. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace [PROJECT_NAME]
{
    using System;

    using FakeItEasy;

    using OBeautifulCode.AutoFakeItEasy;

    using Xunit;

    public static partial class [PROJECT_NAME_CLASSNAME_PREFIX]DummyFactoryTest
    {
        /* Add your Dummy Factory tests, if any, here. */
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Hereditas 6: 2 (1925)

#### Original name
Erysiphe communis f. thalictri Hammarl.

### Remarks
null


text:
<resources>
    <string name="app_name">04_BindService</string>
</resources>


text:
layout: page
title: Velazquez 55th Anniversary
date: 2016-05-24
author: Jeffrey Pham
tags: weekly links, java
status: published
summary: Proin molestie nibh feugiat lorem accumsan, sed lacinia.
banner: images/banner/leisure-01.jpg
booking:
  startDate: 01/20/2016
  endDate: 01/24/2016
  ctyhocn: HVNOBHX
  groupCode: V5A
published: true
---
Sed faucibus magna non suscipit fringilla. Aenean semper faucibus urna, quis congue orci tincidunt sit amet. Curabitur urna urna, convallis et ornare ac, tempus ac diam. Nullam ut egestas quam. Suspendisse eleifend velit id tortor iaculis, ac auctor orci imperdiet. Sed molestie sed risus sed tincidunt. Vestibulum a purus libero.

* Phasellus quis nisi commodo, consequat ante ut, laoreet leo
* Donec faucibus turpis sit amet est tincidunt, nec ultrices massa vehicula
* Proin non magna faucibus, sollicitudin quam a, porttitor augue
* Phasellus mattis sem vehicula pellentesque vehicula
* Aliquam sit amet lorem cursus massa dignissim dapibus
* Vivamus tristique erat sed risus malesuada feugiat.

Nam volutpat vestibulum fermentum. Suspendisse in elementum erat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc vitae massa a diam varius accumsan. Morbi interdum enim sit amet molestie facilisis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque hendrerit libero libero, eu convallis tellus eleifend sit amet. Quisque dapibus leo id sem pellentesque ultricies. Proin semper erat justo, non accumsan nulla tempus sed. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus nibh ipsum, lacinia feugiat egestas vitae, eleifend porttitor augue. Nullam feugiat sem eget velit euismod, ut rutrum nisl imperdiet. Praesent mauris metus, convallis sed est sed, tincidunt gravida neque. Vivamus ut odio mattis, rhoncus ligula at, auctor neque.
Vivamus bibendum purus eget nibh commodo iaculis. Curabitur congue nulla lectus, in convallis leo volutpat ac. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed vitae malesuada lorem, nec rhoncus neque. Ut ut nunc id nunc sollicitudin porta. Vivamus a ipsum ac mauris ultricies molestie condimentum et ipsum. Donec imperdiet suscipit tristique.


text:
-- https://app.camunda.com/jira/browse/CAM-9523
create index ACT_IDX_HI_TASK_INST_START on ACT_HI_TASKINST(START_TIME_);
create index ACT_IDX_HI_TASK_INST_END on ACT_HI_TASKINST(END_TIME_);


text:
This file tracks weird notes and observations that have come up during development. The notes aren't necessarily a problem or bug, but just something to watch, such as an odd implementation note, a reminder, or anything else. Apparently strange behavior with the C++ libraries should be (eventually) reported to their current maintainer.

## Scratch Space

- All objects already have an ID and type, so no need to track that data.
- Make sure project includes relevant features from the plain ole Java version.
- Consider making `GEvent`s actually use class hierarchies instead of event type enums.
- `WINDOW_CLOSING` v. `WINDOW_CLOSED`
- add attribute descriptors to properties
- setFillColor should also setFilled ??
- Consider forwarding all Java method attribute lookups to snake case, with/without deprecations?

## Apparent Problems with the C++ Library

When adding a note, please append your username and the date.

- `GWindow.getScreenHeight` uses the width of screen, not the height (sredmond ????)
- `Platform.setValue` the string command is GetValue not SetValue (sredmond ????)
- Possibly no `GWindow::setVisible` in C++ libs? (sredmond 2017-10-21)
- `void addItem(std::string item)` in C++ libs should probably accept const& (sredmond 2017-10-22)
- line 106 of gbufferedimage should have x,y comments (sredmond 2017-11-02)
- `SparseGrid` in `sparsegrid.py` `fill` method should not fill everything when fill is called, just keep a ref to the filled item (or a copy?)
- `countDiffPixels` should be decomposed
- `GLabel` doesn't recompute ascent/descent in C++ after changing text (sredmond 2017-12-07)
- `GLabel` C++ platform doesn't urlencode the font, where GInteractor `setFont` does (sredmond 2017-12-07)
- `GCompound_Add` in C++ version for some reason gets status with a very cryptic comment (all it says is `  // JL`)
- How can we be divorced from the 'project' entity of e.g. QTCreator?

## How to Rebuild Documentation

Run the following script to rebuild the documentation, and then commit the changes to Github to have them reflected to the hosted Github Pages.

```
(campy-dev)$ cd $(git rev-parse --show-toplevel)
(campy-dev)$ ./makedocs.sh
```

There are a few more steps for the first time that documentation is ever built in the repository. These steps are saved as reference for other projects.
```
(campy-dev)$ cd $(git rev-parse --show-toplevel)
(campy-dev)$ cd docs-src/
(campy-dev) docs-src$ sphinx-quickstart  # Enable all extensions when prompted.
(campy-dev) docs-src$ cd ..
(campy-dev)$ sphinx-apidoc --separate -o docs-src/ campy/
```

## Technical Overview

Stanford publishes a JAR file that listens on stdin for text commands, such as `GWindow.create`, and runs the appropriate command from a Java backend. Thus, any program that can send the right text commands can emulate the behavior of the ACM libraries.

### Package Organization
```
├── debug  # Tools and scripts for debugging this implementation
├── docs  # Documentation.
├── examples  # Example CS106 programs written using this library.
├── campy  # The library itself.
│   ├── datastructures  # Collections, such as `Lexicon` and `SparseGrid`
│   ├── graphics  # `GWindow`, `GOval`, `GBufferedImage`, etc.
│   ├── gui  # `GInteractor`
│   ├── io  # String and File IO helpers.
│   ├── misc  # Miscellaneous modules.
│   ├── private  # Private, implementation specific modules.
│   ├── system  # `error`
│   └── util  # Utility modules.
└── test  # One-off testing scripts for validation.
```

### Testing

Very few modules have been thoroughly tested, so the internals of this library may break at any time. The API is not frozen and may change without warning.

## An Incomplete CHANGELOG

- All `GInteractor` will now generate a :class:`GActionEvent` on interaction regardless of whether their action command is nonempty.

## Pushing to PyPI

First, bump the version number in `setup.py` and `campy/__version__.py`

Then, ensure you have `twine` installed and are in the project's root directory.

```
$ python setup.py publish
```

To publish to TestPyPI instead, use `python setup.py publish --test`.

If you want to check the validity of the built package, use the following steps:

```
$ python setup.py sdist bdist_wheel
$ twine check dist/*
$ check-manifest
```

If there are lingering build files, you might have to run `python setup.py clean --all` first.

Then, upload to TestPyPI or real PyPI, supplying the username and password of this project's owner.

```
# Upload to TestPyPI.
$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
# (OR) Upload to real PyPI.
$ twine upload dist/*
```

Distribution files (`.tar.gz` or `.whl`) which have been uploaded to PyPI are stored there indefinitely. Distribution files uploaded to TestPyPI are periodically cleared. So, it's fine to clear `dist/*` whenever you like.

If your `~/.pypirc` is out-of-date, you may get a weird message that your connection was refused. In this case, read the information on the [updated PyPI upload endpoint](https://packaging.python.org/guides/migrating-to-pypi-org/) and modify your config files accordingly.

Check that the package has been successfully pushed by visiting [TestPyPI](https://test.pypi.org/project/campy/) or [real PyPI](https://pypi.org/project/campy/).


text:
using System.Diagnostics.CodeAnalysis;

namespace Blitzy.View.Dialogs
{
	/// <summary>
	/// Interaction logic for WebyWebsiteDialog.xaml
	/// </summary>
	[ExcludeFromCodeCoverage]
	public partial class WebyWebsiteDialog
	{
		public WebyWebsiteDialog()
		{
			InitializeComponent();
		}
	}
}


text:
package php.runtime.memory;

import org.junit.Assert;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.junit.runners.MethodSorters;
import php.runtime.Memory;

@RunWith(JUnit4.class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TrueMemoryTest {

    @Test
    public void testBasic(){
        Assert.assertNotNull(Memory.TRUE);
        Assert.assertTrue(Memory.TRUE instanceof TrueMemory);
    }

    @Test
    public void testToNumeric(){
        Assert.assertTrue(Memory.TRUE.toNumeric() instanceof LongMemory);
        Assert.assertEquals(1, Memory.TRUE.toNumeric().toLong());
    }

    @Test
    public void testTyped(){
        Assert.assertTrue(Memory.TRUE.toBoolean());
        Assert.assertEquals("1", Memory.TRUE.toString());
        Assert.assertEquals(1.0, Memory.TRUE.toDouble(), 0.00001);
        Assert.assertEquals(Memory.TRUE, Memory.TRUE.toImmutable());
    }

    @Test
    public void testNegative(){
        Assert.assertEquals(-1, Memory.TRUE.negative().toLong());
        Assert.assertTrue(Memory.TRUE.negative() instanceof LongMemory);
    }

    @Test
    public void testConcat(){
        Assert.assertEquals("1foobar", Memory.TRUE.concat("foobar"));
        Assert.assertEquals("1foobar", Memory.TRUE.concat(new StringMemory("foobar")));
        Assert.assertEquals("19", Memory.TRUE.concat(9));
        Assert.assertEquals("19", Memory.TRUE.concat(new LongMemory(9)));
        Assert.assertEquals("11", Memory.TRUE.concat(true));
        Assert.assertEquals("11", Memory.TRUE.concat(Memory.TRUE));
        Assert.assertEquals("1", Memory.TRUE.concat(false));
        Assert.assertEquals("1", Memory.TRUE.concat(Memory.FALSE));
        Assert.assertEquals("11", Memory.TRUE.concat(1.0));

        Assert.assertEquals("foobar1", Memory.TRUE.concatRight("foobar"));
        Assert.assertEquals("11", Memory.TRUE.concatRight(true));
        Assert.assertEquals("1", Memory.TRUE.concatRight(false));
        Assert.assertEquals("331", Memory.TRUE.concatRight(33));
        Assert.assertEquals("22.01", Memory.TRUE.concatRight(22.0));
    }

    @Test
    public void testPlus(){
        Assert.assertEquals(2, Memory.TRUE.plus(Memory.CONST_INT_1).toLong());
        Assert.assertTrue(Memory.TRUE.plus(Memory.CONST_INT_1) instanceof LongMemory);

        Assert.assertEquals(2.0, Memory.TRUE.plus(Memory.CONST_DOUBLE_1).toDouble(), 0.00001);
        Assert.assertTrue(Memory.TRUE.plus(Memory.CONST_DOUBLE_1) instanceof DoubleMemory);

        Assert.assertEquals(2, Memory.TRUE.plus(Memory.TRUE).toLong());
        Assert.assertTrue(Memory.TRUE.plus(Memory.TRUE) instanceof LongMemory);

        Assert.assertEquals(1, Memory.TRUE.plus(Memory.FALSE).toLong());
        Assert.assertTrue(Memory.TRUE.plus(Memory.FALSE) instanceof LongMemory);

        Assert.assertEquals(2, Memory.TRUE.plus(true).toLong());
        Assert.assertTrue(Memory.TRUE.plus(true) instanceof LongMemory);

        Assert.assertEquals(1, Memory.TRUE.plus(false).toLong());
        Assert.assertTrue(Memory.TRUE.plus(false) instanceof LongMemory);

        Assert.assertEquals(34, Memory.TRUE.plus(33).toLong());
        Assert.assertTrue(Memory.TRUE.plus(33) instanceof LongMemory);

        Assert.assertEquals(3.5, Memory.TRUE.plus(2.5).toDouble(), 0.00001);
    }

    @Test
    public void testMinus(){
        Assert.assertEquals(0, Memory.TRUE.minus(Memory.CONST_INT_1).toLong());
        Assert.assertTrue(Memory.TRUE.minus(Memory.CONST_INT_1) instanceof LongMemory);

        Assert.assertEquals(0.0, Memory.TRUE.minus(Memory.CONST_DOUBLE_1).toDouble(), 0.00001);
        Assert.assertTrue(Memory.TRUE.minus(Memory.CONST_DOUBLE_1) instanceof DoubleMemory);

        Assert.assertEquals(0, Memory.TRUE.minus(Memory.TRUE).toLong());
        Assert.assertTrue(Memory.TRUE.minus(Memory.TRUE) instanceof LongMemory);

        Assert.assertEquals(1, Memory.TRUE.minus(Memory.FALSE).toLong());
        Assert.assertTrue(Memory.TRUE.minus(Memory.FALSE) instanceof LongMemory);

        Assert.assertEquals(0, Memory.TRUE.minus(true).toLong());
        Assert.assertTrue(Memory.TRUE.minus(true) instanceof LongMemory);

        Assert.assertEquals(1, Memory.TRUE.minus(false).toLong());
        Assert.assertTrue(Memory.TRUE.minus(false) instanceof LongMemory);

        Assert.assertEquals(-1, Memory.TRUE.minus(2).toLong());
        Assert.assertTrue(Memory.TRUE.minus(2) instanceof LongMemory);

        Assert.assertEquals(0.5, Memory.TRUE.minus(0.5).toDouble(), 0.00001);

        Assert.assertEquals(0, Memory.TRUE.minusRight(true).toLong());
        Assert.assertEquals(-1, Memory.TRUE.minusRight(false).toLong());
        Assert.assertEquals(1, Memory.TRUE.minusRight(2).toLong());
        Assert.assertEquals(1.0, Memory.TRUE.minusRight(2.0).toDouble(), 0.0000001);
        Assert.assertEquals(1.0, Memory.TRUE.minusRight("2.0").toDouble(), 0.0000001);
    }

    @Test
    public void testMul(){
        Assert.assertEquals(1, Memory.TRUE.mul(Memory.CONST_INT_1).toLong());
        Assert.assertTrue(Memory.TRUE.mul(Memory.CONST_INT_1) instanceof LongMemory);

        Assert.assertEquals(1.0, Memory.TRUE.mul(Memory.CONST_DOUBLE_1).toDouble(), 0.00001);
        Assert.assertTrue(Memory.TRUE.mul(Memory.CONST_DOUBLE_1) instanceof DoubleMemory);

        Assert.assertEquals(1, Memory.TRUE.mul(Memory.TRUE).toLong());
        Assert.assertTrue(Memory.TRUE.mul(Memory.TRUE) instanceof LongMemory);

        Assert.assertEquals(0, Memory.TRUE.mul(Memory.FALSE).toLong());
        Assert.assertTrue(Memory.TRUE.mul(Memory.FALSE) instanceof LongMemory);

        Assert.assertEquals(1, Memory.TRUE.mul(true).toLong());
        Assert.assertTrue(Memory.TRUE.mul(true) instanceof LongMemory);

        Assert.assertEquals(0, Memory.TRUE.mul(false).toLong());
        Assert.assertTrue(Memory.TRUE.mul(false) instanceof LongMemory);

        Assert.assertEquals(2, Memory.TRUE.mul(2).toLong());
        Assert.assertTrue(Memory.TRUE.mul(2) instanceof LongMemory);

        Assert.assertEquals(0.5, Memory.TRUE.mul(0.5).toDouble(), 0.00001);
    }

    @Test
    public void testDiv(){
        Assert.assertEquals(1, Memory.TRUE.div(Memory.CONST_INT_1).toLong());
        Assert.assertTrue(Memory.TRUE.div(Memory.CONST_INT_1) instanceof LongMemory);

        Assert.assertEquals(1.0, Memory.TRUE.div(Memory.CONST_DOUBLE_1).toDouble(), 0.00001);
        Assert.assertTrue(Memory.TRUE.div(Memory.CONST_DOUBLE_1) instanceof DoubleMemory);

        Assert.assertEquals(1, Memory.TRUE.div(Memory.TRUE).toLong());
        Assert.assertTrue(Memory.TRUE.div(Memory.TRUE) instanceof LongMemory);

        Assert.assertEquals(0, Memory.TRUE.div(Memory.FALSE).toLong());
        Assert.assertTrue(Memory.TRUE.div(Memory.FALSE) instanceof FalseMemory);

        Assert.assertEquals(1, Memory.TRUE.div(true).toLong());
        Assert.assertTrue(Memory.TRUE.div(true) instanceof LongMemory);

        Assert.assertEquals(0, Memory.TRUE.div(false).toLong());
        Assert.assertTrue(Memory.TRUE.div(false) instanceof FalseMemory);

        Assert.assertEquals(0.5, Memory.TRUE.div(2).toDouble(), 0.0000001);
        Assert.assertTrue(Memory.TRUE.div(2) instanceof DoubleMemory);

        Assert.assertEquals(2, Memory.TRUE.div(0.5).toDouble(), 0.00001);

        Assert.assertEquals(1, Memory.TRUE.divRight(true).toLong());
        Assert.assertEquals(0, Memory.TRUE.divRight(false).toLong());
        Assert.assertTrue(Memory.TRUE.divRight(false) instanceof LongMemory);
        Assert.assertEquals(1, Memory.TRUE.divRight(true).toLong());
        Assert.assertTrue(Memory.TRUE.divRight(true) instanceof LongMemory);
        Assert.assertTrue(Memory.TRUE.divRight(1) instanceof LongMemory);
        Assert.assertTrue(Memory.TRUE.divRight(1).toLong() == 1);
        Assert.assertTrue(Memory.TRUE.divRight(1.0) instanceof DoubleMemory);
        Assert.assertEquals(1, Memory.TRUE.divRight(1.0).toDouble(), 0.000001);
    }

    @Test
    public void testMod(){
        Assert.assertEquals(0, Memory.TRUE.mod(Memory.CONST_INT_1).toLong());
        Assert.assertTrue(Memory.TRUE.mod(Memory.CONST_INT_1) instanceof LongMemory);

        Assert.assertEquals(0, Memory.TRUE.mod(Memory.CONST_DOUBLE_1).toDouble(), 0.00001);
        Assert.assertTrue(Memory.TRUE.mod(Memory.CONST_DOUBLE_1) instanceof LongMemory);

        Assert.assertEquals(0, Memory.TRUE.mod(Memory.TRUE).toLong());
        Assert.assertTrue(Memory.TRUE.mod(Memory.TRUE) instanceof LongMemory);

        Assert.assertEquals(0, Memory.TRUE.mod(Memory.FALSE).toLong());
        Assert.assertTrue(Memory.TRUE.mod(Memory.FALSE) instanceof FalseMemory);

        Assert.assertEquals(0, Memory.TRUE.mod(true).toLong());
        Assert.assertTrue(Memory.TRUE.mod(true) instanceof LongMemory);

        Assert.assertEquals(0, Memory.TRUE.mod(false).toLong());
        Assert.assertTrue(Memory.TRUE.mod(false) instanceof FalseMemory);

        Assert.assertEquals(1, Memory.TRUE.mod(2).toLong());
        Assert.assertTrue(Memory.TRUE.mod(2) instanceof LongMemory);

        Assert.assertTrue(Memory.TRUE.mod(0.5) instanceof FalseMemory);

        Assert.assertEquals(0, Memory.TRUE.modRight(true).toLong());
        Assert.assertTrue(Memory.TRUE.modRight(false).toLong() == 0);
        Assert.assertTrue(Memory.TRUE.modRight(false) instanceof LongMemory);
        Assert.assertEquals(0, Memory.TRUE.modRight(true).toLong());
        Assert.assertTrue(Memory.TRUE.modRight(true) instanceof LongMemory);
        Assert.assertTrue(Memory.TRUE.modRight(1) instanceof LongMemory);
        Assert.assertTrue(Memory.TRUE.modRight(1).toLong() == 0);
        Assert.assertTrue(Memory.TRUE.modRight(1.0) instanceof LongMemory);
        Assert.assertEquals(0, Memory.TRUE.modRight(1.3).toDouble(), 0.000001);
    }

    @Test
    public void testPow(){
        Assert.assertEquals(1, Memory.TRUE.pow(Memory.CONST_INT_1).toLong());
        Assert.assertTrue(Memory.TRUE.pow(Memory.CONST_INT_1) instanceof LongMemory);

        Assert.assertEquals(1, Memory.TRUE.pow(Memory.TRUE).toLong());
        Assert.assertTrue(Memory.TRUE.pow(Memory.TRUE) instanceof LongMemory);

        Assert.assertEquals(1, Memory.TRUE.pow(Memory.FALSE).toLong());
        Assert.assertTrue(Memory.TRUE.pow(Memory.FALSE) instanceof LongMemory);

        Assert.assertEquals(1, Memory.TRUE.pow(2).toLong());
        Assert.assertTrue(Memory.TRUE.pow(2) instanceof LongMemory);

        Assert.assertEquals(1, Memory.TRUE.powRight(true).toLong());
        Assert.assertTrue(Memory.TRUE.powRight(false).toLong() == 0);
        Assert.assertTrue(Memory.TRUE.powRight(false) instanceof LongMemory);
        Assert.assertEquals(1, Memory.TRUE.powRight(true).toLong());
        Assert.assertTrue(Memory.TRUE.powRight(true) instanceof LongMemory);
        Assert.assertTrue(Memory.TRUE.powRight(1) instanceof LongMemory);
        Assert.assertTrue(Memory.TRUE.powRight(1).toLong() == 1);
        Assert.assertTrue(Memory.TRUE.powRight(1.0) instanceof DoubleMemory);
        Assert.assertEquals(1.3, Memory.TRUE.powRight(1.3).toDouble(), 0.000001);
    }
}


text:
/*
 * Generated by asn1c-0.9.27 (http://lionet.info/asn1c)
 * From ASN.1 module "MyModule"
 * 	found in "MyModule.asn1"
 */

#include "MyOId.h"

int
MyOId_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	/* Replace with underlying type checker */
	td->check_constraints = asn_DEF_OBJECT_IDENTIFIER.check_constraints;
	return td->check_constraints(td, sptr, ctfailcb, app_key);
}

/*
 * This type is implemented using OBJECT_IDENTIFIER,
 * so here we adjust the DEF accordingly.
 */
static void
MyOId_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
	td->free_struct    = asn_DEF_OBJECT_IDENTIFIER.free_struct;
	td->print_struct   = asn_DEF_OBJECT_IDENTIFIER.print_struct;
	td->check_constraints = asn_DEF_OBJECT_IDENTIFIER.check_constraints;
	td->ber_decoder    = asn_DEF_OBJECT_IDENTIFIER.ber_decoder;
	td->der_encoder    = asn_DEF_OBJECT_IDENTIFIER.der_encoder;
	td->xer_decoder    = asn_DEF_OBJECT_IDENTIFIER.xer_decoder;
	td->xer_encoder    = asn_DEF_OBJECT_IDENTIFIER.xer_encoder;
	td->uper_decoder   = asn_DEF_OBJECT_IDENTIFIER.uper_decoder;
	td->uper_encoder   = asn_DEF_OBJECT_IDENTIFIER.uper_encoder;
	if(!td->per_constraints)
		td->per_constraints = asn_DEF_OBJECT_IDENTIFIER.per_constraints;
	td->elements       = asn_DEF_OBJECT_IDENTIFIER.elements;
	td->elements_count = asn_DEF_OBJECT_IDENTIFIER.elements_count;
	td->specifics      = asn_DEF_OBJECT_IDENTIFIER.specifics;
}

void
MyOId_free(asn_TYPE_descriptor_t *td,
		void *struct_ptr, int contents_only) {
	MyOId_1_inherit_TYPE_descriptor(td);
	td->free_struct(td, struct_ptr, contents_only);
}

int
MyOId_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
		int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
	MyOId_1_inherit_TYPE_descriptor(td);
	return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}

asn_dec_rval_t
MyOId_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
		void **structure, const void *bufptr, size_t size, int tag_mode) {
	MyOId_1_inherit_TYPE_descriptor(td);
	return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}

asn_enc_rval_t
MyOId_encode_der(asn_TYPE_descriptor_t *td,
		void *structure, int tag_mode, ber_tlv_tag_t tag,
		asn_app_consume_bytes_f *cb, void *app_key) {
	MyOId_1_inherit_TYPE_descriptor(td);
	return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}

asn_dec_rval_t
MyOId_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
		void **structure, const char *opt_mname, const void *bufptr, size_t size) {
	MyOId_1_inherit_TYPE_descriptor(td);
	return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}

asn_enc_rval_t
MyOId_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
		int ilevel, enum xer_encoder_flags_e flags,
		asn_app_consume_bytes_f *cb, void *app_key) {
	MyOId_1_inherit_TYPE_descriptor(td);
	return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}

static ber_tlv_tag_t asn_DEF_MyOId_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (6 << 2))
};
asn_TYPE_descriptor_t asn_DEF_MyOId = {
	"MyOId",
	"MyOId",
	MyOId_free,
	MyOId_print,
	MyOId_constraint,
	MyOId_decode_ber,
	MyOId_encode_der,
	MyOId_decode_xer,
	MyOId_encode_xer,
	0, 0,	/* No PER support, use "-gen-PER" to enable */
	0,	/* Use generic outmost tag fetcher */
	asn_DEF_MyOId_tags_1,
	sizeof(asn_DEF_MyOId_tags_1)
		/sizeof(asn_DEF_MyOId_tags_1[0]), /* 1 */
	asn_DEF_MyOId_tags_1,	/* Same as above */
	sizeof(asn_DEF_MyOId_tags_1)
		/sizeof(asn_DEF_MyOId_tags_1[0]), /* 1 */
	0,	/* No PER visible constraints */
	0, 0,	/* No members */
	0	/* No specifics */
};


text:
using System;

namespace LinqToDB.Mapping
{
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true, Inherited = true)]
	public class ScalarTypeAttribute : Attribute
	{
		public ScalarTypeAttribute()
		{
			IsScalar = true;
		}

		public ScalarTypeAttribute(bool isScalar)
		{
			IsScalar      = isScalar;
		}

		public ScalarTypeAttribute(string configuration)
		{
			Configuration = configuration;
			IsScalar      = true;
		}

		public ScalarTypeAttribute(string configuration, bool isScalar)
		{
			Configuration = configuration;
			IsScalar      = isScalar;
		}

		public string Configuration { get; set; }
		public bool   IsScalar      { get; set; }
	}
}


text:
if [ ! -f configure.in ]; then
  cd ../..
  if [ ! -f configure.in ]; then
    echo "please run this script from the base of the VICE directory"
    echo "or from the appropriate build directory"
    exit 1
  fi
fi

curdir=`pwd`

./configure
gcc src/arch/amigaos/fixdeps.c -o ./fixdeps
cd src
../fixdeps
cd ..
make
make bindist