text:
package com.twitter.zipkin.collector.sampler

import com.twitter.ostrich.admin.Service

/**
 * A process that adjusts the Collector sample rate to modulate the number of
 * requests to the storage backend (Cassandra)
 */
trait AdaptiveSampler extends Service

class NullAdaptiveSampler extends AdaptiveSampler {
  def start() {}
  def shutdown() {}
}


text:
CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;};
CGFloat RadiansToDegrees(CGFloat radians) {return radians * 180/M_PI;};

@implementation UIImage (TextureAtlas)

+ (NSDictionary *)atlas:(NSString *)filename {
    static NSMutableDictionary *cache = nil;

    if(!cache) {
        cache = [NSMutableDictionary dictionary];
    }

    if(cache[filename]) {
        return cache[filename];
    }

    NSString* file = [[filename lastPathComponent] stringByDeletingPathExtension];
    NSString *path = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%@.atlasc/%@", file, file] ofType:@"plist"];
    NSDictionary *atlasDictionary = [[NSDictionary alloc] initWithContentsOfFile:path];

    NSMutableDictionary *atlas = [NSMutableDictionary dictionary];

    NSArray *images = atlasDictionary[@"images"];
    NSArray *relevantImages;

    BOOL hasRetinaImages = NO;
    CGFloat scale = [UIScreen mainScreen].scale;

    if(scale == 2.0) {
        NSPredicate *retina = [NSPredicate predicateWithBlock:^BOOL(NSDictionary *evaluatedObject, NSDictionary *bindings) {
            NSString *file = [evaluatedObject[@"path"] stringByDeletingPathExtension];
            return [file hasSuffix:@"@2x"];
        }];

        relevantImages = [images filteredArrayUsingPredicate:retina];
        hasRetinaImages = YES;

        // jk: TO DO :: ipad retina

        if(relevantImages.count == 0) {
            relevantImages = images;
        }
    }
    else {
        // jk: TO DO :: ipad
        relevantImages = images;
    }

    [relevantImages enumerateObjectsUsingBlock:^(NSDictionary *obj, NSUInteger idx, BOOL *stop) {
        NSString *imagePath = obj[@"path"];
        NSString *imageFile = [[imagePath lastPathComponent] stringByDeletingPathExtension];
        NSString *imageExtension = [imagePath pathExtension];

        NSString *path = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%@.atlasc/%@", file, imageFile] ofType:imageExtension];
        UIImage *atlasImage = [UIImage imageWithContentsOfFile:path];

        NSArray *subimages = obj[@"subimages"];

        CGSize atlasSize = atlasImage.size;
        CGImageRef atlasRef = atlasImage.CGImage;

        if(!atlasImage || CGSizeEqualToSize(atlasSize, CGSizeZero)) {
            *stop = YES;
            return;
        }

        [subimages enumerateObjectsUsingBlock:^(NSDictionary *obj, NSUInteger idx, BOOL *stop) {
            UIImage *image;

            CGSize sourceSize= CGSizeFromString(obj[@"spriteSourceSize"]); // the final source of the image
            CGPoint spriteOffset = CGPointFromString(obj[@"spriteOffset"]); // the offset we'll need to draw in the final source

            CGRect textureRect = CGRectFromString(obj[@"textureRect"]); // the current x/y/w/h of the image in the atlas
            BOOL textureRotated = [obj[@"textureRotated"] boolValue]; // whether the texture rotated or not

            CGImageRef sprite = CGImageCreateWithImageInRect(atlasRef, textureRect);

            // rotate the sprite if neccessary
            if(textureRotated) {
                float degrees = -90;
                CGSize size = CGSizeMake(CGRectGetHeight(textureRect), CGRectGetWidth(textureRect));

                CGImageRef oldSprite = sprite;

                UIGraphicsBeginImageContext(size);
                CGContextRef ctx = UIGraphicsGetCurrentContext();
                CGContextTranslateCTM(ctx, size.width/2, size.height/2);
                CGContextRotateCTM(ctx, DegreesToRadians(degrees));
                CGContextScaleCTM(ctx, 1.0, -1.0);
                CGContextDrawImage(ctx, CGRectMake(-CGRectGetWidth(textureRect) / 2, -CGRectGetHeight(textureRect) / 2, CGRectGetWidth(textureRect), CGRectGetHeight(textureRect)), oldSprite);
                sprite = CGBitmapContextCreateImage(ctx);
                UIGraphicsEndImageContext();

                CGImageRelease(oldSprite);
            }

            // begin rendering our final image.
            UIGraphicsBeginImageContext(sourceSize);
            CGContextRef ctx = UIGraphicsGetCurrentContext();

            // flip the image as it is currently backward.
            CGContextTranslateCTM(ctx, 0, sourceSize.height);
            CGContextScaleCTM(ctx, 1.0f, -1.0f);

            // draw accounting for offset
            float w = !textureRotated ? CGRectGetWidth(textureRect) : CGRectGetHeight(textureRect);
            float h = !textureRotated ? CGRectGetHeight(textureRect) : CGRectGetWidth(textureRect);

            CGContextDrawImage(ctx, CGRectMake(spriteOffset.x, spriteOffset.y, w, h), sprite);

            image = UIGraphicsGetImageFromCurrentImageContext();
            UIGraphicsEndImageContext();
            // done

            if(hasRetinaImages) {
                image = [UIImage imageWithCGImage:image.CGImage scale:scale orientation:UIImageOrientationUp];
            }

            // preserve as the final filename, removing any references to @2x for ease of use.
            NSString *filename = obj[@"name"];
            NSString *filenameWithoutExtension = [filename stringByDeletingPathExtension];
            NSString *fileExtension = [filename stringByReplacingOccurrencesOfString:filenameWithoutExtension withString:@""];

            if(scale == 2.0) {
                filenameWithoutExtension = [filenameWithoutExtension stringByReplacingOccurrencesOfString:@"@2x" withString:@""];
            }

            NSString *key = [NSString stringWithFormat:@"%@%@",filenameWithoutExtension,fileExtension];
            atlas[key] = image;

            CGImageRelease(sprite);
        }];
    }];

    cache[filename] = atlas;

    return cache[filename];
}

