text:
dojo.provide("dijit._editor.plugins.TextColor");

dojo.require("dijit._editor._Plugin");
dojo.require("dijit.ColorPalette");

dojo.declare("dijit._editor.plugins.TextColor",
	dijit._editor._Plugin,
	{
		//	summary:
		//		This plugin provides dropdown color pickers for setting text color and background color
		//
		//	description:
		//		The commands provided by this plugin are:
		//		* foreColor - sets the text color
		//		* hiliteColor - sets the background color

		buttonClass: dijit.form.DropDownButton,

//TODO: set initial focus/selection state?

		constructor: function(){
			this.dropDown = new dijit.ColorPalette();
			this.connect(this.dropDown, "onChange", function(color){
				this.editor.execCommand(this.command, color);
			});
		}
	}
);

dojo.subscribe(dijit._scopeName + ".Editor.getPlugin",null,function(o){
	if(o.plugin){ return; }
	switch(o.args.name){
	case "foreColor": case "hiliteColor":
		o.plugin = new dijit._editor.plugins.TextColor({command: o.args.name});
	}
});


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>UnmarshallerProvider (Netty API Reference (3.10.1.Final))</title>
<meta name="date" content="2015-03-23">
<meta name="keywords" content="org.jboss.netty.handler.codec.marshalling.UnmarshallerProvider interface">
<meta name="keywords" content="getUnmarshaller()">
<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 Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.jboss.netty.handler.codec.marshalling

Interface UnmarshallerProvider

All Known Implementing Classes:

ContextBoundUnmarshallerProvider, DefaultUnmarshallerProvider, ThreadLocalUnmarshallerProvider

public interface UnmarshallerProvider

This provider is responsible to get an Unmarshaller for a ChannelHandlerContext

Method Summary

Methods

Modifier and Type
Method and Description

org.jboss.marshalling.Unmarshaller
getUnmarshaller(ChannelHandlerContext ctx)

Get the Unmarshaller for the given ChannelHandlerContext

Method Detail

getUnmarshaller

org.jboss.marshalling.Unmarshaller getUnmarshaller(ChannelHandlerContext ctx)
                                                   throws Exception

Get the Unmarshaller for the given ChannelHandlerContext

Throws:

Exception

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright © 2008-2015 The Netty Project. All Rights Reserved.

redpajama_set_name: RedPajamaGithub


text:
@interface VLNotification : NSObject

@property (readonly) NSString *notificationId;
@property (readonly) NSString *eventId;
@property (readonly) NSString *eventType;
@property (readonly) NSString *eventTimestamp;
@property (readonly) NSString *subscriptionId;
@property (readonly) unsigned long responseCode;
@property (readonly) NSString *response;
@property (readonly) NSURL *url;
@property (readonly) NSString *payload;
@property (readonly) NSString *state;
@property (readonly) NSString *notifiedAt;
@property (readonly) NSString *respondedAt;
@property (readonly) NSString *createdAt;
@property (readonly) NSURL *selfURL;
@property (readonly) NSURL *eventURL;
@property (readonly) NSURL *subscriptionURL;

- (id) initWithDictionary: (NSDictionary *) dictionary;

@end


text:
% Copyright (c) 2010 Milton Mazzarri <milmazz@gmail.com>
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions
% are met:
% 1. Redistributions of source code must retain the above copyright
%    notice, this list of conditions and the following disclaimer.
% 2. Redistributions in binary form must reproduce the above copyright
%    notice, this list of conditions and the following disclaimer in the
%    documentation and/or other materials provided with the distribution.
% 3. The name of the author may not be used to endorse or promote products
%    derived from this software without specific prior written permission.
%
% THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
% IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
% OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
% IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
% INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
% NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
% DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
% THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
% (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
% THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

\documentclass{beamer}

\mode<presentation>
{
  \usetheme{Frankfurt}
  \setbeamercovered{transparent}
  \useoutertheme{tree}
  \useinnertheme{rounded}
}

\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}

\usepackage{times}
\usepackage[T1]{fontenc}

% Redefinicion de teorema, definicion, ejemplo
\newtheorem{teorema}{Teorema}
\newtheorem{definicion}{Definición}
\newtheorem{ejemplo}{Ejemplo}

\hypersetup{colorlinks=true,linkcolor=red}

\title{Desarrollo colectivo en Turpial}
\author[Wil Alvarez \and Milton Mazzarri]{Wil Alvarez \texttt{<wil.alvarez@gmail.com>} \\
Milton Mazzarri \texttt{<milmazz@gmail.com>}
}
\institute[Cayapa Canaima]{3ra. Cayapa Canaima}
\date{Marzo, 2010}

\subject{Desarrollo colectivo en Turpial}

\pgfdeclareimage[height=1cm]{turpial-logo}{pics/turpial-logo}
\logo{\pgfuseimage{turpial-logo}}

 \AtBeginSubsection[]
{
  \begin{frame}<beamer>[allowframebreaks]{Contenido}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}

% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command:

%\beamerdefaultoverlayspecification{<+->}

\begin{document}

\begin{frame}
    \titlepage
\end{frame}

\begin{frame}[allowframebreaks]{Contenido}
    \tableofcontents[pausesections]
\end{frame}

\section{Historia}

\frame{
    \frametitle{Historia}

    \begin{itemize}
    \item \emph{Adobe AIR} solo funciona en \textbf{GNOME}, \textbf{KDE}.
    \item Poca integración con el escritorio.
    \item Los clientes \textbf{GTK} existentes para la época eran pobres.
    \item Los clientes \emph{Adobe AIR} son funcionales pero \emph{NO} libres.
    \item Ninguno cubría las expectativas.
    \item La motivación de otros compañeros a iniciar el desarrollo.
    \end{itemize}
}

\frame{
    \frametitle{Clientes de Twitter disponibles}
    \begin{center}
    \includegraphics[height=5cm]{pics/otros-clientes-twitter.png}
    \end{center}
}

\section{Visión}
\frame{
    \frametitle{Visión}

    \begin{itemize}
        \item Cliente alternativo para Twitter con múltiples interfaces.
        \item Bajo consumo de recursos.
        \item Estar integrado en el escritorio del usuario sin renunciar a ninguna funcionalidad.
        \item Poder ejecutarse en escritorios ligeros como Fluxbox, OpenBox, entre otros.
        \item Ser accesible para personas con discapacidad.
    \end{itemize}
}

\frame{
    \frametitle{Características}

    \begin{center}
    \includegraphics[height=5cm]{pics/caracteristicas.png}
    \end{center}
}

\section{Conociendo Turpial}

\subsection{Tecnologías}
\frame{
    \frametitle{Tecnologías usadas}

    \begin{center}
    \includegraphics[height=5cm]{pics/tecnologias.png}
    \end{center}
}

\subsection{Evolución}

\frame{

    \frametitle{Turpial 1.0}

    \begin{center}
    \includegraphics[height=5cm]{pics/v1_0.png}
    \end{center}
}

\frame{

    \frametitle{Turpial 1.5}

    \begin{center}
    \includegraphics[height=5cm]{pics/v1_5.png}
    \end{center}
}

\frame{

    \frametitle{Turpial 2.0}

    \begin{center}
    \includegraphics[height=5cm]{pics/v2_0.png}
    \end{center}
}

\subsection{Modelo MVC}

\frame{
    \frametitle{Modelo MVC en Turpial}

    \begin{center}
    \includegraphics[height=5.5cm]{pics/api.png}
    \end{center}
}

\begin{frame}[fragile]

\frametitle{Estructura de directorios}

\begin{verbatim}
.
|__ doc
|__ turpial
    |__ api
    |   |__ poster
    |__ data
    |   |__ pixmaps
    |   |__ sounds
    |   |__ themes
    |       |__ default
    |__ i18n
    |__ ui
        |__ gtk
        |__ gtk2
\end{verbatim}
\end{frame}

\subsection{Internacionalización}

\begin{frame}[fragile]
\frametitle{Estructura}

\begin{verbatim}
i18n
|__ en
|   |__ LC_MESSAGES
|       |__ messages.mo
|       |__ messages.po
|__ es
|   |__ LC_MESSAGES
|       |__ messages.mo
|       |__ messages.po
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Localización}

\begin{ejemplo}
\begin{verbatim}
#: turpial/notification.py:58
msgid "new tweet"
msgstr "nuevo tweet"

