text:
/* This file contains function prototypes and data types used to implement
Pd, but not shared with Pd objects. */

/* NOTE: this file describes Pd implementation details which may change
in future releases.  The public (stable) API is in m_pd.h. */

/* LATER consider whether to use 'char' for method arg types to save space */
#ifndef __m_imp_h_

/* the structure for a method handler ala Max */
typedef struct _methodentry
{
    t_symbol *me_name;
    t_gotfn me_fun;
    unsigned char me_arg[MAXPDARG+1];
} t_methodentry;

EXTERN_STRUCT _widgetbehavior;

typedef void (*t_bangmethod)(t_pd *x);
typedef void (*t_pointermethod)(t_pd *x, t_gpointer *gp);
typedef void (*t_floatmethod)(t_pd *x, t_float f);
typedef void (*t_symbolmethod)(t_pd *x, t_symbol *s);
typedef void (*t_listmethod)(t_pd *x, t_symbol *s, int argc, t_atom *argv);
typedef void (*t_anymethod)(t_pd *x, t_symbol *s, int argc, t_atom *argv);

struct _class
{
    t_symbol *c_name;                   /* name (mostly for error reporting) */
    t_symbol *c_helpname;               /* name of help file */
    t_symbol *c_externdir;              /* directory extern was loaded from */
    size_t c_size;                      /* size of an instance */
#ifdef PDINSTANCE
    t_methodentry **c_methods;          /* methods other than bang, etc below */
#else
    t_methodentry *c_methods;
#endif
    int c_nmethod;                      /* number of methods */
    t_method c_freemethod;              /* function to call before freeing */
    t_bangmethod c_bangmethod;          /* common methods */
    t_pointermethod c_pointermethod;
    t_floatmethod c_floatmethod;
    t_symbolmethod c_symbolmethod;
    t_listmethod c_listmethod;
    t_anymethod c_anymethod;
    const struct _widgetbehavior *c_wb; /* "gobjs" only */
    const struct _parentwidgetbehavior *c_pwb;/* widget behavior in parent */
    t_savefn c_savefn;                  /* function to call when saving */
    t_propertiesfn c_propertiesfn;      /* function to start prop dialog */
    struct _class *c_next;
    int c_floatsignalin;                /* onset to float for signal input */
    char c_gobj;                        /* true if is a gobj */
    char c_patchable;                   /* true if we have a t_object header */
    char c_firstin;                 /* if patchable, true if draw first inlet */
    char c_drawcommand;             /* a drawing command for a template */
    t_classfreefn c_classfreefn;    /* function to call before freeing class */
};

/* m_pd.c */
EXTERN void pd_init_systems(void);
EXTERN void pd_term_systems(void);

/* m_class.c */
EXTERN void pd_emptylist(t_pd *x);

/* m_obj.c */
EXTERN int obj_noutlets(const t_object *x);
EXTERN int obj_ninlets(const t_object *x);
EXTERN t_outconnect *obj_starttraverseoutlet(const t_object *x, t_outlet **op,
    int nout);
EXTERN t_outconnect *obj_nexttraverseoutlet(t_outconnect *lastconnect,
    t_object **destp, t_inlet **inletp, int *whichp);
EXTERN t_outconnect *obj_connect(t_object *source, int outno,
    t_object *sink, int inno);
EXTERN void obj_disconnect(t_object *source, int outno, t_object *sink,
    int inno);
EXTERN void outlet_setstacklim(void);
EXTERN int obj_issignalinlet(const t_object *x, int m);
EXTERN int obj_issignaloutlet(const t_object *x, int m);
EXTERN int obj_nsiginlets(const t_object *x);
EXTERN int obj_nsigoutlets(const t_object *x);
EXTERN int obj_siginletindex(const t_object *x, int m);
EXTERN int obj_sigoutletindex(const t_object *x, int m);
EXTERN t_float *obj_findsignalscalar(const t_object *x, int m);

/* s_inter.c */
void pd_globallock(void);
void pd_globalunlock(void);

/* misc */
#ifndef SYMTABHASHSIZE  /* set this to, say, 1024 for small memory footprint */
#define SYMTABHASHSIZE 16384
#endif /* SYMTABHASHSIZE */

EXTERN t_pd *glob_evalfile(t_pd *ignore, t_symbol *name, t_symbol *dir);
EXTERN void glob_initfromgui(void *dummy, t_symbol *s, int argc, t_atom *argv);
EXTERN void glob_quit(void *dummy); /* glob_exit(0); */
EXTERN void glob_exit(void *dummy, t_float status);
EXTERN void open_via_helppath(const char *name, const char *dir);

#define __m_imp_h_
#endif /* __m_imp_h_ */


text:
NO_OBJ=

FILESDIR=	${LIBEXECDIR}/bsdconfig/130.security/include
FILES=		messages.subr securelevel.hlp

beforeinstall:
	mkdir -p ${DESTDIR}${FILESDIR}

.include <bsd.prog.mk>

redpajama_set_name: RedPajamaGithub


text:
<?php namespace VotingApp\Events;

use Illuminate\Queue\SerializesModels;

class UserCastVote extends Event
{

    use SerializesModels;

    /**
     * Create a new event instance.
     */
    public function __construct()
    {
        //
    }

}


text:
<!doctype html>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">

	<title>AisenLink - Accessing OpenWRT Filesystem as a Remote Drive with OSXFUSE</title>

	<link rel="stylesheet" href="/css/pure-min.css">
	<link rel="stylesheet" href="/css/blog.css">
	<link rel="stylesheet" href="/css/font-awesome.min.css">
	<link rel="shortcut icon" href="/images/favicon.ico">

			<hgroup class="a-plain">

AisenLink

艾森林

The Connected Things

				All
				Recent

				Github Pages

				Jekyll Pure

				Tag Generator

				HG8245

				Huawei

				ONT

				Wifi Router

				OpenWrt

				TFTP Server

				Mac OS X

				cc_flasher

				CC2430

				Macports

				WGR614v10

				WNR1000v3

				Netgear

				Nuvoton

				Nano130

				Keil

				Nu-Link

				Virtualbox

				OSXFUSE

			</hgroup>

Read Post

Accessing OpenWRT Filesystem as a Remote Drive with OSXFUSE

				2015-10-18

				OpenWrt

				OSXFUSE

				Mac OS X

OpenWRT is an open source wireless router software based-on Linux system. As with the rest of other Unix systems, it supports ext2/3/4 file system. Transferring files between different file system is not an issue as long as an SFTP server is installed on OpenWRT and SFTP client is installed on your desktop computer. However, recently, I found a better way to drag-n-drop or copy-n-paste files on the OpenWRT file system mounted as a remote drive on my Mac through OSXFUSE and SSHFS. Read on if you want to know how to do it. This guide should also work on any Linux/Unix other than OpenWRT.

FUSE for OS X allows you to extend OS X's native file handling capabilities via third-party file systems. OSXFUSE is a successor to MacFUSE, which has been used as a software building block by dozens of products, but is no longer being maintained. In more technical terms, OSXFUSE implements a mechanism that makes it possible to implement a fully functional file system in a user-space program on OS X. It provides multiple APIs, one of which is a superset of the FUSE API (file system in user space) that originated on Linux. Therefore, many existing FUSE file systems become readily usable on OS X. OSXFUSE can be downloaded from here.

