text:
package com.grapecity.debugrank.javalib.ui.solve.code;

import com.grapecity.debugrank.javalib.entities.CodeLine;
import com.grapecity.debugrank.javalib.entities.ProgrammingLanguage;
import com.grapecity.debugrank.javalib.entities.Puzzle;
import com.grapecity.debugrank.javalib.services.html.IHtmlToDisplay;
import com.grapecity.debugrank.javalib.services.repo.IDataRepository;
import com.grapecity.debugrank.javalib.services.repo.IUserRepository;
import com.grapecity.debugrank.javalib.services.syntax.ISyntaxHighlighter;
import com.grapecity.debugrank.javalib.ui.solve.result.SolveResultInteractorImpl;

import org.junit.Before;
import org.junit.Test;

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

import rx.Observable;
import rx.schedulers.Schedulers;

import static junit.framework.TestCase.assertEquals;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

public class SolveCodeInteractorImplTests
{
    ISolveCodeInteractor interactor;

    ISyntaxHighlighter syntaxHighlighter;
    IHtmlToDisplay<String> htmlToDisplay;

    @Before
    public void init()
    {
        List<CodeLine> list = new ArrayList<>();
        list.add(new CodeLine(1, "this is a line of code;"));

        IDataRepository dataRepository = mock(IDataRepository.class);
        doReturn(Observable.just(list)).when(dataRepository).loadCodeFile(any(ProgrammingLanguage.class), any(Puzzle.class));

        IUserRepository userRepository = mock(IUserRepository.class);

        syntaxHighlighter = mock(ISyntaxHighlighter.class);
        doReturn(null).when(syntaxHighlighter).getSyntaxHighlightedText(anyString(), anyString());

        htmlToDisplay = mock(IHtmlToDisplay.class);
        doReturn("this is a line of code;").when(htmlToDisplay).convertHtmlToDisplayType(anyString(), anyString());

        interactor = new SolveCodeInteractorImpl(dataRepository, userRepository, syntaxHighlighter, htmlToDisplay);
    }

    @Test
    public void loadCodeFile()
    {
        ProgrammingLanguage language = new ProgrammingLanguage("java_8", "Java 8", ".java", 1);

        interactor.loadCodeFile(language, null).subscribe();

        verify(syntaxHighlighter, times(1)).getSyntaxHighlightedText(anyString(), anyString());
    }

    @Test
    public void getSyntaxHighlightedTextCacheContains()
    {
        ProgrammingLanguage language = new ProgrammingLanguage("java_8", "Java 8", ".java", 1);

        interactor.loadCodeFile(language, null).subscribe();

        String valueFromCache = (String) interactor.getSyntaxHighlightedText(null, new CodeLine(1, ""));

        //if only called once then getSyntaxHighlightedText retrieved from the cache
        verify(htmlToDisplay, times(1)).convertHtmlToDisplayType(anyString(), anyString());

        assertEquals("this is a line of code;", valueFromCache);
    }

    @Test
    public void getSyntaxHighlightedTextCacheDoesNotContain()
    {
        ProgrammingLanguage language = new ProgrammingLanguage("java_8", "Java 8", ".java", 1);

        interactor.loadCodeFile(language, null).subscribe();

        doReturn("this is a line of code not from the cache;").when(htmlToDisplay).convertHtmlToDisplayType(anyString(), anyString());

        String valueNotFromCache = (String) interactor.getSyntaxHighlightedText(null, new CodeLine(2, ""));

        //if called twice then the code did not exist in cache
        verify(htmlToDisplay, times(2)).convertHtmlToDisplayType(anyString(), anyString());

        assertEquals("this is a line of code not from the cache;", valueNotFromCache);
    }

    @Test
    public void refreshSyntaxHighlightedTextCache()
    {
        ProgrammingLanguage language = new ProgrammingLanguage("java_8", "Java 8", ".java", 1);

        interactor.loadCodeFile(language, null).subscribe();

        CodeLine codeLine = new CodeLine(1, "this is my updated code line;");

        doReturn("this is my updated code line;").when(htmlToDisplay).convertHtmlToDisplayType(anyString(), anyString());

        interactor.refreshSyntaxHighlightedTextCache(language, codeLine).subscribe();

        verify(syntaxHighlighter, times(2)).getSyntaxHighlightedText(anyString(), anyString());
        verify(htmlToDisplay, times(2)).convertHtmlToDisplayType(anyString(), anyString());

        String valueFromCache = (String) interactor.getSyntaxHighlightedText(null, new CodeLine(1, ""));

        assertEquals("this is my updated code line;", valueFromCache);
    }
}


text:
<!DOCTYPE html>

  <title> ania's corner </title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.css">
  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.css">
  <link rel="stylesheet" type"text/css" href="../styles/c8t6.css">
  <link href="https://fonts.googleapis.com/css?family=Shadows+Into+Light" rel="stylesheet">
  <link rel="shortcut icon" href="favicon.ico" type="favicon.ico">
  <link rel="icon" href="../favicon.ico" type="favicon.ico">

Connecting.

  "Search Inside Yourself: The Unexpected Path to Achieving Success, Happiness (and World Peace)." by Tan, Chade-Meng.
 Chapter VIII

 "Empathy is not psychologizing or agreeing"

 Try empathic listening - how did it go?

 It was great to both of us.
 I also try praising people and find it a great way to get the best of people. It works a bit like positive reinforcement.

How did you find the loving kindness meditation?

            I like the informal way to practice, which is simply to generating these thoughts every time you meet people.

Complete the political awareness exercise here in writing.

            Situation - my very old company grew, and the number of business travel increased significantly. Budget spent on business travel was already counted in millions, it was incredibly difficult to manage all trips for all company sites, there was a need for travel process and tools improvements.

            My team's objective was improving travel-related processes in order to manage the growing travel numbers. Long story short, one of many things needed at the time was replacing an old ticketing system with a new one. The old system that was used and adopted by travel desk was designed for other purpose, could not handle reports, and had lots of other limitations. If any improvements were possible then they were time-taking, full of bugs, and required work-arounds.

            The company understood the need of improvement. However it was also dealing with other issues at the time, it was close to selling one of the departments, and additional savings had to be made in all areas. Despite initial approval, it was not possible to buy a new system at that time.

"Trust has to begin with sincerity, kindness, and openness"

Some photos on this blog are linked to iStock Photo NZ and are used for learning purposes. Each photo that belongs to iStock is watermarked. If you'd like to get more amazing photos, please go directly to iStock website.

        home

        blog

        contact

redpajama_set_name: RedPajamaGithub


text:
set -e

if [ ! -f install.sh ]; then
	echo 'install must be run within its container folder' 1>&2
	exit 1
fi

CURDIR=`pwd`
OLDGOPATH="$GOPATH"
export GOPATH="$CURDIR"
export GOBIN=

if [ ! -d log ]; then
	mkdir log
fi

gofmt -w -s src

go install dreamgo

export GOPATH="$OLDGOPATH"

echo 'finished'