#: turpial/notification.py:60
msgid "new tweets"
msgstr "nuevos tweets"
\end{verbatim}
\end{ejemplo}
Proyecto Transifex: \url{http://www.transifex.net/projects/p/turpial/c/development/}
\end{frame}

\begin{frame}
\frametitle{Integración PyBabel en Turpial}

\begin{itemize}
    \item \texttt{compile\_catalog}
    \item \texttt{extract\_messages}
    \item \texttt{init\_catalog}
    \item \texttt{update\_catalog}
\end{itemize}
\end{frame}

\subsection{Documentación}

\frametitle{
    \frametitle{Documentación}

    \begin{itemize}
        \item ...
    \end{itemize}
}

\begin{frame}[fragile]
    \frametitle{Nuestra meta}
\begin{ejemplo}
\tiny
\begin{verbatim}
def fibonacci():
    """
    Return the *Fibonacci number*

    Interesting bits:

    >>> fib = fibonacci()
    >>> fib.next()
    1
    >>> fib.next()
    1
    >>> fib.next()
    2
    >>> [fib.next() for i in range(10)]
    [3, 5, 8, 13, 21, 34, 55, 89, 144, 233]
\end{verbatim}
\end{ejemplo}
\end{frame}

\begin{frame}[fragile]
    \frametitle{Nuestra meta}
\begin{ejemplo}
\tiny
\begin{verbatim}
    :var first_seed: F\ :sub:`0`\  feed seed.
    :type first_seed: int
    :var second_seed: F\ :sub:`1`\  feed seed.
    :type second_seed: int
    :return: Return the `Fibonacci number`_
    :rtype: int

    .. _`Fibonacci number`: http://en.wikipedia.org/wiki/Fibonacci_number
    """
\end{verbatim}
\end{ejemplo}
\end{frame}

\begin{frame}[fragile]
\frametitle{Nuestra meta}

\begin{ejemplo}
\tiny
\begin{verbatim}
    first_seed, second_seed = 0, 1

    while True:
        yield second_seed
        first_seed, second_seed = second_seed, first_seed + second_seed

if __name__ == "__main__":
    import doctest
    doctest.testmod()
\end{verbatim}
\end{ejemplo}

Detalle del código: \url{http://github.com/milmazz/myfibonacci}
\end{frame}

\begin{frame}
\frametitle{Resultados con Sphinx}

\begin{center}
\includegraphics[height=5cm]{pics/sphinx.png}
\end{center}
\end{frame}

\section{Enlaces de interés}

\frame{
    \frametitle{Enlaces de interés}

    \begin{itemize}
    \item \url{http://code.google.com/p/turpial}
    \item \url{http://github.com/satanas/Turpial}
    \item \url{http://github.com/milmazz/Turpial}
    \item \url{http://turpial.org.ve} (Próximamente)
    \end{itemize}
}

\frame{
    \frametitle{Agradecimientos}

    \begin{itemize}
    \item Wil Alvarez (@satanas82) -- Autor y programación.
    \item Eleazar Meza -- Concepto y diseño.
    \item Azrael Arocha -- Pruebas y colaboración.
    \item José Leonel Subero -- Pruebas.
    \item Edwind Contreras -- Pruebas, empaquetado RPM.
    \item William Cabrera -- Pruebas
    \end{itemize}
}

\frame{
    \frametitle{Agradecimientos}

    \begin{itemize}
    \item Marguerite Su (@doublechou) -- Traducción al francés, zh\_CH, zh\_TW.
    \item Flavio Percoco (@flaper87) - Traducción al italiano.
    \item Ana Rangel (@4n1ta) -- Traducción al Noruego.
    \item Solazver Solé -- Traducción al Portugués
    \item Raúl Escalante (@t6435bm) -- Traducción al Alemán.
    \item Milton Mazzarri (@milmazz) -- Programación, traducción al italiano.
    \end{itemize}
}
\end{document}


text:
package si.majeric.smarthouse.model;

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

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "room")
public class Room extends EntityBase {
	private static final long serialVersionUID = 1L;

	private String name;
	private Integer sequence;
	private List<Switch> switches = new ArrayList<Switch>();

	/* pozicija znotraj nadstropja */
	// private String _position;

	public Room() {
	}

	/**
	 * Overriden for persistence
	 */
	@Override
	@Id
	public String getId() {
		return super.getId();
	}

	@Column(name = "room_name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "room_sequence")
	public Integer getSequence() {
		return sequence;
	}

	public void setSequence(Integer sequence) {
		this.sequence = sequence;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true)
	@JoinColumn(name = "room")
	public List<Switch> getSwitches() {
		return switches;
	}

	public void setSwitches(List<Switch> switches) {
		this.switches = switches;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Room other = (Room) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}

}


text:
#include <grpc/support/port_platform.h>

#if GRPC_ARES == 1 && !defined(GRPC_UV)

#include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h"
#include "src/core/lib/iomgr/sockaddr.h"

#include <string.h>
#include <sys/types.h>

#include <ares.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>

#include <address_sorting/address_sorting.h>
#include "src/core/ext/filters/client_channel/parse_address.h"
#include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h"
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/combiner.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/nameser.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"

using grpc_core::ServerAddress;
using grpc_core::ServerAddressList;

grpc_core::TraceFlag grpc_trace_cares_address_sorting(false,
                                                      "cares_address_sorting");

grpc_core::TraceFlag grpc_trace_cares_resolver(false, "cares_resolver");

struct grpc_ares_request {
  /** indicates the DNS server to use, if specified */
  struct ares_addr_port_node dns_server_addr;
  /** following members are set in grpc_resolve_address_ares_impl */
  /** closure to call when the request completes */
  grpc_closure* on_done;
  /** the pointer to receive the resolved addresses */
  grpc_core::UniquePtr<grpc_core::ServerAddressList>* addresses_out;
  /** the pointer to receive the service config in JSON */
  char** service_config_json_out;
  /** the evernt driver used by this request */
  grpc_ares_ev_driver* ev_driver;
  /** number of ongoing queries */
  size_t pending_queries;

  /** the errors explaining query failures, appended to in query callbacks */
  grpc_error* error;
};

typedef struct grpc_ares_hostbyname_request {
  /** following members are set in create_hostbyname_request_locked
   */
  /** the top-level request instance */
  grpc_ares_request* parent_request;
  /** host to resolve, parsed from the name to resolve */
  char* host;
  /** port to fill in sockaddr_in, parsed from the name to resolve */
  uint16_t port;
  /** is it a grpclb address */
  bool is_balancer;
} grpc_ares_hostbyname_request;

static void log_address_sorting_list(const ServerAddressList& addresses,
                                     const char* input_output_str) {
  for (size_t i = 0; i < addresses.size(); i++) {
    char* addr_str;
    if (grpc_sockaddr_to_string(&addr_str, &addresses[i].address(), true)) {
      gpr_log(GPR_INFO, "c-ares address sorting: %s[%" PRIuPTR "]=%s",
              input_output_str, i, addr_str);
      gpr_free(addr_str);
    } else {
      gpr_log(GPR_INFO,
              "c-ares address sorting: %s[%" PRIuPTR "]=<unprintable>",
              input_output_str, i);
    }
  }
}

void grpc_cares_wrapper_address_sorting_sort(ServerAddressList* addresses) {
  if (grpc_trace_cares_address_sorting.enabled()) {
    log_address_sorting_list(*addresses, "input");
  }
  address_sorting_sortable* sortables = (address_sorting_sortable*)gpr_zalloc(
      sizeof(address_sorting_sortable) * addresses->size());
  for (size_t i = 0; i < addresses->size(); ++i) {
    sortables[i].user_data = &(*addresses)[i];
    memcpy(&sortables[i].dest_addr.addr, &(*addresses)[i].address().addr,
           (*addresses)[i].address().len);
    sortables[i].dest_addr.len = (*addresses)[i].address().len;
  }
  address_sorting_rfc_6724_sort(sortables, addresses->size());
  ServerAddressList sorted;
  sorted.reserve(addresses->size());
  for (size_t i = 0; i < addresses->size(); ++i) {
    sorted.emplace_back(*static_cast<ServerAddress*>(sortables[i].user_data));
  }
  gpr_free(sortables);
  *addresses = std::move(sorted);
  if (grpc_trace_cares_address_sorting.enabled()) {
    log_address_sorting_list(*addresses, "output");
  }
}

static void grpc_ares_request_ref_locked(grpc_ares_request* r) {
  r->pending_queries++;
}

static void grpc_ares_request_unref_locked(grpc_ares_request* r) {
  r->pending_queries--;
  if (r->pending_queries == 0u) {
    grpc_ares_ev_driver_on_queries_complete_locked(r->ev_driver);
  }
}

void grpc_ares_complete_request_locked(grpc_ares_request* r) {
  /* Invoke on_done callback and destroy the
     request */
  r->ev_driver = nullptr;
  ServerAddressList* addresses = r->addresses_out->get();
  if (addresses != nullptr) {
    grpc_cares_wrapper_address_sorting_sort(addresses);
    GRPC_ERROR_UNREF(r->error);
    r->error = GRPC_ERROR_NONE;
    // TODO(apolcyn): allow c-ares to return a service config
    // with no addresses along side it
  }
  GRPC_CLOSURE_SCHED(r->on_done, r->error);
}

static grpc_ares_hostbyname_request* create_hostbyname_request_locked(
    grpc_ares_request* parent_request, char* host, uint16_t port,
    bool is_balancer) {
  grpc_ares_hostbyname_request* hr = static_cast<grpc_ares_hostbyname_request*>(
      gpr_zalloc(sizeof(grpc_ares_hostbyname_request)));
  hr->parent_request = parent_request;
  hr->host = gpr_strdup(host);
  hr->port = port;
  hr->is_balancer = is_balancer;
  grpc_ares_request_ref_locked(parent_request);
  return hr;
}

static void destroy_hostbyname_request_locked(
    grpc_ares_hostbyname_request* hr) {
  grpc_ares_request_unref_locked(hr->parent_request);
  gpr_free(hr->host);
  gpr_free(hr);
}

static void on_hostbyname_done_locked(void* arg, int status, int timeouts,
                                      struct hostent* hostent) {
  grpc_ares_hostbyname_request* hr =
      static_cast<grpc_ares_hostbyname_request*>(arg);
  grpc_ares_request* r = hr->parent_request;
  if (status == ARES_SUCCESS) {
    GRPC_CARES_TRACE_LOG(
        "request:%p on_hostbyname_done_locked host=%s ARES_SUCCESS", r,
        hr->host);
    if (*r->addresses_out == nullptr) {
      *r->addresses_out = grpc_core::MakeUnique<ServerAddressList>();
    }
    ServerAddressList& addresses = **r->addresses_out;
    for (size_t i = 0; hostent->h_addr_list[i] != nullptr; ++i) {
      grpc_core::InlinedVector<grpc_arg, 2> args_to_add;
      if (hr->is_balancer) {
        args_to_add.emplace_back(grpc_channel_arg_integer_create(
            const_cast<char*>(GRPC_ARG_ADDRESS_IS_BALANCER), 1));
        args_to_add.emplace_back(grpc_channel_arg_string_create(
            const_cast<char*>(GRPC_ARG_ADDRESS_BALANCER_NAME), hr->host));
      }
      grpc_channel_args* args = grpc_channel_args_copy_and_add(
          nullptr, args_to_add.data(), args_to_add.size());
      switch (hostent->h_addrtype) {
        case AF_INET6: {
          size_t addr_len = sizeof(struct sockaddr_in6);
          struct sockaddr_in6 addr;
          memset(&addr, 0, addr_len);
          memcpy(&addr.sin6_addr, hostent->h_addr_list[i],
                 sizeof(struct in6_addr));
          addr.sin6_family = static_cast<unsigned char>(hostent->h_addrtype);
          addr.sin6_port = hr->port;
          addresses.emplace_back(&addr, addr_len, args);
          char output[INET6_ADDRSTRLEN];
          ares_inet_ntop(AF_INET6, &addr.sin6_addr, output, INET6_ADDRSTRLEN);
          GRPC_CARES_TRACE_LOG(
              "request:%p c-ares resolver gets a AF_INET6 result: \n"
              "  addr: %s\n  port: %d\n  sin6_scope_id: %d\n",
              r, output, ntohs(hr->port), addr.sin6_scope_id);
          break;
        }
        case AF_INET: {
          size_t addr_len = sizeof(struct sockaddr_in);
          struct sockaddr_in addr;
          memset(&addr, 0, addr_len);
          memcpy(&addr.sin_addr, hostent->h_addr_list[i],
                 sizeof(struct in_addr));
          addr.sin_family = static_cast<unsigned char>(hostent->h_addrtype);
          addr.sin_port = hr->port;
          addresses.emplace_back(&addr, addr_len, args);
          char output[INET_ADDRSTRLEN];
          ares_inet_ntop(AF_INET, &addr.sin_addr, output, INET_ADDRSTRLEN);
          GRPC_CARES_TRACE_LOG(
              "request:%p c-ares resolver gets a AF_INET result: \n"
              "  addr: %s\n  port: %d\n",
              r, output, ntohs(hr->port));
          break;
        }
      }
    }
  } else {
    char* error_msg;
    gpr_asprintf(&error_msg, "C-ares status is not ARES_SUCCESS: %s",
                 ares_strerror(status));
    GRPC_CARES_TRACE_LOG("request:%p on_hostbyname_done_locked host=%s %s", r,
                         hr->host, error_msg);
    grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg);
    gpr_free(error_msg);
    r->error = grpc_error_add_child(error, r->error);
  }
  destroy_hostbyname_request_locked(hr);
}

static void on_srv_query_done_locked(void* arg, int status, int timeouts,
                                     unsigned char* abuf, int alen) {
  grpc_ares_request* r = static_cast<grpc_ares_request*>(arg);
  if (status == ARES_SUCCESS) {
    GRPC_CARES_TRACE_LOG("request:%p on_srv_query_done_locked ARES_SUCCESS", r);
    struct ares_srv_reply* reply;
    const int parse_status = ares_parse_srv_reply(abuf, alen, &reply);
    if (parse_status == ARES_SUCCESS) {
      ares_channel* channel =
          grpc_ares_ev_driver_get_channel_locked(r->ev_driver);
      for (struct ares_srv_reply* srv_it = reply; srv_it != nullptr;
           srv_it = srv_it->next) {
        if (grpc_ares_query_ipv6()) {
          grpc_ares_hostbyname_request* hr = create_hostbyname_request_locked(
              r, srv_it->host, htons(srv_it->port), true /* is_balancer */);
          ares_gethostbyname(*channel, hr->host, AF_INET6,
                             on_hostbyname_done_locked, hr);
        }
        grpc_ares_hostbyname_request* hr = create_hostbyname_request_locked(
            r, srv_it->host, htons(srv_it->port), true /* is_balancer */);
        ares_gethostbyname(*channel, hr->host, AF_INET,
                           on_hostbyname_done_locked, hr);
        grpc_ares_ev_driver_start_locked(r->ev_driver);
      }
    }
    if (reply != nullptr) {
      ares_free_data(reply);
    }
  } else {
    char* error_msg;
    gpr_asprintf(&error_msg, "C-ares status is not ARES_SUCCESS: %s",
                 ares_strerror(status));
    GRPC_CARES_TRACE_LOG("request:%p on_srv_query_done_locked %s", r,
                         error_msg);
    grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg);
    gpr_free(error_msg);
    r->error = grpc_error_add_child(error, r->error);
  }
  grpc_ares_request_unref_locked(r);
}

static const char g_service_config_attribute_prefix[] = "grpc_config=";

static void on_txt_done_locked(void* arg, int status, int timeouts,
                               unsigned char* buf, int len) {
  char* error_msg;
  grpc_ares_request* r = static_cast<grpc_ares_request*>(arg);
  const size_t prefix_len = sizeof(g_service_config_attribute_prefix) - 1;
  struct ares_txt_ext* result = nullptr;
  struct ares_txt_ext* reply = nullptr;
  grpc_error* error = GRPC_ERROR_NONE;
  if (status != ARES_SUCCESS) goto fail;
  GRPC_CARES_TRACE_LOG("request:%p on_txt_done_locked ARES_SUCCESS", r);
  status = ares_parse_txt_reply_ext(buf, len, &reply);
  if (status != ARES_SUCCESS) goto fail;
  // Find service config in TXT record.
  for (result = reply; result != nullptr; result = result->next) {
    if (result->record_start &&
        memcmp(result->txt, g_service_config_attribute_prefix, prefix_len) ==
            0) {
      break;
    }
  }
  // Found a service config record.
  if (result != nullptr) {
    size_t service_config_len = result->length - prefix_len;
    *r->service_config_json_out =
        static_cast<char*>(gpr_malloc(service_config_len + 1));
    memcpy(*r->service_config_json_out, result->txt + prefix_len,
           service_config_len);
    for (result = result->next; result != nullptr && !result->record_start;
         result = result->next) {
      *r->service_config_json_out = static_cast<char*>(
          gpr_realloc(*r->service_config_json_out,
                      service_config_len + result->length + 1));
      memcpy(*r->service_config_json_out + service_config_len, result->txt,
             result->length);
      service_config_len += result->length;
    }
    (*r->service_config_json_out)[service_config_len] = '\0';
    GRPC_CARES_TRACE_LOG("request:%p found service config: %s", r,
                         *r->service_config_json_out);
  }
  // Clean up.
  ares_free_data(reply);
  goto done;
fail:
  gpr_asprintf(&error_msg, "C-ares TXT lookup status is not ARES_SUCCESS: %s",
               ares_strerror(status));
  error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg);
  GRPC_CARES_TRACE_LOG("request:%p on_txt_done_locked %s", r, error_msg);
  gpr_free(error_msg);
  r->error = grpc_error_add_child(error, r->error);
done:
  grpc_ares_request_unref_locked(r);
}

void grpc_dns_lookup_ares_continue_after_check_localhost_and_ip_literals_locked(
    grpc_ares_request* r, const char* dns_server, const char* name,
    const char* default_port, grpc_pollset_set* interested_parties,
    bool check_grpclb, int query_timeout_ms, grpc_combiner* combiner) {
  grpc_error* error = GRPC_ERROR_NONE;
  grpc_ares_hostbyname_request* hr = nullptr;
  ares_channel* channel = nullptr;
  /* parse name, splitting it into host and port parts */
  char* host;
  char* port;
  gpr_split_host_port(name, &host, &port);
  if (host == nullptr) {
    error = grpc_error_set_str(
        GRPC_ERROR_CREATE_FROM_STATIC_STRING("unparseable host:port"),
        GRPC_ERROR_STR_TARGET_ADDRESS, grpc_slice_from_copied_string(name));
    goto error_cleanup;
  } else if (port == nullptr) {
    if (default_port == nullptr) {
      error = grpc_error_set_str(
          GRPC_ERROR_CREATE_FROM_STATIC_STRING("no port in name"),
          GRPC_ERROR_STR_TARGET_ADDRESS, grpc_slice_from_copied_string(name));
      goto error_cleanup;
    }
    port = gpr_strdup(default_port);
  }
  error = grpc_ares_ev_driver_create_locked(&r->ev_driver, interested_parties,
                                            query_timeout_ms, combiner, r);
  if (error != GRPC_ERROR_NONE) goto error_cleanup;
  channel = grpc_ares_ev_driver_get_channel_locked(r->ev_driver);
  // If dns_server is specified, use it.
  if (dns_server != nullptr) {
    GRPC_CARES_TRACE_LOG("request:%p Using DNS server %s", r, dns_server);
    grpc_resolved_address addr;
    if (grpc_parse_ipv4_hostport(dns_server, &addr, false /* log_errors */)) {
      r->dns_server_addr.family = AF_INET;
      struct sockaddr_in* in = reinterpret_cast<struct sockaddr_in*>(addr.addr);
      memcpy(&r->dns_server_addr.addr.addr4, &in->sin_addr,
             sizeof(struct in_addr));
      r->dns_server_addr.tcp_port = grpc_sockaddr_get_port(&addr);
      r->dns_server_addr.udp_port = grpc_sockaddr_get_port(&addr);
    } else if (grpc_parse_ipv6_hostport(dns_server, &addr,
                                        false /* log_errors */)) {
      r->dns_server_addr.family = AF_INET6;
      struct sockaddr_in6* in6 =
          reinterpret_cast<struct sockaddr_in6*>(addr.addr);
      memcpy(&r->dns_server_addr.addr.addr6, &in6->sin6_addr,
             sizeof(struct in6_addr));
      r->dns_server_addr.tcp_port = grpc_sockaddr_get_port(&addr);
      r->dns_server_addr.udp_port = grpc_sockaddr_get_port(&addr);
    } else {
      error = grpc_error_set_str(
          GRPC_ERROR_CREATE_FROM_STATIC_STRING("cannot parse authority"),
          GRPC_ERROR_STR_TARGET_ADDRESS, grpc_slice_from_copied_string(name));
      goto error_cleanup;
    }
    int status = ares_set_servers_ports(*channel, &r->dns_server_addr);
    if (status != ARES_SUCCESS) {
      char* error_msg;
      gpr_asprintf(&error_msg, "C-ares status is not ARES_SUCCESS: %s",
                   ares_strerror(status));
      error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg);
      gpr_free(error_msg);
      goto error_cleanup;
    }
  }
  r->pending_queries = 1;
  if (grpc_ares_query_ipv6()) {
    hr = create_hostbyname_request_locked(r, host, grpc_strhtons(port),
                                          false /* is_balancer */);
    ares_gethostbyname(*channel, hr->host, AF_INET6, on_hostbyname_done_locked,
                       hr);
  }
  hr = create_hostbyname_request_locked(r, host, grpc_strhtons(port),
                                        false /* is_balancer */);
  ares_gethostbyname(*channel, hr->host, AF_INET, on_hostbyname_done_locked,
                     hr);
  if (check_grpclb) {
    /* Query the SRV record */
    grpc_ares_request_ref_locked(r);
    char* service_name;
    gpr_asprintf(&service_name, "_grpclb._tcp.%s", host);
    ares_query(*channel, service_name, ns_c_in, ns_t_srv,
               on_srv_query_done_locked, r);
    gpr_free(service_name);
  }
  if (r->service_config_json_out != nullptr) {
    grpc_ares_request_ref_locked(r);
    char* config_name;
    gpr_asprintf(&config_name, "_grpc_config.%s", host);
    ares_search(*channel, config_name, ns_c_in, ns_t_txt, on_txt_done_locked,
                r);
    gpr_free(config_name);
  }
  grpc_ares_ev_driver_start_locked(r->ev_driver);
  grpc_ares_request_unref_locked(r);
  gpr_free(host);
  gpr_free(port);
  return;

error_cleanup:
  GRPC_CLOSURE_SCHED(r->on_done, error);
  gpr_free(host);
  gpr_free(port);
}

static bool inner_resolve_as_ip_literal_locked(
    const char* name, const char* default_port,
    grpc_core::UniquePtr<grpc_core::ServerAddressList>* addrs, char** host,
    char** port, char** hostport) {
  gpr_split_host_port(name, host, port);
  if (*host == nullptr) {
    gpr_log(GPR_ERROR,
            "Failed to parse %s to host:port while attempting to resolve as ip "
            "literal.",
            name);
    return false;
  }
  if (*port == nullptr) {
    if (default_port == nullptr) {
      gpr_log(GPR_ERROR,
              "No port or default port for %s while attempting to resolve as "
              "ip literal.",
              name);
      return false;
    }
    *port = gpr_strdup(default_port);
  }
  grpc_resolved_address addr;
  GPR_ASSERT(gpr_join_host_port(hostport, *host, atoi(*port)));
  if (grpc_parse_ipv4_hostport(*hostport, &addr, false /* log errors */) ||
      grpc_parse_ipv6_hostport(*hostport, &addr, false /* log errors */)) {
    GPR_ASSERT(*addrs == nullptr);
    *addrs = grpc_core::MakeUnique<ServerAddressList>();
    (*addrs)->emplace_back(addr.addr, addr.len, nullptr /* args */);
    return true;
  }
  return false;
}

static bool resolve_as_ip_literal_locked(
    const char* name, const char* default_port,
    grpc_core::UniquePtr<grpc_core::ServerAddressList>* addrs) {
  char* host = nullptr;
  char* port = nullptr;
  char* hostport = nullptr;
  bool out = inner_resolve_as_ip_literal_locked(name, default_port, addrs,
                                                &host, &port, &hostport);
  gpr_free(host);
  gpr_free(port);
  gpr_free(hostport);
  return out;
}

static bool target_matches_localhost_inner(const char* name, char** host,
                                           char** port) {
  if (!gpr_split_host_port(name, host, port)) {
    gpr_log(GPR_ERROR, "Unable to split host and port for name: %s", name);
    return false;
  }
  if (gpr_stricmp(*host, "localhost") == 0) {
    return true;
  } else {
    return false;
  }
}

static bool target_matches_localhost(const char* name) {
  char* host = nullptr;
  char* port = nullptr;
  bool out = target_matches_localhost_inner(name, &host, &port);
  gpr_free(host);
  gpr_free(port);
  return out;
}

static grpc_ares_request* grpc_dns_lookup_ares_locked_impl(
    const char* dns_server, const char* name, const char* default_port,
    grpc_pollset_set* interested_parties, grpc_closure* on_done,
    grpc_core::UniquePtr<grpc_core::ServerAddressList>* addrs,
    bool check_grpclb, char** service_config_json, int query_timeout_ms,
    grpc_combiner* combiner) {
  grpc_ares_request* r =
      static_cast<grpc_ares_request*>(gpr_zalloc(sizeof(grpc_ares_request)));
  r->ev_driver = nullptr;
  r->on_done = on_done;
  r->addresses_out = addrs;
  r->service_config_json_out = service_config_json;
  r->error = GRPC_ERROR_NONE;
  r->pending_queries = 0;
  GRPC_CARES_TRACE_LOG(
      "request:%p c-ares grpc_dns_lookup_ares_locked_impl name=%s, "
      "default_port=%s",
      r, name, default_port);
  // Early out if the target is an ipv4 or ipv6 literal.
  if (resolve_as_ip_literal_locked(name, default_port, addrs)) {
    grpc_ares_complete_request_locked(r);
    return r;
  }
  // Early out if the target is localhost and we're on Windows.
  if (grpc_ares_maybe_resolve_localhost_manually_locked(name, default_port,
                                                        addrs)) {
    grpc_ares_complete_request_locked(r);
    return r;
  }
  // Don't query for SRV and TXT records if the target is "localhost", so
  // as to cut down on lookups over the network, especially in tests:
  // https://github.com/grpc/proposal/pull/79
  if (target_matches_localhost(name)) {
    check_grpclb = false;
    r->service_config_json_out = nullptr;
  }
  // Look up name using c-ares lib.
  grpc_dns_lookup_ares_continue_after_check_localhost_and_ip_literals_locked(
      r, dns_server, name, default_port, interested_parties, check_grpclb,
      query_timeout_ms, combiner);
  return r;
}

grpc_ares_request* (*grpc_dns_lookup_ares_locked)(
    const char* dns_server, const char* name, const char* default_port,
    grpc_pollset_set* interested_parties, grpc_closure* on_done,
    grpc_core::UniquePtr<grpc_core::ServerAddressList>* addrs,
    bool check_grpclb, char** service_config_json, int query_timeout_ms,
    grpc_combiner* combiner) = grpc_dns_lookup_ares_locked_impl;

static void grpc_cancel_ares_request_locked_impl(grpc_ares_request* r) {
  GPR_ASSERT(r != nullptr);
  if (r->ev_driver != nullptr) {
    grpc_ares_ev_driver_shutdown_locked(r->ev_driver);
  }
}

void (*grpc_cancel_ares_request_locked)(grpc_ares_request* r) =
    grpc_cancel_ares_request_locked_impl;

// ares_library_init and ares_library_cleanup are currently no-op except under
// Windows. Calling them may cause race conditions when other parts of the
// binary calls these functions concurrently.
#ifdef GPR_WINDOWS
grpc_error* grpc_ares_init(void) {
  int status = ares_library_init(ARES_LIB_INIT_ALL);
  if (status != ARES_SUCCESS) {
    char* error_msg;
    gpr_asprintf(&error_msg, "ares_library_init failed: %s",
                 ares_strerror(status));
    grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg);
    gpr_free(error_msg);
    return error;
  }
  return GRPC_ERROR_NONE;
}

void grpc_ares_cleanup(void) { ares_library_cleanup(); }
#else
grpc_error* grpc_ares_init(void) { return GRPC_ERROR_NONE; }
void grpc_ares_cleanup(void) {}
#endif  // GPR_WINDOWS

/*
 * grpc_resolve_address_ares related structs and functions
 */

typedef struct grpc_resolve_address_ares_request {
  /* combiner that queries and related callbacks run under */
  grpc_combiner* combiner;
  /** the pointer to receive the resolved addresses */
  grpc_resolved_addresses** addrs_out;
  /** currently resolving addresses */
  grpc_core::UniquePtr<ServerAddressList> addresses;
  /** closure to call when the resolve_address_ares request completes */
  grpc_closure* on_resolve_address_done;
  /** a closure wrapping on_resolve_address_done, which should be invoked when
     the grpc_dns_lookup_ares_locked operation is done. */
  grpc_closure on_dns_lookup_done_locked;
  /* target name */
  const char* name;
  /* default port to use if none is specified */
  const char* default_port;
  /* pollset_set to be driven by */
  grpc_pollset_set* interested_parties;
  /* underlying ares_request that the query is performed on */
  grpc_ares_request* ares_request = nullptr;
} grpc_resolve_address_ares_request;

static void on_dns_lookup_done_locked(void* arg, grpc_error* error) {
  grpc_resolve_address_ares_request* r =
      static_cast<grpc_resolve_address_ares_request*>(arg);
  gpr_free(r->ares_request);
  grpc_resolved_addresses** resolved_addresses = r->addrs_out;
  if (r->addresses == nullptr || r->addresses->empty()) {
    *resolved_addresses = nullptr;
  } else {
    *resolved_addresses = static_cast<grpc_resolved_addresses*>(
        gpr_zalloc(sizeof(grpc_resolved_addresses)));
    (*resolved_addresses)->naddrs = r->addresses->size();
    (*resolved_addresses)->addrs =
        static_cast<grpc_resolved_address*>(gpr_zalloc(
            sizeof(grpc_resolved_address) * (*resolved_addresses)->naddrs));
    for (size_t i = 0; i < (*resolved_addresses)->naddrs; ++i) {
      GPR_ASSERT(!(*r->addresses)[i].IsBalancer());
      memcpy(&(*resolved_addresses)->addrs[i], &(*r->addresses)[i].address(),
             sizeof(grpc_resolved_address));
    }
  }
  GRPC_CLOSURE_SCHED(r->on_resolve_address_done, GRPC_ERROR_REF(error));
  GRPC_COMBINER_UNREF(r->combiner, "on_dns_lookup_done_cb");
  grpc_core::Delete(r);
}

static void grpc_resolve_address_invoke_dns_lookup_ares_locked(
    void* arg, grpc_error* unused_error) {
  grpc_resolve_address_ares_request* r =
      static_cast<grpc_resolve_address_ares_request*>(arg);
  r->ares_request = grpc_dns_lookup_ares_locked(
      nullptr /* dns_server */, r->name, r->default_port, r->interested_parties,
      &r->on_dns_lookup_done_locked, &r->addresses, false /* check_grpclb */,
      nullptr /* service_config_json */, GRPC_DNS_ARES_DEFAULT_QUERY_TIMEOUT_MS,
      r->combiner);
}

static void grpc_resolve_address_ares_impl(const char* name,
                                           const char* default_port,
                                           grpc_pollset_set* interested_parties,
                                           grpc_closure* on_done,
                                           grpc_resolved_addresses** addrs) {
  grpc_resolve_address_ares_request* r =
      grpc_core::New<grpc_resolve_address_ares_request>();
  r->combiner = grpc_combiner_create();
  r->addrs_out = addrs;
  r->on_resolve_address_done = on_done;
  GRPC_CLOSURE_INIT(&r->on_dns_lookup_done_locked, on_dns_lookup_done_locked, r,
                    grpc_combiner_scheduler(r->combiner));
  r->name = name;
  r->default_port = default_port;
  r->interested_parties = interested_parties;
  GRPC_CLOSURE_SCHED(
      GRPC_CLOSURE_CREATE(grpc_resolve_address_invoke_dns_lookup_ares_locked, r,
                          grpc_combiner_scheduler(r->combiner)),
      GRPC_ERROR_NONE);
}

void (*grpc_resolve_address_ares)(
    const char* name, const char* default_port,
    grpc_pollset_set* interested_parties, grpc_closure* on_done,
    grpc_resolved_addresses** addrs) = grpc_resolve_address_ares_impl;

#endif /* GRPC_ARES == 1 && !defined(GRPC_UV) */


text:
#include <aws/sagemaker/model/TargetDevice.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>

using namespace Aws::Utils;

namespace Aws
{
  namespace SageMaker
  {
    namespace Model
    {
      namespace TargetDeviceMapper
      {

        static const int lambda_HASH = HashingUtils::HashString("lambda");
        static const int ml_m4_HASH = HashingUtils::HashString("ml_m4");
        static const int ml_m5_HASH = HashingUtils::HashString("ml_m5");
        static const int ml_c4_HASH = HashingUtils::HashString("ml_c4");
        static const int ml_c5_HASH = HashingUtils::HashString("ml_c5");
        static const int ml_p2_HASH = HashingUtils::HashString("ml_p2");
        static const int ml_p3_HASH = HashingUtils::HashString("ml_p3");
        static const int ml_g4dn_HASH = HashingUtils::HashString("ml_g4dn");
        static const int ml_inf1_HASH = HashingUtils::HashString("ml_inf1");
        static const int ml_eia2_HASH = HashingUtils::HashString("ml_eia2");
        static const int jetson_tx1_HASH = HashingUtils::HashString("jetson_tx1");
        static const int jetson_tx2_HASH = HashingUtils::HashString("jetson_tx2");
        static const int jetson_nano_HASH = HashingUtils::HashString("jetson_nano");
        static const int jetson_xavier_HASH = HashingUtils::HashString("jetson_xavier");
        static const int rasp3b_HASH = HashingUtils::HashString("rasp3b");
        static const int imx8qm_HASH = HashingUtils::HashString("imx8qm");
        static const int deeplens_HASH = HashingUtils::HashString("deeplens");
        static const int rk3399_HASH = HashingUtils::HashString("rk3399");
        static const int rk3288_HASH = HashingUtils::HashString("rk3288");
        static const int aisage_HASH = HashingUtils::HashString("aisage");
        static const int sbe_c_HASH = HashingUtils::HashString("sbe_c");
        static const int qcs605_HASH = HashingUtils::HashString("qcs605");
        static const int qcs603_HASH = HashingUtils::HashString("qcs603");
        static const int sitara_am57x_HASH = HashingUtils::HashString("sitara_am57x");
        static const int amba_cv2_HASH = HashingUtils::HashString("amba_cv2");
        static const int amba_cv22_HASH = HashingUtils::HashString("amba_cv22");
        static const int amba_cv25_HASH = HashingUtils::HashString("amba_cv25");
        static const int x86_win32_HASH = HashingUtils::HashString("x86_win32");
        static const int x86_win64_HASH = HashingUtils::HashString("x86_win64");
        static const int coreml_HASH = HashingUtils::HashString("coreml");
        static const int jacinto_tda4vm_HASH = HashingUtils::HashString("jacinto_tda4vm");
        static const int imx8mplus_HASH = HashingUtils::HashString("imx8mplus");

        TargetDevice GetTargetDeviceForName(const Aws::String& name)
        {
          int hashCode = HashingUtils::HashString(name.c_str());
          if (hashCode == lambda_HASH)
          {
            return TargetDevice::lambda;
          }
          else if (hashCode == ml_m4_HASH)
          {
            return TargetDevice::ml_m4;
          }
          else if (hashCode == ml_m5_HASH)
          {
            return TargetDevice::ml_m5;
          }
          else if (hashCode == ml_c4_HASH)
          {
            return TargetDevice::ml_c4;
          }
          else if (hashCode == ml_c5_HASH)
          {
            return TargetDevice::ml_c5;
          }
          else if (hashCode == ml_p2_HASH)
          {
            return TargetDevice::ml_p2;
          }
          else if (hashCode == ml_p3_HASH)
          {
            return TargetDevice::ml_p3;
          }
          else if (hashCode == ml_g4dn_HASH)
          {
            return TargetDevice::ml_g4dn;
          }
          else if (hashCode == ml_inf1_HASH)
          {
            return TargetDevice::ml_inf1;
          }
          else if (hashCode == ml_eia2_HASH)
          {
            return TargetDevice::ml_eia2;
          }
          else if (hashCode == jetson_tx1_HASH)
          {
            return TargetDevice::jetson_tx1;
          }
          else if (hashCode == jetson_tx2_HASH)
          {
            return TargetDevice::jetson_tx2;
          }
          else if (hashCode == jetson_nano_HASH)
          {
            return TargetDevice::jetson_nano;
          }
          else if (hashCode == jetson_xavier_HASH)
          {
            return TargetDevice::jetson_xavier;
          }
          else if (hashCode == rasp3b_HASH)
          {
            return TargetDevice::rasp3b;
          }
          else if (hashCode == imx8qm_HASH)
          {
            return TargetDevice::imx8qm;
          }
          else if (hashCode == deeplens_HASH)
          {
            return TargetDevice::deeplens;
          }
          else if (hashCode == rk3399_HASH)
          {
            return TargetDevice::rk3399;
          }
          else if (hashCode == rk3288_HASH)
          {
            return TargetDevice::rk3288;
          }
          else if (hashCode == aisage_HASH)
          {
            return TargetDevice::aisage;
          }
          else if (hashCode == sbe_c_HASH)
          {
            return TargetDevice::sbe_c;
          }
          else if (hashCode == qcs605_HASH)
          {
            return TargetDevice::qcs605;
          }
          else if (hashCode == qcs603_HASH)
          {
            return TargetDevice::qcs603;
          }
          else if (hashCode == sitara_am57x_HASH)
          {
            return TargetDevice::sitara_am57x;
          }
          else if (hashCode == amba_cv2_HASH)
          {
            return TargetDevice::amba_cv2;
          }
          else if (hashCode == amba_cv22_HASH)
          {
            return TargetDevice::amba_cv22;
          }
          else if (hashCode == amba_cv25_HASH)
          {
            return TargetDevice::amba_cv25;
          }
          else if (hashCode == x86_win32_HASH)
          {
            return TargetDevice::x86_win32;
          }
          else if (hashCode == x86_win64_HASH)
          {
            return TargetDevice::x86_win64;
          }
          else if (hashCode == coreml_HASH)
          {
            return TargetDevice::coreml;
          }
          else if (hashCode == jacinto_tda4vm_HASH)
          {
            return TargetDevice::jacinto_tda4vm;
          }
          else if (hashCode == imx8mplus_HASH)
          {
            return TargetDevice::imx8mplus;
          }
          EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
          if(overflowContainer)
          {
            overflowContainer->StoreOverflow(hashCode, name);
            return static_cast<TargetDevice>(hashCode);
          }

          return TargetDevice::NOT_SET;
        }

        Aws::String GetNameForTargetDevice(TargetDevice enumValue)
        {
          switch(enumValue)
          {
          case TargetDevice::lambda:
            return "lambda";
          case TargetDevice::ml_m4:
            return "ml_m4";
          case TargetDevice::ml_m5:
            return "ml_m5";
          case TargetDevice::ml_c4:
            return "ml_c4";
          case TargetDevice::ml_c5:
            return "ml_c5";
          case TargetDevice::ml_p2:
            return "ml_p2";
          case TargetDevice::ml_p3:
            return "ml_p3";
          case TargetDevice::ml_g4dn:
            return "ml_g4dn";
          case TargetDevice::ml_inf1:
            return "ml_inf1";
          case TargetDevice::ml_eia2:
            return "ml_eia2";
          case TargetDevice::jetson_tx1:
            return "jetson_tx1";
          case TargetDevice::jetson_tx2:
            return "jetson_tx2";
          case TargetDevice::jetson_nano:
            return "jetson_nano";
          case TargetDevice::jetson_xavier:
            return "jetson_xavier";
          case TargetDevice::rasp3b:
            return "rasp3b";
          case TargetDevice::imx8qm:
            return "imx8qm";
          case TargetDevice::deeplens:
            return "deeplens";
          case TargetDevice::rk3399:
            return "rk3399";
          case TargetDevice::rk3288:
            return "rk3288";
          case TargetDevice::aisage:
            return "aisage";
          case TargetDevice::sbe_c:
            return "sbe_c";
          case TargetDevice::qcs605:
            return "qcs605";
          case TargetDevice::qcs603:
            return "qcs603";
          case TargetDevice::sitara_am57x:
            return "sitara_am57x";
          case TargetDevice::amba_cv2:
            return "amba_cv2";
          case TargetDevice::amba_cv22:
            return "amba_cv22";
          case TargetDevice::amba_cv25:
            return "amba_cv25";
          case TargetDevice::x86_win32:
            return "x86_win32";
          case TargetDevice::x86_win64:
            return "x86_win64";
          case TargetDevice::coreml:
            return "coreml";
          case TargetDevice::jacinto_tda4vm:
            return "jacinto_tda4vm";
          case TargetDevice::imx8mplus:
            return "imx8mplus";
          default:
            EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
            if(overflowContainer)
            {
              return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
            }

            return {};
          }
        }

      } // namespace TargetDeviceMapper
    } // namespace Model
  } // namespace SageMaker
} // namespace Aws


text:
package org.apache.camel.component.sjms.producer;
import org.junit.Before;
import org.junit.After;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageListener;
import javax.jms.MessageProducer;
import javax.jms.TextMessage;

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.sjms.support.JmsTestSupport;

import org.junit.Test;

public class InOutQueueProducerAsyncLoadTest extends JmsTestSupport {

    private static final String TEST_DESTINATION_NAME = "in.out.queue.producer.test";
    private MessageConsumer mc1;
    private MessageConsumer mc2;

    public InOutQueueProducerAsyncLoadTest() {
    }

    @Override
    protected boolean useJmx() {
        return false;
    }

    @Override
    @Before
    public void setUp() throws Exception {
        super.setUp();
        mc1 = createQueueConsumer(TEST_DESTINATION_NAME + ".request");
        mc2 = createQueueConsumer(TEST_DESTINATION_NAME + ".request");
        mc1.setMessageListener(new MyMessageListener());
        mc2.setMessageListener(new MyMessageListener());
    }

    @Override
    @After
    public void tearDown() throws Exception {
        MyMessageListener l1 = (MyMessageListener)mc1.getMessageListener();
        l1.close();
        mc1.close();
        MyMessageListener l2 = (MyMessageListener)mc2.getMessageListener();
        l2.close();
        mc2.close();
        super.tearDown();
    }

    /**
     * Test to verify that when using the consumer listener for the InOut
     * producer we get the correct message back.
     *
     * @throws Exception
     */
    @Test
    public void testInOutQueueProducer() throws Exception {

        ExecutorService executor = Executors.newFixedThreadPool(2);

        for (int i = 1; i <= 5000; i++) {
            final int tempI = i;
            Runnable worker = new Runnable() {

                @Override
                public void run() {
                    try {
                        final String requestText = "Message " + tempI;
                        final String responseText = "Response Message " + tempI;
                        String response = template.requestBody("direct:start", requestText, String.class);
                        assertNotNull(response);
                        assertEquals(responseText, response);
                    } catch (Exception e) {
                        log.error("TODO Auto-generated catch block", e);
                    }
                }
            };
            executor.execute(worker);
        }
        while (context.getInflightRepository().size() > 0) {
            Thread.sleep(100);
        }
        executor.shutdown();
        while (!executor.isTerminated()) {
            Thread.sleep(100);
        }
    }

    /**
     * @see org.apache.camel.test.junit4.CamelTestSupport#createRouteBuilder()
     *
     * @return
     *
     * @throws Exception
     */
    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() {
                from("direct:start")
                    .to("log:" + TEST_DESTINATION_NAME + ".in.log?showBody=true")
                    .inOut("sjms:queue:" + TEST_DESTINATION_NAME + ".request" + "?namedReplyTo="
                               + TEST_DESTINATION_NAME
                               + ".response&consumerCount=10&producerCount=20&synchronous=false").threads(20)
                    .to("log:" + TEST_DESTINATION_NAME + ".out.log?showBody=true");
            }
        };
    }

    protected class MyMessageListener implements MessageListener {
        private MessageProducer mp;

        @Override
        public void onMessage(Message message) {
            try {
                TextMessage request = (TextMessage)message;
                String text = request.getText();

                TextMessage response = getSession().createTextMessage();
                response.setText("Response " + text);
                response.setJMSCorrelationID(request.getJMSCorrelationID());
                if (mp == null) {
                    mp = getSession().createProducer(message.getJMSReplyTo());
                }
                mp.send(response);
            } catch (JMSException e) {
                fail(e.getLocalizedMessage());
            }
        }

        public void close() throws JMSException {
            mp.close();
        }
    }
}


