text:
var incan_client = require('./index.js').client;

var YOUR_UID = 0;
var YOUR_API_KEY = "";
var client = new incan_client(YOUR_UID, YOUR_API_KEY);

client.addImageUrl('http://incandescent.xyz/wp-content/themes/twentyfifteen/logo.png');

client.assemble();

client.sendRequest(function(projectId) {
	console.log(projectId);

	client.getResults(projectId, function(data) {
		console.log(data);
	})
});


text:
<!DOCTYPE html>

	<title>Blade Nelson's Blog</title>
	<link rel="stylesheet" type="text/css" href="content/theme/styles.css">
	<link href='http://fonts.googleapis.com/css?family=Open+Sans:300' rel='stylesheet' type='text/css'>

Blade Nelson's Blog

		blog | about | social

 Super Script Test

Posted by:  Blade Nelson on  7/8/2015

 Hello, World!

Posted by:  Blade Nelson on  7/6/2015

		github (powderblock) | reddit (/u/powderblock) | twitter (@powderblock)

		Copyright 2015 Blade Nelson, Licensed under the MIT license. See LICENSE for more information.

redpajama_set_name: RedPajamaGithub


text:
package org.tolweb.btol.xml;

import java.util.List;

import org.apache.tapestry.event.PageBeginRenderListener;
import org.apache.tapestry.event.PageEvent;
import org.jdom.Document;
import org.jdom.Element;
import org.tolweb.tapestry.injections.UserInjectable;
import org.tolweb.treegrow.main.Contributor;
import org.tolweb.treegrow.main.XMLConstants;
import org.tolweb.treegrowserver.ServerXMLWriter;

public abstract class ContributorList extends SequenceNameService implements UserInjectable, PageBeginRenderListener {
	public void pageBeginRender(PageEvent event) {
		Long projectId = getProjectIdOrDefault();
		ServerXMLWriter writer = getServerXMLWriter();
		Document doc = new Document();
		Element rootElement = new Element(XMLConstants.CONTRIBUTORLIST);
		doc.setRootElement(rootElement);
		List<Integer> contributorIds = getProjectDAO().getContributorIdsForProject(projectId);
		List<Contributor> contributors = getContributorDAO().getContributorsWithIds(contributorIds, true);
		for (Contributor nextContr : contributors) {
			rootElement.addContent(writer.encodeContributor(nextContr, false));
		}
		setResultDocument(doc);
	}
}


text:
npm-run-script(1) -- Run arbitrary package scripts
==================================================

## SYNOPSIS

    npm run-script <command> [-- <args>...]

    alias: npm run

## DESCRIPTION

This runs an arbitrary command from a package's `"scripts"` object.  If no
`"command"` is provided, it will list the available scripts.  `run[-script]` is
used by the test, start, restart, and stop commands, but can be called
directly, as well. When the scripts in the package are printed out, they're
separated into lifecycle (test, start, restart) and directly-run scripts.

