text:
'use strict'

const BB = require('bluebird')

const fs = require('graceful-fs')
const iferr = require('iferr')
const inflateShrinkwrap = require('./inflate-shrinkwrap.js')
const log = require('npmlog')
const parseJSON = require('../utils/parse-json.js')
const path = require('path')
const PKGLOCK_VERSION = require('../npm.js').lockfileVersion

const readFileAsync = BB.promisify(fs.readFile)

module.exports = readShrinkwrap
function readShrinkwrap (child, next) {
  if (child.package._shrinkwrap) return process.nextTick(next)
  BB.join(
    maybeReadFile('npm-shrinkwrap.json', child),
    // Don't read non-root lockfiles
    child.isTop && maybeReadFile('package-lock.json', child),
    child.isTop && maybeReadFile('package.json', child),
    (shrinkwrap, lockfile, pkgJson) => {
      if (shrinkwrap && lockfile) {
        log.warn('read-shrinkwrap', 'Ignoring package-lock.json because there is already an npm-shrinkwrap.json. Please use only one of the two.')
      }
      const name = shrinkwrap ? 'npm-shrinkwrap.json' : 'package-lock.json'
      let parsed = null
      if (shrinkwrap || lockfile) {
        try {
          parsed = parseJSON(shrinkwrap || lockfile)
        } catch (ex) {
          throw ex
        }
      }
      if (parsed && parsed.lockfileVersion !== PKGLOCK_VERSION) {
        log.warn('read-shrinkwrap', `This version of npm is compatible with lockfileVersion@${PKGLOCK_VERSION}, but ${name} was generated for lockfileVersion@${parsed.lockfileVersion || 0}. I'll try to do my best with it!`)
      }
      child.package._shrinkwrap = parsed
    }
  ).then(() => next(), next)
}

function maybeReadFile (name, child) {
  return readFileAsync(
    path.join(child.path, name)
  ).catch({code: 'ENOENT'}, () => null)
}

module.exports.andInflate = function (child, next) {
  readShrinkwrap(child, iferr(next, function () {
    if (child.package._shrinkwrap) {
      return inflateShrinkwrap(child, child.package._shrinkwrap || {}, next)
    } else {
      return next()
    }
  }))
}


text:
<?php

namespace Nur\Console\Commands\Clear;

use Nur\Console\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class RouteCommand extends Command
{
    protected function configure()
    {
        $this
            ->setName('clear:route')
            ->setDescription('Clear the application routes cache files.');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $cacheFile = cache_path('routes.php');
        if (file_exists($cacheFile) && unlink($cacheFile)) {
            $output->writeln('<info>+Success!</info> Routes cache file has been deleted.');
            return 0;
        }

        $output->writeln('<question>+Info!</question> There is no route cache file.');
        return 1;
    }
}

redpajama_set_name: RedPajamaGithub


text:
require_dependency "renalware/low_clearance"

module Renalware
  module LowClearance
    class MDMPatientsQuery
      include ModalityScopes
      DEFAULT_SEARCH_PREDICATE = "hgb_date DESC"
      attr_reader :params, :relation, :named_filter

      def initialize(relation: LowClearance::Patient.all, params: nil, named_filter: nil)
        @params = params || {}
        @named_filter = named_filter || :none
        @params[:s] = DEFAULT_SEARCH_PREDICATE if @params[:s].blank?
        @relation = relation
      end

      def call
        search.result
      end

      # rubocop:disable Metrics/MethodLength
      def search
        @search ||= begin
          relation
            .extending(PatientTransplantScopes)
            .extending(PatientPathologyScopes)
            .extending(ModalityScopes)
            .extending(NamedFilterScopes)
            .with_registration_statuses
            .with_current_pathology
            .left_outer_joins(:current_observation_set)
            .with_current_modality_of_class(LowClearance::ModalityDescription)
            .public_send(named_filter.to_s)
            .ransack(params)
        end
      end
      # rubocop:enable Metrics/MethodLength

      module NamedFilterScopes
        def none
          self # NOOP
        end

        def supportive_care
          joins(:profile)
          .where("low_clearance_profiles.document ->> 'dialysis_plan' LIKE 'not_for_dial%'")
        end

        def on_worryboard
          joins("RIGHT OUTER JOIN patient_worries ON patient_worries.patient_id = patients.id")
        end

        def tx_candidates
          where("transplant_registration_status_descriptions.code not ilike '%permanent'")
        end

        def urea
          where("convert_to_float(values->'URE'->>'result') >= 30.0")
        end

        def hgb_low
          where("convert_to_float(values->'HGB'->>'result') < 100.0")
        end

        def hgb_high
          where("convert_to_float(values->'HGB'->>'result') > 130.0")
        end
      end
    end
  end
end


text:
declare namespace javax {
  namespace naming {

    class InitialContext implements javax.naming.Context {
      protected myProps: java.util.Hashtable<java.lang.Object,java.lang.Object>
      protected defaultInitCtx: javax.naming.Context
      protected gotDefault: boolean
      protected constructor(arg0: boolean | java.lang.Boolean)
      public constructor()
      public constructor(arg0: java.util.Hashtable<unknown,unknown>)
      protected init(arg0: java.util.Hashtable<unknown,unknown>): void
      public static doLookup<T>(arg0: javax.naming.Name): T
      public static doLookup<T>(arg0: java.lang.String | string): T
      protected getDefaultInitCtx(): javax.naming.Context
      protected getURLOrDefaultInitCtx(arg0: java.lang.String | string): javax.naming.Context
      protected getURLOrDefaultInitCtx(arg0: javax.naming.Name): javax.naming.Context
      public lookup(arg0: java.lang.String | string): java.lang.Object
      public lookup(arg0: javax.naming.Name): java.lang.Object
      public bind(arg0: java.lang.String | string, arg1: java.lang.Object | any): void
      public bind(arg0: javax.naming.Name, arg1: java.lang.Object | any): void
      public rebind(arg0: java.lang.String | string, arg1: java.lang.Object | any): void
      public rebind(arg0: javax.naming.Name, arg1: java.lang.Object | any): void
      public unbind(arg0: java.lang.String | string): void
      public unbind(arg0: javax.naming.Name): void
      public rename(arg0: java.lang.String | string, arg1: java.lang.String | string): void
      public rename(arg0: javax.naming.Name, arg1: javax.naming.Name): void
      public list(arg0: java.lang.String | string): javax.naming.NamingEnumeration<javax.naming.NameClassPair>
      public list(arg0: javax.naming.Name): javax.naming.NamingEnumeration<javax.naming.NameClassPair>
      public listBindings(arg0: java.lang.String | string): javax.naming.NamingEnumeration<javax.naming.Binding>
      public listBindings(arg0: javax.naming.Name): javax.naming.NamingEnumeration<javax.naming.Binding>
      public destroySubcontext(arg0: java.lang.String | string): void
      public destroySubcontext(arg0: javax.naming.Name): void
      public createSubcontext(arg0: java.lang.String | string): javax.naming.Context
      public createSubcontext(arg0: javax.naming.Name): javax.naming.Context
      public lookupLink(arg0: java.lang.String | string): java.lang.Object
      public lookupLink(arg0: javax.naming.Name): java.lang.Object
      public getNameParser(arg0: java.lang.String | string): javax.naming.NameParser
      public getNameParser(arg0: javax.naming.Name): javax.naming.NameParser
      public composeName(arg0: java.lang.String | string, arg1: java.lang.String | string): java.lang.String
      public composeName(arg0: javax.naming.Name, arg1: javax.naming.Name): javax.naming.Name
      public addToEnvironment(arg0: java.lang.String | string, arg1: java.lang.Object | any): java.lang.Object
      public removeFromEnvironment(arg0: java.lang.String | string): java.lang.Object
      public getEnvironment(): java.util.Hashtable<unknown,unknown>
      public close(): void
      public getNameInNamespace(): java.lang.String
    }

  }
}


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

CORTISPORIN - neomycin sulfate, polymyxin b sulfate and hydrocortisone acetate cream
Physicians Total Care, Inc.

DESCRIPTION

