text:
package com.networknt.portal.registry;

import com.networknt.registry.URL;
import com.networknt.registry.URLImpl;
import com.networknt.registry.URLParamType;
import com.networknt.utility.Constants;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class PortalRegistryUtils {

    /**
     * Check if two lists have the same urls.
     *
     * @param urls1 first url list
     * @param urls2 second url list
     * @return boolean true when they are the same
     */
    public static boolean isSame(List<URL> urls1, List<URL> urls2) {
        if(urls1 == null && urls2 == null) {
            return true;
        }
        if (urls1 == null || urls2 == null) {
            return false;
        }
        if (urls1.size() != urls2.size()) {
            return false;
        }
        return urls1.containsAll(urls2);
    }

    /**
     * build consul service from url
     *
     * @param url a URL object
     * @return service PortalRegistryService
     */
    public static PortalRegistryService buildService(URL url) {
        PortalRegistryService service = new PortalRegistryService();
        service.setAddress(url.getHost());
        service.setServiceId(convertPortalRegistrySerivceId(url));
        service.setName(url.getPath());
        service.setProtocol(url.getProtocol());
        service.setPort(url.getPort());
        String env = url.getParameter(Constants.TAG_ENVIRONMENT);
        if(env != null) service.setTag(env);
        return service;
    }

    /**
     * build url from service
     * @param serviceId the serviceId
     * @param tag the optional tag
     * @param service service object map
     * @return URL object
     */
    public static URL buildUrl(String serviceId, String tag, Map<String, Object> service) {
        URL url = null;
        if (url == null) {
            Map<String, String> params = new HashMap<>();
            if(tag != null) params.put(URLParamType.environment.getName(), tag);
            url = new URLImpl((String)service.get("protocol"), (String)service.get("address"), (Integer)service.get("port"), serviceId, params);
        }
        return url;
    }

    /**
     * get cluster info from url, cluster info (protocol, path)
     *
     * @param url a URL object
     * @return String url cluster info
     */
    public static String getUrlClusterInfo(URL url) {
        return url.getPath();
    }

    /**
     * convert url to consul service id. serviceid includes ip+port+service
     *
     * @param url a URL object
     * @return service id
     */
    public static String convertPortalRegistrySerivceId(URL url) {
        return url.getPath();
    }

    /**
     * get path of url from service id in consul
     *
     * @param serviceId service id
     * @return path
     */
    public static String getPathFromServiceId(String serviceId) {
        return serviceId.substring(serviceId.indexOf(":") + 1, serviceId.lastIndexOf(":"));
    }
}


text:
require("./blastFramework");
require("./scratchpad");

redpajama_set_name: RedPajamaGithub


text:
package org.appformer.maven.integration;

import java.util.Collection;
import java.util.HashSet;
import java.util.List;

import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
import org.apache.maven.artifact.repository.Authentication;
import org.apache.maven.artifact.repository.MavenArtifactRepository;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
import org.apache.maven.settings.Mirror;
import org.apache.maven.settings.Profile;
import org.apache.maven.settings.Proxy;
import org.apache.maven.settings.Repository;
import org.apache.maven.settings.RepositoryPolicy;
import org.apache.maven.settings.Server;
import org.apache.maven.settings.Settings;
import org.eclipse.aether.repository.RemoteRepository;
import org.eclipse.aether.util.repository.AuthenticationBuilder;

public class MavenRepositoryConfiguration {

    private final Settings settings;
    private final Collection<RemoteRepository> extraRepositories;
    private final Collection<RemoteRepository> remoteRepositoriesForRequest;
    private final Collection<ArtifactRepository> artifactRepositoriesForRequest;

    public MavenRepositoryConfiguration( Settings settings ) {
        this.settings = settings;
        this.extraRepositories = initExtraRepositories();
        this.remoteRepositoriesForRequest = initRemoteRepositoriesForRequest();
        this.artifactRepositoriesForRequest = initArtifactRepositories();
    }

    protected String getLocalRepository() {
        return settings.getLocalRepository();
    }

    public List<Proxy> getProxies() {
        return settings.getProxies();
    }

    public Collection<RemoteRepository> getExtraRepositories() {
        return extraRepositories;
    }

    public Collection<RemoteRepository> getRemoteRepositoriesForRequest() {
        return remoteRepositoriesForRequest;
    }

    public Collection<ArtifactRepository> getArtifactRepositoriesForRequest() {
        return artifactRepositoriesForRequest;
    }

    private Collection<RemoteRepository> initExtraRepositories() {
        Collection<RemoteRepository> extraRepositories = new HashSet<RemoteRepository>();
        for ( Profile profile : settings.getProfiles() ) {
            if ( isProfileActive( profile ) ) {
                for ( Repository repository : profile.getRepositories() ) {
                    extraRepositories.add( toRemoteRepositoryBuilder( settings,
                                                                      repository ).build() );
                }
                for ( Repository repository : profile.getPluginRepositories() ) {
                    extraRepositories.add( toRemoteRepositoryBuilder( settings,
                                                                      repository ).build() );
                }
            }
        }
        return extraRepositories;
    }

    private Collection<RemoteRepository> initRemoteRepositoriesForRequest() {
        Collection<RemoteRepository> remoteRepos = new HashSet<RemoteRepository>();
        for ( RemoteRepository repo : extraRepositories ) {
            remoteRepos.add( resolveMirroredRepo( repo ) );
        }
        return remoteRepos;
    }

    private Collection<ArtifactRepository> initArtifactRepositories() {
        Collection<ArtifactRepository> artifactRepos = new HashSet<ArtifactRepository>();
        for ( RemoteRepository remoteRepository : remoteRepositoriesForRequest ) {
            artifactRepos.add( toArtifactRepository( remoteRepository ) );
        }
        return artifactRepos;
    }

    public RemoteRepository resolveMirroredRepo( RemoteRepository repo ) {
        for ( Mirror mirror : settings.getMirrors() ) {
            if ( isMirror( repo, mirror.getMirrorOf() ) ) {
                return toRemoteRepositoryBuilder( settings,
                                                  mirror.getId(),
                                                  mirror.getLayout(),
                                                  mirror.getUrl() ).build();
            }
        }
        return repo;
    }

    private boolean isMirror( RemoteRepository repo,
                              String mirrorOf ) {
        return mirrorOf.equals( "*" ) ||
                ( mirrorOf.equals( "external:*" ) && !repo.getUrl().startsWith( "file:" ) ) ||
                ( mirrorOf.contains( "external:*" ) && !repo.getUrl().startsWith( "file:" ) && !mirrorOf.contains( "!" + repo.getId() ) ) ||
                ( mirrorOf.startsWith( "*" ) && !mirrorOf.contains( "!" + repo.getId() ) ) ||
                ( !mirrorOf.startsWith( "*" ) && !mirrorOf.contains( "external:*" ) && mirrorOf.contains( repo.getId() ) );
    }

    private boolean isProfileActive( Profile profile ) {
        return settings.getActiveProfiles().contains( profile.getId() ) ||
                ( profile.getActivation() != null && profile.getActivation().isActiveByDefault() );
    }

    private static RemoteRepository.Builder toRemoteRepositoryBuilder( Settings settings,
                                                                       Repository repository ) {
        RemoteRepository.Builder remoteBuilder = toRemoteRepositoryBuilder( settings,
                                                                            repository.getId(),
                                                                            repository.getLayout(),
                                                                            repository.getUrl() );
        setPolicy( remoteBuilder, repository.getSnapshots(),
                   true );
        setPolicy( remoteBuilder, repository.getReleases(),
                   false );
        return remoteBuilder;
    }

