text:
include ../config.mk

MONITORING_IMAGE := $(DOCKER_PREFIX)/monitoring:$(TOKEN)

PYTHONPATH := $${PYTHONPATH:+$${PYTHONPATH}:}
PYTHON := PYTHONPATH=$(PYTHONPATH)../hail/python:../gear:../web_common python3
BLACK := $(PYTHON) -m black . --line-length=120 --skip-string-normalization

.PHONY: check
check:
	$(PYTHON) -m flake8 monitoring
	$(PYTHON) -m pylint --rcfile ../pylintrc monitoring --score=n
	$(PYTHON) -m isort . --check-only --diff
	$(BLACK) --check --diff
	curlylint .
	bash ../check-sql.sh

.PHONY: build
build:
	$(MAKE) -C ../docker service-base
	python3 ../ci/jinja2_render.py '{"service_base_image":{"image":"'$$(cat ../docker/service-base-image-ref)'"}}' Dockerfile Dockerfile.out
	../docker-build.sh .. monitoring/Dockerfile.out $(MONITORING_IMAGE)

.PHONY: deploy
deploy: build
	! [ -z $(NAMESPACE) ]  # call this like: make deploy NAMESPACE=default
	python3 ../ci/jinja2_render.py '{"code":{"sha":"$(shell git rev-parse --short=12 HEAD)"},"deploy":$(DEPLOY),"default_ns":{"name":"$(NAMESPACE)"},"monitoring_image":{"image":"$(MONITORING_IMAGE)"},"monitoring_database":{"user_secret_name":"sql-monitoring-user-config"},"scope":"$(SCOPE)"}' deployment.yaml deployment.yaml.out
	kubectl -n $(NAMESPACE) apply -f deployment.yaml.out

.PHONY: clean
clean:
	rm -f Dockerfile.out deployment.yaml.out


text:
#region License

#endregion

namespace RedBadger.Xpf.Controls
{
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Collections.Specialized;

    using System.Reactive;
    using System.Reactive.Linq;

    /// <summary>
    ///     <see cref = "ItemsControl">ItemsControl</see> allows you to represent a collection of items and provides scaffolding to generate the UI for each item.
    /// </summary>
    public class ItemsControl : Control
    {
        /// <summary>
        ///     <see cref = "ItemTemplate">ItemTemplate</see> Reactive Property.
        /// </summary>
        public static readonly ReactiveProperty<Func<object, IElement>> ItemTemplateProperty =
            ReactiveProperty<Func<object, IElement>>.Register("ItemTemplate", typeof(ItemsControl));

        /// <summary>
        ///     <see cref = "ItemsPanel">ItemsPanel</see> Reactive Property.
        /// </summary>
        public static readonly ReactiveProperty<Panel> ItemsPanelProperty =
            ReactiveProperty<Panel>.Register("ItemsPanel", typeof(ItemsControl), ItemsPanelChanged);

        /// <summary>
        ///     <see cref = "ItemsSource">ItemsSource</see> Reactive Property.
        /// </summary>
        public static readonly ReactiveProperty<IEnumerable> ItemsSourceProperty =
            ReactiveProperty<IEnumerable>.Register("ItemsSource", typeof(ItemsControl), ItemsSourceChanged);

        private IDisposable changingItems;

        private bool isItemsSourceNew;

        /// <summary>
        ///     Initializes a new instance of the <see cref = "ItemsControl">ItemsControl</see> class.
        /// </summary>
        public ItemsControl()
        {
            this.ItemsPanel = new StackPanel();
        }

        /// <summary>
        ///     Gets or sets a function that is used to generate the <see cref = "IElement">IElement</see> for each item in the <see cref = "ItemsSource">ItemsSource</see>.
        ///     The function takes one argument of type <see cref = "object">object</see> that represents the item's <see cref = "IElement.DataContext">DataContext</see>.
        /// </summary>
        public Func<object, IElement> ItemTemplate
        {
            get
            {
                return this.GetValue(ItemTemplateProperty);
            }

            set
            {
                this.SetValue(ItemTemplateProperty, value);
            }
        }

        /// <summary>
        ///     Gets of sets the <see cref = "Panel">Panel</see> used to control the layout of items.
        /// </summary>
        public Panel ItemsPanel
        {
            get
            {
                return this.GetValue(ItemsPanelProperty);
            }

            set
            {
                this.SetValue(ItemsPanelProperty, value);
            }
        }

        /// <summary>
        ///     Gets or sets the collection of items to be displayed.
        /// </summary>
        public IEnumerable ItemsSource
        {
            get
            {
                return this.GetValue(ItemsSourceProperty);
            }

            set
            {
                this.SetValue(ItemsSourceProperty, value);
            }
        }

        public override IEnumerable<IElement> GetVisualChildren()
        {
            Panel child = this.ItemsPanel;
            if (child != null)
            {
                yield return child;
            }

            yield break;
        }

        public override void OnApplyTemplate()
        {
            if (this.isItemsSourceNew)
            {
                this.PopulatePanelFromItemsSource();
                this.isItemsSourceNew = false;
            }
        }

        protected override Size ArrangeOverride(Size finalSize)
        {
            Panel child = this.ItemsPanel;
            if (child != null)
            {
                child.Arrange(new Rect(new Point(), finalSize));
            }

            return finalSize;
        }

        protected override Size MeasureOverride(Size availableSize)
        {
            Panel child = this.ItemsPanel;
            if (child == null)
            {
                return Size.Empty;
            }

            child.Measure(availableSize);
            return child.DesiredSize;
        }

        private static void ItemsPanelChanged(IReactiveObject source, ReactivePropertyChangeEventArgs<Panel> change)
        {
            var itemsControl = (ItemsControl)source;
            Panel newPanel = change.NewValue;
            Panel oldPanel = change.OldValue;

            if (oldPanel != null)
            {
                oldPanel.VisualParent = null;
            }

            if (newPanel != null)
            {
                if (!(newPanel.Children is ITemplatedList<IElement>))
                {
                    throw new NotSupportedException(
                        "ItemsControl requires a panel whose Children collection implements ITemplatedList<IElement>");
                }

                newPanel.VisualParent = itemsControl;
            }

            itemsControl.InvalidateMeasure();
        }

        private static void ItemsSourceChanged(
            IReactiveObject source, ReactivePropertyChangeEventArgs<IEnumerable> change)
        {
            var itemsControl = (ItemsControl)source;
            if (change.OldValue is INotifyCollectionChanged)
            {
                itemsControl.changingItems.Dispose();
            }

            var observableCollection = change.NewValue as INotifyCollectionChanged;
            if (observableCollection != null)
            {
                itemsControl.changingItems =
                    Observable.FromEventPattern<NotifyCollectionChangedEventHandler, NotifyCollectionChangedEventArgs>(
                        handler => new NotifyCollectionChangedEventHandler(handler),
                        handler => observableCollection.CollectionChanged += handler,
                        handler => observableCollection.CollectionChanged -= handler).Subscribe(
                            itemsControl.OnNextItemChange);
            }

            itemsControl.isItemsSourceNew = true;
            itemsControl.InvalidateMeasure();
        }

        private void OnNextItemChange(EventPattern<NotifyCollectionChangedEventArgs> eventData)
        {
            var children = (ITemplatedList<IElement>)this.ItemsPanel.Children;
            switch (eventData.EventArgs.Action)
            {
                case NotifyCollectionChangedAction.Add:
                    foreach (object newItem in eventData.EventArgs.NewItems)
                    {
                        children.Add(newItem, this.ItemTemplate);
                    }

                    break;
                case NotifyCollectionChangedAction.Remove:
                    {
                        int startingIndex = eventData.EventArgs.OldStartingIndex;
                        for (int index = startingIndex;
                             index < startingIndex + eventData.EventArgs.OldItems.Count;
                             index++)
                        {
                            children.RemoveAt(index);
                        }

                        break;
                    }

                case NotifyCollectionChangedAction.Replace:
                    {
                        int startingIndex = eventData.EventArgs.NewStartingIndex;

                        foreach (object newItem in eventData.EventArgs.NewItems)
                        {
                            this.ItemsPanel.Children.RemoveAt(startingIndex);
                            children.Insert(startingIndex, newItem, this.ItemTemplate);
                            startingIndex++;
                        }

                        break;
                    }

#if !WINDOWS_PHONE
                case NotifyCollectionChangedAction.Move:
                    children.Move(eventData.EventArgs.OldStartingIndex, eventData.EventArgs.NewStartingIndex);

                    break;
#endif
                case NotifyCollectionChangedAction.Reset:
                    this.PopulatePanelFromItemsSource();
                    break;
            }
        }

