text:
//
// Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 generiert
// Siehe http://java.sun.com/xml/jaxb
// Änderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren.
// Generiert: 2017.01.26 um 11:46:54 PM CET
//

package wuerfeltool.jaxbGenerated;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java-Klasse für anonymous complex type.
 *
 *
Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
 *
 *

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element ref="{}ruestung" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="inbenutzung" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "ruestung"
})
@XmlRootElement(name = "ruestungen")
public class Ruestungen {

    protected List<Ruestung> ruestung;
    @XmlAttribute(name = "inbenutzung", required = true)
    protected boolean inbenutzung;

    /**
     * Gets the value of the ruestung property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the ruestung property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getRuestung().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link Ruestung }
     *
     *
     */
    public List<Ruestung> getRuestung() {
        if (ruestung == null) {
            ruestung = new ArrayList<Ruestung>();
        }
        return this.ruestung;
    }

    /**
     * Ruft den Wert der inbenutzung-Eigenschaft ab.
     *
     */
    public boolean isInbenutzung() {
        return inbenutzung;
    }

    /**
     * Legt den Wert der inbenutzung-Eigenschaft fest.
     *
     */
    public void setInbenutzung(boolean value) {
        this.inbenutzung = value;
    }

}


text:
email="sam.vanovermeire@xt-i.com"
name="Sam"

echo "Setting git to personal preferences..."
git config --global user.email "${email}"
git config --global user.name "${name}"
git config --global color.ui auto
git config --global branch.autosetupmerge true
git config --global push.default tracking
git config --global rerere.enabled true # record resolved conflicts, to resolve later in same way
git config --global credential.helper 'cache --timeout=9000'

redpajama_set_name: RedPajamaGithub


text:
<?php
    include('header.php');
?>

Abhyasvarg

                        Home

                        Events

                        Unnayan

Abhyasvarg

Volunteers are at the heart of our work; empowering them with knowledge is our faith

A happy and dedicated volunteer is our mission and this workshop is a key

Instilling habits of Yog and exercise @ Abhyasvarga

                 Development is for the man, of the man and by the man. Man is at the centre of everything. Men and men are wanted; everything else will be automatically readied.

Swami Vivekanand

Event Description

                        "Abhyas Varga" or "The Foundation Workshop"  is a two day workshop that trains volunteers in the philosophical and practical aspects of Mandal's work. This is to instil zeal among the volunteers, and to guide, motivate them, for desired outcome of Mandal's work. It's a forum to discuss organizational issues and challenges.

						It also guides volunteers why and how they should serve their society and the mother earth.
                        This can be called as VSM's incentive trip for its karyakarte; indeed with incentives much sublime, food for thought and fuel for the spirit.

Related Events

Sparsh

Sparsh

						 Sparsh team organizes close discussions and lectures on topics of individual, social and national importance every week. The aim is not to have a stoic monologue but an enthusiastic interaction full of ideological exchanges.

Vyakhyanmala

Vyakhyanmala

						 Vyakhyanmala is an annual event where we call an expert to enlighten us about a current subject of social and national importance.

Sparsh

Sparsh

						 Sparsh team organizes close discussions and lectures on topics of individual, social and national importance every week. The aim is not to have a stoic monologue but an enthusiastic interaction full of ideological exchanges.

Unnayan

Vyakhyanmala

						 Vyakhyanmala is an annual event is open to all who are willing to understand the respective subject. After all, well-apprised citizens are the foundation of society and nation.

    <?php
		require_once('footer.php');
	?>


text:
this["JST"] = this["JST"] || {};

this["JST"]["test/fixtures/uses_helpers.hbs"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
    return "";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
    var stack1;

  return "This template uses custom helpers: "
    + this.escapeExpression(helpers['my-helper'].call(depth0,"variable",{"name":"my-helper","hash":{},"data":data}))
    + " & "
    + ((stack1 = helpers['another-helper'].call(depth0,{"name":"another-helper","hash":{},"fn":this.program(1, data, 0),"inverse":this.noop,"data":data})) != null ? stack1 : "")
    + "!\n";
},"useData":true});


text:
int main() {
  int n;
  std::cin >> n;

  std::map<std::string, std::string> capitals;

  // dispatch loop:
  for(int i = 0; i < n; i++) {
    std::string command;
    std::string country;
    std::string capital;
    std::string new_capital;

    std::cin >> command;

    if (command == "CHANGE_CAPITAL") {
      std::cin >> country;
      std::cin >> new_capital;

      // Country didn't exist before
      if(capitals.count(country) == 0) {
        std::cout
          << "Introduce new country "
          << country
          << " with capital "
          << new_capital;
        capitals[country] = new_capital;
      } else if(capitals[country] == new_capital) {
        std::cout << "Country " << country  << " hasn't changed its capital";
      } else if(capitals[country] != new_capital) {
        std::cout
          << "Country "
          << country
          << " has changed its capital from "
          << capitals[country]
          << " to "
          << new_capital;
        capitals[country] = new_capital;
      }

      std::cout << std::endl;
    }

    if (command == "RENAME") {
      std::string old_country_name, new_country_name;

      std::cin >> old_country_name;
      std::cin >> new_country_name;

      if(capitals.count(new_country_name) || !capitals.count(old_country_name)) {
        std::cout << "Incorrect rename, skip";
      } else {
        std::cout
          << "Country "
          << old_country_name
          << " with capital "
          << capitals[old_country_name]
          << " has been renamed to "
          << new_country_name;

        capitals[new_country_name] = capitals[old_country_name];
        capitals.erase(old_country_name);
      }

      std::cout << std::endl;
    }

    if (command == "ABOUT") {
      std::string country;

      std::cin >> country;

      if(capitals.count(country)) {
        std::cout
          << "Country "
          << country
          << " has capital "
          << capitals[country];
      } else {
        std::cout << "Country " << country << " doesn't exist";
      }

      std::cout << std::endl;
    }

    if (command == "DUMP") {
      if (capitals.empty()) {
        std::cout << "There are no countries in the world";
      } else {
        for(const auto& pair : capitals) {
          std::cout << pair.first << "/" << pair.second << " ";
        }
      }
      std::cout << std::endl;
    }
  }
  return 0;
}


text:
.. _whatsnew:

.. currentmodule:: seaborn

What's new in the package
=========================

A catalog of new features, improvements, and bug-fixes in each release.

.. include:: releases/v0.6.0.txt

.. include:: releases/v0.5.1.txt

.. include:: releases/v0.5.0.txt

.. include:: releases/v0.4.0.txt

.. include:: releases/v0.3.1.txt

.. include:: releases/v0.3.0.txt

.. include:: releases/v0.2.1.txt

.. include:: releases/v0.2.0.txt


text:
package com.palmelf.eoffice.service.system.impl;

import com.palmelf.core.service.impl.BaseServiceImpl;
import com.palmelf.eoffice.dao.system.UserAgentDao;
import com.palmelf.eoffice.model.system.UserAgent;
import com.palmelf.eoffice.service.system.UserAgentService;

import java.util.List;

public class UserAgentServiceImpl extends BaseServiceImpl<UserAgent> implements
		UserAgentService {
	private UserAgentDao dao;

	public UserAgentServiceImpl(UserAgentDao dao) {
		super(dao);
		this.dao = dao;
	}

	public List<UserAgent> getByUserId(Long userId) {
		return this.dao.getByUserId(userId);
	}

	public void delUserGrants(Long userId) {
		List<UserAgent> list = getByUserId(userId);
		for (UserAgent userAgent : list)
			this.dao.remove(userAgent);
	}

	public UserAgent getByUserIdGrantId(Long userId, Long grantUId) {
		return this.dao.getByUserIdGrantId(userId, grantUId);
	}
}


text:
    <meta charset="utf-8">

    <title>Enhanced Log :: Home</title>

    <link rel="stylesheet" href="site/css/bootstrap.min.css">
    <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Roboto'>
    <link rel="stylesheet" href="site/css/font-awesome.min.css">
    <link rel="stylesheet" href="site/css/main.css">

Enhanced Log

Make your console.log sexy!

Open DevTools to see it in action


text:
ngsm-autocomplete

Options

<form #ngsmAutocompleteForm="ngForm">
    <ngsm-autocomplete [id]="'myAutocomplete'"
        name="myAutocomplete"
        [(ngModel)]="selectedStaffId"
        [allowClear]="true"
        [clearMessage]="'Clear this user'"
        [defaultTexts]="ngsmAutocompleteDefaultText"
        [url]="ngsmAutocompleteUrl"
        [isRequired]="false"></ngsm-autocomplete>
</form>

    {{ngsmAutocompleteForm.value|json}}


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

import org.flowable.common.engine.api.FlowableException;

public class FlowableConflictException extends FlowableException {

    private static final long serialVersionUID = 1L;

    public FlowableConflictException(String message) {
        super(message);
    }
}