    private static RemoteRepository.Builder toRemoteRepositoryBuilder( Settings settings,
                                                                       String id,
                                                                       String layout,
                                                                       String url ) {
        RemoteRepository.Builder remoteBuilder = new RemoteRepository.Builder( id,
                                                                               layout,
                                                                               url );
        Server server = settings.getServer( id );
        if ( server != null ) {
            remoteBuilder.setAuthentication( new AuthenticationBuilder().addUsername( server.getUsername() )
                                                     .addPassword( server.getPassword() )
                                                     .build() );
        }
        return remoteBuilder;

    }

    private static void setPolicy( RemoteRepository.Builder builder,
                                   RepositoryPolicy policy,
                                   boolean snapshot ) {
        if ( policy != null ) {
            org.eclipse.aether.repository.RepositoryPolicy repoPolicy =
                    new org.eclipse.aether.repository.RepositoryPolicy( policy.isEnabled(),
                                                                        policy.getUpdatePolicy(),
                                                                        policy.getChecksumPolicy() );
            if ( snapshot ) {
                builder.setSnapshotPolicy( repoPolicy );
            } else {
                builder.setReleasePolicy( repoPolicy );
            }
        }
    }

    private ArtifactRepository toArtifactRepository( RemoteRepository remoteRepository ) {
        final String id = remoteRepository.getId();
        final String url = remoteRepository.getUrl();
        final ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();
        ArtifactRepositoryPolicy snapshots = new ArtifactRepositoryPolicy();
        ArtifactRepositoryPolicy releases = new ArtifactRepositoryPolicy();
        if ( remoteRepository.getPolicy( true ) != null ) {
            snapshots = new ArtifactRepositoryPolicy( remoteRepository.getPolicy( true ).isEnabled(),
                                                      remoteRepository.getPolicy( true ).getUpdatePolicy(),
                                                      remoteRepository.getPolicy( true ).getChecksumPolicy() );
        }
        if ( remoteRepository.getPolicy( false ) != null ) {
            releases = new ArtifactRepositoryPolicy( remoteRepository.getPolicy( false ).isEnabled(),
                                                     remoteRepository.getPolicy( false ).getUpdatePolicy(),
                                                     remoteRepository.getPolicy( false ).getChecksumPolicy() );
        }
        final ArtifactRepository artifactRepository = new MavenArtifactRepository( id,
                                                                                url,
                                                                                layout,
                                                                                snapshots,
                                                                                releases );

        final Server server = settings.getServer( id );
        if ( server != null ) {
            artifactRepository.setAuthentication( new Authentication( server.getUsername(),
                                                                      server.getPassword() ) );
        }
        return artifactRepository;
    }
}


text:
/// <reference path='fourslash.ts'/>

// @noLib: true

// @Filename: /abc.ts
////export type Abc = number;

// @Filename: /user.ts
//// import { Abc } from "./abc";
////function f(Abc: Ab/**/) {}

verify.completions({
    marker: "",
    // Should not have an import completion for 'Abc', should use the local one
    exact: ["Abc", ...completion.typeKeywords],
    preferences: {
        includeCompletionsForModuleExports: true,
    },
});


text:
from ubuntu
maintainer Christopher Swenson <chris@caswenson.com>

# base ubuntu stuff
run echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
run apt-get update
run apt-get upgrade -y
run apt-get install -y unzip curl

# install node
run apt-get install -y python-software-properties
run add-apt-repository ppa:chris-lea/node.js
run apt-get update
run apt-get install -y nodejs

# install ghost
run curl -Lso /tmp/ghost.zip http://ghost.org/zip/ghost-0.3.3.zip
run mkdir -p ghost
run cd ghost && unzip -qq /tmp/ghost.zip && cd ..
run cd ghost && npm install --production

# delete the default content
run rm -rf /ghost/content

# link the user content and config in and start ghost
# patch 127.0.0.1 -> 0.0.0.0 to make it work inside docker
entrypoint cd ghost && sed -e 's/127\.0\.0\.1/0.0.0.0/g' /ghostdata/config.js > /ghost/config.js &&ln -s /ghostdata/content && NODE_ENV=production npm start
expose 2368


text:
package edu.psu.swe.scim.spec.protocol.search;

import edu.psu.swe.scim.spec.protocol.attribute.AttributeReference;
import lombok.Data;

@Data
public class SortRequest {
  private AttributeReference sortBy;
  private SortOrder sortOrder;
}


text:
package org.main.smartmirror.smartmirror;

import android.content.res.Resources;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.DecelerateInterpolator;
import android.widget.LinearLayout;
import android.widget.TextView;

/**
 * Class that handles the help dialog which shows the commands the user can issue
 */
public class HelpFragment extends Fragment {

    private LinearLayout mHelpLayout;

    private final int fadeInTime = 2000;
    private final int fadeOutTime = 2000;
    private final int durationTime = 20000;

    public static HelpFragment newInstance(String fragName) {
        Bundle args = new Bundle();
        args.putString("name", fragName);
        HelpFragment fragment = new HelpFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.help_fragment, container, false);
        mHelpLayout = (LinearLayout) view.findViewById(R.id.help_layout);

        String name = getArguments().getString("name");
        Resources res = getResources();

        TextView txtCurrentHelpHeader = (TextView) view.findViewById(R.id.current_help_header);
        TextView txtCurrentHelpContent = (TextView) view.findViewById(R.id.current_help_content);
        View vwDivider = view.findViewById(R.id.help_divider);
        TextView txtModeHeader = (TextView) view.findViewById(R.id.mode_header);
        TextView txtModeContent = (TextView) view.findViewById(R.id.mode_content);
        TextView txtHelpHeader = (TextView) view.findViewById(R.id.general_help_header);
        TextView txtHelpContent = (TextView) view.findViewById(R.id.general_help_content);

        // set the default help!
        String strContent;
        String[] arrayContent;
        // Modes
        arrayContent = res.getStringArray(R.array.modes_list);
        strContent = buildupStringFromArrays(arrayContent);
        txtModeHeader.setText(R.string.title_help);
        txtModeContent.setText(strContent);
        // General
        arrayContent = res.getStringArray(R.array.general_help);
        strContent = buildupStringFromArrays(arrayContent);
        txtHelpHeader.setText(R.string.title_help_other);
        txtHelpContent.setText(strContent);

        switch (name) {
            // camera
            case Constants.CAMERA:
                arrayContent = res.getStringArray(R.array.camera_help);
                strContent = buildupStringFromArrays(arrayContent);
                txtCurrentHelpHeader.setText(R.string.title_camera);
                txtCurrentHelpContent.setText(strContent);
                break;
            case Constants.MUSIC:
                arrayContent = res.getStringArray(R.array.music_commands);
                strContent = buildupStringFromArrays(arrayContent);
                txtCurrentHelpHeader.setText(R.string.title_music);
                txtCurrentHelpContent.setText(strContent);
                break;
            default:
                txtCurrentHelpHeader.setVisibility(View.GONE);
                vwDivider.setVisibility(View.GONE);
                txtCurrentHelpContent.setVisibility(View.GONE);
                break;
        }

