text:
#ifndef INCLUDED_BASE_POKEMON_IMPL_HPP
#define INCLUDED_BASE_POKEMON_IMPL_HPP

//For code cleanliness in source file
#define ICON_PATH(name) fs::path(fs::path(_icon_dir) / name)
#define FEMALE_ICON_PATH(name) fs::path(fs::path(_icon_dir) / "female" / name)
#define SPRITE_PATH(name) fs::path(fs::path(_sprite_dir) / name)
#define SHINY_SPRITE_PATH(name) fs::path(fs::path(_shiny_sprite_dir) / name)
#define FEMALE_SPRITE_PATH(name) fs::path(fs::path(_sprite_dir) / "female" / name)
#define FEMALE_SHINY_SPRITE_PATH(name) fs::path(fs::path(_shiny_sprite_dir) / "female" / name)

#define SET_IMAGES_PATHS(filename) _male_icon_path = ICON_PATH(filename); \
                                   _female_icon_path = _male_icon_path; \
                                   _male_sprite_path = SPRITE_PATH(filename); \
                                   _female_sprite_path = _male_sprite_path; \
                                   _male_shiny_sprite_path = SHINY_SPRITE_PATH(filename); \
                                   _female_shiny_sprite_path = _male_sprite_path;

#define SET_POKEBALL_IMAGE() _male_icon_path = fs::path(_images_dir / "misc" / "pokeball.png"); \
                             _female_icon_path = _male_icon_path; \
                             _male_sprite_path = fs::path(_images_dir / "misc" / "pokeball.png"); \
                             _female_sprite_path = _female_icon_path; \
                             _male_shiny_sprite_path = _male_sprite_path; \
                             _female_shiny_sprite_path = _female_sprite_path;

#define SET_SUBSTITUTE_IMAGE() _male_icon_path = _male_icon_path = SPRITE_PATH("substitute.png"); \
                                                 _female_icon_path = _male_icon_path; \
                                                 _male_sprite_path = SPRITE_PATH("substitute.png"); \
                                                 _female_sprite_path = _female_icon_path; \
                                                 _male_shiny_sprite_path = _male_sprite_path; \
                                                 _female_shiny_sprite_path = _female_sprite_path;

#include <boost/filesystem/path.hpp>
#include <boost/format.hpp>

#include <pkmn/base_pokemon.hpp>

#include "SQLiteCpp/SQLiteC++.h"

namespace pkmn
{
    class base_pokemon_impl: public base_pokemon
    {
        public:

            base_pokemon_impl(unsigned int species_id, unsigned int game_id);

            //Game-specific info
            std::string get_game() const;
            unsigned int get_generation() const;

            //Non-Battle Attributes
            std::string get_name() const;
            std::string get_species() const;
            unsigned int get_pokedex_num() const;
            std::string get_pokedex_entry() const;
            string_pair_t get_types() const;
            double get_height() const;
            double get_weight() const;
            void get_evolutions(base_pokemon_vector& evolution_vec) const;
			bool is_fully_evolved() const;

            //Battle Stats
            unsigned int get_exp_yield() const;

            //Forms
            std::string get_form() const;

            //Database Info
            unsigned int get_pokemon_id() const;
            unsigned int get_species_id() const;
            unsigned int get_game_id() const;
            unsigned int get_form_id() const;

        protected:

            void _get_evolution_ids(std::vector<unsigned int> &id_vec) const;
            virtual void _set_old_values();

            unsigned int _generation, _form_id, _pokemon_id, _species_id, _type1_id, _type2_id;
            unsigned int _hp, _attack, _defense, _speed, _special, _special_attack, _special_defense;

            unsigned int _game_id;
            std::string _images_default_basename, _images_game_string, _images_gen_string;
            boost::filesystem::path _images_dir, _icon_dir;
            boost::filesystem::path _sprite_dir, _shiny_sprite_dir;
            boost::filesystem::path _male_icon_path, _female_icon_path;
            boost::filesystem::path _male_sprite_path, _female_sprite_path;
            boost::filesystem::path _male_shiny_sprite_path, _female_shiny_sprite_path;

            static pkmn::shared_ptr<SQLite::Database> _db;
            static boost::format _png_format;
    };
}

#endif /* INCLUDED_BASE_POKEMON_IMPL_HPP */


text:
/*
    (c) 2009 by Leon Winter
    (c) 2009-2011 by Hannes Schueller
    (c) 2009-2010 by Matto Fransen
    (c) 2010-2011 by Hans-Peter Deifel
    (c) 2010-2011 by Thomas Adam
    see LICENSE file
*/

/* config file */
#define             RCFILE                      "%s/.config/vimprobable/vimprobablerc", getenv("HOME")

/* max entries in command history */
#define COMMANDHISTSIZE 50

gboolean read_rcfile(const char *config);
void save_command_history(char *line);
gboolean process_save_qmark(const char *bm, WebKitWebView *webview);
void make_keyslist(void);
gboolean parse_colour(char *color);
gboolean mappings(const Arg *arg);
gboolean process_mapping(char *keystring, int maprecord, char *cmd);
gboolean process_map_line(char *line);
gboolean changemapping(Key *search_key, int maprecord, char *cmd);
gboolean process_line_arg(const Arg *arg);
gboolean build_taglist(const Arg *arg, FILE *f);
void set_error(const char *error);
void give_feedback(const char *feedback);
Listelement * complete_list(const char *searchfor, const int mode, Listelement *elementlist);
Listelement * add_list(const char *element, Listelement *elementlist);
int count_list(Listelement *elementlist);
void free_list(Listelement *elementlist);

enum ConfigFileError read_searchengines(const char *filename);
char *find_uri_for_searchengine(const char *handle);
void make_searchengines_list(Searchengine *searchengines, int length);

redpajama_set_name: RedPajamaGithub


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

<title>org.springframework.oxm.support (Spring Framework 4.3.3.RELEASE API)</title>
<meta name="date" content="2016-09-19">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Spring Framework

Prev Package

Next Package

Frames

No Frames

All Classes

Package org.springframework.oxm.support

Provides generic support classes for using Spring's O/X Mapping integration
 within various scenario's.

See: Description

Class Summary

Class
Description

AbstractMarshaller

Abstract implementation of the Marshaller and Unmarshaller interface.

MarshallingSource

Source implementation that uses a Marshaller.Can be constructed with a
 Marshaller and an object to be marshalled.

SaxResourceUtils

Convenient utility methods for dealing with SAX.

Package org.springframework.oxm.support Description

Provides generic support classes for using Spring's O/X Mapping integration
 within various scenario's. Includes the MarshallingSource for compatibility
 with TrAX, MarshallingView for use withing Spring Web MVC, and the
 MarshallingMessageConverter for use within Spring's JMS support.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Spring Framework

Prev Package

Next Package

Frames

No Frames

All Classes


text:
<?php

/*
 * This code was originally part of the Symfony2 FrameworkBundle.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 */

namespace VGMdb\Component\Translation;

use Symfony\Component\Translation\Loader\LoaderInterface;

/**
 * TranslationLoader loads translation messages from translation files.
 *
 * @author Michel Salib <michelsalib@hotmail.com>
 * @author Gigablah <gigablah@vgmdb.net>
 */
class TranslationLoader
{
    /**
     * Loaders used for import.
     *
     * @var array
     */
    private $loaders = array();

    /**
     * Format to extension mapping.
     *
     * @var array
     */
    private $extensions = array();

    /**
     * Sets the format to extension mapping.
     *
     * @param array $extensions
     */
    public function setExtensions(array $extensions = array())
    {
        $this->extensions = $extensions;
    }

    /**
     * Adds a loader to the translation extractor.
     *
     * @param string          $format The format of the loader
     * @param LoaderInterface $loader
     */
    public function addLoader($format, LoaderInterface $loader)
    {
        $this->loaders[$format] = $loader;
    }

    /**
     * Loads translation messages from a directory to the catalogue.
     *
     * @param string           $directory the directory to look into
     * @param MessageCatalogue $catalogue the catalogue
     * @param Boolean          $intersect whether to discard messages not already in catalogue
     */
    public function loadMessages($directory, MessageCatalogue $catalogue, $intersect = false)
    {
        foreach ($this->loaders as $format => $loader) {
            // load any existing translation files
            $extension = $catalogue->getLocale().'.';
            if (isset($this->extensions[$format])) {
                $extension .= $this->extensions[$format];
            } else {
                $extension .= strtolower($format);
            }
            $files = glob($directory.'/*.'.$extension);
            foreach ($files as $file) {
                $domain = substr(basename($file), 0, -1 * strlen($extension) - 1);
                $loaded = $loader->load($file, $catalogue->getLocale(), $domain);

                if ($intersect) {
                    $catalogue->intersectCatalogue($loaded);
                } else {
                    $catalogue->addCatalogue($loaded);
                }
            }
        }
    }
}


