text:
module.exports = (function (Ozone) {
    var url = "http://" + Ozone.config().getServerProperty("host");
    url = url + ":" + Ozone.config().getServerProperty("port");
    url = url + Ozone.config().getCommonProperty("urls.apiBaseUrl");
    url = url + "apps/";

    beforeEach(function (done) {
        Ozone.Service().on("ready", "App", function () {
            done();
        });
    });

    describe("ozone-services-applications", function () {
        var appDef = {
            name: "App Test 1",
            shortname: "AppTest1",
            version: "2",
            workflowState: "Published",
            featured: false,
            descriptionShort: "This is my short description",
            description: "This is my long description"
        };

        it("POST " + Ozone.config().getCommonProperty("urls.apiBaseUrl") + "apps/app/ responds with 200", function (done) {
            var request = require("supertest")(url);
            request.post("app/").send(appDef).set('Accept', 'application/json').expect(200).end(function (err, res) {
                expect(err).toBe(null);
                expect(res).not.toBe(undefined);
                var j = JSON.parse(res.text);
                appDef._id = j[0]._id;
                done();
            });
        });

        it("GET " + Ozone.config().getCommonProperty("urls.apiBaseUrl") + "apps/app/:id responds with 200", function (done) {
            var request = require("supertest")(url);
            request.get("app/" + appDef._id).expect(200).set('Accept', 'application/json').end(function (err, res) {
                var j = JSON.parse(res.text);
                expect(j[0].shortname).toBe(appDef.shortname);
                done(err);
            });
        });

        it("PUT " + Ozone.config().getCommonProperty("urls.apiBaseUrl") + "apps/app/:id responds with 200", function (done) {
            var request = require("supertest")(url);
            appDef.shortname = "AppTest9";
            request.put("app/" + appDef._id).send(appDef).set('Accept', 'application/json').expect(200, done);
        });

        it("DELETE " + Ozone.config().getCommonProperty("urls.apiBaseUrl") + "apps/app/:id responds with 200", function (done) {
            var request = require("supertest")(url);
            request.del("app/" + appDef._id).expect(200, done);
        });
    });
});


text:
node   (6.x LTS) https://nodejs.org or

```
// macOS
brew install node@6

// centos
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
yum -y install nodejs
```

redis  (3.2+) http://redis.io/ or
```
brew install redis
```

## Installation

```
git clone --recursive  https://github.com/PATRIC3/p3_web.git
cd p3_web
npm install
cp p3-web.conf.sample p3-web.conf  (and edit as necessary)
```

If you cloned without --recursive flag,
```
cd p3_web
npm install
git submodule update --init
// Note: git submodule fetches a module in node_modules directory. So npm install first!
```

## Authentication config for development

In `./p3-web.conf`, place a token and user id/name as follows:

``` json
{
    "devAuthorizationToken": "token",
    "devUser": {
        "id":"user@patricbrc.org",
        "name": "user name"
    }
}
```

Note: authentication is stored as a session cookie.  You can clear it via your browser devtools if needed.

## Running

```
redis-server &
npm start
```

Note: if any configuration changes are made (i.e., changes to `./p3-web.conf`), then `./bin/p3-web` must be restarted.

## Contributing

Please refer [this doc](CONTRIBUTING.md) for contribution.

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>I need help on reaper missions coz I'm a newbie</title>
		<link>http://bvs.wikidot.com/forum/t-74685/i-need-help-on-reaper-missions-coz-i-m-a-newbie</link>
		<description>Posts in the discussion thread "I need help on reaper missions coz I'm a newbie" - Help me with everything in the game coz i dont get the Wiki.</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 10 Jul 2022 04:55:07 +0000</lastBuildDate>

					<item>
				<guid>http://bvs.wikidot.com/forum/t-74685#post-224007</guid>
				<title>Re: I need help on reaper missions coz I'm a newbie</title>
				<link>http://bvs.wikidot.com/forum/t-74685/i-need-help-on-reaper-missions-coz-i-m-a-newbie#post-224007</link>
				<description></description>
				<pubDate>Sun, 20 Jul 2008 12:40:23 +0000</pubDate>
				<wikidot:authorName>deelle</wikidot:authorName>				<wikidot:authorUserId>103382</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

The items needed can be found in the link that Uzuki gave you.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-74685#post-224004</guid>
				<title>Re: I need help on reaper missions coz I'm a newbie</title>
				<link>http://bvs.wikidot.com/forum/t-74685/i-need-help-on-reaper-missions-coz-i-m-a-newbie#post-224004</link>
				<description></description>
				<pubDate>Sun, 20 Jul 2008 12:24:23 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[

i need the items plz Bvs Uzuki

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-74685#post-221524</guid>
				<title>Re: I NEED HELP ON REAPER MISSIONS COZ IM A NEWBIE</title>
				<link>http://bvs.wikidot.com/forum/t-74685/i-need-help-on-reaper-missions-coz-i-m-a-newbie#post-221524</link>
				<description></description>
				<pubDate>Wed, 16 Jul 2008 14:00:53 +0000</pubDate>
				<wikidot:authorName>BvS-Uzuki</wikidot:authorName>				<wikidot:authorUserId>78144</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

First, please turn capslock off.

Second, I'd suggest this guide: Reaper Guide.

I'm not sure why you need names and villages.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-74685#post-221414</guid>
				<title>I NEED HELP ON REAPER MISSIONS COZ IM A NEWBIE</title>
				<link>http://bvs.wikidot.com/forum/t-74685/i-need-help-on-reaper-missions-coz-i-m-a-newbie#post-221414</link>
				<description></description>
				<pubDate>Wed, 16 Jul 2008 10:24:25 +0000</pubDate>
				<wikidot:authorName>matthewofal</wikidot:authorName>				<wikidot:authorUserId>167352</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

I NEED HELP!!!!!
 PLZ HELP AND LEAVE NAME AND VILLAGE

THNX
 Matthew or Matthewo

				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>


text:
"""This module is deprecated. Please use :mod:`kubernetes.client.models.V1Volume`."""
# flake8: noqa

import warnings

with warnings.catch_warnings():
    from airflow.providers.cncf.kubernetes.backcompat.volume import Volume

warnings.warn(
    "This module is deprecated. Please use `kubernetes.client.models.V1Volume`.",
    DeprecationWarning,
    stacklevel=2,
)


text:
<?php

final class PhabricatorSlowvotePoll extends PhabricatorSlowvoteDAO
  implements
    PhabricatorApplicationTransactionInterface,
    PhabricatorPolicyInterface,
    PhabricatorSubscribableInterface,
    PhabricatorFlaggableInterface,
    PhabricatorTokenReceiverInterface,
    PhabricatorProjectInterface,
    PhabricatorDestructibleInterface,
    PhabricatorSpacesInterface {

  const RESPONSES_VISIBLE = 0;
  const RESPONSES_VOTERS  = 1;
  const RESPONSES_OWNER   = 2;

  const METHOD_PLURALITY  = 0;
  const METHOD_APPROVAL   = 1;

  protected $question;
  protected $description;
  protected $authorPHID;
  protected $responseVisibility = 0;
  protected $shuffle = 0;
  protected $method;
  protected $mailKey;
  protected $viewPolicy;
  protected $isClosed = 0;
  protected $spacePHID;

  private $options = self::ATTACHABLE;
  private $choices = self::ATTACHABLE;
  private $viewerChoices = self::ATTACHABLE;

  public static function initializeNewPoll(PhabricatorUser $actor) {
    $app = id(new PhabricatorApplicationQuery())
      ->setViewer($actor)
      ->withClasses(array('PhabricatorSlowvoteApplication'))
      ->executeOne();

    $view_policy = $app->getPolicy(
      PhabricatorSlowvoteDefaultViewCapability::CAPABILITY);

    return id(new PhabricatorSlowvotePoll())
      ->setAuthorPHID($actor->getPHID())
      ->setViewPolicy($view_policy)
      ->setSpacePHID($actor->getDefaultSpacePHID());
  }

  protected function getConfiguration() {
    return array(
      self::CONFIG_AUX_PHID => true,
      self::CONFIG_COLUMN_SCHEMA => array(
        'question' => 'text255',
        'responseVisibility' => 'uint32',
        'shuffle' => 'bool',
        'method' => 'uint32',
        'description' => 'text',
        'isClosed' => 'bool',
        'mailKey' => 'bytes20',
      ),
      self::CONFIG_KEY_SCHEMA => array(
        'key_phid' => null,
        'phid' => array(
          'columns' => array('phid'),
          'unique' => true,
        ),
      ),
    ) + parent::getConfiguration();
  }

  public function generatePHID() {
    return PhabricatorPHID::generateNewPHID(
      PhabricatorSlowvotePollPHIDType::TYPECONST);
  }

  public function getOptions() {
    return $this->assertAttached($this->options);
  }

  public function attachOptions(array $options) {
    assert_instances_of($options, 'PhabricatorSlowvoteOption');
    $this->options = $options;
    return $this;
  }

  public function getChoices() {
    return $this->assertAttached($this->choices);
  }

  public function attachChoices(array $choices) {
    assert_instances_of($choices, 'PhabricatorSlowvoteChoice');
    $this->choices = $choices;
    return $this;
  }

  public function getViewerChoices(PhabricatorUser $viewer) {
    return $this->assertAttachedKey($this->viewerChoices, $viewer->getPHID());
  }

  public function attachViewerChoices(PhabricatorUser $viewer, array $choices) {
    if ($this->viewerChoices === self::ATTACHABLE) {
      $this->viewerChoices = array();
    }
    assert_instances_of($choices, 'PhabricatorSlowvoteChoice');
    $this->viewerChoices[$viewer->getPHID()] = $choices;
    return $this;
  }

  public function getMonogram() {
    return 'V'.$this->getID();
  }

  public function save() {
    if (!$this->getMailKey()) {
      $this->setMailKey(Filesystem::readRandomCharacters(20));
    }
    return parent::save();
  }

/* -(  PhabricatorApplicationTransactionInterface  )------------------------- */

  public function getApplicationTransactionEditor() {
    return new PhabricatorSlowvoteEditor();
  }

  public function getApplicationTransactionObject() {
    return $this;
  }

  public function getApplicationTransactionTemplate() {
    return new PhabricatorSlowvoteTransaction();
  }

  public function willRenderTimeline(
    PhabricatorApplicationTransactionView $timeline,
    AphrontRequest $request) {

    return $timeline;
  }

/* -(  PhabricatorPolicyInterface  )----------------------------------------- */

  public function getCapabilities() {
    return array(
      PhabricatorPolicyCapability::CAN_VIEW,
      PhabricatorPolicyCapability::CAN_EDIT,
    );
  }

  public function getPolicy($capability) {
    switch ($capability) {
      case PhabricatorPolicyCapability::CAN_VIEW:
        return $this->viewPolicy;
      case PhabricatorPolicyCapability::CAN_EDIT:
        return PhabricatorPolicies::POLICY_NOONE;
    }
  }

  public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
    return ($viewer->getPHID() == $this->getAuthorPHID());
  }

  public function describeAutomaticCapability($capability) {
    return pht('The author of a poll can always view and edit it.');
  }

/* -(  PhabricatorSubscribableInterface  )----------------------------------- */

  public function isAutomaticallySubscribed($phid) {
    return ($phid == $this->getAuthorPHID());
  }

/* -(  PhabricatorTokenReceiverInterface  )---------------------------------- */

  public function getUsersToNotifyOfTokenGiven() {
    return array($this->getAuthorPHID());
  }

/* -(  PhabricatorDestructibleInterface  )----------------------------------- */

  public function destroyObjectPermanently(
    PhabricatorDestructionEngine $engine) {

    $this->openTransaction();
      $choices = id(new PhabricatorSlowvoteChoice())->loadAllWhere(
        'pollID = %d',
        $this->getID());
      foreach ($choices as $choice) {
        $choice->delete();
      }
      $options = id(new PhabricatorSlowvoteOption())->loadAllWhere(
        'pollID = %d',
        $this->getID());
      foreach ($options as $option) {
        $option->delete();
      }
      $this->delete();
    $this->saveTransaction();
  }

  /* -(  PhabricatorSpacesInterface  )--------------------------------------- */

  public function getSpacePHID() {
    return $this->spacePHID;
  }

}