        private void PopulatePanelFromItemsSource()
        {
            var children = (ITemplatedList<IElement>)this.ItemsPanel.Children;
            children.Clear();

            if (this.ItemsSource != null)
            {
                foreach (object item in this.ItemsSource)
                {
                    children.Add(item, this.ItemTemplate);
                }
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.astuetz.pagerslidingtabstrip" >

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="21" />

    <application />

</manifest>


text:
"use strict" ;

// This is a specialized clone function dedicated to spellcast scripting structure

// Anything else is considered as opaque value
var protoWhiteList = new Set( [
	Array.prototype ,
	Object.prototype ,
	null
] ) ;

var extendProtoWhiteList = new Set( [
	Object.prototype ,
	null
] ) ;

function copyData( data ) {
	if ( ! data || typeof data !== 'object' || ! protoWhiteList.has( Object.getPrototypeOf( data ) ) ) {
		return data ;
	}

	if ( Array.isArray( data ) ) {
		return Array.from( data ) ;
	}

	return Object.assign( {} , data ) ;
}

function deepCopyData( data , alreadyCopied = new Map() ) {
	var copy , olderCopy ;

	if ( ! data || typeof data !== 'object' || ! protoWhiteList.has( Object.getPrototypeOf( data ) ) ) {
		return data ;
	}

	// For circular reference...
	olderCopy = alreadyCopied.get( data ) ;

	if ( olderCopy ) {
		return olderCopy ;
	}

	if ( Array.isArray( data ) ) {
		copy = [] ;
		alreadyCopied.set( data , copy ) ;	// immediately adds it, before recursion can happen
		data.forEach( ( element , index ) => copy[ index ] = deepCopyData( element , alreadyCopied ) ) ;
	}
	else {
		copy = {} ;
		alreadyCopied.set( data , copy ) ;	// immediately adds it, before recursion can happen
		Object.keys( data ).forEach( key => copy[ key ] = deepCopyData( data[ key ] , alreadyCopied ) ) ;
	}

	return copy ;
}

function deepExtend( base , ... sources ) {
	var alreadyCopied = new Map() ;
	sources.forEach( source => deepExtendOne( base , source , new Set() , alreadyCopied ) ) ;
	return base ;
}

function deepExtendOne( base , source , alreadyExtended , alreadyCopied ) {
	var copy , olderCopy ;

	if (
		! base || ! source ||
		typeof base !== 'object' || typeof source !== 'object' ||
		! extendProtoWhiteList.has( Object.getPrototypeOf( base ) ) ||
		! extendProtoWhiteList.has( Object.getPrototypeOf( source ) )
	) {
		return ;
	}

	// /!\ Don't know what to do here... /!\
	if ( alreadyExtended.has( source ) ) {
		return ;
	}

	alreadyExtended.add( source ) ;	// immediately adds it, before recursion can happen

	Object.keys( source ).forEach( key => {
		var sourceValue = source[ key ] ;
		var baseValue = base[ key ] ;

		if (
			! sourceValue ||
			typeof sourceValue !== 'object' ||
			! extendProtoWhiteList.has( Object.getPrototypeOf( sourceValue ) )
		) {
			base[ key ] = sourceValue ;
		}
		else if (
			! baseValue ||
			typeof baseValue !== 'object' ||
			! extendProtoWhiteList.has( Object.getPrototypeOf( baseValue ) )
		) {
			base[ key ] = deepCopyData( sourceValue , alreadyCopied ) ;
		}
		else {
			deepExtendOne( baseValue , sourceValue , alreadyExtended , alreadyCopied ) ;
		}
	} ) ;
}

module.exports = copyData ;
module.exports.extend = Object.assign ;
module.exports.deep = deepCopyData ;
module.exports.deep.extend = deepExtend ;


text:
package io.github.kimkr.presentation.viewcomponent.recyclerview;

import android.content.Context;
import android.databinding.BindingAdapter;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.PagerSnapHelper;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.SnapHelper;

import java.util.Collection;

import io.github.kimkr.presentation.R;

/**
 * Created by kkr on 2017. 10. 28..
 */

public class RecyclerViewBinding {

    @SuppressWarnings("unchecked")
    @BindingAdapter(value = {"binding:columns",
            "binding:orientation",
            "binding:reverse",
            "binding:viewpager",
            "binding:dividerItemDecoration",
            "binding:adapter",
            "binding:scrollListener"}, requireAll = false)
    public static void setListAdapter(RecyclerView recyclerView,
                                      int columns,
                                      int orientation,
                                      boolean reverse,
                                      boolean viewpager,
                                      Drawable drawable,
                                      RecyclerView.Adapter adapter,
                                      RecyclerView.OnScrollListener scrollListener) {
        Context context = recyclerView.getContext();
        // LAYOUT MANAGER, AS VIEWPAGER, ITEM DECORATION
        if (columns > 1) {
            recyclerView.setLayoutManager(new GridLayoutManager(context, columns));
        } else {
            LinearLayoutManager layoutManager = new LinearLayoutManager(context, orientation, false);
            if (viewpager) {
                recyclerView.setLayoutManager(layoutManager);
                SnapHelper snapHelper = new PagerSnapHelper();
                recyclerView.setOnFlingListener(null);
                snapHelper.attachToRecyclerView(recyclerView);
            } else {
                layoutManager.setAutoMeasureEnabled(true);
                layoutManager.setStackFromEnd(reverse);
                recyclerView.setLayoutManager(layoutManager);
            }
            if (drawable != null) {
                Boolean decoratorSet = (Boolean) recyclerView.getTag(R.string.all_tag_flag);
                if (decoratorSet == null || !decoratorSet) {
                    DividerItemDecoration itemDecorator =
                            new DividerItemDecoration(recyclerView.getContext(), orientation);
                    recyclerView.addItemDecoration(itemDecorator);
                    recyclerView.setTag(R.string.all_tag_flag, true);
                }
            }
        }
        // ADAPTER
        if (adapter != null) {
            recyclerView.setAdapter(adapter);
        }
        if (scrollListener != null) {
            recyclerView.addOnScrollListener(scrollListener);
        }
    }

    @SuppressWarnings("unchecked")
    @BindingAdapter("binding:items")
    public static void setItems(RecyclerView recyclerView, Collection items) {
        RecyclerView.Adapter adapter = recyclerView.getAdapter();
        if (adapter == null) {
            return;
        }
        if (adapter instanceof BaseDataBindingAdapter) {
            ((BaseDataBindingAdapter) adapter).setItems(items);
        }
    }
}


text:
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Discord;
using NadekoBot.Common.ModuleBehaviors;
using NadekoBot.Extensions;
using NadekoBot.Core.Services;
using NadekoBot.Core.Services.Database.Models;
using NLog;
using System;
using Microsoft.EntityFrameworkCore;

namespace NadekoBot.Modules.Utility.Services
{
    public class CommandMapService : IInputTransformer, INService
    {
        private readonly Logger _log;

        public ConcurrentDictionary<ulong, ConcurrentDictionary<string, string>> AliasMaps { get; } = new ConcurrentDictionary<ulong, ConcurrentDictionary<string, string>>();

        private readonly DbService _db;

        //commandmap
        public CommandMapService(NadekoBot bot, DbService db)
        {
            _log = LogManager.GetCurrentClassLogger();
            AliasMaps = new ConcurrentDictionary<ulong, ConcurrentDictionary<string, string>>(
                bot.AllGuildConfigs.ToDictionary(
                    x => x.GuildId,
                        x => new ConcurrentDictionary<string, string>(x.CommandAliases
                            .Distinct(new CommandAliasEqualityComparer())
                            .ToDictionary(ca => ca.Trigger, ca => ca.Mapping))));

            _db = db;
        }

        public int ClearAliases(ulong guildId)
        {
            AliasMaps.TryRemove(guildId, out _);

            int count;
            using (var uow = _db.GetDbContext())
            {
                var gc = uow.GuildConfigs.ForId(guildId, set => set.Include(x => x.CommandAliases));
                count = gc.CommandAliases.Count;
                gc.CommandAliases.Clear();
                uow.SaveChanges();
            }
            return count;
        }

        public async Task<string> TransformInput(IGuild guild, IMessageChannel channel, IUser user, string input)
        {
            await Task.Yield();

            if (guild == null || string.IsNullOrWhiteSpace(input))
                return input;

            if (guild != null)
            {
                if (AliasMaps.TryGetValue(guild.Id, out ConcurrentDictionary<string, string> maps))
                {
                    var keys = maps.Keys
                        .OrderByDescending(x => x.Length);

                    foreach (var k in keys)
                    {
                        string newInput;
                        if (input.StartsWith(k + " ", StringComparison.InvariantCultureIgnoreCase))
                            newInput = maps[k] + input.Substring(k.Length, input.Length - k.Length);
                        else if (input.Equals(k, StringComparison.InvariantCultureIgnoreCase))
                            newInput = maps[k];
                        else
                            continue;

                        try
                        {
                            var toDelete = await channel.SendConfirmAsync($"{input} => {newInput}").ConfigureAwait(false);
                            var _ = Task.Run(async () =>
                            {
                                await Task.Delay(1500).ConfigureAwait(false);
                                await toDelete.DeleteAsync(new RequestOptions()
                                {
                                    RetryMode = RetryMode.AlwaysRetry
                                }).ConfigureAwait(false);
                            });
                        }
                        catch { }
                        return newInput;
                    }
                }
            }

            return input;
        }
    }

    public class CommandAliasEqualityComparer : IEqualityComparer<CommandAlias>
    {
        public bool Equals(CommandAlias x, CommandAlias y) => x.Trigger == y.Trigger;

        public int GetHashCode(CommandAlias obj) => obj.Trigger.GetHashCode(StringComparison.InvariantCulture);
    }
}


text:
<?php
/**
 * Dasboard - Implements a simple Administration Dashboard.
 *
 * @author Virgil-Adrian Teaca - virgil@giulianaeassociati.com
 * @version 3.0
 */

namespace App\Controllers\Admin;

use App\Core\BackendController;

class Dashboard extends BackendController
{
    public function index()
    {
        return $this->getView()->shares('title', __d('dashboard', 'Dashboard'));
    }
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sep;

/**
 *
 *@author JJ.NAVARRETE
 */
public class FrmVerComentario extends javax.swing.JFrame {

    String comentario;
    String id;
    String estado;
    String seleccion;

    /**
     * Creates new form FrmVerComentario
     */
    public FrmVerComentario(String comentario, String id, String estado, String seleccion) {
        this.comentario = comentario;
        this.id = id;
        this.estado = estado;
        this.seleccion=seleccion;
        initComponents();
        jTextAreaComentario.setText(this.comentario);
        jTextAreaComentario.setEditable(false);

        switch (estado) {
            case "Pendiente":
                jButtonVisto.setVisible(true);
                jLabelVisto.setVisible(true);
                break;

            case "Atendido":
                jButtonVisto.setVisible(false);
                jLabelVisto.setVisible(false);
                break;
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextAreaComentario = new javax.swing.JTextArea();
        jButtonVisto = new javax.swing.JButton();
        jLabelVisto = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setType(java.awt.Window.Type.UTILITY);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Comentario"));

        jTextAreaComentario.setColumns(20);
        jTextAreaComentario.setRows(5);
        jScrollPane1.setViewportView(jTextAreaComentario);

        jButtonVisto.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/visto.png"))); // NOI18N
        jButtonVisto.setBorderPainted(false);
        jButtonVisto.setContentAreaFilled(false);
        jButtonVisto.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButtonVisto.setFocusPainted(false);
        jButtonVisto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonVistoActionPerformed(evt);
            }
        });

        jLabelVisto.setText("Marcar Visto");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 416, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonVisto)
                    .addComponent(jLabelVisto)))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jButtonVisto)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabelVisto))
            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, 0))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, 0))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonVistoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonVistoActionPerformed
        BD bd = new BD();
        String visto = bd.marcarComentarioVisto(id);
        if (visto.equals("Ok")) {
            this.dispose();
            FrmComentariosAdmin.instancia.jComboBoxEstado.setSelectedItem(seleccion);

        }

    }//GEN-LAST:event_jButtonVistoActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FrmVerComentario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FrmVerComentario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FrmVerComentario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FrmVerComentario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FrmVerComentario("", "", "","").setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonVisto;
    private javax.swing.JLabel jLabelVisto;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextArea jTextAreaComentario;
    // End of variables declaration//GEN-END:variables
}


