text:
"""Provides code to access the REST-style KEGG online API.

This module aims to make the KEGG online REST-style API easier to use. See:
http://www.kegg.jp/kegg/rest/keggapi.html

The KEGG REST-style API provides simple access to a range of KEGG databases.
This works using simple URLs (which this module will construct for you),
with any errors indicated via HTTP error levels.

The functionality is somewhat similar to Biopython's Bio.TogoWS and Bio.Entrez
modules.

Currently KEGG does not provide any usage guidelines (unlike the NCBI whose
requirements are reasonably clear). To avoid risking overloading the service,
Biopython will only allow three calls per second.

References:

Kanehisa, M. and Goto, S.; KEGG: Kyoto Encyclopedia of Genes and Genomes.
Nucleic Acids Res. 28, 29-34 (2000).
"""

from Bio._py3k import urlopen as _urlopen

def _q(op, arg1, arg2=None, arg3=None):
    URL = "http://rest.kegg.jp/%s"
    if arg2 and arg3:
        args = "%s/%s/%s/%s" % (op, arg1, arg2, arg3)
    elif arg2:
        args = "%s/%s/%s" % (op, arg1, arg2)
    else:
        args = "%s/%s" % (op, arg1)
    return _urlopen(URL % (args))

# http://www.kegg.jp/kegg/rest/keggapi.html
def kegg_info(database):
    """KEGG info - Displays the current statistics of a given database.

    db - database or organism (string)

    The argument db can be a KEGG database name (e.g. 'pathway' or its
    official abbreviation, 'path'), or a KEGG organism code or T number
    (e.g. 'hsa' or 'T01001' for human).

    A valid list of organism codes and their T numbers can be obtained
    via kegg_info('organism') or http://rest.kegg.jp/list/organism

    """
    # TODO - return a string (rather than the handle?)
    # TODO - chache and validate the organism code / T numbers?
    # TODO - can we parse the somewhat formatted output?
    #
    # http://rest.kegg.jp/info/<database>
    #
    # <database> = pathway | brite | module | disease | drug | environ |
    #              ko | genome |<org> | compound | glycan | reaction |
    #              rpair | rclass | enzyme | genomes | genes | ligand | kegg
    # <org> = KEGG organism code or T number
    return _q("info", database)

def kegg_list(database, org=None):
    """KEGG list - Entry list for database, or specified database entries.

    db - database or organism (string)
    org - optional organism (string), see below.

    For the pathway and module databases the optional organism can be
    used to restrict the results.

    """
    # TODO - split into two functions (dbentries seems separate)?
    #
    #  http://rest.kegg.jp/list/<database>/<org>
    #
    #  <database> = pathway | module
    #  <org> = KEGG organism code
    if isinstance(database, str) and (database in ["pathway", "module"]) and org:
        resp = _q("list", database, org)
    elif isinstance(database, str) and database and org:
        raise Exception("Invalid database arg for kegg list request.")

    # http://rest.kegg.jp/list/<database>
    #
    # <database> = pathway | brite | module | disease | drug | environ |
    #              ko | genome | <org> | compound | glycan | reaction |
    #              rpair | rclass | enzyme | organism
    # <org> = KEGG organism code or T number
    #
    #
    # http://rest.kegg.jp/list/<dbentries>
    #
    # <dbentries> = KEGG database entries involving the following <database>
    # <database> = pathway | brite | module | disease | drug | environ |
    #              ko | genome | <org> | compound | glycan | reaction |
    #              rpair | rclass | enzyme
    # <org> = KEGG organism code or T number
    else:
        if isinstance(database, list) and len(database) <= 100:
            database = ("+").join(database)
        elif isinstance(database, list) and len(database) > 100:
            raise Exception("Maximuim number of databases is 100 for kegg list query")
        resp = _q("list", database)

    return resp

def kegg_find(database, query, option=None):
    """KEGG find - Data search.

    Finds entries with matching query keywords or other query data in
    a given database.

    db - database or organism (string)
    query - search terms (string)
    option - search option (string), see below.

    For the compound and drug database, set option to the string 'formula',
    'exact_mass' or 'mol_weight' to search on that field only. The
    chemical formula search is a partial match irrespective of the order
    of atoms given. The exact mass (or molecular weight) is checked by
    rounding off to the same decimal place as the query data. A range of
    values may also be specified with the minus(-) sign.

    """
    # TODO - return list of tuples?
    #
    # http://rest.kegg.jp/find/<database>/<query>/<option>
    #
    # <database> = compound | drug
    # <option> = formula | exact_mass | mol_weight
    if database in ["compound", "drug"] and \
          option in ["formula", "exact_mass", "mol_weight"]:
        resp = _q("find", database, query, option)
    elif option:
        raise Exception("Invalid option arg for kegg find request.")

    # http://rest.kegg.jp/find/<database>/<query>
    #
    # <database> = pathway | module | disease | drug | environ | ko |
    #              genome | <org> | compound | glycan | reaction | rpair |
    #              rclass | enzyme | genes | ligand
    # <org> = KEGG organism code or T number
    else:
        if isinstance(query, list):
            query = "+".join(query)
        resp = _q("find", database, query)

    return resp

def kegg_get(dbentries, option=None):
    """KEGG get - Data retrieval.

    dbentries - Identifiers (single string, or list of strings), see below.
    option - One of "aaseq", "ntseq", "mol", "kcf", "image", "kgml" (string)

    The input is limited up to 10 entries.
    The input is limited to one pathway entry with the image or kgml option.
    The input is limited to one compound/glycan/drug entry with the image option.

    Returns a handle.
    """
    if isinstance(dbentries, list) and len(dbentries) <= 10:
        dbentries = "+".join(dbentries)
    elif isinstance(dbentries, list) and len(dbentries) > 10:
        raise Exception("Maximum number of dbentries is 10 for kegg get query")

    # http://rest.kegg.jp/get/<dbentries>[/<option>]
    #
    # <dbentries> = KEGG database entries involving the following <database>
    # <database> = pathway | brite | module | disease | drug | environ |
    #              ko | genome | <org> | compound | glycan | reaction |
    #              rpair | rclass | enzyme
    # <org> = KEGG organism code or T number
    #
    # <option> = aaseq | ntseq | mol | kcf | image
    if option in ["aaseq", "ntseq", "mol", "kcf", "image", "kgml"]:
        resp = _q("get", dbentries, option)
    elif option:
        raise Exception("Invalid option arg for kegg get request.")
    else:
        resp = _q("get", dbentries)

    return resp

def kegg_conv(target_db, source_db, option=None):
    """KEGG conv - convert KEGG identifiers to/from outside identifiers

    target_db - Target database
    source_db_or_dbentries - source database or database entries
    option - Can be "turtle" or "n-triple" (string).
    """
    # http://rest.kegg.jp/conv/<target_db>/<source_db>[/<option>]
    #
    # (<target_db> <source_db>) = (<kegg_db> <outside_db>) |
    #                             (<outside_db> <kegg_db>)
    #
    # For gene identifiers:
    # <kegg_db> = <org>
    # <org> = KEGG organism code or T number
    # <outside_db> = ncbi-gi | ncbi-geneid | uniprot
    #
    # For chemical substance identifiers:
    # <kegg_db> = drug | compound | glycan
    # <outside_db> = pubchem | chebi
    #
    # <option> = turtle | n-triple
    #
    # http://rest.kegg.jp/conv/<target_db>/<dbentries>[/<option>]
    #
    # For gene identifiers:
    # <dbentries> = database entries involving the following <database>
    # <database> = <org> | ncbi-gi | ncbi-geneid | uniprot
    # <org> = KEGG organism code or T number
    #
    # For chemical substance identifiers:
    # <dbentries> = database entries involving the following <database>
    # <database> = drug | compound | glycan | pubchem | chebi
    #
    # <option> = turtle | n-triple
    if option and option not in ["turtle", "n-triple"]:
        raise Exception("Invalid option arg for kegg conv request.")

    if isinstance(source_db, list):
        source_db = "+".join(source_db)

    if target_db in ["ncbi-gi", "ncbi-geneid", "uniprot"] or \
       source_db in ["ncbi-gi", "ncbi-geneid", "uniprot"] or \
       (target_db in ["drug", "compound", "glycan"] and
           source_db in ["pubchem", "glycan"]) or \
       (target_db in ["pubchem", "glycan"] and
           source_db in ["drug", "compound", "glycan"]):

        if option:
            resp = _q("conv", target_db, source_db, option)
        else:
            resp = _q("conv", target_db, source_db)

        return resp
    else:
        raise Exception("Bad argument target_db or source_db for kegg conv request.")

def kegg_link(target_db, source_db, option=None):
    """KEGG link - find related entries by using database cross-references.

    target_db - Target database
    source_db_or_dbentries - source database
    option - Can be "turtle" or "n-triple" (string).
    """
    # http://rest.kegg.jp/link/<target_db>/<source_db>[/<option>]
    #
    # <target_db> = <database>
    # <source_db> = <database>
    #
    # <database> = pathway | brite | module | ko | genome | <org> | compound |
    #              glycan | reaction | rpair | rclass | enzyme | disease |
    #              drug | dgroup | environ
    #
    # <option> = turtle | n-triple
    # http://rest.kegg.jp/link/<target_db>/<dbentries>[/<option>]
    #
    # <dbentries> = KEGG database entries involving the following <database>
    # <database> = pathway | brite | module | ko | genome | <org> | compound |
    #              glycan | reaction | rpair | rclass | enzyme | disease |
    #              drug | dgroup | environ | genes
    #
    # <option> = turtle | n-triple

    if option and option not in ["turtle", "n-triple"]:
        raise Exception("Invalid option arg for kegg conv request.")

    if isinstance(source_db, list):
        source_db = "+".join(source_db)

    if option:
        resp = _q("link", target_db, source_db, option)
    else:
        resp = _q("link", target_db, source_db)

    return resp


text:
Содействие
------------

Git Flow:
- Develop branch: develop
- Feature branch: feature
- Hofix branch: hotfix
- Отступы: 4 пробела
- Строка: ≈80 символов
- Стиль: следуя стилю проекта

Комментарий в коммите обязателен

redpajama_set_name: RedPajamaGithub


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/securitycenter/v1beta1/securitycenter_service.proto

package com.google.cloud.securitycenter.v1beta1;

public interface GetOrganizationSettingsRequestOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1beta1.GetOrganizationSettingsRequest)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Name of the organization to get organization settings for. Its format is
   * "organizations/[organization_id]/organizationSettings".
   *

   *
   * string name = 1;
   */
  java.lang.String getName();
  /**
   *
   *
   *

   * Name of the organization to get organization settings for. Its format is
   * "organizations/[organization_id]/organizationSettings".
   *

   *
   * string name = 1;
   */
  com.google.protobuf.ByteString getNameBytes();
}


text:
%%
%% Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5
%%
%% Copyright (C) 2020 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>
%%

$project=Qt5xHb
$module=QtQml

$header

$includes=5,1,0

$beginSlotsClass
$slot=5,1,0|objectCreated( QObject * obj, const QUrl & url )
$endSlotsClass


text:
package com.hazelcast.core;