text:
namespace v8 {
namespace internal {
namespace compiler {

bool operator==(CallFunctionParameters const& lhs,
                CallFunctionParameters const& rhs) {
  return lhs.arity() == rhs.arity() && lhs.flags() == rhs.flags();
}

bool operator!=(CallFunctionParameters const& lhs,
                CallFunctionParameters const& rhs) {
  return !(lhs == rhs);
}

size_t hash_value(CallFunctionParameters const& p) {
  return base::hash_combine(p.arity(), p.flags());
}

std::ostream& operator<<(std::ostream& os, CallFunctionParameters const& p) {
  return os << p.arity() << ", " << p.flags();
}

const CallFunctionParameters& CallFunctionParametersOf(const Operator* op) {
  DCHECK_EQ(IrOpcode::kJSCallFunction, op->opcode());
  return OpParameter<CallFunctionParameters>(op);
}

bool operator==(CallRuntimeParameters const& lhs,
                CallRuntimeParameters const& rhs) {
  return lhs.id() == rhs.id() && lhs.arity() == rhs.arity();
}

bool operator!=(CallRuntimeParameters const& lhs,
                CallRuntimeParameters const& rhs) {
  return !(lhs == rhs);
}

size_t hash_value(CallRuntimeParameters const& p) {
  return base::hash_combine(p.id(), p.arity());
}

std::ostream& operator<<(std::ostream& os, CallRuntimeParameters const& p) {
  return os << p.id() << ", " << p.arity();
}

const CallRuntimeParameters& CallRuntimeParametersOf(const Operator* op) {
  DCHECK_EQ(IrOpcode::kJSCallRuntime, op->opcode());
  return OpParameter<CallRuntimeParameters>(op);
}

ContextAccess::ContextAccess(size_t depth, size_t index, bool immutable)
    : immutable_(immutable),
      depth_(static_cast<uint16_t>(depth)),
      index_(static_cast<uint32_t>(index)) {
  DCHECK(depth <= std::numeric_limits<uint16_t>::max());
  DCHECK(index <= std::numeric_limits<uint32_t>::max());
}

bool operator==(ContextAccess const& lhs, ContextAccess const& rhs) {
  return lhs.depth() == rhs.depth() && lhs.index() == rhs.index() &&
         lhs.immutable() == rhs.immutable();
}

bool operator!=(ContextAccess const& lhs, ContextAccess const& rhs) {
  return !(lhs == rhs);
}

size_t hash_value(ContextAccess const& access) {
  return base::hash_combine(access.depth(), access.index(), access.immutable());
}

std::ostream& operator<<(std::ostream& os, ContextAccess const& access) {
  return os << access.depth() << ", " << access.index() << ", "
            << access.immutable();
}

ContextAccess const& ContextAccessOf(Operator const* op) {
  DCHECK(op->opcode() == IrOpcode::kJSLoadContext ||
         op->opcode() == IrOpcode::kJSStoreContext);
  return OpParameter<ContextAccess>(op);
}

bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs) {
  return lhs.slot().ToInt() == rhs.slot().ToInt() &&
         lhs.vector().is_identical_to(rhs.vector());
}

size_t hash_value(VectorSlotPair const& p) {
  // TODO(mvstanton): include the vector in the hash.
  base::hash<int> h;
  return h(p.slot().ToInt());
}

bool operator==(LoadNamedParameters const& lhs,
                LoadNamedParameters const& rhs) {
  return lhs.name() == rhs.name() &&
         lhs.contextual_mode() == rhs.contextual_mode() &&
         lhs.feedback() == rhs.feedback();
}

bool operator!=(LoadNamedParameters const& lhs,
                LoadNamedParameters const& rhs) {
  return !(lhs == rhs);
}

size_t hash_value(LoadNamedParameters const& p) {
  return base::hash_combine(p.name(), p.contextual_mode(), p.feedback());
}

std::ostream& operator<<(std::ostream& os, LoadNamedParameters const& p) {
  return os << Brief(*p.name().handle()) << ", " << p.contextual_mode();
}

std::ostream& operator<<(std::ostream& os, LoadPropertyParameters const& p) {
  // Nothing special to print.
  return os;
}

bool operator==(LoadPropertyParameters const& lhs,
                LoadPropertyParameters const& rhs) {
  return lhs.feedback() == rhs.feedback();
}

bool operator!=(LoadPropertyParameters const& lhs,
                LoadPropertyParameters const& rhs) {
  return !(lhs == rhs);
}

const LoadPropertyParameters& LoadPropertyParametersOf(const Operator* op) {
  DCHECK_EQ(IrOpcode::kJSLoadProperty, op->opcode());
  return OpParameter<LoadPropertyParameters>(op);
}

size_t hash_value(LoadPropertyParameters const& p) {
  return hash_value(p.feedback());
}

const LoadNamedParameters& LoadNamedParametersOf(const Operator* op) {
  DCHECK_EQ(IrOpcode::kJSLoadNamed, op->opcode());
  return OpParameter<LoadNamedParameters>(op);
}

bool operator==(StoreNamedParameters const& lhs,
                StoreNamedParameters const& rhs) {
  return lhs.language_mode() == rhs.language_mode() && lhs.name() == rhs.name();
}

bool operator!=(StoreNamedParameters const& lhs,
                StoreNamedParameters const& rhs) {
  return !(lhs == rhs);
}

size_t hash_value(StoreNamedParameters const& p) {
  return base::hash_combine(p.language_mode(), p.name());
}

std::ostream& operator<<(std::ostream& os, StoreNamedParameters const& p) {
  return os << p.language_mode() << ", " << Brief(*p.name().handle());
}

const StoreNamedParameters& StoreNamedParametersOf(const Operator* op) {
  DCHECK_EQ(IrOpcode::kJSStoreNamed, op->opcode());
  return OpParameter<StoreNamedParameters>(op);
}

#define CACHED_OP_LIST(V)                                 \
  V(Equal, Operator::kNoProperties, 2, 1)                 \
  V(NotEqual, Operator::kNoProperties, 2, 1)              \
  V(StrictEqual, Operator::kPure, 2, 1)                   \
  V(StrictNotEqual, Operator::kPure, 2, 1)                \
  V(LessThan, Operator::kNoProperties, 2, 1)              \
  V(GreaterThan, Operator::kNoProperties, 2, 1)           \
  V(LessThanOrEqual, Operator::kNoProperties, 2, 1)       \
  V(GreaterThanOrEqual, Operator::kNoProperties, 2, 1)    \
  V(BitwiseOr, Operator::kNoProperties, 2, 1)             \
  V(BitwiseXor, Operator::kNoProperties, 2, 1)            \
  V(BitwiseAnd, Operator::kNoProperties, 2, 1)            \
  V(ShiftLeft, Operator::kNoProperties, 2, 1)             \
  V(ShiftRight, Operator::kNoProperties, 2, 1)            \
  V(ShiftRightLogical, Operator::kNoProperties, 2, 1)     \
  V(Add, Operator::kNoProperties, 2, 1)                   \
  V(Subtract, Operator::kNoProperties, 2, 1)              \
  V(Multiply, Operator::kNoProperties, 2, 1)              \
  V(Divide, Operator::kNoProperties, 2, 1)                \
  V(Modulus, Operator::kNoProperties, 2, 1)               \
  V(UnaryNot, Operator::kPure, 1, 1)                      \
  V(ToBoolean, Operator::kPure, 1, 1)                     \
  V(ToNumber, Operator::kNoProperties, 1, 1)              \
  V(ToString, Operator::kNoProperties, 1, 1)              \
  V(ToName, Operator::kNoProperties, 1, 1)                \
  V(ToObject, Operator::kNoProperties, 1, 1)              \
  V(Yield, Operator::kNoProperties, 1, 1)                 \
  V(Create, Operator::kEliminatable, 0, 1)                \
  V(HasProperty, Operator::kNoProperties, 2, 1)           \
  V(TypeOf, Operator::kPure, 1, 1)                        \
  V(InstanceOf, Operator::kNoProperties, 2, 1)            \
  V(Debugger, Operator::kNoProperties, 0, 0)              \
  V(StackCheck, Operator::kNoProperties, 0, 0)            \
  V(CreateFunctionContext, Operator::kNoProperties, 1, 1) \
  V(CreateWithContext, Operator::kNoProperties, 2, 1)     \
  V(CreateBlockContext, Operator::kNoProperties, 2, 1)    \
  V(CreateModuleContext, Operator::kNoProperties, 2, 1)   \
  V(CreateScriptContext, Operator::kNoProperties, 2, 1)

struct JSOperatorGlobalCache FINAL {
#define CACHED(Name, properties, value_input_count, value_output_count)  \
  struct Name##Operator FINAL : public Operator {                        \
    Name##Operator()                                                     \
        : Operator(IrOpcode::kJS##Name, properties, "JS" #Name,          \
                   value_input_count, Operator::ZeroIfPure(properties),  \
                   Operator::ZeroIfPure(properties), value_output_count, \
                   Operator::ZeroIfPure(properties),                     \
                   Operator::ZeroIfNoThrow(properties)) {}               \
  };                                                                     \
  Name##Operator k##Name##Operator;
  CACHED_OP_LIST(CACHED)
#undef CACHED

  template <LanguageMode kLanguageMode>
  struct StorePropertyOperator FINAL : public Operator1<LanguageMode> {
    StorePropertyOperator()
        : Operator1<LanguageMode>(IrOpcode::kJSStoreProperty,
                                  Operator::kNoProperties, "JSStoreProperty", 3,
                                  1, 1, 0, 1, 2, kLanguageMode) {}
  };
  StorePropertyOperator<SLOPPY> kStorePropertySloppyOperator;
  StorePropertyOperator<STRICT> kStorePropertyStrictOperator;
};

static base::LazyInstance<JSOperatorGlobalCache>::type kCache =
    LAZY_INSTANCE_INITIALIZER;

JSOperatorBuilder::JSOperatorBuilder(Zone* zone)
    : cache_(kCache.Get()), zone_(zone) {}

#define CACHED(Name, properties, value_input_count, value_output_count) \
  const Operator* JSOperatorBuilder::Name() {                           \
    return &cache_.k##Name##Operator;                                   \
  }
CACHED_OP_LIST(CACHED)
#undef CACHED

const Operator* JSOperatorBuilder::CallFunction(size_t arity,
                                                CallFunctionFlags flags) {
  CallFunctionParameters parameters(arity, flags);
  return new (zone()) Operator1<CallFunctionParameters>(   // --
      IrOpcode::kJSCallFunction, Operator::kNoProperties,  // opcode
      "JSCallFunction",                                    // name
      parameters.arity(), 1, 1, 1, 1, 2,                   // inputs/outputs
      parameters);                                         // parameter
}

const Operator* JSOperatorBuilder::CallRuntime(Runtime::FunctionId id,
                                               size_t arity) {
  CallRuntimeParameters parameters(id, arity);
  const Runtime::Function* f = Runtime::FunctionForId(parameters.id());
  DCHECK(f->nargs == -1 || f->nargs == static_cast<int>(parameters.arity()));
  return new (zone()) Operator1<CallRuntimeParameters>(   // --
      IrOpcode::kJSCallRuntime, Operator::kNoProperties,  // opcode
      "JSCallRuntime",                                    // name
      parameters.arity(), 1, 1, f->result_size, 1, 2,     // inputs/outputs
      parameters);                                        // parameter
}

const Operator* JSOperatorBuilder::CallConstruct(int arguments) {
  return new (zone()) Operator1<int>(                       // --
      IrOpcode::kJSCallConstruct, Operator::kNoProperties,  // opcode
      "JSCallConstruct",                                    // name
      arguments, 1, 1, 1, 1, 2,                             // counts
      arguments);                                           // parameter
}

const Operator* JSOperatorBuilder::LoadNamed(const Unique<Name>& name,
                                             const VectorSlotPair& feedback,
                                             ContextualMode contextual_mode) {
  LoadNamedParameters parameters(name, feedback, contextual_mode);
  return new (zone()) Operator1<LoadNamedParameters>(   // --
      IrOpcode::kJSLoadNamed, Operator::kNoProperties,  // opcode
      "JSLoadNamed",                                    // name
      1, 1, 1, 1, 1, 2,                                 // counts
      parameters);                                      // parameter
}

const Operator* JSOperatorBuilder::LoadProperty(
    const VectorSlotPair& feedback) {
  LoadPropertyParameters parameters(feedback);
  return new (zone()) Operator1<LoadPropertyParameters>(   // --
      IrOpcode::kJSLoadProperty, Operator::kNoProperties,  // opcode
      "JSLoadProperty",                                    // name
      2, 1, 1, 1, 1, 2,                                    // counts
      parameters);                                         // parameter
}

const Operator* JSOperatorBuilder::StoreProperty(LanguageMode language_mode) {
  if (is_strict(language_mode)) {
    return &cache_.kStorePropertyStrictOperator;
  } else {
    return &cache_.kStorePropertySloppyOperator;
  }
  UNREACHABLE();
  return nullptr;
}

const Operator* JSOperatorBuilder::StoreNamed(LanguageMode language_mode,
                                              const Unique<Name>& name) {
  StoreNamedParameters parameters(language_mode, name);
  return new (zone()) Operator1<StoreNamedParameters>(   // --
      IrOpcode::kJSStoreNamed, Operator::kNoProperties,  // opcode
      "JSStoreNamed",                                    // name
      2, 1, 1, 0, 1, 2,                                  // counts
      parameters);                                       // parameter
}

const Operator* JSOperatorBuilder::DeleteProperty(LanguageMode language_mode) {
  return new (zone()) Operator1<LanguageMode>(               // --
      IrOpcode::kJSDeleteProperty, Operator::kNoProperties,  // opcode
      "JSDeleteProperty",                                    // name
      2, 1, 1, 1, 1, 2,                                      // counts
      language_mode);                                        // parameter
}

const Operator* JSOperatorBuilder::LoadContext(size_t depth, size_t index,
                                               bool immutable) {
  ContextAccess access(depth, index, immutable);
  return new (zone()) Operator1<ContextAccess>(  // --
      IrOpcode::kJSLoadContext,                  // opcode
      Operator::kNoWrite | Operator::kNoThrow,   // flags
      "JSLoadContext",                           // name
      1, 1, 0, 1, 1, 0,                          // counts
      access);                                   // parameter
}

const Operator* JSOperatorBuilder::StoreContext(size_t depth, size_t index) {
  ContextAccess access(depth, index, false);
  return new (zone()) Operator1<ContextAccess>(  // --
      IrOpcode::kJSStoreContext,                 // opcode
      Operator::kNoRead | Operator::kNoThrow,    // flags
      "JSStoreContext",                          // name
      2, 1, 1, 0, 1, 0,                          // counts
      access);                                   // parameter
}

const Operator* JSOperatorBuilder::CreateCatchContext(
    const Unique<String>& name) {
  return new (zone()) Operator1<Unique<String>>(                 // --
      IrOpcode::kJSCreateCatchContext, Operator::kNoProperties,  // opcode
      "JSCreateCatchContext",                                    // name
      2, 1, 1, 1, 1, 2,                                          // counts
      name);                                                     // parameter
}

}  // namespace compiler
}  // namespace internal
}  // namespace v8