text:
"use strict";
const collide = require('box-collide');
const request = require('request');
const util = require('util');
const Disc = require('./Disc.js');
const Player = require('./Player.js');

var auth_server = "localhost";

const gameProperties = {
    screenWidth: 640,
    screenHeight: 360,

    dashSize: 5,

    discRadius: 10,
    discStartDelay: 2,

    scoreToWin: 2,
    scoreToWinSet: 3,
};

function collideDiscWithPlayer(disc, player) {
    let box_disc = {
        x: disc.x - (disc.radius / 2),
        y: disc.y - (disc.radius / 2),
        width: disc.radius,
        height: disc.radius,
    };
    let box_p = {
        x: player.x - (player.width / 2),
        y: player.y - (player.width / 2),
        width: player.width,
        height: player.height,
    };

    return !!(collide(box_disc, box_p) && ( (disc.z > 1 && player.jumping) || (disc.z >= player.z - 0.5 && disc.z <= player.z + 0.5) ));
}
/**
 * @param {integer} n_space - limit space in room.
 * @param {string} token - token for connection with authentication server.
 * @constructor
 */
function Room(n_space, token) {
    this.token = token;
    this.players_room = [];
    this.socket_users = [];
    this.space = n_space;
    this.disc = new Disc(10);
    this.disc.pause();
    this.first = Math.floor(Math.random() * 2);
    this.scoreLeft = 0;
    this.scoreRight = 0;
    this.lastUpdate = 0;
    this.time_disc_paused = 0;
    this.next_round = false;
    this.updating = false;
    this.started = false;
    this.setLeft = 0;
    this.setRight = 0;
}
/**
 * @returns {boolean} - True if no user can be added.
 */
