text:
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace Bandeira.Models
{
    public class Dados
    {
        [Required(ErrorMessage = "Favor, insira uma URL")]
        public string URL { get; set; }

        public bool exibir { get; set; }

        public readonly string Diretorio = "C:/TestaArquivosOnline";
    }
}

redpajama_set_name: RedPajamaGithub


text:
    // Hook into SGI's __type_traits class, this will pick up user supplied
    // specializations as well as SGI - compiler supplied specializations.
#   include <boost/type_traits/is_same.hpp>
#   ifdef __NetBSD__
      // There are two different versions of type_traits.h on NetBSD on Spark
      // use an implicit include via algorithm instead, to make sure we get
      // the same version as the std lib:
#     include <algorithm>
#   else
#    include <type_traits.h>
#   endif
#   define BOOST_IS_POD(T) ::boost::is_same< typename ::__type_traits<T>::is_POD_type, ::__true_type>::value
#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_default_constructor, ::__true_type>::value
#   define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_copy_constructor, ::__true_type>::value
#   define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_assignment_operator, ::__true_type>::value
#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_destructor, ::__true_type>::value

#   ifdef __sgi
#      define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#   endif
#endif

#if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000)
    // Metrowerks compiler is acquiring intrinsic type traits support
    // post version 8.  We hook into the published interface to pick up
    // user defined specializations as well as compiler intrinsics as
    // and when they become available:
#   include <msl_utility>
#   define BOOST_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union<T>::value
#   define BOOST_IS_POD(T) BOOST_STD_EXTENSION_NAMESPACE::is_POD<T>::value
#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_default_ctor<T>::value
#   define BOOST_HAS_TRIVIAL_COPY(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_copy_ctor<T>::value
#   define BOOST_HAS_TRIVIAL_ASSIGN(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_assignment<T>::value
#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_dtor<T>::value
#   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif

#if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\
         || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500))
//
// Note that even though these intrinsics rely on other type traits classes
// we do not #include those here as it produces cyclic dependencies and
// can cause the intrinsics to not even be used at all!
//
#   define BOOST_IS_UNION(T) __is_union(T)
#   define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T))
#   define BOOST_IS_EMPTY(T) __is_empty(T)
#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
#   define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ( ::boost::is_pod<T>::value && ! ::boost::is_const<T>::value && !::boost::is_volatile<T>::value))
#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::is_pod<T>::value)
#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::has_trivial_constructor<T>::value)
#if !defined(BOOST_INTEL)
#   define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) || ::boost::has_trivial_copy<T>::value) && !is_array<T>::value)
#   define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) || ::boost::is_pod<T>::value)
#elif (_MSC_VER >= 1900)
#   define BOOST_HAS_NOTHROW_COPY(T) ((__is_nothrow_constructible(T, typename add_lvalue_reference<typename add_const<T>::type>::type)) && !is_array<T>::value)
#   define BOOST_HAS_TRIVIAL_COPY(T) (__is_trivially_constructible(T, typename add_lvalue_reference<typename add_const<T>::type>::type))
#endif
#   define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::has_trivial_assign<T>::value)
#   define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)

#   define BOOST_IS_ABSTRACT(T) __is_abstract(T)
#   define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
#   define BOOST_IS_CLASS(T) __is_class(T)
#   define BOOST_IS_CONVERTIBLE(T,U) ((__is_convertible_to(T,U) || (is_same<T,U>::value && !is_function<U>::value)) && !__is_abstract(U))
#   define BOOST_IS_ENUM(T) __is_enum(T)
//  This one fails if the default alignment has been changed with /Zp:
//  #   define BOOST_ALIGNMENT_OF(T) __alignof(T)

#   if defined(_MSC_VER) && (_MSC_VER >= 1800)
#       define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__is_trivially_constructible(T, T&&) || boost::is_pod<T>::value) && ! ::boost::is_volatile<T>::value && ! ::boost::is_reference<T>::value)
#       define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__is_trivially_assignable(T, T&&) || boost::is_pod<T>::value) && ! ::boost::is_const<T>::value && !::boost::is_volatile<T>::value && ! ::boost::is_reference<T>::value)
#   elif defined(_MSC_VER) && (_MSC_VER >= 1700)
#       define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || boost::is_pod<T>::value) && ! ::boost::is_volatile<T>::value && ! ::boost::is_reference<T>::value)
#       define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || boost::is_pod<T>::value) && ! ::boost::is_const<T>::value && !::boost::is_volatile<T>::value && ! ::boost::is_reference<T>::value)
#   endif
#ifndef BOOST_NO_CXX11_FINAL
//  This one doesn't quite always do the right thing on older VC++ versions
//  we really need it when the final keyword is supported though:
#   define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
#endif
#if _MSC_FULL_VER >= 180020827
#   define BOOST_IS_NOTHROW_MOVE_ASSIGN(T) (__is_nothrow_assignable(T&, T&&))
#   define BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) (__is_nothrow_constructible(T, T&&))
#endif
#if _MSC_VER >= 1800
#   define BOOST_IS_FINAL(T) __is_final(T)
#endif
#   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif

#if defined(__DMC__) && (__DMC__ >= 0x848)
// For Digital Mars C++, www.digitalmars.com
#   define BOOST_IS_UNION(T) (__typeinfo(T) & 0x400)
#   define BOOST_IS_POD(T) (__typeinfo(T) & 0x800)
#   define BOOST_IS_EMPTY(T) (__typeinfo(T) & 0x1000)
#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__typeinfo(T) & 0x10)
#   define BOOST_HAS_TRIVIAL_COPY(T) (__typeinfo(T) & 0x20)
#   define BOOST_HAS_TRIVIAL_ASSIGN(T) (__typeinfo(T) & 0x40)
#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__typeinfo(T) & 0x8)
#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__typeinfo(T) & 0x80)
#   define BOOST_HAS_NOTHROW_COPY(T) (__typeinfo(T) & 0x100)
#   define BOOST_HAS_NOTHROW_ASSIGN(T) (__typeinfo(T) & 0x200)
#   define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) (__typeinfo(T) & 0x4)
#   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif

#if defined(BOOST_CLANG) && defined(__has_feature) && !defined(__CUDACC__)
//
// Note that these intrinsics are disabled for the CUDA meta-compiler as it appears
// to not support them, even though the underlying clang compiler does so.
// This is a rubbish fix as it basically stops type traits from working correctly,
// but maybe the best we can do for now.  See https://svn.boost.org/trac/boost/ticket/10694
//
//
// Note that even though these intrinsics rely on other type traits classes
// we do not #include those here as it produces cyclic dependencies and
// can cause the intrinsics to not even be used at all!
//
#   include <cstddef>

#   if __has_feature(is_union)
#     define BOOST_IS_UNION(T) __is_union(T)
#   endif
#   if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod)
#     define BOOST_IS_POD(T) __is_pod(T)
#   endif
#   if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty)
#     define BOOST_IS_EMPTY(T) __is_empty(T)
#   endif
#   if __has_feature(has_trivial_constructor)
#     define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
#   endif
#   if __has_feature(has_trivial_copy)
#     define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value)
#   endif
#   if __has_feature(has_trivial_assign)
#     define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value && is_assignable<T&, const T&>::value)
#   endif
#   if __has_feature(has_trivial_destructor)
#     define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T)  && is_destructible<T>::value)
#   endif
#   if __has_feature(has_nothrow_constructor)
#     define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) && is_default_constructible<T>::value)
#   endif
#   if __has_feature(has_nothrow_copy)
#     define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile<T>::value && !is_reference<T>::value && is_copy_constructible<T>::value)
#   endif
#   if __has_feature(has_nothrow_assign)
#     define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value && is_assignable<T&, const T&>::value)
#   endif
#   if __has_feature(has_virtual_destructor)
#     define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
#   endif
#   if __has_feature(is_abstract)
#     define BOOST_IS_ABSTRACT(T) __is_abstract(T)
#   endif
#   if __has_feature(is_base_of)
#     define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
#   endif
#   if __has_feature(is_class)
#     define BOOST_IS_CLASS(T) __is_class(T)
#   endif
#   if __has_feature(is_convertible_to)
#     define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U)
#   endif
#   if __has_feature(is_enum)
#     define BOOST_IS_ENUM(T) __is_enum(T)
#   endif
#   if __has_feature(is_polymorphic)
#     define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
#   endif
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
#   if __has_extension(is_trivially_constructible)
#     define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__is_trivially_constructible(T, T&&) && is_constructible<T, T&&>::value && !::boost::is_volatile<T>::value)
#   endif
#   if __has_extension(is_trivially_assignable)
#     define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) (__is_trivially_assignable(T&, T&&) && is_assignable<T&, T&&>::value && !::boost::is_volatile<T>::value)
#   endif
#endif
#   if (!defined(unix) && !defined(__unix__)) || defined(__LP64__) || !defined(__GNUC__)
// GCC sometimes lies about alignment requirements
// of type double on 32-bit unix platforms, use the
// old implementation instead in that case:
#     define BOOST_ALIGNMENT_OF(T) __alignof(T)
#   endif
#   if __has_feature(is_final)
#     define BOOST_IS_FINAL(T) __is_final(T)
#   endif

#   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif

#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG)
//
// Note that even though these intrinsics rely on other type traits classes
// we do not #include those here as it produces cyclic dependencies and
// can cause the intrinsics to not even be used at all!
//

#ifdef BOOST_INTEL
#  define BOOST_INTEL_TT_OPTS || is_pod<T>::value
#else
#  define BOOST_INTEL_TT_OPTS
#endif

#   define BOOST_IS_UNION(T) __is_union(T)
#   define BOOST_IS_POD(T) __is_pod(T)
#   define BOOST_IS_EMPTY(T) __is_empty(T)
#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile<T>::value)
#   define BOOST_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_INTEL_TT_OPTS) && !is_reference<T>::value)
#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409
#   define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile<T>::value && ! ::boost::is_const<T>::value && is_assignable<T&, const T&>::value)
#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS && is_destructible<T>::value)
#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) && is_default_constructible<T>::value BOOST_INTEL_TT_OPTS)
#   define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile<T>::value && !is_reference<T>::value && is_copy_constructible<T>::value)
#   define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile<T>::value && !is_const<T>::value && is_assignable<T&, const T&>::value)
#else
#   define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile<T>::value && ! ::boost::is_const<T>::value)
#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS)
#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_INTEL_TT_OPTS)
#if ((__GNUC__ * 100 + __GNUC_MINOR__) != 407) && ((__GNUC__ * 100 + __GNUC_MINOR__) != 408)
#   define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile<T>::value && !is_reference<T>::value && !is_array<T>::value)
#endif
#   define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile<T>::value && !is_const<T>::value && !is_array<T>::value)
#endif
#   define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)