+ (NSArray *)spritesWithContentsOfAtlas:(NSString *)filename sequence:(NSString *)sequence start:(int)start end:(int)end {
    NSDictionary *atlas = [UIImage atlas:filename];

    NSMutableArray *sprites = [NSMutableArray array];

    __block int index = start;
    [atlas enumerateKeysAndObjectsUsingBlock:^(NSString *key, UIImage *obj, BOOL *stop) {
        NSString *imageName = [NSString stringWithFormat:sequence, index];
        UIImage *sprite = [atlas objectForKey:imageName];

        if(!sprite) {
            *stop = YES;
            return;
        }

        [sprites addObject:sprite];

        index++;

        if(index >= end && end != -1) {
            *stop = YES;
        }
    }];

    return sprites;
}

+ (NSArray *)spritesWithContentsOfAtlas:(NSString *)filename sequence:(NSString *)sequence start:(int)start {
    return [UIImage spritesWithContentsOfAtlas:filename sequence:sequence start:start end:-1];
}

+ (NSArray *)spritesWithContentsOfAtlas:(NSString *)filename sequence:(NSString *)sequence {
    return [UIImage spritesWithContentsOfAtlas:filename sequence:sequence start:0 end:-1];
}

+ (void)removeAtlasFromCache:(NSString *)filename {
    static NSMutableDictionary *cache = nil;

    if(!cache) return;

    if(cache[filename]) {
        [cache removeObjectForKey:filename];
    }
}

@end

redpajama_set_name: RedPajamaGithub


text:
package org.relib.db;

/**
 * Utility class for generating SQL statements.
 *
 * @author Troy Histed
 */
public final class Query {

	/**
	 * Static constructor for an Update.
	 *
	 * @param statement
	 *            the statement to execute
	 * @return the Update
	 */
	public static Update update(String statement) {
		return new Update(statement);
	}

	/**
	 * Static constructor for an Update.
	 *
	 * @param statement
	 *            the statement to execute
	 * @param connectionName
	 *            the connection name to use
	 * @return the Update
	 */
	public static Update update(String statement, String connectionName) {
		return new Update(statement, connectionName);
	}

	/**
	 * Static constructor for building a select for an Object.
	 *
	 * @param statement
	 *            the select statement to execute
	 * @param rowMapper
	 *            the row mapping to use
	 * @param <T>
	 *            the object type
	 * @return the Select
	 */
	public static <T> Select<T> forObject(String statement, RowMapper<T> rowMapper) {
		return new Select<T>(statement, rowMapper);
	}

	/**
	 * Static constructor for building a select for an Object.
	 *
	 * @param statement
	 *            the select statement to execute
	 * @param rowMapper
	 *            the row mapping to use
	 * @param connectionName
	 *            the connection name to use
	 * @param <T>
	 *            the object type
	 * @return the Select
	 */
	public static <T> Select<T> forObject(String statement, RowMapper<T> rowMapper, String connectionName) {
		return new Select<T>(statement, rowMapper, connectionName);
	}

	/**
	 * Static constructor for building a select for a java bean.
	 *
	 * @param statement
	 *            the select statement to execute
	 * @param beanClass
	 *            the bean class to map to
	 * @param <T>
	 *            the object type
	 * @return the Select
	 */
	public static <T> Select<T> forBean(String statement, Class<T> beanClass) {
		return new Select<T>(statement, BeanRowMapper.forClass(beanClass));
	}

	/**
	 * Static constructor for building a select for a java bean.
	 *
	 * @param statement
	 *            the select statement to execute
	 * @param beanClass
	 *            the bean class to map to
	 * @param connectionName
	 *            the connection name to use
	 * @param <T>
	 *            the object type
	 * @return the Select
	 */
	public static <T> Select<T> forBean(String statement, Class<T> beanClass, String connectionName) {
		return new Select<T>(statement, BeanRowMapper.forClass(beanClass), connectionName);
	}

	/**
	 * Static constructor for building a select for an Integer.
	 *
	 * @param statement
	 *            the select statement to execute
	 * @return the Select
	 */
	public static Select<Integer> forInteger(String statement) {
		return new Select<Integer>(statement, RowMappers.INTEGER_MAPPER);
	}

	/**
	 * Static constructor for building a select for an Integer.
	 *
	 * @param statement
	 *            the select statement to execute
	 * @param connectionName
	 *            the connection name to use
	 * @return the Select
	 */
	public static Select<Integer> forInteger(String statement, String connectionName) {
		return new Select<Integer>(statement, RowMappers.INTEGER_MAPPER, connectionName);
	}

	/**
	 * Static constructor for building a select for a Long.
	 *
	 * @param statement
	 *            the select statement to execute
	 * @return the Select
	 */
	public static Select<Long> forLong(String statement) {
		return new Select<Long>(statement, RowMappers.LONG_MAPPER);
	}

	/**
	 * Static constructor for building a select for a Long.
	 *
	 * @param statement
	 *            the select statement to execute
	 * @param connectionName
	 *            the connection name to use
	 * @return the Select
	 */
	public static Select<Long> forLong(String statement, String connectionName) {
		return new Select<Long>(statement, RowMappers.LONG_MAPPER, connectionName);
	}

	/**
	 * Static constructor for building a select for a Double.
	 *
	 * @param statement
	 *            the select statement to execute
	 * @return the Select
	 */
	public static Select<Double> forDouble(String statement) {
		return new Select<Double>(statement, RowMappers.DOUBLE_MAPPER);
	}

	/**
	 * Static constructor for building a select for a Double.
	 *
	 * @param statement
	 *            the select statement to execute
	 * @param connectionName
	 *            the connection name to use
	 * @return the Select
	 */
	public static Select<Double> forDouble(String statement, String connectionName) {
		return new Select<Double>(statement, RowMappers.DOUBLE_MAPPER, connectionName);
	}