SSHFS (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal ssh connection. The client interacts with the remote file system via the SSH File Transfer Protocol (SFTP), a network protocol providing file access, file transfer, and file management functionality over any reliable data stream that was designed as an extension of the Secure Shell protocol (SSH) version 2.0. You can download SSHFS for Mac OS X from here. If you don't like to use Terminal to login to remote drives, you might also want to download the GUI from here or here.

Alternatively, if you have Macports installed, you can do sudo macport install osxfuse sshfs sshfs-gui. This will install OSXFUSE and SSHFS version of Macports and also a simple GUI. To mount a remote drive, do these from Terminal app:

mkdir /path/to/mountpoint
sshfs username@server:/path/to/remote/location /path/to/mountpoint

Mounting point can be anywhere, but I do love to follow the convention where every mounted drive on OS X stays under /Volumes. Everytime remote drive is ejected/unmounted, the mount point /path/to/mountpoint has to be recreated the next time you want to work with it. If you use sshfs-gui, it will help you create temporary mount point automatically. That's all folks. Hope this post useful for you all!

	← Prev

&copy 2009-2015 AisenLink 艾森林


text:
package org.anodyneos.servlet.xsl.xalan;

public interface AutoHtmlParserUrlGen {
    String emailToUrl(String s);
    String urlToUrl(String s);
    String ftpToUrl(String s);
    String wwwToUrl(String s);
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Our Code World Camera Demo</title>

                <input type="button" id="start" value="Start / Shut down camera"/>
                <input type="button" id="savefile" value="Save photo in Desktop"/>


text:
package nat

import (
	"sort"
	"strconv"
	"strings"
)

type portSorter struct {
	ports []Port
	by    func(i, j Port) bool
}

func (s *portSorter) Len() int {
	return len(s.ports)
}

func (s *portSorter) Swap(i, j int) {
	s.ports[i], s.ports[j] = s.ports[j], s.ports[i]
}

func (s *portSorter) Less(i, j int) bool {
	ip := s.ports[i]
	jp := s.ports[j]

	return s.by(ip, jp)
}

func Sort(ports []Port, predicate func(i, j Port) bool) {
	s := &portSorter{ports, predicate}
	sort.Sort(s)
}

type portMapEntry struct {
	port    Port
	binding PortBinding
}

type portMapSorter []portMapEntry

func (s portMapSorter) Len() int      { return len(s) }
func (s portMapSorter) Swap(i, j int) { s[i], s[j] = s[j], s[i] }

// sort the port so that the order is:
// 1. port with larger specified bindings
// 2. larger port
// 3. port with tcp protocol
func (s portMapSorter) Less(i, j int) bool {
	pi, pj := s[i].port, s[j].port
	hpi, hpj := toInt(s[i].binding.HostPort), toInt(s[j].binding.HostPort)
	return hpi > hpj || pi.Int() > pj.Int() || (pi.Int() == pj.Int() && strings.ToLower(pi.Proto()) == "tcp")
}

// SortPortMap sorts the list of ports and their respected mapping. The ports
// will explicit HostPort will be placed first.
func SortPortMap(ports []Port, bindings PortMap) {
	s := portMapSorter{}
	for _, p := range ports {
		if binding, ok := bindings[p]; ok {
			for _, b := range binding {
				s = append(s, portMapEntry{port: p, binding: b})
			}
			bindings[p] = []PortBinding{}
		} else {
			s = append(s, portMapEntry{port: p})
		}
	}

	sort.Sort(s)
	var (
		i  int
		pm = make(map[Port]struct{})
	)
	// reorder ports
	for _, entry := range s {
		if _, ok := pm[entry.port]; !ok {
			ports[i] = entry.port
			pm[entry.port] = struct{}{}
			i++
		}
		// reorder bindings for this port
		if _, ok := bindings[entry.port]; ok {
			bindings[entry.port] = append(bindings[entry.port], entry.binding)
		}
	}
}

func toInt(s string) int64 {
	i, err := strconv.ParseInt(s, 10, 64)
	if err != nil {
		i = 0
	}
	return i
}


text:
namespace rinse {
namespace tuple {
inline namespace pop_back_hpp {
namespace
{ // rinse::tuple::pop_back_hpp::{unnamed}

template< class List,
  class Output = typename rinse::tuple::unbind< List >::template type<>,
  std::size_t N = rinse::tuple::tuple_size< List >::value >
struct pop_back;

template< class List, class Output, std::size_t N >
struct pop_back
{
  using type = typename pop_back<
    rinse::tuple::pop_front_t< List >,
    rinse::tuple::push_back_t< Output,
      rinse::tuple::first_type_t< List > >,
    N - 1 >::type;
};

template< class List, class Output >
struct pop_back< List, Output, 1 >
{
  using type = Output;
};

template< class List >
using pop_back_t = typename pop_back< List >::type;

} // unnamed namespace
} // inline namespace pop_back_hpp
} // namespace tuple
} // namespace rinse

#endif  // RINSE_TUPLE_POP_BACK_HPP


text:
SELECT a,b,c FROM t1 INTERSECT SELECT a,b,c FROM t1 WHERE b<'d'
ORDER BY c COLLATE NOCASE


text:
(function(jQuery) {
  var MessageManager = function(socket) {
    this.socket = socket;

    this.onAny(function(data1, data2, data3, data4, data5) {
      if (this.event !== 'newListener') {
        socket.emit(this.event, data1, data2, data3, data4, data5);
      }
    });

    this.on('newListener', function(aType, aListener) {
      socket.on(aType, aListener);
    });

    return this;
  };
  MessageManager.prototype = new EventEmitter2({ newListener: true });
  MessageManager.prototype.constructor = MessageManager;

  window.MessageManager = MessageManager;
})(jQuery);


text:
#ifndef __CONFIG_H
#define __CONFIG_H

#include <multiboot2.h>
#include <stdint.h>

/* The default inital stack size for the CPU driver, if it's not specified in
 * the configuration file. */
#define DEFAULT_STACK_SIZE 16384

struct component_config {
    /* The offset and length of the image path, and argument strings for this
     * component. */
    size_t path_start, path_len;
    size_t args_start, args_len;

    /* The size and target address of the ELF image. */
    size_t image_size, alloc_size;
    uint64_t image_address;

    /* A pointer to the module tag in the multiboot info image. */
    struct multiboot_tag_module_64 *tag;

    /* A pointer to the loaded image. */
    void *image;

    struct component_config *next;
};

struct config {
    /* The raw configuration file. */
    char *buf;

    /* The multiboot information structure. */
    void *multiboot;
    size_t multiboot_size, multiboot_alloc;

    /* Pointers (within the multiboot structure), to the memory map that needs
     * to be filled in after all allocation is finished. */
    struct multiboot_tag_efi_mmap *mmap_tag;
    void *mmap_start;

    /* The CPU driver load information. */
    struct component_config *kernel;
    uint64_t kernel_entry;
    uint64_t kernel_stack;
    uint64_t stack_size;

    /* The additional modules. */
    struct component_config *first_module, *last_module;
};

struct config *parse_config(char *buf, size_t size);

#endif /* __CONFIG_H */


text:
"""
An impementation of LIME (http://arxiv.org/abs/1602.04938), an algorithm to
explain predictions of black-box models.
"""
from __future__ import absolute_import
from typing import Any, Callable, Dict, Optional

import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.linear_model import SGDClassifier
from sklearn.model_selection import train_test_split
from sklearn.utils import check_random_state
from sklearn.base import clone, BaseEstimator

import eli5
from eli5.sklearn.utils import sklearn_version
from eli5.lime.samplers import BaseSampler
from eli5.lime.textutils import DEFAULT_TOKEN_PATTERN, CHAR_TOKEN_PATTERN
from eli5.lime.samplers import MaskingTextSamplers
from eli5.lime.utils import (
    fit_proba,
    score_with_sample_weight,
    mean_kl_divergence,
    fix_multiclass_predict_proba,
    rbf
)
from eli5.lime._vectorizer import SingleDocumentVectorizer

class TextExplainer(BaseEstimator):
    """
    TextExplainer allows to explain predictions of black-box text classifiers
    using LIME algorithm.

    Parameters
    ----------
    n_samples : int
        A number of samples to generate and train on. Default is 5000.

        With larger n_samples it takes more CPU time and RAM to explain
        a prediction, but it could give better results. Larger n_samples
        could be also required to get good results if you don't want to
        make strong assumptions about the black-box classifier
        (e.g. char_based=True and position_dependent=True).
    char_based : bool
        True if explanation should be char-based, False if it should be
        token-based. Default is False.
    clf : object, optional
        White-box probabilistic classifier. It should be supported by eli5,
        follow scikit-learn interface and provide predict_proba method.
        When not set, a default classifier is used (logistic regression with
        elasticnet regularization trained with SGD).
    vec : object, optional
        Vectorizer which converts generated texts to feature vectors
        for the white-box classifier. When not set, a default vectorizer is
        used; which one depends on ``char_based`` and ``position_dependent``
        arguments.
    sampler : MaskingTextSampler or MaskingTextSamplers, optional
        Sampler used to generate modified versions of the text.
    position_dependent : bool
        When True, a special vectorizer is used which takes
        each token or character (depending on ``char_based`` value)
        in account separately. When False (default) a vectorized passed in
        ``vec`` or a default vectorizer is used.

        Default vectorizer converts text to vector using bag-of-ngrams
        or bag-of-char-ngrams approach (depending on ``char_based`` argument).
        It means that it may be not powerful enough to approximate a black-box
        classifier which e.g. takes in account word FOO in the beginning of
        the document, but not in the end.

        When ``position_dependent`` is True the model becomes powerful enough
        to account for that, but it can become more noisy and require
        larger ``n_samples`` to get an OK explanation.

        When ``char_based=False`` the default vectorizer uses word bigrams
        in addition to unigrams; this is less powerful than
        ``position_dependent=True``, but can give similar results in practice.
    rbf_sigma : float, optional
        Sigma parameter of RBF kernel used to post-process cosine similarity
        values. Default is None, meaning no post-processing
        (cosine simiilarity is used as sample weight as-is).
        Small ``rbf_sigma`` values (e.g. 0.1) tell the classifier to pay
        more attention to generated texts which are close to the original text.
        Large ``rbf_sigma`` values (e.g. 1.0) make distance between text
        irrelevant.

        Note that if you're using large ``rbf_sigma`` it could be more
        efficient to use custom ``samplers`` instead, in order to generate
        text samples which are closer to the original text in the first place.
        Use e.g. ``max_replace`` parameter of :class:`~.MaskingTextSampler`.
    random_state : integer or numpy.random.RandomState, optional
        random state
    expand_factor : int or None
        To approximate output of the probabilistic classifier generated
        dataset is expanded by ``expand_factor`` (10 by default)
        according to the predicted label probabilities. This is a workaround
        for scikit-learn limitation (no cross-entropy loss for non 1/0 labels).
        With larger values training takes longer, but probability output
        can be approximated better.

        expand_factor=None turns this feature off; pass None when you know
        that black-box classifier returns only 1.0 or 0.0 probabilities.
    token_pattern : str, optional
        Regex which matches a token. Use it to customize tokenization.
        Default value depends on ``char_based`` parameter.

    Attributes
    ----------
    rng_ : numpy.random.RandomState
        random state

    samples_ : list[str]
        A list of samples the local model is trained on.
        Only available after :func:`fit`.

    X_ : ndarray or scipy.sparse matrix
        A matrix with vectorized ``samples_``.
        Only available after :func:`fit`.

    similarity_ : ndarray
        Similarity vector. Only available after :func:`fit`.

    y_proba_ : ndarray
        probabilities predicted by black-box classifier
        (``predict_proba(self.samples_)`` result).
        Only available after :func:`fit`.

    clf_ : object
        Trained white-box classifier. Only available after :func:`fit`.

    vec_ : object
        Fit white-box vectorizer. Only available after :func:`fit`.

    metrics_ : dict
        A dictionary with metrics of how well the local
        classification pipeline approximates the black-box pipeline.
        Only available after :func:`fit`.
    """
    def __init__(self,
                 n_samples=5000,  # type: int
                 char_based=None,  # type: bool
                 clf=None,
                 vec=None,
                 sampler=None,  # type: BaseSampler
                 position_dependent=False,  # type: bool
                 rbf_sigma=None,  # type: float
                 random_state=None,
                 expand_factor=10,  # type: Optional[int]
                 token_pattern=None,  # type: Optional[str]
                 ):
        # type: (...) -> None
        self.n_samples = n_samples
        self.random_state = random_state
        self.expand_factor = expand_factor
        self.rng_ = check_random_state(random_state)
        if clf is None:
            clf = self._default_clf()
        self.clf = clf

        if char_based is None:
            if token_pattern is None:
                self.char_based = False  # type: Optional[bool]
                self.token_pattern = DEFAULT_TOKEN_PATTERN  # type: str
            else:
                self.char_based = None
                self.token_pattern = token_pattern
        else:
            if token_pattern is None:
                token_pattern = (CHAR_TOKEN_PATTERN if char_based
                                 else DEFAULT_TOKEN_PATTERN)
            self.char_based = char_based
            self.token_pattern = token_pattern

        if sampler is None:
            sampler = MaskingTextSamplers(
                sampler_params=[{'bow': False}, {'bow': True}],
                weights=[0.7, 0.3],
                token_pattern=self.token_pattern,
                random_state=self.rng_,
            )
        self.sampler = sampler
        self.rbf_sigma = rbf_sigma
        self.position_dependent = position_dependent
        if position_dependent:
            if vec is not None:
                raise ValueError("Custom vectorizers are only supported with "
                                 "position_dependent=False (because "
                                 "position_dependent=True uses its own "
                                 "vectorizer)")
        else:
            if vec is None:
                if self.char_based:
                    vec = CountVectorizer(
                        analyzer='char',
                        ngram_range=(2, 5),
                    )
                else:
                    vec = CountVectorizer(
                        token_pattern=self.token_pattern,
                        ngram_range=(1, 2),
                    )
            self.vec = vec

    def fit(self,
            doc,             # type: str
            predict_proba,   # type: Callable[[Any], Any]
            ):
        # type: (...) -> TextExplainer
        """
        Explain ``predict_proba`` probabilistic classification function
        for the ``doc`` example. This method fits a local classification
        pipeline following LIME approach.

        To get the explanation use :meth:`show_prediction`,
        :meth:`show_weights`, :meth:`explain_prediction` or
        :meth:`explain_weights`.

        Parameters
        ----------
        doc : str
            Text to explain
        predict_proba : callable
            Black-box classification pipeline. ``predict_proba``
            should be a function which takes a list of strings (documents)
            and return a matrix of shape ``(n_samples, n_classes)`` with
            probability values - a row per document and a column per output
            label.
        """
        self.doc_ = doc

        if self.position_dependent:
            samples, sims, mask, text = self.sampler.sample_near_with_mask(
                doc=doc,
                n_samples=self.n_samples
            )
            self.vec_ = SingleDocumentVectorizer(
                token_pattern=self.token_pattern
            ).fit([doc])
            X = ~mask
        else:
            self.vec_ = clone(self.vec).fit([doc])
            samples, sims = self.sampler.sample_near(
                doc=doc,
                n_samples=self.n_samples
            )
            X = self.vec_.transform(samples)

        if self.rbf_sigma is not None:
            sims = rbf(1-sims, sigma=self.rbf_sigma)

        self.samples_ = samples
        self.similarity_ = sims
        self.X_ = X
        self.y_proba_ = predict_proba(samples)
        self.clf_ = clone(self.clf)

        self.metrics_ = _train_local_classifier(
            estimator=self.clf_,
            samples=X,
            similarity=sims,
            y_proba=self.y_proba_,
            expand_factor=self.expand_factor,
            random_state=self.rng_
        )
        return self

    def show_prediction(self, **kwargs):
        """
        Call :func:`eli5.show_prediction` for the locally-fit
        classification pipeline. Keyword arguments are passed
        to :func:`eli5.show_prediction`.

        :func:`fit` must be called before using this method.
        """
        self._fix_target_names(kwargs)
        return eli5.show_prediction(self.clf_, self.doc_, vec=self.vec_,
                                    **kwargs)

    def explain_prediction(self, **kwargs):
        """
        Call :func:`eli5.explain_prediction` for the locally-fit
        classification pipeline. Keyword arguments are passed
        to :func:`eli5.explain_prediction`.

        :func:`fit` must be called before using this method.
        """
        self._fix_target_names(kwargs)
        return eli5.explain_prediction(self.clf_, self.doc_, vec=self.vec_,
                                       **kwargs)

    def show_weights(self, **kwargs):
        """
        Call :func:`eli5.show_weights` for the locally-fit
        classification pipeline. Keyword arguments are passed
        to :func:`eli5.show_weights`.

        :func:`fit` must be called before using this method.
        """
        self._fix_target_names(kwargs)
        return eli5.show_weights(self.clf_, vec=self.vec_, **kwargs)

    def explain_weights(self, **kwargs):
        """
        Call :func:`eli5.show_weights` for the locally-fit
        classification pipeline. Keyword arguments are passed
        to :func:`eli5.show_weights`.

        :func:`fit` must be called before using this method.
        """
        self._fix_target_names(kwargs)
        return eli5.explain_weights(self.clf_, vec=self.vec_, **kwargs)

    def _fix_target_names(self, kwargs):
        target_names = kwargs.get('target_names', None)
        if not target_names:
            return
        kwargs['target_names'] = np.array(target_names)[self.clf_.classes_]

    def _default_clf(self):
        kwargs = dict(
            loss='log',
            penalty='elasticnet',
            alpha=1e-3,
            random_state=self.rng_
        )
        if sklearn_version() >= '0.19':
            kwargs['tol'] = 1e-3
        return SGDClassifier(**kwargs)

def _train_local_classifier(estimator,
                            samples,
                            similarity,        # type: np.ndarray
                            y_proba,           # type: np.ndarray
                            expand_factor=10,  # type: Optional[int]
                            test_size=0.3,     # type: float
                            random_state=None,
                            ):
    # type: (...) -> Dict[str, float]
    rng = check_random_state(random_state)

    (X_train, X_test,
     similarity_train, similarity_test,
     y_proba_train, y_proba_test) = train_test_split(samples,
                                                     similarity,
                                                     y_proba,
                                                     test_size=test_size,
                                                     random_state=rng)

    # XXX: in the original lime code instead of a probabilitsic classifier
    # they build several regression models which try to output probabilities.
    #
    # XXX: Probability information is helpful because it could be hard
    # to get enough examples of all classes automatically, so we're fitting
    # classifier to produce the same probabilities, not only the same
    # best answer.

    # TODO: feature selection
    # Ideally, it should be supported as a Pipeline (i.e. user should
    # be able to configure it).
    fit_proba(estimator, X_train, y_proba_train,
              expand_factor=expand_factor,
              sample_weight=similarity_train,
              random_state=rng)

    y_proba_test_pred = estimator.predict_proba(X_test)
    if y_proba_test_pred.shape != y_proba_test.shape:
        # Sometimes generated training labels may contain only a subset of
        # target classes; it means it could happen that dimensions
        # of predicted probability matrices don't match.
        #
        # XXX: the fix is not complete; to explain predictions
        # of the fitted estimator one still have to take care of target_names.
        if not hasattr(estimator, 'classes_'):
            raise ValueError("Result dimensions don't match and estimator"
                             "doesn't provide 'classes_' attribute; can't"
                             "figure out how are columns related.")
        seen_classes = estimator.classes_
        complete_classes = np.arange(y_proba.shape[1])
        y_proba_test_pred = fix_multiclass_predict_proba(
            y_proba=y_proba_test_pred,
            seen_classes=seen_classes,
            complete_classes=complete_classes
        )

    return {
        'mean_KL_divergence': mean_kl_divergence(
            y_proba_test_pred,
            y_proba_test,
            sample_weight=similarity_test
        ),
        'score': score_with_sample_weight(estimator,
                                          X_test,
                                          y_proba_test.argmax(axis=1),
                                          sample_weight=similarity_test)
    }


text:
require 'rspec'
require 'panoptimon'

describe('collector exec must exist') {
  this = ->(setup) {
    setup.call()
    Panoptimon::Collector.new(
      command: ['nosuchfilehere'],
      bus: not(nil)
    );
  }
  it('complains if command file does not exist') {
    expect {this.call(->(){})}.
      to raise_exception(/no such file/)
  }

  it('complains if command file is not executable') {
    expect {this.call(->(){File.stub('exist?') {true}})}.
      to raise_exception(/is not executable/)
  }

}


text:
title: Test Blog
categories:
  - test
tags:
  - test
---
##Test
test test test


text:
//Included Libraries
#include <stdio.h>
#include <stdlib.h>
#include <sstream>
#include <string.h>
#include <cstring>
#include <cmath>

//Included Headers
#include "lib_includes.h"

using namespace std;

double degrees = 57.2957795;

// ********************************************************************* //
// ****************ATOMS CLASS MEMBER FUNCTIONS************************* //
// ********************************************************************* //

/*____________________________________________________________________________
                ----Angstrom to Atomic Unit Converter----
                ----Author: Justin Smith             ----
                ----Date Modified: 7/21/2014         ----
                ----Modified By:                     ----
*/
void atoms::AngToAU ()
{

        double x,y,z;

        x = pos_xyz[0];
        y = pos_xyz[1];
        z = pos_xyz[2];

	pos_xyz[0] = x * 1.88972613392;
	pos_xyz[1] = y * 1.88972613392;
	pos_xyz[2] = z * 1.88972613392;
}

/*____________________________________________________________________________
		----Cartesian to Spherical Converter----
		----Author: Justin Smith	    ----
                ----Date Modified: 7/21/2014        ----
                ----Modified By:                    ----
This atoms class member function changes the current cartesian coords loaded
into pos_xyz[i] array into spherical coords (degrees) in the pos_sph[i] array.
*/
void atoms::CartToSphere ()
{

	double x,y,z,x2,y2,z2,tmp1,tmp2,tmp3;
	//double degrees = 57.2957795;// <------- MAKE THIS A GLOBALLY DEFINED CONSTANT

	x = pos_xyz[0];
	y = pos_xyz[1];
	z = pos_xyz[2];

	x2 = pow(x,2);
	y2 = pow(y,2);
	z2 = pow(z,2);

	tmp1 = sqrt(x2 + y2 + z2);// Calculate distance
	tmp2 = atan2(sqrt(x2 + y2),z); // Calculate theta
	tmp3 = atan2(y,x); // Calculate phi

        pos_sph[0] = tmp1; //Save calculated r from cartesian
        pos_sph[1] = tmp2 * degrees; //Save calculated theta from cartesian
        pos_sph[2] = tmp3 * degrees; //Save calculated phi from cartesian
}

/*____________________________________________________________________________
                ----Spherical To Cartesian Converter----
                ----Author: Justin Smith            ----
                ----Date Modified: 7/21/2014        ----
                ----Modified By:                    ----
This atoms class member function changes the current spherical coords (degrees) loaded
into pos_sph[i] array into cartesian coords in the pos_xyz[i] array.
*/

void atoms::SphereToCart ()
{

        double r,theta,phi,tmp1,tmp2,tmp3;
        //double degrees = 57.2957795;//<-------- MAKE THIS A GLOBALLY DEFINED CONSTANT

        r = pos_sph[0];
        theta = pos_sph[1] / degrees;
        phi = pos_sph[2] / degrees;

	tmp1 = r * sin(theta) * cos(phi); //Calculate x
	tmp2 = r * sin(theta) * sin(phi); //Calculate y
	tmp3 = r * cos(theta);	//Calculate z

        pos_xyz[0] = tmp1; //Save calculated x from spherical
       	pos_xyz[1] = tmp2; //Save calculated y from spherical
        pos_xyz[2] = tmp3; //Save calculated z from spherical
}

/*____________________________________________________________________________
                ----Atomic Letter Code Selector Program----
                ----Author: Justin Smith               ----
		----Date Modified: 10/15/2014	       ----
		----Modified By:		       ----
This atoms class member function selects the proper letter code for the given
atomic number defined. The main purpose of this is simply for output, but
also, any unsupported atoms should not be included here. This is so that the
unsupported atom error is thrown and the program is stopped at this point with
the correct error message.
*/
string atoms::AtomLetter ()
{
	string Letter;
	switch (atomic_num)
	{
		case 1: {Letter = "H";break;}
		case 2: {Letter = "He";break;}
		case 3: {Letter = "Li";break;}
		case 4: {Letter = "Be";break;}
		case 5: {Letter = "B";break;}
		case 6: {Letter = "C";break;}
		case 7: {Letter = "N";break;}
		case 8: {Letter = "O";break;}
		case 9: {Letter = "F";break;}
		case 10: {Letter = "Ne";break;}
		default:
		{
		Letter = "error";
		break;
		}
	}
	return Letter;
}


text:
#ifndef WebKitAuthenticationDialog_h
#define WebKitAuthenticationDialog_h

#include "AuthenticationChallengeProxy.h"
#include "WebKitAuthenticationWidget.h"
#include <gtk/gtk.h>

G_BEGIN_DECLS

#define WEBKIT_TYPE_AUTHENTICATION_DIALOG            (webkit_authentication_dialog_get_type())
#define WEBKIT_AUTHENTICATION_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_AUTHENTICATION_DIALOG, WebKitAuthenticationDialog))
#define WEBKIT_IS_AUTHENTICATION_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_AUTHENTICATION_DIALOG))
#define WEBKIT_AUTHENTICATION_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_AUTHENTICATION_DIALOG, WebKitAuthenticationDialogClass))
#define WEBKIT_IS_AUTHENTICATION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_AUTHENTICATION_DIALOG))
#define WEBKIT_AUTHENTICATION_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_AUTHENTICATION_DIALOG, WebKitAuthenticationDialogClass))

typedef struct _WebKitAuthenticationDialog        WebKitAuthenticationDialog;
typedef struct _WebKitAuthenticationDialogClass   WebKitAuthenticationDialogClass;
typedef struct _WebKitAuthenticationDialogPrivate WebKitAuthenticationDialogPrivate;

struct _WebKitAuthenticationDialog {
    GtkEventBox parent;

    WebKitAuthenticationDialogPrivate* priv;
};

struct _WebKitAuthenticationDialogClass {
    GtkEventBoxClass parentClass;
};

GType webkit_authentication_dialog_get_type();
GtkWidget* webkitAuthenticationDialogNew(WebKit::AuthenticationChallengeProxy*, CredentialStorageMode);

G_END_DECLS

#endif // WebKitAuthenticationDialog_h


text:
layout: default
title: Résumé
home: passive
about: passive
resume: active
blog: passive
tags: passive
contact: passive
description: Current Résumé for Lewis Cawthorne, Software Developer
---

    Download Résumé

Lewis Cawthorne

    <address>
    168 King George Way

    Columbia SC 29210

    P: (803) 394-6337

    LLC@acm.org
    </address>

Software Developer currently acting as Technical Lead for
    Subrosource
    seeking programming opportunities in or near Raleigh, NC.

Degrees

Masters of Engineering, Computer Science, University of South
                Carolina, Columbia, SC, Dec 2014

               GPA: 3.5/4.0; Specialization: Information Security

BS, Computer Science, University of South Carolina, Columbia, SC, Aug 2011

               GPA: 4.0/4.0; Minor: Mathematics

AS, 4.0 High Honors, Midlands Technical College, Columbia, SC, May 2009

Professional Employment

Technical Lead, EXL, Jan 2015-present

Took an leading role in an agile group with seven developers acting
      within a larger corporate organization to provide software and services
      to insurance domain customers

Updated Subrosource application from Weblogic 10.3 to Weblogic 12
      and from Java 1.6 to Java 1.8

Maintained, extended, and helped secure an existing Java EE 5
      application on Oracle WebLogic Application Server and Java 1.6 backed
      by an Oracle 11g database

Performed security scans with HP Fortify software and patched
      found vulnerabilities

 Develop a new web application to provide insight to support
      technicians debugging general data import issues with JDK 8 and Java
      EE 7 technologies running on Glassfish 4.1 Application Server with a
      Vaadin GWT-based rich user interface accessing an Oracle 11g database
      and custom scripts to extract text log information

Researched and made recommendations on ways to ease development team
      growth pains by better incorporating automated unit, integration, and
      acceptance testing

Wrote, tested, and debugged a batch process based on preexisting
      procedural logic to on-board a new customer by cleaning, transforming,
      and importing 80,000 customer claim records which were split up to over
      half a million relational table entries; primarily handled through the
      creation and integration of new awk processing scripts, some
      modification of a C# account registration program, and PL/SQL
      customizations in the database to handle customer specific account logic

Teaching Assistant, University of South Carolina,
    Aug 2012 - Dec 2014

Fall 2014: Lecture Instructor for CSCE 212 - Intro to Computer
      Architecture (Assembly)

Summer 2014: Lecture Instructor for CSCE 146 - Data Structures Using
      Java (Java)

Spring 2014: Lecture Instructor for CSCE 212 - Intro to Computer
      Architecture (Assembly)

Fall 2013: Lecture Instructor and Lab TA for CSCE 101 - Intro to
      Computing (Java)

Spring 2013: Lecture Instructor for CSCE 204 - Program Design and
      Development (Visual Basic)

Fall 2012: Lab TA for CSCE 145 - Algorithmic Design (Java)

Research Assistant, Center for Information Assurance
    Engineering at USC, Aug 2011 - Dec 2014

Quantum Complexity Theory research advised by Dr. Stephen A.
      Fenner

Analyzed algorithms which require quantum computers and how problems
      solvable via quantum algorithms, such as factoring, differ in
      structure from classical problems

Studied quantum entanglement effects on classic two party game
      theory

Investigated mutually unbiased bases for secure quantum key
      distribution

Expanded a C program for web based analysis and graphing of lambda
      closure functions including a LaTeX based formula parser

REU Program Coordinator, Research Experience for
    Undergraduates at USC, Aug 2011 - Aug 2013

Coordinated summer housing and activities for 10 undergraduate
      participants

Guided participants through all steps of creating and submitting
      an academic paper

Offered proofreading and implementation advice on 10 papers from
      7 different subareas

Undergraduate Research Assistant, MLEG Lab at USC,
    Jun 2010 - Aug 2011

Created SMEE, the Sorting Motif Extraction Engine, a biomedical
      text analysis service using Python for Natural Language Processing
      and Django web framework

Linux System Administrator, EMR Technical Solutions,
    Feb 2010 - Jun 2010

Setup various server applications on three Linux servers

Managed security on servers, including detection / elimination
      of prior intrusion

Network Administrator, Wave Communications / Durocom /
    Volaris Online, June 1995 - Sept 2002

Lead the building of what quickly became a 3000-4000 customer
      Internet provider

Maintained 14 high volume servers running multiple operating
      systems

Participated in a 24-hour emergency response on call rotation

Supervised a team of 20-40 technical support representatives

Ultimately shared primary responsibility for a $10-million
      regional ISP with a co-administrator, which was acquired by a
      super-regional provider and then by Earthlink

Database Administrator, Doulos Productions,
    Apr 1992 - Nov 1996

Created and managed a 100,000 record relational database

Managed a VM386 based dumb terminal multiuser system

Technology Applications and Expertise

Specialized Skills

Java EE, EJB2, EJB3, JSP, JSTL, JSF, RichFaces, JTA, JPA,
        Layered Architectures, Agile Development, Information Security,
        User Testing, Full-stack Web Development, Version Control, Web Design

Markup/Programming

Java, Python/Django, JavaScript, JQuery, Ruby/Rails, XHTML, HTML5,
        CSS, CSS3,  XML, XSLT, Perl, Awk, PL/SQL, Shell Scripting

Applications

Eclipse, IntelliJ, Microsoft Office,
        HP Fortify Security Scanner, Google Drive, Vim, JQuery,
        Oracle 9i-11g,
        Selenium, Git, Subversion, WebLogic 10.3 - 12, Glassfish 4

OS/Environments

Mac, Linux, Unix, Ubuntu, Windows

Certifications

CNSS 4011, National Training Standard for INFOSEC
    Professionals

Awards

Presidential Graduate Fellowship, University of South
      Carolina, Aug 2012 - Apr 2014

Magellan Scholarship Winner, competitive research
      funding, Jan 2011 - Aug 2011

Outstanding Senior Award, University of South
      Carolina, Apr 2011

IBM Master the Mainframe Competition, winner Parts
      1 and 2, Dec 2010

ΥΠE Scholarship Winner, competitive scholarship,
      Aug 2010

Societies

ACM,
      Association for Computing Machinery

GCC, Gamecock Cybersecurity Club

      SLC, STARS Leadership Corps

ColaLUG,
      Columbia Linux Users Group

Upsilon Pi Epsilon
      (ΥΠE) and
      Phi Theta
      Kappa (ΦΘK) Honor Societies


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>com.example</groupId>
		<artifactId>my-project-foo-parent</artifactId>
		<version>1.0.0.BUILD-SNAPSHOT</version>
		<relativePath>..</relativePath>
	</parent>
	<artifactId>my-project-bar</artifactId>
	<version>1.0.0.BUILD-SNAPSHOT</version>
	<packaging>jar</packaging>
</project>


text:
package webim.dao.ibatis;

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

import org.apache.ibatis.session.SqlSession;

import webim.model.WebimEndpoint;
import webim.model.WebimMember;
import webim.model.WebimRoom;

/**
 * Webim临时讨论组数据访问对象.
 *
 * MySQL数据库表: <br>
 *
 * DROP TABLE IF EXISTS webim_rooms;
 * CREATE TABLE webim_rooms (
 *     `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
 *     `owner` varchar(40) NOT NULL,
 *     `name` varchar(40) NOT NULL,
 *     `nick` varchar(60) NOT NULL DEFAULT '',
 *     `topic` varchar(60) DEFAULT NULL,
 *     `url` varchar(100) DEFAULT '#',
 *     `created` datetime DEFAULT NULL,
 *     `updated` datetime DEFAULT NULL,
 *     PRIMARY KEY (`id`), UNIQUE KEY `webim_room_name` (`name`)
 * ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
 *
 * DROP TABLE IF EXISTS webim_members;
 * CREATE TABLE webim_members (
 *     `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
 *     `room` varchar(60) NOT NULL,
 *     `uid` varchar(40) NOT NULL,
 *     `nick` varchar(60) NOT NULL,
 *     `joined` datetime DEFAULT NULL,
 *     PRIMARY KEY (`id`),
 *     UNIQUE KEY `webim_member_room_uid` (`room`,`uid`)
 * ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
 *
 * DROP TABLE IF EXISTS webim_blocked;
 * CREATE TABLE webim_blocked (
 *     `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
 *     `room` varchar(60) NOT NULL,
 *     `uid` varchar(40) NOT NULL,
 *     `blocked` datetime DEFAULT NULL,
 *     PRIMARY KEY (`id`),
 *     UNIQUE KEY `webim_blocked_room_uid` (`uid`,`room`)
 * ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
 *
 *
 * @author Feng Lee <feng.lee@nextalk.im>
 * @since 5.7
 *
 */
//@Repository("webimRoomDao")
public class WebimRoomDao extends WebimDaoSupport {

	public WebimRoom getRoom(String id) {
		WebimRoom room = null;
		SqlSession session = sessionFactory.openSession();
		try {
			room = (WebimRoom)session.selectOne("RoomMapper.getRoomById", id);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			session.close();
		}
		return room;
	}

	public List<WebimRoom> getRoomsOfUser(String uid) {
		SqlSession session = sessionFactory.openSession();
		List<WebimRoom> rooms = new ArrayList<WebimRoom>();
		try {
			rooms = session.selectList("RoomMapper.getRoomsOfUser", uid);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			session.close();
		}
		return rooms;
	}

	public List<WebimRoom> getRoomsByIds(String uid, String[] ids) {
		SqlSession session = sessionFactory.openSession();
		List<WebimRoom> rooms = new ArrayList<WebimRoom>();
		try {
			rooms = session.selectList("RoomMapper.getRoomsByIds", ids);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			session.close();
		}
		return rooms;
	}

	public List<WebimMember> getMembersOfRoom(String roomId) {
		SqlSession session = sessionFactory.openSession();
		List<WebimMember> members = new ArrayList<WebimMember>();
		try {
			members = session.selectList("RoomMapper.getMembersOfRoom", roomId);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			session.close();
		}
		return members;
	}

	public void insertRoom(WebimRoom room) {
		SqlSession session = sessionFactory.openSession();
		try {
			session.insert("RoomMapper.insertRoom", room);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			session.close();
		}
	}

	public void inviteMembersToRoom(String roomId, List<WebimEndpoint> members) {
		SqlSession session = sessionFactory.openSession();
		try {
			for(WebimEndpoint e : members) {
				WebimMember m = new WebimMember(e.getId(), e.getNick());
				m.setRoom(roomId);
				session.insert("RoomMapper.insertMember", m);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			session.close();
		}
	}

	public void joinRoom(String roomId, WebimMember member) {
		member.setRoom(roomId);
		SqlSession session = sessionFactory.openSession();
		try {
			session.insert("RoomMapper.insertMember", member);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			session.close();
		}
	}

	public void leaveRoom(String roomId, String uid) {
		Map<String, String> params = new HashMap<String,String>();
		params.put("room", roomId);
		params.put("uid", uid);
		SqlSession session = sessionFactory.openSession();
		try {
			session.delete("RoomMapper.deleteMember", params);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			session.close();
		}
	}

	public void blockRoom(String roomId, String uid) {
		// TODO Auto-generated method stub
	}

	public void unblockRoom(String roomId, String uid) {
		// TODO Auto-generated method stub
	}

	public boolean isRoomBlocked(String roomId, String uid) {
		return false;
	}

	public void clearAll() {
		SqlSession session = sessionFactory.openSession();
		try {
			session.delete("RoomMapper.deleteMembers");
			session.delete("RoomMapper.deleteRooms");
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			session.close();
		}
	}

}


text:
import {Injectable} from '@angular/core';
// imports Angular "core" above and my stuff below
import {Todo} from './todo';

@Injectable()
export class TodoDataService {
  // Placeholder for last id so we can simulate
  // automatic incrementing of id's
  lastId: number = 0;

  // Placeholder for todo's
  todos: Todo[] = [];

  constructor() {
  }

  // Simulate POST /todos
  addTodo(todo: Todo): TodoDataService {
    if (!todo.id) {
      todo.id = ++this.lastId;
    }
    this.todos.push(todo);
    return this;
  }

  // Simulate DELETE /todos/:id
  deleteTodoById(id: number): TodoDataService {
    this.todos = this.todos
      .filter(todo => todo.id !== id);
    return this;
  }

  // Simulate PUT /todos/:id
  updateTodoById(id: number, values: Object = {}): Todo {
    let todo = this.getTodoById(id);
    if (!todo) {
      return null;
    }
    Object.assign(todo, values);
    return todo;
  }

  // Simulate GET /todos
  getAllTodos(): Todo[] {
    return this.todos;
  }

  // Simulate GET /todos/:id
  getTodoById(id: number): Todo {
    return this.todos
      .filter(todo => todo.id === id)
      .pop();
  }

  // Toggle todo complete
  toggleTodoComplete(todo: Todo){
    let updatedTodo = this.updateTodoById(todo.id, {
      complete: !todo.complete
    });
    return updatedTodo;
  }
}//TodoDataService class


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="TabStyleRadionButton">
        <attr name="pic" format="reference" />
    </declare-styleable>
</resources>


text:
<?php
namespace ChristianBudde\Part\view\page_element;
use ChristianBudde\Part\BackendSingletonContainer;
use ChristianBudde\Part\model\page\PageContentImpl;

/**
 * User: budde
 * Date: 25/05/13
 * Time: 21:55
 */

class FrontPageTextPageElementImpl extends PageElementImpl
{

    private $container;

    public function __construct(BackendSingletonContainer $container)
    {

        $this->container = $container;
    }

    /**
     * This will return content from page element as a string.
     * The format can be xml, xhtml, html etc. but return type must be string
     * @return string
     */
    public function generateContent()
    {
        parent::generateContent();
        $latest= null;
        $pageContent = new PageContentImpl($this->container, $this->container->getCurrentPageStrategyInstance()->getCurrentPage(), "mainContent");
        if(($latest = $pageContent->latestContent()) != null){
            return "
$latest
";
        }
        return "

Lorem Ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit. In at lobortis nibh. Nullam lobortis nunc sed iaculis fermentum. Donec convallis sapien non nunc rhoncus rhoncus. Nulla et lorem sed nibh varius dignissim. Nullam quis libero a risus volutpat feugiat in eget sem. Sed quis vehicula ipsum, et laoreet tellus. Suspendisse nec lectus sit amet massa tristique ultrices. Maecenas vitae est tortor. Mauris quis mollis arcu. Nam blandit dictum erat dignissim pulvinar. Cras nec vehicula risus. Etiam viverra quam orci, at convallis tortor tincidunt a. Duis mollis, diam sed vestibulum tempus, justo augue venenatis enim, eu sodales ipsum est sollicitudin ligula. Proin vel laoreet enim.

initLib.registerInitializer(new UserSettings.UserSettingsInitializer(initLib));
initLib.registerInitializer(new BackgroundPositionInitializer());
initLib.registerInitializer(new TopMenuInitializer());
initLib.registerInitializer(new LoginFormulaInitializer());
initLib.registerInitializer(new EditorInitializer());
initLib.setUp();

Nunc varius tellus tellus, sed semper ligula hendrerit id. Fusce placerat lectus posuere quam imperdiet accumsan. Suspendisse non lacinia tellus. Etiam lacinia ullamcorper consectetur. Mauris dapibus ligula ac odio porttitor tempor. Mauris accumsan hendrerit pellentesque. Praesent suscipit lectus sit amet adipiscing aliquam. Praesent venenatis cursus lorem ac pretium. Proin ultricies libero nec neque aliquam fringilla. Etiam sed condimentum eros, id vulputate dui. Nunc consectetur volutpat risus. Cras venenatis libero eget viverra pulvinar.

Phasellus aliquam

Phasellus aliquam orci ut scelerisque fringilla. Donec accumsan erat vehicula lectus ultrices lacinia. Vivamus eu orci feugiat tellus porttitor mollis ac eu nisi. Curabitur quis turpis id tortor scelerisque placerat posuere et lectus. Proin cursus mi eget dui pretium, quis imperdiet arcu ultricies. Donec at nibh enim. Maecenas suscipit euismod turpis ut venenatis. Sed tincidunt lacus urna, non sodales mi dapibus a. Nulla nec enim eu magna accumsan dapibus. Nulla eu tincidunt orci, eget ornare ante.

Nunc varius tellus tellus, sed semper ligula hendrerit id. Fusce placerat lectus posuere quam imperdiet accumsan. Suspendisse non lacinia tellus. Etiam lacinia ullamcorper consectetur. Mauris dapibus ligula ac odio porttitor tempor. Mauris accumsan hendrerit pellentesque. Praesent suscipit lectus sit amet adipiscing aliquam. Praesent venenatis cursus lorem ac pretium. Proin ultricies libero nec neque aliquam fringilla. Etiam sed condimentum eros, id vulputate dui. Nunc consectetur volutpat risus. Cras venenatis libero eget viverra pulvinar.

        ";
    }

}


text:
<!DOCTYPE html>

	<meta charset="utf-8">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />

	<title>graph Source: Scale.ts</title>

	<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">

	<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">

	graph

			<input type="text" id="searchBox" class="search-query typeahead" placeholder="Search">

INDEX

                            Namespaces2

                                        <?j

                                        	GraphPaper

                                        	GraphPaper.Shapes

                            Classes7

GraphPaper

Graph

Scale

Shapes

Expression

Label

Line

Point

Styles

                            Interfaces1

GraphPaper

Drawable

Source: Scale.ts

/**
 * @namespace GraphPaper
 */

module GraphPaper {
    export class Scale {

    	private graph: Graph;

    	private _minorXMin: number;
    	private _minorXMax: number;

        private _minorYMin: number;
        private _minorYMax: number;

        private _majorXMin: number;
        private _majorXMax: number;

        private _majorYMin: number;
        private _majorYMax: number;

    	private _minorXScale: number;
    	private _minorYScale: number;

        private _majorXScale: number;
        private _majorYScale: number;

        /**
         * Sets up the tick scaling for the graph
         *
         * @class GraphPaper.Scale
         * @classdesc This is the class used to determine the spacing between graph ticks
         *
         * @param {GraphPaper.Graph} graph The graph that you want to be scaled
         */

    	constructor(graph: Graph) {
    		this.graph = graph;
    		this.scale();
    	}

        /**
         * This creates the nice intervals and mins and maxes for the graph.
         * Adapted from <a href = "http://www.amazon.com/Graphics-Gems-Andrew-S-Glassner/dp/0122861663">Graphics Gems</a>
         *
         * @method GraphPaper.Scale#scale
         */

    	public scale() {

            var graph: Graph = this.graph;

            var xLength = this.makeNice(graph.xLength, false)[0] * Math.pow(10, this.makeNice(graph.xLength, false)[1]);
            var yLength = this.makeNice(graph.yLength, false)[0] * Math.pow(10, this.makeNice(graph.yLength, false)[1]);

            var xScale: Array<number> = this.makeNice(xLength / (graph.maxTicks - 1), true);
            var yScale: Array<number> = this.makeNice(yLength / (graph.maxTicks - 1), true);

            this._majorXScale = Number((xScale[0] * Math.pow(10, xScale[1])).toPrecision(1));
            this._majorYScale = Number((yScale[0] * Math.pow(10, yScale[1])).toPrecision(1));

            if (xScale[0] < 5) {
                this._minorXScale = 1 / 4 * this._majorXScale;
            } else {
                this._minorXScale = 1 / 5 * this._majorXScale;
            }

            if (yScale[0] < 5) {
                this._minorYScale = 1 / 4 * this._majorYScale;
            } else {
                this._minorYScale = 1 / 5 * this._majorYScale;
            }

            this._minorXScale = parseFloat(this._minorXScale.toPrecision(2));
            this._minorYScale = parseFloat(this._minorYScale.toPrecision(2));

            this._minorXMin = parseFloat((Math.floor(graph.xMin / this._minorXScale) * this._minorXScale).toPrecision(21));
            this._minorXMax = parseFloat((Math.ceil(graph.xMax / this._minorXScale) * this._minorXScale).toPrecision(21));

            this._majorXMin = parseFloat((Math.floor(graph.xMin / this._majorXScale) * this._majorXScale).toPrecision(21));
            this._majorXMax = parseFloat((Math.ceil(graph.xMax / this._majorXScale) * this._majorXScale).toPrecision(21));

            this._minorYMin = parseFloat((Math.floor(graph.yMin / this._minorYScale) * this._minorYScale).toPrecision(21));
            this._minorYMax = parseFloat((Math.ceil(graph.yMax / this._minorYScale) * this._minorYScale).toPrecision(21));

            this._majorYMin = parseFloat((Math.floor(graph.yMin / this._majorYScale) * this._majorYScale).toPrecision(21));
            this._majorYMax = parseFloat((Math.ceil(graph.yMax / this._majorYScale) * this._majorYScale).toPrecision(21));

        }

        /**
         * This rounds numbers to the format 1*10^n, 2*10^n, or 5*10^n
         * @method GraphPaper.Scale#makeNice
         *
         * @param {number} num The number to make nice
         * @param {round} boolean Whether to round up or down
         *
         *
         * @returns {Array<number>} The zeroth element is the base 10 mantissa and the second one is the exponent.
         * For example [5, 2] would be 5*10^2
         */

        public makeNice(num: number, round: boolean): Array<number> {
            var exponent: number = Math.floor(Math.log(num) / Math.log(10));
            var fraction: number = num / Math.pow(10, exponent);
            var niceFraction: number;

            if (round) {
                if (fraction < 1.5) {
                    niceFraction = 1;
                } else if (fraction < 3) {
                    niceFraction = 2;
                } else if (fraction < 7) {
                    niceFraction = 5;
                } else {
                    niceFraction = 10;
                }
            } else {
                if (fraction <= 1) {
                    niceFraction = 1;
                } else if (fraction <= 2) {
                    niceFraction = 2;
                } else if (fraction <= 5) {
                    niceFraction = 5;
                } else {
                    niceFraction = 10;
                }
            }

            return [niceFraction, exponent];

        }

        public get minorXScale() : number {
            return this._minorXScale;
        }

        public set minorXScale(v : number) {
            this._minorXScale = v;
        }

        public get majorXScale() : number {
            return this._majorXScale;
        }

        public set majorXScale(v : number) {
            this._majorXScale = v;
        }

        public get minorYScale() : number {
            return this._minorYScale;
        }

        public set minorYScale(v : number) {
            this._minorYScale = v;
        }

        public get majorYScale() : number {
            return this._majorYScale;
        }

        public set majorYScale(v : number) {
            this._majorYScale = v;
        }

        public get minorXMax() : number {
            return this._majorXMax;
        }

        public get minorXMin() : number {
            return this._majorXMin;
        }

        public get minorYMax() : number {
            return this._majorYMax;
        }

        public get minorYMin() : number {
            return this._majorYMin;
        }

        public get majorXMax() : number {
            return this._majorXMax;
        }

        public get majorXMin() : number {
            return this._majorXMin;
        }

        public get majorYMax() : number {
            return this._majorYMax;
        }

        public get majorYMin() : number {
            return this._majorYMin;
        }

    }

}

						graph Copyright © 2014 Amalan.

						Documentation generated by JSDoc 3.3.0-alpha9
						on Wed Jul 23 2014 15:23:18 GMT-0400 (EDT) using the TSDoc template.


text:
// BSD 2-Clause License

// Copyright(c) 2017, Arvie Delgado
// All rights reserved.

// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:

// * Redistributions of source code must retain the above copyright notice, this
//   list of conditions and the following disclaimer.

// * Redistributions in binary form must reproduce the above copyright notice,
//   this list of conditions and the following disclaimer in the documentation
//   and/or other materials provided with the distribution.

// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

using System;

namespace Roro
{
    internal enum WinElementType
    {
        Button = 50000,
        Calendar = 50001,
        CheckBox = 50002,
        ComboBox = 50003,
        TextBox = 50004, // Edit
        Hyperlink = 50005,
        Image = 50006,
        ListItem = 50007,
        List = 50008,
        Menu = 50009,
        MenuBar = 50010,
        MenuItem = 50011,
        ProgressBar = 50012,
        RadioButton = 50013,
        ScrollBar = 50014,
        Slider = 50015,
        Spinner = 50016,
        StatusBar = 50017,
        Tab = 50018,
        TabItem = 50019,
        Text = 50020,
        ToolBar = 50021,
        ToolTip = 50022,
        Tree = 50023,
        TreeItem = 50024,
        Custom = 50025,
        Group = 50026,
        Thumb = 50027,
        DataGrid = 50028,
        DataItem = 50029,
        Document = 50030,
        SplitButton = 50031,
        Window = 50032,
        Pane = 50033,
        Header = 50034,
        HeaderItem = 50035,
        Table = 50036,
        TitleBar = 50037,
        Separator = 50038,
        SemanticZoom = 50039,
        AppBar = 50040,
    }
}


text:
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;

namespace Microsoft.AspNetCore.Authorization;

/// <summary>
/// The default implementation of a policy provider,
/// which provides a <see cref="AuthorizationPolicy"/> for a particular name.
/// </summary>
public class DefaultAuthorizationPolicyProvider : IAuthorizationPolicyProvider
{
    private readonly AuthorizationOptions _options;
    private Task<AuthorizationPolicy>? _cachedDefaultPolicy;
    private Task<AuthorizationPolicy?>? _cachedFallbackPolicy;

    /// <summary>
    /// Creates a new instance of <see cref="DefaultAuthorizationPolicyProvider"/>.
    /// </summary>
    /// <param name="options">The options used to configure this instance.</param>
    public DefaultAuthorizationPolicyProvider(IOptions<AuthorizationOptions> options)
    {
        if (options == null)
        {
            throw new ArgumentNullException(nameof(options));
        }

        _options = options.Value;
    }

    /// <summary>
    /// Gets the default authorization policy.
    /// </summary>
    /// <returns>The default authorization policy.</returns>
    public Task<AuthorizationPolicy> GetDefaultPolicyAsync()
    {
        if (_cachedDefaultPolicy == null || _cachedDefaultPolicy.Result != _options.DefaultPolicy)
        {
            _cachedDefaultPolicy = Task.FromResult(_options.DefaultPolicy);
        }

        return _cachedDefaultPolicy;
    }

    /// <summary>
    /// Gets the fallback authorization policy.
    /// </summary>
    /// <returns>The fallback authorization policy.</returns>
    public Task<AuthorizationPolicy?> GetFallbackPolicyAsync()
    {
        if (_cachedFallbackPolicy == null || _cachedFallbackPolicy.Result != _options.FallbackPolicy)
        {
            _cachedFallbackPolicy = Task.FromResult(_options.FallbackPolicy);
        }

        return _cachedFallbackPolicy;
    }

    /// <summary>
    /// Gets a <see cref="AuthorizationPolicy"/> from the given <paramref name="policyName"/>
    /// </summary>
    /// <param name="policyName">The policy name to retrieve.</param>
    /// <returns>The named <see cref="AuthorizationPolicy"/>.</returns>
    public virtual Task<AuthorizationPolicy?> GetPolicyAsync(string policyName)
    {
        // MVC caches policies specifically for this class, so this method MUST return the same policy per
        // policyName for every request or it could allow undesired access. It also must return synchronously.
        // A change to either of these behaviors would require shipping a patch of MVC as well.
        return _options.GetPolicyTask(policyName);
    }

#if NETCOREAPP
    /// <summary>
    /// Determines if policies from this provider can be cached, which is true only for this type.
    /// </summary>
    public virtual bool AllowsCachingPolicies => GetType() == typeof(DefaultAuthorizationPolicyProvider);
#endif
}


text:
class ApplicationMailer < ActionMailer::Base
  default from: "info@upstagecommunity.com"
  layout 'mailer'
end


text:
- [ ] By placing an `X` in the preceding checkbox, I verify that I am a PayPal employee or
I have signed the [Contributor License Agreement](https://github.com/paypal/SeLion#contributing)

---


text:
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="label.password.confirm">Password confirmation</entry>
<entry key="page.title.edit">Edit ${fullName}</entry>
<entry key="label.lastName">Last name</entry>
<entry key="lastName.javax.validation.constraints.NotNull.message">Please provide the user's last name</entry>
<entry key="placeholder.mail">the user's eMail address</entry>
<entry key="lastName.javax.validation.constraints.Size.message.String">Last name name must be at least ${min} characters long</entry>
<entry key="confirmPassword.EqualPasswordInputValidator">Your passwords did not match</entry>
<entry key="label.userName">User name</entry>
<entry key="placeholder.password.confirm">the user's password again</entry>
<entry key="lastName.Required">Please provide the user's last name</entry>
<entry key="userName.javax.validation.constraints.NotNull.message">Please provide a username</entry>
<entry key="label.password">Password</entry>
<entry key="userName.javax.validation.constraints.Size.message.String">Username must be between ${min} and ${max} characters long</entry>
<entry key="password.PatternValidator">Your password does not meet the requirements</entry>
<entry key="label.firstName">First name</entry>
<entry key="mail.Required">Please provide an email address</entry>
<entry key="placeholder.lastName">the user's last name</entry>
<entry key="button.save">Save</entry>
<entry key="placeholder.userName">the user's user name</entry>
<entry key="help.password.twicetochange">Please populate both fields in order to set a new password.</entry>
<entry key="firstName.javax.validation.constraints.NotNull.message">Please provide the user's first name</entry>
<entry key="confirmPassword.Required">Please confirm the user's password</entry>
<entry key="placeholder.password">the user's password</entry>
<entry key="mail.javax.validation.constraints.NotNull.message">Please provide an email address</entry>
<entry key="userName.Required">Please provide a username</entry>
<entry key="mail.org.hibernate.validator.constraints.Email.message">Please provide a valid email address</entry>
<entry key="error.user.exists.userName">A user with the username ${userName} already exists!</entry>
<entry key="placeholder.firstName">the user's first name</entry>
<entry key="help.mail">Enter a valid email address. This will be the user's login.</entry>
<entry key="firstName.javax.validation.constraints.Size.message.String">First name name must be at least ${min} characters long</entry>
<entry key="help.userName"><![CDATA[This username will be part of the URL for the user's public profile (e.g. uqasar.eu/user/username).]]></entry>
<entry key="firstName.Required">Please provide the user's first name</entry>
<entry key="label.mail">eMail</entry>
<entry key="password.Required">Please provide a password</entry>
<entry key="help.password">Password must contain at least 1 digit and 1 lower case and 1 upper case letter, 1 symbol and must be between 6 and 256 characters long.</entry>
<entry key="userName.javax.validation.constraints.Pattern.message.String">Username must only contain lower and upper case letters and digits</entry>
<entry key="label.img">Profile image</entry>
<entry key="import.selectFile">Choose an image for the profile</entry>
<entry key="button.upload">Upload image</entry>
<entry key="button.picture.clear">Remove image</entry>
<entry key="mail.UniqueMailValidator">The eMail address you entered is already in use!</entry>
<entry key="userName.UniqueUsernameValidator">The username you entered is already in use!</entry>
<entry key="label.role">Role</entry>
<entry key="password.changed">Your password was changed successfully.</entry>
<entry key="label.gender">Gender</entry>
<entry key="label.company">Company</entry>
<entry key="label.birthday">Birthday</entry>
<entry key="label.birthday">Birthday</entry>
<entry key="label.tabs.profile">Profile</entry>
<entry key="label.tabs.picture">Picture</entry>
<entry key="label.tabs.skills">Skills</entry>
<entry key="label.age">{0} years old</entry>
<entry key="button.gravatar">Use Gravatar</entry>
</properties>


text:
/*
 * Do not modify this file. This file is generated from the ec2-2015-04-15.normal.json service model.
 */
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;

using Amazon.Runtime;
using Amazon.Runtime.Internal;

namespace Amazon.EC2.Model
{
    /// <summary>
    ///
    /// </summary>
    public partial class DescribeImagesResponse : AmazonWebServiceResponse
    {
        private List<Image> _images = new List<Image>();

        /// <summary>
        /// Gets and sets the property Images.
        /// <para>
        /// Information about one or more images.
        /// </para>
        /// </summary>
        public List<Image> Images
        {
            get { return this._images; }
            set { this._images = value; }
        }

        // Check to see if Images property is set
        internal bool IsSetImages()
        {
            return this._images != null && this._images.Count > 0;
        }

    }
}


text:
using System;
using System.Web.Mvc;

namespace MvcTest.Extensions
{
  public class ReferrerAttribute : ActionMethodSelectorAttribute
  {

    public bool CanNull { get; private set; }

    public ReferrerAttribute(bool canNull)
    {
      this.CanNull = canNull;
    }

    public override bool IsValidForRequest(ControllerContext controllerContext, System.Reflection.MethodInfo methodInfo)
    {
      var req = controllerContext.HttpContext.Request;
      var referrer = req.UrlReferrer;
      if (referrer == null) { return CanNull; }
      var refHost = referrer.Host;
      var currentHost = req.Url.Host;
      return refHost.Equals(currentHost, StringComparison.InvariantCultureIgnoreCase);
    }

  }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Traité Champ. , Atlas 2: 361 (1793)

#### Original name
Fungus porcinus Paulet

### Remarks
null


text:
#ifndef _IP6T_FRAG_H
#define _IP6T_FRAG_H
struct ip6t_frag
{
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 u_int32_t ids[2];
 u_int32_t hdrlen;
 u_int8_t flags;
 u_int8_t invflags;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
};
#define IP6T_FRAG_IDS 0x01
#define IP6T_FRAG_LEN 0x02
#define IP6T_FRAG_RES 0x04
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define IP6T_FRAG_FST 0x08
#define IP6T_FRAG_MF 0x10
#define IP6T_FRAG_NMF 0x20
#define IP6T_FRAG_INV_IDS 0x01
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define IP6T_FRAG_INV_LEN 0x02
#define IP6T_FRAG_INV_MASK 0x03
#endif


text:
@extends('core::app.layout')

@section('content')

            @include('point-manufacture::app.manufacture.point.machine._breadcrumb')

show

Manufacture | machine"

        @include('point-manufacture::app.manufacture.point.machine._menu')

Form

History

                            Code

{{$machine->code}}

                            name

{{$machine->name}}

                            notes

{{$machine->notes}}

                                Date
                                User
                                Key
                                Old Value
                                New Value

                            @foreach($histories as $history)

id}}">
                                    {{ \DateHelper::formatView($history->created_at, true) }}
                                    {{ $history->user->name }}
                                    {{ $history->key }}
                                    {{ $history->old_value }}
                                    {{ $history->new_value }}

                            @endforeach

                    id.'/edit')}}"
                       class="btn btn-effect-ripple btn-info"> edit
                    id}}, '{{url('manufacture/point/machine/delete')}}', '{{url('manufacture/point/machine')}}') "> delete