#   define BOOST_IS_ABSTRACT(T) __is_abstract(T)
#   define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
#   define BOOST_IS_CLASS(T) __is_class(T)
#   define BOOST_IS_ENUM(T) __is_enum(T)
#   define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
#   if (!defined(unix) && !defined(__unix__) && \
       !(defined(__VXWORKS__) && defined(__i386__)))  || defined(__LP64__)
      // GCC sometimes lies about alignment requirements
      // of type double on 32-bit unix platforms, use the
      // old implementation instead in that case:
#     define BOOST_ALIGNMENT_OF(T) __alignof__(T)
#   endif
#   if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))
#     define BOOST_IS_FINAL(T) __is_final(T)
#   endif

#   if (__GNUC__ >= 5) && (__cplusplus >= 201103)
#     define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) (__is_trivially_assignable(T&, T&&) && is_assignable<T&, T&&>::value && !::boost::is_volatile<T>::value)
#     define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__is_trivially_constructible(T, T&&) && is_constructible<T, T&&>::value && !::boost::is_volatile<T>::value)
#   endif

#   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif

#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)
#   define BOOST_IS_UNION(T) __oracle_is_union(T)
#   define BOOST_IS_POD(T) (__oracle_is_pod(T) && !is_function<T>::value)
#   define BOOST_IS_EMPTY(T) __oracle_is_empty(T)
#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__oracle_has_trivial_constructor(T) && ! ::boost::is_volatile<T>::value)
#   define BOOST_HAS_TRIVIAL_COPY(T) (__oracle_has_trivial_copy(T) && !is_reference<T>::value)
#   define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && ! ::boost::is_volatile<T>::value && ! ::boost::is_const<T>::value && is_assignable<T&, const T&>::value)
#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__oracle_has_trivial_destructor(T) && is_destructible<T>::value)
#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) ((__oracle_has_nothrow_constructor(T) || __oracle_has_trivial_constructor(T) || __oracle_is_trivial(T)) && is_default_constructible<T>::value)
//  __oracle_has_nothrow_copy appears to behave the same as __oracle_has_nothrow_assign, disabled for now:
//#   define BOOST_HAS_NOTHROW_COPY(T) ((__oracle_has_nothrow_copy(T) || __oracle_has_trivial_copy(T) || __oracle_is_trivial(T)) && !is_volatile<T>::value && !is_reference<T>::value && is_copy_constructible<T>::value)
#   define BOOST_HAS_NOTHROW_ASSIGN(T) ((__oracle_has_nothrow_assign(T) || __oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && !is_volatile<T>::value && !is_const<T>::value && is_assignable<T&, const T&>::value)
#   define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __oracle_has_virtual_destructor(T)

#   define BOOST_IS_ABSTRACT(T) __oracle_is_abstract(T)
//#   define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
#   define BOOST_IS_CLASS(T) __oracle_is_class(T)
#   define BOOST_IS_ENUM(T) __oracle_is_enum(T)
#   define BOOST_IS_POLYMORPHIC(T) __oracle_is_polymorphic(T)
#   define BOOST_ALIGNMENT_OF(T) __alignof__(T)
#   define BOOST_IS_FINAL(T) __oracle_is_final(T)

#   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif

#if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600)
#   include <boost/type_traits/is_same.hpp>
#   include <boost/type_traits/is_reference.hpp>
#   include <boost/type_traits/is_volatile.hpp>

#   define BOOST_IS_UNION(T) __is_union(T)
#   define BOOST_IS_POD(T) __is_pod(T)
#   define BOOST_IS_EMPTY(T) __is_empty(T)
#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
#   define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value)
#   define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value)
#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
#   define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile<T>::value && !is_reference<T>::value)
#   define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value)
#   define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)

#   define BOOST_IS_ABSTRACT(T) __is_abstract(T)
#   define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
#   define BOOST_IS_CLASS(T) __is_class(T)
#   define BOOST_IS_ENUM(T) __is_enum(T)
#   define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
#   define BOOST_ALIGNMENT_OF(T) __alignof__(T)
#   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif

# if defined(__CODEGEARC__)
#   include <boost/type_traits/is_same.hpp>
#   include <boost/type_traits/is_reference.hpp>
#   include <boost/type_traits/is_volatile.hpp>
#   include <boost/type_traits/is_void.hpp>

#   define BOOST_IS_UNION(T) __is_union(T)
#   define BOOST_IS_POD(T) __is_pod(T)
#   define BOOST_IS_EMPTY(T) __is_empty(T)
#   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T))
#   define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_reference<T>::value)
#   define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value)
#   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T))
#   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T))
#   define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile<T>::value && !is_reference<T>::value)
#   define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value)
#   define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)

#   define BOOST_IS_ABSTRACT(T) __is_abstract(T)
#   define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_void<T>::value && !is_void<U>::value)
#   define BOOST_IS_CLASS(T) __is_class(T)
#   define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible(T,U) || is_void<U>::value)
#   define BOOST_IS_ENUM(T) __is_enum(T)
#   define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
#   define BOOST_ALIGNMENT_OF(T) alignof(T)

#   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif

#endif // BOOST_TT_DISABLE_INTRINSICS

#endif // BOOST_TT_INTRINSICS_HPP_INCLUDED


text:
package com.google.ads.googleads.v12.enums;

public final class UserListNumberRuleItemOperatorProto {
  private UserListNumberRuleItemOperatorProto() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  static final com.google.protobuf.Descriptors.Descriptor
    internal_static_google_ads_googleads_v12_enums_UserListNumberRuleItemOperatorEnum_descriptor;
  static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_google_ads_googleads_v12_enums_UserListNumberRuleItemOperatorEnum_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\nHgoogle/ads/googleads/v12/enums/user_li" +
      "st_number_rule_item_operator.proto\022\036goog" +
      "le.ads.googleads.v12.enums\"\325\001\n\"UserListN" +
      "umberRuleItemOperatorEnum\"\256\001\n\036UserListNu" +
      "mberRuleItemOperator\022\017\n\013UNSPECIFIED\020\000\022\013\n" +
      "\007UNKNOWN\020\001\022\020\n\014GREATER_THAN\020\002\022\031\n\025GREATER_" +
      "THAN_OR_EQUAL\020\003\022\n\n\006EQUALS\020\004\022\016\n\nNOT_EQUAL" +
      "S\020\005\022\r\n\tLESS_THAN\020\006\022\026\n\022LESS_THAN_OR_EQUAL" +
      "\020\007B\375\001\n\"com.google.ads.googleads.v12.enum" +
      "sB#UserListNumberRuleItemOperatorProtoP\001" +
      "ZCgoogle.golang.org/genproto/googleapis/" +
      "ads/googleads/v12/enums;enums\242\002\003GAA\252\002\036Go" +
      "ogle.Ads.GoogleAds.V12.Enums\312\002\036Google\\Ad" +
      "s\\GoogleAds\\V12\\Enums\352\002\"Google::Ads::Goo" +
      "gleAds::V12::Enumsb\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        });
    internal_static_google_ads_googleads_v12_enums_UserListNumberRuleItemOperatorEnum_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_google_ads_googleads_v12_enums_UserListNumberRuleItemOperatorEnum_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_google_ads_googleads_v12_enums_UserListNumberRuleItemOperatorEnum_descriptor,
        new java.lang.String[] { });
  }

  // @@protoc_insertion_point(outer_class_scope)
}


text:
'use strict';
var buildConfig = require('./build.config.js')
  , isProd = require('yargs').argv.stage === 'prod'
  , preprocessors = {}
  , buildDir
  , buildTestDir
  , templateDir
  , jsDir;

buildDir = buildConfig.buildDir;
// add slash if missing to properly strip prefix from directive templates
if (buildDir[buildDir.length - 1] !== '/') {
  buildDir = buildDir + '/';
}

buildTestDir = buildConfig.buildTestDir;
// add slash if missing to properly strip prefix from directive templates
if (buildTestDir[buildTestDir.length - 1] !== '/') {
  buildTestDir = buildTestDir + '/';
}

templateDir = buildTestDir + 'templates/';

jsDir = buildConfig.buildJs;
// add slash if missing to properly strip prefix from directive templates
if (jsDir[jsDir.length - 1] !== '/') {
  jsDir = jsDir + '/';
}

preprocessors[jsDir + '**/*.js)'] = ['coverage'];
preprocessors[templateDir + '**/*-directive.tpl.html'] = ['ng-html2js'];

module.exports = {
  browsers: ['PhantomJS'],
  frameworks: [<% if (testFramework === 'mocha') { %>'mocha', 'chai'<% } else { %>'jasmine'<% } %>, 'sinon'],
  reporters: ['failed', 'coverage'],
  preprocessors: preprocessors,
  ngHtml2JsPreprocessor: {
    stripPrefix: buildDir
  },
  singleRun: true
};


text:
using System;
using Astral.Markup;
using Astral.Markup.RabbitMq;

namespace Contract.Test
{
    [Service("first")]
    [Owner("test")]
    public interface IFirstService
    {
        [Endpoint("event")]
        EventHandler<EventContract> Event { get; }

        [Endpoint("test.call")]
        [Exchange(Name = "test.call.exchange", Durable = false)]
        Func<int, int> Call { get; }

    }

    [SchemaName("EventContract")]
    public class EventContract
    {
        public Line[] Lines { get;set; }
        public string Name { get;set; }

        [SchemaName("EventContract.Line")]
        public class Line
        {
            public Code Data { get;set; }
            public Sample Num { get;set; }

            [SchemaName("EventContract.Line.Code")]
            [Flags]
            public enum Code
            {
                Fl1 = 1,
                Fl2 = 2
            }
        }
    }

    [SchemaName("Sample")]
    public enum Sample
    {
        Two = 5,
        One = 1
    }
}


text:
import { createStore, applyMiddleware } from 'redux';
import createLogger from 'redux-logger';
import thunk from 'redux-thunk';
import { browserHistory } from 'react-router';
import { routerMiddleware } from 'react-router-redux';
import rootReducer from '../reducers/index';

import {loadState, saveState} from '../util/localStorage';

import * as _ from 'lodash';

const logger = createLogger();
const router = routerMiddleware(browserHistory);

