text:
import sys
import json

PACKET_LABELS = ["initial", "0rtt", "handshake", "1rtt"]

def handle_packet_lost(events, idx):
    return {
        "time": events[idx]["time"],
        "name": "recovery:packet_lost",
        "data": {
            "header": {
                "packet_type": PACKET_LABELS[events[idx]["packet-type"]],
                "packet_number": events[idx]["pn"]
            }
        }
    }

def handle_packet_received(events, idx):
    frames = []
    acked = []
    for i in range(idx+1, len(events)):
        ev = events[i]
        if ev["type"] == "packet-prepare" or ev["type"] in QLOG_EVENT_HANDLERS:
            break

        # An ACK frame can't be re-composed in an iteration. Continue buffering
        # the ACK blocks until all the blocks are processed.
        if ev["type"] == "ack-block-received":
            acked.append([ev["ack-block-begin"],ev["ack-block-end"]])
            continue
        elif ev["type"] == "ack-delay-received":
            frames.append(render_ack_frame(acked))
            continue

        handler = FRAME_EVENT_HANDLERS.get(ev["type"])
        if handler:
            frames.append(handler(ev))

    ret = {
        "time": events[idx]["time"],
        "name": "transport:packet_received",
        "data": {
            "header": {
                "packet_type": PACKET_LABELS[events[idx]["packet-type"]],
                "packet_number": events[idx]["pn"]
            },
            "frames": frames
        }
    }

    # draft-ietf-quic-qlog-quic-events A.8:
    # ; only if packet_type === "initial" || "handshake" || "0RTT"
    # ; Signifies length of the packet_number plus the payload
    #
    # packet-type == 3: 1-RTT
    if events[idx]["packet-type"] != 3:
        ret["length"] = events[idx]["decrypted-len"]

    return ret

def handle_packet_sent(events, idx):
    frames = []
    i = idx-1
    while i >= 0 and events[i]["type"] != "packet-prepare":
        handler = FRAME_EVENT_HANDLERS.get(events[i]["type"])
        if handler:
            frames.append(handler(events[i]))
        i -= 1

    ret = {
        "time": events[idx]["time"],
        "name": "transport:packet_sent",
        "data": {
            "header": {
                "packet_type": PACKET_LABELS[events[idx]["packet-type"]],
                "packet_number": events[idx]["pn"]
            },
            "frames": frames
        }
    }

    if events[idx]["packet-type"] != 3:
        ret["length"] = events[idx]["len"]

    return ret

def handle_ack_send(event):
    return render_ack_frame([[event["largest-acked"]]])

def handle_data_blocked_receive(event):
    return {
        "frame_type": "data_blocked"
    }

def handle_data_blocked_send(event):
    return {
        "frame_type": "data_blocked"
    }

def handle_handshake_done_receive(event):
    return {
        "frame_type": "handshake_done",
    }

def handle_handshake_done_send(event):
    return {
        "frame_type": "handshake_done",
    }

def handle_max_data_receive(event):
    return {
        "frame_type": "max_data",
        "maximum": event["maximum"]
    }

def handle_max_data_send(event):
    return {
        "frame_type": "max_data",
        "maximum": event["maximum"]
    }

def handle_max_streams_send(event):
    if event["is-unidirectional"]:
        stream_type = "unidirectional"
    else:
        stream_type = "bidirectional"
    return {
        "frame_type": "max_streams",
        "stream_type": stream_type,
        "maximum": event["maximum"]
    }

def handle_max_streams_receive(event):
    if event["is-unidirectional"]:
        stream_type = "unidirectional"
    else:
        stream_type = "bidirectional"
    return {
        "frame_type": "max_streams",
        "stream_type": stream_type,
        "maximum": event["maximum"]
    }

def handle_max_stream_data_receive(event):
    return {
        "frame_type": "max_stream_data",
        "stream_id": event["stream-id"],
        "maximum": event["maximum"]
    }

def handle_max_stream_data_send(event):
    return {
        "frame_type": "max_stream_data",
        "stream_id": event["stream-id"],
        "maximum": event["maximum"]
    }

def handle_new_connection_id_receive(event):
    return {
        "frame_type": "new_connection_id",
        "sequence_number": event["sequence"],
        "retire_prior_to": event["retire-prior-to"],
        "connection_id": event["cid"],
        "stateless_reset_token": event["stateless-reset-token"]
    }

def handle_new_connection_id_send(event):
    return {
        "frame_type": "new_connection_id",
        "sequence_number": event["sequence"],
        "retire_prior_to": event["retire-prior-to"],
        "connection_id": event["cid"],
        "stateless_reset_token": event["stateless-reset-token"]
    }

def handle_new_token_receive(event):
    return {
        "frame_type": "new_token",
        "token": event["token"],
        "generation": event["generation"]
    }

def handle_new_token_send(event):
    return {
        "frame_type": "new_token",
        "token": event["token"],
        "generation": event["generation"]
    }

def handle_ping_receive(event):
    return {
        "frame_type": "ping",
    }

def handle_retire_connection_id_receive(event):
    return {
        "frame_type": "retire_connection_id",
        "sequence_number": event["sequence"]
    }

def handle_retire_connection_id_send(event):
    return {
        "frame_type": "retire_connection_id",
        "sequence_number": event["sequence"]
    }

def handle_stream_data_blocked_receive(event):
    return {
        "frame_type": "stream_data_blocked",
        "stream_id": event["stream-id"],
        "maximum": event["maximum"]
    }

def handle_stream_data_blocked_send(event):
    return {
        "frame_type": "stream_data_blocked",
        "stream_id": event["stream-id"],
        "maximum": event["maximum"]
    }

def handle_stream_on_receive_reset(event):
    return {
        "frame_type": "reset_stream",
        "stream_id": event["stream-id"],
        "error_code": event["err"]
    }

def handle_stream_receive(event):
    label = "stream" if event["stream-id"] >= 0 else "crypto"
    return {
        "frame_type": label,
        "stream_id": event["stream-id"],
        "length": event["len"],
        "offset": event["off"]
    }

def handle_stream_send(event):
    label = "stream" if event["stream-id"] >= 0 else "crypto"
    return {
        "frame_type": label,
        "stream_id": event["stream-id"],
        "length": event["len"],
        "offset": event["off"]
    }

def handle_stream_on_send_stop(event):
    return {
        "frame_type": "stop_sending",
        "stream_id": event["stream-id"]
    }

def handle_streams_blocked_receive(event):
    if event["is-unidirectional"]:
      stream_type = "unidirectional"
    else:
      stream_type = "bidirectional"
    return {
        "frame_type": "streams_blocked",
        "stream_type": stream_type,
        "maximum": event["maximum"]
    }

def handle_streams_blocked_send(event):
    if event["is-unidirectional"]:
      stream_type = "unidirectional"
    else:
      stream_type = "bidirectional"
    return {
        "frame_type": "streams_blocked",
        "stream_type": stream_type,
        "maximum": event["maximum"]
    }

def handle_transport_close_receive(event):
    return {
        "frame_type": "connection_close",
        "offending_frame_type": event["frame-type"],
        "error_code": event["error-code"],
        "reason": event["reason-phrase"]
    }

def handle_transport_close_send(event):
    return {
        "frame_type": "connection_close",
        "offending_frame_type": event["frame-type"],
        "error_code": event["error-code"],
        "reason": event["reason-phrase"]
    }

def render_ack_frame(ranges):
    return {
        "frame_type": "ack",
        "acked_ranges": ranges
    }

QLOG_EVENT_HANDLERS = {
    "packet-lost": handle_packet_lost,
    "packet-received": handle_packet_received,
    "packet-sent": handle_packet_sent
}

FRAME_EVENT_HANDLERS = {
    "ack-send": handle_ack_send,
    "data-blocked-receive": handle_data_blocked_receive,
    "data-blocked-send": handle_data_blocked_send,
    "handshake-done-receive": handle_handshake_done_receive,
    "handshake-done-send": handle_handshake_done_send,
    "max-data-receive": handle_max_data_receive,
    "max-data-send": handle_max_data_send,
    "max-streams-send": handle_max_streams_send,
    "max-streams-receive": handle_max_streams_receive,
    "max-stream-data-receive": handle_max_stream_data_receive,
    "max-stream-data-send": handle_max_stream_data_send,
    "new-connection-id-receive": handle_new_connection_id_receive,
    "new-connection-id-send": handle_new_connection_id_send,
    "new-token-receive": handle_new_token_receive,
    "new-token-send": handle_new_token_send,
    "ping-receive": handle_ping_receive,
    "retire-connection-id-receive": handle_retire_connection_id_receive,
    "retire-connection-id-send": handle_retire_connection_id_send,
    "stream-data-blocked-receive": handle_stream_data_blocked_receive,
    "stream-data-blocked-send": handle_stream_data_blocked_send,
    "stream-on-receive-reset": handle_stream_on_receive_reset,
    "stream-send": handle_stream_send,
    "streams-blocked-receive": handle_streams_blocked_receive,
    "streams-blocked-send": handle_streams_blocked_send,
    "stream-on-send-stop": handle_stream_on_send_stop,
    "stream-receive": handle_stream_receive,
    "transport-close-receive": handle_transport_close_receive,
    "transport-close-send": handle_transport_close_send
}

def usage():
    print(r"""
Usage:
    ./misc/qlog-adapter.py [inTrace.jsonl]

    If the argument is omitted, inTrace will be read from stdin.
""".strip())

def load_quicly_events(infile):
    events = []
    for line in infile:
        events.append(json.loads(line))
    return events

def main():
    if len(sys.argv) > 2:
        usage()
        sys.exit(1)

    if len(sys.argv) == 1:
        infile = sys.stdin
    else:
        (_, fn) = sys.argv
        try:
            infile = open(fn, "r")
        except OSError as e:
            sys.exit("Failed to open %s: %s" % (fn, e.strerror))

    source_events = load_quicly_events(infile)
    print(json.dumps({
        "qlog_format": "NDJSON",
        "qlog_version": "draft-02",
        "title": "h2o/quicly qlog",
        "trace": {
            "vantage_point": {
                "type": "server"
            },
            "common_fields": {
                "protocol_type": "QUIC_HTTP3",
                "time_format": "absolute"
            }
        }
    }))
    for i, event in enumerate(source_events):
        handler = QLOG_EVENT_HANDLERS.get(event["type"])
        if handler:
            print(json.dumps(handler(source_events, i)))

if __name__ == "__main__":
    main()