Room.prototype.isFull = function() {
  return this.players_room.length == this.space;
};
/**
 * Start the game.
 * @param {string} startSide - Specifies which side the disc will be sent first.
 */
Room.prototype.start = function (startSide) {
    if (this.players_room.length != this.space){
        console.log("The party can't start because room is not full");
        return;
    }
    this.disc.specialMode = false;
    this.disc.pause();
    this.time_disc_paused = new Date().getTime() + 3000;
    this.next_round = true;
    if (typeof(startSide) == 'undefined')
        startSide = Math.floor(Math.random()) ? 'left': 'right';

    let target_x = gameProperties.screenWidth / 4;
    if (startSide == 'left')
        target_x = gameProperties.screenWidth * 0.75;

    let vel_x = (target_x - gameProperties.screenWidth / 2) / 120;
    let vel_y = (gameProperties.screenHeight / 2) / 120;

    this.disc.setPos({x: gameProperties.screenWidth / 2, y: gameProperties.screenHeight - this.disc.radius, z: 1});
    this.disc.setVel({x: vel_x, y: vel_y, z: 5 / 60});

    // Send start signal to players
    this.socket_users.forEach(function (socket) {
        socket.emit('start game');
    });
    this.started = true;
};
/**
 *
 * @param {object} user - User's information to add in room.
 * @returns {boolean} - True if user was successfully added.
 */