const createStoreWithMiddleware = applyMiddleware(thunk, router, logger)(createStore);

export default function mainStore(initialState) {
  const persistedState = loadState();

  // TODO: determine if it's cool to replace initialState with persistedState here
  const store = createStoreWithMiddleware(rootReducer, _.merge(initialState, persistedState));

  store.subscribe(() => {
    saveState({
      // allows saving to local storage of passwords from forms; up to the page to hose passwords before route changes
      // accountForm: store.getState().accountForm,
      deviceForm: store.getState().deviceForm,
      servicesForm: store.getState().servicesForm,
    });
  });

  return store;
}


text:
/* eslint-env node, mocha */
'use strict'
const MR = require('../moonridge')
const locals = require('./e2e-smoketest/localVariables.json')
MR.connect(locals.connString)
var expect = require('chai').expect

describe('Moonridge model', function () {
  let sampleModel
  let server
  let LQ

  it('should have a baucis controller', function () {
    sampleModel = MR.model('first_test_model', {
      name: String
    })
    const ctrl = sampleModel.controller
    expect(ctrl).to.be.a('function')
    expect(ctrl.put).to.be.a('function')
    expect(ctrl.get).to.be.a('function')
    expect(ctrl.delete).to.be.a('function')
    expect(ctrl.post).to.be.a('function')
  })

  it('should run onExistence for each created instance of a model', function (done) {
    sampleModel = MR.model('sample_model_two', {
      name: String
    }, {
      onExistence: function (d) {
        expect(d.name).to.eql('on existence test')
        done()
      }
    })
    const doc = new sampleModel({name: 'on existence test'})
    doc.save()
  })

  it('should NOT save the new model if onExistence throws', function (done) {
    let testModel = MR.model('sample_model_three', {
      name: String
    }, {
      onExistence: function (d) {
        return Promise.reject(new Error('just a test error'))
      }
    })
    const doc = new testModel({name: 'onexistence throw test'})
    doc.save().then(() => {}, (e) => {
      expect(e.message).to.equal('just a test error')
      done()
    })
  })

  it('should run schemaInit on registering a new model', function (done) {
    sampleModel = MR.model('sample_model', {
      name: String
    }, {
      schemaInit: function (schema) {
        expect(schema.pathType('name')).to.eql('real')
        done()
      },
      ownerRequired: false
    })

    server = MR.bootstrap(8079)
  })

  it('should trigger schema events even when utilising findByIdAnd... methods on moonridge model directly', function (done) {
    // normally mongoose would not trigger those-they are only triggered when doing doc.save().
    // We need to have them triggered in order for liveQueries to work
    var c = 0
    var id

    var fakeSocket = {
      id: 'testSocketId',
      moonridge: {
        registeredLQs: {},
        user: {_id: '56520e8adc7237d62a081f6a'}
      },
      on: function (name, cb) {
        expect(typeof cb).to.equal('function')
      },
      rpc: function (method) {
        return function () {
          c++
          if (c === 3) {
            expect(arguments[1]).to.equal(id.toString())
          }
        }
      }
    }
    LQ = sampleModel.rpcExposedMethods.liveQuery.call(fakeSocket, [], 1)

    sampleModel.rpcExposedMethods.create.call(fakeSocket, {name: 'test'}).then(function (created) {
      id = created._id.valueOf()
      sampleModel.on('remove', function (doc) {
        expect(doc).to.equal(id)
        setTimeout(function () {
          expect(c).to.equal(3)
          done()
        }, 100)
      })

      sampleModel.on('update', function (doc) {
        expect(doc).to.equal(id)
        setTimeout(function () {
          sampleModel.findByIdAndRemove(id)
          expect(c).to.equal(2)
        }, 100)
      })

      sampleModel.findByIdAndUpdate(id, {name: 'test2'})
    }, function (err) {
      console.error(err.errors)
      setTimeout(() => {
        throw err
      })
    })
  })

  it.skip('should rethrow when model initialisation fails for a document with marking the error', function () {

  })

  it('should expose statics of a model', function () {
    // TODO
  })
})


text:
trait Cap:
  type M
class Id[X]

object Test:
  def withCap[X](op: Cap => X): X = ???

  class retains1(xs: Any*) extends annotation.StaticAnnotation

  def leaking1(c: Cap): Id[Cap @retains1(c)] = ??? // used to crash with orphan parameter on pickling
  def leaking2(c: Cap): Id[c.type] = ???

  val bad1 = withCap(leaking1)
  val bad2 = withCap(leaking2)


text:
package org.scalatest.words

/**
 * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of
 * the matchers DSL.
 *
 * @author Bill Venners
 * @author Chee Seng
 */
final class CompileWord


text:
namespace opengm {
namespace learning {
namespace solver {

class LinearObjective : public QuadraticObjective {

public:

	LinearObjective(unsigned int size = 0) : QuadraticObjective(size) {}

private:

	using QuadraticObjective::setQuadraticCoefficient;
};

}}} // namspace opengm::learning::solver

#endif // INFERENCE_OBJECTIVE_H__


text:
title: Vim 中设置 tab 自动转换为 4 个空格
toc: true
---

## 设置方法

在 `.vimrc` 文件(没有就在 `$HOME` 下新建一个)中设置[^c]:

```sh
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" Sets the number of columns for a TAB
set softtabstop=4
" On pressing tab, insert 4 spaces
set expandtab
```
另一个回答附有有更通俗的注释[^b]:
```shell
filetype plugin indent on
set tabstop=4       " The width of a TAB is set to 4.
                    " Still it is a \t. It is just that
                    " Vim will interpret it to be having
                    " a width of 4.

set shiftwidth=4    " Indents will have a width of 4

set softtabstop=4   " Sets the number of columns for a TAB

set expandtab       " Expand TABs to spaces
```

### filetype 命令说明

文档说明[^e][^f]

```shell
filetype plugin indent on
```

这行命令主要是用于开启文件类型检测

#### 作用

> vim通过对文件类型的识别,可以为不同类型的文件,设置不同的选项值、定义不同键绑定等。例如,对于c类型的文件,它就和bash脚本有不同的注释格式、不同的缩进格式、不同的关键字等。vim在设置文件类型后,会触发FileType事件,执行FileType相关的自动命令,对不同类型的文件区别对待。[^g]

## commands 命令具体说明

以下列出了设置时需要使用的命令的说明:*tabstop*, *shiftwidth*, *expandtab*, 和 *softtabstop*

### tabstop

> Set tabstop to tell vim how many columns a tab counts for.[^a]

tabstop 设置 vim 中每个 tab 展开的列数

### softtabstop

> Set softtabstop to control how many columns vim uses when you hit Tab in insert mode.[^a]

顾名思义,`softtabstop` 是 `tabstop` 的 soft 版本

### expandtab
> When expandtab is set, hitting Tab in insert mode will produce the appropriate number of spaces.[^a]

对 expandtab 进行设置后,点击 tab 就会将其转换为对应数量的空格

### shiftwidth

> Set shiftwidth to control how many columns text is indented with the reindent operations (<< and >>) and automatic C-style indentation.[^a]

### 综合

| 设置情况                                     | Vim 行为                          |
| ---------------------------------------- | ------------------------------- |
| `softtabstop` < `tabstop`;` expandtab` 没有设置 | 混合使用 tab 和 space 来生成期望的 spacing |
| `softtabstop` = `tabstop`;` expandtab` 没有设置 | 总是使用 tab                        |
| 设置了 ` expandtab`                         | 总是使用 空格                         |

可以看到,我们应该设置 ` expandtab`,以让 Vim 自动将 tab 转换成对应的空格

## 参考