text:
package com.netflix.astyanax.model;

/**
 * Interface for a CQL query result. The result can either be a set of rows or a
 * count/number.
 *
 * @author elandau
 *
 * @param <K>
 * @param <C>
 */
public interface CqlResult<K, C> {
    Rows<K, C> getRows();

    int getNumber();

    boolean hasRows();

    boolean hasNumber();
}


text:
<meta charset="utf-8">

  <img src="../photo_gallery/tu/images/TU_027.JPG" class="image1 resizeme" data-description="

													Caption

Ruins of the Roman Senate (Odeon, or small theater) in Ephesus. The city, on the west coast of Asia Minor, was originally Greek, but later became part of the Roman Empire. In Roman times it had a population estimated between 250 and 500 thousand, making it one of the largest cities in the Mediterranean world. Ephesus was partially destroyed by an earthquake in A.D. 614. The city's harbor thereafter slowly silted up causing its commercial importance to decline.

													Dimensions
													File Size
													Download

													480 X 640
													57755 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_027.JPG">

  <img src="../photo_gallery/tu/images/TU_025.JPG" class="image2 resizeme" data-description="

													Caption

View of the main road in Ephesus, which still bears the marks of chariot wheels. The Library of Celsus may be seen at the foot of the hill. The background is the site of the silted up harbor.

													Dimensions
													File Size
													Download

													480 X 640
													59248 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_025.JPG">

  <img src="../photo_gallery/tu/images/TU_026.JPG" class="image3 resizeme" data-description="

													Caption

Image of the goddess Nike (Victory) in Ephesus, an important Greek and later Roman city in Asia Minor. Its fortunes declined because of invasions, earthquakes, and the silting up of its harbor. It was abandoned in the 15th century.

													Dimensions
													File Size
													Download

													480 X 640
													70750 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_026.JPG">

  <img src="../photo_gallery/tu/images/TU_030.JPG" class="image4 resizeme" data-description="

													Caption

The Library of Celsus in Ephesus was built between A.D. 100 and 110 by Gaius Julius Aquila in memory of his father, Tiberius Julius Celsus Polemaneanus, a former governor of Roman Asia, who is buried under the library. The library held 1,200 scrolls and was built facing east to make the best use of morning light; it was destroyed by an earthquake in A.D. 270. The facade was reconstructed between 1970 to 1978.

													Dimensions
													File Size
													Download

													480 X 640
													60628 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_030.JPG">

  <img src="../photo_gallery/tu/images/TU_024.JPG" class="image5 resizeme" data-description="

													Caption

Ruins of the public bath in Ephesus. The city had several bath complexes erected by the Romans in different part of the city. Its aqueduct system was one of the most complex in the ancient world with multiple aqueducts of different sizes supporting various functions.

													Dimensions
													File Size
													Download

													480 X 640
													52720 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_024.JPG">

  <img src="../photo_gallery/tu/images/TU_022.JPG" class="image6 resizeme" data-description="

													Caption

The public toilets in Ephesus were located in the public baths and had running water. Servants were often employed as seat warmers before the patrons used the cold stone seats. An inscription on a wall reads: "Close your eyes, count slowly to 10, and it will come."

													Dimensions
													File Size
													Download

													480 X 640
													49991 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_022.JPG">

  <img src="../photo_gallery/tu/images/TU_029.JPG" class="image7 resizeme" data-description="

													Caption

The Great Theater in Ephesus was based on an original Greek structure. In the Roman period, it was expanded under the reigns of Domitian (A.D. 81 to 96) and Trajan (98 to 117). One estimate gives the theater's capacity as 44,000 spectators and as such it would have been the largest in the ancient world. While generally used for theatrical performances and public assemblies, it was also used for gladiatorial contests in the later imperial period.

													Dimensions
													File Size
													Download

													480 X 640
													57678 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_029.JPG">

  <img src="../photo_gallery/tu/images/TU_028.JPG" class="image8 resizeme" data-description="

													Caption

The Great Theater in Ephesus was based on an original Greek structure. In the Roman period, it was expanded under the reigns of Domitian (A.D. 81 to 96) and Trajan (98 to 117). One estimate gives the theater's capacity as 44,000 spectators and as such it would have been the largest in the ancient world. While generally used for theatrical performances and public assemblies, it was also used for gladiatorial contests in the later imperial period.

													Dimensions
													File Size
													Download

													480 X 640
													56335 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_028.JPG">

  <img src="../photo_gallery/tu/images/TU_001.jpg" class="image9 resizeme" data-description="

													Caption

Seating estimates for the Great Roman Theater in Ephesus vary between 25,000 and 44,000. Regardless of actual capacity, the theater was in continuous use until the 5th century A.D. According to tradition, Saint Paul preached against paganism at this site. Today, partially restored, it is used for an annual festival of culture and art.

													Dimensions
													File Size
													Download

													1010 X 1500
													276490 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_001.jpg">

  <img src="../photo_gallery/tu/images/TU_023.JPG" class="image10 resizeme" data-description="

													Caption

Ruins of the Temple of Hadrian in Ephesus. The temple dates to the 2nd century A.D.; it underwent repairs in the 4th century. The structure has been partially reconstructed from surviving architectural fragments.

													Dimensions
													File Size
													Download

													480 X 640
													47130 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_023.JPG">

  <img src="../photo_gallery/tu/images/TU_033.JPG" class="image11 resizeme" data-description="

													Caption

Terrace homes in Ephesus built on a hill opposite the Temple of Hadrian. The wealthy families lived here in six multi-family homes built on three terraces. Most homes were highly decorated and were heated by use of hot water flowing through pipes in the floors and walls. The roof of one house formed the patio or terrace of the house above it. Work on restoring the houses began in 1960.

													Dimensions
													File Size
													Download

													480 X 640
													58474 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_033.JPG">

  <img src="../photo_gallery/tu/images/TU_032.JPG" class="image12 resizeme" data-description="

													Caption

Terrace homes in Ephesus built on a hill opposite the Temple of Hadrian. The wealthy families lived here in six multi-family homes built on three terraces. Most homes were highly decorated and were heated by use of hot water flowing through pipes in the floors and walls. The roof of one house formed the patio or terrace of the house above it. Work on restoring the houses began in 1960.

													Dimensions
													File Size
													Download

													480 X 640
													49593 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_032.JPG">

  <img src="../photo_gallery/tu/images/TU_021.JPG" class="image13 resizeme" data-description="

													Caption

Terrace homes in Ephesus built on a hill opposite the Temple of Hadrian. The wealthy families lived in six multi-family homes built on three terraces. Most homes were highly decorated;  they were heated by use of hot water flowing through pipes in the floors and walls. Work on restoring the houses began in 1960.

													Dimensions
													File Size
													Download

													480 X 640
													45938 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_021.JPG">

  <img src="../photo_gallery/tu/images/TU_031.JPG" class="image14 resizeme" data-description="

													Caption

Floor mosaic in a terrace home in Ephesus built on a hill opposite the Temple of Hadrian. The wealthy families lived here in six multi-family homes built on three terraces. Most homes were highly decorated and were heated by use of hot water flowing through pipes in the floors and walls. The roof of one house formed the patio or terrace of the house above it. Work on restoring the houses began in 1960.

													Dimensions
													File Size
													Download

													480 X 640
													43649 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_031.JPG">

  <img src="../photo_gallery/tu/images/TU_020.JPG" class="image15 resizeme" data-description="

													Caption

View of the port of Kusadasi on the Aegean Sea. The name Kusadasi means "Bird Island." In Byzantine times it was called "Ephesus Neopolis" and "Scala Nova" under the Genoese and Venetians. Its current name was officially adopted at the beginning of the 20th century by Turkish authorities. Kusadasi is the gateway to the Roman ruins at Ephesus. Some 95 km (57 mi) south of Izmir, it has grown since the late 1970s from a fishing village into a major tourist center serving thousands of tourists. A statue of Kemal Ataturk, the first president of Turkey and the founder of the Turkish Republic, stands on a hill overlooking the city.

													Dimensions
													File Size
													Download

													480 X 640
													44368 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_020.JPG">

  <img src="../photo_gallery/tu/images/TU_019.JPG" class="image16 resizeme" data-description="

													Caption

