text:
using System;
using System.Linq.Expressions;

namespace UnitTestGenerator
{
    /// <summary>
    /// Provides methods which provides source code construction elements (like variable names, built expressions, etc.) in a process of building source code.
    /// </summary>
    public interface ITestMethodValueProvider
    {
        /// <summary>
        /// Returns true when <paramref name="testedInstanceType"/> is registered and therefore instance creation expression should not be created, otherwise returns false.
        /// </summary>
        /// <param name="testedInstanceType">The tested type.</param>
        /// <param name="variableName">When returns true, contains the name of variable which was registered, otherwise is set to null.</param>
        /// <returns>True when <paramref name="testedInstanceType"/> is registered, otherwise false.</returns>
        bool HasVariableForTestedType(Type testedInstanceType, out string variableName);

        /// <summary>
        /// Returns true when the registered expression for an argument type should be used instead of generated expression. Registered expression is returned as <paramref name="argumentExpression"/>.
        /// </summary>
        /// <param name="argumentType">The registered argument type.</param>
        /// <param name="argumentExpression">When returns true, contains the registered expression, otherwise the value is null.</param>
        /// <returns>True when the expression of a registered argument type should be used instead of generated expression.</returns>
        bool HasExpressionForArgument(Type argumentType, out Expression argumentExpression);
    }
}


text:
<?php
declare(strict_types = 1);

namespace Innmind\Neo4j\ONM\Event;

use Innmind\Neo4j\ONM\Identity;
use Innmind\Immutable\Map;

final class EntityAboutToBeUpdated
{
    private Identity $identity;
    private object $entity;
    /** @var Map<string, mixed> */
    private Map $changeset;

    /**
     * @param Map<string, mixed> $changeset
     */
    public function __construct(
        Identity $identity,
        object $entity,
        Map $changeset
    ) {
        $this->identity = $identity;
        $this->entity = $entity;
        $this->changeset = $changeset;
    }

    public function identity(): Identity
    {
        return $this->identity;
    }

    public function entity(): object
    {
        return $this->entity;
    }

    /**
     * @return Map<string, mixed>
     */
    public function changeset(): Map
    {
        return $this->changeset;
    }
}

redpajama_set_name: RedPajamaGithub


text:
class RemoveIndexesFromWebmastersCmsPagesForRenameForRails51 < ActiveRecord::Migration[5.1]
  def up
    change_table do |t|
      t.remove_index :name => "index_webmasters_cms_pages_on_rgt"
      t.remove_index :name => "index_webmasters_cms_pages_on_lft"
      t.remove_index :name => "index_webmasters_cms_pages_on_parent_id"
      t.remove_index :name => "index_webmasters_cms_pages_on_is_meta"
    end
  end

  def down
    change_table do |t|
      t.index [:rgt],
        :unique => false,
        :name => "index_webmasters_cms_pages_on_rgt"
      t.index [:lft],
        :unique => false,
        :name => "index_webmasters_cms_pages_on_lft"
      t.index [:parent_id],
        :unique => false,
        :name => "index_webmasters_cms_pages_on_parent_id"
      t.index [:is_meta],
        :unique => false,
        :name => "index_webmasters_cms_pages_on_is_meta"
    end
  end

  private
  def change_table(&block)
    super :webmasters_cms_pages, &block
  end
end


text:
// ====================================================================================================================
//   Copyright (c) 2012 IdeaBlade
// ====================================================================================================================
//   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.
// ====================================================================================================================
//   USE OF THIS SOFTWARE IS GOVERENED BY THE LICENSING TERMS WHICH CAN BE FOUND AT
//   http://cocktail.ideablade.com/licensing
// ====================================================================================================================

using Cocktail;
using DomainModel;
using DomainServices.Services;

namespace DomainServices
{
  public interface IAccoBookingUnitOfWork : IUnitOfWork
  {
    // Factories
    IFactory<SystemGroup> SystemGroupFactory { get; }
    IFactory<SystemCode> SystemCodeFactory { get; }
    IFactory<Sequence> SequenceFactory { get; }
    IFactory<Acco> AccoFactory { get; }
    IFactory<AccoReminder> AccoReminderFactory { get; }
    IFactory<AccoAddition> AccoAdditionFactory { get; }
    IFactory<AccoAdditionDescription> AccoAdditionDescriptionFactory { get; }
    IFactory<AccoCancelCondition> AccoCancelConditionFactory { get; }
    IFactory<Country> CountryFactory { get; }
    IFactory<Currency> CurrencyFactory { get; }
    IFactory<Language> LanguageFactory { get; }
    IFactory<MailTemplate> MailTemplateFactory { get; }
    IFactory<AccoOwner> AccoOwnerFactory { get; }
    IFactory<AccoPayPattern> AccoPayPatternFactory { get; }
    IFactory<AccoPayPatternPayment> AccoPayPatternPaymentFactory { get; }
    IFactory<AccoRent> AccoRentFactory { get; }
    IFactory<AccoSeason> AccoSeasonFactory { get; }
    IFactory<AccoTrustee> AccoTrusteeFactory { get; }
    IFactory<AccoSpecialOffer> AccoSpecialOfferFactory { get; }
    IFactory<AccoNotification> AccoNotificationFactory { get; }
    IFactory<Booking> BookingFactory { get; }
    IFactory<BookingGuest> BookingGuestFactory { get; }
    IFactory<BookingAddition> BookingAdditionFactory { get; }
    IFactory<BookingReminder> BookingReminderFactory { get; }
    IFactory<BookingPayment> BookingPaymentFactory { get; }
    IFactory<BookingCancelCondition> BookingCancelConditionFactory { get; }

    // Repositories
    IRepository<SystemGroup> SystemGroups { get; }
    IRepository<SystemCode> SystemCodes { get; }
    IRepository<Sequence> Sequences { get; }
    IRepository<Acco> Accoes { get; }
    IRepository<AccoReminder> AccoReminders { get; }
    IRepository<AccoAddition> AccoAdditions { get; }
    IRepository<AccoAdditionDescription> AccoAdditionDescriptions { get; }
    IRepository<AccoCancelCondition> AccoCancelConditions { get; }
    IRepository<Country> Countries { get; }
    IRepository<Currency> Currencies { get; }
    IRepository<Language> Languages { get; }
    IRepository<MailTemplate> MailTemplates { get; }
    IRepository<AccoOwner> AccoOwners { get; }
    IRepository<AccoPayPattern> AccoPayPatterns { get; }
    IRepository<AccoPayPatternPayment> AccoPayPatternPayments { get; }
    IRepository<AccoRent> AccoRents { get; }
    IRepository<AccoSeason> AccoSeasons { get; }
    IRepository<AccoTrustee> AccoTrustees { get; }
    IRepository<AccoSpecialOffer> AccoSpecialOffers { get; }
    IRepository<AccoNotification> AccoNotifications { get; }
    IRepository<Booking> Bookings { get; }
    IRepository<BookingGuest> BookingGuests { get; }
    IRepository<BookingAddition> BookingAdditions { get; }
    IRepository<BookingReminder> BookingReminders { get; }
    IRepository<BookingPayment> BookingPayments { get; }
    IRepository<BookingCancelCondition> BookingCancelConditions { get; }

    // Services
    ISystemGroupSearchService SystemGroupSearchService { get; }
    ISystemCodeSearchService SystemCodeSearchService { get; }
    ISequenceSearchService SequenceSearchService { get; }
    IAccoSearchService AccoSearchService { get; }
    IAccoReminderSearchService AccoReminderSearchService { get; }
    IAccoAdditionSearchService AccoAdditionSearchService { get; }
    IAccoAdditionDescriptionSearchService AccoAdditionDescriptionSearchService { get; }
    IAccoCancelConditionSearchService AccoCancelConditionSearchService { get; }
    ICountrySearchService CountrySearchService { get; }
    ICurrencySearchService CurrencySearchService { get; }
    ILanguageSearchService LanguageSearchService { get; }
    IMailTemplateSearchService MailTemplateSearchService { get; }
    IAccoOwnerSearchService AccoOwnerSearchService { get; }
    IAccoPayPatternSearchService AccoPayPatternSearchService { get; }
    IAccoPayPatternPaymentSearchService AccoPayPatternPaymentSearchService { get; }
    IAccoRentSearchService AccoRentSearchService { get; }
    IAccoSeasonSearchService AccoSeasonSearchService { get; }
    IAccoTrusteeSearchService AccoTrusteeSearchService { get; }
    IAccoSpecialOfferSearchService AccoSpecialOfferSearchService { get; }
    IAccoNotificationSearchService AccoNotificationSearchService { get; }
    IBookingSearchService BookingSearchService { get; }
    IBookingGuestSearchService BookingGuestSearchService { get; }
    IBookingAdditionSearchService BookingAdditionSearchService { get; }
    IBookingReminderSearchService BookingReminderSearchService { get; }
    IBookingPaymentSearchService BookingPaymentSearchService { get; }
    IBookingCancelConditionSearchService BookingCancelConditionSearchService { get; }
    IBookingPaymentToDoSearchService BookingPaymentToDoSearchService { get; }
    IBookingReminderToDoSearchService BookingReminderToDoSearchService { get; }
    IBookingExpiredToDoSearchService BookingExpiredToDoSearchService { get; }
    IPayPatternToDoSearchService PayPatternToDoSearchService { get; }
    ILicenseExpiredToDoSearchService LicenseExpiredToDoSearchService { get; }

    // @@@ JKT named query
    IRepository<Booking> ExpiredBookings { get; }
  }
}


text:
package org.apache.cassandra.db;

import java.io.DataInputStream;
import java.io.IOException;
import java.net.InetAddress;

import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.heartbeat.readhandler.ReadHandler;
import org.apache.cassandra.heartbeat.status.StatusMap;
import org.apache.cassandra.io.util.FastByteArrayInputStream;
import org.apache.cassandra.net.CompactEndpointSerializationHelper;
import org.apache.cassandra.net.IVerbHandler;
import org.apache.cassandra.net.MessageIn;
import org.apache.cassandra.net.MessageOut;
import org.apache.cassandra.net.MessagingService;
import org.apache.cassandra.tracing.Tracing;
import org.apache.cassandra.utils.keyvaluestore.ConfReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MutationVerbHandler implements IVerbHandler<Mutation>
{
    private static final Logger logger = LoggerFactory.getLogger(MutationVerbHandler.class);

    public void doVerb(MessageIn<Mutation> message, int id)
    {
        try
        {
            // Check if there were any forwarding headers in this message
            byte[] from = message.parameters.get(Mutation.FORWARD_FROM);
            InetAddress replyTo;
            if (from == null)
            {
                replyTo = message.from;
                byte[] forwardBytes = message.parameters.get(Mutation.FORWARD_TO);
                if (forwardBytes != null)
                    forwardToLocalNodes(message.payload, message.verb, forwardBytes, message.from);
            }
            else
            {
                replyTo = InetAddress.getByAddress(from);
            }

            message.payload.apply();

            if(ConfReader.instance.heartbeatEnable()) {
            	if(message.payload!=null) {
                	// Update multi dc status map
                    String dcName = DatabaseDescriptor.getEndpointSnitch().getDatacenter(message.from);
                    StatusMap.instance.removeEntry(dcName, message.payload);

                    // Notify read subscription
                    ReadHandler.instance.notifySubscription(message.payload);

                    if(message.payload.getKeyspaceName().equals("demo")){
                		logger.info("Mutation: {}", this.toString());
                	}
            	}else {
            		logger.error("MutationVerbHandler::doVerb, mutation is null");;
            	}
            }
            WriteResponse response = new WriteResponse();
            Tracing.trace("Enqueuing response to {}", replyTo);
            MessagingService.instance().sendReply(response.createMessage(), id, replyTo);
        }
        catch (IOException e)
        {
            logger.error("Error in mutation", e);
        }
    }

    /**
     * Older version (< 1.0) will not send this message at all, hence we don't
     * need to check the version of the data.
     */
    private void forwardToLocalNodes(Mutation mutation, MessagingService.Verb verb, byte[] forwardBytes, InetAddress from) throws IOException
    {
        DataInputStream in = new DataInputStream(new FastByteArrayInputStream(forwardBytes));
        int size = in.readInt();

        // tell the recipients who to send their ack to
        MessageOut<Mutation> message = new MessageOut<>(verb, mutation, Mutation.serializer).withParameter(Mutation.FORWARD_FROM, from.getAddress());
        // Send a message to each of the addresses on our Forward List
        for (int i = 0; i < size; i++)
        {
            InetAddress address = CompactEndpointSerializationHelper.deserialize(in);
            int id = in.readInt();
            Tracing.trace("Enqueuing forwarded write to {}", address);
            MessagingService.instance().sendOneWay(message, id, address);
        }
    }
}