@stop


text:
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>

#include "runtime.h"
#include "go-alloc.h"
#include "go-assert.h"
#include "go-type.h"
#include "go-ffi.h"

#if defined(USE_LIBFFI) && FFI_GO_CLOSURES

/* The functions in this file are only called from reflect_call.  As
   reflect_call calls a libffi function, which will be compiled
   without -fsplit-stack, it will always run with a large stack.  */

static size_t go_results_size (const struct __go_func_type *)
  __attribute__ ((no_split_stack));
static void go_set_results (const struct __go_func_type *, unsigned char *,
			    void **)
  __attribute__ ((no_split_stack));

/* Get the total size required for the result parameters of a
   function.  */

static size_t
go_results_size (const struct __go_func_type *func)
{
  int count;
  const struct __go_type_descriptor **types;
  size_t off;
  size_t maxalign;
  int i;

  count = func->__out.__count;
  if (count == 0)
    return 0;

  types = (const struct __go_type_descriptor **) func->__out.__values;

  /* A single integer return value is always promoted to a full
     word.  */
  if (count == 1)
    {
      switch (types[0]->__code & GO_CODE_MASK)
	{
	case GO_BOOL:
	case GO_INT8:
	case GO_INT16:
	case GO_INT32:
	case GO_UINT8:
	case GO_UINT16:
	case GO_UINT32:
	case GO_INT:
	case GO_UINT:
	  return sizeof (ffi_arg);

	default:
	  break;
	}
    }

  off = 0;
  maxalign = 0;
  for (i = 0; i < count; ++i)
    {
      size_t align;

      align = types[i]->__field_align;
      if (align > maxalign)
	maxalign = align;
      off = (off + align - 1) & ~ (align - 1);
      off += types[i]->__size;
    }

  off = (off + maxalign - 1) & ~ (maxalign - 1);

  return off;
}