text:
title: Click Here: Human-Localized Keypoints as Guidance for Viewpoint Estimation (ICCV 2017)
---
My paper ["Click Here: Human-Localized Keypoints as Guidance for Viewpoint Estimation"](https://arxiv.org/abs/1703.09859) has been accepted to ICCV 2017!


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

package io.warp10.script.functions;

import io.warp10.crypto.CryptoUtils;
import io.warp10.script.NamedWarpScriptFunction;
import io.warp10.script.WarpScriptException;
import io.warp10.script.WarpScriptStack;
import io.warp10.script.WarpScriptStackFunction;

import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
import java.util.Arrays;

/**
 * AES wraps a byte array
 */
public class AESWRAP extends NamedWarpScriptFunction implements WarpScriptStackFunction {

  public static final int NONCE_LEN = 8;

  private static final SecureRandom sr = new SecureRandom();

  public AESWRAP(String name) {
    super(name);
  }

  @Override
  public Object apply(WarpScriptStack stack) throws WarpScriptException {
    Object o = stack.pop();

    if (!(o instanceof byte[])) {
      throw new WarpScriptException(getName() + " expects a byte array containing a 128, 192 or 256 bits AES key on the stack.");
    }

    byte[] key = (byte[]) o;

    if (16 != key.length && 24 != key.length && 32 != key.length) {
      throw new WarpScriptException(getName() + " expects a byte array containing a 128, 192 or 256 bits AES key on the stack.");
    }

    o = stack.pop();

    if (!(o instanceof byte[]) && !(o instanceof String)) {
      throw new WarpScriptException(getName() + " operates on a byte array or a String.");
    }

    if (o instanceof String) {
      o = o.toString().getBytes(StandardCharsets.UTF_8);
    }

    byte[] data = new byte[NONCE_LEN];

    // Generate a nonce

    sr.nextBytes(data);

    data = Arrays.copyOf(data, data.length + ((byte[]) o).length);

    System.arraycopy((byte[]) o, 0, data, NONCE_LEN, data.length - NONCE_LEN);

    byte[] wrapped = CryptoUtils.wrap(key, data);

    stack.push(wrapped);

    return stack;
  }
}


text:
def downloadFunction(in_msg)
  res_payload_string = "<ns1:download xmlns:ns1='http://php.axis2.org/samples/mtom'><ns1:fileName>test.jpg</ns1:fileName><ns1:image xmlmime:contentType='image/jpeg' xmlns:xmlmime='http://www.w3.org/2004/06/xmlmime'><xop:Include xmlns:xop='http://www.w3.org/2004/08/xop/include' href='cid:myid1'></xop:Include></ns1:image></ns1:download>"

  resource = File.new("resources/axis2.jpg", "rb")

  content = resource.read

  msg = WSO2::WSF::WSMessage.new(res_payload_string,
							     nil,
								 {"attachments" => {"myid1" => content}})

  return msg
end

class MtomDownloadServiceController < ApplicationController

  require "wsf"
  skip_before_filter :verify_authenticity_token

  def download
      #operation to ruby function map
      operations = {"download" => "downloadFunction"}

      wss = WSO2::WSF::WSService.new({:operations => operations,
	  								  :use_mtom => true});

      res = wss.reply(request, response);

      render :text => res
  end

end


text:
namespace content {
class NavigationHandle;
}  // namespace content

// LoginNavigationThrottle intercepts navigations that serve auth challenges and
// forwards them to LoginTabHelper to rewrite the response to a blank
// page. LoginTabHelper displays the login prompt on top of this blank page.
//
// Relevant navigations are forwarded to LoginTabHelper, rather than rewritten
// directly in LoginNavigationThrottle, because LoginTabHelper tracks navigation
// state to handle login prompt cancellations.
class LoginNavigationThrottle : public content::NavigationThrottle {
 public:
  explicit LoginNavigationThrottle(content::NavigationHandle* handle);
  ~LoginNavigationThrottle() override;

  // content::NavigationThrottle:
  ThrottleCheckResult WillProcessResponse() override;
  const char* GetNameForLogging() override;
};

#endif  // CHROME_BROWSER_UI_LOGIN_LOGIN_NAVIGATION_THROTTLE_H_


text:
using Microsoft.Web.Administration;
using System;
using System.Linq;
using System.Net;

namespace Net.Tools.Web
{
    public class IISHelper
    {
        public static void AddDomianTmSuite(string portalAlias, string siteName)
        {
            using (ServerManager iis = new ServerManager())
            {
                Site site = iis.Sites[siteName];
                if (site != null)
                {
                    Binding binding = GetBinding(site.Bindings, "*:80:" + portalAlias);
                    if (binding == null)
                    {
                        AddBinding(site.Bindings, "*:80:" + portalAlias);
                    }
                    iis.CommitChanges();
                }
            }
        }

        public static void DeleteDomainTmSuite(string portalAlias, string siteName)
        {
            using (ServerManager iis = new ServerManager())
            {
                Site site = iis.Sites[siteName];
                if (site != null)
                {
                    Binding binding = GetBinding(site.Bindings, "*:80:" + portalAlias);
                    if (binding != null)
                    {
                        site.Bindings.Remove(binding);
                    }
                    iis.CommitChanges();
                }
            }
        }

        public static Binding GetBinding(BindingCollection bindings, string BindingInformation)
        {
            return bindings.FirstOrDefault(binding => binding.BindingInformation.ToLower() == BindingInformation.ToLower());
        }

        public static void AddBinding(BindingCollection bindings, string BindingInformation)
        {
            Binding binding2 = bindings.CreateElement();
            binding2.BindingInformation = BindingInformation;
            binding2.Protocol = @"http";
            bindings.Add(binding2);
        }

        public static void ShowSites()
        {
            ServerManager manager = new ServerManager();
            foreach (Site item in manager.Sites)
            {
                Console.WriteLine("网站:{0}\t\t{1}", item.Name, item.LogFile.Directory);
                foreach (var app in item.Applications)
                {
                    Console.WriteLine("\t应用:{0}", app.Path);
                }

                foreach (var binding in item.Bindings)
                {
                    IPEndPoint ep = binding.EndPoint;
                    Console.WriteLine(binding.EndPoint.Port);
                }
            }
        }

        public static void AddApplicationPool(string appPoolName)
        {
            ServerManager manager = new ServerManager();
            ApplicationPool myAppPool = manager.ApplicationPools.Add(appPoolName);
            myAppPool.AutoStart = true;
            myAppPool.Cpu.Action = ProcessorAction.KillW3wp;
            myAppPool.ManagedPipelineMode = ManagedPipelineMode.Integrated;
            myAppPool.ManagedRuntimeVersion = "V4.0";
            myAppPool.ProcessModel.IdentityType = ProcessModelIdentityType.NetworkService;
            myAppPool.ProcessModel.IdleTimeout = TimeSpan.FromMinutes(2);
            myAppPool.ProcessModel.MaxProcesses = 1;
            manager.CommitChanges();
        }

        public static void AddSite(string siteName, string sitePoolName, string phyPath)
        {
            ServerManager serverManager = new ServerManager();
            serverManager.Sites.Add(siteName, @"http", "10.101.18.27:8091:", phyPath);
            serverManager.Sites[siteName].ServerAutoStart = true;
            serverManager.ApplicationPools.Remove(serverManager.ApplicationPools[sitePoolName]);
            ApplicationPool pool = serverManager.ApplicationPools.Add(sitePoolName);
            pool.ManagedPipelineMode = ManagedPipelineMode.Integrated;
            pool.ManagedRuntimeVersion = "v4.0";
            serverManager.Sites[siteName].ApplicationDefaults.ApplicationPoolName = pool.Name;
            serverManager.CommitChanges();
        }

        public static bool CreateVdir(string siteName, string vdir, string phydir)
        {
            ServerManager manager = new ServerManager();
            Site mySite = manager.Sites[siteName];
            mySite.Applications.Add("/" + vdir, phydir);
            manager.CommitChanges();
            return true;
        }

        private static void DisplaySections()
        {
            // 获取IIS配置文件:applicationHost.config

            using (ServerManager manager = new ServerManager())
            {
                Configuration configuration = manager.GetAdministrationConfiguration();
                Configuration config = manager.GetApplicationHostConfiguration();

                ConfigurationSection log = config.GetSection("system.applicationHost/log");
                ConfigurationElement logFile = log.GetChildElement("centralW3CLogFile");
                string logPath = logFile.GetAttributeValue("directory").ToString();

                ConfigurationSection configPaths = config.GetSection("configPaths");
                foreach (ConfigurationElement configPath in configPaths.GetCollection())
                {
                    string path = (string)configPath["path"];
                    string locationPath = (string)configPath["locationPath"];

                    Console.WriteLine();

                    Console.WriteLine("Config Path:" + path);
                    if (!String.IsNullOrEmpty(locationPath))
                    {
                        Console.WriteLine("<locationPath path=" + locationPath + "'>");
                    }

                    foreach (ConfigurationElement section in configPath.GetCollection())
                    {
                        Console.WriteLine("  " + section["name"]);
                    }
                }
            }
        }

        private static void DisplaySectionsForSite(string siteName)
        {
            using (ServerManager serverManager = new ServerManager())
            {
                Configuration appHost = serverManager.GetWebConfiguration(siteName);
                ConfigurationSection configPaths = appHost.GetSection("configPaths");

                foreach (ConfigurationElement configPath in configPaths.GetCollection())
                {
                    string path = (string)configPath["path"];
                    string locationPath = (string)configPath["locationPath"];

                    Console.WriteLine();

                    Console.WriteLine("Config Path:" + path);
                    if (!String.IsNullOrEmpty(locationPath))
                    {
                        Console.WriteLine("<locationPath path=" + locationPath + "'>");
                    }

                    foreach (ConfigurationElement section in configPath.GetCollection())
                    {
                        Console.WriteLine(" " + section["name"]);
                    }
                }
            }
        }

        public static void AddVirtualDirectories(string siteName, string applicationName, string virName, string virPath)
        {
            using (ServerManager manager = new ServerManager())
            {
                Application app = manager.Sites[siteName].Applications["/" + applicationName];
                if (app != null)
                {
                    app.VirtualDirectories.Add("/" + virName, virPath);
                }
                manager.CommitChanges();
            }
        }
    }

}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Comments for page "Crazy Love Triangle"</title>
		<link>http://bvs.wikidot.com/forum/t-63386/crazy-love-triangle</link>
		<description>Posts in the discussion thread "Crazy Love Triangle"</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 10 Jul 2022 03:37:38 +0000</lastBuildDate>

				</channel>
</rss>


text:
import assert from 'assert';
import iter from '../src/iter';

describe('last', function() {
    describe('empty', function () {
        it('returns null', function () {
            const result = iter().last();
            assert.deepEqual(result, null);
        });
    });

    describe('values in iter', function () {
        it('returns last value', function () {
            const result = iter.range(1, 3).last();
            assert.deepEqual(result, { value: 2, index: 1 });
        });
    });
});


text:
<?php
use App\Controllers\Admin\AuthNController;
use App\Controllers\Admin\HomeAdminController;
use App\Controllers\Admin\UserAdminController;
use App\Middleware\AuthNMiddleware;

$app->get('/admin/log-in', AuthNController::class.':index')->setName('log-in');
$app->post('/admin/log-in', AuthNController::class.':logIn');
$app->get('/admin/log-out', AuthNController::class.':logOut')->setName('log-out');

$app->group('/admin', function () {
    $this->get('/', HomeAdminController::class.':index')->setName('admin-home');

    $this->group('/users', function () {
        $this->get('/', UserAdminController::class.':index')->setName('admin-users');
        $this->post('/', UserAdminController::class.':create');
        $this->get('/{id:[0-9]+}', UserAdminController::class.':edit');
        $this->post('/{id:[0-9]+}', UserAdminController::class.':submit');
    });
})->add(new AuthNMiddleware($container));


text:
<?php

namespace fangface\tests\models;

use fangface\db\ActiveRecord;
use fangface\tests\models\Country;
use fangface\tests\models\Customer;

/**
 * Active Record class for the clients dbClient.{prefix}addresses table
 *
 * @property integer $id primary key
 * @property integer $customerId ID of customer that the address belongs to
 * @property string $title
 * @property string $forename
 * @property string $surname
 * @property string $jobTitle
 * @property string $company
 * @property string $address1
 * @property string $address2
 * @property string $address3
 * @property string $city
 * @property string $region
 * @property string $countryCode 3 character ISO code for the country
 * @property string $createdAt Date and time record was created
 * @property integer $createdBy	User id of user that created record
 * @property string $modifiedAt Date and time record was last modified
 * @property integer $modifiedBy User id of last user to modify record
 * @property \fangface\tests\models\Country $country
 * @property \fangface\tests\models\Customer $customer
 *
 * @method Address findOne($condition = null) static
 * @method Address[] findAll($condition = null) static
 * @method Address[] findByCondition($condition, $one) static
 */
class Address extends ActiveRecord
{

    protected static $dbResourceName    = 'dbClient';

    public function modelRelationMap()
    {
        return [

            'country' => array(
                'type' => 'hasOne',
                'class' => Country::className(),
                'link' => array(
                    'countryCode' => 'countryCode' // child->var => parent->var (remote => local)
                ),
                'readOnly' => true,
                'canDelete' => false,
                'allToArray' => true,
            ),

            'customer' => array(
                'type' => 'belongsTo',
                'class' => Customer::className(),
                'link' => array(
                    'id' => 'customerId'
                ),
            ),

        ];
    }

}


text:
```bash
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-arm32-vfp-hflt.tar.gz
```

## Extract tar.gz
```bash
tar -zxvf jdk-8u73-linux-arm32-vfp-hflt.gz
```

## Connect to wifi
```bash
sudo nmcli device wifi connect <WIFI_NAME> password <PASSWORD> ifname wlan0
```

## Run with nohup
```bash
nohup java -jar <RUNNABLE_JAR_NAME>  &
```
## SSH error due to IP change
Host key verification failed.

```bash
ssh-keygen -R hostname
```


text:
var sec = sec || {};
sec.geo = sec.geo || {};
sec.geo.shape = sec.geo.shape || {};
sec.geo.shape.Route = function()
{
    this.minAltitudeMeters = 0;
    this.maxAltitudeMeters = 0;
    this.maxDistanceMeters = 0;
    this.flatnessDistanceMeters = 0;
    this.altitudeMode = null;
    this.limit = 0;
    this.leftWidthMeters = 0;
    this.rightWidthMeters = 0;
    this.shape = null;
    this.points = null;
    this.maxDistanceMeters = 100000;
    this.flatnessDistanceMeters = 1;
    this.limit = 4;
    this.points = new java.util.ArrayList();
    this.addPoint = function(point) {
        this.points.add(point);
        this.shapeChanged();
    };
    this.addPoints = function(points) {
        this.points.addAll(points);
        this.shapeChanged();
    };
    this.setLeftWidth = function(widthMeters) {
        this.leftWidthMeters = widthMeters;
        this.shapeChanged();
    };
    this.setRightWidth = function(widthMeters) {
        this.rightWidthMeters = widthMeters;
        this.shapeChanged();
    };
    this.createShape = function() {
        var route = new sec.sun.awt.geom.Area();
        var previousPoint = null;
        for (var i = 0; i < this.points.size(); i++) {
            var point = this.points.get(i);
            if (previousPoint !== null) {
                if (previousPoint.equals(point))
                    continue;
                var block = new sec.geo.GeoBlock2(previousPoint, point, this.leftWidthMeters, this.rightWidthMeters, this.maxDistanceMeters, this.flatnessDistanceMeters, this.limit);
                var area = new sec.sun.awt.geom.Area(new sec.geo.ShapeObject(block));
                route.add(area);
            }
            previousPoint = point;
        }
        return route;
    };
    this.shapeChanged = function() {
        this.shape = null;
    };
    this.getShape = function() {
        if (this.shape === null) {
            this.shape = this.createShape();
        }
        return this.shape;
    };
    this.getMinAltitude = function() {
        return this.minAltitudeMeters;
    };
    this.setMinAltitude = function(minAltitudeMeters) {
        this.minAltitudeMeters = minAltitudeMeters;
        this.shapeChanged();
    };
    this.getMaxAltitude = function() {
        return this.maxAltitudeMeters;
    };
    this.setMaxAltitude = function(maxAltitudeMeters) {
        this.maxAltitudeMeters = maxAltitudeMeters;
        this.shapeChanged();
    };
    this.setMaxDistance = function(maxDistanceMeters) {
        this.maxDistanceMeters = maxDistanceMeters;
        this.shapeChanged();
    };
    this.setFlatness = function(flatnessDistanceMeters) {
        this.flatnessDistanceMeters = flatnessDistanceMeters;
        this.shapeChanged();
    };
    this.setLimit = function(limit) {
        this.limit = limit;
        this.shapeChanged();
    };
    this.getAltitudeMode = function() {
        return this.altitudeMode;
    };
    this.setAltitudeMode = function(altitudeMode) {
        this.altitudeMode = altitudeMode;
    };
};


text:
namespace Blinds.Data
{
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;

    using Blinds.Data.Models;

    public interface IBlindsDbContext
    {
        IDbSet<Blind> Blinds { get; set; }

        IDbSet<BlindType> BlindTypes { get; set; }

        IDbSet<Component> Components { get; set; }

        IDbSet<FabricAndLamel> FabricAndLamels { get; set; }

        IDbSet<Order> Orders { get; set; }

        IDbSet<Rail> Rails { get; set; }

        IDbSet<Picture> Pictures { get; set; }

        IDbSet<T> Set<T>()
            where T : class;

        DbEntityEntry<T> Entry<T>(T entity)
            where T : class;

        int SaveChanges();

        void Dispose();
    }
}


text:
package com.netflix.spinnaker.igor.helm.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class HelmEntry {
  public String digest;
  public String name;
  public String version;
}


text:
#pragma once
#include <aws/email/SES_EXPORTS.h>
#include <aws/email/SESRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/email/model/TrackingOptions.h>
#include <utility>

namespace Aws
{
namespace SES
{
namespace Model
{

  /**
   *
Represents a request to update the tracking options for a configuration set.
   *

See Also:
   AWS
   * API Reference

   */
  class AWS_SES_API UpdateConfigurationSetTrackingOptionsRequest : public SESRequest
  {
  public:
    UpdateConfigurationSetTrackingOptionsRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "UpdateConfigurationSetTrackingOptions"; }

    Aws::String SerializePayload() const override;

  protected:
    void DumpBodyToUrl(Aws::Http::URI& uri ) const override;

  public:

    /**
     *
The name of the configuration set for which you want to update the custom
     * tracking domain.

     */
    inline const Aws::String& GetConfigurationSetName() const{ return m_configurationSetName; }

    /**
     *
The name of the configuration set for which you want to update the custom
     * tracking domain.

     */
    inline bool ConfigurationSetNameHasBeenSet() const { return m_configurationSetNameHasBeenSet; }

    /**
     *
The name of the configuration set for which you want to update the custom
     * tracking domain.

     */
    inline void SetConfigurationSetName(const Aws::String& value) { m_configurationSetNameHasBeenSet = true; m_configurationSetName = value; }

    /**
     *
The name of the configuration set for which you want to update the custom
     * tracking domain.

     */
    inline void SetConfigurationSetName(Aws::String&& value) { m_configurationSetNameHasBeenSet = true; m_configurationSetName = std::move(value); }

    /**
     *
The name of the configuration set for which you want to update the custom
     * tracking domain.

     */
    inline void SetConfigurationSetName(const char* value) { m_configurationSetNameHasBeenSet = true; m_configurationSetName.assign(value); }

    /**
     *
The name of the configuration set for which you want to update the custom
     * tracking domain.

     */
    inline UpdateConfigurationSetTrackingOptionsRequest& WithConfigurationSetName(const Aws::String& value) { SetConfigurationSetName(value); return *this;}

    /**
     *
The name of the configuration set for which you want to update the custom
     * tracking domain.

     */
    inline UpdateConfigurationSetTrackingOptionsRequest& WithConfigurationSetName(Aws::String&& value) { SetConfigurationSetName(std::move(value)); return *this;}

    /**
     *
The name of the configuration set for which you want to update the custom
     * tracking domain.

     */
    inline UpdateConfigurationSetTrackingOptionsRequest& WithConfigurationSetName(const char* value) { SetConfigurationSetName(value); return *this;}

    inline const TrackingOptions& GetTrackingOptions() const{ return m_trackingOptions; }

    inline bool TrackingOptionsHasBeenSet() const { return m_trackingOptionsHasBeenSet; }

    inline void SetTrackingOptions(const TrackingOptions& value) { m_trackingOptionsHasBeenSet = true; m_trackingOptions = value; }

    inline void SetTrackingOptions(TrackingOptions&& value) { m_trackingOptionsHasBeenSet = true; m_trackingOptions = std::move(value); }

    inline UpdateConfigurationSetTrackingOptionsRequest& WithTrackingOptions(const TrackingOptions& value) { SetTrackingOptions(value); return *this;}

    inline UpdateConfigurationSetTrackingOptionsRequest& WithTrackingOptions(TrackingOptions&& value) { SetTrackingOptions(std::move(value)); return *this;}

  private:

    Aws::String m_configurationSetName;
    bool m_configurationSetNameHasBeenSet;

    TrackingOptions m_trackingOptions;
    bool m_trackingOptionsHasBeenSet;
  };

} // namespace Model
} // namespace SES
} // namespace Aws