text:
module Azure::CognitiveServices::LuisAuthoring::V3_0_preview
  module Models
    #
    # An application model info.
    #
    class ModelInfoResponse

      include MsRestAzure

      # @return The ID of the Entity Model.
      attr_accessor :id

      # @return [String] Name of the Entity Model.
      attr_accessor :name

      # @return [Integer] The type ID of the Entity Model.
      attr_accessor :type_id

      # @return [Enum] Possible values include: 'Entity Extractor', 'Child
      # Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child
      # Entity Extractor', 'Composite Entity Extractor', 'List Entity
      # Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier',
      # 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', 'Regex
      # Entity Extractor'
      attr_accessor :readable_type

      # @return [Array<EntityRole>]
      attr_accessor :roles

      # @return [Array<ChildEntity>] List of child entities.
      attr_accessor :children

      # @return [Array<SubClosedListResponse>] List of sublists.
      attr_accessor :sub_lists

      # @return [String] The domain name.
      attr_accessor :custom_prebuilt_domain_name

      # @return [String] The intent name or entity name.
      attr_accessor :custom_prebuilt_model_name

      # @return [String] The Regular Expression entity pattern.
      attr_accessor :regex_pattern

      # @return [Array<ExplicitListItem>]
      attr_accessor :explicit_list

      #
      # Mapper for ModelInfoResponse class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ModelInfoResponse',
          type: {
            name: 'Composite',
            class_name: 'ModelInfoResponse',
            model_properties: {
              id: {
                client_side_validation: true,
                required: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeId',
                type: {
                  name: 'Number'
                }
              },
              readable_type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'readableType',
                type: {
                  name: 'String'
                }
              },
              roles: {
                client_side_validation: true,
                required: false,
                serialized_name: 'roles',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'EntityRoleElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'EntityRole'
                      }
                  }
                }
              },
              children: {
                client_side_validation: true,
                required: false,
                serialized_name: 'children',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ChildEntityElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ChildEntity'
                      }
                  }
                }
              },
              sub_lists: {
                client_side_validation: true,
                required: false,
                serialized_name: 'subLists',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'SubClosedListResponseElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'SubClosedListResponse'
                      }
                  }
                }
              },
              custom_prebuilt_domain_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'customPrebuiltDomainName',
                type: {
                  name: 'String'
                }
              },
              custom_prebuilt_model_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'customPrebuiltModelName',
                type: {
                  name: 'String'
                }
              },
              regex_pattern: {
                client_side_validation: true,
                required: false,
                serialized_name: 'regexPattern',
                type: {
                  name: 'String'
                }
              },
              explicit_list: {
                client_side_validation: true,
                required: false,
                serialized_name: 'explicitList',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ExplicitListItemElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ExplicitListItem'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end


text: This tests time complexity of parsing HTML with large inlined script.


text:
license: Licensed to the Apache Software Foundation (ASF) under one
         or more contributor license agreements.  See the NOTICE file
         distributed with this work for additional information
         regarding copyright ownership.  The ASF licenses this file
         to you under the Apache License, Version 2.0 (the
         "License"); you may not use this file except in compliance
         with the License.  You may obtain a copy of the License at

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

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

Steroids 3.5.12 API Reference

Steroids Log

        Built-in logging

Steroids App and Device

        Runtime information, native elements and access to device hardware

Steroids Config

        Runtime configuration file config/application.coffee

Steroids Events

        Working with Steroids events

Steroids File System

        Working with files

Steroids Media

        Enhanced media playback and capturing

Steroids Views

        WebViews and their components

Steroids UI Components

        Native UI components such as modals, drawers and tabs

Cordova 3.5.1 API Reference

Accelerometer

            Tap into the device's motion sensor.

Camera

            Capture a photo using the device's camera.

Capture

            Capture media files using device's media capture applications.

Compass

            Obtain the direction that the device is pointing.

Connection

            Quickly check the network state, and cellular network information.

Contacts

            Work with the devices contact database.

Device

            Gather device specific information.

Events

            Hook into native events through JavaScript.

File

            Hook into native file system through JavaScript.

FileTransfer

            Functionality to upload and download files.

Geolocation

            Make your application location aware.

Globalization

            Enable representation of objects specific to a locale.

InAppBrowser

            Launch URLs in another in-app browser instance.

Media

            Record and play back audio files.

Notification

            Visual, audible, and tactile device notifications.

Splashscreen

            Not supported by Steroids; use steroids.splashscreen instead.

Pixate styling reference

Guides

        General guides on using Pixate

Controls

        CSS controls supported by Pixate

Selectors

        CSS selectors supported by Pixate

Values

        Possible values for CSS selectors

Guides

Keyword Index

            Full index of the Cordova Documentation.


text:
import DB from '../../Database/DB';
import IPCService from '../../Services/IPCService';

class AddSeries {
    handle(req, res) {
        let series = new DB.Series(req.body.series);
        series.save((err, series) => {
            if(err) {
                res.json({ status: false });
            }
            else {
                IPCService.message({
                    action: 'loadEpisodesForSeries',
                    params: [series.id]
                });
                res.json({ status: true, data: series });
            }
        });
    }
}

export default new AddSeries();


text:
module BreadcrumbsOnRailsToGretel
	class SearchOldBreadcrumbs
		require 'ruby2ruby'
		require 'ruby_parser'
		attr_accessor :breadcrumbs, :breadcrumbs_root, :breadcrumbs_controller, :parser, :ruby2ruby, :controller_sexp, :klass

		def initialize
			self.parser           = ::RubyParser.new
			self.ruby2ruby        = ::Ruby2Ruby.new
			self.breadcrumbs      = {}
			self.breadcrumbs_root = []
		end

		def look_all_controllers
			Rails.root.join('app', 'controllers').each_child do |file|
				prepare_controller(file)
				search_on_class_methods

				if klass == ApplicationController
					breadcrumbs_root << breadcrumbs_controller
				else
					search_on_actions
					breadcrumbs[klass] ||= []
					breadcrumbs[klass] << breadcrumbs_controller
				end
			end
		end

		private

		def prepare_controller(file)
			self.breadcrumbs_controller = {}
			self.controller_sexp        = parser.process(File.open(file).read)

			self.klass = Kernel.const_get controller_sexp[1]
		end

		def search_on_class_methods
			controller_sexp.find_nodes(:call).select { |sexp| %i(add_breadcrumb before_action before_filter).include? method_name(sexp) }.each do |sexp|

				options = get_callback_options(sexp)

				if method_name(sexp) == :add_breadcrumb
					add_breacrumbs(sexp, options)
				else
					# Check before_action
				end
			end
		end

		def add_breacrumbs(sexp, only: [], except: [], **conditionals)
			actions = select_with_only_except(controller_actions, only, except)
			actions.each { |action| add_breacrumb(sexp, action, conditionals: conditionals) }
		end

		def add_breacrumb(sexp, action, conditionals: {})
			array_args = convert_to_source(sexp).gsub('add_breadcrumb(', '').gsub('\'', '').split(', ')[0..1]

			breadcrumbs_controller[action] ||= []
			breadcrumbs_controller[action] << { name: array_args[0], path: array_args[1], view: nil }.merge(conditionals)
		end

		def remove_procs(source)
			source.gsub(/(?:lambda|Proc\.new|proc) { \|(\w+)\| (\(*"?.+?) }\)?/) do
				formated = $2.gsub("#{$1}.", '')
				"'#{formated}'"
			end
		end

		def get_callback_options(sexp)
			options = {}
			source  = convert_to_source(sexp)

			#Search for except and only Array
			source.scan(/:(except|only) => \(\[(?::(.+))\]/) do |type, string_array|
				options[type.to_sym] = string_array.split(', :')
			end

			#Search for if and unless
			source.scan(/:(if|unless) => (?:\('(.+?)'|:(.+?)[\),])/) do |type, proc, symbol|
				options[type.to_sym] = proc || symbol
			end

			options
		end

		def convert_to_source(sexp)
			remove_procs(ruby2ruby.process(sexp.deep_clone).gsub('view_context.', ''))
		end

		def controller_actions
			klass.action_methods.reject{|action| action.start_with? '_' }
		end

		def select_with_only_except(collection, only, except)
			collection.select { |element| (only.empty? || only.include?(element)) && except.exclude?(element) }
		end

		def method_name(sexp)
			sexp[2]
		end
	end
end


text:
<!DOCTYPE html>

    <title>Voxel App</title>


text:
/*	$NetBSD: chap-md5.c,v 1.2 2013/11/28 22:33:42 christos Exp $	*/

/*
 * chap-md5.c - New CHAP/MD5 implementation.
 *
 * Copyright (c) 2003 Paul Mackerras. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. The name(s) of the authors of this software must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission.
 *
 * 3. Redistributions of any form whatsoever must retain the following
 *    acknowledgment:
 *    "This product includes software developed by Paul Mackerras
 *     <paulus@samba.org>".
 *
 * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include <sys/cdefs.h>
#if 0
#define RCSID	"Id: chap-md5.c,v 1.4 2004/11/09 22:39:25 paulus Exp "
static const char rcsid[] = RCSID;
#else
__RCSID("$NetBSD: chap-md5.c,v 1.2 2013/11/28 22:33:42 christos Exp $");
#endif

#include <stdlib.h>
#include <string.h>
#include <md5.h>
#include "pppd.h"
#include "chap-new.h"
#include "chap-md5.h"
#include "magic.h"

#define MD5_HASH_SIZE		16
#define MD5_MIN_CHALLENGE	16
#define MD5_MAX_CHALLENGE	24

static void
chap_md5_generate_challenge(unsigned char *cp)
{
	int clen;

	clen = (int)(drand48() * (MD5_MAX_CHALLENGE - MD5_MIN_CHALLENGE))
		+ MD5_MIN_CHALLENGE;
	*cp++ = clen;
	random_bytes(cp, clen);
}

static int
chap_md5_verify_response(int id, char *name,
			 unsigned char *secret, int secret_len,
			 unsigned char *challenge, unsigned char *response,
			 char *message, int message_space)
{
	MD5_CTX ctx;
	unsigned char idbyte = id;
	unsigned char hash[MD5_HASH_SIZE];
	int challenge_len, response_len;

	challenge_len = *challenge++;
	response_len = *response++;
	if (response_len == MD5_HASH_SIZE) {
		/* Generate hash of ID, secret, challenge */
		MD5Init(&ctx);
		MD5Update(&ctx, &idbyte, 1);
		MD5Update(&ctx, secret, secret_len);
		MD5Update(&ctx, challenge, challenge_len);
		MD5Final(hash, &ctx);

		/* Test if our hash matches the peer's response */
		if (memcmp(hash, response, MD5_HASH_SIZE) == 0) {
			slprintf(message, message_space, "Access granted");
			return 1;
		}
	}
	slprintf(message, message_space, "Access denied");
	return 0;
}

static void
chap_md5_make_response(unsigned char *response, int id, char *our_name,
		       unsigned char *challenge, char *secret, int secret_len,
		       unsigned char *private)
{
	MD5_CTX ctx;
	unsigned char idbyte = id;
	int challenge_len = *challenge++;

	MD5Init(&ctx);
	MD5Update(&ctx, &idbyte, 1);
	MD5Update(&ctx, secret, secret_len);
	MD5Update(&ctx, challenge, challenge_len);
	MD5Final(&response[1], &ctx);
	response[0] = MD5_HASH_SIZE;
}

static struct chap_digest_type md5_digest = {
	CHAP_MD5,		/* code */
	chap_md5_generate_challenge,
	chap_md5_verify_response,
	chap_md5_make_response,
	NULL,			/* check_success */
	NULL,			/* handle_failure */
};

void
chap_md5_init(void)
{
	chap_register_digest(&md5_digest);
}


text:
Script to send a YO for Nagios/Icinga alerts.

Given an API token, it will send a YO to everyone subscribed to that
account. If a cgi-path and host and/or service are also included, it
will include a link to the problematic service in the Nagios web
interface, or the Icinga Classic web interface

If you only want to notify a singe user, you can specify one with the --user flag.

In order to add this to nagios, add a commands like the follwing:

```
define command{
	command_name	service_nagiyos_all
	command_line    $PATH_TO_NAGIYOS --api-token $API_KEY --host $HOSTNAME$ --service $SERVICEDESC$
}
define command{
	command_name	host_nagiyos_all
	command_line    $PATH_TO_NAGIYOS --api-token $API_KEY --host $HOSTNAME$
}

```
Then add a contact such as the following:

```
define contact{
        contact_name                    nagiyos_all
        alias                           Alert all with nagiyos
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    c,w
        host_notification_options       d
        service_notification_commands   service_nagiyos_all
        host_notification_commands      host_nagiyos_all
}
```


text:
const DrawCard = require('../../../drawcard.js');

class EliaSand extends DrawCard {
    setupCardAbilities(ability) {
        this.reaction({
            when: {
                afterChallenge: (event, challenge) => this.controller === challenge.loser
            },
            limit: ability.limit.perPhase(2),
            handler: () => {
                this.game.promptForSelect(this.controller, {
                    activePromptTitle: 'Select character',
                    waitingPromptTitle: 'Waiting for opponent to use ' + this.name,
                    cardCondition: card => card.location === 'play area' && card.getType() === 'character',
                    onSelect: (p, card) => this.onCardSelected(p, card)
                });
            }
        });
    }

    onCardSelected(player, card) {
        this.game.addMessage('{0} uses {1} to give {2} Stealth', player, this, card);
        this.untilEndOfPhase(ability => ({
            match: card,
            effect: ability.effects.addKeyword('Stealth')
        }));

        return true;
    }
}

EliaSand.code = '04075';

module.exports = EliaSand;


text:
@implementation YouTubePlayerFactoryImplementation

- (UIViewController *)createYouTubePlayerControllerWithVideoIdentifier:(NSString *)videoIdentifier {
    XCDYouTubeVideoPlayerViewController *videoPlayerViewController = [[XCDYouTubeVideoPlayerViewController alloc] initWithVideoIdentifier:videoIdentifier];
    return videoPlayerViewController;
}

@end


text:
<?php

class Peminjaman extends CI_Controller
{
	public function __construct()
	{
		parent::__construct();
	}

	public function index()
	{
		$data = array(
			'title'=>'Peminjaman'
		);
		$this->load->view('config/header');
		$this->load->view('staff/main-header');
		$this->load->view('staff/main-sidebar');
		//content
		$this->load->view('staff/peminjaman/content', $data);

		$this->load->view('staff/main-footer');
		$this->load->view('config/footer');
	}
}


text:
<script src="../src/assets/js/socket.io.js"></script>
<script>
  console.log('ok..checking')
  var socket = io('http://availabs.org:1338/triptable');
  socket.on('connect', function(){
  	console.log('connected')
    socket.on('event', function(data){
    	console.log(data);
    });
    socket.on('disconnect', function(){});
  });
</script>


text:
/**
 * Core concurrency APIs.
 */
package org.apache.http.HC4.concurrent;


text:
<?php

Class indexController Extends Controller {

	public function index() {

	}

}

?>


text:
require 'set'

namespace :rpms do
  @@rpms = Hash.new { |h,role| h[role] = Set.new }

  namespace :install do
    desc 'Install required RPMs for all roles'
    task :default do
      parallel do |session|
        rpms.real_roles.each do |role|
          session.when "in?(:#{role.to_s})", yum_command_for(role)
        end
        session.else yum_command_for(:all)
      end
    end
  end

  def all(*rpms)
    @@rpms[:all].merge(rpms.flatten)
  end

  def role(roles, *rpms)
    Array(roles).each do |role|
      role = role.to_sym

      @@rpms[role].merge(rpms.flatten)

      if role != :all
        namespace :install do
          desc "Install required RPMs for #{role}"
          task role, :roles => role do
            run yum_command_for(role)
          end
        end
      end
    end
  end

  def real_roles
    @@rpms.keys - [ :all ]
  end

  def yum_command_for(role)
    rpms = (@@rpms[role.to_sym] + @@rpms[:all]).to_a

    if rpms.empty?
      ""
    else
      "#{sudo} yum -qy install #{rpms.join(' ')}"
    end
  end
end


text:
package javamoneyexamples.jsf.money.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.money.CurrencyUnit;
import javax.money.MonetaryAmount;
import javax.money.Monetary;

import org.javamoney.moneta.FastMoney;
import org.javamoney.moneta.function.MonetaryFunctions;

public class User implements Serializable {

	private static final CurrencyUnit CURRENCY = Monetary.getCurrency("USD");

	private static final long serialVersionUID = -4619662846488953817L;

	private List<Product> products = new ArrayList<>();

	public List<Product> getProducts() {
		return products;
	}

	public void addProduct(Product product) {
		Product copy = new Product();
		copy.setMoney(product.getMoney());
		copy.setName(product.getName());
		products.add(copy);
		product.clear();
	}

	public MonetaryAmount getSum() {
		return products.stream().map(Product::getMoney)
				.reduce(MonetaryFunctions.sum())
				.orElse(FastMoney.of(0, CURRENCY));
	}

	public MonetaryAmount getMin() {
		return products.stream().map(Product::getMoney)
				.reduce(MonetaryFunctions.min())
				.orElse(FastMoney.of(0, CURRENCY));
	}

	public MonetaryAmount getMax() {
		return products.stream().map(Product::getMoney)
				.reduce(MonetaryFunctions.max())
				.orElse(FastMoney.of(0, CURRENCY));
	}

	public int getCount() {
		return products.size();
	}

	public MonetaryAmount getAverage() {
		return products.stream().map(Product::getMoney)
				.collect(MonetaryFunctions.summarizingMonetary(CURRENCY))
				.getAverage();
	}

	@Override
	public String toString() {
		return products.toString();
	}

}


text:
from pprint import pprint
from googleapiclient import discovery
from oauth2client.client import GoogleCredentials

import os
import math
import argparse

parser = argparse.ArgumentParser("autoscaler.py")
parser.add_argument("-p", "--project_id", help="Project id", type=str)
parser.add_argument("-r", "--region", help="GCP region where the managed instance group is located", type=str)
parser.add_argument("-z", "--zone", help="Name of GCP zone where the managed instance group is located", type=str)
parser.add_argument("-g", "--group_manager", help="Name of the managed instance group", type=str)
parser.add_argument("-c", "--computeinstancelimit", help="Maximum number of compute instances", type=int)
parser.add_argument("-v", "--verbosity", help="Increase output verbosity. 1-show basic debug info. 2-show detail debug info", type=int, choices=[0, 1, 2])
args = parser.parse_args()

# Project ID
project = args.project_id  # Ex:'slurm-var-demo'

# Region where the managed instance group is located
region = args.region  # Ex: 'us-central1'

# Name of the zone where the managed instance group is located
zone = args.zone  # Ex: 'us-central1-f'

# The name of the managed instance group.
instance_group_manager = args.group_manager  # Ex: 'condor-compute-igm'

# Default number of cores per intance, will be replaced with actual value
cores_per_node = 4

# Default number of running instances that the managed instance group should maintain at any given time. This number will go up and down based on the load (number of jobs in the queue)
size = 0

# Debug level: 1-print debug information, 2 - print detail debug information
debug = 0
if (args.verbosity):
    debug = args.verbosity

# Limit for the maximum number of compute instance. If zero (default setting), no limit will be enforced by the  script
compute_instance_limit = 0
if (args.computeinstancelimit):
    compute_instance_limit = abs(args.computeinstancelimit)

if debug > 1:
    print 'Launching autoscaler.py with the following arguments:'
    print 'project_id: ' + project
    print 'region: ' + region
    print 'zone: ' + zone
    print 'group_manager: ' + instance_group_manager
    print 'computeinstancelimit: ' + str(compute_instance_limit)
    print 'debuglevel: ' + str(debug)

# Remove specified instance from MIG and decrease MIG size
def deleteFromMig(instance):
    instanceUrl = 'https://www.googleapis.com/compute/v1/projects/' \
        + project + '/zones/' + zone + '/instances/' + instance
    instances_to_delete = {'instances': [instanceUrl]}

    requestDelInstance = \
        service.instanceGroupManagers().deleteInstances(project=project,
            zone=zone, instanceGroupManager=instance_group_manager,
            body=instances_to_delete)
    response = requestDelInstance.execute()
    if debug > 0:
        print 'Request to delete instance ' + instance
        pprint(response)

    return response

def getInstanceTemplateInfo():
    requestTemplateName = \
        service.instanceGroupManagers().get(project=project, zone=zone,
            instanceGroupManager=instance_group_manager,
            fields='instanceTemplate')
    responseTemplateName = requestTemplateName.execute()
    template_name = ''

    if debug > 1:
        print 'Request for the template name'
        pprint(responseTemplateName)

    if len(responseTemplateName) > 0:
        template_url = responseTemplateName.get('instanceTemplate')
        template_url_partitioned = template_url.split('/')
        template_name = \
            template_url_partitioned[len(template_url_partitioned) - 1]

    requestInstanceTemplate = \
        service.instanceTemplates().get(project=project,
            instanceTemplate=template_name, fields='properties')
    responseInstanceTemplateInfo = requestInstanceTemplate.execute()

    if debug > 1:
        print 'Template information'
        pprint(responseInstanceTemplateInfo['properties'])

    machine_type = responseInstanceTemplateInfo['properties']['machineType']
    is_preemtible = responseInstanceTemplateInfo['properties']['scheduling']['preemptible']
    if debug > 0:
        print 'Machine Type: ' + machine_type
        print 'Is preemtible: ' + str(is_preemtible)
    request = service.machineTypes().get(project=project, zone=zone,
            machineType=machine_type)
    response = request.execute()
    guest_cpus = response['guestCpus']
    if debug > 1:
        print 'Machine information'
        pprint(responseInstanceTemplateInfo['properties'])
    if debug > 0:
        print 'Guest CPUs: ' + str(guest_cpus)

    instanceTemlateInfo = {'machine_type': machine_type,
                           'is_preemtible': is_preemtible,
                           'guest_cpus': guest_cpus}
    return instanceTemlateInfo

# Obtain credentials
credentials = GoogleCredentials.get_application_default()
service = discovery.build('compute', 'v1', credentials=credentials)

# Get total number of jobs in the queue that includes number of jos waiting as well as number of jobs already assigned to nodes
queue_length_req = 'condor_q -totals -format "%d " Jobs -format "%d " Idle -format "%d " Held'
queue_length_resp = os.popen(queue_length_req).read().split()

if len(queue_length_resp) > 1:
    queue = int(queue_length_resp[0])
    idle_jobs = int(queue_length_resp[1])
    on_hold_jobs = int(queue_length_resp[2])
else:
    queue = 0
    idle_jobs = 0
    on_hold_jobs = 0

print 'Total queue length: ' + str(queue)
print 'Idle jobs: ' + str(idle_jobs)
print 'Jobs on hold: ' + str(on_hold_jobs)

instanceTemlateInfo = getInstanceTemplateInfo()
if debug > 1:
    print 'Information about the compute instance template'
    pprint(instanceTemlateInfo)

cores_per_node = instanceTemlateInfo['guest_cpus']
print 'Number of CPU per compute node: ' + str(cores_per_node)

# Get state for for all jobs in Condor
name_req = 'condor_status  -af name state'
slot_names = os.popen(name_req).read().splitlines()
if debug > 1:
    print 'Currently running jobs in Condor'
    print slot_names

# Adjust current queue length by the number of jos that are on-hold
queue -=on_hold_jobs
if on_hold_jobs>0:
    print "Adjusted queue length: " + str(queue)

# Calculate number instances to satisfy current job queue length
if queue > 0:
    size = int(math.ceil(float(queue) / float(cores_per_node)))
    if debug>0:
       print "Calucalting size of MIG: ⌈" + str(queue) + "/" + str(cores_per_node) + "⌉ = " + str(size)
else:
    size = 0

# If compute instance limit is specified, can not start more instances then specified in the limit
if compute_instance_limit > 0 and size > compute_instance_limit:
    size = compute_instance_limit;
    print "MIG target size will be limited by " + str(compute_instance_limit)

print 'New MIG target size: ' + str(size)

# Get current number of instances in the MIG
requestGroupInfo = service.instanceGroupManagers().get(project=project,
        zone=zone, instanceGroupManager=instance_group_manager)
responseGroupInfo = requestGroupInfo.execute()
currentTarget = int(responseGroupInfo['targetSize'])
print 'Current MIG target size: ' + str(currentTarget)

if debug > 1:
    print 'MIG Information:'
    print responseGroupInfo

if size == 0 and currentTarget == 0:
    print 'No jobs in the queue and no compute instances running. Nothing to do'
    exit()

if size == currentTarget:
    print 'Running correct number of compute nodes to handle number of jobs in the queue'
    exit()

if size < currentTarget:
    print 'Scaling down. Looking for nodes that can be shut down'
    # Find nodes that are not busy (all slots showing status as "Unclaimed")

    node_busy = {}
    for slot_name in slot_names:
        name_status = slot_name.split()
        if len(name_status) > 1:
            name = name_status[0]
            status = name_status[1]
            slot = "NO-SLOT"
            slot_server = name.split('@')
            if len(slot_server) > 1:
                slot = slot_server[0]
                server = slot_server[1].split('.')[0]
            else:
                server = slot_server[0].split('.')[0]

            if debug > 0:
                print slot + ', ' + server + ', ' + status + '\n'

            if server not in node_busy:
                if status == 'Unclaimed':
                    node_busy[server] = False
                else:
                    node_busy[server] = True
            else:
                if status != 'Unclaimed':
                    node_busy[server] = True

    if debug > 1:
        print 'Compuute node busy status:'
        print node_busy

    # Shut down nodes that are not busy
    for node in node_busy:
        if not node_busy[node]:
            print 'Will shut down: ' + node + ' ...'
            respDel = deleteFromMig(node)
            if debug > 1:
                print "Shut down request for compute node " + node
                pprint(respDel)

    if debug > 1:
        print "Scaling down complete"

if size > currentTarget:
    print "Scaling up. Need to increase number of instances to " + str(size)
    #Request to resize
    request = service.instanceGroupManagers().resize(project=project,
            zone=zone,
            instanceGroupManager=instance_group_manager,
            size=size)
    response = request.execute()
    if debug > 1:
        print 'Requesting to increase MIG size'
        pprint(response)
        print "Scaling up complete"


text:
% PROGRAM TO GENERATE MULTI-VARIATE MULTI-SITE WEATHER DATA
% ROSHAN K SRIVASTAVA
% CREATED ON: JULY 25, 2013
% Modified By: SOHOM MANDAL
% Modification Date: March 1, 2017

clear all
close all
clc
% Number of Replicates: User specific; Use a Positive interger
prompt = {'Please provide number of replicates (should be an integer):'};
dlg_title = 'Input';
num_lines = 1;
defaultans = {'2'};
answer =(inputdlg(prompt,dlg_title,num_lines,defaultans));
numrep = str2num(answer{:});
if isnan(numrep) || fix(numrep) ~= numrep
  disp('Please enter a positive integer ')
end
disp('Code is running! Please wait');
%File name reading
z=dir('*pr*.csv'); % Reading precipitation files name
z1=dir('*tasmax*.csv'); %  Reading maximum temperature files name
z2=dir('*tasmin*.csv'); % Reading minimum temperature files name
% Working through the files
for j=1:length(z)
%     h = waitbar(length(z),'Downsacling');
    varname_pr=z(j).name;
    varname_tmax=z1(j).name;
    varname_tmin=z2(j).name;
    expression = ('\_');
    splitStr_pr=regexp(varname_pr,expression,'split'); % split the Pr files name using '_' as regular expression
    splitStr_tmax=regexp(varname_tmax,expression,'split'); % split the Tmax files name using '_' as regular expression
    splitStr_tmin=regexp(varname_tmin,expression,'split'); % split the Tmin files name using '_' as regular expression
    m1=strcmp(strcat(splitStr_pr(3),splitStr_pr(5),splitStr_pr(6)),strcat(splitStr_tmax(3),splitStr_tmax(5),splitStr_tmax(6)));
    m2=strcmp(strcat(splitStr_tmax(3),splitStr_tmax(5),splitStr_tmax(6)),strcat(splitStr_tmin(3),splitStr_tmin(5),splitStr_tmin(6)));
    if m1==1 && m2==1 % Compare files name

% LOAD YOUR INPUT FILES
% Each file contains data for a particular weather variable
% NOTE: Rows and Colums represent time and stations respectively
    [ppt header1]=xlsread(z(j).name); %Read Precipitation data
    tmax=csvread(z1(j).name,1,3); %Read Maximum temperature data
    tmin=csvread(z2(j).name,1,3); %Read Minimum temperature data
    [r,c] = size(ppt);
    % Modify this depending on the number of variables added
    data_all = [ppt(:,4:end)+0.1 tmax+273.15 tmin+273.15];

    % DO NOT MODIFY ANY THING FROM HERE IF YOU ARE NOT SURE
    date=repmat(ppt(:,1:3),numrep,1);
    numobs = length(data_all);
    [m1,n1] = size(data_all);
    [data_all_std,data_all_mu,data_all_sig] = zscore(data_all);
    [loadings, scores, variances, tscores] = princomp(data_all_std);
    rand('state',0);
    cm = 1;
    [sc_fit,debug] = MBE_RKS(scores(:,cm),numrep,[],[],1,1);
    scores_fit = scores;
    loadings_fit = loadings;
    sds = data_all_sig;
    means=data_all_mu;
    c1 =[];
    for i = 1:numrep
        scores_fit(:,cm) = sc_fit(:,i);
        b1 = loadings_fit*scores_fit';
        d1 = (b1' .*  repmat(sds,numobs,1) + repmat(means,numobs,1));
        d1(d1(:,1:22)<0)=0;
        c1 = [c1;d1];
        d1=[];b1=[];
    end
    % WRITE OUTPUT FILE
    newname=strcat('MBE','_',splitStr_pr(3),'_', splitStr_pr(5),'_',splitStr_pr(6)); % Create output file name; User can modify
    c1=[date c1(:,1:10) c1(:,11:end)-273.15];
    %Pr= Precipitation; Tasmax=Maximum Temperature;
    %Tasmin=Minimum Temperature; Header will look like:  "Pr_(Station Name)"
    mod_header=horzcat(header1(:,1:3),strcat('Pr_',header1(:,4:end)),strcat('Tasmax_',header1(:,4:end)),strcat('Tasmin_',header1(:,4:end))); % Change the header if more than three variables are used
    filename= cell2mat(strcat(newname, '.csv'));
    csvwrite_with_headers(filename,c1, mod_header);% Writes the output file into csv format
    else
        fprintf(2,'Error: GCM files are not matching!!\n') % Error message for not matching the GCMs file
    end

 end
msgbox('Downscaling Completed'); % message box for complete the work


text:
class UserRenameAdminToSuperadmin < ActiveRecord::Migration
  def change
    rename_column :users, :admin, :superadmin
  end
end


text:
#pragma once
#include <aws/managedblockchain/ManagedBlockchain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/managedblockchain/model/Framework.h>
#include <aws/managedblockchain/model/NetworkFrameworkAttributes.h>
#include <aws/managedblockchain/model/VotingPolicy.h>
#include <aws/managedblockchain/model/NetworkStatus.h>
#include <aws/core/utils/DateTime.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace ManagedBlockchain
{
namespace Model
{

  /**
   *
Network configuration properties.

See Also:
   AWS
   * API Reference

   */
  class AWS_MANAGEDBLOCKCHAIN_API Network
  {
  public:
    Network();
    Network(Aws::Utils::Json::JsonView jsonValue);
    Network& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The unique identifier of the network.

     */
    inline const Aws::String& GetId() const{ return m_id; }

    /**
     *
The unique identifier of the network.

     */
    inline bool IdHasBeenSet() const { return m_idHasBeenSet; }

    /**
     *
The unique identifier of the network.

     */
    inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }

    /**
     *
The unique identifier of the network.

     */
    inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }

    /**
     *
The unique identifier of the network.

     */
    inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }

    /**
     *
The unique identifier of the network.

     */
    inline Network& WithId(const Aws::String& value) { SetId(value); return *this;}

    /**
     *
The unique identifier of the network.

     */
    inline Network& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}

    /**
     *
The unique identifier of the network.

     */
    inline Network& WithId(const char* value) { SetId(value); return *this;}

    /**
     *
The name of the network.

     */
    inline const Aws::String& GetName() const{ return m_name; }

    /**
     *
The name of the network.

     */
    inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }

    /**
     *
The name of the network.

     */
    inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }

    /**
     *
The name of the network.

     */
    inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }

    /**
     *
The name of the network.

     */
    inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }

    /**
     *
The name of the network.

     */
    inline Network& WithName(const Aws::String& value) { SetName(value); return *this;}

    /**
     *
The name of the network.

     */
    inline Network& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}

    /**
     *
The name of the network.

     */
    inline Network& WithName(const char* value) { SetName(value); return *this;}

    /**
     *
Attributes of the blockchain framework for the network.

     */
    inline const Aws::String& GetDescription() const{ return m_description; }

    /**
     *
Attributes of the blockchain framework for the network.

     */
    inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }

    /**
     *
Attributes of the blockchain framework for the network.

     */
    inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }

    /**
     *
Attributes of the blockchain framework for the network.

     */
    inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }

    /**
     *
Attributes of the blockchain framework for the network.

     */
    inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }

    /**
     *
Attributes of the blockchain framework for the network.

     */
    inline Network& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}

    /**
     *
Attributes of the blockchain framework for the network.

     */
    inline Network& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}

    /**
     *
Attributes of the blockchain framework for the network.

     */
    inline Network& WithDescription(const char* value) { SetDescription(value); return *this;}

    /**
     *
The blockchain framework that the network uses.

     */
    inline const Framework& GetFramework() const{ return m_framework; }

    /**
     *
The blockchain framework that the network uses.

     */
    inline bool FrameworkHasBeenSet() const { return m_frameworkHasBeenSet; }

    /**
     *
The blockchain framework that the network uses.

     */
    inline void SetFramework(const Framework& value) { m_frameworkHasBeenSet = true; m_framework = value; }

    /**
     *
The blockchain framework that the network uses.

     */
    inline void SetFramework(Framework&& value) { m_frameworkHasBeenSet = true; m_framework = std::move(value); }

    /**
     *
The blockchain framework that the network uses.

     */
    inline Network& WithFramework(const Framework& value) { SetFramework(value); return *this;}

    /**
     *
The blockchain framework that the network uses.

     */
    inline Network& WithFramework(Framework&& value) { SetFramework(std::move(value)); return *this;}

    /**
     *
The version of the blockchain framework that the network uses.

     */
    inline const Aws::String& GetFrameworkVersion() const{ return m_frameworkVersion; }

    /**
     *
The version of the blockchain framework that the network uses.

     */
    inline bool FrameworkVersionHasBeenSet() const { return m_frameworkVersionHasBeenSet; }

    /**
     *
The version of the blockchain framework that the network uses.

     */
    inline void SetFrameworkVersion(const Aws::String& value) { m_frameworkVersionHasBeenSet = true; m_frameworkVersion = value; }

    /**
     *
The version of the blockchain framework that the network uses.

     */
    inline void SetFrameworkVersion(Aws::String&& value) { m_frameworkVersionHasBeenSet = true; m_frameworkVersion = std::move(value); }

    /**
     *
The version of the blockchain framework that the network uses.

     */
    inline void SetFrameworkVersion(const char* value) { m_frameworkVersionHasBeenSet = true; m_frameworkVersion.assign(value); }

    /**
     *
The version of the blockchain framework that the network uses.

     */
    inline Network& WithFrameworkVersion(const Aws::String& value) { SetFrameworkVersion(value); return *this;}

    /**
     *
The version of the blockchain framework that the network uses.

     */
    inline Network& WithFrameworkVersion(Aws::String&& value) { SetFrameworkVersion(std::move(value)); return *this;}

    /**
     *
The version of the blockchain framework that the network uses.

     */
    inline Network& WithFrameworkVersion(const char* value) { SetFrameworkVersion(value); return *this;}

    /**
     *
Attributes of the blockchain framework that the network uses.

     */
    inline const NetworkFrameworkAttributes& GetFrameworkAttributes() const{ return m_frameworkAttributes; }

    /**
     *
Attributes of the blockchain framework that the network uses.

     */
    inline bool FrameworkAttributesHasBeenSet() const { return m_frameworkAttributesHasBeenSet; }

    /**
     *
Attributes of the blockchain framework that the network uses.

     */
    inline void SetFrameworkAttributes(const NetworkFrameworkAttributes& value) { m_frameworkAttributesHasBeenSet = true; m_frameworkAttributes = value; }

    /**
     *
Attributes of the blockchain framework that the network uses.

     */
    inline void SetFrameworkAttributes(NetworkFrameworkAttributes&& value) { m_frameworkAttributesHasBeenSet = true; m_frameworkAttributes = std::move(value); }

    /**
     *
Attributes of the blockchain framework that the network uses.

     */
    inline Network& WithFrameworkAttributes(const NetworkFrameworkAttributes& value) { SetFrameworkAttributes(value); return *this;}

    /**
     *
Attributes of the blockchain framework that the network uses.

     */
    inline Network& WithFrameworkAttributes(NetworkFrameworkAttributes&& value) { SetFrameworkAttributes(std::move(value)); return *this;}

    /**
     *
The VPC endpoint service name of the VPC endpoint service of the network.
     * Members use the VPC endpoint service name to create a VPC endpoint to access
     * network resources.

     */
    inline const Aws::String& GetVpcEndpointServiceName() const{ return m_vpcEndpointServiceName; }

    /**
     *
The VPC endpoint service name of the VPC endpoint service of the network.
     * Members use the VPC endpoint service name to create a VPC endpoint to access
     * network resources.

     */
    inline bool VpcEndpointServiceNameHasBeenSet() const { return m_vpcEndpointServiceNameHasBeenSet; }

    /**
     *
The VPC endpoint service name of the VPC endpoint service of the network.
     * Members use the VPC endpoint service name to create a VPC endpoint to access
     * network resources.

     */
    inline void SetVpcEndpointServiceName(const Aws::String& value) { m_vpcEndpointServiceNameHasBeenSet = true; m_vpcEndpointServiceName = value; }

    /**
     *
The VPC endpoint service name of the VPC endpoint service of the network.
     * Members use the VPC endpoint service name to create a VPC endpoint to access
     * network resources.

     */
    inline void SetVpcEndpointServiceName(Aws::String&& value) { m_vpcEndpointServiceNameHasBeenSet = true; m_vpcEndpointServiceName = std::move(value); }

    /**
     *
The VPC endpoint service name of the VPC endpoint service of the network.
     * Members use the VPC endpoint service name to create a VPC endpoint to access
     * network resources.

     */
    inline void SetVpcEndpointServiceName(const char* value) { m_vpcEndpointServiceNameHasBeenSet = true; m_vpcEndpointServiceName.assign(value); }

    /**
     *
The VPC endpoint service name of the VPC endpoint service of the network.
     * Members use the VPC endpoint service name to create a VPC endpoint to access
     * network resources.

     */
    inline Network& WithVpcEndpointServiceName(const Aws::String& value) { SetVpcEndpointServiceName(value); return *this;}

    /**
     *
The VPC endpoint service name of the VPC endpoint service of the network.
     * Members use the VPC endpoint service name to create a VPC endpoint to access
     * network resources.

     */
    inline Network& WithVpcEndpointServiceName(Aws::String&& value) { SetVpcEndpointServiceName(std::move(value)); return *this;}

    /**
     *
The VPC endpoint service name of the VPC endpoint service of the network.
     * Members use the VPC endpoint service name to create a VPC endpoint to access
     * network resources.

     */
    inline Network& WithVpcEndpointServiceName(const char* value) { SetVpcEndpointServiceName(value); return *this;}

    /**
     *
The voting rules for the network to decide if a proposal is accepted.

     */
    inline const VotingPolicy& GetVotingPolicy() const{ return m_votingPolicy; }

    /**
     *
The voting rules for the network to decide if a proposal is accepted.

     */
    inline bool VotingPolicyHasBeenSet() const { return m_votingPolicyHasBeenSet; }

    /**
     *
The voting rules for the network to decide if a proposal is accepted.

     */
    inline void SetVotingPolicy(const VotingPolicy& value) { m_votingPolicyHasBeenSet = true; m_votingPolicy = value; }

    /**
     *
The voting rules for the network to decide if a proposal is accepted.

     */
    inline void SetVotingPolicy(VotingPolicy&& value) { m_votingPolicyHasBeenSet = true; m_votingPolicy = std::move(value); }

    /**
     *
The voting rules for the network to decide if a proposal is accepted.

     */
    inline Network& WithVotingPolicy(const VotingPolicy& value) { SetVotingPolicy(value); return *this;}

    /**
     *
The voting rules for the network to decide if a proposal is accepted.

     */
    inline Network& WithVotingPolicy(VotingPolicy&& value) { SetVotingPolicy(std::move(value)); return *this;}

    /**
     *
The current status of the network.

     */
    inline const NetworkStatus& GetStatus() const{ return m_status; }

    /**
     *
The current status of the network.

     */
    inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }

    /**
     *
The current status of the network.

     */
    inline void SetStatus(const NetworkStatus& value) { m_statusHasBeenSet = true; m_status = value; }

    /**
     *
The current status of the network.

     */
    inline void SetStatus(NetworkStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }

    /**
     *
The current status of the network.

     */
    inline Network& WithStatus(const NetworkStatus& value) { SetStatus(value); return *this;}

    /**
     *
The current status of the network.

     */
    inline Network& WithStatus(NetworkStatus&& value) { SetStatus(std::move(value)); return *this;}

    /**
     *
The date and time that the network was created.

     */
    inline const Aws::Utils::DateTime& GetCreationDate() const{ return m_creationDate; }

    /**
     *
The date and time that the network was created.

     */
    inline bool CreationDateHasBeenSet() const { return m_creationDateHasBeenSet; }

    /**
     *
The date and time that the network was created.

     */
    inline void SetCreationDate(const Aws::Utils::DateTime& value) { m_creationDateHasBeenSet = true; m_creationDate = value; }

    /**
     *
The date and time that the network was created.

     */
    inline void SetCreationDate(Aws::Utils::DateTime&& value) { m_creationDateHasBeenSet = true; m_creationDate = std::move(value); }

    /**
     *
The date and time that the network was created.

     */
    inline Network& WithCreationDate(const Aws::Utils::DateTime& value) { SetCreationDate(value); return *this;}

    /**
     *
The date and time that the network was created.

     */
    inline Network& WithCreationDate(Aws::Utils::DateTime&& value) { SetCreationDate(std::move(value)); return *this;}

  private:

    Aws::String m_id;
    bool m_idHasBeenSet;

    Aws::String m_name;
    bool m_nameHasBeenSet;

    Aws::String m_description;
    bool m_descriptionHasBeenSet;

    Framework m_framework;
    bool m_frameworkHasBeenSet;

    Aws::String m_frameworkVersion;
    bool m_frameworkVersionHasBeenSet;

    NetworkFrameworkAttributes m_frameworkAttributes;
    bool m_frameworkAttributesHasBeenSet;

    Aws::String m_vpcEndpointServiceName;
    bool m_vpcEndpointServiceNameHasBeenSet;

    VotingPolicy m_votingPolicy;
    bool m_votingPolicyHasBeenSet;

    NetworkStatus m_status;
    bool m_statusHasBeenSet;

    Aws::Utils::DateTime m_creationDate;
    bool m_creationDateHasBeenSet;
  };

} // namespace Model
} // namespace ManagedBlockchain
} // namespace Aws


