text:
// Copyright (C) 2003  Davis E. King (davis@dlib.net)
// License: Boost Software License   See LICENSE.txt for the full license.
#undef DLIB_THREADS_KERNEl_ABSTRACT_
#ifdef DLIB_THREADS_KERNEl_ABSTRACT_

namespace dlib
{

// ----------------------------------------------------------------------------------------

    /*!
        THREAD POOLING
            When threads end they go into a global thread pool and each waits there
            for 30 seconds before timing out and having its resources returned to the
            operating system.  When create_new_thread() is called it first looks in the
            thread pool to see if there are any threads it can snatch from the pool, if
            not then it makes a new one.

            Note that whenever I say something happens when a thread "terminates" or "ends"
            I mean "when it returns to the thread pool."  From the client programmer point
            of view a thread terminates/ends when it returns to the dlib thread pool and you
            shouldn't and indeed don't need to know when it actually gets its resources
            reclaimed by the operating system.

            If you want to change the timeout to a different value you can #define
            DLIB_THREAD_POOL_TIMEOUT to whatever value (in milliseconds) that you like.

        EXCEPTIONS
            Unless specified otherwise, nothing in this file throws exceptions.
    !*/

// ----------------------------------------------------------------------------------------

    thread_id_type get_thread_id (
    );
    /*!
        ensures
            - returns a unique id for the calling thread.  Note that while the id is unique
              among all currently existing threads it may have been used by a previous
              thread that has terminated.
    !*/

// ----------------------------------------------------------------------------------------

    bool is_dlib_thread (
        thread_id_type id = get_thread_id()
    );
    /*!
        ensures
            - if (the thread with the given id was spawned by a call to
                  dlib::create_new_thread) then
                - returns true
            - else
                - returns false
    !*/

// ----------------------------------------------------------------------------------------

    template <
        typename T
        >
    void register_thread_end_handler (
        T& obj,
        void (T::*handler)()
    );
    /*!
        requires
            - handler == a valid member function pointer for class T
            - handler does not throw
            - handler does not call register_thread_end_handler()
            - handler does not block
            - is_dlib_thread() == true (i.e. the calling thread was spawned by dlib::create_new_thread())
        ensures
            - let ID == the thread id for the thread calling register_thread_end_handler()
            - (obj.*handler)() will be called when the thread with thread id ID is
              terminating and it will be called from within that terminating thread.
              (i.e. inside the handler function get_thread_id() == ID == the id of the
              thread that is terminating. )
            - each call to this function adds another handler that will be called when
              the given thread terminates.  This means that if you call it a bunch of
              times then you will end up registering multiple handlers (or single
              handlers multiple times) that will be called when the thread ends.
        throws
            - std::bad_alloc
              If this exception is thrown then the call to this function had no effect.
    !*/

// ----------------------------------------------------------------------------------------

    template <
        typename T
        >
    void unregister_thread_end_handler (
        T& obj,
        void (T::*handler)()
    );
    /*!
        requires
            - handler == a valid member function pointer for class T
        ensures
            - Undoes all previous calls to register_thread_end_handler(obj,handler).
              So the given handler won't be called when any threads end.
        throws
            - std::bad_alloc
              If this exception is thrown then the call to this function had no effect.
    !*/

// ----------------------------------------------------------------------------------------

    bool create_new_thread (
        void (*funct)(void*),
        void* param
    );
    /*!
        ensures
            - creates a new thread for the function pointed to by funct
            - passes it param as its parameter. (i.e. calls funct(param) from the new thread)
            - returns true upon success and false upon failure to create the new thread
    !*/

// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
    // mutex object
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------

    class mutex
    {
        /*!
            INITIAL VALUE
                mutex is in the unlocked state

            WHAT THIS OBJECT REPRESENTS
                This object represents a mutex intended to be used for synchronous
                thread control of shared data. When a thread wants to access some
                shared data it locks out other threads by calling lock() and calls
                unlock() when it is finished.
        !*/
    public:

        mutex (
        );
        /*!
            ensures
                - #*this is properly initialized
            throws
                - dlib::thread_error
                    the constructor may throw this exception if there is a problem
                    gathering resources to create the mutex.
        !*/

        ~mutex (
        );
        /*!
            requires
                - *this is not locked
            ensures
                - all resources allocated by *this have been freed
        !*/

        void lock (
        ) const;
        /*!
            requires
                - the thread calling lock() does not already have a lock on *this
            ensures
                - if (*this is currently locked by another thread) then
                    - the thread that called lock() on *this is put to sleep until
                      it becomes available
                - if (*this is currently unlocked) then
                    - #*this becomes locked and the current thread is NOT put to sleep
                      but now "owns" #*this
        !*/

        void unlock (
        ) const;
        /*!
            requires
                - the thread calling unlock() already has a lock on *this
            ensures
                - #*this is unlocked (i.e. other threads may now lock this object)
        !*/

    private:
        // restricted functions
        mutex(mutex&);        // copy constructor
        mutex& operator=(mutex&);    // assignment operator
    };

// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
    // signaler object
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------

    class signaler
    {
        /*!

            WHAT THIS OBJECT REPRESENTS
                This object represents an event signaling system for threads.  It gives
                a thread the ability to wake up other threads that are waiting for a
                particular signal.

                Each signaler object is associated with one and only one mutex object.
                More than one signaler object may be associated with a single mutex
                but a signaler object may only be associated with a single mutex.

                NOTE:
                You must guard against spurious wakeups.  This means that a thread
                might return from a call to wait even if no other thread called
                signal.  This is rare but must be guarded against.
        !*/
    public:

        signaler (
            const mutex& associated_mutex
        );
        /*!
            ensures
                - #*this is properly initialized
                - #get_mutex() == associated_mutex
            throws
                - dlib::thread_error
                    the constructor may throw this exception if there is a problem
                    gathering resources to create the signaler.
        !*/

        ~signaler (
        );
        /*!
            ensures
                - all resources allocated by *this have been freed
        !*/

        void wait (
        ) const;
        /*!
            requires
                - get_mutex() is locked and owned by the calling thread
            ensures
                - atomically unlocks get_mutex() and blocks the calling thread
                - calling thread may wake if another thread calls signal() or broadcast()
                  on *this
                - when wait() returns the calling thread again has a lock on get_mutex()
        !*/

        bool wait_or_timeout (
            unsigned long milliseconds
        ) const;
        /*!
            requires
                - get_mutex() is locked and owned by the calling thread
            ensures
                - atomically unlocks get_mutex() and blocks the calling thread
                - calling thread may wake if another thread calls signal() or broadcast()
                  on *this
                - after the specified number of milliseconds has elapsed the calling thread
                  will wake once get_mutex() is free
                - when wait returns the calling thread again has a lock on get_mutex()

                - returns false if the call to wait_or_timeout timed out
                - returns true if the call did not time out
        !*/

        void signal (
        ) const;
        /*!
            ensures
                - if (at least one thread is waiting on *this) then
                    - at least one of the waiting threads will wake
        !*/

        void broadcast (
        ) const;
        /*!
            ensures
                - any and all threads waiting on *this will wake
        !*/

        const mutex& get_mutex (
        ) const;
        /*!
            ensures
                - returns a const reference to the mutex associated with *this
        !*/

    private:
        // restricted functions
        signaler(signaler&);        // copy constructor
        signaler& operator=(signaler&);    // assignment operator
    };

// ----------------------------------------------------------------------------------------

}

#endif // DLIB_THREADS_KERNEl_ABSTRACT_


text:
require 'test_helper'

class OrderItemTest < ActiveSupport::TestCase
  # test "the truth" do
  #   assert true
  # end
end

redpajama_set_name: RedPajamaGithub


text:
//
// async_result.hpp
// ~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef ASIO_ASYNC_RESULT_HPP
#define ASIO_ASYNC_RESULT_HPP

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/handler_type.hpp"

#include "asio/detail/push_options.hpp"

namespace asio {

/// An interface for customising the behaviour of an initiating function.
/**
 * The async_result traits class is used for determining:
 *
 * @li the concrete completion handler type to be called at the end of the
 * asynchronous operation;
 *
 * @li the initiating function return type; and
 *
 * @li how the return value of the initiating function is obtained.
 *
 * The trait allows the handler and return types to be determined at the point
 * where the specific completion handler signature is known.
 *
 * This template may be specialised for user-defined completion token types.
 * The primary template assumes that the CompletionToken is the completion
 * handler.
 */
#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
template <typename CompletionToken, typename Signature>
#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
template <typename CompletionToken, typename Signature = void>
#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
class async_result
{
public:
#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
  /// The concrete completion handler type for the specific signature.
  typedef CompletionToken completion_handler_type;

  /// The return type of the initiating function.
  typedef void return_type;
#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
  // For backward compatibility, determine the concrete completion handler type
  // by using the legacy handler_type trait.
  typedef typename handler_type<CompletionToken, Signature>::type
    completion_handler_type;

  // For backward compatibility, determine the initiating function return type
  // using the legacy single-parameter version of async_result.
  typedef typename async_result<completion_handler_type>::type return_type;
#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)