View of apartment buildings in the resort town of Kusadasi on the Aegean Sea. The population of the town increases from 65,000 to 500,000 during the tourist season. Kusadasi is about a 20-minute drive from the Roman ruins at Ephesus.

													Dimensions
													File Size
													Download

													480 X 640
													40411 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_019.JPG">

  <img src="../photo_gallery/tu/images/TU_018.JPG" class="image17 resizeme" data-description="

													Caption

Pigeon Island (Guvercin Adasi) in the harbor of Kusadasi. The island is connected to the mainland by a causeway. The fortress dates from the 14th and 15th centuries. In 1834, the castle was rebuilt and the garrison expanded. The island became the focus of the town to the extent that people began referring to the whole town as Kusadasi (Bird Island).

													Dimensions
													File Size
													Download

													480 X 640
													33185 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_018.JPG">

  <img src="../photo_gallery/tu/images/TU_017.JPG" class="image18 resizeme" data-description="

													Caption

View of the restored castle on Pigeon Island (Guvercin Adasi) in the harbor of Kusadasi. The fortress was the center of the town's activities in the late 19th century.

													Dimensions
													File Size
													Download

													480 X 640
													45011 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_017.JPG">

  <img src="../photo_gallery/tu/images/TU_015.jpg" class="image19 resizeme" data-description="

													Caption

Swirls of color ranging from deep olive green to bright turquoise were created by a massive phytoplankton bloom that covered the entire surface of the Black Sea on this image taken 20 June 2006. Many of Europe's largest rivers, including the Danube, the Dnister, and the Dnipro (Dnieper) dump fresh water into the sea. The sea's only source of salty water is the narrow Bosporus Strait (in the southwest), which connects it to the Mediterranean Sea through the Sea of Marmara. Northern Turkey makes up the southern shore of the sea. The diamond-shaped landmass that projects into the sea from the north is Ukraine's Crimean peninsula. Photo courtesy of NASA.

													Dimensions
													File Size
													Download

													390 X 640
													44860 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_015.jpg">

  <img src="../photo_gallery/tu/images/TU_014.jpg" class="image20 resizeme" data-description="

													Caption

The Bosporus (near the center of the photograph), a strait that connects the Black Sea to the north with the Sea of Marmara to the south, stands out in this low-oblique, north-looking photograph. One of the world's most strategic waterways, the strait separates European Turkey to the west with Asiatic Turkey to the east. Istanbul (formerly Constantinople), one of the great historic cities of the world, sits near the Bosporus entrance to the Sea of Marmara. Photo courtesy of NASA.

													Dimensions
													File Size
													Download

													505 X 640
													44620 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_014.jpg">

  <img src="../photo_gallery/tu/images/TU_008.jpg" class="image21 resizeme" data-description="

													Caption

A view of Istanbul as taken from the International Space Station. The metropolis of 15 million occupies both sides of the entrance to the narrow, 32 km- (20 mi-) long Bosporus Strait connecting the Mediterranean and Sea of Marmara (south, on the right) to the Black Sea (north, on the left). When this image was taken, strong currents carried turbid coastal waters from the Black Sea through the Strait and into the Sea of Marmara. The sinuous waterway and harbor on the western shore are known as the Golden Horn. Image courtesy of NASA.

													Dimensions
													File Size
													Download

													993 X 1500
													213791 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_008.jpg">

  <img src="../photo_gallery/tu/images/TU_009.jpg" class="image22 resizeme" data-description="

													Caption

The city of Gallipoli (Gelibolu in Turkish; light gray to pink area in center of photo) sits at a crossroads between the Sea of Marmara (to the right) and the Dardanelles Strait (which leads to the Aegean Sea). Water in the Strait flows in both northeast and southwest directions due to opposite surface and undercurrents. Several ships are visible in the Strait to the southwest of Gallipoli (center left). Image courtesy of NASA.

													Dimensions
													File Size
													Download

													435 X 639
													37489 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_009.jpg">

  <img src="../photo_gallery/tu/images/TU_011.jpg" class="image23 resizeme" data-description="

													Caption

This image includes many of the islands of the East Aegean as well as part of mainland Turkey. The largest modern city in the Aegean coast is Izmir, Turkey, situated about one quarter of the image length from the top. The city is the bright coastal area near the greenish waters of Izmir Bay and southeast of the roughly triangular-shaped island of Lesvos. The lengthy island at the bottom of the photo is Crete. North of Crete, the small broken ring of islands are the remnants of the collapsed caldera of Santorini Volcano. Image source: NASA.

													Dimensions
													File Size
													Download

													1500 X 976
													227883 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_011.jpg">

  <img src="../photo_gallery/tu/images/TU_013.jpg" class="image24 resizeme" data-description="

													Caption

This northeast-looking view shows the Ataturk Reservoir and Dam, presently the largest man-made lake in Turkey. Located in south central Turkey on the Euphrates River, Ataturk Reservoir was completed in the early 1990's. The meandering Euphrates River (dark line) can be seen exiting the scene below the left center of the image. Smooth lake waters appear as dark blue, while wind-roughened waters appear light blue. The light area to the west of the dam (left center) is where rocks were quarried for the construction of the dam. Photo courtesy of NASA.

													Dimensions
													File Size
													Download

													640 X 640
													95707 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_013.jpg">

  <img src="../photo_gallery/tu/images/TU_012.jpg" class="image25 resizeme" data-description="

													Caption

A southwest-looking photograph of south-central Turkey and northwest Syria. The Plain of Adana, an extensive agricultural region, is located northwest of the Gulf of Iskenderun (the roughly rectangular-shaped gulf near the center of the photo) and is irrigated by the Seyhan River. Adana, the largest city in the region, can be seen midway between the Gulf and the Taurus Mountains to the west. The coastlines of Syria, Lebanon, and Israel are visible along the eastern Mediterranean Sea. The island of Cyprus can be seen off the Turkish and Syrian coasts. Photo courtesy of NASA.

													Dimensions
													File Size
													Download

													502 X 640
													40613 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_012.jpg">

  <img src="../photo_gallery/tu/images/TU_010.jpg" class="image26 resizeme" data-description="

													Caption

Mount Ararat (5,166 m, 16,949 ft) is the largest volcano in Turkey, but is not currently active. It is located in extreme northeastern Turkey, near the borders with Iran and Armenia. Southwest of the main peak lies Lesser Ararat (3,896 m, 12,877 ft). Ahora Gorge is a northeast-trending chasm dropping from the top of the mountain. Claims by different explorers to have found remnants of Noah's Ark on Mount Ararat have led to continuing expeditions to the mountain, many focusing their searches on the gorge area. Photo courtesy of NASA.

													Dimensions
													File Size
													Download

													874 X 1362
													181936 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_010.jpg">

  <img src="../photo_gallery/tu/images/TU_016.JPG" class="image27 resizeme" data-description="

													Caption

A view of Mount Ararat in eastern Turkey through the fog. The highest of its two peaks, Greater Ararat, is the tallest mountain in Turkey at 5,166 m (16,949 ft). Although located some 32 km (20 mi) from the Armenian border, the dormant volcano dominates the skyline of Yerevan, Armenia's capital. This photo was snapped after take off from the Yerevan airport.

													Dimensions
													File Size
													Download

													1125 X 1500
													87983 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_016.JPG">

  <img src="../photo_gallery/tu/images/TU_007.jpg" class="image28 resizeme" data-description="

													Caption

The Sultan Ahmed Mosque (also known as the Blue Mosque) in Istanbul is the national mosque of Turkey.

													Dimensions
													File Size
													Download

													1125 X 1500
													210931 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_007.jpg">

  <img src="../photo_gallery/tu/images/TU_005.jpg" class="image29 resizeme" data-description="

													Caption

Distinctively shaped volcanic cones in the Cappadocia region of Turkey were shaped by centuries of wind and rain erosion. The soft rock is easily carved and hardens like concrete when exposed to the air. Many of these structures have been transformed into domestic dwellings.

													Dimensions
													File Size
													Download

													1500 X 980
													352888 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_005.jpg">

  <img src="../photo_gallery/tu/images/TU_004.jpg" class="image30 resizeme" data-description="

													Caption

Seagulls come to rest on one of the colorful fishing boats anchored on the shore of the Bosporus Strait in the heart of historic Istanbul.

													Dimensions
													File Size
													Download

													1500 X 1203
													281153 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_004.jpg">

  <img src="../photo_gallery/tu/images/TU_002.jpg" class="image31 resizeme" data-description="

													Caption

The Topkapi Palace courtyard in Istanbul. The Palace was the official residence of the Ottoman Sultans for 400 years. It is a UNESCO World Heritage Site and contains many holy relics of the Muslim world. Construction was begun in 1459, and at its height, the complex housed 4,000 people. In 1924, a governmental decree transformed the Palace into a museum of the imperial era.

													Dimensions
													File Size
													Download

													1005 X 1500
													363627 kb

													Usage

														Factbook photos - obtained from a wide variety of sources - are in the public domain and are copyright free.

Agency Copyright Notice

" data-link="../photo_gallery/tu/images/TU_002.jpg">


text:
from pandaharvester.harvesterconfig import harvester_config
from pandaharvester.harvestercore import core_utils
from pandaharvester.harvestercore.plugin_factory import PluginFactory
from pandaharvester.harvestercore.db_proxy_pool import DBProxyPool as DBProxy
from pandaharvester.harvesterbody.agent_base import AgentBase

# logger
_logger = core_utils.setup_logger('cred_manager')