import com.hazelcast.cardinality.CardinalityEstimator;
import com.hazelcast.client.Client;
import com.hazelcast.client.ClientService;
import com.hazelcast.cluster.Cluster;
import com.hazelcast.cluster.Endpoint;
import com.hazelcast.cluster.Member;
import com.hazelcast.collection.IList;
import com.hazelcast.collection.IQueue;
import com.hazelcast.collection.ISet;
import com.hazelcast.config.Config;
import com.hazelcast.cp.CPSubsystem;
import com.hazelcast.crdt.pncounter.PNCounter;
import com.hazelcast.durableexecutor.DurableExecutorService;
import com.hazelcast.flakeidgen.FlakeIdGenerator;
import com.hazelcast.logging.LoggingService;
import com.hazelcast.map.IMap;
import com.hazelcast.multimap.MultiMap;
import com.hazelcast.partition.PartitionService;
import com.hazelcast.replicatedmap.ReplicatedMap;
import com.hazelcast.replicatedmap.ReplicatedMapCantBeCreatedOnLiteMemberException;
import com.hazelcast.ringbuffer.Ringbuffer;
import com.hazelcast.scheduledexecutor.IScheduledExecutorService;
import com.hazelcast.spi.annotation.Beta;
import com.hazelcast.sql.SqlService;
import com.hazelcast.splitbrainprotection.SplitBrainProtectionService;
import com.hazelcast.topic.ITopic;
import com.hazelcast.transaction.HazelcastXAResource;
import com.hazelcast.transaction.TransactionContext;
import com.hazelcast.transaction.TransactionException;
import com.hazelcast.transaction.TransactionOptions;
import com.hazelcast.transaction.TransactionalTask;

import javax.annotation.Nonnull;
import java.util.Collection;
import java.util.UUID;
import java.util.concurrent.ConcurrentMap;

/**
 * Hazelcast instance. Each instance is a member and/or client in a Hazelcast cluster. When
 * you want to use Hazelcast's distributed data structures, you must first create an instance.
 * Multiple Hazelcast instances can be created on a single JVM.
 *

 * Instances should be shut down explicitly. See the {@link #shutdown()} method.
 * If the instance is a client and you don't shut it down explicitly, it will continue to run and
 * even connect to another live member if the one it was connected fails.
 *

 * Each Hazelcast instance has its own socket and threads.
 *
 * @see Hazelcast#newHazelcastInstance(Config config)
 */
public interface HazelcastInstance {

    /**
     * Returns the name of this Hazelcast instance.
     *
     * @return name of this Hazelcast instance
     */
    @Nonnull
    String getName();

    /**
     * Creates or returns the distributed queue instance with the specified name.
     *
     * @param name name of the distributed queue
     * @param <E> queue item type
     * @return distributed queue instance with the specified name
     */
    @Nonnull
    <E> IQueue<E> getQueue(@Nonnull String name);

    /**
     * Creates or returns the distributed topic instance with the specified name.
     *
     * @param name name of the distributed topic
     * @param <E> the type of the topic message
     * @return distributed topic instance with the specified name
     */
    @Nonnull
    <E> ITopic<E> getTopic(@Nonnull String name);

    /**
     * Creates or returns the distributed set instance with the specified name.
     *
     * @param name name of the distributed set
     * @param <E> the type of elements maintained by the set
     * @return distributed set instance with the specified name
     */
    @Nonnull
    <E> ISet<E> getSet(@Nonnull String name);

    /**
     * Creates or returns the distributed list instance with the specified name.
     * Index based operations on the list are not supported.
     *
     * @param name name of the distributed list
     * @param <E> the type of elements maintained by the list
     * @return distributed list instance with the specified name
     */
    @Nonnull
    <E> IList<E> getList(@Nonnull String name);

    /**
     * Creates or returns the distributed map instance with the specified name.
     *
     * @param name name of the distributed map
     * @param <K> key type
     * @param <V> value type
     * @return distributed map instance with the specified name
     */
    @Nonnull
    <K, V> IMap<K, V> getMap(@Nonnull String name);

    /**
     * Creates or returns the replicated map instance with the specified name.
     *
     * @param name name of the distributed map
     * @param <K> the type of keys maintained by the replicated map
     * @param <V> the type of mapped values
     * @return replicated map instance with specified name
     * @throws ReplicatedMapCantBeCreatedOnLiteMemberException if it is called on a lite member
     * @since 3.2
     */
    @Nonnull
    <K, V> ReplicatedMap<K, V> getReplicatedMap(@Nonnull String name);

    /**
     * Creates or returns the distributed multimap instance with the specified name.
     *
     * @param name name of the distributed multimap
     * @param <K> type of the multimap key
     * @param <V> type of the multimap value
     * @return distributed multimap instance with the specified name
     */
    @Nonnull
    <K, V> MultiMap<K, V> getMultiMap(@Nonnull String name);

    /**
     * Creates or returns the distributed Ringbuffer instance with the specified name.
     *
     * @param name name of the distributed Ringbuffer
     * @param <E> the type of the elements that the Ringbuffer contains
     * @return distributed RingBuffer instance with the specified name
     */
    @Nonnull
    <E> Ringbuffer<E> getRingbuffer(@Nonnull String name);

    /**
     * Creates or returns the reliable topic instance with the specified name.
     *
     * @param name name of the reliable topic
     * @param <E> the type of the topic message
     * @return the reliable topic
     */
    @Nonnull
    <E> ITopic<E> getReliableTopic(@Nonnull String name);

    /**
     * Returns the Cluster that this Hazelcast instance is part of.
     * Cluster interface allows you to add a listener for membership
     * events and to learn more about the cluster that this Hazelcast
     * instance is part of.
     *
     * @return the cluster that this Hazelcast instance is part of
     */
    @Nonnull
    Cluster getCluster();

    /**
     * Returns the local Endpoint which this HazelcastInstance belongs to.
     *

     * Returned endpoint will be a {@link Member} instance for cluster nodes
     * and a {@link Client} instance for clients.
     *
     * @return the local {@link Endpoint} which this HazelcastInstance belongs to
     * @see Member
     * @see Client
     */
    @Nonnull
    Endpoint getLocalEndpoint();

    /**
     * Creates or returns the distributed executor service for the given name.
     * Executor service enables you to run your Runnables and Callables
     * on the Hazelcast cluster.
     *
Note: Note that it doesn't support {@code invokeAll/Any}
     * and doesn't have standard shutdown behavior

     *
     * @param name name of the executor service
     * @return the distributed executor service for the given name
     */
    @Nonnull
    IExecutorService getExecutorService(@Nonnull String name);

    /**
     * Creates or returns the durable executor service for the given name.
     * DurableExecutor service enables you to run your Runnables and Callables
     * on the Hazelcast cluster.
     *
Note: Note that it doesn't support {@code invokeAll/Any}
     * and doesn't have standard shutdown behavior

     *
     * @param name name of the executor service
     * @return the durable executor service for the given name
     */
    @Nonnull
    DurableExecutorService getDurableExecutorService(@Nonnull String name);

    /**
     * Executes the given transactional task in current thread using default options
     * and returns the result of the task.
     *
     * @param task the transactional task to be executed
     * @param <T>  return type of task
     * @return result of the transactional task
     * @throws TransactionException if an error occurs during transaction.
     */
    <T> T executeTransaction(@Nonnull TransactionalTask<T> task) throws TransactionException;

    /**
     * Executes the given transactional task in current thread using given options
     * and returns the result of the task.
     *
     * @param options options for this transactional task
     * @param task    task to be executed
     * @param <T>     return type of task
     * @return result of the transactional task
     * @throws TransactionException if an error occurs during transaction.
     */
    <T> T executeTransaction(@Nonnull TransactionOptions options,
                             @Nonnull TransactionalTask<T> task) throws TransactionException;

    /**
     * Creates a new TransactionContext associated with the current thread using default options.
     *
     * @return new TransactionContext associated with the current thread
     */
    TransactionContext newTransactionContext();

    /**
     * Creates a new TransactionContext associated with the current thread with given options.
     *
     * @param options options for this transaction
     * @return new TransactionContext associated with the current thread
     */
    TransactionContext newTransactionContext(@Nonnull TransactionOptions options);

    /**
     * Creates or returns a cluster-wide unique ID generator. Generated IDs are {@code long} primitive values
     * and are k-ordered (roughly ordered). IDs are in the range from {@code 0} to {@code
     * Long.MAX_VALUE}.
     *

     * The IDs contain timestamp component and a node ID component, which is assigned when the member
     * joins the cluster. This allows the IDs to be ordered and unique without any coordination between
     * members, which makes the generator safe even in split-brain scenario (for caveats,
     * {@link com.hazelcast.internal.cluster.ClusterService#getMemberListJoinVersion() see here}).
     *

     * For more details and caveats, see class documentation for {@link FlakeIdGenerator}.
     *
     * @param name name of the {@link FlakeIdGenerator}
     * @return FlakeIdGenerator for the given name
     */
    @Nonnull
    FlakeIdGenerator getFlakeIdGenerator(@Nonnull String name);

    /**
     * Returns all {@link DistributedObject}s, that is all maps, queues,
     * topics, locks etc.
     *

     * The results are returned on a best-effort basis. The result might miss
     * just-created objects and contain just-deleted objects. An existing
     * object can also be missing from the list occasionally. One cluster
     * member is queried to obtain the list.
     *
     * @return the collection of all instances in the cluster
     */
    Collection<DistributedObject> getDistributedObjects();

    /**
     * Adds a Distributed Object listener which will be notified when a
     * new {@link DistributedObject} will be created or destroyed.
     *
     * @param distributedObjectListener instance listener
     * @return returns registration ID
     */
    UUID addDistributedObjectListener(@Nonnull DistributedObjectListener distributedObjectListener);

    /**
     * Removes the specified Distributed Object listener. Returns silently
     * if the specified instance listener does not exist.
     *
     * @param registrationId ID of listener registration
     * @return {@code true} if registration is removed, {@code false} otherwise
     */
    boolean removeDistributedObjectListener(@Nonnull UUID registrationId);

    /**
     * Returns the configuration of this Hazelcast instance.
     *
     * @return configuration of this Hazelcast instance
     */
    @Nonnull
    Config getConfig();

    /**
     * Returns the partition service of this Hazelcast instance.
     * InternalPartitionService allows you to introspect current partitions in the
     * cluster, partition the owner members, and listen for partition migration events.
     *
     * @return the partition service of this Hazelcast instance
     */
    @Nonnull
    PartitionService getPartitionService();

    /**
     * Returns the split brain protection service of this Hazelcast instance.
     *

     * Split brain protection service can be used to retrieve split brain protection callbacks which let you to notify
     * split brain protection results of your own to the cluster split brain protection service.
     *
     * @return the split brain protection service of this Hazelcast instance
     */
    @Nonnull
    SplitBrainProtectionService getSplitBrainProtectionService();

    /**
     * Returns the client service of this Hazelcast instance.
     * Client service allows you to get information about connected clients.
     *
     * @return the {@link ClientService} of this Hazelcast instance.
     */
    @Nonnull
    ClientService getClientService();

    /**
     * Returns the logging service of this Hazelcast instance.
     *

     * LoggingService allows you to listen for LogEvents generated by Hazelcast runtime.
     * You can log the events somewhere or take action based on the message.
     *
     * @return the logging service of this Hazelcast instance
     */
    @Nonnull
    LoggingService getLoggingService();

    /**
     * Returns the lifecycle service for this instance.
     *

     * LifecycleService allows you to shutdown this HazelcastInstance and listen for the lifecycle events.
     *
     * @return the lifecycle service for this instance
     */
    @Nonnull
    LifecycleService getLifecycleService();

    /**
     * @param serviceName name of the service
     * @param name        name of the object
     * @param <T>         type of the DistributedObject
     * @return DistributedObject created by the service
     */
    @Nonnull
    <T extends DistributedObject> T getDistributedObject(@Nonnull String serviceName,
                                                         @Nonnull String name);

    /**
     * Returns a ConcurrentMap that can be used to add user-context to the HazelcastInstance. This can be used
     * to store dependencies that otherwise are hard to obtain. HazelcastInstance can be
     * obtained by implementing a {@link HazelcastInstanceAware} interface when submitting a Runnable/Callable to
     * Hazelcast ExecutorService. By storing the dependencies in the user-context, they can be retrieved as soon
     * as you have a reference to the HazelcastInstance.
     *

     * This structure is purely local and Hazelcast remains agnostic abouts its content.
     *
     * @return a ConcurrentMap that can be used to add user-context to the HazelcastInstance.
     */
    @Nonnull ConcurrentMap<String, Object> getUserContext();