  /// Construct an async result from a given handler.
  /**
   * When using a specalised async_result, the constructor has an opportunity
   * to initialise some state associated with the completion handler, which is
   * then returned from the initiating function.
   */
  explicit async_result(completion_handler_type& h)
#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
    // No data members to initialise.
#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
    : legacy_result_(h)
#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
  {
    (void)h;
  }

  /// Obtain the value to be returned from the initiating function.
  return_type get()
  {
#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
    // Nothing to do.
#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
    return legacy_result_.get();
#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
  }

private:
  async_result(const async_result&) ASIO_DELETED;
  async_result& operator=(const async_result&) ASIO_DELETED;

#if defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
  // No data members.
#else // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
  async_result<completion_handler_type> legacy_result_;
#endif // defined(ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
};

#if !defined(ASIO_NO_DEPRECATED)

/// (Deprecated: Use two-parameter version of async_result.) An interface for
/// customising the behaviour of an initiating function.
/**
 * This template may be specialised for user-defined handler types.
 */
template <typename Handler>
class async_result<Handler>
{
public:
  /// The return type of the initiating function.
  typedef void type;

  /// Construct an async result from a given handler.
  /**
   * When using a specalised async_result, the constructor has an opportunity
   * to initialise some state associated with the handler, which is then
   * returned from the initiating function.
   */
  explicit async_result(Handler&)
  {
  }

  /// Obtain the value to be returned from the initiating function.
  type get()
  {
  }
};

#endif // !defined(ASIO_NO_DEPRECATED)

/// Helper template to deduce the handler type from a CompletionToken, capture
/// a local copy of the handler, and then create an async_result for the
/// handler.
template <typename CompletionToken, typename Signature>
struct async_completion
{
  /// The real handler type to be used for the asynchronous operation.
  typedef typename asio::async_result<
    typename decay<CompletionToken>::type,
      Signature>::completion_handler_type completion_handler_type;

#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
  /// Constructor.
  /**
   * The constructor creates the concrete completion handler and makes the link
   * between the handler and the asynchronous result.
   */
  explicit async_completion(CompletionToken& token)
    : completion_handler(static_cast<typename conditional<
        is_same<CompletionToken, completion_handler_type>::value,
        completion_handler_type&, CompletionToken&&>::type>(token)),
      result(completion_handler)
  {
  }
#else // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
  explicit async_completion(typename decay<CompletionToken>::type& token)
    : completion_handler(token),
      result(completion_handler)
  {
  }

  explicit async_completion(const typename decay<CompletionToken>::type& token)
    : completion_handler(token),
      result(completion_handler)
  {
  }
#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)

  /// A copy of, or reference to, a real handler object.
#if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
  typename conditional<
    is_same<CompletionToken, completion_handler_type>::value,
    completion_handler_type&, completion_handler_type>::type completion_handler;
#else // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
  completion_handler_type completion_handler;
#endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)

  /// The result of the asynchronous operation's initiating function.
  async_result<typename decay<CompletionToken>::type, Signature> result;
};

namespace detail {

template <typename CompletionToken, typename Signature>
struct async_result_helper
  : async_result<typename decay<CompletionToken>::type, Signature>
{
};

} // namespace detail
} // namespace asio

#include "asio/detail/pop_options.hpp"

#if defined(GENERATING_DOCUMENTATION)
# define ASIO_INITFN_RESULT_TYPE(ct, sig) \
  void_or_deduced
#elif defined(_MSC_VER) && (_MSC_VER < 1500)
# define ASIO_INITFN_RESULT_TYPE(ct, sig) \
  typename ::asio::detail::async_result_helper< \
    ct, sig>::return_type
#define ASIO_HANDLER_TYPE(ct, sig) \
  typename ::asio::detail::async_result_helper< \
    ct, sig>::completion_handler_type
#else
# define ASIO_INITFN_RESULT_TYPE(ct, sig) \
  typename ::asio::async_result< \
    typename ::asio::decay<ct>::type, sig>::return_type
#define ASIO_HANDLER_TYPE(ct, sig) \
  typename ::asio::async_result< \
    typename ::asio::decay<ct>::type, sig>::completion_handler_type
#endif

#endif // ASIO_ASYNC_RESULT_HPP


text:
var oauth = ChromeExOAuth.initBackgroundPage({
  'request_url' : 'https://www.google.com/accounts/OAuthGetRequestToken',
  'authorize_url' : 'https://www.google.com/accounts/OAuthAuthorizeToken',
  'access_url' : 'https://www.google.com/accounts/OAuthGetAccessToken',
  'consumer_key' : 'anonymous',
  'consumer_secret' : 'anonymous',
  'scope' : 'http://www.google.com/m8/feeds/',
  'app_name' : 'Sample - OAuth Contacts'
});

var contacts = null;

function setIcon() {
  if (oauth.hasToken()) {
    chrome.browserAction.setIcon({ 'path' : 'img/icon-19-on.png'});
  } else {
    chrome.browserAction.setIcon({ 'path' : 'img/icon-19-off.png'});
  }
};

function onContacts(text, xhr) {
  contacts = [];
  var data = JSON.parse(text);
  for (var i = 0, entry; entry = data.feed.entry[i]; i++) {
    var contact = {
      'name' : entry['title']['$t'],
      'id' : entry['id']['$t'],
      'emails' : []
    };

    if (entry['gd$email']) {
      var emails = entry['gd$email'];
      for (var j = 0, email; email = emails[j]; j++) {
        contact['emails'].push(email['address']);
      }
    }

    if (!contact['name']) {
      contact['name'] = contact['emails'][0] || "<Unknown>";
    }
    contacts.push(contact);
  }

  chrome.tabs.create({ 'url' : 'contacts.html'});
};

function getContacts() {
  oauth.authorize(function() {
    console.log("on authorize");
    setIcon();
    var url = "http://www.google.com/m8/feeds/contacts/default/full";
    oauth.sendSignedRequest(url, onContacts, {
      'parameters' : {
        'alt' : 'json',
        'max-results' : 100
      }
    });
  });
};

function logout() {
  oauth.clearTokens();
  setIcon();
};

setIcon();
chrome.browserAction.onClicked.addListener(getContacts);


text:
package org.epnoi.storage.column;

import org.epnoi.storage.column.domain.ItemColumn;
import org.epnoi.storage.column.repository.BaseColumnRepository;
import org.epnoi.storage.column.repository.ItemColumnRepository;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created by cbadenes on 22/12/15.
 */
public class ItemColumnRepositoryTest extends BaseColumnRepositoryTest<ItemColumn> {

    @Autowired
    ItemColumnRepository repository;

    @Override
    public BaseColumnRepository<ItemColumn> getRepository() {
        return repository;
    }

    @Override
    public ItemColumn getEntity() {
        ItemColumn column = new ItemColumn();
        column.setUri("items/72ce5395-6268-439a-947e-802229e7f022");
        column.setCreationTime("2015-12-21T16:18:59Z");
        column.setFormat("pdf");
        column.setLanguage("en");
        column.setTitle("This is an example");
        column.setSubject("semantic web, e-science");
        column.setDescription("for testing purposes");
        column.setUrl("file:://opt/drinventor/example.pdf");
        column.setContent("Miniopterus aelleni is a bat in the genus Miniopterus found in the Comoro Islands and Madagascar. It is a small, brown bat, with a forearm length of 35 to 41 mm (1.4 to 1.6 in). The long tragus (a projection in the outer ear) has a broad base and a blunt or rounded tip. The uropatagium (tail membrane) is sparsely haired. The palate is flat and there are distinct diastemata (gaps) between the upper canines and premolars. Populations of this species were previously included in Miniopterus manavi, but recent molecular studies revealed that M");
        column.setTokens("Miniopterus aelleni be a bat in the genus Miniopterus find in the Comoro Islands and Madagascar . It be a small , brown bat , with a forearm length of 35 to 41 mm ( 1.4 to 1.6 in ) . The long tragus ( a projection in the outer ear ) have a broad base and a blunt or round tip . The uropatagium ( tail membrane ) be sparsely haired . The palate be flat and there be distinct diastema ( gap ) between the upper canine and premolar . Populations of this specie be previously include in Miniopterus manavi , but recent molecular study reveal that M ");
        return column;
    }
}


text:
using namespace System::Data;

bool SQLiteTableIterator::IsEnd()
{
    return end;
}
Reference<System::Data::Record> SQLiteTableIterator::GetCurrent()
{
    return new SQLiteRecord(statement);
}
bool SQLiteTableIterator::Next()
{
    if (end)
        return false;

    int error = sqlite3_step(statement);
    if (error == SQLITE_DONE)
        end = true;

    return !SQLite_CheckError(error, __FILE__, __LINE__);
}

SQLiteTable::SQLiteTable(sqlite3_stmt* statement) : statement(statement)
{
    //Console::WriteLine("SQLiteTable: {0}", statement);
}

Reference<Iterator<Reference<Record>>> SQLiteTable::GetIterator() const
{
    return new SQLiteTableIterator(statement);
}