text:
//=================================================================================================

//=================================================================================================

#ifndef _BLAZE_UTIL_TYPETRAITS_HAVESAMESIZE_H_
#define _BLAZE_UTIL_TYPETRAITS_HAVESAMESIZE_H_

//*************************************************************************************************
// Includes
//*************************************************************************************************

#include <blaze/util/IntegralConstant.h>

namespace blaze {

//=================================================================================================
//
//  CLASS DEFINITION
//
//=================================================================================================

//*************************************************************************************************
/*!\brief Compile time size check.
// \ingroup type_traits
//
// This class offers the possibility to test the size of two types at compile time. If an object
// of type \a T1 has the same size as an object of type \a T2, the \a value member constant is
// set to \a true, the nested type definition \a Type is \a TrueType, and the class derives from
// \a TrueType. Otherwise \a value  is set to \a false, \a Type is \a FalseType, and the class
// derives from \a FalseType.

   \code
   blaze::HaveSameSize<int,unsigned int>::value  // Evaluates to 'true'
   blaze::HaveSameSize<int,unsigned int>::Type   // Results in TrueType
   blaze::HaveSameSize<int,unsigned int>         // Is derived from TrueType
   blaze::HaveSameSize<char,wchar_t>::value      // Evalutes to 'false'
   blaze::HaveSameSize<char,wchar_t>::Type       // Results in FalseType
   blaze::HaveSameSize<char,wchar_t>             // Is derived from FalseType
   \endcode

// One example for the application of this type trait is a compile time check if the compiler
// supports the 'Empty Derived class Optimization (EDO)':

   \code
   // Definition of the base class A
   struct A {
      int i_;
   };

   // Definition of the derived class B
   struct B : public A {};

   // Testing whether or not an object of type B has the same size as the
   //   base class A and whether the compiler supports EDO
   blaze::HaveSameSize( A, B );
   \endcode
*/
template< typename T1, typename T2 >
class HaveSameSize
   : public BoolConstant< sizeof(T1) == sizeof(T2) >
{};
//*************************************************************************************************

//*************************************************************************************************
/*! \cond BLAZE_INTERNAL */
/*!\brief Partial specialization of the compile time size constraint.
// \ingroup type_traits
//
// This class is a partial specialization of the HaveSameSize template for the type \a void
// as first template argument. The \a value member constant is automatically set to \a false,
// the nested type definition \a Type is \a FalseType, and the class derives from \a FalseType
// for any given type \a T since the \a void type has no size.
*/
template< typename T >
class HaveSameSize<void,T>
   : public FalseType
{};
/*! \endcond */
//*************************************************************************************************

//*************************************************************************************************
/*! \cond BLAZE_INTERNAL */
/*!\brief Partial specialization of the compile time size constraint.
// \ingroup type_traits
//
// This class is a partial specialization of the HaveSameSize template for the type \a void
// as second template argument. The \a value member constant is automatically set to \a false,
// the nested type definition \a Type is \a FalseType, and the class derives from \a FalseType
// for any given type \a T since the \a void type has no size.
*/
template< typename T >
class HaveSameSize<T,void>
   : public FalseType
{};
/*! \endcond */
//*************************************************************************************************

//*************************************************************************************************
/*! \cond BLAZE_INTERNAL */
/*!\brief Full specialization of the compile time size constraint.
// \ingroup type_traits
//
// This class is a full specialization of the HaveSameSize template for the type \a void
// as first and second template argument. The \a value member constant is automatically set
// to \a true, the nested type definition \a Type is \a TrueType, and the class derives from
// \a TrueType since both arguments are \a void.
*/
template<>
class HaveSameSize<void,void>
   : public TrueType
{};
/*! \endcond */
//*************************************************************************************************

//*************************************************************************************************
/*!\brief Auxiliary variable template for the HaveSameSize type trait.
// \ingroup type_traits
//
// The HaveSameSize_v variable template provides a convenient shortcut to access the nested
// \a value of the HaveSameSize class template. For instance, given the typew \a T1 and \a T2
// the following two statements are identical:

   \code
   constexpr bool value1 = blaze::HaveSameSize<T1,T2>::value;
   constexpr bool value2 = blaze::HaveSameSize_v<T1,T2>;
   \endcode
*/
template< typename T1, typename T2 >
constexpr bool HaveSameSize_v = HaveSameSize<T1,T2>::value;
//*************************************************************************************************

} // namespace blaze

#endif


text:
require 'chef/provisioning/convergence_strategy/precreate_chef_objects'
require 'mixlib/install'
require 'pathname'

class Chef
module Provisioning
  class ConvergenceStrategy
    class InstallMsi < PrecreateChefObjects
      def initialize(convergence_options, config)
        super
        @chef_version ||= convergence_options[:chef_version]
        @prerelease ||= convergence_options[:prerelease]
        @chef_client_timeout = convergence_options.has_key?(:chef_client_timeout) ? convergence_options[:chef_client_timeout] : 120*60 # Default: 2 hours
      end

      attr_reader :chef_version
      attr_reader :prerelease
      attr_reader :install_msi_url
      attr_reader :install_msi_path

      def setup_convergence(action_handler, machine)
        if !convergence_options.has_key?(:client_rb_path) || !convergence_options.has_key?(:client_pem_path)
          system_drive = machine.system_drive
          @convergence_options = Cheffish::MergedConfig.new(convergence_options, {
            :client_rb_path => "#{system_drive}\\chef\\client.rb",
            :client_pem_path => "#{system_drive}\\chef\\client.pem",
            :install_script_path => "#{system_drive}\\chef\\\install.ps1"
          })
        end

        opts = {"prerelease" => prerelease}
        if convergence_options[:bootstrap_proxy]
          opts["http_proxy"] = convergence_options[:bootstrap_proxy]
          opts["https_proxy"] = convergence_options[:bootstrap_proxy]
        end
        opts["install_msi_url"] = convergence_options[:install_msi_url] if convergence_options[:install_msi_url]
        super

        install_command = Mixlib::Install.new(chef_version, true, opts).install_command
        machine.write_file(action_handler, convergence_options[:install_script_path], install_command)

        action_handler.open_stream(machine.node['name']) do |stdout|
          action_handler.open_stream(machine.node['name']) do |stderr|
            machine.execute(action_handler, "powershell.exe -ExecutionPolicy Unrestricted -NoProfile \"& \"\"#{convergence_options[:install_script_path]}\"\"\"",
              :raw => true,
              :stream_stdout => stdout,
              :stream_stderr => stderr)
          end
        end
      end

      def converge(action_handler, machine)
        super

        action_handler.open_stream(machine.node['name']) do |stdout|
          action_handler.open_stream(machine.node['name']) do |stderr|
            command_line = "chef-client"
            command_line << " -l #{config[:log_level].to_s}" if config[:log_level]
            machine.execute(action_handler, command_line,
              :raw => true,
              :stream_stdout => stdout,
              :stream_stderr => stderr,
              :timeout => @chef_client_timeout)
          end
        end
      end

    end
  end
end
end


text:
import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

def base_dir_join(*args):
    return os.path.join(BASE_DIR, *args)

SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

# Admins and Managers

ADMINS = (
    ('Vinta', 'contact@vinta.com.br'),
)

MANAGERS = ADMINS

# Application definition

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sitemaps',

    'corsheaders',
    'rest_framework',
    'djangobower',
    'compressor',
    'django_filters',
    'widget_tweaks',
    'django_markdown',
    'meta',
    'bootstrap_pagination',
    'django_comments',
    'django.contrib.sites',
    'anymail',

    # Apps
    'core',
    'error_posts',
    'users',
)

MIDDLEWARE_CLASSES = (
    'log_request_id.middleware.RequestIDMiddleware',
    'herokuapp_redirect.middleware.CustomDomainRedirectMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'corsheaders.middleware.CorsMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.security.SecurityMiddleware',
)

ROOT_URLCONF = 'fix_my_django.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': ['templates'],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

WSGI_APPLICATION = 'fix_my_django.wsgi.application'

# Internationalization

LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True

# Email settings
DEFAULT_FROM_EMAIL = 'contact@vinta.com.br'

# REST

REST_FRAMEWORK = {
    'DEFAULT_RENDERER_CLASSES': (
        'rest_framework.renderers.JSONRenderer',
    ),
    'DEFAULT_FILTER_BACKENDS': (
        'rest_framework.filters.DjangoFilterBackend',
    ),
    'DEFAULT_THROTTLE_CLASSES': (
        'rest_framework.throttling.AnonRateThrottle',
        'rest_framework.throttling.UserRateThrottle'
    ),
    'DEFAULT_THROTTLE_RATES': {
        'anon': '3/second',
        'user': '3/second'
    }
}