text:
var ProgrammeService = angular.module('ProgrammeService', [])
    .service('Programme', function () {
        this.items = [
            {
                id:1,
                title:'Doc Martin',
                synopsis:'Comedy drama about the famously curmudgeonly GP. Martin'+
                'is talked into taking James to playgroup, while Ruth is having problems with her new neighbours.',
                duration:'46m',
                daysLeft:'28',
                dateTimeStart:' Friday 26 Jun 9:00pm',
                thumbnail:'http://www.covervidz.com/hero.png'
            },
            {
                id:2,
                title:'Coronation Street',
                synopsis:'Nick\'s world is turned upside down. Tracy is sick of Brian Carping on. Norris and' +
                'Mary get competitive over the pub quiz',
                duration:'22m',
                daysLeft:'28',
                dateTimeStart:' Friday 26 Jun 8:30pm',
                thumbnail:'http://www.covervidz.com/programme.png'
            },
            {  id:3,
                title:'Block Work',
                synopsis:'Thriller. When her detective husband is murdered, PC Jo ' +
                'Gillespie is expected to leave it to her colleagues in the force to find' +
                'his killer. But can Jo trust her police family?',
                duration:'46m',
                daysLeft: 23,
                dateTimeStart:' Sunday 21 Jun 9:00pm',
                thumbnail:'http://www.covervidz.com/hero.png'
            },
            {
                id:4,
                title:'Coronation Street',
                synopsis:'Nick\'s world is turned upside down. Tracy is sick of Brian Carping on. Norris and' +
                'Mary get competitive over the pub quiz',
                duration:'22m',
                daysLeft:28,
                dateTimeStart:' Friday 26 Jun 8:30pm',
                thumbnail:'http://www.covervidz.com/programme.png',

            }
        ];
            this.reccomended = [
                {
                    id:1,
                    title:'Coronation Street',
                    synopsis:'Comedy drama about the famously curmudgeonly GP. Martin'+
                    'is talked into taking James to playgroup, while Ruth is having problems with her new neighbours.',
                    duration:'46m',
                    daysLeft:'',
                    timeLeft:'9 hours',
                    dateTimeStart:' Friday 26 Jun 9:00pm',
                    thumbnail:'http://www.covervidz.com/hero.png'
                }
            ];
            this.promoted =
                {
                    id:1,
                    title:'Emmerdale',
                    synopsis:'Debbie was drawn to Ross. Marlon suggests Laurel comes home. Aaron fears Cain is a loose cannon',
                    duration:'46m',
                    daysLeft:28,
                    dateTimeStart:' Friday 26 Jun 7:00pm',
                    thumbnail:'http://www.covervidz.com/hero.png'
                }
            ;
    });

redpajama_set_name: RedPajamaGithub


text:
package org.optimus.job.impl;

import org.optimus.job.AbstractJob;
import org.optimus.model.job.JobBean;

public class DefaultJobImpl extends AbstractJob {

	private JobBean job = new JobBean();

	public DefaultJobImpl(String name) {
		job.setName(name);
	}

	public String getName() {
		return job.getName();
	}

	@Override
	public String toString() {
		return "DefaultJob [name=" + job + "]";
	}
}


text:
layout: data_model
title: CampaignsType
this_version: 1.2
---

CampaignsTypeReport Schema

      <form id="nav-version">
        <select>

            <option value="1.2" selected="selected">STIX 1.2</option>

        </select>
      </form>

Fields

      Field Name
      Type
      Description

      Campaign1..n

          CampaignBaseType

Characterizes a single cyber threat Campaign.

This field is implemented through the xsi:type extension mechanism. The default and strongly recommended type is CampaignType in the http://stix.mitre.org/Campaign-1 namespace. This type is defined in the campaign.xsd file or at the URL http://stix.mitre.org/XMLSchema/campaign/1.2/campaign.xsd.


text:
.PHONY: build_bird build_backend publish_bird publish_backend \
	build_publish_all run .run_db .run_bird .run_backend clean

REGISTRY ?= need.to.find.a.registry.com:5000
ORG ?= whuff739orsomething
BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
TAG ?= $(shell date +%Y%m%d%H%M%S)

build_bird:
	docker build -t drinky-bird-mtas -f drinky-bird/Dockerfile .

build_backend:
	docker build -t backend-mtas -f backend/Dockerfile .

build_publish_all: publish_bird publish_backend

run: build_bird build_backend .run_db .run_bird .run_backend

.run_db:
	docker run -d \
		--name=mongo-mtas \
		-p 27017:27017 \
		mongo:3.4.2
	sleep 5

.run_bird:
	docker run -d \
		--name=drinky-bird-mtas \
		--link=mongo-mtas \
		drinky-brid-mtas

.run_backend:

clean:
	-docker stop drinky-bird-mtas backend-mtas db-mtas
	-docker rm drinky-bird-mtas backend-mtas db-mtas
	-docker rmi drinky-bird-mtas backend-mtas db-mtas

publish_bird: build_bird
	docker tag drinky-bird-mtas ${REGISTRY}/${ORG}/drinky-bird:${TAG}
	docker push ${REGISTRY}/${ORG}/drinky-bird:${TAG}

publish_backend: build_backend
	docker tag backend-mtas ${REGISTRY}/${ORG}/backend-mtas:${TAG}
	docker push ${REGISTRY}/${ORG}/backend-mtas:${TAG}


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('terms', '0001_initial'),
    ]

    operations = [
        migrations.AlterField(
            model_name='termsandconditions',
            name='markdown',
            field=models.TextField(help_text='Formatted in Markdown', verbose_name='Terms and conditions'),
        ),
    ]


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/xhtml;charset=UTF-8"/>
<title>SoundCity Prototyp: Classes/MLog.h Quellcode</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>

Hauptseite

Zusätzliche Informationen

Klassen

Dateien

Auflistung der Dateien

Datei-Elemente

Classes/MLog.h
gehe zur Dokumentation dieser Datei

00001 //
00002 //  MLog.h
00003 //  SoundCity
00004 //
00005 //  Created by administrator on 02.11.09.
00006 //  Copyright 2009 init ag. All rights reserved.
00007 //
00008
00009 #import <Foundation/Foundation.h>
00010
00011
00012 @interface MLog : NSObject
00013 {
00014 }
00015 +(void)logFile:(char*)sourceFile lineNumber:(int)lineNumber format:(NSString*)format, ...;
00016 +(void)setLogOn:(BOOL)logOn;
00017 @end
00018

<address style="text-align: right;">Erzeugt am Thu Nov 12 17:19:32 2009 für SoundCity Prototyp von

 1.6.1 </address>


text:
package opticnav.web.controllers.rest.pojo.map;

import opticnav.persistence.web.map.Marker;

public class MarkerPOJO {
    public static class InfoPOJO {
        public String name;
    }
    public InfoPOJO info;
    public GPSPOJO gps;

    public MarkerPOJO(Marker m) {
        this.info = new InfoPOJO();
        this.gps = new GPSPOJO();
        this.info.name = m.getName();
        this.gps.lng = m.getLng();
        this.gps.lat = m.getLat();
    }

    public MarkerPOJO() {
    }
}


text:
package com.amazonaws.services.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CancelImportTaskRequestMarshaller;

/**
 *
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CancelImportTaskRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<CancelImportTaskRequest> {

    /**
     *

     * The reason for canceling the task.
     *

     */
    private String cancelReason;
    /**
     *

     * The ID of the import image or import snapshot task to be canceled.
     *

     */
    private String importTaskId;

    /**
     *

     * The reason for canceling the task.
     *

     *
     * @param cancelReason
     *        The reason for canceling the task.
     */

    public void setCancelReason(String cancelReason) {
        this.cancelReason = cancelReason;
    }

    /**
     *

     * The reason for canceling the task.
     *

     *
     * @return The reason for canceling the task.
     */

    public String getCancelReason() {
        return this.cancelReason;
    }

    /**
     *

     * The reason for canceling the task.
     *

     *
     * @param cancelReason
     *        The reason for canceling the task.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CancelImportTaskRequest withCancelReason(String cancelReason) {
        setCancelReason(cancelReason);
        return this;
    }

    /**
     *

     * The ID of the import image or import snapshot task to be canceled.
     *

     *
     * @param importTaskId
     *        The ID of the import image or import snapshot task to be canceled.
     */

    public void setImportTaskId(String importTaskId) {
        this.importTaskId = importTaskId;
    }

    /**
     *

     * The ID of the import image or import snapshot task to be canceled.
     *

     *
     * @return The ID of the import image or import snapshot task to be canceled.
     */

    public String getImportTaskId() {
        return this.importTaskId;
    }

    /**
     *

     * The ID of the import image or import snapshot task to be canceled.
     *

     *
     * @param importTaskId
     *        The ID of the import image or import snapshot task to be canceled.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public CancelImportTaskRequest withImportTaskId(String importTaskId) {
        setImportTaskId(importTaskId);
        return this;
    }

    /**
     * This method is intended for internal use only. Returns the marshaled request configured with additional
     * parameters to enable operation dry-run.
     */
    @Override
    public Request<CancelImportTaskRequest> getDryRunRequest() {
        Request<CancelImportTaskRequest> request = new CancelImportTaskRequestMarshaller().marshall(this);
        request.addParameter("DryRun", Boolean.toString(true));
        return request;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getCancelReason() != null)
            sb.append("CancelReason: ").append(getCancelReason()).append(",");
        if (getImportTaskId() != null)
            sb.append("ImportTaskId: ").append(getImportTaskId());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof CancelImportTaskRequest == false)
            return false;
        CancelImportTaskRequest other = (CancelImportTaskRequest) obj;
        if (other.getCancelReason() == null ^ this.getCancelReason() == null)
            return false;
        if (other.getCancelReason() != null && other.getCancelReason().equals(this.getCancelReason()) == false)
            return false;
        if (other.getImportTaskId() == null ^ this.getImportTaskId() == null)
            return false;
        if (other.getImportTaskId() != null && other.getImportTaskId().equals(this.getImportTaskId()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getCancelReason() == null) ? 0 : getCancelReason().hashCode());
        hashCode = prime * hashCode + ((getImportTaskId() == null) ? 0 : getImportTaskId().hashCode());
        return hashCode;
    }

    @Override
    public CancelImportTaskRequest clone() {
        return (CancelImportTaskRequest) super.clone();
    }
}


text:
layout: page
title: 文本盲水印
categories:
tags:
keywords:
description:
---

<iframe src="/pictures_for_blog/app/text_watermark/v1.html" width="100%" height="1000em" marginwidth="10%"></iframe>


text:
package io.datarouter.tasktracker.storage;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Singleton;

import io.datarouter.instrumentation.task.TaskTrackerBatchDto;
import io.datarouter.scanner.Scanner;
import io.datarouter.storage.Datarouter;
import io.datarouter.storage.client.ClientId;
import io.datarouter.storage.dao.BaseDao;
import io.datarouter.storage.dao.BaseRedundantDaoParams;
import io.datarouter.storage.node.factory.NodeFactory;
import io.datarouter.storage.node.op.combo.SortedMapStorage;
import io.datarouter.storage.node.op.combo.SortedMapStorage.SortedMapStorageNode;
import io.datarouter.storage.tag.Tag;
import io.datarouter.tasktracker.storage.LongRunningTask.LongRunningTaskFielder;
import io.datarouter.util.tuple.Range;
import io.datarouter.virtualnode.redundant.RedundantSortedMapStorageNode;

@Singleton
public class LongRunningTaskDao extends BaseDao{