text:
package com.dumu.housego.entity;

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

public class CheckBoxArea {
	private String city;
	private int ck;

	public static List<CheckBoxArea>checks=new ArrayList<CheckBoxArea>();

	static{
		checks.add(new CheckBoxArea("罗湖区", 1));
		checks.add(new CheckBoxArea("福田区", 2));
		checks.add(new CheckBoxArea("南山区", 3));
		checks.add(new CheckBoxArea("盐田区", 4));
		checks.add(new CheckBoxArea("宝安区", 5));
		checks.add(new CheckBoxArea("龙岗新区", 6));
		checks.add(new CheckBoxArea("龙华新区", 7));
		checks.add(new CheckBoxArea("光明新区", 8));
		checks.add(new CheckBoxArea("坪山新区", 9));
		checks.add(new CheckBoxArea("大鹏新区", 10));
		checks.add(new CheckBoxArea("东莞", 11));
		checks.add(new CheckBoxArea("惠州", 12));

	}

	public CheckBoxArea(String city, int ck) {
		super();
		this.city = city;
		this.ck = ck;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public int getCk() {
		return ck;
	}
	public void setCk(int ck) {
		this.ck = ck;
	}
	public CheckBoxArea() {
		super();
	}
	@Override
	public String toString() {
		return "CheckBoxArea [city=" + city + ", ck=" + ck + "]";
	}

}


text:
*version 2.0*

James Yuzawa:
[http://www.jyuzawa.com](http://www.jyuzawa.com/)

Released under MIT License

A Chrome plugin which checks your WeBWorK answers for proper usage of parentheses.
Usable on any school's WeBWorK installation.


text:
cask "macupdater" do
  version "2.1.1,12344"
  sha256 "ba1990559aba3c15cf5d8dbfaf40b6d8b5eb131845bfbb5c1d7623d3ba336b18"

  url "https://www.corecode.io/downloads/macupdater_#{version.csv.first}.dmg"
  name "MacUpdater"
  desc "Track and update to the latest versions of installed software"
  homepage "https://www.corecode.io/macupdater/index.html"

  livecheck do
    url "https://www.corecode.io/macupdater/macupdater2.xml"
    strategy :sparkle
  end

  auto_updates true

  app "MacUpdater.app"
  binary "#{appdir}/MacUpdater.app/Contents/Resources/macupdater_client"

  uninstall quit:      "com.corecode.MacUpdater",
            launchctl: "com.corecode.MacUpdaterLaunchHelper"

  zap trash: [
    "~/Library/Application Scripts/com.corecode.MacUpdaterLaunchHelper",
    "~/Library/Application Support/MacUpdater",
    "~/Library/Application Support/MacUpdaterInstallHelper",
    "~/Library/Caches/com.corecode.MacUpdater",
    "~/Library/Containers/com.corecode.MacUpdaterLaunchHelper",
    "~/Library/Cookies/com.corecode.MacUpdater.binarycookies",
    "~/Library/Preferences/com.corecode.MacUpdater.plist",
  ]
end


text:
require 'workling/starling/routing/base'

module Workling
  module Starling
    module Routing
      class ClassAndMethodRouting < Base

        def initialize
          super

          build
        end

        def method_name(queue)
          queue.split("__").last
        end

        def queue_for(clazz, method)
          ClassAndMethodRouting.queue_for(clazz, method)
        end

        def self.queue_for(clazz, method)
          "#{ clazz.to_s.tableize }/#{ method }".split("/").join("__") # Don't split with : because it messes up memcache stats
        end

        def queue_names
          self.keys
        end

        def queue_names_routing_class(clazz)
          self.select { |x, y|  y.is_a?(clazz) }.map { |x, y| x }
        end

        private
          def build
            Workling::Discovery.discovered.each do |clazz|
              methods = clazz.instance_methods(false)
              methods.each do |method|
                next if method == 'create'  # Skip the create method
                queue =  queue_for(clazz, method)
                self[queue] = clazz.new
              end
            end
          end
      end
    end
  end
end


text:
namespace sg {

class NormalNode: public Node
{
public:
    NormalNode();
	NormalNode(std::shared_ptr<GenericDataArray<float> > normals);
    virtual ~NormalNode();

	void setNormals(std::shared_ptr<GenericDataArray<float> > normals);

	virtual void renderInit(Renderer* renderer);
    virtual void render(Renderer* renderer);
private:
	std::shared_ptr<GenericDataArray<float> > m_normals;
};

}

#endif // NORMAL_NODE_H


text:
#ifndef __SCF_H__
#define __SCF_H__

#include <stdio.h>
#include <math.h>
#include <stdlib.h>

/* For subhalos: they are low enough order that the hard coded single precison
 * Cna that I wrote are faster than GSL, so don't use GSL
 */

/* For host: Host needs higher orders, and it's hard to hard code the high
 * orders (only up to n=7 for now). So in general, GSL is easier to use and
 * faster. But if my own Cna can be hard coded to sufficiently high order, (instead
 * of relying on recursion), then it's *probably* faster than GSL, but needs
 * to be tested. So, use GSL for host.
 */

// #define USE_GSL_GEGENBAUER_SUBHALO
#define USE_GSL_GEGENBAUER_HOST

#define PI 3.141592653589793
#define ROOT_FOUR_PI 3.54490770181

#define SUBHALO_DECOMPOSE_ORDER 10
#define SUBHALO_ORBIT_ORDER 4

#define G 43016.0e-10

int decompose_nmax;
int decompose_lmax;

int ind(int n, int l, int m);

float Cna(int n, float alpha, float xi);

/* basis functions */
#ifdef USE_GSL_GEGENBAUER_HOST
float Phi_nl(double Cna, int l, float r);
float dPhi_nl_dr(double Cna, float phinl, int n, int l, float r);
#else
float Phi_nl(int n, int l, float r);
float dPhi_nl_dr(float phinl, int n, int l, float r);
#endif

/* spherical routines */
#ifdef USE_GSL_GEGENBAUER_SUBHALO
float Phi_n0(double Cna, float r);
float dPhi_n0_dr(double Cna, float phin0, int n, float r);
#else
float Phi_n0(int n, float r);
float dPhi_n0_dr(float phin0, int n, float r);
#endif

/* These actually do the sum to compute the potential and acceleration */
float scf_potential(float* a, double* mat_cos, double* mat_sin, int orbit_nmax, int orbit_lmax, float x, float y, float z);
float scf_potential_spherical(float* a, float* mat_cos, int orbit_nmax, float x, float y, float z);

#endif


text:
package org.shirolang.values;

import org.shirolang.base.SType;
import org.shirolang.base.SymbolType;

/**
 *
 * A multi-function to represent a boolean in Shiro
 */
public class SBoolean extends SValue<Boolean>{

    /**
     * Creates an SBoolean initialized to false
     */
    public SBoolean(){
        this(false);
    }

    /**
     * Creates an SBoolean with the passed value
     * @param b value to add the SBoolean
     */
    public SBoolean(Boolean b) {
        super(b);
    }

    /**
     * Creates an SBoolean with the passed value
     * @param name name of the boolean
     * @param b value to add the SBoolean
     */
    public SBoolean(String name, Boolean b) {
        super(name, b);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String getType() {
        return SType.BOOLEAN;
    }

    /**
     * Creates a SBoolean with SymbolType PORT
     * @param b value to add the SBoolean
     * @return An SBoolean with it's symbolType field add to
     * SymbolType.PORT
     */
    public static SBoolean createAsPort(Boolean b){
        SBoolean bool = new SBoolean(b);
        bool.setSymbolType(SymbolType.PORT);
        return bool;
    }
}


text:
//------------------------------------------------------------------------------
// <auto-generated>
//    This code was generated from a template.
//
//    Manual changes to this file may cause unexpected behavior in your application.
//    Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Library.Models
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;

    public partial class LibrarySystemEntities : DbContext
    {
        public LibrarySystemEntities()
            : base("name=LibrarySystemEntities")
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            throw new UnintentionalCodeFirstException();
        }

        public DbSet<Book> Books { get; set; }
        public DbSet<Category> Categories { get; set; }
    }
}


text:
//neg.cpp

#include "neg.h"

/**
*	Constructor
*	@param type		specifies on which type (integer, real)to perform the neg operation (StackElementType)
*/
Neg::Neg(StackElementType type) : fType(type) {}

/**
*	Destructor
*/
Neg::~Neg() {}

/**
*	Checks whether the uppermost stackentry is of type integer/real and then negates it.
*	@return			none
*	@param stack	the machine on which the operation is performed (StackMachine*)
*	@exception		ExecutionError
*/
void Neg::execute(StackMachine *stack)
{
	// check if the stack contains at least one entry
	if(stack->fSP < 0)
		throw ExecutionError("instruction neg: requires 1 stackelement to be present.");

	switch(fType)
	{
		case integer:
		{
			StackInteger p1;

			// check if the uppermost stackentry is of type integer
			if(typeid(p1) != typeid(*(stack->fStore[stack->fSP])))
				throw ExecutionError("instruction add: SP does not point to element of type integer.");

			break;
		}
		case real:
		{
			StackReal p1;
			// check if the uppermost stackentry is of type real
			if(typeid(p1) != typeid(*(stack->fStore[stack->fSP])))
				throw ExecutionError("instruction add: SP does not point to element of type real.");

			break;
		}
	}

	// actual operation
	stack->fStore[stack->fSP]->neg();

	// adding cost of this instruction
	stack->fTime.count("neg");
}

/**
*	Prints the instuction into an outputstream
*	@return			reference to ostream filled with the printed instruction
*	@param os		reference to ostream (ostream&)
*	@exception		none
*/
ostream& Neg::print(ostream &os) const
{
	os << "neg " << printStackElementType(fType);
	return os;
}


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;

namespace System.Linq {