# CORS
CORS_ORIGIN_ALLOW_ALL = True
CORS_URLS_REGEX = r'^/api/.*$'

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'django.contrib.staticfiles.finders.FileSystemFinder',

    'djangobower.finders.BowerFinder',
)

MEDIA_ROOT = 'media'
STATIC_ROOT = 'static'

STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'

# Bower

BOWER_COMPONENTS_ROOT = base_dir_join('components')

BOWER_INSTALLED_APPS = (
    'bootstrap-sass-official#3.3.4',
    'jquery#2.1.4',
    'font-awesome#4.3.0',
    'select2#4.0.0',
    'select2-bootstrap-theme#0.1.0-beta.3',
)

# Markdown settings
MARKDOWN_EXTENSIONS = ['extra', 'codehilite']

# Meta tags settings
# https://github.com/nephila/django-meta#configuration

META_USE_OG_PROPERTIES = True
META_USE_TWITTER_PROPERTIES = True
META_USE_GOOGLEPLUS_PROPERTIES = True
META_SITE_DOMAIN = 'http://www.fixmydjango.com'

# Messages
MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage'

# Login
LOGIN_URL = '/login/'
LOGIN_REDIRECT_URL = '/'

# Auth
AUTH_USER_MODEL = 'users.User'

# Default value for django.contrib.sites
SITE_ID = 1

# Comment app
COMMENTS_APP = 'error_posts'


text:
'use strict';

import { createStore, bindActionCreators, combineReducers, applyMiddleware } from 'redux';
import { Provider, connect } from 'react-redux';
import thunkMiddleware from 'redux-thunk';
import createLoggerMiddleware from 'redux-logger'
import React, { Component, PropTypes } from 'react';
import ReactDOM from 'react-dom';

//--------- Actions ---------
const Actions = {
	now: (time)=> {
		return {
			type: 'NOW',
			time: time,
		};
	},
};

// --------- Reducers ---------
function timeReducer(state = 0, action) {
	switch (action.type) {
	case 'NOW':
		return {
			value: action.time,
			stamp: new Date(action.time).toISOString().replace('T', ' ').substr(0, 23),
		};
	default:
		return state;
	}
}
const rootReducer = combineReducers({
	time: timeReducer
});

//--------- Store ---------
const createStoreWithMiddleware = applyMiddleware(
	thunkMiddleware,
	createLoggerMiddleware()
)(createStore);
const initialState = rootReducer({}, Actions.now(Date.now()));
const store = createStoreWithMiddleware(rootReducer, initialState);

//--------- View (React) ---------
class TimerApp extends Component {
	render() {
		const { timestamp } = this.props;
		return (

					{timestamp}

		);
	}

	componentWillMount() {
		setInterval(()=> {
			this.props.now(Date.now());
		}, 500);
	}
}
TimerApp.propTypes = {
	now: PropTypes.func.isRequired,
	timestamp: PropTypes.string.isRequired,
};
const App = connect(
	(state)=> {
		return {
			timestamp: state.time.stamp
		};
	},
	(dispatch)=> bindActionCreators(Actions, dispatch)
)(TimerApp);

ReactDOM.render(
	<Provider store={store}>
		<App />
	</Provider>,
	document.getElementById('root')
);


text:
function testStringObjectLength() {
    var x = new String("foo"), y = 0;
    for (var i = 0; i < 10; ++i)
        y = x.length;
    return y;
}
assertEq(testStringObjectLength(), 3);


text:
// e2e.go runs the e2e test suite. No non-standard package dependencies; call with "go run".
package main

import (
	"bytes"
	"flag"
	"fmt"
	"log"
	"os"
	"os/exec"
	"os/signal"
	"path"
	"path/filepath"
	"strings"
)

var (
	isup    = flag.Bool("isup", false, "Check to see if the e2e cluster is up, then exit.")
	build   = flag.Bool("build", false, "If true, build a new release. Otherwise, use whatever is there.")
	up      = flag.Bool("up", false, "If true, start the the e2e cluster. If cluster is already up, recreate it.")
	push    = flag.Bool("push", false, "If true, push to e2e cluster. Has no effect if -up is true.")
	down    = flag.Bool("down", false, "If true, tear down the cluster before exiting.")
	test    = flag.Bool("test", false, "Run all tests in hack/e2e-suite.")
	tests   = flag.String("tests", "", "Run only tests in hack/e2e-suite matching this glob. Ignored if -test is set.")
	root    = flag.String("root", absOrDie(filepath.Clean(filepath.Join(path.Base(os.Args[0]), ".."))), "Root directory of kubernetes repository.")
	verbose = flag.Bool("v", false, "If true, print all command output.")

	cfgCmd = flag.String("cfg", "", "If nonempty, pass this as an argument, and call kubecfg. Implies -v.")
	ctlCmd = flag.String("ctl", "", "If nonempty, pass this as an argument, and call kubectl. Implies -v. (-test, -cfg, -ctl are mutually exclusive)")
)

var signals = make(chan os.Signal, 100)

func absOrDie(path string) string {
	out, err := filepath.Abs(path)
	if err != nil {
		panic(err)
	}
	return out
}

func main() {
	flag.Parse()
	signal.Notify(signals, os.Interrupt)

	if *test {
		*tests = "*"
	}

	if *isup {
		status := 1
		if runBash("get status", `$KUBECFG -server_version`) {
			status = 0
			log.Printf("Cluster is UP")
		} else {
			log.Printf("Cluster is DOWN")
		}
		os.Exit(status)
	}

	if *build {
		if !runBash("build-release", `test-build-release`) {
			log.Fatal("Error building. Aborting.")
		}
	}

	if *up {
		if !Up() {
			log.Fatal("Error starting e2e cluster. Aborting.")
		}
	} else if *push {
		if !runBash("push", path.Join(*root, "/cluster/kube-push.sh")) {
			log.Fatal("Error pushing e2e cluster. Aborting.")
		}
	}

	failure := false
	switch {
	case *cfgCmd != "":
		failure = !runBash("'kubecfg "+*cfgCmd+"'", "$KUBECFG "+*cfgCmd)
	case *ctlCmd != "":
		failure = !runBash("'kubectl "+*ctlCmd+"'", "$KUBECFG "+*ctlCmd)
	case *tests != "":
		failed, passed := Test()
		log.Printf("Passed tests: %v", passed)
		log.Printf("Failed tests: %v", failed)
		failure = len(failed) > 0
	}

	if *down {
		TearDown()
	}

	if failure {
		os.Exit(1)
	}
}

func TearDown() {
	runBash("teardown", "test-teardown")
}

func Up() bool {
	if !tryUp() {
		log.Printf("kube-up failed; will tear down and retry. (Possibly your cluster was in some partially created state?)")
		TearDown()
		return tryUp()
	}
	return true
}

func tryUp() bool {
	return runBash("up", path.Join(*root, "/cluster/kube-up.sh; test-setup;"))
}

func Test() (failed, passed []string) {
	// run tests!
	dir, err := os.Open(filepath.Join(*root, "hack", "e2e-suite"))
	if err != nil {
		log.Fatal("Couldn't open e2e-suite dir")
	}
	defer dir.Close()
	names, err := dir.Readdirnames(0)
	if err != nil {
		log.Fatal("Couldn't read names in e2e-suite dir")
	}

	for i := range names {
		name := names[i]
		if name == "." || name == ".." {
			continue
		}
		if match, err := path.Match(*tests, name); !match && err == nil {
			continue
		}
		absName := filepath.Join(*root, "hack", "e2e-suite", name)
		log.Printf("%v matches %v. Starting test.", name, *tests)
		if runBash(name, absName) {
			log.Printf("%v passed", name)
			passed = append(passed, name)
		} else {
			log.Printf("%v failed", name)
			failed = append(failed, name)
		}
	}

	return
}

// All nonsense below is temporary until we have go versions of these things.

func runBash(stepName, bashFragment string) bool {
	cmd := exec.Command("bash", "-s")
	cmd.Stdin = strings.NewReader(bashWrap(bashFragment))
	return finishRunning(stepName, cmd)
}

func run(stepName, cmdPath string) bool {
	return finishRunning(stepName, exec.Command(filepath.Join(*root, cmdPath)))
}

func finishRunning(stepName string, cmd *exec.Cmd) bool {
	log.Printf("Running: %v", stepName)
	stdout, stderr := bytes.NewBuffer(nil), bytes.NewBuffer(nil)
	if *verbose {
		cmd.Stdout = os.Stdout
		cmd.Stderr = os.Stderr
	} else {
		cmd.Stdout = stdout
		cmd.Stderr = stderr
	}

	done := make(chan struct{})
	defer close(done)
	go func() {
		for {
			select {
			case <-done:
				return
			case s := <-signals:
				cmd.Process.Signal(s)
			}
		}
	}()

	if err := cmd.Run(); err != nil {
		log.Printf("Error running %v: %v", stepName, err)
		if !*verbose {
			fmt.Printf("stdout:\n------\n%v\n------\n", string(stdout.Bytes()))
			fmt.Printf("stderr:\n------\n%v\n------\n", string(stderr.Bytes()))
		}
		return false
	}
	return true
}

