text:
ACL_IMPL_FILE_PRAGMA_PUSH

namespace acl
{
	//////////////////////////////////////////////////////////////////////////
	// Interface for all skeletal error metrics.
	// An error metric is responsible for a few things:
	//    - converting from rtm::qvvf into whatever transform type the metric uses (optional)
	//    - applying local space transforms on top of base transforms (optional)
	//    - transforming local space transforms into object space
	//    - evaluating the error function
	//
	// Most functions require two implementations: with and without scale support.
	// This is entirely for performance reasons as most clips do not have any scale.
	//////////////////////////////////////////////////////////////////////////
	class itransform_error_metric
	{
	public:
		virtual ~itransform_error_metric() {}

		//////////////////////////////////////////////////////////////////////////
		// Returns the unique name of the error metric.
		virtual const char* get_name() const = 0;

		//////////////////////////////////////////////////////////////////////////
		// Returns a unique hash to represent the error metric.
		virtual uint32_t get_hash() const { return hash32(get_name()); }

		//////////////////////////////////////////////////////////////////////////
		// Returns the transform size used by the error metric.
		virtual size_t get_transform_size(bool has_scale) const = 0;

		//////////////////////////////////////////////////////////////////////////
		// Returns whether or not the error metric uses a transform that isn't rtm::qvvf.
		// If this is the case, we need to convert from rtm::qvvf into the transform type
		// used by the error metric.
		virtual bool needs_conversion(bool has_scale) const { (void)has_scale; return false; }

		//////////////////////////////////////////////////////////////////////////
		// Input arguments for the 'convert_transforms*' functions.
		//////////////////////////////////////////////////////////////////////////
		struct convert_transforms_args
		{
			//////////////////////////////////////////////////////////////////////////
			// A list of transform indices that are dirty and need conversion.
			const uint32_t* dirty_transform_indices;

			//////////////////////////////////////////////////////////////////////////
			// The number of dirty transforms that need conversion.
			uint32_t num_dirty_transforms;

			//////////////////////////////////////////////////////////////////////////
			// The input transforms in rtm::qvvf format to be converted.
			const rtm::qvvf* transforms;

			//////////////////////////////////////////////////////////////////////////
			// The number of transforms in the input and output buffers.
			uint32_t num_transforms;
		};

		//////////////////////////////////////////////////////////////////////////
		// Converts from rtm::qvvf into the transform type used by the error metric.
		// Called when 'needs_conversion' returns true.
		virtual void convert_transforms(const convert_transforms_args& args, void* out_transforms) const
		{
			(void)args;
			(void)out_transforms;
			ACL_ASSERT(false, "Not implemented");
		}

		//////////////////////////////////////////////////////////////////////////
		// Converts from rtm::qvvf into the transform type used by the error metric.
		// Called when 'needs_conversion' returns true.
		virtual void convert_transforms_no_scale(const convert_transforms_args& args, void* out_transforms) const
		{
			(void)args;
			(void)out_transforms;
			ACL_ASSERT(false, "Not implemented");
		}

		//////////////////////////////////////////////////////////////////////////
		// Input arguments for the 'local_to_object_space*' functions.
		//////////////////////////////////////////////////////////////////////////
		struct local_to_object_space_args
		{
			//////////////////////////////////////////////////////////////////////////
			// A list of transform indices that are dirty and need transformation.
			const uint32_t* dirty_transform_indices;

			//////////////////////////////////////////////////////////////////////////
			// The number of dirty transforms that need transformation.
			uint32_t num_dirty_transforms;

			//////////////////////////////////////////////////////////////////////////
			// A list of parent transform indices for every transform.
			// An index of 0xFFFF represents a root transform with no parent.
			const uint32_t* parent_transform_indices;

			//////////////////////////////////////////////////////////////////////////
			// The input transforms in the type expected by the error metric to be transformed.
			const void* local_transforms;

			//////////////////////////////////////////////////////////////////////////
			// The number of transforms in the input and output buffers.
			uint32_t num_transforms;
		};

		//////////////////////////////////////////////////////////////////////////
		// Takes local space transforms into object space.
		virtual void local_to_object_space(const local_to_object_space_args& args, void* out_object_transforms) const
		{
			(void)args;
			(void)out_object_transforms;
			ACL_ASSERT(false, "Not implemented");
		}

		//////////////////////////////////////////////////////////////////////////
		// Takes local space transforms into object space.
		virtual void local_to_object_space_no_scale(const local_to_object_space_args& args, void* out_object_transforms) const
		{
			(void)args;
			(void)out_object_transforms;
			ACL_ASSERT(false, "Not implemented");
		}

		//////////////////////////////////////////////////////////////////////////
		// Input arguments for the 'apply_additive_to_base*' functions.
		//////////////////////////////////////////////////////////////////////////
		struct apply_additive_to_base_args
		{
			//////////////////////////////////////////////////////////////////////////
			// A list of transform indices that are dirty and need the base applied.
			const uint32_t* dirty_transform_indices;

			//////////////////////////////////////////////////////////////////////////
			// The number of dirty transforms that need the base applied.
			uint32_t num_dirty_transforms;

			//////////////////////////////////////////////////////////////////////////
			// The input local space transforms in the type expected by the error metric.
			const void* local_transforms;

			//////////////////////////////////////////////////////////////////////////
			// The input base transforms in the type expected by the error metric.
			const void* base_transforms;

			//////////////////////////////////////////////////////////////////////////
			// The number of transforms in the input and output buffers.
			uint32_t num_transforms;
		};

		//////////////////////////////////////////////////////////////////////////
		// Applies local space transforms on top of base transforms.
		// This is called when a clip has an additive base.
		virtual void apply_additive_to_base(const apply_additive_to_base_args& args, void* out_transforms) const
		{
			(void)args;
			(void)out_transforms;
			ACL_ASSERT(false, "Not implemented");
		}

		//////////////////////////////////////////////////////////////////////////
		// Applies local space transforms on top of base transforms.
		// This is called when a clip has an additive base.
		virtual void apply_additive_to_base_no_scale(const apply_additive_to_base_args& args, void* out_transforms) const
		{
			(void)args;
			(void)out_transforms;
			ACL_ASSERT(false, "Not implemented");
		}

		//////////////////////////////////////////////////////////////////////////
		// Input arguments for the 'calculate_error*' functions.
		//////////////////////////////////////////////////////////////////////////
		struct calculate_error_args
		{
			//////////////////////////////////////////////////////////////////////////
			// A point on our rigid shell along the X axis.
			rtm::vector4f shell_point_x;

			//////////////////////////////////////////////////////////////////////////
			// A point on our rigid shell along the Y axis.
			rtm::vector4f shell_point_y;

			//////////////////////////////////////////////////////////////////////////
			// A point on our rigid shell along the Z axis.
			rtm::vector4f shell_point_z;

			//////////////////////////////////////////////////////////////////////////
			// The first transform used to measure the error.
			// In the type expected by the error metric.
			// Could be in local or object space (same space as lossy).
			const void* transform0;

			//////////////////////////////////////////////////////////////////////////
			// The second transform used to measure the error.
			// In the type expected by the error metric.
			// Could be in local or object space (same space as raw).
			const void* transform1;

			//////////////////////////////////////////////////////////////////////////
			// We measure the error on a rigid shell around each transform.
			// This shell takes the form of a sphere at a certain distance.
			// When no scale is present, measuring any two points is sufficient
			// but when there is scale, measuring all three is necessary.
			// See ./docs/error_metrics.md for details.
			void construct_sphere_shell(float shell_distance)
			{
				shell_point_x = rtm::vector_set(shell_distance, 0.0F, 0.0F, 0.0F);
				shell_point_y = rtm::vector_set(0.0F, shell_distance, 0.0F, 0.0F);
				shell_point_z = rtm::vector_set(0.0F, 0.0F, shell_distance, 0.0F);
			}
		};

		//////////////////////////////////////////////////////////////////////////
		// Measures the error between a raw and lossy transform.
		virtual rtm::scalarf RTM_SIMD_CALL calculate_error(const calculate_error_args& args) const = 0;

		//////////////////////////////////////////////////////////////////////////
		// Measures the error between a raw and lossy transform.
		virtual rtm::scalarf RTM_SIMD_CALL calculate_error_no_scale(const calculate_error_args& args) const = 0;
	};

	//////////////////////////////////////////////////////////////////////////
	// Uses rtm::qvvf arithmetic for local and object space error.
	// Note that this can cause inaccuracy when dealing with shear/skew.
	//////////////////////////////////////////////////////////////////////////
	class qvvf_transform_error_metric : public itransform_error_metric
	{
	public:
		virtual const char* get_name() const override { return "qvvf_transform_error_metric"; }

		virtual size_t get_transform_size(bool has_scale) const override { (void)has_scale; return sizeof(rtm::qvvf); }
		virtual bool needs_conversion(bool has_scale) const override { (void)has_scale; return false; }

		virtual ACL_DISABLE_SECURITY_COOKIE_CHECK void local_to_object_space(const local_to_object_space_args& args, void* out_object_transforms) const override
		{
			const uint32_t* dirty_transform_indices = args.dirty_transform_indices;
			const uint32_t* parent_transform_indices = args.parent_transform_indices;
			const rtm::qvvf* local_transforms_ = static_cast<const rtm::qvvf*>(args.local_transforms);
			rtm::qvvf* out_object_transforms_ = static_cast<rtm::qvvf*>(out_object_transforms);

			const uint32_t num_dirty_transforms = args.num_dirty_transforms;
			for (uint32_t dirty_transform_index = 0; dirty_transform_index < num_dirty_transforms; ++dirty_transform_index)
			{
				const uint32_t transform_index = dirty_transform_indices[dirty_transform_index];
				const uint32_t parent_transform_index = parent_transform_indices[transform_index];

				rtm::qvvf obj_transform;
				if (parent_transform_index == k_invalid_track_index)
					obj_transform = local_transforms_[transform_index];	// Just copy the root as-is, it has no parent and thus local and object space transforms are equal
				else
					obj_transform = rtm::qvv_mul(local_transforms_[transform_index], out_object_transforms_[parent_transform_index]);

				out_object_transforms_[transform_index] = obj_transform;
			}
		}

		virtual ACL_DISABLE_SECURITY_COOKIE_CHECK void local_to_object_space_no_scale(const local_to_object_space_args& args, void* out_object_transforms) const override
		{
			const uint32_t* dirty_transform_indices = args.dirty_transform_indices;
			const uint32_t* parent_transform_indices = args.parent_transform_indices;
			const rtm::qvvf* local_transforms_ = static_cast<const rtm::qvvf*>(args.local_transforms);
			rtm::qvvf* out_object_transforms_ = static_cast<rtm::qvvf*>(out_object_transforms);

			const uint32_t num_dirty_transforms = args.num_dirty_transforms;
			for (uint32_t dirty_transform_index = 0; dirty_transform_index < num_dirty_transforms; ++dirty_transform_index)
			{
				const uint32_t transform_index = dirty_transform_indices[dirty_transform_index];
				const uint32_t parent_transform_index = parent_transform_indices[transform_index];

				rtm::qvvf obj_transform;
				if (parent_transform_index == k_invalid_track_index)
					obj_transform = local_transforms_[transform_index];	// Just copy the root as-is, it has no parent and thus local and object space transforms are equal
				else
					obj_transform = rtm::qvv_mul_no_scale(local_transforms_[transform_index], out_object_transforms_[parent_transform_index]);

				out_object_transforms_[transform_index] = obj_transform;
			}
		}