	public static class LongRunningTaskDaoParams extends BaseRedundantDaoParams{

		public LongRunningTaskDaoParams(List<ClientId> clientId){
			super(clientId);
		}

	}

	private final SortedMapStorageNode<LongRunningTaskKey,LongRunningTask,LongRunningTaskFielder> node;

	@Inject
	public LongRunningTaskDao(Datarouter datarouter, NodeFactory nodeFactory, LongRunningTaskDaoParams params){
		super(datarouter);
		node = Scanner.of(params.clientIds)
				.map(clientId -> {
					SortedMapStorageNode<LongRunningTaskKey,LongRunningTask,LongRunningTaskFielder> node =
							nodeFactory.create(clientId, LongRunningTask::new, LongRunningTaskFielder::new)
							.withTag(Tag.DATAROUTER)
							.disableNodewatchPercentageAlert()
							.build();
					return node;
				})
				.listTo(RedundantSortedMapStorageNode::makeIfMulti);
		datarouter.register(node);
	}

	public SortedMapStorage<LongRunningTaskKey,LongRunningTask> getNode(){
		return node;
	}

	public Scanner<LongRunningTask> scan(){
		return node.scan();
	}

	public Scanner<LongRunningTask> scan(Range<LongRunningTaskKey> range){
		return node.scan(range);
	}

	public Scanner<LongRunningTask> scanWithPrefix(LongRunningTaskKey prefix){
		return node.scanWithPrefix(prefix);
	}

	public Scanner<LongRunningTaskKey> scanKeysWithPrefix(LongRunningTaskKey prefix){
		return node.scanKeysWithPrefix(prefix);
	}

	public void deleteBatched(Scanner<LongRunningTaskKey> keys){
		node.deleteBatched(keys);
	}

	public Scanner<TaskTrackerBatchDto> scanAll(int batchSize){
		// probably not necessary to scan the whole table and send everything
		// TODO figure out what data we want to send and add some filtering
		return node.scan()
				.map(LongRunningTask::toDto)
				.batch(batchSize)
				.map(TaskTrackerBatchDto::new);
	}

}


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 The Chromium Authors. All rights reserved.
     Use of this source code is governed by a BSD-style license that can be
     found in the LICENSE file. -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <TextView
        android:id="@+id/menu_row_text"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        style="@style/RevampedContextMenuItemText" />
    <!-- We use tools:ignore instead of android:importantForAccessibility="no" here because this
         view is important for accessibility, but we don't have a content description yet. -->
    <ImageView
        android:id="@+id/menu_row_share_icon"
        android:layout_width="@dimen/list_item_end_icon_width"
        android:layout_height="match_parent"
        android:scaleType="fitCenter"
        android:paddingTop="12dp"
        android:paddingBottom="12dp"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        android:background="?attr/selectableItemBackground"
        android:visibility="gone"
        tools:ignore="contentDescription" />
</LinearLayout>


text:
// Copyright (c) 2010-2013 Turbulenz Limited

//
//  SceneLoader
//  ===========
//
//  Helper class to load() a scene and wait for its dependencies before complete() is true
//

/*global TurbulenzEngine: false*/
/*global ResourceLoader: false*/

function SceneLoader() {}

SceneLoader.prototype =
{
    complete : function sceneLoaderCompleteFn()
    {
        if (!this.dependenciesLoaded)
        {
            if (this.sceneAssetsRequested &&
                0 === this.textureManager.getNumPendingTextures() &&
                (!this.shaderManager || 0 === this.shaderManager.getNumPendingShaders()))
            {
                this.dependenciesLoaded = true;
            }
        }
        return this.dependenciesLoaded;
    },
    load : function sceneLoaderLoadFn(parameters)
    {
        var sceneLoader = this; // required for context in nested functions

        this.sceneAssetsRequested = false;

        this.scene = parameters.scene;
        this.assetPath = parameters.assetPath;
        this.textureManager = parameters.textureManager;
        this.shaderManager = parameters.shaderManager;
        this.effectManager = parameters.effectManager;
        this.animationManager = parameters.animationManager;
        this.requestHandler = parameters.requestHandler;

        if (parameters.keepLights !== undefined)
        {
            this.keepLights = parameters.keepLights;
        }
        if (parameters.keepCameras !== undefined)
        {
            this.keepCameras = parameters.keepCameras;
        }
        this.preSceneLoadFn = parameters.preSceneLoadFn;
        this.postSceneLoadFn = parameters.postSceneLoadFn;
        this.dependenciesLoaded = false;
        this.sceneLoaded = false;

        if (!parameters.append)
        {
            this.scene.clear();
        }

        var pathRemapping = this.pathRemapping;
        var requestHandler = this.requestHandler;
        function requestFn(url, onload)
        {
            requestHandler.request({
                    src: (pathRemapping && pathRemapping[url]) || (this.pathPrefix + url),
                    onload: onload
                });
        }

        if (parameters.request)
        {
            this.request = parameters.request;
        }
        else
        {
            this.request = requestFn;
        }

        // Create a callback for post scene load
        function loadSceneFinishedFn()
        {
            if (sceneLoader.postSceneLoadFn)
            {
                //Add custom logic
                sceneLoader.postSceneLoadFn(sceneLoader.scene);
            }
            sceneLoader.sceneAssetsRequested = true;
        }

        // Callback function to pass to the below request()
        function sceneReceivedFn(text/*, status*/)
        {
            var sceneData = JSON.parse(text);

            if (!sceneData)
            {
                // Doesn't exist, create an empty data object to preload into the scene
                sceneData = {};
            }

            if (parameters.preSceneLoadFn)
            {
                //Add custom nodes
                parameters.preSceneLoadFn(sceneData);
            }

            // Set a yield callback for loading, for the sample don't do anything special
            function sceneLoadYieldFn(callback)
            {
                TurbulenzEngine.setTimeout(callback, 0);
            }

            function begetFn(o)
            {
                var F = function () { };
                F.prototype = o;
                return new F();
            }

            var loadParameters = begetFn(parameters);

            // Set a sceneLoad callback to load the resource into the scene
            function sceneLoadFn(resolvedData)
            {
                // If we were supplied an animation manager, let that load any animations from the resolved data
                if (sceneLoader.animationManager)
                {
                    sceneLoader.animationManager.loadData(resolvedData);
                }

                loadParameters.data = resolvedData;
                loadParameters.yieldFn = sceneLoadYieldFn;
                loadParameters.onload = loadSceneFinishedFn;

                sceneLoader.scene.load(loadParameters);
            }

            // Create a resource loader to resolve any references in the scene data
            var resourceLoader = ResourceLoader.create();
            resourceLoader.resolve({
                data : sceneData,
                request : this.request,
                onload : sceneLoadFn,
                requestHandler : requestHandler
            });
        }

        this.request(parameters.assetPath, sceneReceivedFn);
    },

    setPathRemapping : function setPathRemappingFn(prm, assetUrl)
    {
        this.pathRemapping = prm;
        this.pathPrefix = assetUrl;
    }
};

SceneLoader.create = function sceneLoaderCreateFn()
{
    var sceneLoader = new SceneLoader();

    sceneLoader.scene = null;
    sceneLoader.assetPath = null;
    sceneLoader.textureManager = null;
    sceneLoader.shaderManager = null;
    sceneLoader.effectManager = null;
    sceneLoader.animationManager = null;
    sceneLoader.preSceneLoadFn = null;
    sceneLoader.postSceneLoadFn = null;
    sceneLoader.dependenciesLoaded = false;
    sceneLoader.sceneAssetsRequested = false;

    sceneLoader.pathPrefix = "";

    return sceneLoader;
};


text:
function cor_deriv = full_func_cor_deriv_gauss(elong, elong_spread, ...
    alph,alph_spread, tau,a,b, deriv,full_func_cor)
% takes derivative of expectation value of autocorrelation at give point
%   Detailed explanation goes here

    if deriv == 0
        cor_deriv = full_func_cor(elong, elong_spread, alph, alph_spread,tau,a,b);
    elseif deriv == 1
        cor_deriv = full_func_cor(elong, elong_spread, alph, alph_spread,tau+1,a,b) -  ...
            full_func_cor(elong, elong_spread, alph, alph_spread,tau,a,b);
    else
        first = full_func_cor(elong, elong_spread, alph, alph_spread,tau,a,b);
        if first == 0 && tau == 1
            debug = true;
        end
        second = full_func_cor(elong, elong_spread, alph, alph_spread,tau + 1,a,b);
        third = full_func_cor(elong, elong_spread, alph, alph_spread,tau + 2,a, b);
        cor_deriv = third + first - 2 * second;
    end
    cor_deriv = cor_deriv / full_func_cor(elong, elong_spread, alph, alph_spread,1,a,b);

end


text:
import "reflect-metadata";
import {closeTestingConnections, createTestingConnections, reloadTestingDatabases} from "../../../utils/test-utils";
import {Connection} from "../../../../src/connection/Connection";
import {Post} from "./entity/Post";

describe("repository > clear method", () => {

    let connections: Connection[];
    before(async () => connections = await createTestingConnections({
        entities: [Post],
    }));
    beforeEach(() => reloadTestingDatabases(connections));
    after(() => closeTestingConnections(connections));

    it("should remove everything", () => Promise.all(connections.map(async connection => {

        // save dummy data
        const promises: Promise<Post>[] = [];
        for (let i = 0; i < 100; i++) {
            const post = new Post();
            post.id = i;
            post.title = "post #" + i;
            promises.push(connection.manager.save(post));
        }
        await Promise.all(promises);

        // check if they all are saved
        const loadedPosts = await connection.manager.find(Post);
        loadedPosts.should.be.instanceOf(Array);
        loadedPosts.length.should.be.equal(100);

        await connection.getRepository(Post).clear();

        // check find method
        const loadedPostsAfterClear = await connection.manager.find(Post);
        loadedPostsAfterClear.should.be.instanceOf(Array);
        loadedPostsAfterClear.length.should.be.equal(0);
    })));

    it("called from entity managed should remove everything as well", () => Promise.all(connections.map(async connection => {

        // save dummy data
        const promises: Promise<Post>[] = [];
        for (let i = 0; i < 100; i++) {
            const post = new Post();
            post.id = i;
            post.title = "post #" + i;
            promises.push(connection.manager.save(post));
        }
        await Promise.all(promises);

        // check if they all are saved
        const loadedPosts = await connection.manager.find(Post);
        loadedPosts.should.be.instanceOf(Array);
        loadedPosts.length.should.be.equal(100);

        await connection.manager.clear(Post);

        // check find method
        const loadedPostsAfterClear = await connection.manager.find(Post);
        loadedPostsAfterClear.should.be.instanceOf(Array);
        loadedPostsAfterClear.length.should.be.equal(0);
    })));

});


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

<title>RoundingMode (Java Platform SE 7 )</title>
<meta name="date" content="2014-12-18">
<meta name="keywords" content="java.math.RoundingMode class">
<meta name="keywords" content="values()">
<meta name="keywords" content="valueOf()">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Java™ Platform
Standard Ed. 7

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Enum Constants |