var bashCommandPrefix = `
set -o errexit
set -o nounset
set -o pipefail

export KUBE_CONFIG_FILE="config-test.sh"

# TODO(jbeda): This will break on usage if there is a space in
# ${KUBE_ROOT}.  Covert to an array?  Or an exported function?
export KUBECFG="` + *root + `/cluster/kubecfg.sh -expect_version_match"

source "` + *root + `/cluster/kube-env.sh"
source "` + *root + `/cluster/${KUBERNETES_PROVIDER}/util.sh"

if [[ ${KUBERNETES_PROVIDER} == "gce" ]]; then
  detect-project
fi

`

var bashCommandSuffix = `

`

func bashWrap(cmd string) string {
	return bashCommandPrefix + cmd + bashCommandSuffix
}


text:
#include "FirstOrderNonLinearR.hpp"
#include "Interaction.hpp"
#include "FirstOrderNonLinearDS.hpp"

#include "BlockVector.hpp"
#include "SimulationGraphs.hpp"

#include "debug.h"

typedef void (*FONLR_h)(double time, unsigned x_size, double *x, unsigned size_lambda, double* lambda, double *, unsigned z_size, double *z);
typedef FONLR_h FONLR_g;
typedef FONLR_h FONLR_C;
typedef FONLR_h FONLR_B;
typedef FONLR_h FONLR_K;
typedef FONLR_h FONLR_D;

void FirstOrderNonLinearR::initialize(Interaction& inter)
{
  FirstOrderR::initialize(inter);

  unsigned int sizeY = inter.dimension();
  unsigned int sizeDS = inter.getSizeOfDS();
  VectorOfSMatrices& relationMat = inter.relationMatrices();

  relationMat[FirstOrderR::mat_C].reset(new SimpleMatrix(sizeY, sizeDS));
  relationMat[FirstOrderR::mat_D].reset(new SimpleMatrix(sizeY, sizeY));
  relationMat[FirstOrderR::mat_B].reset(new SimpleMatrix(sizeDS, sizeY));
  relationMat[FirstOrderR::mat_K].reset(new SimpleMatrix(sizeDS, sizeDS));

  // F ? e ?
}

void FirstOrderNonLinearR::checkSize(Interaction& inter)
{}

void FirstOrderNonLinearR::computeh(double time, const BlockVector& x, const SiconosVector& lambda, BlockVector& z, SiconosVector& y)
{
  if(_pluginh)
  {
    auto xp = x.prepareVectorForPlugin();
    auto zp = z.prepareVectorForPlugin();
    ((FONLR_h)_pluginh->fPtr)(time, xp->size(), xp->getArray(), lambda.size(), lambda.getArray(), y.getArray(), zp->size(), zp->getArray());
    z = *zp;
  }
  else
  {
    THROW_EXCEPTION("FirstOrderNonLinearR::computeh - no plugin detected, you should provide one or derive this class and implement this function");
  }
}

void FirstOrderNonLinearR::computeg(double time, const BlockVector& x, const SiconosVector& lambda, BlockVector& z, BlockVector& r)
{
  if(_pluging)
  {
    auto xp = x.prepareVectorForPlugin();
    auto zp = z.prepareVectorForPlugin();
    auto rp = r.prepareVectorForPlugin();
    ((FONLR_g)_pluging->fPtr)(time, xp->size(), xp->getArray(), lambda.size(), lambda.getArray(), rp->getArray(), zp->size(), zp->getArray());
    z = *zp;
    r = *rp;
  }
  else
  {
    THROW_EXCEPTION("FirstOrderNonLinearR::computeg - no plugin detected, you should provide one or derive this class and implement this function");
  }
}

void FirstOrderNonLinearR::computeJachx(double time, const BlockVector& x, const SiconosVector& lambda, BlockVector& z, SimpleMatrix& C)
{
  if(_pluginJachx)
  {
    auto xp = x.prepareVectorForPlugin();
    auto zp = z.prepareVectorForPlugin();
    ((FONLR_C)_pluginJachx->fPtr)(time, xp->size(), xp->getArray(), lambda.size(), lambda.getArray(), C.getArray(), zp->size(), zp->getArray());
    z = *zp;
  }
  else
    THROW_EXCEPTION("FirstOrderNonLinearR::computeJachx, you need to derive this function in order to use it");
}

void FirstOrderNonLinearR::computeJachlambda(double time, const BlockVector& x, const SiconosVector& lambda, BlockVector& z, SimpleMatrix& D)
{
  if(_pluginJachlambda)
  {
    auto xp = x.prepareVectorForPlugin();
    auto zp = z.prepareVectorForPlugin();
    ((FONLR_D)_pluginJachlambda->fPtr)(time, xp->size(), xp->getArray(), lambda.size(), lambda.getArray(), D.getArray(), zp->size(), zp->getArray());
    z = *zp;
  }
  else
    THROW_EXCEPTION("FirstOrderNonLinearR::computeJachlambda, you need to either provide a matrix D or derive this function in order to use it");
}

void FirstOrderNonLinearR::computeJacglambda(double time, const BlockVector& x, const SiconosVector& lambda, BlockVector& z, SimpleMatrix& B)
{
  if(_pluginJacglambda)
  {
    auto xp = x.prepareVectorForPlugin();
    auto zp = z.prepareVectorForPlugin();
    ((FONLR_B)_pluginJacglambda->fPtr)(time, xp->size(), xp->getArray(), lambda.size(), lambda.getArray(), B.getArray(), zp->size(), zp->getArray());
    z = *zp;
  }
  else
    THROW_EXCEPTION("FirstOrderNonLinearR::computeJacglambda, you need to either provide a matrix B or derive this function in order to use it");
}

void FirstOrderNonLinearR::computeJacgx(double time, const BlockVector& x, const SiconosVector& lambda, BlockVector& z, SimpleMatrix& K)
{
  if(_pluginJacgx)
  {
    auto xp = x.prepareVectorForPlugin();
    auto zp = z.prepareVectorForPlugin();
    ((FONLR_K)_pluginJacgx->fPtr)(time, xp->size(), xp->getArray(), lambda.size(), lambda.getArray(), K.getArray(), zp->size(), zp->getArray());
    z = *zp;
  }
  else
    THROW_EXCEPTION("FirstOrderNonLinearR::computeJacgx, you need to either provide a matrix K or derive this function in order to use it");
}

void FirstOrderNonLinearR::computeOutput(double time, Interaction& inter, unsigned int level)
{
  DEBUG_PRINT("FirstOrderNonLinearR::computeOutput \n");
  VectorOfBlockVectors& DSlink = inter.linkToDSVariables();
  SiconosVector& y = *inter.y(level);
  SiconosVector& lambda = *inter.lambda(level);
  computeh(time, *DSlink[FirstOrderR::x], lambda, *DSlink[FirstOrderR::z], y);
  DEBUG_END("FirstOrderNonLinearR::computeOutput \n");
}

void FirstOrderNonLinearR::computeInput(double time, Interaction& inter, unsigned int level)
{
  DEBUG_PRINT("FirstOrderNonLinearR::computeInput \n");
  VectorOfBlockVectors& DSlink = inter.linkToDSVariables();
  SiconosVector& lambda = *inter.lambda(level);
  computeg(time, *DSlink[FirstOrderR::x], lambda, *DSlink[FirstOrderR::z], *DSlink[FirstOrderR::r]);
  DEBUG_END("FirstOrderNonLinearR::computeinput \n");
}

void FirstOrderNonLinearR::computeJach(double time, Interaction& inter)
{
  VectorOfBlockVectors& DSlink = inter.linkToDSVariables();
  VectorOfSMatrices& relationMat = inter.relationMatrices();

  SiconosVector& lambda = *inter.lambda(0);

  if(!_C)
  {
    computeJachx(time, *DSlink[FirstOrderR::x], lambda, *DSlink[FirstOrderR::z], *relationMat[FirstOrderR::mat_C]);
  }

  if(!_D)
  {
    computeJachlambda(time, *DSlink[FirstOrderR::x], lambda, *DSlink[FirstOrderR::z], *relationMat[FirstOrderR::mat_D]);
  }
}