# credential manager
class CredManager(AgentBase):

    # constructor
    def __init__(self, single_mode=False):
        AgentBase.__init__(self, single_mode)
        self.pluginFactory = PluginFactory()
        self.dbProxy = DBProxy()
        # get module and class names
        moduleNames = self.get_list(harvester_config.credmanager.moduleName)
        classNames = self.get_list(harvester_config.credmanager.className)
        # file names of original certificates
        if hasattr(harvester_config.credmanager, 'inCertFile'):
            inCertFiles = self.get_list(harvester_config.credmanager.inCertFile)
        else:
            inCertFiles = self.get_list(harvester_config.credmanager.certFile)
        # file names of certificates to be generated
        if hasattr(harvester_config.credmanager, 'outCertFile'):
            outCertFiles = self.get_list(harvester_config.credmanager.outCertFile)
        else:
            # use the file name of the certificate for panda connection as output name
            outCertFiles = self.get_list(harvester_config.pandacon.cert_file)
        # VOMS
        vomses = self.get_list(harvester_config.credmanager.voms)
        # get plugin
        self.exeCores = []
        for moduleName, className, inCertFile, outCertFile, voms in \
                zip(moduleNames, classNames, inCertFiles, outCertFiles, vomses):
            pluginPar = {}
            pluginPar['module'] = moduleName
            pluginPar['name'] = className
            pluginPar['inCertFile'] = inCertFile
            pluginPar['outCertFile'] = outCertFile
            pluginPar['voms'] = voms
            exeCore = self.pluginFactory.get_plugin(pluginPar)
            self.exeCores.append(exeCore)

    # get list
    def get_list(self, data):
        if isinstance(data, list):
            return data
        else:
            return [data]

    # main loop
    def run(self):
        while True:
            # execute
            self.execute()
            # check if being terminated
            if self.terminated(harvester_config.credmanager.sleepTime, randomize=False):
                return

    # main
    def execute(self):
        # get lock
        locked = self.dbProxy.get_process_lock('credmanager', self.get_pid(),
                                               harvester_config.credmanager.sleepTime)
        if not locked:
            return
        # loop over all plugins
        for exeCore in self.exeCores:
            # do nothing
            if exeCore is None:
                continue
                # make logger
            mainLog = self.make_logger(_logger, "{0} {1}".format(exeCore.__class__.__name__, exeCore.outCertFile),
                                       method_name='execute')
            try:
                # check credential
                mainLog.debug('check credential')
                isValid = exeCore.check_credential()
                if isValid:
                    mainLog.debug('valid')
                elif not isValid:
                    # renew it if necessary
                    mainLog.debug('invalid')
                    mainLog.debug('renew credential')
                    tmpStat, tmpOut = exeCore.renew_credential()
                    if not tmpStat:
                        mainLog.error('failed : {0}'.format(tmpOut))
                        continue
            except Exception:
                core_utils.dump_error_message(mainLog)
            mainLog.debug('done')


text:
namespace NBitcoin.BouncyCastle.Asn1
{
	internal abstract class Asn1Encodable
		: IAsn1Convertible
	{
		public const string Der = "DER";
		public const string Ber = "BER";

		public sealed override int GetHashCode()
		{
			return ToAsn1Object().CallAsn1GetHashCode();
		}

		public sealed override bool Equals(
			object obj)
		{
			if(obj == this)
				return true;

			IAsn1Convertible other = obj as IAsn1Convertible;

			if(other == null)
				return false;

			Asn1Object o1 = ToAsn1Object();
			Asn1Object o2 = other.ToAsn1Object();

			return o1 == o2 || o1.CallAsn1Equals(o2);
		}

		public abstract Asn1Object ToAsn1Object();
	}
}


text:
package net.respectnetwork.csp.application.dao;

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

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class DAOContextProvider implements ApplicationContextAware
{
        private static final Logger logger = LoggerFactory.getLogger(DAOContextProvider.class);

	private static ApplicationContext context = null;

	public static ApplicationContext getApplicationContext()
	{
		logger.info("getApplicationContext() " + context);
		return context;
	}

	public void setApplicationContext( ApplicationContext context ) throws BeansException
	{
		logger.info("setApplicationContext() " + context);
		this.context = context;
	}
}


text:
```shell
pip install kivy kivy.deps.sdl2 kivy.deps.glew ModernGL Pillow Pyrr numpy
```


text:
package socketcrutch

type routeStore struct {
	routesMap map[string]*Route
}

func newRouteStore() *routeStore {
	return &routeStore{
		routesMap: make(map[string]*Route, 0),
	}
}

func (s *routeStore) Set(path string, route *Route) {
	s.routesMap[path] = route
}

func (s *routeStore) Get(path string) *Route {
	return s.routesMap[path]
}


text:
require "postgresql/version"
require "pg"

module Postgresql
  # Your code goes here...
end


text:
from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('coop_cms', '0012_auto_20170502_1125'),
    ]

    operations = [

    ]


text:
from __future__ import print_function

import json
import httplib
import sys
import datetime

compile_name = "xrage_compile"
template_name = "sedov"
machine = "wf"

NUM_PROCS = 128
NUM_NODES = 8

tag = "reg_test_wf"

# first, submit compilation requests for the revision from N days ago

N = 28
d = datetime.datetime.today() - datetime.timedelta(N)
epoch = datetime.datetime.fromtimestamp(0)
offset = (d - epoch).total_seconds()

rev_string = "{" + str(d.year) + "-" + str(d.month) + "-" + str(d.day) + "}"

compile_jobs = []
compile_jobs.append({'NAME': tag + "_" + compile_name + "_" + str(d.year) + "-" + str(d.month) + "-" + str(d.day),
                     'REVISION': rev_string,
                     'template': compile_name,
                     'machine': machine,
                     'regression_tag': tag,
                     'offset': offset});

jobs = []
jobs.extend(compile_jobs)
# submit 5 jobs with each revision
for c in compile_jobs:
    for i in range(5):
        new_job = {'NAME': tag + "_" + "run" + str(i) + "_" + c['NAME'],
                   'template': template_name,
                   'NUM_NODES': NUM_NODES,
                   'NUM_PROCS': NUM_PROCS,
                   'machine': machine,
                   'XRAGE': "@@" + c['NAME'] + "@@",
                   'depends': [c['NAME']],
                   'PROBLEM_SIZE': "1800",
                   'regression_tag': tag,
                   'offset': c['offset']};

        jobs.append(new_job)

import submit_batch
submit_batch.submit(jobs)


text:
Very wow, such server!