    /**
     * Gets xaResource which will participate in XATransaction.
     *
     * @return the xaResource
     */
    @Nonnull HazelcastXAResource getXAResource();

    /**
     * Obtain the {@link ICacheManager} that provides access to JSR-107 (JCache) caches configured on a Hazelcast cluster.
     *

     * Note that this method does not return a JCache {@code CacheManager}; to obtain a JCache
     * {@link javax.cache.CacheManager} use JCache standard API.
     *
     * @return the Hazelcast {@link ICacheManager}
     * @see ICacheManager
     */
    ICacheManager getCacheManager();

    /**
     * Obtain a {@link CardinalityEstimator} with the given name.
     *

     * The estimator can be used to efficiently estimate the cardinality of unique entities
     * in big data sets, without the need of storing them.
     *

     * The estimator is based on a HyperLogLog++ data-structure.
     *
     * @param name the name of the estimator
     * @return a {@link CardinalityEstimator}
     */
    @Nonnull CardinalityEstimator getCardinalityEstimator(@Nonnull String name);

    /**
     * Creates or returns a {@link PNCounter} with the given
     * name.
     *

     * The PN counter can be used as a counter with strong eventual consistency
     * guarantees - if operations to the counters stop, the counter values
     * of all replicas that can communicate with each other should eventually
     * converge to the same value.
     *
     * @param name the name of the PN counter
     * @return a {@link PNCounter}
     */
    @Nonnull PNCounter getPNCounter(@Nonnull String name);

    /**
     * Creates or returns the {@link IScheduledExecutorService} scheduled executor service for the given name.
     * ScheduledExecutor service enables you to schedule your Runnables and Callables
     * on the Hazelcast cluster.
     *
     * @param name name of the executor service
     * @return the scheduled executor service for the given name
     */
    @Nonnull IScheduledExecutorService getScheduledExecutorService(@Nonnull String name);

    /**
     * Returns the CP subsystem that offers a set of in-memory linearizable data structures
     *
     * @return the CP subsystem that offers a set of in-memory linearizable data structures
     */
    @Nonnull CPSubsystem getCPSubsystem();

    /**
     * Returns a service to execute distributed SQL queries.
     *

     * The service is in beta state. Behavior and API might be changed in future releases. Binary compatibility is not
     * guaranteed between minor and patch releases.
     *
     * @return SQL service
     *
     * @see SqlService
     */
    @Beta
    @Nonnull SqlService getSql();

    /**
     * Shuts down this HazelcastInstance. For more information see {@link com.hazelcast.core.LifecycleService#shutdown()}.
     */
    void shutdown();
}


text:
import React from 'react'
import classnames from 'classnames'
import propTypes from './proptypes'

import _styles from '../styles/spin/_simple-circle.scss'

export default function SimpleCircle (props) {
  const { size, color, margin } = props

  const className = classnames(
    props.className,
    _styles['simple-circle']
  )

  let ss = /^(\d+)([%|\w]*)$/.exec(size)
  ss[2] = ss[2] || 'px'

  const style = {
    width: size,
    height: size,
    borderWidth: (ss[1] / 10) + ss[2],
    borderTopColor: color,
    margin
  }

  return (
    <div style={style} className={className} />
  )
}

SimpleCircle.propTypes = propTypes


text:
module SingSwitchable where

fstString' :: [Char] -> [Char]
fstString' x = x ++ " in the rain"

sndString' :: [Char] -> [Char]
sndString' x = x ++ " over the rainbow"

sing' :: ([Char] -> [Char] -> Bool) -> [Char]
sing' op =
    if (x `op` y) then fstString' x else sndString' y
        where
            x = "Singin"
            y = "Somewhere"


text:
var test = require('tap').test;
var browserify = require('browserify');
var fs = require('fs');
var vm = require('vm');
var path = require('path');
var SourceMapConsumer = require('source-map').SourceMapConsumer;
var convert = require('convert-source-map');
var pugify = require('../index.js');

test('no options bundle', function(t) {
    t.plan(1);
    var b = browserify();
    b.add(__dirname + '/../example/bar.js');
    b.transform(__dirname + '/..');
    b.bundle(function (err, src) {
        if (err) t.fail(err);
        testBundle(src, t);
    });
});

test('options bundle', function(t) {
    t.plan(1);
    var b = browserify();
    b.add(__dirname + '/../example/bar.js');
    b.transform(pugify.pug({
        pretty: false
    }));
    b.bundle(function (err, src) {
        if (err) t.fail(err);
        testBundle(src, t);
    });
});

test('with sourcemap', function (t) {

    async function checkSrcContainsSourceMapFor (src, filename) {
        var json = convert
            .fromSource(src.toString('utf8'))
            .toJSON();
        var consumer = await new SourceMapConsumer(json);
        try {
            var srcFile = path.join(__dirname, '../example', filename);
            var smSrc = consumer.sourceContentFor(srcFile);
            var fileSource = await fs.promises.readFile(srcFile, 'utf8');
            if (smSrc !== fileSource) throw new Error('Sourcemap does not match file content');
        } finally {
            consumer.destroy();
        }
    }

    t.plan(1);
    var b = browserify({debug:true});
    b.add(__dirname + '/../example/bar.js');
    b.transform(pugify.pug({
        pretty: true,
        compileDebug: true
    }));
    b.bundle(async function (err, src) {
        if (err) t.fail(err);
        try {
            await Promise.all([
                checkSrcContainsSourceMapFor(src, 'foo.pug'),
                checkSrcContainsSourceMapFor(src, 'fooinc.pug'),
            ]);
            testBundle(src, t);
        } catch (err) {
            t.fail(err);
        }
    });
});