text:
package org.carrot2.workbench.core.ui.widgets;

import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.ScrollBar;
import org.eclipse.ui.forms.widgets.SharedScrolledComposite;

/**
 * Custom extension of {@link SharedScrolledComposite} that adds
 * proper behavior for horizontal scrollbar.
 */
public final class CScrolledComposite extends SharedScrolledComposite
{
    public CScrolledComposite(Composite parent, int style)
    {
        super(parent, style);
        this.setDelayedReflow(false);
    }

    /**
     * On reflow, update both vertical and horizontal scroller (for some reason the
     * horizontal one is neglected in current version of Eclipse).
     */
    @Override
    public void reflow(boolean flushCache)
    {
        super.reflow(flushCache);

        final ScrollBar hbar = getHorizontalBar();
        if (hbar != null)
        {
            final Rectangle clientArea = getClientArea();
            final int increment = Math.max(clientArea.width - 5, 5);
            hbar.setPageIncrement(increment);
        }
    }
}


text:
<?php
namespace DingTalk\Media;
use DingTalk\Token\AccessToken;
use DingTalk\Util\Config;
use Unirest\Request\Body;
use Unirest\Request;

class Media
{
    /**
     * 上传媒体文件
     * @param string $media_type 媒体文件类型 分别有image,voice,file
     * @param string $media_path
     * @return boolean|mixed
     * 成功数据如下
     * array(5) {
     *     ["created_at"] => int(1482738460913)
     *     ["errcode"] => int(0)
     *     ["errmsg"] => string(2) "ok"
     *     ["media_id"] => string(17) "@lALOld1l6MzyzQJr"
     *     ["type"] => string(5) "image"
     *   }
     */
    public static function media_upload($media_type,$media_path)
    {
        $ddconfig              = Config::getConfig();
        $access_token          = AccessToken::getAccessToken();
        $queryUrl 			       = $ddconfig['media_upload'];
        $param["access_token"] = AccessToken::getAccessToken();
        $param['type'] 		     = $media_type;

        $headers               = array('Accept' => 'application/json');
        $files                 = array('media' => realpath($media_path));
        $body                  = Body::Multipart($param,$files);
        $response              = Request::post($queryUrl, $headers, $body);
        $result                = json_decode($response->raw_body,true);
        return $result;
    }
}
?>


text:
package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// PatchDocument A JSONPatch document as defined by RFC 6902
//
// swagger:model patchDocument
type PatchDocument struct {

	// A JSON-pointer
	From string `json:"from,omitempty"`

	// The operation to be performed
	// Example: \"replace\
	// Required: true
	Op *string `json:"op"`

	// A JSON-pointer
	// Example: \"/name\
	// Required: true
	Path *string `json:"path"`

	// The value to be used within the operations
	Value interface{} `json:"value,omitempty"`
}

// Validate validates this patch document
func (m *PatchDocument) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateOp(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validatePath(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *PatchDocument) validateOp(formats strfmt.Registry) error {

	if err := validate.Required("op", "body", m.Op); err != nil {
		return err
	}

	return nil
}

func (m *PatchDocument) validatePath(formats strfmt.Registry) error {

	if err := validate.Required("path", "body", m.Path); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this patch document based on context it is used
func (m *PatchDocument) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *PatchDocument) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *PatchDocument) UnmarshalBinary(b []byte) error {
	var res PatchDocument
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}


text:
<idea-plugin>
  <id>com.my.plugin</id>
  <extensionPoints>
    <extensionPoint name="myExtension" interface="ExtensionPoint"/>
  </extensionPoints>

  <extensions defaultExtensionNs="com.my.plugin">
      <myExtension implementation="MyExtensionPoint"/>
  </extensions>
</idea-plugin>


text:
/*
 Accordion Gallery
 Ghinda - Cristian Colceriu
 www.ghinda.net

 v1.0 - 7:40 PM 11/8/2010
 */