## Deploy
Install: [.NET Core CLI](https://www.microsoft.com/net/core)

Clone:
```bash
git clone https://github.com/VeryWow/SuchTasker.Server.git
cd SuchTasker.Server
```

Build:
```bash
dotnet restore
dotnet build
dotnet ef migrations add Migrator
dotnet ef database update
```

Run:
```bash
dotnet run
```
Port is 80 by default (see [config.json](https://github.com/VeryWow/SuchTasker.Server/blob/develop/config.json)).

For other deployment and building methods see [.NET Core CLI documentation](https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-publish)

## Available configuration arguments

* Urls - set of urls to serve on.
* ContentRoot - root path to serve content from (can be both relative and absolute).

### Console
 - `--urls [URLS...]` or `-u [URLS...]` - Urls.
 - `--root [PATH]` or `-r [PATH]` - ContentRoot.

Example:
	`dotnet run -u http://+:3000 -r ./../static`

### config.json
```json
{
	"urls": ["http://+:80"],
	"contentRoot": ""
}
```

---
> Copyright [VeryWow team](https://github.com/VeryWow) 2017


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

    <string name="more_than_max">超过了上限</string>
    <string name="preview">预览</string>
    <string name="recent_photos">最近照片</string>
    <string name="sure">确定</string>
    <string name="select_photos">选择照片</string>
    <string name="back">返回</string>
    <string name="taking_pictures">拍摄照片</string>
    <string name="max_img_limit_reached">不能选择超过%d个图像</string>

</resources>


text:
#pragma once

#include "construction/building_blocks.hpp"
#include "ctx_partial.hpp"

// compute local wavelet tree with word aligned intervals
template <typename AlphabetType>
void pc_partial(AlphabetType const* text, ctx_partial * ctx) {

  const uint64_t size = ctx->size();
  const uint64_t levels = ctx->levels();

  uint64_t cur_alphabet_size = (1ULL << levels);

  auto& borders = ctx->borders();
  auto& hist = ctx->hist();
  auto& bv = ctx->bv();
  auto& data_size = ctx->data_size();
  auto& level_data_sizes = ctx->level_data_sizes();

  scan_text_compute_first_level_bv_and_last_level_hist(text, size, levels, bv,
                                                       *ctx);

  // Now we compute the WM bottom-up, i.e., the last level first
  for (uint64_t level = levels - 1; level > 0; --level) {
    const uint64_t cur_prefix_shift = (levels - level);
    const uint64_t cur_bit_shift = cur_prefix_shift - 1;

    const auto& prev_hist = hist[level + 1];
    const auto& cur_hist = hist[level];

    // Update the maximum value of a feasible bit prefix and update the
    // histogram of the bit prefixes
    cur_alphabet_size >>= 1;
    borders[0] = 0;
    cur_hist[0] = prev_hist[0] + prev_hist[1];

    for (uint64_t i = 1; i < cur_alphabet_size; ++i) {
      // borders are word aligned
      borders[i] = borders[i - 1] + (((cur_hist[i - 1] + 63) >> 6) << 6);
      cur_hist[i] = prev_hist[i << 1] + prev_hist[(i << 1) + 1];
    }
    level_data_sizes[level] = (borders[cur_alphabet_size - 1] >> 6) +
                              ((cur_hist[cur_alphabet_size - 1] + 63) >> 6);
    data_size += level_data_sizes[level];

    // Now we insert the bits with respect to their bit prefixes
    for (uint64_t i = 0; i < size; ++i) {
      const uint64_t pos = borders[text[i] >> cur_prefix_shift]++;
      bv[level][pos >> 6] |=
          (((text[i] >> cur_bit_shift) & 1ULL) << (63ULL - (pos & 63ULL)));
    }
  }

  level_data_sizes[0] = ((size + 63) >> 6);
  data_size += level_data_sizes[0];
  hist[0][0] = size;
}

/******************************************************************************/


text:
package org.jclouds.cloudstack.domain;

import static com.google.common.base.Preconditions.checkNotNull;

import java.beans.ConstructorProperties;
import java.util.Map;

import org.jclouds.javax.annotation.Nullable;

import com.google.common.base.Function;
import com.google.common.base.Objects;
import com.google.common.base.Objects.ToStringHelper;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;

/**
 * Information about a dimension of the capacity
 */
public class Capacity implements Comparable<Capacity> {

   /**
    */
   public static enum Type {
      MEMORY_ALLOCATED_BYTES(0),
      CPU_ALLOCATED_MHZ(1),
      PRIMARY_STORAGE_USED_BYTES(2),
      PRIMARY_STORAGE_ALLOCATED_BYTES(3),
      PUBLIC_IP_ADDRESSES(4),
      PRIVATE_IP_ADDRESSES(5),
      SECONDARY_STORAGE_USED_BYTES(6),
      VLANS(7),
      DIRECT_ATTACHED_PUBLIC_IP_ADDRESSES(8),
      LOCAL_STORAGE_USED_BYTES(9),
      UNRECOGNIZED(Integer.MAX_VALUE);

      private int code;

      private static final Map<Integer, Type> INDEX = Maps.uniqueIndex(ImmutableSet.copyOf(Type.values()),
            new Function<Type, Integer>() {

               @Override
               public Integer apply(Type input) {
                  return input.code;
               }

            });

      Type(int code) {
         this.code = code;
      }

      @Override
      public String toString() {
         return name();
      }

      public static Type fromValue(String type) {
         Integer code = Integer.valueOf(checkNotNull(type, "type"));
         return INDEX.containsKey(code) ? INDEX.get(code) : UNRECOGNIZED;
      }
   }

   public static Builder<?> builder() {
      return new ConcreteBuilder();
   }

   public Builder<?> toBuilder() {
      return new ConcreteBuilder().fromCapacity(this);
   }

   public abstract static class Builder<T extends Builder<T>> {
      protected abstract T self();

      protected long capacityTotal;
      protected long capacityUsed;
      protected double percentUsed;
      protected String podId;
      protected String podName;
      protected Capacity.Type type;
      protected String zoneId;
      protected String zoneName;

      /**
       * @see Capacity#getCapacityTotal()
       */
      public T capacityTotal(long capacityTotal) {
         this.capacityTotal = capacityTotal;
         return self();
      }

      /**
       * @see Capacity#getCapacityUsed()
       */
      public T capacityUsed(long capacityUsed) {
         this.capacityUsed = capacityUsed;
         return self();
      }

      /**
       * @see Capacity#getPercentUsed()
       */
      public T percentUsed(double percentUsed) {
         this.percentUsed = percentUsed;
         return self();
      }

      /**
       * @see Capacity#getPodId()
       */
      public T podId(String podId) {
         this.podId = podId;
         return self();
      }

      /**
       * @see Capacity#getPodName()
       */
      public T podName(String podName) {
         this.podName = podName;
         return self();
      }

      /**
       * @see Capacity#getType()
       */
      public T type(Capacity.Type type) {
         this.type = type;
         return self();
      }

      /**
       * @see Capacity#getZoneId()
       */
      public T zoneId(String zoneId) {
         this.zoneId = zoneId;
         return self();
      }

      /**
       * @see Capacity#getZoneName()
       */
      public T zoneName(String zoneName) {
         this.zoneName = zoneName;
         return self();
      }

      public Capacity build() {
         return new Capacity(capacityTotal, capacityUsed, percentUsed, podId, podName, type, zoneId, zoneName);
      }

      public T fromCapacity(Capacity in) {
         return this
               .capacityTotal(in.getCapacityTotal())
               .capacityUsed(in.getCapacityUsed())
               .percentUsed(in.getPercentUsed())
               .podId(in.getPodId())
               .podName(in.getPodName())
               .type(in.getType())
               .zoneId(in.getZoneId())
               .zoneName(in.getZoneName());
      }
   }

   private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
      @Override
      protected ConcreteBuilder self() {
         return this;
      }
   }

   private final long capacityTotal;
   private final long capacityUsed;
   private final double percentUsed;
   private final String podId;
   private final String podName;
   private final Capacity.Type type;
   private final String zoneId;
   private final String zoneName;

   @ConstructorProperties({
         "capacitytotal", "capacityused", "percentused", "podid", "podname", "type", "zoneid", "zonename"
   })
   protected Capacity(long capacityTotal, long capacityUsed, double percentUsed, @Nullable String podId,
                      @Nullable String podName, @Nullable Capacity.Type type, @Nullable String zoneId, @Nullable String zoneName) {
      this.capacityTotal = capacityTotal;
      this.capacityUsed = capacityUsed;
      this.percentUsed = percentUsed;
      this.podId = podId;
      this.podName = podName;
      this.type = type;
      this.zoneId = zoneId;
      this.zoneName = zoneName;
   }

   public long getCapacityTotal() {
      return this.capacityTotal;
   }

   public long getCapacityUsed() {
      return this.capacityUsed;
   }

   public double getPercentUsed() {
      return this.percentUsed;
   }

   @Nullable
   public String getPodId() {
      return this.podId;
   }

   @Nullable
   public String getPodName() {
      return this.podName;
   }

   @Nullable
   public Capacity.Type getType() {
      return this.type;
   }

   @Nullable
   public String getZoneId() {
      return this.zoneId;
   }

   @Nullable
   public String getZoneName() {
      return this.zoneName;
   }

   @Override
   public int hashCode() {
      return Objects.hashCode(capacityTotal, capacityUsed, percentUsed, podId, podName, type, zoneId, zoneName);
   }

   @Override
   public boolean equals(Object obj) {
      if (this == obj) return true;
      if (obj == null || getClass() != obj.getClass()) return false;
      Capacity that = Capacity.class.cast(obj);
      return Objects.equal(this.capacityTotal, that.capacityTotal)
            && Objects.equal(this.capacityUsed, that.capacityUsed)
            && Objects.equal(this.percentUsed, that.percentUsed)
            && Objects.equal(this.podId, that.podId)
            && Objects.equal(this.podName, that.podName)
            && Objects.equal(this.type, that.type)
            && Objects.equal(this.zoneId, that.zoneId)
            && Objects.equal(this.zoneName, that.zoneName);
   }

   protected ToStringHelper string() {
      return Objects.toStringHelper(this)
            .add("capacityTotal", capacityTotal).add("capacityUsed", capacityUsed).add("percentUsed", percentUsed)
            .add("podId", podId).add("podName", podName).add("type", type).add("zoneId", zoneId).add("zoneName", zoneName);
   }

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

   @Override
   public int compareTo(Capacity other) {
      int comparison = this.zoneId.compareTo(other.zoneId);
      if (comparison == 0) comparison = this.podId.compareTo(other.podId);
      if (comparison == 0) Integer.valueOf(this.type.code).compareTo(other.type.code);
      return comparison;
   }
}


text:
#include <fenv_libc.h>
#include <float.h>
#include <math.h>

static __inline__ void
fexceptdiv (float d, float e)
{
  __asm__ __volatile__ ("debr %0,%1" : : "f" (d), "f" (e) );
}

static __inline__ void
fexceptadd (float d, float e)
{
  __asm__ __volatile__ ("aebr %0,%1" : : "f" (d), "f" (e) );
}

int
feraiseexcept (int excepts)
{
  /* Raise exceptions represented by EXPECTS.  But we must raise only
     one signal at a time.  It is important that if the overflow/underflow
     exception and the inexact exception are given at the same time,
     the overflow/underflow exception follows the inexact exception.  */

  /* First: invalid exception.  */
  if (FE_INVALID & excepts)
    fexceptdiv (0.0, 0.0);

  /* Next: division by zero.  */
  if (FE_DIVBYZERO & excepts)
    fexceptdiv (1.0, 0.0);

  /* Next: overflow.  */
  if (FE_OVERFLOW & excepts)
    /* I don't think we can do the same trick as intel so we will have
       to live with inexact coming also.  */
    fexceptadd (FLT_MAX, 1.0e32);

  /* Next: underflow.  */
  if (FE_UNDERFLOW & excepts)
    fexceptdiv (FLT_MIN, 3.0);

  /* Last: inexact.  */
  if (FE_INEXACT & excepts)
    fexceptdiv (2.0, 3.0);

  /* Success.  */
  return 0;
}
libm_hidden_def (feraiseexcept)


text:
'use strict';

/*jslint node: true */
/*globals describe, it, before */

var path = require('path');
var fs = require('fs');

var chai = require('chai');
var expect = chai.expect;

var libKey = require('../lib/key');

describe('Test for lib/key.js', function () {
  describe('generateKey', function () {
    var key;

    before(function (done) {
      libKey.generateKey(128, function (err, k) {
        key = k;
        done(err);
      });
    });

    it('should have property `version`', function () {
      expect(key).to.have.property('version').that.is.equal(1);
    });

    it('should have property `size`', function () {
      expect(key).to.have.property('size').that.is.equal(128);
    });

    it('should have property `key`', function () {
      expect(key).to.have.property('key');
      expect(key.key).to.have.length(128);
    });

    it('should have property `created`', function () {
      expect(key).to.have.property('created').that.is.an.instanceof(Date);
      expect(new Date() - key.created).to.be.below(500);
    });
  });

  describe('writeKeyfile', function () {
    it('should succeed to write keyfile', function (done) {
      libKey.generateKey(128, function (err, k) {
        if (err) { return done(err); }

        var f = path.join(__dirname, 'tmp.key');
        libKey.writeKeyfile(f, k, function (err) {
          if (err) { return done(err); }

          fs.readFile(f, function (err, bytes) {
            if (err) { return done(err); }

            var k2 = JSON.parse(bytes);
            expect(JSON.parse(JSON.stringify(k))).to.deep.equal(k2);

            done();
          });
        });
      });
    });
  });
});


text:
<?php

namespace App;

use App\Comment;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Post extends Model
{
    use SoftDeletes;

    protected $dates = ['deleted_at'];

    public function getDateStartAttribute($value)
    {
        return Carbon::parse($value)->format('d-m-Y H:i:s');
    }
    public function getDateEndAttribute($value)
    {
        return Carbon::parse($value)->format('d-m-Y H:i:s');
    }
    public function setDateStartAttribute($value)
    {
        $this->attributes['date_start'] = Carbon::createFromFormat('d-m-Y H:i:s', $value)->toDateTimeString();
    }
    public function setDateEndAttribute($value)
    {
        $this->attributes['date_end'] = Carbon::createFromFormat('d-m-Y H:i:s', $value)->toDateTimeString();
    }

    protected $fillable =[
        'title',
        'excerpt',
        'content',
        'date_start',
        'date_end',
        'thumbnail_link',
        'url_site',
        'status',
        'tag_id',
        'slug'
    ];

    public function setSlugAttribute($value)
    {
        $this->attributes['slug'] = str_slug($value);
    }

    public function user()
    {
        return $this->belongsTo('App\User');
    }

    public function comments()
    {
        return $this->hasMany('App\Comment');
    }
    public function tags()
    {
        return $this->belongsToMany('App\Tag');
    }
    //scope
    public function scopePublished($query)
    {
        return $query->where('status','publié')->orderBy('date_start')->get();
    }

    public function getComment()
    {
        return Comment::PublishedByPost($this->id)->get();
    }

    public function countComment()
    {
        return $this->getComment()->count();
    }

    public function getTag()
    {
        return Tag::find($this->tag_id);
    }
}


text:
package org.apache.hadoop.hive.ql.udf;

import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.io.Text;

/**
 * UDFUnhex.
 *
 */
@Description(name = "unhex",
    value = "_FUNC_(str) - Converts hexadecimal argument to binary",
    extended = "Performs the inverse operation of HEX(str). That is, it interprets\n"
    + "each pair of hexadecimal digits in the argument as a number and\n"
    + "converts it to the byte representation of the number. The\n"
    + "resulting characters are returned as a binary string.\n\n"
    + "Example:\n"
    + "> SELECT DECODE(UNHEX('4D7953514C'), 'UTF-8') from src limit 1;\n"
    + "'MySQL'\n\n"
    + "The characters in the argument string must be legal hexadecimal\n"
    + "digits: '0' .. '9', 'A' .. 'F', 'a' .. 'f'. If UNHEX() encounters\n"
    + "any nonhexadecimal digits in the argument, it returns NULL. Also,\n"
    + "if there are an odd number of characters a leading 0 is appended.")
public class UDFUnhex extends UDF {

  /**
   * Convert every two hex digits in s into.
   *
   */
  public byte[] evaluate(Text s) {
    if (s == null) {
      return null;
    }

    // append a leading 0 if needed
    String str;
    if (s.getLength() % 2 == 1) {
      str = "0" + s.toString();
    } else {
      str = s.toString();
    }

    byte[] result = new byte[str.length() / 2];
    for (int i = 0; i < str.length(); i += 2) {
      try {
        result[i / 2] = ((byte) Integer.parseInt(str.substring(i, i + 2), 16));
      } catch (NumberFormatException e) {
        // invalid character present, return null
        return null;
      }
    }

    return result;
  }
}


text:
export default {
  Acne: ['soap', 'acne', 'cream', 'hormone'],
  Allergy: ['polen', 'cough', 'itch', 'skinrash', 'medicine', 'lung', 'cell'],
  Infection: ['bacteria', 'blood', 'virus', 'medicine', 'cell', 'heart'],
  Headache: ['brain', 'headache', 'dizziness', 'medicine'],
  Fever: ['headache', 'cough', 'temperature', 'vaccine', 'virus', 'bacteria', 'heart'],
  Influenza: ['tea', 'vaccine', 'cough', 'temperature', 'virus'],
};


text:
package petablox.android.srcmap;

import java.util.*;

public class InvkMarker extends Marker {
	public InvkMarker(int line, String chordSig, String markerType, String text) {
		super(line, chordSig, markerType);
		this.text = text;
	}

	private String text;
	private List<Expr> params = null;

	public void addParam(Expr param) {
		if(this.params == null) {
			this.params = new ArrayList<Expr>();
		}
		this.params.add(param);
	}

	public Expr getArg(int i) {
		if(params.size() == i) {
			//it is the vararg-type param
			//and in the source code in the corresponding
			//invocation instr does not pass anything for this param
			return null;
		}
		return params.get(i);
	}

	public int argCount() { return params.size(); }

	public String text() { return text; }

	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append(super.line() + ": " + super.chordSig() + "(");
		if(params != null){
			for(Expr e : params){
				builder.append((e == null ? "null" : e.toString())+", ");
			}
		}
		builder.append(")");
		return builder.toString();
	}
}


text:
package com.vector.onetodo;

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

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.os.PowerManager;
import android.util.Log;
import android.widget.Toast;

import com.vector.onetodo.db.gen.DaoMaster;
import com.vector.onetodo.db.gen.DaoSession;
import com.vector.onetodo.db.gen.ToDo;
import com.vector.onetodo.db.gen.ToDoDao;
import com.vector.onetodo.db.gen.ToDoDao.Properties;
import com.vector.onetodo.utils.Constants;

import de.greenrobot.dao.query.QueryBuilder;

public class AlarmManagerBroadcastReceiver extends BroadcastReceiver {

	final public static String ONE_TIME = "onetime";
	public  DaoSession daoSession;
	public  DaoMaster daoMaster;
	public  List<ToDo> todos;
	SQLiteDatabase db;
	ToDoDao tododao;

	static List<ToDo> todo_obj,todo_Qlist;

	@Override
	public void onReceive(Context context, Intent intent) {
		 PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
         PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "YOUR TAG");
         db_initialize(context);
 		 todo_obj=tododao.loadAll();
         //Acquire the lock
         wl.acquire();

         //You can do the processing here update the widget/remote views.
         Bundle extras = intent.getExtras();
         StringBuilder msgStr = new StringBuilder();

         if(extras != null && extras.getBoolean(ONE_TIME, Boolean.FALSE)){
        	 msgStr.append("One time Timer : ");
         }

         //************ NOTIFICATIONS
         NotificationHandler nHandler;
 	   	 nHandler = NotificationHandler.getInstance(context);
 		 nHandler.createSimpleNotification(context);
 		//*********SET ALARM FOR NEXT TIME
 		 SetAlarm(context);

         //Release the lock
         wl.release();

	}

	public void SetAlarm(Context context){
		AlarmManager mgrAlarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
        ArrayList<PendingIntent> intentArray = new ArrayList<PendingIntent>();
        Constants.AlaramIndex=Constants.AlaramIndex+1;
        if(Constants.AlaramSize>Constants.AlaramIndex){
			 {
		           Intent intent = new Intent(context, AlarmManagerBroadcastReceiver.class);
		           PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 1, intent, 0);
		           mgrAlarm.set(AlarmManager.RTC_WAKEUP,
		                        todo_Qlist.get(Constants.AlaramIndex).getStart_date() ,
		                        pendingIntent);

		           intentArray.add(pendingIntent);
		        }
		}
	}

	public void SetcustAlarm(Context context)
    {
		db_initialize(context);
		Calendar tempCal = Calendar.getInstance();
		long date=tempCal.getTimeInMillis();

		Log.v("Current date", date+"  "+tempCal);

		QueryBuilder<ToDo> todo_queary;
		todo_queary=tododao.queryBuilder().where(Properties.Start_date.ge(date)).orderAsc(Properties.Start_date);

		todo_Qlist=todo_queary.list();
		Constants.AlaramSize=todo_Qlist.size();
		AlarmManager mgrAlarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
        ArrayList<PendingIntent> intentArray = new ArrayList<PendingIntent>();
        for(int i=0;i<todo_Qlist.size();i++){
		Toast.makeText(context, ""+todo_Qlist.get(i).getTitle(), Toast.LENGTH_LONG).show();
		}

		if(Constants.AlaramSize>0)
		{
			Constants.AlaramIndex=0;
			 {
		           Intent intent = new Intent(context, AlarmManagerBroadcastReceiver.class);
		           // Loop counter `i` is used as a `requestCode`
		           PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 1, intent, 0);
		           // Single alarms in 1, 2, ..., 10 minutes (in `i` minutes)
		           mgrAlarm.set(AlarmManager.RTC_WAKEUP,
		                        todo_Qlist.get(Constants.AlaramIndex).getStart_date() ,
		                        pendingIntent);

		           intentArray.add(pendingIntent);
		        }
		}
    }

    public void CancelAlarm(Context context)
    {
        Intent intent = new Intent(context, AlarmManagerBroadcastReceiver.class);
        PendingIntent sender = PendingIntent.getBroadcast(context, 1, intent, 0);
        AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
        alarmManager.cancel(sender);
    }
    public void setOnetimeTimer(Context context){
    	AlarmManager am=(AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
        Intent intent = new Intent(context, AlarmManagerBroadcastReceiver.class);
        intent.putExtra(ONE_TIME, Boolean.TRUE);
        PendingIntent pi = PendingIntent.getBroadcast(context, 1, intent, 0);
        am.set(AlarmManager.RTC_WAKEUP,MainActivity.todo_obj.get(0).getStart_date(), pi);
    }

    public void db_initialize(Context context) {
		DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(context,
				"OneTodo-db", null);
		db = helper.getWritableDatabase();
		daoMaster = new DaoMaster(db);
		daoSession = daoMaster.newSession();
		tododao = daoSession.getToDoDao();
	}
}