	class QueryableTransformer : ExpressionTransformer {

		protected override Expression VisitMethodCall (MethodCallExpression methodCall)
		{
			if (IsQueryableExtension (methodCall.Method))
				return ReplaceQueryableMethod (methodCall);

			return base.VisitMethodCall (methodCall);
		}

		protected override Expression VisitLambda (LambdaExpression lambda)
		{
			return lambda;
		}

		protected override Expression VisitConstant (ConstantExpression constant)
		{
			var qe = constant.Value as IQueryableEnumerable;
			if (qe == null)
				return constant;

			var enumerable = qe.GetEnumerable ();
			if (enumerable != null)
				return Expression.Constant (enumerable);

			return Visit (qe.Expression);
		}

		static bool IsQueryableExtension (MethodInfo method)
		{
			return HasExtensionAttribute (method) &&
				method.GetParameters () [0].ParameterType.IsAssignableTo (typeof (IQueryable));
		}

		static bool HasExtensionAttribute (MethodInfo method)
		{
			return method.GetCustomAttributes (typeof (ExtensionAttribute), false).Length > 0;
		}

		MethodCallExpression ReplaceQueryableMethod (MethodCallExpression old)
		{
			Expression target = null;
			if (old.Object != null)
				target = Visit (old.Object);

			var method = ReplaceQueryableMethod (old.Method);
			var parameters = method.GetParameters ();
			var arguments = new Expression [old.Arguments.Count];

			for (int i = 0; i < arguments.Length; i++) {
				arguments [i] = UnquoteIfNeeded (
					Visit (old.Arguments [i]),
					parameters [i].ParameterType);
			}

			return Expression.Call (target, method, arguments);
		}