text:
'use strict'
/**
 * Created by menzhongxin on 2016/10/26.
 */
let generator = require('./generator')

/**
 * 迭代加载router
 * @param options
 */
exports.autoLoading = generator.init


text:
// Qt includes
#include <QApplication>
#include <QDebug>
#include <QSignalSpy>
#include <QTimer>
#include <QVBoxLayout>

// QtTesting includes
#include <pqTestUtility.h>

// CTK includes
#include "ctkCallback.h"
#include "ctkConfig.h"
#include "ctkCheckableComboBox.h"
#include "ctkCheckableComboBoxEventPlayer.h"
#include "ctkCheckableComboBoxEventTranslator.h"
#include "ctkEventTranslatorPlayerWidget.h"

// QtTesting includes
#include "pqTestUtility.h"

// STD includes
#include <cstdlib>
#include <iostream>

namespace
{
QSignalSpy *Spy1;
//-----------------------------------------------------------------------------
void checkFinalWidgetState(void* data)
  {
  ctkCheckableComboBox* widget = reinterpret_cast<ctkCheckableComboBox*>(data);

  CTKCOMPARE(Spy1->count(), 15);
  CTKCOMPARE(widget->checkedIndexes().count(), 3);
  CTKCOMPARE(widget->noneChecked(), false);
//  CTKCOMPARE(widget->currentText(), "toto, titi, tutu");
  }
//-----------------------------------------------------------------------------
void checkFinalWidgetState2(void* data)
  {
  QWidget* parentWidget = reinterpret_cast<QWidget*>(data);
  QList<ctkCheckableComboBox*> widget = parentWidget->findChildren<ctkCheckableComboBox*>();

  if(widget.count())
    {
    CTKCOMPARE(widget[0]->checkedIndexes().count(), 2);
    CTKCOMPARE(widget[0]->noneChecked(), false);
//    CTKCOMPARE(widget[0]->currentText(), "tata,titi");
    }
  else
    {
    QApplication::exit(EXIT_FAILURE);
    }
  }
}

//-----------------------------------------------------------------------------
int ctkCheckableComboBoxEventTranslatorPlayerTest1(int argc, char * argv [])
{
  QApplication app(argc, argv);

  QString xmlDirectory = CTK_SOURCE_DIR "/Libs/Widgets/Testing/Cpp/";

  // ------------------------
  ctkEventTranslatorPlayerWidget etpWidget;
  pqTestUtility* testUtility = new pqTestUtility(&etpWidget);
  etpWidget.setTestUtility(testUtility);
  etpWidget.addWidgetEventTranslator(new ctkCheckableComboBoxEventTranslator);
  etpWidget.addWidgetEventPlayer(new ctkCheckableComboBoxEventPlayer);

  // Test case 1
  ctkCheckableComboBox* widget = new ctkCheckableComboBox();
  widget->addItem("toto");
  widget->addItem("tata");
  widget->addItem("titi");
  widget->addItem(widget->style()->standardIcon(QStyle::SP_FileIcon),"tutu");

  QSignalSpy spy1(widget, SIGNAL(checkedIndexesChanged()));
  Spy1 = &spy1;

  etpWidget.addTestCase(widget,
                        xmlDirectory + "ctkCheckableComboBoxEventTranslatorPlayerTest1.xml",
                        &checkFinalWidgetState);

  // Test case 2
  QWidget widget2(0);
  ctkCheckableComboBox* comboBox2 = new ctkCheckableComboBox(&widget2);
  comboBox2->addItem("toto");
  comboBox2->addItem("tata");
  comboBox2->addItem("titi");
  comboBox2->addItem(comboBox2->style()->standardIcon(QStyle::SP_FileIcon),"tutu");

  etpWidget.addTestCase(&widget2,
                        xmlDirectory + "ctkCheckableComboBoxEventTranslatorPlayerTest2.xml",
                        &checkFinalWidgetState2);

  // ------------------------
  if (argc < 2 || QString(argv[1]) != "-I")
    {
    QTimer::singleShot(0, &etpWidget, SLOT(play()));
    }

  etpWidget.show();
  return app.exec();
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!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>oscils</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="osciln.html" title="osciln" />
    <link rel="next" href="oscilx.html" title="oscilx" />

          oscils

          Prev
          Orchestra Opcodes and Operators
           Next

          oscils

oscils —
      A simple, fast sine oscillator

Description

      Simple, fast sine oscillator, that uses only one multiply, and two add operations to generate one sample of output, and does not require a function table.

Syntax

ares oscils iamp, icps, iphs [, iflg]

Initialization

      iamp -- output amplitude.

      icps -- frequency in Hz (may be zero or negative, however the absolute value must be less than sr/2).

      iphs -- start phase between 0 and 1.

      iflg -- sum of the following values:

            2: use double precision even if Csound was compiled to use floats.  This improves quality (especially in the case of long performance time), but may be up to twice as slow.

            1: skip initialization.

Performance

      ares -- audio output

Examples

      Here is an example of the oscils opcode. It uses the file oscils.csd.

            Example 598. Example of the oscils opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac    ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o oscils.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr 1

iflg = p4
asig oscils .7, 220, 0, iflg
     outs asig, asig

endin
</CsInstruments>
<CsScore>

i 1 0 2 0
i 1 3 2 2	;double precision
e
</CsScore>
</CsoundSynthesizer>

Credits

            Author: Istvan Varga

            January 2002

New in version 4.18

          Prev

            Up

           Next

          osciln

            Home

           oscilx


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycotaxon 38: 475 (1990)

#### Original name
Humaria stercoraria Velen.

### Remarks
null


text:
package net.jgp.labs.db.informix.record;

import java.sql.SQLException;
import java.sql.Statement;
import java.time.Duration;
import java.time.LocalDateTime;
import java.time.Month;

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

import net.jgp.labs.db.informix.utils.ConnectionManager;

public class UpdateRecord {
	private static transient Logger log = LoggerFactory.getLogger(UpdateRecord.class);

	public static void main(String[] args) {

		ReadRecord rr = new ReadRecord();
		rr.executeDbOperation("SELECT * FROM manufact ORDER BY manu_code");

		// Update lead time of SNT supplier based on current day.
		UpdateRecord ur = new UpdateRecord();
		LocalDateTime now = LocalDateTime.now();
		LocalDateTime nextXmas = LocalDateTime.of(now.getYear(), Month.DECEMBER, 25, 0, 0);
		Duration leadTime = Duration.between(now, nextXmas);

		ur.executeDbOperation("UPDATE manufact SET lead_time='" + leadTime.toDays() + "' WHERE manu_code='SNT'");

		rr.executeDbOperation("SELECT * FROM manufact ORDER BY manu_code");
	}

	public boolean executeDbOperation(String sqlStatement) {
		Statement statement = ConnectionManager.getStatement();
		try {
			statement.executeUpdate(sqlStatement);
		} catch (SQLException e) {
			log.error("Could not execute the following SQL statement '{}', got: ", sqlStatement, e.getMessage(), e);
			return false;
		}
		return true;
	}
}


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

namespace ApiGenerator.Overrides.Descriptors
{
	// ReSharper disable once UnusedMember.Global
	public class MultiTermVectorsDescriptorOverrides : DescriptorOverridesBase
	{
		public override IEnumerable<string> SkipQueryStringParams => new []
		{
			"ids"
		};
	}
}


text:
#ifndef FGNC_HPP
#define FGNC_HPP

#include "FgStdString.hpp"
#include "FgStdVector.hpp"
#include "FgSerialize.hpp"
#include "FgBuild.hpp"
#include "FgFileSystem.hpp"
#include "FgSerial.hpp"

namespace Fg {

// Location of network computing share root location as specified on given *native* build OS:
String                  getNcShare(BuildOS nativeBuildOS);
// As above for current host OS:
String                  getNcShare();

// An HTML log of given commands and outputs will be appended to 'logFile' and a 32x32 image
// will be written to <logFileBaseName>.jpg, green for success of all commands, red for a fail:
struct  NcScript
{
    String              outputBase;         // Output file base name (HTML & JPG will be created)
    String              title;              // Title line of ouput HTML file
    // Each such command will be shell executed in order. In addition some builtin commands are supported:
    // fgPush <dir>     - push <dir> to current for this process
    // fgPop            - pop back to previous dir for this process
    Strings             cmds;

    FG_SER3(outputBase,title,cmds)

    static uint64 constexpr typeID() {return 0xFE785A765844B8D1ULL; }
};

inline uint16           getNcServerPort() {return 59405; }
inline String           getCiShareBoot() {return getNcShare() + toNativeDirSep(String{"ci/boot/"}); }
inline String           getCiShareBoot(BuildOS os) {return getNcShare(os) + cNsOs("ci/boot/",os); }
inline String           getCiShareRepo() {return getNcShare() + toNativeDirSep(String{"ci/root/"}); }
inline String           getCiShareRepo(BuildOS os) {return getNcShare(os) + cNsOs("ci/root/",os); }

}

#endif

// */


text:
class Screen{
    friend void Window_mgr::clear(ScreenIndex);
public:
    typedef std::string::size_type pos;
    // constructors
    Screen() = default;
    Screen(pos ht, pos wd, char c):height(ht), width(wd),
                                   contents(ht*wd, c){}
    // set
    Screen &set(char);
    Screen &set(pos, pos, char);
    //get
    char get() const{return contents[cursor];}
    inline char get(pos r, pos c) const;
    //move
    Screen &move(pos r, pos c);
    // overload display
    Screen &display(std::ostream &os);
    const Screen &display(std::ostream &os) const;

private:
    pos cursor = 0;
    pos height = 0, width = 0;
    std::string contents;
    void do_display(std::ostream &os) const {
        os << contents << std::endl;
    }
};

#endif // _SCREEN_H


text:
package com.easyguide.data.entity;

import com.google.firebase.database.PropertyName;

import java.io.Serializable;
import java.util.HashMap;

public class Beacon implements Serializable {

    @PropertyName("uuid")
    String uuid;
    @PropertyName("major_value")
    Long major;
    @PropertyName("minor_value")
    Long minor;
    Double distance;
    @PropertyName("content")
    HashMap<String, BeaconContent> content;

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Long getMajor() {
        return major;
    }

    public void setMajor(Long major) {
        this.major = major;
    }

    public Long getMinor() {
        return minor;
    }

    public void setMinor(Long minor) {
        this.minor = minor;
    }

    public Double getDistance() {
        return distance;
    }

    public void setDistance(Double distance) {
        this.distance = distance;
    }

    public HashMap<String, BeaconContent> getContent() {
        return content;
    }

    public void setContent(HashMap<String, BeaconContent> content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return getUuid().toUpperCase() + ":" + getMajor() + ":" + getMinor();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof Beacon)) {
            return false;
        }
        Beacon beacon = (Beacon) obj;
        return beacon.getUuid().equals(this.getUuid())
                && beacon.getMajor().equals(this.getMajor())
                && beacon.getMinor().equals(this.getMinor());
    }
}