text:
{% comment %}
*
*   Possible parameter for this loop:
*
*    › entries
*    › offset
*    › category
*    › tag
*
*   Example for Category: {% include list-posts.html entries='3' offset='1' category='design' %}
*
*   Example for Tag: {% include list-posts.html entries='5' tag='terminal' %}
*
*
*   This loop works like this:
*
*   1. First we check if there was given a category for filtering › if include.categories == NULL
*   2. If no category is given for filtering do a general loop.
*   3. If a category/tag was given, assign category/tag to the variable category/tag › assign category = include.categories
*
{% endcomment %}

{% assign category = include.category %}
{% assign tag = include.tag %}

  {% if category == NULL and tag == NULL %}

    {% for post in site.posts limit:include.entries offset:include.offset %}

{{ post.title }}{% if post.subheadline %} · {{ post.subheadline }}{% endif %}

    {% if post.author %}
— {{ post.author }}
{% endif %}
    {% endfor %}

{{ site.data.language.more }}

  {% elsif category %}

    {% for post in site.categories.[category] limit:include.entries offset:include.offset %}

{{ post.title }}{% if post.subheadline %} · {{ post.subheadline }}{% endif %}

{% if post.event_date %}{{ post.event_date }}{% elsif post.author %}— {{ post.author }}{% endif %}

    {% endfor %}