test('bundle with babel transpiling options', function(t) {
    var b = browserify();
    b.add(__dirname + '/../example/es6.js');
    b.transform(pugify.pug({ pretty: false }, { presets: ['@babel/preset-env'] }));

    b.bundle(function (err, src) {
        if (err) t.fail(err);
        function log(msg) {
            // verify that there is no string template in the compiled javascript object, which is a feature of ES6
            t.notOk(/`/.test(msg));
        }
        vm.runInNewContext(src, {
            console: { log: log }
        });
        t.end();
    });
});

function testBundle(src, t) {
    function log (msg) {
        t.equal(msg, 555);
    }
    vm.runInNewContext(src, {
        console: { log: log }
    });
}


text:
function ConvertTo-Hashtable {
  [CmdletBinding()]
  Param (
    [parameter(Mandatory = $true)]
    $Data
  )

  Write-Debug -Message "[$($MyInvocation.MyCommand)] Executing function"

  #Building the result collection
  Foreach ($D in $Data) {
      $HashTable = @{}

      $D |
        get-member -MemberType NoteProperty |

        ForEach-Object {
          Write-Debug -Message "[$($MyInvocation.MyCommand)] Add key: $($_.name) with value: $($D.$($_.name))"
          $HashTable.add($_.name,$D."$($_.name)")
        }

      # Output results
      $HashTable
  }
}


text:
package cn.rongcloud.im.ui.activity;

import android.os.Bundle;
import android.util.Log;

import cn.rongcloud.im.R;

public class PublicServiceInfoActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.e("", "---------PublicServiceInfoActivity------------");
        setContentView(R.layout.pub_account_info);
        setTitle("公众号信息");

    }

}


text:
Describe -tag 'PSOpenAPITools' -name 'GithubOrganizationlinks' {
    Context 'GithubOrganizationlinks' {
        It 'Initialize-GithubOrganizationlinks' {
            # a simple test to create an object
            #$NewObject = Initialize-GithubOrganizationlinks -Repositories "TEST_VALUE" -Self "TEST_VALUE" -Class "TEST_VALUE"
            #$NewObject | Should -BeOfType GithubOrganizationlinks
            #$NewObject.property | Should -Be 0
        }
    }
}


text:
namespace v8 {
namespace internal {
namespace compiler {

// Forward declarations.
class CommonOperatorBuilder;
class Graph;
class MachineOperatorBuilder;
class Operator;

// Performs strength reduction on nodes that have common operators.
class CommonOperatorReducer final : public AdvancedReducer {
 public:
  CommonOperatorReducer(Editor* editor, Graph* graph,
                        CommonOperatorBuilder* common,
                        MachineOperatorBuilder* machine);
  ~CommonOperatorReducer() final {}

  Reduction Reduce(Node* node) final;

 private:
  Reduction ReduceBranch(Node* node);
  Reduction ReduceMerge(Node* node);
  Reduction ReduceEffectPhi(Node* node);
  Reduction ReducePhi(Node* node);
  Reduction ReduceReturn(Node* node);
  Reduction ReduceSelect(Node* node);

  Reduction Change(Node* node, Operator const* op, Node* a);
  Reduction Change(Node* node, Operator const* op, Node* a, Node* b);

  Graph* graph() const { return graph_; }
  CommonOperatorBuilder* common() const { return common_; }
  MachineOperatorBuilder* machine() const { return machine_; }
  Node* dead() const { return dead_; }

  Graph* const graph_;
  CommonOperatorBuilder* const common_;
  MachineOperatorBuilder* const machine_;
  Node* const dead_;
};

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

#endif  // V8_COMPILER_COMMON_OPERATOR_REDUCER_H_


text:
[![Build status](https://ci.appveyor.com/api/projects/status/7ad3rsrupu40mx1r/branch/master?svg=true)](https://ci.appveyor.com/project/dxrobot/ajaxcontroltoolkit/branch/master)
[![Installer](https://img.shields.io/badge/get_installer-16.1-orange.svg)](https://go.devexpress.com/AjaxControlToolkit_Website_Download.aspx)

The ASP.NET AJAX Control Toolkit contains a rich set of controls that you can use to build highly responsive and interactive AJAX-enabled Web applications. AjaxControlToolkit contains more than 40 controls, including the AutoComplete, CollapsiblePanel, ColorPicker, MaskedEdit, Calendar, Accordion, and Watermark controls. Using AjaxControlToolkit, you can build AJAX-enabled ASP.NET Web Forms applications by dragging-and-dropping Toolkit controls from the Visual Studio Toolbox onto a Web Forms page.

**v16.1 is now available**! [Get the new installer from DevExpress.com](https://go.devexpress.com/AjaxControlToolkit_GitHub_DevExpressPage.aspx).

![logo](https://github.com/DevExpress/AjaxControlToolkit/raw/wiki-static-resources/readme-banner.png)

If you've used the toolkit in the past, you also know that for quite some time, the project was poorly supported, with an ever growing list of critical issues. Seeing the demand for such a library and considering its current state, we approached Microsoft and suggested that we help bring the Toolkit back into a dependable and usable state. Needless to say, Microsoft agreed. The good news is that since we took on this responsibility, we've managed to clean up the codebase, introduced improved Visual Studio support, and fixed nearly 900 bugs.

[Download](https://go.devexpress.com/AjaxControlToolkit_GitHub_DevExpressPage.aspx) the DevExpress Edition of the AJAX Control Toolkit today, evaluate it in your project and let us know what you think.

Watch the **Getting Started** video:

[![video](https://github.com/DevExpress/AjaxControlToolkit/raw/wiki-static-resources/youtube-getting-started.png)](https://youtu.be/24hIhS2itUU)

You can also watch this **Channel 9** Video: [DevExpress maintains AjaxControlToolkit for ASP.NET WebForms Developers](http://channel9.msdn.com/Shows/Web+Camps+TV/DevExpress-maintains-AjaxControlToolkit-for-ASPNET-WebForms-Developers)

Check out these helpful articles:

1. [Step-by-Step Installation Guide](https://github.com/DevExpress/AjaxControlToolkit/wiki/Step-by-Step-Installation-Guide)

2. [Upgrading from v7.x and below](https://github.com/DevExpress/AjaxControlToolkit/wiki/Upgrading-from-v7.x-and-below)

3. [How to use bundling and CDN](https://github.com/DevExpress/AjaxControlToolkit/wiki/How-to-use-bundling-and-CDN)

4. [Online demos](http://ajaxcontroltoolkit.devexpress.com/)


text:
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

using IdentityServer4.Models;

namespace IdentityServer4.Validation
{
    /// <summary>
    /// Class describing the resource owner password validation request
    /// </summary>
    public class ResourceOwnerPasswordValidationContext
    {
        public string UserName { get; set; }
        public string Password { get; set; }
        public ValidatedTokenRequest Request { get; set; }

        public GrantValidationResult Result { get; set; } = new GrantValidationResult(TokenRequestErrors.InvalidGrant);
    }
}


text:
#include "themeStruct.h"

#include <QDir>

void ThemeStruct::loadThemeFile(QString filePath){
  qDebug() << "Loading PCDM Theme File:" << filePath;
  //Create the required Items:
  itemNames.clear();
  itemNames << "background" << "header" << "user" << "password" << "login"  << "anonlogin" << "desktop" << "system" << "locale" << "keyboard" << "vkeyboard" << "toolbar" << "nextde" << "previousde";
  items.clear();
  for(int i=0; i<itemNames.length(); i++){
    ThemeItem it;
    items << it;
  }
  //Get the directory the current theme file is in
  int li = filePath.lastIndexOf("/");
  QString currDir = filePath;
  if(li > 0){ currDir.truncate(li); }
  else{ currDir.clear(); }
  if(!currDir.endsWith("/")){ currDir.append("/"); }
  //Now initialize variables for the file search
  QString iconFileDir;
  int numspacers = 0;

  QFile file(filePath);
  if( !file.open(QIODevice::ReadOnly | QIODevice::Text)){ return; }
  QTextStream in(&file);
  while( !in.atEnd() ){
    QString line = in.readLine().simplified();
    if( line.isEmpty() || line.startsWith("#") ){}//ignore empty and comment lines
    else if(line.startsWith("APP_STYLESHEET_START")){
      //save all the following lines as the stylesheet
      QStringList styleLines;
      while( !line.startsWith("APP_STYLESHEET_STOP") && !in.atEnd() ){
        line = in.readLine().simplified();
	styleLines << line;
      }
      //Now compress into a single string and save it
      applicationStyleSheet = styleLines.join(" ");
    }else{
      //Read off individual values for each item

      //Remove comments at the end of lines
      line = line.section("#",0,0).simplified();
      //Get the important bits from the line
      QString prop = line.section("=",0,0).simplified(); //property
      QString val = line.section("=",1,1).simplified();  //value
      QString itemName = prop.section("_",0,0).toLower(); //item name
      QString itemCat = prop.section("_",1,3).simplified();  //item category for value
      int index = itemNames.indexOf( itemName ); //index for this item
      //qDebug() << "File Item:" << prop << val << itemName << itemCat << index;
      //Now save this item as appropriate
      if(prop == "IMAGE_DIR" && !val.isEmpty()){ //default directory for icons
	if(!val.endsWith("/")){val.append("/");}
	iconFileDir = val;
        if(iconFileDir.startsWith("./")){ iconFileDir.replace(0,2,currDir); }
      }else if( prop == "ADDSPACER" ){ //create a spacer item
	itemNames << "spacer"+QString::number(numspacers);
	numspacers++;
	ThemeItem it;
	items << it;
	index = items.length() -1; //last item in the list
	//read whether it is vertical
	items[index].isVertical = (val.section("::",0,0).toLower() == "vertical");
	//Now get the location
	val = val.section("::",1,1).remove("[").remove("]").simplified();
	//qDebug() << "ADDSPACER:" << line << val;
	items[index].x1 = val.section(",",0,0).section("-",0,0).toInt();
	items[index].x2 = -1;
	items[index].y1 = val.section(",",1,1).section("-",0,0).toInt();
	items[index].y2 = -1;
      }else if( (index != -1) && !val.isEmpty() ){
	//Save the value to the structure based upon the type of value it is
	if(itemCat == "IMAGE"){
	    if(val.startsWith("/")){ items[index].icon = val; }
	    else{ items[index].icon = iconFileDir + val; }

	}else if(itemCat == "IMAGE_SIZE"){
	    items[index].iconSize = QSize( val.section("x",0,0).toInt(), val.section("x",1,1).toInt() );

	}else if(prop == "TOOLBAR_LOCATION"){
	    //special instructions for this item location
	    items[index].value = val; //should be [bottom | top | left | right]
	}else if(prop == "TOOLBAR_STYLE"){
	    //special instructions for this item
	    items[index].icon = val; //should be [icononly | textonly | textbesideicon | textundericon ]
	}else if(itemCat == "LOCATION"){
	   val =  val.remove("[").remove("]").simplified(); //remove the brackets
	    QString x = val.section(",",0,0);
	    QString y = val.section(",",1,1);
	    if(x.indexOf("-") == -1){ items[index].x1 = x.toInt(); items[index].x2 = -1;}
	    else{ items[index].x1 = x.section("-",0,0).toInt(); items[index].x2 = x.section("-",1,1).toInt(); }
	    if(y.indexOf("-") == -1){ items[index].y1 = y.toInt(); items[index].y2 = -1;}
	    else{ items[index].y1 = y.section("-",0,0).toInt(); items[index].y2 = y.section("-",1,1).toInt(); }
	}else if(itemCat == "ORIENTATION"){
	    items[index].isVertical = (val.toLower() == "vertical");
	    if(val.toLower()=="simple"){ items[index].value = "simple"; }
	}else if(itemCat == "DISABLE"){
	    items[index].enabled = (val.toLower() != "true");
	}
      }
    } // end if line is not a comment or empty
  } // end reading lines from file
  file.close();
}

ThemeItem ThemeStruct::exportItem(QString item){
  int index = itemNames.indexOf(item);
  ThemeItem TI;
  if( index == -1 ){
    qDebug() << "ThemeStruct: Invalid export item:"<<item;
  }else{
    //Now format the output
    TI = items[index];
  }
  return TI;
}

void ThemeStruct::importItem(QString item, ThemeItem TI){
  int index = itemNames.indexOf(item);
  if( index == -1 ){
    qDebug() << "ThemeStruct: Invalid import item:"<<item;
  }else{
    items[index] = TI;
  }
}

bool ThemeStruct::validItem(QString item){
  int index = itemNames.indexOf(item);
  bool ret = false;
  if( index == -1 ){
    qDebug() << "ThemeStruct: Invalid item:"<<item;
  }else{
    bool chk = items[index].enabled && items[index].value.isEmpty() && items[index].icon.isEmpty() && ( (items[index].x1==-1) || (items[index].y1==-1) );
    ret = !chk; //true if the checks do not catch an empty item
  }
  return ret;
}

QStringList ThemeStruct::invalidItems(){
  //Scan all the current Items and make a list of all the invalid ones
   // This makes it easy to auto-populate these invalid items with defaults
  QStringList inv;
  for(int i=0; i<itemNames.length(); i++){
    if( !validItem(itemNames[i]) ){ inv << itemNames[i]; }
  }
  return inv;
}

bool ThemeStruct::itemIsEnabled(QString item){
  int index = itemNames.indexOf(item);
  bool ret = false;
  if( index == -1 ){
    qDebug() << "ThemeStruct: Invalid item:"<<item;
  }else{
    ret = items[index].enabled;
  }
  return ret;
}

bool ThemeStruct::itemIsVertical(QString item){
  int index = itemNames.indexOf(item);
  bool ret = false;
  if( index == -1 ){
    qDebug() << "ThemeStruct: Invalid item:"<<item;
  }else{
    ret = items[index].isVertical;
  }
  return ret;
}

QString ThemeStruct::itemValue(QString item){
  int index = itemNames.indexOf(item);
  QString ret;
  if( index == -1 ){
    qDebug() << "ThemeStruct: Invalid item:"<<item;
    ret = "";
  }else{
    ret = items[index].value;
  }
  return ret;
}

QString ThemeStruct::itemIcon(QString item){
  int index = itemNames.indexOf(item);
  QString ret;
  if( index == -1 ){
    qDebug() << "ThemeStruct: Invalid item:"<<item;
    ret = "";
  }else{
    ret = items[index].icon;
  }
  //qDebug() << "Theme:" << item << "Icon:" << ret;
  if(!ret.isEmpty() && !QFile::exists(ret)){
    //Try to turn this into a valid icon path
    QDir dir("/usr/local/share/pixmaps");
    QStringList found = dir.entryList(QStringList() << ret+".*", QDir::Files, QDir::NoSort);
    if(found.isEmpty()){ found = dir.entryList(QStringList() << ret+"*", QDir::Files, QDir::NoSort); }
    if(found.isEmpty()){ found = dir.entryList(QStringList() << "*"+ret+"*", QDir::Files, QDir::NoSort); }
    if(!found.isEmpty()){ ret = dir.filePath(found.first()); }
  }
  return ret;
}

QSize ThemeStruct::itemIconSize(QString item){
  int index = itemNames.indexOf(item);
  QSize ret;
  if( index == -1 ){
    //qDebug() << "ThemeStruct: Invalid item:"<<item;
    //ret = QSize(32,32);
  }else{
    ret = items[index].iconSize;
  }
  //qDebug() << "Theme:" << item << "Size:" << ret;
  return ret;
}

int ThemeStruct::itemLocation(QString item, QString variable){
  int index = itemNames.indexOf(item);
  int ret = 0;
  if( index == -1 ){
    qDebug() << "ThemeStruct: Invalid item:"<<item;
    return ret;
  }else{
    variable = variable.toLower();
    if(variable == "row"){ ret = items[index].x1; }
    else if(variable == "col"){ ret = items[index].y1; }
    else if(variable == "rowspan"){
      int span = items[index].x2 - items[index].x1;
      if(span < 0){ span = 0; } //Make sure it is always positive
      ret = span +1; //add 1 for the end point
    }else if(variable == "colspan"){
      int span = items[index].y2 - items[index].y1;
      if(span < 0){ span = 0; } //Make sure it is always positive
      ret = span +1; //add 1 for the end point
    }
  }
  //qDebug() << "Theme:" << item << variable << ret;
  return ret; //catch for errors;
}

QString ThemeStruct::styleSheet(){
  return applicationStyleSheet;
}

QStringList ThemeStruct::getSpacers(){
  QStringList spc;
  QString isvert;
  for(int i=0; i<itemNames.length(); i++){
    if( itemNames[i].startsWith("spacer") ){
      if(items[i].isVertical){ isvert="true"; }
      else{ isvert="false"; }
      spc << isvert + "::" + QString::number(items[i].x1) +"::"+ QString::number(items[i].y1);
    }
  }
  //qDebug() << "Spacers:" << spc;
  return spc;
}


text:
/**
 * @fileoverview Rule to flag missing semicolons.
 * @author Nicholas C. Zakas
 */
"use strict";

//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
module.exports = function(context) {

    var OPT_OUT_PATTERN = /[\[\(\/\+\-]/;

    var always = context.options[0] !== "never";

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Checks a node to see if it's followed by a semicolon.
     * @param {ASTNode} node The node to check.
     * @returns {void}
     */
    function checkForSemicolon(node) {
        var lastToken = context.getLastToken(node),
            nextToken = context.getTokenAfter(node);

        if (always) {
            if (lastToken.type !== "Punctuator" || lastToken.value !== ";") {
                context.report(node, lastToken.loc.end, "Missing semicolon.");
            }
        } else {
            if (lastToken.type === "Punctuator" && lastToken.value === ";") {

                if (!nextToken || !(OPT_OUT_PATTERN.test(nextToken.value))) {
                    context.report(node, node.loc.end, "Extra semicolon.");
                }

            }
        }
    }

    /**
     * Checks to see if there's a semicolon after a variable declaration.
     * @param {ASTNode} node The node to check.
     * @returns {void}
     */
    function checkForSemicolonForVariableDeclaration(node) {

        var ancestors = context.getAncestors(),
            parentIndex = ancestors.length - 1,
            parent = ancestors[parentIndex];

        if ((parent.type !== "ForStatement" || parent.init !== node) &&
            (parent.type !== "ForInStatement" || parent.left !== node)
        ) {
            checkForSemicolon(node);
        }
    }

    //--------------------------------------------------------------------------
    // Public API
    //--------------------------------------------------------------------------

    return {

        "VariableDeclaration": checkForSemicolonForVariableDeclaration,
        "ExpressionStatement": checkForSemicolon,
        "ReturnStatement": checkForSemicolon,
        "DebuggerStatement": checkForSemicolon,
        "BreakStatement": checkForSemicolon,
        "ContinueStatement": checkForSemicolon,
        "EmptyStatement": function (node) {
            var nextToken;

            if (!always) {
                nextToken = context.getTokenAfter(node) || context.getLastToken(node);

                if (!(OPT_OUT_PATTERN.test(nextToken.value))) {
                    context.report(node, "Extra semicolon.");
                }
            }

        }
    };

};


text:
@implementation Key

static SKAction* grab_key_sound;

+(void)initialize {
    grab_key_sound = [SKAction playSoundFileNamed:@"grab_key.mp3" waitForCompletion:NO];
}

+(Key*)key_with_flag: (NSString*)fill_flag {
    Key* k = [[Key alloc] initWithImageNamed:@"key.png"];
    k.name = @"key";

    k.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize:k.size];
    k.physicsBody.allowsRotation = NO;
    k.physicsBody.dynamic = NO;
    if ([fill_flag isEqualToString:@"#007fff"]) {
        k.physicsBody.dynamic = YES;
    }

    k.physicsBody.categoryBitMask = key_category;
    k.physicsBody.collisionBitMask = key_category | ground_category;
    k.physicsBody.contactTestBitMask = hero_category;
    k.physicsBody.fieldBitMask = 0;
    k.xScale = k.yScale = 0.2;

    k.blendMode = SKBlendModeAdd;

    SKEmitterNode* magic_effect = [SKEmitterNode nodeWithFileNamed:@"magic_ball.sks"];
    magic_effect.zPosition = k.zPosition-1;
    [k addChild:magic_effect];

    //[k runAction:[SKAction colorizeWithColor:[SKColor randomColor] colorBlendFactor:0.8 duration:0]];
    return k;
}

static int keys_collected =  0;
static int keys_count_to_collect_ = 0;

+(BOOL)alreay_collected_some_key {
    return keys_count_to_collect_==0 || keys_collected > 0;
}

+(BOOL)has_more_key_to_collect {
    return keys_count_to_collect_ > 0;
}

+(void)reset_keys_count_collected_by_hero {
    keys_count_to_collect_ = 0;
}

+(void)set_keys_to_be_collect: (int)keys_count {
    [[GameScene sharedInstance] update_hero_bullet_count_to: [NSString stringWithFormat:@"0/%d", keys_count]];
    keys_count_to_collect_ = keys_count;
    keys_collected = 0;
}

/////////////////////////////////////////////////////////////////////////////////
- (void)contact_body:(SKPhysicsBody *)body with:(SKPhysicsContact *)contact {
    if ([body.node.name isEqualToString:@"hero"]) {
        keys_count_to_collect_--;
        keys_collected++;

        [[GameScene sharedInstance] update_hero_bullet_count_to: [NSString stringWithFormat:@"%d", keys_collected]];

        [self runAction: [SKAction sequence:@[grab_key_sound, [SKAction removeFromParent]]]];
        return;
    }

    NSLog(@"key hit %@", body.node.name);
}

-(void)end_contact:(SKPhysicsBody *)body with:(SKPhysicsContact *)contact {
}

@end


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

<title>Uses of Package org.hibernate.metamodel.source.annotations (Hibernate JavaDocs)</title>
<meta name="date" content="2014-03-03">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Package
org.hibernate.metamodel.source.annotations

Packages that use org.hibernate.metamodel.source.annotations

Package
Description

org.hibernate.metamodel.source.annotations

org.hibernate.metamodel.source.annotations.entity

org.hibernate.metamodel.source.annotations.global

org.hibernate.metamodel.source.annotations.xml.filter

Classes in org.hibernate.metamodel.source.annotations used by org.hibernate.metamodel.source.annotations

Class and Description

AnnotationBindingContext

Classes in org.hibernate.metamodel.source.annotations used by org.hibernate.metamodel.source.annotations.entity

Class and Description

AnnotationBindingContext

Classes in org.hibernate.metamodel.source.annotations used by org.hibernate.metamodel.source.annotations.global

Class and Description

AnnotationBindingContext

Classes in org.hibernate.metamodel.source.annotations used by org.hibernate.metamodel.source.annotations.xml.filter

Class and Description

JPADotNames

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2001-2014 Red Hat, Inc.  All Rights Reserved.


text:
/* line 1, I:/Open Server/domains/pltables/sass/plugins/maps.scss */
#map1, #map2, #map3, #map4 { height: 400px; }
/* line 4, I:/Open Server/domains/pltables/sass/plugins/maps.scss */
#map1 img, #map2 img, #map3 img, #map4 img { max-width: none; }

/* line 9, I:/Open Server/domains/pltables/sass/plugins/maps.scss */
.cluster { text-align: center; font-weight: bold; color: #fff; cursor: pointer; }
/* line 15, I:/Open Server/domains/pltables/sass/plugins/maps.scss */
.cluster.cluster-1 { background: url(http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m1.png); width: 53px; height: 52px; line-height: 52px; }
/* line 21, I:/Open Server/domains/pltables/sass/plugins/maps.scss */
.cluster.cluster-2 { background: url(http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m2.png); width: 56px; height: 55px; line-height: 55px; }
/* line 27, I:/Open Server/domains/pltables/sass/plugins/maps.scss */
.cluster.cluster-5 { background: url(http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m3.png); width: 66px; height: 65px; line-height: 65px; }


text:
"""Test facility for ample/util/check_models.py"""

__author__ = "Jens Thomas"

import glob
import iotbx.pdb
import os
import shutil
import tempfile
import unittest

from ample import constants
from ample.util import process_models

import logging

logging.basicConfig(level=logging.DEBUG)

class Test(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.thisd = os.path.abspath(os.path.dirname(__file__))
        cls.ample_share = constants.SHARE_DIR
        cls.testfiles_dir = os.path.join(cls.ample_share, 'testfiles')

    def test_check_models_nmr(self):
        pdbin = os.path.join(self.ample_share, 'examples', 'nmr-truncate', 'input', '2LC9.pdb')
        results = process_models.CheckModelsResult()
        results.models_dir = os.curdir
        process_models.check_models([pdbin], results)

        self.assertIsNone(results.error)
        self.assertTrue(results.ensemble)
        self.assertEquals(
            results.sequence,
            'MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNTNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRAAAINMVFQMGETGVAAFTNSLPMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL',
        )
        self.assertEqual(results.num_models, 10)
        self.assertEqual(results.num_structures, 1)
        self.assertEqual(results.single_ensemble, True)

        self.assertFalse(results.created_updated_models)
        self.assertFalse(results.homologs)
        self.assertFalse(results.merged_chains)

    def test_check_models_single_structure(self):
        pdbin = os.path.join(self.testfiles_dir, '1K33_S_00000001.pdb')
        results = process_models.CheckModelsResult()
        results.models_dir = os.curdir
        process_models.check_models([pdbin], results)

        self.assertIsNone(results.error)
        self.assertEqual(results.num_models, 1)
        self.assertEqual(results.num_structures, 1)

        self.assertFalse(results.created_updated_models)
        self.assertFalse(results.homologs)
        self.assertFalse(results.merged_chains)
        self.assertFalse(results.ensemble)

    def test_check_models_single_structure_fail(self):
        """Should fail as has a non-protein chain present"""
        pdbin = os.path.join(self.testfiles_dir, '1K33.pdb')
        results = process_models.CheckModelsResult()
        results.models_dir = os.curdir
        process_models.check_models([pdbin], results)
        self.assertIsNotNone(results.error)

    def test_check_models_single_structure_merge_chains(self):
        pdbin = os.path.join(self.testfiles_dir, '1K33_S_00000001.pdb')
        outdir = tempfile.mkdtemp(dir=os.path.abspath(os.curdir))

        # write out pdb with no chain
        h = iotbx.pdb.pdb_input(pdbin).construct_hierarchy()
        for m in h.models():
            for c in m.chains():
                c.id = ''
        pdbout = os.path.join(outdir, 'nochain_id.pdb')
        with open(pdbout, 'w') as f:
            f.write("REMARK Original file:{}\n".format(pdbin))
            f.write(h.as_pdb_string(anisou=False))
        pdbin = pdbout

        results = process_models.CheckModelsResult()
        results.models_dir = outdir
        process_models.check_models([pdbin], results)

        self.assertIsNone(results.error)
        self.assertEqual(results.num_models, 1)
        self.assertEqual(results.num_structures, 1)
        self.assertTrue(results.created_updated_models)

        self.assertFalse(results.homologs)
        self.assertFalse(results.merged_chains)
        self.assertFalse(results.ensemble)
        shutil.rmtree(outdir)

    def test_check_models_multi_abinitio(self):
        pdbdir = os.path.join(self.testfiles_dir, 'models')
        outdir = tempfile.mkdtemp(dir=os.path.abspath(os.curdir))

        results = process_models.check_models_dir(pdbdir, outdir)
        self.assertEqual(results.num_models, 30)
        self.assertEqual(results.num_structures, 30)
        self.assertEquals(results.sequence, 'QPRRKLCILHRNPGRCYDKIPAFYYNQKKKQCERFDWSGCGGNSNRFKTIEECRRTCIG')

        self.assertIsNone(results.error)
        self.assertFalse(results.created_updated_models)
        self.assertFalse(results.homologs)
        self.assertFalse(results.merged_chains)
        self.assertFalse(results.ensemble)
        os.rmdir(outdir)

    def test_check_models_multi_abinitio_missing_chainid(self):
        pdbdir = os.path.join(self.testfiles_dir, 'models')
        indir = tempfile.mkdtemp(dir=os.path.abspath(os.curdir))
        outdir = tempfile.mkdtemp(dir=os.path.abspath(os.curdir))

        # write out pdbs with no chain
        for pdbin in glob.glob(os.path.join(pdbdir, '*.pdb')):
            h = iotbx.pdb.pdb_input(pdbin).construct_hierarchy()
            for m in h.models():
                for c in m.chains():
                    c.id = ''
            name = os.path.basename(pdbin)
            pdbout = os.path.join(indir, name)
            with open(pdbout, 'w') as f:
                f.write("REMARK Original file:{}\n".format(pdbin))
                f.write(h.as_pdb_string(anisou=False))

        results = process_models.check_models_dir(indir, outdir)

        self.assertIsNone(results.error)
        self.assertEqual(results.num_models, 30)
        self.assertEqual(results.num_structures, 30)
        self.assertTrue(results.created_updated_models)

        self.assertFalse(results.homologs)
        self.assertFalse(results.merged_chains)
        self.assertFalse(results.ensemble)
        shutil.rmtree(indir)
        shutil.rmtree(outdir)

    def test_check_models_multi_merge_chains(self):
        pdbname = '6gvl'
        pdbroot = os.path.join(self.testfiles_dir, pdbname + '.pdb')
        indir = tempfile.mkdtemp(dir=os.path.abspath(os.curdir))
        outdir = tempfile.mkdtemp(dir=os.path.abspath(os.curdir))

        for i in range(3):
            name = "{}_{}.pdb".format(pdbname, i)
            pdb = os.path.join(indir, name)
            shutil.copy(pdbroot, pdb)

        results = process_models.check_models_dir(indir, outdir)

        self.assertIsNone(results.error)
        self.assertTrue(results.created_updated_models)
        self.assertTrue(results.merged_chains)
        self.assertEqual(results.num_models, 3)
        self.assertEqual(results.num_structures, 3)

        self.assertFalse(results.homologs)
        self.assertFalse(results.ensemble)
        shutil.rmtree(indir)
        shutil.rmtree(outdir)

    def test_check_models_homologs(self):
        pdbdir = os.path.join(self.ample_share, 'examples', 'homologs', 'input')
        outdir = os.curdir

        results = process_models.check_models_dir(pdbdir, outdir)

        self.assertIsNone(results.error)
        self.assertTrue(results.homologs)
        self.assertEqual(results.num_models, 3)
        self.assertEqual(results.num_structures, 3)

        self.assertFalse(results.created_updated_models)
        self.assertFalse(results.merged_chains)
        self.assertFalse(results.ensemble)

    def test_extract_and_validate_models(self):
        mdir = os.path.join(self.testfiles_dir, 'models')
        amoptd = {'models': mdir, 'models_dir': mdir}
        #         sequence = 'QPRRKLCILHRNPGRCYDKIPAFYYNQKKKQCERFDWSGCGGNSNRFKTIEECRRTCIG'
        process_models.extract_and_validate_models(amoptd)
        self.assertEqual(len(amoptd['processed_models']), 30)
        self.assertEqual(amoptd['models_dir'], mdir)

    def test_extract_and_validate_models_quark(self):
        temp_dir = tempfile.mkdtemp(dir=os.getcwd())
        amoptd = {'models': os.path.join(self.testfiles_dir, 'result.tar.bz2'), 'models_dir': temp_dir, 'work_dir': '.'}
        #         sequence = 'QPRRKLCILHRNPGRCYDKIPAFYYNQKKKQCERFDWSGCGGNSNRFKTIEECRRTCIG'
        process_models.extract_and_validate_models(amoptd)
        self.assertTrue(amoptd['quark_models'])
        self.assertEqual(len(amoptd['processed_models']), 200)
        shutil.rmtree(temp_dir)

    def test_extract_and_validate_models_quark_zip(self):
        temp_dir = tempfile.mkdtemp(dir=os.getcwd())
        amoptd = {'models': os.path.join(self.testfiles_dir, 'result.zip'), 'models_dir': temp_dir, 'work_dir': '.'}
        #         sequence = 'QPRRKLCILHRNPGRCYDKIPAFYYNQKKKQCERFDWSGCGGNSNRFKTIEECRRTCIG'
        process_models.extract_and_validate_models(amoptd)
        self.assertTrue(amoptd['quark_models'])
        self.assertEqual(len(amoptd['processed_models']), 200)
        shutil.rmtree(temp_dir)

    def test_extract_and_validate_models_quark_file(self):
        temp_dir = tempfile.mkdtemp(dir=os.getcwd())
        amoptd = {'models': os.path.join(self.testfiles_dir, 'alldecoy.pdb'), 'models_dir': temp_dir, 'work_dir': '.'}
        #         sequence = 'QPRRKLCILHRNPGRCYDKIPAFYYNQKKKQCERFDWSGCGGNSNRFKTIEECRRTCIG'
        process_models.extract_and_validate_models(amoptd)
        self.assertTrue(amoptd['quark_models'])
        self.assertEqual(len(amoptd['processed_models']), 10)
        shutil.rmtree(temp_dir)

    def test_extract_and_validate_models_quark_old(self):
        temp_dir = tempfile.mkdtemp(dir=os.getcwd())
        amoptd = {'models': os.path.join(self.testfiles_dir, 'decoys.tar.gz'), 'models_dir': temp_dir, 'work_dir': '.'}
        #         sequence = 'QPRRKLCILHRNPGRCYDKIPAFYYNQKKKQCERFDWSGCGGNSNRFKTIEECRRTCIG'
        process_models.extract_and_validate_models(amoptd)
        self.assertTrue(amoptd['quark_models'])
        self.assertEqual(len(amoptd['processed_models']), 200)
        shutil.rmtree(temp_dir)

if __name__ == "__main__":
    unittest.main(verbosity=2)


text:
angular.module('paperworkNotes').controller('FileUploadController',
  function($scope, $rootScope, $location, $routeParams, FileUploader, NotesService, StatusNotifications) {
    var uploader = $scope.uploader = new FileUploader({
      url: $rootScope.uploadUrl
    });
    var maximumAttachmentsPerNote = 10;

    $scope.$watch('maximumAttachmentsPerNote', function(value) {
        maximumAttachmentsPerNote = value;
    });

    uploader.filters.push({
      name: 'customFilter',
      fn:   function(item /*{File|FileLikeObject}*/, options) {
        return this.queue.length < maximumAttachmentsPerNote;
      }
    });

    uploader.onWhenAddingFileFailed = function(item /*{File|FileLikeObject}*/, filter, options) {
      // console.info('onWhenAddingFileFailed', item, filter, options);
    };
    uploader.onAfterAddingFile = function(fileItem) {
      // console.info('onAfterAddingFile', fileItem);
    };
    uploader.onAfterAddingAll = function(addedFileItems) {
      // console.info('onAfterAddingAll', addedFileItems);
    };
    uploader.onBeforeUploadItem = function(item) {
      // console.info('onBeforeUploadItem', item);
    };
    uploader.onProgressItem = function(fileItem, progress) {
      // console.info('onProgressItem', fileItem, progress);
    };
    uploader.onProgressAll = function(progress) {
      // console.info('onProgressAll', progress);
    };
    uploader.onSuccessItem = function(fileItem, response, status, headers) {
      // console.info('onSuccessItem', fileItem, response, status, headers);
    };
    uploader.onErrorItem = function(fileItem, response, status, headers) {
      // console.info('onErrorItem', fileItem, response, status, headers);
      StatusNotifications.sendStatusFeedback("error", "upload_failed");
    };
    uploader.onCancelItem = function(fileItem, response, status, headers) {
      // console.info('onCancelItem', fileItem, response, status, headers);
    };
    uploader.onCompleteItem = function(fileItem, response, status, headers) {
      // console.info('onCompleteItem', fileItem, response, status, headers);
    };
    uploader.onCompleteAll = function() {
      // console.info('onCompleteAll');
      NotesService.getNoteVersionAttachments($rootScope.getNotebookSelectedId(), ($rootScope.getNoteSelectedId(true)).noteId,
        $rootScope.getVersionSelectedId(true).versionId, function(response) {
          $rootScope.fileList = response;
          uploader.clearQueue();
        });
      StatusNotifications.sendStatusFeedback("success", "upload_finished_successfully");
    };

    $('#file-upload-dropzone').click(function() {
      $('#file-upload-input').click();
    });

    $scope.fileUploadDeleteFile = function(notebookId, noteId, versionId, attachmentId, isSure) {
      if(isSure != true) {
        $rootScope.messageBox({
          'title':   $rootScope.i18n.keywords.delete_attachment_question,
          'content': $rootScope.i18n.keywords.delete_attachment_message,
          'buttons': [
            {
              // We don't need an id for the dismiss button.
              // 'id': 'button-no',
              'label':     $rootScope.i18n.keywords.cancel,
              'isDismiss': true
            },
            {
              'id':    'button-yes',
              'label': $rootScope.i18n.keywords.yes,
              'class': 'btn-warning',
              'click': function() {
                return $scope.fileUploadDeleteFile(notebookId, noteId, versionId, attachmentId, true);
              }
            }
          ]
        });
      } else {
        NotesService.deleteNoteVersionAttachment(notebookId, noteId, versionId, attachmentId, function(response) {
          var fileUrl = '/api/v1/notebooks/' + notebookId + '/notes/' + noteId + '/versions/' + versionId + '/attachments/' + attachmentId + '/raw';
          var i, l = $rootScope.fileList.length;
          for(i = 0; i < l; i++) {
            if(typeof $rootScope.fileList[i] != "undefined" && typeof $rootScope.fileList[i].id != "undefined" && $rootScope.fileList[i].id == attachmentId) {
              $rootScope.fileList.splice(i, 1);
            }
          }

          $rootScope.$broadcast('deleteAttachmentLink', {'url': fileUrl});
          StatusNotifications.sendStatusFeedback("success", "file_deleted_successfully");
        });
      }
      return true;
      // console.log("notebookId " + notebookId + ' noteId ' + noteId + ' versionId ' + versionId + ' attachmentId ' + attachmentId);
    };

    $scope.fileUploadInsertFile = function(notebookId, noteId, versionId, attachmentId, attachment) {
      var fileUrl = '/api/v1/notebooks/' + notebookId + '/notes/' + noteId + '/versions/' + versionId + '/attachments/' + attachmentId + '/raw';
      $rootScope.$broadcast('insertAttachmentLink', {'url': fileUrl, 'filename': attachment.filename, 'mimetype': attachment.mimetype});
    };

    $scope.getFaClassFromMimetype = function(mimetype) {
      var mimematch = /(.+)\/(.+)/g.exec(mimetype);
      switch(mimematch[1]) {
        case 'image':
          return 'fa-file-image-o';
        case 'video':
          return 'fa-file-movie-o';
        case 'audio':
          return 'fa-file-audio-o';
        case 'application':
          switch(mimematch[2]) {
            case 'pdf':
              return 'fa-file-pdf-o';
            case 'zip':
              return 'fa-file-archive-o';
            default:
              return 'fa-file-o';
          }
          break;
        default:
          return 'fa-file-o';
      }
    };
  });


text:
package sample;

import java.util.ArrayDeque;
import java.util.Deque;

public class Sample3 {

    private String sample;

    public Sample3(String sample) {
        this.sample = sample;
    }

    public static void main(String[] args) {
        final Deque res = new ArrayDeque();
        System.out.println(res);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >

	<SwitchPreference
        android:key="enable"
        android:title="@string/log_streams_settings_enable_rover_title" />

    <ru0xdc.rtkgps.settings.widget.StreamTypePreference
        android:key="type"
        android:title="@string/streams_settings_type_title"
        android:dependency="enable" />

	<Preference
        android:key="stream_settings_button"
        android:dependency="enable"
        android:title="@string/streams_settings_button_title"
        android:persistent="false" />

</PreferenceScreen>


text: Install neutron service from git.


text:
package com.zimbra.qa.selenium.projects.desktop.tests.addressbook.contacts;

import java.util.List;

import org.testng.annotations.Test;

import com.zimbra.qa.selenium.framework.items.*;
import com.zimbra.qa.selenium.framework.ui.*;
import com.zimbra.qa.selenium.framework.util.*;
import com.zimbra.qa.selenium.framework.util.ZimbraAccount.SOAP_DESTINATION_HOST_TYPE;
import com.zimbra.qa.selenium.projects.desktop.core.AjaxCommonTest;
import com.zimbra.qa.selenium.projects.desktop.ui.Toaster;
import com.zimbra.qa.selenium.projects.desktop.ui.addressbook.FormContactNew;

public class EditContact extends AjaxCommonTest  {
	public EditContact() {
		logger.info("New "+ EditContact.class.getCanonicalName());

		// All tests start at the Address page
		super.startingPage =  app.zPageAddressbook;

		// Make sure we are using an account with conversation view
		super.startingAccountPreferences = null;

	}

	private ContactItem _createSelectContactItem() throws HarnessException {
	   return _createSelectContactItem(SOAP_DESTINATION_HOST_TYPE.SERVER, null);
	}

	private ContactItem _createSelectContactItem(SOAP_DESTINATION_HOST_TYPE destType,
         String accountName) throws HarnessException {
      // Create a contact
      ContactItem contactItem = ContactItem.createContactItem(app.zGetActiveAccount());

      app.zGetActiveAccount().soapSend(
            "<CreateContactRequest xmlns='urn:zimbraMail'>" +
            "<cn fileAsStr='" + contactItem.lastName + "," + contactItem.firstName + "' >" +
            "" + contactItem.firstName +"" +
            "" + contactItem.lastName +"" +
            "" + contactItem.email + "" +
            "</cn>" +
            "</CreateContactRequest>",
            destType,
            accountName);

      app.zGetActiveAccount().soapSelectNode("//mail:CreateContactResponse", 1);

      // Refresh the view, to pick up the new contact
      FolderItem contactFolder = FolderItem.importFromSOAP(
            app.zGetActiveAccount(),
            "Contacts",
            destType,
            accountName);
      GeneralUtility.syncDesktopToZcsWithSoap(app.zGetActiveAccount());
      app.zPageAddressbook.zWaitForDesktopLoadingSpinner(5000);
      app.zTreeContacts.zTreeItem(Action.A_LEFTCLICK, contactFolder);

      // Select the contact
      app.zPageAddressbook.zListItem(Action.A_LEFTCLICK, contactItem.fileAs);

      return contactItem;
   }

	private void _editAndVerify(FormContactNew formContactNew, ContactItem contactItem, ContactItem newContact)
	throws HarnessException {
	   _editAndVerify(formContactNew, contactItem, newContact, SOAP_DESTINATION_HOST_TYPE.SERVER, null);
	}

	private void _editAndVerify(FormContactNew formContactNew, ContactItem contactItem,
         ContactItem newContact, SOAP_DESTINATION_HOST_TYPE destType, String accountName)
   throws HarnessException {
      //clear the form,
      formContactNew.zReset();

      // Fill in the form
      formContactNew.zFill(newContact);

      // Save the contact
      formContactNew.zSubmit();

      //verify toasted message Contact Saved
      Toaster toast = app.zPageMain.zGetToaster();
      String toastMsg = toast.zGetToastMessage();
      ZAssert.assertStringContains(toastMsg, "Contact Saved", "Verify toast message 'Contact Saved'");

      //verify new contact item is displayed
      List<ContactItem> contacts = app.zPageAddressbook.zListGetContacts();

      boolean isFileAsEqual=false;
      for (ContactItem ci : contacts) {
         logger.debug("===>" + ci.fileAs);
         if (ci.fileAs.equals(newContact.fileAs)) {
            isFileAsEqual = true;
            break;
         }
      }

      ZAssert.assertTrue(isFileAsEqual, "Verify contact fileAs (" + contactItem.fileAs + ") existed ");

      //verify old contact not displayed
      isFileAsEqual=false;
      for (ContactItem ci : contacts) {
         if (ci.fileAs.equals(contactItem.fileAs)) {
            isFileAsEqual = true;
            break;
         }
      }

      ZAssert.assertFalse(isFileAsEqual, "Verify contact fileAs (" + contactItem.fileAs + ") deleted");

      if (destType == SOAP_DESTINATION_HOST_TYPE.SERVER) {
         GeneralUtility.syncDesktopToZcsWithSoap(app.zGetActiveAccount());
      }

      ContactItem newImportedContact = ContactItem.importFromSOAP(
            app.zGetActiveAccount(),
            newContact.fileAs,
            destType,
            accountName);
      ZAssert.assertEquals(newImportedContact.fileAs, newContact.fileAs,
            "New imported contact has the correct file as information");
      ZAssert.assertEquals(newImportedContact.email, newContact.email,
            "New imported contact has the correct email information");

   }

   @Test(   description = "Edit a contact item, click Edit on toolbar",
   groups = { "smoke"})
   public void ClickToolbarEdit() throws HarnessException {
      ContactItem contactItem = _createSelectContactItem();

      //Click Edit contact
      FormContactNew formContactNew = (FormContactNew) app.zPageAddressbook.zToolbarPressButton(Button.B_EDIT);

      //generate the new contact
      ContactItem newContact = ContactItem.createContactItem(app.zGetActiveAccount());

      _editAndVerify(formContactNew, contactItem, newContact);
   }

   @Test(   description = "Edit a contact item, Right click then click Edit",
   groups = { "functional" })
   public void ClickContextMenuEdit() throws HarnessException {
      ContactItem contactItem = _createSelectContactItem();

      //Click Edit contact
      FormContactNew formContactNew = (FormContactNew) app.zPageAddressbook.zListItem(Action.A_RIGHTCLICK, Button.B_EDIT, contactItem.fileAs);

      //generate the new contact
      ContactItem newContact = ContactItem.createContactItem(app.zGetActiveAccount());

      _editAndVerify(formContactNew, contactItem, newContact);

   }

   @Test(   description = "Edit a local contact item, click Edit on toolbar",
   groups = { "smoke"})
   public void ClickToolbarEditLocalContact() throws HarnessException {
      ContactItem contactItem = _createSelectContactItem(SOAP_DESTINATION_HOST_TYPE.CLIENT,
            ZimbraAccount.clientAccountName);

      //Click Edit contact
      FormContactNew formContactNew = (FormContactNew) app.zPageAddressbook.zToolbarPressButton(Button.B_EDIT);

      //generate the new contact
      ContactItem newContact = ContactItem.createContactItem(app.zGetActiveAccount());

      _editAndVerify(formContactNew, contactItem, newContact, SOAP_DESTINATION_HOST_TYPE.CLIENT, ZimbraAccount.clientAccountName);
   }

   @Test(   description = "Edit a local contact item, Right click then click Edit",
   groups = { "functional" })
   public void ClickContextMenuEditLocalContact() throws HarnessException {
      ContactItem contactItem = _createSelectContactItem(SOAP_DESTINATION_HOST_TYPE.CLIENT,
            ZimbraAccount.clientAccountName);

      //Click Edit contact
      FormContactNew formContactNew = (FormContactNew) app.zPageAddressbook.zListItem(Action.A_RIGHTCLICK, Button.B_EDIT, contactItem.fileAs);

      //generate the new contact
      ContactItem newContact = ContactItem.createContactItem(app.zGetActiveAccount());

      _editAndVerify(formContactNew, contactItem, newContact, SOAP_DESTINATION_HOST_TYPE.CLIENT, ZimbraAccount.clientAccountName);

   }
}


text:
<?php

require_once(dirname(__FILE__).'/../DataAbstraction/ShowtimeDB.php');

class RoleDAL {

    public static function create($role){
        $db=ShowtimeDB::getInstance();
        $query="INSERT INTO role(name) VALUES(:name)";

        $res=$db->query($query, array(':name'=>$role->name));
        if($res){
            $role->id=$db->lastInsertId();
        }
        return($res);
    }

    public static function update($role){
        $db=ShowtimeDB::getInstance();
        $query="UPDATE role SET name=:name WHERE id_role=:id_role";

        $res=$db->query($query, array(':name'=>$role->name, ':id_role'=>$role->id));

        return($res);
    }

    public static function delete($role){
        $db=ShowtimeDB::getInstance();
        $query="DELETE FROM role WHERE id_role=:id";
        $res=$db->query($query, array(':id'=>$role->id));

        return($res);
    }

    public static function getById($role){
        $db = ShowtimeDB::getInstance();
        $query = "SELECT * FROM role WHERE id_role=:id";
        $res=$db->query($query, array(':id' => $role->id));
        $res->setFetchMode(PDO::FETCH_CLASS, "Role");

        $row=$res->fetch();
        if($row){
            $role->copy($row);
        }
        $res->closeCursor();
        return($row);
    }

    public static function getByName($role){
        $db = ShowtimeDB::getInstance();
        $query = "SELECT * FROM role WHERE name=:name";
        $res=$db->query($query, array(':name' => $role->name));
        $res->setFetchMode(PDO::FETCH_CLASS, "Role");

        $row=$res->fetch();
        if($row){
            $role->copy($row);
        }
        $res->closeCursor();
        return($row);
    }
}


text:
'use strict';
angular.module('vfBlog.pages.about', []);


text:
:mod:`uctypes` -- access binary data in a structured way
========================================================

.. module:: uctypes
   :synopsis: access binary data in a structured way

This module implements "foreign data interface" for MicroPython. The idea
behind it is similar to CPython's ``ctypes`` modules, but the actual API is
different, streamlined and optimized for small size. The basic idea of the
module is to define data structure layout with about the same power as the
C language allows, and the access it using familiar dot-syntax to reference
sub-fields.

.. seealso::

    Module :mod:`ustruct`
        Standard Python way to access binary data structures (doesn't scale
        well to large and complex structures).

Defining structure layout
-------------------------

Structure layout is defined by a "descriptor" - a Python dictionary which
encodes field names as keys and other properties required to access them as
associated values. Currently, uctypes requires explicit specification of
offsets for each field. Offset are given in bytes from a structure start.

Following are encoding examples for various field types:

* Scalar types::

    "field_name": uctypes.UINT32 | 0

  in other words, value is scalar type identifier ORed with field offset
  (in bytes) from the start of the structure.

* Recursive structures::

    "sub": (2, {
        "b0": uctypes.UINT8 | 0,
        "b1": uctypes.UINT8 | 1,
    })

  i.e. value is a 2-tuple, first element of which is offset, and second is
  a structure descriptor dictionary (note: offsets in recursive descriptors
  are relative to a structure it defines).

* Arrays of primitive types::

      "arr": (uctypes.ARRAY | 0, uctypes.UINT8 | 2),

  i.e. value is a 2-tuple, first element of which is ARRAY flag ORed
  with offset, and second is scalar element type ORed number of elements
  in array.

* Arrays of aggregate types::

    "arr2": (uctypes.ARRAY | 0, 2, {"b": uctypes.UINT8 | 0}),

  i.e. value is a 3-tuple, first element of which is ARRAY flag ORed
  with offset, second is a number of elements in array, and third is
  descriptor of element type.

* Pointer to a primitive type::

    "ptr": (uctypes.PTR | 0, uctypes.UINT8),

  i.e. value is a 2-tuple, first element of which is PTR flag ORed
  with offset, and second is scalar element type.

* Pointer to an aggregate type::

    "ptr2": (uctypes.PTR | 0, {"b": uctypes.UINT8 | 0}),

  i.e. value is a 2-tuple, first element of which is PTR flag ORed
  with offset, second is descriptor of type pointed to.

* Bitfields::

    "bitf0": uctypes.BFUINT16 | 0 | 0 << uctypes.BF_POS | 8 << uctypes.BF_LEN,

  i.e. value is type of scalar value containing given bitfield (typenames are
  similar to scalar types, but prefixes with "BF"), ORed with offset for
  scalar value containing the bitfield, and further ORed with values for
  bit offset and bit length of the bitfield within scalar value, shifted by
  BF_POS and BF_LEN positions, respectively. Bitfield position is counted
  from the least significant bit, and is the number of right-most bit of a
  field (in other words, it's a number of bits a scalar needs to be shifted
  right to extra the bitfield).

  In the example above, first UINT16 value will be extracted at offset 0
  (this detail may be important when accessing hardware registers, where
  particular access size and alignment are required), and then bitfield
  whose rightmost bit is least-significant bit of this UINT16, and length
  is 8 bits, will be extracted - effectively, this will access
  least-significant byte of UINT16.

  Note that bitfield operations are independent of target byte endianness,
  in particular, example above will access least-significant byte of UINT16
  in both little- and big-endian structures. But it depends on the least
  significant bit being numbered 0. Some targets may use different
  numbering in their native ABI, but ``uctypes`` always uses normalized
  numbering described above.

Module contents
---------------

.. class:: struct(addr, descriptor, layout_type=NATIVE)

   Instantiate a "foreign data structure" object based on structure address in
   memory, descriptor (encoded as a dictionary), and layout type (see below).

.. data:: LITTLE_ENDIAN

   Layout type for a little-endian packed structure. (Packed means that every
   field occupies exactly as many bytes as defined in the descriptor, i.e.
   the alignment is 1).

.. data:: BIG_ENDIAN

   Layour type for a big-endian packed structure.

.. data:: NATIVE

   Layout type for a native structure - with data endianness and alignment
   conforming to the ABI of the system on which MicroPython runs.

.. function:: sizeof(struct)

   Return size of data structure in bytes. Argument can be either structure
   class or specific instantiated structure object (or its aggregate field).

.. function:: addressof(obj)

   Return address of an object. Argument should be bytes, bytearray or
   other object supporting buffer protocol (and address of this buffer
   is what actually returned).

.. function:: bytes_at(addr, size)

   Capture memory at the given address and size as bytes object. As bytes
   object is immutable, memory is actually duplicated and copied into
   bytes object, so if memory contents change later, created object
   retains original value.

.. function:: bytearray_at(addr, size)

   Capture memory at the given address and size as bytearray object.
   Unlike bytes_at() function above, memory is captured by reference,
   so it can be both written too, and you will access current value
   at the given memory address.

Structure descriptors and instantiating structure objects
---------------------------------------------------------

Given a structure descriptor dictionary and its layout type, you can
instantiate a specific structure instance at a given memory address
using :class:`uctypes.struct()` constructor. Memory address usually comes from
following sources:

* Predefined address, when accessing hardware registers on a baremetal
  system. Lookup these addresses in datasheet for a particular MCU/SoC.
* As a return value from a call to some FFI (Foreign Function Interface)
  function.
* From uctypes.addressof(), when you want to pass arguments to an FFI
  function, or alternatively, to access some data for I/O (for example,
  data read from a file or network socket).

Structure objects
-----------------

Structure objects allow accessing individual fields using standard dot
notation: ``my_struct.substruct1.field1``. If a field is of scalar type,
getting it will produce a primitive value (Python integer or float)
corresponding to the value contained in a field. A scalar field can also
be assigned to.

If a field is an array, its individual elements can be accessed with
the standard subscript operator ``[]`` - both read and assigned to.

If a field is a pointer, it can be dereferenced using ``[0]`` syntax
(corresponding to C ``*`` operator, though ``[0]`` works in C too).
Subscripting a pointer with other integer values but 0 are supported too,
with the same semantics as in C.

Summing up, accessing structure fields generally follows C syntax,
except for pointer derefence, when you need to use ``[0]`` operator
instead of ``*``.

Limitations
-----------

Accessing non-scalar fields leads to allocation of intermediate objects
to represent them. This means that special care should be taken to
layout a structure which needs to be accessed when memory allocation
is disabled (e.g. from an interrupt). The recommendations are:

* Avoid nested structures. For example, instead of
  ``mcu_registers.peripheral_a.register1``, define separate layout
  descriptors for each peripheral, to be accessed as
  ``peripheral_a.register1``.
* Avoid other non-scalar data, like array. For example, instead of
  ``peripheral_a.register[0]`` use ``peripheral_a.register0``.

Note that these recommendations will lead to decreased readability
and conciseness of layouts, so they should be used only if the need
to access structure fields without allocation is anticipated (it's
even possible to define 2 parallel layouts - one for normal usage,
and a restricted one to use when memory allocation is prohibited).


text:
    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
    <title>ConcurrentMergeScheduler.MergeThread Properties</title>
    <xml>
    </xml>
    <link rel="stylesheet" type="text/css" href="MSDN.css" />

            Apache Lucene.Net 2.4.0 Class Library API

ConcurrentMergeScheduler.MergeThread Properties

The properties of the ConcurrentMergeScheduler.MergeThread class are listed below. For a complete list of ConcurrentMergeScheduler.MergeThread class members, see the ConcurrentMergeScheduler.MergeThread Members topic.

Public Instance Properties

Enclosing_Instance

Instance (inherited from ThreadClass)	 Gets the current thread instance

IsAlive (inherited from ThreadClass)	 Gets a value indicating the execution status of the current thread

IsBackground (inherited from ThreadClass)	 Gets or sets a value indicating whether or not a thread is a background thread.

Name (inherited from ThreadClass)	 Gets or sets the name of the thread

Priority (inherited from ThreadClass)	 Gets or sets a value indicating the scheduling priority of a thread

See Also

        ConcurrentMergeScheduler.MergeThread Class | Lucene.Net.Index Namespace

      <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;">
        <param name="Keyword" value="ConcurrentMergeScheduler.MergeThread class, properties">
        </param>
      </object>

Generated from assembly Lucene.Net [2.4.0.2]


text:
package io.tsachev.mirrors.reflection.type;

import java.lang.annotation.Annotation;
import java.lang.reflect.Array;
import java.util.Collections;
import java.util.List;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.type.NoType;
import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeVisitor;

/**
 * @author Vladimir Tsanev
 */
public class ReflectionNoType extends AbstractReflectionTypeMirror implements NoType {

  private static final ReflectionNoType noneInstance = new ReflectionNoType("none");
  private static final ReflectionNoType packageInstance = new ReflectionNoType("package");
  private static final ReflectionNoType voidInstance = new ReflectionNoType("void");

  private final String name;

  private ReflectionNoType(String name) {
    super(TypeKind.NONE);
    this.name = name;
  }

  @Override
  public <R, P> R accept(TypeVisitor<R, P> visitor, P param) {
    return visitor.visitNoType(this, param);
  }

  @Override
  public List<? extends AnnotationMirror> getAnnotationMirrors() {
    return Collections.emptyList();
  }

  @Override
  public <A extends Annotation> A getAnnotation(Class<A> annotationType) {
    return null;
  }

  @Override
  @SuppressWarnings("unchecked")
  public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) {
    return (A[]) Array.newInstance(annotationType, 0);
  }

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

  public static ReflectionNoType getNoneInstance() {
    return noneInstance;
  }

  public static ReflectionNoType getPackageInstance() {
    return packageInstance;
  }

  public static ReflectionNoType getVoidInstance() {
    return voidInstance;
  }
}


text:
namespace g{namespace Fuse{namespace Layouts{struct Column;}}}

namespace g{
namespace Fuse{
namespace Layouts{

// public sealed class Column :464
// {
uType* Column_typeof();
void Column__ctor_1_fn(Column* __this);
void Column__ctor_2_fn(Column* __this, float* width, int* metric);
void Column__get_ActualWidth_fn(Column* __this, float* __retval);
void Column__set_ActualWidth_fn(Column* __this, float* value);
void Column__CloneDef_fn(Column* __this, Column** __retval);
void Column__New1_fn(Column** __retval);
void Column__New2_fn(float* width, int* metric, Column** __retval);
void Column__Parse_fn(uString* data, Column** __retval);
void Column__Parse1_fn(uString* data, uObject* output);
void Column__Serialize_fn(Column* __this, uString** __retval);
void Column__Serialize1_fn(uObject* columns, uString** __retval);
void Column__get_Width_fn(Column* __this, float* __retval);
void Column__set_Width_fn(Column* __this, float* value);
void Column__get_WidthMetric_fn(Column* __this, int* __retval);
void Column__set_WidthMetric_fn(Column* __this, int* value);

struct Column : ::g::Fuse::Layouts::DefinitionBase
{
    float _actualWidth;
    float _width;
    int _widthMetric;

    void ctor_1();
    void ctor_2(float width, int metric);
    float ActualWidth();
    void ActualWidth(float value);
    Column* CloneDef();
    uString* Serialize();
    float Width();
    void Width(float value);
    int WidthMetric();
    void WidthMetric(int value);
    static Column* New1();
    static Column* New2(float width, int metric);
    static Column* Parse(uString* data);
    static void Parse1(uString* data, uObject* output);
    static uString* Serialize1(uObject* columns);
};
// }

}}} // ::g::Fuse::Layouts


text:
using ComsumerSite.Hubs;
using JustSaying.Messaging.MessageHandling;
using Messages.Events;
using Microsoft.AspNet.SignalR;

namespace ComsumerSite
{
    public class OrderResolutionDispatcher : IHandler<OrderAccepted>, IHandler<OrderRejected>
    {
        public bool Handle(OrderAccepted message)
        {
            var context = GlobalHost.ConnectionManager.GetHubContext<OrderResolutionHub>();
            context.Clients.All.UpdateOrderResolution("Order Acceppted.");
            return true;
        }

        public bool Handle(OrderRejected message)
        {
            var context = GlobalHost.ConnectionManager.GetHubContext<OrderResolutionHub>();
            context.Clients.All.UpdateOrderResolution("Order Rejected.");
            return true;
        }
    }
}


text:
external help file: Microsoft.Azure.Commands.RecoveryServices.Backup.dll-Help.xml
ms.assetid: BBF12B16-C5FD-4AE2-B5D7-AFDC29CEE4D3
online version:
schema: 2.0.0
---

# Unregister-AzureRmRecoveryServicesBackupManagementServer

## SYNOPSIS
Unregisters a SCDPM server or Backup server from the vault.

## SYNTAX

```
Unregister-AzureRmRecoveryServicesBackupManagementServer [-AzureRmBackupManagementServer] <BackupEngineBase>
 [<CommonParameters>]
```

## DESCRIPTION
The **Unregister-AzureRmRecoveryServicesBackupManagementServer** cmdlet unregisters a System Center Data Protection Manager (SCDPM) server or an Azure Backup server from the vault.
This cmdlet removes references to the servers that are unregistered from the vault.

Before you can unregister a container, you must delete any protected data associated with that container.

Set the vault context by using the Set-AzureRmRecoveryServicesVaultContext cmdlet before you use the current cmdlet.

## EXAMPLES

### Example 1: Unregister an SCDPM server from the vault
```
PS C:\>$BMS = Get-AzureRmRecoveryServicesBackupManagementServer -Name "dpmserver01.contoso.com"
PS C:\> Unregister-AzureRmRecoveryServicesBackupManagementServer -AzureRmBackupManagementServer $BMS
```

The first command gets the Backup management server named dpmserver01.contoso.com, and then stores it in the $BMS variable.

The second command unregisters the SCDPM server from the vault.

## PARAMETERS

### -AzureRmBackupManagementServer
Specifies an SCDPM server object to unregister.
To obtain an **BackupManagementServer** object, use the Get-AzureRmRecoveryServicesBackupManagementServer cmdlet.

```yaml
Type: BackupEngineBase
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

## NOTES

## RELATED LINKS

[Get-AzureRmRecoveryServicesBackupManagementServer](./Get-AzureRmRecoveryServicesBackupManagementServer.md)


text:
<?php
/**
 * Created by PhpStorm.
 * User: tri
 * Date: 7/14/2014
 * Time: 12:12 AM
 */

namespace Admin\Model;

use Admin\Entity\Menu;
use Velacolib\Utility\Utility;
use Zend\InputFilter\InputFilterInterface;

class menuModel extends globalModel {

    function __construct($controller)
    {
        $this->entityName = 'Admin\Entity\Menu';
        parent::__construct($controller);
    }

    public function hydrator($data = array()){
        $user = new Menu();
        $user = $this->hydrator($data,$user);
        return $user->getFullname();
    }

    public  function convertToArray($datas){
        $return = array();
        foreach($datas as $data){
            $array = $this->convertSingleToArray($data);
            $return[] = $array;
        }
        return $return;
    }

    public function  convertSingleToArray($data){
//        echo '<pre>';
//        print_r($data);
//        echo '</pre>';
        $catInfo = Utility::getCatInfo($data->getCatId());
        $array = array();
        $array['id'] = $data->getId();
        $array['name'] = $data->getName();
        $array['function'] = Utility::getMenuStoreInMenu($data->getId());
        $array['desc'] = $data->getDescription();
        $array['image'] = $data->getImage();
        $array['catId'] = $catInfo->getName();
        $array['cost'] = ($data->getCost());
        $array['taCost'] = ($data->getTakeAwayCost());
        $array['isCombo'] = Utility::getCombo(number_format($data->getIsCombo()));
        return $array;
    }

}