Room.prototype.addUser = function (user) {
    if (this.players_room.length < this.space) {
        let side = 'left';
        let start_x = gameProperties.screenWidth / 4;
        if (this.players_room.length % 2) {
            side = 'right';
            start_x = gameProperties.screenWidth * 0.75;
        }

        if (user.pseudo != 'IA')
            this.socket_users.push(user);

        this.players_room.push(new Player(user.pseudo, start_x, gameProperties.screenHeight / 2, 60, 60, side));

        // Send players_room information
        for (let i = 0; i < this.socket_users.length; i++) {
            const socket = this.socket_users[i];
            socket.emit('new player', {'id': user.pseudo, date:new Date().getTime()});
            if (user.pseudo != 'IA' && socket.id != user.id) {
                user.emit('new player', {'id': socket.pseudo, date:new Date().getTime()});
            }
        }
        return true;
    }
    return false;
};
/**
 * Remove the user with pseudo from the room.
 * @param pseudo - User's pseudo
 */
Room.prototype.removeUser = function (socket) {
    if(this.started) {
        for (let i = 0; i < this.players_room.length; i++) {
            if(this.players_room[i].id != socket.pseudo) {
                // Send end game signal with player_id winner
                this.endGame(this.players_room[i].id);
            }
        }
    } else {
        for (let i = 0; i < this.players_room.length; i++) {
            const player = this.players_room[i];
            if (player.id == socket.pseudo) {
                this.players_room.splice(i, 1);
            }
        }

        for (let i = 0; i < this.socket_users.length; i++) if (this.socket_users[i].pseudo == socket.pseudo) {
            this.socket_users[i].emit('end game', '');
            delete this.socket_users.splice(i, 1);
        }
    }
};
/**
 * Get the user by pseudo.
 * @param pseudo - User's pseudo.
 * @returns {*}
 */