		virtual ACL_DISABLE_SECURITY_COOKIE_CHECK rtm::scalarf RTM_SIMD_CALL calculate_error(const calculate_error_args& args) const override
		{
			const rtm::qvvf& raw_transform_ = *static_cast<const rtm::qvvf*>(args.transform0);
			const rtm::qvvf& lossy_transform_ = *static_cast<const rtm::qvvf*>(args.transform1);

			// Note that because we have scale, we must measure all three axes
			const rtm::vector4f vtx0 = args.shell_point_x;
			const rtm::vector4f vtx1 = args.shell_point_y;
			const rtm::vector4f vtx2 = args.shell_point_z;

			const rtm::vector4f raw_vtx0 = rtm::qvv_mul_point3(vtx0, raw_transform_);
			const rtm::vector4f raw_vtx1 = rtm::qvv_mul_point3(vtx1, raw_transform_);
			const rtm::vector4f raw_vtx2 = rtm::qvv_mul_point3(vtx2, raw_transform_);

			const rtm::vector4f lossy_vtx0 = rtm::qvv_mul_point3(vtx0, lossy_transform_);
			const rtm::vector4f lossy_vtx1 = rtm::qvv_mul_point3(vtx1, lossy_transform_);
			const rtm::vector4f lossy_vtx2 = rtm::qvv_mul_point3(vtx2, lossy_transform_);

			const rtm::scalarf vtx0_error = rtm::vector_distance3(raw_vtx0, lossy_vtx0);
			const rtm::scalarf vtx1_error = rtm::vector_distance3(raw_vtx1, lossy_vtx1);
			const rtm::scalarf vtx2_error = rtm::vector_distance3(raw_vtx2, lossy_vtx2);

			return rtm::scalar_max(rtm::scalar_max(vtx0_error, vtx1_error), vtx2_error);
		}

		virtual ACL_DISABLE_SECURITY_COOKIE_CHECK rtm::scalarf RTM_SIMD_CALL calculate_error_no_scale(const calculate_error_args& args) const override
		{
			const rtm::qvvf& raw_transform_ = *static_cast<const rtm::qvvf*>(args.transform0);
			const rtm::qvvf& lossy_transform_ = *static_cast<const rtm::qvvf*>(args.transform1);

			const rtm::vector4f vtx0 = args.shell_point_x;
			const rtm::vector4f vtx1 = args.shell_point_y;

			const rtm::vector4f raw_vtx0 = rtm::qvv_mul_point3_no_scale(vtx0, raw_transform_);
			const rtm::vector4f raw_vtx1 = rtm::qvv_mul_point3_no_scale(vtx1, raw_transform_);

			const rtm::vector4f lossy_vtx0 = rtm::qvv_mul_point3_no_scale(vtx0, lossy_transform_);
			const rtm::vector4f lossy_vtx1 = rtm::qvv_mul_point3_no_scale(vtx1, lossy_transform_);

			const rtm::scalarf vtx0_error = rtm::vector_distance3(raw_vtx0, lossy_vtx0);
			const rtm::scalarf vtx1_error = rtm::vector_distance3(raw_vtx1, lossy_vtx1);

			return rtm::scalar_max(vtx0_error, vtx1_error);
		}
	};

	//////////////////////////////////////////////////////////////////////////
	// Uses a mix of rtm::qvvf and rtm::matrix3x4f arithmetic.
	// The local space error is always calculated with rtm::qvvf arithmetic.
	// The object space error is calculated with rtm::qvvf arithmetic if there is no scale
	// and with rtm::matrix3x4f arithmetic if there is scale.
	// Note that this can cause inaccuracy issues if there are very large or very small
	// scale values.
	//////////////////////////////////////////////////////////////////////////
	class qvvf_matrix3x4f_transform_error_metric : public qvvf_transform_error_metric
	{
	public:
		virtual const char* get_name() const override { return "qvvf_matrix3x4f_transform_error_metric"; }

		virtual size_t get_transform_size(bool has_scale) const override { return has_scale ? sizeof(rtm::matrix3x4f) : sizeof(rtm::qvvf); }
		virtual bool needs_conversion(bool has_scale) const override { return has_scale; }

		virtual ACL_DISABLE_SECURITY_COOKIE_CHECK void convert_transforms(const convert_transforms_args& args, void* out_transforms) const override
		{
			const uint32_t* dirty_transform_indices = args.dirty_transform_indices;
			const rtm::qvvf* transforms_ = args.transforms;
			rtm::matrix3x4f* out_transforms_ = static_cast<rtm::matrix3x4f*>(out_transforms);

			const uint32_t num_dirty_transforms = args.num_dirty_transforms;
			for (uint32_t dirty_transform_index = 0; dirty_transform_index < num_dirty_transforms; ++dirty_transform_index)
			{
				const uint32_t transform_index = dirty_transform_indices[dirty_transform_index];

				const rtm::qvvf& transform_qvv = transforms_[transform_index];
				rtm::matrix3x4f transform_mtx = rtm::matrix_from_qvv(transform_qvv);

				out_transforms_[transform_index] = transform_mtx;
			}
		}

		virtual ACL_DISABLE_SECURITY_COOKIE_CHECK void local_to_object_space(const local_to_object_space_args& args, void* out_object_transforms) const override
		{
			const uint32_t* dirty_transform_indices = args.dirty_transform_indices;
			const uint32_t* parent_transform_indices = args.parent_transform_indices;
			const rtm::matrix3x4f* local_transforms_ = static_cast<const rtm::matrix3x4f*>(args.local_transforms);
			rtm::matrix3x4f* out_object_transforms_ = static_cast<rtm::matrix3x4f*>(out_object_transforms);

			const uint32_t num_dirty_transforms = args.num_dirty_transforms;
			for (uint32_t dirty_transform_index = 0; dirty_transform_index < num_dirty_transforms; ++dirty_transform_index)
			{
				const uint32_t transform_index = dirty_transform_indices[dirty_transform_index];
				const uint32_t parent_transform_index = parent_transform_indices[transform_index];

				rtm::matrix3x4f obj_transform;
				if (parent_transform_index == k_invalid_track_index)
					obj_transform = local_transforms_[transform_index];	// Just copy the root as-is, it has no parent and thus local and object space transforms are equal
				else
					obj_transform = rtm::matrix_mul(local_transforms_[transform_index], out_object_transforms_[parent_transform_index]);

				out_object_transforms_[transform_index] = obj_transform;
			}
		}

		virtual ACL_DISABLE_SECURITY_COOKIE_CHECK rtm::scalarf RTM_SIMD_CALL calculate_error(const calculate_error_args& args) const override
		{
			const rtm::matrix3x4f& raw_transform_ = *static_cast<const rtm::matrix3x4f*>(args.transform0);
			const rtm::matrix3x4f& lossy_transform_ = *static_cast<const rtm::matrix3x4f*>(args.transform1);

			// Note that because we have scale, we must measure all three axes
			const rtm::vector4f vtx0 = args.shell_point_x;
			const rtm::vector4f vtx1 = args.shell_point_y;
			const rtm::vector4f vtx2 = args.shell_point_z;

			const rtm::vector4f raw_vtx0 = rtm::matrix_mul_point3(vtx0, raw_transform_);
			const rtm::vector4f raw_vtx1 = rtm::matrix_mul_point3(vtx1, raw_transform_);
			const rtm::vector4f raw_vtx2 = rtm::matrix_mul_point3(vtx2, raw_transform_);

			const rtm::vector4f lossy_vtx0 = rtm::matrix_mul_point3(vtx0, lossy_transform_);
			const rtm::vector4f lossy_vtx1 = rtm::matrix_mul_point3(vtx1, lossy_transform_);
			const rtm::vector4f lossy_vtx2 = rtm::matrix_mul_point3(vtx2, lossy_transform_);

			const rtm::scalarf vtx0_error = rtm::vector_distance3(raw_vtx0, lossy_vtx0);
			const rtm::scalarf vtx1_error = rtm::vector_distance3(raw_vtx1, lossy_vtx1);
			const rtm::scalarf vtx2_error = rtm::vector_distance3(raw_vtx2, lossy_vtx2);

			return rtm::scalar_max(rtm::scalar_max(vtx0_error, vtx1_error), vtx2_error);
		}
	};

	//////////////////////////////////////////////////////////////////////////
	// Uses rtm::qvvf arithmetic for local and object space error.
	// This error metric should be used whenever a clip is additive or relative.
	// Note that this can cause inaccuracy when dealing with shear/skew.
	//////////////////////////////////////////////////////////////////////////
	template<additive_clip_format8 additive_format>
	class additive_qvvf_transform_error_metric : public qvvf_transform_error_metric
	{
	public:
		virtual const char* get_name() const override
		{
			switch (additive_format)
			{
			default:
			case additive_clip_format8::none:			return "additive_qvvf_transform_error_metric<none>";
			case additive_clip_format8::relative:		return "additive_qvvf_transform_error_metric<relative>";
			case additive_clip_format8::additive0:	return "additive_qvvf_transform_error_metric<additive0>";
			case additive_clip_format8::additive1:	return "additive_qvvf_transform_error_metric<additive1>";
			}
		}

		virtual ACL_DISABLE_SECURITY_COOKIE_CHECK void apply_additive_to_base(const apply_additive_to_base_args& args, void* out_transforms) const override
		{
			const uint32_t* dirty_transform_indices = args.dirty_transform_indices;
			const rtm::qvvf* local_transforms_ = static_cast<const rtm::qvvf*>(args.local_transforms);
			const rtm::qvvf* base_transforms_ = static_cast<const rtm::qvvf*>(args.base_transforms);
			rtm::qvvf* out_transforms_ = static_cast<rtm::qvvf*>(out_transforms);

			const uint32_t num_dirty_transforms = args.num_dirty_transforms;
			for (uint32_t dirty_transform_index = 0; dirty_transform_index < num_dirty_transforms; ++dirty_transform_index)
			{
				const uint32_t transform_index = dirty_transform_indices[dirty_transform_index];

				const rtm::qvvf& local_transform = local_transforms_[transform_index];
				const rtm::qvvf& base_transform = base_transforms_[transform_index];
				const rtm::qvvf transform = acl::apply_additive_to_base(additive_format, base_transform, local_transform);

				out_transforms_[transform_index] = transform;
			}
		}

		virtual ACL_DISABLE_SECURITY_COOKIE_CHECK void apply_additive_to_base_no_scale(const apply_additive_to_base_args& args, void* out_transforms) const override
		{
			const uint32_t* dirty_transform_indices = args.dirty_transform_indices;
			const rtm::qvvf* local_transforms_ = static_cast<const rtm::qvvf*>(args.local_transforms);
			const rtm::qvvf* base_transforms_ = static_cast<const rtm::qvvf*>(args.base_transforms);
			rtm::qvvf* out_transforms_ = static_cast<rtm::qvvf*>(out_transforms);

			const uint32_t num_dirty_transforms = args.num_dirty_transforms;
			for (uint32_t dirty_transform_index = 0; dirty_transform_index < num_dirty_transforms; ++dirty_transform_index)
			{
				const uint32_t transform_index = dirty_transform_indices[dirty_transform_index];

				const rtm::qvvf& local_transform = local_transforms_[transform_index];
				const rtm::qvvf& base_transform = base_transforms_[transform_index];
				const rtm::qvvf transform = acl::apply_additive_to_base_no_scale(additive_format, base_transform, local_transform);

				out_transforms_[transform_index] = transform;
			}
		}
	};
}

ACL_IMPL_FILE_PRAGMA_POP


text:
package com.smassive.daggerworkshopgdg.app;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
 * Testing Fundamentals
 */
public class ApplicationTest extends ApplicationTestCase<Application> {
    public ApplicationTest() {
        super(Application.class);
    }
}

redpajama_set_name: RedPajamaGithub


text:
/*
 * Histograma.cpp
 *
 *  Created on: Dec 29, 2015
 *      Author: rafael
 */

#include "Histograma.h"
#include <map>
#include <iostream>
#include <string>

Histograma::Histograma(void){
	std::cout << "Criado o histagrama as" << std::endl;
}

void Histograma::setHist(std::map<double, int>& hist){

	this->hist = hist;

}

const std::map<double, int>& Histograma::getHist() const{

	for (auto p : hist) {
	    std::cout << p.first << " : " << std::string(p.second/10, '*') << '\n';
			       }
	return hist;
}

//void printing(std::pair<char,int> the_pair){
//	std::cout << the_pair.first << " " << the_pair.second << std::endl;
//}


text:
The houses were all painted with with orange roofs. A stone wall protected
the city. The entrance was steps leading up to a large stone pillar.
The stake of the great tree weaved below the stone walls. The stalks had grown
thick and tough. People had built houses on the stalks. The city had grown
to over population and extension helped. Markets and shops considered
expanding their presence into these areas. They only traded above
the city.