		static Expression UnquoteIfNeeded (Expression expression, Type delegateType)
		{
			if (expression.NodeType != ExpressionType.Quote)
				return expression;

			var lambda = (LambdaExpression) ((UnaryExpression) expression).Operand;
			if (lambda.Type == delegateType)
				return lambda;

			return expression;
		}

		static Type GetTargetDeclaringType (MethodInfo method)
		{
			return method.DeclaringType == typeof (Queryable) ? typeof (Enumerable) : method.DeclaringType;
		}

		static MethodInfo ReplaceQueryableMethod (MethodInfo method)
		{
			var target_type = GetTargetDeclaringType (method);
			var result = GetMatchingMethod (method, target_type);

			if (result != null)
				return result;

			throw new InvalidOperationException (
				string.Format (
					"There is no method {0} on type {1} that matches the specified arguments",
					method.Name,
					target_type.FullName));
		}

		static MethodInfo GetMatchingMethod (MethodInfo method, Type declaring)
		{
			foreach (var candidate in declaring.GetMethods ()) {
				if (!MethodMatch (candidate, method))
					continue;

				if (method.IsGenericMethod)
					return candidate.MakeGenericMethodFrom (method);

				return candidate;
			}

			return null;
		}

		static bool MethodMatch (MethodInfo candidate, MethodInfo method)
		{
			if (candidate.Name != method.Name)
				return false;

			if (!HasExtensionAttribute (candidate))
				return false;

			var parameters = method.GetParameterTypes ();

			if (parameters.Length != candidate.GetParameters ().Length)
				return false;

			if (method.IsGenericMethod) {
				if (!candidate.IsGenericMethod)
					return false;

				if (candidate.GetGenericArguments ().Length != method.GetGenericArguments ().Length)
					return false;

				candidate = candidate.MakeGenericMethodFrom (method);
			}

			if (!TypeMatch (candidate.ReturnType, method.ReturnType))
				return false;

			var candidate_parameters = candidate.GetParameterTypes ();

			if (candidate_parameters [0] != GetComparableType (parameters [0]))
				return false;

			for (int i = 1; i < candidate_parameters.Length; ++i)
				if (!TypeMatch (candidate_parameters [i], parameters [i]))
					return false;

			return true;
		}

		static bool TypeMatch (Type candidate, Type type)
		{
			if (candidate == type)
				return true;

			return candidate == GetComparableType (type);
		}

		static Type GetComparableType (Type type)
		{
			if (type.IsGenericInstanceOf (typeof (IQueryable<>)))
				type = typeof (IEnumerable<>).MakeGenericTypeFrom (type);
			else if (type.IsGenericInstanceOf (typeof (IOrderedQueryable<>)))
				type = typeof (IOrderedEnumerable<>).MakeGenericTypeFrom (type);
			else if (type.IsGenericInstanceOf (typeof (Expression<>)))
				type = type.GetFirstGenericArgument ();
			else if (type == typeof (IQueryable))
				type = typeof (IEnumerable);

			return type;
		}
	}
}


text:
using System;
using QuantConnect.Data;
using QuantConnect.Data.UniverseSelection;
using QuantConnect.Interfaces;
using QuantConnect.Packets;

namespace QuantConnect.Lean.Engine.DataFeeds
{
    /// <summary>
    /// Specifies data channel settings
    /// </summary>
    public class DataChannelProvider : IDataChannelProvider
    {
        /// <summary>
        /// Initializes the instance with an algorithm node packet
        /// </summary>
        /// <param name="packet">Algorithm node packet</param>
        public virtual void Initialize(AlgorithmNodePacket packet)
        {
        }

        /// <summary>
        /// True if this subscription request should be streamed
        /// </summary>
        public virtual bool ShouldStreamSubscription(SubscriptionDataConfig config)
        {
            return IsStreamingType(config) || !config.IsCustomData && config.Type != typeof(CoarseFundamental);
        }

        /// <summary>
        /// Returns true if the data type for the given subscription configuration supports streaming
        /// </summary>
        protected static bool IsStreamingType(SubscriptionDataConfig configuration)
        {
            var dataTypeInstance = configuration.Type.GetBaseDataInstance();
            return dataTypeInstance.GetSource(configuration, DateTime.UtcNow, true)
                       .TransportMedium == SubscriptionTransportMedium.Streaming;
        }
    }
}


text:
package com.example.lib.guava;

import java.util.Collection;

import org.junit.Test;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;

/**
 *

 * Immutable objects have many advantages, including:
 *
 * Safe for use by untrusted libraries.
 * Thread-safe: can be used by many threads with no risk of race conditions.
 * Doesn't need to support mutation, and can make time and space savings with that assumption. All immutable collection implementations are more memory-efficient than their mutable siblings (analysis)
 * Can be used as a constant, with the expectation that it will remain fixed
 * Making immutable copies of objects is a good defensive programming technique. Guava provides simple, easy-to-use immutable versions of each standard Collection type, including Guava's own Collection variations.
 *

 *
 * @author david
 *
 */
public class ImmutableCollectionsExplained {

	public static final ImmutableSet<String> COLOR_NAMES = ImmutableSet.of("red", "orange", "yellow", "green", "blue", "purple");

	@Test
	public void testImmutableCollections() {
		boolean contains = COLOR_NAMES.contains("red");
		System.out.println(contains);
	}

	@Test
	public void testOf() {
		// Except for sorted collections, order is preserved from construction
		// time. For example,
		ImmutableSet<String> e = ImmutableSet.of("e", "a", "b", "c", "a", "d", "b");
		System.out.println(e);
	}

	/**
	 *

	 * It is useful to remember that ImmutableXXX.copyOf attempts to avoid copying the data when it is safe to do so -- the exact details are unspecified, but the implementation is typically "smart". For example,
	 *
	 * ImmutableSet<String> foobar = ImmutableSet.of("foo", "bar", "baz");
	 * thingamajig(foobar);
	 *
	 * void thingamajig(Collection<String> collection) {
	 *    ImmutableList<String> defensiveCopy = ImmutableList.copyOf(collection);
	 *    ...
	 * }
	 * In this code, ImmutableList.copyOf(foobar) will be smart enough to just return foobar.asList(), which is a constant-time view of the ImmutableSet.
	 *
	 * As a general heuristic, ImmutableXXX.copyOf(ImmutableCollection) tries to avoid a linear-time copy if
	 *
	 * it's possible using the underlying data structures in constant time. For example, ImmutableSet.copyOf(ImmutableList) can't be done in constant time.
	 * it wouldn't cause memory leaks -- for example, if you have ImmutableList<String> hugeList, and you do ImmutableList.copyOf(hugeList.subList(0, 10)), an explicit copy is performed, so as to avoid accidentally holding on to references in hugeList that aren't needed.
	 * it won't change performance asymptotics -- so ImmutableSet.copyOf(myImmutableSortedSet) will perform an explicit copy, because the O(1) hash-based lookup of an ImmutableSet is better than the O(log n) performance in an ImmutableSortedSet.
	 * This helps minimize the performance overhead of good defensive programming style.
	 *

	 */
	@Test
	public void testCopyOf() {
		ImmutableSet<String> foobar = ImmutableSet.of("foo", "bar", "baz");
		thingamajig(foobar);
	}

	/**
	 *

	 * asList
	 * All immutable collections provide an ImmutableList view via asList(), so -- for example -- even if you have data stored as an ImmutableSortedSet, you can get the kth smallest element with sortedSet.asList().get(k).
	 *
	 * The returned ImmutableList is frequently -- not always, but frequently -- a constant-overhead view, rather than an explicit copy. That said, it's often smarter than your average List -- for example, it'll use the efficient contains methods of the backing collection.
	 *
	 * Interface	 JDK or Guava?	 Immutable Version
	 * Collection	 JDK	ImmutableCollection
	 * List	 JDK	ImmutableList
	 * Set	 JDK	ImmutableSet
	 * SortedSet	 JDK	ImmutableSortedSet
	 * Map	 JDK	ImmutableMap
	 * SortedMap	 JDK	ImmutableSortedMap
	 * Multiset	 Guava	ImmutableMultiset
	 * Multimap	 Guava	ImmutableMultimap
	 * ListMultimap	 Guava	ImmutableListMultimap
	 * SetMultimap	 Guava	ImmutableSetMultimap
	 * BiMap	 Guava	ImmutableBiMap
	 * ClassToInstanceMap	 Guava	ImmutableClassToInstanceMap
	 * Table	 Guava	ImmutableTable
	 *

	 *
	 * @param collection
	 */
	void thingamajig(Collection<String> collection) {
		ImmutableList<String> defensiveCopy = ImmutableList.copyOf(collection).subList(0, 2);
		for (String string : defensiveCopy) {
			System.out.println(string);
		}
	}
}


text:
#pragma once

#include "generatorBase/robotsGeneratorDeclSpec.h"
#include "generatorBase/controlFlowGeneratorBase.h"
#include "generatorBase/semanticTree/semanticTree.h"
#include "rules/semanticTransformationRule.h"

namespace generatorBase {

/// Generates semantic tree in readable style. Code is represented in readable by
/// human style: it consists of if-operators, loop-blocks, switches and so on.
/// If control flow can`t be represented with structured code generation process
/// is considered to be unsuccessfull.
class ROBOTS_GENERATOR_EXPORT ReadableControlFlowGenerator : public ControlFlowGeneratorBase
{
	Q_OBJECT

public:
	ReadableControlFlowGenerator(
			const qrRepo::RepoApi &repo
			, qReal::ErrorReporterInterface &errorReporter
			, GeneratorCustomizer &customizer
			, PrimaryControlFlowValidator &validator
			, const qReal::Id &diagramId
			, QObject *parent = 0
			, bool isThisDiagramMain = true);