        return view;
    }

    public void startFadeAnimations() {

        // Set-up the fade in
        Animation fadeIn = new AlphaAnimation(0.01f, 1f);
        fadeIn.setInterpolator(new DecelerateInterpolator());
        fadeIn.setDuration(fadeInTime);

        // Set-up the fade out
        Animation fadeOut = new AlphaAnimation(1f, 0f);
        fadeOut.setInterpolator(new AccelerateDecelerateInterpolator());
        fadeOut.setDuration(fadeOutTime);
        fadeOut.setStartOffset(durationTime);
        fadeOut.setFillAfter(true);

        fadeOut.setAnimationListener(new Animation.AnimationListener() {
            @Override
            public void onAnimationStart(Animation animation) {

            }

            @Override
            public void onAnimationEnd(Animation animation) {
                // after fading out, remove this fragment
                if (getActivity() != null) {
                    ((MainActivity) getActivity()).removeFragment(Constants.HELP);
                }
            }

            @Override
            public void onAnimationRepeat(Animation animation) {

            }
        });

        mHelpLayout.startAnimation(fadeIn);
        mHelpLayout.startAnimation(fadeOut);
    }

    /**
     * Builds up a single string from an array to be used in a TextView
     *
     * @param string the array to be converted
     * @return the converted string.
     */
    public String buildupStringFromArrays(String[] string) {
        String str = "";
        for (int i = 0; i < string.length; i++) {
            // capitalize the first letters in the arrays and append a new line.
            string[i] = string[i].substring(0, 1).toUpperCase() + string[i].substring(1);
            str += string[i] + "\n";
        }
        return str;
    }
    @Override
    public void onResume() {
        super.onPause();
        startFadeAnimations();
    }

    @Override
    public void onPause() {
        super.onPause();
        mHelpLayout.clearAnimation();
    }
}


text:
package network::fortinet::fortiweb::snmp::plugin;

use strict;
use warnings;
use base qw(centreon::plugins::script_snmp);

sub new {
    my ($class, %options) = @_;
    my $self = $class->SUPER::new(package => __PACKAGE__, %options);
    bless $self, $class;

    $self->{version} = '1.0';
    $self->{modes} = {
        'interfaces'      => 'snmp_standard::mode::interfaces',
        'list-interfaces' => 'snmp_standard::mode::listinterfaces',
        'proxy'           => 'network::fortinet::fortiweb::snmp::mode::proxy',
        'system'          => 'network::fortinet::fortiweb::snmp::mode::system'
    };

    return $self;
}

1;

__END__

=head1 PLUGIN DESCRIPTION

Check Fortinet FortiWeb in SNMP.

=cut


text:
using OpenTK;

namespace Nemesis.Mathematics.Geometry
{
    public sealed class MovablePoint : IUpdatable
    {
        private readonly MovableValue<Vector3> movable;

        public MovablePoint(Vector3 initialValue)
        {
            this.movable = new MovableValue<Vector3>(initialValue, Vector3Interpolation.Linear);
        }

        public Vector3 CurrentValue
        {
            get
            {
                return movable.CurrentValue;
            }
        }

        public void MoveTo(Vector3 target, float time)
        {
            movable.MoveTo(target, time, Vector3Interpolation.Linear);
        }

        public void Update(float deltaTime)
        {
            movable.Update(deltaTime);
        }
    }
}


text:
/*
 * rules.h -  targets, rules, and related information
 *
 * This file describes the structures holding the targets, rules, and
 * related information accumulated by interpreting the statements
 * of the jam files.
 *
 * The following are defined:
 *
 *	RULE - a generic jam rule, the product of RULE and ACTIONS
 *	ACTIONS - a chain of ACTIONs
 *	ACTION - a RULE instance with targets and sources
 *	SETTINGS - variables to set when executing a TARGET's ACTIONS
 *	TARGETS - a chain of TARGETs
 *	TARGET - a file or "thing" that can be built
 *
 * 04/11/94 (seiwald) - Combined deps & headers into deps[2] in TARGET.
 * 04/12/94 (seiwald) - actionlist() now just appends a single action.
 * 06/01/94 (seiwald) - new 'actions existing' does existing sources
 * 12/20/94 (seiwald) - NOTIME renamed NOTFILE.
 * 01/19/95 (seiwald) - split DONTKNOW into CANTFIND/CANTMAKE.
 * 02/02/95 (seiwald) - new LEAVES modifier on targets.
 * 02/14/95 (seiwald) - new NOUPDATE modifier on targets.
 * 02/28/02 (seiwald) - merge EXEC_xxx flags in with RULE_xxx
 * 06/21/02 (seiwald) - support for named parameters
 * 07/17/02 (seiwald) - TEMPORARY sources for headers now get built
 * 11/04/02 (seiwald) - const-ing for string literals
 * 12/03/02 (seiwald) - fix odd includes support by grafting them onto depends
 * 12/17/02 (seiwald) - new copysettings() to protect target-specific vars
 * 01/14/03 (seiwald) - fix includes fix with new internal includes TARGET
 */

typedef struct _rule RULE;
typedef struct _target TARGET;
typedef struct _targets TARGETS;
typedef struct _action ACTION;
typedef struct _actions ACTIONS;
typedef struct _settings SETTINGS ;

/* RULE - a generic jam rule, the product of RULE and ACTIONS */

struct _rule {
	const char	*name;
	PARSE		*procedure;	/* parse tree from RULE */
	const char	*actions;	/* command string from ACTIONS */
	LIST		*bindlist;	/* variable to bind for actions */
	LIST		*params;	/* bind args to local vars */
	int		flags;		/* modifiers on ACTIONS */

# define	RULE_UPDATED	0x01	/* $(>) is updated sources only */
# define	RULE_TOGETHER	0x02	/* combine actions on single target */
# define	RULE_IGNORE	0x04	/* ignore return status of executes */
# define	RULE_QUIETLY	0x08	/* don't mention it unless verbose */
# define	RULE_PIECEMEAL	0x10	/* split exec so each $(>) is small */
# define	RULE_EXISTING	0x20	/* $(>) is pre-exisitng sources only */
# define	RULE_MAXLINE	0x40	/* cmd specific maxline (last) */

} ;

/* ACTIONS - a chain of ACTIONs */

struct _actions {
	ACTIONS		*next;
	ACTIONS		*tail;		/* valid only for head */
	ACTION		*action;
} ;

/* ACTION - a RULE instance with targets and sources */

struct _action {
	RULE		*rule;
	TARGETS		*targets;
	TARGETS		*sources;	/* aka $(>) */
	char		running;	/* has been started */
	char		status;		/* see TARGET status */
} ;

/* SETTINGS - variables to set when executing a TARGET's ACTIONS */

struct _settings {
	SETTINGS 	*next;
	const char	*symbol;	/* symbol name for var_set() */
	LIST		*value;		/* symbol value for var_set() */
} ;

/* TARGETS - a chain of TARGETs */

struct _targets {
	TARGETS		*next;
	TARGETS		*tail;		/* valid only for head */
	TARGET		*target;
} ;

/* TARGET - a file or "thing" that can be built */

struct _target {
	const char	*name;
	const char	*boundname;	/* if search() relocates target */
	ACTIONS		*actions;	/* rules to execute, if any */
	SETTINGS 	*settings;	/* variables to define */

	char		flags;		/* status info */

# define 	T_FLAG_TEMP 	0x01	/* TEMPORARY applied */
# define 	T_FLAG_NOCARE 	0x02	/* NOCARE applied */
# define 	T_FLAG_NOTFILE 	0x04	/* NOTFILE applied */
# define	T_FLAG_TOUCHED	0x08	/* ALWAYS applied or -t target */
# define	T_FLAG_LEAVES	0x10	/* LEAVES applied */
# define	T_FLAG_NOUPDATE	0x20	/* NOUPDATE applied */
# define	T_FLAG_INTERNAL	0x40	/* internal INCLUDES node */