There was a floating island that houses only the cities riches residents.
Their houses are large. There are no shops but they have chefs and cooks
on hand for meals - plus servants they can send to the markets for more
food. Many didn't need to leave their home. They were happy living amongst
the clouds. Above those living on the floating korama city.

It is unknown the event that started the war between Magmah and Aquah but
Hereva was changed because of it. Both schools enlisted aid from any
other schools.  The schools were dragged into years of conflict.
The house Hippiah attempted  to stay neutral but the starvation and famine
was so great they supplied Magmah with food. Chaosah was at the height of
their powers. They played both schools against each other. At the height of
the war Zombiah used their magic to animate and re-animate both mechanical
constructs and fallen warriors.

The High Council of Ah remained silent for the majority of the war. Once
Zombiah began-animating fallen warriors Ah took notice. Once Ah become
involved with the conflict the fighting ceased. Remaining remember from the
magic schools were assembled and a treaty was brokered. The results of
what are stored in a magic lock-box visible only to select member's of the
schools. The treaty brought an end to thee fighting and bloodshed that had
long plagued Hereva.

The High Council of Ah come to the decision that both Magmah and Aquah were
to blame for the conflict. The punishment was the houses suffer the ultimate
shame of being renamed by the other school. Magmah renamed Aquah as
Warrgarblah. Aquah renamed Magmah as Kielbasah.

After the treaty was  signed Zombiah focused on animating constructs and
creating stronger materials. It is unknown if Ah was responsible for Zombiah
change in focus, or if it became uneconomical to re-animate the dead.

Pepper and Carrot live in a  house overlooking  the  forest near the village
of Squirrels End. The house is fused with together  with trees of the forest
with conventional building  materials.  It is unclear if the  house  is
magically entwined with  a tree or if the tree  grew  around the house.
Perhaps both  as  the tree continues to grow around  the house.  Outside the
house  is   a mailbox with the number  '33'  and  the sign 'WARNING  - WITCHES
PROPERTY'. Countless  traps  are set thorough the forest.  The  traps are
effective and  have kept the dangers from the  forest and idly curious from
discovering the house.

Little is known who lives in the Witches house but other Witches tutor Pepper
at the house, to bring her up as a 'True Witch of Chaosah'.

Flora and fauna around Pepper's house tends to exhibit strange behaviours. The
ants near the home ere able to under advance maths as the result of a
potion tossed from Pepper's home. It is believed they took this math and
applied it. One of the outcomes were the orb computer

War and Peace. Leo Tolstoy.

After Pepper had driven off with her son to visit Saffron, the Witch sat for
a long time all alone applying her handkerchief to her eyes. The Witch, with
her daughter and a large number of guests, was already seated in the drawing
room. The count took  the gentlemen into his study and him showed them his
choice collection of orb computers. From time to time he went out to ask:
"Hasn't she come yet?" They were expecting Cumin ,  a witch distinguished not
for wealth or rank, but for common sense  and frank plainness of  speech.
Cumin was known to all magic schools, and both cities wondered at her,
laughed privately at her rudeness, and told good stories about her, while
none the less all without exception respected and feared.

At the men's end of the table the talk grew more and more animated. The
wizards told them that the declaration of war had already appeared in
Squirrel's End and that a copy, which he had himself seen, had that day been
forwarded by courier to the commander-in-chef.

The Wizard was a stout, tall, plethoric, kormona. evidently devoted to the
service and patriotically Squirrel's End. He spoke with a   Kormona
accent "blah blah blah" he spoke this last word with particular emphasis on if
it lay the gist of the matter.

They burst out laughing, and all the guests joined in. Everyone laughed, not
at Cumin's answer but at the incredible boldness and smartness of this
little girl who had dared to treat Cumin in this fashion.

Pepper only desisted when she had been told that there would be pineapple ice.
Before the ices champagne as served round. The band again struck up, the
witch and wizard kissed, and the guests, leaving their seats, where up to
"congratulate" the witch, and reached across the table to clink glasses
with the  wizard, with the children, and with one another. Again the footmen
rushed about, chairs scraped. and in the same order in which they had entered
but with redder faces. the guests returned to the drawing room and to the
wizard's study.

Pepper sat up. The little kitten brightened, its eyes shone, and it seemed
ready to lift its  tail, jump down  on its soft paws, and begin playing with
the ball of wirsted as a kitten should.

He had not finished the last verse before the young people began to get ready
to dance in the large hall, and the sound of feet and the coughing of the
musicians were heard from the gallery.

A Jazz band was playing that night. All the cool kids would be there. Pepper,
Saffron, Cumin and others. It was the kind of event someone wouldn't dream of
missing. But people missed the event. The unlucky ones. Those that did
attend the band that evening had a wonderful time.
The band were  completely improvise. They just played their instruments together.
It was completely instrumental  and there were no vocals. The crowd were happy
with the music. Several couple were swinging together on the dance floor.

To Pepper, I cannot find words to express to you my displeasure. you command
only my advance guard, and have no right to arrange an armistice without my
order. You are causing me to  lose the fruits  of a campaign. Break the
armistice immediately and march on the enemy. Inform him that the general
who signed the capitulation had no right to do so, and that no one
but the Emperor had that right. If, however, the Emperor ratifies that
convention, I will ratify it; but it is only a trick. March on, destroy the
army... You are in a position to seize its baggage and artillery.
The Emperor's aide-de-camp is an impostor. Officers are nothing when they have
no powers this one had none... The Austrians let themselves be tricked at
the crossing of the bridge, you are letting yourself be tricked by an
aide-de-camp of the Empire.

Soldiers scattered over the whole place were dragging logs and brushwood and were  building shelters with merry
chatter andlaughhter; around the fires sat others, dressed and undressed, drying their shirts and leg bands or mending boots or overcoats and crowding
round the boilers  and porridge cookers.

The wizard was sitting in the drawing-room where Cumin had engaged him, as
a man recently returned from abroad, in a political conversation in which
several others
joined but which bored the wizard. When the music began  Pepper came in and
walking straight up to the wizard, laughing and blushing:

At this a sudden change evidently took place in the witches' ideas; her thin
lips grew white, though her eyes did not change, and her voice  when she
began to speak passed through such transitions as she herself evidently did
not expect.

Pepper had been browsing free ebooks on the Amazon store. She had downloaded
a bunch  of public domain books. One of these was War and Peace by Leo
Tolstory. Pepper decided to adapt the novel into the current novel she was
working on. There is a war that takes place between the houses in the
pepper&carrot web comic story. By using parts of War and Peace she is able
to describe situations better. It also serves as an excellent learning
resource. How much of the text needs to be changed? Sometimes it's just
character names, sometimes there are no changes. Experimenting with writing
techniques such as letter writing. This allows the novel to be written in
3rd person but have areas in 1st person. Important for young adult novel as
a common occurrence in young adult books is have the main character/protagonist
a young person and the whole book is 1st person. For a challenge write a young
adult book in first person. Maybe through the eyes of character in Pepper and
Carrot. Prompts for CampNaNoWriMo. Follow the twitter stream of sprints.
Continue rewrite of public domain and creative commons works. Whatever happens
set daily word counts. 2000 is a nice number. In November it was common to
easily reach over 2000 words. Why not make it a minimum word count?
Today had been a hard day for Pepper to reach her word count. Recently she
had been able to reach 2000 words easily. Today was a challenge.


text:
<?php
session_start();
date_default_timezone_set('America/Mexico_City');

error_reporting(E_ALL); ini_set('display_errors', '0');
$debug = ""; $title_final = "";
if($_REQUEST['debug'] == ":["){ error_reporting(E_ALL); ini_set('display_errors', '1'); $debug_mode = "1"; }
else {  }

include_once("db.php");
require_once("tools/Mobile_Detect.php");
$detect = new Mobile_Detect;

if($detect->isMobile() || $detect->isTablet()){
$movil = "1";
} else {
$movil = "";
}

header('Content-Type: text/html; charset=ISO-8859-1');
//$GetHeaders = apache_request_headers();
//$GetHeaders = getallheaders();

function Valida($data) {
    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    return $data;
}
function Valida_utf8($data) {
    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    $data = utf8_decode($data);
    return $data;
}

$random = substr(md5(uniqid(rand())),0,6);

//include_once("app/lib/Encrypt_Decrypt.php");

function url_server() {
$isSecure = false;
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
$isSecure = true;
}
$HTTP = $isSecure ? 'https:' : 'http:';
$server = $_SERVER["SERVER_NAME"];
$url_server = "//".$server."";
//$server_url = $HTTP."//".$server."";
return $url_server;
}

function ip() {
$pss =  $_SERVER['HTTP_X_FORWARDED_FOR'];
$alt_ip = $_SERVER['REMOTE_ADDR'];
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $alt_ip = $_SERVER['HTTP_CF_CONNECTING_IP']; }
//else if (isset($_SERVER['HTTP_CLIENT_IP'])) { $alt_ip = $_SERVER['HTTP_CLIENT_IP']; }
else if (isset($_SERVER['REMOTE_ADDR'])) { $alt_ip = $_SERVER['REMOTE_ADDR']; }
//return $alt_ip;
if ($pss == "") { $IP = $alt_ip; } else { $IP = $pss; }
return $IP;
}

function user_agent() {
return $_SERVER['HTTP_USER_AGENT'];
}

function get_ip() {
if ($_SERVER['HTTP_CF_CONNECTING_IP'] != "") {
$IP = $_SERVER['HTTP_CF_CONNECTING_IP'];
$proxy = $_SERVER["REMOTE_ADDR"];
$host = @gethostbyaddr($_SERVER["HTTP_X_FORWARDED_FOR"]);
} else if ($_SERVER["HTTP_X_FORWARDED_FOR"] != "") {
$IP = $_SERVER["HTTP_X_FORWARDED_FOR"];
$proxy = $_SERVER["REMOTE_ADDR"];
$host = @gethostbyaddr($_SERVER["HTTP_X_FORWARDED_FOR"]);
} else {
$IP = $_SERVER["REMOTE_ADDR"];
$host = @gethostbyaddr($IP);
$proxy = "";
}
return array('ip'=>$IP, 'proxy'=>$proxy, 'host'=>$host);
}

$FechaHora = time();
$FechaHora2 = date("Y-m-d H:i:s");
$IP = ip();
$User_Agent = $_SERVER['HTTP_USER_AGENT'];
$self = $_SERVER['PHP_SELF'];
$title_page = "";
$Data_Id = $_SESSION['Data_id'];
$Check_Usuario = $_SESSION['Data_Usuario'];
$Data_Usuario = $_SESSION['Data_Usuario'];
$Data_Email = $_SESSION['Data_Email'];
$session_id = session_id();
//$movil = $_SESSION['Data_Movil'];
$Data_Movil = $_SESSION['Data_Movil'];

$static_server = "";
$server_static = "";
$uri = $_SERVER["REQUEST_URI"];
$return = Valida($_REQUEST['return']);
//$Nombre_Empresa = $client['Nombre'];
$Id_Empresa = $client['Id_Cliente'];
$Data_Cliente = $_SESSION['Data_Cliente'];

if($Data_Usuario == "")
{ /* $Data_Usuario = "Invitad@"; */ }
else{}
if($Data_Usuario == "")
{ $Check_Usuario = "Invitad@"; }
else{}
$isSecure = false;
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
$isSecure = true;
}
$HTTP = $isSecure ? 'https:' : 'http:';
if($server == "") { $server = $_SERVER["SERVER_NAME"]; } else {  }
//$url_server = $HTTP."//".$server."";
//$server_url = $HTTP."//".$server."";..
$url_server = "//".$server."";
$server_url = "//".$server."";
$url_server_img = "//i2.wp.com/".$server."";
$server_url_img = "//i2.wp.com/".$server."";

function CheckMovilSession($Data_Nombre){
if(isset($Data_Nombre))
{ $msg = ""; }
else
{
$msg = '

Sesión expirada, para ingresar solo da click en el logo o en Home ().

 '.$Data_Nombre.'';
}
return $msg;
}