Field |

Method

Detail:

Enum Constants |

Field |

Method

java.math

Enum RoundingMode

java.lang.Object

java.lang.Enum<RoundingMode>

java.math.RoundingMode

All Implemented Interfaces:

Serializable, Comparable<RoundingMode>

public enum RoundingMode
extends Enum<RoundingMode>

Specifies a rounding behavior for numerical operations
 capable of discarding precision. Each rounding mode indicates how
 the least significant returned digit of a rounded result is to be
 calculated.  If fewer digits are returned than the digits needed to
 represent the exact numerical result, the discarded digits will be
 referred to as the discarded fraction regardless the digits'
 contribution to the value of the number.  In other words,
 considered as a numerical value, the discarded fraction could have
 an absolute value greater than one.

Each rounding mode description includes a table listing how
 different two-digit decimal values would round to a one digit
 decimal value under the rounding mode in question.  The result
 column in the tables could be gotten by creating a
 BigDecimal number with the specified value, forming a
 MathContext object with the proper settings
 (precision set to 1, and the
 roundingMode set to the rounding mode in question), and
 calling round on this number with the
 proper MathContext.  A summary table showing the results
 of these rounding operations for all rounding modes appears below.

Summary of Rounding Operations Under Different Rounding Modes

	Result of rounding input to one digit with the given
                           rounding mode

 Input Number	         UP
                                           DOWN
                                                        CEILING
                                                                       FLOOR
                                                                                HALF_UP
                                                                                HALF_DOWN
                                                                                HALF_EVEN
                                                                                UNNECESSARY

5.5	  6	  5	    6	    5	  6	      5	       6	       throw ArithmeticException

2.5	  3	  2	    3	    2	  3	      2	       2	       throw ArithmeticException

1.6	  2	  1	    2	    1	  2	      2	       2	       throw ArithmeticException

1.1	  2	  1	    2	    1	  1	      1	       1	       throw ArithmeticException

1.0	  1	  1	    1	    1	  1	      1	       1	       1

-1.0	 -1	 -1	   -1	   -1	 -1	     -1	      -1	      -1

-1.1	 -2	 -1	   -1	   -2	 -1	     -1	      -1	      throw ArithmeticException

-1.6	 -2	 -1	   -1	   -2	 -2	     -2	      -2	      throw ArithmeticException

-2.5	 -3	 -2	   -2	   -3	 -3	     -2	      -2	      throw ArithmeticException

-5.5	 -6	 -5	   -5	   -6	 -6	     -5	      -6	      throw ArithmeticException

This enum is intended to replace the integer-based
 enumeration of rounding mode constants in BigDecimal
 (BigDecimal.ROUND_UP, BigDecimal.ROUND_DOWN,
 etc. ).

Since:

1.5

See Also:

BigDecimal,
MathContext

Enum Constant Summary

Enum Constants

Enum Constant and Description

CEILING

Rounding mode to round towards positive infinity.

DOWN

Rounding mode to round towards zero.

FLOOR

Rounding mode to round towards negative infinity.

HALF_DOWN

Rounding mode to round towards "nearest neighbor"
 unless both neighbors are equidistant, in which case round
 down.

HALF_EVEN

Rounding mode to round towards the "nearest neighbor"
 unless both neighbors are equidistant, in which case, round
 towards the even neighbor.

HALF_UP

Rounding mode to round towards "nearest neighbor"
 unless both neighbors are equidistant, in which case round up.

UNNECESSARY

Rounding mode to assert that the requested operation has an exact
 result, hence no rounding is necessary.

UP

Rounding mode to round away from zero.

Method Summary

Methods

Modifier and Type
Method and Description

static RoundingMode
valueOf(int rm)

Returns the RoundingMode object corresponding to a
 legacy integer rounding mode constant in BigDecimal.

static RoundingMode
valueOf(String name)

Returns the enum constant of this type with the specified name.

static RoundingMode[]
values()

Returns an array containing the constants of this enum type, in
the order they are declared.

Methods inherited from class java.lang.Enum

clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

Methods inherited from class java.lang.Object

getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

UP

public static final RoundingMode UP

Rounding mode to round away from zero.  Always increments the
 digit prior to a non-zero discarded fraction.  Note that this
 rounding mode never decreases the magnitude of the calculated
 value.

Example:

Input Number
    Input rounded to one digit
 with UP rounding

5.5	  6

2.5	  3

1.6	  2

1.1	  2

1.0	  1

-1.0	 -1

-1.1	 -2

-1.6	 -2

-2.5	 -3

-5.5	 -6

DOWN

public static final RoundingMode DOWN

Rounding mode to round towards zero.  Never increments the digit
 prior to a discarded fraction (i.e., truncates).  Note that this
 rounding mode never increases the magnitude of the calculated value.

Example:

Input Number
    Input rounded to one digit
 with DOWN rounding

5.5	  5

2.5	  2

1.6	  1

1.1	  1

1.0	  1

-1.0	 -1

-1.1	 -1

-1.6	 -1

-2.5	 -2

-5.5	 -5

CEILING

public static final RoundingMode CEILING

Rounding mode to round towards positive infinity.  If the
 result is positive, behaves as for RoundingMode.UP;
 if negative, behaves as for RoundingMode.DOWN.  Note
 that this rounding mode never decreases the calculated value.

Example:

Input Number
    Input rounded to one digit
 with CEILING rounding

5.5	  6

2.5	  3

1.6	  2

1.1	  2

1.0	  1

-1.0	 -1

-1.1	 -1

-1.6	 -1

-2.5	 -2

-5.5	 -5

FLOOR

public static final RoundingMode FLOOR

Rounding mode to round towards negative infinity.  If the
 result is positive, behave as for RoundingMode.DOWN;
 if negative, behave as for RoundingMode.UP.  Note that
 this rounding mode never increases the calculated value.

Example:

Input Number
    Input rounded to one digit
 with FLOOR rounding

5.5	  5

2.5	  2

1.6	  1

1.1	  1

1.0	  1

-1.0	 -1

-1.1	 -2

-1.6	 -2

-2.5	 -3

-5.5	 -6

HALF_UP

public static final RoundingMode HALF_UP

Rounding mode to round towards "nearest neighbor"
 unless both neighbors are equidistant, in which case round up.
 Behaves as for RoundingMode.UP if the discarded
 fraction is ≥ 0.5; otherwise, behaves as for
 RoundingMode.DOWN.  Note that this is the rounding
 mode commonly taught at school.

Example:

Input Number
    Input rounded to one digit
 with HALF_UP rounding

5.5	  6

2.5	  3

1.6	  2

1.1	  1

1.0	  1

-1.0	 -1

-1.1	 -1

-1.6	 -2

-2.5	 -3

-5.5	 -6

HALF_DOWN

public static final RoundingMode HALF_DOWN

Rounding mode to round towards "nearest neighbor"
 unless both neighbors are equidistant, in which case round
 down.  Behaves as for RoundingMode.UP if the discarded
 fraction is > 0.5; otherwise, behaves as for
 RoundingMode.DOWN.

Example:

Input Number
    Input rounded to one digit
 with HALF_DOWN rounding

5.5	  5

2.5	  2

1.6	  2

1.1	  1

1.0	  1

-1.0	 -1

-1.1	 -1

-1.6	 -2

-2.5	 -2

-5.5	 -5

HALF_EVEN

public static final RoundingMode HALF_EVEN

Rounding mode to round towards the "nearest neighbor"
 unless both neighbors are equidistant, in which case, round
 towards the even neighbor.  Behaves as for
 RoundingMode.HALF_UP if the digit to the left of the
 discarded fraction is odd; behaves as for
 RoundingMode.HALF_DOWN if it's even.  Note that this
 is the rounding mode that statistically minimizes cumulative
 error when applied repeatedly over a sequence of calculations.
 It is sometimes known as "Banker's rounding," and is
 chiefly used in the USA.  This rounding mode is analogous to
 the rounding policy used for float and double
 arithmetic in Java.

Example:

Input Number
    Input rounded to one digit
 with HALF_EVEN rounding

5.5	  6

2.5	  2

1.6	  2

1.1	  1

1.0	  1

-1.0	 -1

-1.1	 -1

-1.6	 -2

-2.5	 -2

-5.5	 -6

UNNECESSARY

public static final RoundingMode UNNECESSARY

Rounding mode to assert that the requested operation has an exact
 result, hence no rounding is necessary.  If this rounding mode is
 specified on an operation that yields an inexact result, an
 ArithmeticException is thrown.

Example:

Input Number
    Input rounded to one digit
 with UNNECESSARY rounding

5.5	  throw ArithmeticException

2.5	  throw ArithmeticException

1.6	  throw ArithmeticException

1.1	  throw ArithmeticException

1.0	  1

-1.0	 -1

-1.1	 throw ArithmeticException

-1.6	 throw ArithmeticException

-2.5	 throw ArithmeticException

-5.5	 throw ArithmeticException

Method Detail

values

public static RoundingMode[] values()

Returns an array containing the constants of this enum type, in
the order they are declared.  This method may be used to iterate
over the constants as follows:

for (RoundingMode c : RoundingMode.values())
    System.out.println(c);

Returns:

an array containing the constants of this enum type, in the order they are declared

valueOf

public static RoundingMode valueOf(String name)

Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type.  (Extraneous whitespace characters are
not permitted.)

Parameters:

name - the name of the enum constant to be returned.

Returns:

the enum constant with the specified name

Throws:

IllegalArgumentException - if this enum type has no constant with the specified name

NullPointerException - if the argument is null

valueOf

public static RoundingMode valueOf(int rm)

Returns the RoundingMode object corresponding to a
 legacy integer rounding mode constant in BigDecimal.

Parameters:

rm - legacy integer rounding mode to convert

Returns:

RoundingMode corresponding to the given integer.

Throws:

IllegalArgumentException - integer is out of range

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Java™ Platform
Standard Ed. 7

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Enum Constants |

Field |

Method

Detail:

Enum Constants |

Field |

Method

 Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2015, Oracle and/or its affiliates.  All rights reserved.


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2020 NAVER Corp.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:batch="http://www.springframework.org/schema/batch"
       xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <batch:job id="cleanupInactiveAgentsJob">
        <batch:step id="cleanupInactiveAgentsStep">
            <batch:tasklet ref="cleanupInactiveAgentsTasklet" transaction-manager="metaDataTransactionManager"/>
        </batch:step>
        <batch:listeners>
            <batch:listener ref="jobFailListener"/>
        </batch:listeners>
    </batch:job>

    <bean id="cleanupInactiveAgentsTasklet" class="com.navercorp.pinpoint.batch.job.CleanupInactiveAgentsTasklet"/>

</beans>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Light.Domain.Entities
{
    public interface IEntity
    {
        int Id { get; set; }
        byte[] RowVersion { get; set; }
    }
}


text:
#include "kwsysPrivate.h"
#include KWSYS_HEADER(Process.h)

