text:
\hypertarget{classEmSyRU}{\section{Em\-Sy\-R\-U Class Reference}
\label{classEmSyRU}\index{Em\-Sy\-R\-U@{Em\-Sy\-R\-U}}
}

Class for Emdedded System Remote \hyperlink{classUpdater}{Updater}.

{\ttfamily \#include $<$Em\-Sy\-R\-U.\-hpp$>$}

Collaboration diagram for Em\-Sy\-R\-U\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=194pt]{classEmSyRU__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item
\hyperlink{classEmSyRU_ac5d6a38500bc912eba862a14cfb0b1b2}{Em\-Sy\-R\-U} (string user, string dl\-U\-R\-L, string pw, string env=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em Ctor. \end{DoxyCompactList}\item
\hypertarget{classEmSyRU_abad85d79a8bd0176f4a7f95d1df2f03e}{\hyperlink{classEmSyRU_abad85d79a8bd0176f4a7f95d1df2f03e}{$\sim$\-Em\-Sy\-R\-U} ()}\label{classEmSyRU_abad85d79a8bd0176f4a7f95d1df2f03e}

\begin{DoxyCompactList}\small\item\em Dtor. \end{DoxyCompactList}\item
int \hyperlink{classEmSyRU_aeccfb365e5aac8a9b5fee2557645353d}{update} ()
\begin{DoxyCompactList}\small\item\em Starts the whole update process This Method uses the given url user and pw to download a jobfile extracting and scanning it and updates its packages. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item
static void \hyperlink{classEmSyRU_a2720ea250a00225d5640145fecc66ff2}{set\-Logger} (\hyperlink{classLogger}{Logger} \&log)
\begin{DoxyCompactList}\small\item\em Setter for logger. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item
\hypertarget{classEmSyRU_a63f349fb8a0000e9fec67de2cabfd216}{static \hyperlink{classLogger}{Logger} \hyperlink{classEmSyRU_a63f349fb8a0000e9fec67de2cabfd216}{log\-\_\-} = \hyperlink{classLogger}{Logger}()}\label{classEmSyRU_a63f349fb8a0000e9fec67de2cabfd216}

\begin{DoxyCompactList}\small\item\em \hyperlink{classLogger}{Logger} for tracking and generating report to upload. \end{DoxyCompactList}\end{DoxyCompactItemize}

\subsection{Detailed Description}
Class for Emdedded System Remote \hyperlink{classUpdater}{Updater}.

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classEmSyRU_ac5d6a38500bc912eba862a14cfb0b1b2}{\index{Em\-Sy\-R\-U@{Em\-Sy\-R\-U}!Em\-Sy\-R\-U@{Em\-Sy\-R\-U}}
\index{Em\-Sy\-R\-U@{Em\-Sy\-R\-U}!EmSyRU@{Em\-Sy\-R\-U}}
\subsubsection[{Em\-Sy\-R\-U}]{\setlength{\rightskip}{0pt plus 5cm}Em\-Sy\-R\-U\-::\-Em\-Sy\-R\-U (
\begin{DoxyParamCaption}
\item[{string}]{user, }
\item[{string}]{dl\-U\-R\-L, }
\item[{string}]{pw, }
\item[{string}]{env = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{classEmSyRU_ac5d6a38500bc912eba862a14cfb0b1b2}

Ctor.

\begin{DoxyParams}{Parameters}
{\em string} & with user name \\
\hline
{\em string} & with url \\
\hline
{\em string} & with password \\
\hline
{\em optional} & string with enviroment to extract files \\
\hline
\end{DoxyParams}

\subsection{Member Function Documentation}
\hypertarget{classEmSyRU_a2720ea250a00225d5640145fecc66ff2}{\index{Em\-Sy\-R\-U@{Em\-Sy\-R\-U}!set\-Logger@{set\-Logger}}
\index{set\-Logger@{set\-Logger}!EmSyRU@{Em\-Sy\-R\-U}}
\subsubsection[{set\-Logger}]{\setlength{\rightskip}{0pt plus 5cm}static void Em\-Sy\-R\-U\-::set\-Logger (
\begin{DoxyParamCaption}
\item[{{\bf Logger} \&}]{log}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{classEmSyRU_a2720ea250a00225d5640145fecc66ff2}

Setter for logger.

\begin{DoxyParams}{Parameters}
{\em \hyperlink{classLogger}{Logger}} & \\
\hline
\end{DoxyParams}
\hypertarget{classEmSyRU_aeccfb365e5aac8a9b5fee2557645353d}{\index{Em\-Sy\-R\-U@{Em\-Sy\-R\-U}!update@{update}}
\index{update@{update}!EmSyRU@{Em\-Sy\-R\-U}}
\subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}int Em\-Sy\-R\-U\-::update (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classEmSyRU_aeccfb365e5aac8a9b5fee2557645353d}

Starts the whole update process This Method uses the given url user and pw to download a jobfile extracting and scanning it and updates its packages.

\begin{DoxyReturn}{Returns}
int with succsess 1 or fail 0
\end{DoxyReturn}

The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item
include/\hyperlink{EmSyRU_8hpp}{Em\-Sy\-R\-U.\-hpp}\item
src/Em\-Sy\-R\-U.\-cpp\end{DoxyCompactItemize}


text:
<?php

namespace Instinct\Component\TypeAutoBoxing\Composite;

use Instinct\Component\TypeAutoBoxing\AutoBoxType;

/**
 * It used to enforce strong typing of the composite type.
 *
 * @author Alexandre Quercia <alquerci@email.com>
 *
 * @api
 */
abstract class Composite extends AutoBoxType
{
    /**
     * @return string
     */
    public function __toString()
    {
        return get_called_class();
    }

    /**
     * @param object $value
     *
     * @return boolean
     */
    protected function fromObject($value)
    {
        if ($value instanceof \Traversable) {
            $array = array();
            $array = iterator_to_array($value, true);

            return $this->fromArray($array);
        }

        return false;
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php
/**
 * Examples for how to use CFPropertyList with strings
 * Read a binary from a string PropertyList
 * @package plist
 * @subpackage plist.examples
 */

// just in case...
error_reporting( E_ALL );
ini_set( 'display_errors', 'on' );

/**
 * Require CFPropertyList
 */
require_once(dirname(__FILE__).'/../CFPropertyList.php');

/*
 * create a new CFPropertyList instance which loads the sample.plist on construct.
 * since we know it's an binary file, we can skip format-determination
 */
$content = file_get_contents(dirname(__FILE__).'/sample.binary.plist');
$plist = new CFPropertyList();
$plist->parseBinary($content);

/*
 * retrieve the array structure of sample.plist and dump to stdout
 */

echo '<pre>';
var_dump( $plist->toArray() );
echo '</pre>';

?>


text:
package com.shen.hso.adapter;

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

import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.BaseExpandableListAdapter;
import android.widget.TextView;

import com.shen.hso.entity.TreeNode;
import com.shen.hso.util.LogUtil;

public class TreeViewAdapter extends BaseExpandableListAdapter {

	private final String TAG = this.getClass().getSimpleName();

	public static final int ItemHeight = 48;
	public static final int PaddingLeft = 38;
	private int myPaddingLeft = 0;

	List<TreeNode> treeNodes = new ArrayList<TreeNode>();
	Context parentContext;

	public TreeViewAdapter(Context context, int myPaddingLeft) {
		parentContext = context;
		this.myPaddingLeft = myPaddingLeft;

	}

	public List<TreeNode> getTreeNode() {
		return treeNodes;
	}

	public void updateTreeNode(List<TreeNode> nodes) {
		treeNodes = nodes;
	}

	public void removeAll() {
		treeNodes.clear();
	}

	@Override
	public Object getChild(int groupPosition, int childPosition) {
		// TODO Auto-generated method stub
		return treeNodes.get(groupPosition).childs.get(childPosition);
	}

	@Override
	public long getChildId(int groupPosition, int childPosition) {
		// TODO Auto-generated method stub
		return childPosition;
	}

	static public TextView getTextView(Context context) {
		AbsListView.LayoutParams lp = new AbsListView.LayoutParams(
				ViewGroup.LayoutParams.FILL_PARENT, ItemHeight);
		TextView textView = new TextView(context);
		textView.setLayoutParams(lp);
		textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
		return textView;
	}

	@Override
	public View getChildView(int groupPosition, int childPosition,
			boolean isLastChild, View convertView, ViewGroup parent) {
		LogUtil.d(TAG, "group:" + groupPosition + "child:" + childPosition);
		TextView textView = getTextView(this.parentContext);
		textView.setText(getChild(groupPosition, childPosition).toString());
		textView.setPadding(myPaddingLeft + PaddingLeft, 0, 0, 0);
		return textView;
	}

	@Override
	public int getChildrenCount(int groupPosition) {
		// TODO Auto-generated method stub
		return treeNodes.get(groupPosition).childs.size();
	}

	@Override
	public Object getGroup(int groupPosition) {
		// TODO Auto-generated method stub
		return treeNodes.get(groupPosition).parent;
	}

	@Override
	public int getGroupCount() {
		// TODO Auto-generated method stub
		return treeNodes.size();
	}

	@Override
	public long getGroupId(int groupPosition) {
		// TODO Auto-generated method stub
		return groupPosition;
	}

	@Override
	public View getGroupView(int groupPosition, boolean isExpanded,
			View convertView, ViewGroup parent) {
		LogUtil.d(TAG, "group:" + groupPosition);
		TextView textView = getTextView(this.parentContext);
		textView.setText(getGroup(groupPosition).toString());
		textView.setPadding(myPaddingLeft + (PaddingLeft >> 1), 0, 0, 0);
		return textView;
	}

	@Override
	public boolean hasStableIds() {
		// TODO Auto-generated method stub
		return true;
	}

	@Override
	public boolean isChildSelectable(int groupPosition, int childPosition) {
		// TODO Auto-generated method stub
		return true;
	}

}


text:
var express = require('express');
var router = express.Router();

/* GET just to see if it is working. */
router.get('/', function (req, res) {
  res.send('Welcome to API v 0.0.1!');
});

module.exports = router;


text:
package com.adobe.testing.s3mock.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import java.util.ArrayList;
import java.util.List;

/**
 * Request to complete multipart upload.
 * API Reference
 */
@JsonRootName("CompleteMultipartUpload")
public class CompleteMultipartUpload {

  @JsonProperty("Part")
  @JacksonXmlElementWrapper(useWrapping = false)
  private List<CompletedPart> parts = new ArrayList<>();

  public void setPart(CompletedPart part) {
    this.parts.add(part);
  }

  public void setParts(List<CompletedPart> parts) {
    this.parts = parts;
  }

  public List<CompletedPart> getParts() {
    return parts;
  }

}


text:
title: The U.S. Constitution and Fascinating Facts about It
written_by:
available:
isbn: '9781891743153'
binding: Paperback
link_to_buy_page:
image_path: 'https://images.booksense.com/images/153/743/9781891743153.jpg'
link:
---

In The U.S. Constitution & Fascinating Facts About It you'll see the entire text of the Constitution, the Bill of Rights and the Declaration of Independence -- and much more You'll find interesting insights into the men who wrote the Constitution, how it was created, and how the Supreme Court has interpreted the Constitution in the two centuries since its creation.


text:
module REXML
  module Node
    include Gibbler::String
  end
end

class Hash
  # A depth-first look to find the deepest point in the Hash.
  # The top level Hash is counted in the total so the final
  # number is the depth of its children + 1. An example:
  #
  #     ahash = { :level1 => { :level2 => {} } }
  #     ahash.deepest_point  # => 3
  #
  def deepest_point(h=self, steps=0)
    if h.is_a?(Hash)
      steps += 1
      h.each_pair do |n,possible_h|
        ret = deepest_point(possible_h, steps)
        steps = ret if steps < ret
      end
    else
      return 0
    end
    steps
  end
end

class Symbol
  unless method_defined? :empty?
    def empty?
      self.to_s.empty?
    end
  end
end


text:
This website was created as a sort of "contact portal" for everyone to find me everywhere, as well as to describe me.

##To Do:
Everything lol


text:
*Common Data Model ETL Mapping Specification for Optum Extended SES & Extended DOD*

*CDM Version = 5.3.1, Clinformatics Version = v7.1*

*Authors: Qianli Ma, PhD; Erica Voss, MPH; Chris Knoll; Ajit Londhe, MPH; Clair Blacketer, MPH*

[Back to README](README.md)

---

# CDM Table: CARE_SITE

The *CARE_SITE* table contains a list of uniquely identified points of
care, or an individual clinical location within an organization. Each
*CARE_SITE* belongs to one *ORGANIZATION*.

Optum does not have clear care site information so this table will only
contain one row representing the fact that no care site information will
be captured.

**Destination Field**|**Source Field**|**Applied Rule**|**Comment**
:-----:|:-----:|:-----:|:-----:
CARE_SITE_ID|0| |
LOCATION_ID|0| |
ORGANIZATION_ID|0| |
PLACE_OF_SERVICE_CONCEPT_ID|0| |
CARE_SITE_SOURCE_VALUE| | |
PLACE_OF_SERVICE_SOURCE_VALUE| | |


text:
import { Namespace as NS } from 'xmpp-constants';

export default function (JXT) {

    let Utils = JXT.utils;

    let GeoLoc = JXT.define({
        name: 'geoloc',
        namespace: NS.GEOLOC,
        element: 'geoloc',
        fields: {
            accuracy: Utils.numberSub(NS.GEOLOC, 'accuracy', true),
            altitude: Utils.numberSub(NS.GEOLOC, 'alt', true),
            area: Utils.textSub(NS.GEOLOC, 'area'),
            heading: Utils.numberSub(NS.GEOLOC, 'bearing', true),
            bearing: Utils.numberSub(NS.GEOLOC, 'bearing', true),
            building: Utils.textSub(NS.GEOLOC, 'building'),
            country: Utils.textSub(NS.GEOLOC, 'country'),
            countrycode: Utils.textSub(NS.GEOLOC, 'countrycode'),
            datum: Utils.textSub(NS.GEOLOC, 'datum'),
            description: Utils.textSub(NS.GEOLOC, 'description'),
            error: Utils.numberSub(NS.GEOLOC, 'error', true),
            floor: Utils.textSub(NS.GEOLOC, 'floor'),
            latitude: Utils.numberSub(NS.GEOLOC, 'lat', true),
            locality: Utils.textSub(NS.GEOLOC, 'locality'),
            longitude: Utils.numberSub(NS.GEOLOC, 'lon', true),
            postalcode: Utils.textSub(NS.GEOLOC, 'postalcode'),
            region: Utils.textSub(NS.GEOLOC, 'region'),
            room: Utils.textSub(NS.GEOLOC, 'room'),
            speed: Utils.numberSub(NS.GEOLOC, 'speed', true),
            street: Utils.textSub(NS.GEOLOC, 'street'),
            text: Utils.textSub(NS.GEOLOC, 'text'),
            timestamp: Utils.dateSub(NS.GEOLOC, 'timestamp'),
            tzo: Utils.tzoSub(NS.GEOLOC, 'tzo'),
            uri: Utils.textSub(NS.GEOLOC, 'uri')
        }
    });

    JXT.extendPubsubItem(GeoLoc);
}


text:
import React from 'react';
import { shape, arrayOf, string, number, func } from 'prop-types';
import { injectState } from 'freactal';
import styled from 'styled-components';
import { mediaBreakpointDownSm } from 'styled-bootstrap-responsive-breakpoints';
import Emoji from '../../components/Emoji';
import Empty from '../../components/Empty';
import InfoText from '../../components/InfoText';
import patterns from '../../constants/patterns';

const PropTypes = {
  state: shape({
    emojis: arrayOf(
      shape({
        id: string.isRequired,
        skin: number.isRequired,
        key: number.isRequired,
      }),
    ).isRequired,
    selectedEmoji: number,
  }).isRequired,
  effects: shape({
    selectEmoji: func.isRequired,
  }).isRequired,
};

const DefaultProps = {
  selectedEmoji: null,
};

const Rows = styled.div`
  display: flex;
  flex-direction: column;
  align-self: center;
  padding: 1rem;
`;

const Row = styled.div`display: flex;`;

const StyledInfoText = styled(InfoText)`
  margin-bottom: 1rem;
`;

const ResponsivePointer = styled.span`
  &:before {
    content: "👉";
    display: inline;
  }

  ${mediaBreakpointDownSm`
    &:before {
      content: "👆";
      display: inline;
    }
  `};
`;

const renderEmojiRow = (
  { state: { emojis, selectedEmoji }, effects: { selectEmoji } },
  { range: [start, stop], pattern },
  rowId,
) => {
  const emoji = emojis.slice(start, stop);
  let emojiCounter = 0;

  return (
    <Row>
      {pattern.map((shouldRender, index) => {
        if (shouldRender && emojiCounter < emoji.length) {
          const toRender = (
            <Emoji
              selectedEmoji={selectedEmoji}
              selectEmoji={selectEmoji}
              emoji={emoji[emojiCounter]}
              key={`${rowId}-${emoji[emojiCounter].key}`}
            />
          );

          emojiCounter += 1;
          return toRender;
        }

        return <Empty key={`${rowId}-empty-${index}`} />; // eslint-disable-line
      })}
    </Row>
  );
};

renderEmojiRow.propTypes = PropTypes;
renderEmojiRow.defaultProps = DefaultProps;

export default injectState(state =>
  <Rows>
    {!state.state.selectedEmoji
      ? <StyledInfoText>
          Start by selecting an emoji{' '}
          <span role="img" aria-label="emoji-pointing-down">
            👇
          </span>
        </StyledInfoText>
      : <StyledInfoText>
          {' '}Select a new emoji <ResponsivePointer />
        </StyledInfoText>}
    {renderEmojiRow(state, { range: [0, 1], pattern: patterns[0] }, 'row-1')}
    {renderEmojiRow(state, { range: [1, 4], pattern: patterns[1] }, 'row-2')}
    {renderEmojiRow(state, { range: [4, 7], pattern: patterns[2] }, 'row-3')}
    {renderEmojiRow(state, { range: [7, 11], pattern: patterns[3] }, 'row-4')}
    {renderEmojiRow(state, { range: [11, 13], pattern: patterns[4] }, 'row-5')}
    {renderEmojiRow(state, { range: [13, 15], pattern: patterns[5] }, 'row-6')}
    {renderEmojiRow(state, { range: [15, 17], pattern: patterns[6] }, 'row-7')}
  </Rows>,
);


text:
import discord

from bot import i18n
from bot.commands.command import Command
from bot import sound

class SoundQueueCommand(Command):
    def requiresAdmin(self):
        return True

    def deleteCMDMsg(self):
        return True

    def command(self):
        return "snd_queue"

    async def do(self, client: discord.Client, message: discord.Message, args: list, config={}):
        if len(args) < 1:
            await client.send_message(message.channel, i18n.get_localized_str(message.server.id, "cmd_snd_queue_help"))
            return

        sound.add_queue(message.server.id, args[0])

        await client.send_message(message.channel, i18n.get_localized_str(message.server.id, "cmd_snd_queue", {
            "index": sound.queue[message.server.id].qsize()
        }))


text:
title: A test page
name: Bob
layout: lay
---
Hello {{ name }}!


text:
Documentation Instructions
==========================

Instructions
-------------

In this folder, please include a representative writing sample.

This is the meat of the application, as it will demonstrate your capabilities as a technical author.

Please include a basic how-to guide for accomplishing a daily task (brushing your teeth, making coffee, etc.)

Alternatively, you may submit a guide documenting an electronics project you have built. Include all relevant information needed for someone to replicate the project.

You may also include links to any previous publications you may have online.

Requirements
-------------

* Formatted in Markdown
* Images/diagrams that are attributed properly
* Enough details for a beginner to successfully accomplish the task or replicate the project

Additional points
------------------

* How-to guides will be read, not executed.
* Less is more (clear, concise information is the best)
* This must be your original work. Any partial contributions from others should be attributed.


text:
/* config.h.  Generated from config.h.in by configure.  */
/* config.h.in.  Generated from configure.ac by autoheader.  */

/* Define if you use half floats for qmer counting */
/* #undef HALF_FLOATS */

/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
   don't. */
#define HAVE_DECL_STRERROR_R 1

/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1

/* Define to 1 if you have the <execinfo.h> header file. */
#define HAVE_EXECINFO_H 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define if siginfo_t.si_int exists */
#define HAVE_SI_INT 1

/* Define if you have SSE */
/* #undef HAVE_SSE */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the `strerror_r' function. */
#define HAVE_STRERROR_R 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to the sub-directory in which libtool stores uninstalled libraries.
   */
#define LT_OBJDIR ".libs/"

/* Name of package */
#define PACKAGE "jellyfish"

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "gmarcais@umd.edu"

/* Define to the full name of this package. */
#define PACKAGE_NAME "jellyfish"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "jellyfish 1.1.4"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "jellyfish"

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.1.4"

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if strerror_r returns char *. */
/* #undef STRERROR_R_CHAR_P */

/* Version number of package */
#define VERSION "1.1.4"


text:
module Yoolk
  module Sandbox
    class Hour < Yoolk::Sandbox::Base
      attribute :hour,        String
      attribute :minute,      String

      def to_s
        "#{hour}:#{minute}"
      end
    end
  end
end


text:
package ${package};

import java.text.DateFormat;
import java.util.Date;
import java.util.TimeZone;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class HelloWorldEnglish implements HelloWorld{

	private static final Logger log = LoggerFactory.getLogger(HelloWorldEnglish.class);

	private String timeZone = "America/New_York";
	private String suffix = "Good day.";

	public HelloWorldEnglish() {
	}

	public String greet(String name) {
		Date today = new Date();
		DateFormat df = DateFormat.getDateTimeInstance();
		df.setTimeZone(TimeZone.getTimeZone(timeZone));
		String result = "Hello " + name + " time in " + timeZone + " is " + df.format(today) + ".  " + suffix;
		log.info(this.getClass().getName() + ".greet: " + result);
		return result;
	}

	public String getSuffix() {
		return suffix;
	}

	public void setSuffix(String suffix) {
		this.suffix = suffix;
	}

	public String getTimeZone() {
		return timeZone;
	}

	public void setTimeZone(String timeZone) {
		this.timeZone = timeZone;
	}

}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <title>FindRuby — CMake 3.7.2 Documentation</title>

    <link rel="stylesheet" href="../_static/cmake.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />

    <link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
    <link rel="top" title="CMake 3.7.2 Documentation" href="../index.html" />
    <link rel="up" title="cmake-modules(7)" href="../manual/cmake-modules.7.html" />
    <link rel="next" title="FindSDL_image" href="FindSDL_image.html" />
    <link rel="prev" title="FindRTI" href="FindRTI.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.7.2 Documentation »

cmake-modules(7) »

FindRuby¶

Find Ruby

This module finds if Ruby is installed and determines where the
include files and libraries are.  Ruby 1.8, 1.9, 2.0 and 2.1 are
supported.

The minimum required version of Ruby can be specified using the
standard syntax, e.g.  find_package(Ruby 1.8)

It also determines what the name of the library is.  This code sets
the following variables:

RUBY_EXECUTABLE

full path to the ruby binary

RUBY_INCLUDE_DIRS

include dirs to be used when using the ruby library

RUBY_LIBRARY

full path to the ruby library

RUBY_VERSION

the version of ruby which was found, e.g. “1.8.7”

RUBY_FOUND

set to true if ruby ws found successfully

Also:

RUBY_INCLUDE_PATH

same as RUBY_INCLUDE_DIRS, only provided for compatibility reasons, don’t use it

Previous topic

FindRTI

Next topic

FindSDL_image

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

    Enter search terms or a module, class or function name.

Navigation

          index

          next |

          previous |

    CMake »

    3.7.2 Documentation »

cmake-modules(7) »

        © Copyright 2000-2016 Kitware, Inc. and Contributors.
      Created using Sphinx 1.4a0+.


text:
// Copyright 2009 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @fileoverview provides a reusable Vimeo video UI component given a public
 * Vimeo video URL.
 *
 * goog.ui.media.Vimeo is actually a {@link goog.ui.ControlRenderer}, a
 * stateless class - that could/should be used as a Singleton with the static
 * method {@code goog.ui.media.Vimeo.getInstance} -, that knows how to render
 * video videos. It is designed to be used with a {@link goog.ui.Control},
 * which will actually control the media renderer and provide the
 * {@link goog.ui.Component} base. This design guarantees that all different
 * types of medias will behave alike but will look different.
 *
 * goog.ui.media.Vimeo expects vimeo video IDs on
 * {@code goog.ui.Control.getModel} as data models, and renders a flash object
 * that will show the contents of that video.
 *
 * Example of usage:
 *
 *

 *   var video = goog.ui.media.VimeoModel.newInstance('http://vimeo.com/30012');
 *   goog.ui.media.Vimeo.newControl(video).render();
 *

 *
 * Vimeo medias currently support the following states:
 *
 *

 *
 {@link goog.ui.Component.State.DISABLED}: shows 'flash not available'
 *
 {@link goog.ui.Component.State.HOVER}: mouse cursor is over the video
 *
 {@link goog.ui.Component.State.SELECTED}: flash video is shown
 *

 *
 * Which can be accessed by
 *

 *   video.setEnabled(true);
 *   video.setHighlighted(true);
 *   video.setSelected(true);
 *

 *
 * Requires flash to actually work.
 */

goog.provide('goog.ui.media.Vimeo');
goog.provide('goog.ui.media.VimeoModel');

goog.require('goog.html.uncheckedconversions');
goog.require('goog.string');
goog.require('goog.ui.media.FlashObject');
goog.require('goog.ui.media.Media');
goog.require('goog.ui.media.MediaModel');
goog.require('goog.ui.media.MediaRenderer');

/**
 * Subclasses a goog.ui.media.MediaRenderer to provide a Vimeo specific media
 * renderer.
 *
 * This class knows how to parse Vimeo URLs, and render the DOM structure
 * of vimeo video players. This class is meant to be used as a singleton static
 * stateless class, that takes {@code goog.ui.media.Media} instances and renders
 * it. It expects {@code goog.ui.media.Media.getModel} to return a well formed,
 * previously constructed, vimeoId {@see goog.ui.media.Vimeo.parseUrl}, which is
 * the data model this renderer will use to construct the DOM structure.
 * {@see goog.ui.media.Vimeo.newControl} for a example of constructing a control
 * with this renderer.
 *
 * This design is patterned after http://go/closure_control_subclassing
 *
 * It uses {@link goog.ui.media.FlashObject} to embed the flash object.
 *
 * @constructor
 * @extends {goog.ui.media.MediaRenderer}
 * @final
 */
goog.ui.media.Vimeo = function() {
  goog.ui.media.MediaRenderer.call(this);
};
goog.inherits(goog.ui.media.Vimeo, goog.ui.media.MediaRenderer);
goog.addSingletonGetter(goog.ui.media.Vimeo);

/**
 * Default CSS class to be applied to the root element of components rendered
 * by this renderer.
 *
 * @type {string}
 */
goog.ui.media.Vimeo.CSS_CLASS = goog.getCssName('goog-ui-media-vimeo');

/**
 * A static convenient method to construct a goog.ui.media.Media control out of
 * a Vimeo URL. It extracts the videoId information on the URL, sets it
 * as the data model goog.ui.media.Vimeo renderer uses, sets the states
 * supported by the renderer, and returns a Control that binds everything
 * together. This is what you should be using for constructing Vimeo videos,
 * except if you need more fine control over the configuration.
 *
 * @param {goog.ui.media.VimeoModel} dataModel A vimeo video URL.
 * @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper, used for
 *     document interaction.
 * @return {!goog.ui.media.Media} A Control binded to the Vimeo renderer.
 */
goog.ui.media.Vimeo.newControl = function(dataModel, opt_domHelper) {
  var control = new goog.ui.media.Media(
      dataModel, goog.ui.media.Vimeo.getInstance(), opt_domHelper);
  // vimeo videos don't have any thumbnail for now, so we show the
  // "selected" version of the UI at the start, which is the
  // flash player.
  control.setSelected(true);
  return control;
};

/**
 * Creates the initial DOM structure of the vimeo video, which is basically a
 * the flash object pointing to a vimeo video player.
 *
 * @param {goog.ui.Control} c The media control.
 * @return {!Element} The DOM structure that represents this control.
 * @override
 */
goog.ui.media.Vimeo.prototype.createDom = function(c) {
  var control = /** @type {goog.ui.media.Media} */ (c);
  var div = goog.ui.media.Vimeo.superClass_.createDom.call(this, control);

  var dataModel =
      /** @type {goog.ui.media.VimeoModel} */ (control.getDataModel());

  var flash = new goog.ui.media.FlashObject(
      dataModel.getPlayer().getTrustedResourceUrl(), control.getDomHelper());
  flash.render(div);

  return div;
};

/**
 * Returns the CSS class to be applied to the root element of components
 * rendered using this renderer.
 * @return {string} Renderer-specific CSS class.
 * @override
 */
goog.ui.media.Vimeo.prototype.getCssClass = function() {
  return goog.ui.media.Vimeo.CSS_CLASS;
};

/**
 * The {@code goog.ui.media.Vimeo} media data model. It stores a required
 * {@code videoId} field, sets the vimeo URL, and allows a few optional
 * parameters.
 *
 * @param {string} videoId The vimeo video id.
 * @param {string=} opt_caption An optional caption of the vimeo video.
 * @param {string=} opt_description An optional description of the vimeo video.
 * @param {boolean=} opt_autoplay Whether to autoplay video.
 * @constructor
 * @extends {goog.ui.media.MediaModel}
 * @final
 */
goog.ui.media.VimeoModel = function(
    videoId, opt_caption, opt_description, opt_autoplay) {
  goog.ui.media.MediaModel.call(
      this, goog.ui.media.VimeoModel.buildUrl(videoId), opt_caption,
      opt_description, goog.ui.media.MediaModel.MimeType.FLASH);

  /**
   * The Vimeo video id.
   * @type {string}
   * @private
   */
  this.videoId_ = videoId;

  this.setPlayer(
      new goog.ui.media.MediaModel.Player(
          goog.ui.media.VimeoModel.buildFlashUrl(videoId, opt_autoplay)));
};
goog.inherits(goog.ui.media.VimeoModel, goog.ui.media.MediaModel);

/**
 * Regular expression used to extract the vimeo video id out of vimeo URLs.
 *
 * Copied from http://go/markdownlite.js
 *
 * TODO(user): add support to https.
 *
 * @type {RegExp}
 * @private
 * @const
 */
goog.ui.media.VimeoModel.MATCHER_ =
    /https?:\/\/(?:www\.)?vimeo\.com\/(?:hd#)?([0-9]+)/i;

/**
 * Takes a {@code vimeoUrl} and extracts the video id.
 *
 * @param {string} vimeoUrl A vimeo video URL.
 * @param {string=} opt_caption An optional caption of the vimeo video.
 * @param {string=} opt_description An optional description of the vimeo video.
 * @param {boolean=} opt_autoplay Whether to autoplay video.
 * @return {!goog.ui.media.VimeoModel} The vimeo data model that represents this
 *     URL.
 * @throws exception in case the parsing fails
 */
goog.ui.media.VimeoModel.newInstance = function(
    vimeoUrl, opt_caption, opt_description, opt_autoplay) {
  if (goog.ui.media.VimeoModel.MATCHER_.test(vimeoUrl)) {
    var data = goog.ui.media.VimeoModel.MATCHER_.exec(vimeoUrl);
    return new goog.ui.media.VimeoModel(
        data[1], opt_caption, opt_description, opt_autoplay);
  }
  throw Error('failed to parse vimeo url: ' + vimeoUrl);
};

/**
 * The opposite of {@code goog.ui.media.Vimeo.parseUrl}: it takes a videoId
 * and returns a vimeo URL.
 *
 * @param {string} videoId The vimeo video ID.
 * @return {string} The vimeo URL.
 */
goog.ui.media.VimeoModel.buildUrl = function(videoId) {
  return 'http://vimeo.com/' + goog.string.urlEncode(videoId);
};

/**
 * Builds a flash url from the vimeo {@code videoId}.
 *
 * @param {string} videoId The vimeo video ID.
 * @param {boolean=} opt_autoplay Whether the flash movie should start playing
 *     as soon as it is shown, or if it should show a 'play' button.
 * @return {!goog.html.TrustedResourceUrl} The vimeo flash URL.
 */
goog.ui.media.VimeoModel.buildFlashUrl = function(videoId, opt_autoplay) {
  var autoplay = opt_autoplay ? '&autoplay=1' : '';
  return goog.html.uncheckedconversions.
      trustedResourceUrlFromStringKnownToSatisfyTypeContract(
          goog.string.Const.from('Fixed domain, encoded parameters.'),
          'http://vimeo.com/moogaloop.swf?clip_id=' +
              goog.string.urlEncode(videoId) +
              '&server=vimeo.com&show_title=1&show_byline=1&' +
              'show_portrait=0color=&fullscreen=1' + autoplay);
};

/**
 * Gets the Vimeo video id.
 * @return {string} The Vimeo video id.
 */
goog.ui.media.VimeoModel.prototype.getVideoId = function() {
  return this.videoId_;
};


text:
An [openaps](https://github.com/openaps/openaps) plugin for predicting glucose trends from historical input

[![Build Status](https://travis-ci.org/loudnate/openaps-predict.svg)](https://travis-ci.org/loudnate/openaps-predict)

## Disclaimer
This tool is highly experimental and intended for education, not intended for therapy.

## Getting started
### Installing from pypi

```bash
$ sudo easy_install openapscontrib.predict
```
### Installing from source for development
Clone the repository and link via setuptools:
```bash
$ python setup.py develop
```

### Adding to your openaps project
```bash
$ openaps vendor add openapscontrib.predict
$ openaps device add predict predict
```

## Usage
Use the device help menu to see available commands.
```bash
$ openaps use predict -h
usage: openaps-use predict [-h] USAGE ...

optional arguments:
  -h, --help  show this help message and exit

## Device predict:
  vendor openapscontrib.predict

  predict - tools for predicting glucose trends

  USAGE       Usage Details
    glucose   Predict glucose
```

Use the command help menu to see available arguments.
```bash
$ openaps use predict glucose -h
usage: openaps-use predict glucose [-h] [--settings [SETTINGS]]
                                   [--insulin-action-curve [{3,4,5,6}]]
                                   [--insulin-sensitivities INSULIN_SENSITIVITIES]
                                   [--carb-ratios CARB_RATIOS]
                                   [--basal-dosing-end [BASAL_DOSING_END]]
                                   normalized-history normalized-glucose

Predict glucose

positional arguments:
  pump-history          JSON-encoded pump history data file, normalized by
                        openapscontrib.mmhistorytools
  glucose               JSON-encoded glucose data file in
                        reverse-chronological order

optional arguments:
  -h, --help            show this help message and exit
  --settings [SETTINGS]
                        JSON-encoded pump settings file, optional if --idur is
                        set
  --insulin-action-curve [{3,4,5,6}], --idur [{3,4,5,6}]
                        Insulin action curve, optional if --settings is set
  --insulin-sensitivities INSULIN_SENSITIVITIES, --sensf INSULIN_SENSITIVITIES
                        JSON-encoded insulin sensitivities schedule file
  --carb-ratios CARB_RATIOS, --cratio CARB_RATIOS
                        JSON-encoded carb ratio schedule file
  --basal-dosing-end [BASAL_DOSING_END]
                        The timestamp at which temp basal dosing should be
                        assumed to end, as a JSON-encoded pump clock file
```

## Examples

Add a report flow to predict future glucose from pump history, with and without future basal dosing:
```
$ openaps report add predict_glucose.json JSON predict glucose \
        normalize_history.json \
		recent_glucose.json \
		--settings read_settings.json \
		--insulin-sensitivities read_insulin_sensitivies.json \
		--carb-ratios read_carb_ratios.json

$ openaps report add predict_glucose_without_future_basal.json JSON predict glucose \
        normalize_history.json \
		recent_glucose.json \
		--settings read_settings.json \
		--insulin-sensitivities read_insulin_sensitivies.json \
		--carb-ratios read_carb_ratios.json
		--basal-dosing-end read_clock.json
```

## Contributing
Contributions are welcome and encouraged in the form of bugs and pull requests.

### Testing

Unit tests can be run manually via setuptools. This is also handled by TravisCI after opening a pull request.

```bash
$ python setup.py test
```


text:
@class DYFloatingHeaderView;

@interface SampleListViewController : UITableViewController

@property(nonatomic, strong) DYFloatingHeaderView *headerView;

@end


text:
FROM mysql:5.7 as database

ENV MYSQL_DATABASE forpdi_db
ENV MYSQL_USER forpdi
ENV MYSQL_PASSWORD docker12345
ENV MYSQL_RANDOM_ROOT_PASSWORD yes

EXPOSE 3306


text:
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

// contant values
use app\models\general\GeneralLabel;
use app\models\general\GeneralMessage;

/* @var $this yii\web\View */
/* @var $model app\models\BorangAduanKaunseling */

//$this->title = $model->borang_aduan_kaunseling_id;
$this->title = GeneralLabel::viewTitle . ' ' . GeneralLabel::borang_aduan_atlet;
$this->params['breadcrumbs'][] = ['label' => GeneralLabel::borang_aduan_atlet, 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<?= Html::encode($this->title) ?>

        <?php if(isset(Yii::$app->user->identity->peranan_akses['MSN']['borang-aduan-kaunseling']['update'])): ?>
            <?= Html::a(GeneralLabel::update, ['update', 'id' => $model->borang_aduan_kaunseling_id], ['class' => 'btn btn-primary']) ?>
        <?php endif; ?>
        <?php if(isset(Yii::$app->user->identity->peranan_akses['MSN']['borang-aduan-kaunseling']['delete'])): ?>
            <?= Html::a(GeneralLabel::delete, ['delete', 'id' => $model->borang_aduan_kaunseling_id], [
                'class' => 'btn btn-danger',
                'data' => [
                    'confirm' => GeneralMessage::confirmDelete,
                    'method' => 'post',
                ],
            ]) ?>
        <?php endif; ?>

    <?= $this->render('_form', [
        'model' => $model,
        'readonly' => $readonly,
    ]) ?>

    <?php /*echo DetailView::widget([
        'model' => $model,
        'attributes' => [
            'borang_aduan_kaunseling_id',
            'nama_pengadu',
            'tarikh_aduan',
            'no_aduan',
            'status_aduan',
            'aduan_kategori',
            'penyataan_aduan',
            'tindakan_yang_telah_diambil',
            'dokumen_berkaitan_yang_dilampirkan',
            'bantuan_yang_anda_perlukan',
            'rujukan_aduan_kepada_cawangan_yang_berkaitan',
            'rujuk_aduan_kepada_atlet',
            'tiada_sebarang_tindakan',
            'maklumbalas_kepada_pengadu',
            'tindakan_susulan',
            'aduan_dimajukan_kepada_agensi_lain',
            'catatan',
        ],
    ]);*/ ?>


text:
/****************************************************************************
 * Included Files
 ****************************************************************************/

#include <nuttx/config.h>

/* Output debug info if stack dump is selected -- even if debug is not
 * selected.
 */

#ifdef CONFIG_ARCH_STACKDUMP
# undef  CONFIG_DEBUG
# undef  CONFIG_DEBUG_VERBOSE
# define CONFIG_DEBUG 1
# define CONFIG_DEBUG_VERBOSE 1
#endif

#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
#include <debug.h>

#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <nuttx/usb/usbdev_trace.h>

#include "chip/chip.h"
#include "up_arch.h"
#include "sched/sched.h"
#include "up_internal.h"

/****************************************************************************
 * Pre-processor Definitions
 ****************************************************************************/

/* USB trace dumping */

#ifndef CONFIG_USBDEV_TRACE
#  undef CONFIG_ARCH_USBDUMP
#endif

/****************************************************************************
 * Private Data
 ****************************************************************************/

/****************************************************************************
 * Private Functions
 ****************************************************************************/

/****************************************************************************
 * Name: _up_assert
 ****************************************************************************/

static void _up_assert(int errorcode) /* noreturn_function */
{
  /* Are we in an interrupt handler or the idle task? */

  if (up_interrupt_context() || ((FAR struct tcb_s*)g_readytorun.head)->pid == 0)
    {
       (void)irqsave();
        for (;;)
          {
#ifdef CONFIG_ARCH_LEDS
            board_led_on(LED_PANIC);
            up_mdelay(250);
            board_led_off(LED_PANIC);
            up_mdelay(250);
#endif
          }
    }
  else
    {
      exit(errorcode);
    }
}

/****************************************************************************
 * Name: assert_tracecallback
 ****************************************************************************/

#ifdef CONFIG_ARCH_USBDUMP
static int usbtrace_syslog(FAR const char *fmt, ...)
{
  va_list ap;
  int ret;

  /* Let vsyslog do the real work */

  va_start(ap, fmt);
  ret = lowvsyslog(LOG_INFO, fmt, ap);
  va_end(ap);
  return ret;
}

static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
{
  usbtrace_trprintf(FAR usbtrace_syslog, trace->event, FAR trace->value);
  return 0;
}
#endif

/****************************************************************************
 * Public Functions
 ****************************************************************************/

/****************************************************************************
 * Name: up_assert
 ****************************************************************************/

#ifdef CONFIG_HAVE_FILENAME
void up_assert(const uint8_t *filename, int lineno)
#else
void up_assert(void)
#endif
{
#if CONFIG_TASK_NAME_SIZE > 0
  struct tcb_s *rtcb = (struct tcb_s*)g_readytorun.head;
#endif

  board_led_on(LED_ASSERTION);

#ifdef CONFIG_HAVE_FILENAME
#if CONFIG_TASK_NAME_SIZE > 0
  lldbg("Assertion failed at file:%s line: %d task: %s\n",
        filename, lineno, rtcb->name);
#else
  lldbg("Assertion failed at file:%s line: %d\n",
        filename, lineno);
#endif
#else
#if CONFIG_TASK_NAME_SIZE > 0
  lldbg("Assertion failed: task: %s\n", rtcb->name);
#else
  lldbg("Assertion failed\n");
#endif
#endif

  up_stackdump();
  REGISTER_DUMP();

#ifdef CONFIG_ARCH_USBDUMP
  /* Dump USB trace data */

  (void)usbtrace_enumerate(assert_tracecallback, NULL);
#endif

  _up_assert(EXIT_FAILURE);
}


text:
package bett.blib.instagram;

import android.content.Context;
import android.os.AsyncTask;

import bett.blib.dialog.LoadingDialog;
import bett.blib.instagram.util.Cons;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONObject;
import org.json.JSONTokener;

import java.net.URL;
import java.util.ArrayList;
import java.util.List;

/**
 * Instragam main class.
 *
 * @author Lorensius W. L. T <lorenz@londatiga.net>
 *
 */
public class Instagram {
	private Context mContext;

	private InstagramDialog mDialog;
	private InstagramAuthListener mListener;
	private InstagramSession mSession;

	private String mClientId;
	private String mClientSecret;
	private String mRedirectUri;

	/**
	 * Instantiate new object of this class.
	 *
	 * @param context Context
	 * @param clientId Client id
	 * @param clientSecret Client secret
	 * @param redirectUri Redirect uri
	 */
	public Instagram(Context context, String clientId, String clientSecret, String redirectUri) {
		mContext		= context;

		mClientId		= clientId;
		mClientSecret	= clientSecret;
		mRedirectUri	= redirectUri;

		String authUrl	= Cons.AUTH_URL + "client_id=" + mClientId + "&redirect_uri=" + mRedirectUri + "&response_type=code";

		mSession		= new InstagramSession(context);

		mDialog 		= new InstagramDialog(context, authUrl, redirectUri, new InstagramDialog.InstagramDialogListener() {

			@Override
			public void onSuccess(String code) {
				retreiveAccessToken(code);
			}

			@Override
			public void onError(String error) {
				mListener.onError(error);
			}

			@Override
			public void onCancel() {
			mListener.onCancel();

			}
		});
	}

	/**
	 * Authorize user.
	 *
	 * @param listener Auth listner
	 */
	public void authorize(InstagramAuthListener listener) {
		mListener = listener;

//		mDialog.clearCache();
		mDialog.show();
	}

	/**
	 * Reset session.
	 */
	public void resetSession() {
		mSession.reset();

		//mDialog.clearCache();
	}

	/**
	 * Get session.
	 *
	 * @return Instagram session.
	 */
	public InstagramSession getSession() {
		return mSession;
	}

	/**
	 * Retreive access token.
	 *
	 * @param code
	 */
	private void retreiveAccessToken(String code) {
		new AccessTokenTask(code).execute();
	}

	public class AccessTokenTask extends AsyncTask<URL, Integer, Long> {
//		AlertDialog progressDlg;
		InstagramUser user;
		String code;

		public AccessTokenTask(String code) {
			this.code		= code;

//			progressDlg = new AlertDialog.Builder(mContext).create();
////			progressDlg.setMessage("Processing. Please wait...");
////			progressDlg.setCancelable(false);
////			progressDlg.setCanceledOnTouchOutside(false);
//
//			LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
//			View layout = inflater.inflate(R.layout.dialog_processing, null);
//
//			progressDlg.setView(layout);
////			progressDialog.setMessage(message);
//			progressDlg.setCancelable(false);
//			progressDlg.setCanceledOnTouchOutside(false);
//			progressDlg.show();
//
//			WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
//			lp.copyFrom(progressDlg.getWindow().getAttributes());
//			lp.width = 150;
//			lp.height = 150;
//			progressDlg.getWindow().setAttributes(lp);
			LoadingDialog.show(mContext);
		}

		protected void onCancelled() {
//			progressDlg.cancel();
			LoadingDialog.close();
		}

    	protected void onPreExecute() {
//    		progressDlg.show();
			LoadingDialog.show(mContext);
    	}

        protected Long doInBackground(URL... urls) {
            long result = 0;

            try {
    			List<NameValuePair> params = new ArrayList<NameValuePair>(5);

    			params.add(new BasicNameValuePair("client_id", 		mClientId));
    			params.add(new BasicNameValuePair("client_secret",  mClientSecret));
    			params.add(new BasicNameValuePair("grant_type", 	"authorization_code"));
    			params.add(new BasicNameValuePair("redirect_uri", 	mRedirectUri));
    			params.add(new BasicNameValuePair("code", 			code));

    			InstagramRequest request	= new InstagramRequest();
    			String response				= request.post(Cons.ACCESS_TOKEN_URL, params);

    			if (!response.equals("")) {
    				JSONObject jsonObj 	= (JSONObject) new JSONTokener(response).nextValue();
    				JSONObject jsonUser	= jsonObj.getJSONObject("user");

    				user				= new InstagramUser();

    				user.accessToken	= jsonObj.getString("access_token");

    				user.id				= jsonUser.getString("id");
    				user.username		= jsonUser.getString("username");
    				user.fullName		= jsonUser.getString("full_name");
    				user.profilPicture	= jsonUser.getString("profile_picture");
    			}
    		} catch (Exception e) {
    			e.printStackTrace();
    		}

            return result;
        }

        protected void onProgressUpdate(Integer... progress) {
        }

        protected void onPostExecute(Long result) {
//        	progressDlg.dismiss();
			LoadingDialog.close();
        	if (user != null) {
        		mSession.store(user);

        		mListener.onSuccess(user);
        	} else {
        		mListener.onError("Failed to get access token");
        	}
        }
    }

	public interface InstagramAuthListener {
		public abstract void onSuccess(InstagramUser user);
		public abstract void onError(String error);
		public abstract void onCancel();
	}
}


text:
clean:
	@rm -rf ./node_modules/.bin
	@rm -rf ./node_modules/*

build: clean node

develop:
	@nix-shell dispatcher.nix --argstr action env --command "nw ."

test:
	@nix-shell dispatcher.nix --argstr action env --command "cd ./src && ../node_modules/.bin/mocha --reporter list"

bower: bower.json
	@rm -rf ./bower_components/*
	nix-shell dispatcher.nix --argstr action env --command "./node_modules/bower/bin/bower install"

node: package.json
	nix-shell dispatcher.nix --argstr action env --command "npm install"
	nix-shell dispatcher.nix --argstr action env --command "npm install bower"

generate-node: package.json
	rm node.nix
	rm default.nix
	nix-shell dispatcher.nix --argstr action env --command "npm2nix package.json node.nix"

just-run-it:
	`nix-build dispatcher.nix --argstr action package --no-out-link`/bin/nixui

package:
	nix-env -f ./dispatcher.nix -i --argstr action package

.PHONY: test develop build clean just-run-it


text:
<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
    <filter>
        <filter-name>DatastoreFilter</filter-name>
        <filter-class>org.slim3.datastore.DatastoreFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>DatastoreFilter</filter-name>
        <url-pattern>/yanitime/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
    </filter-mapping>

    <servlet>
        <servlet-name>restServlet</servlet-name>
        <servlet-class>net.arnx.jsonic.web.RESTServlet</servlet-class>
        <init-param>
            <param-name>config</param-name>
            <param-value>
                {
                    "debug": true,
                    "mappings": {
                        "/yanitime/{class}":"yanitime4u.yanitime.controller.${class}Controller",
                        "/yanitime/{class}/{id:[0-9]+}":{
                            "target": "yanitime4u.yanitime.controller.${class}Controller",
                            "method": {"GET": "findById"},
                            "verb": [ "GET" ]
                        }
                    }
                }
            </param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>restServlet</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
</web-app>


text:
//
//  LDPUIGlobalCtrl.m
//  CommonJSAPI
//
//  Created by 庞辉 on 14-10-16.
//  Copyright (c) 2014年 庞辉. All rights reserved.
//

#import "LDPUIGlobalCtrl.h"
#import "LDPBaseWebViewCrtl.h"

#define TAG_ACTIONSHEET 987000002
#define NOTI_ACTIONSHEET @"LDPlugin_ActionSheet"

@interface LDPUIGlobalCtrl () <UIActionSheetDelegate> {
}

@end

@implementation LDPUIGlobalCtrl

/*
 *@func  弹出ActionSheet
 *@param tilte  ActionSheet标题
 *@param cancel 指定取消按钮的标题
 *@param items  选项里表、字符串
 *
 *@return type 0: 点击普通item 1:取消按钮或空白区域
 *@return index 点击item的下标,从0开始
 */
- (void)showActionSheet:(LDJSInvokedUrlCommand *)command
{
    NSString *title = [command jsonParamForkey:@"title"];
    NSString *cancel = [command jsonParamForkey:@"cancel"];
    NSString *close = [command jsonParamForkey:@"close"];
    NSString *onclick = [command jsonParamForkey:@"onclick"];
    NSArray *items = [command jsonParamForkey:@"items"];

    //设置回调函数并存储
    NSString *callbackID = command.callbackId;
    if (onclick && ![onclick isEqualToString:@""]) {
        callbackID = onclick;
    }
    [[NSUserDefaults standardUserDefaults] setObject:callbackID forKey:NOTI_ACTIONSHEET];
    [[NSUserDefaults standardUserDefaults] synchronize];

    UIActionSheet *actionSheet = [[UIActionSheet alloc]
                 initWithTitle:title
                      delegate:self
             cancelButtonTitle:(cancel && ![cancel isEqualToString:@""] ? cancel : @"取消")
        destructiveButtonTitle:(close && ![close isEqualToString:@""] ? close : @"确定")
             otherButtonTitles:nil, nil];
    if (items && items.count > 0) {
        for (int i = 0; i < items.count; i++) {
            [actionSheet addButtonWithTitle:[items objectAtIndex:i]];
        }
    }
    actionSheet.tag = TAG_ACTIONSHEET;
    actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;
    [actionSheet showInView:self.viewController.view];
}

// Called when a button is clicked. The view will be automatically dismissed after this call returns
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
    if (actionSheet.tag == TAG_ACTIONSHEET) {
        int type = buttonIndex <= 1 ? 0 : 1;
        long index = buttonIndex <= 1 ? -1 : buttonIndex - 2;
        NSString *callBackId =
            [[NSUserDefaults standardUserDefaults] objectForKey:NOTI_ACTIONSHEET];
        [[NSUserDefaults standardUserDefaults] removeObjectForKey:NOTI_ACTIONSHEET];
        [[NSUserDefaults standardUserDefaults] synchronize];
        LDJSPluginResult *result = [LDJSPluginResult
               resultWithStatus:LDJSCommandStatus_OK
            messageAsDictionary:[NSDictionary dictionaryWithObjectsAndKeys:
                                                  [NSNumber numberWithInt:type], @"type",
                                                  [NSNumber numberWithLong:index], @"index", nil]];
        if (callBackId && ![callBackId isEqualToString:@""]) {
            [self.commandDelegate sendPluginResult:result callbackId:callBackId];
        }
    }
}

/*
 *@func  查询页面的可见性: 当当前可见view不是本页面,或应用退到后台时,返回false
 *
 *@return result bool
 */
- (void)pageVisibility:(LDJSInvokedUrlCommand *)command
{
    BOOL hidden = self.viewController.view.hidden;
    LDJSPluginResult *result =
        [LDJSPluginResult resultWithStatus:LDJSCommandStatus_OK messageAsBool:hidden ? NO : YES];
    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}

/*
 *@func  设置webview被关闭前的回调,设置回调后将会替代原来的行为
 */
- (void)setOnCloseHandler:(LDJSInvokedUrlCommand *)command
{
    [self.viewController.navigationController popViewControllerAnimated:YES];
}

/*
 *@func  弹出文本的toast提示,2s后消失
 *@param text 提示的文本内容
 */
- (void)showTips:(LDJSInvokedUrlCommand *)command
{
}

/*
 *@func  配置webview的行为
 *@param swipeBack 1支持优化关闭手势;
 *@param actionButton 1显示右上角按钮
 *@param navBgColor navigation背景颜色
 *@param navTextColor navigation文字颜色
 *@param keyboardDisplayRequiresUserAction 设置为true允许js不经用户触发谈起键盘
 */
- (void)setWebViewBehavior:(LDJSInvokedUrlCommand *)command
{
}

/*
 *@func  唤起分享面板
 */
- (void)showShareMenu:(LDJSInvokedUrlCommand *)command
{
}

/*
 *@func  关闭相邻的webview
 *@param mode   关闭模式 0:关闭所有相邻,1:关闭当前webview之上的所有webview
 *2:关闭当前之下的所有相邻webview
 *@param exclude 是否不关闭当前webview
 */
- (void)closeWebViews:(LDJSInvokedUrlCommand *)command
{
    // BOOL exclude = [[command jsonParamForkey:@"exclude"] boolValue];
    // int mode = [[command jsonParamForkey:@"mode"] intValue];
    while (self.webView.canGoBack) {
        [self.webView goBack];
    }
}

@end


text:
package control_work_1;

public class PrinterSpecial_Composition implements IPrinter {

    IPrinter p = new PrinterDefault();

    @Override
    public void print(String data, IPrinter ignore) {
        this.p.print("(" + data + ")", this);
    }

    @Override
    public void print(char data, IPrinter p) {
        this.p.print(data, this);
    }
}


text:
module Main (main) where
import           Control.Monad ( void, join )
import qualified Data.Text as T
import           Text.Show.Pretty ( pPrint )
import           Network.Connection
import           System.Process ( readProcess )

import           Network.Mattermost

import           Config
import           LocalConfig -- You will need to define a function:
                             -- getConfig :: IO Config
                             -- See Config.hs

main :: IO ()
main = do
  config <- getConfig -- see LocalConfig import
  ctx    <- initConnectionContext
  let cd = mkConnectionData (configHostname config)
                            (fromIntegral (configPort config))
                            ctx
  let login = Login { username = configUsername config
                    , password = configPassword config
                    }

  (session, mmUser) <- join (hoistE <$> mmLogin cd login)
  putStrLn "Authenticated as: "
  pPrint mmUser
  i <- mmGetInitialLoad session
  pPrint $ initialLoadTeams i


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

import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;

/**
 *

 * Represents the input for GetShardIterator.
 *

 */
public class GetShardIteratorRequest extends AmazonWebServiceRequest implements
        Serializable, Cloneable {

    /**
     *

     * The name of the stream.
     *

     */
    private String streamName;
    /**
     *

     * The shard ID of the shard to get the iterator for.
     *

     */
    private String shardId;
    /**
     *

     * Determines how the shard iterator is used to start reading data records
     * from the shard.
     *

     *

     * The following are the valid shard iterator types:
     *

     *

     *
AT_SEQUENCE_NUMBER - Start reading exactly from the position denoted
     * by a specific sequence number.

     *
AFTER_SEQUENCE_NUMBER - Start reading right after the position
     * denoted by a specific sequence number.

     *
TRIM_HORIZON - Start reading at the last untrimmed record in the
     * shard in the system, which is the oldest data record in the shard.

     *
LATEST - Start reading just after the most recent record in the
     * shard, so that you always read the most recent data in the shard.

     *

     */
    private String shardIteratorType;
    /**
     *

     * The sequence number of the data record in the shard from which to start
     * reading from.
     *

     */
    private String startingSequenceNumber;

    /**
     *

     * The name of the stream.
     *

     *
     * @param streamName
     *        The name of the stream.
     */
    public void setStreamName(String streamName) {
        this.streamName = streamName;
    }

    /**
     *

     * The name of the stream.
     *

     *
     * @return The name of the stream.
     */
    public String getStreamName() {
        return this.streamName;
    }

    /**
     *

     * The name of the stream.
     *

     *
     * @param streamName
     *        The name of the stream.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public GetShardIteratorRequest withStreamName(String streamName) {
        setStreamName(streamName);
        return this;
    }

    /**
     *

     * The shard ID of the shard to get the iterator for.
     *

     *
     * @param shardId
     *        The shard ID of the shard to get the iterator for.
     */
    public void setShardId(String shardId) {
        this.shardId = shardId;
    }

    /**
     *

     * The shard ID of the shard to get the iterator for.
     *

     *
     * @return The shard ID of the shard to get the iterator for.
     */
    public String getShardId() {
        return this.shardId;
    }

    /**
     *

     * The shard ID of the shard to get the iterator for.
     *

     *
     * @param shardId
     *        The shard ID of the shard to get the iterator for.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public GetShardIteratorRequest withShardId(String shardId) {
        setShardId(shardId);
        return this;
    }

    /**
     *

     * Determines how the shard iterator is used to start reading data records
     * from the shard.
     *

     *

     * The following are the valid shard iterator types:
     *

     *

     *
AT_SEQUENCE_NUMBER - Start reading exactly from the position denoted
     * by a specific sequence number.

     *
AFTER_SEQUENCE_NUMBER - Start reading right after the position
     * denoted by a specific sequence number.

     *
TRIM_HORIZON - Start reading at the last untrimmed record in the
     * shard in the system, which is the oldest data record in the shard.

     *
LATEST - Start reading just after the most recent record in the
     * shard, so that you always read the most recent data in the shard.

     *

     *
     * @param shardIteratorType
     *        Determines how the shard iterator is used to start reading data
     *        records from the shard.

     *

     *        The following are the valid shard iterator types:
     *

     *

     *
AT_SEQUENCE_NUMBER - Start reading exactly from the position
     *        denoted by a specific sequence number.

     *
AFTER_SEQUENCE_NUMBER - Start reading right after the position
     *        denoted by a specific sequence number.

     *
TRIM_HORIZON - Start reading at the last untrimmed record in
     *        the shard in the system, which is the oldest data record in the
     *        shard.

     *
LATEST - Start reading just after the most recent record in
     *        the shard, so that you always read the most recent data in the
     *        shard.

     * @see ShardIteratorType
     */
    public void setShardIteratorType(String shardIteratorType) {
        this.shardIteratorType = shardIteratorType;
    }

    /**
     *

     * Determines how the shard iterator is used to start reading data records
     * from the shard.
     *

     *

     * The following are the valid shard iterator types:
     *

     *

     *
AT_SEQUENCE_NUMBER - Start reading exactly from the position denoted
     * by a specific sequence number.

     *
AFTER_SEQUENCE_NUMBER - Start reading right after the position
     * denoted by a specific sequence number.

     *
TRIM_HORIZON - Start reading at the last untrimmed record in the
     * shard in the system, which is the oldest data record in the shard.

     *
LATEST - Start reading just after the most recent record in the
     * shard, so that you always read the most recent data in the shard.

     *

     *
     * @return Determines how the shard iterator is used to start reading data
     *         records from the shard.

     *

     *         The following are the valid shard iterator types:
     *

     *

     *
AT_SEQUENCE_NUMBER - Start reading exactly from the position
     *         denoted by a specific sequence number.

     *
AFTER_SEQUENCE_NUMBER - Start reading right after the
     *         position denoted by a specific sequence number.

     *
TRIM_HORIZON - Start reading at the last untrimmed record in
     *         the shard in the system, which is the oldest data record in the
     *         shard.

     *
LATEST - Start reading just after the most recent record in
     *         the shard, so that you always read the most recent data in the
     *         shard.

     * @see ShardIteratorType
     */
    public String getShardIteratorType() {
        return this.shardIteratorType;
    }

    /**
     *

     * Determines how the shard iterator is used to start reading data records
     * from the shard.
     *

     *

     * The following are the valid shard iterator types:
     *

     *

     *
AT_SEQUENCE_NUMBER - Start reading exactly from the position denoted
     * by a specific sequence number.

     *
AFTER_SEQUENCE_NUMBER - Start reading right after the position
     * denoted by a specific sequence number.

     *
TRIM_HORIZON - Start reading at the last untrimmed record in the
     * shard in the system, which is the oldest data record in the shard.

     *
LATEST - Start reading just after the most recent record in the
     * shard, so that you always read the most recent data in the shard.

     *

     *
     * @param shardIteratorType
     *        Determines how the shard iterator is used to start reading data
     *        records from the shard.

     *

     *        The following are the valid shard iterator types:
     *

     *

     *
AT_SEQUENCE_NUMBER - Start reading exactly from the position
     *        denoted by a specific sequence number.

     *
AFTER_SEQUENCE_NUMBER - Start reading right after the position
     *        denoted by a specific sequence number.

     *
TRIM_HORIZON - Start reading at the last untrimmed record in
     *        the shard in the system, which is the oldest data record in the
     *        shard.

     *
LATEST - Start reading just after the most recent record in
     *        the shard, so that you always read the most recent data in the
     *        shard.

     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     * @see ShardIteratorType
     */
    public GetShardIteratorRequest withShardIteratorType(
            String shardIteratorType) {
        setShardIteratorType(shardIteratorType);
        return this;
    }

    /**
     *

     * Determines how the shard iterator is used to start reading data records
     * from the shard.
     *

     *

     * The following are the valid shard iterator types:
     *

     *

     *
AT_SEQUENCE_NUMBER - Start reading exactly from the position denoted
     * by a specific sequence number.

     *
AFTER_SEQUENCE_NUMBER - Start reading right after the position
     * denoted by a specific sequence number.

     *
TRIM_HORIZON - Start reading at the last untrimmed record in the
     * shard in the system, which is the oldest data record in the shard.

     *
LATEST - Start reading just after the most recent record in the
     * shard, so that you always read the most recent data in the shard.

     *

     *
     * @param shardIteratorType
     *        Determines how the shard iterator is used to start reading data
     *        records from the shard.

     *

     *        The following are the valid shard iterator types:
     *

     *

     *
AT_SEQUENCE_NUMBER - Start reading exactly from the position
     *        denoted by a specific sequence number.

     *
AFTER_SEQUENCE_NUMBER - Start reading right after the position
     *        denoted by a specific sequence number.

     *
TRIM_HORIZON - Start reading at the last untrimmed record in
     *        the shard in the system, which is the oldest data record in the
     *        shard.

     *
LATEST - Start reading just after the most recent record in
     *        the shard, so that you always read the most recent data in the
     *        shard.

     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     * @see ShardIteratorType
     */
    public void setShardIteratorType(ShardIteratorType shardIteratorType) {
        this.shardIteratorType = shardIteratorType.toString();
    }

    /**
     *

     * Determines how the shard iterator is used to start reading data records
     * from the shard.
     *

     *

     * The following are the valid shard iterator types:
     *

     *

     *
AT_SEQUENCE_NUMBER - Start reading exactly from the position denoted
     * by a specific sequence number.

     *
AFTER_SEQUENCE_NUMBER - Start reading right after the position
     * denoted by a specific sequence number.

     *
TRIM_HORIZON - Start reading at the last untrimmed record in the
     * shard in the system, which is the oldest data record in the shard.

     *
LATEST - Start reading just after the most recent record in the
     * shard, so that you always read the most recent data in the shard.

     *

     *
     * @param shardIteratorType
     *        Determines how the shard iterator is used to start reading data
     *        records from the shard.

     *

     *        The following are the valid shard iterator types:
     *

     *

     *
AT_SEQUENCE_NUMBER - Start reading exactly from the position
     *        denoted by a specific sequence number.

     *
AFTER_SEQUENCE_NUMBER - Start reading right after the position
     *        denoted by a specific sequence number.

     *
TRIM_HORIZON - Start reading at the last untrimmed record in
     *        the shard in the system, which is the oldest data record in the
     *        shard.

     *
LATEST - Start reading just after the most recent record in
     *        the shard, so that you always read the most recent data in the
     *        shard.

     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     * @see ShardIteratorType
     */
    public GetShardIteratorRequest withShardIteratorType(
            ShardIteratorType shardIteratorType) {
        setShardIteratorType(shardIteratorType);
        return this;
    }

    /**
     *

     * The sequence number of the data record in the shard from which to start
     * reading from.
     *

     *
     * @param startingSequenceNumber
     *        The sequence number of the data record in the shard from which to
     *        start reading from.
     */
    public void setStartingSequenceNumber(String startingSequenceNumber) {
        this.startingSequenceNumber = startingSequenceNumber;
    }

    /**
     *

     * The sequence number of the data record in the shard from which to start
     * reading from.
     *

     *
     * @return The sequence number of the data record in the shard from which to
     *         start reading from.
     */
    public String getStartingSequenceNumber() {
        return this.startingSequenceNumber;
    }

    /**
     *

     * The sequence number of the data record in the shard from which to start
     * reading from.
     *

     *
     * @param startingSequenceNumber
     *        The sequence number of the data record in the shard from which to
     *        start reading from.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public GetShardIteratorRequest withStartingSequenceNumber(
            String startingSequenceNumber) {
        setStartingSequenceNumber(startingSequenceNumber);
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getStreamName() != null)
            sb.append("StreamName: " + getStreamName() + ",");
        if (getShardId() != null)
            sb.append("ShardId: " + getShardId() + ",");
        if (getShardIteratorType() != null)
            sb.append("ShardIteratorType: " + getShardIteratorType() + ",");
        if (getStartingSequenceNumber() != null)
            sb.append("StartingSequenceNumber: " + getStartingSequenceNumber());
        sb.append("}");
        return sb.toString();
    }

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

        if (obj instanceof GetShardIteratorRequest == false)
            return false;
        GetShardIteratorRequest other = (GetShardIteratorRequest) obj;
        if (other.getStreamName() == null ^ this.getStreamName() == null)
            return false;
        if (other.getStreamName() != null
                && other.getStreamName().equals(this.getStreamName()) == false)
            return false;
        if (other.getShardId() == null ^ this.getShardId() == null)
            return false;
        if (other.getShardId() != null
                && other.getShardId().equals(this.getShardId()) == false)
            return false;
        if (other.getShardIteratorType() == null
                ^ this.getShardIteratorType() == null)
            return false;
        if (other.getShardIteratorType() != null
                && other.getShardIteratorType().equals(
                        this.getShardIteratorType()) == false)
            return false;
        if (other.getStartingSequenceNumber() == null
                ^ this.getStartingSequenceNumber() == null)
            return false;
        if (other.getStartingSequenceNumber() != null
                && other.getStartingSequenceNumber().equals(
                        this.getStartingSequenceNumber()) == false)
            return false;
        return true;
    }

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

        hashCode = prime * hashCode
                + ((getStreamName() == null) ? 0 : getStreamName().hashCode());
        hashCode = prime * hashCode
                + ((getShardId() == null) ? 0 : getShardId().hashCode());
        hashCode = prime
                * hashCode
                + ((getShardIteratorType() == null) ? 0
                        : getShardIteratorType().hashCode());
        hashCode = prime
                * hashCode
                + ((getStartingSequenceNumber() == null) ? 0
                        : getStartingSequenceNumber().hashCode());
        return hashCode;
    }

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


text:
package com.mkl.websuites.internal.command.impl.check.neg;

import org.assertj.core.api.StringAssert;

import com.mkl.websuites.command.CommandDescriptor;
import com.mkl.websuites.internal.command.impl.check.CheckTitleContainsCommand;

@CommandDescriptor(name = "~checkTitleContains", argumentTypes = String.class)
public class NegCheckTitleContainsCommand extends CheckTitleContainsCommand {

    public NegCheckTitleContainsCommand(String titleFragment) {
        super(titleFragment);
    }

    @Override
    protected void runSingleStringAssertion(StringAssert assertThatTitle, String title) {

        assertThatTitle.overridingErrorMessage("Page title expected NOT to contain '%s', but the title was '%s'",
                expectedTitle, title).doesNotContain(expectedTitle);
    }

}


text:
Delete a resource

<mat-dialog-content class="kd-dialog-text">
  <ng-container i18n>
    Are you sure you want to delete {{data.displayName}} {{data.objectMeta.name}}

       in namespace {{data.objectMeta.namespace}}

    ?
  </ng-container>

    <mat-icon>info</mat-icon>

      This action is equivalent to:

        <ng-container>kubectl delete </ng-container>
        <ng-container *ngIf="data.objectMeta.namespace">-n {{data.objectMeta.namespace}} </ng-container>
        <ng-container>{{data.typeMeta.kind}} {{data.objectMeta.name}}</ng-container>

</mat-dialog-content>
<mat-dialog-actions>
  <button mat-button
          color="primary"
          [mat-dialog-close]="true"
          i18n>Delete</button>
  <button mat-button
          color="primary"
          [mat-dialog-close]="false"
          i18n>Cancel</button>
</mat-dialog-actions>


text:
<!-- Test collection with iterator and add-method, attributes at end -->
<binding>
  <mapping name="myelement" class="simple.MyClass6">
    <collection iter-method="intsIterator"
        add-method="addInt" test-method="isPresent" usage="optional">
      <value name="int" type="java.lang.Integer"/>
    </collection>
    <value style="attribute" name="a" field="a"/>
    <value style="attribute" name="b" field="b"/>
  </mapping>
</binding>


text:
package com.bwsw.sj.common.utils

import com.bwsw.common.file.utils.{ClosableClassLoader, FileStorage}

import scala.reflect.internal.util.ScalaClassLoader.URLClassLoader

/**
  * Provides method for loading class from file in [[com.bwsw.common.file.utils.FileStorage]]
  */
class FileClassLoader(storage: FileStorage, filename: String) extends ClosableClassLoader{
  /**
    * directory for temporary file saving
    */
  private val tmpDirectory = "/tmp/"

  private val file = storage.get(filename, tmpDirectory + filename)

  /**
    * Loads the class from file that is in [[com.bwsw.common.file.utils.FileStorage]]
    * and returns an instance of this class
    *
    * @param className    name of class
    */
  override def loadClass(className: String): Class[_] = {
    val loader = new URLClassLoader(Seq(file.toURI.toURL), ClassLoader.getSystemClassLoader)
    val _class = loader.loadClass(className)

    _class
  }

  def close() = {
    file.delete()
  }
}


text:
<!DOCTYPE html >

    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />

    <title>A basic HBar chart</title>

A horizontal bar chart showing Chrome speeds

   <canvas id="cvs" width="350" height="176">[No canvas support]</canvas>

        « Back


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <base data-ice="baseUrl" href="../../../../../../">
  <title data-ice="title">client/app/components/aframe/editor/editor.controller.js | UOIT Virtual Tour API Document</title>
  <link type="text/css" rel="stylesheet" href="css/style.css">
  <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">

  Home

  Reference
  Source

  Repository

    <input class="search-input">

app
FAppController

VappComponent

app/common
VcommonModule

app/common/buttonbar
CButtonbarController

VbuttonbarComponent

VbuttonBarModule

app/common/popup
CPopupService

VpopupModule

app/common/popup/error
FErrorController

VerrorModule

app/common/popup/info
CInfoController

VinfoModule

app/common/popup/login
FLoginController

VloginModule

app/common/popup/welcome
CWelcomeController

VwelcomeModule

app/common/titlebar
FtitleBarButtonDirective

VtitleBarComponent

VtitleBarModule

app/common/user
CUserSessionService

FUserAuthFactory

FUserResolverFactory

VuserModule

app/common/util
VutilModule

app/common/util/dom
FbindCompileDirective

VdomModule

app/common/util/model
FtoNumberDirective

VmodelModule

app/common/util/resource
FDraftResourceFactory

FMapResourceFactory

FTourResourceFactory

VresourceModule

app/components
VcomponentModule

app/components/aframe
VaframeModule

app/components/aframe/editor
CEditorController

CEditorService

CEditorDialogController

VeditorComponent

VeditorModule

app/components/aframe/entity
CEntityController

CEntityController

VentityComponent

VentityModule

VentityComponent

app/components/aframe/hotspot
FhotspotDirective

VhotspotModule

app/components/aframe/scene
CSceneController

CSceneService

VsceneComponent

VsceneModule

app/components/aframe/scenelink
FscenelinkDirective

VscenelinkModule

app/components/aframe/sky
CSkyController

CSkyService

VskyComponent

VskyModule

app/components/drilldown
CDrilldownController

VdrilldownComponent

VdrilldownModule

app/components/map
CMapController

VmapComponent

VmapModule

app/components/search
CSearchController

VsearchComponent

VsearchModule

app/components/settings
CConnectionDetailsService

CSettingsController

FSettingsFactory

VsettingsComponent

VsettingsModule

client/app/components/aframe/editor/editor.controller.js

/**
 * This controller is only instantiated with the server-rendered
 * editor component. It works by mounting a number of its
 * behaviours onto the scene component's `SceneCtrl` directly
 * and by proxying the `$aframeScene` service.
 *
 * @param {Object} $mdPanel      ng-material's panel service
 * @param {Object} $mdDialog     ng-material's dialog service
 * @param {Object} $aframeScene  The scene service
 * @param {Object} $aframeEditor The editor service
 * @param {Object} DATA_MODELS	 Database schema representations
 */
class EditorController {
	constructor($mdPanel, $mdDialog, $aframeScene, $aframeEditor, DATA_MODELS) {
		'ngInject';
		this.$mdPanel = $mdPanel;
		this.$mdDialog = $mdDialog;
		this.$aframeScene = $aframeScene;
		this.$aframeEditor = $aframeEditor;
		/**
		 * Property to store the state of the current scene with regard to
		 * whether there are unsaved changes.
		 *
		 * @memberof EditorCtrl
		 * @type {Boolean}
		 */
		this._unpublishedChanges = false;
		/**
		 * Editor's reference to what the database's data schema's should look like.
		 *
		 * @memberof EditorCtrl
		 * @type {Object}
		 */
		this._schemas = DATA_MODELS;
	}

	/**
	 * Utility method for keeping controller's model of scene data in
	 * sync with `$aframeScene`'s.
	 *
	 * @param  {Object} data Scene data to update with
	 */
	updateSceneData(data) {
		Object.assign(this.SceneCtrl, data);
		this.$aframeScene.scene = data;
		console.info('updated scene with data from editor:', data);
	}

	/**
	 * Proxy method for `$aframeEditor.saveDraft()`.
	 *
	 * @param  {Boolean}	notify	Whether to inform user of success.
	 */
	saveDraft(notify = true) {
		this.$aframeEditor.saveDraft(notify);
	}

	/**
	 * Proxy method for `$aframeEditor.loadDraft()`.
	 *
	 * @param  {Object}   draft   Chosen draft from draftList
	 * @param  {Boolean}	notify	Whether to inform user of success.
	 */
	loadDraft(draft, notify = true) {
		this.$aframeEditor.loadDraft(draft._id, notify)
			.then(draftContent => this.updateSceneData(draftContent));
	}

	/**
	 * Calls `$aframeEditor.checkForDraft()` and sets the controller's
	 * `draftList` property to an array of drafts resolved from promise.
	 *
	 * If drafts are found, notifies the user; offers to load the latest draft.
	 * Loads draft if user confirms and updates the scene data accordingly.
	 *
	 * @param {Boolean}	notify	Whether to inform the user with toast
	 */
	checkForDraft(notify = true) {
		this.draftList = null;
		this.$aframeEditor.checkForDraft(notify)
			.then(drafts => {
				this.draftList = drafts;
				return drafts.length&&notify&&this.$aframeEditor.draftFound(drafts);
			})
			.then(foundDraftContent => foundDraftContent&&this.updateSceneData(foundDraftContent));
	}

	/**
	 * Confirms with user that they would like to discard the draft
	 * in question; calls `$aframeEditor.discardDraft()` if user confirms.
	 *
	 * @param {Object}  draft   The draft to discard
	 * @param {Boolean}	notify	Whether to inform user with toast
	 */
	discardDraft(draft, notify = true) {
		const confirm = this.$mdDialog.confirm()
      .title('Are you sure?')
      .textContent('This action cannot be undone.')
      .ok('Confirm')
      .cancel('Cancel');
    this.$mdDialog.show(confirm).then(() => {
			this.$aframeEditor.discardDraft(draft._id, notify);
    });
	}

	/**
	 * Calls `$aframeEditor.publish()` directly (proxy method); updates
	 * scene data immediately afterward to keep app and server in sync.
	 *
	 * @param  {Object|Boolean}  newData Data to publish or false
	 * @param  {Boolean}         notify  Whether to inform user with toast
	 * @return {Promise} 								 Resolves to updated scene data
	 */
	publish(newData, notify = true) {
		return this.$aframeEditor.publish(newData, notify)
			.then(sceneData => this.updateSceneData(sceneData));
	}

	/**
	 * The editor controller's `$onInit` hook takes care of attaching a few
	 * editor methods and properties directly on the scene controller – it's
	 * strategy is to define and intialize all editor behaviour _separate_ from
	 * the scene, so that non-admin users do not have any of its behaviours
	 * attached (or included).
	 *
	 * The things it attaches are:
	 * - A contextmenu listener: since a number of components have different actions
	 * based on right clicks, a general "flag" needs to be set on the scene
	 * controller (`_rightclick`) so components can just check for the flag on any scene click.
	 *   - Also attaches `$onDestroy` for cleanup
	 * - The editor's `checkForDraft()` and `openEditor()` methods
	 * - An `_editable` flag that allows the scene controller to display the UI
	 */
	$onInit() {
		const contextMenu = event => {
		  event.stopPropagation();
			if (!this.SceneCtrl._rightClick) {
				this.SceneCtrl._rightClick = event;
				event.preventDefault();
				this.SceneCtrl.$sceneEl.on('mouseup', () => {
					this.SceneCtrl._rightClick = false;
					this.SceneCtrl.$sceneEl.off('mouseup')
				});
			}
		};
		this.SceneCtrl.$sceneEl.on('contextmenu', contextMenu);
	  this.SceneCtrl.$onDestroy = () => {
			this.$sceneEl.off('contextmenu', contextMenu);
	  }

		this.SceneCtrl.checkForDraft = () => this.checkForDraft();
		this.SceneCtrl.editItem = (ev, item, collection) => this.editItem(ev, item, collection);

		this.SceneCtrl._editable = true;
	}

	/**
	 * Queues up a new item (hotSpot/sceneLink/entity/etc) for addition to the current
	 * scene. Only collections that have their model explicitly defined in `DATA_MODELS`
	 * **and** as an option in the editor 'add item' selection (`_editor.html`) will be
	 * available for use.
	 *
	 * @param  {Event}   ev         The mouseEvent that called the method
	 * @param  {Array}   collection Collection of scene elements to add item to
	 * @return {Promise} 						Promise representing dialog reference
	 */
	addItem(ev, collection) {
		const locals = { item: this._schemas[collection] };

		locals.newItem = true;
    locals.publish = () => this.$aframeScene.addItemTo(locals.item, this.SceneCtrl[collection], newData => {
			this.$aframeScene.scene[collection] = newData;
			this._panelRef&&this._panelRef.close();
		});
    locals.saveDraft = () => this.$aframeScene.addItemTo(locals.item, this.SceneCtrl[collection], newData => {
			this.$aframeScene.scene[collection] = newData;
			this.saveDraft();
		});
		locals.removeThis = () => this._panelRef&&this._panelRef.close();
		locals.closeDialog = locals.removeThis;

		return this.openEditor(ev, locals);
	}

	/**
	 * Queues up a new scene for creation/publishing. WIP.
	 *
	 * @todo Panorama upload
	 * @todo Go to scene after created
	 *
	 * @param  {Event} ev The mouseEvent that called the method
	 * @return {Promise}  Promise representing dialog reference
	 */
	newScene(ev) {
		const locals = { item: this._schemas.scene };

		locals.newItem = true;
    locals.publish = () => {
			this.$aframeEditor.publish(locals.item);
			this._panelRef&&this._panelRef.close();
		};
    locals.saveDraft = () => {
    	locals.item.state = 'draft';
    	locals.publish();
		};
		locals.removeThis = () => this._panelRef&&this._panelRef.close();
		locals.closeDialog = locals.removeThis;

		return this.openEditor(ev, locals);
	}

	/**
	 * Opens a generic context menu 'edit' dialog for scene elements. Mostly
	 * proxies this controller's method's directly inside the editor dialog.
	 * Includes a horizontal offset that approximates the width of most average
	 * scene elements to center the dialog's origin.
	 *
	 * @param  {Event} ev         				The mouseEvent that called the method
	 * @param  {Object} item       				The item to edit
	 * @param  {Array<Object>} collection The item's collection in the scene
	 * @return {Promise}  								Promise representing dialog reference
	 */
	editItem(ev, item, collection) {

		const locals = { item };
    locals.publish = () => this.publish();
    locals.saveDraft = () => this.saveDraft();
		locals.removeThis = () => this.$aframeScene.removeItemFrom(item, collection, () => {
			this._panelRef&&this._panelRef.close();
		});
		locals.closeDialog = () => this._panelRef&&this._panelRef.close();

		return this.openEditor(ev, locals, { offsetY: -250 });
	}

	/**
	 * Base method for layering other dialog types into. This method
	 * handles the actual initialization of the editor dialog component
	 * using the ng-material panel service's `$mdPanel.open()` method on
	 * a panel preset built in `editor_config.js`.
	 *
	 * If the item loaded into the editor is considered "new", the dialog
	 * is readied for the center of the screen; otherwise, it is placed
	 * in the bottom-left. The animate-to-and-from is calculated using
	 * the original MouseEvent that opened the dialog.
	 *
	 * An `onDomRemoved()` method is added to clean up the dialog scope
	 * when its elements are removed; the scope is provided by a promise
	 * returned by this method.
	 *
	 * @param  {Event} ev              	The mouseEvent that called the method
	 * @param  {Object} locals          Local values to pass into dialog
	 * @param  {Number} $2.offsetX 			Pixels to shift dialog along X
	 * @param  {Number} $2.offsetY 			Pixels to shift dialog along Y
	 * @return {Promise}  							Promise representing dialog scope
	 */
	openEditor(ev, locals, { offsetX = 0, offsetY = 0 } = {}) {
		console.log((ev.clientY + offsetY))
		const position = this.$mdPanel.newPanelPosition();
		if (locals.newItem) {
			position.absolute().center();
		} else {
			position.absolute().bottom(0).left(0);
		}
    const animation = this.$mdPanel.newPanelAnimation()
      .openFrom({top: (ev.clientY + offsetY), left:( ev.clientX + offsetX) })
      .withAnimation(this.$mdPanel.animation.SCALE)
      .closeTo({top: (ev.clientY + offsetY), left:( ev.clientX + offsetX) });
    const onDomRemoved = () => {
			this._panelRef&&this._panelRef.destroy();
		};

		return this.$mdPanel.open('editorDialog', {
			position, animation, onDomRemoved, locals
		}).then(scope => {
      this._panelRef = scope;
    });
	}
}

export default EditorController;

  Generated by ESDoc(0.4.8)


text:
<?php
/**
 * @package: marx/php-self-updater
 *
 * @author:  msiebeneicher
 * @since:   2015-12-27
 *
 */

namespace PSU\HttpClient\Adapter;

use GuzzleHttp\ClientInterface;
use PSU\Exception\HttpClientException;
use PSU\HttpClient\HttpClientInterface;

class GuzzlApapter implements HttpClientInterface
{
    /**
     * @var ClientInterface
     */
    private $guzzlClient;

    /**
     * @param ClientInterface $guzzlClient
     */
    public function __construct(
        ClientInterface $guzzlClient
    )
    {
        $this->guzzlClient = $guzzlClient;
    }

    /**
     * @param $url
     * @return array
     * @throws HttpClientException
     */
    public function getJsonResponse($url)
    {
        $response = $this->guzzlClient->get($url);
        if (200 == $response->getStatusCode())
        {
            return $response->json();
        }

        throw new HttpClientException(
            sprintf(
                'Unable to get json result from "%s"',
                $url
            )
        );
    }

    /**
     * @param $url
     * @return string
     * @throws HttpClientException
     */
    public function download($url)
    {
        $response = $this->guzzlClient->get($url);

        if (200 == $response->getStatusCode())
        {
            $body = $response->getBody();
            return $this->saveBodyAsFile($body);
        }

        throw new HttpClientException(
            sprintf(
                'Unable to get download from "%s"',
                $url
            )
        );
    }

    /**
     * @param $body
     * @return string
     */
    private function saveBodyAsFile($body)
    {
        $tmpDir = sys_get_temp_dir();
        $tmpFile = tempnam($tmpDir, 'psu_');

        if (file_put_contents($tmpFile, $body) > 0)
        {
            return $tmpFile;
        }

        throw new \RuntimeException(sprintf('Unable to save file content to "%s"', $tmpFile));
    }
}