text:
<!doctype html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sam's Beauty Salon</title>

    <meta name="msapplication-tap-highlight" content="no">

    <link rel="manifest" href="manifest.json">

    <meta name="mobile-web-app-capable" content="yes">
    <meta name="application-name" content="Web Starter Kit">
    <link rel="icon" sizes="192x192" href="images/touch/chrome-touch-icon-192x192.png">

    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Web Starter Kit">
    <link rel="apple-touch-icon" href="images/touch/apple-touch-icon.png">

    <meta name="msapplication-TileImage" content="images/touch/ms-touch-icon-144x144-precomposed.png">
    <meta name="msapplication-TileColor" content="#2F3BA2">

    <meta name="theme-color" content="#2F3BA2">

    <link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.6/material.indigo-pink.min.css">

    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">

    <link href="styles/ie10-viewport-bug-workaround.css" rel="stylesheet">

    <link rel="stylesheet" href="styles/bootstrap.min.css">
    <link href="styles/custom.css" rel="stylesheet">
    <link href="carousel.css" rel="stylesheet">

              <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                Toggle navigation

              </button>
              Sam's Threading & Beauty Salon

Home

Photo Gallery

                  Services

Eye brow threading

Eyelashes Extension

Body Waxing

Facials

Nail Art

Hinna/Tatoo

Contact

                  About

Timings

Special Offers

Complains

Feedback

        Previous

        Next

Facial

Nail Art

Body Waxing

Facial

Nail Art

Body Waxing

Sam's Beauty Salon

We provide the best services.

				<address>

							PO Box 21132

							Here Weare St, Melbourne

							Vivas 2355 Australia

							Phone: 1-800-565-2390

							support@yourname.com

				</address>

LATEST NEWS

						Donec sed odio dui.
						29 June 2015

						Nullam id dolor id nibh ultricies
						29 June 2015

						Duis mollis, est non commodo luctus
						29 June 2015

EXPLORE Our Site

 Home

PhotoGarrery

Our Services

Contact Us

About Us

KEEP IN TOUCH

Subscribe to Our Newsletter to get Important News & Offers

				<form action="php/newsletter.php" role="form" method="post">

						<input type="email" id="email" name="email" class="form-control" placeholder="Enter your Email" required="required">

							<button class="btn btn-success" type="submit">Subscribe</button>

				</form>

Terms & Conditions

•

Privacy

          © All Rights Reserved, Company LTD


text:
To create a mock object for use in tests, you will need to use the `define` method. This will set up basic mocking functionality similar to what Sequelize would provide. In addition to whatever default values you define, Sequelize Mock will also create an auto-incrementing `id` value as well as a `createdAt` and `updatedAt` value which defaults to the time of creation. This automatic values can be turned off the same way they can be disabled in standard Sequelize.

Defining a mock object is primarily about setting up a set of default values that will be used for new models. It is also best to define a name for the model. For the most part, you should name your mock object the same thing you have named your model. This will allow any associations to be properly set up with calls to associations.

```javascript
var User = dbMock.define('user', {
	username: 'myTestUsername',
	email: 'test@example.com',
});

var Team = dbMock.define('team', {
	name: 'Test Team',
});
```

## Instance Methods

Similar to Sequelize, you can set up methods to be available on every returned mock instance.

```javascript
var Project = dbMock.define('project', {
	name: 'Test Project',
}, {
	instanceMethods: {
		getProjectInfo: function () {
			return this.get('id') + ' - ' + this.get('name');
		}
	},
});
```


text:
module Game.Poker.AI
    ( aiSelectDiscards
    , nOfKindDiscards
    ) where

import Data.List
import Data.Maybe
import Control.Applicative
import Game.Poker.Cards
import Game.Poker.Hands

-- | Sutefuda by AI
--
-- >>> let Just straightFlush = toHand $ take 5 $ allCards
-- >>> aiSelectDiscards straightFlush
-- []
--
-- >>> let Just fourCard = toHand $ take 5 $ (filter ((==10) . cardNumber) allCards) ++ allCards
-- >>> aiSelectDiscards fourCard
-- [H2_]
--
-- >>> let Just buta = toHand $ take 5 $ (take 2 allCards) ++ (take 2 $ drop (13+5) allCards) ++ (drop (13*2+9) allCards)
-- >>> aiSelectDiscards buta
-- [H2_,H3_,D7_,D8_,CJ_]
--
aiSelectDiscards :: Hand -> DiscardList
aiSelectDiscards hand =
    fromMaybe (nOfKindDiscards hand)
        ((straightHint hand <|> flushHint hand) *> Just [])

-- | Sutefuda = Hand - allYaku
--
-- >>> let Just (x) = toHand $ take 5 $ (filter (\x -> (cardNumber x == 10)) $ allCards) ++ allCards
-- >>> fromHand x
-- [H2_,H10,D10,C10,S10]
-- >>> nOfKindDiscards x
-- [H2_]
nOfKindDiscards :: Hand -> DiscardList
nOfKindDiscards hand = fromHand hand \\ allNOfKinds hand
    where
        -- | all Yaku
        --
        -- >>> let Just (x) = toHand $ take 5 $ (filter (\x -> (cardNumber x == 10)) $ allCards) ++ allCards
        -- >>> allNOfKinds x
        -- [H10,D10,C10,S10]
        allNOfKinds :: Hand -> [Card]
        allNOfKinds h = concat . concat $ catMaybes [nOfKindHint 2 h, nOfKindHint 3 h, nOfKindHint 4 h]


text:
class Band
  searchkick
end


text:
export default function (min = 0, max = 255) {

    const r = min + Math.round(Math.random() * (max - min));
    const g = min + Math.round(Math.random() * (max - min));
    const b = min + Math.round(Math.random() * (max - min));

    return { r, g, b };

}


text:
package SNPiR::config;

use lib qw(../);

use base 'Exporter';

################################################################################
################################################################################
# $Revision: $
# Authors: Robert Piskol ( piskol@stanford.edu )
# Last modification $Author: piskol $
#
# configuration file

our $BLATEXE = '/opt/applications/ucsc_tools/273/gnu/bin/blat'; #this is the path to the blat executable
our $SAMTOOLSEXE = '/opt/applications/samtools/0.1.19/gnu/bin/samtools'; #this is the path to the samtools executable
our $FASTAFROMBED = '/opt/applications/bedtools/2.17.0/gnu/bin/fastaFromBed'; #this is the path to the fastaFromBed executable in the bedtools package

our @EXPORT = (
        '$BLATEXE',
        '$SAMTOOLSEXE',
        '$FASTAFROMBED',
);

1;


text:
    Revisar Asistenicia

    <?php if ( isset($_GET['ok']) && $_GET['ok'] == 1   ): ?>

 Asistencia Validada

    <?php endif ?>
      <form class="form form-horizontal" method="post" action="<?= site_url('AsistenciaTecnica/actualizarEstado/'.$asistencia->get('asi_id')); ?>">

Revise minuciosamente los campos

                Asistencia: # <?=trim($asistencia->get('asi_id'))?>

                  Estado

                    <?=$estados[trim($asistencia->get('asi_estado'))]?>

                  Fecha Inicio

                    <?=trim($asistencia->get('asi_fecha'))?>

                  Fecha Termino

                    <?=trim($asistencia->get('asi_fechasys'))?>

                  Empresa

                      <?=$empresa->get('emp_rsocial')?>

                  Servicio

                      <?=$servicio->get('ser_nombre')?>

                  Equipo:

                    <?php  foreach($equipo as $equ): ?>