	/// Implementation of clone operation for readable generator
	ControlFlowGeneratorBase *cloneFor(const qReal::Id &diagramId, bool cloneForNewDiagram) override;

	void beforeSearch() override;

	void visitRegular(const qReal::Id &id, const QList<LinkInfo> &links) override;
	void visitConditional(const qReal::Id &id, const QList<LinkInfo> &links) override;
	void visitLoop(const qReal::Id &id, const QList<LinkInfo> &links) override;
	void visitSwitch(const qReal::Id &id, const QList<LinkInfo> &links) override;

	/// This method can be used for semantic tree debug printing after all
	/// traversal stages.
	void afterSearch() override;

	/// Returns true if some generation errors occured but the generation process may be proceeded with other
	/// control flow generators (non-fatal errors occured).
	bool cantBeGeneratedIntoStructuredCode() const;

private:
	/// Implementation of generation process for readable generator.
	/// Important: the graph in the model would be traversed two or more times
	/// for the emulation of some priority for semantic rules.
	void performGeneration() override;

	bool applyFirstPossible(const qReal::Id &currentId
			, QList<semantics::SemanticTransformationRule *> const &rules
			, bool thereWillBeMoreRules);

	bool mTravelingForSecondTime;
	bool mSomethingChangedThisIteration;
	QMap<qReal::Id, bool> mAlreadyApplied;
	bool mCantBeGeneratedIntoStructuredCode;
};

}


text:
package CinciPM::IRCLogs::DataObjects::IrcChannel::Manager;

use strict;

use base qw(Rose::DB::Object::Manager);

use CinciPM::IRCLogs::DataObjects::IrcChannel;

sub object_class { 'CinciPM::IRCLogs::DataObjects::IrcChannel' }

__PACKAGE__->make_manager_methods('irc_channels');

1;


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="RippleRelativeView">
        <attr name="rv_alpha" format="integer" />
        <attr name="rv_framerate" format="integer"/>
        <attr name="rv_rippleDuration" format="integer"/>
        <attr name="rv_zoomDuration" format="integer" />
        <attr name="rv_color" format="color" />
        <attr name="rv_centered" format="boolean" />
        <attr name="rv_type" format="enum">
            <enum name="simpleRipple" value="0"/>
            <enum name="doubleRipple" value="1"/>
            <enum name="rectangle" value="2" />
        </attr>
        <attr name="rv_ripplePadding" format="dimension" />
        <attr name="rv_zoom" format="boolean" />
        <attr name="rv_zoomScale" format="float" />

    </declare-styleable>

</resources>


text:
//Get candidate results for searched address
function LocateAddress() {
    var thisSearchTime = lastSearchTime = (new Date()).getTime();
    noRoute = false;
    dojo.byId("imgSearchLoader").style.display = "block";
    if (dojo.byId("txtAddress").value.trim() == '') {
        dojo.byId("imgSearchLoader").style.display = "none";
        RemoveChildren(dojo.byId('tblAddressResults'));
        CreateScrollbar(dojo.byId("divAddressScrollContainer"), dojo.byId("divAddressScrollContent"));
        if (dojo.byId("txtAddress").value != "") {
            alert(messages.getElementsByTagName("addressToLocate")[0].childNodes[0].nodeValue);
        }
        return;
    }
    var address = [];
    address[locatorSettings.LocatorParameters[0]] = dojo.byId('txtAddress').value + ", St. John's, NL";

    var locator1 = new esri.tasks.Locator(locatorSettings.LocatorURL);
    locator1.outSpatialReference = map.spatialReference;
    locator1.addressToLocations(address, ["Loc_name"], function (candidates) {
        // Discard searches made obsolete by new typing from user
        if (thisSearchTime < lastSearchTime) {
            return;
        }
        ShowLocatedAddress(candidates);
    },
    function (err) {
        dojo.byId("imgSearchLoader").style.display = "none";
        selectedPollPoint = null;
        featureID = null;
        LoctorErrBack("unableToLocate");
    });
}

//Populate candidate address list in address container
function ShowLocatedAddress(candidates) {
    RemoveChildren(dojo.byId('tblAddressResults'));
    CreateScrollbar(dojo.byId("divAddressScrollContainer"), dojo.byId("divAddressScrollContent"));

    if (candidates.length > 0) {
        var table = dojo.byId("tblAddressResults");
        var tBody = document.createElement("tbody");
        table.appendChild(tBody);
        table.cellSpacing = 0;
        table.cellPadding = 0;

        //Filter and display valid address results according to locator settings in configuration file
        var counter = 0;
        for (var i = 0; i < candidates.length; i++) {
            if (candidates[i].score > locatorSettings.AddressMatchScore) {
                for (var bMap = 0; bMap < baseMapLayers.length; bMap++) {
                    if (map.getLayer(baseMapLayers[bMap].Key).visible) {
                        var bmap = baseMapLayers[bMap].Key;
                    }
                }

                if (map.getLayer(bmap).fullExtent.contains(candidates[i].location)) {
                    for (j in locatorSettings.LocatorFieldValues) {
                        if (candidates[i].attributes[locatorSettings.LocatorFieldName] == locatorSettings.LocatorFieldValues[j]) {
                            counter++;
                            var candidate = candidates[i];
                            var tr = document.createElement("tr");
                            tBody.appendChild(tr);
                            var td1 = document.createElement("td");
                            td1.innerHTML = candidate.address;
                            td1.align = "left";
                            td1.className = 'bottomborder';
                            td1.style.cursor = "pointer";
                            td1.height = 20;
                            td1.setAttribute("x", candidate.location.x);
                            td1.setAttribute("y", candidate.location.y);
                            td1.setAttribute("address", candidate.address);
                            td1.onclick = function () {
                                dojo.byId("txtAddress").value = this.innerHTML;
                                lastSearchString = dojo.byId("txtAddress").value.trim();
                                dojo.byId('txtAddress').setAttribute("defaultAddress", this.innerHTML);
                                dojo.byId("txtAddress").setAttribute("defaultAddressTitle", this.innerHTML);
                                mapPoint = new esri.geometry.Point(this.getAttribute("x"), this.getAttribute("y"), map.spatialReference);
                                LocateGraphicOnMap(true);
                            }
                            tr.appendChild(td1);
                        }
                    }
                }
            }
        }

        //Display error message if there are no valid candidate addresses
        if (counter == 0) {
            var tr = document.createElement("tr");
            tBody.appendChild(tr);
            var td1 = document.createElement("td");
            td1.innerHTML = messages.getElementsByTagName("noSearchResults")[0].childNodes[0].nodeValue;
            tr.appendChild(td1);
            dojo.byId("imgSearchLoader").style.display = "none";
            return;
        }
        dojo.byId("imgSearchLoader").style.display = "none";
        SetAddressResultsHeight();
    }
    else {
        dojo.byId("imgSearchLoader").style.display = "none";
        map.infoWindow.hide();
        selectedPollPoint = null;
        pollPoint = null;
        mapPoint = null;
        featureID = null;
        ClearSelection();
        map.getLayer(tempGraphicsLayerId).clear();
        map.getLayer(precinctLayerId).clear();
        map.getLayer(routeGraphicsLayerId).clear();
        map.getLayer(highlightPollLayerId).clear();
        if (!isMobileDevice) {
            var imgToggle = dojo.byId('imgToggleResults');
            if (imgToggle.getAttribute("state") == "maximized") {
                imgToggle.setAttribute("state", "minimized");
                WipeOutResults();
                dojo.byId('imgToggleResults').src = "images/up.png";
                dojo.byId('imgToggleResults').title = "Show Panel";
            }
        }
        LoctorErrBack("noSearchResults");
    }
}

//Locate searched address on map with pushpin graphic
function LocateGraphicOnMap(loc) {
    map.infoWindow.hide();
    selectedPollPoint = null;
    featureID = null;
    ClearGraphics();
    if (!map.getLayer(precinctLayerId).fullExtent.contains(mapPoint)) {
        map.infoWindow.hide();
        selectedPollPoint = null;
        pollPoint = null;
        featureID = null;
        mapPoint = null;
        ClearSelection();
        map.getLayer(tempGraphicsLayerId).clear();
        map.getLayer(precinctLayerId).clear();
        map.getLayer(routeGraphicsLayerId).clear();
        map.getLayer(highlightPollLayerId).clear();
        if (!isMobileDevice) {
            var imgToggle = dojo.byId('imgToggleResults');
            if (imgToggle.getAttribute("state") == "maximized") {
                imgToggle.setAttribute("state", "minimized");
                WipeOutResults();
                dojo.byId('imgToggleResults').src = "images/up.png";
            }
        }
        HideAddressContainer();
        HideProgressIndicator();
        alert(messages.getElementsByTagName("noDataAvlbl")[0].childNodes[0].nodeValue);
        return;
    }
    if (loc) {
        var symbol = new esri.symbol.PictureMarkerSymbol(locatorSettings.DefaultLocatorSymbol, locatorSettings.SymbolSize.width, locatorSettings.SymbolSize.height);
        var graphic = new esri.Graphic(mapPoint, symbol, null, null);
        map.getLayer(tempGraphicsLayerId).add(graphic);
    }
    else {
        var locator2 = new esri.tasks.Locator(locatorSettings.LocatorURL);
        locator2.locationToAddress(mapPoint, 100);
        dojo.connect(locator2, "onLocationToAddressComplete", function (candidate) {
            if (candidate.address) {
                var symbol = new esri.symbol.PictureMarkerSymbol(locatorSettings.DefaultLocatorSymbol, locatorSettings.SymbolSize.width, locatorSettings.SymbolSize.height);
                var attr = [];
                if (candidate.address.Loc_name == "US_Zipcode") {
                    attr = { Address: candidate.address.Zip };
                }
                else {
                    var address = [];
                    for (var att in locatorSettings.LocatorFields) {
                        address.push(candidate.address[locatorSettings.LocatorFields[att]]);
                    }
                    attr = { Address: address.join(',') };
                }
                var graphic = new esri.Graphic(mapPoint, symbol, attr, null);
                map.getLayer(tempGraphicsLayerId).add(graphic);
            }
        });
    }
    FindPrecinctLayer();
    if (!isMobileDevice) {
        ShowPollingPlaceDetails();
        for (var index in electedOfficialsTabData) {
            GetOfficeName(electedOfficialsTabData[index].URL, electedOfficialsTabData[index].Data, index);
        }
    }
    HideAddressContainer();
}

//This function is called when locator service fails or does not return any data
function LoctorErrBack(val) {
    RemoveChildren(dojo.byId('tblAddressResults'));
    CreateScrollbar(dojo.byId("divAddressScrollContainer"), dojo.byId("divAddressScrollContent"));

    var table = dojo.byId("tblAddressResults");
    var tBody = document.createElement("tbody");
    table.appendChild(tBody);
    table.cellSpacing = 0;
    table.cellPadding = 0;

    var tr = document.createElement("tr");
    tBody.appendChild(tr);
    var td1 = document.createElement("td");
    td1.innerHTML = messages.getElementsByTagName(val)[0].childNodes[0].nodeValue;
    tr.appendChild(td1);
}


text:
from conans import ConanFile, CMake

class AversivePlusPlusModuleConan(ConanFile):
    name = "device"
    version = "0.1"
    exports = "*.hpp"