As of [`npm@2.0.0`](http://blog.npmjs.org/post/98131109725/npm-2-0-0), you can
use custom arguments when executing scripts. The special option `--` is used by
[getopt](http://goo.gl/KxMmtG) to delimit the end of the options. npm will pass
all the arguments after the `--` directly to your script:

    npm run test -- --grep="pattern"

The arguments will only be passed to the script specified after ```npm run```
and not to any pre or post script.

The `env` script is a special built-in command that can be used to list
environment variables that will be available to the script at runtime. If an
"env" command is defined in your package it will take precedence over the
built-in.

In addition to the shell's pre-existing `PATH`, `npm run` adds
`node_modules/.bin` to the `PATH` provided to scripts. Any binaries provided by
locally-installed dependencies can be used without the `node_modules/.bin`
prefix. For example, if there is a `devDependency` on `tap` in your package,
you should write:

    "scripts": {"test": "tap test/\*.js"}

instead of `"scripts": {"test": "node_modules/.bin/tap test/\*.js"}` to run your tests.

If you try to run a script without having a `node_modules` directory and it fails,
you will be given a warning to run `npm install`, just in case you've forgotten.

## SEE ALSO

* npm-scripts(7)
* npm-test(1)
* npm-start(1)
* npm-restart(1)
* npm-stop(1)


text:
package edu.cmu.hcii.whyline.qa;

import gnu.trove.TLongHashSet;

public class ExpectedObject {

	private final TLongHashSet objectIDs;
	private final long objectID;	// Which object do we expect to find?
	private final int expectedArgument;	// Which argument do we expect to find it in?

	/**
	 * Expected the instruction to use a particular objectID for at least one of its arguments.
	 */
	public ExpectedObject(long objectID) {

		this.objectID = objectID;
		this.objectIDs = null;
		this.expectedArgument = -1;

	}

	/**
	 * We expect to find a particular object ID as a particular argument.
	 */
	public ExpectedObject(long objectID, int arg) {

		this.objectID = objectID;
		this.objectIDs = null;
		this.expectedArgument = arg;

	}

	/**
	 * We expect to find one or more of the given object IDs in any of the arguments.
	 */
	public ExpectedObject(TLongHashSet objectIDs) {

		this.objectID = -1;
		this.expectedArgument = -1;
		this.objectIDs = objectIDs;

	}

	public long getExpectedObjectID() { return objectID; }
	public boolean expectsObjectID(long id) { return objectIDs.contains(id); }

	public int getExpectedArgument() { return expectedArgument; }

	public boolean expectsSpecificArgument() { return expectedArgument >= 0; }

	public boolean expectsSpecificObjectID() { return objectID >= 0; }
	public boolean expectsOneOfManyObjectIDs() { return objectIDs != null; }

	public String toString() { return "expects id = " + objectID + " in " + (expectsSpecificArgument() ? "arg " + expectedArgument : " any arg ") + " of instruction."; }

}


text:
package com.dfyy.dao;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import com.dfyy.bussiness.UserModify;
import com.dfyy.bussiness.UserRecipe;

@Repository
public interface UserModifyDao extends CrudRepository<UserModify, Integer>, JpaSpecificationExecutor<UserModify> {

	@Query("select u from UserModify as u left join fetch u.user  where u.user.id = ?1 ")
	public List<UserModify> findByUser(String userID);

	@Query("select u from UserModify as u left join fetch u.user  order by u.time desc ")
	public List<UserModify> findBy(Pageable pageable);

	@Query("select count(u) from UserModify as u  ")
	public int allCount();
}


text:
angular.module('app.dashboard').factory('profileService', ['$http', '$q', '$timeout', 'AppConfig', function ($http, $q, $timeout, AppConfig) {

    return {

        getBasicInfo: function (userId) {
            return $http({
                url: AppConfig.serverBaseUrl + "profile_basic.php",
                method: "GET",
                params: {
                    userId: userId
                }
                // url: 'api.test/user.profile.basic.json',
                // method: 'GET',
                // params:{
                //     userId:userId
                // }
            })
        },
        add: function (registerDate, userName, sex, departmentId, teamId, floorId, phone, realName) {
            return $http({
                url: AppConfig.serverBaseUrl + "profile_save.php",
                method: "POST",
                data: {
                    registerDate: registerDate,
                    userName: userName,
                    sex: sex,
                    departmentId: departmentId,
                    teamId: teamId,
                    floorId: floorId,
                    phone: phone,
                    realName: realName,
                }
            });
        },
        getMoreInfo: function (userId) {
            return $http({
                url: AppConfig.serverBaseUrl + "profile_more.php",
                method: "GET",
                params: {
                    userId: userId
                }
            });
        },
        getTeamList: function () {
            return $http({
                url: AppConfig.serverBaseUrl + 'team_list.php',
                method: "GET"
            });
        },
        getDepartmentList: function () {
            return $http({
                url: AppConfig.serverBaseUrl + 'department_list.php',
                method: "GET"
            });
        },
        getFloorList: function () {
            return $http({
                url: AppConfig.serverBaseUrl + 'floor_list.php',
                method: "GET"
            });
        }

    };
}]);


text:
package irc

import (
	"fmt"
	"strings"
	"time"
)

type ReplyCode interface {
	String() string
}

type StringCode string

func (code StringCode) String() string {
	return string(code)
}

type NumericCode uint

func (code NumericCode) String() string {
	return fmt.Sprintf("%03d", code)
}

func NewStringReply(source Identifiable, code StringCode,
	format string, args ...interface{}) string {
	var header string
	if source == nil {
		header = code.String() + " "
	} else {
		header = fmt.Sprintf(":%s %s ", source, code)
	}
	var message string
	if len(args) > 0 {
		message = fmt.Sprintf(format, args...)
	} else {
		message = format
	}
	return header + message
}

func NewNumericReply(target *Client, code NumericCode,
	format string, args ...interface{}) string {
	header := fmt.Sprintf(":%s %s %s ", target.server.Id(), code, target.Nick())
	var message string
	if len(args) > 0 {
		message = fmt.Sprintf(format, args...)
	} else {
		message = format
	}
	return header + message
}

func (target *Client) NumericReply(code NumericCode,
	format string, args ...interface{}) {
	target.Reply(NewNumericReply(target, code, format, args...))
}

//
// multiline replies
//

func joinedLen(names []string) int {
	var l = len(names) - 1 // " " between names
	for _, name := range names {
		l += len(name)
	}
	return l
}

func (target *Client) MultilineReply(names []string, code NumericCode, format string,
	args ...interface{}) {
	baseLen := len(NewNumericReply(target, code, format))
	tooLong := func(names []string) bool {
		return (baseLen + joinedLen(names)) > MAX_REPLY_LEN
	}
	argsAndNames := func(names []string) []interface{} {
		return append(args, strings.Join(names, " "))
	}
	from, to := 0, 1
	for to < len(names) {
		if (from < (to - 1)) && tooLong(names[from:to]) {
			target.NumericReply(code, format, argsAndNames(names[from:to-1])...)
			from = to - 1
		} else {
			to += 1
		}
	}
	if from < len(names) {
		target.NumericReply(code, format, argsAndNames(names[from:])...)
	}
}

//
// messaging replies
//

func RplPrivMsg(source Identifiable, target Identifiable, message Text) string {
	return NewStringReply(source, PRIVMSG, "%s :%s", target.Nick(), message)
}

func RplCTCPAction(source Identifiable, target Identifiable, action CTCPText) string {
	return RplPrivMsg(source, target, NewText(fmt.Sprintf("\x01ACTION %s\x01", action)))
}

func RplNotice(source Identifiable, target Identifiable, message Text) string {
	return NewStringReply(source, NOTICE, "%s :%s", target.Nick(), message)
}

func RplNick(source Identifiable, newNick Name) string {
	return NewStringReply(source, NICK, newNick.String())
}

func RplJoin(client *Client, channel *Channel) string {
	return NewStringReply(client, JOIN, channel.name.String())
}

func RplPart(client *Client, channel *Channel, message Text) string {
	return NewStringReply(client, PART, "%s :%s", channel, message)
}

func RplModeChanges(client *Client, target *Client, changes ModeChanges) string {
	return NewStringReply(client, MODE, "%s :%s", target.Nick(), changes)
}

func RplCurrentMode(client *Client, target *Client) string {
	globalFlags := "global:"
	for mode, _ := range target.flags {
		globalFlags += mode.String()
	}

	perChannelFlags := ""
	for channel, _ := range target.channels {
		perChannelFlags += fmt.Sprintf(" %s:%s", channel.name, channel.members[target])
	}

	response := NewText(fmt.Sprintf("user %s has %s%s", target.nick, globalFlags, perChannelFlags))
	return RplNotice(client.server, client, response)
}

func RplChannelMode(client *Client, channel *Channel,
	changes ChannelModeChanges) string {
	return NewStringReply(client, MODE, "%s %s", channel, changes)
}

func RplTopicMsg(source Identifiable, channel *Channel) string {
	return NewStringReply(source, TOPIC, "%s :%s", channel, channel.topic)
}

func RplPing(target Identifiable) string {
	return NewStringReply(nil, PING, ":%s", target.Nick())
}

func RplPong(client *Client, msg Text) string {
	return NewStringReply(nil, PONG, "%s :%s", client.server, msg.String())
}

func RplQuit(client *Client, message Text) string {
	return NewStringReply(client, QUIT, ":%s", message)
}

func RplError(message string) string {
	return NewStringReply(nil, ERROR, ":%s", message)
}

func RplInviteMsg(inviter *Client, invitee *Client, channel Name) string {
	return NewStringReply(inviter, INVITE, "%s :%s", invitee.Nick(), channel)
}

func RplKick(channel *Channel, client *Client, target *Client, comment Text) string {
	return NewStringReply(client, KICK, "%s %s :%s",
		channel, target.Nick(), comment)
}

func RplKill(client *Client, target *Client, comment Text) string {
	return NewStringReply(client, KICK,
		"%s :%s", target.Nick(), comment)
}

func RplCap(client *Client, subCommand CapSubCommand, arg interface{}) string {
	return NewStringReply(nil, CAP, "%s %s :%s", client.Nick(), subCommand, arg)
}

// numeric replies

func (target *Client) RplWelcome() {
	target.NumericReply(RPL_WELCOME,
		":Welcome to the Internet Relay Network %s", target.Id())
}

func (target *Client) RplYourHost() {
	target.NumericReply(RPL_YOURHOST,
		":Your host is %s, running version %s", target.server.name, SEM_VER)
}

func (target *Client) RplCreated() {
	target.NumericReply(RPL_CREATED,
		":This server was created %s", target.server.ctime.Format(time.RFC1123))
}

func (target *Client) RplMyInfo() {
	target.NumericReply(RPL_MYINFO,
		"%s %s %s %s",
		target.server.name, SEM_VER, SupportedUserModes, SupportedChannelModes)
}

func (target *Client) RplUModeIs(client *Client) {
	target.NumericReply(RPL_UMODEIS, client.ModeString())
}

func (target *Client) RplNoTopic(channel *Channel) {
	target.NumericReply(RPL_NOTOPIC,
		"%s :No topic is set", channel.name)
}

func (target *Client) RplTopic(channel *Channel) {
	target.NumericReply(RPL_TOPIC,
		"%s :%s", channel.name, channel.topic)
}

// <nick> <channel>
// NB: correction in errata
func (target *Client) RplInvitingMsg(invitee *Client, channel Name) {
	target.NumericReply(RPL_INVITING,
		"%s %s", invitee.Nick(), channel)
}

func (target *Client) RplEndOfNames(channel *Channel) {
	target.NumericReply(RPL_ENDOFNAMES,
		"%s :End of NAMES list", channel.name)
}

// :You are now an IRC operator
func (target *Client) RplYoureOper() {
	target.NumericReply(RPL_YOUREOPER,
		":You are now an IRC operator")
}

func (target *Client) RplWhois(client *Client) {
	target.RplWhoisUser(client)
	if client.flags[Operator] {
		target.RplWhoisOperator(client)
	}
	target.RplWhoisIdle(client)
	target.RplWhoisChannels(client)
	target.RplEndOfWhois()
}

func (target *Client) RplWhoisUser(client *Client) {
	target.NumericReply(RPL_WHOISUSER,
		"%s %s %s * :%s", client.Nick(), client.username, client.hostname,
		client.realname)
}

func (target *Client) RplWhoisOperator(client *Client) {
	target.NumericReply(RPL_WHOISOPERATOR,
		"%s :is an IRC operator", client.Nick())
}

func (target *Client) RplWhoisIdle(client *Client) {
	target.NumericReply(RPL_WHOISIDLE,
		"%s %d %d :seconds idle, signon time",
		client.Nick(), client.IdleSeconds(), client.SignonTime())
}

func (target *Client) RplEndOfWhois() {
	target.NumericReply(RPL_ENDOFWHOIS,
		":End of WHOIS list")
}

func (target *Client) RplChannelModeIs(channel *Channel) {
	target.NumericReply(RPL_CHANNELMODEIS,
		"%s %s", channel, channel.ModeString(target))
}

// <channel> <user> <host> <server> <nick> ( "H" / "G" ) ["*"] [ ( "@" / "+" ) ]
// :<hopcount> <real name>
func (target *Client) RplWhoReply(channel *Channel, client *Client) {
	channelName := "*"
	flags := ""

	if client.flags[Away] {
		flags = "G"
	} else {
		flags = "H"
	}
	if client.flags[Operator] {
		flags += "*"
	}

	if channel != nil {
		channelName = channel.name.String()
		if target.capabilities[MultiPrefix] {
			if channel.members[client][ChannelOperator] {
				flags += "@"
			}
			if channel.members[client][Voice] {
				flags += "+"
			}
		} else {
			if channel.members[client][ChannelOperator] {
				flags += "@"
			} else if channel.members[client][Voice] {
				flags += "+"
			}
		}
	}
	target.NumericReply(RPL_WHOREPLY,
		"%s %s %s %s %s %s :%d %s", channelName, client.username, client.hostname,
		client.server.name, client.Nick(), flags, client.hops, client.realname)
}

// <name> :End of WHO list
func (target *Client) RplEndOfWho(name Name) {
	target.NumericReply(RPL_ENDOFWHO,
		"%s :End of WHO list", name)
}

func (target *Client) RplMaskList(mode ChannelMode, channel *Channel, mask Name) {
	switch mode {
	case BanMask:
		target.RplBanList(channel, mask)

	case ExceptMask:
		target.RplExceptList(channel, mask)

	case InviteMask:
		target.RplInviteList(channel, mask)
	}
}

func (target *Client) RplEndOfMaskList(mode ChannelMode, channel *Channel) {
	switch mode {
	case BanMask:
		target.RplEndOfBanList(channel)

	case ExceptMask:
		target.RplEndOfExceptList(channel)

	case InviteMask:
		target.RplEndOfInviteList(channel)
	}
}

func (target *Client) RplBanList(channel *Channel, mask Name) {
	target.NumericReply(RPL_BANLIST,
		"%s %s", channel, mask)
}

func (target *Client) RplEndOfBanList(channel *Channel) {
	target.NumericReply(RPL_ENDOFBANLIST,
		"%s :End of channel ban list", channel)
}

func (target *Client) RplExceptList(channel *Channel, mask Name) {
	target.NumericReply(RPL_EXCEPTLIST,
		"%s %s", channel, mask)
}

func (target *Client) RplEndOfExceptList(channel *Channel) {
	target.NumericReply(RPL_ENDOFEXCEPTLIST,
		"%s :End of channel exception list", channel)
}

func (target *Client) RplInviteList(channel *Channel, mask Name) {
	target.NumericReply(RPL_INVITELIST,
		"%s %s", channel, mask)
}

func (target *Client) RplEndOfInviteList(channel *Channel) {
	target.NumericReply(RPL_ENDOFINVITELIST,
		"%s :End of channel invite list", channel)
}

func (target *Client) RplNowAway() {
	target.NumericReply(RPL_NOWAWAY,
		":You have been marked as being away")
}

func (target *Client) RplUnAway() {
	target.NumericReply(RPL_UNAWAY,
		":You are no longer marked as being away")
}

func (target *Client) RplAway(client *Client) {
	target.NumericReply(RPL_AWAY,
		"%s :%s", client.Nick(), client.awayMessage)
}

func (target *Client) RplIsOn(nicks []string) {
	target.NumericReply(RPL_ISON,
		":%s", strings.Join(nicks, " "))
}

func (target *Client) RplMOTDStart() {
	target.NumericReply(RPL_MOTDSTART,
		":- %s Message of the day - ", target.server.name)
}

func (target *Client) RplMOTD(line string) {
	target.NumericReply(RPL_MOTD,
		":- %s", line)
}

func (target *Client) RplMOTDEnd() {
	target.NumericReply(RPL_ENDOFMOTD,
		":End of MOTD command")
}

func (target *Client) RplList(channel *Channel) {
	target.NumericReply(RPL_LIST,
		"%s %d :%s", channel, len(channel.members), channel.topic)
}

func (target *Client) RplListEnd(server *Server) {
	target.NumericReply(RPL_LISTEND,
		":End of LIST")
}

func (target *Client) RplNamReply(channel *Channel) {
	target.MultilineReply(channel.Nicks(target), RPL_NAMREPLY,
		"= %s :%s", channel)
}

func (target *Client) RplWhoisChannels(client *Client) {
	target.MultilineReply(client.WhoisChannelsNames(), RPL_WHOISCHANNELS,
		"%s :%s", client.Nick())
}

func (target *Client) RplVersion() {
	target.NumericReply(RPL_VERSION,
		"%s %s", SEM_VER, target.server.name)
}

func (target *Client) RplInviting(invitee *Client, channel Name) {
	target.NumericReply(RPL_INVITING,
		"%s %s", invitee.Nick(), channel)
}

func (target *Client) RplTime() {
	target.NumericReply(RPL_TIME,
		"%s :%s", target.server.name, time.Now().Format(time.RFC1123))
}

func (target *Client) RplWhoWasUser(whoWas *WhoWas) {
	target.NumericReply(RPL_WHOWASUSER,
		"%s %s %s * :%s",
		whoWas.nickname, whoWas.username, whoWas.hostname, whoWas.realname)
}

func (target *Client) RplEndOfWhoWas(nickname Name) {
	target.NumericReply(RPL_ENDOFWHOWAS,
		"%s :End of WHOWAS", nickname)
}

//
// errors (also numeric)
//

func (target *Client) ErrAlreadyRegistered() {
	target.NumericReply(ERR_ALREADYREGISTRED,
		":You may not reregister")
}

func (target *Client) ErrNickNameInUse(nick Name) {
	target.NumericReply(ERR_NICKNAMEINUSE,
		"%s :Nickname is already in use", nick)
}

func (target *Client) ErrUnknownCommand(code StringCode) {
	target.NumericReply(ERR_UNKNOWNCOMMAND,
		"%s :Unknown command", code)
}

func (target *Client) ErrUsersDontMatch() {
	target.NumericReply(ERR_USERSDONTMATCH,
		":Cannot change mode for other users")
}

func (target *Client) ErrNeedMoreParams(command StringCode) {
	target.NumericReply(ERR_NEEDMOREPARAMS,
		"%s :Not enough parameters", command)
}

func (target *Client) ErrNoSuchChannel(channel Name) {
	target.NumericReply(ERR_NOSUCHCHANNEL,
		"%s :No such channel", channel)
}

func (target *Client) ErrUserOnChannel(channel *Channel, member *Client) {
	target.NumericReply(ERR_USERONCHANNEL,
		"%s %s :is already on channel", member.Nick(), channel.name)
}

func (target *Client) ErrNotOnChannel(channel *Channel) {
	target.NumericReply(ERR_NOTONCHANNEL,
		"%s :You're not on that channel", channel.name)
}

func (target *Client) ErrInviteOnlyChannel(channel *Channel) {
	target.NumericReply(ERR_INVITEONLYCHAN,
		"%s :Cannot join channel (+i)", channel.name)
}

func (target *Client) ErrBadChannelKey(channel *Channel) {
	target.NumericReply(ERR_BADCHANNELKEY,
		"%s :Cannot join channel (+k)", channel.name)
}

func (target *Client) ErrNoSuchNick(nick Name) {
	target.NumericReply(ERR_NOSUCHNICK,
		"%s :No such nick/channel", nick)
}

func (target *Client) ErrPasswdMismatch() {
	target.NumericReply(ERR_PASSWDMISMATCH, ":Password incorrect")
}

func (target *Client) ErrNoChanModes(channel *Channel) {
	target.NumericReply(ERR_NOCHANMODES,
		"%s :Channel doesn't support modes", channel)
}

func (target *Client) ErrNoPrivileges() {
	target.NumericReply(ERR_NOPRIVILEGES, ":Permission Denied")
}

func (target *Client) ErrRestricted() {
	target.NumericReply(ERR_RESTRICTED, ":Your connection is restricted!")
}

func (target *Client) ErrNoSuchServer(server Name) {
	target.NumericReply(ERR_NOSUCHSERVER, "%s :No such server", server)
}

func (target *Client) ErrUserNotInChannel(channel *Channel, client *Client) {
	target.NumericReply(ERR_USERNOTINCHANNEL,
		"%s %s :They aren't on that channel", client.Nick(), channel)
}

func (target *Client) ErrCannotSendToChan(channel *Channel) {
	target.NumericReply(ERR_CANNOTSENDTOCHAN,
		"%s :Cannot send to channel", channel)
}

// <channel> :You're not channel operator
func (target *Client) ErrChanOPrivIsNeeded(channel *Channel) {
	target.NumericReply(ERR_CHANOPRIVSNEEDED,
		"%s :You're not channel operator", channel)
}

func (target *Client) ErrNoMOTD() {
	target.NumericReply(ERR_NOMOTD, ":MOTD File is missing")
}

func (target *Client) ErrNoNicknameGiven() {
	target.NumericReply(ERR_NONICKNAMEGIVEN, ":No nickname given")
}

func (target *Client) ErrErroneusNickname(nick Name) {
	target.NumericReply(ERR_ERRONEUSNICKNAME,
		"%s :Erroneous nickname", nick)
}

func (target *Client) ErrUnknownMode(mode ChannelMode, channel *Channel) {
	target.NumericReply(ERR_UNKNOWNMODE,
		"%s :is unknown mode char to me for %s", mode, channel)
}

func (target *Client) ErrConfiguredMode(mode ChannelMode) {
	target.NumericReply(ERR_UNKNOWNMODE,
		"%s :can only change this mode in daemon configuration", mode)
}

func (target *Client) ErrChannelIsFull(channel *Channel) {
	target.NumericReply(ERR_CHANNELISFULL,
		"%s :Cannot join channel (+l)", channel)
}

func (target *Client) ErrWasNoSuchNick(nickname Name) {
	target.NumericReply(ERR_WASNOSUCHNICK,
		"%s :There was no such nickname", nickname)
}

func (target *Client) ErrInvalidCapCmd(subCommand CapSubCommand) {
	target.NumericReply(ERR_INVALIDCAPCMD,
		"%s :Invalid CAP subcommand", subCommand)
}

func (target *Client) ErrBannedFromChan(channel *Channel) {
	target.NumericReply(ERR_BANNEDFROMCHAN,
		"%s :Cannot join channel (+b)", channel)
}

func (target *Client) ErrInviteOnlyChan(channel *Channel) {
	target.NumericReply(ERR_INVITEONLYCHAN,
		"%s :Cannot join channel (+i)", channel)
}


text:
class Tag < ActiveRecord::Base
  belongs_to :user
  has_many :tag_group_relations
  has_many :groups, :through => :tag_group_relations
  has_many :expenses

  named_scope :income, :conditions => ["is_income = ?", true]
  named_scope :outgoing, :conditions => ["is_income = ?", false]
  named_scope :sort_by_counter, :order => "counter DESC"

  def <=>(other_tag)
    self.counter <=> other_tag.counter
  end

  # Tags priority is 1. I even used 2. Groups even used 3. other
  def self.get_sorted_tags(user, kind = "outgoing")
    if kind == "income"
      my_tags = user.expenses.income.map{ |expense| expense.tag }.uniq.sort
      groups_tags = user.groups.approved_groups.map{ |group| group.tags.income }.flatten.uniq.sort
      all_tags = Tag.income.sort
    else
      my_tags = user.expenses.outgoing.map{ |expense| expense.tag }.uniq.sort
      groups_tags = user.groups.approved_groups.map{ |group| group.tags.outgoing }.flatten.uniq.sort
      all_tags = Tag.outgoing.sort
    end
    return [my_tags, groups_tags, all_tags].flatten.uniq
  end
end


text:
Sequel.migration do
  change do
    alter_table :assertion_id_request_services do
      add_foreign_key :attribute_authority_descriptor_id,
                      :attribute_authority_descriptors, null: true,
                      foreign_key_constraint_name: 'aad_aidrs_fkey'
    end
  end
end


text:
/* Includes ------------------------------------------------------------------*/
#include "stm32f3xx_hal.h"
#include "stm32f3xx.h"
#include "stm32f3xx_it.h"
#include "cmsis_os.h"

/* USER CODE BEGIN 0 */

/* USER CODE END 0 */

/* External variables --------------------------------------------------------*/
extern void xPortSysTickHandler(void);
extern PCD_HandleTypeDef hpcd_USB_FS;
extern DMA_HandleTypeDef hdma_adc1;
extern DMA_HandleTypeDef hdma_adc2;
extern DMA_HandleTypeDef hdma_adc3;
extern DMA_HandleTypeDef hdma_adc4;
extern DMA_HandleTypeDef hdma_dac_ch1;
extern DMA_HandleTypeDef hdma_dac_ch2;

/******************************************************************************/
/*            Cortex-M4 Processor Interruption and Exception Handlers         */
/******************************************************************************/

/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
  /* USER CODE BEGIN SysTick_IRQn 0 */

  /* USER CODE END SysTick_IRQn 0 */
  HAL_IncTick();
  if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) {
    xPortSysTickHandler();
  }
  /* USER CODE BEGIN SysTick_IRQn 1 */

  /* USER CODE END SysTick_IRQn 1 */
}