<?=$equ->get('usu_nombres')." ".$equ->get('usu_apellidos')?> (<?=$equ->get('equ_tipo')?>)

                    <?php endforeach;?>

                  Descripción:

                   <?=$asistencia->get('asi_descripcion')?>

              Necesidades

                <textarea name="asistencia[asi_necesidades]" rows="3" class="form-control"><?=trim($asistencia->get('asi_necesidades'))?></textarea>

              Problema

                <textarea name="asistencia[asi_problema]" rows="3" class="form-control"><?=trim($asistencia->get('asi_problema'))?>
                </textarea>

              Solucion

                <textarea name="asistencia[asi_solucion]" rows="3" class="form-control"><?=trim($asistencia->get('asi_solucion'))?></textarea>

              O General

                <textarea name="asistencia[asi_ogeneral]" rows="3" class="form-control"><?=trim($asistencia->get('asi_ogeneral'))?></textarea>

              O Especificos

                <textarea name="asistencia[asi_ospecificos]" rows="3" class="form-control"><?=trim($asistencia->get('asi_ospecificos'))?></textarea>

              Antecedentes

                <textarea name="asistencia[asi_antecedentes]" rows="3" class="form-control"><?=trim($asistencia->get('asi_antecedentes'))?></textarea>

              Guia

                <textarea name="asistencia[asi_guia]" rows="3" class="form-control"><?=trim($asistencia->get('asi_guia'))?></textarea>

              Conclusiones

                <textarea name="asistencia[asi_conclusiones]" rows="3" class="form-control"><?=trim($asistencia->get('asi_conclusiones'))?></textarea>

              Descripcion

                <textarea name="asistencia[asi_descripcion]" rows="3" class="form-control"><?=trim($asistencia->get('asi_descripcion'))?></textarea>

        <?php if ($asistencia->get('asi_estado') == 2 || $asistencia->get('asi_estado') == 1 || $asistencia->get('asi_estado') == 0): ?>

              <button type="btn" class="btn btn-success">Guardar</button>

              <?php if ($asistencia->get('asi_estado') == 2  && in_array(1, $permisos)): ?>
                  <input  class="pull-right btn btn-info" type="submit" at="<?=$asistencia->get('asi_id')?>" estado="3"  value="Validar">
              <?php endif ?>
              <?php if ($asistencia->get('asi_estado') == 1  && in_array(1, $permisos)): ?>
                  <input class="pull-right btn btn-info"  type="submit" at="<?=$asistencia->get('asi_id')?>" estado="2"  value="Validar">
              <?php endif ?>

        <?php endif ?>

      </form>


text:
'''
Project 1 - Degree distributions for graphs
Raw Score   100.00 / 100.00
'''

import test_graphs as test

EX_GRAPH0 = {0:set([1,2]),1:set([]),2:set([])}
EX_GRAPH1 = {0:set([1,4,5]), 1:set([2,6]),
             2:set([3]), 3:set([0]), 4:set([1]), 5:set([2]), 6:set([]) }
EX_GRAPH2 = {0:set([1,4,5]), 1:set([2,6]), 2:set([3,7]),3:set([7]),
             4:set([1]), 5:set([2]), 6:set([]), 7:set([3]), 8:set([1,2]), 9:set([0,3,4,5,6,7])}

def make_complete_graph(num_nodes):
    '''
    takes a number of nodes and returnes
    a dictionary  corresponding to a complete
    directed graph with the specified number of nodes
    - in iteration 'node' is a key, 'd[node]' is a value
    of a dictionary.

    num_nodes - int.
    '''
    complete_graph = {}
    assert type(num_nodes) is int, "Input is not appropriate!"
    if num_nodes == 0:
        return set([0])
    elif num_nodes == 1:
        return {0:set([])}
    else:
        for node in range(num_nodes):
            complete_graph[node] = set()
            for neightbor in range(num_nodes):
                if neightbor != node:
                    complete_graph[node].add(neightbor)
                else:
                    continue
        return complete_graph
def compute_in_degrees(digraph):
    '''
    computes the in-degrees for the nodes in
    the graph. The function should return a
    dictionary with the same set of keys
    (nodes) as digraph whose corresponding
    values are the number of edges whose head
    matches a particular node.

    digraph - Directed graph, repr. as dictionary
    '''
    in_degrees = {}
    for node in digraph:
        counter = 0
        for neightbor in digraph:
            if node in digraph[neightbor]:
                counter +=1
            in_degrees[node] = counter

    return in_degrees

def in_degree_distribution(digraph):
    '''
    Computes the unnormalized distribution of the
    in-degrees of the graph. The function should
    return a dictionary whose keys correspond
    to in-degrees of nodes in the graph. The
    value associated with each particular i
    n-degree is the number of nodes with that
    in-degree. In-degrees with no corresponding
    nodes in the graph are not included in the dictionary.

    digraph - Directed graph, repr. as dictionary
    '''
    digraph = compute_in_degrees(digraph)
    distrib = {}
    for node in digraph:
        counter = 0
        for indegree in digraph:
            if digraph[node] == digraph[indegree]:
                counter +=1
        distrib[digraph[node]] = counter
    return distrib

def norm_in_degree_distribution(digraph):
    '''
    Normalizes in_degree_distribution
    '''
    total_nodes = float(len(digraph))
    distrib = in_degree_distribution(digraph)
    for node in distrib:
        distrib[node] = distrib[node] / total_nodes
    return distrib
#print in_degree_distribution(test.GRAPH2)
#print norm_in_degree_distribution(test.GRAPH2)


text:
__author__ = 'Tomasz Turowski'
"""Script to extract tRNA genes names only as a list for pyPileup.py, 24032015"""
## script uses pyCRAC GTF Parser to get from GTF file possible options to gent only intron_containing or intron less genes
import re
import sys, os, yaml
from optparse import *
from pyCRAC.Parsers import GTF2
from signal import signal, SIGPIPE, SIG_DFL
#sorting out GTF/FASTA file
def get_file(path_from_options, type='gtf'):
    types = {'gtf' : 'GTF_PATH' , 'fasta' : 'FASTA_PATH'}
    if path_from_options:
        return path_from_options
    elif 'default.aml' in os.listdir(os.getenv("HOME")+'/bin/'):
        default = yaml.load(open(os.getenv("HOME")+'/bin/default.aml'))
        # print "# Using "+type+" file from ~/bin/default.aml"
        return default[types[type]]
    else:
        if os.environ[types[type]]:
            # print "# Using "+type+" file from $"+types[type]+" variable"
            return os.environ[types[type]]
        else:
            exit('Provide '+type+' file path using -g/-f or setup default.aml in your bin folder')

def main():
    parser = OptionParser(usage="getGenesNames; type usage: %prog [options] -f filename")
    files = OptionGroup(parser, "File input options")
    files.add_option("-f", "--input_file", dest="gtf_file",
                     help="Provide the path to your gtf data file. Default is standard input.",
                     type="str", default=None)
    files.add_option("-g", "--genes", dest="genes",
                     help="Which biotype of features to get: mRNA, tRNA, rRNA, snRNA, snoRNA",
                     type="str", default='tRNA')
    files.add_option("-i", "--introns", dest="introns",
                     help="Introns? both - not discriminate; int_cont -only intron containing; int_less - only int less",
                     choices=["both", "int_cont", "int_less"], default="both"),
    files.add_option("-o", "--output_file", dest="output_file",
                     help="Use this flag to provide an output file name. Default is standard output.", default=None)
    parser.add_option_group(files)
    (options, args) = parser.parse_args()

    gtf_file = get_file(options.gtf_file, 'gtf')
    ### By default, input and output are expected from the standard input or standard output.
    signal(SIGPIPE,SIG_DFL)
    outfile = sys.stdout
    if options.output_file:
        outfile = open(options.output_file, "w")

    gtf = GTF2.Parse_GTF()
    gtf.read_GTF(gtf_file)
    names_list = list()

### for loop extracting tRNA names
    for line in open(gtf_file, "r"):
        if not line.startswith('#'):
            line_elements = line.strip().split('\t')
            # assert len(line_elements) == 10, 'Unexpected number of elements found in gtf line: ' + line
            if str(line_elements[1]) == options.genes:
                try:
                    name = re.search("gene_name\s\"(.*?)\"", str(line_elements[8])).group(1)
                except:
                    pass
                #     name = re.search("gene_id\s\"(.*?)\"", str(line_elements[8])).group(1)
                if options.introns == "both":
                    if name not in names_list:
                        names_list.append(name)
                    # outfile.write(str(name) + '\n')
                elif options.introns == "int_cont":
                    if gtf.intronCoordinates(name):
                        if name not in names_list:
                            names_list.append(name)
                        # outfile.write(str(name) + '\n')
                elif options.introns == "int_less":
                    if not gtf.intronCoordinates(name):
                        if name not in names_list:
                            names_list.append(name)
                        # outfile.write(str(name) + '\n')

    outfile.write('\n'.join(names_list)+'\n')
    outfile.close()

main()


text:
/*
This question is from https://leetcode.com/problems/binary-tree-upside-down/
Difficulty: medium

Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it upside down and turn it into a tree where the original right nodes turned into left leaf nodes. Return the new root.

Example:

Input: [1,2,3,4,5]

    1
   / \
  2   3
 / \
4   5

Output: return the root of the binary tree [4,5,2,#,#,3,1]

   4
  / \
 5   2
    / \
   3   1
Clarification:

Confused what [4,5,2,#,#,3,1] means? Read more below on how binary tree is serialized on OJ.

The serialization of a binary tree follows a level order traversal, where '#' signifies a path terminator where no node exists below.

Here's an example:

   1
  / \
 2   3
    /
   4
    \
     5
The above binary tree is serialized as [1,2,3,#,#,4,#,#,5].
*/
// https://leetcode.com/problems/binary-tree-upside-down/discuss/49406/Java-recursive-(O(logn)-space)-and-iterative-solutions-(O(1)-space)-with-explanation-and-figure
/**
 * Definition for a binary tree node.
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode(int x) { val = x; }
 * }
 */

// T:O(N), S:O(1), 0 ms
class Solution {
    public TreeNode upsideDownBinaryTree(TreeNode root) {
        if(root == null || root.left == null) return root;

        TreeNode newNode = upsideDownBinaryTree(root.left);
        root.left.left = root.right;
        root.left.right = root;
        root.left = null;
        root.right = null;
        return newNode;
    }
}


text:
js.amcharts
***********

Introduction
============

This library packages `amCharts`_ for `fanstatic`_. It provides both the
`Chart`_ and `Stock`_ Javascript chart libraries.

.. _fanstatic: http://fanstatic.org
.. _amCharts: http://www.amcharts.com
.. _Stock: http://www.amcharts.com/stock-chart/
.. _Chart: http://www.amcharts.com/javascript-charts/

This requires integration between your web framework and ``fanstatic``, and
making sure that the original resources (shipped in the ``resources`` directory
in ``js.amcharts``) are published to some URL.

You can find the repository for this package at
https://github.com/securactive/js.amcharts


text:
package core;

import java.util.Random;
import java.util.Scanner;