/* Work-around CMake dependency scanning limitation.  This must
   duplicate the above list of headers.  */
#if 0
# include "Process.h.in"
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#if defined(_WIN32)
# include <windows.h>
#else
# include <unistd.h>
#endif

int runChild(const char* cmd[], int state, int exception, int value,
             int share, int output, int delay, double timeout, int poll,
             int repeat);

int test1(int argc, const char* argv[])
{
  (void)argc; (void)argv;
  fprintf(stdout, "Output on stdout from test returning 0.\n");
  fprintf(stderr, "Output on stderr from test returning 0.\n");
  return 0;
}

int test2(int argc, const char* argv[])
{
  (void)argc; (void)argv;
  fprintf(stdout, "Output on stdout from test returning 123.\n");
  fprintf(stderr, "Output on stderr from test returning 123.\n");
  return 123;
}

int test3(int argc, const char* argv[])
{
  (void)argc; (void)argv;
  fprintf(stdout, "Output before sleep on stdout from timeout test.\n");
  fprintf(stderr, "Output before sleep on stderr from timeout test.\n");
  fflush(stdout);
  fflush(stderr);
#if defined(_WIN32)
  Sleep(15000);
#else
  sleep(15);
#endif
  fprintf(stdout, "Output after sleep on stdout from timeout test.\n");
  fprintf(stderr, "Output after sleep on stderr from timeout test.\n");
  return 0;
}

int test4(int argc, const char* argv[])
{
#if defined(_WIN32)
  /* Avoid error diagnostic popups since we are crashing on purpose.  */
  SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
#endif
  (void)argc; (void)argv;
  fprintf(stdout, "Output before crash on stdout from crash test.\n");
  fprintf(stderr, "Output before crash on stderr from crash test.\n");
  fflush(stdout);
  fflush(stderr);
  *(int*)0 = 0;
  fprintf(stdout, "Output after crash on stdout from crash test.\n");
  fprintf(stderr, "Output after crash on stderr from crash test.\n");
  return 0;
}

int test5(int argc, const char* argv[])
{
  int r;
  const char* cmd[4];
  (void)argc;
  cmd[0] = argv[0];
  cmd[1] = "run";
  cmd[2] = "4";
  cmd[3] = 0;
  fprintf(stdout, "Output on stdout before recursive test.\n");
  fprintf(stderr, "Output on stderr before recursive test.\n");
  fflush(stdout);
  fflush(stderr);
  r = runChild(cmd, kwsysProcess_State_Exception,
               kwsysProcess_Exception_Fault, 1, 1, 1, 0, 15, 0, 1);
  fprintf(stdout, "Output on stdout after recursive test.\n");
  fprintf(stderr, "Output on stderr after recursive test.\n");
  fflush(stdout);
  fflush(stderr);
  return r;
}

#define TEST6_SIZE (4096*2)
void test6(int argc, const char* argv[])
{
  int i;
  char runaway[TEST6_SIZE+1];
  (void)argc; (void)argv;
  for(i=0;i < TEST6_SIZE;++i)
    {
    runaway[i] = '.';
    }
  runaway[TEST6_SIZE] = '\n';

  /* Generate huge amounts of output to test killing.  */
  for(;;)
    {
    fwrite(runaway, 1, TEST6_SIZE+1, stdout);
    fflush(stdout);
    }
}

/* Define MINPOLL to be one more than the number of times output is
   written.  Define MAXPOLL to be the largest number of times a loop
   delaying 1/10th of a second should ever have to poll.  */
#define MINPOLL 5
#define MAXPOLL 20
int test7(int argc, const char* argv[])
{
  (void)argc; (void)argv;
  fprintf(stdout, "Output on stdout before sleep.\n");
  fprintf(stderr, "Output on stderr before sleep.\n");
  fflush(stdout);
  fflush(stderr);
  /* Sleep for 1 second.  */
#if defined(_WIN32)
  Sleep(1000);
#else
  sleep(1);
#endif
  fprintf(stdout, "Output on stdout after sleep.\n");
  fprintf(stderr, "Output on stderr after sleep.\n");
  fflush(stdout);
  fflush(stderr);
  return 0;
}

int runChild2(kwsysProcess* kp,
              const char* cmd[], int state, int exception, int value,
              int share, int output, int delay, double timeout,
              int poll)
{
  int result = 0;
  char* data = 0;
  int length = 0;
  double userTimeout = 0;
  double* pUserTimeout = 0;
  kwsysProcess_SetCommand(kp, cmd);
  if(timeout >= 0)
    {
    kwsysProcess_SetTimeout(kp, timeout);
    }
  if(share)
    {
    kwsysProcess_SetPipeShared(kp, kwsysProcess_Pipe_STDOUT, 1);
    kwsysProcess_SetPipeShared(kp, kwsysProcess_Pipe_STDERR, 1);
    }
  kwsysProcess_Execute(kp);

  if(poll)
    {
    pUserTimeout = &userTimeout;
    }

  if(!share)
    {
    int p;
    while((p = kwsysProcess_WaitForData(kp, &data, &length, pUserTimeout)))
      {
      if(output)
        {
        if(poll && p == kwsysProcess_Pipe_Timeout)
          {
          fprintf(stdout, "WaitForData timeout reached.\n");
          fflush(stdout);

          /* Count the number of times we polled without getting data.
             If it is excessive then kill the child and fail.  */
          if(++poll >= MAXPOLL)
            {
            fprintf(stdout, "Poll count reached limit %d.\n",
                    MAXPOLL);
            kwsysProcess_Kill(kp);
            }
          }
        else
          {
          fwrite(data, 1, length, stdout);
          fflush(stdout);
          }
        }
      if(poll)
        {
        /* Delay to avoid busy loop during polling.  */
#if defined(_WIN32)
        Sleep(100);
#else
        usleep(100000);
#endif
        }
      if(delay)
        {
        /* Purposely sleeping only on Win32 to let pipe fill up.  */
#if defined(_WIN32)
        Sleep(100);
#endif
        }
      }
    }

  kwsysProcess_WaitForExit(kp, 0);

  switch (kwsysProcess_GetState(kp))
    {
    case kwsysProcess_State_Starting:
      printf("No process has been executed.\n"); break;
    case kwsysProcess_State_Executing:
      printf("The process is still executing.\n"); break;
    case kwsysProcess_State_Expired:
      printf("Child was killed when timeout expired.\n"); break;
    case kwsysProcess_State_Exited:
      printf("Child exited with value = %d\n",
             kwsysProcess_GetExitValue(kp));
      result = ((exception != kwsysProcess_GetExitException(kp)) ||
                (value != kwsysProcess_GetExitValue(kp))); break;
    case kwsysProcess_State_Killed:
      printf("Child was killed by parent.\n"); break;
    case kwsysProcess_State_Exception:
      printf("Child terminated abnormally: %s\n",
             kwsysProcess_GetExceptionString(kp));
      result = ((exception != kwsysProcess_GetExitException(kp)) ||
                (value != kwsysProcess_GetExitValue(kp))); break;
    case kwsysProcess_State_Error:
      printf("Error in administrating child process: [%s]\n",
             kwsysProcess_GetErrorString(kp)); break;
    };

  if(result)
    {
    if(exception != kwsysProcess_GetExitException(kp))
      {
      fprintf(stderr, "Mismatch in exit exception.  "
              "Should have been %d, was %d.\n",
              exception, kwsysProcess_GetExitException(kp));
      }
    if(value != kwsysProcess_GetExitValue(kp))
      {
      fprintf(stderr, "Mismatch in exit value.  "
              "Should have been %d, was %d.\n",
              value, kwsysProcess_GetExitValue(kp));
      }
    }

  if(kwsysProcess_GetState(kp) != state)
    {
    fprintf(stderr, "Mismatch in state.  "
            "Should have been %d, was %d.\n",
            state, kwsysProcess_GetState(kp));
    result = 1;
    }

  /* We should have polled more times than there were data if polling
     was enabled.  */
  if(poll && poll < MINPOLL)
    {
    fprintf(stderr, "Poll count is %d, which is less than %d.\n",
            poll, MINPOLL);
    result = 1;
    }

  return result;
}

int runChild(const char* cmd[], int state, int exception, int value,
             int share, int output, int delay, double timeout,
             int poll, int repeat)
{
  int result = 1;
  kwsysProcess* kp = kwsysProcess_New();
  if(!kp)
    {
    fprintf(stderr, "kwsysProcess_New returned NULL!\n");
    return 1;
    }
  while(repeat-- > 0)
    {
    result = runChild2(kp, cmd, state, exception, value, share,
                       output, delay, timeout, poll);
    }
  kwsysProcess_Delete(kp);
  return result;
}