text:
namespace Monik.Service
{
    public class Measure_
    {
        public long ID { get; set; }
        public double Value { get; set; }

        internal bool HasValue { get; set; }
    }

    public class MeasureWithMetricId : Measure_
    {
        public int MetricId { get; set; }
    }
}


text:
extern "Java"
{
  namespace javax
  {
    namespace naming
    {
      namespace ldap
      {
          class ExtendedRequest;
          class ExtendedResponse;
      }
    }
  }
}

class javax::naming::ldap::ExtendedRequest : public ::java::lang::Object
{

public:
  virtual ::java::lang::String * getID() = 0;
  virtual JArray< jbyte > * getEncodedValue() = 0;
  virtual ::javax::naming::ldap::ExtendedResponse * createExtendedResponse(::java::lang::String *, JArray< jbyte > *, jint, jint) = 0;
  static ::java::lang::Class class$;
} __attribute__ ((java_interface));

#endif // __javax_naming_ldap_ExtendedRequest__


text:
using System;
using System.Collections.Concurrent;

namespace Abot2.Core
{
    public interface ICrawledUrlRepository : IDisposable
    {
        bool Contains(Uri uri);
        bool AddIfNew(Uri uri);
    }

    public class InMemoryCrawledUrlRepository : ICrawledUrlRepository
    {
        ConcurrentDictionary<string, byte> _urlRepository = new ConcurrentDictionary<string, byte>();

        public bool Contains(Uri uri)
        {
            return _urlRepository.ContainsKey(uri.AbsoluteUri);
        }

        public bool AddIfNew(Uri uri)
        {
            return _urlRepository.TryAdd(uri.AbsoluteUri, 0);
        }