import entrenadores.Entrenador;
import habilidad.Categoria;
import habilidad.Habilidad;
import logica.CalculosCombate;
import logica.MatrizEfectividad;
import pokemon.Pokemon;

/**
 *
 * @author Javier Beltran, Jorge Cancer, Alejandro Dieste
 *
 *         Clase que contiene la funcionalidad de un combate Pokemon.
 *
 */
public class Combate {

	private Entrenador entrenador;
	private Pokemon pokemon;

	/**
	 *
	 * Crea un combate pokemon entre un entrenador y un pokemon salvaje. Un
	 * entrenador podra jugar con los pokemon que tenga equipados.
	 *
	 * @param e
	 *            el entrenador.
	 * @param p
	 *            el pokemon.
	 */
	public Combate(Entrenador e, Pokemon p) {
		entrenador = e;
		pokemon = p;
	}

	/**
	 * Contiene la funcionalidad de un combate pokemon, es decir, pregunta a
	 * cada turno que habilidad desea realizar el jugador y ejecuta la accion
	 * producida por su accion y por la del enemigo.
	 */
	public boolean luchar() {
		Scanner input = new Scanner(System.in);
		Pokemon aliado = entrenador.getEquipo().get(0);
		Pokemon enemigo = this.pokemon;
		printInicioCombate();

		/* Bucle principal del combate */
		do {
			printPregunta();
			int accion = input.nextInt();
			if (accion == 1) {
				printAtaques();
				int ataqueAliado = input.nextInt();
				int ataqueEnemigo = decidir(enemigo);

				/* El pokemon mas veloz ataca antes que el otro */
				if (aliado.getVelocidad() >= enemigo.getVelocidad()) {
					ejecutar(aliado, enemigo, aliado.getHabilidad(ataqueAliado));
					ejecutar(enemigo, aliado, enemigo.getHabilidad(ataqueEnemigo));
				} else {
					ejecutar(enemigo, aliado, enemigo.getHabilidad(ataqueEnemigo));
					ejecutar(aliado, enemigo, aliado.getHabilidad(ataqueAliado));
				}

				/* Comprueba si algun pokemon ha sido derrotado */
				if (!enemigo.vivo()) {
					printEnemigoDerrotado();
					// Subir experiencia
				} else if (!aliado.vivo()) {
					printAliadoDerrotado(aliado);

					if (entrenador.vivo()) {
						// Cambiar pokemon
					}
				}
			} else if (accion == 2) {
				// Cambiar pokemon
			} else if (accion == 3) {
				// Mochila
			} else {
				printHuida();
			}
		} while (entrenador.vivo() && enemigo.vivo());
		input.close();

		if (entrenador.vivo()) {
			printVictoria();
			// Ganar dinero.
			return true;
		} else {
			printDerrota();
			// Perder dinero.
			return false;
		}

	}

	/**
	 *
	 * El sistema decide que habilidad desea utilizar el pokemon enemigo.
	 *
	 * @param enemigo
	 *            el pokemon cuyo ataque se va a decidir.
	 * @return el indice de la habilidad que elige utilizar.
	 */
	public int decidir(Pokemon enemigo) {
		Random random = new Random();
		int l = enemigo.getHabilidades().length;
		int ataque=random.nextInt(l)+1;
		while(enemigo.getHabilidad(ataque)==null){
			ataque=random.nextInt(l)+1;
		}
		return ataque;
	}

	/**
	 *
	 * Realiza la accion de un pokemon haciendo una habilidad en combate. Su
	 * resultado modifica los puntos de vida o el estado de los pokemon
	 * implicados en el combate. Devuelve -1 si ha fallado. 0 se si ha acertado.
	 * 1 si no afecta la habilidad. 2 si no es muy efectivo. 3 si es muy
	 * efectivo
	 *
	 * @param p1
	 *            el pokemon atacante.
	 * @param p2
	 *            el pokemon que es atacado.
	 * @param habilidad
	 *            la habilidad que p1 realiza sobre p2.
	 */
	public int ejecutar(Pokemon p1, Pokemon p2, Habilidad habilidad) {
		printAtaque(p1, habilidad);
		int opt = 0;
		/* Decide si acierta o no */
		boolean acierto = CalculosCombate.calcularAcierto(p1, p2, habilidad);
		if (acierto) {
			/* Decide si es golpe critico o no */
			boolean critico = CalculosCombate.calcularCritico(p1);
			int dano = CalculosCombate.calcularDano(p1, p2, habilidad);

			if (critico) {
				/* Si es critico, quita el doble de ps */
				printCritico();
				dano *= 2;
			}
			opt = printEfectividad(habilidad, p2);
			p2.restarPs(dano);
		} else {
			printFallo();
		}
		if (acierto) {
			return opt;
		} else {
			return -1;
		}
	}

	public Entrenador getEntrenador() {
		return entrenador;
	}

	public void setEntrenador(Entrenador entrenador) {
		this.entrenador = entrenador;
	}

	public Pokemon getPokemon() {
		return pokemon;
	}

	public void setPokemon(Pokemon pokemon) {
		this.pokemon = pokemon;
	}

	// Cambiar todos estos metodos para que se pinte el texto en el juego

	private void printInicioCombate() {
		Pokemon p1 = entrenador.getEquipo().get(0);
		System.out.println("Un " + pokemon.getNombre() + " salvaje quiere luchar!");
		System.out.println(entrenador.getNombre() + " saco a " + p1.getNombre());
	}

	private void printPregunta() {
		System.out.println("Que quieres hacer?");
		System.out.println("1. Atacar.");
		System.out.println("2. Pokemon.");
		System.out.println("3. Mochila.");
		System.out.println("4. Huir.");
	}

	private void printAtaques() {
		System.out.println("1. " + pokemon.getHabilidad1());
		System.out.println("2. " + pokemon.getHabilidad2());
		System.out.println("3. " + pokemon.getHabilidad3());
		System.out.println("4. " + pokemon.getHabilidad4());
	}

	private void printHuida() {
		System.out.println("Escapaste sano y salvo!");
	}

	private void printAliadoDerrotado(Pokemon aliado) {
		System.out.println("Tu " + aliado.getNombre() + " ha sido derrotado!");
	}

	private void printEnemigoDerrotado() {
		System.out.println("El " + pokemon.getNombre() + "enemigo ha sido derrotado!");
	}

	private void printVictoria() {
		System.out.println("Has ganado el combate!");
	}

	private void printDerrota() {
		System.out.println("A " + entrenador.getNombre() + " no le quedan mas pokemon! " + entrenador.getNombre()
				+ " ha sido debilitado!");
	}

	private void printAtaque(Pokemon p, Habilidad h) {
		System.out.println(p.getNombre() + " utilizo " + h.getNombre() + "!");
	}

	private void printFallo() {
		System.out.println("Pero fallo!");
	}

	private void printCritico() {
		System.out.println("Un golpe critico!");
	}

	private int printEfectividad(Habilidad h, Pokemon p) {
		double factor = MatrizEfectividad.getEfectividad(h, p);
		int ret = 0;
		if (factor == 0) {
			System.out.println("No afecto a " + p.getNombre() + "...");
			ret = 1;
		} else if (factor <= 0.5) {
			System.out.println("No es muy efectivo...");
			ret = 2;
		} else if (factor >= 2) {
			System.out.println("Es muy efectivo!");
			ret = 3;
		}
		return ret;
	}

	public void combatir(int ataqueAliado) {
		Pokemon aliado = entrenador.getEquipo().get(0);
		Pokemon enemigo = this.pokemon;
		int ataqueEnemigo = decidir(enemigo);

		/* El pokemon mas veloz ataca antes que el otro */
		if (aliado.getVelocidad() >= enemigo.getVelocidad()) {
			ejecutar(aliado, enemigo, aliado.getHabilidad(ataqueAliado));
			ejecutar(enemigo, aliado, enemigo.getHabilidad(ataqueEnemigo));
		} else {
			ejecutar(enemigo, aliado, enemigo.getHabilidad(ataqueEnemigo));
			ejecutar(aliado, enemigo, aliado.getHabilidad(ataqueAliado));
		}
	}