[^a]: [Secrets of tabs in vim](http://tedlogan.com/techblog3.html)
[^b]: [vim - Redefine tab as 4 spaces - Stack Overflow](https://stackoverflow.com/questions/1878974/redefine-tab-as-4-spaces/1878984#1878984)
[^c]: [whitespace - Tab key == 4 spaces and auto-indent after curly braces in Vim - Stack Overflow](https://stackoverflow.com/questions/234564/tab-key-4-spaces-and-auto-indent-after-curly-braces-in-vim)
[^d]: [vimrc - What is `softtabstop` used for? - Vi and Vim Stack Exchange](https://vi.stackexchange.com/questions/4244/what-is-softtabstop-used-for)
[^e]: [indentation - What is the difference between `filetype plugin indent on` and `filetype indent on`? - Vi and Vim Stack Exchange](https://vi.stackexchange.com/questions/10124/what-is-the-difference-between-filetype-plugin-indent-on-and-filetype-indent)
[^f]: [Vim documentation: filetype](http://vimdoc.sourceforge.net/htmldoc/filetype.html) (英)[VIM: filetype](http://vimcdoc.sourceforge.net/doc/filetype.html)(中)
[^g]: [vi/vim使用进阶: 开启文件类型检测 – 易水博客](http://easwy.com/blog/archives/advanced-vim-skills-filetype-on/)


text:
package com.bernard.beaconportal.activities.schedule.view;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.bernard.beaconportal.activities.R;
import com.bernard.beaconportal.activities.schedule.daydialogfragments.TuesdayFragment;

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

import de.timroes.android.listview.EnhancedListView;
import de.timroes.android.listview.EnhancedListView.OnDismissCallback;
import de.timroes.android.listview.EnhancedListView.UndoStyle;

public class TuesdayView extends Fragment {

	private String ABand, BBand, CBand, DBand, EBand, HBand, GBand;

	private int count0, count1, count2, count3, count4, count5, count6;

	private static String bandString;

	private static int position;

	private ListView list;

	private static String actionbar_colors;

	private TextView footer_text;

	private static ArrayAdapter<ScheduleView> adapter;

	private View footer;

	private static TextView addNoteText;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		return inflater.inflate(R.layout.schedule_list_view, container, false);
	}

	private List<ScheduleView> myschedule;

	static class ViewHolder {

		public TextView HomeworkDueText;

		public TextView ClassesText;

		public TextView NotesCountText;

	}

	@Override
	public void onResume() {
		// TODO Auto-generated method stub

		buildScheduleList();

		super.onResume();

		myschedule = new ArrayList<ScheduleView>();
		populatescheduleList();
		populateListView();

		LocalBroadcastManager.getInstance(getActivity()).registerReceiver(
				this.mClickedReceiver, new IntentFilter("refreshTuesday"));

	}

	private void buildScheduleList() {

		Calendar calendar = Calendar.getInstance();
		int day = calendar.get(Calendar.DAY_OF_WEEK);

		if (day == 3) {

		}

		SharedPreferences sharedpref = getActivity().getSharedPreferences(
				"tuesday", Context.MODE_PRIVATE);
		HBand = sharedpref.getString("h_Band", null);
		GBand = sharedpref.getString("g_Band", null);
		BBand = sharedpref.getString("b_Band", null);
		EBand = sharedpref.getString("e_Band", null);
		DBand = sharedpref.getString("d_Band", null);
		CBand = sharedpref.getString("c_Band", null);
		ABand = sharedpref.getString("a_Band", null);

		SharedPreferences sharedpref0 = getActivity().getSharedPreferences(
				"tuesday0", Context.MODE_PRIVATE);

		count0 = sharedpref0.getInt("note_count", 1000);

		SharedPreferences sharedpref1 = getActivity().getSharedPreferences(
				"tuesday1", Context.MODE_PRIVATE);

		count1 = sharedpref1.getInt("note_count", 1000);

		SharedPreferences sharedpref2 = getActivity().getSharedPreferences(
				"tuesday2", Context.MODE_PRIVATE);

		count2 = sharedpref2.getInt("note_count", 1000);

		SharedPreferences sharedpref3 = getActivity().getSharedPreferences(
				"tuesday3", Context.MODE_PRIVATE);

		count3 = sharedpref3.getInt("note_count", 1000);

		SharedPreferences sharedpref4 = getActivity().getSharedPreferences(
				"tuesday4", Context.MODE_PRIVATE);

		count4 = sharedpref4.getInt("note_count", 1000);

		SharedPreferences sharedpref5 = getActivity().getSharedPreferences(
				"tuesday5", Context.MODE_PRIVATE);

		count5 = sharedpref5.getInt("note_count", 1000);

		SharedPreferences sharedpref6 = getActivity().getSharedPreferences(
				"tuesday6", Context.MODE_PRIVATE);

		count6 = sharedpref6.getInt("note_count", 1000);

	}

	private void populatescheduleList() {
		myschedule.add(new ScheduleView("H Band", HBand, count0));
		myschedule.add(new ScheduleView("G Band", GBand, count1));
		myschedule.add(new ScheduleView("D Band", DBand, count2));
		myschedule.add(new ScheduleView("E Band", EBand, count3));
		myschedule.add(new ScheduleView("C Band", CBand, count4));
		myschedule.add(new ScheduleView("A Band", ABand, count5));
		myschedule.add(new ScheduleView("B Band", BBand, count6));
	}

	private void populateListView() {
		adapter = new MyListAdapter();
		list = (ListView) getView().findViewById(R.id.listView2);

		footer = getActivity().getLayoutInflater().inflate(
				R.layout.homeworkday_footer, null);

		footer.setBackgroundResource(R.drawable.item_selector);

		footer.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {

				showDialog();

			}
		});

		footer_text = (TextView) footer.findViewById(R.id.textView1);

		footer_text.setText("Homework Due Tuesday");

		SharedPreferences sharedprefer = getActivity().getSharedPreferences(
				"actionbar_color", Context.MODE_PRIVATE);

		if (!sharedprefer.contains("actionbar_color")) {

			footer_text.setTextColor(Color.parseColor("#4285f4"));

		} else {

			actionbar_colors = sharedprefer.getString("actionbar_color", null);

			footer_text.setTextColor(Color.parseColor(actionbar_colors));
		}

		list.addFooterView(footer);

		list.setAdapter(adapter);

		list.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
			@Override
			public boolean onItemLongClick(AdapterView<?> av, View v, int pos,
					long id) {
				return onLongListItemClick(v, pos, id);
			}
		});

	}

	private void updateListView() {

		adapter = new MyListAdapter();

		list = (ListView) getView().findViewById(R.id.listView2);

		list.setAdapter(adapter);

		list.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
			@Override
			public boolean onItemLongClick(AdapterView<?> av, View v, int pos,
					long id) {
				return onLongListItemClick(v, pos, id);
			}
		});

	}

    public void showDialog() {

        FragmentManager fragmentManager = getFragmentManager();
        TuesdayFragment dayHomeworkDialogFragment = new TuesdayFragment();
        dayHomeworkDialogFragment.show(fragmentManager, "my_day_homework_fragment");

    }

	public class MyListAdapter extends ArrayAdapter<ScheduleView> {
		public MyListAdapter() {
			super(getActivity(), R.layout.tommorow_item_view, myschedule);
		}

		@Override
		public View getView(int position, View convertView, ViewGroup parent) {
			ViewHolder holder;

			if (convertView == null) {
				convertView = getActivity().getLayoutInflater().inflate(
						R.layout.schedule_list_item_view, parent, false);
				holder = new ViewHolder();

				ScheduleView currenthomeworkdue = myschedule.get(position);

				holder.HomeworkDueText = (TextView) convertView
						.findViewById(R.id.bandText);

				holder.ClassesText = (TextView) convertView
						.findViewById(R.id.textView1);

				holder.NotesCountText = (TextView) convertView
						.findViewById(R.id.note_count);

				View BackGround = convertView
						.findViewById(R.id.note_background);

				TextView Count = (TextView) convertView
						.findViewById(R.id.note_count);

				if (currenthomeworkdue.Note_Number() == 1000) {

					BackGround.setVisibility(View.GONE);

					Count.setVisibility(View.GONE);

				}
				if (currenthomeworkdue.Note_Number() == 0) {

					BackGround.setVisibility(View.GONE);

					Count.setVisibility(View.GONE);

				}
				convertView.setTag(holder);

			} else {
				holder = (ViewHolder) convertView.getTag();
			}

			ScheduleView currenthomeworkdue = myschedule.get(position);

			holder.HomeworkDueText.setText(currenthomeworkdue.Band());

			holder.ClassesText.setText(currenthomeworkdue.Classes());

			holder.NotesCountText.setText(Integer.toString(currenthomeworkdue
					.Note_Number()));

			return convertView;

		}

	}

	private void showNotesDialog() {
		FragmentManager fm = getFragmentManager();
		NotesDialog notesDialog = new NotesDialog();
		notesDialog.show(fm, bandString);
	}

	protected boolean onLongListItemClick(View v, int pos, long id) {

		TextView band = (TextView) v.findViewById(R.id.bandText);

		bandString = band.getText().toString();

		position = pos;

		showNotesDialog();

		return true;
	}

	public static class NotesDialog extends DialogFragment {

		private EnhancedListView mNotes;
		private static RelativeLayout addNote;
		private int position_mainlist;

		public NotesDialog() {
			// Empty constructor required for DialogFragment
		}

		@Override
		public Dialog onCreateDialog(Bundle savedInstanceState) {

			AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());

			View view = getActivity().getLayoutInflater().inflate(
					R.layout.note_dialog, null);
			mNotes = (EnhancedListView) view.findViewById(R.id.listViewNotes);
			addNote = (RelativeLayout) view.findViewById(R.id.notesAdd);

			addNoteText = (TextView) view.findViewById(R.id.textViewTitles);

			SharedPreferences sharedprefer = getActivity()
					.getSharedPreferences("actionbar_color",
							Context.MODE_PRIVATE);

			if (!sharedprefer.contains("actionbar_color")) {

				addNoteText.setTextColor(Color.parseColor("#4285f4"));

			} else {

				actionbar_colors = sharedprefer.getString("actionbar_color",
						null);

				addNoteText.setTextColor(Color.parseColor(actionbar_colors));
			}

			addNoteText.setText("Add Note For " + bandString);

			String band_position = ("tuesday" + (Integer.toString(position)))
					.toString();

			position_mainlist = position;

			SharedPreferences sharedpref = getActivity().getSharedPreferences(
					band_position, Context.MODE_PRIVATE);

			int counterssss = sharedpref.getInt("note_count", 0);

			int countersssss = counterssss + 1;

			final ArrayList<String> note_list = new ArrayList<String>();

			for (int i = 0; i < countersssss; i++) {

				String note_item = Integer.toString(i);

				String note = sharedpref.getString(note_item, "");

				note_list.add(note);

			}

			final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(
					getActivity(), R.layout.note_dialog_item, R.id.textView1,
					note_list);

			mNotes.setAdapter(arrayAdapter);

			mNotes.setDismissCallback(new OnDismissCallback() {

				@Override
				public EnhancedListView.Undoable onDismiss(
						EnhancedListView listView, final int position) {

					// Store the item for later undo

					final String item = arrayAdapter.getItem(position);

					// Remove the item from the adapter
					arrayAdapter.remove(item);

					// return an Undoable
					return new EnhancedListView.Undoable() {
						// Reinsert the item to the adapter
						@Override
						public void undo() {
							arrayAdapter.insert(item, position);
						}

						// Return a string for your item

						// Delete item completely from your persistent storage
						@Override
						public void discard() {

							String band_position = ("tuesday" + (Integer
									.toString(position_mainlist))).toString();

							SharedPreferences.Editor localEditor = getActivity()
									.getSharedPreferences(band_position,
											Context.MODE_PRIVATE).edit();

							SharedPreferences sharedpref = getActivity()

							.getSharedPreferences(band_position,
									Context.MODE_PRIVATE);

							int counterssss = sharedpref
									.getInt("note_count", 0);

							int countersssss = counterssss + 1;

							int ii = -1;

							for (int i = 0; i < countersssss; i++) {

								String note_item = Integer.toString(i);

								String note = sharedpref.getString(note_item,
										"");

								if (item.equals(note)) {

									System.out.println(note + " 1 " + item);

									String item_positions = Integer.toString(i);

									localEditor.remove(item_positions);

									localEditor.commit();

								} else {

									System.out.println(note + " 2 " + item);

									ii++;

									System.out.println(ii);

									String item_position = Integer.toString(ii);

									localEditor.putString(item_position, note);

								}

							}

							int note_counts = sharedpref
									.getInt("note_count", 0);

							int note_minus = note_counts - 1;

							localEditor.putInt("note_count", note_minus);

							localEditor.commit();

							Intent intent = new Intent("refreshTuesday");

							intent.putExtra("refresh", "refresh listview");
							LocalBroadcastManager.getInstance(getActivity())
									.sendBroadcast(intent);

						}
					};

				}

			});

			mNotes.enableSwipeToDismiss();

			mNotes.setUndoStyle(UndoStyle.MULTILEVEL_POPUP);

			mNotes.setRequireTouchBeforeDismiss(false);

			mNotes.setUndoHideDelay(3000);

			arrayAdapter.remove("");

			addNote.setOnClickListener(new View.OnClickListener() {
				@Override
				public void onClick(View v) {

					getDialog().dismiss();

					showNoteDialog();
				}
			});

			if (bandString.equals("H Band")) {

				TextView band_times = (TextView) view
						.findViewById(R.id.infotimeView);

				band_times.setText("8:15-9:10");

			}
			if (bandString.equals("G Band")) {

				TextView band_times = (TextView) view
						.findViewById(R.id.infotimeView);

				band_times.setText("9:15-10:15");

			}
			if (bandString.equals("D Band")) {

				TextView band_times = (TextView) view
						.findViewById(R.id.infotimeView);

				band_times.setText("10:20-11:15");

			}
			if (bandString.equals("E Band")) {

				TextView band_times = (TextView) view
						.findViewById(R.id.infotimeView);

				band_times.setText("11:20-12:15");

			}
			if (bandString.equals("C Band")) {

				TextView band_times = (TextView) view
						.findViewById(R.id.infotimeView);

				band_times.setText("12:20-1:15");

			}
			if (bandString.equals("A Band")) {

				TextView band_times = (TextView) view
						.findViewById(R.id.infotimeView);

				band_times.setText("1:20-2:15");

			}
			if (bandString.equals("B Band")) {

				TextView band_times = (TextView) view
						.findViewById(R.id.infotimeView);

				band_times.setText("2:20-3:15");

			}

			builder.setView(view);

			builder.setTitle(bandString);

			builder.setNegativeButton("Cancel",
					new DialogInterface.OnClickListener() {
						@Override
						public void onClick(DialogInterface dialog,
								int whichButton) {
							getDialog().dismiss();
						}
					});

			return builder.create();

		}

		private void showNoteDialog() {
			getDialog().dismiss();
			FragmentManager fm = getFragmentManager();
			NoteDialog noteDialog = new NoteDialog();
			noteDialog.show(fm, bandString);
		}

		public static class NoteDialog extends DialogFragment {

			private EditText mEditText;

			private int Counts;

			public NoteDialog() {
				// Empty constructor required for DialogFragment
			}

			@Override
			public Dialog onCreateDialog(Bundle savedInstanceState) {

				AlertDialog.Builder builder = new AlertDialog.Builder(
						getActivity());

				View view = getActivity().getLayoutInflater().inflate(
						R.layout.add_note_dialog, null);
				mEditText = (EditText) view.findViewById(R.id.editText1);

				addNote.setOnClickListener(new View.OnClickListener() {
					@Override
					public void onClick(View v) {

						getDialog().dismiss();

						NotesDialog notes = new NotesDialog();

						notes.showNoteDialog();
					}
				});

				builder.setView(view);

				builder.setTitle("Add New Note for " + bandString);

				builder.setNegativeButton("Cancel",
						new DialogInterface.OnClickListener() {
							@Override
							public void onClick(DialogInterface dialog,
									int whichButton) {
								getDialog().dismiss();
							}
						});

				builder.setPositiveButton("Add",
						new DialogInterface.OnClickListener() {
							@Override
							public void onClick(DialogInterface dialog,
									int whichButton) {

								String band_position = ("tuesday" + (Integer
										.toString(position))).toString();

								SharedPreferences.Editor localEditor = getActivity()
										.getSharedPreferences(band_position,
												Context.MODE_PRIVATE).edit();

								SharedPreferences sharedpref = getActivity()

								.getSharedPreferences(band_position,
										Context.MODE_PRIVATE);

								if (sharedpref.contains("note_count")) {

									int Count = sharedpref.getInt("note_count",
											0);

									Counts = Count + 1;

								} else {

									Counts = 1;

								}

								String Note = mEditText.getText().toString();

								String note_counts = Integer.toString(Counts);

								localEditor.putString(note_counts, Note);

								localEditor.putInt("note_count", Counts);

								localEditor.apply();

								Intent intent = new Intent("refreshTuesday");

								intent.putExtra("refresh", "refresh listview");
								LocalBroadcastManager
										.getInstance(getActivity())
										.sendBroadcast(intent);

							}
						});

				return builder.create();

			}

		}

	}

	private BroadcastReceiver mClickedReceiver = new BroadcastReceiver() {
		@Override
		public void onReceive(Context paramAnonymousContext,
				Intent paramAnonymousIntent) {

			new Update().execute();

		}
	};

	public class Update extends AsyncTask<Void, Void, Void> {

		@Override
		protected Void doInBackground(Void... add) {

			buildScheduleList();
			myschedule = new ArrayList<ScheduleView>();
			populatescheduleList();

			Log.d("received", "yes");

			return null;
		}

		@Override
		protected void onPostExecute(Void updateUI) {

			updateListView();

		}
	}

	@Override
	public void onPause() {
		super.onPause();

		list.removeFooterView(footer);

	}
}


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