	char		binding;	/* how target relates to real file */

# define 	T_BIND_UNBOUND	0	/* a disembodied name */
# define 	T_BIND_MISSING	1	/* couldn't find real file */
# define 	T_BIND_PARENTS	2	/* using parent's timestamp */
# define 	T_BIND_EXISTS	3	/* real file, timestamp valid */

	TARGETS		*depends;	/* dependencies */
	TARGET		*includes;	/* includes */

	time_t		time;		/* update time */
	time_t		leaf;		/* update time of leaf sources */
	char		fate;		/* make0()'s diagnosis */

# define 	T_FATE_INIT	0	/* nothing done to target */
# define 	T_FATE_MAKING	1	/* make0(target) on stack */

# define 	T_FATE_STABLE	2	/* target didn't need updating */
# define	T_FATE_NEWER	3	/* target newer than parent */

# define	T_FATE_SPOIL	4	/* >= SPOIL rebuilds parents */
# define 	T_FATE_ISTMP	4	/* unneeded temp target oddly present */

# define	T_FATE_BUILD	5	/* >= BUILD rebuilds target */
# define	T_FATE_TOUCHED	5	/* manually touched with -t */
# define	T_FATE_MISSING	6	/* is missing, needs updating */
# define	T_FATE_NEEDTMP	7	/* missing temp that must be rebuild */
# define 	T_FATE_OUTDATED	8	/* is out of date, needs updating */
# define 	T_FATE_UPDATE	9	/* deps updated, needs updating */

# define 	T_FATE_BROKEN	10	/* >= BROKEN ruins parents */
# define 	T_FATE_CANTFIND	10	/* no rules to make missing target */
# define 	T_FATE_CANTMAKE	11	/* can't find dependents */

	char		progress;	/* tracks make1() progress */

# define	T_MAKE_INIT	0	/* make1(target) not yet called */
# define	T_MAKE_ONSTACK	1	/* make1(target) on stack */
# define	T_MAKE_ACTIVE	2	/* make1(target) in make1b() */
# define	T_MAKE_RUNNING	3	/* make1(target) running commands */
# define	T_MAKE_DONE	4	/* make1(target) done */

	char		status;		/* execcmd() result */

	int		asynccnt;	/* child deps outstanding */
	TARGETS		*parents;	/* used by make1() for completion */
	char		*cmds;		/* type-punned command list */
} ;

RULE 	*bindrule( const char *rulename );
TARGET *bindtarget( const char *targetname );
TARGET *copytarget( const TARGET *t );
void 	touchtarget( const char *t );
TARGETS *targetlist( TARGETS *chain, LIST  *targets );
TARGETS *targetentry( TARGETS *chain, TARGET *target );
TARGETS *targetchain( TARGETS *chain, TARGETS *targets );
ACTIONS *actionlist( ACTIONS *chain, ACTION *action );
SETTINGS *addsettings( SETTINGS *v, int setflag, const char *sym, LIST *val );
SETTINGS *copysettings( SETTINGS *v );
void 	pushsettings( SETTINGS *v );
void 	popsettings( SETTINGS *v );
void 	freesettings( SETTINGS *v );
void	donerules();


text:
/* OpenFlow protocol pretty-printer. */

#ifndef OPENVSWITCH_OFP_PRINT_H
#define OPENVSWITCH_OFP_PRINT_H 1

#include <stdint.h>
#include <stdio.h>

struct ds;
struct ofp10_match;
struct ofp_flow_mod;
struct ofp_header;
struct ofputil_flow_stats;
struct ofputil_table_features;
struct ofputil_table_stats;

#ifdef  __cplusplus
extern "C" {
#endif

void ofp_print(FILE *, const void *, size_t, int verbosity);
void ofp_print_packet(FILE *stream, const void *data, size_t len);

void ofp10_match_print(struct ds *, const struct ofp10_match *, int verbosity);

char *ofp_to_string(const void *, size_t, int verbosity);
char *ofp10_match_to_string(const struct ofp10_match *, int verbosity);
char *ofp_packet_to_string(const void *data, size_t len);

void ofp_print_flow_stats(struct ds *, struct ofputil_flow_stats *);
void ofp_print_version(const struct ofp_header *, struct ds *);
void ofp_print_table_features(
    struct ds *, const struct ofputil_table_features *features,
    const struct ofputil_table_features *prev_features,
    const struct ofputil_table_stats *stats,
    const struct ofputil_table_stats *prev_stats);

#ifdef  __cplusplus
}
#endif

#endif /* ofp-print.h */


text:
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using Caliburn.Micro;
using SuperbEdit.Base;

namespace SuperbEdit.ViewModels
{
    [Export]
    public class CommandWindowViewModel : Screen
    {
        private List<IActionItem> _actions;

        private string _filter = "";

        [ImportingConstructor]
        public CommandWindowViewModel([ImportMany] IEnumerable<Lazy<IActionItem, IActionItemMetadata>> actions)
        {
            Actions = new List<IActionItem>();

            foreach (var action in actions)
            {
                if (action.Metadata.RegisterInCommandWindow)
                {
                    Actions.Add(action.Value);
                }
            }
        }

        public List<IActionItem> Actions
        {
            get { return _actions; }
            set
            {
                if (_actions != value)
                {
                    _actions = value;
                    NotifyOfPropertyChange(() => Actions);
                }
            }
        }

        public string Filter
        {
            get { return _filter; }
            set
            {
                if (_filter != value)
                {
                    _filter = value;
                    NotifyOfPropertyChange(() => Filter);
                    NotifyOfPropertyChange(() => FilteredActions);
                }
            }
        }

        public IEnumerable<IActionItem> FilteredActions
        {
            //TODO: should split inserted words and check for some of them in the name and description?
            get
            {
                return Actions.Where(a => a.Name.ToUpper().Contains(Filter.ToUpper())
                                          || a.Description.ToUpper().Contains(Filter.ToUpper()));
            }
        }
    }
}