	/**
	 * Static constructor for building a select for a String.
	 *
	 * @param statement
	 *            the select statement to execute
	 * @return the Select
	 */
	public static Select<String> forString(String statement) {
		return new Select<String>(statement, RowMappers.STRING_MAPPER);
	}

	/**
	 * Static constructor for building a select for a String.
	 *
	 * @param statement
	 *            the select statement to execute
	 * @param connectionName
	 *            the connection name to use
	 * @return the Select
	 */
	public static Select<String> forString(String statement, String connectionName) {
		return new Select<String>(statement, RowMappers.STRING_MAPPER, connectionName);
	}
}


text:
package org.blendee.util;

import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

import org.blendee.jdbc.OptionKey;

/**
 * キー、値ともに String のオプションマップから値を取り出し、変換することが可能なオプションキークラスです。
 * @author 千葉 哲嗣
 * @param <T> オプション値の型
 */
public class ParsableOptionKey<T> extends OptionKey<T> {

	enum OptionValueParser {

		TO_STRING {

			@Override
			@SuppressWarnings("unchecked")
			<T> T parse(String value) {
				return (T) value;
			}
		},

		TO_STRING_ARRAY {

			@Override
			@SuppressWarnings("unchecked")
			<T> T parse(String value) {
				return (T) value.split(" +");
			}
		},

		TO_BOOLEAN {

			@Override
			@SuppressWarnings("unchecked")
			<T> T parse(String value) {
				return (T) Boolean.valueOf(value);
			}
		},

		TO_INTEGER {

			@Override
			@SuppressWarnings("unchecked")
			<T> T parse(String value) {
				return (T) Integer.valueOf(value);
			}
		},

		TO_CLASS {

			@Override
			@SuppressWarnings("unchecked")
			<T> T parse(String value) {
				try {
					return (T) Class.forName(value);
				} catch (Exception e) {
					throw new IllegalStateException(e);
				}
			}
		};

		abstract <T> T parse(String value);
	}

	private static final Object lock = new Object();

	private static final Map<String, ParsableOptionKey<?>> map = new HashMap<>();

	private final String key;

	private final OptionValueParser parser;

	@SuppressWarnings("unchecked")
	static <T> ParsableOptionKey<T> convert(String key) {
		synchronized (lock) {
			return (ParsableOptionKey<T>) map.get(key);
		}
	}

	ParsableOptionKey(String key, OptionValueParser parser) {
		this.key = key;
		synchronized (lock) {
			map.put(key, this);
		}

		this.parser = parser;
	}

	/**
	 * 値を変換します。
	 * @param value 変換前の値
	 * @return 返還後の値
	 */
	public Optional<T> parse(String value) {
		return Optional.ofNullable(value).map(v -> parser.parse(v));
	}

	/**
	 * キーを返します。
	 * @return キー
	 */
	public String getKey() {
		return key;
	}

	@Override
	public String toString() {
		return key + " [" + parser.name() + "]";
	}
}


text:
<?php
/*

SQL Buddy - Web based MySQL administration
http://www.sqlbuddy.com/

ajaxsavecolumnedit.php
- saves the details of a table column

MIT license

2008 Calvin Lough <http://calv.in>

*/

include "functions.php";

loginCheck();

if (isset($db))
	$conn->selectDB($db);

if (isset($_POST['runQuery'])) {
	$query = $_POST['runQuery'];

	$conn->query($query) or ($dbError = $conn->error());

	echo "{\n";
	echo "    \"formupdate\": \"" . $_GET['form'] . "\",\n";
	echo "    \"errormess\": \"";
	if (isset($dbError))
		echo $dbError;
	echo "\"\n";
	echo '}';

}

?>


text:
/* ------------------------------------------------------------------------------
 *
 *  # D3.js - basic tree layout
 *
 *  Demo of tree layout setup with .json data source
 *
 *  Version: 1.0
 *  Latest update: August 1, 2015
 *
 * ---------------------------------------------------------------------------- */

$(function () {

    // Initialize chart
    treeBasic('#d3-tree-basic', 800);

    // Chart setup
    function treeBasic(element, height) {

        // Basic setup
        // ------------------------------

        // Define main variables
        var d3Container = d3.select(element),
            margin = {top: 0, right: 0, bottom: 0, left: 40},
            width = d3Container.node().getBoundingClientRect().width - margin.left - margin.right,
            height = height - margin.top - margin.bottom - 5;

        // Create chart
        // ------------------------------

        // Add SVG element
        var container = d3Container.append("svg");

        // Add SVG group
        var svg = container
            .attr("width", width + margin.left + margin.right)
            .attr("height", height + margin.top + margin.bottom)
            .append("g")
                .attr("transform", "translate(" + margin.left + "," + margin.top + ")");

        // Construct chart layout
        // ------------------------------

        // Tree
        var tree = d3.layout.tree()
            .size([height, width - 180]);

        // Diagonal projection
        var diagonal = d3.svg.diagonal()
            .projection(function(d) { return [d.y, d.x]; });

        // Load data
        // ------------------------------

        d3.json("assets/demo_data/d3/tree/tree_data_basic.json", function(error, json) {

            var nodes = tree.nodes(json),
                links = tree.links(nodes);

            // Links
            // ------------------------------

            // Append link group
            var linkGroup = svg.append("g")
                .attr("class", "d3-tree-link-group");

            // Append link path
            var link = linkGroup.selectAll(".d3-tree-link")
                .data(links)
                .enter()
                .append("path")
                    .attr("class", "d3-tree-link")
                    .attr("d", diagonal)
                    .style("fill", "none")
                    .style("stroke", "#ddd")
                    .style("stroke-width", 1.5);

            // Nodes
            // ------------------------------

            // Append node group
            var nodeGroup = svg.append("g")
                .attr("class", "d3-tree-node-group");

            // Append node
            var node = nodeGroup.selectAll(".d3-tree-node")
                .data(nodes)
                .enter()
                .append("g")
                    .attr("class", "d3-tree-node")
                    .attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; });

            // Append node circles
            node.append("circle")
                .attr("r", 4.5)
                .attr("class", "d3-tree-circle")
                .style("fill", "#fff")
                .style("stroke", "#2196F3")
                .style("stroke-width", 1.5);

            // Append node text
            node.append("text")
                .attr("dx", function(d) { return d.children ? -12 : 12; })
                .attr("dy", 4)
                .style("text-anchor", function(d) { return d.children ? "end" : "start"; })
                .style("font-size", 12)
                .text(function(d) { return d.name; });

            // Resize chart
            // ------------------------------

            // Call function on window resize
            $(window).on('resize', resize);

            // Call function on sidebar width change
            $('.sidebar-control').on('click', resize);

            // Resize function
            //
            // Since D3 doesn't support SVG resize by default,
            // we need to manually specify parts of the graph that need to
            // be updated on window resize
            function resize() {

                // Layout variables
                width = d3Container.node().getBoundingClientRect().width - margin.left - margin.right,
                nodes = tree.nodes(json),
                links = tree.links(nodes);

                // Layout
                // -------------------------

                // Main svg width
                container.attr("width", width + margin.left + margin.right);

                // Width of appended group
                svg.attr("width", width + margin.left + margin.right);

                // Tree size
                tree.size([height, width - 180]);

                // Chart elements
                // -------------------------

                // Link paths
                svg.selectAll(".d3-tree-link").attr("d", diagonal)

                // Node paths
                svg.selectAll(".d3-tree-node").attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; });
            }
        });
    }
});