/******************************************************************************/
/* STM32F3xx Peripheral Interrupt Handlers                                    */
/* Add here the Interrupt Handlers for the used peripherals.                  */
/* For the available peripheral interrupt handler names,                      */
/* please refer to the startup file (startup_stm32f3xx.s).                    */
/******************************************************************************/

/**
* @brief This function handles DMA1 channel1 global interrupt.
*/
void DMA1_Channel1_IRQHandler(void)
{
  /* USER CODE BEGIN DMA1_Channel1_IRQn 0 */

  /* USER CODE END DMA1_Channel1_IRQn 0 */
  HAL_DMA_IRQHandler(&hdma_adc1);
  /* USER CODE BEGIN DMA1_Channel1_IRQn 1 */

  /* USER CODE END DMA1_Channel1_IRQn 1 */
}

/**
* @brief This function handles DMA1 channel3 global interrupt.
*/
void DMA1_Channel3_IRQHandler(void)
{
  /* USER CODE BEGIN DMA1_Channel3_IRQn 0 */

  /* USER CODE END DMA1_Channel3_IRQn 0 */
  HAL_DMA_IRQHandler(&hdma_dac_ch1);
  /* USER CODE BEGIN DMA1_Channel3_IRQn 1 */

  /* USER CODE END DMA1_Channel3_IRQn 1 */
}