/* Copy the results of calling a function via FFI from CALL_RESULT
   into the addresses in RESULTS.  */

static void
go_set_results (const struct __go_func_type *func, unsigned char *call_result,
		void **results)
{
  int count;
  const struct __go_type_descriptor **types;
  size_t off;
  int i;

  count = func->__out.__count;
  if (count == 0)
    return;

  types = (const struct __go_type_descriptor **) func->__out.__values;

  /* A single integer return value is always promoted to a full
     word.  */
  if (count == 1)
    {
      switch (types[0]->__code & GO_CODE_MASK)
	{
	case GO_BOOL:
	case GO_INT8:
	case GO_INT16:
	case GO_INT32:
	case GO_UINT8:
	case GO_UINT16:
	case GO_UINT32:
	case GO_INT:
	case GO_UINT:
	  {
	    union
	    {
	      unsigned char buf[sizeof (ffi_arg)];
	      ffi_arg v;
	    } u;
	    ffi_arg v;

	    __builtin_memcpy (&u.buf, call_result, sizeof (ffi_arg));
	    v = u.v;

	    switch (types[0]->__size)
	      {
	      case 1:
		{
		  uint8_t b;

		  b = (uint8_t) v;
		  __builtin_memcpy (results[0], &b, 1);
		}
		break;

	      case 2:
		{
		  uint16_t s;

		  s = (uint16_t) v;
		  __builtin_memcpy (results[0], &s, 2);
		}
		break;

	      case 4:
		{
		  uint32_t w;

		  w = (uint32_t) v;
		  __builtin_memcpy (results[0], &w, 4);
		}
		break;

	      case 8:
		{
		  uint64_t d;

		  d = (uint64_t) v;
		  __builtin_memcpy (results[0], &d, 8);
		}
		break;

	      default:
		abort ();
	      }
	  }
	  return;

	default:
	  break;
	}
    }

  off = 0;
  for (i = 0; i < count; ++i)
    {
      size_t align;
      size_t size;

      align = types[i]->__field_align;
      size = types[i]->__size;
      off = (off + align - 1) & ~ (align - 1);
      __builtin_memcpy (results[i], call_result + off, size);
      off += size;
    }
}