        public virtual void Dispose()
        {
            _urlRepository = null;
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
                  http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">

    <entity name="MQM\VideochatBundle\Entity\Tag" table="mqm_chat_tag">

        <!--
        <indexes>
            <index name="name_idx" columns="name"/>
            <index columns="user_email"/>
        </indexes>

        <unique-constraints>
            <unique-constraint columns="name,user_email" name="search_idx" />
        </unique-constraints>

        <lifecycle-callbacks>
            <lifecycle-callback type="prePersist" method="doStuffOnPrePersist"/>
            <lifecycle-callback type="prePersist" method="doOtherStuffOnPrePersistToo"/>
            <lifecycle-callback type="postPersist" method="doStuffOnPostPersist"/>
        </lifecycle-callbacks>
        -->

        <id name="id" column="id" type="integer">
            <generator strategy="AUTO"/>
        </id>
        <field name="name" column="name" type="string" length="255" unique="true" />
        <field name="slug" column="slug" type="string" length="255"/>
        <field name="createdAt" column="created_at" type="datetime"/>
        <many-to-many field="rooms" target-entity="MQM\VideochatBundle\Entity\Room" mapped-by="tags">
            <cascade>
                <cascade-persist/>
            </cascade>
        </many-to-many>
    </entity>
</doctrine-mapping>


text:
package io.reactivex.validators;

import static org.junit.Assert.fail;

import java.io.*;

import org.junit.*;

import io.reactivex.*;

/**
 * Checks the source code of the base reactive types and locates missing
 * mention of {@code Backpressure:} and {@code Scheduler:} of methods.
 */
public class JavadocForAnnotations {

    static void checkSource(String baseClassName, boolean scheduler) throws Exception {
        File f = MaybeNo2Dot0Since.findSource(baseClassName);
        if (f == null) {
            return;
        }

        StringBuilder b = readFile(f);

        StringBuilder e = new StringBuilder();

        if (scheduler) {
            scanFor(b, "@SchedulerSupport", "Scheduler:", e, baseClassName);
        } else {
            scanFor(b, "@BackpressureSupport", "Backpressure:", e, baseClassName);
        }

        if (e.length() != 0) {
            System.out.println(e);

            fail(e.toString());
        }
    }

    public static StringBuilder readFile(File f) throws Exception {
        StringBuilder b = new StringBuilder();

        BufferedReader in = new BufferedReader(new FileReader(f));
        try {
            for (;;) {
                String line = in.readLine();

                if (line == null) {
                    break;
                }

                b.append(line).append('\n');
            }
        } finally {
            in.close();
        }

        return b;
    }

    static final void scanFor(StringBuilder sourceCode, String annotation, String inDoc,
            StringBuilder e, String baseClassName) {
        int index = 0;
        for (;;) {
            int idx = sourceCode.indexOf(annotation, index);

            if (idx < 0) {
                break;
            }

            int j = sourceCode.lastIndexOf("/**", idx);

            // see if the last /** is not before the index (last time the annotation was found
            // indicating an uncommented method like subscribe()
            if (j > index) {
                int k = sourceCode.indexOf(inDoc, j);

                if (k < 0 || k > idx) {
                    // when printed on the console, IDEs will create a clickable link to help navigate to the offending point
                    e.append("java.lang.RuntimeException: missing ").append(inDoc).append(" section\r\n")
                    ;
                    int lc = lineNumber(sourceCode, idx);

                    e.append(" at io.reactivex.").append(baseClassName)
                    .append(" (").append(baseClassName).append(".java:")
                    .append(lc).append(")").append("\r\n\r\n");
                }
            }

            index = idx + annotation.length();
        }
    }

    static final void scanForBadMethod(StringBuilder sourceCode, String annotation, String inDoc,
            StringBuilder e, String baseClassName) {
        int index = 0;
        for (;;) {
            int idx = sourceCode.indexOf(annotation, index);

            if (idx < 0) {
                break;
            }

            int j = sourceCode.lastIndexOf("/**", idx);

            // see if the last /** is not before the index (last time the annotation was found
            // indicating an uncommented method like subscribe()
            if (j > index) {
                int k = sourceCode.indexOf(inDoc, j);

                if (k >= 0 && k <= idx) {

                    int ll = sourceCode.indexOf("You specify", k);
                    int lm = sourceCode.indexOf("This operator", k);
                    if ((ll < 0 || ll > idx) && (lm < 0 || lm > idx)) {

                        int n = sourceCode.indexOf("{@code ", k);
                        int endDD = sourceCode.indexOf("</dd>", k);
                        // make sure the {@code is within the dt/dd section

                        if (n < idx && n < endDD) {
                            int m = sourceCode.indexOf("}", n);

                            if (m < idx) {
                                String mname = sourceCode.substring(n + 7, m);

                                int q = sourceCode.indexOf("@SuppressWarnings({", idx);

                                int o = sourceCode.indexOf("{", idx);

                                if (q + 18 == o) {
                                    o = sourceCode.indexOf("{", q + 20);
                                }

                                if (o >= 0) {

                                    int p = sourceCode.indexOf(" " + mname + "(", idx);

                                    if (p < 0 || p > o) {
                                        // when printed on the console, IDEs will create a clickable link to help navigate to the offending point
                                        e.append("java.lang.RuntimeException: wrong method name in description of ").append(inDoc).append(" '").append(mname).append("'\r\n")
                                        ;
                                        int lc = lineNumber(sourceCode, idx);

                                        e.append(" at io.reactivex.").append(baseClassName)
                                        .append(" (").append(baseClassName).append(".java:")
                                        .append(lc).append(")").append("\r\n\r\n");
                                    }
                                }
                            }

                        }

                    }
                }
            }

            index = idx + annotation.length();
        }
    }

    static void checkSchedulerBadMethod(String baseClassName) throws Exception {
        File f = MaybeNo2Dot0Since.findSource(baseClassName);
        if (f == null) {
            return;
        }

        StringBuilder b = readFile(f);

        StringBuilder e = new StringBuilder();

        scanForBadMethod(b, "@SchedulerSupport", "Scheduler:", e, baseClassName);

        if (e.length() != 0) {
            System.out.println(e);

            fail(e.toString());
        }
    }

    public static int lineNumber(StringBuilder s, int index) {
        int cnt = 1;
        for (int i = 0; i < index; i++) {
            if (s.charAt(i) == '\n') {
                cnt++;
            }
        }
        return cnt;
    }

    @Test
    public void checkFlowableBackpressure() throws Exception {
        checkSource(Flowable.class.getSimpleName(), false);
    }

    @Test
    public void checkFlowableScheduler() throws Exception {
        checkSource(Flowable.class.getSimpleName(), true);
    }

    @Test
    public void checkObservableBackpressure() throws Exception {
        checkSource(Observable.class.getSimpleName(), false);
    }

    @Test
    public void checkObservableScheduler() throws Exception {
        checkSource(Observable.class.getSimpleName(), true);
    }

    @Test
    public void checkSingleBackpressure() throws Exception {
        checkSource(Single.class.getSimpleName(), false);
    }

    @Test
    public void checkSingleScheduler() throws Exception {
        checkSource(Single.class.getSimpleName(), true);
    }

    @Test
    public void checkCompletableBackpressure() throws Exception {
        checkSource(Completable.class.getSimpleName(), false);
    }

    @Test
    public void checkCompletableScheduler() throws Exception {
        checkSource(Completable.class.getSimpleName(), true);
    }

    @Test
    public void checkMaybeBackpressure() throws Exception {
        checkSource(Maybe.class.getSimpleName(), false);
    }

    @Test
    public void checkMaybeScheduler() throws Exception {
        checkSource(Maybe.class.getSimpleName(), true);
    }

    @Test
    public void checkFlowableSchedulerDoc() throws Exception {
        checkSchedulerBadMethod(Flowable.class.getSimpleName());
    }

    @Test
    public void checkObservableSchedulerDoc() throws Exception {
        checkSchedulerBadMethod(Observable.class.getSimpleName());
    }

    @Test
    public void checkSingleSchedulerDoc() throws Exception {
        checkSchedulerBadMethod(Single.class.getSimpleName());
    }

    @Test
    public void checkCompletableSchedulerDoc() throws Exception {
        checkSchedulerBadMethod(Completable.class.getSimpleName());
    }

    @Test
    public void checkMaybeSchedulerDoc() throws Exception {
        checkSchedulerBadMethod(Maybe.class.getSimpleName());
    }
}


text:
@interface OrangeBarView : UIView

+ (UIColor *)barOrangeColor;

- (void)layoutInsideBar:(UIView *)barView;

@end


text:
<?php

declare(strict_types=1);

namespace FSi\Component\DataGrid;

interface DataGridRowViewInterface extends \Iterator, \Countable, \ArrayAccess
{
    public function getIndex();

    public function getSource();
}


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

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <!-- bean definitions here -->

    <!--开启注解扫描
        (1)到包里扫描类、方法、属性上面是否有注解
    -->
    <context:component-scan base-package="cn"></context:component-scan>

    <!--扫描属性上面到注解-->
    <context:annotation-config></context:annotation-config>
</beans>


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Pessoa.forms;

import Dao.ContatoDao;
import Logica.Contato;
import java.sql.SQLException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Mutch
 */
public class jTAgendaContatos extends javax.swing.JFrame {

    DefaultTableModel tmContato = new DefaultTableModel(null, new String[]{"Id", "Nome", "Tel", "DataNasc", "Email"});
    List<Contato> contatos;
    ListSelectionModel lsmContato;

    /**
     * Creates new form jTAgendaContatos
     */
    public jTAgendaContatos() {
        initComponents();
        desabilitaDados();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLId = new javax.swing.JLabel();
        jLNome = new javax.swing.JLabel();
        jLDataNasc = new javax.swing.JLabel();
        jLTel = new javax.swing.JLabel();
        jLEmail = new javax.swing.JLabel();
        jTId = new javax.swing.JTextField();
        jTNome = new javax.swing.JTextField();
        jTDataNasc = new javax.swing.JTextField();
        jTTel = new javax.swing.JTextField();
        jTEmail = new javax.swing.JTextField();
        jBProcurar = new javax.swing.JButton();
        jTPesquisa = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        jBNovo = new javax.swing.JButton();
        jBAlterar = new javax.swing.JButton();
        jBExcluir = new javax.swing.JButton();
        jBSalvar = new javax.swing.JButton();
        jBSair = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTTabela = new javax.swing.JTable();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Dados do contato"));

        jLId.setText("Id:");

        jLNome.setText("Nome:");

        jLDataNasc.setText("Data de Nascimento:");

        jLTel.setText("Telefone:");

        jLEmail.setText("E-mail:");

        jTId.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTIdActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jLNome)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jTNome, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jLId)
                            .addGap(95, 95, 95)
                            .addComponent(jTId, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(91, 91, 91)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLDataNasc)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTDataNasc, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLTel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTTel)
                        .addGap(116, 116, 116))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLEmail)
                        .addGap(24, 24, 24)
                        .addComponent(jTEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(94, Short.MAX_VALUE))))
        );

        jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jTEmail, jTNome});

        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLTel)
                        .addComponent(jTTel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLId)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLEmail))
                    .addComponent(jTNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLNome))
                .addGap(9, 9, 9)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTDataNasc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLDataNasc))
                .addGap(62, 62, 62))
        );

        jBProcurar.setText("Pesquisar");
        jBProcurar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBProcurarActionPerformed(evt);
            }
        });

        jBNovo.setText("Novo");
        jBNovo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBNovoActionPerformed(evt);
            }
        });

        jBAlterar.setText("Alterar");
        jBAlterar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAlterarActionPerformed(evt);
            }
        });

        jBExcluir.setText("Excluir");
        jBExcluir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBExcluirActionPerformed(evt);
            }
        });

        jBSalvar.setText("Salvar");
        jBSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBSalvarActionPerformed(evt);
            }
        });

        jBSair.setText("Sair");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jBNovo)
                .addGap(34, 34, 34)
                .addComponent(jBAlterar)
                .addGap(28, 28, 28)
                .addComponent(jBExcluir)
                .addGap(28, 28, 28)
                .addComponent(jBSalvar)
                .addGap(18, 18, 18)
                .addComponent(jBSair)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jBAlterar, jBExcluir, jBNovo, jBSair, jBSalvar});

        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBNovo)
                    .addComponent(jBAlterar)
                    .addComponent(jBExcluir)
                    .addComponent(jBSalvar)
                    .addComponent(jBSair))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTTabela.setModel(tmContato);
        jTTabela.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

        lsmContato = jTTabela.getSelectionModel();
        lsmContato.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                if (!e.getValueIsAdjusting()) {
                    jTTabelaLinhaSelecionada(jTTabela);
                }
            }
        });
        jScrollPane1.setViewportView(jTTabela);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(83, 83, 83)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 430, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jTPesquisa)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jBProcurar)
                        .addGap(9, 9, 9))))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBProcurar))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(155, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jTIdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTIdActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTIdActionPerformed

    private void jBNovoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBNovoActionPerformed
        // TODO add your handling code here:
        habilitaDados();
        jTNome.setText("");
        jTTel.setText("");
        jTEmail.setText("");
        jTDataNasc.setText("");
    }//GEN-LAST:event_jBNovoActionPerformed

    private void jBAlterarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAlterarActionPerformed
        try {
            // TODO add your handling code here:
            alteraContato();
            listarContatos();
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(null, "Problema no jBAlterar!");
            Logger.getLogger(jTAgendaContatos.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jBAlterarActionPerformed

    private void jBSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBSalvarActionPerformed
        if (verificaDados()) {
            cadastro();
            desabilitaDados();
        }

    }//GEN-LAST:event_jBSalvarActionPerformed

    private void jBProcurarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBProcurarActionPerformed

        try {
            // TODO add your handling code here:
            listarContatos();
        } catch (SQLException ex) {
            Logger.getLogger(jTAgendaContatos.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jBProcurarActionPerformed

    private void jBExcluirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBExcluirActionPerformed
        try {
            // TODO add your handling code here:
            excluirContato();
            mostraPesquisa(contatos);
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(null,"Erro no botão JBExcluir"+ex);
        }

    }//GEN-LAST:event_jBExcluirActionPerformed
    public void excluirContato() throws SQLException{
        int resp = JOptionPane.showConfirmDialog(this, "Deseja excluir este contato?", "Confirmação", JOptionPane.YES_NO_OPTION);
        if (resp == JOptionPane.YES_NO_OPTION) {
            ContatoDao dao = new ContatoDao();
                dao.remove(contatos.get(jTTabela.getSelectedRow()));
                mostraPesquisa(contatos);

            }

        }

    public void listarContatos() throws SQLException {
        ContatoDao dao = new ContatoDao();
        contatos = dao.getLista("%" + jTPesquisa.getText() + "%");
        mostraPesquisa(contatos);
    }

    public void cadastro() {

        try {
            // TODO add your handling code here:
            Contato c1 = new Contato();
            c1.setNome(jTNome.getText());
            c1.setData_nasc(jTDataNasc.getText());
            c1.setTel(jTTel.getText());
            c1.setEmail(jTEmail.getText());

            ContatoDao dao = new ContatoDao();
        } catch (SQLException ex) {
            Logger.getLogger(jTAgendaContatos.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void desabilitaDados() {
        jTId.setEditable(false);
        jTNome.setEditable(false);
        jTTel.setEditable(false);
        jTEmail.setEditable(false);
        jTDataNasc.setEditable(false);
    }

    public void habilitaDados() {
        jTId.setEditable(true);
        jTNome.setEditable(true);
        jTTel.setEditable(true);
        jTEmail.setEditable(true);
        jTDataNasc.setEditable(true);
    }

    public boolean verificaDados() {
        if (!jTNome.getText().equals("") && !jTTel.getText().equals("")) {
            return true;
        } else {
            JOptionPane.showMessageDialog(null, "Campos Nome ou Telefone não preenchidos");
            return false;
        }
    }

    private void jTTabelaLinaSelecionada(JTable tabela) {
        if (jTTabela.getSelectedRow() != -1) {
            habilitaDados();
            jTId.setText(String.valueOf(contatos.get(tabela.getSelectedRow()).getId()));
            jTNome.setText(contatos.get(tabela.getSelectedRow()).getNome());
            jTDataNasc.setText(contatos.get(tabela.getSelectedRow()).getData_nasc());
            jTTel.setText(contatos.get(tabela.getSelectedRow()).getTel());
            jTEmail.setText(contatos.get(tabela.getSelectedRow()).getEmail());
        } else {
            jTId.setText("");
            jTNome.setText("");
            jTDataNasc.setText("");
            jTTel.setText("");
            jTEmail.setText("");
        }
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(jTAgendaContatos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(jTAgendaContatos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(jTAgendaContatos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(jTAgendaContatos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new jTAgendaContatos().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBAlterar;
    private javax.swing.JButton jBExcluir;
    private javax.swing.JButton jBNovo;
    private javax.swing.JButton jBProcurar;
    private javax.swing.JButton jBSair;
    private javax.swing.JButton jBSalvar;
    private javax.swing.JLabel jLDataNasc;
    private javax.swing.JLabel jLEmail;
    private javax.swing.JLabel jLId;
    private javax.swing.JLabel jLNome;
    private javax.swing.JLabel jLTel;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextField jTDataNasc;
    private javax.swing.JTextField jTEmail;
    private javax.swing.JTextField jTId;
    private javax.swing.JTextField jTNome;
    private javax.swing.JTextField jTPesquisa;
    private javax.swing.JTable jTTabela;
    private javax.swing.JTextField jTTel;
    // End of variables declaration//GEN-END:variables

    private void mostraPesquisa(List<Contato> contato) {
        while (tmContato.getRowCount() > 0) {
            tmContato.removeRow(0);
        }
        if (contatos.size() == 0) {
            JOptionPane.showMessageDialog(null, "Nenhum contato no cadastrado");
        } else {
            String[] linha = new String[]{null, null, null, null};
            for (int i = 0; i < contatos.size(); i++) {
                tmContato.addRow(linha);
                tmContato.setValueAt(contatos.get(i).getId(), i, 0);
                tmContato.setValueAt(contatos.get(i).getNome(), i, 1);
                tmContato.setValueAt(contatos.get(i).getData_nasc(), i, 2);
                tmContato.setValueAt(contatos.get(i).getTel(), i, 3);
                tmContato.setValueAt(contatos.get(i).getEmail(), i, 4);
            }
        }
    }

private void alteraContato() throws SQLException{
if(jTTabela.getSelectedRow()!=-1){
    if(verificaDados()){
        Contato c1 = new Contato();
        ContatoDao dao = new ContatoDao();
        c1.setId(Long.valueOf(jTId.getText()));
        c1.setNome(jTNome.getText());
        c1.setData_nasc(jTDataNasc.getText());
        c1.setTel(jTTel.getText());
        c1.setEmail(jTEmail.getText());
        JOptionPane.showMessageDialog(null, "Contato alterado com sucesso!");
    }

}
}
}


text:
var Person = require('./person');
var john = new Person('john');
john.talk('something');


text:
@interface Database ()

@end

@implementation Database

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
}

- (void)createDatabaseTable{

    NSString *docsDir;
    NSArray *dirPaths;
    // Get the documents directory
    dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    docsDir = [dirPaths objectAtIndex:0];

    // Build the path to the database file
    databasePath = [[NSString alloc] initWithString: [docsDir stringByAppendingPathComponent: @"apptrack.db"]];
    NSFileManager *filemgr = [NSFileManager defaultManager];

    if ([filemgr fileExistsAtPath: databasePath ] == NO)
    {
		const char *dbpath = [databasePath UTF8String];

        if (sqlite3_open(dbpath, &PointDB) == SQLITE_OK)
        {
            char *errMsg;
            const char *sql_stmt = "CREATE TABLE IF NOT EXISTS POINTS (ID INTEGER PRIMARY KEY AUTOINCREMENT, LONGITUD TEXT, LATITUD TEXT, FECHA TEXT)";

            if (sqlite3_exec(PointDB, sql_stmt, NULL, NULL, &errMsg) != SQLITE_OK)
            {
                NSLog(@"Failed to create table points");
            }else{
                NSLog(@"created database table points");
            }

            const char *sql_stmt2 = "CREATE TABLE IF NOT EXISTS PARAMS (ID INTEGER PRIMARY KEY AUTOINCREMENT, IDPARAM TEXT, VALOR TEXT)";

            if (sqlite3_exec(PointDB, sql_stmt2, NULL, NULL, &errMsg) != SQLITE_OK)
            {
                NSLog(@"Failed to create table params");
            }else{
                NSLog(@"created database table params");
            }

            sqlite3_close(PointDB);

        } else {
            NSLog(@"Failed to open/create database");
        }
    }

}
- (void) savePointData: (NSString *)latitud :(NSString *)longitud
{
    sqlite3_stmt    *statement;

    const char *dbpath = [databasePath UTF8String];

    if (sqlite3_open(dbpath, &PointDB) == SQLITE_OK)
    {
        NSDate *date = [NSDate date];
        NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
        NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
        [dateFormatter setLocale:locale];
        [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
        NSString *fecha = [dateFormatter stringFromDate:date];

        NSString *insertSQL = [NSString stringWithFormat: @"INSERT INTO POINTS (LONGITUD, LATITUD, FECHA) VALUES (\"%@\", \"%@\", \"%@\")", longitud, latitud,fecha];

        const char *insert_stmt = [insertSQL UTF8String];

        sqlite3_prepare_v2(PointDB, insert_stmt, -1, &statement, NULL);
        if (sqlite3_step(statement) == SQLITE_DONE)
        {
            NSLog(@"saved point data");

        } else {
            NSLog(@"Failed to add point");

        }
        sqlite3_finalize(statement);
        sqlite3_close(PointDB);
    }
}

-(NSMutableArray*) findPoints
{
    const char *dbpath = [databasePath UTF8String];
    sqlite3_stmt *statement;
    NSMutableArray *allRows = [[NSMutableArray alloc] init];

    if (sqlite3_open(dbpath, &PointDB) == SQLITE_OK)
    {

        NSString *querySQL = [NSString stringWithFormat: @"SELECT LATITUD, LONGITUD, FECHA FROM POINTS"];
        const char *query_stmt = [querySQL UTF8String];

        if (sqlite3_prepare_v2(PointDB, query_stmt, -1, &statement, NULL) == SQLITE_OK)
        {
            while( sqlite3_step(statement) == SQLITE_ROW )
            {
                NSString *longitud = [[NSString alloc] initWithUTF8String:(const char *) sqlite3_column_text(statement, 0)];

                NSString *latitud = [[NSString alloc] initWithUTF8String:(const char *) sqlite3_column_text(statement, 1)];

                NSString *fecha = [[NSString alloc] initWithUTF8String:(const char *) sqlite3_column_text(statement, 2)];

                NSString *str = [NSString stringWithFormat:@"%@,%@,%@",longitud, latitud,fecha];

                [allRows addObject:str];

            }

            sqlite3_finalize(statement);
        }
        sqlite3_close(PointDB);
    }
    return allRows;
}
- (void) deletePoints{
    const char *dbpath = [databasePath UTF8String];
    sqlite3_stmt *statement;

    if (sqlite3_open(dbpath, &PointDB) == SQLITE_OK)
    {

        NSString *querySQL = [NSString stringWithFormat: @"DELETE FROM POINTS"];
        const char *query_stmt = [querySQL UTF8String];

        if (sqlite3_prepare_v2(PointDB, query_stmt, -1, &statement, NULL) == SQLITE_OK)
        {
            if (sqlite3_step(statement) == SQLITE_DONE)
            {
                NSLog(@"Delete points successful");

            }else{
                NSLog(@"Failed to delete points");
            }

            sqlite3_finalize(statement);
        }
        sqlite3_close(PointDB);
    }

}

- (void) saveParamsData: (NSMutableArray *)arrayp
{
    sqlite3_stmt    *statement;

    const char *dbpath = [databasePath UTF8String];

    if (sqlite3_open(dbpath, &PointDB) == SQLITE_OK)
    {

        int counter=[arrayp count];

        for(int i=0;i<counter;i++)
        {
            NSDictionary *currentObject=[arrayp objectAtIndex:i];
            NSString *idparam=[currentObject objectForKey:@"idparam"];
            NSString *valueparam=[currentObject objectForKey:@"valor"];

            NSString *insertSQL = [NSString stringWithFormat: @"INSERT INTO PARAMS (IDPARAM, VALOR) VALUES (\"%@\", \"%@\")", idparam, valueparam];

            const char *insert_stmt = [insertSQL UTF8String];

            sqlite3_prepare_v2(PointDB, insert_stmt, -1, &statement, NULL);
            if (sqlite3_step(statement) == SQLITE_DONE)
            {
                NSLog(@"saved params data: %@", @"saved");

            } else {
                NSLog(@"Failed to add param %d", sqlite3_step(statement));

            }
            sqlite3_finalize(statement);

        }
    }
    sqlite3_close(PointDB);
}

- (NSMutableArray*) findParams
{
    const char *dbpath = [databasePath UTF8String];
    sqlite3_stmt *statement;
    NSMutableArray *allRows = [[NSMutableArray alloc] init];

    if (sqlite3_open(dbpath, &PointDB) == SQLITE_OK)
    {

        NSString *querySQL = [NSString stringWithFormat: @"SELECT IDPARAM, VALOR FROM PARAMS"];
        const char *query_stmt = [querySQL UTF8String];

        if (sqlite3_prepare_v2(PointDB, query_stmt, -1, &statement, NULL) == SQLITE_OK)
        {
            while( sqlite3_step(statement) == SQLITE_ROW )
            {
                NSString *idp = [[NSString alloc] initWithUTF8String:(const char *) sqlite3_column_text(statement, 0)];
                NSString *value = [[NSString alloc] initWithUTF8String:(const char *) sqlite3_column_text(statement, 1)];

                NSString *str = [NSString stringWithFormat:@"%@,%@",idp,value];
                // textv.text=str; // I don't know why your are mixing your view controller stuff's in database function.
                // Add the string in the array.

                [allRows addObject:str];

            }

            sqlite3_finalize(statement);
        }else{
            NSLog(@"Failed to find params");
        }
        sqlite3_close(PointDB);
    }
    return allRows;
}
- (void) deleteIdParam: (NSString *) idparam{
    const char *dbpath = [databasePath UTF8String];
    sqlite3_stmt *statement;

    if (sqlite3_open(dbpath, &PointDB) == SQLITE_OK)
    {

        NSString *querySQL = [NSString stringWithFormat: @"DELETE FROM PARAMS WHERE IDPARAM=%@",idparam];
        const char *query_stmt = [querySQL UTF8String];

        if (sqlite3_prepare_v2(PointDB, query_stmt, -1, &statement, NULL) == SQLITE_OK)
        {
            if (sqlite3_step(statement) == SQLITE_DONE)
            {
                NSLog(@"Delete idparam successful");

            }else{
                NSLog(@"Failed to delete idparam");
            }

            sqlite3_finalize(statement);
        }
        sqlite3_close(PointDB);
    }

}
- (void) deleteParams{
    const char *dbpath = [databasePath UTF8String];
    sqlite3_stmt *statement;

    if (sqlite3_open(dbpath, &PointDB) == SQLITE_OK)
    {

        NSString *querySQL = [NSString stringWithFormat: @"DELETE FROM PARAMS"];
        const char *query_stmt = [querySQL UTF8String];

        if (sqlite3_prepare_v2(PointDB, query_stmt, -1, &statement, NULL) == SQLITE_OK)
        {
            if (sqlite3_step(statement) == SQLITE_DONE)
            {
                NSLog(@"Delete params successful");

            }else{
                NSLog(@"Failed to delete Params");
            }

            sqlite3_finalize(statement);
        }
        sqlite3_close(PointDB);
    }
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end


text:
#pragma once

#include "SlalomParams.h"

#include <cmath>
#define ARM_MATH_CM4
#define __FPU_PRESENT 1U
#include "arm_const_structs.h"
#include "arm_math.h"

#include "Speaker.h"
#include "Motor.h"
#include "MotorControl.h"
#include "WallSensor.h"
#include "Gyro.h"
/* #include "Map.h" */
#include "Timer.h"

#include "GapCounter.h"

#include "Datalog.h"

/* #include "ComPc.h" */

class VelocityControl{
private:
	MotorControl* mc = MotorControl::getInstance();
	WallSensor* sens = WallSensor::getInstance();
	Gyro* gyro = Gyro::getInstance();
	Led* led = Led::getInstance();
	Speaker* speaker = Speaker::getInstance();
	/* Map map; */
	GapCounter* gapcounter = GapCounter::getInstance();

	const float DIST_GAP_FROM_R;
	const float DIST_GAP_FROM_L;

	int32_t time;
	bool end_flag;
	bool is_started;
	bool has_done_slalom;

	bool enabled_wallgap;
	bool is_expr_wallgap;
	bool is_left_gap;

	enum slalomparams::RunType reg_type;

	// for Trapezoid and Pivot ( and Slalom)
	float reg_start_vel;
	float reg_max_vel;
	float reg_end_vel;
	float reg_distance;
	float reg_accel;

	// for Slalom
	float reg_d_before;
	float reg_d_after;
	int32_t reg_slalom_pos;
	float reg_min_vel;

	float target_linvel;
	float target_radvel;

	void calcTrapAccel(int32_t t);
	void calcTrapDiago(int32_t t);
	void calcPivotTurn(int32_t t);
	void calcSlalom(int32_t t);

	float x1, x2, x3, v, r;
	int32_t t1, t2, t3, t4;
public:
	int8_t pos_x;
	int8_t pos_y;
	MouseDirection pos_angle;
	MousePosition pos_side;
	DiagoInout pos_diagoinout;
private:
	VelocityControl();

public:
	void setLinVel();
	void setRadVel();

	bool isRunning();
	bool hasDoneSlalom();

	void enableWallgap();
	void disableWallgap();

	void setExprGap();
	void setShrtGap();
	void setPosition(int8_t x, int8_t y, MouseDirection angle, MousePosition side = MousePosition::CENTER);
	// この関数はクソ
	void setDiagoInout(DiagoInout inout);
	// setPosition, setDiagoInoutを両方設定する

	// 加速もしくは等速のみ
	// 指定距離が来た場合走り続けるため,オーバーランの可能性あり
	// 他の走行を指定することで距離を残したまま継続
	void startTrapAccel(
		float start_vel,
		float max_vel,
		float distance,
		float accel
		);

	void runTrapAccel(
		float start_vel,
		float max_vel,
		float end_vel,
		float distance,
		float accel
		);
	void runTrapDiago(
		float start_vel,
		float max_vel,
		float end_vel,
		float distance,
		float accel
		);

	void runPivotTurn(
		float max_vel,
		float degree,
		float accel
		);

	bool runSlalom(
		slalomparams::RunType type,
		float vel
		);

	/// @brief 一定周期(周期はT<制御周期)ごとに呼び出してMotorControlへ適切な速度・角速度を出力する
	void interrupt();

	static VelocityControl* getInstance();
};


text:
layout: example.html
title: WMS GetFeatureInfo (Image Layer)
shortdesc: Using an image WMS source with GetFeatureInfo requests
docs: >
  This example shows how to trigger WMS GetFeatureInfo requests on click for a WMS image layer.  Additionally `layer.getData(pixel)` is used to change the mouse pointer when hovering a non-transparent pixel on the map.
tags: "getfeatureinfo, getData"
---


text:
meta.foundation-mq-small {
  font-family: "only screen and (min-width: 768px)";
  width: 768px; }

meta.foundation-mq-medium {
  font-family: "only screen and (min-width:1280px)";
  width: 1280px; }

meta.foundation-mq-large {
  font-family: "only screen and (min-width:1440px)";
  width: 1440px; }

*,
*:before,
*:after {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box; }

html,
body {
  font-size: 100%; }

body {
  background: white;
  color: #222222;
  padding: 0;
  margin: 0;
  font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  position: relative;
  cursor: default; }

a:hover {
  cursor: pointer; }

img,
object,
embed {
  max-width: 100%;
  height: auto; }

object,
embed {
  height: 100%; }

img {
  -ms-interpolation-mode: bicubic; }

#map_canvas img,
#map_canvas embed,
#map_canvas object,
.map_canvas img,
.map_canvas embed,
.map_canvas object {
  max-width: none !important; }

.left {
  float: left !important; }

.right {
  float: right !important; }

.text-left {
  text-align: left !important; }

.text-right {
  text-align: right !important; }

.text-center {
  text-align: center !important; }

.text-justify {
  text-align: justify !important; }

.hide {
  display: none; }

.antialiased {
  -webkit-font-smoothing: antialiased; }

img {
  display: inline-block;
  vertical-align: middle; }

textarea {
  height: auto;
  min-height: 50px; }

select {
  width: 100%; }

button, .button {
  border-style: solid;
  border-width: 1px;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  line-height: normal;
  margin: 0 0 1.25em;
  position: relative;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  padding-top: 0.75em;
  padding-right: 1.5em;
  padding-bottom: 0.8125em;
  padding-left: 1.5em;
  font-size: 1em;
  background-color: #2ba6cb;
  border-color: #2284a1;
  color: white; }
  button:hover, button:focus, .button:hover, .button:focus {
    background-color: #2284a1; }
  button:hover, button:focus, .button:hover, .button:focus {
    color: white; }
  button.secondary, .button.secondary {
    background-color: #e9e9e9;
    border-color: #d0d0d0;
    color: #333333; }
    button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus {
      background-color: #d0d0d0; }
    button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus {
      color: #333333; }
  button.success, .button.success {
    background-color: #5da423;
    border-color: #457a1a;
    color: white; }
    button.success:hover, button.success:focus, .button.success:hover, .button.success:focus {
      background-color: #457a1a; }
    button.success:hover, button.success:focus, .button.success:hover, .button.success:focus {
      color: white; }
  button.alert, .button.alert {
    background-color: #c60f13;
    border-color: #970b0e;
    color: white; }
    button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus {
      background-color: #970b0e; }
    button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus {
      color: white; }
  button.large, .button.large {
    padding-top: 1em;
    padding-right: 2em;
    padding-bottom: 1.0625em;
    padding-left: 2em;
    font-size: 1.25em; }
  button.small, .button.small {
    padding-top: 0.5625em;
    padding-right: 1.125em;
    padding-bottom: 0.625em;
    padding-left: 1.125em;
    font-size: 0.8125em; }
  button.tiny, .button.tiny {
    padding-top: 0.4375em;
    padding-right: 0.875em;
    padding-bottom: 0.5em;
    padding-left: 0.875em;
    font-size: 0.6875em; }
  button.expand, .button.expand {
    padding-right: 0;
    padding-left: 0;
    width: 100%; }
  button.left-align, .button.left-align {
    text-align: left;
    text-indent: 0.75em; }
  button.right-align, .button.right-align {
    text-align: right;
    padding-right: 0.75em; }
  button.disabled, button[disabled], .button.disabled, .button[disabled] {
    background-color: #2ba6cb;
    border-color: #2284a1;
    color: white;
    cursor: default;
    opacity: 0.6;
    -webkit-box-shadow: none;
    box-shadow: none; }
    button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus {
      background-color: #2284a1; }
    button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus {
      color: white; }
    button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus {
      background-color: #2ba6cb; }
    button.disabled.secondary, button[disabled].secondary, .button.disabled.secondary, .button[disabled].secondary {
      background-color: #e9e9e9;
      border-color: #d0d0d0;
      color: #333333;
      cursor: default;
      opacity: 0.6;
      -webkit-box-shadow: none;
      box-shadow: none; }
      button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus {
        background-color: #d0d0d0; }
      button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus {
        color: #333333; }
      button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus {
        background-color: #e9e9e9; }
    button.disabled.success, button[disabled].success, .button.disabled.success, .button[disabled].success {
      background-color: #5da423;
      border-color: #457a1a;
      color: white;
      cursor: default;
      opacity: 0.6;
      -webkit-box-shadow: none;
      box-shadow: none; }
      button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus {
        background-color: #457a1a; }
      button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus {
        color: white; }
      button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus {
        background-color: #5da423; }
    button.disabled.alert, button[disabled].alert, .button.disabled.alert, .button[disabled].alert {
      background-color: #c60f13;
      border-color: #970b0e;
      color: white;
      cursor: default;
      opacity: 0.6;
      -webkit-box-shadow: none;
      box-shadow: none; }
      button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus {
        background-color: #970b0e; }
      button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus {
        color: white; }
      button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus {
        background-color: #c60f13; }

button, .button {
  padding-top: 0.8125em;
  padding-bottom: 0.75em;
  -webkit-appearance: none; }
  button.tiny, .button.tiny {
    padding-top: 0.5em;
    padding-bottom: 0.4375em;
    -webkit-appearance: none; }
  button.small, .button.small {
    padding-top: 0.625em;
    padding-bottom: 0.5625em;
    -webkit-appearance: none; }
  button.large, .button.large {
    padding-top: 1.03125em;
    padding-bottom: 1.03125em;
    -webkit-appearance: none; }

@media only screen {
  button, .button {
    -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
    -webkit-transition: background-color 300ms ease-out;
    -moz-transition: background-color 300ms ease-out;
    transition: background-color 300ms ease-out; }
    button:active, .button:active {
      -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset;
      box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; }
    button.radius, .button.radius {
      -webkit-border-radius: 3px;
      border-radius: 3px; }
    button.round, .button.round {
      -webkit-border-radius: 1000px;
      border-radius: 1000px; } }
@media only screen and (min-width: 768px) {
  button, .button {
    display: inline-block; } }


text:
let item = false
pauseUntil(() => true)
pauseUntil(() => item)
pauseUntil(() => true && true)


text:
(function(angular) {
  'use strict';
angular.module('docsTimeDirective', [])
  .controller('TimeController', ['$scope', function($scope) {
    $scope.format = 'dd-MM-yyyy hh:mm:ss a';
  }])
  .directive('myCurrentTime', ['$interval', 'dateFilter', function($interval, dateFilter) {
    function link(scope, element, attrs) {
      var format,
          timeoutId;
      function updateTime() {
        element.text(dateFilter(new Date(), format));
      }
      scope.$watch(attrs.myCurrentTime, function(value) {
        format = value;
        updateTime();
      });
      element.on('$destroy', function() {
        $interval.cancel(timeoutId);
      });
      // start the UI update process; save the timeoutId for canceling
      timeoutId = $interval(function() {
        updateTime(); // update DOM
      }, 1000);
    }
    return {
      link: link
    };
  }]);
angular.element(document).ready(function() {
  angular.bootstrap(form_time, ["docsTimeDirective"]);
});
})(window.angular);


text:
#include <dart/dart.hpp>
#include <pybind11/pybind11.h>

namespace py = pybind11;

namespace dart {
namespace python {

void ResourceRetriever(py::module& m)
{
  ::py::class_<
      dart::common::ResourceRetriever,
      std::shared_ptr<dart::common::ResourceRetriever>>(m, "ResourceRetriever")
      .def("exists", &common::ResourceRetriever::exists, ::py::arg("uri"))
      .def("retrieve", &common::ResourceRetriever::retrieve, ::py::arg("uri"))
      .def("readAll", &common::ResourceRetriever::readAll, ::py::arg("uri"))
      .def(
          "getFilePath",
          &common::ResourceRetriever::getFilePath,
          ::py::arg("uri"));

  ::py::class_<
      dart::common::LocalResourceRetriever,
      dart::common::ResourceRetriever,
      std::shared_ptr<dart::common::LocalResourceRetriever>>(
      m, "LocalResourceRetriever")
      .def(::py::init<>());
}

} // namespace python
} // namespace dart


text:
"""
WWW: http://4suite.org/4DOM         e-mail: support@4suite.org

Copyright (c) 2000 Fourthought Inc, USA.   All Rights Reserved.
See  http://4suite.org/COPYRIGHT  for license and copyright information
"""

class Node:
    """Class giving the nodeType and tree-position constants."""

    # DOM implementations may use this as a base class for their own
    # Node implementations.  If they don't, the constants defined here
    # should still be used as the canonical definitions as they match
    # the values given in the W3C recommendation.  Client code can
    # safely refer to these values in all tests of Node.nodeType
    # values.

    ELEMENT_NODE                = 1
    ATTRIBUTE_NODE              = 2
    TEXT_NODE                   = 3
    CDATA_SECTION_NODE          = 4
    ENTITY_REFERENCE_NODE       = 5
    ENTITY_NODE                 = 6
    PROCESSING_INSTRUCTION_NODE = 7
    COMMENT_NODE                = 8
    DOCUMENT_NODE               = 9
    DOCUMENT_TYPE_NODE          = 10
    DOCUMENT_FRAGMENT_NODE      = 11
    NOTATION_NODE               = 12

    # Based on DOM Level 3 (WD 9 April 2002)

    TREE_POSITION_PRECEDING    = 0x01
    TREE_POSITION_FOLLOWING    = 0x02
    TREE_POSITION_ANCESTOR     = 0x04
    TREE_POSITION_DESCENDENT   = 0x08
    TREE_POSITION_EQUIVALENT   = 0x10
    TREE_POSITION_SAME_NODE    = 0x20
    TREE_POSITION_DISCONNECTED = 0x00

class UserDataHandler:
    """Class giving the operation constants for UserDataHandler.handle()."""

    # Based on DOM Level 3 (WD 9 April 2002)

    NODE_CLONED   = 1
    NODE_IMPORTED = 2
    NODE_DELETED  = 3
    NODE_RENAMED  = 4

class DOMError:
    """Class giving constants for error severity."""

    # Based on DOM Level 3 (WD 9 April 2002)

    SEVERITY_WARNING     = 0
    SEVERITY_ERROR       = 1
    SEVERITY_FATAL_ERROR = 2

# DOMException codes
INDEX_SIZE_ERR                 = 1
DOMSTRING_SIZE_ERR             = 2
HIERARCHY_REQUEST_ERR          = 3
WRONG_DOCUMENT_ERR             = 4
INVALID_CHARACTER_ERR          = 5
NO_DATA_ALLOWED_ERR            = 6
NO_MODIFICATION_ALLOWED_ERR    = 7
NOT_FOUND_ERR                  = 8
NOT_SUPPORTED_ERR              = 9
INUSE_ATTRIBUTE_ERR            = 10
# DOM Level 2
INVALID_STATE_ERR              = 11
SYNTAX_ERR                     = 12
INVALID_MODIFICATION_ERR       = 13
NAMESPACE_ERR                  = 14
INVALID_ACCESS_ERR             = 15
# DOM Level 3
VALIDATION_ERR                 = 16

# EventException codes
UNSPECIFIED_EVENT_TYPE_ERR     = 0

# Fourthought specific codes
FT_EXCEPTION_BASE = 1000
XML_PARSE_ERR = FT_EXCEPTION_BASE + 1

#RangeException codes
BAD_BOUNDARYPOINTS_ERR = 1
INVALID_NODE_TYPE_ERR = 2

class DOMException(Exception):
    def __init__(self, code, msg=''):
        self.code = code
        self.msg = msg or DOMExceptionStrings[code]

    def __str__(self):
        return self.msg

class EventException(Exception):
    def __init__(self, code, msg=''):
        self.code = code
        self.msg = msg or EventExceptionStrings[code]
        return

    def __str__(self):
        return self.msg

class RangeException(Exception):
    def __init__(self, code, msg):
        self.code = code
        self.msg = msg or RangeExceptionStrings[code]
        Exception.__init__(self, self.msg)

class FtException(Exception):
    def __init__(self, code, *args):
        self.code = code
        self.msg = FtExceptionStrings[code] % args
        return

    def __str__(self):
        return self.msg

class IndexSizeErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, INDEX_SIZE_ERR, msg)

class DomstringSizeErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, DOMSTRING_SIZE_ERR, msg)

# DOMStringSizeErr was accidentally introduced in rev 1.14 of this
# file, and was released as part of PyXML 0.6.4, 0.6.5, 0.6.6, 0.7,
# and 0.7.1.  It has never been part of the Python DOM API, although
# it better matches the W3C recommendation.  It should remain for
# compatibility, unfortunately.
#
DOMStringSizeErr = DomstringSizeErr

class HierarchyRequestErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, HIERARCHY_REQUEST_ERR, msg)

class WrongDocumentErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, WRONG_DOCUMENT_ERR, msg)

class InvalidCharacterErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, INVALID_CHARACTER_ERR, msg)

class NoDataAllowedErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, NO_DATA_ALLOWED_ERR, msg)

class NoModificationAllowedErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, NO_MODIFICATION_ALLOWED_ERR, msg)

class NotFoundErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, NOT_FOUND_ERR, msg)

class NotSupportedErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, NOT_SUPPORTED_ERR, msg)

class InuseAttributeErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, INUSE_ATTRIBUTE_ERR, msg)

class InvalidStateErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, INVALID_STATE_ERR, msg)

class SyntaxErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, SYNTAX_ERR, msg)

class InvalidModificationErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, INVALID_MODIFICATION_ERR, msg)

class NamespaceErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, NAMESPACE_ERR, msg)

class InvalidAccessErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, INVALID_ACCESS_ERR, msg)

class ValidationErr(DOMException):
    def __init__(self, msg=''):
        DOMException.__init__(self, VALIDATION_ERR, msg)

class UnspecifiedEventTypeErr(EventException):
    def __init__(self, msg=''):
        EventException.__init__(self, UNSPECIFIED_EVENT_TYPE_ERR, msg)

class XmlParseErr(FtException):
    def __init__(self, msg=''):
        FtException.__init__(self, XML_PARSE_ERR, msg)

#Specific Range Exceptions
class BadBoundaryPointsErr(RangeException):
    def __init__(self, msg=''):
        RangeException.__init__(self, BAD_BOUNDARYPOINTS_ERR, msg)

class InvalidNodeTypeErr(RangeException):
    def __init__(self, msg=''):
        RangeException.__init__(self, INVALID_NODE_TYPE_ERR, msg)

from xml.dom import DOMImplementation

try:
    from xml.dom.html import HTMLDOMImplementation
    implementation =  HTMLDOMImplementation.HTMLDOMImplementation()
    HTMLDOMImplementation.implementation = implementation
except ImportError:
    implementation = DOMImplementation.DOMImplementation()
DOMImplementation.implementation = implementation

XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"
XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"
XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml"
EMPTY_NAMESPACE = None
EMPTY_PREFIX = None

import MessageSource
DOMExceptionStrings = MessageSource.__dict__['DOMExceptionStrings']
EventExceptionStrings = MessageSource.__dict__['EventExceptionStrings']
FtExceptionStrings = MessageSource.__dict__['FtExceptionStrings']
RangeExceptionStrings = MessageSource.__dict__['RangeExceptionStrings']

from domreg import getDOMImplementation,registerDOMImplementation


text:
# update-notifier [![Build Status](https://travis-ci.org/yeoman/update-notifier.svg?branch=master)](https://travis-ci.org/yeoman/update-notifier)

> Update notifications for your CLI app

![](screenshot.png)

Inform users of your package of updates in a non-intrusive way.

#### Contents

- [Examples](#examples)
- [How](#how)
- [API](#api)
- [About](#about)
- [Users](#users)

## Examples

### Simple

```js
const updateNotifier = require('update-notifier');
const pkg = require('./package.json');

updateNotifier({pkg}).notify();
```

### Comprehensive

```js
const updateNotifier = require('update-notifier');
const pkg = require('./package.json');

// Checks for available update and returns an instance
const notifier = updateNotifier({pkg});

// Notify using the built-in convenience method
notifier.notify();

// `notifier.update` contains some useful info about the update
console.log(notifier.update);
/*
{
	latest: '1.0.1',
	current: '1.0.0',
	type: 'patch', // Possible values: latest, major, minor, patch, prerelease, build
	name: 'pageres'
}
*/
```

### Options and custom message

```js
const notifier = updateNotifier({
	pkg,
	updateCheckInterval: 1000 * 60 * 60 * 24 * 7 // 1 week
});

if (notifier.update) {
	console.log(`Update available: ${notifier.update.latest}`);
}
```

## How

Whenever you initiate the update notifier and it's not within the interval threshold, it will asynchronously check with npm in the background for available updates, then persist the result. The next time the notifier is initiated, the result will be loaded into the `.update` property. This prevents any impact on your package startup performance.
The update check is done in a unref'ed [child process](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options). This means that if you call `process.exit`, the check will still be performed in its own process.

The first time the user runs your app, it will check for an update, and even if an update is available, it will wait the specified `updateCheckInterval` before notifying the user. This is done to not be annoying to the user, but might surprise you as an implementer if you're testing whether it works. Check out [`example.js`](example.js) to quickly test out `update-notifier` and see how you can test that it works in your app.

## API

### notifier = updateNotifier(options)

Checks if there is an available update. Accepts options defined below. Returns an instance with an `.update` property there is an available update, otherwise `undefined`.

### options

#### pkg

Type: `Object`

##### name

*Required*

Type: `string`

##### version

*Required*

Type: `string`

#### updateCheckInterval

Type: `number`

Default: `1000 * 60 * 60 * 24` *(1 day)*

How often to check for updates.

#### callback(error, update)

Type: `Function`

Passing a callback here will make it check for an update directly and report right away. Not recommended as you won't get the benefits explained in [`How`](#how). `update` is equal to `notifier.update`.

### notifier.notify([options])

Convenience method to display a notification message. *(See screenshot)*

Only notifies if there is an update and the process is [TTY](https://nodejs.org/api/process.html#process_tty_terminals_and_process_stdout).

#### options

Type: `Object`

##### defer

Type: `boolean`

Default: `true`

Defer showing the notification to after the process has exited.

##### message

Type: `string`

Default: [See above screenshot](https://github.com/yeoman/update-notifier#update-notifier-)

Message that will be shown when an update is available.

##### isGlobal

Type: `boolean`

Default: `true`

Include the `-g` argument in the default message's `npm i` recommendation. You may want to change this if your CLI package can be installed as a dependency of another project, and don't want to recommend a global installation. This option is ignored if you supply your own `message` (see above).

##### boxenOpts

Type: `Object`

Default: `{padding: 1, margin: 1, align: 'center', borderColor: 'yellow', borderStyle: 'round'}` *(See screenshot)*

Options object that will be passed to [`boxen`](https://github.com/sindresorhus/boxen).

### User settings

Users of your module have the ability to opt-out of the update notifier by changing the `optOut` property to `true` in `~/.config/configstore/update-notifier-[your-module-name].json`. The path is available in `notifier.config.path`.

Users can also opt-out by [setting the environment variable](https://github.com/sindresorhus/guides/blob/master/set-environment-variables.md) `NO_UPDATE_NOTIFIER` with any value or by using the `--no-update-notifier` flag on a per run basis.

## About

The idea for this module came from the desire to apply the browser update strategy to CLI tools, where everyone is always on the latest version. We first tried automatic updating, which we discovered wasn't popular. This is the second iteration of that idea, but limited to just update notifications.

## Users

There are a bunch projects using it:

- [Yeoman](http://yeoman.io) - Modern workflows for modern webapps
- [AVA](https://ava.li) - Simple concurrent test runner
- [XO](https://github.com/sindresorhus/xo) - JavaScript happiness style linter
- [Pageres](https://github.com/sindresorhus/pageres) - Capture website screenshots
- [Node GH](http://nodegh.io) - GitHub command line tool

[And 1200+ more…](https://www.npmjs.org/browse/depended/update-notifier)

## License

[BSD license](http://opensource.org/licenses/bsd-license.php) and copyright Google


text:
insert into aspnetuserroles(UserId,RoleId)
SELECT user.id, role.id
FROM urm.aspnetusers user, urm.aspnetroles role
Where user.email = 'gergana.e.georgieva@gmail.com'
and role.Name = 'Mentor';