{{ site.data.language.more }}

  {% elsif tag %}

    {% for post in site.tags.[tag] limit:include.entries %}

{{ post.title }}{% if post.subheadline %} · {{ post.subheadline }}{% endif %}

    {% if post.author %}
— {{ post.author }}
{% endif %}
    {% endfor %}

{{ site.data.language.more }}

  {% endif %}


text:
#include "tensorflow/lite/c/c_api.h"

#include <memory>

#include "tensorflow/lite/builtin_ops.h"
#include "tensorflow/lite/c/c_api_internal.h"
#include "tensorflow/lite/delegates/interpreter_utils.h"
#include "tensorflow/lite/delegates/nnapi/nnapi_delegate.h"
#include "tensorflow/lite/error_reporter.h"
#include "tensorflow/lite/interpreter.h"
#include "tensorflow/lite/kernels/internal/compatibility.h"
#include "tensorflow/lite/kernels/register.h"
#include "tensorflow/lite/model.h"
#include "tensorflow/lite/version.h"

#ifdef __cplusplus
extern "C" {
#endif  // __cplusplus

namespace {
class CallbackErrorReporter : public tflite::ErrorReporter {
 public:
  explicit CallbackErrorReporter(TfLiteErrorReporterCallback callback)
      : callback_(callback) {}

  int Report(const char* format, va_list args) override {
    callback_.error_reporter(callback_.user_data, format, args);
    return 0;
  }

 private:
  TfLiteErrorReporterCallback callback_;
};

/// `CallbackOpResolver` is a (C++) `tflite::OpResolver` that forwards the
/// methods to (C ABI) callback functions from a `TfLiteOpResolverCallbacks`
/// struct.
///
/// The SetCallbacks method must be called before calling any of the FindOp
/// methods.
class CallbackOpResolver : public ::tflite::OpResolver {
 public:
  CallbackOpResolver() {}
  void SetCallbacks(
      const struct TfLiteOpResolverCallbacks& op_resolver_callbacks) {
    op_resolver_callbacks_ = op_resolver_callbacks;
  }
  const TfLiteRegistration* FindOp(tflite::BuiltinOperator op,
                                   int version) const override {
    if (op_resolver_callbacks_.find_builtin_op == nullptr) {
      return nullptr;
    }
    return op_resolver_callbacks_.find_builtin_op(
        op_resolver_callbacks_.user_data,
        static_cast<TfLiteBuiltinOperator>(op), version);
  }
  const TfLiteRegistration* FindOp(const char* op, int version) const override {
    if (op_resolver_callbacks_.find_custom_op == nullptr) {
      return nullptr;
    }
    return op_resolver_callbacks_.find_custom_op(
        op_resolver_callbacks_.user_data, op, version);
  }

 private:
  CallbackOpResolver(const CallbackOpResolver&) = delete;
  CallbackOpResolver& operator=(const CallbackOpResolver&) = delete;

  struct TfLiteOpResolverCallbacks op_resolver_callbacks_ = {};
};

}  // namespace

// LINT.IfChange

const char* TfLiteVersion() { return TFLITE_VERSION_STRING; }

TfLiteModel* TfLiteModelCreate(const void* model_data, size_t model_size) {
  auto model = tflite::FlatBufferModel::VerifyAndBuildFromBuffer(
      static_cast<const char*>(model_data), model_size);
  std::shared_ptr<const tflite::FlatBufferModel> shared_model(model.release());
  return shared_model ? new TfLiteModel{std::move(shared_model)} : nullptr;
}

TfLiteModel* TfLiteModelCreateFromFile(const char* model_path) {
  auto model = tflite::FlatBufferModel::VerifyAndBuildFromFile(model_path);
  std::shared_ptr<const tflite::FlatBufferModel> shared_model(model.release());
  return shared_model ? new TfLiteModel{std::move(shared_model)} : nullptr;
}

void TfLiteModelDelete(TfLiteModel* model) { delete model; }

TfLiteInterpreterOptions* TfLiteInterpreterOptionsCreate() {
  return new TfLiteInterpreterOptions{};
}

void TfLiteInterpreterOptionsDelete(TfLiteInterpreterOptions* options) {
  delete options;
}

void TfLiteInterpreterOptionsSetNumThreads(TfLiteInterpreterOptions* options,
                                           int32_t num_threads) {
  options->num_threads = num_threads;
}

void TfLiteInterpreterOptionsAddDelegate(TfLiteInterpreterOptions* options,
                                         TfLiteDelegate* delegate) {
  options->delegates.push_back(delegate);
}

void TfLiteInterpreterOptionsSetErrorReporter(
    TfLiteInterpreterOptions* options,
    void (*reporter)(void* user_data, const char* format, va_list args),
    void* user_data) {
  options->error_reporter_callback.error_reporter = reporter;
  options->error_reporter_callback.user_data = user_data;
}

TfLiteInterpreter* TfLiteInterpreterCreate(
    const TfLiteModel* model,
    const TfLiteInterpreterOptions* optional_options) {
  tflite::ops::builtin::BuiltinOpResolver resolver;
  return tflite::internal::InterpreterCreateWithOpResolver(
      model, optional_options, &resolver);
}

void TfLiteInterpreterDelete(TfLiteInterpreter* interpreter) {
  delete interpreter;
}

int32_t TfLiteInterpreterGetInputTensorCount(
    const TfLiteInterpreter* interpreter) {
  return static_cast<int32_t>(interpreter->impl->inputs().size());
}

TfLiteTensor* TfLiteInterpreterGetInputTensor(
    const TfLiteInterpreter* interpreter, int32_t input_index) {
  return interpreter->impl->tensor(interpreter->impl->inputs()[input_index]);
}

TfLiteStatus TfLiteInterpreterResizeInputTensor(TfLiteInterpreter* interpreter,
                                                int32_t input_index,
                                                const int* input_dims,
                                                int32_t input_dims_size) {
  std::vector<int> dims{input_dims, input_dims + input_dims_size};
  return interpreter->impl->ResizeInputTensor(
      interpreter->impl->inputs()[input_index], dims);
}

TfLiteStatus TfLiteInterpreterAllocateTensors(TfLiteInterpreter* interpreter) {
  return interpreter->impl->AllocateTensors();
}

TfLiteStatus TfLiteInterpreterInvoke(TfLiteInterpreter* interpreter) {
  if (interpreter->enable_delegate_fallback) {
    return tflite::delegates::InterpreterUtils::InvokeWithCPUFallback(
        interpreter->impl.get());
  } else {
    return interpreter->impl->Invoke();
  }
}

int32_t TfLiteInterpreterGetOutputTensorCount(
    const TfLiteInterpreter* interpreter) {
  return static_cast<int32_t>(interpreter->impl->outputs().size());
}

const TfLiteTensor* TfLiteInterpreterGetOutputTensor(
    const TfLiteInterpreter* interpreter, int32_t output_index) {
  return interpreter->impl->tensor(interpreter->impl->outputs()[output_index]);
}

TfLiteType TfLiteTensorType(const TfLiteTensor* tensor) { return tensor->type; }

int32_t TfLiteTensorNumDims(const TfLiteTensor* tensor) {
  return tensor->dims->size;
}

int32_t TfLiteTensorDim(const TfLiteTensor* tensor, int32_t dim_index) {
  return tensor->dims->data[dim_index];
}

size_t TfLiteTensorByteSize(const TfLiteTensor* tensor) {
  return tensor->bytes;
}

void* TfLiteTensorData(const TfLiteTensor* tensor) {
  return static_cast<void*>(tensor->data.raw);
}

const char* TfLiteTensorName(const TfLiteTensor* tensor) {
  return tensor->name;
}

TfLiteQuantizationParams TfLiteTensorQuantizationParams(
    const TfLiteTensor* tensor) {
  return tensor->params;
}

TfLiteStatus TfLiteTensorCopyFromBuffer(TfLiteTensor* tensor,
                                        const void* input_data,
                                        size_t input_data_size) {
  if (tensor->bytes != input_data_size) {
    return kTfLiteError;
  }
  memcpy(tensor->data.raw, input_data, input_data_size);
  return kTfLiteOk;
}

TfLiteStatus TfLiteTensorCopyToBuffer(const TfLiteTensor* tensor,
                                      void* output_data,
                                      size_t output_data_size) {
  if (tensor->bytes != output_data_size) {
    return kTfLiteError;
  }
  memcpy(output_data, tensor->data.raw, output_data_size);
  return kTfLiteOk;
}

// LINT.ThenChange(//tensorflow/lite/experimental/examples/unity/TensorFlowLitePlugin/Assets/TensorFlowLite/SDK/Scripts/Interpreter.cs)

#ifdef __cplusplus
}  // extern "C"
#endif  // __cplusplus