    def package(self):
        self.copy("*.hpp", src="include", dst="include")


text:
/**
 * @file feature_drawer.h
 * @brife draws features and matches on panorma images
 * This class is a feature drawer that draws the keypoints found on a scan on a panorama image of the scan.
 * It also draws the matches between two scan on panorama images and draw a line between them.
 * @author HamidReza Houshiar. Jacobs University Bremen gGmbH, Germany.
 */

#ifndef FEATURE_DRAWER_H_
#define FEATURE_DRAWER_H_

#include "fbr_global.h"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/internal.hpp"

namespace fbr{

  const int draw_shift_bits = 4;
  const int draw_multiplier = 1 << draw_shift_bits;
  /**
   * @class feature_drawer : draws keypoints on panorama images and also matches between two panorama image
   */
  class feature_drawer{

    void _DrawKeypoint( cv::Mat& img, const cv::KeyPoint& p, const cv::Scalar& color, int flags );
    void _PrepareImgAndDrawKeypoints( const cv::Mat& img1, const vector<cv::KeyPoint>& keypoints1,
				      const cv::Mat& img2, const vector<cv::KeyPoint>& keypoints2,
				      cv::Mat& outImg, cv::Mat& outImg1, cv::Mat& outImg2,
				      const cv::Scalar& singlePointColor, int flags );
    void _DrawMatch( cv::Mat& outImg, cv::Mat& outImg1, cv::Mat& outImg2 ,
		     const cv::KeyPoint& kp1, const cv::KeyPoint& kp2, const cv::Scalar& matchColor, int flags );
  public:
    void DrawKeypoints( const cv::Mat& image, const vector<cv::KeyPoint>& keypoints, cv::Mat& outImage,
			const cv::Scalar& _color, int flags );
    void DrawMatches( const cv::Mat& img1, const vector<cv::KeyPoint>& keypoints1,
		      const cv::Mat& img2, const vector<cv::KeyPoint>& keypoints2,
		      const vector<cv::DMatch>& matches1to2, cv::Mat& outImg,
		      const cv::Scalar& matchColor, const cv::Scalar& singlePointColor,
		      const vector<char>& matchesMask, int flags );
    void DrawMatches( const cv::Mat& img1, const vector<cv::KeyPoint>& keypoints1,
		      const cv::Mat& img2, const vector<cv::KeyPoint>& keypoints2,
		      const vector<vector<cv::DMatch> >& matches1to2, cv::Mat& outImg,
		      const cv::Scalar& matchColor, const cv::Scalar& singlePointColor,
		      const vector<vector<char> >& matchesMask, int flags );
  };
}
#endif /*FEATURE_DRAWER_H*/


text:
namespace Statr.Server.Configuration
{
    public interface IConfigWatcher
    {
        void NotifyConfigChanged(Config config);
    }
}


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

      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <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>Federico García Lorca en Richter Library</title>
      <link href="../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
      <link href="../css/the-big-picture.css" rel="stylesheet" />

SPA 322 Cultural Topics<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"></button>

Proyecto

Cronología

Viajes

Galería

Cartas(current)

Bibliografía

Carta de Federico García Lorca a José María Chacón y Calvo
Editada por: Gabriela Díaz
Colección: Federico García Lorca Papers, Library Digital Collections, University of Miami
ID: chc5324000015
Lugar y fecha: San Pascual, España,  26 de julio de 1923
Tamaño:
                  18cm
                  14cm

Nota:
                  Federico García Lorca escribió está carta a José María Chacón y Calvo
                  cuando éste mandó ejemplares de "Libro de Poemas", escrito por Lorca, a
                  Cuba.  Podía haber sido escrita en la región de Castilla y León
                  debido a que la carta menciona San Pascual. Para Lorca, Chacón fue
                  un puente entre España y América. En la carta, Lorca agradece Enrique
                  Loynaz por sus comentarios sobre "Libro de Poemas". También,
                  menciona la alegría que siente por la fundación de arte popular.
                  Lorca avisa a Chacón que irá a Granada para hablar con Manuel Falla sobre
                  la fundación.  Está carta entre Lorca y Chacón demuestra el
                  entusiasmo que Lorca siente por sus posibilidades como escritor ya
                  que él estaba en los principios de su carrera
                 (EpComp 193-194; Ripoll 4: 52).

San Pascual-Apeadero-Granada-Recibida el 2 de Agosto

Queridisimo José María

 !Como me alegró tu carta! Pero...fue tardía, tú debiste/ contestarme
                     enseguida...ya no me fío de ti! Viajero impediente!

 Agredezco mucho los elogios de Loynaz; de ese muchacho/ pálido y febril
                     que tiene una terrible enfermedad de lirios y círculos/ concéntricos, pero
                     él todavía no me conoce (lo digo con cierto/ orgullo) mi alma avanza
                     disolviendo nieblas y revelando cielos/ con una florecita de angustia y
                     amor sobre la frente; mi alma/ brinca y canta por perspectivas que Loynaz
                     no supone en este/ momento.! Si vieras que efecto mas raro, mas frio me
                     produce él / que que (sic) me digan Lorca! Yo soy Federico pero no soy
                     Lorca/ ¿no lo ves tú así?

 Me siento traspasado por todas las cosas; a veces imaginó / que tengo una
                     coronita de

luciérnagas y que yo soy otra cosa./ Creo que nunca seremos puros porque
                     poseemos la cualdidad / de distinguir y juzgar... pero por más esfuerzos
                     que hago, el/ viento no quiere darme lección...y he de permanecer así hasta
                     / que sea viejecito buscando la cartilla inefable y verdadera de/ la
                     brisa.

 Oye José María, no sabes la alegría que me das con la / fundación de esa
                     sociedad de arte popular que tanto bien puede/ hacer revelando los cauces
                     puros del carácter de España! de España!/ (me emociono alegremente pensando
                     en mi país.)Yo creo que Falla / se pondra contentísimo con esa idea, mañana
                     voy a Granada unas / horas y hablare con él. Cuéntame de esto más
                     cosas.

 La conversación con Canedo en tu casa, la he recordado / varias veces y os
                     agredezco con el alma que os acordarais de mi/ Canedo es un hombre por
                     quien siento un respeto extraordinario,/ un gran cariño y mi más honda
                     admiración.No sé si tú sabes / (!casi como Calderón!) que le he pedido un
                     prólogo para el libro / de Monje y

 él me lo ha ofrecido gustoso.

 He recibido libros de varios jóvenes poetas portugueses / ! Ya te hablaré!
                     Abrazos cordiales de / Federico

 Adiós. Ahora mismo comienza una gran tormenta.Los/ truenos como grandes
                     brasas de hierro negro que rodaran sobre / una pendiente de pierda lisa,
                     hacen temblar los cristales de una/ casa. !Señor! acuérdate de los rebaños
                     que viven en el monte / de las garbas de trigo abandonadas sobre el
                     rastrojo! Entre la / luz cenicienta mi madre y mis hermanas dicen ! Santo
                     Semana Santo!/ Yo como el caracol, encojó mis cuernecitos de poesía

2 de Agosto


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#0000ff">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:text="自定义的通知"
        android:gravity="center"/>
</LinearLayout>


text:
using System.Drawing;

namespace SharpVectors.Dom.Svg
{
	/// <summary>
	/// The SvgRectElement interface corresponds to the 'rect' element.
	/// </summary>
	/// <developer>niklas@protocol7.com</developer>
	/// <completed>100</completed>
	public interface ISvgImageElement :
		ISvgElement,
		ISvgTests,
		ISvgStylable,
		ISvgTransformable,
		ISvgLangSpace,
		ISvgExternalResourcesRequired
		/*,
		org.w3c.dom.event.IEventTarget*/

	{
		/// <summary>
		/// Corresponds to attribute x on the given 'rect' element.
		/// </summary>
		ISvgAnimatedLength X{get;}

		/// <summary>
		/// Corresponds to attribute y on the given 'rect' element.
		/// </summary>
		ISvgAnimatedLength Y{get;}

		/// <summary>
		/// Corresponds to attribute width on the given 'rect' element.
		/// </summary>
		ISvgAnimatedLength Width{get;}

		/// <summary>
		/// Corresponds to attribute height on the given 'rect' element.
		/// </summary>
		ISvgAnimatedLength Height{get;}

		ISvgAnimatedPreserveAspectRatio PreserveAspectRatio{get;}
	}
}


text:
'use strict';

var forIn = require('for-in');
var define = require('define-property');
var lib = require('./lib/');

/**
 * Expose helpers
 */

module.exports = function helpers(groups, options) {
  if (typeof groups === 'string') {
    groups = [groups];
  } else if (!Array.isArray(groups)) {
    options = groups;
    groups = null;
  }

  options = options || {};
  var hbs = options.handlebars || options.hbs || require('handlebars');
  define(module.exports, 'handlebars', hbs);

  if (groups) {
    groups.forEach(function(key) {
      hbs.registerHelper(lib[key]);
    });
  } else {
    forIn(lib, function(group, key) {
      hbs.registerHelper(group);
    });
  }

  return hbs.helpers;
};

/**
 * Expose helper groups
 */

forIn(lib, function(group, key) {
  define(module.exports, key, function(options) {
    options = options || {};
    var hbs = options.handlebars || options.hbs || require('handlebars');
    define(module.exports, 'handlebars', hbs);
    hbs.registerHelper(group);
    return hbs.helpers;
  });
});

/**
 * Expose `utils`
 */

module.exports.utils = require('./lib/utils');