void FirstOrderNonLinearR::computeJacg(double time, Interaction& inter)
{
  VectorOfBlockVectors& DSlink = inter.linkToDSVariables();
  VectorOfSMatrices& relationMat = inter.relationMatrices();

  SiconosVector& lambda = *inter.lambda(0);
  if(!_B)
  {
    computeJacglambda(time, *DSlink[FirstOrderR::x], lambda, *DSlink[FirstOrderR::z], *relationMat[FirstOrderR::mat_B]);
  }
  if(!_K)
  {
    computeJacgx(time, *DSlink[FirstOrderR::x], lambda, *DSlink[FirstOrderR::z], *relationMat[FirstOrderR::mat_K]);
  }
}


text:
<?php
/**
 * Contains EWSType_NonEmptyArrayOfAttachmentsType.
 */

/**
 * Contains the items or files that are attached to an item in the Exchange
 * store.
 *
 * @package php-ews\Types
 */
class EWSType_NonEmptyArrayOfAttachmentsType extends EWSType
{
    /**
     * Represents a file that is attached to an item in the Exchange store.
     *
     * @since Exchange 2007
     *
     * @var EWSType_FileAttachmentType
     */
    public $FileAttachment;

    /**
     * Represents an Exchange item that is attached to another Exchange item.
     *
     * @since Exchange 2007
     *
     * @var EWSType_ItemAttachmentType
     */
    public $ItemAttachment;
}


text:
use super::{Position, GameConfig};
use serde::json::{self, Value};

macro_rules! getString {
    ($obj:ident, $field:expr) => {
        String::from_str($obj.get($field).unwrap().as_string().unwrap())
    }
}

pub fn parse_message(msg: String) -> Message {
    let value: Value = json::from_str(&msg).unwrap();
    let obj = value.as_object().unwrap();
    let message = match getString!(obj, "type").as_ref() {
        "connected" => Message::ConnectedMessage(json::from_str(&msg).unwrap()),
        "start" => Message::StartMessage(json::from_str(&msg).unwrap()),
        "end" => Message::EndMessage(json::from_str(&msg).unwrap()),
        "events" => Message::EventsMessage(parse_events_message(&value)),
        _ => panic!("Couldn't parse message")
    };
    message
}

fn parse_events_message(value: &Value) -> EventsMessage {
    let obj = value.as_object().unwrap();
    EventsMessage {
        type_: getString!(obj, "type"),
        round_id: obj.get("roundId").unwrap().as_u64().unwrap() as u32,
        config: json::value::from_value(obj.get("config").unwrap().clone()).unwrap(),
        you: json::value::from_value(obj.get("you").unwrap().clone()).unwrap(),
        other_teams: json::value::from_value(obj.get("otherTeams").unwrap().clone()).unwrap(),
        events: obj.get("events").unwrap().clone().as_array().unwrap().iter().map(|ev| parse_event(ev.clone())).collect()
    }
}

fn parse_event(value: Value) -> Event {
    let value1 = value.clone();
    let obj = value1.as_object().unwrap();
    match getString!(obj, "event").as_ref() {
        "damaged" => Event::DamagedEvent(json::value::from_value(value).unwrap()),
        "hit" => Event::HitEvent(json::value::from_value(value).unwrap()),
        "die" => Event::DieEvent(json::value::from_value(value).unwrap()),
        "see" => Event::SeeEvent(json::value::from_value(value).unwrap()),
        "seeAsteroid" => Event::SeeAsteroidEvent(json::value::from_value(value).unwrap()),
        "radarEcho" => Event::RadarEchoEvent(json::value::from_value(value).unwrap()),
        "detected" => Event::DetectedEvent(json::value::from_value(value).unwrap()),
        "noaction" => Event::NoActionEvent(json::value::from_value(value).unwrap()),
        "move" => Event::MoveEvent(json::value::from_value(value).unwrap()),
        _ => panic!("Couldn't parse event")
    }
}

#[test]
fn test_parse_event() {
    let event_json = "{\"event\":\"noaction\",\"botId\":4}".to_string();
    let event_value: Value = json::from_str(&event_json).unwrap();
    let event_struct = parse_event(event_value);
    match event_struct {
        Event::NoActionEvent(ev) => assert!(ev.bot_id == 4),
        _ => panic!("Test failed")
    }
}

#[derive(Debug, Deserialize, Default)]
pub struct Bot {
    #[serde(rename="botId")] pub bot_id: u32,
    pub name: String,
    #[serde(rename="teamId")] pub team_id: u32,
    pub hp: i32,
    pub alive: bool,
    pub pos: Position
}

#[derive(Debug, Deserialize, Default)]
pub struct BotNoPosNoHp {
    #[serde(rename="botId")] pub bot_id: u32,
    pub name: String,
    #[serde(rename="teamId")] pub team_id: u32,
    pub hp: Option<i32>,
    pub alive: bool,
    pub pos: Option<Position>
}

#[derive(Debug, Deserialize, Default)]
pub struct Team {
    pub name: String,
    #[serde(rename="teamId")] pub team_id: u32,
    pub bots: Vec<Bot>
}

#[derive(Debug, Deserialize, Default)]
pub struct TeamNoPosNoHp {
    pub name: String,
    #[serde(rename="teamId")] pub team_id: u32,
    pub bots: Vec<BotNoPosNoHp>
}

#[derive(Debug, Deserialize)]
pub struct DamagedEvent {
    event: String,
    #[serde(rename="botId")] pub bot_id: u32,
    pub damage: u32
}

#[derive(Debug, Deserialize)]
pub struct HitEvent {
    event: String,
    #[serde(rename="botId")] pub bot_id: u32,
    pub source: u32
}

#[derive(Debug, Deserialize)]
pub struct DieEvent {
    event: String,
    #[serde(rename="botId")] pub bot_id: u32
}

#[derive(Debug, Deserialize)]
pub struct SeeEvent {
    event: String,
    #[serde(rename="botId")] pub bot_id: u32,
    pub source: u32,
    pub pos: Position
}

#[derive(Debug, Deserialize)]
pub struct SeeAsteroidEvent {
    event: String,
    pub pos: Position
}

#[derive(Debug, Deserialize)]
pub struct RadarEchoEvent {
    event: String,
    pub pos: Position
}

#[derive(Debug, Deserialize)]
pub struct DetectedEvent {
    event: String,
    #[serde(rename="botId")] pub bot_id: u32
}

#[derive(Debug, Deserialize)]
pub struct NoActionEvent {
    event: String,
    #[serde(rename="botId")] pub bot_id: u32
}

#[derive(Debug, Deserialize)]
pub struct MoveEvent {
    event: String,
    #[serde(rename="botId")] pub bot_id: u32,
    pub pos: Position
}

#[derive(Debug, Deserialize)]
pub enum Event {
    DamagedEvent(DamagedEvent),
    HitEvent(HitEvent),
    DieEvent(DieEvent),
    SeeEvent(SeeEvent),
    SeeAsteroidEvent(SeeEvent),
    RadarEchoEvent(RadarEchoEvent),
    DetectedEvent(DetectedEvent),
    NoActionEvent(NoActionEvent),
    MoveEvent(MoveEvent)
}

#[derive(Debug, Deserialize)]
struct ConnectedMessage {
    #[serde(rename="type")] type_: String,
    #[serde(rename="teamId")] team_id: u32,
    config: GameConfig
}

#[derive(Debug, Deserialize)]
pub struct StartMessage {
    #[serde(rename="type")] type_: String,
    pub config: GameConfig,
    pub you: Team,
    #[serde(rename="otherTeams")] pub other_teams: Vec<TeamNoPosNoHp>
}

#[derive(Debug, Deserialize)]
pub struct EndMessage {
    #[serde(rename="type")] type_: String,
    #[serde(rename="winnerTeamId")] pub winner_team_id: Option<u32>,
    pub you: Team
}

#[derive(Debug, Deserialize)]
pub struct EventsMessage {
    #[serde(rename="type")] type_: String,
    #[serde(rename="roundId")] pub round_id: u32,
    pub config: GameConfig,
    pub you: Team,
    #[serde(rename="otherTeams")] pub other_teams: Vec<TeamNoPosNoHp>,
    pub events: Vec<Event>
}

#[derive(Debug, Deserialize)]
pub enum Message {
    ConnectedMessage(ConnectedMessage),
    StartMessage(StartMessage),
    EndMessage(EndMessage),
    EventsMessage(EventsMessage)
}


text:
import pygal

piechart = pygal.Pie()
barchart = pygal.Bar()

file = open('pets.txt', 'r')

for line in file.read().splitlines():
    label, value = line.split(' ')
    piechart.add(label, int(value))
    barchart.add(label, int(value))
file.close()

piechart.title = 'Popular Pets'
piechart.render_in_browser()