text:
(function () {
  'use strict';

  function digestMarkup(scope, compile, markup) {
    var element = angular.element(markup);
    compile(element)(scope);

    scope.$apply();
    return element;
  }

  describe('detailHeader', function () {
    var $scope, $compile;

    beforeEach(module('templates'));
    beforeEach(module('horizon.framework'));
    beforeEach(module('horizon.framework.widgets'));
    beforeEach(module('horizon.framework.widgets.headers'));

    beforeEach(inject(function ($injector) {
      $compile = $injector.get('$compile');
      $scope = $injector.get('$rootScope').$new();
    }));

    it('defines basic elements', function () {
      $scope.scopeTitle = 'A Title';
      $scope.scopeDesc = 'A Description';
      var markup = '<hz-page-header header="scopeTitle" ' +
        'description="scopeDesc">A href</hz-page-header>';

      var $element = digestMarkup($scope, $compile, markup);

      expect($element).toBeDefined();
      expect($element.find('.page-header').length).toBe(1);
      expect($element.find('h1').length).toBe(1);
      expect($element.find('h1').text()).toBe('A Title');
      expect($element.find('p').length).toBe(1);
      expect($element.find('p').text()).toBe('A Description');
      expect($element.find('a').length).toBe(1);
      expect($element.find('a').text()).toBe('A href');
    });

  });

})();


text:
package com.intellij.compiler.backwardRefs;

import com.intellij.compiler.server.BuildManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileWithId;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.util.containers.Queue;
import com.intellij.util.indexing.StorageException;
import com.intellij.util.indexing.ValueContainer;
import gnu.trove.THashSet;
import gnu.trove.TIntHashSet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.backwardRefs.NameEnumerator;
import org.jetbrains.jps.backwardRefs.CompilerBackwardReferenceIndex;
import org.jetbrains.jps.backwardRefs.LightRef;
import org.jetbrains.jps.backwardRefs.index.CompilerIndices;

import java.io.File;
import java.io.IOException;
import java.util.*;

import static java.util.stream.Collectors.toList;

class CompilerReferenceReader {
  private final static Logger LOG = Logger.getInstance(CompilerReferenceReader.class);

  private final CompilerBackwardReferenceIndex myIndex;

  private CompilerReferenceReader(File buildDir) throws IOException {
    myIndex = new CompilerBackwardReferenceIndex(buildDir);
  }

  @Nullable
  TIntHashSet findReferentFileIds(@NotNull LightRef ref, boolean checkBaseClassAmbiguity) throws StorageException {
    LightRef.LightClassHierarchyElementDef hierarchyElement = ref instanceof LightRef.LightClassHierarchyElementDef ?
                                                              (LightRef.LightClassHierarchyElementDef)ref :
                                                              ((LightRef.LightMember)ref).getOwner();
    TIntHashSet set = new TIntHashSet();
    final LightRef.NamedLightRef[] hierarchy = getWholeHierarchy(hierarchyElement, checkBaseClassAmbiguity);
    if (hierarchy == null) return null;
    for (LightRef.NamedLightRef aClass : hierarchy) {
      final LightRef overriderUsage = ref.override(aClass.getName());
      addUsages(overriderUsage, set);
    }
    return set;
  }