package io.trivium.dep.com.google.j2objc.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Adds property declarations to generated Objective-C for annotated fields.
 *
 * See Apple's @property documentation.
 *

 * Notes:
 *

 *
Invalid attributes are reported as errors.

 *
readwrite, strong, and atomic attributes are removed
 *     since they are defaults.

 *
Strings will include the copy attribute.

 *

 *

 * Example:
 *

 * class Foo {
 *   @Property("copy, nonatomic") protected String bar;
 * }

 * generates:
 *

 *

 * @property (copy, nonatomic) NSString *bar;

 *
 * @author Harry Cheung
 */
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.FIELD)
public @interface Property {
  String value() default "";
}


text:
"""Tucker Sync client module.

Usage:
    from client import Client
    client = Client(base_url)
    client.check_connection()

License:
    The MIT License (MIT), see LICENSE.txt for more details.

Copyright:
    Copyright (c) 2014 Steven Tucker and Gavin Kromhout
"""

import requests
import uuid

from common import APIRequestType, JSONKey, APIErrorCode, HTTP, JSON, Logger, \
    APIRequest, AccountOpenRequestBody, AccountModifyRequestBody

LOG = Logger(__file__)

class Client(object):
    """A Tucker Sync Client Implementation."""

    def __init__(self, base_url, key, email, password):
        self.request = APIRequest()
        self.base_url = base_url
        self.key = key
        self.email = email
        self.password = password
        self.UUID = uuid.uuid4()
        # TODO init storage.

    @property
    def base_url(self):
        return self.request.base_url

    @base_url.setter
    def base_url(self, base_url):
        self.request.base_url = base_url

    @property
    def key(self):
        return self.request.key

    @key.setter
    def key(self, key):
        self.request.key = key

    @property
    def email(self):
        return self.request.email

    @email.setter
    def email(self, email):
        self.request.email = email

    @property
    def password(self):
        return self.request.password

    @password.setter
    def password(self, password):
        self.request.password = password

    def check_connection(self):
        """Check the connection to the server.

         Return true if the server responds with an API error code."""

        try:
            self.post_request(APIRequestType.TEST)
        except ClientException:
            LOG.debug(self, 'Check connection failed with an exception.')
            return False

        # Success
        return True

    def check_authentication(self):
        """Check authentication against an account on the server."""

        try:
            jo = self.post_request(APIRequestType.TEST)
        except ClientException:
            LOG.debug(self, 'Check authentication failed with an exception.')
            return False

        error_code = jo[JSONKey.ERROR]

        if error_code != APIErrorCode.SUCCESS:
            LOG.debug(self,
                      'Check authentication failed with API error code = %s',
                      error_code)
            LOG.debug(self,
                      'Check authentication failed with API error name = %s',
                      APIErrorCode.name(error_code))
            return False

        # Success
        return True

    def account_open(self):
        """Open a new account on the server."""

        rb = AccountOpenRequestBody()
        rb.clientUUID = self.UUID

        js = JSON.dumps(rb.to_primitive())

        try:
            jo = self.post_request(APIRequestType.ACCOUNT_OPEN, js)
        except ClientException:
            LOG.debug(self, 'Account open failed with an exception.')
            return False

        error_code = jo[JSONKey.ERROR]

        if error_code != APIErrorCode.SUCCESS:
            LOG.debug(self, 'Account open failed with API error code = %s',
                      error_code)
            LOG.debug(self, 'Account open failed with API error name = %s',
                      APIErrorCode.name(error_code))
            return False

        # Success
        return True

    def account_close(self):
        """Close an existing account on the server."""

        try:
            jo = self.post_request(APIRequestType.ACCOUNT_CLOSE)
        except ClientException:
            LOG.debug(self, 'Account close failed with an exception.')
            return False

        error_code = jo[JSONKey.ERROR]

        if error_code != APIErrorCode.SUCCESS:
            LOG.debug(self, 'Account close failed with API error code = %s',
                      error_code)
            LOG.debug(self, 'Account close failed with API error name = %s',
                      APIErrorCode.name(error_code))
            return False

        # Success
        return True

    def account_modify(self, new_email, new_password):
        """Modify an existing account on the server."""

        request_body = AccountModifyRequestBody()
        request_body.email = new_email
        request_body.password = new_password

        try:
            js = self.get_json_request_string(request_body)
        except ClientException:
            LOG.debug(self, 'Account modify failed with an exception.')
            return False

        try:
            jo = self.post_request(APIRequestType.ACCOUNT_MODIFY, js)
        except ClientException:
            LOG.debug(self, 'Account modify failed with an exception.')
            return False

        error_code = jo[JSONKey.ERROR]

        if error_code != APIErrorCode.SUCCESS:
            LOG.debug(self, 'Account modify failed with API error code = %s',
                      error_code)
            LOG.debug(self, 'Account modify failed with API error name = %s',
                      APIErrorCode.name(error_code))
            return False

        # Success
        return True

    def get_json_request_string(self, model):
        """Get json request string from model or raise a ClientException."""

        # Validate before conversion.
        try:
            model.validate()
        except Exception as e:
            LOG.debug(self, 'Validate exception = %s' % e)
            raise ClientException

        try:
            js = JSON.dumps(model.to_primitive())
        except Exception as e:
            LOG.debug(self, 'JSON dumps exception = %s' % e)
            raise ClientException

        return js

    def post_request(self, api_request_type, data=None):
        """Post the request.

        Return the response json object (Python dictionary) or
        raise an exception."""

        self.request.type = api_request_type
        self.request.body = data

        LOG.debug(self, 'base_url = %s', self.request.base_url)
        LOG.debug(self, 'params = %s', self.request.params)
        LOG.debug(self, 'headers= %s', self.request.headers)
        LOG.debug(self, 'body = %s', self.request.body)

        try:
            response = requests.post(self.request.base_url,
                                     self.request.body,
                                     params=self.request.params,
                                     headers=self.request.headers)
        except Exception as e:
            LOG.debug(self, 'Request post failed with exception = %s', e)
            raise ClientException

        try:
            jo = self.get_json_object(response)
        except ClientException:
            raise ClientException

        # Success.
        return jo

    @staticmethod
    def get_json_object(response):
        """Get the json object (Python dictionary) from the response.

         Return jo or raise an exception."""

        LOG.debug(Client, 'status_code = %s', response.status_code)
        LOG.debug(Client, 'content = %s', response.content)

        if response.status_code != HTTP.OK:
            LOG.debug(Client, 'HTTP status code != HTTP.OK')
            raise ClientException

        try:
            jo = JSON.loads(response.content)
        except Exception as e:
            LOG.debug(Client, 'JSON.loads exception = %s', e)
            raise ClientException

        if not type(jo) is dict:
            LOG.debug(Client, 'Type of jo is not an object/dict.')
            raise ClientException

        if JSONKey.ERROR not in jo:
            LOG.debug(Client, 'The decoded jo has no `error` key.')
            raise ClientException

        # Success.
        return jo