CORTISPORIN Cream (neomycin and polymyxin B sulfates and
hydrocortisone acetate cream, USP) is a topical antibacterial cream. Each gram
contains: neomycin sulfate equivalent to 3.5 mg neomycin base, polymyxin B
sulfate equivalent to 10,000 polymyxin B units, and hydrocortisone acetate 5 mg
(0.5%). The inactive ingredients are liquid petrolatum, white petrolatum,
propylene glycol, polyoxyethylene polyoxypropylene compound, emulsifying wax,
purified water, and 0.25% methylparaben added as a preservative. Sodium
hydroxide or sulfuric acid may be added to adjust pH.

Neomycin sulfate is the sulfate salt of neomycin B and C, which are produced
by the growth of Streptomyces fradiae Waksman (Fam.
Streptomycetaceae). It has a potency equivalent of not less than 600µg of
neomycin standard per mg, calculated on an anhydrous basis. The structural
formulae are:

Polymyxin B sulfate is the sulfate salt of polymyxin B1 and B2, which are produced by the
growth of Bacillus polymyxa (Prazmowski) Migula (Fam.
Bacillaceae). It has a potency of not less than 6,000 polymyxin B units per mg,
calculated on an anhydrous basis. The structural formulae are:

Hydrocortisone acetate is the acetate ester of hydrocortisone, an
anti-inflammatory hormone. Its chemical name is 21-(acetyloxy)-
11β,17-dihydroxypregn-4-ene-3,20-dione. Its structural formula is:

The base is a smooth vanishing cream with a pH of approximately 5.0.

CLINICAL PHARMACOLOGY

Corticoids suppress the inflammatory response to a variety of
agents and they may delay healing. Since corticoids may inhibit the body's
defense mechanism against infection, a concomitant antimicrobial drug may be
used when this inhibition is considered to be clinically significant in a
particular case.

The anti-infective components in the combination are included to provide
action against specific organisms susceptible to them. Polymyxin B sulfate and
neomycin sulfate together are considered active against the following
microorganisms: Staphylococcus aureus, Escherichia coli,
Haemophilus influenzae, Klebsiella- Enterobacter species, Neisseria species, and Pseudomonas
aeruginosa. The product does not provide adequate coverage against Serratia marcescens and streptococci, including Streptococcus pneumoniae.

The relative potency of corticosteroids depends on the molecular structure,
concentration, and release from the vehicle.

The acid pH helps restore normal cutaneous acidity. Owing to its excellent
spreading and penetrating properties, the cream facilitates treatment of hairy
and intertriginous areas. It may also be of value in selective cases where the
lesions are moist.

INDICATIONS AND USAGE

For the treatment of corticosteroid-responsive dermatoses with
secondary infection. It has not been demonstrated that this steroid-antibiotic
combination provides greater benefit than the steroid component alone after 7
days of treatment (see WARNINGS).

CONTRAINDICATIONS

Not for use in the eyes or in the external ear canal if the
eardrum is perforated. This product is contraindicated in tuberculous, fungal,
or viral lesions of the skin (herpes simplex, vaccinia, and varicella). This
product is contraindicated in those individuals who have shown hypersensitivity
to any of its components.

WARNINGS

Because of the concern of nephrotoxicity and ototoxicity
associated with neomycin, this combination should not be used over a wide area
or for extended periods of time.

PRECAUTIONS

General
As with any antibacterial preparation, prolonged use may result
in overgrowth of nonsusceptible organisms, including fungi. Appropriate measures
should be taken if this occurs. Use of steroids on infected areas should be
supervised with care as anti-inflammatory steroids may encourage spread of
infection. If this occurs, steroid therapy should be stopped and appropriate
anti-bacterial drugs used. Generalized dermatological conditions may require
systemic corticosteroid therapy.

Signs and symptoms of exogenous hyperadrenocorticism can occur with the use
of topical corticosteroids, including adrenal suppression. Systemic absorption
of topically applied steroids will be increased if extensive body surface areas
are treated or if occlusive dressings are used. Under these circumstances,
suitable precautions should be taken when long-term use is anticipated.

Specifically, sufficient percutaneous absorption of hydrocortisone can occur
in pediatric patients during prolonged use to cause cessation of growth, as well
as other systemic signs and symptoms of hyperadrenocorticism.

Information for Patients
If redness, irritation, swelling or pain persists or increases,
discontinue use and notify physician. Do not use in the eyes.

Laboratory Tests
Systemic effects of excessive levels of hydrocortisone may
include a reduction in the number of circulating eosinophils and a decrease in
urinary excretion of 17-hydroxycorticosteroids.

Carcinogenesis, Mutagenesis, Impairment of
Fertility
Longterm studies in animals (rats, rabbits, mice) showed no
evidence of carcinogenicity attributable to oral administration of
corticosteroids.

PregnancyTeratogenic
Effects
Pregnancy Category C. Corticosteroids have been shown to be
teratogenic in rabbits when applied topically at concentrations of 0.5% on days
6 to 18 of gestation and in mice when applied topically at a concentration of
15% on days 10 to 13 of gestation. There are no adequate and well-controlled
studies in pregnant women. Corticosteroids should be used during pregnancy only
if the potential benefit justifies the potential risk to the fetus.

Nursing Mothers
Hydrocortisone acetate appears in human milk following oral
administration of the drug. Since systemic absorption of hydrocortisone may
occur when applied topically, caution should be exercised when CORTISPORIN Cream
is used by a nursing woman.

Geriatric Use
Clinical studies of Cortisporin Cream did not include sufficient
numbers of subjects aged 65 and over to determine whether they respond
differently from younger subjects. Other reported clinical experience has not
identified differences in responses between the elderly and younger patients. In
general, dose selection for an elderly patient should be cautious, usually
starting at the low end of the dosing range, reflecting the greater frequency of
decreased hepatic, renal, or cardiac function, and of concomitant disease or
other drug therapy.

Pediatric Use
Safety and effectiveness in pediatric patients have not been
established (see PRECAUTIONS: General).

ADVERSE REACTIONS

Neomycin occasionally causes skin sensitization. Ototoxicity and
nephrotoxicity have also been reported (see WARNINGS).
Adverse reactions have occurred with topical use of antibiotic combinations
including neomycin and polymyxin B. Exact incidence figures are not available
since no denominator of treated patients is available. The reaction occurring
most often is allergic sensitization. In one clinical study, using a 20%
neomycin patch, neomycin-induced allergic skin reactions occurred in two of
2,175 (0.09%) individuals in the general population.1 In
another study, the incidence was found to be approximately 1%.2

The following local adverse reactions have been reported with topical
corticosteroids, especially under occlusive dressings: burning, itching,
irritation, dryness, folliculitis, hypertrichosis, acneiform eruptions,
hypopigmentation, perioral dermatitis, allergic contact dermatitis, maceration
of the skin, secondary infection, skin atrophy, striae, and miliaria.

When steroid preparations are used for long periods of time in intertriginous
areas or over extensive body areas, with or without occlusive non-permeable
dressings, striae may occur; also there exists the possibility of systemic side
effects when steroid preparations are used over large areas or for a long period
of time.

DOSAGE AND ADMINISTRATION

A small quantity of the cream should be applied 2 to 4 times
daily, as required. The cream should, if conditions permit, be gently rubbed
into the affected areas.

HOW SUPPLIED

Tube of 7.5 g   (NDC 54868-1531-1).

Store at 15° to 25°C (59° to 77°F).

References

Leyden JJ, Kligman AM. Contact dermatitis to neomycin sulfate.
JAMA. 1979;242:1276-1278.

Prystowsky SD, Allen AM, Smith RW, et al. Allergic contact
hypersensitivity to nickel, neomycin, ethylenediamine, and benzocaine. Arch Dermatol. 1979;115:959-962.

Prescribing Information as of November 2003.

Distributed by: Monarch Pharmaceuticals, Inc., Bristol, TN 37620

(A wholly owned subsidiary of King Pharmaceuticals, Inc.)

Manufactured by: King Pharmaceuticals, Inc., Bristol, TN 37620

Relabeling of "Additional Barcode" label by:
Physicians Total Care, Inc.
Tulsa, OK       74146

PRINCIPAL DISPLAY PANEL