  /**
   * @return two maps of classes grouped per file
   *
   * 1st map: inheritors. Can be used without explicit inheritance verification
   * 2nd map: candidates. One need to check that these classes are really direct inheritors
   */
  @NotNull
  Map<VirtualFile, Object[]> getDirectInheritors(@NotNull LightRef searchElement,
                                                 @NotNull GlobalSearchScope searchScope,
                                                 @NotNull GlobalSearchScope dirtyScope,
                                                 @NotNull FileType fileType,
                                                 @NotNull CompilerHierarchySearchType searchType) throws StorageException {
    GlobalSearchScope effectiveSearchScope = GlobalSearchScope.notScope(dirtyScope).intersectWith(searchScope);
    LanguageLightRefAdapter adapter = CompilerReferenceServiceImpl.findAdapterForFileType(fileType);
    LOG.assertTrue(adapter != null, "adapter is null for file type: " + fileType);
    Class<? extends LightRef> requiredLightRefClass = searchType.getRequiredClass(adapter);

    Map<VirtualFile, Object[]> candidatesPerFile = new HashMap<>();
    myIndex.get(CompilerIndices.BACK_HIERARCHY).getData(searchElement).forEach((fileId, defs) -> {
        final List<LightRef> requiredCandidates = defs.stream().filter(requiredLightRefClass::isInstance).collect(toList());
        if (requiredCandidates.isEmpty()) return true;
        final VirtualFile file = findFile(fileId);
        if (file != null && effectiveSearchScope.contains(file)) {
          candidatesPerFile.put(file, searchType.convertToIds(requiredCandidates, myIndex.getByteSeqEum()));
        }
        return true;
      });
    return candidatesPerFile.isEmpty() ? Collections.emptyMap() : candidatesPerFile;
  }

  @NotNull
  NameEnumerator getNameEnumerator() {
    return myIndex.getByteSeqEum();
  }

  void close() {
    myIndex.close();
  }

  static CompilerReferenceReader create(Project project) {
    File buildDir = BuildManager.getInstance().getProjectSystemDirectory(project);
    if (buildDir == null || CompilerBackwardReferenceIndex.versionDiffers(buildDir)) {
      return null;
    }
    try {
      return new CompilerReferenceReader(buildDir);
    }
    catch (IOException e) {
      throw new RuntimeException(e);
    }
  }

  private void addUsages(LightRef usage, TIntHashSet sink) throws StorageException {
    myIndex.get(CompilerIndices.BACK_USAGES).getData(usage).forEach(
      new ValueContainer.ContainerAction<Void>() {
        @Override
        public boolean perform(int id, Void value) {
          final VirtualFile file = findFile(id);
          if (file != null) {
            sink.add(((VirtualFileWithId)file).getId());
          }
          return true;
        }
      });
  }

  private VirtualFile findFile(int id) {
    try {
      String path = myIndex.getFilePathEnumerator().valueOf(id);
      assert path != null;
      return VfsUtil.findFileByIoFile(new File(path), false);
    }
    catch (IOException e) {
      throw new RuntimeException(e);
    }
  }

  @Nullable("return null if the class hierarchy contains ambiguous qualified names")
  private LightRef.NamedLightRef[] getWholeHierarchy(LightRef.LightClassHierarchyElementDef hierarchyElement, boolean checkBaseClassAmbiguity)
    throws StorageException {
    Set<LightRef.NamedLightRef> result = new THashSet<>();
    Queue<LightRef.NamedLightRef> q = new Queue<>(10);
    q.addLast(hierarchyElement);
    while (!q.isEmpty()) {
      LightRef.NamedLightRef curClass = q.pullFirst();
      if (result.add(curClass)) {
        if (checkBaseClassAmbiguity || curClass != hierarchyElement) {
          DefCount count = getDefinitionCount(curClass);
          if (count == DefCount.NONE) {
            //diagnostic
            String baseHierarchyElement = getNameEnumerator().getName(hierarchyElement.getName());
            String curHierarchyElement = getNameEnumerator().getName(curClass.getName());
            LOG.error("Can't get definition files for: " + curHierarchyElement + " base class: " + baseHierarchyElement);
          }
          if (count != DefCount.ONE) {
            return null;
          }
        }
        myIndex.get(CompilerIndices.BACK_HIERARCHY).getData(curClass).forEach((id, children) -> {
          for (LightRef child : children) {
            if (child instanceof LightRef.LightClassHierarchyElementDef) {
              q.addLast((LightRef.LightClassHierarchyElementDef) child);
            }
          }
          return true;
        });
      }
    }
    return result.toArray(new LightRef.NamedLightRef[result.size()]);
  }

  private enum DefCount { NONE, ONE, MANY}
  @NotNull
  private DefCount getDefinitionCount(LightRef def) throws StorageException {
    DefCount[] result = new DefCount[]{DefCount.NONE};
    myIndex.get(CompilerIndices.BACK_CLASS_DEF).getData(def).forEach(new ValueContainer.ContainerAction<Void>() {
      @Override
      public boolean perform(int id, Void value) {
        if (result[0] == DefCount.NONE) {
          result[0] = DefCount.ONE;
          return true;
        }
        if (result[0] == DefCount.ONE) {
          result[0] = DefCount.MANY;
          return true;
        }
        return false;
      }
    });
    return result[0];
  }
}


text:
package org.apache.pinot.common.metrics;

import org.apache.pinot.common.Utils;

/**
 * Enumeration containing all the gauges exposed by the Pinot broker.
 *
 */
public enum BrokerGauge implements AbstractMetrics.Gauge {
  QUERY_QUOTA_CAPACITY_UTILIZATION_RATE("tables", false),
  MAX_BURST_QPS("tables", false),
  QUERY_RATE_LIMIT_DISABLED("queryQuota", true),
  NETTY_CONNECTION_CONNECT_TIME_MS("nettyConnection", true),
  REQUEST_SIZE("requestSize", false);

  private final String brokerGaugeName;
  private final String unit;
  private final boolean global;

  BrokerGauge(String unit, boolean global) {
    this.unit = unit;
    this.global = global;
    this.brokerGaugeName = Utils.toCamelCase(name().toLowerCase());
  }

  @Override
  public String getGaugeName() {
    return brokerGaugeName;
  }

  @Override
  public String getUnit() {
    return unit;
  }

  /**
   * Returns true if the gauge is global (not attached to a particular resource)
   *
   * @return true if the gauge is global
   */
  @Override
  public boolean isGlobal() {
    return global;
  }
}


text:
package redradishes;

import org.xnio.ByteBufferPool;
import org.xnio.IoFuture;
import org.xnio.IoUtils;
import org.xnio.OptionMap;
import org.xnio.StreamConnection;
import org.xnio.XnioWorker;
import redradishes.RedisClientConnection.CommandEncoderDecoder;
import redradishes.decoder.parser.ReplyParser;
import redradishes.encoder.ByteSink;

import java.io.IOException;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

public abstract class XnioRedisClient<F, SF extends F> implements AutoCloseable {
  private final BlockingQueue<CommandEncoderDecoder> writerQueue = new LinkedBlockingQueue<>();
  private volatile IoFuture<StreamConnection> streamConnectionFuture;
  private volatile RedisClientConnection redisClientConnection;
  private volatile IOException failure;
  private volatile boolean closed = false;

  protected XnioRedisClient(XnioWorker worker, SocketAddress address, ByteBufferPool bufferPool, Charset charset) {
    this.streamConnectionFuture = openConnection(worker, address, bufferPool, charset);
  }

  private IoFuture<StreamConnection> openConnection(XnioWorker worker, SocketAddress address,
      final ByteBufferPool bufferPool, final Charset charset) {
    IoFuture<StreamConnection> connectionFuture = worker.openStreamConnection(address, null, OptionMap.EMPTY);
    connectionFuture.addNotifier(new IoFuture.HandlingNotifier<StreamConnection, Void>() {
      @Override
      public void handleFailed(IOException exception, Void v) {
        failure = exception;
        failAllCommands();
      }

      @Override
      public void handleDone(StreamConnection connection, Void v) {
        redisClientConnection = new RedisClientConnection(connection, bufferPool, charset, writerQueue);
        if (!writerQueue.isEmpty()) {
          redisClientConnection.commandAdded();
        }
        connection.setCloseListener(streamConnection -> {
          if (!closed) {
            streamConnectionFuture = openConnection(worker, address, bufferPool, charset);
          }
        });
      }
    }, null);
    return connectionFuture;
  }

  private void failAllCommands() {
    CommandEncoderDecoder commandEncoderDecoder;
    while ((commandEncoderDecoder = writerQueue.poll()) != null) {
      commandEncoderDecoder.fail(failure);
    }
  }

  protected <T> F send_(final Request<T> request) {
    if (closed) {
      return createCancelledFuture();
    }
    if (failure != null) {
      return createFailedFuture(failure);
    }
    final SF future = createFuture();
    writerQueue.add(new CommandEncoderDecoder() {
      private ReplyParser<? extends T> parser = request.parser();

      @Override
      public void writeTo(ByteSink sink) {
        request.writeTo(sink);
      }

      @Override
      public boolean parse(ByteBuffer buffer, CharsetDecoder charsetDecoder) throws IOException {
        return parser.parseReply(buffer, value -> {
          complete(future, value);
          return true;
        }, partial -> {
          parser = partial;
          return false;
        }, exception -> {
          completeExceptionally(future, exception);
          return true;
        }, charsetDecoder);
      }

      @Override
      public void fail(Throwable e) {
        completeExceptionally(future, e);
      }

      @Override
      public void cancel() {
        XnioRedisClient.this.cancel(future);
      }
    });
    if (redisClientConnection != null) {
      redisClientConnection.commandAdded();
    }
    if (failure != null) {
      failAllCommands();
    }
    return future;
  }

  protected abstract F createCancelledFuture();

  protected abstract F createFailedFuture(Throwable exception);

  protected abstract SF createFuture();

  protected abstract <T> void complete(SF future, T value);

  protected abstract void completeExceptionally(SF future, Throwable exception);

  protected abstract void cancel(SF future);

  @Override
  public void close() {
    closed = true;
    IoUtils.safeClose(streamConnectionFuture);
  }
}


text:
import { Map } from 'immutable';
import React from 'react';

const classnames = require('classnames');

export default class TodoItem extends React.Component {
  state = {
    data: new Map({
      completed: false,
    }),
  }
  static propTypes = {
    completed: React.PropTypes.bool.isRequired,
    todo: React.PropTypes.string.isRequired,
    onDestroy: React.PropTypes.func.isRequired,
  }
  handleChange = () => {
    const data = this.state.data;
    this.setState({ data: data.set('completed', !data.get('completed')) });
  }
  render() {
    console.log(this.props.todo);
    return (

          <input
            className="toggle"
            type="checkbox"
            checked={this.state.data.get('completed')}
            onChange={this.handleChange}
          />

            {this.props.todo}

          <button
            className="destroy"
            onClick={this.props.onDestroy}
          />

    );
  }
}