	public boolean getVelocidad(int i) {
		Pokemon aliado = entrenador.getEquipo().get(i);
		Pokemon enemigo = this.pokemon;
		/* El pokemon mas veloz ataca antes que el otro */
		return aliado.getVelocidad() >= enemigo.getVelocidad();
	}

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Geastrum fornicatum var. multifidus Fr.

### Remarks
null


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

<title>Uses of Interface dollar.http.NanoHttpdServer.TempFileManager (Dollar 0.4.5195 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="date" content="2017-09-28">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

SEARCH:
<input type="text" id="search" value=" " disabled="disabled">
<input type="reset" id="reset" value=" " disabled="disabled">

JavaScript is disabled on your browser.

Uses of Interface
dollar.http.NanoHttpdServer.TempFileManager

Packages that use NanoHttpdServer.TempFileManager

Package
Description

dollar.http

Uses of NanoHttpdServer.TempFileManager in dollar.http

Classes in dollar.http that implement NanoHttpdServer.TempFileManager

Modifier and Type
Class
Description

static class
NanoHttpdServer.DefaultTempFileManager

Default strategy for creating and cleaning up temporary files.

Methods in dollar.http that return NanoHttpdServer.TempFileManager

Modifier and Type
Method
Description

@NotNull NanoHttpdServer.TempFileManager
NanoHttpdServer.TempFileManagerFactory.create()

Constructors in dollar.http with parameters of type NanoHttpdServer.TempFileManager

Constructor
Description

HTTPSession(@NotNull NanoHttpdServer.TempFileManager tempFileManager,
           @NotNull InputStream inputStream,
           @NotNull OutputStream outputStream)

HTTPSession(@NotNull NanoHttpdServer.TempFileManager tempFileManager,
           @NotNull InputStream inputStream,
           @NotNull OutputStream outputStream,
           @NotNull InetAddress inetAddress)

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

JavaScript is disabled on your browser.

Copyright © 2017. All rights reserved.


text:
@interface UIImageView (CCWeakNetwork)

// 弱网不下载图片 .
- (void) ccSDImage : (NSString *) stringLik
       holderImage : (NSString *) stringImageName ;

@end


text:
<?php

namespace tests\codeception\frontend\_pages;

use \yii\codeception\BasePage;

/**
 * Represents signup page
 *
 * @property \codeception_frontend\AcceptanceTester|\codeception_frontend\FunctionalTester $actor
 */
class SignupPage extends BasePage {
	public $route = 'site/signup';

	/**
	 *
	 * @param array $signupData
	 */
	public function submit(array $signupData) {
		foreach ( $signupData as $field => $value ) {
			$inputType = $field === 'body' ? 'textarea' : 'input';
			$this->actor->fillField ( $inputType . '[name="SignupForm[' . $field . ']"]', $value );
		}
		$this->actor->click ( 'signup-button' );
	}
}


text:
define(['sprd/data/SprdModel', 'sprd/model/PrintType', 'sprd/entity/Size', 'sprd/entity/DesignColor', 'sprd/entity/Price', 'js/data/Entity', 'sprd/model/Locale', 'js/core/List'], function (SprdModel, PrintType, Size, DesignColor, Price, Entity, Locale, List) {

    var DENY_ON = {
        No: "NO",
        OnPrintArea: "onPrintArea",
        OnProduct: "onProduct"
    };

    var DesignServiceState = {
        APPROVED: "APPROVED",
        TO_BE_APPROVED: "TO_BE_APPROVED",
        REJECTED: "REJECTED",
        TO_BE_APPROVED_BY_USER: "TO_BE_APPROVED_BY_USER",
        NO_IMAGE_UPLOADED: "NO_IMAGE_UPLOADED"
    };

    var Translation = Entity.inherit('app.model.TranslatedDesign.Translation', {
        schema: {
            locale: Locale,
            name: String,
            description: String,
            tags: String,
            userContent: Boolean,
            version: Number
        },

        defaults: {
            name: '',
            description: '',
            tags: '',
            userContent: true,
            version: null
        }
    });

    var Restrictions = Entity.inherit('sprd.model.Design.Restrictions', {

        defaults: {
            denyOtherDesigns: DENY_ON.No,
            denyOtherText: DENY_ON.No
        },

        schema: {
            fixedColors: Boolean,
            colorCount: Number,
            ownText: Boolean,
            minimumScale: Number,
            denyOtherText: String,
            denyOtherDesigns: String,

            allowScale: Boolean,
            allowFlip: Boolean,
            allowRotate: Boolean
        }

    });

    var Design = SprdModel.inherit('sprd.model.Design', {
        defaults: {
            name: '',
            description: '',
            restrictions: null,
            designServiceState: null,
            localImage: null,
            htmlImage: null,
            relatedDesigns: null
        },

        schema: {
            name: String,
            description: String,
            size: Size,
            printTypes: [PrintType],

            tags: String,

            colors: [DesignColor],
            backgroundColor: String,

            price: Price,

            restrictions: Restrictions,
            user: "sprd/model/User",

            designServiceState: {
                required: false,
                type: String
            },

            translations: [Translation],
            resources: Object
        },

        parse: function (data) {
            data = this.callBase();

            if (data.href) {
                data.wtfMbsId = data.id;
                data.id = data.href.split("/").pop();
            }

            return data;
        },

        isVectorDesign: function () {
            return this.$.colors && this.$.colors.length > 0;
        },

        hasBackgroundColor: function () {

            if (this.$hasBackgroundColor === true || this.$.backgroundColor) {
                return true;
            }

            if (!this.$hasBackgroundColor === false) {
                // already search
                return false;
            }

            var ret = false;

            // requesting without fullData will not give us a payload for
            // background color or not, that's why we search within resources

            var resources = this.$.resources;
            if (resources instanceof Array) {
                for (var i = 0; i < resources.length; i++) {
                    var obj = resources[i];
                    if (obj && obj.href && /backgroundColor/.test(obj.href)) {
                        ret = true;
                        break;
                    }
                }
            }

            this.$hasBackgroundColor = ret;
            return ret;

        }.onChange("backgroundColor"),

        getTranslationForLocale: function (locale) {
            var translations = this.$.translations,
                translation;

            if (translations) {
                for (var i = 0, num = translations.length; i < num; i++) {
                    translation = translations[i];

                    if (translation.get('locale.id') === locale.get('id')) {
                        return translation;
                    }
                }
            }

            return null;
        },

        isUploaded: function() {
            return this.$.id && this.$.id.indexOf("u") === 0;
        },

        getRelatedTag: function () {
            var tags = this.$.tags;

            if (!tags) {
                return "";
            }

            return tags.split(",")[0];
        },

        setTranslation: function (translation) {
            var locale = translation.get('locale'),
                previousTranslation;

            if (!locale) {
                this.log('no locale set; translation not saved', 'warn');
                return;
            }

            previousTranslation = this.getTranslationForLocale(locale);

            if (previousTranslation) {
                previousTranslation.set(translation);
            } else {
                if (!this.get('translations')) {
                    this.$.translations = [];
                }

                this.$.translations.push(translation);
            }
        }
    });

    Design.DesignServiceState = DesignServiceState;
    Design.Restrictions = Restrictions;
    Design.Translation = Translation;
    Design.Locale = Locale;

    return Design;

});


text:
import React, { useRef } from 'react'
import './index.scss'
import Modal from '../Modal'

interface P {
  path: number[]
  buttons: Button[]
  mode: 'add' | 'update'
  setState: any
}

export default (props: P) => {
  const nameInput = useRef<HTMLInputElement>(null)
  const urlInput = useRef<HTMLInputElement>(null)

  function remove() {
    const { buttons, path } = props
    const [i, j] = path

    let newButtons: Button[] = []
    if (path.length === 1) {
      newButtons = buttons.filter((_, _i) => _i !== i)
    } else if (path.length === 2) {
      newButtons = buttons.slice()
      newButtons[i].sub_button = newButtons[i].sub_button.filter(
        (_, _j) => _j !== j,
      )
    }

    props.setState({
      buttons: newButtons,
      path: [],
    })
  }

  function confirmRemove() {
    const { buttons, path } = props
    const [i, j] = path
    const name =
      path.length === 1 ? buttons[i].name : buttons[i].sub_button[j].name

    Modal.confirm({
      type: 'warning',
      title: `确认删除"${name}"?`,
      body: '此操作不可撤销!',
      onConfirm: remove,
    })
  }

  function update(e: React.FormEvent<HTMLFormElement>) {
    e.preventDefault()
    if (props.mode === 'add') {
      return add()
    }

    if (!e.currentTarget.checkValidity()) {
      return
    }

    const { buttons, path } = props
    const [i, j] = path

    let newButtons = buttons.slice()
    if (path.length === 1) {
      newButtons[i].name = nameInput.current!.value
    } else if (path.length === 2) {
      const subButton = newButtons[i].sub_button[j]
      subButton.name = nameInput.current!.value
      subButton.url = urlInput.current!.value
    }

    props.setState({
      buttons: newButtons,
      path: [],
    })
  }

  function add() {
    if (!nameInput.current!.value) {
      return
    }

    const { buttons, path } = props
    const [i, j] = path

    let newButtons = buttons.slice()
    if (path.length === 1) {
      newButtons.splice(i, 0, {
        name: nameInput.current!.value,
        sub_button: [],
      })
    } else if (path.length === 2) {
      newButtons[i].sub_button.splice(j, 0, {
        type: 'view',
        name: nameInput.current!.value,
        url: urlInput.current!.value,
        sub_button: [],
      })
    }

    props.setState({
      buttons: newButtons,
      path: [],
    })
  }

  const { buttons, path, mode } = props
  const [i, j] = path

  const addMode = mode === 'add'
  const actions = (

      {addMode || (
        <button type="button" onClick={confirmRemove} className={$.del}>
          删除
        </button>
      )}
      <button type="submit" className={addMode ? $.add : $.save}>
        {addMode ? '新增' : '保存'}
      </button>

  )
  switch (path.length) {
    case 1:
      return (
        <form className={$.editor} onSubmit={update}>
          名称
          <input
            name="name"
            ref={nameInput}
            required
            defaultValue={addMode ? '' : buttons[i].name}
          />
          {actions}
        </form>
      )
    case 2:
      return (
        <form className={$.editor} onSubmit={update}>
          名称
          <input
            name="name"
            ref={nameInput}
            required
            defaultValue={addMode ? '' : buttons[i].sub_button[j].name}
          />
          URL
          <input
            type="url"
            name="url"
            ref={urlInput}
            required
            defaultValue={addMode ? '' : buttons[i].sub_button[j].url}
          />
          {actions}
        </form>
      )
    default:
      return
请在左侧面板中选择一个菜单项。

  }
}


text:
package net.youmi.ads.base.utils;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * @author zhitao
 * @since 2017-04-20 10:34
 */
public class SPUtils {

	private final static String PREFERENCE_NAME = "cp";

	public static boolean putString(Context context, String key, String value) {
		SharedPreferences settings = context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_MULTI_PROCESS);
		SharedPreferences.Editor editor = settings.edit();
		editor.putString(key, value);
		return editor.commit();
	}

	public static String getString(Context context, String key) {
		return getString(context, key, null);
	}

	public static String getString(Context context, String key, String defaultValue) {
		SharedPreferences settings = context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_MULTI_PROCESS);
		return settings.getString(key, defaultValue);
	}
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent" android:layout_height="match_parent" android:padding="30dp">

    <RadioGroup
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_alignParentStart="true"

        android:id="@+id/radiogroup"
        >
        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Change this slot into another existing slot:"
            android:id="@+id/rb1"
            />

        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Change this course into another course:"
            android:id="@+id/rb2"/>

    </RadioGroup>

    <EditText
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:ems="10"
        android:layout_below="@id/radiogroup"
        android:layout_centerHorizontal="true"
        android:id="@+id/editText"
        />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Done"
        android:id="@+id/donebutton"