text:
"""InfluxDb tester."""

# -*- coding: utf-8 -*-

__author__ = """Chris Tabor (dxdstudio@gmail.com)"""

IS_MAIN = True if __name__ == '__main__' else False

if IS_MAIN:
    from os import getcwd
    from os import sys
    sys.path.append(getcwd())

from datetime import datetime as dt
from random import random, choice

from influxdb import InfluxDBClient
from MOAL.helpers.display import Section

def make_data(client):
    i = 0
    while True:
        json_body = [
            {
                'measurement': 'cpu_load_short',
                'tags': {
                    'host': 'server-{}'.format(i),
                    'region': 'us-{}'.format(
                        choice(['east', 'west', 'north', 'south']))
                },
                'time': dt.now(),
                'fields': {
                    'value': random(),
                    'value2': random(),
                }
            },
            {
                'measurement': 'hdd_load_short',
                'tags': {
                    'host': 'server-{}'.format(i),
                    'region': 'us-{}'.format(
                        choice(['east', 'west', 'north', 'south']))
                },
                'time': dt.now(),
                'fields': {
                    'size': choice(['1TB', '4TB', '8TB', '16TB', '32TB']),
                    'value': random(),
                    'value2': random(),
                }
            }
        ]
        i += 1
        yield client.write_points(json_body)

if IS_MAIN:
    with Section(__doc__):
        client = InfluxDBClient('localhost', 8086, 'root', 'root', 'moaltest')
        client.create_database('moaltest')
        d = make_data(client)
        for _ in range(100):
            next(d)

        result = client.query('select * from cpu_load_short;')
        print('Result: {0}'.format(result))

        result = client.query('select * from hdd_load_short;')
        print('Result: {0}'.format(result))