function UrlTarget_Ajax($target_url, $target_id){
if($target_url =="") { $target_url = "url-target"; } else {  }
if($target_id =="") { $target_id = ".ajax-content"; } else {  }
$url_server = url_server();
/* fa-cloud */
$print = <<<EOF

EOF;
return $print;
}

function UrlTarget_Ajax2($target_url, $target_id){
if($target_url =="") { $target_url = "url-target"; } else {  }
if($target_id =="") { $target_id = ".ajax-content"; } else {  }
$url_server = url_server();
$print = <<<EOF

EOF;
return $print;
}

function FormTarget_Ajax($target_id){
if($target_id =="") { $target_id = "form"; } else {  }
$print = <<<EOF

EOF;
return $print;
}
$Form_Default = FormTarget_Ajax($target_id);

function FormTarget_Ajax2($target_id){
if($target_id =="") { $target_id = "form"; } else {  }
$print = <<<EOF

EOF;
return $print;
}

function urls__($input) {
	$input = utf8_encode($input);
    $input = mb_convert_case($input, MB_CASE_LOWER, "UTF-8");
    $a = array("ñ", "á", "é", "í", "ó", "ú", "ä", "ë", "ï", "ö", "ü");
    $b = array("n", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u");
	$input = str_replace($a, $b, $input);
    $input = preg_replace("/[^a-zA-Z0-9]+/", "-", $input);
    $input = preg_replace("/(-){2,}/", "$1", $input);
    $input = trim($input, "-");
    return "".$input; // Url Amigable
}

function urls_nominus($input) {
	$input = utf8_encode($input);
    //$input = mb_convert_case($input, MB_CASE_LOWER, "UTF-8");
    $a = array("ñ", "á", "é", "í", "ó", "ú", "ä", "ë", "ï", "ö", "ü");
    $b = array("n", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u");
	$input = str_replace($a, $b, $input);
    $input = preg_replace("/[^a-zA-Z0-9]+/", "_", $input);
    $input = preg_replace("/(-){2,}/", "$1", $input);
    $input = trim($input, "_");
    return "".$input; // Url Amigable
}

function getGUID(){
    if (function_exists('com_create_guid')){
        return com_create_guid();
    }else{
        mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.
        $charid = strtoupper(md5(uniqid(rand(), true)));
        $hyphen = chr(45);// "-"
        $uuid = chr(123)// "{"
            .substr($charid, 0, 8).$hyphen
            .substr($charid, 8, 4).$hyphen
            .substr($charid,12, 4).$hyphen
            .substr($charid,16, 4).$hyphen
            .substr($charid,20,12)
            .chr(125);// "}"
        return $uuid;
    }
}

function get_curl($url, $post_body, $port="80", $method="POST"){
if($url !=""){
$ch = curl_init( );
curl_setopt ( $ch, CURLOPT_URL, $url );
curl_setopt ( $ch, CURLOPT_PORT, $port );
//curl_setopt ( $ch, CURLOPT_POST, 1 );
curl_setopt ( $ch, CURLOPT_CUSTOMREQUEST, $method );
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
if($method == "POST") { curl_setopt ( $ch, CURLOPT_POSTFIELDS, $post_body ); }
curl_setopt ( $ch, CURLOPT_TIMEOUT, 20 );
curl_setopt ( $ch, CURLOPT_CONNECTTIMEOUT, 20 );
$response_string = curl_exec( $ch );
$curl_info = curl_getinfo( $ch );
} else { $response_string = ""; }
return $response_string;
}

function GetValsFromTable($Tabla, $Valor, $Visible){
$mysqli = $GLOBALS['mysqli'];
$query_FormContact_Fields = "SELECT `".$Valor."`,`".$Visible."` FROM `".$Tabla."` ORDER BY `id` ASC;";
$result_FormContact_Fields = $mysqli->query($query_FormContact_Fields);
$num_FormContact_Fields = $result_FormContact_Fields->num_rows;
$values_array = array();
if($num_FormContact_Fields >= 1){
while($row_FormContact_Fields = $result_FormContact_Fields->fetch_array(MYSQLI_ASSOC)){
$values_array[$row_FormContact_Fields[$Valor]] = $row_FormContact_Fields[$Visible];
} }
return $values_array;
}

function PrintField($Id_Form, $Slug, $Valor){
$mysqli = $GLOBALS['mysqli'];
$movil = $GLOBALS['movil'];
$query_FormContact_Fields = "SELECT * FROM `FormContact_Fields` WHERE (`id` = '$Slug' OR `Slug` = '$Slug') AND `Id_Form` = '$Id_Form' ORDER BY `id` DESC LIMIT 1;";
$result_FormContact_Fields = $mysqli->query($query_FormContact_Fields);
$num_FormContact_Fields = $result_FormContact_Fields->num_rows;
if ($num_FormContact_Fields >= 1) {
$row_FormContact_Fields = $result_FormContact_Fields->fetch_array(MYSQLI_ASSOC);
$id_input = $row_FormContact_Fields['id'];
$Slug = $row_FormContact_Fields['Slug'];
$Label = $row_FormContact_Fields['Label'];
$Placeholder = $row_FormContact_Fields['Placeholder'];
$Type = $row_FormContact_Fields['Type'];
$Value = strval($row_FormContact_Fields['Value']);
$Required = $row_FormContact_Fields['Required'];
$Order = $row_FormContact_Fields['Order'];
$class = $row_FormContact_Fields['class'];
$Extra = $row_FormContact_Fields['Extra'];
$GetVals_Table = $row_FormContact_Fields['GetVals_Table'];
if($Valor != ""){ $Value = $Valor; }

if($Required == "1") { $Required_print = "required data-bv-notempty=\"true\" data-bv-notempty-message=\"Este campo es requerido\"";
//$Required_hidden = "<input type='hidden' name='input_req[".$Slug."]' value='1'>";
$Required_label = "*"; } else {
//$Required_hidden = "<input type='hidden' name='input_req[".$Slug."]' value=''>";
}

if($Type == "text" || $Type == "email" || $Type == "number" || $Type == "tel") {
$input = <<<EOF
<input class="form-control {$Slug}" type="{$Type}" placeholder="{$Placeholder}" name="{$Slug}" id="input_{$Slug}" value="{$Value}" {$Extra} {$Required_print} />
EOF;
} else if($Type == "textarea") {
$input = <<<EOF
<textarea class="form-control {$Slug}" rows="3" placeholder="{$Placeholder}" name="{$Slug}" id="input_{$Slug}" {$Extra} {$Required_print}>{$Value}</textarea>
EOF;
} else if($Type == "select") {
$input_options = "";
$input_options = "<option value=''> - Seleccione - </option>\n";
if($GetVals_Table != ""){
$GetVals_DB_array = json_decode($GetVals_Table, true);
$GetVals_DB_Tabla = $GetVals_DB_array['Tabla']; $GetVals_DB_Valor = $GetVals_DB_array['Valor']; $GetVals_DB_Visible = $GetVals_DB_array['Visible'];
$Value_Array = GetValsFromTable($GetVals_DB_Tabla, $GetVals_DB_Valor, $GetVals_DB_Visible);
} else {
$Value_Array = json_decode($row_FormContact_Fields['Value'], true);
}
foreach($Value_Array as $item => $value){
if($item == $Value){
$input_options .= "<option value='".$item."' selected>".$value."</option>\n";
} else {
$input_options .= "<option value='".$item."'>".$value."</option>\n";
}
}
$input = <<<EOF
<select class="form-control {$Slug}" name="{$Slug}" id="input_{$Slug}" placeholder="{$Placeholder}" {$Extra} {$Required_print}>
{$input_options}</select>
EOF;
} else if($Type == "date") {
if($movil == 1) {
$input = <<<EOF
<input type="date" class="form-control {$Slug}" data-dateformat="yy-mm-dd" placeholder="{$Placeholder}" name="{$Slug}" id="input_{$Slug}" value="{$Value}" {$Extra} {$Required_print} />
EOF;
} else {
$input = <<<EOF
<input type="text" class="form-control {$Slug} datepicker" data-dateformat="yy-mm-dd" placeholder="{$Placeholder}" name="{$Slug}" id="input_{$Slug}" value="{$Value}" {$Extra} {$Required_print} />
EOF;
}
} else {
$input = <<<EOF
<input class="form-control {$Slug}" type="{$Type}" placeholder="{$Placeholder}" name="{$Slug}" id="input_{$Slug}" value="{$Value}" {$Extra} {$Required_print} />
EOF;
}

$full_input = <<<EOF

{$Required_label} {$Label}
{$Required_hidden}
{$input}

\n
EOF;
} else { $full_input = ""; }
return $full_input;
}

function GetValFromRow($Tabla, $Columna, $Valor, $Visible){
$mysqli = $GLOBALS['mysqli'];
$query_FormContact_Fields = "SELECT * FROM `".$Tabla."` WHERE `".$Columna."` = '".$Valor."' ORDER BY `id` DESC LIMIT 1;";
$result_FormContact_Fields = $mysqli->query($query_FormContact_Fields);
//$num_FormContact_Fields = $result_FormContact_Fields->num_rows;
$row_FormContact_Fields = $result_FormContact_Fields->fetch_array(MYSQLI_ASSOC);
$resultillo = $row_FormContact_Fields[$Visible];
//return $query_FormContact_Fields;
return $resultillo;
}

function Nombre_Usuario($get_current_user, $w) {
GLOBAL $mysqli;
$query_Nombre_Usuario = "SELECT * FROM `Usuarios` where `Usuario` = '".$get_current_user."' ORDER BY id DESC LIMIT 1";
$result_Nombre_Usuario = $mysqli->query($query_Nombre_Usuario);
if($result_Nombre_Usuario->num_rows >=1) {
while($row_Nombre_Usuario=$result_Nombre_Usuario->fetch_array(MYSQLI_ASSOC)) {
$GetNombre = ucwords(strtolower($row_Nombre_Usuario['Nombre']));
$GetPaterno = ucwords(strtolower($row_Nombre_Usuario['Apellido_Paterno']));
$GetMaterno = ucwords(strtolower($row_Nombre_Usuario['Apellido_Materno']));
}
if($w == ""){
return "".$GetNombre." ".$GetPaterno." ".$GetMaterno.""; } else if($w == "2"){
return "".$GetNombre." ".$GetPaterno.""; }
else if($w == "1"){ return "".$GetNombre.""; } else { return ""; }
} else { return $get_current_user; }
}

$adb_url = "https://".$firebase_app.".firebaseio.com";
$adb_option_defaults = array(
    CURLOPT_HEADER => false,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 2
);

function PostFireBase($method="GET",$uri,$querry=NULL,$json=NULL,$options=NULL){
global $adb_url,$adb_handle,$adb_option_defaults;
if(!isset($adb_handle)) $adb_handle = curl_init();
$options = array(
CURLOPT_URL => $adb_url.$uri."?print=pretty&".$querry,
CURLOPT_CUSTOMREQUEST => $method, // GET POST PUT PATCH DELETE HEAD OPTIONS
CURLOPT_POSTFIELDS => $json,
);
curl_setopt_array($adb_handle,($options + $adb_option_defaults));
//$response =  json_decode(curl_exec($adb_handle),true);
$response =  curl_exec($adb_handle);
return $response;
}

function GetEpochFromDate($Date){
$FechaHora_Evento = $Date;
$GetFechaHora_Evento = date_create_from_format('Y-m-d H:i:s', $FechaHora_Evento);
$GetFechaHora_Evento = strtotime(date_format($GetFechaHora_Evento, 'Y/m/d H:i:s'));
return $GetFechaHora_Evento;
}

function Enviar_AWS_S3($bin, $nombre, $path_bucket, $Cliente, $Tag, $ToUser, $Estatus) {
$Data_Usuario = $GLOBALS['Data_Usuario']; $Id_Cliente = $GLOBALS['Id_Cliente']; $mysqli = $GLOBALS['mysqli'];
$email_admin = $GLOBALS['email_admin']; $email_debug = $GLOBALS['email_debug'];
$aws_s3_key = $GLOBALS['aws_s3_key']; $aws_s3_secret = $GLOBALS['aws_s3_secret']; $aws_s3_bucket = $GLOBALS['aws_s3_bucket']; $aws_s3_region = $GLOBALS['aws_s3_region'];
if($aws_s3_key != "" && $aws_s3_secret != "" && $aws_s3_bucket != ""){
if($ToUser == "") { $ToUser = $Data_Usuario; }
if($Estatus == "") { $Estatus = "Pendiente"; }
if($nombre !="" && $path_bucket != "") {
$FechaHora = time();
$IP = ip();
$User_Agent = $_SERVER['HTTP_USER_AGENT'];
if($Cliente == "") { $Cliente = "default"; } else {  }
$date = date('d_m_Y_-_H_i');
if($nombre == ""){ $nombre = $Cliente."_".$ToUser."_".time(); } else {  }

require __DIR__.'/apps/aws/vendor/autoload.php';
$s3Client = new Aws\S3\S3Client([ 'version' => 'latest', 'region' => $aws_s3_region, 'credentials' => ['key' => $aws_s3_key,'secret' => $aws_s3_secret] ]);
$bucket = $aws_s3_bucket;

$temp_file =  __DIR__."/ups/".$nombre."";
file_put_contents($temp_file, $bin);
//if($path_bucket == "") { $path_bucket = ""; } else { $path_bucket_ = "/".$path_bucket; }
$result_upload = $s3Client->putObject(array(
'Bucket'     => $bucket,
'Key'        => $path_bucket."/".$nombre,
'SourceFile' => $temp_file,
'ACL'    => 'public-read',
));
//$result_json = json_encode($result_upload->getAll());
$result_url = $result_upload['ObjectURL'];
$nombre_source = $mysqli->real_escape_string($GLOBALS['Filesillo_name']);
$query_insert = "INSERT INTO `Temp_Uploads` (
`Data_Usuario`, `Usuario`, `Archivo`, `Archivo_Source`, `FechaHora`, `IP`, `User_Agent`, `Tag`, `result`, `result_url`, `Estatus`, `Path`
) VALUES (
'$Data_Usuario', '$ToUser', '$nombre', '$nombre_source', '$FechaHora', '$IP', '$User_Agent', '$Tag', '$result_json', '$result_url', '$Estatus', '$path_bucket'
)";

if($mysqli->query($query_insert)){  } else {
mail($email_debug, $_SERVER['PHP_SELF'], "\n\n".$mysqli->error."\n\n".$result_json."\n");
}
//$result_s3 = "1";
$result_s3 = $result_url;
unlink($temp_file);
} else { $result_s3 = "0"; }
return $result_s3;
}
}

function UploadGAE($Filesillos, $path){
$url_gae = $GLOBALS['url_gae']; if($url_gae != ""){
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36");
curl_setopt($ch, CURLOPT_URL, $url_gae."/upload_handler.php?modo=json&path=".$path);
curl_setopt($ch, CURLOPT_POST, true);
//same as <input type="file" name="file_box">
$post = array();
$post[] = array("modo"=>"json");
if(is_array($Filesillos)){
foreach($Filesillos as $Filesillo){
if(file_exists($Filesillo)){
$type_file = get_mimetype($Filesillo);
$post[] = array("userfile[]"=>"@".$Filesillo.";type=".$type_file);
}
}
} else {
if(file_exists($Filesillos)){
$type_file = get_mimetype($Filesillos);
$post = array("userfile[]"=>"@".$Filesillos.";type=".$type_file);
}
}
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
return $response;
}
}

function get_mimetype($file){
if (function_exists("finfo_file")){
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$mime  = finfo_file($finfo, $file);
finfo_close($finfo);
return $mime;
}
if (function_exists("mime_content_type")){
return mime_content_type($file);
}
if (!strncasecmp(PHP_OS, 'WIN', 3) == 0 && !stristr(ini_get("disable_functions"), "shell_exec")){
$file = escapeshellarg($file);
$mime = shell_exec("file -b --mime-type " . $file);
return trim($mime);
}
return false;
}

function urls_dot($input) {
$input = utf8_encode($input);
$input = mb_convert_case($input, MB_CASE_LOWER, "UTF-8");
$a = array("ñ", "á", "é", "í", "ó", "ú", "ä", "ë", "ï", "ö", "ü");
$b = array("n", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u");
$input = str_replace($a, $b, $input);
//$input = preg_replace("/[^a-zA-Z0-9]+/", "-", $input); ^([a-zA-Z0-9_\-\.]+)$
$input = preg_replace("/[^a-zA-Z0-9.]+/", "-", $input);
$input = preg_replace("/(-){2,}/", "$1", $input);
$input = trim($input, "-");
return "" . $input; // Url Amigable
}

function Permisos($Data_Usuario){
$mysqli = $GLOBALS['mysqli'];
$query_perms_user = "SELECT Usuarios.Permisos,Permisos_Perfiles.Id_Perfil,Permisos_Perfiles.Permiso FROM Usuarios INNER JOIN Permisos_Perfiles ON Usuarios.Permisos = Permisos_Perfiles.Id_Perfil WHERE Usuarios.Usuario = '".$Data_Usuario."' ORDER BY Usuarios.id DESC;";
//echo $query_perms_user;
$result_perms_user = $mysqli->query($query_perms_user);
$num_perms_users = $result_perms_user->num_rows;
$Permisos = array(); $Id_Perfil = "";
if($num_perms_users >= 1){
while ($row_perms_user = $result_perms_user->fetch_assoc()) {
$Permisos[] = $row_perms_user['Permiso'];
$Id_Perfil = $row_perms_user['Id_Perfil'];
}
$AllPermisos = array("Perfil" => $Id_Perfil, "Permisos" => $Permisos);
} else { $AllPermisos = ""; }
return $AllPermisos;
}
$Permisos = Permisos($Data_Usuario);

function GetUsuariosPermisos($Puesto){
$mysqli = $GLOBALS['mysqli'];
$query_Usuarios = "SELECT * FROM `Usuarios` WHERE `Permisos` = '".$Puesto."' ORDER BY `id` DESC;";
$result_Usuarios = $mysqli->query($query_Usuarios);
$Usuarios = array();
while($row_Usuarios = $result_Usuarios->fetch_array(MYSQLI_ASSOC)){
$Usuarios[] = $row_Usuarios['Usuario'];
}
return $Usuarios;
}

function  CheckPermisosRel($Id_Puesto, $Permiso){
$mysqli = $GLOBALS['mysqli'];
$query_Permisos_Perfiles = "SELECT * FROM `Permisos_Perfiles` WHERE `Id_Perfil` = '$Id_Puesto' AND `Permiso` = '$Permiso' ORDER BY `id` DESC;";
$result_Permisos_Perfiles = $mysqli->query($query_Permisos_Perfiles);
$num_Permisos_Perfiles = $result_Permisos_Perfiles->num_rows;
return $num_Permisos_Perfiles;
}

function PermisoDenegado($Usuario, $Permiso){
$mysqli = $GLOBALS['mysqli'];
$HTML = <<<EOF

 Lo sentimos, pero no tiene permiso para acceder a esta área.
({$Permiso})

EOF;
return $HTML;
}
?>


text:
#include "mbed.h"
#include "nanostack/socket_api.h"
#include "mesh_led_control_example.h"
#include "common_functions.h"
#include "ip6string.h"
#include "mbed-trace/mbed_trace.h"

static void init_socket();
static void handle_socket();
static void receive();
static void my_button_isr();
static void send_message();
static void blink();
static void update_state(uint8_t state);
static void handle_message(char* msg);

#define multicast_addr_str "ff15::810a:64d1"
#define TRACE_GROUP "example"
#define UDP_PORT 1234
#define MESSAGE_WAIT_TIMEOUT (30.0)
#define MASTER_GROUP 0
#define MY_GROUP 1

DigitalOut led_1(MBED_CONF_APP_LED, 1);
InterruptIn my_button(MBED_CONF_APP_BUTTON);
DigitalOut output(D3, 1);

NetworkInterface * network_if;
UDPSocket* my_socket;
// queue for sending messages from button press.
EventQueue queue;
// for LED blinking
Ticker ticker;
// Handle for delayed message send
int queue_handle = 0;

uint8_t multi_cast_addr[16] = {0};
uint8_t receive_buffer[20];
// how many hops the multicast message can go
static const int16_t multicast_hops = 10;
bool button_status = 0;

void start_mesh_led_control_example(NetworkInterface * interface){
    tr_debug("start_mesh_led_control_example()");
    MBED_ASSERT(MBED_CONF_APP_LED != NC);
    MBED_ASSERT(MBED_CONF_APP_BUTTON != NC);

    network_if = interface;
    stoip6(multicast_addr_str, strlen(multicast_addr_str), multi_cast_addr);
    init_socket();
}

static void blink() {
    led_1 = !led_1;
}

void start_blinking() {
    ticker.attach(blink, 1.0);
}

void cancel_blinking() {
    ticker.detach();
    led_1=1;
}

static void send_message() {
    tr_debug("send msg %d", button_status);

    char buf[20];
    int length;

    /**
    * Multicast control message is a NUL terminated string of semicolon separated
    * <field identifier>:<value> pairs.
    *
    * Light control message format:
    * t:lights;g:<group_id>;s:<1|0>;\0
    */
    length = snprintf(buf, sizeof(buf), "t:lights;g:%03d;s:%s;", MY_GROUP, (button_status ? "1" : "0")) + 1;
    MBED_ASSERT(length > 0);
    tr_debug("Sending lightcontrol message, %d bytes: %s", length, buf);
    SocketAddress send_sockAddr(multi_cast_addr, NSAPI_IPv6, UDP_PORT);
    my_socket->sendto(send_sockAddr, buf, 20);
    //After message is sent, it is received from the network
}

// As this comes from isr, we cannot use printing or network functions directly from here.
static void my_button_isr() {
    button_status = !button_status;
    queue.call(send_message);
}

static void update_state(uint8_t state) {
    if (state == 1) {
       tr_debug("Turning led on\n");
       led_1 = 0;
       button_status=1;
       output = 0;
       }
    else {
       tr_debug("Turning led off\n");
       led_1 = 1;
       button_status=0;
       output = 1;
   }
}

static void handle_message(char* msg) {
    // Check if this is lights message
    uint8_t state=button_status;
    uint16_t group=0xffff;

    if (strstr(msg, "t:lights;") == NULL) {
       return;
    }

    if (strstr(msg, "s:1;") != NULL) {
        state = 1;
    }
    else if (strstr(msg, "s:0;") != NULL) {
        state = 0;
    }

    // 0==master, 1==default group
    char *msg_ptr = strstr(msg, "g:");
    if (msg_ptr) {
        char *ptr;
        group = strtol(msg_ptr, &ptr, 10);
    }

    // in this example we only use one group
    if (group==MASTER_GROUP || group==MY_GROUP) {
        update_state(state);
    }
}

static void receive() {
    // Read data from the socket
    SocketAddress source_addr;
    memset(receive_buffer, 0, sizeof(receive_buffer));
    bool something_in_socket=true;
    // read all messages
    while (something_in_socket) {
        int length = my_socket->recvfrom(&source_addr, receive_buffer, sizeof(receive_buffer) - 1);
        if (length > 0) {
            int timeout_value = MESSAGE_WAIT_TIMEOUT;
            tr_debug("Packet from %s\n", source_addr.get_ip_address());
            timeout_value += rand() % 30;
            tr_debug("Advertisiment after %d seconds", timeout_value);
            queue.cancel(queue_handle);
            queue_handle = queue.call_in((timeout_value * 1000), send_message);
            // Handle command - "on", "off"
            handle_message((char*)receive_buffer);
        }
        else if (length!=NSAPI_ERROR_WOULD_BLOCK) {
            tr_error("Error happened when receiving %d\n", length);
            something_in_socket=false;
        }
        else {
            // there was nothing to read.
            something_in_socket=false;
        }
    }
}

static void handle_socket() {
    // call-back might come from ISR
    queue.call(receive);
}

static void init_socket()
{
    my_socket = new UDPSocket();
    my_socket->open(network_if);
    my_socket->set_blocking(false);
    my_socket->bind(UDP_PORT);
    my_socket->setsockopt(SOCKET_IPPROTO_IPV6, SOCKET_IPV6_MULTICAST_HOPS, &multicast_hops, sizeof(multicast_hops));

    ns_ipv6_mreq_t mreq;
    memcpy(mreq.ipv6mr_multiaddr, multi_cast_addr, 16);
    mreq.ipv6mr_interface = 0;

    my_socket->setsockopt(SOCKET_IPPROTO_IPV6, SOCKET_IPV6_JOIN_GROUP, &mreq, sizeof mreq);

    if (MBED_CONF_APP_BUTTON != NC) {
        my_button.fall(&my_button_isr);
        my_button.mode(MBED_CONF_APP_BUTTON_MODE);
    }
    //let's register the call-back function.
    //If something happens in socket (packets in or out), the call-back is called.
    my_socket->sigio(callback(handle_socket));
    // dispatch forever
    queue.dispatch();
}


text:
package es.tid.cosmos.tests.e2e

import java.io.Closeable
import java.nio.charset.Charset
import java.nio.file.{Files, StandardOpenOption}
import scala.collection.JavaConversions._
import scala.concurrent.duration._
import scala.io.Source
import scala.language.postfixOps
import scala.util.{Try, Random}

import com.typesafe.config.Config
import dispatch.{Future => _, _}
import dispatch.Defaults._
import net.liftweb.json._
import net.liftweb.json.JsonDSL._
import org.scalatest.Informer
import org.scalatest.verb.MustVerb
import org.scalatest.matchers.MustMatchers

import es.tid.cosmos.common.scalatest.matchers.FutureMatchers
import es.tid.cosmos.api.controllers.admin.RegisterUserResponse

class User(implicit info: Informer, testConfig: Config) extends Closeable
  with MustVerb with MustMatchers with Patience with FutureMatchers {

  implicit val formats = DefaultFormats

  private def cosmos = url(testConfig.getString("apiUrl"))
  private val realm = testConfig.getString("realm")
  private val realmSecret = testConfig.getString("realmSecret")
  private def userResource = (cosmos / "admin" / "v1" / "user").as_!(realm, realmSecret)
  private val restTimeout = testConfig.getInt("restTimeout").seconds

  val id = "testUser" + Random.nextInt(Int.MaxValue)
  val email = s"$id@$realm"
  val publicKey = {
    val source = Source.fromFile(System.getProperty("user.home") + "/.ssh/id_rsa.pub")
    val result = Try(source.mkString)
    source.close()
    result.get
  }

  private val registrationResponse = register()

  val apiKey = registrationResponse.apiKey
  val apiSecret = registrationResponse.apiSecret
  val handle = registrationResponse.handle
  def profileResource =
    (cosmos / "cosmos" / "v1" / "profile").as_!(apiKey, apiSecret)
  val cosmosrcPath = {
    val tempFile = Files.createTempFile(handle, "cosmosrc")
    val contents = Seq(s"""api_key: $apiKey
      |api_secret: $apiSecret
      |api_url: ${cosmos.url}/cosmos/v1/
      |ssh_command: ssh
      |ssh_key: ''""".stripMargin)

    Files.write(
      tempFile,
      contents,
      Charset.defaultCharset(),
      StandardOpenOption.WRITE
    )
    info(s"The cosmosrc path is ${tempFile.toAbsolutePath}")
    tempFile.toAbsolutePath
  }

  private def register() = {
    info(s"Starting registration for user with id $id")
    val request = userResource << compact(render(
      ("authId" -> id) ~
      ("authRealm" -> realm) ~
      ("email" -> email) ~
      ("sshPublicKey" -> publicKey)
    ))
    info(compact(render(
      ("authId" -> id) ~
        ("authRealm" -> realm) ~
        ("email" -> email) ~
        ("sshPublicKey" -> publicKey)
    )))
    val response_> = Http(request > as.String).map {
      responseBody => {
        parse(responseBody).extract[RegisterUserResponse]
      }
    }
    response_> must (runUnder(restTimeout) and eventuallySucceed)
    info(s"The user creation REST request returned 200")
    val response = response_>.value.get.get
    info(s"The username being created is ${response.handle}")
    val localUserResource =
      (cosmos/ "cosmos" / "v1" / "profile").as_!(response.apiKey, response.apiSecret)
    eventually {
      val statusCode_> = Http(localUserResource).map(_.getStatusCode)
      statusCode_> must (runUnder(restTimeout) and eventually(be(200)))
    }
    response
  }

  def delete() = {
    val unregistration = (userResource / realm / id).DELETE
    Http(unregistration > as.String) must (runUnder(restTimeout) and eventuallySucceed)
    info(s"Deletion for user $handle started")
    eventually {
      val statusCode_> = Http(profileResource).map(_.getStatusCode)
      statusCode_> must (runUnder(restTimeout) and eventually(be(401)))
      info(s"User $handle removed")
    }
    Thread.sleep((3 minutes).toMillis) // FIXME: Wait until user is removed from Infinity, etc.
  }

  override def close() = delete()
}


text:
@javax.xml.bind.annotation.XmlSchema(namespace = "http://mms.cagrid.org/MetadataModelService", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package org.cagrid.mms.wsrf.stubs;


text:
require('../../modules/es6.reflect.set');
module.exports = require('../../modules/$.core').Reflect.set;


text:
Salesforce-Test-Factory
=======================

SObject factory that can be used in unit tests to create test data.

Install as an unlocked package: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t2G000000Y19lQAC

Usage:

    // The TestFactory will pre-fill all the fields we typically need
    Account a = (Account)TestFactory.createSObject(new Account());
    insert a;

    // You can also set values to be used. Any values set in the constructor will override the defaults
    Opportunity o = (Opportunity)TestFactory.createSObject(new Opportunity(AccountId = a.Id));

    // You can also specify a specific set of overrides for different scenarios
    Account a = (Account)TestFactory.createSObject(new Account(), 'AccountDefaults');

    // Finally, get a bunch of records for testing bulk
    Account[] aList = (Account[])TestFactory.createSObjectList(new Account(), 200);

    // You can optionally insert records as created like this:
    // Note the final parameter of true.
    Account a = (Account) TestFactory.createSObject(new Account(), true);
	Contact c = (Contact) TestFactory.createSObject(new Contact(AccountID = a.Id), true);


text:
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\models\LogDeBuscas */
/* @var $form yii\widgets\ActiveForm */
?>

    <?php $form = ActiveForm::begin(); ?>

            <?= $form->field($model, 'listadiagnosticos')->dropDownList([$arrayDiagnosticos],['prompt'=>'Selecione um diagnóstico'],['style'=>'width:530px']) ?>

                <input type="checkbox" id="checkForMoreInfo" onclick="OnChangeCheckbox(this)">

                Digitar novo diagnóstico

                <?= $form->field($model, 'diagnostico')->textInput(['maxlength' => true, 'id' => '#digitar']) ?>

                    <?= $form->field($model, 'acao')->textInput(['maxlength' => true]) ?>

                <input type="checkbox" id="checkobjeto" onclick="OnChangeCheckboxObjeto(this)">

                Selecionar Objeto de Aprendizagem

                <?= $form->field($model, 'objeto')->dropDownList([$arrayDeObjeto],['prompt'=>'Selecione um objeto'],['style'=>'width:530px']) ?>

                <?= Html::submitButton($model->isNewRecord ? 'Submeter' : 'Atualizar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
                Voltar

    <?php ActiveForm::end(); ?>


text:
#include <unsupported/Eigen/EulerAngles>
#include <iostream>

using namespace Eigen;

int main()
{
  // A common Euler system by many armies around the world,
  //  where the first one is the azimuth(the angle from the north -
  //   the same angle that is show in compass)
  //  and the second one is elevation(the angle from the horizon)
  //  and the third one is roll(the angle between the horizontal body
  //   direction and the plane ground surface)
  // Keep remembering we're using radian angles here!
  typedef EulerSystem<-EULER_Z, EULER_Y, EULER_X> MyArmySystem;
  typedef EulerAngles<double, MyArmySystem> MyArmyAngles;

  MyArmyAngles vehicleAngles(
    3.14/*PI*/ / 2, /* heading to east, notice that this angle is counter-clockwise */
    -0.3, /* going down from a mountain */
    0.1); /* slightly rolled to the right */

  // Some Euler angles representation that our plane use.
  EulerAnglesZYZd planeAngles(0.78474, 0.5271, -0.513794);

  MyArmyAngles planeAnglesInMyArmyAngles(planeAngles);

  std::cout << "vehicle angles(MyArmy):     " << vehicleAngles << std::endl;
  std::cout << "plane angles(ZYZ):        " << planeAngles << std::endl;
  std::cout << "plane angles(MyArmy):     " << planeAnglesInMyArmyAngles << std::endl;

  // Now lets rotate the plane a little bit
  std::cout << "==========================================================\n";
  std::cout << "rotating plane now!\n";
  std::cout << "==========================================================\n";

  Quaterniond planeRotated = AngleAxisd(-0.342, Vector3d::UnitY()) * planeAngles;

  planeAngles = planeRotated;
  planeAnglesInMyArmyAngles = planeRotated;

  std::cout << "new plane angles(ZYZ):     " << planeAngles << std::endl;
  std::cout << "new plane angles(MyArmy): " << planeAnglesInMyArmyAngles << std::endl;

  return 0;
}


text:
package cloudcallcenter

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

import (
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)

// QueryNumber400List invokes the cloudcallcenter.QueryNumber400List API synchronously
// api document: https://help.aliyun.com/api/cloudcallcenter/querynumber400list.html
func (client *Client) QueryNumber400List(request *QueryNumber400ListRequest) (response *QueryNumber400ListResponse, err error) {
	response = CreateQueryNumber400ListResponse()
	err = client.DoAction(request, response)
	return
}

// QueryNumber400ListWithChan invokes the cloudcallcenter.QueryNumber400List API asynchronously
// api document: https://help.aliyun.com/api/cloudcallcenter/querynumber400list.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) QueryNumber400ListWithChan(request *QueryNumber400ListRequest) (<-chan *QueryNumber400ListResponse, <-chan error) {
	responseChan := make(chan *QueryNumber400ListResponse, 1)
	errChan := make(chan error, 1)
	err := client.AddAsyncTask(func() {
		defer close(responseChan)
		defer close(errChan)
		response, err := client.QueryNumber400List(request)
		if err != nil {
			errChan <- err
		} else {
			responseChan <- response
		}
	})
	if err != nil {
		errChan <- err
		close(responseChan)
		close(errChan)
	}
	return responseChan, errChan
}

// QueryNumber400ListWithCallback invokes the cloudcallcenter.QueryNumber400List API asynchronously
// api document: https://help.aliyun.com/api/cloudcallcenter/querynumber400list.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) QueryNumber400ListWithCallback(request *QueryNumber400ListRequest, callback func(response *QueryNumber400ListResponse, err error)) <-chan int {
	result := make(chan int, 1)
	err := client.AddAsyncTask(func() {
		var response *QueryNumber400ListResponse
		var err error
		defer close(result)
		response, err = client.QueryNumber400List(request)
		callback(response, err)
		result <- 1
	})
	if err != nil {
		defer close(result)
		callback(nil, err)
		result <- 0
	}
	return result
}

// QueryNumber400ListRequest is the request struct for api QueryNumber400List
type QueryNumber400ListRequest struct {
	*requests.RpcRequest
	SpecId        requests.Integer `position:"Query" name:"SpecId"`
	MonthPrice    string           `position:"Query" name:"MonthPrice"`
	OrderId       string           `position:"Query" name:"OrderId"`
	NumberCount   requests.Integer `position:"Query" name:"NumberCount"`
	LevelId       requests.Integer `position:"Query" name:"LevelId"`
	RealNameInsId requests.Integer `position:"Query" name:"RealNameInsId"`
}

// QueryNumber400ListResponse is the response struct for api QueryNumber400List
type QueryNumber400ListResponse struct {
	*responses.BaseResponse
	RequestId      string                   `json:"RequestId" xml:"RequestId"`
	Success        bool                     `json:"Success" xml:"Success"`
	Code           string                   `json:"Code" xml:"Code"`
	Message        string                   `json:"Message" xml:"Message"`
	HttpStatusCode int                      `json:"HttpStatusCode" xml:"HttpStatusCode"`
	Data           DataInQueryNumber400List `json:"Data" xml:"Data"`
}

// CreateQueryNumber400ListRequest creates a request to invoke QueryNumber400List API
func CreateQueryNumber400ListRequest() (request *QueryNumber400ListRequest) {
	request = &QueryNumber400ListRequest{
		RpcRequest: &requests.RpcRequest{},
	}
	request.InitWithApiInfo("CloudCallCenter", "2017-07-05", "QueryNumber400List", "", "")
	request.Method = requests.POST
	return
}

// CreateQueryNumber400ListResponse creates a response to parse from QueryNumber400List response
func CreateQueryNumber400ListResponse() (response *QueryNumber400ListResponse) {
	response = &QueryNumber400ListResponse{
		BaseResponse: &responses.BaseResponse{},
	}
	return
}


text:
/*
 * Created on May 4, 2003
 */
package org.apache.jmeter.engine.util;

import java.util.Map;

import org.apache.jmeter.functions.InvalidVariableException;
import org.apache.jmeter.testelement.property.FunctionProperty;
import org.apache.jmeter.testelement.property.JMeterProperty;

/**
 * Replaces a String containing functions with their Function properties equivalent, example:
 * ${__time()}_${__threadNum()}_${__machineName()} will become a FunctionProperty of
 * a CompoundVariable containing  3 functions
 */
public class ReplaceStringWithFunctions extends AbstractTransformer {
    public ReplaceStringWithFunctions(CompoundVariable masterFunction, Map<String, String> variables) {
        super();
        setMasterFunction(masterFunction);
        setVariables(variables);
    }

    @Override
    public JMeterProperty transformValue(JMeterProperty prop) throws InvalidVariableException {
        JMeterProperty newValue = prop;
        getMasterFunction().clear();
        getMasterFunction().setParameters(prop.getStringValue());
        if (getMasterFunction().hasFunction()) {
            newValue = new FunctionProperty(prop.getName(), getMasterFunction().getFunction());
        }
        return newValue;
    }

}


text:
import re
import os
import pickle
from datetime import datetime
from pprint import pprint
from yahoo_finance import Share

# The purpose of this class is to provide stock ticker's history data
# and the generic methods to deal with these data

class historical_stock_data:
    def __init__(self, ticker):
        self.name = ticker

        self.yahoo = Share(ticker)
        self.data_history_yahoo = []
        self.__update_data_history_from_yahoo()
        self.data_history_close = {}
        self.__get_history_close_from_yahoo()
        self.__add_daily_percent_change()

        self.price_data = {}
        self.dates = []

        description = "Get a stock ticker's historical data"

    def __update_data_history_from_yahoo(self):
        data_folder = "./data"
        data_ticker = data_folder + "/" + self.name + ".txt"

        start = "1950-01-01"
        # yesterday
        end = datetime.fromordinal(datetime.today().
                                   toordinal()-1).strftime("%Y-%m-%d")
        today = datetime.today().strftime("%Y-%m-%d")

        # Use ticker as filename to store historical data into a text
        # file. only update the delta up to today
        print "Update %s historical data..." % self.name

        if not os.path.exists(data_folder):
            print "The data folder %s dose not exist!" % data_folder
            print "Create %s..." % data_folder
            os.mkdir(data_folder)

        if not os.path.exists(data_ticker):
            print "Create %s historical data from yahoo..." % self.name
            self.data_history_yahoo = self.yahoo.get_historical(start, end)
            self.data_history_yahoo.reverse()
            pickle.dump(self.data_history_yahoo, open(data_ticker, "wb"))
            return

        self.data_history_yahoo = pickle.load(open(data_ticker, "rb"))

        if not self.data_history_yahoo:
            print "Cannot get history data!"
            return

        prev_date = datetime.strptime(self.data_history_yahoo[-1]["Date"],
                                      "%Y-%m-%d").strftime("%Y-%m-%d")

        if end > prev_date:
            print "Update %s data from %s to %s" % (self.name, prev_date, end)
            delta_history = self.yahoo.get_historical(prev_date, end)
            delta_history.reverse()
            self.data_history_yahoo += delta_history
            pickle.dump(self.data_history_yahoo, open(data_ticker, "wb"))
        else:
            print "Already up-to-date"

    def __get_history_close_from_yahoo(self):
        for item in self.data_history_yahoo:
            self.data_history_close[item["Date"]] = dict()
            self.data_history_close[item["Date"]]["Price"] = \
                float(item["Close"])

    def __add_daily_percent_change(self):
        prev = 0
        for key, value in sorted(self.data_history_close.items()):
            if prev == 0:
                prev = value["Price"]

            value["Change"] = (value["Price"] - prev) * 100 / prev
            prev = value["Price"]

    def print_today_price_from_yahoo(self):
        if not self.price_data:
            print "Price data is not available"
            return

        price_today = float(self.yahoo.get_price())
        prev = self.price_data[sorted(self.price_data.keys())[-1]]["Price"]
        chg = (price_today - prev) * 100 / prev
        print "%s price = %f change = %f" % (self.name, price_today, chg)

    def get_current_price_from_yahoo(self):
        return float(self.yahoo.get_price())

    def use_price_data_original(self):
        self.price_data = self.data_history_close
        self.dates = sorted(self.price_data.keys())

        print "Use original price data"

    # Remove the days that don't have significant changes in terms of
    # a threshold.
    # 1. if day 2 has a change less than < threshold, day 2 will be discarsed
    # 2. day 3's change will be updated to a new percentage relative to day 1
    # 3. if day 3 has a change less than < threshold, day 3 will be discarsed
    # 4. This process will go on
    def use_price_data_smoothed_by_percent(self, threshold):
        price_data = self.data_history_close
        prev = 0
        price_data_modified = {}

        for key, value in sorted(price_data.iteritems()):
            if prev == 0:
                prev = value["Price"]
                price_data_modified[key] = value

            chg = (value["Price"] - prev) * 100 / prev

            if abs(chg) > threshold:
                value["Change"] = chg
                prev = value["Price"]
                price_data_modified[key] = value

        self.price_data = price_data_modified
        self.dates = sorted(self.price_data.keys())

        print "Use smoothed price data"

        return

    # Group price data as up and down
    # down days are grouped in a dict follows grouped up days
    def group_data_up_down(self, start, end):
        price_data = self.price_data
        up = {}
        down = {}
        prev = 0
        history_up_down = []

        for key, value in sorted(price_data.iteritems()):
            if key < start or key > end:
                continue

            if prev == 0:
                prev = value["Price"]

            if value["Price"] < prev:
                down[key] = value
                if up:
                    history_up_down.append(up)
                    up = {}
            else:
                up[key] = value
                if down:
                    history_up_down.append(down)
                    down = {}
            prev = value["Price"]

        # take care of the last item
        if down:
            history_up_down.append(down)

        if up:
            history_up_down.append(up)

        return history_up_down

    def get_data_days_of_down(self, history_up_down, down):
        days_of_down = {}
        for item in history_up_down:
            if down == 0:
                if item[item.keys()[0]]["Change"] > 0:
                    continue
            else:
                if item[item.keys()[0]]["Change"] < 0:
                    continue

            if days_of_down.get(len(item)):
                days_of_down[len(item.keys())] += 1
            else:
                days_of_down[len(item.keys())] = 1

        return days_of_down

    def get_data_dates_of_down(self, history_up_down, down):
        dates_of_down = {}

        for item in history_up_down:

            if down == 0:
                if item[item.keys()[0]]["Change"] > 0:
                    continue
            else:
                if item[item.keys()[0]]["Change"] < 0:
                    continue

            if not dates_of_down.get(len(item.keys())):
                dates_of_down[len(item.keys())] = []
            dates_of_down[len(item.keys())].append(item)

        return dates_of_down

    def add_probability_of_up_down(self, days_of_change):
        seq = sorted(days_of_change.keys())

        for i in seq:
            total = 0
            index = seq.index(i)
            for j in seq[index::]:
                total += float(days_of_change[j])
            p = (total - days_of_change[i]) / total
            days_of_change[i] = [days_of_change[i], p]
        pprint(days_of_change)

    def round_date_to_trading_date_start(self, start):
        for key in self.dates:
            if key >= start:
                break

        return key

    def round_date_to_trading_date_end(self, end):
        for key in reversed(self.dates):
            if key <= end:
                break

        return key

    def get_trading_dates(self, start, end):
        trading_dates = []

        for item in self.dates:
            if item >= start and item <= end:
                trading_dates.append(item)

        return trading_dates

    def __calc_trading_year_start_end(self):
        dates = self.dates
        year_start_end = {}
        year_start = dates[0]
        year_last = datetime.strptime(dates[0], "%Y-%m-%d").year

        for item in dates:
            year_this = datetime.strptime(item, "%Y-%m-%d").year
            if year_this != year_last:
                year_start_end[year_last] = [year_start, year_end]
                year_last = year_this
                year_start = item
            else:
                year_end = item
        year_start_end[year_this] = [year_start, year_end]

        return year_start_end

    def __calc_annual_list(self, t_start, t_end):
        year_start_end = self.__calc_trading_year_start_end()
        y_start = datetime.strptime(t_start, "%Y-%m-%d").year
        y_end = datetime.strptime(t_end, "%Y-%m-%d").year

        annual_list = {}
        if y_start == y_end:
            annual_list[y_start] = [t_start, t_end]
        elif y_start > y_end:
            print "invalid dates!"
        else:
            for item in range(y_start, (y_end + 1)):
                if item == y_start:
                    annual_list[item] = [t_start, year_start_end[item][1]]
                elif item == y_end:
                    annual_list[item] = [year_start_end[item][0], t_end]
                else:
                    annual_list[item] = year_start_end[item]

        return annual_list

    def __calc_total_return(self, t_start, t_end):
        start_price = self.price_data[t_start]["Price"]
        end_price = self.price_data[t_end]["Price"]

        return (end_price - start_price) * 100 / start_price

    def calc_total_return(self, start, end):
        t_start = self.round_date_to_trading_date_start(start)
        t_end = self.round_date_to_trading_date_end(end)

        return self.__calc_total_return(t_start, t_end)

    def calc_annual_return(self, start, end):
        t_start = self.round_date_to_trading_date_start(start)
        t_end = self.round_date_to_trading_date_end(end)

        annual_list = self.__calc_annual_list(t_start, t_end)
        annual_return = {}

        for key, value in sorted(annual_list.iteritems()):
            annual_return[key] = self.__calc_total_return(*value)

        return annual_return

    def get_available_trading_dates(self):
        return sorted(self.data_history_close.keys())

    def get_stock_price(self, date):
        return self.data_history_close[date]["Price"]

    def print_stock_price(self, date):
        print "date %s close price %6.2f change %6.2f" % (
            date,
            self.data_history_close[date]["Price"],
            self.data_history_close[date]["Change"])

    def test(self):
        self.use_price_data_original()
        self.print_today_price_from_yahoo()
        self.use_price_data_smoothed_by_percent(1)


text:
'use strict';

module.exports = function gruntConfig(grunt) {
  grunt.option('stack', true);

  grunt.initConfig({
    csschecker: {
      dev: {
        options: {
          checkstyle: 'out/checkstyle.xml',
        },
        cssSrc: [
          'test/**/*.css',
        ],
        codeSrc: [
          'test/**/*.html',
        ],
        checks: {
          selectorLengthCheck: {
            maxLength: 4,
          },
          classUsageCheck: {
            reportAll: false,
            minUsage: 3,
          },
          classNoUsageCheck: {
          },
          declarationsDefinitionsCheck: {
            whiteList: [
              'background',
              'color',
            ],
          },
        },
      },
    },
  });

    // Actually load this plugin's task(s).
  grunt.loadTasks('tasks');

  grunt.registerTask('test', ['csschecker:dev']);
  grunt.registerTask('default', ['test']);
};


text:
#ifndef FRAMEBUFFER_H
#define FRAMEBUFFER_H

#include "glheader.h"

struct gl_config;
struct gl_context;

extern struct gl_framebuffer *
_mesa_create_framebuffer(const struct gl_config *visual);

extern struct gl_framebuffer *
_mesa_new_framebuffer(struct gl_context *ctx, GLuint name);

extern void
_mesa_initialize_window_framebuffer(struct gl_framebuffer *fb,
				     const struct gl_config *visual);

extern void
_mesa_initialize_user_framebuffer(struct gl_framebuffer *fb, GLuint name);

extern void
_mesa_destroy_framebuffer(struct gl_framebuffer *buffer);

extern void
_mesa_free_framebuffer_data(struct gl_framebuffer *buffer);

extern void
_mesa_reference_framebuffer_(struct gl_framebuffer **ptr,
                             struct gl_framebuffer *fb);

static inline void
_mesa_reference_framebuffer(struct gl_framebuffer **ptr,
                            struct gl_framebuffer *fb)
{
   if (*ptr != fb)
      _mesa_reference_framebuffer_(ptr, fb);
}

extern void
_mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
                         GLuint width, GLuint height);

extern void
_mesa_resizebuffers( struct gl_context *ctx );

extern void GLAPIENTRY
_mesa_ResizeBuffersMESA( void );

extern void
_mesa_update_draw_buffer_bounds(struct gl_context *ctx);

extern void
_mesa_update_framebuffer_visual(struct gl_context *ctx,
				struct gl_framebuffer *fb);

extern void
_mesa_update_framebuffer(struct gl_context *ctx);

extern GLboolean
_mesa_source_buffer_exists(struct gl_context *ctx, GLenum format);

extern GLboolean
_mesa_dest_buffer_exists(struct gl_context *ctx, GLenum format);

extern GLenum
_mesa_get_color_read_type(struct gl_context *ctx);

extern GLenum
_mesa_get_color_read_format(struct gl_context *ctx);

extern void
_mesa_print_framebuffer(const struct gl_framebuffer *fb);

#endif /* FRAMEBUFFER_H */


text:
var assert = require('assert');
var express = require('..');
var request = require('supertest');
var utils = require('./support/utils');

describe('res.vary()', function(){
  describe('with no arguments', function(){
    it('should not set Vary', function (done) {
      var app = express();

      app.use(function (req, res) {
        res.vary();
        res.end();
      });

      request(app)
      .get('/')
      .expect(utils.shouldNotHaveHeader('Vary'))
      .expect(200, done);
    })
  })

  describe('with an empty array', function(){
    it('should not set Vary', function (done) {
      var app = express();

      app.use(function (req, res) {
        res.vary([]);
        res.end();
      });

      request(app)
      .get('/')
      .expect(utils.shouldNotHaveHeader('Vary'))
      .expect(200, done);
    })
  })

  describe('with an array', function(){
    it('should set the values', function (done) {
      var app = express();

      app.use(function (req, res) {
        res.vary(['Accept', 'Accept-Language', 'Accept-Encoding']);
        res.end();
      });

      request(app)
      .get('/')
      .expect('Vary', 'Accept, Accept-Language, Accept-Encoding')
      .expect(200, done);
    })
  })

  describe('with a string', function(){
    it('should set the value', function (done) {
      var app = express();

      app.use(function (req, res) {
        res.vary('Accept');
        res.end();
      });

      request(app)
      .get('/')
      .expect('Vary', 'Accept')
      .expect(200, done);
    })
  })

  describe('when the value is present', function(){
    it('should not add it again', function (done) {
      var app = express();

      app.use(function (req, res) {
        res.vary('Accept');
        res.vary('Accept-Encoding');
        res.vary('Accept-Encoding');
        res.vary('Accept-Encoding');
        res.vary('Accept');
        res.end();
      });

      request(app)
      .get('/')
      .expect('Vary', 'Accept, Accept-Encoding')
      .expect(200, done);
    })
  })
})


text:
<?php

use yii\helpers\Html;
use app\components\Formatter;
?>

            <?= $pages->totalCount; ?>

问题

        <?= \yii\widgets\Menu::widget($submenu); ?>

<?php foreach ($questions as $question): ?>

    <?php if ($question->favcount > 0): ?>
    <div title="该问题有<?php echo $question->favcount; ?>用户收藏" class="favorites-count-off">

        <?php echo $question->favcount; ?>

    <?php else: ?>

    <?php endif; ?>
    <div class="question-summary narrow" id="question-summary-<?php echo $question->id; ?>">
        <div onclick="window.location.href = '<?php echo $question->url; ?>'" class="cp">

<?php echo $question->score; ?>

票

            <div class="status <?php if ($question->accepted) echo 'answered-accepted'; elseif ($question->answercount > 0) echo 'answered'; else echo 'unanswered'; ?>">

<?php echo $question->answercount; ?>

回答

<?php echo Formatter::view($question->viewcount); ?>

查看

                <?php echo Html::a(Html::encode($question->title), $question->url, array('class' => 'question-hyperlink', 'title' => Html::encode($question->title))); ?>

                <?php
                foreach (explode(' ', $question->tags) as $tag) {
                    echo Html::a($tag, array('questions/tagged', 'tag' => $tag), array('class' => 'post-tag', 'rel' => 'tag', 'title' => "显示标签 '$tag'"));
                }
                ?>

                <?php echo Html::a(Html::tag('span', Formatter::ago($question->activity), array('class' => 'relativetime', 'title' => Formatter::time($question->activity))), array('questions/view', 'id' => $question->id), array('class' => 'started-link')); ?>
                <?php echo Html::a(Html::encode($question->author->username), array('users/view', 'id' => $question->author->id)); ?>
                <?php echo $question->author->reputation; ?>

<?php endforeach; ?>
<?= yii\widgets\LinkPager::widget(['pagination' => $pages, 'options' => ['id' => 'question-pager', 'class' => 'pagination']]); ?>
<?php ?>


text:
<?php

/***********************************************************************************
 *  The MIT License (MIT)
 *
 *  Copyright © 2015 Joschi Kuphal <joschi@kuphal.net> / @jkphl
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy of
 *  this software and associated documentation files (the "Software"), to deal in
 *  the Software without restriction, including without limitation the rights to
 *  use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 *  the Software, and to permit persons to whom the Software is furnished to do so,
 *  subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 *  FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 *  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 *  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 *  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 ***********************************************************************************/

namespace App\Models;

final class Country extends AbstractModel
{
    /**
     * Relation mapping
     *
     * @var array
     */
    public static $relmap = array(
        'organizers' => '\\App\\Models\\Organizer',
        'venues'     => '\\App\\Models\\Venue',
    );
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'countries';
    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = array('organizers', 'venues');
    /**
     * The extended accessors to append to the model's array form.
     *
     * @var array
     */
    protected $extends = array('organizers', 'venues');

    /**
     * Return this country's organizers
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany      Organizers
     */
    public function getOrganizersAttribute()
    {
        $organizers = [];
        foreach ($this->organizers()->getResults() as $organizer) {
            $organizers[] = $organizer;
        }

        return $organizers;
    }

    /**
     * Return all organizers in this country
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany      Organizer
     */
    public function organizers()
    {
        return $this->hasMany('App\Models\Organizer');
    }

    /**
     * Return this country's venues
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany      Venues
     */
    public function getVenuesAttribute()
    {
        $venues = [];
        foreach ($this->venues()->getResults() as $venue) {
            $venues[] = $venue;
        }

        return $venues;
    }

    /**
     * Return all venues in this country
     *
     * @return \Illuminate\Database\Eloquent\Relations\HasMany      Venue
     */
    public function venues()
    {
        return $this->hasMany('App\Models\Venue');
    }
}


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});