text:
namespace DotGame.Graphics
{
    public struct GraphicsCapabilities
    {
        /// <summary>
        /// Gibt an ob die API binäre Shader (von Bytecode) laden kann.
        /// </summary>
        public bool SupportsBinaryShaders;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

Copyright (c) 2008, 2016 Oracle and/or its affiliates. All rights reserved.

Oracle and Java are registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.

The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common
Development and Distribution License("CDDL") (collectively, the
"License"). You may not use this file except in compliance with the
License. You can obtain a copy of the License at
http://www.netbeans.org/cddl-gplv2.html
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
specific language governing permissions and limitations under the
License.  When distributing the software, include this License Header
Notice in each file and include the License file at
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the GPL Version 2 section of the License file that
accompanied this code. If applicable, add the following below the
License Header, with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"

If you wish your version of this file to be governed by only the CDDL
or only the GPL Version 2, indicate your decision by adding
"[Contributor] elects to include this software in this distribution
under the [CDDL or GPL Version 2] license." If you do not indicate a
single choice of license, a recipient has the option to distribute
your version of this file under either the CDDL, the GPL Version 2 or
to extend the choice of license to its licensees as provided above.
However, if you add GPL Version 2 code and therefore, elected the GPL
Version 2 license, then the option applies only if the new code is
made subject to such option by the copyright holder.

Contributor(s):
-->
<hibernate-configuration>
  <session-factory>
    <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/legacy?zeroDateTimeBehavior=convertToNull</property>
    <property name="hibernate.connection.username">root</property>
    <property name="hibernate.show_sql">true</property>
    <property name="hibernate.current_session_context_class">thread</property>
    <mapping resource="cl/model/pojos/Usuario.hbm.xml"/>
    <mapping resource="cl/model/pojos/ParticipantesProyectos.hbm.xml"/>
    <mapping resource="cl/model/pojos/Proyecto.hbm.xml"/>
    <mapping resource="cl/model/pojos/InscripcionesWorkshop.hbm.xml"/>
    <mapping resource="cl/model/pojos/Carrera.hbm.xml"/>
    <mapping resource="cl/model/pojos/Cuenta.hbm.xml"/>
    <mapping resource="cl/model/pojos/Workshop.hbm.xml"/>
    <mapping resource="cl/model/pojos/Prestamo.hbm.xml"/>
    <mapping resource="cl/model/pojos/Articulo.hbm.xml"/>
    <mapping resource="cl/model/pojos/Track.hbm.xml"/>
    <mapping resource="cl/model/pojos/Boletin.hbm.xml"/>
    <mapping resource="cl/model/pojos/DetallePrestamo.hbm.xml"/>
  </session-factory>
</hibernate-configuration>


text:
function Animation(id, startclass, ontime, property) {
    var self = this;
    self.id = id;
    self.elem = document.getElementById(id);
    self.offclass = self.elem.className;
    self.onclass = self.offclass+" "+startclass;
    self.ontime = ontime;
    self.phase = "off";
    if(property != undefined)
    {
        self.prop = property;
        self.elem.addEventListener('webkitTransitionEnd', function(e) {
            if(e.propertyName === self.prop)
            {
                if(self.phase === "starting")
                {
                    self.phase = "on";
                    self.timer = setTimeout(function() {
                        self.phase = "ending";
                        self.elem.className = self.offclass;
                    }, self.ontime);
                }
                else if(self.phase === "ending")
                {
                    self.phase = "off";
                    if(self.next&&self.next.begin)
                        self.next.begin();
                }
            }
        }, false);
    }
}

Animation.prototype.begin = function () {
    var self = this;
    self.phase = "starting";
    setTimeout(function(){self.elem.className = self.onclass;}, 0);
};

Animation.prototype.clear = function () {
    var self = this;
    if(self.timer)
        clearTimeout(self.timer);
    self.phase = "off";
    self.elem.className = self.offclass;
    if(self.next&&self.next.clear)
        self.next.clear();
};


text:
layout: page
title: Wallace Family Reunion
date: 2016-05-24
author: Nathan Grant
tags: weekly links, java
status: published
summary: Duis bibendum, turpis at fringilla sollicitudin, nisl sapien tempor dui.
banner: images/banner/leisure-04.jpg
booking:
  startDate: 01/06/2017
  endDate: 01/10/2017
  ctyhocn: CLTUVHX
  groupCode: WFR
published: true
---
Integer sagittis sagittis lectus, venenatis efficitur ligula pretium non. Pellentesque blandit, metus id vestibulum tincidunt, purus libero pellentesque ipsum, consectetur gravida magna massa quis odio. Aliquam erat volutpat. Aliquam sed enim eu est rhoncus bibendum et sed dui. Mauris lorem enim, cursus nec consectetur non, hendrerit vitae leo. Maecenas tristique est ipsum, id posuere nulla porta vitae. Aliquam velit sapien, porta ac mattis at, pulvinar in lorem. Morbi vel pretium enim, eu eleifend enim. Morbi tempor varius sagittis. Nullam gravida augue est, id varius dui fringilla non. In hac habitasse platea dictumst. Integer id posuere neque. Aliquam blandit dui sit amet lorem egestas, a feugiat velit pulvinar. Nam et ligula ex. In hac habitasse platea dictumst.

* Aliquam ornare enim dignissim arcu volutpat efficitur
* Donec ac eros ac lorem sodales vehicula
* Quisque placerat ipsum nec fringilla aliquam
* Aliquam in leo interdum leo facilisis dictum
* Sed a enim semper orci tincidunt mattis.

Sed sodales ligula diam, ut scelerisque risus fringilla sit amet. Pellentesque aliquet turpis justo, quis venenatis quam tincidunt a. Integer imperdiet ante felis, in dapibus purus viverra id. Suspendisse placerat condimentum elit sit amet interdum. Curabitur ornare ac sapien ut suscipit. Fusce eu orci quis eros suscipit condimentum. Integer mi leo, feugiat vitae quam at, hendrerit porta ligula.
Nullam in leo venenatis, fringilla mauris nec, maximus lorem. Phasellus vel tellus enim. Praesent eleifend mattis neque, non vulputate lorem interdum ac. Duis blandit urna non vehicula egestas. Morbi vestibulum aliquet ligula eget lacinia. Vestibulum semper rutrum pulvinar. Curabitur ut est vel lorem lacinia tempor et at est.


text:
<?php

class sspmod_janus_Exception_NoCertData extends Exception
{
}


text:
@interface NTAttr ()

@property (nonatomic,copy) void (^block)(NTAttributedStringBuilder *b);

+(NTAttr *)attrWithBlock:(void (^)(NTAttributedStringBuilder *b))block;

@end

@implementation NTAttr

+(NTAttr *)attrWithBlock:(void (^)(NTAttributedStringBuilder *))block
{
    NTAttr *attr = [[NTAttr alloc] init];
    attr.block = block;

    return attr;
}

-(void)appendToAttributedStringBuilder:(NTAttributedStringBuilder *)builder
{
    self.block(builder);
}

+(NTAttr *)push
{
    return [NTAttr attrWithBlock:^(NTAttributedStringBuilder *b)
    {
        [b pushAttributes];
    }];
}

+(NTAttr *)pop
{
    return [NTAttr attrWithBlock:^(NTAttributedStringBuilder *b)
    {
        [b popAttributes];
    }];
}

+(NTAttr *)clear
{
    return [NTAttr attrWithBlock:^(NTAttributedStringBuilder *b)
    {
        [b clearAttributes];
    }];
}

+(NTAttr *)startLink:(NSURL *)link
{
    return [NTAttr attrWithBlock:^(NTAttributedStringBuilder *b)
    {
        b.link = link;
    }];
}

+(NTAttr *)endLink
{
    return [NTAttr attrWithBlock:^(NTAttributedStringBuilder *b)
    {
        b.link = nil;
    }];
}

#define AUTO_METHOD(type,name) +(NTAttr *)name:(type)name { return [NTAttr attrWithBlock:^(NTAttributedStringBuilder *b) { b.name = name; } ]; }

// copy any new declarations and perform an xcode regex search: \+\(NTAttr \*\)(.*):\((.*)\).*$ replace: AUTO_METHOD(\2, \1)

AUTO_METHOD(UIFont *, font)
AUTO_METHOD(CGFloat, fontSize)
AUTO_METHOD(NSString *, fontName)
AUTO_METHOD(NSParagraphStyle *, paragraphStyle)
AUTO_METHOD(CGFloat, lineSpacing)
AUTO_METHOD(CGFloat, paragraphSpacing)
AUTO_METHOD(NSTextAlignment, alignment)
AUTO_METHOD(CGFloat, firstLineHeadIndent)
AUTO_METHOD(CGFloat, headIndent)
AUTO_METHOD(CGFloat, tailIndent)
AUTO_METHOD(NSLineBreakMode, lineBreakMode)
AUTO_METHOD(CGFloat, minimumLineHeight)
AUTO_METHOD(CGFloat, maximumLineHeight)
AUTO_METHOD(NSWritingDirection, baseWritingDirection)
AUTO_METHOD(CGFloat, lineHeightMultiple)
AUTO_METHOD(CGFloat, paragraphSpacingBefore)
AUTO_METHOD(float, hyphenationFactor)
AUTO_METHOD(NSUnderlineStyle, strikethroughStyle)
AUTO_METHOD(UIColor *, strikethroughColor)
AUTO_METHOD(NSUnderlineStyle, underlineStyle)
AUTO_METHOD(UIColor *, underlineColor)
AUTO_METHOD(UIColor *, strokeColor)
AUTO_METHOD(float, strokeWidth)
AUTO_METHOD(NSShadow *, shadow)
AUTO_METHOD(CGSize, shadowOffset)
AUTO_METHOD(UIColor *, shadowColor)
AUTO_METHOD(CGFloat, shadowBlurRadius)
AUTO_METHOD(NSString *, textEffect)
AUTO_METHOD(BOOL, textEffectLetterPress)
AUTO_METHOD(UIColor *, foregroundColor)
AUTO_METHOD(UIColor *, backgroundColor)
AUTO_METHOD(CGFloat, kern)

@end


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/domains/v1alpha2/domains.proto

namespace Google\Cloud\Domains\V1alpha2;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Defines an authorization code.
 *
 * Generated from protobuf message google.cloud.domains.v1alpha2.AuthorizationCode
 */
class AuthorizationCode extends \Google\Protobuf\Internal\Message
{
    /**
     * The Authorization Code in ASCII. It can be used to transfer the domain
     * to or from another registrar.
     *
     * Generated from protobuf field string code = 1;
     */
    private $code = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $code
     *           The Authorization Code in ASCII. It can be used to transfer the domain
     *           to or from another registrar.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Domains\V1Alpha2\Domains::initOnce();
        parent::__construct($data);
    }