text:
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { buildFeedbackTextForReview, Feedback, FeedbackType } from 'app/entities/feedback.model';
import { cloneDeep } from 'lodash-es';
import { TranslateService } from '@ngx-translate/core';
import { StructuredGradingCriterionService } from 'app/exercises/shared/structured-grading-criterion/structured-grading-criterion.service';
import { roundValueSpecifiedByCourseSettings } from 'app/shared/util/utils';
import { Course } from 'app/entities/course.model';
import { faBan, faPencilAlt, faQuestionCircle, faSave, faTrashAlt, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';

@Component({
    selector: 'jhi-code-editor-tutor-assessment-inline-feedback',
    templateUrl: './code-editor-tutor-assessment-inline-feedback.component.html',
})
export class CodeEditorTutorAssessmentInlineFeedbackComponent {
    MANUAL = FeedbackType.MANUAL;
    @Input()
    get feedback(): Feedback {
        return this._feedback;
    }
    set feedback(feedback: Feedback) {
        this._feedback = feedback || new Feedback();
        this.oldFeedback = cloneDeep(this.feedback);
        this.viewOnly = !!feedback;
    }
    private _feedback: Feedback;
    @Input()
    selectedFile: string;
    @Input()
    codeLine: number;
    @Input()
    readOnly: boolean;
    @Input()
    highlightDifferences: boolean;
    @Input()
    course?: Course;

    @Output()
    onUpdateFeedback = new EventEmitter<Feedback>();
    @Output()
    onCancelFeedback = new EventEmitter<number>();
    @Output()
    onDeleteFeedback = new EventEmitter<Feedback>();
    @Output()
    onEditFeedback = new EventEmitter<number>();

    // Expose the function to the template
    readonly roundScoreSpecifiedByCourseSettings = roundValueSpecifiedByCourseSettings;

    viewOnly: boolean;
    oldFeedback: Feedback;

    // Icons
    faSave = faSave;
    faBan = faBan;
    faQuestionCircle = faQuestionCircle;
    faPencilAlt = faPencilAlt;
    faTrashAlt = faTrashAlt;
    faExclamationTriangle = faExclamationTriangle;

    constructor(private translateService: TranslateService, public structuredGradingCriterionService: StructuredGradingCriterionService) {}

    /**
     * Updates the current feedback and sets props and emits the feedback to parent component
     */
    updateFeedback() {
        this.feedback.type = this.MANUAL;
        this.feedback.reference = `file:${this.selectedFile}_line:${this.codeLine}`;
        this.feedback.text = `File ${this.selectedFile} at line ${this.codeLine + 1}`;
        this.viewOnly = true;
        if (this.feedback.credits && this.feedback.credits > 0) {
            this.feedback.positive = true;
        }
        this.onUpdateFeedback.emit(this.feedback);
    }

    /**
     * When a inline feedback already exists, we set it back and display it the viewOnly mode.
     * Otherwise the component is not displayed anymore in the parent component
     */
    cancelFeedback() {
        this.feedback = this.oldFeedback;
        this.viewOnly = this.feedback.type === this.MANUAL;
        this.onCancelFeedback.emit(this.codeLine);
    }

    /**
     * Deletes feedback after confirmation and emits to parent component
     */
    deleteFeedback() {
        const text: string = this.translateService.instant('artemisApp.feedback.delete.question', { id: this.feedback.id ?? '' });
        const confirmation = confirm(text);
        if (confirmation) {
            this.onDeleteFeedback.emit(this.feedback);
        }
    }

    /**
     * Checks if component is in view mode
     * @param line Line of code which is emitted to the parent
     */
    editFeedback(line: number) {
        this.viewOnly = false;
        this.onEditFeedback.emit(line);
    }

    /**
     * Updates the feedback with data of Structured Grading Instructions (SGI)
     * @param event Drop event with SGI data
     */
    updateFeedbackOnDrop(event: Event) {
        this.structuredGradingCriterionService.updateFeedbackWithStructuredGradingInstructionEvent(this.feedback, event);
        this.feedback.reference = `file:${this.selectedFile}_line:${this.codeLine}`;
        this.feedback.text = `File ${this.selectedFile} at line ${this.codeLine}`;
    }

    /**
     * Builds the feedback text. When the feedback has a link with grading instruction it merges the feedback of
     * the grading instruction with the feedback text provided by the assessor.
     *
     * @param feedback The feedback for which the text visible to the user should be created.
     * @returns The formatted string representing the feedback text ready to display.
     */
    public buildFeedbackTextForCodeEditor(feedback: Feedback): string {
        return buildFeedbackTextForReview(feedback, false);
    }
}


text:
object Test {
  def main(args: Array[String]) {
    class Foo
    class Parent(f:Foo)
    class Child extends Parent({val x=new Foo{}; x})
    new Child
  }
}


text:
<?php

namespace AppBundle\Enum;

/**
 * RepairAccessTypeEnum class.
 *
 * @category Enum
 *
 * @author   Jordi Sort <jordi.sort@mirmit.com>
 */
class RepairAccessTypeEnum
{
    const CRANE = 0;
    const BASKET_CRANE = 1;
    const ROPES = 2;
    const GROUND = 3;

    /**
     * @return array
     */
    public static function getEnumArray()
    {
        return array(
            self::CRANE => 'enum.repair_access_type.crane',
            self::BASKET_CRANE => 'enum.repair_access_type.basket_crane',
            self::ROPES => 'enum.repair_access_type.ropes',
            self::GROUND => 'enum.repair_access_type.ground',
        );
    }

    /**
     * @param int $type
     *
     * @return string
     */
    public static function getDecodedStringFromType(int $type)
    {
        return self::getEnumArray()[$type];
    }
}


text:
// Originally from UpdatedComponentTests/StandardTesting/REST/Rest_Post_PostBody_Parameter_NonMandatory_NotSet.xls;
package uk.co.exemel.disco.tests.updatedcomponenttests.standardtesting.rest;

import uk.co.exemel.testing.utils.disco.misc.XMLHelpers;
import uk.co.exemel.testing.utils.disco.assertions.AssertionUtils;
import uk.co.exemel.testing.utils.disco.beans.HttpCallBean;
import uk.co.exemel.testing.utils.disco.beans.HttpResponseBean;
import uk.co.exemel.testing.utils.disco.enums.DiscoMessageProtocolRequestTypeEnum;
import uk.co.exemel.testing.utils.disco.enums.DiscoMessageProtocolResponseTypeEnum;
import uk.co.exemel.testing.utils.disco.manager.DiscoManager;
import uk.co.exemel.testing.utils.disco.manager.RequestLogRequirement;

import org.testng.annotations.Test;
import org.w3c.dom.Document;

import javax.xml.parsers.DocumentBuilderFactory;
import java.io.ByteArrayInputStream;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;

/**
 * Ensure that when a Rest (XML/JSON) Post operation is performed against Disco, non-mandatory Post Body Params do not have to be set in the request or the response.
 */
public class RestPostPostBodyParameterNonMandatoryNotSetTest {
    @Test
    public void doTest() throws Exception {
        // Set up the Http Call Bean to make the request
        DiscoManager discoManager1 = DiscoManager.getInstance();
        HttpCallBean getNewHttpCallBean1 = discoManager1.getNewHttpCallBean("87.248.113.14");
        discoManager1 = discoManager1;

        getNewHttpCallBean1.setOperationName("nonMandatoryParamsOperation");

        getNewHttpCallBean1.setServiceName("baseline", "discoBaseline");

        getNewHttpCallBean1.setVersion("v2");

        Map map2 = new HashMap();
        map2.put("HeaderParam","headerParamString");
        getNewHttpCallBean1.setHeaderParams(map2);

        Map map3 = new HashMap();
        map3.put("queryParam","queryParamString");
        getNewHttpCallBean1.setQueryParams(map3);
        // Set the post body for the request, not setting one of the nonmandatory post body parameters
        getNewHttpCallBean1.setRestPostQueryObjects(DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream("<message><bodyParameter2>postBodyParamString2</bodyParameter2></message>".getBytes())));
        // Get current time for getting log entries later

        Timestamp getTimeAsTimeStamp9 = new Timestamp(System.currentTimeMillis());
        // Make the 4 REST calls to the operation
        discoManager1.makeRestDiscoHTTPCalls(getNewHttpCallBean1);
        // Create the expected response as an XML document (not expecting the missing nonmandatory body parameter)
        XMLHelpers xMLHelpers5 = new XMLHelpers();
        Document createAsDocument11 = xMLHelpers5.getXMLObjectFromString("<NonMandatoryParamsOperationResponseObject><bodyParameter2>postBodyParamString2</bodyParameter2><headerParameter>headerParamString</headerParameter><queryParameter>queryParamString</queryParameter></NonMandatoryParamsOperationResponseObject>");
        // Convert the expected response to REST types for comparison with actual responses
        Map<DiscoMessageProtocolRequestTypeEnum, Object> convertResponseToRestTypes12 = discoManager1.convertResponseToRestTypes(createAsDocument11, getNewHttpCallBean1);
        // Check the 4 responses are as expected
        HttpResponseBean response6 = getNewHttpCallBean1.getResponseObjectsByEnum(DiscoMessageProtocolResponseTypeEnum.RESTXMLXML);
        AssertionUtils.multiAssertEquals(convertResponseToRestTypes12.get(DiscoMessageProtocolRequestTypeEnum.RESTXML), response6.getResponseObject());
        AssertionUtils.multiAssertEquals((int) 200, response6.getHttpStatusCode());
        AssertionUtils.multiAssertEquals("OK", response6.getHttpStatusText());

        HttpResponseBean response7 = getNewHttpCallBean1.getResponseObjectsByEnum(DiscoMessageProtocolResponseTypeEnum.RESTJSONJSON);
        AssertionUtils.multiAssertEquals(convertResponseToRestTypes12.get(DiscoMessageProtocolRequestTypeEnum.RESTJSON), response7.getResponseObject());
        AssertionUtils.multiAssertEquals((int) 200, response7.getHttpStatusCode());
        AssertionUtils.multiAssertEquals("OK", response7.getHttpStatusText());

        HttpResponseBean response8 = getNewHttpCallBean1.getResponseObjectsByEnum(DiscoMessageProtocolResponseTypeEnum.RESTXMLJSON);
        AssertionUtils.multiAssertEquals(convertResponseToRestTypes12.get(DiscoMessageProtocolRequestTypeEnum.RESTJSON), response8.getResponseObject());
        AssertionUtils.multiAssertEquals((int) 200, response8.getHttpStatusCode());
        AssertionUtils.multiAssertEquals("OK", response8.getHttpStatusText());

        HttpResponseBean response9 = getNewHttpCallBean1.getResponseObjectsByEnum(DiscoMessageProtocolResponseTypeEnum.RESTJSONXML);
        AssertionUtils.multiAssertEquals(convertResponseToRestTypes12.get(DiscoMessageProtocolRequestTypeEnum.RESTXML), response9.getResponseObject());
        AssertionUtils.multiAssertEquals((int) 200, response9.getHttpStatusCode());
        AssertionUtils.multiAssertEquals("OK", response9.getHttpStatusText());

        // generalHelpers.pauseTest(500L);
        // Check the log entries are as expected

        discoManager1.verifyRequestLogEntriesAfterDate(getTimeAsTimeStamp9, new RequestLogRequirement("2.8", "nonMandatoryParamsOperation"),new RequestLogRequirement("2.8", "nonMandatoryParamsOperation"),new RequestLogRequirement("2.8", "nonMandatoryParamsOperation"),new RequestLogRequirement("2.8", "nonMandatoryParamsOperation") );
    }

}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="TeeJay Zajac's portfolio site, showcasing select design pieces.">
    <meta name="author" content="Tee Jay Zajac">
    <title>Tee Jay Zajac</title>

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">

    <link href="css/teejay2020.css" rel="stylesheet">

    <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.13.0/css/all.css" integrity="sha384-IIED/eyOkM6ihtOiQsX2zizxFBphgnv1zbe1bKA+njdFzkr6cDNy16jfIKWu4FNH" crossorigin="anonymous">

    <link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,700' rel='stylesheet' type='text/css'>

    <link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,400italic,700,700italic,300italic,300' rel='stylesheet' type='text/css'>
    <link rel="icon" href="img/favicon/favicon.ico" />
    <link rel="apple-touch-icon" sizes="57x57" href="img/favicon/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="img/favicon/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="img/favicon/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="img/favicon/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="img/favicon/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="img/favicon/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="img/favicon/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="img/favicon/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="img/favicon/apple-icon-180x180.png">
    <link rel="icon" type="image/png" sizes="192x192" href="img/favicon/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="img/favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="96x96" href="imgfavicon/favicon-96x96.png">
    <link rel="icon" type="image/png" sizes="16x16" href="img/favicon/favicon-16x16.png">
    <link rel="manifest" href="img/favicon/manifest.json">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="img/favicon/ms-icon-144x144.png">
    <meta name="theme-color" content="#ffffff">

                TeeJay Zajac
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">

                </button>

                            Work

                            About

                            Contact