/**
* @brief This function handles DMA1 channel4 global interrupt.
*/
void DMA1_Channel4_IRQHandler(void)
{
  /* USER CODE BEGIN DMA1_Channel4_IRQn 0 */

  /* USER CODE END DMA1_Channel4_IRQn 0 */
  HAL_DMA_IRQHandler(&hdma_dac_ch2);
  /* USER CODE BEGIN DMA1_Channel4_IRQn 1 */

  /* USER CODE END DMA1_Channel4_IRQn 1 */
}

/**
* @brief This function handles USB low priority or CAN_RX0 interrupts.
*/
void USB_LP_CAN_RX0_IRQHandler(void)
{
  /* USER CODE BEGIN USB_LP_CAN_RX0_IRQn 0 */

  /* USER CODE END USB_LP_CAN_RX0_IRQn 0 */
  HAL_PCD_IRQHandler(&hpcd_USB_FS);
  /* USER CODE BEGIN USB_LP_CAN_RX0_IRQn 1 */

  /* USER CODE END USB_LP_CAN_RX0_IRQn 1 */
}

/**
* @brief This function handles DMA2 channel1 global interrupt.
*/
void DMA2_Channel1_IRQHandler(void)
{
  /* USER CODE BEGIN DMA2_Channel1_IRQn 0 */

  /* USER CODE END DMA2_Channel1_IRQn 0 */
  HAL_DMA_IRQHandler(&hdma_adc2);
  /* USER CODE BEGIN DMA2_Channel1_IRQn 1 */

  /* USER CODE END DMA2_Channel1_IRQn 1 */
}

/**
* @brief This function handles DMA2 channel2 global interrupt.
*/
void DMA2_Channel2_IRQHandler(void)
{
  /* USER CODE BEGIN DMA2_Channel2_IRQn 0 */

  /* USER CODE END DMA2_Channel2_IRQn 0 */
  HAL_DMA_IRQHandler(&hdma_adc4);
  /* USER CODE BEGIN DMA2_Channel2_IRQn 1 */

  /* USER CODE END DMA2_Channel2_IRQn 1 */
}

/**
* @brief This function handles DMA2 channel5 global interrupt.
*/
void DMA2_Channel5_IRQHandler(void)
{
  /* USER CODE BEGIN DMA2_Channel5_IRQn 0 */

  /* USER CODE END DMA2_Channel5_IRQn 0 */
  HAL_DMA_IRQHandler(&hdma_adc3);
  /* USER CODE BEGIN DMA2_Channel5_IRQn 1 */

  /* USER CODE END DMA2_Channel5_IRQn 1 */
}

/* USER CODE BEGIN 1 */

/* USER CODE END 1 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/


text:
package uk.ac.ebi.spot.goci.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import uk.ac.ebi.spot.goci.model.AncestralGroup;
import uk.ac.ebi.spot.goci.model.AncestralGroupAnnotation;
import uk.ac.ebi.spot.goci.model.CoOAnnotation;
import uk.ac.ebi.spot.goci.model.CoRAnnotation;
import uk.ac.ebi.spot.goci.model.Ancestry;
import uk.ac.ebi.spot.goci.model.Country;
import uk.ac.ebi.spot.goci.ontology.owl.OntologyLoader;
import uk.ac.ebi.spot.goci.repository.AncestryRepository;

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

/**
 * Created by dwelter on 06/10/15.
 */
@Service
public class AncestryMappingService {

    private AncestryRepository ancestryRepository;
    private OntologyLoader ontologyLoader;
    private OntologyExtractionService ontologyExtractionService;

    List<AncestralGroupAnnotation> ancestralGroups;
    List<CoOAnnotation> coOAnnotations;
    List<CoRAnnotation> coRAnnotations;

    @Autowired
    public AncestryMappingService(AncestryRepository ancestryRepository,
                                  OntologyLoader ontologyLoader,
                                  OntologyExtractionService ontologyExtractionService) {
        this.ancestryRepository = ancestryRepository;
        this.ontologyLoader = ontologyLoader;
        this.ontologyExtractionService = ontologyExtractionService;

        ancestralGroups = new ArrayList<AncestralGroupAnnotation>();
        coOAnnotations = new ArrayList<CoOAnnotation>();
        coRAnnotations = new ArrayList<CoRAnnotation>();
    }

    //    private Logger log = LoggerFactory.getLogger(getClass());
    //
    //    protected Logger getLog() {
    //        return log;
    //    }

    private Logger output = LoggerFactory.getLogger("output");

    protected Logger getOutput() {
        return output;
    }

    private Logger errors = LoggerFactory.getLogger("errors");

    protected Logger getErrors() {
        return errors;
    }

    public List<Ancestry> getAllAncestries() {
        List<Ancestry> ancestries = ancestryRepository.findAll();
        getErrors().info("Found " + ancestries.size() + " ancestry records");
        return ancestries;
    }

    public void printOutOntologyContent() {
        getErrors().info("Available ancestral groups:");
        Set<String> groups = ontologyExtractionService.getAncestralGroups().keySet();

        for (String grp : groups) {
            getErrors().info(grp);
        }

        getErrors().info("Available countries:");
        Set<String> countries = ontologyExtractionService.getCountries().keySet();

        for (String ctr : countries) {
            getErrors().info(ctr);
        }

    }