barchart.title = 'Popular Pets'
barchart.render_in_browser()


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <parent>
        <groupId>org.yy.studyapp</groupId>
        <artifactId>studyapp-parent</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <relativePath>../studyapp-parent</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>studyapp-repository</artifactId>
    <packaging>jar</packaging>

    <name>Study Application Repository</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>

        </dependency>
        <dependency>
            <groupId>org.yy.studyapp</groupId>
            <artifactId>studyapp-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.yy.studyapp</groupId>
            <artifactId>studyapp-common</artifactId>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-commons-core</artifactId>

        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>

        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>jsr250-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
        </dependency>

        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jms</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-camel</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-core</artifactId>
        </dependency>
        <dependency>
            <artifactId>hibernate-commons-annotations</artifactId>
            <groupId>org.hibernate</groupId>
        </dependency>
        <dependency>
            <artifactId>hibernate-jpa-2.0-api</artifactId>
            <groupId>org.hibernate.javax.persistence</groupId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
            </plugin>
        </plugins>
    </build>
</project>


text:
#ifndef WebDevToolsAgentClient_h
#define WebDevToolsAgentClient_h

#include "WebCString.h"
#include "WebCommon.h"

namespace WebKit {
class WebString;
struct WebDevToolsMessageData;

class WebDevToolsAgentClient {
public:
    virtual void sendMessageToInspectorFrontend(const WebString&) { }
    virtual void sendDebuggerOutput(const WebString&) { }

    // Returns the identifier of the entity hosting this agent.
    virtual int hostIdentifier() { return -1; }

    // Notifies host upon runtime feature being enabled/disabled.
    virtual void runtimePropertyChanged(const WebString& name, const WebString& value) { }

    class WebKitClientMessageLoop {
    public:
        virtual ~WebKitClientMessageLoop() { }
        virtual void run() = 0;
        virtual void quitNow() = 0;
    };
    virtual WebKitClientMessageLoop* createClientMessageLoop() { return 0; }

    virtual bool exposeV8DebuggerProtocol() { return false; }

protected:
    ~WebDevToolsAgentClient() { }
};

} // namespace WebKit

#endif


text: The learning track for MIT Media Lab conference 2016.


text:
'use strict';

var pivotal = new(require('../index'))('000'),
	nock = require('nock');

require('should');
nock.disableNetConnect();

nock('https://www.pivotaltracker.com')
	.get('/services/v5/projects/12345/stories?offset=0&limit=128&envelope=true')
	.reply(200, [])
	.post('/services/v5/projects/12345/uploads')
	.reply(200, '{"name":"hello"}')
	.post('/services/v5/projects/12345/stories/123/comments', {'text':'Hello','file_attachments':[{'name':'hello'}]})
	.reply(200);

describe('Pivotal Tracker API', function() {

	it('should get stories', function(done) {
		pivotal.getStories('12345', {}, function(cb){ cb(); }, function(err, stories) {
			done();
		});
	});

	it('should post attachment', function(done) {
		pivotal.postAttachment('12345', '123', './README.md', 'text/plain', 'Hello', function(error, response) {
			done();
		});
	})

});


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.consumption.implementation;

import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.Get;
import com.azure.core.annotation.HeaderParam;
import com.azure.core.annotation.Headers;
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.PathParam;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.UnexpectedResponseExceptionType;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.PagedResponse;
import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.consumption.fluent.UsageDetailsClient;
import com.azure.resourcemanager.consumption.fluent.models.UsageDetailInner;
import com.azure.resourcemanager.consumption.models.Metrictype;
import com.azure.resourcemanager.consumption.models.UsageDetailsListResult;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in UsageDetailsClient. */
public final class UsageDetailsClientImpl implements UsageDetailsClient {
    private final ClientLogger logger = new ClientLogger(UsageDetailsClientImpl.class);

    /** The proxy service used to perform REST calls. */
    private final UsageDetailsService service;

    /** The service client containing this operation class. */
    private final ConsumptionManagementClientImpl client;