    /**
     * The Authorization Code in ASCII. It can be used to transfer the domain
     * to or from another registrar.
     *
     * Generated from protobuf field string code = 1;
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * The Authorization Code in ASCII. It can be used to transfer the domain
     * to or from another registrar.
     *
     * Generated from protobuf field string code = 1;
     * @param string $var
     * @return $this
     */
    public function setCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->code = $var;

        return $this;
    }

}


text:
"use strict";

//File loading module that lets users upload audio files.
//Once uploaded, it verifies the format and plugs the data into the audio module
app.file = (function() {
    let uploaderElement;
    let fileReader;

    //Init function to setup the module
    function init() {
        //Create a file reader so the user can upload songs
        fileReader = new FileReader();
        //Get the uploader HTML element
        uploaderElement = document.getElementById("uploader");
        //Add a listener for when a file is uploaded
        uploaderElement.addEventListener("change", handleUpload);
    }

    //Function called when the user uploads a file
    function handleUpload() {
        //Grab the file and read it as an array buffer if it is an mp3
        let file = this.files[0];
        //Check that the file is an audio file
        if (file.type !== "audio/mp3" && file.type !== "audio/flac")
            return;

        //Read the audio data
        let audioData = fileReader.readAsArrayBuffer(file);

        //Bind a function to the onload event that will execute when the file has been uploaded successfully
        //TODO: add duplicate checking via metadata (this would be difficult)
        //check out this link: https://ericbidelman.tumblr.com/post/8343485440/reading-mp3-id3-tags-in-javascript
        fileReader.onload = function() {
            //Get the new song's ID
            let songId = app.state.audio.songs.length;
            //Get the string split index to cut out the global filepath and leave us with just the filename
            let fName = uploaderElement.value;
            let splitIndex = (fName.indexOf('\\') >= 0
                ? fName.lastIndexOf('\\')
                : fName.lastIndexOf('/'));
            //Push the new song to the song array.
            app.state.audio.songs.push({
                id: songId,
                hasBuffer: true,
                buffer: fileReader.result,
                name: fName.substr(splitIndex + 1),
                artist: "Unknown",
                album: "Unknown"
            });
            //Play the song
            app.audio.playFromBuffer(songId, app.state.audio.paused);
        }

    }

    return {init: init}
}());


text:
using System;

namespace Nybus.Configuration.QueueNameStrategies
{
    public class StaticQueueNameStrategy : IQueueNameStrategy
    {
        private readonly string _queueName;

        public StaticQueueNameStrategy(string queueName)
        {
            if (queueName == null) throw new ArgumentNullException(nameof(queueName));
            _queueName = queueName;
        }

        public string GetQueueName() => _queueName;
    }
}


text:
package com.huawei.esdk.fusionmanager.local.bean.net;

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

/**
 *
 * 查询SNAT返回信息。
 * @since eSDK Cloud V100R003C20
 */
public class QuerySnatResp
{
    /**
     * 异常信息。
     */
    private String faultString;

    /**
     * SNAT列表
     */
    private List<SnatSet> snatList;

    public String getFaultString()
    {
        return faultString;
    }

    public void setFaultString(String faultString)
    {
        this.faultString = faultString;
    }

    public List<SnatSet> getSnatList()
    {
    	if (snatList == null)
        {
    		snatList = new ArrayList<SnatSet>();
        }
        return this.snatList;
    }

    public void setSnatList(List<SnatSet> snatList)
    {
        this.snatList = snatList;
    }
}


text:
Title: Securing the Web
URL: 2017/descriptions/19187.html
save_as: 2017/descriptions/19187.html

This session focuses on building Web Security Awareness. Its helps the attendees to build their web applications more securely using Web Security Tools. With the help of web security tools, People can attack their own designed Web applications and check for the vulnerabilities in their applications and code it more securely.

For an instance, Assume a coder created Login page, He/She can use ZAP (Mozilla Security Automation Project) to attack his/her Login page and sort out the ways to trace out the flaws. In this way ZAP gives the coder chance to build their Web Application more securely. (Though its only one of the many features of ZAP).

### Session Plan: [Talk duration: 30min]

-> Importance of Web Security - 5min

-> Discussing OWASP Top 10 vulnerabilities [Each vulnerability will take 1min for discussion] - 10min

-> Discussing on available open source security tools such as OWASP ZAP, Vega Scanner, Open VAS, Nikto and Uniscan. [5 tools X 1min] - 5min

-> Live Demo [Scanning vulnerable web application to detect vulnerabilities and various other features of the ZAP] - 5min

-> QA - 5min

### Outcome:

This session would be able to show path for the attendees how he/she can contribute to Open Web in Security Aspects. The participant can be able to learn following areas:

→ Participant will grasp detailed knowledge on how a web application functions on browser and how they can detect vulnerabilities. (By learning from OWASP Top ten vulnerabilities )

→ Solving vulnerabilities.

→ Contributing to open source security tools.

→ Working on bugs related to vulnerabilities issues.

→ Start contributing to ZAP or other open source security projects in both tech/non-tech aspects.


text:
use std::convert::Into;

use super::{
    TFieldIdentifier, TInputProtocol, TListIdentifier, TMapIdentifier, TMessageIdentifier,
    TSetIdentifier, TStructIdentifier,
};
use crate::ProtocolErrorKind;