    public void processAncestries() {
        printOutOntologyContent();
        ;

        List<Ancestry> allAncestries = getAllAncestries();

        for (Ancestry ancestry : allAncestries) {

            Long id = ancestry.getId();

            String coo = null;

            if(ancestry.getCountryOfOrigin() != null) {
                for(Country c : ancestry.getCountryOfOrigin()){
                    if (coo == null){
                        coo = c.getCountryName();
                    }
                    else {
                        coo = coo.concat(", ").concat(c.getCountryName());
                    }
                }
            }
            else {
                coo = "NR";
            }

            String cor = null;

            if (ancestry.getCountryOfRecruitment() != null) {
                for(Country c : ancestry.getCountryOfRecruitment()){
                    if (cor == null){
                        cor = c.getCountryName();
                    }
                    else {
                        cor = cor.concat(", ").concat(c.getCountryName());
                    }
                }                    }
            else {
                cor = "NR";
            }

            String ancestralGroup = null;

            if (ancestry.getAncestralGroups() != null) {
                for(AncestralGroup a : ancestry.getAncestralGroups()){
                    if (ancestralGroup == null){
                        ancestralGroup = a.getAncestralGroup();
                    }
                    else {
                        ancestralGroup = ancestralGroup.concat(", ").concat(a.getAncestralGroup());
                    }
                }                    }
            else{
                ancestralGroup = "NR";
            }

            if (ancestralGroup != null) {
                if (ancestralGroup.contains(",")) {
                    String[] groups = ancestralGroup.split(",");

                    for (String group : groups) {
                        mapAncestralGroup(id, group.toLowerCase());
                    }
                }
                else {
                    mapAncestralGroup(id, ancestralGroup.toLowerCase());
                }
            }

            if (coo != null) {
                if (coo.contains(",")) {
                    String[] countries = coo.split(",");

                    for (String country : countries) {
                        mapCoO(id, country.toLowerCase());
                    }
                }
                else {
                    mapCoO(id, coo.toLowerCase());
                }
            }

            if (cor != null) {
                if (cor.contains(",")) {
                    String[] countries = cor.split(",");

                    for (String country : countries) {
                        mapCoR(id, country.toLowerCase());
                    }
                }
                else {
                    mapCoR(id, cor.toLowerCase());
                }
            }

        }
        getErrors().info("All ancestries processed");

        printResult();
    }

    private void mapCoR(Long id, String country) {
        if (ontologyExtractionService.getCountryURI(country) != null) {
            coRAnnotations.add(new CoRAnnotation(id, country, ontologyExtractionService.getCountryURI(country)));
        }
        else {
            getErrors().info("No matching ontology found for CoR " + country + " (ID " + id + ")");
        }
    }

    private void mapCoO(Long id, String country) {
        if (ontologyExtractionService.getCountryURI(country) != null) {
            coOAnnotations.add(new CoOAnnotation(id, country, ontologyExtractionService.getCountryURI(country)));
        }
        else {
            getErrors().info("No matching ontology found for CoO " + country + " (ID " + id + ")");
        }
    }

    private void mapAncestralGroup(Long id, String group) {
        String label;
        if (group.contains("unspecified")) {
            label = group.split(" ")[0];
        }
        else {
            label = group;
        }
        if (ontologyExtractionService.getAncestralGroupURI(label) != null) {
            ancestralGroups.add(new AncestralGroupAnnotation(id,
                                                             group,
                                                             label,
                                                             ontologyExtractionService.getAncestralGroupURI(group)));
        }
        else {
            getErrors().info("No matching ontology found for ancestral group " + group + " (ID " + id + ")");
        }
    }

    public void printResult() {
        getOutput().info("Countries of origin: ");
        for (CoOAnnotation annot : coOAnnotations) {
            getOutput().info(annot.getId() + ", " + annot.getCountryOfOrigin() + ", " + annot.getOntologyURI());
        }

        getOutput().info("Countries of recruitment: ");

        for (CoRAnnotation annot : coRAnnotations) {
            getOutput().info(annot.getId() + ", " + annot.getCountryOfRecruitment() + ", " + annot.getOntologyURI());
        }

        getOutput().info("Ancestral groups: ");
        for (AncestralGroupAnnotation annot : ancestralGroups) {
            getOutput().info(annot.getId() + ", " + annot.getAncestralGroup() + ", " + annot.getOntologyLabel() + ", " +
                                     annot.getOntologyURI());
        }
    }
}


text:
namespace ExampleApp
{
    namespace InteriorsExplorer
    {
        class InteriorsExplorerFloorSelectionDraggedMessage
        {
        public:
            InteriorsExplorerFloorSelectionDraggedMessage(float dragParameter)
            : m_dragParam(dragParameter)
            {
            }

            const float GetDragParam() const { return m_dragParam; }

        private:
            float m_dragParam;
        };
    }
}


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

<title>Logger</title>
<meta name="date" content="2016-09-13">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Tree

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.lewetechnologies.app.logger

Class Logger

java.lang.Object

com.lewetechnologies.app.logger.Logger

public class Logger
extends java.lang.Object