/* Call a function.  The type of the function is FUNC_TYPE, and the
   closure is FUNC_VAL.  PARAMS is an array of parameter addresses.
   RESULTS is an array of result addresses.

   If IS_INTERFACE is true this is a call to an interface method and
   the first argument is the receiver, which is always a pointer.
   This argument, the receiver, is not described in FUNC_TYPE.

   If IS_METHOD is true this is a call to a method expression.  The
   first argument is the receiver.  It is described in FUNC_TYPE, but
   regardless of FUNC_TYPE, it is passed as a pointer.  */

void
reflect_call (const struct __go_func_type *func_type, FuncVal *func_val,
	      _Bool is_interface, _Bool is_method, void **params,
	      void **results)
{
  ffi_cif cif;
  unsigned char *call_result;

  __go_assert ((func_type->__common.__code & GO_CODE_MASK) == GO_FUNC);
  __go_func_to_cif (func_type, is_interface, is_method, &cif);

  call_result = (unsigned char *) malloc (go_results_size (func_type));

  ffi_call_go (&cif, func_val->fn, call_result, params, func_val);

  /* Some day we may need to free result values if RESULTS is
     NULL.  */
  if (results != NULL)
    go_set_results (func_type, call_result, results);

  free (call_result);
}

#else /* !defined(USE_LIBFFI) */