class ClientException(Exception):
    """Custom exception class."""

    pass


text:
int main(int argc, char** argv)
{
    //bii://bii.png
    IplImage* img = cvLoadImage( "diego/opencvex/bii.png" );
    cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE );

    cvShowImage("Example1", img);
    cvMoveWindow("Example1", 0, 0);
    cvWaitKey(0);
    cvReleaseImage( &img );
    cvDestroyWindow( "Example1" );
    return 0;
}


text:
import logging
import logging.config
import json
import os
import os.path

# Logging configuration is read from this file.
# If the file does not exist, we create it from from LOG_CONFIG_DEFAULT dictionary.
# Note: the file handler name MUST be "rotate_file",
# since we rely on it to locate log file name after config is loaded.
LOG_CONFIG_FILE = "/etc/vmware/vmdkops/log_config.json"

LOG_LEVEL_DEFAULT = 'INFO'

# Defaults for log files - used to generate conf file if it is missing
# Note: log file location should be synced with CI and 'make'
LOG_FILE = "/var/log/vmware/vmdk_ops.log"
LOG_MAX_BYTES = 1048576  # 1MB
LOG_MAX_BACKUPS = 1
LOG_CONFIG_DEFAULT = {
    "info": [
        "Logging configuration for vmdk_opsd service, in python logging config format.",
        "",
        "'level' defines verbosity and could be DEBUG, INFO, WARNING, ERROR, CRITICAL",
        "'maxBytes' and 'backupCount' define max log size and number of log backup files kept",
        "For more, see https://docs.python.org/2/library/logging.config.html#logging-config-dictschema",
        "",
        "Do NOT change 'rotate_file' name in handlers - it is used in code to locate the log file."
    ],
    "version":
    1,  # mandated by https://docs.python.org/2/library/logging.config.html#logging-config-dictschema
    "disable_existing_loggers": False,
    "formatters": {
        "standard": {
            "format":
            "%(asctime)-12s %(process)d [%(threadName)s] [%(levelname)-7s] %(message)s",
            "datefmt": "%x %X",
        }
    },
    "handlers": {
        "rotate_file": {
            "class": "logging.handlers.RotatingFileHandler",
            "filename": LOG_FILE,
            "formatter": "standard",
            "level": LOG_LEVEL_DEFAULT,
            "maxBytes": LOG_MAX_BYTES,
            "backupCount": LOG_MAX_BACKUPS,
            "encoding": "utf8",
        }
    },
    "loggers": {
        "": {
            "handlers": ["rotate_file"],
            "level": LOG_LEVEL_DEFAULT,
        },
    }
}

def configure(config_file=LOG_CONFIG_FILE):
    """
    Checks if the json config file exists, and if it does not, creates it from
    hardcoded defaults. Then loads log config from the  file.
    Returns log file name.
    In case of format mistakes in config file, this function
    simply throws an exception - since there is no log yet, we can't log the error.
    """

    generatedConf = False
    # if the conf file is not there, create it:
    if not os.path.isfile(config_file):
        try:
            os.makedirs(os.path.dirname(config_file))
        except:
            pass
        with open(config_file, 'w') as f:
            json.dump(LOG_CONFIG_DEFAULT, f, sort_keys=False, indent=4)
        generatedConf = True

    # Get the configuration info - now it *has* to be there
    with open(config_file) as f:
        conf = json.load(f)

    # make sure the dir for logs exists
    log = conf['handlers']['rotate_file']['filename']
    dir = os.path.dirname(log)
    if not os.path.isdir(dir):
        os.makedirs(dir)

    # Now configure logging
    logging.config.dictConfig(conf)
    if generatedConf:
        logging.info("Log configuration generated - '%s'." % config_file)
    return log

def get_log_level(config_file=LOG_CONFIG_FILE):
    """ Return the configured log level """
    try:
        with open(config_file) as f:
            conf = json.load(f)
        return conf['loggers']['']['level']
    except:
        # The log config file doesn't currently exist. Use the default.
        return LOG_LEVEL_DEFAULT

def get_logger(name, level=LOG_LEVEL_DEFAULT):
    """ Returns the logger with required log level set
    level defines verbosity and could be DEBUG, INFO, WARNING, ERROR, CRITICAL """

    logger = logging.getLogger(name)
    logger.setLevel(logging.getLevelName(level))
    return logger

# manual test: "sudo python log_config.py"
if __name__ == "__main__":
    conf_file = os.path.basename(LOG_CONFIG_FILE)
    log_file = configure(conf_file)
    print("logging to %s:\n" % log_file)
    logging.info("==== start log ====")
    logging.error("Trying an error !")
    logging.warning("still a warning")
    logging.info("OK info")
    logging.debug("debugging")
    # visual check. Caveat: prints ALL log file
    print("==========Content of %s========" % log_file)
    with open(log_file) as f:
        print(f.read())
    print("==========Content of %s========" % conf_file)
    with open(conf_file) as f:
        print(f.read())


text:
package nz.org.nesi.goji;

import grisu.grin.YnfoManager;
import grisu.grin.model.Grid;
import grisu.jcommons.model.info.Directory;
import grisu.jcommons.model.info.Group;
import grith.jgrith.cred.Cred;
import grith.jgrith.cred.ProxyCred;
import grith.jgrith.plainProxy.LocalProxy;

import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.util.Collection;
import java.util.Set;

import nz.org.nesi.goji.model.Endpoint;
import nz.org.nesi.goji.model.commands.EndpointList;
import nz.org.nesi.goji.model.commands.EndpointRemove;

import org.globusonline.transfer.BCTransferAPIClient;
import org.globusonline.transfer.BaseTransferAPIClient;

import com.google.common.collect.Sets;

public class Goji {

	public static final String VERSION = "v0.10";
	public static final String DEV_URL = "https://transfer.qa.api.globusonline.org/dev";

	public static final String DEFAULT_BASE_URL = "https://transfer.api.globusonline.org/"
			+ VERSION;

	// public static final String DEFAULT_BASE_URL = DEV_URL;

	public static void main(String[] args) throws KeyManagementException,
	NoSuchAlgorithmException, Exception {

		YnfoManager im = new YnfoManager(
				"/home/markus/src/infosystems/ynfo/src/test/resources/default_config.groovy");

		Grid grid = im.getGrid();

		String go_username = "nz";

		Cred c = new ProxyCred();

		// BaseTransferAPIClient client = new GssJSONTransferAPIClient(
		// go_username, trustedCAFile, c.getCredential(),
		// Goji.DEFAULT_BASE_URL);

		BCTransferAPIClient client = new BCTransferAPIClient(go_username,
				BaseTransferAPIClient.FORMAT_JSON, LocalProxy.PROXY_FILE,
				LocalProxy.PROXY_FILE, Goji.DEFAULT_BASE_URL);
		// DEFAULT_BASE_URL, "/tmp/x509up_u1000",
		// "/tmp/x509up_u1000",
		// "/home/markus/.globus/certificates/gd_bundle.crt", false);

		// try {
		// EndpointRemove epR = new EndpointRemove(client, "autotest1");
		//
		// System.out.println(epR.toString());
		// } catch (Exception e) {
		// System.err.println(e.getLocalizedMessage());
		// }
		//
		// Thread.sleep(5000);

		// EndpointAdd epA = new EndpointAdd(client, "ng2.vpac.org",
		// "myproxy.arcs.org.au", null, false, true,
		// "canterbury_ac_nz--nz_nesi");
		//
		// System.out.println(epA.toString());

		EndpointList epL = new EndpointList(client);

		System.out.println("Endpoints: " + epL.getEndpoints().size());

		for (Endpoint e : epL.getEndpoints().values()) {

			if (e.getUsername().equals(go_username)) {
				try {
					System.out.println("Removing: " + e.getName());
					EndpointRemove epR = new EndpointRemove(client, e.getName());
					System.out.println(epR.toString());
				} catch (Exception ex) {
					System.err.println(ex.getLocalizedMessage());
				}
			}

		}

		Set<Group> groups = Sets.newTreeSet();

		groups.add(grid.getGroup("/nz/nesi"));
		//groups.add(grid.getGroup("/nz/nesi"));

		for (Group group : groups) {
			System.out.println(group.toString() + "\n=====\n");

			Collection<Directory> dirs = grid.getResources(Directory.class, group);

			for (Directory d : dirs) {
				System.out.println(d.toString());
			}

		}

		// for (String fqan : fqans) {
		// Set<FileSystem> fss = im.getFileSystemsForVO(fqan);
		// for (FileSystem fs : fss) {
		// EndpointAdd ea = new EndpointAdd(client, fs.getHost(),
		// "myproxy.arcs.org.au", null, false, true,
		// EndpointHelpers.translateIntoEndpointName(fs.getHost(),
		// fqan));
		//
		// }
		//
		// }

	}

}


text:
'use strict';

var AlgorithmIdentifier = require('./algorithm-identifier');
var Version = require('./version');

module.exports = require('asn1.js').define('PrivateKeyInfo', /* @this */ function() {
	this.seq().obj(
		this.key('version').use(Version),
		this.key('privateKeyAlgorithm').use(AlgorithmIdentifier),
		this.key('privateKey').octstr(),
		this.key('attributes').optional().any()
	);
});


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Support.V7.Widget;

namespace csfm_android.Ui.Holders
{
    /// <summary>
    /// MyMatch RecyclerView Item holder
    /// </summary>
    class MyMatchHolder : RecyclerView.ViewHolder
    {
        public TextView Username { get; private set; }