/// `TInputProtocol` required to use a `TMultiplexedProcessor`.
///
/// A `TMultiplexedProcessor` reads incoming message identifiers to determine to
/// which `TProcessor` requests should be forwarded. However, once read, those
/// message identifier bytes are no longer on the wire. Since downstream
/// processors expect to read message identifiers from the given input protocol
/// we need some way of supplying a `TMessageIdentifier` with the service-name
/// stripped. This implementation stores the received `TMessageIdentifier`
/// (without the service name) and passes it to the wrapped `TInputProtocol`
/// when `TInputProtocol::read_message_begin(...)` is called. It delegates all
/// other calls directly to the wrapped `TInputProtocol`.
///
/// This type **should not** be used by application code.
///
/// # Examples
///
/// Create and use a `TStoredInputProtocol`.
///
/// ```no_run
/// use thrift::protocol::{TInputProtocol, TMessageIdentifier, TMessageType, TOutputProtocol};
/// use thrift::protocol::{TBinaryInputProtocol, TBinaryOutputProtocol, TStoredInputProtocol};
/// use thrift::server::TProcessor;
/// use thrift::transport::{TIoChannel, TTcpChannel};
///
/// // sample processor
/// struct ActualProcessor;
/// impl TProcessor for ActualProcessor {
///     fn process(
///         &self,
///         _: &mut dyn TInputProtocol,
///         _: &mut dyn TOutputProtocol
///     ) -> thrift::Result<()> {
///         unimplemented!()
///     }
/// }
/// let processor = ActualProcessor {};
///
/// // construct the shared transport
/// let mut channel = TTcpChannel::new();
/// channel.open("localhost:9090").unwrap();
///
/// let (i_chan, o_chan) = channel.split().unwrap();
///
/// // construct the actual input and output protocols
/// let mut i_prot = TBinaryInputProtocol::new(i_chan, true);
/// let mut o_prot = TBinaryOutputProtocol::new(o_chan, true);
///
/// // message identifier received from remote and modified to remove the service name
/// let new_msg_ident = TMessageIdentifier::new("service_call", TMessageType::Call, 1);
///
/// // construct the proxy input protocol
/// let mut proxy_i_prot = TStoredInputProtocol::new(&mut i_prot, new_msg_ident);
/// let res = processor.process(&mut proxy_i_prot, &mut o_prot);
/// ```
// FIXME: implement Debug
pub struct TStoredInputProtocol<'a> {
    inner: &'a mut dyn TInputProtocol,
    message_ident: Option<TMessageIdentifier>,
}

impl<'a> TStoredInputProtocol<'a> {
    /// Create a `TStoredInputProtocol` that delegates all calls other than
    /// `TInputProtocol::read_message_begin(...)` to a `wrapped`
    /// `TInputProtocol`. `message_ident` is the modified message identifier -
    /// with service name stripped - that will be passed to
    /// `wrapped.read_message_begin(...)`.
    pub fn new(
        wrapped: &mut dyn TInputProtocol,
        message_ident: TMessageIdentifier,
    ) -> TStoredInputProtocol {
        TStoredInputProtocol {
            inner: wrapped,
            message_ident: message_ident.into(),
        }
    }
}

impl<'a> TInputProtocol for TStoredInputProtocol<'a> {
    fn read_message_begin(&mut self) -> crate::Result<TMessageIdentifier> {
        self.message_ident.take().ok_or_else(|| {
            crate::errors::new_protocol_error(
                ProtocolErrorKind::Unknown,
                "message identifier already read",
            )
        })
    }

    fn read_message_end(&mut self) -> crate::Result<()> {
        self.inner.read_message_end()
    }

    fn read_struct_begin(&mut self) -> crate::Result<Option<TStructIdentifier>> {
        self.inner.read_struct_begin()
    }

    fn read_struct_end(&mut self) -> crate::Result<()> {
        self.inner.read_struct_end()
    }

    fn read_field_begin(&mut self) -> crate::Result<TFieldIdentifier> {
        self.inner.read_field_begin()
    }

    fn read_field_end(&mut self) -> crate::Result<()> {
        self.inner.read_field_end()
    }

    fn read_bytes(&mut self) -> crate::Result<Vec<u8>> {
        self.inner.read_bytes()
    }

    fn read_bool(&mut self) -> crate::Result<bool> {
        self.inner.read_bool()
    }

    fn read_i8(&mut self) -> crate::Result<i8> {
        self.inner.read_i8()
    }

    fn read_i16(&mut self) -> crate::Result<i16> {
        self.inner.read_i16()
    }

    fn read_i32(&mut self) -> crate::Result<i32> {
        self.inner.read_i32()
    }

    fn read_i64(&mut self) -> crate::Result<i64> {
        self.inner.read_i64()
    }

    fn read_double(&mut self) -> crate::Result<f64> {
        self.inner.read_double()
    }

    fn read_string(&mut self) -> crate::Result<String> {
        self.inner.read_string()
    }

    fn read_list_begin(&mut self) -> crate::Result<TListIdentifier> {
        self.inner.read_list_begin()
    }

    fn read_list_end(&mut self) -> crate::Result<()> {
        self.inner.read_list_end()
    }

    fn read_set_begin(&mut self) -> crate::Result<TSetIdentifier> {
        self.inner.read_set_begin()
    }

    fn read_set_end(&mut self) -> crate::Result<()> {
        self.inner.read_set_end()
    }

    fn read_map_begin(&mut self) -> crate::Result<TMapIdentifier> {
        self.inner.read_map_begin()
    }

    fn read_map_end(&mut self) -> crate::Result<()> {
        self.inner.read_map_end()
    }

    // utility
    //

    fn read_byte(&mut self) -> crate::Result<u8> {
        self.inner.read_byte()
    }
}


text:
package org.chaston.oakfunds.storage;

import com.google.inject.AbstractModule;
import com.google.inject.Singleton;

/**
 * TODO(mchaston): write JavaDocs
 */
public class RecordTypeRegistryModule extends AbstractModule {
  @Override
  protected void configure() {
    bind(RecordTypeRegistry.class).to(RecordTypeRegistryImpl.class);
    bind(RecordTypeRegistryImpl.class).in(Singleton.class);
  }
}


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

<title>ServiceController</title>
<meta name="date" content="2018-02-08">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.robolectric.android.controller

Class ServiceController<T extends android.app.Service>

java.lang.Object

org.robolectric.android.controller.ComponentController<ServiceController<T>,T>

org.robolectric.android.controller.ServiceController<T>

public class ServiceController<T extends android.app.Service>
extends ComponentController<ServiceController<T>,T>

Field Summary

Fields inherited from class org.robolectric.android.controller.ComponentController

attached, component, intent, myself, shadowMainLooper

Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods

Modifier and Type
Method and Description

ServiceController<T>
bind()

ServiceController<T>
create()

ServiceController<T>
destroy()

static <T extends android.app.Service>
ServiceController<T>
of(T service,
  android.content.Intent intent)

ServiceController<T>
rebind()

ServiceController<T>
startCommand(int flags,
            int startId)

ServiceController<T>
unbind()

ServiceController<T>
withIntent(android.content.Intent intent)

Deprecated.

Use the appropriate builder in Robolectric instead.

This method will be removed in Robolectric 3.6.

Methods inherited from class org.robolectric.android.controller.ComponentController

get, getIntent, invokeWhilePaused

Methods inherited from class java.lang.Object

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

Method Detail

of

public static <T extends android.app.Service> ServiceController<T> of(T service,
                                                                      android.content.Intent intent)

bind

public ServiceController<T> bind()

create

public ServiceController<T> create()

Specified by:

create in class ComponentController<ServiceController<T extends android.app.Service>,T extends android.app.Service>

destroy

public ServiceController<T> destroy()

Specified by:

destroy in class ComponentController<ServiceController<T extends android.app.Service>,T extends android.app.Service>

rebind

public ServiceController<T> rebind()

startCommand

public ServiceController<T> startCommand(int flags,
                                         int startId)