namespace tflite {
namespace internal {

TfLiteInterpreter* InterpreterCreateWithOpResolver(
    const TfLiteModel* model, const TfLiteInterpreterOptions* optional_options,
    tflite::MutableOpResolver* mutable_resolver) {
  TFLITE_DCHECK_NE(mutable_resolver, nullptr);
  if (!model || !model->impl) {
    return nullptr;
  }

  std::unique_ptr<tflite::ErrorReporter> optional_error_reporter;
  if (optional_options &&
      optional_options->error_reporter_callback.error_reporter != nullptr) {
    optional_error_reporter.reset(
        new CallbackErrorReporter(optional_options->error_reporter_callback));
  }

  // By default, we use the provided mutable_op_resolver, adding any builtin or
  // custom ops registered with `TfLiteInterpreterOptionsAddBuiltinOp` and/or
  // `TfLiteInterpreterOptionsAddCustomOp`.
  tflite::OpResolver* op_resolver = mutable_resolver;
  if (optional_options) {
    mutable_resolver->AddAll(optional_options->mutable_op_resolver);
  }
  // However, if `TfLiteInterpreterOptionsSetOpResolver` has been called with
  // a non-null callback parameter, then we instead use a
  // `CallbackOpResolver` that will forward to the callbacks provided there.
  CallbackOpResolver callback_op_resolver;
  if (optional_options &&
      (optional_options->op_resolver_callbacks.find_builtin_op != nullptr ||
       optional_options->op_resolver_callbacks.find_custom_op != nullptr)) {
    callback_op_resolver.SetCallbacks(optional_options->op_resolver_callbacks);
    op_resolver = &callback_op_resolver;
  }

  tflite::ErrorReporter* error_reporter = optional_error_reporter
                                              ? optional_error_reporter.get()
                                              : tflite::DefaultErrorReporter();
  tflite::InterpreterBuilder builder(model->impl->GetModel(), *op_resolver,
                                     error_reporter);

  std::unique_ptr<tflite::Interpreter> interpreter;
  if (builder(&interpreter) != kTfLiteOk) {
    return nullptr;
  }

  if (optional_options) {
    if (optional_options->num_threads !=
        TfLiteInterpreterOptions::kDefaultNumThreads) {
      interpreter->SetNumThreads(optional_options->num_threads);
    }

    if (optional_options->use_nnapi) {
      if (interpreter->ModifyGraphWithDelegate(tflite::NnApiDelegate()) !=
          kTfLiteOk) {
        return nullptr;
      }
    }

    for (auto* delegate : optional_options->delegates) {
      if (interpreter->ModifyGraphWithDelegate(delegate) != kTfLiteOk) {
        return nullptr;
      }
    }
  }

  bool enable_delegate_fallback =
      optional_options != nullptr && optional_options->enable_delegate_fallback;

  return new TfLiteInterpreter{model->impl, std::move(optional_error_reporter),
                               std::move(interpreter),
                               enable_delegate_fallback};
}

}  // namespace internal
}  // namespace tflite