TeeJay Zajac

Select Works

Work

The Daily Quarantine

Various Graphics

A daily graphic exercise during the 2020 novel coronavirus stay-at-home order. Early on in the pandemic, I felt there was a lot of misinformation floating around, so my goal was to create an infographic (based on CDC recommendations related to COVID-19) every weekday and post it on my Instagram story. I wanted to spread information to help keep people safe and touch on events and feelings during this time to connect with my audience.

View The Daily Quarantine case study

Roles: Graphic Design, Illustration

04-08-2020

04-27-2020

05-26-2020

06-10-2020

05-12-2020

06-12-2020

Assorted Graphics from The Daily Quarantine

Encore Galaxy Pavillion

Environmental Graphics

Client: Norwegian Cruise Lines

Designed in collaboration with Devin Meeks.

Environmental floor and door graphics created for the Galaxy Pavillion located on the Encore cruise ship. The client provided a quick video of the space, rough blueprint, and general measurements. They were looking to play up the galaxy theme while integrating our designs with their existing attractions and branding.

Design

All sides of the floor graphics were made intentionally organic (save for the video wall edge) to better hide the edges on the existing floor finish. Additionally, a natural edge should increase the durability as it will be harder to lift an edge cleanly.

Production & Installation

The large floor graphics were produced in 3-foot panels with bleeds and overlapping edges to make transportation and installation easier. Installation instructions were created and sent along with graphics.