void
reflect_call (const struct __go_func_type *func_type __attribute__ ((unused)),
	      FuncVal *func_val __attribute__ ((unused)),
	      _Bool is_interface __attribute__ ((unused)),
	      _Bool is_method __attribute__ ((unused)),
	      void **params __attribute__ ((unused)),
	      void **results __attribute__ ((unused)))
{
  /* Without FFI there is nothing we can do.  */
  runtime_throw("libgo built without FFI does not support "
		"reflect.Call or runtime.SetFinalizer");
}

#endif /* !defined(USE_LIBFFI) */


text:
package nl.xillio.xill.plugins.jdbc;

import com.google.inject.*;
import com.google.inject.name.Named;
import nl.xillio.plugins.XillPlugin;
import nl.xillio.xill.api.construct.Construct;
import nl.xillio.xill.plugins.jdbc.constructs.*;
import nl.xillio.xill.plugins.jdbc.services.ConnectionFactory;
import nl.xillio.xill.plugins.jdbc.services.StatementSyntaxFactory;
import nl.xillio.xill.plugins.jdbc.services.StatementSyntaxFactoryImpl;

/**
 * This XillPlugin provides a base implementation for any jdbc driver.
 * By creating a subclass of this class you can access a database system from
 */
public abstract class JDBCXillPlugin extends XillPlugin {
    protected Injector injector;