        public TextView Email { get; private set; }

        public ImageView UserPicture { get; private set; }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="itemView"></param>
        public MyMatchHolder(View itemView) : base (itemView)
        {
            Username = itemView.FindViewById<TextView>(Resource.Id.my_match_name);
            Email = itemView.FindViewById<TextView>(Resource.Id.my_match_email);
            UserPicture = itemView.FindViewById<ImageView>(Resource.Id.my_match_image);
        }
    }
}


text:
var unamit = {

  /* Session variables */

  sid: undefined,
  resultView: false,
  gender: 0,

  /* Constants */

  genders: ['', 'male', 'female', 'unisex'],
  ratings: {
    no: -10, doubtful: 0, probably: 7, yes: 10,
    '-10': 'no', '0': 'doubtful', '7': 'probably', '10': 'yes'
  },

  /* Cache */

  names: {},

  elements: {
    menu: undefined,
    menuElement: undefined,
    message: undefined,
    loader: undefined,
    container: undefined
  },

  /* Helper methods */

  loader: {
    count: 0,
    start: () => {
      unamit.loader.count++;
      unamit.elements.loader.slideDown();
    },
    end: (force) => {
      unamit.loader.count -= force === true ? unamit.loader.count : 1;
      if (unamit.loader.count === 0) unamit.elements.loader.slideUp('slow');
    }
  },

  json: (url, options) => {
    unamit.loader.start();
    $.ajax(url, $.extend({}, {
      type: 'get',
      dataType: 'json',
      contentType: 'application/json; charset=UTF-8',
      headers: { 'Authorization': unamit.sid },
      data: JSON.stringify(options.value),
      error: (r) => {
        unamit.elements.message.empty();
        if (r.status === 401) return (unamit.sid !== undefined) ? unamit.logout(true) : unamit.elements.message.append($(`<div class="error">Invalid credentials.</div>`));
        else if (r.status === 429) return unamit.elements.message.append($(`<div class="error">Too many requests - please wait...</div>`));
        else {
          unamit.elements.container.empty();
          unamit.elements.message.append($(`<div class="error">Error. Please reload and try again.</div>`));
        }
      },
      complete: unamit.loader.end
    }, options));
  },

  ids: (fn) => {
    var ids = [];
    $.each(unamit.names, (id, value) => { if (fn === undefined || fn(value)) ids.push(id); });
    return ids;
  },

  /* Initialisation */

  init: () => {
    unamit.sid = unamit.sid || Cookies.get('session');
    unamit.resultView = false;

    unamit.elements.menu = (unamit.elements.menu || $('#menu')).empty();
    unamit.elements.message = (unamit.elements.message || $('#message')).empty();
    unamit.elements.loader = unamit.elements.loader || $('#loader');
    unamit.elements.container = (unamit.elements.container || $('#container')).empty();

    if (unamit.sid === undefined) return unamit.showLogin();

    unamit.menu();
    unamit.load();
  },

  /* Login / logout functionality */

  showLogin: () => {
    unamit.loader.end(true);
    unamit.elements.container.append($('<form class="login" onsubmit="unamit.login(); return false;"><input id="id" type="email" placeholder="Email Address" required /><input id="password" type="password" placeholder="Password" required /><input type="submit" value="Log in" />
New user? Register here.
</form>'));
  },

  login: () => {
    unamit.json('/sessions', { type: 'post', value: { id: $('#id').val(), password: $('#password').val() }, success: (r) => { Cookies.set('session', r.id, { expires: 1 / 3 }); unamit.init(); } });
  },

  logout: (local) => {
    if (local === undefined) unamit.json('/sessions', { type: 'delete', data: null, error: null, complete: unamit.logout });
    else {
      Cookies.remove('session');
      unamit.sid = undefined;
      unamit.init();
    }
  },

  /* Register functionality */

  showRegister: () => {
    unamit.elements.container.empty();
    unamit.elements.container.append($('<form class="login" onsubmit="unamit.register(); return false;"><input id="id" type="email" placeholder="Email Address" required /><input id="password" type="password" placeholder="Password" required /><input type="submit" value="Register" /></form>'));
  },

  register: () => {
    unamit.json('/users', { type: 'post', value: { id: $('#id').val(), password: $('#password').val() }, success: unamit.login });
  },

  /* Menu functionality */

  menu: () => {
    unamit.json('/users/me', {
      success: (r) => {
        $(`<div><a href="#" onclick="unamit.elements.menuElement.toggle('slow'); return false;">${r.id}</a><a href="#" onclick="unamit.results(this); return false;">Results</a></div>`).appendTo(unamit.elements.menu);
        unamit.elements.menuElement = $(`<div></div>`).hide().appendTo(unamit.elements.menu);
        unamit.elements.menuElement.append($(`<form class="stretch">
<input type="radio" onclick="unamit.setGender(this);" name="gender" value="0" class="unisex" ${unamit.gender === 0 ? 'checked ' : ''}/><input type="radio" onclick="unamit.setGender(this);" name="gender" value="1" class="male" ${unamit.gender === 1 ? 'checked ' : ''}/><input type="radio" onclick="unamit.setGender(this);" name="gender" value="2" class="female" ${unamit.gender === 2 ? 'checked ' : ''}/>
</form>`));
        unamit.elements.menuElement.append($(`<form onsubmit="unamit.partner(); return false;">Partner<input type="submit" value="Ok" />
<input id="partner" type="email" placeholder="Partner email" value="${(r.partner === null ? '' : r.partner)}" ${(r.partner !== null && r.mutual === 0 ? 'style="color: #F78181;" ' : '')}/>
</form>`));
        unamit.elements.menuElement.append($(`<form onsubmit="unamit.name(); return false;"><label for="name">Add name</label><input type="submit" value="Ok" /><div><input id="name" type="text" placeholder="Name" required /></div></form>`));
        unamit.elements.menuElement.append($(`<form onsubmit="unamit.password(); return false;">Password<input type="submit" value="Ok" />
<input id="old" type="password" placeholder="Old" required /><input id="new" type="password" placeholder="New" required />
</form>`));
        unamit.elements.menuElement.append($(`<form onsubmit="unamit.logout(); return false;" class="stretch"><div><input type="submit" value="Log out" /></div></form>`));
      }
    });
  },

  /* Menu handlers */

  setGender: (e) => {
    unamit.gender = $(e).val();
    unamit.names = {};
    unamit.elements.container.empty();
    unamit.resultView = false;
    unamit.load();
  },

  partner: () => {
    unamit.json('/users/me', { type: 'put', value: { partner: $('#partner').val() }, success: unamit.init });
  },

  name: () => {
    unamit.json('/names/' + $('#name').val(), {
      success: (r) => {
        unamit.names[r.id] = r;
        unamit.render(r);
        unamit.elements.menuElement.hide('slow');
      }
    });
  },

  password: () => {
    unamit.json('/users/me', { type: 'put', value: { password: $('#new').val() }, success: unamit.init });
  },

  results: (e) => {
    unamit.elements.menuElement.hide('slow');
    unamit.elements.container.empty();
    unamit.resultView = !unamit.resultView;
    $(e).css({ color: unamit.resultView ? "#F78181" : "white" });

    if (!unamit.resultView) return unamit.show();
    $.each(unamit.names, function (_, value) { if (value.shown === true) value.shown = false; });

    unamit.json('/users/me/ratings', {
      success: (r) => {
        for (var i = 0; i < r.length; i++) $('

').appendTo(unamit.elements.container)
          .append(r[i].partnerValue === null ? undefined : $(`<div class="value ${unamit.ratings[r[i].partnerValue]}">P</div>`))
          .append(r[i].value === null ? undefined : $(`<div class="value ${unamit.ratings[r[i].value]}">U</div>`))
          .append($(`<div class="name ${unamit.genders[r[i].gender]}">${r[i].id}</div>`));
      }
    });
  },

  /* Load, show and render names */

  load: () => {
    unamit.json('/names', {
      data: { gender: unamit.gender, exclude: unamit.ids() }, success: (r) => {
        for (var i = 0; i < r.length; i++) unamit.names[r[i].id] = r[i];
        if (!unamit.resultView) unamit.show();
      }
    });
  },

  show: () => {
    var count = 5 - unamit.ids((value) => { return value.shown === true; }).length;
    $.each(unamit.names, function (_, value) {
      if (count <= 0) return false;
      if (value.shown === true) return true;

      count--;
      unamit.render(value);
    });

    if (unamit.ids().length < 7) unamit.load();
  },

  render: (value) => {
    value.shown = true;
    value.wrapper = $(`<div></div>`)
      .hide().appendTo(unamit.elements.container)
      .append($(``))
      .append(value.element = $(`<div class="name ${unamit.genders[value.gender]}">${value.id}</div>`))
      .append($(``));

    swipe.initElements(value.element);
    value.wrapper.show();
  },

  /* Name (rating) handler */

  rate: (name, value) => {
    unamit.json('/users/me/ratings', {
      type: 'post', value: { name: name, value: value }, success: () => {
        unamit.names[name].wrapper.slideUp();
        delete unamit.names[name];
        unamit.show();
      }
    });
  }
};

$('document').ready(unamit.init);


text:
namespace Azure.ResourceManager.Resources.Models
{
    /// <summary> Describes the properties of an Operation value. </summary>
    public partial class ArmRestApi
    {
        /// <summary> Initializes a new instance of RestApi for mocking. </summary>
        internal ArmRestApi()
        {
        }

        /// <summary> Initializes a new instance of RestApi. </summary>
        /// <param name="origin"> The origin of the operation. </param>
        /// <param name="name"> The name of the operation. </param>
        /// <param name="operation"> The display name of the operation. </param>
        /// <param name="resource"> The display name of the resource the operation applies to. </param>
        /// <param name="description"> The description of the operation. </param>
        /// <param name="provider"> The resource provider for the operation. </param>
        internal ArmRestApi(string origin, string name, string operation, string resource, string description, string provider)
        {
            Origin = origin;
            Name = name;
            Operation = operation;
            Resource = resource;
            Description = description;
            Provider = provider;
        }

        /// <summary> The origin of the operation. </summary>
        public string Origin { get; }
        /// <summary> The name of the operation. </summary>
        public string Name { get; }
        /// <summary> The display name of the operation. </summary>
        public string Operation { get; }
        /// <summary> The display name of the resource the operation applies to. </summary>
        public string Resource { get; }
        /// <summary> The description of the operation. </summary>
        public string Description { get; }
        /// <summary> The resource provider for the operation. </summary>
        public string Provider { get; }
    }
}


text:
<?php //-->

/**
 * Generates utility query strings
 *
 * @package    Eden
 * @category   sql
 * @author     Christian Blanquera cblanquera@openovate.com
 */
class eden_postgre_utility extends Eden_Sql_Query
{
    /* Constants
    -------------------------------*/
    /* Public Properties
    -------------------------------*/
    /* Protected Properties
    -------------------------------*/
    protected $_query = NULL;

    /* Private Properties
    -------------------------------*/
    /* Get
    -------------------------------*/
    /* Magic
    -------------------------------*/
    public static function i()
    {
        return self::_getMultiple(__CLASS__);
    }

    /* Public Methods
    -------------------------------*/
    /**
     * Query for dropping a table
     *
     * @param string the name of the table
     * @return this
     */
    public function dropTable($table)
    {
        //Argument 1 must be a string
        Eden_Postgre_Error::i()->argument(1, 'string');

        $this->_query = 'DROP TABLE "' . $table .'"';

        return $this;
    }

    /**
     * Returns the string version of the query
     *
     * @return string
     */
    public function getQuery()
    {
        return $this->_query.';';
    }

    /**
     * Query for renaming a table
     *
     * @param string the name of the table
     * @param string the new name of the table
     * @return this
     */
    public function renameTable($table, $name)
    {
        //Argument 1 must be a string, 2 must be string
        Eden_Postgre_Error::i()->argument(1, 'string')->argument(2, 'string');

        $this->_query = 'RENAME TABLE "' . $table . '" TO "' . $name . '"';

        return $this;
    }

    public function setSchema($schema)
    {
        $this->_query = 'SET search_path TO '.$schema;

        return $this;
    }

    /**
     * Query for truncating a table
     *
     * @param string the name of the table
     * @return this
     */
    public function truncate($table)
    {
        //Argument 1 must be a string
        Eden_Postgre_Error::i()->argument(1, 'string');

        $this->_query = 'TRUNCATE "' . $table .'"';

        return $this;
    }

    /* Protected Methods
    -------------------------------*/
    /* Private Methods
    -------------------------------*/
}


text:
Settings = {}
Settings.__index = Settings

setmetatable(Settings, {
  __call = function (cls, ...)
    local self = setmetatable({}, cls)
    self:_init(...)
    return self
  end,
})

function Settings:_init(text, x, y, font, scale, color, limit, aligen)
  -- Settings
  love.graphics.setDefaultFilter( 'nearest', 'nearest' )
  self.backroundColor = {50, 150, 200, 255}
  self.font = love.graphics.newImageFont("coolFont.png",
    " abcdefghijklmnopqrstuvwxyz" ..
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ0" ..
    "123456789.,!?-+/():;%&`'*#=[]\"")
  love.graphics.setFont(self.font, 27)
  self.worldWidth = 4000
  self.worldHeight = 4000
end


text:
<!--
  Natural Language Processing Library for JavaScript

  A client-side NLP utility library for web applications

  Copyright 2015 Intel Corporation

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

  Authors:
    Elliot Smith <elliot.smith@intel.com>
    Max Waterman <max.waterman@intel.com>
    Plamena Manolova <plamena.manolova@intel.com>
-->

<!--
 - cp-auth
 -
 - getToken(service) - initiate process for getting an auth token
 - removeCachedToken(service) - removes any cached tokens, to next getToken() will get a new one
 -
 - event: accesstoken - there is a new access token, the detail provides the token and service it is for.
 -->

<link rel="import" href="../bower_components/polymer/polymer.html">

<link rel="import" href="./cp-globals.html">

<dom-module id="cp-auth">
  <template>
    <cp-globals id="globals"></cp-globals>
  </template>
  <script>
    (function () {
      'use strict';

      var handleNewToken = function (self, detailIn) {
        if (detailIn.component === 'auth' && detailIn.type === 'accesstoken') {
          var detailOut = {
            token: detailIn.token,
            service: detailIn.service
          };
          self.fire('accesstoken', detailOut);
          console.log('CP-AUTH:received token:', detailOut.token);
        }
      };

      Polymer({
        is: 'cp-auth',

        getToken: function (service) {
          if (!this.$.globals.data.app_id) {
            console.log('CP-AUTH:getToken() called but app_id not set yet');
            return;
          }

          service = service || 'google';
          console.log('CP-AUTH:getting token');
          var message = {
            component: 'auth',
            service: service,
            type: 'gettoken'
          };

          var self = this;
          chrome.runtime.sendMessage(this.$.globals.data.app_id, message, function (detail) {
            if (chrome.runtime.lastError) {
              var message = chrome.runtime.lastError.message;
              console.log(new Error('CP-AUTH:error in responseCallback:' + message));
            } else {
              console.log('CP-AUTH:sendResponse invoked:', detail);
              handleNewToken(self, detail);
            }
          });
        },

        removeCachedToken: function (token, service) {
          if (!this.$.globals.data.app_id) {
            console.log('CP-AUTH:removeCachedToken() called but app_id not set yet');
            return;
          }

          // need 'service' property or search the hash
          var message = {
            component: 'auth',
            service: service,
            type: 'removecachedtoken',
            token: token
          };
          chrome.runtime.sendMessage(this.$.globals.data.app_id, message);
        }
      }); // Polymer()
    }());
  </script>
</dom-module>


text:
title:  "¡Earthquakes!"
date:   2017-08-31
published: true
---
In this post we are going to make an analysis to a [**Seismic Swarm**](https://en.wikipedia.org/wiki/Earthquake_swarm) occurred in Venezuela specifically in the Andean region of that country (It should be noted that the data are provided by [**FUNVISIS**](www.funvisis.gob.ve/)
and are not publicly accessible). I simply work with the data since I am currently working there as a [seismogram analyst](https://en.wikipedia.org/wiki/Seismogram) In principle the data is in a format that requires additional work to convert it into a kind of table and thus be able to handle them more comfortably for me, not addressed in this post what is
[**Data Cleaning**](https://en.wikipedia.org/wiki/Data_cleansing)

The first thing is to start loading our libraries

library(rgl)
library(scatterplot3d)
library(RColorBrewer)

One of which is very important is rgl and you can test it with open3d() in "R". After doing the necessary treatment to our data we proceed to generate our variables.

~~~R
datos <- read.table("/RUTA ACA/sismos_vigia.txt", header = TRUE)
~~~

Visualizamos con `head(datos)`:

~~~R
  year month day hour minute second latitude longitude depth mag1 typ_mag1       date
1 2015    11   1    1     27   20.0    6.727   -72.992 168.6  2.8     WFUN 2015-11-01
2 2015    11   2   14     31   13.6    7.015   -73.223 186.1  3.4     WFUN 2015-11-02
3 2015    11   2   15     41   44.9    7.182   -73.395 140.1  3.0     WFUN 2015-11-02
4 2015    11   3   12      4   48.2    7.242   -73.259 158.4  3.0     WFUN 2015-11-03
5 2015    11   6    1     35   37.6    6.951   -73.265 171.7  3.2     WFUN 2015-11-06
6 2015    11   6    3     26   47.4    8.685   -70.752   5.0  2.3     WFUN 2015-11-06
~~~

Something important whenever we work with tables or almost any type of data frame or object is to know its characteristics properties among others, so what we will do is to know the name of the columns we have with:

`colnames(datos)`

~~~R
[1] "year"      "month"     "day"       "hour"      "minute"    "second"    "latitude"  "longitude" "depth"     "mag1"
[11] "typ_mag1"  "date"
~~~

We see that they are the names of each column seen previously with head(data) , this is will allow us to decide that we want to graph in 3D.
For our case they will be magnitude and depth, that is to say we want to visualize the seismic events according to the depth in a specific region to give us an idea of the spatial distribution of the same ones.
Therefore we generate our variables and our 3D plot:

~~~R
mag <- (datos$mag1)
prof <- (datos$depth)
plot3d(mag,prof)
~~~

Giving us a 3D interactive window that allows us to move and see the data that before was a table in something more useful and presentable.

![](/images/primerplot.png)

This 3D graphic is kind of crappy so let's try to put some color on it and touch some of its options:

~~~R
latitud<- (datos$latitude)
longitud<- (datos$longitude)
profundidad<- (datos$depth)
plot3d(latitud,longitud,profundidad, col=brewer.pal(3, "Dark2"), type = "p", size = 7)
~~~

Subtly improving :)

![](/images/final.png)

And as a final resource for this post we could generate a scatterplot3d (Only it came out upside down XD), which allows us something similar but in 2D and static.

~~~R
jj <- scatterplot3d(latitud,longitud,profundidad, pch = 1, highlight.3d = TRUE, type = "h", main = "Ejemplo con scatterplot3d", angle = 45)
~~~

![](/images/scatter.png)

Of course we can also generate interactive maps as it has been done before, what we need to do is this:

Load the library:

library(leaflet)

We create a variable called Map and we configure the view in a specific point, in our case Venezuela

~~~R
Mapa <- leaflet()
Mapa <- addTiles(Mapa)
Mapa <- setView(Mapa, lng =-66.690940, lat=10.00, zoom = 5)
~~~

We read the data that interest us:

~~~R
data <- read.table("sismos_vigia.txt", header = TRUE)
~~~

Then we make the assignment of the information:

~~~R
Mapa <-leaflet(data = data[1:20,]) %>% addTiles() %>%addMarkers(~longitude, ~latitude, popup = ~as.character(mag1))
~~~

![](/images/sismica.png)

~~~R
HACKED!
~~~


text:
import { AbstractData } from "../../core/data/AbstractData";

export class SrvUpdateTimeBankConfigData extends AbstractData {
	public timeBankReplenishmentHandCount:number;
		public timeBankReplenishmentAmount:number;
		public timeBankAmount:number;
		public timeBankMaxAmount:number;

	constructor(parent?:AbstractData) {
		super(parent);
	}
}


text:
function myprog() {
  CURRENT=`pwd`
  BASENAME=`basename "$CURRENT"`
  echo $CURRENT
  echo $BASENAME
  for d in *; do
      echo $d
      cd $d
      ls
      javac Main.java
      cd $CURRENT
    done
}
myprog;


text:
module.exports = {
  printWidth: 100,
  parser: 'flow',
  tabWidth: 2,
  singleQuote: true,
  bracketSpacing: true,
  arrowParens: 'always',
  trailingComma: 'es5',
  semi: true,
};