        android:layout_marginTop="130dp"
        android:layout_toStartOf="@+id/dismissbutton" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Dismiss"
        android:id="@+id/dismissbutton"
        android:layout_alignParentRight="true"
        android:layout_marginTop="130dp"
        />

</RelativeLayout>


text:
namespace base {
class Timer;
}  // namespace base

namespace extensions {

class WiFiDisplayMediaManager;

// This class represents a single Wi-Fi Display session.
// It manages life-cycle of the session and it is also responsible for
// exchange of session controlling (RTSP) messages with the sink.
class WiFiDisplaySession: public DisplaySourceSession,
                          public WiFiDisplaySessionServiceClient,
                          public wds::Peer::Delegate,
                          public wds::Peer::Observer {
 public:
  explicit WiFiDisplaySession(
      const DisplaySourceSessionParams& params);
  ~WiFiDisplaySession() override;

 private:
  using DisplaySourceSession::CompletionCallback;
  // DisplaySourceSession overrides.
  void Start(const CompletionCallback& callback) override;
  void Terminate(const CompletionCallback& callback) override;

  // WiFiDisplaySessionServiceClient overrides.
  void OnConnected(const mojo::String& ip_address) override;
  void OnConnectRequestHandled(bool success,
                               const mojo::String& error) override;
  void OnTerminated() override;
  void OnDisconnectRequestHandled(bool success,
                                  const mojo::String& error) override;
  void OnError(int32_t type, const mojo::String& description) override;
  void OnMessage(const mojo::String& data) override;

  // wds::Peer::Delegate overrides.
  unsigned CreateTimer(int seconds) override;
  void ReleaseTimer(unsigned timer_id) override;
  void SendRTSPData(const std::string& message) override;
  std::string GetLocalIPAddress() const override;
  int GetNextCSeq(int* initial_peer_cseq = nullptr) const override;

  // wds::Peer::Observer overrides.
  void ErrorOccurred(wds::ErrorType error) override;
  void SessionCompleted() override;

  // A connection error handler for the mojo objects used in this class.
  void OnIPCConnectionError();

  void RunStartCallback(bool success, const std::string& error = "");
  void RunTerminateCallback(bool success, const std::string& error = "");

 private:
  scoped_ptr<wds::Source> wfd_source_;
  scoped_ptr<WiFiDisplayMediaManager> media_manager_;
  WiFiDisplaySessionServicePtr service_;
  mojo::Binding<WiFiDisplaySessionServiceClient> binding_;
  std::string ip_address_;
  std::map<int, scoped_ptr<base::Timer>> timers_;

  DisplaySourceSessionParams params_;
  CompletionCallback start_completion_callback_;
  CompletionCallback teminate_completion_callback_;
  // Holds sequence number for the following RTSP request-response pair.
  mutable int cseq_;
  int timer_id_;
  base::WeakPtrFactory<WiFiDisplaySession> weak_factory_;

  DISALLOW_COPY_AND_ASSIGN(WiFiDisplaySession);
};

}  // namespace extensions

#endif  // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_SESSION_H_


text:
namespace tao::json
{
   namespace internal
   {
      // JSON Reference, see draft ("work in progress") RFC at
      // https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03

      // NOTE: Currently, only URI fragments are supported.
      // Remote references are ignored, i.e., left untouched.

      // JSON References are replaced with a VALUE_PTR,
      // which might lead to infinite loops if you try
      // to traverse the value. Make sure you understand
      // the consequences and handle the resulting value
      // accordingly!

      // Self-references will throw an exception, as well as
      // references into JSON Reference additional members
      // (which shall be ignored as per the specification).

      template< template< typename... > class Traits >
      void resolve_references( basic_value< Traits >& r, basic_value< Traits >& v )
      {
         switch( v.type() ) {
            case type::UNINITIALIZED:
               return;
            case type::NULL_:
            case type::BOOLEAN:
            case type::SIGNED:
            case type::UNSIGNED:
            case type::DOUBLE:
            case type::STRING:
            case type::STRING_VIEW:
            case type::BINARY:
            case type::BINARY_VIEW:
               return;
            case type::ARRAY:
               for( auto& e : v.get_array() ) {
                  resolve_references( r, e );
               }
               return;
            case type::OBJECT:
               for( auto& e : v.get_object() ) {
                  resolve_references( r, e.second );
               }
               if( const auto* ref = v.find( "$ref" ) ) {
                  ref = &ref->skip_value_ptr();
                  if( ref->is_string_type() ) {
                     const std::string_view s = ref->get_string_type();
                     if( !s.empty() && s[ 0 ] == '#' ) {
                        const pointer ptr = internal::uri_fragment_to_pointer( s );
                        const auto* p = &r;
                        auto it = ptr.begin();
                        while( it != ptr.end() ) {
                           switch( p->type() ) {
                              case type::ARRAY:
                                 p = &p->at( it->index() ).skip_value_ptr();
                                 break;
                              case type::OBJECT:
                                 if( const auto* t = p->find( "$ref" ) ) {
                                    if( t->is_string_type() ) {
                                       throw std::runtime_error( "invalid JSON Reference: referencing additional data members is invalid" );
                                    }
                                 }
                                 p = &p->at( it->key() ).skip_value_ptr();
                                 break;
                              default:
                                 throw invalid_type( ptr.begin(), std::next( it ) );
                           }
                           ++it;
                        }
                        if( p == &v ) {
                           throw std::runtime_error( "JSON Reference: invalid self reference" );
                        }
                        v.set_value_ptr( p );
                        resolve_references( r, v );
                     }
                     else {
                        // Ignore remote references for now...
                        // throw std::runtime_error( "JSON Reference: unsupported or invalid URI: " + s ); // NOLINT
                     }
                  }
               }
               return;
            case type::VALUE_PTR:
               return;
            case type::OPAQUE_PTR:
               return;
            case type::VALUELESS_BY_EXCEPTION:
               return;
         }
         throw std::logic_error( "invalid value for tao::json::type" );  // LCOV_EXCL_LINE
      }

   }  // namespace internal

   template< template< typename... > class Traits >
   void resolve_references( basic_value< Traits >& r )
   {
      internal::resolve_references( r, r );
   }

}  // namespace tao::json

#endif


text: Juego del ahorcado simple como ejemplo de aplicación Android


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>

   <groupId>com.zaxxer</groupId>
   <artifactId>HikariCP-parent</artifactId>
   <version>2.3.7-SNAPSHOT</version>
   <packaging>pom</packaging>

   <name>HikariCP-parent</name>
   <description>Ultimate JDBC Connection Pool</description>
   <url>https://github.com/brettwooldridge/HikariCP</url>

   <organization>
      <name>Zaxxer.com</name>
      <url>https://github.com/brettwooldridge</url>
   </organization>

   <scm>
      <connection>scm:git:git@github.com:brettwooldridge/HikariCP.git</connection>
      <developerConnection>scm:git:git@github.com:brettwooldridge/HikariCP.git</developerConnection>
      <url>git@github.com:brettwooldridge/HikariCP.git</url>
      <tag>HikariCP-2.3.2</tag>
   </scm>

   <licenses>
      <license>
         <name>The Apache Software License, Version 2.0</name>
         <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
         <distribution>repo</distribution>
      </license>
   </licenses>

   <developers>
      <developer>
         <name>Brett Wooldridge</name>
         <email>brett.wooldridge@gmail.com</email>
      </developer>
   </developers>

   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <felix.version>4.6.0</felix.version>
      <hibernate.version>4.3.8.Final</hibernate.version>
      <javassist.version>3.19.0-GA</javassist.version>
      <jndi.version>0.11.4.1</jndi.version>
      <metrics.version>3.1.1</metrics.version>
      <mockito.version>1.10.19</mockito.version>
      <pax.exam.version>3.4.0</pax.exam.version>
      <pax.url.version>2.3.0</pax.url.version>
      <slf4j.version>1.7.10</slf4j.version>
   </properties>

   <parent>
      <groupId>org.sonatype.oss</groupId>
      <artifactId>oss-parent</artifactId>
      <version>7</version>
   </parent>

   <modules>
      <module>hikaricp</module>
      <module>hikaricp-java6</module>
   </modules>