Classe usata per la gesione dei log (usata per il debugging dell'applicazione)

Version:

1.00

Author:

Alessandro Pasqualini - alessandro.pasqualini.1105@gmail.com

Field Summary

Fields

Modifier and Type
Field and Description

static int
DEBUG

Livello di errore: informazioni di debug

static int
INFO

Livello di errore: informazioni generiche

static int
NO_LOG

Livello di errore: nessun log (usato in produzione)

static int
SEVERE

Livello di errore: informazioni gravi (massimo livello di gravità)

static int
WARNING

Livello di errore: informazioni di warning

Constructor Summary

Constructors

Constructor and Description

Logger()

Method Summary

Methods

Modifier and Type
Method and Description

static void
d(java.lang.String tag,
 java.lang.String msg)

Metodo che stampa log di debug (usa il livello DEBUG)

static void
d(java.lang.String tag,
 java.lang.String msg,
 int errorLevel)

Metodo che stampa log di debug

static void
e(java.lang.String tag,
 java.lang.String msg)

Metodo che stampa log di errore (usa il livello DEBUG)

static void
e(java.lang.String tag,
 java.lang.String msg,
 java.lang.Exception e)

Metodo che stampa log di errore con annessa eccezione (usa il livello DEBUG)

static void
e(java.lang.String tag,
 java.lang.String msg,
 java.lang.Exception e,
 int errorLevel)

Metodo che stampa log di errore con annessa eccezione

static void
e(java.lang.String tag,
 java.lang.String msg,
 int errorLevel)

Metodo che stampa log di errore

static void
i(java.lang.String tag,
 java.lang.String msg)

Metodo che stampa log informativi (usa il livello DEBUG)

static void
i(java.lang.String tag,
 java.lang.String msg,
 int errorLevel)

Metodo che stampa log informativi

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEBUG

public static final int DEBUG

Livello di errore: informazioni di debug

See Also:

Constant Field Values

INFO

public static final int INFO

Livello di errore: informazioni generiche

See Also:

Constant Field Values

NO_LOG

public static final int NO_LOG

Livello di errore: nessun log (usato in produzione)

See Also:

Constant Field Values

SEVERE

public static final int SEVERE

Livello di errore: informazioni gravi (massimo livello di gravità)

See Also:

Constant Field Values

WARNING

public static final int WARNING

Livello di errore: informazioni di warning

See Also:

Constant Field Values

Constructor Detail

Logger

public Logger()

Method Detail

d

public static void d(java.lang.String tag,
     java.lang.String msg)

Metodo che stampa log di debug (usa il livello DEBUG)

Parameters:

tag - Tag del log

msg - Messaggio del log

d

public static void d(java.lang.String tag,
     java.lang.String msg,
     int errorLevel)

Metodo che stampa log di debug

Parameters:

tag - Tag del log

msg - Messaggio del log

errorLevel - livello di errore

e

public static void e(java.lang.String tag,
     java.lang.String msg)

Metodo che stampa log di errore (usa il livello DEBUG)

Parameters:

tag - Tag del log

msg - Messaggio del log

e

public static void e(java.lang.String tag,
     java.lang.String msg,
     java.lang.Exception e)

Metodo che stampa log di errore con annessa eccezione (usa il livello DEBUG)

Parameters:

tag - Tag del log

msg - Messaggio del log

e - Eccezione da loggare

e

public static void e(java.lang.String tag,
     java.lang.String msg,
     java.lang.Exception e,
     int errorLevel)

Metodo che stampa log di errore con annessa eccezione

Parameters:

tag - Tag del log

msg - Messaggio del log

e - Eccezione da loggare

errorLevel - livello di errore

e

public static void e(java.lang.String tag,
     java.lang.String msg,
     int errorLevel)

Metodo che stampa log di errore

Parameters:

tag - Tag del log

msg - Messaggio del log

errorLevel - livello di errore

i

public static void i(java.lang.String tag,
     java.lang.String msg)

Metodo che stampa log informativi (usa il livello DEBUG)

Parameters:

tag - Tag del log

msg - Messaggio del log

i

public static void i(java.lang.String tag,
     java.lang.String msg,
     int errorLevel)

Metodo che stampa log informativi

Parameters:

tag - Tag del log

msg - Messaggio del log

errorLevel - livello di errore

Overview

Package

Class

Tree

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
#ifndef SUNRPC_SVCSOCK_H
#define SUNRPC_SVCSOCK_H

#include <linux/sunrpc/svc.h>
#include <linux/sunrpc/svc_xprt.h>

/*
 * RPC server socket.
 */
struct svc_sock {
	struct svc_xprt		sk_xprt;
	struct socket *		sk_sock;	/* berkeley socket layer */
	struct sock *		sk_sk;		/* INET layer */

	/* We keep the old state_change and data_ready CB's here */
	void			(*sk_ostate)(struct sock *);
	void			(*sk_odata)(struct sock *, int bytes);
	void			(*sk_owspace)(struct sock *);

	/* private TCP part */
	u32			sk_reclen;	/* length of record */
	u32			sk_tcplen;	/* current read length */
	struct page *		sk_pages[RPCSVC_MAXPAGES];	/* received data */
};

/*
 * Function prototypes.
 */
void		svc_close_net(struct svc_serv *, struct net *);
int		svc_recv(struct svc_rqst *, long);
int		svc_send(struct svc_rqst *);
void		svc_drop(struct svc_rqst *);
void		svc_sock_update_bufs(struct svc_serv *serv);
int		svc_sock_names(struct svc_serv *serv, char *buf,
					const size_t buflen,
					const char *toclose);
int		svc_addsock(struct svc_serv *serv, const int fd,
					char *name_return, const size_t len);
void		svc_init_xprt_sock(void);
void		svc_cleanup_xprt_sock(void);
struct svc_xprt *svc_sock_create(struct svc_serv *serv, int prot);
void		svc_sock_destroy(struct svc_xprt *);

/*
 * svc_makesock socket characteristics
 */
#define SVC_SOCK_DEFAULTS	(0U)
#define SVC_SOCK_ANONYMOUS	(1U << 0)	/* don't register with pmap */
#define SVC_SOCK_TEMPORARY	(1U << 1)	/* flag socket as temporary */

#endif /* SUNRPC_SVCSOCK_H */


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <title>Module: ActionView::Helpers</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />

          Module
          ActionView::Helpers

            In:

                lib/rails/localized_action_view.rb

Modify DateHelper to use localization
keys

Classes and Modules

      Module ActionView::Helpers::DateHelper

Module ActionView::Helpers::FormOptionsHelper

Module ActionView::Helpers::NumberHelper

[Validate]


text:
/**
 *
 */

package org.opensaml.saml2.core.impl;

import org.opensaml.common.xml.SAMLConstants;
import org.opensaml.saml2.core.AssertionIDRequest;

/**
 * A thread-safe Marshaller for {@link org.opensaml.saml2.core.AssertionIDRequest}.
 */
public class AssertionIDRequestMarshaller extends RequestAbstractTypeMarshaller {

    /**
     * Constructor.
     */
    public AssertionIDRequestMarshaller() {
        super(SAMLConstants.SAML20P_NS, AssertionIDRequest.DEFAULT_ELEMENT_LOCAL_NAME);
    }

    /**
     * Constructor.
     *
     * @param namespaceURI the namespace URI of either the schema type QName or element QName of the elements this
     *            marshaller operates on
     * @param elementLocalName the local name of either the schema type QName or element QName of the elements this
     *            marshaller operates on
     */
    protected AssertionIDRequestMarshaller(String namespaceURI, String elementLocalName) {
        super(namespaceURI, elementLocalName);
    }

}


text:
import test from 'ava';
import React from 'react';
import { mount } from 'enzyme';

import withProgress from '../../src/hoc/withProgress';
import ProgressProvider from '../../src/components/ProgressProvider';

function Target(props) {
  return (
    <p>{props.progress.value}</p>
  );
}

test('wraps progress provider', (t) => {
  const TargetWithProgress = withProgress(Target);
  const wrapper = mount(<TargetWithProgress />);
  t.is(wrapper.find(ProgressProvider).length, 1);
});


text:
..\..\bin\Release\v40\AbstractLexer.Generator.exe Lexer.fsl -o Lexer.fs
..\..\Bin\Release\v40\YC.YaccConstructor.exe -i SimpleCalc.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.ParseSimpleCalc -translate true -table LR -o SimpleCalc.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i Calc.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.ParseCalc -translate true -table LR -o Calc.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i simpleCalc_with_Nterms.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.SimpleCalcWithNTerm -translate true -table LR -o simpleCalc_with_Nterms.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i simpleCalc_with_Nterms_2.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.SimpleCalcWithNTerms_2 -translate true -table LR -o simpleCalc_with_Nterms_2.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i simpleCalc_with_Nterms_3.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.SimpleCalcWithNTerms_3 -translate true -table LR -o simpleCalc_with_Nterms_3.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i simpleCalc_with_Nterms_4.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.SimpleCalcWithNTerms_4 -translate true -table LR -o simpleCalc_with_Nterms_4.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i PrettySimpleCalc.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.PrettySimpleCalc -translate false -table LR -o PrettySimpleCalc.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i NotAmbigousSimpleCalc.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.NotAmbigousSimpleCalc -translate false -table LR -o NotAmbigousSimpleCalc.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i NotAmbigousSimpleCalcWith2Ops.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.NotAmbigousSimpleCalcWith2Ops -translate false -table LR -o NotAmbigousSimpleCalcWith2Ops.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i Stars.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.Stars -translate false -table LR -o Stars.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i Stars2.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.Stars2 -translate false -table LR -o Stars2.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i Eps.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.Eps -translate false -table LR -o Eps.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i List.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.List -translate false -table LR -o List.yrd.fs -abstract true" >> _log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i FirstEps.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.FirstEps -translate false -table LR -o FirstEps.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i CroppedBrackets.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.CroppedBrackets -translate false -table LR -o CroppedBrackets.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i Brackets.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.Brackets -translate false -table LR -o Brackets.yrd.fs -abstract true" >> log.txt

..\..\Bin\Release\v40\YC.YaccConstructor.exe -i StrangeBrackets.yrd -c ExpandEbnf -c ExpandMeta ^
        -g "RNGLRGenerator -pos int -token int -module RNGLR.StrangeBrackets -translate false -table LR -o StrangeBrackets.yrd.fs -abstract true" >> log.txt


text:
package org.exoplatform.portal.application;

import javax.servlet.ServletConfig;

import org.exoplatform.web.application.ApplicationFactory;

/**
 * @author Trong Tran
 * @version $Revision$
 */
public interface PortalApplicationFactory extends ApplicationFactory<PortalApplication, ServletConfig> {
}


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

namespace BugLogger.DataLayer
{
    public enum Status { Pending, Assigned, Fixed }
}


text:
<?php
declare(strict_types=1);
/**
 * /src/App/Traits/Rest/Methods/Count.php
 *
 * @author  TLe, Tarmo Leppänen <tarmo.leppanen@protacon.com>
 */
namespace App\Traits\Rest\Methods;

use App\Controller\Interfaces\RestController;
use App\Services\Rest\Helper\Interfaces\Response as RestHelperResponseInterface;
use App\Services\Rest\Interfaces\Base as ResourceServiceInterface;
use App\Utils\JSON;
use Doctrine\ORM\OptimisticLockException;
use Doctrine\ORM\ORMInvalidArgumentException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;

/**
 * Trait for generic 'Create' action for REST controllers. Trait will add following route definition to your controller
 * where you use this:
 *
 *  POST /_your_controller_path_
 *  POST /_your_controller_path_/
 *
 * Request must contain body that present your endpoint entity, note that only JSON is supported atm.
 *
 * Response of this request can be JSON or XML examples below. By default response is JSON but you can change it by
 * request headers. Responses are generated for entity that has id, name and description properties.
 *
 * JSON response:
 *  {
 *      "id": "60b0333b-b10e-48b7-982b-a217d031e6bb",
 *      "name": "new author",
 *      "description": "description"
 *  }
 *
 * XML response:
 *  <?xml version="1.0" encoding="UTF-8"?>
 *  <result>
 *      <id>
 *          <![CDATA[7a68f126-d46f-4c54-82c8-df71d6a3d6cf]]>
 *      </id>
 *      <name>
 *          <![CDATA[new author]]>
 *      </name>
 *      <description>
 *          <![CDATA[description]]>
 *      </description>
 *  </result>
 *
 * Note that controllers that uses this trait _must_ implement App\Controller\Interfaces\RestController interface.
 *
 * @package App\Traits\Rest\Methods
 * @author  TLe, Tarmo Leppänen <tarmo.leppanen@protacon.com>
 */
trait Create
{
    /**
     * Generic 'Create' method for REST endpoints.
     *
     * @throws  \LogicException
     * @throws  HttpException
     * @throws  MethodNotAllowedHttpException
     *
     * @param   Request $request
     * @param   array   $allowedHttpMethods
     *
     * @return  Response
     */
    public function createMethod(Request $request, array $allowedHttpMethods = null): Response
    {
        $allowedHttpMethods = $allowedHttpMethods ?? ['POST'];

        // Make sure that we have everything we need to make this  work
        if (!($this instanceof RestController)) {
            throw new \LogicException(
                'You cannot use App\Traits\Rest\Methods\Create trait within class that does not implement ' .
                'App\Controller\Interfaces\RestController interface.'
            );
        }

        if (!\in_array($request->getMethod(), $allowedHttpMethods, true)) {
            throw new MethodNotAllowedHttpException($allowedHttpMethods);
        }

        try {
            // Convert request content to DTO
            $dto = $this->getResponseService()
                ->getSerializer()
                ->deserialize(
                    $request->getContent(),
                    $this->getResourceService()->getDtoClass(),
                    'json'
                );

            return $this->getResponseService()->createResponse(
                $request,
                $this->getResourceService()->create($dto),
                201
            );
        } catch (\Exception $error) {
            if ($error instanceof HttpException) {
                throw $error;
            }

            if ($error instanceof OptimisticLockException || $error instanceof ORMInvalidArgumentException) {
                throw new HttpException(
                    Response::HTTP_INTERNAL_SERVER_ERROR,
                    $error->getMessage(),
                    $error,
                    [],
                    Response::HTTP_INTERNAL_SERVER_ERROR
                );
            }

            throw new HttpException(
                Response::HTTP_BAD_REQUEST,
                $error->getMessage(),
                $error,
                [],
                Response::HTTP_BAD_REQUEST
            );
        }
    }

    /**
     * Getter method for resource service.
     *
     * @return ResourceServiceInterface
     */
    abstract public function getResourceService(): ResourceServiceInterface;

    /**
     * Getter method for REST response helper service.
     *
     * @return RestHelperResponseInterface
     */
    abstract public function getResponseService(): RestHelperResponseInterface;
}


text:
<?php
/**
 * Contains \jamesiarmes\PhpEws\ArrayType\NonEmptyArrayOfSubscriptionIdsType.
 */

namespace jamesiarmes\PhpEws\ArrayType;

use \jamesiarmes\PhpEws\ArrayType;

/**
 * Represents an array of invalid subscription IDs.
 *
 * @package php-ews\Array
 */
class NonEmptyArrayOfSubscriptionIdsType extends ArrayType
{
    /**
     * Represents the identifier for a subscription.
     *
     * @since Exchange 2010 SP1
     *
     * @var string[]
     */
    public $SubscriptionId;
}


text:
import { SimpleWithPartitionKeyModel, UpdateModel } from '../../../test/models'
import { SpecialCasesModel } from '../../../test/models/special-cases-model.model'
import { metadataForModel } from '../../decorator/metadata/metadata-for-model.function'
import { UpdateActionDef } from './type/update-action-def'
import { buildUpdateExpression } from './update-expression-builder'

describe('buildUpdateExpression', () => {
  const metaDataS = metadataForModel(SimpleWithPartitionKeyModel)
  const metaDataU = metadataForModel(UpdateModel)

  it('should throw when operation.action is unknown', () => {
    const unknownOp = new UpdateActionDef('SET', <any>'subtract')
    expect(() => buildUpdateExpression('age', unknownOp, [3], [], metaDataS)).toThrow()
  })

  describe('incrementBy', () => {
    const op = new UpdateActionDef('SET', 'incrementBy')

    it('should build expression', () => {
      const exp = buildUpdateExpression('age', op, [23], [], metaDataS)
      expect(exp).toEqual({
        attributeNames: { '#age': 'age' },
        attributeValues: { ':age': { N: '23' } },
        statement: '#age = #age + :age',
        type: 'SET',
      })
    })

    it('should build expression for number at document path ', () => {
      const exp = buildUpdateExpression('numberValues[0]', op, [23], [], metaDataU)
      expect(exp).toEqual({
        attributeNames: { '#numberValues': 'numberValues' },
        attributeValues: { ':numberValues_at_0': { N: '23' } },
        statement: '#numberValues[0] = #numberValues[0] + :numberValues_at_0',
        type: 'SET',
      })
    })

    it('should throw when not number', () => {
      expect(() => buildUpdateExpression('age', op, ['notANumber'], [], metaDataS)).toThrow()
    })
  })

  describe('decrementBy', () => {
    const op = new UpdateActionDef('SET', 'decrementBy')
    it('should build expression', () => {
      const exp = buildUpdateExpression('age', op, [23], [], metaDataS)
      expect(exp).toEqual({
        attributeNames: { '#age': 'age' },
        attributeValues: { ':age': { N: '23' } },
        statement: '#age = #age - :age',
        type: 'SET',
      })
    })

    it('should build expression for number at document path ', () => {
      const exp = buildUpdateExpression('numberValues[0]', op, [23], [], metaDataU)
      expect(exp).toEqual({
        attributeNames: { '#numberValues': 'numberValues' },
        attributeValues: { ':numberValues_at_0': { N: '23' } },
        statement: '#numberValues[0] = #numberValues[0] - :numberValues_at_0',
        type: 'SET',
      })
    })

    it('should throw when not number', () => {
      expect(() => buildUpdateExpression('age', op, ['notANumber'], [], metaDataS)).toThrow()
    })
  })

  describe('set', () => {
    const op = new UpdateActionDef('SET', 'set')

    it('should build set expression for number[]', () => {
      const exp = buildUpdateExpression('numberValues', op, [[23]], [], metaDataU)
      expect(exp).toEqual({
        attributeNames: { '#numberValues': 'numberValues' },
        attributeValues: { ':numberValues': { L: [{ N: '23' }] } },
        statement: '#numberValues = :numberValues',
        type: 'SET',
      })
    })

    it('should build set expression for number at document path', () => {
      const exp = buildUpdateExpression('numberValues[0]', op, [23], [], metaDataU)
      expect(exp).toEqual({
        attributeNames: { '#numberValues': 'numberValues' },
        attributeValues: { ':numberValues_at_0': { N: '23' } },
        statement: '#numberValues[0] = :numberValues_at_0',
        type: 'SET',
      })
    })

    // it('should build set expression for custom type at document path', () => {
    //   const now = new Date()
    //   const exp = buildUpdateExpression('informations[0]', op, [{details: 'my detail', createdAt: now}], [], metaDataU)
    //   expect(exp).toEqual({
    //     attributeNames: { '#informations': 'informations' },
    //     attributeValues: { ':informations_at_0': { M: {details: {S: 'my detail' }, createdAt: dateToNumberMapper.toDb(now)} }},
    //     statement: '#informations[0] = :informations_at_0',
    //     type: 'SET',
    //   })
    // })
  })
  // describe('setAt', () => {})
  // describe('appendToList', () => {})
  // describe('remove', () => {})
  // describe('removeFromListAt', () => {})

  describe('add', () => {
    const op = new UpdateActionDef('ADD', 'add')

    it('should build add expression for numbers', () => {
      const exp = buildUpdateExpression('age', op, [23], [], metaDataS)
      expect(exp).toEqual({
        attributeNames: { '#age': 'age' },
        attributeValues: { ':age': { N: '23' } },
        statement: '#age :age',
        type: 'ADD',
      })
    })

    it('should work with customMapper (1)', () => {
      const metaDataC = metadataForModel(SpecialCasesModel)
      const exp = buildUpdateExpression('myChars', op, ['abc'], [], metaDataC)
      expect(exp).toEqual({
        attributeNames: { '#myChars': 'myChars' },
        attributeValues: { ':myChars': { SS: ['a', 'b', 'c'] } },
        statement: '#myChars :myChars',
        type: 'ADD',
      })
    })

    it('should throw when not number or a set value', () => {
      expect(() => buildUpdateExpression('age', op, ['notANumber'], [], metaDataS)).toThrow()
    })

    it('should throw when no value for attributeValue was given', () => {
      expect(() => buildUpdateExpression('age', op, [], [], metaDataS)).toThrow()
    })
  })

  describe('removeFromSet', () => {
    const op = new UpdateActionDef('DELETE', 'removeFromSet')

    it('should build the expression', () => {
      const exp = buildUpdateExpression('topics', op, [['val1', 'val2']], [], metaDataU)
      expect(exp).toEqual({
        attributeNames: { '#topics': 'topics' },
        attributeValues: { ':topics': { SS: ['val1', 'val2'] } },
        statement: '#topics :topics',
        type: 'DELETE',
      })
    })

    it('should throw when not a set value', () => {
      expect(() => buildUpdateExpression('topics', op, ['notASet'], [], metaDataU)).toThrow()
    })

    it('should throw when no value was given', () => {
      expect(() => buildUpdateExpression('topics', op, [], [], metaDataU)).toThrow()
    })
  })
})


text:
package miage.gestioncabinet.coreM;

import java.util.Calendar;

import miage.gestioncabinet.api.Patient;

/**
 * Classe qui décrit un patient
 * @author sraybaud
 *
 */
public class PatientImp extends PersonneImp implements Patient{

	/**
	 * serialVersionUID de la classe
	 */
	private static final long serialVersionUID = -5636440052509911308L;

	/**
	 * Sexe du patient
	 */
	private String sexe;

	/**
	 * Date de naissance du patient
	 */
	private Calendar dateNaissance;

	/**
	 * Contructeur du patient
	 */
	public PatientImp(){
		super();
	}

	/**
	 * @return the sexe
	 */
	public String getSexe() {
		return sexe;
	}

	/**
	 * @param sexe the sexe to set
	 */
	public void setSexe(String sexe) {
		this.sexe = sexe;
	}

	/**
	 * Retourne la date de naissance du patient
	 * @return la date correspondante
	 */
	@Override
	public Calendar getDateNaissance() {
		return dateNaissance;
	}

	/**
	 * Modifie la date de naissance du patient
	 * @param date la date de naissance à modifier
	 */
	@Override
	public void setDateNaissance(Calendar dateNaissance) {
		this.dateNaissance = (Calendar) dateNaissance.clone();
	}

	/**
	 * Retourne l'âge du patient
	 * @return l'âge correspondant
	 */
	@Override
	public Integer getAge() {
		Calendar now =Calendar.getInstance();
		int age = now.get(Calendar.YEAR) - this.dateNaissance.get(Calendar.YEAR);
		int difMois = now.get(Calendar.MONTH) - this.dateNaissance.get(Calendar.MONTH);
		int difJour = now.get(Calendar.DAY_OF_MONTH) - this.dateNaissance.get(Calendar.DAY_OF_MONTH);
		age -= difMois < 0 ? 1 : difJour < 0 ? 1 : 0;
		return age;
	}

}


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('galleries', '0008_auto_20170503_1704'),
    ]

    operations = [
        migrations.RenameField(
            model_name='media',
            old_name='title',
            new_name='name',
        ),
        migrations.AlterField(
            model_name='media',
            name='caption',
            field=models.CharField(blank=True, max_length=200, null=True),
        ),
    ]