Roles: Graphic Design, Prepress

Black Hole Graphic

Milky Way Graphic

Planet Graphic

Black Hole Graphic Installed

Milky Way Graphic Installed

Planet Graphic Installed

Security Enhancement Systems

Website

Client: Security Enhancement Systems

WordPress website for a job site security and technology company. I was solely responsible for the site's coding and design beyond the initial guidance of the homepage. To launch it, I had to coordinate with the SES development team remotely, as the timing was critical to not cause service interruption with their client's techs in the field.

Roles: Web Development, Illustration

Homepage

Advantage Page

Products Page

Brick Bandits EP

Vinyl Record

Client: Mad Decent Records

Vinyl record design and marketing collateral related to the launch of the Brick Bandits EP. I designed everything pertaining to the release except for the Brick Bandits Street Certified logo, which already existed. The direction from Mad Decent and the Brick Bandits was that one side of both the sleeve and label had to contain only that logo.

For the side that I was able to design, I took inspiration from the music itself, which is very sample-heavy, often taking pieces of house and electronic music and turning them into something new and fresh. I decided to reference the classic house music label Strictly Rhythm, and it's iconic "brick wall" record label design. It seemed fitting, especially for the Brick Bandits. Much like the music, I started with the existing Strictly Rhythm logo and "sampled" pieces until I had a custom type treatment that read "Brick Bandits."

Roles: Graphic Design, Type Design

Record Label A-Side

Record Label B-Side

Sleeve A-Side

Sleeve B-Side

Flyer August 2010

Flyer October 2010

Flyer September 2010

Brick Bandits EP on Spotify

Calculus with Early Transcendentals

Textbook & Product Landing Page

Client: Hawkes Learning

Textbook

Lead Designer of a collegiate-level mathematics textbook, over 1400 pages in length. I oversaw the book's design, layout, and production, including large scale web press print runs with quantities in the tens of thousands. Additionally, I illustrated all figures and unified the design of all mathematical graphs (which were often created in Mathematica then imported into Adobe Illustrator for editing and improvement).

Website Product Landing Page

Coded and deployed the product landing page for the company website.

Roles: Publication Design, Web Development, Illustration, Mathematical Graphics, Cover Design

Chapter 3 Project - Chapter 4 Opener

Chapter 11 Introduction - Section 11.1

Chapter 13 Review Exercises

Section 6.1

Answer Key Section 12.2

Index

CHD Interiors

Various Products

Client: CHD Interiors

Various print and digital ads for a South Carolina based furniture showroom and interior design firm. They supplied all copy, photos, and specific branding guidelines. I worked closely with CHD for design feedback. I would provide several different options to start, and we would go from there, often having another round or two of changes before designs became finalized.

Roles: Publication Design, Web Development

Graphic from the CHD Newsletter June 2019

Grand Strand Magazine Ad Aug-Sept 2019

Grand Strand Magazine Ad Oct-Nov 2019

Gift Certificate (Front)

Gift Certificate (Back)

Online Ad Aug 2019

About

Hello! I'm TeeJay Zajac, a designer based in beautiful Charleston, South Carolina. I have over 14 years of professional design experience making everything from websites to stickers and clothes. I enjoy being challenged and always strive to learn new things and further develop my talents. When not staring at (or through) a monitor agonizing over Design I enjoy DJing, photography, drawing, and running.

Thank you for taking the time out of your day to view my work!

Contact

If you are interested in my work or any possible collaborations, let's chat!

email: teejay.zajac@gmail.com

Subscribe

                            <form action="https://teejayzajac.us10.list-manage.com/subscribe/post?u=ffed4d3a42e8037b6ef82e7c8&id=279c8f8fdd" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>

                                    Subscribe to my newsletter! I promise I won't bombard you and it will always be filled with design goodies.
                                    <input type="email" value="" name="EMAIL" class="email form-control pb-2" id="mce-EMAIL" placeholder="email address" required>

<input type="text" name="b_ffed4d3a42e8037b6ef82e7c8_279c8f8fdd" tabindex="-1" value="">

                                        <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button btn btn-primary">

                            </form>

Follow TeeJay

Follow DJ Stumble

Copyright © TeeJay Zajac


text:
package ru.job4j.set;

import org.junit.Test;

import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;

/**
 * user's set on hash table base.
 */
public class SetHashTableTest {
    /**
     * test1.  Integer elements.
     */
    @Test
    public void whenSetOnHashTableBaseThenCorrectResults() {
        SetHashTable<Integer> setHash = new SetHashTable<>(5);
        setHash.add(9);
        setHash.add(45);
        setHash.add(21);
        setHash.add(21);
        setHash.add(21);
        setHash.add(47);
        setHash.add(15);
        setHash.add(37);
        setHash.add(1);
        setHash.add(3);
        for (int i = 0; i < setHash.getArrsize(); i++) {
            System.out.print(setHash.getObjects()[i] + "  ");
        }
        System.out.println();
        assertThat(setHash.contains(15), is(true));
        assertThat(setHash.contains(16), is(false));
        assertThat(setHash.contains(37), is(true));
        assertThat(setHash.remove(37), is(true));
        assertThat(setHash.contains(37), is(false));
        assertThat(setHash.contains(3), is(true));
        assertThat(setHash.remove(3), is(true));
        assertThat(setHash.contains(3), is(false));
        for (int i = 0; i < setHash.getArrsize(); i++) {
            System.out.print(setHash.getObjects()[i] + "  ");
        }
        System.out.println();
    }
    /**
     * test2. String elements.
     */
    @Test
    public void whenSetOnHashTableBaseStringElementsThenCorrectResults() {
        SetHashTable<String> setHash = new SetHashTable<>(5);
        setHash.add("A");
        setHash.add("B");
        setHash.add("C");
        setHash.add("D");
        setHash.add("E");
        setHash.add("F");
        setHash.add("G");
        setHash.add("H");
        for (int i = 0; i < setHash.getArrsize(); i++) {
            System.out.print(setHash.getObjects()[i] + "  ");
        }
        System.out.println();
        assertThat(setHash.contains("B"), is(true));
        assertThat(setHash.contains("J"), is(false));
        assertThat(setHash.remove("F"), is(true));
        assertThat(setHash.remove("C"), is(true));
        for (int i = 0; i < setHash.getArrsize(); i++) {
            System.out.print(setHash.getObjects()[i] + "  ");
        }
        System.out.println();
    }
}


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Collections.Generic;
using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.DocumentationComments;
using Microsoft.CodeAnalysis.LanguageServices;
using Microsoft.CodeAnalysis.Shared.Extensions;
using Microsoft.CodeAnalysis.SignatureHelp;
using Roslyn.Utilities;