   <dependencies>
      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
         <version>${slf4j.version}</version>
      </dependency>
      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-simple</artifactId>
         <version>${slf4j.version}</version>
         <optional>true</optional>
      </dependency>
      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-all</artifactId>
         <version>${mockito.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.javassist</groupId>
         <artifactId>javassist</artifactId>
         <version>${javassist.version}</version>
         <scope>compile</scope>
      </dependency>
      <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-core</artifactId>
         <version>${hibernate.version}</version>
         <scope>provided</scope>
         <optional>true</optional>
      </dependency>
      <dependency>
         <groupId>io.dropwizard.metrics</groupId>
         <artifactId>metrics-core</artifactId>
         <version>${metrics.version}</version>
         <scope>provided</scope>
         <optional>true</optional>
      </dependency>
      <dependency>
         <groupId>io.dropwizard.metrics</groupId>
         <artifactId>metrics-healthchecks</artifactId>
         <version>${metrics.version}</version>
         <scope>provided</scope>
         <optional>true</optional>
      </dependency>
      <dependency>
         <groupId>simple-jndi</groupId>
         <artifactId>simple-jndi</artifactId>
         <version>${jndi.version}</version>
         <scope>test</scope>
      </dependency>

      <!-- OSGi test -->
      <dependency>
         <groupId>javax.inject</groupId>
         <artifactId>javax.inject</artifactId>
         <version>1</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.felix</groupId>
         <artifactId>org.apache.felix.framework</artifactId>
         <version>${felix.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.ops4j.pax.exam</groupId>
         <artifactId>pax-exam-container-native</artifactId>
         <version>${pax.exam.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.ops4j.pax.exam</groupId>
         <artifactId>pax-exam-junit4</artifactId>
         <version>${pax.exam.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.ops4j.pax.exam</groupId>
         <artifactId>pax-exam-link-mvn</artifactId>
         <version>${pax.exam.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.ops4j.pax.url</groupId>
         <artifactId>pax-url-aether</artifactId>
         <version>${pax.url.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.ops4j.pax.url</groupId>
         <artifactId>pax-url-reference</artifactId>
         <version>${pax.url.version}</version>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <pluginManagement>
         <plugins>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-release-plugin</artifactId>
               <version>2.5</version>
               <configuration>
                  <autoVersionSubmodules>true</autoVersionSubmodules>
                  <tagNameFormat>HikariCP-@{project.version}</tagNameFormat>
               </configuration>
            </plugin>

            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-surefire-plugin</artifactId>
               <version>2.15</version>
               <configuration>
                  <!-- Sets the VM argument line used when unit tests are run. -->
                  <argLine>${surefireArgLine}</argLine>
                  <!-- Skips unit tests if the value of skip.unit.tests property is true -->
                  <skipTests>${skip.unit.tests}</skipTests>
               </configuration>
            </plugin>

            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-source-plugin</artifactId>
               <version>2.2.1</version>
               <configuration>
                  <!-- outputDirectory>/absolute/path/to/the/output/directory</outputDirectory> <finalName>filename-of-generated-jar-file</finalName -->
                  <attach>true</attach>
               </configuration>
               <executions>
                  <execution>
                     <id>attach-sources</id>
                     <goals>
                        <goal>jar</goal>
                     </goals>
                  </execution>
               </executions>
            </plugin>

            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-javadoc-plugin</artifactId>
               <version>2.9.1</version>
               <configuration>
                  <show>public</show>
                  <!-- excludePackageNames>com.zaxxer.hikari.*</excludePackageNames -->
                  <attach>true</attach>
                  <maxmemory>1024m</maxmemory>
                  <sourcepath>../hikaricp-common/src/main/java</sourcepath>
               </configuration>
               <executions>
                  <execution>
                     <id>bundle-sources</id>
                     <phase>package</phase>
                     <goals>
                        <goal>jar</goal>
                     </goals>
                  </execution>
               </executions>
            </plugin>

         </plugins>
      </pluginManagement>
   </build>

   <profiles>
      <profile>
         <id>release-sign-artifacts</id>
         <activation>
            <property>
               <name>performRelease</name>
               <value>true</value>
            </property>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-gpg-plugin</artifactId>
                  <version>1.4</version>
                  <executions>
                     <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                           <goal>sign</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>


text:
YUI.add('Poster', function(Y, NAME) {

    Y.namespace('mojito.controllers')[NAME] = {

        index: function(ac) {
            ac.done({
                desc: "Submit for for example of POST processing.",
                desc1: "Submit for for example of filtered POST processing.",
                desc2: "Submit for for example of POST simple processing."
            });
        }

    };

}, '0.0.1', {requires: ['mojito']});


text:
package br.com.devmedia.javamagazine.restfulapi.rest.resource;

import br.com.devmedia.javamagazine.restfulapi.model.bean.Comment;
import br.com.devmedia.javamagazine.restfulapi.model.bean.Post;
import br.com.devmedia.javamagazine.restfulapi.rest.controller.BaseController;
import br.com.devmedia.javamagazine.restfulapi.service.UserService;

import javax.ws.rs.*;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import java.util.*;

@SuppressWarnings("unchecked")
public class PostResource extends Link{

    private UserService userService;

    public static final String AUTHOR = "author";
    public static final String TITLE = "title";
    public static final String TEXT = "text";
    public static final String DATE_CREATED = "dateCreated";
    public static final String COMMENTS = "comments";

    public PostResource(UriInfo info, Post post, Collection<String> fields, Collection<String> expand) {
        super(info, post);

        if(fields == null || fields.isEmpty()){
            fields = getDefaultFields();
        }

        if(expand == null){
            expand = Collections.emptyList();
        }

        if(fields.contains(AUTHOR)){
            if(expand.contains(AUTHOR)){
                put(AUTHOR, new UserResource(info, post.getAuthor()));
            }
            else {
                put(AUTHOR, new Link(info, post.getAuthor()));
            }
        }

        if(fields.contains(TITLE)){
            put(TITLE, post.getTitle());
        }

        if(fields.contains(TEXT)){
            put(TEXT, post.getText());
        }

        if(fields.contains(DATE_CREATED)){
            put(DATE_CREATED, post.getDateCreated());
        }

        if(fields.contains(COMMENTS)){
            List<Comment> comments = Comment.findCommentsByPost(post, CollectionResource.DEFAULT_OFFSET, CollectionResource.DEFAULT_LIMIT);

            List<Link> commentResources = new ArrayList<Link>(comments.size());

            for(Comment comment : comments){
                commentResources.add(new Link(info, comment));
            }

            put(COMMENTS, new CollectionResource(info, getPathForComments(post.getId()), commentResources));
        }
    }

    public PostResource(UriInfo info, Post post) {
        this(info, post, getDefaultFields(), null);
    }

    public static Collection<String> getDefaultFields(){
        return Arrays.asList(AUTHOR, TITLE, TEXT, DATE_CREATED);
    }

    private static String getPathForComments(String id) {
        StringBuilder path = new StringBuilder(Link.POSTS);
        path.append(Link.PATH_SEPARATOR);
        path.append(id);
        path.append(Link.COMMENTS);
        return path.toString();
    }

    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    @POST
    @Path(Link.COMMENTS)
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    public Response createComment(@Context UriInfo info, Comment comment) {
        comment.setAuthor(userService.getCurrentUser());
        comment.setDateCreated(new Date());
        comment.setPost(Post.findPost(getHrefLastPathSegment()));
        comment.persist();
        CommentResource commentResource = new CommentResource(info, comment);
        return BaseController.created(commentResource);
    }

    @GET
    @Path(Link.COMMENTS)
    @Produces(MediaType.APPLICATION_JSON)
    public CollectionResource listComments(@Context UriInfo info, @QueryParam("fields") List<String> fields,
                                           @DefaultValue("false") @QueryParam("expand") boolean expand,
                                           @DefaultValue(CollectionResource.DEFAULT_OFFSET+"") @QueryParam("offset") int offset,
                                           @DefaultValue(CollectionResource.DEFAULT_LIMIT+"") @QueryParam("limit") int limit){
        String id = getHrefLastPathSegment();

        List<Comment> comments = Comment.findCommentsByPostId(id, offset, limit);

        List<Link> commentResources = new ArrayList<Link>(comments.size());

        if(expand){
            for(Comment comment : comments){
                commentResources.add(new CommentResource(info, comment, fields, null));
            }
        }
        else {
            for(Comment comment : comments){
                commentResources.add(new Link(info, comment));
            }
        }

        return new CollectionResource(info, getPathForComments(id), commentResources);
    }

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public PostResource getPostResource(){
        return this;
    }

}


text:
package deviceplugin

const (
	// Healthy means that the device is healty
	Healthy = "Healthy"
	// UnHealthy means that the device is unhealty
	Unhealthy = "Unhealthy"

	// Version is the API version
	Version = "0.1"
	// DevicePluginPath is the folder the Device Plugin is expecting sockets to be on
	// Only privileged pods have access to this path
	// Note: Placeholder until we find a "standard path"
	DevicePluginPath = "/var/lib/kubelet/device-plugins/"
	// KubeletSocket is the path of the Kubelet registry socket
	KubeletSocket = DevicePluginPath + "kubelet.sock"
)


text:
package com.dumptruckman.minecraft.matchmaker.test.utils;

import org.bukkit.WorldCreator;
import org.mockito.ArgumentMatcher;

public class WorldCreatorMatcher extends ArgumentMatcher<WorldCreator> {
    private WorldCreator worldCreator;
    private boolean careAboutSeeds = false;
    private boolean careAboutGenerators = false;

    public WorldCreatorMatcher(WorldCreator creator) {
        Util.log("Creating NEW world matcher.(" + creator.name() + ")");
        this.worldCreator = creator;
    }

    public void careAboutSeeds(boolean doICare) {
        this.careAboutSeeds = doICare;
    }

    public void careAboutGenerators(boolean doICare) {
        this.careAboutGenerators = doICare;
    }

    public boolean matches(Object creator) {
        Util.log("Checking world creators.");
        if (creator == null) {
            Util.log("The given creator was null, but I was checking: " + this.worldCreator.name());
            return false;
        }
        Util.log("Checking Names...(" + ((WorldCreator) creator).name() + ") vs (" + this.worldCreator.name() + ")");
        Util.log("Checking Envs...(" + ((WorldCreator) creator).environment() + ") vs (" + this.worldCreator.environment() + ")");
        if (!((WorldCreator) creator).name().equals(this.worldCreator.name())) {
            return false;
        } else if (!((WorldCreator) creator).environment().equals(this.worldCreator.environment())) {
            Util.log("Checking Environments...");
            return false;
        } else if (careAboutSeeds && ((WorldCreator) creator).seed() != this.worldCreator.seed()) {
            Util.log("Checking Seeds...");
            return false;
        } else if (careAboutGenerators && !((WorldCreator) creator).generator().equals(this.worldCreator.generator())) {
            Util.log("Checking Gens...");
            return false;
        }
        Util.log("Creators matched!!!");
        return true;
    }
}


text:
SimpleForm::Inputs::BooleanInput.class_eval do
  def input(wrapper_options = nil)
    iho = input_html_options || {}

    if options[:atom_setting]
      iho[:class] = [iho[:class], "f-c-js-atoms-placement-setting"].flatten
      iho["data-atom-setting"] = options[:atom_setting]
    end

    merged_input_options = merge_wrapper_options(iho, wrapper_options)

    if nested_boolean_style?
      build_hidden_field_for_checkbox +
        template.label_tag(nil, class: boolean_label_class) {
          build_check_box_without_hidden_field(merged_input_options) +
            inline_label
        }
    else
      build_check_box(unchecked_value, merged_input_options)
    end
  end
end


text:
module Einvoice
  class Client
    attr_accessor :provider

    def initialize(provider)
      @provider = provider
    end

    def method_missing(m, *args, &block)
      provider.send(m, *args, &block)
    end
  end
end


text:
package ua.com.mcgray.test;

/**
 * @author orezchykov
 * @since 05.12.14
 */

public interface LargeTest {

}


text:
<?xml version="1.0"?>
<resources xmlns:tools="http://schemas.android.com/tools">
    <string name="bt_form_pay_with_card_header">Pay With a Card</string>

    <string name="bt_invalid_card">Card information is invalid</string>

    <string name="bt_choose_payment_method">Choose Payment Method</string>
    <string name="bt_change_payment_method">Change Payment Method</string>
    <string name="bt_add_new_payment_method">Add New Payment Method</string>
    <string name="bt_add_payment_method">Add Payment Method</string>

    <string name="bt_default_submit_button_text">PURCHASE</string>
    <string name="bt_default_action_bar_text">Purchase</string>

    <!-- Note: %s is a place holder and should be left in translated strings -->
    <string name="bt_card_descriptor">ends in %s</string>

    <string name="bt_pay_with_paypal">Pay with PayPal</string>
    <string name="bt_pay_with_venmo">Pay with Venmo</string>
    <string name="bt_pay_with_android_pay" tools:ignore="MissingTranslation">Pay with Google Wallet</string>

    <string name="bt_descriptor_visa">Visa</string>
    <string name="bt_descriptor_mastercard">MasterCard</string>
    <string name="bt_descriptor_amex">Amex</string>
    <string name="bt_descriptor_jcb">JCB</string>
    <string name="bt_descriptor_discover">Discover</string>
    <string name="bt_descriptor_diners">Diners</string>
    <string name="bt_descriptor_maestro">Maestro</string>
    <string name="bt_descriptor_paypal">PayPal</string>
    <string name="bt_descriptor_android_pay" tools:ignore="MissingTranslation">Google Wallet</string>
    <string name="bt_descriptor_unknown">Card</string>
</resources>