text:
geonlp
======

Share toponym data and codes for GeoNLP

"GeoNLP" is a Japanese research project for developing "geo-tagging" tools and libraries, which can analyze and extract toponyms/location names from natural language sentences (currently only for sentences written in Japanese).

It also provides toponym data sharing service, linked open data service and so on.

For more detail, please visit
https://geonlp.ex.nii.ac.jp/


text:
using System.Collections.Generic;
using System.Net.Http;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Telegram.Bot.Requests.Abstractions;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
using Telegram.Bot.Types.InputFiles;
using Telegram.Bot.Types.ReplyMarkups;

// ReSharper disable once CheckNamespace
namespace Telegram.Bot.Requests
{
    /// <summary>
    /// Use this method to send photos. On success, the sent <see cref="Message"/> is returned.
    /// </summary>
    [JsonObject(MemberSerialization.OptIn, NamingStrategyType = typeof(SnakeCaseNamingStrategy))]
    public class SendPhotoRequest : FileRequestBase<Message>, IChatTargetable
    {
        /// <inheritdoc />
        [JsonProperty(Required = Required.Always)]
        public ChatId ChatId { get; }

        /// <summary>
        /// Photo to send. Pass a <see cref="InputTelegramFile.FileId"/> as String to send a photo that
        /// exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to
        /// get a photo from the Internet, or upload a new photo using multipart/form-data. The photo
        /// must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total.
        /// Width and height ratio must be at most 20
        /// </summary>
        [JsonProperty(Required = Required.Always)]
        public InputOnlineFile Photo { get; }