    /**
     * Initializes an instance of UsageDetailsClientImpl.
     *
     * @param client the instance of the service client containing this operation class.
     */
    UsageDetailsClientImpl(ConsumptionManagementClientImpl client) {
        this.service =
            RestProxy.create(UsageDetailsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
        this.client = client;
    }

    /**
     * The interface defining all the services for ConsumptionManagementClientUsageDetails to be used by the proxy
     * service to perform REST calls.
     */
    @Host("{$host}")
    @ServiceInterface(name = "ConsumptionManagemen")
    private interface UsageDetailsService {
        @Headers({"Content-Type: application/json"})
        @Get("/{scope}/providers/Microsoft.Consumption/usageDetails")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<UsageDetailsListResult>> list(
            @HostParam("$host") String endpoint,
            @PathParam(value = "scope", encoded = true) String scope,
            @QueryParam("$expand") String expand,
            @QueryParam("$filter") String filter,
            @QueryParam("$skiptoken") String skiptoken,
            @QueryParam("$top") Integer top,
            @QueryParam("api-version") String apiVersion,
            @QueryParam("metric") Metrictype metric,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get("{nextLink}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<UsageDetailsListResult>> listNext(
            @PathParam(value = "nextLink", encoded = true) String nextLink,
            @HostParam("$host") String endpoint,
            @HeaderParam("Accept") String accept,
            Context context);
    }

    /**
     * Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
     * later.
     *
     * @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
     *     for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
     *     scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
     *     '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
     *     '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
     *     subscription, billing account, department, enrollment account and management group, you can also add billing
     *     period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to
     *     specify billing period at department scope use
     *     '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
     *     Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}'
     *     for billingAccount scope,
     *     '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     billingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
     *     for invoiceSection scope, and
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
     *     partners.
     * @param expand May be used to expand the properties/additionalInfo or properties/meterDetails within a list of
     *     usage details. By default, these fields are not included when listing usage details.
     * @param filter May be used to filter usageDetails by properties/resourceGroup, properties/resourceName,
     *     properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. The
     *     filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
     *     Tag filter is a key value pair string where key and value is separated by a colon (:). PublisherType Filter
     *     accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type.
     * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
     *     contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that
     *     specifies a starting point to use for subsequent calls.
     * @param top May be used to limit the number of results to the most recent N usageDetails.
     * @param metric Allows to select different type of cost/usage records.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return result of listing usage details.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<UsageDetailInner>> listSinglePageAsync(
        String scope, String expand, String filter, String skiptoken, Integer top, Metrictype metric) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (scope == null) {
            return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .list(
                            this.client.getEndpoint(),
                            scope,
                            expand,
                            filter,
                            skiptoken,
                            top,
                            this.client.getApiVersion(),
                            metric,
                            accept,
                            context))
            .<PagedResponse<UsageDetailInner>>map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
     * later.
     *
     * @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
     *     for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
     *     scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
     *     '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
     *     '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
     *     subscription, billing account, department, enrollment account and management group, you can also add billing
     *     period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to
     *     specify billing period at department scope use
     *     '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
     *     Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}'
     *     for billingAccount scope,
     *     '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     billingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
     *     for invoiceSection scope, and
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
     *     partners.
     * @param expand May be used to expand the properties/additionalInfo or properties/meterDetails within a list of
     *     usage details. By default, these fields are not included when listing usage details.
     * @param filter May be used to filter usageDetails by properties/resourceGroup, properties/resourceName,
     *     properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. The
     *     filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
     *     Tag filter is a key value pair string where key and value is separated by a colon (:). PublisherType Filter
     *     accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type.
     * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
     *     contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that
     *     specifies a starting point to use for subsequent calls.
     * @param top May be used to limit the number of results to the most recent N usageDetails.
     * @param metric Allows to select different type of cost/usage records.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return result of listing usage details.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<UsageDetailInner>> listSinglePageAsync(
        String scope, String expand, String filter, String skiptoken, Integer top, Metrictype metric, Context context) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (scope == null) {
            return Mono.error(new IllegalArgumentException("Parameter scope is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .list(
                this.client.getEndpoint(),
                scope,
                expand,
                filter,
                skiptoken,
                top,
                this.client.getApiVersion(),
                metric,
                accept,
                context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }

    /**
     * Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
     * later.
     *
     * @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
     *     for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
     *     scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
     *     '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
     *     '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
     *     subscription, billing account, department, enrollment account and management group, you can also add billing
     *     period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to
     *     specify billing period at department scope use
     *     '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
     *     Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}'
     *     for billingAccount scope,
     *     '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     billingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
     *     for invoiceSection scope, and
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
     *     partners.
     * @param expand May be used to expand the properties/additionalInfo or properties/meterDetails within a list of
     *     usage details. By default, these fields are not included when listing usage details.
     * @param filter May be used to filter usageDetails by properties/resourceGroup, properties/resourceName,
     *     properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. The
     *     filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
     *     Tag filter is a key value pair string where key and value is separated by a colon (:). PublisherType Filter
     *     accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type.
     * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
     *     contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that
     *     specifies a starting point to use for subsequent calls.
     * @param top May be used to limit the number of results to the most recent N usageDetails.
     * @param metric Allows to select different type of cost/usage records.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return result of listing usage details.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<UsageDetailInner> listAsync(
        String scope, String expand, String filter, String skiptoken, Integer top, Metrictype metric) {
        return new PagedFlux<>(
            () -> listSinglePageAsync(scope, expand, filter, skiptoken, top, metric),
            nextLink -> listNextSinglePageAsync(nextLink));
    }

    /**
     * Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
     * later.
     *
     * @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
     *     for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
     *     scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
     *     '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
     *     '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
     *     subscription, billing account, department, enrollment account and management group, you can also add billing
     *     period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to
     *     specify billing period at department scope use
     *     '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
     *     Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}'
     *     for billingAccount scope,
     *     '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     billingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
     *     for invoiceSection scope, and
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
     *     partners.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return result of listing usage details.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<UsageDetailInner> listAsync(String scope) {
        final String expand = null;
        final String filter = null;
        final String skiptoken = null;
        final Integer top = null;
        final Metrictype metric = null;
        return new PagedFlux<>(
            () -> listSinglePageAsync(scope, expand, filter, skiptoken, top, metric),
            nextLink -> listNextSinglePageAsync(nextLink));
    }

    /**
     * Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
     * later.
     *
     * @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
     *     for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
     *     scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
     *     '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
     *     '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
     *     subscription, billing account, department, enrollment account and management group, you can also add billing
     *     period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to
     *     specify billing period at department scope use
     *     '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
     *     Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}'
     *     for billingAccount scope,
     *     '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     billingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
     *     for invoiceSection scope, and
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
     *     partners.
     * @param expand May be used to expand the properties/additionalInfo or properties/meterDetails within a list of
     *     usage details. By default, these fields are not included when listing usage details.
     * @param filter May be used to filter usageDetails by properties/resourceGroup, properties/resourceName,
     *     properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. The
     *     filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
     *     Tag filter is a key value pair string where key and value is separated by a colon (:). PublisherType Filter
     *     accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type.
     * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
     *     contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that
     *     specifies a starting point to use for subsequent calls.
     * @param top May be used to limit the number of results to the most recent N usageDetails.
     * @param metric Allows to select different type of cost/usage records.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return result of listing usage details.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<UsageDetailInner> listAsync(
        String scope, String expand, String filter, String skiptoken, Integer top, Metrictype metric, Context context) {
        return new PagedFlux<>(
            () -> listSinglePageAsync(scope, expand, filter, skiptoken, top, metric, context),
            nextLink -> listNextSinglePageAsync(nextLink, context));
    }

    /**
     * Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
     * later.
     *
     * @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
     *     for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
     *     scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
     *     '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
     *     '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
     *     subscription, billing account, department, enrollment account and management group, you can also add billing
     *     period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to
     *     specify billing period at department scope use
     *     '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
     *     Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}'
     *     for billingAccount scope,
     *     '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     billingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
     *     for invoiceSection scope, and
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
     *     partners.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return result of listing usage details.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<UsageDetailInner> list(String scope) {
        final String expand = null;
        final String filter = null;
        final String skiptoken = null;
        final Integer top = null;
        final Metrictype metric = null;
        return new PagedIterable<>(listAsync(scope, expand, filter, skiptoken, top, metric));
    }

    /**
     * Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or
     * later.
     *
     * @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/'
     *     for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account
     *     scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope,
     *     '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and
     *     '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For
     *     subscription, billing account, department, enrollment account and management group, you can also add billing
     *     period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to
     *     specify billing period at department scope use
     *     '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'.
     *     Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}'
     *     for billingAccount scope,
     *     '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for
     *     billingProfile scope,
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'
     *     for invoiceSection scope, and
     *     'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for
     *     partners.
     * @param expand May be used to expand the properties/additionalInfo or properties/meterDetails within a list of
     *     usage details. By default, these fields are not included when listing usage details.
     * @param filter May be used to filter usageDetails by properties/resourceGroup, properties/resourceName,
     *     properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. The
     *     filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
     *     Tag filter is a key value pair string where key and value is separated by a colon (:). PublisherType Filter
     *     accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type.
     * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response
     *     contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that
     *     specifies a starting point to use for subsequent calls.
     * @param top May be used to limit the number of results to the most recent N usageDetails.
     * @param metric Allows to select different type of cost/usage records.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return result of listing usage details.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<UsageDetailInner> list(
        String scope, String expand, String filter, String skiptoken, Integer top, Metrictype metric, Context context) {
        return new PagedIterable<>(listAsync(scope, expand, filter, skiptoken, top, metric, context));
    }

    /**
     * Get the next page of items.
     *
     * @param nextLink The nextLink parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return result of listing usage details.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<UsageDetailInner>> listNextSinglePageAsync(String nextLink) {
        if (nextLink == null) {
            return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
        }
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
            .<PagedResponse<UsageDetailInner>>map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Get the next page of items.
     *
     * @param nextLink The nextLink parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return result of listing usage details.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<UsageDetailInner>> listNextSinglePageAsync(String nextLink, Context context) {
        if (nextLink == null) {
            return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
        }
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .listNext(nextLink, this.client.getEndpoint(), accept, context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }
}


text:
package org.apache.bcel.classfile;

import org.apache.bcel.Constants;

/**
 * Super class for all objects that have modifiers like private, final, ...
 * I.e. classes, fields, and methods.
 *
 * @version $Id$
 * @author  M. Dahm
 */
public abstract class AccessFlags implements java.io.Serializable {

    private static final long serialVersionUID = 2845404654039163061L;
    protected int access_flags; // TODO make private (has getter & setter)

    public AccessFlags() {
    }

    /**
     * @param a inital access flags
     */
    public AccessFlags(int a) {
        access_flags = a;
    }

    /**
     * @return Access flags of the object aka. "modifiers".
     */
    public final int getAccessFlags() {
        return access_flags;
    }

    /**
     * @return Access flags of the object aka. "modifiers".
     */
    public final int getModifiers() {
        return access_flags;
    }

    /** Set access flags aka "modifiers".
     * @param access_flags Access flags of the object.
     */
    public final void setAccessFlags( int access_flags ) {
        this.access_flags = access_flags;
    }

    /** Set access flags aka "modifiers".
     * @param access_flags Access flags of the object.
     */
    public final void setModifiers( int access_flags ) {
        setAccessFlags(access_flags);
    }

    private void setFlag( int flag, boolean set ) {
        if ((access_flags & flag) != 0) { // Flag is set already
            if (!set) {
                access_flags ^= flag;
            }
        } else { // Flag not set
            if (set) {
                access_flags |= flag;
            }
        }
    }

    public final void isPublic( boolean flag ) {
        setFlag(Constants.ACC_PUBLIC, flag);
    }

    public final boolean isPublic() {
        return (access_flags & Constants.ACC_PUBLIC) != 0;
    }

    public final void isPrivate( boolean flag ) {
        setFlag(Constants.ACC_PRIVATE, flag);
    }

    public final boolean isPrivate() {
        return (access_flags & Constants.ACC_PRIVATE) != 0;
    }

    public final void isProtected( boolean flag ) {
        setFlag(Constants.ACC_PROTECTED, flag);
    }

    public final boolean isProtected() {
        return (access_flags & Constants.ACC_PROTECTED) != 0;
    }

    public final void isStatic( boolean flag ) {
        setFlag(Constants.ACC_STATIC, flag);
    }

    public final boolean isStatic() {
        return (access_flags & Constants.ACC_STATIC) != 0;
    }

    public final void isFinal( boolean flag ) {
        setFlag(Constants.ACC_FINAL, flag);
    }

    public final boolean isFinal() {
        return (access_flags & Constants.ACC_FINAL) != 0;
    }

    public final void isSynchronized( boolean flag ) {
        setFlag(Constants.ACC_SYNCHRONIZED, flag);
    }

    public final boolean isSynchronized() {
        return (access_flags & Constants.ACC_SYNCHRONIZED) != 0;
    }

    public final void isVolatile( boolean flag ) {
        setFlag(Constants.ACC_VOLATILE, flag);
    }

    public final boolean isVolatile() {
        return (access_flags & Constants.ACC_VOLATILE) != 0;
    }

    public final void isTransient( boolean flag ) {
        setFlag(Constants.ACC_TRANSIENT, flag);
    }

    public final boolean isTransient() {
        return (access_flags & Constants.ACC_TRANSIENT) != 0;
    }

    public final void isNative( boolean flag ) {
        setFlag(Constants.ACC_NATIVE, flag);
    }

    public final boolean isNative() {
        return (access_flags & Constants.ACC_NATIVE) != 0;
    }

    public final void isInterface( boolean flag ) {
        setFlag(Constants.ACC_INTERFACE, flag);
    }

    public final boolean isInterface() {
        return (access_flags & Constants.ACC_INTERFACE) != 0;
    }

    public final void isAbstract( boolean flag ) {
        setFlag(Constants.ACC_ABSTRACT, flag);
    }

    public final boolean isAbstract() {
        return (access_flags & Constants.ACC_ABSTRACT) != 0;
    }

    public final void isStrictfp( boolean flag ) {
        setFlag(Constants.ACC_STRICT, flag);
    }

    public final boolean isStrictfp() {
        return (access_flags & Constants.ACC_STRICT) != 0;
    }

    public final void isSynthetic( boolean flag ) {
        setFlag(Constants.ACC_SYNTHETIC, flag);
    }

    public final boolean isSynthetic() {
        return (access_flags & Constants.ACC_SYNTHETIC) != 0;
    }

    public final void isAnnotation( boolean flag ) {
        setFlag(Constants.ACC_ANNOTATION, flag);
    }

    public final boolean isAnnotation() {
        return (access_flags & Constants.ACC_ANNOTATION) != 0;
    }

    public final void isEnum( boolean flag ) {
        setFlag(Constants.ACC_ENUM, flag);
    }

    public final boolean isEnum() {
        return (access_flags & Constants.ACC_ENUM) != 0;
    }
}


text:
<!doctype html>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="generator" content="PHPDoctor 2.0.5 (http://peej.github.com/phpdoctor/)">
<meta name="when" content="Fri, 16 Sep 2016 12:20:16 +0000">

<link rel="stylesheet" type="text/css" href="../../stylesheet.css">
<link rel="start" href="../../overview-summary.html">

<title>RequestTypeOutStatus (PHP GeodropSDK)</title>

PHP GeodropSDK

Overview

Namespace

Class

Tree

Files

Deprecated

Todo

Index

Frames
No frames

Summary: Field | Method | Constr
Detail: Field | Method | Constr

GeodropSDK\SMSOut\RequestTypeOutStatus

SMSOut/RequestTypeOutStatus.php at line 9

Class RequestTypeOutStatus

RequestTypeOutStatus

public  class RequestTypeOutStatus

Used in the REQUEST_TYPE tag of the SMS Status request

Author:

A-Tono s.r.l.

Since:

1.0

Constant Summary

final static  string

ADHOC

Used to retrieve the status of any set of SMS messages

final static  string

JOB

Used to retrieve the overall status of a job

final static  string

RANGE

Used to retrieve the status of all SMS messages sent in a given time interval

Constant Detail

SMSOut/RequestTypeOutStatus.php at line 25

ADHOC

public final static  string ADHOC = "adhoc"

Used to retrieve the status of any set of SMS messages

SMSOut/RequestTypeOutStatus.php at line 20

JOB

public final static  string JOB = "job"

Used to retrieve the overall status of a job

SMSOut/RequestTypeOutStatus.php at line 15

RANGE

public final static  string RANGE = "range"

Used to retrieve the status of all SMS messages sent in a given time interval

PHP GeodropSDK

Overview

Namespace

Class

Tree

Files

Deprecated

Todo

Index

Frames
No frames

Summary: Field | Method | Constr
Detail: Field | Method | Constr

This document was generated by PHPDoctor: The PHP Documentation Creator


text:
#ifndef LIBGEOTIFF_GEO_TIFFP_H_
#define LIBGEOTIFF_GEO_TIFFP_H_

/**********************************************************************
 *
 *                        Private includes
 *
 *   If you are not using libtiff and XTIFF, replace this include file
 *    with the appropriate one for your own TIFF parsing routines.
 *
 *   Revision History
 *
 *      19 September 1995   ndr    Demoted Intergraph trans matrix.
 *
 **********************************************************************/

#include "geotiff.h"
#include "xtiffio.h"
#include "cpl_serv.h"

/*
 * dblparam_t is the type that a double precision
 * floating point value will have on the parameter
 * stack (when coerced by the compiler). You shouldn't
 * have to change this.
 */
#ifdef applec
typedef extended dblparam_t;
#else
typedef double dblparam_t;
#endif

/**********************************************************************
 *
 *                        Private defines
 *
 *   If you are not using "libtiff"/LIBXTIFF, replace these definitions
 *   with the appropriate definitions to access the geo-tags
 *
 **********************************************************************/

typedef unsigned short pinfo_t;    /* SHORT ProjectionInfo tag type */
typedef TIFF    tiff_t;            /* TIFF file descriptor          */
typedef tdata_t  gdata_t;          /* pointer to data */
typedef tsize_t  gsize_t;          /* data allocation size */

#define GTIFF_GEOKEYDIRECTORY   TIFFTAG_GEOKEYDIRECTORY /* from xtiffio.h */
#define GTIFF_DOUBLEPARAMS      TIFFTAG_GEODOUBLEPARAMS
#define GTIFF_ASCIIPARAMS       TIFFTAG_GEOASCIIPARAMS
#define GTIFF_PIXELSCALE        TIFFTAG_GEOPIXELSCALE
#define GTIFF_TRANSMATRIX       TIFFTAG_GEOTRANSMATRIX
#define GTIFF_INTERGRAPH_MATRIX TIFFTAG_INTERGRAPH_MATRIX
#define GTIFF_TIEPOINTS         TIFFTAG_GEOTIEPOINTS
#define GTIFF_LOCAL          0

#if defined(__cplusplus)
extern "C" {
#endif

/*
 * Method function pointer types
 */
typedef int        (*GTGetFunction) (tiff_t *tif, pinfo_t tag, int *count, void *value );
typedef int        (*GTSetFunction) (tiff_t *tif, pinfo_t tag, int  count, void *value );
typedef tagtype_t  (*GTTypeFunction) (tiff_t *tif, pinfo_t tag);
typedef struct     _TIFFMethod {
	GTGetFunction get;
	GTSetFunction set;
	GTTypeFunction type;
} TIFFMethod_t;

/**********************************************************************
 *
 *               Protected Function Declarations
 *
 *   These routines are exposed implementations, and should not
 *   be used by external GEOTIFF client programs.
 *
 **********************************************************************/

extern gsize_t _gtiff_size[]; /* TIFF data sizes */
extern void CPL_DLL _GTIFSetDefaultTIFF(TIFFMethod *method);
extern gdata_t CPL_DLL _GTIFcalloc(gsize_t);
extern gdata_t CPL_DLL _GTIFrealloc(gdata_t,gsize_t);
extern void CPL_DLL _GTIFFree(gdata_t data);
extern void CPL_DLL _GTIFmemcpy(gdata_t out,gdata_t in,gsize_t size);

#if defined(__cplusplus)
}
#endif

#endif /* LIBGEOTIFF_GEO_TIFFP_H_ */


text:
import React, { useEffect } from 'react';
import { RouteComponentProps } from 'react-router';
import Loader from '../../../components/Loader';
import { getClient } from '../../../services/auth-service';
import { showError } from '../../../utils';

const LoggedInPage = ({ history }: RouteComponentProps) => {
  useEffect(() => {
    const client = getClient();
    if (!client) {
      return history.replace('/login');
    }

    client
      .processRedirect()
      .then((result) => {
        history.replace(result?.redirect || '/');
      })
      .catch((err: unknown) => {
        console.error('failed to process redirect', err);
        history.replace('/login');
        showError(err, 'Failed to log in');
      });
  }, []); //eslint-disable-line react-hooks/exhaustive-deps

  return <Loader />;
};

export default LoggedInPage;


text:
import socket
import threading
import sys
import re

usage_string = """
Usage: test.py [bind_ip] [bind_port] [size_cluster]
"""

def run_server(bind_ip, bind_port, size_cluster):
    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    server.bind((bind_ip, bind_port))
    server.listen(size_cluster)
    print('[*]', 'Listening on', bind_ip, bind_port)

    while True:
        client, addr = server.accept()
        print('[*]', 'Accepted connection from', addr)

        client_handler = threading.Thread(target=handle_client, args=(client,))
        client_handler.start()

def handle_client(client_socket):
    request = client_socket.recv(1024)
    print('[*]', 'Received: ', request)
    client_socket.send(b'ACK!')
    client_socket.close()

def main():
    if len(sys.argv) < 4:
        print(usage_string)
    else:
        try:
            bind_ip = sys.argv[1]
            bind_port = int(sys.argv[2])
            size_cluster = int(sys.argv[3])

            if not re.match(r'(\d{1,3}\.){3}\d{1,3}', bind_ip):
                raise ValueError("[!] No valid IPv4 address provided")

            run_server(bind_ip, bind_port, size_cluster)
        except Exception as e:
            print(str(e))

if __name__ == '__main__':
    main()