namespace Microsoft.CodeAnalysis.CSharp.SignatureHelp
{
    internal partial class InvocationExpressionSignatureHelpProviderBase
    {
        private static IList<SignatureHelpItem>? GetDelegateInvokeItems(
            InvocationExpressionSyntax invocationExpression, SemanticModel semanticModel, IStructuralTypeDisplayService structuralTypeDisplayService,
            IDocumentationCommentFormattingService documentationCommentFormattingService, ISymbol within, INamedTypeSymbol delegateType, out int? selectedItem, CancellationToken cancellationToken)
        {
            selectedItem = null;
            var invokeMethod = delegateType.DelegateInvokeMethod;
            if (invokeMethod == null)
            {
                return null;
            }

            // Events can only be invoked directly from the class they were declared in.
            var expressionSymbol = semanticModel.GetSymbolInfo(invocationExpression.Expression, cancellationToken).GetAnySymbol();
            if (expressionSymbol.IsKind(SymbolKind.Event) &&
                !expressionSymbol.ContainingType.OriginalDefinition.Equals(within.OriginalDefinition))
            {
                return null;
            }

            return GetDelegateOrFunctionPointerInvokeItems(invocationExpression, invokeMethod, semanticModel, structuralTypeDisplayService, documentationCommentFormattingService, out selectedItem, cancellationToken);
        }

        private static IList<SignatureHelpItem> GetFunctionPointerInvokeItems(
            InvocationExpressionSyntax invocationExpression, SemanticModel semanticModel, IStructuralTypeDisplayService structuralTypeDisplayService,
            IDocumentationCommentFormattingService documentationCommentFormattingService, IFunctionPointerTypeSymbol functionPointerType, out int? selectedItem, CancellationToken cancellationToken)
        {
            return GetDelegateOrFunctionPointerInvokeItems(invocationExpression, functionPointerType.Signature, semanticModel, structuralTypeDisplayService, documentationCommentFormattingService, out selectedItem, cancellationToken);
        }

        private static IList<SignatureHelpItem> GetDelegateOrFunctionPointerInvokeItems(InvocationExpressionSyntax invocationExpression, IMethodSymbol invokeMethod, SemanticModel semanticModel, IStructuralTypeDisplayService structuralTypeDisplayService, IDocumentationCommentFormattingService documentationCommentFormattingService, out int? selectedItem, CancellationToken cancellationToken)
        {
            var position = invocationExpression.SpanStart;
            var item = CreateItem(
                invokeMethod, semanticModel, position,
                structuralTypeDisplayService,
                isVariadic: invokeMethod.IsParams(),
                documentationFactory: null,
                prefixParts: GetDelegateOrFunctionPointerInvokePreambleParts(invokeMethod, semanticModel, position),
                separatorParts: GetSeparatorParts(),
                suffixParts: GetDelegateOrFunctionPointerInvokePostambleParts(),
                parameters: GetDelegateOrFunctionPointerInvokeParameters(invokeMethod, semanticModel, position, documentationCommentFormattingService, cancellationToken));

            // Since we're returning a single item, we can selected it as the "best one".
            selectedItem = 0;

            return SpecializedCollections.SingletonList(item);
        }

        private static IList<SymbolDisplayPart> GetDelegateOrFunctionPointerInvokePreambleParts(IMethodSymbol invokeMethod, SemanticModel semanticModel, int position)
        {
            var displayParts = new List<SymbolDisplayPart>();
            displayParts.AddRange(invokeMethod.ReturnType.ToMinimalDisplayParts(semanticModel, position));
            displayParts.Add(Space());

            if (invokeMethod.MethodKind == MethodKind.FunctionPointerSignature)
            {
                displayParts.Add(Keyword(SyntaxKind.DelegateKeyword));
                displayParts.Add(Operator(SyntaxKind.AsteriskToken));
            }
            else
            {
                displayParts.AddRange(invokeMethod.ContainingType.ToMinimalDisplayParts(semanticModel, position));
            }

            displayParts.Add(Punctuation(SyntaxKind.OpenParenToken));

            return displayParts;
        }

        private static IList<SignatureHelpSymbolParameter> GetDelegateOrFunctionPointerInvokeParameters(
            IMethodSymbol invokeMethod, SemanticModel semanticModel, int position, IDocumentationCommentFormattingService formattingService, CancellationToken cancellationToken)
        {
            var result = new List<SignatureHelpSymbolParameter>();

            foreach (var parameter in invokeMethod.Parameters)
            {
                cancellationToken.ThrowIfCancellationRequested();
                result.Add(new SignatureHelpSymbolParameter(
                    parameter.Name,
                    parameter.IsOptional,
                    parameter.GetDocumentationPartsFactory(semanticModel, position, formattingService),
                    parameter.ToMinimalDisplayParts(semanticModel, position)));
            }

            return result;
        }

        private static IList<SymbolDisplayPart> GetDelegateOrFunctionPointerInvokePostambleParts()
        {
            return SpecializedCollections.SingletonList(
                Punctuation(SyntaxKind.CloseParenToken));
        }
    }
}