Room.prototype.getPlayerById = function (pseudo) {
    for (let i = 0; i < this.players_room.length; i++) {
        const player = this.players_room[i];
        if (player.id == pseudo)
            return player;
    }
};
/**
 *
 */
Room.prototype.update = function () {
    if (this.started != true)
        return;

    if (this.lastUpdate == 0) {
        // Init last update
        this.lastUpdate = new Date().getTime();
    }

    if (this.updating == false) {
        this.updating = true;
        // Define how much simulation should be done
        const time = new Date().getTime();
        const dif_time = time - this.lastUpdate;
        const n_cycle = dif_time / 34;

        for (let cycle = 0; cycle < n_cycle; cycle++) {
            // BALL
            if (this.next_round && (this.lastUpdate > this.time_disc_paused)) {
                this.disc.start();
                this.next_round = false;
            }

            // Collisions between Player and disc
            if (this.disc.isMoving()) {
                for (let j = 0; j < this.players_room.length; j++) {
                    let player = this.players_room[j];
                    if (collideDiscWithPlayer(this.disc, player)) {
                        this.disc.setSpecialMode(false);
                        if (player.countering && this.disc.velocityZ == 0) {
                            const disc_vel = this.disc.getVel();
                            this.disc.setVel({
                                x: disc_vel.velocityX * 1.2,
                                y: disc_vel.velocityY * 1.2,
                                z: 0
                            });
                            this.disc.reverseVelocityX();
                            this.disc.reverseVelocityY();
                            player.countering = false;
                        } else {
                            this.disc.pause();
                            this.disc.x = player.x;
                            this.disc.y = player.y;
                            this.disc.z = 1;
                            player.take_disc(this.disc);
                        }
                    }
                }
            }

            // Disc
            this.disc.update();

            // IA action
            for (let i = 0; i < this.players_room.length; i++) {
                let player = this.players_room[i];
                if (player.id == "IA") {
                    const newCmd = {up: false, down: false, left: false, right: false, cmd: -1};
                    if (player.holding) {
                        // If IA hold the disc
                        if (Math.random() * 100 > 60)
                            newCmd.cmd = Math.floor((Math.random() * 3) - 1);
                        newCmd.cmd = 2;
                        let move_cmd = Math.floor((Math.random() * 3));
                        if (move_cmd == 0) {
                            newCmd.up = true;
                        } else if (move_cmd == 1) {
                            newCmd.down = true;
                        }

                        move_cmd = Math.floor((Math.random() * 3));
                        if (move_cmd == 0) {
                            newCmd.left = true;
                        } else if (move_cmd == 1) {
                            newCmd.right = true;
                        }

                    } else {
                        if (this.disc.x <= gameProperties.screenWidth / 2) {
                            // If disc on the other side
                            //  Replace IA in field's center
                            if (player.x < (gameProperties.screenWidth * 0.75 - 5)) {
                                newCmd.right = true;
                            } else if (player.x > (gameProperties.screenWidth * 0.75 + 5)) {
                                newCmd.left = true;
                            }
                            if (player.y < (gameProperties.screenHeight / 2 - 5)) {
                                newCmd.down = true;
                            } else if (player.y > (gameProperties.screenHeight / 2 + 5)) {
                                newCmd.up = true;
                            }
                        } else {

                            //  Follow the ball
                            if (this.disc.y > player.y) {
                                newCmd.down = true;
                            } else if (this.disc.y < player.y) {
                                newCmd.up = true;
                            }
                            if (this.disc.x < player.x) {
                                newCmd.left = true;
                            } else if (this.disc.x > player.x) {
                                newCmd.right = true;
                            }

                            const a = Math.pow(this.disc.x - player.x, 2);
                            const b = Math.pow(this.disc.y - player.y, 2);
                            const dist = Math.sqrt(a + b);
                            if (dist > 150) { // Approximation => define more precisely
                                newCmd.cmd = Math.floor((Math.random() * 3)) - 1;
                            }
                        }
                    }
                    player.updateCmd(newCmd);
                }
            }

            // Players action
            for (let i = 0; i < this.players_room.length; i++) {
                let player = this.players_room[i];
                if (player.holding) {
                    if (player.cmd == 0 || player.holding_time + 3000 <= new Date().getTime() ) {
                        player.throwDisc(this.disc);
                        if (Math.sign(this.disc.velocityX) * this.disc.velocityX > player.power
                        || this.disc.velocityY > 3.5
                        || this.disc.velocityY < -3.5) {
                            this.socket_users.forEach(function (socket) {
                                socket.emit('perfect throw', { id: player.id });
                            });
                        }
                    } else if (player.cmd == 1) {
                        player.lobDisc({
                            height: gameProperties.screenHeight,
                            width: gameProperties.screenWidth
                        });

                    } else if (player.cmd == 2) {
                        // technique special
                        player.specialBlow(this.disc);
                    }
                } else {
                    if (player.cmd == 0) {
                        if(player.dash()) {
                            this.socket_users.forEach(function (socket) {
                                socket.emit('dash', player.id);
                            });
                        }
                        // Command jump
                    //} else if(player.cmd == 1) {
                      //  player.jump();
                    } else if (player.cmd == 2) {
                        player.counter();
                    }
                }
                player.update();
            }

            // ##### COLLISIONS #####
            // Players and border
            for (let i = 0; i < this.players_room.length; i++) {
                let player = this.players_room[i];
                if (player.side == 'left') {
                    if (player.x < player.width / 2) {
                        player.x = (player.width / 2);
                    } else if (player.x > (gameProperties.screenWidth / 2) - (player.width / 2) - 5) {
                        player.x = ((gameProperties.screenWidth / 2) - (player.width / 2) - 5);
                    }
                } else if (player.side == 'right') {
                    if (player.x < (gameProperties.screenWidth / 2) + (player.width / 2) + 5) {
                        player.x = ((gameProperties.screenWidth / 2) + (player.width / 2) + 5);
                    } else if (player.x > gameProperties.screenWidth - player.width) {
                        player.x = (gameProperties.screenWidth - player.width);
                    }
                }
                if (player.y < player.height / 2) {
                    player.y = (player.height / 2);
                } else if (player.y > gameProperties.screenHeight - (player.height / 2)) {
                    player.y = (gameProperties.screenHeight - (player.height / 2));
                }

            }

            // Disc and border
            if (this.disc.y - this.disc.radius <= 0) {
                this.disc.reverseVelocityY();
                this.disc.setY(this.disc.radius);
            } else if (this.disc.y + this.disc.radius >= gameProperties.screenHeight) {
                this.disc.reverseVelocityY();
                this.disc.setY(gameProperties.screenHeight - this.disc.radius);
            }

            const point_set = this.checkPoint();

            if (this.setRight >= 2 || this.setLeft >= 2) {
                const player_id = this.setRight >= gameProperties.scoreToWin ? this.players_room[1].id: this.players_room[0].id;
                this.endGame(player_id);
            } else if (point_set) {
                const start_side = this.disc.x > gameProperties.screenWidth / 2 ? 'left' : 'right';
                this.start(start_side);
            }
        }

        const toUpdate = {
            players: [],
            disc: []
        };

        // Send new values to clients
        this.players_room.forEach(function (player) {
            toUpdate.players.push({id: player.id, x: player.x, y: player.y, powerGauge: player.powerGauge})
        });
        toUpdate.disc.push({x: this.disc.x, y: this.disc.y, z: this.disc.z});
        this.socket_users.forEach(function (socket) {
            socket.emit('update', toUpdate);
        });

        // If disc is in lob, send target
        if (this.disc.z > 1) {
            const next_disc_pos = this.disc.getNextPos(45);
            if (next_disc_pos.y <= this.disc.radius) {
                next_disc_pos.y = this.disc.radius;
            } else if (next_disc_pos.y + this.disc.radius >= gameProperties.screenHeight) {
                next_disc_pos.y = gameProperties.screenHeight - this.disc.radius;
            }
            this.socket_users.forEach(function (socket) {
                socket.emit('next pos disc', {x: next_disc_pos.x, y: next_disc_pos.y});
            });
        }

        if (dif_time > 34) {
            this.lastUpdate = time;
        }

        this.updating = false;
    }
};
/**
 * Update score and check if the game is end.
 * If not, replace the disc with new values.
 * @returns {boolean} - True if point set.
 */