text:
package com.kunsoftware.controller.front;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.kunsoftware.controller.BaseController;
import com.kunsoftware.controller.manager.YamiDiaryController;
import com.kunsoftware.entity.YamiDiary;
import com.kunsoftware.exception.KunSoftwareException;
import com.kunsoftware.page.PageInfo;
import com.kunsoftware.page.PageUtil;
import com.kunsoftware.service.ValueSetService;
import com.kunsoftware.service.YamiDiaryService;

@Controller
@RequestMapping("/yamidiary")
public class FrontYamiDiaryController extends BaseController {

	private static Logger logger = LoggerFactory.getLogger(YamiDiaryController.class);

	@Autowired
	private YamiDiaryService service;

	@Autowired
	private ValueSetService valueSetService;

	@RequestMapping("/list")
	public String listYamiDiary(ModelMap model,PageInfo pageInfo) throws KunSoftwareException {

		logger.info("目的雅米日记");

		List<YamiDiary> list = service.getYamiDiaryListPage("",pageInfo);
		model.addAttribute("retList", list);
		model.addAttribute("destinationList", valueSetService.selectValueSetDestinationList());
		PageUtil.frontPageInfo(model, pageInfo);
		return "front/yamidiary-list";
	}

	@RequestMapping("/detail")
	public String detailYamiDiary(ModelMap model,Integer id) throws KunSoftwareException {

		logger.info("目的雅米日记");

		YamiDiary yamiDiary = null;
		if(id == null) {
			yamiDiary = service.selectByIndexRcommend();
		} else {
			yamiDiary = service.selectByPrimaryKey(id);
		}

		List list = service.getYamiDiaryNextPre(yamiDiary.getId());
		String nextId = "";
		String preId = "";
		if(list.size() == 1) {
			Map map = (Map)list.get(0);
			if("1".equals(map.get("type"))) {
				nextId = map.get("id").toString();
			} else {
				preId = map.get("id").toString();
			}
		}

		if(list.size() == 2) {
			Map map = (Map)list.get(0);
			nextId = map.get("id").toString();
			map = (Map)list.get(1);
			preId = map.get("id").toString();
		}

		model.addAttribute("yamiDiary", yamiDiary);
		model.addAttribute("nextId", nextId);
		model.addAttribute("preId", preId);
		model.addAttribute("destinationList", valueSetService.selectValueSetDestinationList());
		return "front/yamidiary-detail";
	}

}


text:
/* my-click-editor */
(function($) {
    var methods = {
        init: function(annotations) {
		var that = $(this);
		that.click(function () {
			that.toggle();
			that.nextAll('.in-place-input').toggle().nextAll('.in-place-btn').toggleClass('hide');
			that.nextAll('textarea,input').first().focus();
		});

        }
    };

    $.fn.hjq_my_click_editor = function( method ) {

        if ( methods[method] ) {
            return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
        } else if ( typeof method === 'object' || ! method ) {
            return methods.init.apply( this, arguments );
        } else {
            $.error( 'Method ' +  method + ' does not exist on hjq_my_click_editor' );
        }
    };

})( jQuery );


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

namespace Lucene.Net.Search
{

	/// Expert: Describes the score computation for document and query.
	[Serializable]
	public class Explanation
	{
		private float value;        // the value of this node
		private System.String description;  // what it represents
		private List<Explanation> details;  // sub-explanations

		public Explanation()
		{
		}

		public Explanation(float value, System.String description)
		{
			this.value = value;
			this.description = description;
		}

	    ///  Indicates whether or not this Explanation models a good match.
	    ///
	    ///

	    /// By default, an Explanation represents a "match" if the value is positive.
	    ///

	    ///
	    /// <seealso cref="Value">
	    /// </seealso>
	    public virtual bool IsMatch
	    {
	        get { return (0.0f < Value); }
	    }

	    /// The value assigned to this explanation node.
	    public virtual float Value
	    {
	        get { return value; }
	        set { this.value = value; }
        }

	    /// A description of this explanation node.
	    public virtual string Description
	    {
	        get { return description; }
	        set { this.description = value; }
        }

	    ///  A short one line summary which should contain all high level
	    /// information about this Explanation, without the "Details"
	    ///
	    protected internal virtual string Summary
	    {
	        get { return Value + " = " + Description; }
	    }

	    /// The sub-nodes of this explanation node.
        public virtual Explanation[] GetDetails()
        {
            if (details == null)
                return null;
            return details.ToArray();
        }

	    /// Adds a sub-node to this explanation node.
		public virtual void  AddDetail(Explanation detail)
		{
			if (details == null)
				details = new List<Explanation>();
			details.Add(detail);
		}