jQuery.support.transition = function () {
    var a = (document.body || document.documentElement).style;
    return a.WebkitTransition !== undefined || a.MozTransition !== undefined || a.OTransition !== undefined || a.transition !== undefined
}();
(function (a) {
    a.fn.accordionGallery = function (b) {
        b = a.extend({theme:"air", maxHeight:360, scrollSpeed:2E3, minSliceWidth:100, maxSliceWidth:500, maxSliceHeight:480}, b);
        b.maxHeight = parseInt(b.maxHeight);
        b.scrollSpeed = parseInt(b.scrollSpeed);
        b.minSliceWidth = parseInt(b.minSliceWidth);
        b.maxSliceWidth = parseInt(b.maxSliceWidth);
        b.maxSliceHeight = parseInt(b.maxSliceHeight);
        return this.each(function () {
            var r = a(this), v = r.find("section");
            r.addClass("accordiongallery " + b.theme);
            v.each(function () {
                var c = a(this);
                c.attr({"aria-live":"assertive",
                    "aria-atomic":"true", relevant:"additions"});
                var e = function () {
                    var g = c.find("a");
                    g.wrapAll('
');
                    var f = a(".accordiongallery-thumbs", c), q = function () {
                        e.$scroller.stop()
                    }, m = function () {
                        e.$scroller.stop().animate({top:0}, b.scrollSpeed)
                    }, d = function () {
                        e.$scroller.stop().animate({top:b.maxHeight - e.$scroller.height()}, b.scrollSpeed)
                    };
                    if (f.height() > b.maxHeight) {
                        f.height(b.maxHeight).wrapInner('
');
                        var h = a(".accordiongallery-scroller",
                            c);
                        f.before('Scroll up').after('Scroll down');
                        var k = a(".accordiongallery-scrollup", c);
                        k.hover(m, q);
                        var l = a(".accordiongallery-scrolldown", c);
                        l.hover(d, q)
                    }
                    var i;
                    setTimeout(function () {
                        i = c.height();
                        c.css("height", i);
                        c.attr("data-originalheight", i)
                    }, 100);
                    setTimeout(function () {
                        jQuery.support.transition && c.addClass("agtransitions")
                    }, 200);
                    return{$scroller:h, $container:f, $scrollup:k, $scrolldown:l, $items:g}
                }(), u = function () {
                    var g =
                        v.not(c), f = {}, q = function () {
                        var d = new Image;
                        d.src = f.url;
                        var h = '';
                        var k = '
';

                        var has_url_data = 0;
                        if(f.data)
                        {
                            k += '';
                            has_url_data = 1;
                        }
                        if (f.title)
                        {
                            k += f.title;
                        }
                        if(has_url_data == 1)
                        {
                            k += "";
                        }
                        k += "
";
                        var l = 'Scroll left

';
                        l += e.$scroller ? e.$scroller.html() : e.$container.html();
                        l += '

Scroll right';
                        h += k + l;
                        h = '
Loading...

' + h + "
";
                        c.append(h);
                        var i = a(".accordiongallery-preview", c), s = a(".accordiongallery-loader", c);
                        h = a(".accordiongallery-scrollleft", i);
                        k = a(".accordiongallery-scrollright", i);
                        var t = a(".accordiongallery-preview-thumbs", i);
                        l = a("a", t);
                        var o = a(".accordiongallery-active-image", i), p = a(".image-caption", i);
                        p.text() || p.hide();
                        var n = a(".accordiongallery-preview-scroller",
                            i), w = n.find("a").outerWidth(true) * n.find("a").length;
                        n.width(w);
                        var x = function (j) {
                            s.css({visibility:"hidden", opacity:0});
                            i.css({visibility:"visible", opacity:1});
                            if (j == true) {
                                o.css("width", "100%");
                                o.attr("alt", "Error loading image. Please try refreshing. ")
                            }
                        };
                        d.onload = function () {
                            x(false)
                        };
                        d.onerror = function () {
                            x(true)
                        };
                        d.src = f.url;
                        e.$container.hide();
                        if (e.$scrollup) {
                            e.$scrollup.hide();
                            e.$scrolldown.hide()
                        }
                        if (w > t.width()) {
                            d = function () {
                                n.stop()
                            };
                            h.hover(function () {
                                    n.stop().animate({left:0}, b.scrollSpeed)
                                },
                                d);
                            k.hover(function () {
                                n.stop().animate({left:t.outerWidth() - n.outerWidth()}, b.scrollSpeed)
                            }, d);
                            h.css("visibility", "visible");
                            k.css("visibility", "visible")
                        }
                        l.click(function () {
                            s.css({visibility:"visible", opacity:1});
                            var j = new Image;
                            j.title = a(this).attr("title");
                            var data = a(this).attr("data");
                            var y = function (z) {
                                if (z == true) {
                                    o.css("width", "100%");
                                    o.attr("alt", "Error loading image. Please try refreshing. ")
                                } else {
                                    o.attr({src:j.src, title:j.title, alt:j.title});
                                    if (j.title) {
                                        p.show();
                                        if(data != "")
                                        {
                                            p.html("" + j.title + "");
                                        }else
                                        {
                                            p.html(j.title);
                                        }
                                    } else p.hide()
                                }
                                s.css({visibility:"hidden",
                                    opacity:0})
                            };
                            j.onload = function () {
                                y(false)
                            };
                            j.onerror = function () {
                                y(true)
                            };
                            j.src = a(this).attr("href");
                            return false
                        })
                    }, m;
                    return{init:function () {
                        c.find("a:has(img)").click(u.open);
                        setTimeout(function () {
                            m = c.width()
                        }, 100)
                    }, open:function () {
                        f.url = a(this).attr("href");
                        f.title = a(this).attr("title");
                        f.data = a(this).attr("data");
                        var d = a(".active-section", r);
                        if (d) {
                            a(".accordiongallery-preview", d).hide(0, function () {
                                a(this).remove()
                            });
                            a(".accordiongallery-loader", d).hide(0, function () {
                                a(this).remove()
                            });
                            a(".accordiongallery-thumbs", d).fadeIn(500);
                            a(".accordiongallery-scrollup", d).fadeIn(500);
                            a(".accordiongallery-scrolldown", d).fadeIn(500)
                        }
                        g.removeClass("active-section").addClass("inactive-section");
                        c.addClass("active-section").removeClass("inactive-section");
                        if (jQuery.support.transition) {
                            c.css({width:b.maxSliceWidth, height:b.maxSliceHeight});
                            g.each(function () {
                                a(this).css({width:b.minSliceWidth, height:a(this).attr("data-originalheight") * 1})
                            })
                        } else {
                            c.stop().animate({width:b.maxSliceWidth, height:b.maxSliceHeight}, 300);
                            g.each(function () {
                                a(this).stop().animate({width:b.minSliceWidth,
                                    height:a(this).attr("data-originalheight")}, 300)
                            })
                        }
                        $startedLoader = a(".accordiongallery-loader", g);
                        $startedLoader.css({visibility:"hidden", opacity:0});
                        c.unbind("click");
                        g.click(u.close);
                        q();
                        return false
                    }, close:function () {
                        a(".accordiongallery-preview", c).hide(0, function () {
                            a(this).remove()
                        });
                        e.$container.fadeIn(700);
                        if (e.$scrollup) {
                            e.$scrollup.fadeIn(700);
                            e.$scrolldown.fadeIn(700)
                        }
                        g.removeClass("inactive-section");
                        c.removeClass("active-section");
                        if (jQuery.support.transition) {
                            c.css({width:m, height:c.attr("data-originalheight") *
                                1});
                            g.each(function () {
                                a(this).css({width:m, height:a(this).attr("data-originalheight") * 1})
                            })
                        } else {
                            c.stop().animate({width:m, height:c.attr("data-originalheight")}, 300);
                            g.each(function () {
                                a(this).stop().animate({width:m, height:a(this).attr("data-originalheight")}, 300)
                            })
                        }
                        g.unbind("click")
                    }}
                }();
                u.init()
            })
        })
    }
})(jQuery);


text:
<?php

/**
 * The reconstructed flaggable behavior adds an extra column to each column specified in its parameters.
 * Additionally, getters and setters are generated that allow polling the flaggable and flagged attributes of a database record.
 *
 * !! IMPORTANT:
 * When specifying multiple columns, use parameter names in the form of
 *  <parameter name="column1" value="year"/>
 *  <parameter name="column2" value="title"/>
 * because multiple parameters with the same name are ignored, except for the last.
 *
 * The template code for the php methods to generate is located in templates/reconstructedFlaggableObjectMethods.php
 *
 * @author Carl Witt
 */
class ReconstructedFlaggableBehavior extends Behavior {

    // to generate the name of the database column from the attribute
    public static $flagColumnSuffix = "_is_reconstructed";
    // to generate the name of the accessor functions
    public static $phpFlagColumnSuffix = "IsReconstructed";

    // default parameters value
    protected $parameters = array(
            // use column1, column2, column3 to identify the columns that shall be flaggable
    );

    /**
     * The PHP names of the columns of the base object which are now flaggable, i.e. for which a flag column has been created.
     */
    protected $flaggableColumns = array();

    /* Constructor-like method */
    public function modifyTable() {
        $table = $this->getTable();

        // multiple column can be specified as flaggable
        foreach ($this->getParameters() as $key => $forColumn) {

            // check whether the parameter starts with the "column" prefix
            if (!strncmp($key, "column", strlen("column"))) {

                // check whether the column that shall be flaggable exists
                if (!$table->containsColumn($forColumn))
                    throw new InvalidArgumentException(sprintf(
                                    'The column \'%s\' referenced by the parameter \'%s\' in the reconstructed_flaggable behavior of table \'%s\' doesn\'t exist. ', $forColumn, $key, $table->getName()));

                // generate the additional column name
                $flagColumn = $forColumn . ReconstructedFlaggableBehavior::$flagColumnSuffix;

                // check whether the user has defined an own, customized column for this, otherwise create it
                if (!$table->containsColumn($flagColumn))  // this refers to the table as defined in the schema, not in the DB
                    $table->addColumn(array(
                        'name' => $flagColumn,
                        'type' => "BOOLEAN",
                        'required' => "false",
                        'defaultValue' => "false"
                    ));

                // remember that this column is now flaggable
                $this->flaggableColumns[] = $table->getColumn($forColumn)->getPhpName();

            }//if key starts with column
        }//for each parameter
    }

    public function objectMethods($builder) {
        return $this->renderTemplate('reconstructedFlaggableObjectMethods', array(
            'flaggableColumns' => $this->flaggableColumns,
            'flagColumnSuffix' => ReconstructedFlaggableBehavior::$flagColumnSuffix,
            'phpFlagColumnSuffix' => ReconstructedFlaggableBehavior::$phpFlagColumnSuffix,
        ));
    }

    // add interface implementation declaration
    public function objectFilter(&$script) {
        $pattern = '/abstract class (\w+) extends (\w+) implements (\w+)/i';
        $replace = 'abstract class ${1} extends ${2} implements ${3}, \DTA\MetadataBundle\Model\reconstructed_flaggable\ReconstructedFlaggableInterface';
        $script = preg_replace($pattern, $replace, $script);
    }

}

?>


text:
"""Building and querying a library of stellar population models in
MongoDB/HDF5.
"""

import socket
import os
import multiprocessing
import datetime
import cPickle as pickle

import pytz
import pymongo
import numpy as np
import tables  # HDF5
import matplotlib.mlab as mlab

from bson.binary import Binary
from pymongo.son_manipulator import SONManipulator

from sp_params import ParameterSet
from sp_params import get_metallicity_LUT
from sp_params import FILTER_LIST

from parsers import SpecParser

import fsps  # f2py wrapper to FSPS

class FSPSLibrary(object):
    """For building/accessing a library of FSPS stellar population models.

    FSPSLibrary is itself an interface for the PyMongo database that stores
    model parameters and realizations from the FSPS code.
    """
    def __init__(self, libname, dbname="fsps"):
        super(FSPSLibrary, self).__init__()
        self.libname = libname
        self.dbname = dbname

        connection = pymongo.Connection()
        self.host = connection.host
        self.port = connection.port
        self.db = connection[self.dbname]
        self.db.add_son_manipulator(NumpySONManipulator())
        self.collection = self.db[self.libname]

    def register_pset(self, pset):
        """Adds a ParameterSet to the collection of model definitions."""
        self.remove_existing_model(pset.name)
        doc = {"_id": pset.name, "pset": pset.get_doc(),
            "compute_started": False, "compute_complete": False}
        self.collection.insert(doc)

    def compute_models(self, nThreads=1, maxN=10, compute_vega_mags=0,
            redshift_colors=0, imf_type=0, imf1=1.3, imf2=2.3, imf3=2.3,
            vdmc=0.08, mdave=0.5, dell=0., delt=0., sbss=0., fbhb=0., pagb=1.):
        """Fire up FSPS to generate SP models, assuming a common ssp set with
        common IMF and isochrone modifications.

        Parameters
        ----------
        nThreads : int, optional
            Number of processes to be spawned, for multiprocessing. If set
            to `1`, multiprocessing is not used; useful for debugging.
        maxN : int, optional
            Maximum number of jobs that can be given to a single
            `fspsq` process.
        compute_vega_mags : int, optional
            Set to 1 to produce magnitudes in vega system, 0 for AB (default)
            Note: this overrides any setting in the parameter sets
        redshift_colors : int, optional
            Set to 0 to leave colours in rest frame
        """
        queue_runner = QueueRunnerIsoSSP(self.libname, self.dbname, self.host,
                self.port, maxN, compute_vega_mags=compute_vega_mags,
                redshift_colors=redshift_colors,
                imf_type=imf_type, imf1=imf1, imf2=imf2, imf3=imf3,
                vdmc=vdmc, mdave=mdave, dell=dell, delt=delt, sbss=sbss,
                fbhb=fbhb, pagb=pagb)
        nodeNames = [str(i) for i in xrange(1, nThreads + 1)]
        if nThreads > 1:
            pool = multiprocessing.Pool(processes=nThreads)
            pool.map(queue_runner, nodeNames)
        else:
            map(queue_runner, nodeNames)

    def reset(self):
        """Drop (delete) the library.

        The collection member is reinstantiated. This allows the collection
        to be freshly re-populated with models.
        """
        self.db.drop_collection(self.libname)
        self.collection = self.db[self.libname]

    def remove_existing_model(self, modelName):
        """Delete a model, by name, if it exists."""
        if self.collection.find_one({"_id": modelName}) is not None:
            self.collection.remove({"_id": modelName})

    def count_models(self):
        return self.collection.find({}).count()

    def create_table(self, outputPath, query={}, tage=None,
            isocType="pdva", specType="basel", clobber=True):
        """Create an HDF5 table that combines outputs from models
        in the library.
        """
        query.update({"compute_complete": True,
            "np_data": {"$exists": 1}})
        docs = self.collection.find(query)  # , limit=2
        print "working on %i docs to read" % docs.count()
        lut = get_metallicity_LUT(isocType, specType)
        # TODO need to generalize definition of columns. A user ought to
        # be able to use any pset columns, any set of mags, and the spectra
        #magNames = ['TMASS_J','TMASS_H','TMASS_Ks','MegaCam_u','MegaCam_g',
        #        'MegaCam_r','MegaCam_i','MegaCam_z','GALEX_NUV','GALEX_FUV']
        magCols = [(s, np.float,) for (i, s, c) in FILTER_LIST]
        #magCols = [(s,np.float) for s in magNames]
        psetCols = [('dust_type', np.int), ('imf_type', np.int),
                ('sfh', np.int), ('tau', np.float), ('const', np.float),
                ('sf_start', np.float), ('fburst', np.float),
                ('tburst', np.float), ('dust_tesc', np.float),
                ('dust1', np.float), ('dust2', np.float),
                ('frac_nodust', np.float)]
        sfhCols = [('age', np.float), ('mass', np.float), ('lbol', np.float),
                ('sfr', np.float)]
        miscCols = [('Z', np.float)]  # metallicity, taken from zmet LUT
        specCols = [('spec', np.float, SpecParser.nlambda(specType))]
        allCols = psetCols + sfhCols + miscCols + magCols + specCols
        tableDtype = np.dtype(allCols)

        if os.path.exists(outputPath) and clobber:
            os.remove(outputPath)
        title = os.path.splitext(os.path.basename(outputPath))[0]
        h5file = tables.openFile(outputPath, mode="w", title=title)
        table = h5file.createTable("/", 'models', tableDtype,
                "Model Output Table")
        print h5file
        for doc in docs:
            print "reading", doc['_id']
            npData = doc['np_data']
            nRows = len(npData)

            # Appent pset cols and misc cols
            extraNames = []
            extraArrays = []

            zmet = doc['pset']['zmet']
            Z = lut[zmet - 1]
            Z = np.ones(nRows, dtype=np.float) * Z
            extraNames.append('Z')
            extraArrays.append(Z)
            for cName, cType in psetCols:
                p = doc['pset'][cName]
                pArray = np.ones(nRows, dtype=cType) * p
                extraNames.append(cName)
                extraArrays.append(pArray)
            npDataAll = mlab.rec_append_fields(npData, extraNames, extraArrays)

            # select row closest to the target age
            if tage is not None:
                ageGyr = 10. ** npDataAll['age'] / 10. ** 9
                i = np.argmin((ageGyr - tage) ** 2)
                row = np.atleast_1d(np.array(npDataAll[i], copy=True))
                table.append(row)
            else:
                #table.append(npDataAll) # should work but corrupts data
                row = table.row
                for i in xrange(nRows):
                    print "row", i
                    for x in allCols:
                        name = x[0]
                        print name, npDataAll[i][name]
                        row[name] = npDataAll[i][name]
                    row.append()
        table.flush()
        h5file.flush()
        h5file.close()

    @property
    def _get_table_def(self):
        ccDtype = np.dtype([('c1', np.int), ('c2', np.int), ('xi', np.int),
            ('yi', np.int), ('ml', np.float)])
        return ccDtype

class QueueRunnerIsoSSP(object):
    """Executes a queue of FSPS models. Assumes SSPs share a common IMF
    and isochrone modifications.

    This is typically called via :meth:`FSPSLibrary.compute_models()`.
    """
    def __init__(self, libname, dbname, dbhost, dbport, maxN, jobQuery={},
            compute_vega_mags=0, redshift_colors=0,
            imf_type=0, imf1=1.3, imf2=2.3, imf3=2.3, vdmc=0.08, mdave=0.5,
            dell=0., delt=0., sbss=0., fbhb=0., pagb=1.):
        #super(QueueRunner, self).__init__()
        self.libname = libname
        self.dbname = dbname
        self.dbhost = dbhost
        self.dbport = dbport
        self.maxN = maxN
        self.jobQuery = jobQuery
        self.compute_vega_mags = compute_vega_mags
        self.redshift_colors = redshift_colors
        self.imf_type = imf_type
        self.imf1 = imf1
        self.imf2 = imf2
        self.imf3 = imf3
        self.vdmc = vdmc
        self.mdave = mdave
        self.dell = dell
        self.delt = delt
        self.sbss = sbss
        self.fbhb = fbhb
        self.pagb = pagb

    def __call__(self, nodeName):
        """Executed in the pool mapping; looks for and computes models."""
        # print "hello"
        self.nodeName = nodeName
        thisHost = socket.gethostname()  # hostname of current process

        # Connect to the library in MongoDB
        connection = pymongo.Connection(host=self.dbhost, port=self.dbport)
        db = connection[self.dbname]
        db.add_son_manipulator(NumpySONManipulator())
        self.collection = db[self.libname]

        # Initialize FSPS
        fsps.driver.setup(self.compute_vega_mags, self.redshift_colors)
        # Initialize SSPs for this common SSP set
        fsps.driver.setup_all_ssp(self.imf_type, self.imf1,
                self.imf2, self.imf3, self.vdmc,
                self.mdave, self.dell, self.delt,
                self.sbss, self.fbhb, self.pagb)

        while True:
            psets = []
            modelNames = []
            now = datetime.datetime.utcnow()
            now = now.replace(tzinfo=pytz.utc)
            while len(psets) <= self.maxN:
                q = {"compute_complete": False, "compute_started": False}
                q.update(self.jobQuery)
                # print "q", q
                doc = self.collection.find_and_modify(query=q,
                update={"$set": {"compute_started": True,
                                    "queue_date": now,
                                    "compute_host": thisHost}},)
                # print "doc", doc
                if doc is None: break  # no available models
                modelName = str(doc['_id'])
                pset = ParameterSet(modelName, **doc['pset'])
                psets.append(pset)
                modelNames.append(pset.name)
            if len(psets) == 0: break  # empty job queue
            # Startup a computation: write command file and start fspsq
            for pset in psets:
                self._compute_model(pset)

    def _compute_model(self, pset):
        """Computes a model and inserts results into the Mongo collection."""
        nBands = fsps.driver.get_n_bands()
        nLambda = fsps.driver.get_n_lambda()
        nAges = fsps.driver.get_n_ages()
        fsps.driver.comp_sp(pset['dust_type'], pset['zmet'], pset['sfh'],
            pset['tau'], pset['const'], pset['fburst'], pset['tburst'],
            pset['dust_tesc'], pset['dust1'], pset['dust2'],
            pset['dust_clumps'], pset['frac_nodust'], pset['dust_index'],
            pset['mwr'], pset['wgp1'], pset['wgp2'], pset['wgp3'],
            pset['duste_gamma'], pset['duste_umin'], pset['duste_qpah'],
            pset['tage'])
        if pset['tage'] == 0.:
            # SFH over all ages is returned
            mags = fsps.driver.get_csp_mags(nBands, nAges)
            specs = fsps.driver.get_csp_specs(nLambda, nAges)
            age, mass, lbol, sfr, dust_mass = fsps.driver.get_csp_stats(nAges)
        else:
            # get only a single age, stored in first age bin
            # arrays must be re-formated to appear like one-age versions of
            # the outputs from get_csp_mags, etc.
            mags = fsps.driver.get_csp_mags_at_age(1, nBands)
            specs = fsps.driver.get_csp_specs_at_age(1, nLambda)
            age, mass, lbol, sfr, dust_mass \
                    = fsps.driver.get_csp_stats_at_age(1)
            age = np.atleast_1d(age)
            mass = np.atleast_1d(mass)
            lbol = np.atleast_1d(lbol)
            sfr = np.atleast_1d(sfr)
            dust_mass = np.atleast_1d(dust_mass)
            mags = np.atleast_2d(mags)
            specs = np.atleast_2d(specs)
        dataArray = self._splice_mag_spec_arrays(age, mass, lbol, sfr,
                dust_mass, mags, specs, nLambda)
        self._insert_model(pset.name, dataArray)

    def _splice_mag_spec_arrays(self, age, mass, lbol, sfr,
                dust_mass, magData, specData, nLambda):
        """Add spectrum to teh magData structured array.

        .. note:: This is done by heavy-duty copying. It'd probably be
           much more efficient to figure out if
           :func:`numpy.recfunctions.append_fields` can be applied here. But
           I can't get it to work.
        """
        magDtype = [('age', np.float), ('mass', np.float), ('lbol', np.float),
                ('sfr', np.float), ('dust_mass', np.float)]
        magDtype += [(name, np.float) for (idx, name, comment) in FILTER_LIST]
        dt = magDtype + [('spec', np.float, nLambda)]
        nRows = len(age)
        allData = np.empty(nRows, dtype=dt)
        allData['age'] = age
        allData['mass'] = mass
        allData['lbol'] = lbol
        allData['sfr'] = sfr
        allData['dust_mass'] = dust_mass
        print "magData shape:", magData.shape
        for (idx, name, comment) in FILTER_LIST:
            print idx - 1, name
            allData[name] = magData[:, idx - 1]  # fortran indices start at 1
        allData['spec'] = specData
        return allData

    def _insert_model(self, modelName, modelData):
        """docstring for _insert_model"""
        self.collection.update({"_id": modelName},
            {"$set": {"compute_complete": True}})
        binData = Binary(pickle.dumps(modelData, -1))
        self.collection.update({"_id": modelName},
            {"$set": {"np_data": {'_type': 'np.ndarray', 'data': binData}}})
        # load data with pickle.load(doc['np_data']['data])

        # Using SON Manipulator:
        # print c.find_one({"_id": modelName})
        # print "type:", type(npDataSmall)
        # c.update({"_id": modelName}, {"$set": {"np_data": npDataSmall}})
        # print c.find_one({"_id": modelName})['np_data']
        # print "update complete!"

class NumpySONManipulator(SONManipulator):
    """Taken from Dan-FM's gist: https://gist.github.com/1143729"""
    def transform_incoming(self, value, collection):
        if isinstance(value, (list, tuple, set)):
            return [self.transform_incoming(item, collection)
                    for item in value]
        if isinstance(value, dict):
            return dict((key, self.transform_incoming(item, collection))
                                         for key, item in value.iteritems())
        if isinstance(value, np.ndarray):
            return {'_type': 'np.ndarray',
                    'data': Binary(pickle.dumps(value, -1))}
        return value

    def transform_outgoing(self, son, collection):
        if isinstance(son, (list, tuple, set)):
            return [self.transform_outgoing(value, collection)
                    for value in son]
        if isinstance(son, dict):
            if son.get('_type') == 'np.ndarray':
                return pickle.loads(son.get('data'))
            return dict((key, self.transform_outgoing(value, collection))
                                         for key, value in son.iteritems())
        return son

if __name__ == '__main__':
    pass


text:
import { ConcreteType, Type } from '../facade/lang';
import { PlatformReflectionCapabilities } from './platform_reflection_capabilities';
import { GetterFn, MethodFn, SetterFn } from './types';
export declare class ReflectionCapabilities implements PlatformReflectionCapabilities {
    private _reflect;
    constructor(reflect?: any);
    isReflectionEnabled(): boolean;
    factory(t: ConcreteType): Function;
    parameters(typeOrFunc: Type): any[][];
    annotations(typeOrFunc: Type): any[];
    propMetadata(typeOrFunc: any): {
        [key: string]: any[];
    };
    interfaces(type: Type): any[];
    hasLifecycleHook(type: any, lcInterface: Type, lcProperty: string): boolean;
    getter(name: string): GetterFn;
    setter(name: string): SetterFn;
    method(name: string): MethodFn;
    importUri(type: any): string;
}


text:
import {render,deku,dom} from '../'
import assert from 'assert'

/**
 * Mount a scene, execute a function and then
 * remove the scene. This is used for testing.
 *
 * @param {Application} app
 * @param {Function} fn
 */

exports.mount = function(app, fn, errorHandler) {
  var el = document.createElement('div');

  try {
    var renderer = render(app, el, { batching: false });
    if (fn) fn(el, renderer);
  }
  catch(e) {
    if (errorHandler) {
      errorHandler(e);
    } else {
      throw e;
    }
  }
  finally {
    if (renderer) renderer.remove();
    assert.equal(el.innerHTML, '');
    if (el.parentNode) el.parentNode.removeChild(el);
  }
  return renderer;
};

/**
 * Basic component for testing
 */

exports.HelloWorld = {
  render: function(component){
    let {props, state} = component
    return dom('span', null, ['Hello World']);
  }
};

/**
 * Create a span
 */

exports.Span = {
  render: function(component){
    let {props, state} = component
    return dom('span', null, [props.text]);
  }
};

/**
 * Create a span with two words
 */

exports.TwoWords = {
  render: function(component){
    let {props, state} = component
    return dom('span', null, [props.one + ' ' + props.two]);
  }
};

/**
 * Create a div
 */

exports.div = function(){
  var el = document.createElement('div');
  document.body.appendChild(el);
  return el;
};


text:
<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
    <LinearLayout android:layout_height="wrap_content"
                  android:layout_width="match_parent"
                  android:id="@+id/user_header">
        <org.ry8.CeaFrame.view.RoundedWebImageView
            android:layout_width="50dp"
                                                           android:layout_height="50dp"
                                                           android:id="@+id/user_avatar"
                                                           android:layout_margin="10dp"
                                                           android:src="@drawable/default_user_icon"/>
        <TextView android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:id="@+id/user_name"
                  android:layout_marginTop="10dp"
                  android:layout_marginBottom="10dp"
                  android:layout_gravity="center_vertical"
                  android:text="howie"
                  android:textColor="#333333"
                  android:textSize="14dp"/>
    </LinearLayout>

    <TextView android:layout_height="wrap_content"
              android:layout_width="match_parent"
              android:id="@+id/feed_content"
              android:layout_below="@+id/user_header"
              android:text=""
              android:layout_margin="10dp"
              android:textSize="12dp"
              android:textColor="#666666"/>
    <LinearLayout android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:id="@+id/photo_layout"
            android:background="@drawable/body_cont_bg"
            android:layout_centerInParent="true"
            android:gravity="center"
            android:layout_below="@+id/feed_content">
            <org.ry8.CeaFrame.view.WebImageView
                    android:layout_width="300dp"
                    android:layout_height="300dp"
                    android:id="@+id/feed_photo"
                    android:layout_below="@+id/feed_content"
                    android:layout_margin="10dp"
                    android:src="@drawable/default_image"
                    android:scaleType="centerCrop"
                    android:layout_centerInParent="true"
                    android:layout_gravity="center"/>
    </LinearLayout>
    <View android:layout_height="10dp"
          android:layout_width="match_parent"
          android:visibility="invisible"
          android:layout_below="@+id/photo_layout"/>

</RelativeLayout>


text:
#include "flatArray.h"
#include "constStr.h"
#include "../memory/stdAlloc.h"
#include "autoArray.h"
#pragma once

namespace LightSpeed {

///Universal string reference
/** Can be used instead String in the map. Itself can be
 * created from ConstStringT<T>, which refers parameter given in the
 * constructor. Reference is valid until referred string exists. To create
 * reference with copying string into the pool use add() method
 *
 * @note object takes 12 bytes under 32-bit and 16 bytes under 64-bit. In both environments
 * string pool can hold strings of total 4294967296 characters. Especially under 64-bit environment this limit can
 * be easy reached. If this is the problem, use multiple pools.

 */
	extern void *ptrStringPoolNull;

	template<typename T>
	class StringPoolStrRef: public FlatArrayBase<const T, StringPoolStrRef<T> >  {
	public:
		///Constructs string reference from ConstStringT object
		/**
		 * @param str reference to ConstStringT object. Note that original ConstStringT object must
		 * remain valid for whole lifetime of this reference. New object makes reference to internal ConstStringT
		 * pointer and sets offset and length. Result is object that looks like allocated in string-pool. But neither
		 * allocation nor copying is necessary
		 */
		StringPoolStrRef(const ConstStringT<T> &str):anchor(getPtrToData(str)),offset(0),len(Bin::natural32(str.length()))  {}

		///Constructs string from string pool
		/**
		 * @param anchor pointer to pointer to begin of pool. Because location of pool can change during allocations
		 * 	reference keeps pointer to variable that contains address of the pool
		 * @param offset offset in the pool
		 * @param len length of the string
		 */
		StringPoolStrRef(const T *const *anchor, Bin::natural32 offset, Bin::natural32  len)
			:anchor(anchor),offset(offset),len(len) {}
		StringPoolStrRef():anchor(reinterpret_cast<const T *const *>(&ptrStringPoolNull)),offset(0),len(0) {}
		const T *data() const {return *anchor + offset;}
		natural length() const {return len;}
		void clear() { len = 0; }
		bool empty() const { return len == 0; }

	protected:
		const T *const * anchor;
		Bin::natural32 offset;
		Bin::natural32 len;

		static const T *const * getPtrToData(const ConstStringT<T> &x) {

			class X: public ConstStringT<T> {
			public:
				const T *const * getPtrRef() const {return &this->refdata;}
			};
			return static_cast<const X &>(x).getPtrRef();
		}
	};
	///StringPool object is useful when you working with many constant strings
	/**
	 * Right use of this object is to allocate and keep strings in the memory.
	 * The most common way to solve this situation is to allocate String object
	 * to every single string. This can cause memory fragmentation and slow down
	 * loading and accessing strings. Especially when strings are used in the search
	 * maps, every search need creation of String object, because you need
	 * object of the same type for comparison
	 *
	 * To use StringPool, declare this object with a search map. Use StringPool::Str
	 * type for string reference in the map (can be key or value as you wish). Str class
	 * can be created from ConstStringT, which creates constant reference to the string.
	 * This is useful when you searching the string. To store string, use method add()
	 * or simply operator() to convert ConstStringT to Str object. String is copied
	 * into the pool and reference to it is returned as result.
	 *
	 * There is no way to remove strings from the pool, because they are allocated
	 * incrementally. You can copy all live strings to second pool. There is also two methods mark() and
	 * release() useful to deallocate temporary strings
	 *
	 *
	 */
	template<typename T, typename Alloc = StdAlloc>
	class StringPool {
	public:

		typedef StringPoolStrRef<T> Str;
		///Adds new string into the pool
		/**
		 * @param str new string
		 * @return reference to the string as universal string reference
		 */
		Str add(ConstStringT<T> str);

		///Removes all strings.
		/** ensure that there is no reference into the pool before invoking the command */
		void clear();

		///Releases extra allocated memory
		/** Function uses all possible ways to decrease memory usage which includes allocating new memory block, copying
		 * context and deallocate old larger block. This can be slow. Use only if you really need to free some memory.
		 */
		void freeExtra();

		///Adds new string into the pool
		/**
		 * @param str new string
		 * @return reference to the string as universal string reference
		 */
		Str operator()(ConstStringT<T> str);

		///Marks state of string heap.
		/**
		 * @return function returns current size of the pool. Returned value can be used in function release()
		 */
		natural mark();
		///Releases memory allocated for strings stored after mark()
		/**
		 * @param mark value returned by mark()
		 *
		 * @note Use function only if there is no string reference created after mark(). Otherwise accessing these
		 * references can cause unpredictable results;
		 *
		 * @note Memory after release() is not returned to the allocator. It is still ready to additional allocations
		 * in the future. To shrink allocated memory, use freeExtra()
		 */
		void release(natural mark);

		///Creates reference to string which did start on marked position
		/** You can use mark() to markdown top of pool and then start to
		 * load a text into buffer per-parted using add() method. When you
		 * are finish, use fromMark() function to create refernce to such text
		 *
		 * @param mark
		 * @return
		 */
		Str fromMark(natural mark);

		template<typename X>
		Str add(IIterator<T,X> &iter);

		template<typename X>
		Str add(const IIterator<T,X> &iter);

		class WriteIterator: public WriteIteratorBase<T, WriteIterator> {
		public:
			WriteIterator(StringPool &owner):owner(owner),startMark(owner.pool.length()) {}
			bool hasItems() const {return true;}
			void write(const T &x) {owner.pool.add(x);}
			Str finish();

		protected:
			StringPool &owner;
			natural startMark;

		};

		WriteIterator getWriteIterator() {
			return WriteIterator(*this);
		}

	protected:
		AutoArray<T, Alloc> pool;
		const T * poolRef;
	};

	typedef StringPool<char> StringPoolA;
	typedef StringPool<wchar_t> StringPoolW;

}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Bristow Drone Services</title>

    <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Josefin+Slab:100,300,400,600,700,100italic,300italic,400italic,600italic,700italic" rel="stylesheet" type="text/css">

    <link href="css/business-casual.css" rel="stylesheet">

    <link rel="stylesheet" href="css/ken-burns.css">

        Bristow Drone Services

            Bristow Drone Services
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">

        </button>

              Home
                (current)

              Photos

              Videos

              3D Models

              About Us

              Blog

              Contact

Longleat House

Beckford's Tower, Bath

Malmesbury Abbey

House in Wiltshire

House in Wiltshire

            Previous

            Next

These are a few examples of 3D models by Bristow Drone Services.

Click/tap and drag to move around the models.

As long as your location is not in a congested area then we will be able to create beautiful 3D models
            similar to these examples.

Copyright © Bristow Drone Services


text:
/*
  Qcode compass plugins - navigate between page elements based on position
*/
;var qcode = qcode || {};
(function() {
    "use strict";

    // Constants to define relationships between
    // axes, directions, and boundaries
    const opposites = {
        "row": "column",
        "column": "row",
        "before": "after",
        "after": "before"
    };
    const boundaries = {
        "row": {
            "min": "top",
            "max": "bottom"
        },
        "column": {
            "min": "left",
            "max": "right"
        }
    }

    // Shorthand methods for readability:
    // ====
    qcode.northOf = function(target, elements) {
        // Returns the element above the target if one exists,
        // otherwise the bottom element from the previous column,
        // or undefined if no match
        return qcode.compass({
            target: target,
            elements: elements,
            direction: 'before',
            axis: 'column'
        });
    };

    qcode.southOf = function(target, elements) {
        // Returns the element below the target if one exists,
        // otherwise the top element from the next column,
        // or undefined if no match
        return qcode.compass({
            target: target,
            elements: elements,
            direction: 'after',
            axis: 'column'
        });
    };

    qcode.eastOf = function(target, elements) {
        // Returns the element right of the target if one exists,
        // otherwise the leftmost element from the next row,
        // or undefined if no match
        return qcode.compass({
            target: target,
            elements: elements,
            direction: 'after',
            axis: 'row'
        });
    };

    qcode.westOf = function(target, elements) {
        // Returns the element left of the target if one exists,
        // otherwise the rightmost element from the previous row,
        // or undefined if no match
        return qcode.compass({
            target: target,
            elements: elements,
            direction: 'before',
            axis: 'row'
        });
    };

    /* ====
      Returns whichever element from "elements",
      is the closest in the given "direction",
      to the "target" element,
      within the given "axis"
      e.g.
      config = {
        target: HTMLElement (basis for comparison),
        elements: Array of HTMLElements (elements to choose from),
        direction: 'before' or 'after',
        axis: 'row' or 'column'
      }
    */
    qcode.compass = function(config) {
        const target = config.target;
        const elements = removeSelfAndHidden(config.elements, target);
        const direction = config.direction;
        const closer = opposites[direction]
        const majorAxis = config.axis;
        const minorAxis = opposites[config.axis];

        let bestMatch;
        // Find an element that overlaps in major axis,
        // is in the correct direction on the minor axis,
        // and is as close as possible on the minor axis
        // (if such an element exists)
        qcode.each(elements, element => {
            if ( compare(element,
                         'overlaps',
                         target,
                         majorAxis)
                 && compare(element,
                            `partly ${direction}`,
                            target,
                            minorAxis)
                 && (bestMatch == undefined
                     || compare(element,
                                `partly ${closer}`,
                                bestMatch,
                                minorAxis))
               ) {
                bestMatch = element;
            }
        });
        if ( bestMatch !== undefined ) {
            return bestMatch;
        }

        // Find element in correct direction in major axis,
        // as close as possible on the major axis,
        // as close as possible to the "near" end of the minor axis
        // (if such an element exists)
        qcode.each(elements, element => {
            if ( compare(element,
                         `fully ${direction}`,
                         target,
                         majorAxis)
                 && ( bestMatch === undefined
                      || compare(element,
                                 `fully ${closer}`,
                                 bestMatch,
                                 majorAxis)
                      || (compare(element,
                                  'overlaps',
                                  bestMatch,
                                  majorAxis)
                          && compare(element,
                                     `partly ${closer}`,
                                     bestMatch,
                                     minorAxis)))
               ) {
                bestMatch = element;
            }
        });

        return bestMatch;
    }

    // Compare position of element to comparator,
    // using the comparison type within the given axis
    // e.g. compare(element, 'fully before', comparator, 'row')
    // => returns a boolean true/false
    function compare(element, type, comparator, axis) {
        const rect = element.getBoundingClientRect();
        const base = comparator.getBoundingClientRect();

        const minKey = boundaries[axis].min;
        const maxKey = boundaries[axis].max;

        switch (type) {
        case 'fully before':
            return rect[maxKey] <= base[minKey];
        case 'fully after':
            return rect[minKey] >= base[maxKey];
        case 'partly before':
            return rect[minKey] < base[minKey];
        case 'partly after':
            return rect[maxKey] > base[maxKey];
        case 'overlaps':
            return (rect[minKey] < base[maxKey]
                    && rect[maxKey] > base[minKey]);
        }
    }

    function removeSelfAndHidden(elements, target) {
        // Remove target and hidden elements from elements array
        const result = [];
        qcode.each(elements, element => {
            if ( element != target && element.offsetParent != null ) {
                result.push(element);
            }
        });
        return result;
    };
})();


text:
"""permalink_rename_filterState

Revision ID: 7fb8bca906d2
Revises: f3afaf1f11f0
Create Date: 2022-06-27 14:59:20.740380

"""

# revision identifiers, used by Alembic.
revision = "7fb8bca906d2"
down_revision = "f3afaf1f11f0"

import pickle

from alembic import op
from sqlalchemy import Column, Integer, LargeBinary, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session

from superset import db
from superset.migrations.shared.utils import paginated_update

Base = declarative_base()
VALUE_MAX_SIZE = 2**24 - 1
DASHBOARD_PERMALINK_RESOURCE_TYPE = "dashboard_permalink"

class KeyValueEntry(Base):
    __tablename__ = "key_value"
    id = Column(Integer, primary_key=True)
    resource = Column(String(32), nullable=False)
    value = Column(LargeBinary(length=VALUE_MAX_SIZE), nullable=False)

def upgrade():
    bind = op.get_bind()
    session: Session = db.Session(bind=bind)
    for entry in paginated_update(
        session.query(KeyValueEntry).filter(
            KeyValueEntry.resource == DASHBOARD_PERMALINK_RESOURCE_TYPE
        )
    ):
        value = pickle.loads(entry.value) or {}
        state = value.get("state")
        if state:
            if "filterState" in state:
                state["dataMask"] = state["filterState"]
                del state["filterState"]
            if "hash" in state:
                state["anchor"] = state["hash"]
                del state["hash"]
            entry.value = pickle.dumps(value)
    session.commit()

def downgrade():
    bind = op.get_bind()
    session: Session = db.Session(bind=bind)
    for entry in paginated_update(
        session.query(KeyValueEntry).filter(
            KeyValueEntry.resource == DASHBOARD_PERMALINK_RESOURCE_TYPE
        ),
    ):
        value = pickle.loads(entry.value) or {}
        state = value.get("state")
        if state:
            if "dataMask" in state:
                state["filterState"] = state["dataMask"]
                del state["dataMask"]
            if "anchor" in state:
                state["hash"] = state["anchor"]
                del state["anchor"]
            entry.value = pickle.dumps(value)
        session.merge(entry)
    session.commit()


text:
/******************************************************************************

  (c) 2005-2014 Scientific Computation Research Center,
      Rensselaer Polytechnic Institute. All rights reserved.

  This work is open source software, licensed under the terms of the
  BSD license as described in the LICENSE file in the top-level directory.

*******************************************************************************/
#ifndef M3DC1_SCOREC_HEADER_H
#define M3DC1_SCOREC_HEADER_H

#define M3DC1_PI 3.141592653589793
#define FIXSIZEBUFF 1024
#define M3DC1_SUCCESS 0
#define M3DC1_FAILURE 1
#define C1TRIDOFNODE 6
#define NODE_GLB_ORDER -1
#include "name_convert.h"

#ifdef __cplusplus
extern "C" {
#endif
typedef int FieldID;
enum m3dc1_coord_system { /*0*/ M3DC1_RZPHI,  // default
                          /*1*/ M3DC1_XYZ};

// M3DC1_SOLVER_ORDER should be default -Fan
enum m3dc1_ordering { /*0*/ M3DC1_NO_ORDER=0,  // no reordering applied - default
                      /*2*/ M3DC1_ADJ_ORDER, // use adjaceny-based reordering on local mesh;
                      /*2*/ M3DC1_SOLVER_ORDER, // use solver's reordering;
                      /*3*/ M3DC1_ADJ_SOLVER_ORDER}; // use both adjaceny-based and solver's reordering

enum m3dc1_field_type { /*0*/ M3DC1_REAL=0,  // real number for field value
                        /*1*/ M3DC1_COMPLEX}; // complex number for field value

enum m3dc1_matrix_type { /*0*/ M3DC1_MULTIPLY=0,
                         /*1*/ M3DC1_SOLVE};

enum m3dc1_matrix_status { /*0*/ M3DC1_NOT_FIXED=0,
                           /*2*/ M3DC1_FIXED};

bool m3dc1_double_isequal(double A, double B);

// Global variable to keep track of ghosted mesh
enum ghosting {uninit, init};
static enum ghosting global_ghost_state = uninit;

int m3dc1_scorec_init();
int m3dc1_scorec_finalize();

/** plane functions */
int m3dc1_plane_setnum(int*);
int m3dc1_plane_getnum(int*);
int m3dc1_plane_getid(int * /* out */ plane_id);
int m3dc1_plane_setphirange(double* minValue, double* maxValue);
int m3dc1_plane_setphi(int* planeid, double* phi);
int m3dc1_plane_getphi(int* planeid, double* phi);

/** model functions */
int m3dc1_model_load(const char* /* in */ model_file);
int m3dc1_model_print();
int m3dc1_model_setnumplane(int*);
int m3dc1_model_getnumplane(int*);

int m3dc1_model_setpbc (int* /* in */ x_pbc, int* /* in */ y_pbc); //setperiodicinfo_
int m3dc1_model_getpbc (int* /* out */ x_pbc, int* /* out */ y_pbc); //getperiodicinfo_
int m3dc1_model_getedge (int*  /* out */  left_edge, int*  /* out */  right_edge,
                         int*  /* out */  bottom_edge, int*  /* out */  top_edge); // getmodeltags_
int m3dc1_model_getmincoord(double* /* out */ x_min, double* /* out */ y_min); //getmincoord2_
int m3dc1_model_getmaxcoord(double* /* out */ x_max, double* /* out */ y_max); //getmaxcoord2_

/** mesh functions */

int m3dc1_mesh_load(const char* mesh_file);
int m3dc1_ghost_load(int* nlayers); // For loading ghosted mesh with nlayers
int m3dc1_ghost_delete(); // For deleting a ghosted mesh

int m3dc1_mesh_write(const char* filename, int *option); // 0: vtk file with field; 1:smb file
int m3dc1_mesh_build3d(int* num_field, int* field_id, int* num_dofs_per_value);

int m3dc1_mesh_getnument (int* /* in*/ ent_dim, int* /* out */ num_ent);
int m3dc1_mesh_getnumownent (int* /* in*/ ent_dim, int* /* out */ num_ent); //numownedents_
int m3dc1_mesh_getnumglobalent (int* /* in*/ ent_dim, int* /* out */ global_num_ent); //numglobalents_

int m3dc1_mesh_setordering (int* option ); // set_adj_ordering_
int m3dc1_mesh_getordering (int* option); // get_adj_ordering_opion_

/* mesh entity functions */
int m3dc1_node_getglobalid (int* /* in */ ent_id, int* /* out */ global_ent_id);   //entglobalid_
int m3dc1_ent_getgeomclass (int* /* in */ ent_dim, int* /* in */ ent_id,
		            int* /* out */ geom_class_dim, int* /* out */ geom_class_id);
int m3dc1_ent_getadj (int* /* in */ ent_dim, int* /* in */ ent_id, int* /* in */ adj_dim,
                      int* /* out */ adj_ent, int* /* in */ adj_ent_allocated_size, int* /* out */ num_adj_ent);
int m3dc1_ent_getnumadj (int* /* in */ ent_dim, int* /* in */ ent_id, int* /* in */ adj_dim, int* /* out */ num_adj_ent);
int m3dc1_ent_getownpartid (int* /* in */ ent_dim, int* /* in */ ent_id, int* /* out */ owning_partid); //entprocowner_
int m3dc1_ent_ismine (int* /* in */ ent_dim, int* /* in */ ent_id, int* /* out */ ismine);
int m3dc1_ent_isghost (int* /* in */ ent_dim, int* /* in */ ent_id, int* /* out */ isghost);

// node-specific functions
int m3dc1_node_getcoord (int* /* in */ node_id, double* /* out */ coord );
int m3dc1_node_getnormvec (int* /* in */ node_id, double* /* out */ xyz);
int m3dc1_node_getcurv (int* /* in */ node_id, double* /* out */ curv);
int m3dc1_node_isongeombdry (int* /* in */ node_id, int* /* out */ on_geom_bdry);

// region-specific function
// only used in 3D
int m3dc1_region_getoriginalface( int * /* in */ elm, int * /* out */ fac);

/** field manangement */
int m3dc1_field_getnewid (FieldID* /*out*/field_id);

// ordering should be reused for field and matrix??? -Fan
// is num_dofs input or output?
// *value_type is either M3DC1_REAL or M3DC1_COMPLEX
// *num_dofs_per_value refers to the spatial derivatives
//                     stored for each "value", namely,
//                     a value "u" has these derivatives:
//                     u, u_x, u_y, u_xx, u_xy, u_yy
//                     not necessarily in that order.
// so, the hierarchy is:
//   values, for which we store
//   dofs which are either
//   real or complex scalars
int m3dc1_field_create (FieldID* /*in*/ field_id, const char* /* in */ field_name,
    int* num_values, int* value_type, int* num_dofs_per_value);
int m3dc1_field_delete (FieldID* /*in*/ field_id);

int m3dc1_field_getinfo(FieldID* /*in*/ field_id, char* /* out*/ field_name, int* num_values, int* value_type, int* total_num_dof);

int m3dc1_field_exist(FieldID* field_id, int * exist);//checkppplveccreated_
int m3dc1_field_sync (FieldID* /* in */ field_id); // updatesharedppplvecvals_;
int m3dc1_field_sum (FieldID* /* in */ field_id); // sumsharedppplvecvals_
int m3dc1_field_sumsq (FieldID* /* in */ field_id, double* /* out */ sum);

/** field dof functions */
int m3dc1_field_getlocaldofid (FieldID* field_id, int* /* out */ start_dof_id, int* /* out */ end_dof_id_plus_one);
int m3dc1_field_getowndofid (FieldID* field_id, int* /* out */ start_dof_id, int* /* out */ end_dof_id_plus_one);
int m3dc1_field_getglobaldofid ( FieldID* field_id, int* /* out */ start_dof_id, int* /* out */ end_dof_id_plus_one);

int m3dc1_field_getnumlocaldof (FieldID* field_id, int* /* out */ num_local_dof);
int m3dc1_field_getnumowndof (FieldID* field_id, int* /* out */ num_own_dof);
int m3dc1_field_getnumglobaldof (FieldID* field_id, int* /* out */ num_global_dof);
int m3dc1_field_getdataptr (FieldID* field_id, double** pts);

int m3dc1_field_add(FieldID* /*inout*/ field1, FieldID* /*in*/ field2);
int m3dc1_field_mult(FieldID* /*inout*/ field, double* fac, int * scalar_type);
int m3dc1_field_assign(FieldID* /*inout*/ field, double* fac, int * scalar_type);
int m3dc1_field_copy(FieldID* /* out */ filed1, FieldID* /* in */ field2);
int m3dc1_field_retrieve (FieldID* /* in */ filed1, double * /*out*/ data, int * /* in */size);
int m3dc1_field_set (FieldID* /* in */ filed1, double * /*in*/ data, int * /* in */size);
int m3dc1_field_insert(FieldID* /* in */ field, int /* in */ * local_dof, int * /* in */ size, double* /* in */ values, int * type, int * /* in */ op);
int m3dc1_field_isnan(FieldID* /* in */ field, int * isnan);
int m3dc1_field_compare(FieldID* field_id_1, FieldID* field_id_2);
int m3dc1_field_write(FieldID* field, const char* file_name);
int m3dc1_field_print(FieldID* field);
int m3dc1_field_sum_plane (FieldID* /* in */ field_id);
int m3dc1_field_printcompnorm(FieldID* /* in */ field_id, const char* info);
int m3dc1_field_max (FieldID* field_id, double * max_val, double * min_val);

int m3dc1_model_getplaneid(int * /* out */ plane_id);
int m3dc1_ent_getlocaldofid(int* /* in */ ent_dim, int* /* in */ ent_id, FieldID* field_id,
                       int* /* out */ start_dof_id, int* /* out */ end_dof_id_plus_one);  //entdofs_
int m3dc1_ent_getglobaldofid (int* /* in */ ent_dim, int* /* in */ ent_id, FieldID* field_id,
                       int* /* out */ start_global_dof_id, int* /* out */ end_global_dof_id_plus_one); //globalentdofs_
int m3dc1_ent_getnumdof (int* /* in */ ent_dim, int* /* in */ ent_id, FieldID* field_id, int* /* out */ num_dof);
int m3dc1_ent_setdofdata (int* /* in */ ent_dim, int* /* in */ ent_id, FieldID* field_id, int* /* ou
t */ num_dof, double* dof_data);
int m3dc1_ent_getdofdata (int* /* in */ ent_dim, int* /* in */ ent_id, FieldID* field_id, int* /* out */ num_dof, double* dof_data);

#ifndef M3DC1_MESHGEN
/** matrix and solver functions with PETSc */
int m3dc1_matrix_create(int* matrix_id, int* matrix_type, int* scalar_type, FieldID* field_id); //zerosuperlumatrix_
int m3dc1_matrix_freeze(int* matrix_id); //finalizematrix_
int m3dc1_matrix_delete(int* matrix_id); //deletematrix_

int m3dc1_matrix_insert(int* matrix_id, int* row, int* column, int* scalar_type, double* val);
int m3dc1_matrix_add(int* matrix_id, int* row, int* column, int* scalar_type, double* val); //globalinsertval_

int m3dc1_matrix_insertblock(int* matrix_id, int * ielm, int* rowVarIdx, int * columnVarIdx, double * values);
int m3dc1_matrix_setbc(int* matrix_id, int* row);
int m3dc1_matrix_setlaplacebc (int * matrix_id, int *row, int * numVals, int *columns, double * values);

int m3dc1_matrix_solve(int* matrix_id, FieldID* rhs_sol); //solveSysEqu_
int m3dc1_matrix_getiternum(int* matrix_id, int * iter_num);
int m3dc1_matrix_multiply(int* matrix_id, FieldID* inputvecid, FieldID* outputvecid); //matrixvectormult_

/** matrix and solver functions with TRILINOS */
int m3dc1_epetra_create(int* matrix_id, int* matrix_type, int* scalar_type, FieldID* field_id);
int m3dc1_epetra_delete(int* matrix_id);

int m3dc1_epetra_insert(int* matrix_id, int* row, int* column, int* scalar_type, double* val);
int m3dc1_epetra_addblock(int* matrix_id, int * ielm, int* rowVarIdx, int * columnVarIdx, double * values);

int m3dc1_epetra_setbc(int* matrix_id, int* row);
int m3dc1_epetra_setlaplacebc (int * matrix_id, int *row, int * numVals, int *columns, double * values);
int m3dc1_epetra_freeze(int* matrix_id);
int m3dc1_epetra_multiply(int* matrix_id, FieldID* in_fieldid, FieldID* out_fieldid);
int m3dc1_epetra_print(int* matrix_id);

int m3dc1_solver_aztec(int* matrix_id, FieldID* in_fieldid, FieldID* out_fieldid);
int m3dc1_solver_amesos(int* matrix_id, FieldID* in_fieldid, FieldID* out_fieldid, const char* solver_name);
int m3dc1_solver_getnumiter(int* matrix_id, int * iter_num);

// for performance test
int m3dc1_matrix_flush(int* matrix_id);
int m3dc1_matrix_setassembleoption(int * op);
int m3dc1_matrix_write(int* matrix_id, const char* file_name);
int m3dc1_matrix_print(int* matrix_id);

// adaptation
int adapt_by_field (int * fieldId, double* psi0, double * psil);
int set_adapt_p (double * pp);
int adapt_by_error_field (double * errorField, double * errorAimed, int* max_node, int* option); // option 0: local error control; 1 global
#endif // #ifndef M3DC1_MESHGEN

// for adaptation
int set_mesh_size_bound (double* abs_size, double * rel_size);
int set_adapt_smooth_factor (double* fac);
int output_face_data (int * size, double * data, const char* vtkfile);
int sum_edge_data (double * data, int * size);
int get_node_error_from_elm (double * elm_data, int * size, double* nod_data);
#ifdef __cplusplus
}
#endif
#endif


text:
<!DOCTYPE html>

	<title>Leaflet debug page</title>

	<link rel="stylesheet" href="../../dist/leaflet.css" />

	<meta name="viewport" content="width=device-width, initial-scale=1.0">

	<link rel="stylesheet" href="../css/screen.css" />


text:
/*
 *  Written for the Pkcs11Interop project by:
 *  Jaroslav IMRICH <jimrich@jimrich.sk>
 */

using System.Runtime.InteropServices;

namespace Net.Pkcs11Interop.LowLevelAPI41.MechanismParams
{
    /// <summary>
    /// Structure that provides the parameters to the CKM_RC2_MAC_GENERAL mechanism
    /// </summary>
    [StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
    public struct CK_RC2_MAC_GENERAL_PARAMS
    {
        /// <summary>
        /// The effective number of bits in the RC2 search space
        /// </summary>
        public uint EffectiveBits;

        /// <summary>
        /// Length of the MAC produced, in bytes
        /// </summary>
        public uint MacLength;
    }
}


text:
<!DOCTYPE html>

<!--
Copyright 2014 Extensions of Logic Programming - Universitat Politècnica de València

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.
 -->

<html>
<head>
	<title>Anima Online Stepper</title>
	<link rel="icon" type="image/x-icon" href="./img/favicon.ico">
</head>

<body style="background-color: #252525; height: 100%; width: 99%; display: flex;">
    <img src="img/construction.png" style="margin: 0 auto; margin-top: 10%;">
</body>
</html>


text:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app
   xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
   version="2.5">
  <display-name>PGPAuth</display-name>

  <security-constraint>
    <web-resource-collection>
      <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <user-data-constraint>
      <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
  </security-constraint>

  <security-constraint>
    <web-resource-collection>
      <url-pattern>/tasks/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>admin</role-name>
    </auth-constraint>
  </security-constraint>

  <servlet>
    <servlet-name>add_cert</servlet-name>
    <servlet-class>com.pgpauth.servlet.CAddCertificateServlet</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>del_cert</servlet-name>
    <servlet-class>com.pgpauth.servlet.CDelCertificateServlet</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>oar</servlet-name>
    <servlet-class>com.pgpauth.servlet.COAuthResponseServlet</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>revoke</servlet-name>
    <servlet-class>com.pgpauth.servlet.CRevokePermissionsTask</servlet-class>
  </servlet>

  <servlet>
    <servlet-name>startup</servlet-name>
    <servlet-class>com.pgpauth.servlet.CStartupServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet>
    <servlet-name>lookup</servlet-name>
    <servlet-class>com.pgpauth.servlet.CLookupServlet</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>revoke</servlet-name>
    <url-pattern>/tasks/revoke</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>add_cert</servlet-name>
    <url-pattern>/add_cert</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>del_cert</servlet-name>
    <url-pattern>/del_cert</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>oar</servlet-name>
    <url-pattern>/google/oauth2</url-pattern>
    <url-pattern>/facebook/oauth2</url-pattern>
    <url-pattern>/yahoo/oauth1a</url-pattern>
    <url-pattern>/twitter/oauth1a</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>lookup</servlet-name>
    <url-pattern>/pks/lookup</url-pattern>
  </servlet-mapping>

</web-app>


text:
<?php

/**
 * it_IT
 *
 * Italian message token translations
 *
 * @package UserFrosting
 * @link http://www.userfrosting.com/components/#i18n
 * @author Pietro Marangon (@Pe46dro)
 */

/*
{{name}} - Dymamic markers which are replaced at run time by the relevant index.
*/

$lang = array();

// Site Content
$lang = array_merge($lang, [
	"REGISTER_WELCOME" => "La registrazione è semplice e veloce",
	"MENU_USERS" => "Utenti",
	"MENU_CONFIGURATION" => "Configurazione",
	"MENU_SITE_SETTINGS" => "Configurazione Sito",
	"MENU_GROUPS" => "Gruppi",
	"HEADER_MESSAGE_ROOT" => "LOGGATO COME ROOT"
]);

// Installazione
$lang = array_merge($lang,array(
	"INSTALLER_INCOMPLETE" => "Non puoi creare l'account root finchè l'installazione non è conclusa!",
	"MASTER_ACCOUNT_EXISTS" => "L'account primario esiste già!",
	"MASTER_ACCOUNT_NOT_EXISTS" => "Non puoi registrare un account finche l'account primario non sarà creato!",
	"CONFIG_TOKEN_MISMATCH" => "Il Token di configurazione è errato"
));

// Account
$lang = array_merge($lang,array(
	"ACCOUNT_SPECIFY_USERNAME" => "Inserisci il tuo username",
	"ACCOUNT_SPECIFY_DISPLAY_NAME" => "Inserire il nome visualizzato",
	"ACCOUNT_SPECIFY_PASSWORD" => "Inserisci la tua password",
	"ACCOUNT_SPECIFY_EMAIL" => "Inserisci il tuo indirizzo E-mail",
	"ACCOUNT_SPECIFY_CAPTCHA" => "Inserire il captcha",
	"ACCOUNT_SPECIFY_LOCALE" => "Specificare una località valida.",
	"ACCOUNT_INVALID_EMAIL" => "Indirizzo mail non valido",
	"ACCOUNT_INVALID_USERNAME" => "Username non valido",
	"ACCOUNT_INVALID_USER_ID" => "User ID richiesto non è valido",
	"ACCOUNT_USER_OR_EMAIL_INVALID" => "L'indirizzo mail o il nome utente non sono validi",
	"ACCOUNT_USER_OR_PASS_INVALID" => "Il nome utente o la password non sono validi",
	"ACCOUNT_ALREADY_ACTIVE" => "Il tuo account è già attivato",
	"ACCOUNT_REGISTRATION_DISABLED" => "La registrazione di nuovi account è stata bloccata",
	"ACCOUNT_REGISTRATION_LOGOUT" => "Non è possibile registrare un account mentre si è loggati",
	"ACCOUNT_INACTIVE" => "Il tuo account non è stato attivato. Controlla nella tua mail ( anche nella cartella dello spam ) per riceve le instruzioni per attivare il tuo account",
	"ACCOUNT_DISABLED" => "Questo account è stato disattivato, contattaci per maggiori informazioni",
	"ACCOUNT_USER_CHAR_LIMIT" => "Il tuo username deve essere tra i {{min}} e i {{max}} caratteri",
	"ACCOUNT_DISPLAY_CHAR_LIMIT" => "Il tuo nome visualizzato deve essere tra i {{min}} e i {{max}} caratteri",
	"ACCOUNT_PASS_CHAR_LIMIT" => "La tua password deve essere tra i {{min}} e i {{max}} caratteri",
	"ACCOUNT_EMAIL_CHAR_LIMIT" => "L'email deve essere di almeno {{min}} e massimo {{max}} caratteri.",
	"ACCOUNT_TITLE_CHAR_LIMIT" => "Il titolo utente deve essere tra i {{min}} e i {{max}} caratteri",
	"ACCOUNT_PASS_MISMATCH" => "I due campi devono combaciare",
	"ACCOUNT_DISPLAY_INVALID_CHARACTERS" => "Il nome visualizzato può contenere solo caratteri alfanumerici",
	"ACCOUNT_USERNAME_IN_USE" => "Il nome utente '{{user_name}}' è già in uso",
	"ACCOUNT_DISPLAYNAME_IN_USE" => "Il nome visualizzato '{{display_name}}' è già in uso",
	"ACCOUNT_EMAIL_IN_USE" => "L'email '{{email}}' è già in uso",
	"ACCOUNT_LINK_ALREADY_SENT" => "Una mail di attivazione è già stata mandata al tuo indirizzo email {{resend_activation_threshold}} ora/ore fa",
	"ACCOUNT_NEW_ACTIVATION_SENT" => "Ti è stato inviato un nuovo codice di attivazione, controlla la tua email",
	"ACCOUNT_SPECIFY_NEW_PASSWORD" => "Inserisci la tua nuova password",
	"ACCOUNT_SPECIFY_CONFIRM_PASSWORD" => "Conferma la tua nuova password",
	"ACCOUNT_NEW_PASSWORD_LENGTH" => "La nuova password deve essere tra {{min}} e i {{max}} caratteri",
	"ACCOUNT_PASSWORD_INVALID" => "La password corrente non corrisponde con quella in memoria",
	"ACCOUNT_DETAILS_UPDATED" => "Detagli dell'account aggiornati",
	"ACCOUNT_CREATION_COMPLETE" => "Account per l'utente '{{user_name}}' è stato creato.",
	"ACCOUNT_ACTIVATION_COMPLETE" => "Hai attivato il tuo account con successo, ora puoi eseguire il login.",
	"ACCOUNT_REGISTRATION_COMPLETE_TYPE1" => "Sei stato registrato con successo ora puoi eseguire il login",
	"ACCOUNT_REGISTRATION_COMPLETE_TYPE2" => "Sei stato registrato con successo. Riceverai presto una mail per l'attivazione. Devi attivare il tuo account prima di eseguire il login.",
	"ACCOUNT_PASSWORD_NOTHING_TO_UPDATE" => "Non puoi aggiornare con la stessa password",
	"ACCOUNT_PASSWORD_CONFIRM_CURRENT" => "Conferma la password attuale",
	"ACCOUNT_SETTINGS_UPDATED" => "Impostazioni account aggiornate",
	"ACCOUNT_PASSWORD_UPDATED" => "Password aggiornata",
	"ACCOUNT_EMAIL_UPDATED" => "Email aggiornata",
	"ACCOUNT_TOKEN_NOT_FOUND" => "Il token non esiste / l'account è già stato attivato",
	"ACCOUNT_USER_INVALID_CHARACTERS" => "L'username può essere composto da caratteri alfanumerici",
	"ACCOUNT_DELETE_MASTER" => "Non puoi eliminare l'account principale!",
	"ACCOUNT_DISABLE_MASTER" => "Non puoi disattivare l'account principale!",
	"ACCOUNT_DISABLE_SUCCESSFUL" => "Account disattivato con successo!",
	"ACCOUNT_ENABLE_SUCCESSFUL" => "Account attivato con successo.",
	"ACCOUNT_DELETION_SUCCESSFUL" => "Hai eliminato utente '{{user_name}}'.",
	"ACCOUNT_MANUALLY_ACTIVATED" => "'{{user_name}}' è stato attivato manualmente",
	"ACCOUNT_DISPLAYNAME_UPDATED" => "Nome visualizzato cambiato in '{{display_name}}'",
	"ACCOUNT_TITLE_UPDATED" => "{{user_name}} titolo utente cambiato in '{{title}}'",
	"ACCOUNT_GROUP_ADDED" => "Aggiunto utente al gruppo '{{name}}'.",
	"ACCOUNT_GROUP_REMOVED" => "Utente rimosso dal gruppo '{{name}}'.",
	"ACCOUNT_GROUP_NOT_MEMBER" => "L'utente non è membro del gruppo '{{name}}'.",
	"ACCOUNT_GROUP_ALREADY_MEMBER" => "L'utente è già membro del gruppo '{{name}}'.",
	"ACCOUNT_PRIMARY_GROUP_SET" => "Gruppo primario impostato con successo per '{{user_name}}'.",
	"ACCOUNT_WELCOME" => "Bentornato, {{display_name}}"
));

// Generic validation
$lang = array_merge($lang, array(
	"VALIDATE_REQUIRED" => "Il campo '{{self}}' deve essere specificato.",
	"VALIDATE_BOOLEAN" => "Il valore per '{{self}}' deve essere '0' o '1'.",
	"VALIDATE_INTEGER" => "Il valore per '{{self}}' deve essere un intero.",
	"VALIDATE_ARRAY" => "I valori per '{{self}}' devono essere in un vettore."
));

// Configurazione
$lang = array_merge($lang,array(
	"CONFIG_PLUGIN_INVALID" => "Stai provando ad aggiornare le impostazioni per il plugin '{{plugin}}', ma non c'è nessun plugin con quel nome.",
	"CONFIG_SETTING_INVALID" => "Stai provando ad aggionare la configurazione '{{name}}' per il plugin '{{plugin}}', ma non esiste.",
	"CONFIG_NAME_CHAR_LIMIT" => "Nome del sito deve essere compreso tra {{min}} e tra {{max}} caratteri",
	"CONFIG_URL_CHAR_LIMIT" => "URL del sito deve essere compreso tra {{min}} e tra {{max}} caratteri",
	"CONFIG_EMAIL_CHAR_LIMIT" => "Email del sito deve essere compreso tra {{min}} e tra {{max}} caratteri",
	"CONFIG_TITLE_CHAR_LIMIT" => "Nuovo titolo utente deve essere compreso tra {{min}} e tra {{max}} caratteri",
	"CONFIG_ACTIVATION_TRUE_FALSE" => "Attivazione con mail deve essere 'vero' o 'falso'",
	"CONFIG_REGISTRATION_TRUE_FALSE" => "Registrazione utente deve essere 'vero' o 'falso'",
	"CONFIG_ACTIVATION_RESEND_RANGE" => "Soglia di attivazione deve essere compresa tra {{min}} e tra {{max}} ore",
	"CONFIG_EMAIL_INVALID" => "L'email che hai inserito non è valida",
	"CONFIG_UPDATE_SUCCESSFUL" => "La configurazione del tuo sito è stata aggiornata. Potrebbe essere necessario caricare una nuova pagina per tutte le impostazioni abbiano effetto",
	"MINIFICATION_SUCCESS" => "Minificazione e concatenazione di CSS e JS eseguita con successo"
));

// Recupero password
$lang = array_merge($lang,array(
	"FORGOTPASS_INVALID_TOKEN" => "Il tuo token di attivazione non è valido",
	"FORGOTPASS_OLD_TOKEN" => "Il token di accesso è scaduto",
	"FORGOTPASS_COULD_NOT_UPDATE" => "Password non aggiornata",
	"FORGOTPASS_NEW_PASS_EMAIL" => "E' stata inviata una mail con la nuova password",
	"FORGOTPASS_REQUEST_CANNED" => "Richiesta di recupero password cancellata",
	"FORGOTPASS_REQUEST_EXISTS" => "C'è già una richiesta di recupero password pendente per questo account",
	"FORGOTPASS_REQUEST_SUCCESS" => "Ti sono state inviate per mail le istruzioni per riprendere possesso del tuo account"
));

// Email
$lang = array_merge($lang,array(
	"MAIL_ERROR" => "Errore nell'invio della mail, contatta l'amministratore di sistema"
));

// Miscellaneous
$lang = array_merge($lang,array(
	"PASSWORD_HASH_FAILED" => "Hash della password fallito. Contatta l'amministratore di sistema.",
	"NO_DATA" => "Nessun dato inviato",
	"CAPTCHA_FAIL" => "Domanda di sicurezza sbagliata",
	"CONFIRM" => "Conferma",
	"DENY" => "Nega",
	"SUCCESS" => "Successo",
	"ERROR" => "Errore",
	"SERVER_ERROR" => "Sembra esserci un errore nel server. Se sei un admin controlla gli errori di PHP",
	"NOTHING_TO_UPDATE" => "Niente da aggiornare",
	"SQL_ERROR" => "Errore SQL fatale",
	"FEATURE_DISABLED" => "Funzione attualmente disattivata",
	"ACCESS_DENIED" => "Sembra tu non abbiamo il permesso di fare questo.",
	"LOGIN_REQUIRED" => "Devi essere loggato per accedere a questa risorsa",
	"LOGIN_ALREADY_COMPLETE" => "Sei già loggato!"
));

// Permessi
$lang = array_merge($lang,array(
	"GROUP_INVALID_ID" => "Il gruppo richiesto non esiste",
	"GROUP_CHAR_LIMIT" => "Il nome del permesso deve essere tra {{min}} e tra {{max}} caratteri",
	"GROUP_NAME_IN_USE" => "Gruppo con nome '{{name}}' già in uso",
	"GROUP_DELETION_SUCCESSFUL" => "Eliminato il gruppo '{{name}}'",
	"GROUP_CREATION_SUCCESSFUL" => "Creato con successo il livello di gruppo `{{name}}`",
	"GROUP_UPDATE" => "Gruppo `{{name}}` aggiornato.",
	"CANNOT_DELETE_GROUP" => "Mom puoi eliminare il gruppo '{{name}}'",
	"GROUP_CANNOT_DELETE_DEFAULT_PRIMARY" => "Il gruppo '{{name}}' perchè è configurato come gruppo primario per i nuovi utenti. Per favore seleziona prima un nuovo gruppo primario per i nuovi utenti."
));

return $lang;