CORTISPORIN Cream (neomycin and polymyxin B sulfates and hydrocortisone acetate
cream, USP)

CORTISPORIN

neomycin sulfate, polymyxin b sulfate and hydrocortisone acetate cream

Product Information

Product Type
HUMAN PRESCRIPTION DRUG LABEL
Item Code (Source)
NDC:54868-1531(NDC:61570-032-75)

Route of Administration
TOPICAL
DEA Schedule

Active Ingredient/Active Moiety

Ingredient Name
Basis of Strength
Strength

NEOMYCIN SULFATE (NEOMYCIN)
NEOMYCIN SULFATE
3.5 mg  in 1 g

POLYMYXIN B SULFATE (POLYMYXIN B)
POLYMYXIN B SULFATE
10000 U  in 1 g

HYDROCORTISONE ACETATE (HYDROCORTISONE)
HYDROCORTISONE ACETATE
5 mg  in 1 g

Inactive Ingredients

Ingredient Name
Strength

LIGHT MINERAL OIL

PETROLATUM

METHYLPARABEN

PROPYLENE GLYCOL

WATER

Packaging

#
Item Code
Package Description
Marketing Start Date
Marketing End Date

1
NDC:54868-1531-1
1  in 1 CARTON

1

7.5 g in 1 TUBE

Marketing Information

Marketing Category
Application Number or Monograph Citation
Marketing Start Date
Marketing End Date

NDA
NDA050218
07/19/1994

Labeler - Physicians Total Care, Inc.
							(194123980)

Establishment

Name
Address
ID/FEI
Business Operations

Physicians Total Care, Inc.

194123980
relabel

Revised: 12/2010

Document Id: 68c1b49b-a16c-40a9-9b5e-76df9e8d19e2

Set id: e86a5293-312d-4425-bf95-35e4d7149aed

Version: 1

Effective Time: 20101230

Physicians Total Care, Inc.