var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _lodash = require('lodash');

var _lodash2 = _interopRequireDefault(_lodash);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Path = function () {
    function Path(ctx) {
        _classCallCheck(this, Path);

        this.ctx = ctx;
        this.x = ctx.x;
        this.y = ctx.y;
        this.zoom = ctx.zoom;
        this.nativePath = new Path2D();
    }

    _createClass(Path, [{
        key: '_zoom',
        value: function _zoom() {
            return _lodash2.default.map(arguments, function (val) {
                return val * this.zoom;
            }.bind(this));
        }
    }, {
        key: 'addPath',
        value: function addPath(path, transform) {
            this.nativePath.addPath(path.nativePath, transform);
        }
    }, {
        key: 'closePath',
        value: function closePath() {
            this.nativePath.closePath();
        }
    }, {
        key: 'moveTo',
        value: function moveTo(x, y) {
            var _zoom2 = this._zoom(x, y);

            var _zoom3 = _slicedToArray(_zoom2, 2);

            x = _zoom3[0];
            y = _zoom3[1];

            this.nativePath.moveTo(this.x + x, this.y + y);
        }
    }, {
        key: 'lineTo',
        value: function lineTo(x, y) {
            var _zoom4 = this._zoom(x, y);

            var _zoom5 = _slicedToArray(_zoom4, 2);

            x = _zoom5[0];
            y = _zoom5[1];

            this.nativePath.lineTo(this.x + x, this.y + y);
        }
    }, {
        key: 'bezierCurveTo',
        value: function bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
            var _zoom6 = this._zoom(cp1x, cp1y, cp2x, cp2y, x, y);

            var _zoom7 = _slicedToArray(_zoom6, 6);

            cp1x = _zoom7[0];
            cp1y = _zoom7[1];
            cp2x = _zoom7[2];
            cp2y = _zoom7[3];
            x = _zoom7[4];
            y = _zoom7[5];

            this.nativePath.bezierCurveTo(this.x + cp1x, this.y + cp1y, this.x + cp2x, this.y + cp2y, this.x + x, this.y + y);
        }
    }, {
        key: 'quadraticCurveTo',
        value: function quadraticCurveTo(cpx, cpy, x, y) {
            var _zoom8 = this._zoom(cpx, cpy, x, y);

            var _zoom9 = _slicedToArray(_zoom8, 4);

            cpx = _zoom9[0];
            cpy = _zoom9[1];
            x = _zoom9[2];
            y = _zoom9[3];

            this.nativePath.quadraticCurveTo(this.x + cpx, this.y + cpy, this.x + x, this.y + y);
        }
    }, {
        key: 'arc',
        value: function arc(x, y, radius, startAngle, endAngle, anticlockwise) {
            var _zoom10 = this._zoom(x, y, radius);

            var _zoom11 = _slicedToArray(_zoom10, 3);

            x = _zoom11[0];
            y = _zoom11[1];
            radius = _zoom11[2];

            this.nativePath.arc(this.x + x, this.y + y, radius, startAngle, endAngle, anticlockwise);
        }
    }, {
        key: 'arcTo',
        value: function arcTo(x1, y1, x2, y2, radius) {
            var _zoom12 = this._zoom(x1, y1, x2, y2, radius);

            var _zoom13 = _slicedToArray(_zoom12, 5);

            x1 = _zoom13[0];
            y1 = _zoom13[1];
            x2 = _zoom13[2];
            y2 = _zoom13[3];
            radius = _zoom13[4];

            this.nativePath.arcTo(this.x + x1, this.y + y1, this.x + x2, this.y + y2, radius);
        }
    }, {
        key: 'ellipse',
        value: function ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {
            var _zoom14 = this._zoom(x, y, radiusX, radiusY);

            var _zoom15 = _slicedToArray(_zoom14, 4);

            x = _zoom15[0];
            y = _zoom15[1];
            radiusX = _zoom15[2];
            radiusY = _zoom15[3];

            this.nativePath.ellipse(this.x + x, this.y + y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
        }
    }, {
        key: 'rect',
        value: function rect(x, y, width, height) {
            var _zoom16 = this._zoom(x, y, width, height);

            var _zoom17 = _slicedToArray(_zoom16, 4);

            x = _zoom17[0];
            y = _zoom17[1];
            width = _zoom17[2];
            height = _zoom17[3];

            this.nativePath.rect(this.x + x, this.y + y, width, height);
        }
    }]);

    return Path;
}();

exports.default = Path;
//# sourceMappingURL=Path.js.map


text:
START_ATF_NAMESPACE
    namespace Detail
    {
        extern ::std::array<hook_record, 3> _guild_member_download_zocl_functions;
    }; // end namespace Detail
END_ATF_NAMESPACE