Room.prototype.checkPoint = function () {

    if (this.disc.x < 0 || this.disc.x > gameProperties.screenWidth || this.disc.z < 0.1) {

        //console.log("disc x: " + this.disc.x + " disc z:  " + this.disc.z);
        if (this.disc.x > gameProperties.screenWidth / 2) {
            this.scoreLeft++;
        } else {
            this.scoreRight++;
        }

        // Check set
        if (this.scoreLeft >= gameProperties.scoreToWinSet || this.scoreRight >= gameProperties.scoreToWinSet) {
            if (this.scoreLeft >= gameProperties.scoreToWinSet)
                this.setLeft++;
            else
                this.setRight++;

            this.scoreLeft = 0;
            this.scoreRight = 0;

            for (let i_socket = 0; i_socket < this.socket_users.length; i_socket++) {
                let socket = this.socket_users[i_socket];
                socket.emit('update set', {left: this.setLeft, right: this.setRight});
            }
            util.log("Set " + this.setLeft + ':' + this.setRight);
        }

        for (let i_socket = 0; i_socket < this.socket_users.length; i_socket++) {
            let socket = this.socket_users[i_socket];
            socket.emit('update score', {left: this.scoreLeft, right: this.scoreRight});
        }
        util.log("Score " + this.scoreLeft + ':' + this.scoreRight);
        return true;
    }
    return false;
};
/**
 * Send messages to all users to inform that game is over.
 * @param player_id
 */
Room.prototype.endGame = function (player_id) {
    const message = 'The player ' + player_id + ' win the game !';
    this.socket_users.forEach(function (socket) {
        socket.emit('end game', message);
        let victory = false;
        if(player_id == socket.pseudo) {
            victory = true;
        }
        request.post({
                url:'http://' + auth_server + ':8081/api/points',
                form: {
                    name: socket.pseudo,
                    victory: victory,
                    token: this.token
                }
            },
            function(err, httpResponse, body) {
                if(err) {
                    console.log("Can't change user points");
                } else {
                    console.log(body);
                }
        });
    }, this);

    this.players_room = [];
    this.socket_users = [];
    this.disc.pause();
    this.first = Math.floor(Math.random() * 2);
    this.scoreLeft = 0;
    this.scoreRight = 0;
    this.lastUpdate = 0;
    this.time_disc_paused = 0;
    this.next_round = false;
    this.updating = false;
    this.started = false;
    this.setLeft = 0;
    this.setRight = 0;
};
/**
 * @type {Room}
 */
module.exports = Room;


text:
<paper-dialog id="dialog" with-backdrop>

[[localize('feedback_h1')]]

      <paper-icon-item>
        <iron-icon icon="ycons:info" slot="item-icon"></iron-icon>
        <paper-item-body two-line>

[[localize('feedback_faq')]]

[[localize('feedback_english')]]

        </paper-item-body>
      </paper-icon-item>

      <paper-icon-item>
        <iron-icon icon="ycons:email" slot="item-icon"></iron-icon>
        <paper-item-body two-line>

[[localize('feedback_email')]]

[[localize('feedback_polish-english')]]

        </paper-item-body>
      </paper-icon-item>

      <paper-icon-item>
        <iron-icon icon="ycons:bug-report" slot="item-icon"></iron-icon>
        <paper-item-body two-line>

[[localize('feedback_github')]]

[[localize('feedback_english')]]

        </paper-item-body>
      </paper-icon-item>

    <paper-button dialog-dismiss>[[localize('cancel')]]</paper-button>

</paper-dialog>


text:
uniformer
=======