int main(int argc, const char* argv[])
{
  int n = 0;
#if 0
    {
    HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
    DuplicateHandle(GetCurrentProcess(), out,
                    GetCurrentProcess(), &out, 0, FALSE,
                    DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
    SetStdHandle(STD_OUTPUT_HANDLE, out);
    }
    {
    HANDLE out = GetStdHandle(STD_ERROR_HANDLE);
    DuplicateHandle(GetCurrentProcess(), out,
                    GetCurrentProcess(), &out, 0, FALSE,
                    DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE);
    SetStdHandle(STD_ERROR_HANDLE, out);
    }
#endif
  if(argc == 2)
    {
    n = atoi(argv[1]);
    }
  else if(argc == 3)
    {
    n = atoi(argv[2]);
    }
  /* Check arguments.  */
  if(n < 1 || n > 7 || (argc == 3 && strcmp(argv[1], "run") != 0))
    {
    fprintf(stdout, "Usage: %s <test number>\n", argv[0]);
    return 1;
    }
  if(argc == 3)
    {
    switch (n)
      {
      case 1: return test1(argc, argv);
      case 2: return test2(argc, argv);
      case 3: return test3(argc, argv);
      case 4: return test4(argc, argv);
      case 5: return test5(argc, argv);
      case 6: test6(argc, argv); return 0;
      case 7: return test7(argc, argv);
      }
    fprintf(stderr, "Invalid test number %d.\n", n);
    return 1;
    }

  if(n >= 0 && n <= 7)
    {
    int states[7] =
    {
      kwsysProcess_State_Exited,
      kwsysProcess_State_Exited,
      kwsysProcess_State_Expired,
      kwsysProcess_State_Exception,
      kwsysProcess_State_Exited,
      kwsysProcess_State_Expired,
      kwsysProcess_State_Exited
    };
    int exceptions[7] =
    {
      kwsysProcess_Exception_None,
      kwsysProcess_Exception_None,
      kwsysProcess_Exception_None,
      kwsysProcess_Exception_Fault,
      kwsysProcess_Exception_None,
      kwsysProcess_Exception_None,
      kwsysProcess_Exception_None
    };
    int values[7] = {0, 123, 1, 1, 0, 0, 0};
    int outputs[7] = {1, 1, 1, 1, 1, 0, 1};
    int delays[7] = {0, 0, 0, 0, 0, 1, 0};
    double timeouts[7] = {10, 10, 10, 10, 30, 10, -1};
    int polls[7] = {0, 0, 0, 0, 0, 0, 1};
    int repeat[7] = {2, 1, 1, 1, 1, 1, 1};
    int r;
    const char* cmd[4];
#ifdef _WIN32
    char* argv0 = 0;
    if(n == 0 && (argv0 = strdup(argv[0])))
      {
      /* Try converting to forward slashes to see if it works.  */
      char* c;
      for(c=argv0; *c; ++c)
        {
        if(*c == '\\')
          {
          *c = '/';
          }
        }
      cmd[0] = argv0;
      }
    else
      {
      cmd[0] = argv[0];
      }
#else
    cmd[0] = argv[0];
#endif
    cmd[1] = "run";
    cmd[2] = argv[1];
    cmd[3] = 0;
    fprintf(stdout, "Output on stdout before test %d.\n", n);
    fprintf(stderr, "Output on stderr before test %d.\n", n);
    fflush(stdout);
    fflush(stderr);
    r = runChild(cmd, states[n-1], exceptions[n-1], values[n-1], 0,
                 outputs[n-1], delays[n-1], timeouts[n-1],
                 polls[n-1], repeat[n-1]);
    fprintf(stdout, "Output on stdout after test %d.\n", n);
    fprintf(stderr, "Output on stderr after test %d.\n", n);
    fflush(stdout);
    fflush(stderr);
#if _WIN32
    if(argv0) { free(argv0); }
#endif
    return r;
    }
  else
    {
    fprintf(stderr, "Test number out of range\n");
    return 1;
    }
}


text:
@implementation RRObject

////////////////////////////////////////////////////////////////////////////////////////////////////
+(void)reapIndex:(void (^)(Reaper *reaper,NSArray* objects))success
         failure:(void (^)(Reaper *reaper, NSError *error))failure
{
    [self reapIndex:0 success:success failure:failure];
}
////////////////////////////////////////////////////////////////////////////////////////////////////
+(void)reapIndex:(int)page success:(void (^)(Reaper *reaper,NSArray* objects))success
         failure:(void (^)(Reaper *reaper, NSError *error))failure
{
    NSString* url = [Reaper resourceRoute:[self restResource] resource:nil];
    [[self reaperType] reapIndex:[self class] url:url
                      parameters:[Reaper combineParams:[self globalParameters:ReaperActionIndex] page:page]
                         success:success failure:failure];
}
////////////////////////////////////////////////////////////////////////////////////////////////////
+(void)reapShow:(id)objectID success:(void (^)(Reaper *, id))success
        failure:(void (^)(Reaper *, NSError *))failure
{
    NSString* url = [Reaper resourceRoute:[self restResource] resource:objectID];
    [[self reaperType] reapShow:[self class] url:url parameters:[self globalParameters:ReaperActionShow] success:success failure:failure];
}
////////////////////////////////////////////////////////////////////////////////////////////////////
+(void)reapDestroy:(id)objectID success:(void (^)(Reaper *))success
           failure:(void (^)(Reaper *, NSError *))failure
{
    NSString* url = [Reaper resourceRoute:[self restResource] resource:objectID];
    [[self reaperType] reapDestroy:[self class] url:url parameters:[self globalParameters:ReaperActionDestroy] success:success failure:failure];
}
////////////////////////////////////////////////////////////////////////////////////////////////////
+(void)reapCreate:(NSDictionary *)postParams success:(void (^)(Reaper *, id))success
          failure:(void (^)(Reaper *, NSError *))failure
{
    NSString* url = [Reaper resourceRoute:[self restResource] resource:nil];
    [[self reaperType] reapCreate:[self class] url:url
                       parameters:[Reaper combineParams:[self globalParameters:ReaperActionCreate] params:postParams]
                          success:success failure:failure];
}
////////////////////////////////////////////////////////////////////////////////////////////////////
+(void)reapUpdate:(id)objectID parameters:(NSDictionary *)postParams success:(void (^)(Reaper *, id))success
          failure:(void (^)(Reaper *, NSError *))failure
{
    NSString* url = [Reaper resourceRoute:[self restResource] resource:objectID];
    [[self reaperType] reapUpdate:[self class] url:url
                       parameters:[Reaper combineParams:[self globalParameters:ReaperActionUpdate] params:postParams]
                          success:success failure:failure];
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-(void)reapSave:(void (^)(Reaper *reaper,id item))success
        failure:(void (^)(Reaper *reaper, NSError *error))failure
{
    ReaperAction action = ReaperActionUpdate;
    if(!self.objID)
        action = ReaperActionCreate;
    NSMutableDictionary* values = [Reaper createPostValues:[[self class] excludedParameters:action] object:self class:[self class]];
    if(action == ReaperActionCreate)
        [[self class] reapCreate:values success:success failure:failure];
    else
        [[self class] reapUpdate:self.objID parameters:values success:^(Reaper* reaper, id item){
            if(item)
                success(reaper,item);
            else
                success(reaper,self);

        }failure:failure];
}
////////////////////////////////////////////////////////////////////////////////////////////////////
-(void)reapDestroy:(void (^)(Reaper *reaper))success
           failure:(void (^)(Reaper *reaper, NSError *error))failure
{
    [[self class] reapDestroy:self.objID success:success failure:failure];
}
////////////////////////////////////////////////////////////////////////////////////////////////////
+(Reaper*)reaperType
{
    @throw [NSException exceptionWithName:NSInternalInconsistencyException
                                   reason:[NSString stringWithFormat:@"You must override the reaperType method in your subclass"]
                                 userInfo:nil];
    return [Reaper sharedReaper];
}
////////////////////////////////////////////////////////////////////////////////////////////////////
+(NSString*)restResource
{
    @throw [NSException exceptionWithName:NSInternalInconsistencyException
                                   reason:[NSString stringWithFormat:@"You must override the restResource method in your subclass"]
                                 userInfo:nil];
    return nil;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
+(NSArray*)excludedParameters:(ReaperAction)action
{
    return nil;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
+(NSDictionary*)globalParameters:(ReaperAction)action
{
    return nil;
}
////////////////////////////////////////////////////////////////////////////////////////////////////

@end


text:
require 'moss_ruby'
require 'fileutils'

class CheatingDetection

  MOSS_LOGGER_CALLBACK = ->(message=""){puts message}
  TEMP_DIR = 'brown_noser_cheat_detection'

  def initialize(user, repo, moss_options={})
    @user = user
    @repo = repo
    @moss_id = moss_options.fetch(:moss_id, 000000000)

    # Create the MossRuby object
    @moss ||= MossRuby.new(@moss_id) #replace 000000000 with your user id

    # Set options  -- the options will already have these default values
    @moss.options[:max_matches]          = moss_options.fetch(:max_matches,          10)
    @moss.options[:directory_submission] = moss_options.fetch(:directory_submission, false)
    @moss.options[:show_num_matches]     = moss_options.fetch(:show_num_matches,     250)
    @moss.options[:experimental_server]  = moss_options.fetch(:experimental_server,  false)
    @moss.options[:comment]              = moss_options.fetch(:comment,              '')
    @moss.options[:language]             = moss_options.fetch(:comment,              'cc')
  end

  def detect
    pull_details = PullBranchLister.new(@user, @repo).list
    extractor = PullBranchFileExtractor.new(TEMP_DIR, pull_details)
    extractor.extract

    # Create a file hash, with the files to be processed
    to_check = MossRuby.empty_file_hash
    files_to_check = Dir.glob("#{TEMP_DIR}/**/*").select { |f| f =~ /\.(h|cpp)$/ }
    MossRuby.add_file(to_check, files_to_check)

    # Get server to process files
    url = @moss.check to_check, MOSS_LOGGER_CALLBACK

    IO.write "brown_noser.html", "

Cheat Detection Results

#{url}
"
    extractor.cleanup

    # Get results
    results = @moss.extract_results url
  end

private
  def extract_results
    results.each_with_index { |match, i|
      match.each { |file|
        report_match = <<-HTML

#{file[:filename]}

#{file[:pct]}

#{file[:url]}

#{file[:part_url]}

#{file[:html]}

        HTML
        result_html += report_match
      }
      result_html += "
"
    }
    IO.write "cheat_report.html", result_html
  end
end


text:
ANSIBLE_METADATA = {'metadata_version': '1.1',
                    'status': ['preview'],
                    'supported_by': 'community'}

DOCUMENTATION = '''
---
module: avi_serviceengine
author: Gaurav Rastogi (grastogi@avinetworks.com)

short_description: Module for setup of ServiceEngine Avi RESTful Object
description:
    - This module is used to configure ServiceEngine object
    - more examples at U(https://github.com/avinetworks/devops)
requirements: [ avisdk ]
version_added: "2.4"
options:
    state:
        description:
            - The state that should be applied on the entity.
        default: present
        choices: ["absent","present"]
    availability_zone:
        description:
            - Availability_zone of serviceengine.
    cloud_ref:
        description:
            - It is a reference to an object of type cloud.
    container_mode:
        description:
            - Boolean flag to set container_mode.
            - Default value when not specified in API or module is interpreted by Avi Controller as False.
    container_type:
        description:
            - Enum options - container_type_bridge, container_type_host, container_type_host_dpdk.
            - Default value when not specified in API or module is interpreted by Avi Controller as CONTAINER_TYPE_HOST.
    controller_created:
        description:
            - Boolean flag to set controller_created.
            - Default value when not specified in API or module is interpreted by Avi Controller as False.
    controller_ip:
        description:
            - Controller_ip of serviceengine.
    data_vnics:
        description:
            - List of vnic.
    enable_state:
        description:
            - Inorder to disable se set this field appropriately.
            - Enum options - SE_STATE_ENABLED, SE_STATE_DISABLED_FOR_PLACEMENT, SE_STATE_DISABLED.
            - Default value when not specified in API or module is interpreted by Avi Controller as SE_STATE_ENABLED.
    flavor:
        description:
            - Flavor of serviceengine.
    host_ref:
        description:
            - It is a reference to an object of type vimgrhostruntime.
    hypervisor:
        description:
            - Enum options - default, vmware_esx, kvm, vmware_vsan, xen.
    mgmt_vnic:
        description:
            - Vnic settings for serviceengine.
    name:
        description:
            - Name of the object.
            - Default value when not specified in API or module is interpreted by Avi Controller as VM name unknown.
    resources:
        description:
            - Seresources settings for serviceengine.
    se_group_ref:
        description:
            - It is a reference to an object of type serviceenginegroup.
    tenant_ref:
        description:
            - It is a reference to an object of type tenant.
    url:
        description:
            - Avi controller URL of the object.
    uuid:
        description:
            - Unique object identifier of the object.
extends_documentation_fragment:
    - avi
'''

EXAMPLES = """
- name: Example to create ServiceEngine object
  avi_serviceengine:
    controller: 10.10.25.42
    username: admin
    password: something
    state: present
    name: sample_serviceengine
"""

RETURN = '''
obj:
    description: ServiceEngine (api/serviceengine) object
    returned: success, changed
    type: dict
'''

from ansible.module_utils.basic import AnsibleModule
try:
    from ansible.module_utils.avi import (
        avi_common_argument_spec, HAS_AVI, avi_ansible_api)
except ImportError:
    HAS_AVI = False

def main():
    argument_specs = dict(
        state=dict(default='present',
                   choices=['absent', 'present']),
        availability_zone=dict(type='str',),
        cloud_ref=dict(type='str',),
        container_mode=dict(type='bool',),
        container_type=dict(type='str',),
        controller_created=dict(type='bool',),
        controller_ip=dict(type='str',),
        data_vnics=dict(type='list',),
        enable_state=dict(type='str',),
        flavor=dict(type='str',),
        host_ref=dict(type='str',),
        hypervisor=dict(type='str',),
        mgmt_vnic=dict(type='dict',),
        name=dict(type='str',),
        resources=dict(type='dict',),
        se_group_ref=dict(type='str',),
        tenant_ref=dict(type='str',),
        url=dict(type='str',),
        uuid=dict(type='str',),
    )
    argument_specs.update(avi_common_argument_spec())
    module = AnsibleModule(
        argument_spec=argument_specs, supports_check_mode=True)
    if not HAS_AVI:
        return module.fail_json(msg=(
            'Avi python API SDK (avisdk>=17.1) is not installed. '
            'For more details visit https://github.com/avinetworks/sdk.'))
    return avi_ansible_api(module, 'serviceengine',
                           set([]))

if __name__ == '__main__':
    main()


text:
<!DOCTYPE html>

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title> MIKA MUNCH </title>

    <link rel="stylesheet" href="styles/timeline.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

           M I K A  M U N C H

Experience

Resume

About

Contact

Experience

UNSW 3D Visualisation Aesthetics Lab

Working under Dr. John McGhee and using virtual reality headsets and Unity Game Development software, our lab models and visualizes the biological processes of real patient data. I have been working on making a visualization of a stroke a multiplayer experience, so two Oculus headsets can view and move through the world at the same time. I have gained valuble experience with Unity Scripting, the Oculus Development Kit, and the Unity Networking System. See what we do.

Georgia Tech Design Club

During my Junior year, I was invovled on the leadership team for Design Club. The club was new this semester, and was an incredible hit. We designed modules, lessons and discussion topics. I taught workshop on D3.js to about 30 students. The slides can be found here!

Georgia Tech Design for America

A group of Georgia Tech students chartered the first DFA organization at our school in Spring 2015. The next semester, the club decided to reboot and selected a new executive board, of which I was chosen as the Marketing and Recruitment Director. Together we ran a number of design workshops, OpenIdeo Brainstorms, and networked throughout the startup and design scene of Atlanta.

Tivix Software Engineering Intern

I've spent two summers at Tivix, a software consulting firm that primarily uses the Django/Python framework for their platforms. Here, I completed the Django training module that all of their engineers complete, as well as some of their AngularJS training. I was involved in developing an internal tool for goal management and helped with site updates. I also had a UI/UX and PM role in designing a product database system.

Computational Perception Lab

Under Dr. Maithilee Kunda, I worked as an undergraduate resesarch assistant in the School of Interactive Computing's Computational Perception Lab. Our specific experiment used eye tracking technology and computer vision to observe how participants solved Kohs Block Puzzles. My individual role included using D3.js to visualize solutions strategies, administering experiemnts, and discussing the CV and AI components.

Wheeler Lab

The Wheeler Lab is in the Psychology department at Georgia Tech and focuses on perception, memory and aging. I volunteered here for two semesters as an undergraduate research assistant. I administered experiments and memory tests on participants, and learned how to take, analzye, and learn from MRI scans.

Timeline © Rafamaciel

Mika Munch 2016. mikakomunch@gmail.com


text:
<!DOCTYPE html>

        <title><?php echo $title; ?></title>

<<<<<<>>>>>> b47aaed18eda97e08afbfe5d1ed0780819a9475e

<<<<<<>>>>>> b47aaed18eda97e08afbfe5d1ed0780819a9475e
        <link rel="stylesheet" href="<?php echo base_url(); ?>assets/datepicker/bootstrap-datetimepicker.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/select2/dist/css/select2.min.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/css/sb-admin.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/css/dataTables.min.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/css/bootswatch.css">
        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/css/style.css">
        <link href="<?php echo base_url(); ?>assets/morrisjs/morris.css" rel="stylesheet">
<<<<<<>>>>>> b47aaed18eda97e08afbfe5d1ed0780819a9475e

                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-list-collapse">
                        Toggle navigation

                    </button>
                    <a href="<?php echo base_url(); ?>" class="navbar-brand">Outsourcing Management System

                        Good to see you again, Admin!

                        <a href="<?php echo base_url(); ?>login/logout">Log out

<a href="<?php echo base_url(); ?>dashboard/">Dashboard

<a href="<?php echo base_url(); ?>maintenance/">Maintenance

<a href="<?php echo base_url(); ?>admin/admin_client_list">Transaction

<a href="<?php echo base_url(); ?>reports/">Reports

<a href="<?php echo base_url()?>query/"> Queries

<a href="<?php echo base_url()?>utilities/">Utilities


text:
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
description: >
    In the presence of the "use strict" directive, generator functions declared
    as methods obey "strict" ThisMode semantics.
es6id: 14.4.13
flags: [noStrict]
features: [generators]
---*/

var thisValue = null;
var method = {
  *method() {
    'use strict';
    thisValue = this;
  }
}.method;

method().next();

assert.sameValue(thisValue, undefined);


text:
package nya.kitsunyan.littlechenbot.command

import nya.kitsunyan.littlechenbot.command.common._
import nya.kitsunyan.littlechenbot.util._

import info.mukel.telegrambot4s.methods._
import info.mukel.telegrambot4s.models._

import scala.concurrent.Future

trait PixivCommand extends Command with ExtractImage {
  this: Http =>

  private val HEADER_REFERER = "Referer" -> "https://www.pixiv.net"
  private val HEADER_ACCEPT_LANGUAGE = "Accept-Language" -> "en-US,en;q=0.5"

  private val commands = List("pixiv")

  override def prependDescription(list: List[Description], locale: Locale): List[Description] = {
    super.prependDescription(Description(commands, locale.FIND_IMAGE_WITH_SAUCENAO_FD) :: list, locale)
  }

  override def handleMessage(message: ExtendedMessage, filterChat: FilterChat): Future[Status] = {
    filterMessage(message, commands, handleMessageInternal(_, _, _), super.handleMessage, filterChat, _.soft)
  }

  class PixivException(override val userMessage: Option[String], message: String)
    extends Exception(message) with UserMessageException

  private def handleMessageInternal(implicit message: Message, arguments: Arguments, locale: Locale): Future[Status] = {
    def sendSaucenaoRequest(typedFile: TypedFile): Future[List[Long]] = {
      http("https://saucenao.com/search.php")
        .file(typedFile.multipart("file"))
        .runString(Http.Filters.ok)
        .map(response => "Pixiv ID: (\\d+)".r
          .findAllMatchIn(response.body)
          .flatMap(_.subgroups.headOption)
          .map(_.toLong)
          .toList)
    }

    case class PixivResult(imageUrlNoExtension: String, previewUrlNoExtension: String, pageUrl: String)

    def readPixivResult(pixivId: Long): Future[List[PixivResult]] = {
      val mediumPageUrl = s"https://www.pixiv.net/member_illust.php?mode=medium&illust_id=$pixivId"
      val mediumResponse = http(mediumPageUrl)
        .header(HEADER_ACCEPT_LANGUAGE)
        .runString(Http.Filters.code(200, 403, 404))

      case class Response(iterator: Iterator[List[String]], pageUrl: String)

      val responseFuture = mediumResponse.flatMap { mediumResponse =>
        if (mediumResponse.code != 200) {
          val errorMessage = "
(.*?)
".r
            .findFirstMatchIn(mediumResponse.body)
            .flatMap(_.subgroups.headOption)

          val possibleMessages =
            "Artist has made their work private" ::
            "Work has been deleted or the ID does not exist" ::
            Nil

          errorMessage match {
            case Some(s) if possibleMessages.exists(s.contains) =>
              Future.successful(Response(Iterator.empty, mediumPageUrl))
            case Some(s) =>
              throw new PixivException(Some("Invalid response from pixiv.net"), s)
            case _ =>
              Http.throwResponseCodeExceptionWithPrivateUrl(mediumPageUrl, false, mediumResponse.code)
          }
        } else {
          val imagePattern = "/img/(\\d+/\\d+/\\d+/\\d+/\\d+/\\d+)/(\\d+)_p(\\d+)(\\w*?)\\.\\w+\"".r
          val multipleImages = "pixiv.tracking.URL = \".*?\\\\u0026multi=true\";".r
            .findFirstIn(mediumResponse.body).nonEmpty

          def extract(body: String): Iterator[List[String]] = imagePattern.findAllMatchIn(body).map(_.subgroups)

          if (multipleImages) {
            val mangaPageUrl = s"https://www.pixiv.net/member_illust.php?mode=manga&illust_id=$pixivId"
            val mangaResponse = http(mangaPageUrl)
              .header(HEADER_ACCEPT_LANGUAGE)
              .runString(Http.Filters.ok)

            mangaResponse.map(r => Response(extract(r.body), mangaPageUrl))
          } else {
            Future.successful(Response(extract(mediumResponse.body), mediumPageUrl))
          }
        }
      }

      responseFuture.map { response =>
        case class Result(part: String, pixivId: Long, index: Int, suffix: String)

        val results = response.iterator.map {
          case part :: id :: index :: suffix :: Nil => Result(part, id.toLong, index.toInt, suffix)
          case e => throw new MatchError(e)
        }.filter(_.pixivId == pixivId).toList.distinct

        results.map { result =>
          PixivResult(s"https://i.pximg.net/img-original/img/${result.part}/${pixivId}_p${result.index}.",
            s"https://i.pximg.net/c/150x150/img-master/img/${result.part}/${pixivId}_p${result.index}${result.suffix}.",
            response.pageUrl)
        }
      }.recover {
        case e: Http.HttpException if e.code.contains(403) || e.code.contains(404) =>
          Nil
      }
    }

    def readPixivResults(pixivIds: List[Long]): Future[List[PixivResult]] = {
      val resultsFuture = pixivIds.foldLeft[Future[List[PixivResult]]](Future.successful(Nil))((f, id) => f
        .flatMap(results => readPixivResult(id).map(results ::: _)))

      resultsFuture.map {
        case Nil => throw new CommandException(s"${locale.NO_IMAGES_FOUND_FS}.")
        case list => list.take(20)
      }
    }

    def storeResponseToWorkspace(pixivResults: List[PixivResult]): Future[(String, List[PixivResult])] = {
      import org.json4s.JsonDSL._
      import org.json4s.jackson.JsonMethods._

      workspace.map { workspace =>
        val json = compact(render(pixivResults.map(r => ("urlNoExtension" -> r.imageUrlNoExtension) ~
          ("pageUrl" -> r.pageUrl))))
        request(SendMessage(workspace, json))
          .map(_.messageId)
          .map(WorkspaceRequest(commands.head))
          .map((_, pixivResults))
      }.getOrElse(Future.failed(new CommandException(locale.SORRY_MY_CONFIGURATION_DOESNT_ALLOW_ME_TO_DO_IT)))
    }

    case class PixivImage(image: Array[Byte], url: String, mimeType: String)

    def readPixivImage(urlNoExtension: String): Future[PixivImage] = {
      def readWithExtension(extensions: List[(String, String)], exception: Option[Throwable]): Future[PixivImage] = {
        if (extensions.nonEmpty) {
          val (extension, mimeType) = extensions.head
          val url = s"$urlNoExtension$extension"

          http(url)
            .header(HEADER_REFERER)
            .runBytes(Http.Filters.ok && Http.Filters.contentLength(10 * 1024 * 1024))
            .map(_.body)
            .map(PixivImage(_, url, mimeType))
            .recoverWith((e: Throwable) => readWithExtension(extensions.tail, Some(e)))
        } else {
          Future.failed(exception.getOrElse(new Exception("No extensions provided")))
        }
      }

      readWithExtension(Utils.extensionMap.toList, None)
    }

    def replyWithPreview(requestIdString: String, pixivResults: List[PixivResult]): Future[Message] = {
      case class IndexedImage(index: Int, pixivResult: PixivResult)

      val (_, indexedImages) = pixivResults
        .foldRight[(Int, List[IndexedImage])](pixivResults.length, Nil) { case (image, (index, result)) =>
        (index - 1, IndexedImage(index, image) :: result)
      }

      val messageText = s"${locale.HERE_ARE_THE_IMAGES_I_FOUND_FS} $requestIdString.\n" +
        s"${locale.NOW_REPLY_ME_WITH_FORMAT.format(s"/${commands.head} -i N")}"

      indexedImages.map { indexedImage =>
        readPixivImage(indexedImage.pixivResult.previewUrlNoExtension)
          .map(i => Utils.Preview(indexedImage.index, Some(i.image), i.mimeType, Utils.BlurMode.No))
          .recover((handleException(None)(_)) -> Utils.Preview(indexedImage.index, None, "", Utils.BlurMode.No))
      }.foldRight[Future[List[Utils.Preview]]](Future.successful(Nil)) { (future, result) =>
        result.flatMap(list => future.map(_ :: list))
      }.flatMap { list =>
        val preview = Utils.drawPreview(list)
        preview.map { preview =>
          request(SendPhoto(message.source, InputFile("preview.png", preview),
            replyToMessageId = Some(message.messageId), caption = Some(trimCaption(messageText))))
        }.getOrElse(replyQuote(messageText))
      }
    }

    def extractUrlsListFromWorkspace: Future[List[(String, String)]] = {
      workspace.map { workspace =>
        bot.flatMap { bot =>
          message.replyToMessage.flatMap { message =>
            if ((message.forwardFrom orElse message.from).map(_.id.toLong).contains(bot.id)) {
              (message.text orElse message.caption)
                .flatMap(WorkspaceRequest.parse(commands.head))
                .map { messageId =>
                  request(SendMessage(workspace, "query", replyToMessageId = Some(messageId)))
                    .map(_.replyToMessage.flatMap(_.text).map { text =>
                      import org.json4s._
                      import org.json4s.jackson.JsonMethods._

                      parse(text) match {
                        case JArray(list) => list.map(s => (s \ "urlNoExtension", s \ "pageUrl")).map {
                          case (JString(s1), JString(s2)) => (s1, s2)
                          case _ => throw new Exception
                        }
                        case _ => throw new Exception
                      }
                    }.get)
                }
            } else {
              None
            }
          }.getOrElse(throw new CommandException(locale.ARE_YOU_KIDDING_ME))
        }
      }.getOrElse(Future.failed(new CommandException(locale.SORRY_MY_CONFIGURATION_DOESNT_ALLOW_ME_TO_DO_IT)))
    }

    case class ImageData(url: String, name: String, image: Array[Byte])

    def fetchImageByIndex(index: Int, list: List[(String, String)]): Future[ImageData] = {
      list.lift(index - 1).map { case (urlNoExtension, pageUrl) =>
        readPixivImage(urlNoExtension)
          .map(i => ImageData(pageUrl, Utils.extractNameFromUrl(i.url, None), i.image))
      }.getOrElse(Future.failed(new CommandException(s"${locale.NO_IMAGES_FOUND_FS}.")))
    }

    def replyWithImage(imageData: ImageData): Future[Message] = {
      request(SendDocument(message.source, InputFile(imageData.name, imageData.image),
        replyToMessageId = Some(message.messageId), caption = Some(trimCaption(imageData.url))))
    }

    if (arguments("h", "help").nonEmpty) {
      checkArguments(arguments, 0, "h", "help").unitFlatMap {
        replyMan(locale.FETCH_IMAGE_FROM_PIXIV_USING_SAUCENAO,
          (List("-i", "--indices"), Some("integer list"),
            locale.FETCH_IMAGE_BY_INDEX) ::
          (List("-h", "--help"), None,
            locale.DISPLAY_THIS_HELP) ::
          Nil)
      }.statusMap(Status.Success)
        .recoverWith(handleError(None)(message))
    } else {
      val indicesOption = arguments("i", "indices").asIntList

      indicesOption.map { indices =>
        checkArguments(arguments, 0, "i", "indices")
          .unitFlatMap(extractUrlsListFromWorkspace)
          .flatMap(list => indices
            .foldLeft(Future.unit)((f, i) => f
              .unitFlatMap(fetchImageByIndex(i, list))
              .flatMap(replyWithImage)
              .map(_ => ())))
          .statusMap(Status.Success)
          .recoverWith(handleError(Some(locale.IMAGE_REQUEST_FV_FS))(message))
      } getOrElse {
        checkArguments(arguments, 0)
          .unitMap(obtainMessageFile(commands.head)(extractMessageWithImage))
          .scopeFlatMap((_, file) => readTelegramFile(file)
            .flatMap(sendSaucenaoRequest)
            .flatMap(readPixivResults)
            .flatMap(storeResponseToWorkspace)
            .flatMap((replyWithPreview _).tupled)
            .statusMap(Status.Success))
          .recoverWith(message)(handleError(Some(locale.IMAGE_REQUEST_FV_FS)))
      }
    }
  }
}


text:
Proyectos Con Horas Pendientes De Aprobar

                        Proyecto
                        Seccion
                        Clase
                        Maestro
                        Correo
                        Periodo

                            {{vm.toTitleCase(sectionProject.Project.Name)}}
                            {{sectionProject.Section.Code}}
                            {{sectionProject.Section.Class.Name}}
                            {{vm.toTitleCase(sectionProject.Section.User.Name)}}
                            {{sectionProject.Section.User.Email}}
                            {{sectionProject.Section.Period.Number}}

<tb-loading class="main-loader" ng-show="vm.loading"></tb-loading>


text:
Ext.define('OppUI.view.appmapDashboard.appmapgrid.ApplicationMappingGridController', {
    extend: 'Ext.app.ViewController',
    alias: 'controller.applicationmappinggrid'

});


text:
"use strict";
var ExtendedAttributes = (function () {
    function ExtendedAttributes() {
    }
    return ExtendedAttributes;
}());
exports.ExtendedAttributes = ExtendedAttributes;


text:
  <ng-include ng-if="listView" src="'app/home/preview/common/previewMultiStageListView.tpl.html'"></ng-include>
  <ng-include ng-if="!listView" src="'app/home/preview/common/previewMultiStageTableView.tpl.html'"></ng-include>


text:
<?php

class AddOnInstaller_XenForo_Deferred_Template extends XFCP_AddOnInstaller_XenForo_Deferred_Template
{
    public function execute(array $deferred, array $data, $targetRunTime, &$status)
    {
        if (!isset($data['templates']))
        {
            return parent::execute($deferred, $data, $targetRunTime, $status);
        }

        $data = array_merge(array(
            'startStyle' => 0,
            'startTemplate' => null,
            'position' => 0,
            'mapped' => false,
            'templates' => array(),
        ), $data);

        /* @var $templateModel AddOnInstaller_XenForo_Model_Template */
        $templateModel = XenForo_Model::create('XenForo_Model_Template');

        if ($data['startStyle'] == 0 && !$data['mapped'])
        {
            $s = microtime(true);
            $templateModel->insertTemplateMapForStyles($templateModel->buildTemplateMapForStyleTree(0), true);
            $data['mapped'] = true;

            $maxExec = ($targetRunTime ? $targetRunTime - (microtime(true) - $s) : 0);
        }
        else
        {
            $maxExec = $targetRunTime;
        }

        $actionPhrase = new XenForo_Phrase('rebuilding');
        $typePhrase = new XenForo_Phrase('templates');
        $status = sprintf('%s... %s %s', $actionPhrase, $typePhrase, str_repeat(' . ', $data['position']));

        if (!$targetRunTime || $maxExec > 1)
        {
            $result = $templateModel->compileNamedTemplates($data['templates'], $maxExec, $data['startStyle'], $data['startTemplate']);
        }
        else
        {
            $result = false;
        }

        if ($result === null)
        {
            return true;
        }
        else
        {
            $data['startStyle'] = $result[0];
            $data['startTemplate'] = $result[1];
            $data['templates'] = $result[2];
            $data['position']++;

            return $data;
        }
    }
}

if (false)
{
    class XFCP_AddOnInstaller_XenForo_Deferred_Template extends XenForo_Deferred_Template
    {
    }
}


text:
<?php
require_once 'connect.php';
?>

    <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>IT_MART</title>

    <link href="bootstrap.min.css" rel="stylesheet">
    <link href="admi.css" rel="stylesheet">

IT_MART

{Next Generation Technology}

 Link

 Link

 Link

 Link

        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">

        </button>

Top

Homepage

ALL PRODUCTS

            Brand(Model)
            Price
              Stock
          Image

<?php
    $query=mysql_query("SELECT project.`product`.`P_name`,`P_model`,`P_piece`,`P_unitprice`,project.`product_image`.`P_image`
FROM project.`product_image`
INNER JOIN project.`product` ON project.`product`.`P_id`=project.`product_image`.`P_id`");
    while($row =mysql_fetch_assoc($query))
    {
     if($row['P_piece']>0)
     {
         $s="Avaiable";
     }
        else{
            $s="Unavaiable";
        }
        $var= '<img data-toggle="magnify" src="data:image/jpeg;base64,'.base64_encode( $row['P_image'] ).'" width="80px" height="80px"
' ;
echo"
";
        echo "".$row['P_name']."(".$row['P_model'].")"."	";
        echo "".$row['P_unitprice']." tk"."	";
            echo "".$s."	";
echo "".$var."	";

        echo"
";
    }

?>