        /// <summary>
        /// Photo caption (may also be used when resending photos by <see cref="InputTelegramFile.FileId"/>),
        /// 0-1024 characters after entities parsing
        /// </summary>
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string? Caption { get; set; }

        /// <inheritdoc cref="Abstractions.Documentation.ParseMode"/>
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
        public ParseMode? ParseMode { get; set; }

        /// <inheritdoc cref="Abstractions.Documentation.CaptionEntities"/>
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
        public IEnumerable<MessageEntity>? CaptionEntities { get; set; }

        /// <inheritdoc cref="Abstractions.Documentation.DisableNotification"/>
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
        public bool? DisableNotification { get; set; }

        /// <inheritdoc cref="Abstractions.Documentation.ReplyToMessageId"/>
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
        public int? ReplyToMessageId { get; set; }

        /// <inheritdoc cref="Abstractions.Documentation.AllowSendingWithoutReply"/>
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
        public bool? AllowSendingWithoutReply { get; set; }

        /// <inheritdoc cref="Abstractions.Documentation.ReplyMarkup"/>
        [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
        public IReplyMarkup? ReplyMarkup { get; set; }

        /// <summary>
        /// Initializes a new request with chatId and photo
        /// </summary>
        /// <param name="chatId">Unique identifier for the target chat or username of the target channel
        /// (in the format <c>@channelusername</c>)
        /// </param>
        /// <param name="photo">
        /// Photo to send. Pass a <see cref="InputTelegramFile.FileId"/> as String to send a photo that
        /// exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to
        /// get a photo from the Internet, or upload a new photo using multipart/form-data. The photo
        /// must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total.
        /// Width and height ratio must be at most 20</param>
        public SendPhotoRequest(ChatId chatId, InputOnlineFile photo)
            : base("sendPhoto")
        {
            ChatId = chatId;
            Photo = photo;
        }

        /// <inheritdoc />
        public override HttpContent? ToHttpContent() =>
            Photo.FileType switch
            {
                FileType.Stream => ToMultipartFormDataContent(fileParameterName: "photo", inputFile: Photo),
                _               => base.ToHttpContent()
            };
    }
}


text:
Public Class Settings

    Public Property DeleteSFDLAfterOpen As Boolean = False
    Public Property Language As String = "de-DE"
    Public Property DownloadDirectory As String = String.Empty
    Public Property ExistingFileHandling As ExistingFileHandling = ExistingFileHandling.ResumeFile
    Public Property PreventStandby As Boolean = True
    Public Property CreatePackageSubfolder As Boolean = False
    Public Property AskForDownloadDirectory As Boolean = False
    Public Property MaxDownloadThreads As Integer = 3
    Public Property MaxChecksumThreads As Integer = 2
    Public Property MaxRetry As Integer = 3
    Public Property RetryWaitTime As Integer = 3
    Public Property NotMarkAllContainerFiles As Boolean = False
    Public Property SearchUpdates As Boolean = True
    Public Property MinimizeToTray As Boolean = False
    Public Property InstantVideo As Boolean = False
    Public Property UnRARSettings As New UnRARSettings
    Public Property SpeedReportSettings As New SpeedreportSettings
    Public Property RemoteControlSettings As New RemoteControlSettings
    Public Property ColorScheme As String = "Blue"
    Public Property BaseColorScheme As String = "Light"
    Public Property SyncThemeWithWindows As Boolean = True
    Public Property ExcludeMaliciousFiles As Boolean = True
    Public Property AutoPasswordContainer As Boolean = False
    Public Property AutoPasswordContainerList As New List(Of String)
    Public Property DownloadItemBlacklist As New ObjectModel.ObservableCollection(Of String)

    Public Shared Function SaveSettings(ByVal _settings As Settings) As Boolean

        Dim _rt As Boolean = True

        Dim _password_def As New Text.StringBuilder
        Dim _password_def_file As String = IO.Path.Combine(Environment.GetEnvironmentVariable("appdata"), "SFDL.NET 3", "sfdl_passwords.def")

        Try

            Application.Current.Resources("Settings") = _settings

            MainViewModel.ThisInstance.UpdateSettings()

            XMLHelper.XMLSerialize(_settings, IO.Path.Combine(Environment.GetEnvironmentVariable("appdata"), "SFDL.NET 3\settings.xml"))

            If IO.File.Exists(_password_def_file) Then
                IO.File.Delete(_password_def_file)
            End If

            _password_def.AppendLine("")
            _password_def.AppendLine("##")

            For Each _item In _settings.UnRARSettings.UnRARPasswordList
                _password_def.AppendLine(_item)
            Next

            My.Computer.FileSystem.WriteAllText(_password_def_file, _password_def.ToString, False, System.Text.Encoding.Default)

        Catch ex As Exception
            _rt = False
        End Try

        Return _rt

    End Function

    Public Shared Function InitNewSettings() As Settings

        Dim _rt As New Settings

        With _rt

            .AutoPasswordContainer = True
            .CreatePackageSubfolder = False
            .DeleteSFDLAfterOpen = False
            .DownloadDirectory = IO.Path.Combine(Environment.GetEnvironmentVariable("USERPROFILE"), "Downloads")
            .ExistingFileHandling = ExistingFileHandling.ResumeFile
            .InstantVideo = False
            .ColorScheme = "Blue"
            .BaseColorScheme = "Light"
            .Language = "de"
            .MaxDownloadThreads = 3
            .MaxRetry = 3
            .PreventStandby = True
            .UnRARSettings = New UnRARSettings
            .ExcludeMaliciousFiles = True
            .SpeedReportSettings = New SpeedreportSettings
            .SyncThemeWithWindows = True

        End With

        With _rt.SpeedReportSettings

            Dim _template As New Text.StringBuilder

            _template.AppendLine("SFDL: %%SFDL_FILENAME%%")
            _template.AppendLine("Upper: %%SFDL_UPPER%%")
            _template.AppendLine("")
            _template.AppendLine("%%SFDL_SIZE%% in %%DLTIME%% heruntergeladen @ %%SPEED%% (Im Durchschnitt)")
            _template.AppendLine("")
            _template.AppendLine("Kommentar: %%COMMENT%%")

            .SpeedreportTemplate = _template.ToString

        End With

        Return _rt

    End Function

End Class

Public Enum ExistingFileHandling
    ResumeFile
    OverwriteFile
End Enum


text:
using DataStructures
using CountMin
import CountMin: add!

N = 1_000_000

function dotest(cms, n::Integer)
    for i in 1:n
        push!(cms, n)
    end
end

println("Doing CMS")
cms = CountMinSketch{UInt8}(4, 2^28)
dotest(cms, 1000)
@time dotest(cms, N)

println("Doing Counter")
ctr = counter(Int)
dotest(ctr, 1000)
@time dotest(ctr, N)

print("Checking equality... ")
for i in 1:N
    assert(cms[i] >= ctr[i])
end
println("All Good!")

function oflow(cms, n::Integer)
    for i in 1:n
        add!(cms, i, 255)
    end
end

println("Profiling add with overflow")
oflow(cms, 10)
@time oflow(cms, 10000)


text:
package org.zstack.network.service.virtualrouter;

import org.zstack.header.message.MessageReply;

/**
 * Created by frank on 8/11/2015.
 */
public class CreateVirtualRouterVmReply extends MessageReply {
    private VirtualRouterVmInventory inventory;

    public VirtualRouterVmInventory getInventory() {
        return inventory;
    }

    public void setInventory(VirtualRouterVmInventory inventory) {
        this.inventory = inventory;
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Essai Tax. Hyménomyc. (Lons-le-Saunier) 69 (1900)

#### Original name
Hydnum herpetodon Lév.

### Remarks
null