[![Dependency Status](https://david-dm.org/bengreenier/uniformer.png)](https://david-dm.org/bengreenier/uniformer)

[![Build Status](https://travis-ci.org/bengreenier/uniformer.png?branch=master)](https://travis-ci.org/bengreenier/uniformer)

returns a key-value object from combined config file/argv values.

## Changelog
v0.0.5
+ Fixed bug with number parsing where you'd get a Number object, instead of a number literal.

v0.0.3

+ Added support for a passed object `defaults` that is overriden by both file and argv sources
+ fixed `file` and `config` path matching, to work cross platform abs/rel using [path-resolver](https://github.com/bengreenier/path-resolver)

v0.0.2

+ Added support for `--config` and `-config`.
+ This overrides the passed `file` parameter
+ If users are told to use `--config path/to/config.ext` you can pass no arguments

v0.0.1

+ Basic functionality
+ merge argv and config values
+ quick and easy

## How?

Just `npm install uniformer` and then call `require('uniformer')(opts);`

check out the examples below.

## options

__uniformer takes an options object__.

```
{
  file:'path/to/config.(json|yaml)'
}
```
for instance:
```
{
  file:'config.json'
}
```
if you don't specify a file option, uniformer pulls its data from `process.argv`. If you specify both,
the config file values will be overriden by `process.argv` values.

## examples

it's super easy to use...__without config__:

```
var uniformer = require('uniformer');
var normalizedOptionsObject = uniformer();
```
will return `{machines:['server01','server02','localhost']}` when your application is called like this:
```
$ node application.js --machines server01 server02 localhost
```
or
```
$ node application.js -machines server01 server02 localhost
```

or __with config__:

```
var uniformer = require('uniformer');
var normalizedOptionsObject = uniformer({file:'config.json'}); //this could be a json OR yaml file
//you call also just leave file: out (ie just call uniformer()), and if the user wants to use a config file they can specify --config path/to/file.ext
```
with a config.json that looks like:
```
{
  "machines":['server01','server02','localhost']
}
```
will return `{machines:['server01','server02','localhost']}` when your application is called like this:
```
$ node application.js
```
or will return `{machines:['server01','server02','localhost'],deploy:true}` when called like:
```
$ node application.js --deploy true
```

you can [peruse the tests](https://github.com/b3ngr33ni3r/uniformer/blob/master/tests) to learn a bit more.

## More stuff?

You can read the [issues](https://github.com/b3ngr33ni3r/uniformer/issues) to see what I want [todo](https://github.com/b3ngr33ni3r/uniformer/issues?labels=todo).

the [license](https://github.com/b3ngr33ni3r/uniformer/blob/master/LICENSE) is MIT.


text:
namespace StudentsAndWorkers
{
    using System;

    public class Worker : Human
    {
        private const int workDaysPerWeek = 5;

        private decimal weekSalary;
        private double workHoursPerDay;

        public Worker(string firstName, string lastName, decimal weekSalary, double workHoursPerDay)
            : base(firstName, lastName)
        {
            this.WeekSalary = weekSalary;
            this.WorkHoursPerDay = workHoursPerDay;
        }

        public decimal WeekSalary
        {
            get { return this.weekSalary; }
            private set
            {
                if (value <= 0)
                {
                    throw new ArgumentException("Man, you're f****d - salary should not be less than zero.");
                }
                this.weekSalary = value;
            }
        }

        public double WorkHoursPerDay
        {
            get { return this.workHoursPerDay; }
            private set
            {
                if (value > 10 || value <= 0)
                {
                    throw new ArgumentException("Work hours per day must not exceed 10 and can not be less than zero.");
                }
                this.workHoursPerDay = value;
            }
        }

        public decimal HourWage()
        {
            decimal hourWage = 0.0M;

            decimal totalWorkHoursPerWeek = (decimal)(this.WorkHoursPerDay * workDaysPerWeek);

            hourWage = this.WeekSalary / totalWorkHoursPerWeek;

            return hourWage;
        }

        public override string ToString()
        {
            return string.Format("{0} {1}, Hourly wage: {2:C}\nWeek salary: {3:C}, Daily work hours: {4}",
                this.FirstName, this.LastName, this.HourWage(), this.WeekSalary, this.WorkHoursPerDay);
        }
    }
}


text:
import { set, keys, select } from 'd3';

export default function makeDropdownControl(control, control_wrap) {
    let mainOption = control.option || control.options[0];
    let changer = control_wrap
        .append('select')
        .attr('class', 'changer')
        .attr('multiple', control.multiple ? true : null)
        .datum(control);

    let opt_values = control.values && control.values instanceof Array
        ? control.values
        : control.values
          ? set(this.data.map(m => m[this.targets[0].config[control.values]])).values()
          : keys(this.data[0]);

    if (!control.require || control.none) {
        opt_values.unshift('None');
    }

    let options = changer
        .selectAll('option')
        .data(opt_values)
        .enter()
        .append('option')
        .text(d => d)
        .property('selected', d => {
            return this.stringAccessor(this.targets[0].config, mainOption) === d;
        });

    changer.on('change', d => {
        let value = changer.property('value') === 'None' ? null : changer.property('value');

        if (control.multiple) {
            value = options
                .filter(function(f) {
                    return select(this).property('selected');
                })[0]
                .map(m => select(m).property('value'))
                .filter(f => f !== 'None');
        }

        if (control.options) {
            this.changeOption(control.options, value, control.callback, control.draw);
        } else {
            this.changeOption(control.option, value, control.callback, control.draw);
        }
    });

    return changer;
}


text:
package com.kevinquan.cwa.model.creatures.rainbow;

import com.kevinquan.cwa.model.creatures.AbstractCreatureCard;

public abstract class AbstractRainbowCreature extends AbstractCreatureCard {

    @SuppressWarnings("unused")
    private static final String TAG = AbstractRainbowCreature.class.getSimpleName();

    protected AbstractRainbowCreature(String name, int cost, Rarity rarity) {
        super(name, cost, Faction.Rainbow, rarity);
    }

}


text:
from _ast import alias
from pydoc_data import topics

import facebook
import json
import ast
import mechanize
import re
import csv
import string
import cookielib
import sys
import time

# print graph.request(id + "/picture")
browser = mechanize.Browser()
browser.set_handle_robots(False)
cookie_jar = cookielib.LWPCookieJar()
browser.set_cookiejar(cookie_jar)
browser.set_handle_equiv(True)
browser.set_handle_redirect(True)
browser.set_handle_referer(True)
browser.set_handle_robots(False)
browser.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)
browser.addheaders = [('User-agent',
                       'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7')]
# browser.open("http://www.facebook.com/" + id)
# browser.set_proxies({'http':'notional-sign-110911.appspot.com'})
browser.open("http://www.facebook.com/")
browser.select_form(nr=0)
browser.form["email"] = "indervir.banipal@utdallas.edu"
browser.form["pass"] = "utdallas@123"
browser.submit()
# return response.read()

url = "http://www.facebook.com/100010856658863"
url = browser.open(url)
response = url.read()
lines = response.split("\n")
dict = {}
for line in lines:
    if "Followed by" in line:
        line = line.split("Followed by")[0]
    if "Former" in line or "Studies at " in line or "Studied or " in line or "Lives in " in line or "From " in line:
            line = re.sub("<[^>]*>", " ", line)
            line = string.replace(line, "Intro", "")
            line = string.replace(line, "-->", "")
            line = string.replace(line, "  ", " ")
            line = line.strip()
            lines = line.split("        ")
            current = []
            past = []
            past_worked = []
            went_to = []
            studying = []
            studied = []
            stays = []
            home = []
            for str in lines:
                if str.startswith("Former "):
                    str = str.split("Former ")[1]
                    past.append(str)
                elif str.startswith("Worked at "):
                    str = str.split("Worked at ")[1]
                    past_worked.append(str)
                elif str.startswith("Went to "):
                    str = str.split("Went to ")[1]
                    went_to.append(str)
                elif str.startswith("Studies "):
                    str = str.split("Studies ")[1]
                    studying.append(str)
                elif str.startswith("Studied "):
                    str = str.split("Studied ")[1]
                    studied.append(str)
                elif str.startswith("Lives in "):
                    str = str.split("Lives in ")[1]
                    stays.append(str)
                elif str.startswith("From ") or "From " in str:
                    str = str.split("From ")[1]
                    home.append(str)
                else:
                    current.append(str)
            dict["current"] = current
            dict["past"] = past
            dict["past_worked"] = past_worked
            dict["went_to"] = went_to
            dict["studying"] = studying
            dict["studied"] = studied
            dict["stays"] = stays
            dict["home"] = home
            print dict


text:
require 'watchy/database'
require 'watchy/config'
require 'watchy/thisdir'

module Watchy

  VALID_COMMANDS = %w{ next replay reset list help config }

  HELP = <<-HELP
    Watchy 0.1 - written by Ivan Kocienski (c) 2011 - GPL

    Usage:
      watchy command (option)

    Where command may be:
      next - watch the next episode
      replay - watch last played episode again
      reset (n) - jump back to start or n if provided
      list - shows the list of episodes
      help - this help
  HELP

  class Owwie < StandardError; end

  extend self

  def command(args)
    action = (args.shift || '<empty>').downcase

    raise Owwie.new("Did not recognise '#{action}' as a valid action") unless VALID_COMMANDS.include?(action)

    send action.to_sym, args
    return 0

  rescue Owwie => ow
    puts "something went wrong: #{ow}"
    return -1
  end

private

  def next(args)

    if play(dir_files[current_pos])
      current_pos += 1
    else
      puts "command failed, leaving play position at #{database.state(thisdir.key)}"
    end
  end

  def replay(args)
    play dir_files[current_pos]
  end

  def reset(args)
    set_pos args.shift
  end

  def list(args)
    dir_files.each do |name, index|
      marker = (i == current_pos) ? "->" : "  "
      puts "#{marker} %3d #{name}" % [ index ]
    end
  end

  def config(args)
    if args.empty?
      app_config.print
    else
      app_config.set args
    end
  end

  def help(args)
    puts HELP
  end

private # second order abstraction

  def dir_files
    thisdir.files
  end

  def play(filename)
    system(app_config.play_command, filename)
  end

  def current_pos
    database[dir_key]
  end

  def current_pos=(value)
    database[dir_key] = value.to_i
  end

  def dir_key
    thisdir.key
  end

private # first order abstraction

  def database
    @databse ||= Database.new
  end

  def app_config
    @config ||= Config.new
  end

  def this_dir
    @this_dir ||= ThisDir.new Dir.getwd
  end

  def verify_state_dir
    Dir.mkdir state_dir_path unless Dir.exist?(state_dir_path)
  end

  def state_dir_path(filename = nil)
    args = [ ENV['HOME'], '.watchy' ]
    args << filename unless filename.nil?
    File.join *args
  end
end


text:
using System.Collections.Generic;

namespace Azure.Management.Network.Models
{
    /// <summary> An Ssl predefined policy. </summary>
    public partial class ApplicationGatewaySslPredefinedPolicy : SubResource
    {
        /// <summary> Initializes a new instance of ApplicationGatewaySslPredefinedPolicy. </summary>
        public ApplicationGatewaySslPredefinedPolicy()
        {
        }

        /// <summary> Initializes a new instance of ApplicationGatewaySslPredefinedPolicy. </summary>
        /// <param name="id"> Resource ID. </param>
        /// <param name="name"> Name of the Ssl predefined policy. </param>
        /// <param name="cipherSuites"> Ssl cipher suites to be enabled in the specified order for application gateway. </param>
        /// <param name="minProtocolVersion"> Minimum version of Ssl protocol to be supported on application gateway. </param>
        internal ApplicationGatewaySslPredefinedPolicy(string id, string name, IList<ApplicationGatewaySslCipherSuite> cipherSuites, ApplicationGatewaySslProtocol? minProtocolVersion) : base(id)
        {
            Name = name;
            CipherSuites = cipherSuites;
            MinProtocolVersion = minProtocolVersion;
        }

        /// <summary> Name of the Ssl predefined policy. </summary>
        public string Name { get; set; }
        /// <summary> Ssl cipher suites to be enabled in the specified order for application gateway. </summary>
        public IList<ApplicationGatewaySslCipherSuite> CipherSuites { get; set; }
        /// <summary> Minimum version of Ssl protocol to be supported on application gateway. </summary>
        public ApplicationGatewaySslProtocol? MinProtocolVersion { get; set; }
    }
}


text:
use spec::{LinkerFlavor, Target, TargetResult};

// See https://developer.android.com/ndk/guides/abis.html#x86
// for target ABI requirements.

pub fn target() -> TargetResult {
    let mut base = super::android_base::opts();

    base.max_atomic_width = Some(64);

    // http://developer.android.com/ndk/guides/abis.html#x86
    base.cpu = "pentiumpro".to_string();
    base.features = "+mmx,+sse,+sse2,+sse3,+ssse3".to_string();
    base.stack_probes = true;

    Ok(Target {
        llvm_target: "i686-linux-android".to_string(),
        target_endian: "little".to_string(),
        target_pointer_width: "32".to_string(),
        target_c_int_width: "32".to_string(),
        data_layout: "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128".to_string(),
        arch: "x86".to_string(),
        target_os: "android".to_string(),
        target_env: String::new(),
        target_vendor: "unknown".to_string(),
        linker_flavor: LinkerFlavor::Gcc,
        options: base,
    })
}