text: ![Build Status](http://must-be.org/vulcan/statusImage?name=consulo-napile)


requires: {requires}

requires: testFramework core{ComponentName}


text:
package com.samples;

import com.braisgabin.couchbaseliteorm.Entity;
import com.braisgabin.couchbaseliteorm.Field;

@Entity("person")
public class Person {

  @Field("address")
  Address address;

  public Address getAddress() {
    return address;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    Person person = (Person) o;

    if (address != null ? !address.equals(person.address) : person.address != null) return false;

    return true;
  }

  @Override
  public int hashCode() {
    return address != null ? address.hashCode() : 0;
  }
}


text:
public class ProgramaPrincipal {

	public static void main(String[] args) {
		System.out.println("Aula 02");

		Professor professor = new Professor("Fulano", 100);

		double salario = professor.obterSalarioDoProfessor();
		System.out.println("Salário: " + salario);
		professor.alterarSalarioDoProfessor(1000);
		System.out.println("Salário Alterado: " + professor.obterSalarioDoProfessor());

		String nome = professor.obterNomeDoProfessor();
		System.out.println("Nome: "+nome);
		System.out.println("Tamannho do Nome: "+nome.length());
		professor.alterarNomeDoProfessor("Paulo");
		System.out.println("Nome Alterado: "+ professor.obterNomeDoProfessor());

	}

}


text:
int function_1(int a, int b) {
	return (2*a + 3*b + 4*a * b - a*b * 5);
}

// Part 1:
// It appears that the result of macro_1 should be 5, why is the result 6? Correct the error. (5 points)
void part1(int x) {

	int m = x, result;

	result = macro_1(m++);

	printf("macro_1(%d) = %d\n\n", (++x), result);

	// Why did this error occur? Please provide the answer in your own words below following "Explanation: "
	printf("Explanation: Judging from the code, ++m incraments the value then passes it, while m++ passes the original value first and then it prints it, this saves us the double incremintation.\n\n\n"); // (5 points)
}

// Part 2:
// Run this program in Visual Studio and then again in GCC. Take note of the output values for function_1(x,y) and macro_2(x,y).
void part2(int x, int y) {
	int i, j, s, t;

	s = i = x;	// initialize variables with value from x
	t = j = y;  // initialize variables with value from y

	printf("function_1(x, y) = %d\nmacro_2(x, y) = %d\n\n", function_1(++i, ++j), macro_2(++s, ++t));

	// Replace the 4 '__' spaces below with the actual output observed when running the code in VS and GCC.
	printf("In VS : the result of function_1(x, y) = -2 and macro_2(x, y) = -18 \n"); // (5 points)
	printf("In GCC: the result of function_1(x, y) = -2 and macro_2(x, y) = -84 \n\n"); // (5 points)

	// Explain why Visual Studio and GCC programming environments could possibly produce a different value for the same program and for the same input.
	printf("Explanation: One explination for the variation could be attributed to how the macro equations expand (order of evaluation & value production). The order of evaluation is completely compiler dependent so in this case the way GCC goes through the macro could be different from VS. Adding auto keywords such as ++ could be buggy when moving from compiler to compiler. \n\n"); // (5 points)}
}
// Do not edit any of the following code
int main()
{
	int x = 4, y = 5;

	printf("Part 1:\n\n");
	part1(x);
	printf("Part 2:\n\n");
	part2(x, y);

	return 0;
}


text:
@implementation JETSSessionModel

- (id)init {

    self = [super init];

    if (self) {

        connection=[JETSDBConnectionFactory getInstance];

    }

    return self;

}

-(void)createBean:(id)bean{

    JETSSession *session=(JETSSession *) bean;
//    [session.sessionTags componentsJoinedByString:@","]
    NSString *insertSQL = [NSString stringWithFormat:
                           @"INSERT INTO Session (id, name, size, color, location, description, status, sessionType, liked, sessionTags, date, startDate, endDate,agendaDay) VALUES (%ld, '%@', '%@', '%@', '%@', '%@', %ld, '%@', '%@', '%@', %ld, %ld, %ld,%d)",
                           session.id, session.name, session.size, session.color, session.location, session.desc, (long)session.status, session.sessionType, session.liked, nil, session.date, session.startDate, session.endDate,session.agendaDay];

    [connection excuteUpdate:insertSQL];
    if (![session.speakers isKindOfClass:[NSNull class]]) {
        for (int i=0;i<[session.speakers count];i++){
            NSString *subInsertSQL = [NSString stringWithFormat:
                               @"INSERT INTO Speaker_Session (speaker_id, session_id) VALUES (%ld, %ld)",
                               session.id, (long)[session.speakers objectAtIndex:i]];
            [connection excuteUpdate:subInsertSQL];
        }
    }
}

-(void)removeBean:(id)bean{

    JETSSession *session=(JETSSession *) bean;

    NSString *deleteSQL = [NSString stringWithFormat:@"Delete FROM Session WHERE id=%ld",session.id];

    [connection excuteUpdate:deleteSQL];

    NSString *subDeleteSQL = [NSString stringWithFormat:@"Delete FROM Speaker_Session WHERE session_id=%ld",session.id];

    [connection excuteUpdate:subDeleteSQL];

}

-(id)findById:(id)id_{

    long myId=(long)id_;

    NSString *querySQL = [NSString stringWithFormat:@"SELECT * FROM Session WHERE id=%ld",myId];

    FMResultSet *rs=[connection excuteQuery:querySQL];

    JETSSession *session=[JETSSession new];

    while ([rs next]) {

        session.id = [rs longForColumn:@"id"];
        session.name = [rs stringForColumn:@"name"];
        session.size = [rs stringForColumn:@"size"];
        session.color = [rs stringForColumn:@"color"];
        session.location = [rs stringForColumn:@"location"];
        session.desc = [rs stringForColumn:@"description"];
        session.status = [rs intForColumn:@"status"];
        session.sessionType = [rs stringForColumn:@"sessionType"];
        session.liked = [rs stringForColumn:@"liked"];
        session.date = [rs longForColumn:@"date"];
        session.startDate = [rs longForColumn:@"startDate"];
        session.endDate = [rs longForColumn:@"endDate"];
        session.agendaDay = [rs intForColumn:@"agendaDay"];

        //mutable array can be init with normal array
        NSMutableArray *sessionTagsArray =[NSMutableArray arrayWithArray:[[rs stringForColumn:@"sessionTags"] componentsSeparatedByString:@","]];

        session.sessionTags = [sessionTagsArray mutableCopy];

    }

    NSString *subQuerySQL = [NSString stringWithFormat:@"SELECT speaker_id FROM Speaker_Session WHERE session_id=%ld",myId];

    FMResultSet *rs1=[connection excuteQuery:subQuerySQL];

    NSMutableArray *speakers=[NSMutableArray new];

    while ([rs1 next]) {

        long mySpeaker=[rs longForColumn:@"speaker_id"];

        NSNumber* xWrapped = [NSNumber numberWithLong:mySpeaker];

        [speakers addObject:xWrapped];

    }

    session.speakers = [speakers mutableCopy];

    return session;

}

-(id)findByDate:(int)date_{

    NSString *querySQL = [NSString stringWithFormat:@"SELECT * FROM Session WHERE agendaDay=%d",date_];

    FMResultSet *rs=[connection excuteQuery:querySQL];

    NSMutableArray *result=[NSMutableArray new];

    while ([rs next]) {

        JETSSession *session=[JETSSession new];

        session.id = [rs longForColumn:@"id"];
        session.name = [rs stringForColumn:@"name"];
        session.size = [rs stringForColumn:@"size"];
        session.color = [rs stringForColumn:@"color"];
        session.location = [rs stringForColumn:@"location"];
        session.desc = [rs stringForColumn:@"description"];
        session.status = [rs intForColumn:@"status"];
        session.sessionType = [rs stringForColumn:@"sessionType"];
        session.liked = [rs stringForColumn:@"liked"];
        session.date = [rs longForColumn:@"date"];
        session.startDate = [rs longForColumn:@"startDate"];
        session.endDate = [rs longForColumn:@"endDate"];
        session.agendaDay = [rs intForColumn:@"agendaDay"];
        //mutable array can be init with normal array
        NSMutableArray *sessionTagsArray =[NSMutableArray arrayWithArray:[[rs stringForColumn:@"sessionTags"] componentsSeparatedByString:@","]];

        session.sessionTags = [sessionTagsArray mutableCopy];

        NSString *subQuerySQL = [NSString stringWithFormat:@"SELECT speaker_id FROM Speaker_Session WHERE session_id=%ld",session.id];

        FMResultSet *rs1=[connection excuteQuery:subQuerySQL];

        NSMutableArray *speakers=[NSMutableArray new];

        while ([rs1 next]) {

            long mySpeaker=[rs longForColumn:@"speaker_id"];

            NSNumber* xWrapped = [NSNumber numberWithLong:mySpeaker];

            [speakers addObject:xWrapped];

        }

        session.speakers = [speakers mutableCopy];

        [result addObject:session];

    }

    return result;
}

-(NSMutableArray*)findAll{

    NSString *querySQL = [NSString stringWithFormat:@"SELECT * FROM Session ORDER BY date ASC"];

    FMResultSet *rs=[connection excuteQuery:querySQL];

    NSMutableArray *result=[NSMutableArray new];

    while ([rs next]) {

        JETSSession *session=[JETSSession new];

        session.id = [rs longForColumn:@"id"];
        session.name = [rs stringForColumn:@"name"];
        session.size = [rs stringForColumn:@"size"];
        session.color = [rs stringForColumn:@"color"];
        session.location = [rs stringForColumn:@"location"];
        session.desc = [rs stringForColumn:@"description"];
        session.status = [rs intForColumn:@"status"];
        session.sessionType = [rs stringForColumn:@"sessionType"];
        session.liked = [rs stringForColumn:@"liked"];
        session.date = [rs longForColumn:@"date"];
        session.startDate = [rs longForColumn:@"startDate"];
        session.endDate = [rs longForColumn:@"endDate"];
        session.agendaDay = [rs intForColumn:@"agendaDay"];

        //mutable array can be init with normal array
        NSMutableArray *sessionTagsArray =[NSMutableArray arrayWithArray:[[rs stringForColumn:@"sessionTags"] componentsSeparatedByString:@","]];

        session.sessionTags = [sessionTagsArray mutableCopy];

        NSString *subQuerySQL = [NSString stringWithFormat:@"SELECT speaker_id FROM Speaker_Session WHERE session_id=%ld",session.id];

        FMResultSet *rs1=[connection excuteQuery:subQuerySQL];

        NSMutableArray *speakers=[NSMutableArray new];

        while ([rs1 next]) {

            long mySpeaker=[rs longForColumn:@"speaker_id"];

            NSNumber* xWrapped = [NSNumber numberWithLong:mySpeaker];

            [speakers addObject:xWrapped];

        }

        session.speakers = [speakers mutableCopy];

        [result addObject:session];

    }

    return result;

}

-(int)count{

    //prefered with agregate function to give the column alias
    NSString *querySQL = [NSString stringWithFormat:@"SELECT COUNT(*) as count_ FROM Session"];

    FMResultSet *rs = [connection excuteQuery:querySQL];

    int count=0;

    while ([rs next]) {
        count = [rs intForColumn:@"count_"];
    }

    return count;

}

-(void)removeALL{

    NSString *deleteSQL = [NSString stringWithFormat:@"Delete FROM Session"];

    [connection excuteUpdate:deleteSQL];

    NSString *subDeleteSQL = [NSString stringWithFormat:@"Delete FROM Speaker_Session"];

    [connection excuteUpdate:subDeleteSQL];

}

-(NSArray*)getLikedSessions{
    NSString *querySQL =@"SELECT * FROM Session WHERE status=1";

    FMResultSet *rs=[connection excuteQuery:querySQL];

    NSMutableArray *result=[NSMutableArray new];

    while ([rs next]) {

        JETSSession *session=[JETSSession new];

        session.id = [rs longForColumn:@"id"];
        session.name = [rs stringForColumn:@"name"];
        session.size = [rs stringForColumn:@"size"];
        session.color = [rs stringForColumn:@"color"];
        session.location = [rs stringForColumn:@"location"];
        session.desc = [rs stringForColumn:@"description"];
        session.status = [rs intForColumn:@"status"];
        session.sessionType = [rs stringForColumn:@"sessionType"];
        session.liked = [rs stringForColumn:@"liked"];
        session.date = [rs longForColumn:@"date"];
        session.startDate = [rs longForColumn:@"startDate"];
        session.endDate = [rs longForColumn:@"endDate"];
        session.agendaDay = [rs intForColumn:@"agendaDay"];
        //mutable array can be init with normal array
        NSMutableArray *sessionTagsArray =[NSMutableArray arrayWithArray:[[rs stringForColumn:@"sessionTags"] componentsSeparatedByString:@","]];

        session.sessionTags = [sessionTagsArray mutableCopy];

        NSString *subQuerySQL = [NSString stringWithFormat:@"SELECT speaker_id FROM Speaker_Session WHERE session_id=%ld",session.id];

        FMResultSet *rs1=[connection excuteQuery:subQuerySQL];

        NSMutableArray *speakers=[NSMutableArray new];

        while ([rs1 next]) {

            long mySpeaker=[rs longForColumn:@"speaker_id"];

            NSNumber* xWrapped = [NSNumber numberWithLong:mySpeaker];

            [speakers addObject:xWrapped];

        }
        session.speakers = [speakers mutableCopy];
        [result addObject:session];
    }
    return result;
}

-(NSArray*)getLikedSessionsAtDay:(int)index{
    NSString *querySQL = [NSString stringWithFormat:@"SELECT * FROM Session WHERE status=1 and agendaDay=%d",index];
    FMResultSet *rs=[connection excuteQuery:querySQL];
    NSMutableArray *result=[NSMutableArray new];
    while ([rs next]) {
        JETSSession *session=[JETSSession new];
        session.id = [rs longForColumn:@"id"];
        session.name = [rs stringForColumn:@"name"];
        session.size = [rs stringForColumn:@"size"];
        session.color = [rs stringForColumn:@"color"];
        session.location = [rs stringForColumn:@"location"];
        session.desc = [rs stringForColumn:@"description"];
        session.status = [rs intForColumn:@"status"];
        session.sessionType = [rs stringForColumn:@"sessionType"];
        session.liked = [rs stringForColumn:@"liked"];
        session.date = [rs longForColumn:@"date"];
        session.startDate = [rs longForColumn:@"startDate"];
        session.endDate = [rs longForColumn:@"endDate"];
        session.agendaDay = [rs intForColumn:@"agendaDay"];
        //mutable array can be init with normal array
        NSMutableArray *sessionTagsArray =[NSMutableArray arrayWithArray:[[rs stringForColumn:@"sessionTags"] componentsSeparatedByString:@","]];

        session.sessionTags = [sessionTagsArray mutableCopy];

        NSString *subQuerySQL = [NSString stringWithFormat:@"SELECT speaker_id FROM Speaker_Session WHERE session_id=%ld",session.id];

        FMResultSet *rs1=[connection excuteQuery:subQuerySQL];

        NSMutableArray *speakers=[NSMutableArray new];

        while ([rs1 next]) {

            long mySpeaker=[rs longForColumn:@"speaker_id"];

            NSNumber* xWrapped = [NSNumber numberWithLong:mySpeaker];

            [speakers addObject:xWrapped];

        }

        session.speakers = [speakers mutableCopy];

        [result addObject:session];

    }

    return result;
}

@end


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>Kisame - Lvl 51 - Bingo Me!</title>
		<link>http://bvs.wikidot.com/forum/t-129466/kisame-lvl-51-bingo-me</link>
		<description>Posts in the discussion thread "Kisame - Lvl 51 - Bingo Me!"</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 10 Jul 2022 05:27:32 +0000</lastBuildDate>

					<item>
				<guid>http://bvs.wikidot.com/forum/t-129466#post-399186</guid>
				<title>Re: Kisame - Lvl 51 - Bingo Me!</title>
				<link>http://bvs.wikidot.com/forum/t-129466/kisame-lvl-51-bingo-me#post-399186</link>
				<description></description>
				<pubDate>Fri, 27 Feb 2009 22:39:38 +0000</pubDate>
				<wikidot:authorName>qetuo</wikidot:authorName>								<content:encoded>
					<![CDATA[

done bingo back asap
 user name qetuo
 level 46
 moon village
 thanks

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-129466#post-381550</guid>
				<title>Kisame - Lvl 51 - Bingo Me!</title>
				<link>http://bvs.wikidot.com/forum/t-129466/kisame-lvl-51-bingo-me#post-381550</link>
				<description></description>
				<pubDate>Tue, 10 Feb 2009 23:48:38 +0000</pubDate>
				<wikidot:authorName>Kisame</wikidot:authorName>								<content:encoded>
					<![CDATA[

Username: Kisame
 Level: 51
 Village: Maelstrom Village

I need someone to Bingo me with a Note Page so that I can get Anonymous and Snakeman. Anyone will do, and thanks to whoever does it!

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


text:
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'thor/actions'

describe Thor::Actions::CreateFile do
  before(:each) do
    ::FileUtils.rm_rf(destination_root)
  end

  def create_file(destination=nil, config={}, options={})
    @base = MyCounter.new([1,2], options, { :destination_root => destination_root })
    @base.stub!(:file_name).and_return('rdoc')

    @action = Thor::Actions::CreateFile.new(@base, destination, "CONFIGURATION",
                                            { :verbose => !@silence }.merge(config))
  end

  def invoke!
    capture(:stdout){ @action.invoke! }
  end

  def revoke!
    capture(:stdout){ @action.revoke! }
  end

  def silence!
    @silence = true
  end

  describe "#invoke!" do
    it "creates a file" do
      create_file("doc/config.rb")
      invoke!
      File.exists?(File.join(destination_root, "doc/config.rb")).must be_true
    end

    it "does not create a file if pretending" do
      create_file("doc/config.rb", {}, :pretend => true)
      invoke!
      File.exists?(File.join(destination_root, "doc/config.rb")).must be_false
    end

    it "shows created status to the user" do
      create_file("doc/config.rb")
      invoke!.must == "      create  doc/config.rb\n"
    end

    it "does not show any information if log status is false" do
      silence!
      create_file("doc/config.rb")
      invoke!.must be_empty
    end

    it "returns the given destination" do
      capture(:stdout) do
        create_file("doc/config.rb").invoke!.must == "doc/config.rb"
      end
    end

    it "converts encoded instructions" do
      create_file("doc/%file_name%.rb.tt")
      invoke!
      File.exists?(File.join(destination_root, "doc/rdoc.rb.tt")).must be_true
    end

    describe "when file exists" do
      before(:each) do
        create_file("doc/config.rb")
        invoke!
      end

      describe "and is identical" do
        it "shows identical status" do
          create_file("doc/config.rb")
          invoke!
          invoke!.must == "   identical  doc/config.rb\n"
        end
      end

      describe "and is not identical" do
        before(:each) do
          File.open(File.join(destination_root, 'doc/config.rb'), 'w'){ |f| f.write("FOO = 3") }
        end

        it "shows forced status to the user if force is given" do
          create_file("doc/config.rb", {}, :force => true).must_not be_identical
          invoke!.must == "       force  doc/config.rb\n"
        end

        it "shows skipped status to the user if skip is given" do
          create_file("doc/config.rb", {}, :skip => true).must_not be_identical
          invoke!.must == "        skip  doc/config.rb\n"
        end

        it "shows forced status to the user if force is configured" do
          create_file("doc/config.rb", :force => true).must_not be_identical
          invoke!.must == "       force  doc/config.rb\n"
        end

        it "shows skipped status to the user if skip is configured" do
          create_file("doc/config.rb", :skip => true).must_not be_identical
          invoke!.must == "        skip  doc/config.rb\n"
        end

        it "shows conflict status to ther user" do
          create_file("doc/config.rb").must_not be_identical
          $stdin.should_receive(:gets).and_return('s')
          file = File.join(destination_root, 'doc/config.rb')

          content = invoke!
          content.must =~ /conflict  doc\/config\.rb/
          content.must =~ /Overwrite #{file}\? \(enter "h" for help\) \[Ynaqdh\]/
          content.must =~ /skip  doc\/config\.rb/
        end

        it "creates the file if the file collision menu returns true" do
          create_file("doc/config.rb")
          $stdin.should_receive(:gets).and_return('y')
          invoke!.must =~ /force  doc\/config\.rb/
        end

        it "skips the file if the file collision menu returns false" do
          create_file("doc/config.rb")
          $stdin.should_receive(:gets).and_return('n')
          invoke!.must =~ /skip  doc\/config\.rb/
        end

        it "executes the block given to show file content" do
          create_file("doc/config.rb")
          $stdin.should_receive(:gets).and_return('d')
          $stdin.should_receive(:gets).and_return('n')
          @base.shell.should_receive(:system).with(/diff -u/)
          invoke!
        end
      end
    end
  end

  describe "#revoke!" do
    it "removes the destination file" do
      create_file("doc/config.rb")
      invoke!
      revoke!
      File.exists?(@action.destination).must be_false
    end

    it "does not raise an error if the file does not exist" do
      create_file("doc/config.rb")
      revoke!
      File.exists?(@action.destination).must be_false
    end
  end

  describe "#exists?" do
    it "returns true if the destination file exists" do
      create_file("doc/config.rb")
      @action.exists?.must be_false
      invoke!
      @action.exists?.must be_true
    end
  end

  describe "#identical?" do
    it "returns true if the destination file and is identical" do
      create_file("doc/config.rb")
      @action.identical?.must be_false
      invoke!
      @action.identical?.must be_true
    end
  end
end


text:
//
//  Gbtn.m
//  WJXC
//
//  Created by gaomeng on 15/8/3.
//  Copyright (c) 2015年 lcw. All rights reserved.
//

#import "Gbtn.h"

@implementation Gbtn

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end


text:
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${PREFIX}/lib/pkgconfig

cd trunk
./autogen.sh
./configure --prefix=$PREFIX
make
make install

# Some boost versions require boost_system to be the last in the list of libraries when linking...
sed -i -e 's/-lboost_system //' -e 's/-lrt/-lboost_system -lrt/' $PREFIX/lib/pkgconfig/libMems-1.6.pc


text:
import { LoadingManager } from './LoadingManager';
import { CubeTexture } from './../textures/CubeTexture';

export class CubeTextureLoader {

	constructor( manager?: LoadingManager );

	manager: LoadingManager;
	crossOrigin: string;
	path?: string;

	load(
		urls: Array<string>,
		onLoad?: ( texture: CubeTexture ) => void,
		onProgress?: ( event: ProgressEvent ) => void,
		onError?: ( event: ErrorEvent ) => void
	): CubeTexture;
	setCrossOrigin( crossOrigin: string ): this;
	setPath( path: string ): this;

}


text:
/**
 * @name         Event Manager
 * @version      16
 * @package      em
 * @author       Greg Miernicki <g@miernicki.com> <gregory.miernicki@nih.gov>
 * @about        Developed in whole or part by the U.S. National Library of Medicine and the Sahana Foundation
 * @link         https://pl.nlm.nih.gov/about
 * @link         http://sahanafoundation.org
 * @license	 http://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License (LGPL)
 * @lastModified 2011.1205
 */

em_show_events();

// Google Maps junx

var latitude = '';
var longitude = '';
var geocoder;
var map;
var marker;

function getLocation(pos) {
	latitude = pos.coords.latitude;
	longitude = pos.coords.longitude;
	load_map();
	geocoder.geocode({'latLng': marker.getPosition()}, function(results, status) {
		if (status == google.maps.GeocoderStatus.OK) {
			if (results[0]) {
				$('#address').val(results[0].formatted_address);
				$('#latitude').val(marker.getPosition().lat());
				$('#longitude').val(marker.getPosition().lng());
			}
		}
	});
}

function unknownLocation() {
	alert('Could not find location');
}

function detect_load() {
	navigator.geolocation.getCurrentPosition(getLocation, unknownLocation);
}

function load_map(latitude, longitude, street) {
	if(latitude == null || longitude == null) {
		latitude = 39;
		longitude = -77.101;
	}
	var latlng = new google.maps.LatLng(latitude, longitude);
	var config = {
		zoom: 13,
		center: latlng,
		disableDefaultUI: true,
		navigationControl: true,
		navigationControlOptions: {
			style: google.maps.NavigationControlStyle.ZOOM_PAN
		},
		mapTypeControl: true,
		mapTypeControlOptions: {
			style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
		},
		mapTypeId: google.maps.MapTypeId.ROADMAP
	};
	map = new google.maps.Map(document.getElementById("mapCanvas"), config);

	geocoder = new google.maps.Geocoder();

	marker = new google.maps.Marker({
		map: map,
		draggable: true
	});

	$(function() {
		$("#address").autocomplete({

			// This bit uses the geocoder to fetch address values
			source: function(request, response) {
				geocoder.geocode( {'address': request.term }, function(results, status) {
					response($.map(results, function(item) {
						return {
							label:  item.formatted_address,
							value: item.formatted_address,
							latitude: item.geometry.location.lat(),
							longitude: item.geometry.location.lng()
						}
					}));
				})
			},

			// This bit is executed upon selection of an address
			select: function(event, ui) {
				$("#latitude").val(ui.item.latitude);
				$("#longitude").val(ui.item.longitude);
				var location = new google.maps.LatLng(ui.item.latitude, ui.item.longitude);
				marker.setPosition(location);
				map.setCenter(location);
			}
		});
	});

	// Add listener to marker for reverse geocoding
	google.maps.event.addListener(marker, 'drag', function() {
		geocoder.geocode({'latLng': marker.getPosition()}, function(results, status) {
			if (status == google.maps.GeocoderStatus.OK) {
				if (results[0]) {
					$('#address').val(results[0].formatted_address);
					$('#latitude').val(marker.getPosition().lat());
					$('#longitude').val(marker.getPosition().lng());
				}
			}
		});
	});

	$("#latitude").val(latitude);
	$("#longitude").val(longitude);
	$("#address").val(street);
	var location = new google.maps.LatLng(latitude, longitude);
	marker.setPosition(location);
	map.setCenter(location);

}

function em_delete(incident_id) {
	em_append_log('Deleting Event #' + incident_id + ' (this operation may take a long time on large events) ...
');
	setTimeout('em_perform_delete('+incident_id+', confirm(\'Are you sure you want to delete this incident? Doing so will delete all person data along with the associated image and voicenote data. If you are sure then you may proceeed; otherwise please press CANCEL to abort this operation.\'));', 100);
}

function em_purge(incident_id) {
	em_append_log('Purging Event #' + incident_id + ' (this operation may take a long time on large events) ...
');
	setTimeout('em_perform_purge('+incident_id+', confirm(\'Are you sure you want to purge all person data from this incident? If you are sure then you may proceeed; otherwise please press CANCEL to abort this operation.\'));', 100);
}

function em_get_data() {
	var r = new Object();
	r.latitude         = $("#latitude").val();
	r.longitude        = $("#longitude").val();
	r.longName         = htmlspecialchars($("#longName").val());
	r.shortName        = $("#shortName").val();
	r.eventDescription = htmlspecialchars($("#eventDescription").val());
	r.externalReport   = htmlspecialchars($("#externalReport").val());
	r.eventParent      = $("#eventParent").val();
	r.eventType        = $("#eventType").val();
	r.category         = htmlspecialchars($(".chzn-select-no-results").val());
	r.eventVisibility  = $("#eventVisibility").val();
	r.eventDate        = $("#eventDate").val();
	r.eventId          = $("#eventId").val();
	r.pfifUrl          = $("#pfifUrl").val();
	r.pfifSync         = $("#pfifSync:checked").val();
	r.street           = $("#address").val();
	r.eventClosed      = $("#eventClosed:checked").val();

	if($("#eventDefault:checked").val() == "default") {
		r.eventDefault = 1;
	} else {
		r.eventDefault = 0;
	}
	var rj = array2json(r);
	alert(rj);
	return(rj);
}

// converts array to json for export >> from: http://goo.gl/ZVNnr
function array2json(arr) {
	var parts = [];
	var is_list = (Object.prototype.toString.apply(arr) === '[object Array]');

	for(var key in arr) {
		var value = arr[key];
		if(typeof value == "object") { //Custom handling for arrays
			if(is_list) {
				parts.push(array2json(value)); // :RECURSION:
			} else {
				parts[key] = array2json(value); // :RECURSION:
			}
		} else {
			var str = "";
			if(!is_list) {
				str = '"' + key + '":';
			}
			// Custom handling for multiple data types
			if(typeof value == "number") {
				str += value; //Numbers
			} else if(value === false) {
				str += 'false'; //The booleans
			} else if(value === true) {
				str += 'true';
			} else {
				str += '"' + value + '"'; //All other things
			}
			// todo: Is there any more datatype we should be in the lookout for? (Functions?)
			parts.push(str);
		}
	}
	var json = parts.join(",");
	if(is_list) {
		return '[' + json + ']';//Return numerical JSON
	}
	return '{' + json + '}';//Return associative JSON
}

function initDate() {
	$("#eventDate").datepicker({ dateFormat: 'yy-mm-dd' });
}
function chosen() {
	$(".chzn-select-no-results").chosen({no_results_text: "No matching categories for : "});
}

// from http://goo.gl/CLJxF
function htmlspecialchars(string, quote_style, charset, double_encode) {
	// http://kevin.vanzonneveld.net
	// +   original by: Mirek Slugen
	// +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
	// +   bugfixed by: Nathan
	// +   bugfixed by: Arno
	// +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
	// +    bugfixed by: Brett Zamir (http://brett-zamir.me)
	// +      input by: Ratheous
	// +      input by: Mailfaker (http://www.weedem.fr/)
	// +      reimplemented by: Brett Zamir (http://brett-zamir.me)
	// +      input by: felix
	// +    bugfixed by: Brett Zamir (http://brett-zamir.me)
	// %        note 1: charset argument not supported
	// *     example 1: htmlspecialchars("Test", 'ENT_QUOTES');
	// *     returns 1: '<a href='test'>Test</a>'
	// *     example 2: htmlspecialchars("ab\"c'd", ['ENT_NOQUOTES', 'ENT_QUOTES']);
	// *     returns 2: 'ab"c'd'
	// *     example 3: htmlspecialchars("my "&entity;" is still here", null, null, false);
	// *     returns 3: 'my "&entity;" is still here'
	if (string === null)
	{
		string = 'Default';
		return string;
	}
	var optTemp = 0, i = 0,
	noquotes = false;

	if (typeof quote_style === 'undefined' || quote_style === null) {
		quote_style = 2;
	}
	string = string.toString();
	if (double_encode !== false) {
		// Put this first to avoid double-encoding
		string = string.replace(/&/g, '&');
	}
	string = string.replace(/</g, '<').replace(/>/g, '>');

	var OPTS = {
		'ENT_NOQUOTES': 0,
		'ENT_HTML_QUOTE_SINGLE': 1,
		'ENT_HTML_QUOTE_DOUBLE': 2,
		'ENT_COMPAT': 2,
		'ENT_QUOTES': 3,
		'ENT_IGNORE': 4
	};
	if (quote_style === 0) {
		noquotes = true;
	}
	if (typeof quote_style !== 'number') {
		// Allow for a single string or an array of string flags
		quote_style = [].concat(quote_style);
		for (i = 0; i < quote_style.length; i++) {
			// Resolve string input to bitwise e.g. 'PATHINFO_EXTENSION' becomes 4
			if (OPTS[quote_style[i]] === 0) {
				noquotes = true;
			} else if (OPTS[quote_style[i]]) {
				optTemp = optTemp | OPTS[quote_style[i]];
			}
		}
		quote_style = optTemp;
	}
	if (quote_style & OPTS.ENT_HTML_QUOTE_SINGLE) {
		string = string.replace(/'/g, ''');
	}
	if (!noquotes) {
		string = string.replace(/"/g, '"');
	}

	return string;
}


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

<percentiles>
    <percentile>
        <lower>1</lower>
        <content>Arrow catching</content>
        <upper>5</upper>
    </percentile>
    <percentile>
        <lower>6</lower>
        <content>Bashing</content>
        <upper>8</upper>
    </percentile>
    <percentile>
        <lower>9</lower>
        <content>Blinding</content>
        <upper>10</upper>
    </percentile>
    <percentile>
        <lower>11</lower>
        <content>Light fortification</content>
        <upper>15</upper>
    </percentile>
    <percentile>
        <lower>16</lower>
        <content>Arrow deflection</content>
        <upper>20</upper>
    </percentile>
    <percentile>
        <lower>21</lower>
        <content>Animated</content>
        <upper>25</upper>
    </percentile>
    <percentile>
        <lower>26</lower>
        <content>Acid resistance</content>
        <upper>28</upper>
    </percentile>
    <percentile>
        <lower>29</lower>
        <content>Cold resistance</content>
        <upper>31</upper>
    </percentile>
    <percentile>
        <lower>32</lower>
        <content>Electricity resistance</content>
        <upper>34</upper>
    </percentile>
    <percentile>
        <lower>35</lower>
        <content>Fire resistance</content>
        <upper>37</upper>
    </percentile>
    <percentile>
        <lower>38</lower>
        <content>Sonic resistance</content>
        <upper>40</upper>
    </percentile>
    <percentile>
        <lower>41</lower>
        <content>Ghost touch (armor)</content>
        <upper>46</upper>
    </percentile>
    <percentile>
        <lower>47</lower>
        <content>Moderate fortification</content>
        <upper>56</upper>
    </percentile>
    <percentile>
        <lower>57</lower>
        <content>Spell resistance (15)</content>
        <upper>58</upper>
    </percentile>
    <percentile>
        <lower>59</lower>
        <content>Wild</content>
        <upper>59</upper>
    </percentile>
    <percentile>
        <lower>60</lower>
        <content>Improved acid resistance</content>
        <upper>64</upper>
    </percentile>
    <percentile>
        <lower>65</lower>
        <content>Improved cold resistance</content>
        <upper>69</upper>
    </percentile>
    <percentile>
        <lower>70</lower>
        <content>Improved electricity resistance</content>
        <upper>74</upper>
    </percentile>
    <percentile>
        <lower>75</lower>
        <content>Improved fire resistance</content>
        <upper>79</upper>
    </percentile>
    <percentile>
        <lower>80</lower>
        <content>Improved sonic resistance</content>
        <upper>84</upper>
    </percentile>
    <percentile>
        <lower>85</lower>
        <content>Spell resistance (17)</content>
        <upper>86</upper>
    </percentile>
    <percentile>
        <lower>87</lower>
        <content>Undead controlling</content>
        <upper>87</upper>
    </percentile>
    <percentile>
        <lower>88</lower>
        <content>Heavy fortification</content>
        <upper>91</upper>
    </percentile>
    <percentile>
        <lower>92</lower>
        <content>Reflecting</content>
        <upper>93</upper>
    </percentile>
    <percentile>
        <lower>94</lower>
        <content>Spell resistance (19)</content>
        <upper>94</upper>
    </percentile>
    <percentile>
        <lower>95</lower>
        <content>Greater acid resistance</content>
        <upper>95</upper>
    </percentile>
    <percentile>
        <lower>96</lower>
        <content>Greater cold resistance</content>
        <upper>96</upper>
    </percentile>
    <percentile>
        <lower>97</lower>
        <content>Greater electricity resistance</content>
        <upper>97</upper>
    </percentile>
    <percentile>
        <lower>98</lower>
        <content>Greater fire resistance</content>
        <upper>98</upper>
    </percentile>
    <percentile>
        <lower>99</lower>
        <content>Greater sonic resistance</content>
        <upper>99</upper>
    </percentile>
    <percentile>
        <lower>100</lower>
        <content>BonusSpecialAbility</content>
        <upper>100</upper>
    </percentile>
</percentiles>


text:
package connector

import (
	"fmt"
	log "github.com/Sirupsen/logrus"
	"os"
	"path/filepath"
	"time"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/service/s3"
	"github.com/aws/aws-sdk-go/service/s3/s3manager"
	"strings"
)

type S3Connection struct {
	Connection     *s3.S3
	BucketName     string
	CacheDirectory string
	Downloader     *s3manager.Downloader
}

func (c S3Connection) String() string {
	return fmt.Sprintf("{S3Connection: BucketName=%s, CacheDirectory=%s",
		c.BucketName, c.CacheDirectory)
}

func NewS3Connection(connection *s3.S3, cacheDirectory string, s3BucketName string,
	options *s3manager.DownloadOptions) S3Connection {
	conn := S3Connection{
		Connection:     connection,
		BucketName:     s3BucketName,
		CacheDirectory: cacheDirectory,
	}
	conn.Downloader = s3manager.NewDownloader(options)
	return conn
}

func (c S3Connection) GetCacheDirectory() string {
	return c.CacheDirectory
}

func (c S3Connection) Close() error {
	return nil
}

type S3Object struct {
	S3FullPath string
}

func (s3Obj S3Object) String() string {
	return fmt.Sprintf("{S3Object: S3Object=%s}", s3Obj.S3FullPath)
}

func (s3Obj S3Object) GetPath() string {
	return s3Obj.S3FullPath
}

func (conn S3Connection) ListObjectsAsFolders(prefix string) ([]Object, error) {
	return conn.listObjects(prefix, "/")
}

func (conn S3Connection) ListObjectsAsAll(prefix string) ([]Object, error) {
	return conn.listObjects(prefix, ",")
}

func (conn S3Connection) listObjects(prefix string, delimiter string) ([]Object, error) {
	s3Objs := make([]Object, 0)
	moreResults := false
	nextMarker := aws.String("")
	for {
		input := s3.ListObjectsInput{
			Bucket:    aws.String(conn.BucketName),
			Prefix:    aws.String(prefix),
			Delimiter: aws.String(delimiter),
		}
		if moreResults {
			input.Marker = nextMarker
		}
		result, err := conn.Connection.ListObjects(&input)
		if err != nil {
			log.Debugln("Failed to ListObjects for bucket %s, prefix %s: %s", conn.BucketName, prefix, err)
			return nil, err
		}
		if delimiter == "/" { // folders
			for _, commonPrefix := range result.CommonPrefixes {
				s3Obj := S3Object{
					S3FullPath: strings.TrimSuffix(*commonPrefix.Prefix, "/"),
				}
				s3Objs = append(s3Objs, s3Obj)
			}
		} else { // regular files
			for _, contents := range result.Contents {
				s3Obj := S3Object{
					S3FullPath: *contents.Key,
				}
				s3Objs = append(s3Objs, s3Obj)
			}
		}
		time.Sleep(100 * time.Millisecond)
		moreResults = *result.IsTruncated
		if moreResults {
			nextMarker = result.NextMarker
		} else {
			break
		}
	}
	return s3Objs, nil
}

func (conn S3Connection) getCacheFilepath(key string) (string, error) {
	cacheFilepath := filepath.Join(conn.GetCacheDirectory(), key)
	cacheFilepath, err := filepath.Abs(cacheFilepath)
	if err != nil {
		log.Debugf("Failed to make cacheFilepath %s absolute: %s",
			cacheFilepath, err)
		return "", err
	}
	return cacheFilepath, nil
}

func (conn S3Connection) CachedGet(key string) (string, error) {
	cacheFilepath, err := conn.getCacheFilepath(key)
	if err != nil {
		log.Debugf("Failed to getCacheFilepath in CachedGet: %s", err)
		return "", err
	}
	fileInfo, err := os.Stat(cacheFilepath)
	if err == nil && fileInfo.Size() != 0 {
		// file exists, so if it's zero-byte then we don't need to retrieve it again
		// however the file could still be corrupted. a connector cannot know if a file is corrupted or not,
		// it's up to callers to verify that downloaded files are uncorrupted.
		return cacheFilepath, nil
	}
	cacheFilepath, err = conn.Get(key)
	if err != nil {
		log.Debugln("Failed to cachedGet key: ", key)
		return cacheFilepath, err
	}
	return cacheFilepath, nil
}

func (conn S3Connection) Get(key string) (string, error) {
	cacheFilepath, err := conn.getCacheFilepath(key)
	if err != nil {
		log.Errorf("Failed to getCacheFilepath in Get: %s", err)
		return cacheFilepath, err
	}
	cacheDirectory := filepath.Dir(cacheFilepath)
	if err = os.MkdirAll(cacheDirectory, 0777); err != nil {
		log.Errorf("Couldn't create cache directory %s for cacheFilepath %s: %s",
			cacheDirectory, cacheFilepath, err)
		return cacheFilepath, err
	}
	if _, err = os.Stat(cacheDirectory); err != nil {
		log.Errorf("Cache directory %s doesn't exist!", cacheDirectory)
		return cacheFilepath, err
	}
	w, err := os.Create(cacheFilepath)
	if err != nil {
		log.Errorf("Couldn't create cache file for cacheFilepath %s: %s",
			cacheFilepath, err)
		return cacheFilepath, err
	}
	defer w.Close()
	_, err = conn.Downloader.Download(w, &s3.GetObjectInput{
		Bucket: aws.String(conn.BucketName),
		Key:    aws.String(key),
	})
	time.Sleep(100 * time.Millisecond)
	if err != nil {
		log.Errorf("Failed to download key: %s", err)
		defer os.Remove(cacheFilepath)
		return cacheFilepath, err
	}
	return cacheFilepath, nil
}


text:
using NServiceBus;
using NServiceBus.Config;
using NServiceBus.Installation.Environments;

namespace SiteB
{
    internal class RunInstallers : IWantToRunWhenConfigurationIsComplete
    {
        public void Run()
        {
            //run the installers to  make sure that all queues are created
            Configure.Instance.ForInstallationOn<Windows>().Install();
        }
    }
}


text:
extern libsodium_function_t libsodium_functions_crypto_box[];

#endif


text:
package brooklyn.entity.nosql.couchbase;

import brooklyn.entity.basic.SoftwareProcessDriver;

public interface CouchbaseNodeDriver extends SoftwareProcessDriver {
}


text:
using System.Linq;
using FluentAssertions;
using Paster.Specs.Fakes;
using Xbehave;
using xBehave.Paster.Gherkin;
using xBehave.Paster.System;
using Xunit;

namespace Paster.Specs
{
    [Trait("Escape special characters", "")]
    public class EscapeCharacters
    {
        [Scenario(DisplayName = "Handle scenario desciptions with double quotes")]
        public void PastingDoubleQuotesInScenario(EnvironmentClipboard clipboard, GherkinPaster sut, TestEnvironment environment)
        {
            "Given a complete system"
                .Given(() =>
                           {
                               environment = FakesLibrary.CreateDefaultEnvironment();
                               sut = new GherkinPaster(environment);
                           });

            "and a scenario containing a 'double quote'"
                .And(() => clipboard = FakesLibrary.CreateShim("Scenario: With a \" character"));

            "When the single line is pasted"
                .Then(() => sut.PasteGherkin(clipboard));

            "Then the 'double quote' character has been removed"
                .Then(() => environment.LinesWritten.Any(l => l.Contains("\""))
                                       .Should()
                                       .BeFalse());
        }

        [Scenario(DisplayName = "Handle instruction with double quotes")]
        public void PastingDoubleQuotesInInstructions(EnvironmentClipboard clipboard, GherkinPaster sut, TestEnvironment environment)
        {
            "Given a complete system"
                .Given(() =>
                           {
                               environment = FakesLibrary.CreateDefaultEnvironment();
                               sut = new GherkinPaster(environment);
                           });

            "and a line containing a 'double quote'"
                .And(() => clipboard = FakesLibrary.CreateShim("Given a \" character"));

            "When the line is pasted"
                .Then(() => sut.PasteGherkin(clipboard));

            "then the 'double quote' character has been replaced by the 'backlash' and 'double quote' characters"
                .Then(() => environment.LinesWritten[0].Should()
                                                       .Be("\"Given a \\\" character\".f(() => {});"));
        }
    }
}


text:
layout: sidebar-right
title: "The Unpredictability of Being Human by Linni Ingemundsen"
date: 2018-04-12
author: emily-mitchell
category: young-adult
excerpt: "The Unpredictability of Being Human is a relatively quick read with a quirky, relatable main character."
featured-image: /images/featured/featured-unpredictability-of-being-human.jpg
featured-alt: "The Unpredictability of Being Human"
featured-link-text: "Read library volunteer Emily's review of The Unpredictability of Being Human by Linni Ingemundsen."
breadcrumb: young-adult
genre: literary-fiction
genre-image: /images/featured/featured-unpredictability-of-being-human-genre.jpg
genre-alt: "The Unpredictability of Being Human"
---

![The Unpredictability of Being Human](/images/featured/featured-unpredictability-of-being-human.jpg)

**[See The Unpredictability of Being Human in our catalogue](https://suffolk.spydus.co.uk/cgi-bin/spydus.exe/ENQ/OPAC/BIBENQ?BRN=2302087)**

> "If 14-year-old Malin was God for a day, she wouldn't change much. Dad would still yell; her brother Sigve would still get in trouble, and Mom would still think wine is good for the heart. She'd still be friends with Hanna, even if they met shoplifting. Because stuff's okay, mostly. And if He could fix the world, wouldn't God have done it already?"

This intriguing debut novel was an unexpected read. It was darkly humorous at times, but really emotional at others.

Malin is the most accurately portrayed teenager I've read about for a while; she is naïve but smart and quite blunt. She isn't really aware of social norms all the time, but this endeared me to her character. Her family is a bit complicated, but I found this quite realistic.

The plot is fast-moving, but believable. Ingemundsen's writing style is quite condensed, meaning that you can easily get through a few chapters in one sitting.

The Unpredictability of Being Human is a relatively quick read with a quirky, relatable main character.


text:
class Caminhao {
public:
    Caminhao( int id );
    void inicioViagem( Relogio tempoInicio );
    Relogio fimViagem( Relogio tempoFim );
    bool jaViajou() {return !primeiraViagem;}
    bool operator== ( Caminhao outro );
private:
    Relogio tempoInicioViagem;
    bool primeiraViagem = true;
    int id;

};

#endif // CAMINHAO_H