    @Override
    public void loadConstructs() {
        Injector localInjector = injector.createChildInjector(new InternalConfig(getClass()));
        add(localInjector.getInstance(connectConstruct()));
        add(localInjector.getInstance(queryConstruct()));
        add(localInjector.getInstance(getObjectConstruct()));
        add(localInjector.getInstance(storeObjectConstruct()));
        add(localInjector.getInstance(escapeConstruct()));
    }

    private Class<? extends Construct> queryConstruct() {
        return QueryConstruct.class;
    }

    protected Class<? extends Construct> connectConstruct() {
        return ConnectConstruct.class;
    }

    protected Class<? extends Construct> getObjectConstruct() {
        return GetObjectConstruct.class;
    }

    protected Class<? extends Construct> storeObjectConstruct() {
        return StoreObjectConstruct.class;
    }

    protected Class<? extends Construct> escapeConstruct() {
        return EscapeConstruct.class;
    }

    protected Class<? extends StatementSyntaxFactory> selectStatementFactory() {
        return StatementSyntaxFactoryImpl.class;
    }

    protected abstract Class<? extends ConnectionFactory> connectionFactory();

    @Inject
    void setInjector(Injector injector) {
        this.injector = injector;
    }

    private class InternalConfig extends AbstractModule {

        private final Class pluginPackage;

        private InternalConfig(Class pluginPackage) {
            this.pluginPackage = pluginPackage;
        }

        @Override
        protected void configure() {
            bind(ConnectionFactory.class).to(connectionFactory()).asEagerSingleton();
            bind(StatementSyntaxFactory.class).to(selectStatementFactory());
        }

        @Provides
        @Named("docRoot")
        @Singleton
        String docRoot() {
            return "/" + pluginPackage.getPackage().getName().replace(".", "/") + "/constructs/";
        }
    }

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Fungsin, Takashima, Sugita, Artjariyasripong, Potacharoen, Tanticharoen & Nakase, J. gen. appl. Microbiol. , Tokyo 52(2): 76 (2006)

#### Original name
Bullera koratensis Fungsin, M. Takash., Sugita & Nakase

### Remarks
null


text:
<?php

final class DrydockAuthorizationPHIDType extends PhabricatorPHIDType {

  const TYPECONST = 'DRYA';

  public function getTypeName() {
    return pht('Drydock Authorization');
  }

  public function newObject() {
    return new DrydockAuthorization();
  }

  protected function buildQueryForObjects(
    PhabricatorObjectQuery $query,
    array $phids) {

    return id(new DrydockAuthorizationQuery())
      ->withPHIDs($phids);
  }

  public function loadHandles(
    PhabricatorHandleQuery $query,
    array $handles,
    array $objects) {

    foreach ($handles as $phid => $handle) {
      $authorization = $objects[$phid];
      $id = $authorization->getID();

      $handle->setName(pht('Drydock Authorization %d', $id));
      $handle->setURI("/drydock/authorization/{$id}/");
    }
  }

}


text:
package org.gradle.api.internal.artifacts;

import org.gradle.api.Describable;
import org.gradle.api.DomainObjectSet;
import org.gradle.api.artifacts.PublishArtifact;
import org.gradle.api.artifacts.PublishArtifactSet;
import org.gradle.api.file.FileCollection;
import org.gradle.api.internal.DelegatingDomainObjectSet;
import org.gradle.api.internal.file.FileCollectionFactory;
import org.gradle.api.internal.file.collections.MinimalFileSet;
import org.gradle.api.internal.tasks.AbstractTaskDependency;
import org.gradle.api.internal.tasks.TaskDependencyInternal;
import org.gradle.api.internal.tasks.TaskDependencyResolveContext;
import org.gradle.api.tasks.TaskDependency;
import org.gradle.internal.Describables;

import java.io.File;
import java.util.LinkedHashSet;
import java.util.Set;

public class DefaultPublishArtifactSet extends DelegatingDomainObjectSet<PublishArtifact> implements PublishArtifactSet {
    private final TaskDependencyInternal builtBy = new ArtifactsTaskDependency();
    private final FileCollection files;
    private final Describable displayName;