unbind

public ServiceController<T> unbind()

withIntent

@Deprecated
public ServiceController<T> withIntent(android.content.Intent intent)

Deprecated. Use the appropriate builder in Robolectric instead.

This method will be removed in Robolectric 3.6.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Arthonia carneoumbrina Zahlbr.

### Remarks
null


text: <ng-transclude></ng-transclude>


text:
// The MIT License (MIT)
//
// Copyright (c) 2014-2017, Institute for Software & Systems Engineering
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

namespace SafetySharp.CaseStudies.HemodialysisMachine.Modeling.ExtracorporealBloodCircuit
{
	using ISSE.SafetyChecking.Modeling;
	using SafetySharp.Modeling;

	public class VenousTubingValve : Component
	{
		// HACK: To be able to react in time we delay the BloodFlow
		public readonly BloodFlowInToOut MainFlow = new BloodFlowInToOut();

		public ValveState ValveState = ValveState.Open;

		public BufferedBlood DelayedBlood = new BufferedBlood();

		[Provided]
		public Blood SetMainFlow(Blood fromPredecessor)
		{
			if (ValveState == ValveState.Open)
			{
				Blood toSuccessor = DelayedBlood;
				DelayedBlood=fromPredecessor;
				return toSuccessor;
			}
			else
			{
				Blood toSuccessor = DelayedBlood;
				toSuccessor.HasHeparin = true;
				toSuccessor.Water = 0;
				toSuccessor.SmallWasteProducts = 0;
				toSuccessor.BigWasteProducts = 0;
				toSuccessor.ChemicalCompositionOk = true;
				toSuccessor.GasFree = true;
				toSuccessor.Pressure = QualitativePressure.NoPressure;
				toSuccessor.Temperature = QualitativeTemperature.BodyHeat;
				return toSuccessor;
			}
		}

		[Provided]
		public Suction SetMainFlowSuction(Suction fromSuccessor)
		{
			return fromSuccessor;
		}

		public virtual void CloseValve()
		{
			ValveState = ValveState.Closed;
		}

		public VenousTubingValve()
		{
			MainFlow.UpdateBackward=SetMainFlowSuction;
			MainFlow.UpdateForward=SetMainFlow;
		}

		public readonly Fault ValveDoesNotClose = new PermanentFault { DemandType = Fault.DemandTypes.OnStartOfStep };

		[FaultEffect(Fault = nameof(ValveDoesNotClose))]
		public class ValveDoesNotCloseEffect : VenousTubingValve
		{
			public override void CloseValve()
			{
			}
		}
	}
}


text:
package com.zfdang.zsmth_android.models;

import java.text.Collator;
import java.text.RuleBasedCollator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;

/**
 * this class is used by BoardRecyclerViewAdapter
 */
public class BoardListContent {

  // used by FavoriteBoardFragment
  public static final List<Board> FAVORITE_BOARDS = new ArrayList<>();

  // used by AllBoardFragment
  public static final List<Board> ALL_BOARDS = new ArrayList<>();

  public static void addFavoriteItem(Board item) {
    FAVORITE_BOARDS.add(item);
  }

  public static void addAllBoardItem(Board item) {
    ALL_BOARDS.add(item);
  }

  public static class ChineseComparator implements Comparator<Board> {
    RuleBasedCollator collator = (RuleBasedCollator) Collator.getInstance(Locale.CHINA);

    public int compare(Board b1, Board b2) {
      return collator.compare(b1.getBoardChsName(), b2.getBoardChsName());
    }
  }

  public static void sortAllBoardItem() {
    // sort boards by chinese name
    Collections.sort(ALL_BOARDS, new BoardListContent.ChineseComparator());
  }

  public static void clearFavorites() {
    FAVORITE_BOARDS.clear();
  }

  public static void clearAllBoards() {
    ALL_BOARDS.clear();
  }
}


text:
hello_world = putStrLn "Hello World"
main = do
   hello_world

--Hello Worlds
helloWorld = putStrLn "Hello World"

helloWorlds 1 = helloWorld
helloWorlds n = do helloWorld
                   (helloWorlds (n - 1))

-- This part is related to the Input/Output and can be used as it is
-- Do not modify it
main = do
   n <- readLn :: IO Int
   helloWorlds n


text:
/** @jsx React.DOM */
define([
    'underscore', 'react', 'jquery', 'wingspan-forms'
], function (_, React, $, Forms) {
    'use strict';

    var SimpleFormMetadata = {
        firstName: { label: 'First Name' },
        lastName: { label: 'Last Name' },
        gender: { label: 'Gender' },
        age: { label: 'Age' },
        birthday: { label: 'Birthday'}
    };

    var MyForm = React.createClass({

        genderOptions: [{ value: 'male', label: 'Male'}, { value: 'female', label: 'Female'}],

        getInitialState: function () {
            return {
                firstName: '',
                lastName: '',
                gender: '',
                age: null,
                birthday: null
            };
        },

        render: function () {
            return (

                        <FormField fieldInfo={SimpleFormMetadata.firstName} isValid={this.isFieldValid('firstName')}>
                            <KendoText value={this.state.firstName} onChange={_.partial(this.onFieldChange, 'firstName')} />
                        </FormField>

                        <FormField fieldInfo={SimpleFormMetadata.lastName} isValid={this.isFieldValid('lastName')}>
                            <KendoText value={this.state.lastName} onChange={_.partial(this.onFieldChange, 'lastName')} />
                        </FormField>

                        <FormField fieldInfo={SimpleFormMetadata.gender} isValid={this.isFieldValid('gender')}>
                            <KendoComboBox
                                dataSource={this.genderOptions}
                                displayField="label"
                                valueField="value"
                                value={this.state.gender}
                                onChange={_.partial(this.onFieldChange, 'gender')} />
                        </FormField>

                        <FormField fieldInfo={SimpleFormMetadata.age} isValid={this.isFieldValid('age')}>
                            <KendoNumericTextBox spinners={true} value={this.state.age} onChange={_.partial(this.onFieldChange, 'age')} />
                        </FormField>

                        <FormField fieldInfo={SimpleFormMetadata.birthday} isValid={this.isFieldValid('birthday')}>
                            <KendoDatePicker value={this.state.birthday} onChange={_.partial(this.onFieldChange, 'birthday')} />
                        </FormField>

{JSON.stringify(this.state, undefined, 2)}

            );
        },

        onFieldChange: function (fieldName, value) {
            this.setState(_.object([[fieldName, value]]));
        },

        isFieldValid: function (fieldName) {
            var val = this.state[fieldName];

            return val !== null && val !== ''
                ? [true, '']
                : [false, 'This field is required.'];
        }
    });

    function entrypoint(rootEl) {
        React.renderComponent(<MyForm/>, rootEl);
        Forms.ControlCommon.attachFormTooltips($(document.body));
    }

    var FormField = Forms.FormField;
    var KendoText = Forms.KendoText;
    var KendoComboBox = Forms.KendoComboBox;
    var KendoNumericTextBox = Forms.KendoNumericTextBox;
    var KendoDatePicker = Forms.KendoDatePicker;

    return {
        entrypoint: entrypoint
    };
});


text:
package org.sagebionetworks.web.client.widget.table.v2.results.cell;

import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.Widget;

public interface UserIdCellEditorView extends IsWidget {
	void setSynapseSuggestBoxWidget(Widget w);

	void setUserIdCellRenderer(Widget w);

	void showEditor(boolean visible);

	void setUserIdCellRendererClickHandler(ClickHandler clickHandler);
}