		/// Render an explanation as text.
		public override System.String ToString()
		{
			return ToString(0);
		}

		protected internal virtual System.String ToString(int depth)
		{
			System.Text.StringBuilder buffer = new System.Text.StringBuilder();
			for (int i = 0; i < depth; i++)
			{
				buffer.Append("  ");
			}
			buffer.Append(Summary);
			buffer.Append("\n");

			Explanation[] details = GetDetails();
			if (details != null)
			{
				for (int i = 0; i < details.Length; i++)
				{
					buffer.Append(details[i].ToString(depth + 1));
				}
			}

			return buffer.ToString();
		}

		/// Render an explanation as HTML.
		public virtual System.String ToHtml()
		{
			System.Text.StringBuilder buffer = new System.Text.StringBuilder();
			buffer.Append("<list>\n");

			buffer.Append("<item>");
			buffer.Append(Summary);
			buffer.Append("
\n");

			Explanation[] details = GetDetails();
			if (details != null)
			{
				for (int i = 0; i < details.Length; i++)
				{
					buffer.Append(details[i].ToHtml());
				}
			}

			buffer.Append("</item>\n");
			buffer.Append("</list>\n");

			return buffer.ToString();
		}

		///  Small Util class used to pass both an idf factor as well as an
		/// explanation for that factor.
		///
		/// This class will likely be held on a <see cref="Weight" />, so be aware
		/// before storing any large or un-serializable fields.
		///
		///
		[Serializable]
		public abstract class IDFExplanation
		{
		    /// <value> the idf factor </value>
		    public abstract float Idf { get; }

		    ///  This should be calculated lazily if possible.
			///
			///
			/// <returns> the explanation for the idf factor.
			/// </returns>
			public abstract System.String Explain();
		}
	}
}


text:
/**
 * Widgets
 */
.widget {
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 2px;
  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  border-color: #e9e9e9;
}
.widget .widget-title {
  color: #767676;
  background-color: #f6f6f6;
  padding: 10px 15px;
  border-bottom: 1px solid #e9e9e9;
  line-height: 30px;
}
.widget .widget-title i {
  margin-right: 5px;
}
.widget .widget-title input {
  width: 25%;
}
.widget .widget-body {
  padding: 20px;
}
.widget .widget-body table thead {
  background: #fafafa;
}
.widget .widget-body table thead * {
  font-size: 14px !important;
}
.widget .widget-body table tbody * {
  font-size: 13px !important;
}
.widget .widget-body .error {
  color: #ff0000;
}
.widget .widget-body button {
  margin-left: 5px;
}
.widget .widget-body div.alert {
  margin-bottom: 10px;
}
.widget .widget-body.large {
  height: 350px;
  overflow-y: auto;
}
.widget .widget-body.medium {
  height: 250px;
  overflow-y: auto;
}
.widget .widget-body.small {
  height: 150px;
  overflow-y: auto;
}
.widget .widget-body.no-padding {
  padding: 0;
}
.widget .widget-icon {
  background: #30426a;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  text-align: center;
  vertical-align: middle;
  margin-right: 15px;
}
.widget .widget-icon i {
  line-height: 66px;
  color: #ffffff;
  font-size: 30px;
}
.widget .widget-content .title {
  font-size: 28px;
  display: block;
}
.widget .widget-body.no-padding .error,
.widget .widget-body.no-padding .message {
  padding: 20px;
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycotaxon 46: 398 (1993)

#### Original name
Teichospora hesperia M.E. Barr

### Remarks
null


text:
var Game = {

    VERSION: '0.0.1',

    state: 'run', // Current stage of the game e.g. 'run'|'pause'

    /**
     * (Default) options for the game. Some settings might be overridden by the
     * settings in localStorage.
     */
    settings: {
        /**
         * Resolution where the game is original build for. Used to calculate
         * the new resolution on different devices.
         */
        width: 1280,
        height: 720,
        sound: true,
        music: true,
        particles: false
    },

    camera: {},
    renderer: {},

    scenes: {
        game: {
            scene: {},
            objects: []
        }
    },

    assets: {
        walrus: {
            name: 'walrus',
            type: 'obj',
            file: 'assets/players/Walrus.obj',
            object: {}
        },
        walrusTexture: {
            name: 'walrusTexture',
            type: 'texture',
            file: 'assets/players/Walrus.png',
            object: {}
        }
    },

    /**
     * List with all objects
     */
    elements: [],

    init: function (callback) {

        var camera = new THREE.PerspectiveCamera(75, this.settings.width / this.settings.height, .1, 500);
        var renderer = new THREE.WebGLRenderer();
        var sceneGame = new THREE.Scene();
        this.scenes.game.scene = sceneGame;

        document.body.appendChild(renderer.domElement);

        this.camera = camera;
        this.renderer = renderer;

        this.resize();
        this.update();
        window.addEventListener('resize', this.resize.bind(this));

        var manager = new THREE.LoadingManager(callback);
        for (var key in this.assets) {
            var asset = this.assets[key];
            switch (asset.type) {
                case 'obj':
                    var loader = new THREE.OBJLoader( manager );
                    loader.load(asset.file, function ( object ) {
                        this.object = object;
                    }.bind(asset));
                break;
                case 'texture':
                    var loader = new THREE.ImageLoader( manager );
                    loader.load(asset.file, function ( image ) {
                        this.object = new THREE.Texture();
                        this.object.image = image;
                        this.object.needsUpdate = true;
                    }.bind(asset));
                break;
            }
        }

        //manager.onLoad = Game.Levels.level1;

    },

    /**
     * Callback when screen resolution or orientation changed. Keeps the
     * original aspect ratio and resized and position the canvas.
     */
    resize: function () {

        this.settings.width = window.innerWidth;
        this.settings.height = window.innerHeight;
        this.renderer.setSize(this.settings.width, this.settings.height, true);
        this.camera.aspect = this.settings.width / this.settings.height;
        this.camera.updateProjectionMatrix();

    },

    resetScene: function(scene) {

        scene = scene || 'game';

        for (var i = 0; i < this.scenes[scene].objects.length; i++) {
            var element = this.scenes[scene].objects[i];
            element.remove();
        }

    },

    /**
     * The absolute main render. Requests another animation frame and execture
     * the current this.state() function.
     * @param time
     */
    update: function (time) {

        requestAnimationFrame(this.update.bind(this));
        this[this.state](time);

    },

    run: function (time) {

        this.renderer.render (this.scenes.game.scene, this.camera);

        for (var i = 0; i < this.scenes.game.objects.length; i++) {
            var object = this.scenes.game.objects[i];
            object.update();
        }

    }

};


text:
package io.fabric8.kubernetes.client.utils;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.HashMap;
import java.util.Map;

public class ResourceCompare {

    private static final ObjectMapper JSON_MAPPER = new ObjectMapper();
    private static TypeReference<HashMap<String, Object>> TYPE_REF = new TypeReference<HashMap<String, Object>>(){};

    private static final String METADATA = "metadata";
    private static final String STATUS = "status";

    public static <T>  boolean equals(T left, T right) {
        HashMap<String, Object> leftMap = trim((Map<String, Object>) JSON_MAPPER.convertValue(left, TYPE_REF));
        HashMap<String, Object> rightMap = trim((Map<String, Object>) JSON_MAPPER.convertValue(right, TYPE_REF));
        return leftMap.equals(rightMap);
    }

    private static HashMap<String, Object> trim(Map<String, Object> map) {
        HashMap<String, Object> result = new HashMap<>(map);
        result.remove(STATUS);
        result.remove(METADATA);
        return result;
    }
}


text:
<?php

namespace Impetus\AppBundle\Controller;

use Impetus\AppBundle\Entity\Quiz;
use Impetus\AppBundle\Entity\QuizAttempt;
use Impetus\AppBundle\Entity\QuizResult;
use Impetus\AppBundle\Form\QuizType;
use JMS\SecurityExtraBundle\Annotation\Secure;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;

/**
 * @Route("/quiz")
 */
class QuizController extends BaseController {
    /**
     * @Route("/delete", name="_quiz_delete", options={"expose"=true}, requirements={"id"="\d+", "_method"="POST"})
     * @Secure(roles="ROLE_TA")
     */
    public function deleteAction(Request $request) {
        $em = $this->getDoctrine()->getEntityManager();

        $quizId = $request->request->get('id');

        $quiz = $em->getRepository('ImpetusAppBundle:Quiz')->find($quizId);

        $em->remove($quiz);
        $em->flush();

        return new Response('success');
    }

    /**
     * @Route("/{id}/edit", name="_quiz_edit", requirements={"id"="\d+"})
     * @Secure(roles="ROLE_TA")
     */
    public function editAction($id, Request $request) {

    }

    /**
     * @Route("/help", name="_quiz_help")
     * @Secure(roles="ROLE_TA")
     */
    public function helpAction() {
        return $this->render('ImpetusAppBundle:Quiz:quiz-help.html.twig', array('page' => 'quiz'));
    }

    /**
     * @Route("/", name="_quiz_list")
     * @Secure(roles="ROLE_STUDENT")
     */
    public function listAction() {
        $doctrine = $this->getDoctrine();
        $year = $this->get('year_service')->getCurrentAcademicYear();

        if ($this->hasAssistantAuthority()) {
            $quizzes = $doctrine->getRepository('ImpetusAppBundle:Quiz')->findByYear($year);
            return $this->render('ImpetusAppBundle:Quiz:quiz-list-creator.html.twig',
                                 array('page' => 'quiz',
                                       'quizzes' => $quizzes));
        }
        else {
            $user = $this->getCurrentUser();
            $quizzes = $doctrine->getRepository('ImpetusAppBundle:Quiz')->getQuizListByUserAndYear($user, $year);

            return $this->render('ImpetusAppBundle:Quiz:quiz-list-user.html.twig',
                                 array('page' => 'quiz',
                                       'quizzes' => $quizzes));
        }
        /*
        echo '
';
        print_r($quizzes);
        echo '
';

        return new Response();
        */
    }

    /**
     * @Route("/{id}/attempts", name="_quiz_list_attempts", requirements={"id"="\d+"})
     * @Secure(roles="ROLE_STUDENT")
     */
    public function listAttemptsAction($id) {
        $doctrine = $this->getDoctrine();
        $user = $this->getCurrentUser();
        $year = $this->get('year_service')->getCurrentAcademicYear();
        $quiz = $doctrine->getRepository('ImpetusAppBundle:Quiz')->findByIdAndYear($id, $year);
        if (!$quiz) {
            throw $this->createNotFoundException('Quiz not found with id '.$id.' and year '.$year->getYear());
        }

        $quizAttempts = $doctrine->getRepository('ImpetusAppBundle:Quiz')->getQuizAttemptsByQuizAndUser($quiz, $user);

        return $this->render('ImpetusAppBundle:Quiz:quiz-attempts.html.twig',
                             array('page' => 'quiz',
                                   'quiz' => $quiz,
                                   'quizAttempts' => $quizAttempts));
    }

    /**
     * @Route("/new", name="_quiz_new")
     * @Secure(roles="ROLE_TA")
     */
    public function newAction(Request $request) {
        $quiz = new Quiz();
        $quizForm = $this->createForm(new QuizType(), $quiz);

        if ($request->getMethod() == 'POST') {
            $quizForm->bindRequest($request);

            if ($quizForm->isValid()) {
                $em = $this->getDoctrine()->getEntityManager();

                $year = $this->get('year_service')->getCurrentAcademicYear();
                $quiz->setYear($year);

                $em->persist($quiz);
                $em->flush();

                $this->get('session')->setFlash('notice', 'Quiz created!');

                return $this->redirect($this->generateUrl('_quiz_list'));
            }
        }

        return $this->render('ImpetusAppBundle:Quiz:quiz-new.html.twig',
                             array('page' => 'quiz',
                                   'quizForm' => $quizForm->createView()));
    }

    /**
     * @Route("/results", name="_quiz_results")
     * @Secure(roles="ROLE_TA")
     */
    public function resultsAction() {
        $doctrine = $this->getDoctrine();

        $rosters = $this->getAuthorizedRosters();
        if (!$rosters) {
            throw new HttpException(403, 'You do not have access to this data.');
        }

        $year = $this->get('year_service')->getCurrentAcademicYear();
        $quizzes = $doctrine->getRepository('ImpetusAppBundle:Quiz')->findByYear($year);

        $results = array();
        foreach ($rosters as $roster) {
            $districtKey = $roster->getDistrict()->getName();

            foreach ($roster->getStudents() as $student) {
                $studentKey = $student->getUser()->getLastName().', '.$student->getUser()->getFirstName();

                foreach ($quizzes as $quiz) {
                    $latestAttempt = $doctrine->getRepository('ImpetusAppBundle:Quiz')->getLatestQuizAttemptByQuizAndUser($quiz, $student->getUser());

                    $results[$districtKey][$studentKey][$quiz->getId()] = $latestAttempt;
                }
            }
        }
        /*
        echo '
';
        print_r($results);
        echo '
';
        */
        return $this->render('ImpetusAppBundle:Quiz:quiz-results.html.twig',
                             array('page' => 'quiz',
                                   'quizzes' => $quizzes,
                                   'results' => $results));
    }

    /**
     * @Route("/{id}", name="_quiz_show", options={"expose"=true}, requirements={"id"="\d+"})
     * @Secure(roles="ROLE_STUDENT")
     */
    public function showAction($id, Request $request) {
        $doctrine = $this->getDoctrine();
        $user = $this->getCurrentUser();
        $year = $this->get('year_service')->getCurrentAcademicYear();
        $quiz = $doctrine->getRepository('ImpetusAppBundle:Quiz')->findByIdAndYear($id, $year);
        if (!$quiz) {
            throw $this->createNotFoundException('Quiz not found with id '.$id.' and year '.$year->getYear());
        }

        $correctAnswers = $doctrine->getRepository('ImpetusAppBundle:Quiz')->getCorrectAnswersByQuiz($quiz);

        if ($request->getMethod() == 'POST') {
            $userAnswers = $request->request->get('user_answer');

            // TODO: Move to service, possibly
            if (count($userAnswers) != count($correctAnswers)) {
                throw new HttpException(400, 'Bad request (check answers)');
            }
            for ($i = 0; $i < count($userAnswers); $i++) {
                if ($userAnswers[$i] == null) {
                    throw new HttpException(400, 'Bad request (problem '.($i+1).' is null)');
                }
            }

            $em = $doctrine->getEntityManager();

            $quizAttempt = new QuizAttempt($quiz, $user);
            $em->persist($quizAttempt);
            $em->flush();

            $count = 0;
            foreach ($correctAnswers as $correctAnswer) {
                $correct = ($userAnswers[$count] == $correctAnswer->getValue()) ? 1 : 0;
                $quizResult = new QuizResult($userAnswers[$count], $correct, $quizAttempt, $correctAnswer->getQuestion());

                $em->persist($quizResult);
                $em->flush();

                $quizAttempt->addQuizResult($quizResult);

                $count++;
            }

            $em->flush();

            return $this->redirect($this->generateUrl('_quiz_show_attempt',
                                                      array('quizId' => $id,
                                                            'attemptId' => $quizAttempt->getId())));
        }

        return $this->render('ImpetusAppBundle:Quiz:quiz-new-attempt.html.twig',
                             array('page' => 'quiz',
                                   'quiz' => $quiz));
    }

    /**
     * @Route("/{quizId}/attempt/{attemptId}", name="_quiz_show_attempt", requirements={"quizId"="\d+", "attemptId"="\d+"})
     * @Secure(roles="ROLE_STUDENT")
     */
    public function showAttemptAction($quizId, $attemptId) {
        $doctrine = $this->getDoctrine();

        $quizAttempt = $doctrine->getRepository('ImpetusAppBundle:Quiz')->findByIdAndAttemptId($quizId, $attemptId);
        if (!$quizAttempt) {
            throw $this->createNotFoundException('Quiz Attempt '.$attemptId.' not found for quiz with id ' . $quizId);
        }

        if (!$this->hasAssistantAuthority()
            && $quizAttempt->getUser()->getId() != $this->getCurrentUser()->getId()) {
            throw new HttpException(403, 'You do not have access to this data.');
        }

        return $this->render('ImpetusAppBundle:Quiz:quiz-attempt.html.twig',
                             array('page' => 'quiz',
                                   'quiz' => $quizAttempt->getQuiz(),
                                   'quizAttempt' => $quizAttempt,
                                   'user_answer' => $quizAttempt->getQuizResults()->toArray()));
    }
}


text:
#pragma warning disable 1591

namespace DotSpatial.Projections.ProjectedCategories
{
    /// <summary>
    /// Europe
    /// </summary>
    public class Europe : CoordinateSystemCategory
    {
        #region Private Variables

        public readonly ProjectionInfo EMEP150KilometerGrid;
        public readonly ProjectionInfo EMEP50KilometerGrid;
        public readonly ProjectionInfo ETRS1989LAEA;
        public readonly ProjectionInfo ETRS1989LCC;
        public readonly ProjectionInfo EuropeAlbersEqualAreaConic;
        public readonly ProjectionInfo EuropeEquidistantConic;
        public readonly ProjectionInfo EuropeLambertConformalConic;

        #endregion

        #region Constructors

        /// <summary>
        /// Creates a new instance of Europe
        /// </summary>
        public Europe()
        {
            EMEP150KilometerGrid = new ProjectionInfo();
            EMEP150KilometerGrid.ParseEsriString("PROJCS[\"EMEP_150_Kilometer_Grid\", GEOGCS[\"GCS_Sphere_EMEP\", DATUM[\"D_Sphere_EMEP\", SPHEROID[\"Sphere_EMEP\", 6370000.0, 0.0]], PRIMEM[\"Greenwich\", 0.0], UNIT[\"Degree\", 0.0174532925199433]], PROJECTION[\"Stereographic_North_Pole\"], PARAMETER[\"False_Easting\", 3.0], PARAMETER[\"False_Northing\", 37.0], PARAMETER[\"Central_Meridian\", -32.0], PARAMETER[\"Standard_Parallel_1\", 60.0], UNIT[\"150_Kilometers\", 150000.0]]");
            EMEP50KilometerGrid = new ProjectionInfo();
            EMEP50KilometerGrid.ParseEsriString("PROJCS[\"EMEP_50_Kilometer_Grid\", GEOGCS[\"GCS_Sphere_EMEP\", DATUM[\"D_Sphere_EMEP\", SPHEROID[\"Sphere_EMEP\", 6370000.0, 0.0]], PRIMEM[\"Greenwich\", 0.0], UNIT[\"Degree\", 0.0174532925199433]], PROJECTION[\"Stereographic_North_Pole\"], PARAMETER[\"False_Easting\", 8.0], PARAMETER[\"False_Northing\", 110.0], PARAMETER[\"Central_Meridian\", -32.0], PARAMETER[\"Standard_Parallel_1\", 60.0], UNIT[\"50_Kilometers\", 50000.0]]");
            ETRS1989LAEA = ProjectionInfo.FromProj4String("+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs ");
            ETRS1989LCC = ProjectionInfo.FromProj4String("+proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +units=m +no_defs ");
            EuropeAlbersEqualAreaConic = ProjectionInfo.FromProj4String("+proj=aea +lat_1=43 +lat_2=62 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs ");
            EuropeEquidistantConic = ProjectionInfo.FromProj4String("+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=43 +lat_2=62 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs ");
            EuropeLambertConformalConic = ProjectionInfo.FromProj4String("+proj=lcc +lat_1=43 +lat_2=62 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs ");

            EMEP50KilometerGrid.Name = "EMEP_50_Kilometer_Grid";
            ETRS1989LAEA.Name = "ETRS_1989_LAEA";
            ETRS1989LCC.Name = "ETRS_1989_LCC";
            EuropeAlbersEqualAreaConic.Name = "Europe_Albers_Equal_Area_Conic";
            EuropeEquidistantConic.Name = "Europe_Equidistant_Conic";
            EuropeLambertConformalConic.Name = "Europe_Lambert_Conformal_Conic";

            EMEP150KilometerGrid.GeographicInfo.Name = "GCS_Sphere_EMEP";
            EMEP50KilometerGrid.GeographicInfo.Name = "GCS_Sphere_EMEP";
            ETRS1989LAEA.GeographicInfo.Name = "GCS_ETRS_1989";
            ETRS1989LCC.GeographicInfo.Name = "GCS_ETRS_1989";
            EuropeAlbersEqualAreaConic.GeographicInfo.Name = "GCS_European_1950";
            EuropeEquidistantConic.GeographicInfo.Name = "GCS_European_1950";
            EuropeLambertConformalConic.GeographicInfo.Name = "GCS_European_1950";

            EMEP150KilometerGrid.GeographicInfo.Datum.Name = "D_Sphere_EMEP";
            EMEP50KilometerGrid.GeographicInfo.Datum.Name = "D_Sphere_EMEP";
            ETRS1989LAEA.GeographicInfo.Datum.Name = "D_ETRS_1989";
            ETRS1989LCC.GeographicInfo.Datum.Name = "D_ETRS_1989";
            EuropeAlbersEqualAreaConic.GeographicInfo.Datum.Name = "D_European_1950";
            EuropeEquidistantConic.GeographicInfo.Datum.Name = "D_European_1950";
            EuropeLambertConformalConic.GeographicInfo.Datum.Name = "D_European_1950";
        }

        #endregion
    }
}

#pragma warning restore 1591


text:
.class public Lmf/javax/xml/xpath/XPathFunctionException;
.super Lmf/javax/xml/xpath/XPathExpressionException;
.source "XPathFunctionException.java"

# static fields
.field private static final serialVersionUID:J = -0x197e9ec3778880e4L

# direct methods
.method public constructor <init>(Ljava/lang/String;)V
    .locals 0

    invoke-direct {p0, p1}, Lmf/javax/xml/xpath/XPathExpressionException;-><init>(Ljava/lang/String;)V

    return-void
.end method

.method public constructor <init>(Ljava/lang/Throwable;)V
    .locals 0

    invoke-direct {p0, p1}, Lmf/javax/xml/xpath/XPathExpressionException;-><init>(Ljava/lang/Throwable;)V

    return-void
.end method


text:
/**
* Created with bitscontrol.
* User: exciter
* Date: 2015-03-25
* Time: 07:37 PM
*/
var View = require('views/base/view');
var utils = require('lib/utils');

module.exports = View.extend({
  autoRender: true,
  className: 'module-page',
  template: require('./templates/module'),
  regions: {
    commands: "#commands"
  },
  attach: function(args){
    this.constructor.__super__.attach.apply(this, arguments);
  }
});


text:
package ch.fhnw.util.net;

public interface IAbletonLinkHandler {
	void handle(AbletonLinkPacket linkPacket);
}