    public DefaultPublishArtifactSet(String displayName, DomainObjectSet<PublishArtifact> backingSet, FileCollectionFactory fileCollectionFactory) {
        this(Describables.of(displayName), backingSet, fileCollectionFactory);
    }

    public DefaultPublishArtifactSet(Describable displayName, DomainObjectSet<PublishArtifact> backingSet, FileCollectionFactory fileCollectionFactory) {
        super(backingSet);
        this.displayName = displayName;
        this.files = fileCollectionFactory.create(builtBy, new ArtifactsFileCollection());
    }

    @Override
    public String toString() {
        return displayName.getDisplayName();
    }

    @Override
    public FileCollection getFiles() {
        return files;
    }

    @Override
    public TaskDependency getBuildDependencies() {
        return builtBy;
    }

    private class ArtifactsFileCollection implements MinimalFileSet {
        @Override
        public String getDisplayName() {
            return displayName.getDisplayName();
        }

        @Override
        public Set<File> getFiles() {
            Set<File> files = new LinkedHashSet<>();
            for (PublishArtifact artifact : DefaultPublishArtifactSet.this) {
                files.add(artifact.getFile());
            }
            return files;
        }
    }

    private class ArtifactsTaskDependency extends AbstractTaskDependency {
        @Override
        public void visitDependencies(TaskDependencyResolveContext context) {
            for (PublishArtifact publishArtifact : DefaultPublishArtifactSet.this) {
                context.add(publishArtifact);
            }
        }
    }
}


text:
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { AlertDialogComponent } from './alert-dialog.component';

describe('AlertDialogComponent', () => {
  let component: AlertDialogComponent;
  let fixture: ComponentFixture<AlertDialogComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ AlertDialogComponent ]
    })
    .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(AlertDialogComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  // disable this test until I figure out a way to test
  xit('should be created', () => {
    expect(component).toBeTruthy();
  });
});


text:
VOLUME_HOME="/var/lib/mysql"

sed -ri -e "s/^upload_max_filesize.*/upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}/" \
    -e "s/^post_max_size.*/post_max_size = ${PHP_POST_MAX_SIZE}/" /etc/php5/apache2/php.ini
if [[ ! -d $VOLUME_HOME/mysql ]]; then
    echo "=> An empty or uninitialized MySQL volume is detected in $VOLUME_HOME"
    echo "=> Installing MySQL ..."
    mysql_install_db > /dev/null 2>&1
    echo "=> Done!"
    /create_mysql_admin_user.sh
else
    echo "=> Using an existing volume of MySQL"
fi

# If the application directory is empty, copy the sample site.
APPLICATION_HOME="/var/www/html"
if [ ! "$(ls -A $APPLICATION_HOME)" ]; then
    cp hello-world-lamp/*.* $APPLICATION_HOME
fi

exec supervisord -n


text:
#{title}

#{-text}


text:
<!DOCTYPE html>
<!--
Copyright (c) 2012 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<link rel="import" href="/core/trace_model/counter.html">
<link rel="import" href="/core/trace_model/slice.html">
<link rel="import" href="/core/trace_model/slice_group.html">
<link rel="import" href="/core/trace_model/stack_frame.html">
<link rel="import" href="/core/trace_model/thread_time_slice.html">

<script>
'use strict';

/**
 * @fileoverview Helper functions for use in tracing tests.
 */
tv.exportTo('tv.c.test_utils', function() {
  function newAsyncSlice(start, duration, startThread, endThread) {
    return newAsyncSliceNamed('a', start, duration, startThread, endThread);
  }

  function newAsyncSliceNamed(name, start, duration, startThread, endThread) {
    var asyncSliceConstructor =
        tv.c.trace_model.AsyncSlice.getConstructor('', name);

    var s = new asyncSliceConstructor('', name, 0, start);
    s.duration = duration;
    s.startThread = startThread;
    s.endThread = endThread;
    return s;
  }

  function newAsyncSliceEx(options) {
    if (options.start === undefined)
      throw new Error('Too little info');

    var title = options.title ? options.title : 'a';

    var colorId = options.colorId ? options.colorId : 0;

    var duration;
    if (options.duration !== undefined) {
      if (options.end !== undefined) throw new Error('TMI');
      duration = options.duration;
    } else if (options.end !== undefined) {
      if (options.duration !== undefined) throw new Error('TMI');
      duration = options.end - options.start;
    } else {
      throw new Error('Too little info');
    }

    var isTopLevel;
    if (options.isTopLevel !== undefined)
      isTopLevel = options.isTopLevel;
    else
      isTopLevel = false;

    var slice = new tv.c.trace_model.AsyncSlice(
        options.cat ? options.cat : 'cat',
        title,
        colorId,
        options.start,
        options.args ? options.args : {},
        duration, isTopLevel);

    if (options.startStackFrame)
      slice.startStackFrame = options.startStackFrame;
    if (options.endStackFrame)
      slice.endStackFrame = options.endStackFrame;
    if (options.important)
      slice.important = options.important;
    if (options.startThread)
      slice.startThread = options.startThread;
    if (options.endThread)
      slice.endThread = options.endThread;
    return slice;
  }

  function newCounter(parent) {
    return newCounterNamed(parent, 'a');
  }

  function newCounterNamed(parent, name) {
    var s = new tv.c.trace_model.Counter(parent, name, null, name);
    return s;
  }

  function newCounterCategory(parent, category, name) {
    var s = new tv.c.trace_model.Counter(parent, name, category, name);
    return s;
  }

  function newCounterSeries() {
    var s = new tv.c.trace_model.CounterSeries('a', 0);
    return s;
  }

  function newSlice(start, duration) {
    return newSliceNamed('a', start, duration);
  }

  function newSliceNamed(name, start, duration) {
    var s = new tv.c.trace_model.Slice('', name, 0, start, {}, duration);
    return s;
  }

  function newThreadSlice(thread, state, start, duration, opt_cpu) {
    var s = new tv.c.trace_model.ThreadTimeSlice(
        thread, state, 'cat', start, {}, duration);
    if (opt_cpu)
      s.cpuOnWhichThreadWasRunning = opt_cpu;
    return s;
  }

  function newSampleNamed(thread, sampleName, category, frameNames, start) {
    var model;
    if (thread.parent)
      model = thread.parent.model;
    else
      model = undefined;
    var sf = newStackTrace(model, category, frameNames);
    var s = new tv.c.trace_model.Sample(undefined, thread,
                                        sampleName, start,
                                        sf,
                                        1);
    return s;
  }

  function newSliceCategory(category, name, start, duration) {
    var s = new tv.c.trace_model.Slice(
        category, name, 0, start, {}, duration);
    return s;
  }

  function newSliceEx(options) {
    if (options.start === undefined)
      throw new Error('Too little info');

    var title = options.title ? options.title : 'a';

    var colorId = options.colorId ? options.colorId : 0;

    var duration;
    if (options.duration !== undefined) {
      if (options.end !== undefined) throw new Error('TMI');
      duration = options.duration;
    } else if (options.end !== undefined) {
      if (options.duration !== undefined) throw new Error('TMI');
      duration = options.end - options.start;
    } else {
      throw new Error('Too little info');
    }

    var cpuStart = options.cpuStart;
    var cpuDuration;
    if (options.cpuDuration !== undefined) {
      if (cpuStart !== undefined) throw new Error('Too little info');
      if (options.cpuEnd !== undefined) throw new Error('TMI');
      cpuDuration = options.cpuDuration;
    } else if (options.cpuEnd !== undefined) {
      if (cpuStart === undefined) throw new Error('Too little info');
      if (options.cpuDuration !== undefined) throw new Error('TMI');
      cpuDuration = options.cpuEnd - cpuStart;
    }

    var type;
    if (options.type)
      type = options.type;
    else
      type = tv.c.trace_model.Slice;

    var slice = new type(
        options.cat ? options.cat : 'cat',
        title,
        colorId,
        options.start,
        options.args ? options.args : {},
        duration,
        cpuStart, cpuDuration);

    return slice;
  }

  function newStackTrace(model, category, titles) {
    var frame = undefined;
    for (var i = 0; i < titles.length; i++) {
      frame = new tv.c.trace_model.StackFrame(frame, tv.b.GUID.allocate(),
                                                 category, titles[i], 7);
      if (model)
        model.addStackFrame(frame);
    }
    return frame;
  }

  function findSliceNamed(slices, name) {
    if (slices instanceof tv.c.trace_model.SliceGroup)
      slices = slices.slices;
    for (var i = 0; i < slices.length; i++)
      if (slices[i].title == name)
        return slices[i];
      return undefined;
  }

  function newModel(customizeModelCallback) {
    var io = new tv.c.ImportOptions();
    io.customizeModelCallback = customizeModelCallback;
    io.shiftWorldToZero = false;
    io.pruneEmptyContainers = false;
    return new tv.c.TraceModel([], io);
  }

  function newModelWithAuditor(customizeModelCallback, auditor) {
    var io = new tv.c.ImportOptions();
    io.customizeModelCallback = customizeModelCallback;
    io.shiftWorldToZero = false;
    io.pruneEmptyContainers = false;
    io.auditorConstructors = [auditor];
    return new tv.c.TraceModel([], io);
  }

  return {
    newAsyncSlice: newAsyncSlice,
    newAsyncSliceNamed: newAsyncSliceNamed,
    newAsyncSliceEx: newAsyncSliceEx,
    newCounter: newCounter,
    newCounterNamed: newCounterNamed,
    newCounterCategory: newCounterCategory,
    newCounterSeries: newCounterSeries,
    newSlice: newSlice,
    newThreadSlice: newThreadSlice,
    newSliceNamed: newSliceNamed,
    newSliceEx: newSliceEx,
    newSampleNamed: newSampleNamed,
    newSliceCategory: newSliceCategory,
    newStackTrace: newStackTrace,
    newModel: newModel,
    newModelWithAuditor: newModelWithAuditor,
    findSliceNamed: findSliceNamed
  };
});
</script>


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>Wisebadge- Future Home</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:400,300,100,100italic,300italic,400italic,700,700italic">
    <link rel="stylesheet" href="assets/css/bootstrap-232.min.css">
    <link rel="stylesheet" href="assets/css/font-awesome.min.css">
    <link rel="stylesheet" href="assets/css/buttons.css">

    <link rel="stylesheet" href="assets/css/launch.css">
    <link rel="stylesheet" href="assets/css/launch-media-queries.css">

    <link rel="shortcut icon" href="assets/ico/favicon.png">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">

        Home
        Subscribe
        About us
         Contact us

Wisebadge

                    We are working very hard on the new version of our site. It will bring a lot of new features. Stay tuned!

days

hours

minutes

seconds

Subscribe to our newsletter

Sign up now to our newsletter and you'll be one of the first to know when the site is ready:

                    <form action="http://squarespace.us7.list-manage.com/subscribe/post?u=098cd2e4116df4e0d29508f13&id=99934b76e4" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">

                            <input placeholder="Email address…" type="email" value="" name="EMAIL" class="required e-mail form-field-input" id="mce-EMAIL">

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

                                <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="push-button red" style="margin-bottom: 100px">

                    </form>