text:
namespace TimeOut
{
	partial class SelectTeams
	{
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}

		#region Windows Form Designer generated code

		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SelectTeams));
            this.panel1 = new System.Windows.Forms.Panel();
            this.interactiveLabelL = new System.Windows.Forms.Label();
            this.button_acceptSelectionL = new System.Windows.Forms.Button();
            this.pictureBox_logoLocal = new System.Windows.Forms.PictureBox();
            this.listBox_localTeams = new System.Windows.Forms.ListBox();
            this.label1 = new System.Windows.Forms.Label();
            this.panel2 = new System.Windows.Forms.Panel();
            this.interactiveLabelV = new System.Windows.Forms.Label();
            this.button_acceptSelectionV = new System.Windows.Forms.Button();
            this.pictureBox_logoVisitor = new System.Windows.Forms.PictureBox();
            this.listBox_visitorTeams = new System.Windows.Forms.ListBox();
            this.label2 = new System.Windows.Forms.Label();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.button_modifyTeam = new System.Windows.Forms.Button();
            this.button_addTeam = new System.Windows.Forms.Button();
            this.panel1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox_logoLocal)).BeginInit();
            this.panel2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox_logoVisitor)).BeginInit();
            this.groupBox1.SuspendLayout();
            this.SuspendLayout();
            //
            // panel1
            //
            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel1.Controls.Add(this.interactiveLabelL);
            this.panel1.Controls.Add(this.button_acceptSelectionL);
            this.panel1.Controls.Add(this.pictureBox_logoLocal);
            this.panel1.Controls.Add(this.listBox_localTeams);
            this.panel1.Controls.Add(this.label1);
            this.panel1.Location = new System.Drawing.Point(26, 29);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(307, 185);
            this.panel1.TabIndex = 0;
            //
            // interactiveLabelL
            //
            this.interactiveLabelL.AutoSize = true;
            this.interactiveLabelL.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.interactiveLabelL.Location = new System.Drawing.Point(34, 142);
            this.interactiveLabelL.Name = "interactiveLabelL";
            this.interactiveLabelL.Size = new System.Drawing.Size(168, 31);
            this.interactiveLabelL.TabIndex = 5;
            this.interactiveLabelL.Text = "Ready! No?";
            this.interactiveLabelL.Visible = false;
            this.interactiveLabelL.Click += new System.EventHandler(this.interactiveLabel_Click);
            //
            // button_acceptSelectionL
            //
            this.button_acceptSelectionL.BackColor = System.Drawing.Color.LimeGreen;
            this.button_acceptSelectionL.Location = new System.Drawing.Point(184, 144);
            this.button_acceptSelectionL.Name = "button_acceptSelectionL";
            this.button_acceptSelectionL.Size = new System.Drawing.Size(113, 29);
            this.button_acceptSelectionL.TabIndex = 2;
            this.button_acceptSelectionL.Text = "Aceptar";
            this.button_acceptSelectionL.UseVisualStyleBackColor = false;
            this.button_acceptSelectionL.Visible = false;
            this.button_acceptSelectionL.Click += new System.EventHandler(this.button_acceptSelection_Click);
            //
            // pictureBox_logoLocal
            //
            this.pictureBox_logoLocal.Image = global::TimeOut.Properties.Resources.TEAM_A;
            this.pictureBox_logoLocal.Location = new System.Drawing.Point(40, 50);
            this.pictureBox_logoLocal.Name = "pictureBox_logoLocal";
            this.pictureBox_logoLocal.Size = new System.Drawing.Size(109, 80);
            this.pictureBox_logoLocal.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            this.pictureBox_logoLocal.TabIndex = 2;
            this.pictureBox_logoLocal.TabStop = false;
            //
            // listBox_localTeams
            //
            this.listBox_localTeams.FormattingEnabled = true;
            this.listBox_localTeams.Items.AddRange(new object[] {
            ""});
            this.listBox_localTeams.Location = new System.Drawing.Point(184, 4);
            this.listBox_localTeams.Name = "listBox_localTeams";
            this.listBox_localTeams.ScrollAlwaysVisible = true;
            this.listBox_localTeams.Size = new System.Drawing.Size(113, 134);
            this.listBox_localTeams.Sorted = true;
            this.listBox_localTeams.TabIndex = 1;
            this.listBox_localTeams.SelectedValueChanged += new System.EventHandler(this.listBox_SelectedValueChanged);
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label1.Location = new System.Drawing.Point(4, 4);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(158, 15);
            this.label1.TabIndex = 0;
            this.label1.Text = "Seleccione el equipo Local:";
            //
            // panel2
            //
            this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel2.Controls.Add(this.interactiveLabelV);
            this.panel2.Controls.Add(this.button_acceptSelectionV);
            this.panel2.Controls.Add(this.pictureBox_logoVisitor);
            this.panel2.Controls.Add(this.listBox_visitorTeams);
            this.panel2.Controls.Add(this.label2);
            this.panel2.Location = new System.Drawing.Point(339, 29);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(307, 185);
            this.panel2.TabIndex = 2;
            //
            // interactiveLabelV
            //
            this.interactiveLabelV.AutoSize = true;
            this.interactiveLabelV.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.interactiveLabelV.Location = new System.Drawing.Point(38, 141);
            this.interactiveLabelV.Name = "interactiveLabelV";
            this.interactiveLabelV.Size = new System.Drawing.Size(168, 31);
            this.interactiveLabelV.TabIndex = 6;
            this.interactiveLabelV.Text = "Ready! No?";
            this.interactiveLabelV.Visible = false;
            this.interactiveLabelV.Click += new System.EventHandler(this.interactiveLabel_Click);
            //
            // button_acceptSelectionV
            //
            this.button_acceptSelectionV.BackColor = System.Drawing.Color.LimeGreen;
            this.button_acceptSelectionV.Location = new System.Drawing.Point(184, 144);
            this.button_acceptSelectionV.Name = "button_acceptSelectionV";
            this.button_acceptSelectionV.Size = new System.Drawing.Size(113, 29);
            this.button_acceptSelectionV.TabIndex = 4;
            this.button_acceptSelectionV.Text = "Aceptar";
            this.button_acceptSelectionV.UseVisualStyleBackColor = false;
            this.button_acceptSelectionV.Visible = false;
            this.button_acceptSelectionV.Click += new System.EventHandler(this.button_acceptSelection_Click);
            //
            // pictureBox_logoVisitor
            //
            this.pictureBox_logoVisitor.Image = global::TimeOut.Properties.Resources.TEAM_B;
            this.pictureBox_logoVisitor.Location = new System.Drawing.Point(44, 50);
            this.pictureBox_logoVisitor.Name = "pictureBox_logoVisitor";
            this.pictureBox_logoVisitor.Size = new System.Drawing.Size(109, 80);
            this.pictureBox_logoVisitor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            this.pictureBox_logoVisitor.TabIndex = 2;
            this.pictureBox_logoVisitor.TabStop = false;
            //
            // listBox_visitorTeams
            //
            this.listBox_visitorTeams.FormattingEnabled = true;
            this.listBox_visitorTeams.Items.AddRange(new object[] {
            ""});
            this.listBox_visitorTeams.Location = new System.Drawing.Point(184, 4);
            this.listBox_visitorTeams.Name = "listBox_visitorTeams";
            this.listBox_visitorTeams.ScrollAlwaysVisible = true;
            this.listBox_visitorTeams.Size = new System.Drawing.Size(113, 134);
            this.listBox_visitorTeams.Sorted = true;
            this.listBox_visitorTeams.TabIndex = 3;
            this.listBox_visitorTeams.SelectedValueChanged += new System.EventHandler(this.listBox_SelectedValueChanged);
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label2.Location = new System.Drawing.Point(4, 4);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(174, 15);
            this.label2.TabIndex = 0;
            this.label2.Text = "Seleccione el equipo Visitante:";
            //
            // groupBox1
            //
            this.groupBox1.Controls.Add(this.button_modifyTeam);
            this.groupBox1.Controls.Add(this.button_addTeam);
            this.groupBox1.Location = new System.Drawing.Point(26, 220);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(620, 110);
            this.groupBox1.TabIndex = 3;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Equipos";
            //
            // button_modifyTeam
            //
            this.button_modifyTeam.Enabled = false;
            this.button_modifyTeam.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button_modifyTeam.Location = new System.Drawing.Point(313, 19);
            this.button_modifyTeam.Name = "button_modifyTeam";
            this.button_modifyTeam.Size = new System.Drawing.Size(298, 77);
            this.button_modifyTeam.TabIndex = 6;
            this.button_modifyTeam.Text = "Modificar un equipo";
            this.button_modifyTeam.UseVisualStyleBackColor = true;
            //
            // button_addTeam
            //
            this.button_addTeam.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button_addTeam.Location = new System.Drawing.Point(7, 20);
            this.button_addTeam.Name = "button_addTeam";
            this.button_addTeam.Size = new System.Drawing.Size(300, 77);
            this.button_addTeam.TabIndex = 5;
            this.button_addTeam.Text = "Agregar equipo a mano";
            this.button_addTeam.UseVisualStyleBackColor = true;
            this.button_addTeam.Click += new System.EventHandler(this.button_addTeam_Click);
            //
            // SelectTeams
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(672, 342);
            this.Controls.Add(this.groupBox1);
            this.Controls.Add(this.panel2);
            this.Controls.Add(this.panel1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.Name = "SelectTeams";
            this.Text = "Cargar Equipos y Jugadores";
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Load_Teams_FormClosing);
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox_logoLocal)).EndInit();
            this.panel2.ResumeLayout(false);
            this.panel2.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox_logoVisitor)).EndInit();
            this.groupBox1.ResumeLayout(false);
            this.ResumeLayout(false);

		}

		private void interactiveLabel_MouseEnter(object sender, System.EventArgs e)
		{
			throw new System.NotImplementedException();
		}

		#endregion

		private System.Windows.Forms.Panel panel1;
		private System.Windows.Forms.Panel panel2;
		private System.Windows.Forms.ListBox listBox_visitorTeams;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.ListBox listBox_localTeams;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Button button_modifyTeam;
		private System.Windows.Forms.Button button_addTeam;
		private System.Windows.Forms.Button button_acceptSelectionL;
		private System.Windows.Forms.PictureBox pictureBox_logoLocal;
		private System.Windows.Forms.Button button_acceptSelectionV;
		private System.Windows.Forms.PictureBox pictureBox_logoVisitor;
		private System.Windows.Forms.Label interactiveLabelL;
		private System.Windows.Forms.Label interactiveLabelV;
	}
}


text:
// Copyright (C) 2017 Pierre Grabolosa
//
// This file is part of the GfxHelper library.
// GfxHelper is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// GfxHelper is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Bash.  If not, see <http://www.gnu.org/licenses/>.

#include <public_header.h>
#include <private_headers/lib_common.h>

/*--------------------------------------------------------------------------------------------------------------------*/
void _getRawPixels ( GraphicContext* cg, unsigned char** data, int* pixelsWidth, int* pixelSize ) {

	cairo_surface_t* surface = cg->cairoContextSurface;
	if ( cairo_image_surface_get_format( surface ) != CAIRO_FORMAT_ARGB32 ) {
		fprintf(
				stderr, "GFX LIB INTERNAL ERROR: point() - unexpected image format (expected=%d, got=%d)",
				CAIRO_FORMAT_ARGB32, cairo_image_surface_get_format( surface ));
		return;
	}

	cairo_surface_flush( surface ); // make sure all pending drawings are applied
	if ( data ) { *data = cairo_image_surface_get_data( surface ); } // get the raw data

	if ( pixelsWidth ) { *pixelsWidth = cairo_image_surface_get_width( surface ); }
	if ( pixelSize ) { *pixelSize = 4; } // 32 bits : CAIRO_FORMAT_ARGB32
}

/*--------------------------------------------------------------------------------------------------------------------*/
void point ( const int x, const int y ) {

	GraphicContext* cg = _getCurrentGraphicContext( );

	unsigned char* data;
	int pixelsWidth;
	int pixelSize;
	_getRawPixels( cg, &data, &pixelsWidth, &pixelSize );

	unsigned char* pixel = data + ( pixelsWidth * y * pixelSize + x * pixelSize );

	unsigned char r = 0x00;
	unsigned char g = 0x00;
	unsigned char b = 0x00;
	unsigned char a = 0xff;

	if ( !cg->noFill ) {
		r = ( unsigned char ) ( 255 * cg->fill_r );
		g = ( unsigned char ) ( 255 * cg->fill_g );
		b = ( unsigned char ) ( 255 * cg->fill_b );
		a = ( unsigned char ) ( 255 * cg->fill_a );
	} else if ( !cg->noStroke ) {
		r = ( unsigned char ) ( 255 * cg->stroke_r );
		g = ( unsigned char ) ( 255 * cg->stroke_g );
		b = ( unsigned char ) ( 255 * cg->stroke_b );
		a = ( unsigned char ) ( 255 * cg->stroke_a );
	}

	pixel[ 0 ] = b; // B
	pixel[ 1 ] = g; // G
	pixel[ 2 ] = r; // R
	pixel[ 3 ] = a; // A

	cairo_surface_mark_dirty( cg->cairoContextSurface ); // redraw
}

/*--------------------------------------------------------------------------------------------------------------------*/
PixelColor_t* getPixels ( int* width, int* height ) {

	GraphicContext* cg = _getCurrentGraphicContext( );
	const int w = getWidth( );
	const int h = getHeight( );

	if ( width ) { *width = w; }
	if ( height ) { *height = h; }

	unsigned char* data;
	int pixelsWidth;
	int pixelSize;
	_getRawPixels( cg, &data, &pixelsWidth, &pixelSize );

	PixelColor_t* pixels = malloc( sizeof( PixelColor_t ) * w * h );

	for ( int x = 0; x < w; x++ ) {
		for ( int y = 0; y < h; y++ ) {
			unsigned char* raw_pixel = data + ( pixelsWidth * y * pixelSize + x * pixelSize );
			PixelColor_t* pixel = pixels + ( x + y * w );

			pixel->blue = raw_pixel[ 0 ] / 255.0f;
			pixel->green = raw_pixel[ 1 ] / 255.0f;
			pixel->red = raw_pixel[ 2 ] / 255.0f;
			// raw_pixel[3] : alpha
		}
	}

	return pixels;
}

/*--------------------------------------------------------------------------------------------------------------------*/
void setPixels ( const PixelColor_t* pixels ) {

	GraphicContext* cg = _getCurrentGraphicContext( );
	const int w = getWidth( );
	const int h = getHeight( );

	unsigned char* data;
	int pixelsWidth;
	int pixelSize;
	_getRawPixels( cg, &data, &pixelsWidth, &pixelSize );

	for ( int x = 0; x < w; x++ ) {
		for ( int y = 0; y < h; y++ ) {
			unsigned char* raw_pixel = data + ( pixelsWidth * y * pixelSize + x * pixelSize );
			const PixelColor_t* pixel = pixels + ( x + y * w );

			raw_pixel[ 0 ] = ( unsigned char ) ( pixel->blue * 255 );
			raw_pixel[ 1 ] = ( unsigned char ) ( pixel->green * 255 );
			raw_pixel[ 2 ] = ( unsigned char ) ( pixel->red * 255 );
			// raw_pixel[3] : alpha
		}
	}

	cairo_surface_mark_dirty( cg->cairoContextSurface ); // redraw
}

/*--------------------------------------------------------------------------------------------------------------------*/
void freePixels ( PixelColor_t* pixels ) {
	free( pixels );
}

/*--------------------------------------------------------------------------------------------------------------------*/
PixelColor_t** getPixels_2D ( int* width, int* height ) {

	GraphicContext* cg = _getCurrentGraphicContext( );
	const int w = getWidth( );
	const int h = getHeight( );

	if ( width ) { *width = w; }
	if ( height ) { *height = h; }

	unsigned char* data;
	int pixelsWidth;
	int pixelSize;
	_getRawPixels( cg, &data, &pixelsWidth, &pixelSize );

	PixelColor_t** pixels = malloc( sizeof( PixelColor_t* ) * w );

	for ( int x = 0; x < w; x++ ) {

		PixelColor_t* line = malloc( sizeof( PixelColor_t ) * h );
		pixels[ x ] = line;

		for ( int y = 0; y < h; y++ ) {
			unsigned char* raw_pixel = data + ( pixelsWidth * y * pixelSize + x * pixelSize );
			PixelColor_t* pixel = line + y;

			pixel->blue = raw_pixel[ 0 ] / 255.0f;
			pixel->green = raw_pixel[ 1 ] / 255.0f;
			pixel->red = raw_pixel[ 2 ] / 255.0f;
			// raw_pixel[3] : alpha
		}
	}

	return pixels;
}

/*--------------------------------------------------------------------------------------------------------------------*/
void setPixels_2D ( const PixelColor_t** pixels ) {

	GraphicContext* cg = _getCurrentGraphicContext( );
	const int w = getWidth( );
	const int h = getHeight( );

	unsigned char* data;
	int pixelsWidth;
	int pixelSize;
	_getRawPixels( cg, &data, &pixelsWidth, &pixelSize );

	for ( int x = 0; x < w; x++ ) {
		for ( int y = 0; y < h; y++ ) {
			unsigned char* raw_pixel = data + ( pixelsWidth * y * pixelSize + x * pixelSize );
			const PixelColor_t* pixel = pixels[ x ] + y;

			raw_pixel[ 0 ] = ( unsigned char ) ( pixel->blue * 255 );
			raw_pixel[ 1 ] = ( unsigned char ) ( pixel->green * 255 );
			raw_pixel[ 2 ] = ( unsigned char ) ( pixel->red * 255 );
			// raw_pixel[3] : alpha
		}
	}

	cairo_surface_mark_dirty( cg->cairoContextSurface ); // redraw
}

/*--------------------------------------------------------------------------------------------------------------------*/
void freePixels_2D ( PixelColor_t** pixels ) {

	const int w = getWidth( );
	for ( int x = 0; x < w; x++ ) {
		free( pixels[ x ] );
	}
	free( pixels );
}

redpajama_set_name: RedPajamaGithub


text:
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;

/**
   A bank contains customers.
*/
public class Bank
{
   private ArrayList<Customer> customers;

   /**
      Constructs a bank with no customers.
   */
   public Bank()
   {
      customers = new ArrayList<Customer>();
   }

   /**
      Reads the customer numbers and pins.
      @param filename the name of the customer file
   */
   public void readCustomers(String filename)
         throws IOException
   {
      Scanner in = new Scanner(new File(filename));
      while (in.hasNext())
      {
         int number = in.nextInt();
         int pin = in.nextInt();
         Customer c = new Customer(number, pin);
         addCustomer(c);
      }
      in.close();
   }

   /**
      Adds a customer to the bank.
      @param c the customer to add
   */
   public void addCustomer(Customer c)
   {
      customers.add(c);
   }

   /**
      Finds a customer in the bank.
      @param aNumber a customer number
      @param aPin a personal identification number
      @return the matching customer, or null if no customer
      matches
   */
   public Customer findCustomer(int aNumber, int aPin)
   {
      for (Customer c : customers)
      {
         if (c.match(aNumber, aPin))
         {
            return c;
         }
      }
      return null;
   }
}


text:
<html>
<head>
  <title>The source code</title>
    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
</head>
<body  onload="prettyPrint();">
    <pre class="prettyprint lang-js">// Application instance for showing user-feedback messages.
var App = new Ext.App({});

// Create HttpProxy instance.  Notice new configuration parameter "api" here instead of load.  However, you can still use
// the "url" paramater -- All CRUD requests will be directed to your single url instead.
var proxy = new Ext.data.HttpProxy({
    api: {
        read : 'app.php/users/view',
        create : 'app.php/users/create',
        update: 'app.php/users/update',
        destroy: 'app.php/users/destroy'
    }
});

// Typical JsonReader.  Notice additional meta-data params for defining the core attributes of your json-response
var reader = new Ext.data.JsonReader({
    totalProperty: 'total',
    successProperty: 'success',
    idProperty: 'id',
    root: 'data'
}, [
    {name: 'id'},
    {name: 'email', allowBlank: false},
    {name: 'first', allowBlank: false},
    {name: 'last', allowBlank: false}
]);

// The new DataWriter component.
var writer = new Ext.data.JsonWriter({
    encode: true,
    writeAllFields: false
});

// Typical Store collecting the Proxy, Reader and Writer together.
var store = new Ext.data.Store({
    id: 'user',
    proxy: proxy,
    reader: reader,
    writer: writer,  // <-- plug a DataWriter into the store just as you would a Reader
    autoSave: true,  // <-- false would delay executing create, update, destroy requests until specifically told to do so with some [save] buton.
    listeners: {
        write : function(store, action, result, res, rs) {
            App.setAlert(res.success, res.message); // <-- show user-feedback for all write actions
        },
        exception : function(proxy, type, action, options, res, arg) {
            if (type === 'remote') {
                Ext.Msg.show({
                    title: 'REMOTE EXCEPTION',
                    msg: res.message,
                    icon: Ext.MessageBox.ERROR,
                    buttons: Ext.Msg.OK
                });
            }
        }
    }
});

// A new generic text field
var textField =  new Ext.form.TextField();

// Let's pretend we rendered our grid-columns with meta-data from our ORM framework.
var userColumns =  [
    {header: "ID", width: 40, sortable: true, dataIndex: 'id'},
    {header: "Email", width: 100, sortable: true, dataIndex: 'email', editor: textField},
    {header: "First", width: 50, sortable: true, dataIndex: 'first', editor: textField},
    {header: "Last", width: 50, sortable: true, dataIndex: 'last', editor: textField}
];

// load the store immeditately
store.load();

Ext.onReady(function() {
    Ext.QuickTips.init();

    // create user.Form instance (@see UserForm.js)
    var userForm = new App.user.Form({
        renderTo: 'user-form',
        listeners: {
            create : function(fpanel, data) {   // <-- custom "create" event defined in App.user.Form class
                var rec = new userGrid.store.recordType(data);
                userGrid.store.insert(0, rec);
            }
        }
    });

    // create user.Grid instance (@see UserGrid.js)
    var userGrid = new App.user.Grid({
        renderTo: 'user-grid',
        store: store,
        columns : userColumns,
        listeners: {
            rowclick: function(g, index, ev) {
                var rec = g.store.getAt(index);
                userForm.loadRecord(rec);
            },
            destroy : function() {
                userForm.getForm().reset();
            }
        }
    });
});
</pre>
</body>
</html>


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

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

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <artifactId>rave-components</artifactId>
        <groupId>org.apache.rave</groupId>
        <version>0.23-SNAPSHOT</version>
    </parent>

    <artifactId>rave-jpa</artifactId>
    <name>Apache Rave :: rave-jpa</name>
    <description>Apache Rave JPA Persistence Implementation</description>
    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>org.apache.rave</groupId>
            <artifactId>rave-commons</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-context</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-orm</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework.security</groupId>
                    <artifactId>spring-security-web</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.rave</groupId>
            <artifactId>rave-core</artifactId>
        </dependency>

        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
        </dependency>

        <!-- JSON Support -->
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </dependency>

        <!--Persistence-->
        <dependency>
            <groupId>org.apache.openjpa</groupId>
            <artifactId>openjpa</artifactId>
        </dependency>

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

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.ibm.icu</groupId>
            <artifactId>icu4j</artifactId>
        </dependency>

        <!--  Captcha -->
        <dependency>
            <groupId>net.tanesha.recaptcha4j</groupId>
            <artifactId>recaptcha4j</artifactId>
        </dependency>

        <!-- mail -->
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
        </dependency>
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>${org.hamcrest.version}</version>
        </dependency>
    </dependencies>

    <build>
        <defaultGoal>install</defaultGoal>
  	<plugins>
            <plugin>
                <groupId>org.apache.openjpa</groupId>
                <artifactId>openjpa-maven-plugin</artifactId>
                <version>2.2.1</version>
                <configuration>
                    <includes>org/apache/rave/portal/model/*.class</includes>
                    <includes>org/apache/rave/portal/repository/JpaApplicationDataRepository$JpaSerializableApplicationData.class</includes>
                    <addDefaultConstructor>true</addDefaultConstructor>
                    <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
                </configuration>
                <executions>
                    <execution>
                        <id>enhancer</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>enhance</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <exclusions>
                            <exclusion>
                                <groupId>xerces</groupId>
                                <artifactId>xmlParserAPIs</artifactId>
                            </exclusion>
                        </exclusions>
                        <groupId>org.apache.openjpa</groupId>
                        <artifactId>openjpa</artifactId>
                        <version>${openjpa.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
</project>


text:
{% extends "admin/change_form.html" %}
{% load i18n admin_modify cms_tags cms_admin %}
{% load url from future %}
{% block title %}{% trans "Change a page" %}{% endblock %}

{% block extrahead %}
{{ block.super }}

{% if not add %}

{% endif %}

{% endblock %}

{% block breadcrumbs %}{% if not is_popup %}

     {% trans "Home" %} ›
     {{ app_label|capfirst|escape }} ›
     {% if can_change %}{{ opts.verbose_name_plural|capfirst }}{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %} ›
     {% if add %}{% trans "Add" %} {{ opts.verbose_name }}{% else %}{{ original.get_title|truncatewords:"18" }}{% endif %}

{% endif %}{% endblock %}

{% block content %}

{% block object-tools %}
{% endblock %}

<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="?language={{ language }}{%if request.GET.target %}&target={{ request.GET.target }}{% endif %}&{%if request.GET.target %}position={{ request.GET.position }}{% endif %}" method="post" id="page_form">{% csrf_token %}{% block form_top %}{% endblock %}
{{ adminForm.fields.parent }}

<input type="hidden" name="language" value="{{language}}" id="id_language"/>

{% if show_language_tabs and not show_permissions %}

    {% for lang_code, lang_name in language_tabs %}
        <input type="button" onclick="trigger_lang_button(this,'./?language={{lang_code}}');"
            class="language_button {% ifequal lang_code language %}selected{% else %}{% if not lang_code in filled_languages %} notfilled{% endif %}{% endifequal %}"
            id="debutton" name="{{lang_code}}" value="{{lang_name}}" />
    {% endfor %}

{% endif %}

{% if show_language_tabs and not show_permissions%}

{% endif %}
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
{% if save_on_top %}{% submit_row %}{% endif %}
{% if errors %}

    {% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}

{% for error in adminform.form.non_field_errors %}
{{ error }}
{% endfor %}

{% endif %}

{% for fieldset in adminform %}
  {% include "admin/cms/page/includes/fieldset.html" %}
{% endfor %}

{% for inline_admin_formset in inline_admin_formsets %}
    {% include inline_admin_formset.opts.template %}
{% endfor %}

{% if show_permissions %}
	{% if CMS_PERMISSION and can_change_permissions %}

				<fieldset id="inherited_permissions" class="module aligned collapse">

{% trans 'All permissions' %}

{% trans 'Loading...' %}

				</fieldset>

	{% endif %}

            <fieldset id="page_states" class="module aligned collapse">

{% trans 'Page states' %}

{% trans 'Loading...' %}

            </fieldset>

{% endif %}

{% block after_related_objects %}{% endblock %}

{% if add %}

		<input type="submit" name="_save" class="default" value="{% trans 'Save' %}" {{ onclick_attrib }}/>
		<input type="submit" name="_continue" value="{% trans 'Save and continue editing' %}" {{ onclick_attrib }}/>

{% else %}
	{% page_submit_row %}
{% endif %}

{% if add %}

{% endif %}
{% for url in unihandecode_urls %}

{% endfor %}
{% if unihandecode_urls %}

{% endif %}

{# JavaScript for prepopulated fields #}
{% prepopulated_fields_js %}

</form>

{% endblock %}


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Uses of Package org.robolectric.util (Robolectric Core 2.4 API)</title>
<meta name="date" content="2014-11-07">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Package
org.robolectric.util

Packages that use org.robolectric.util

Package
Description

org.robolectric

org.robolectric.bytecode

org.robolectric.shadows

Provides shadow implementations of classes in the Android SDK.

org.robolectric.util

Classes in org.robolectric.util used by org.robolectric

Class and Description

ActivityController

Scheduler

ServiceController

Classes in org.robolectric.util used by org.robolectric.bytecode

Class and Description

Function

Classes in org.robolectric.util used by org.robolectric.shadows

Class and Description

Scheduler

Classes in org.robolectric.util used by org.robolectric.util

Class and Description

ActivityController

Pair

Container to ease passing around a tuple of two objects.

ServiceController

SQLiteLibraryLoader.LibraryNameMapper

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2014. All Rights Reserved.


text:
/* - MRUBY_BINDINGS_NO_CLOBBER -
 * struct sockaddr_in6
 * Defined in file dummy_decls.h @ line 22
 */

#include "mruby_UV.h"

#if BIND_SockaddrIn6_TYPE

void mrb_UV_SockaddrIn6_init(mrb_state* mrb) {
  static int initialized = 0;
  if (initialized) return;
  else initialized = 1;

  struct RClass* SockaddrIn6_class = mrb_define_class_under(mrb, UV_module(mrb), "SockaddrIn6", Sockaddr_class(mrb));
  MRB_SET_INSTANCE_TT(SockaddrIn6_class, MRB_TT_DATA);
}
#endif


text: SELECT * FROM Other_Table


text:
package com.jersey.whatnot;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

/**
 * Root resource (exposed at "myresource" path)
 */
@Path("myresource")
public class MyResource {

    /**
     * Method handling HTTP GET requests. The returned object will be sent
     * to the client as "text/plain" media type.
     *
     * @return String that will be returned as a text/plain response.
     */
    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public String getIt() {
        return "Got it!";
    }

    @PUT
    public String processPutMethod(@FormParam("hey") String hey) {
        return hey;
    }

    @POST
    @Consumes("application/json")
    public String postClichedMessage(ClichesMsg message) {
        return message.A + " " + message.B;
    }

}


text:
{-# LANGUAGE OverloadedStrings #-}

module Views.DomainPrivileges (domainPrivilegesT) where

import           Data.Text.Lazy (Text)
import           Data.Monoid

import           Text.Blaze.Html5 hiding (p)
import qualified Text.Blaze.Html5 as H
import           Text.Blaze.Html5.Attributes
import qualified Text.Blaze.Html5.Attributes as A

import           Views.Common

domainPrivilegesT :: Text -> [Text] -> [Text] -> [(Text, Text)] -> Html
domainPrivilegesT domain privileges groups groupPrivs =
    pageT ("Privileges for domain '" <> domain <> "'") $ do

        H.script ! A.type_ "text/javascript" $ do
            "var domain = '"
            toHtml domain
            "';"

        H.div ! A.class_ "row" $ do

            H.div ! A.class_ "col-md-6" $ do

                H.p ! A.class_ "lead text-center" $ do
                    "Add, edit or delete privileges for "
                    H.b $ toHtml domain

                H.div ! A.class_ "text-center" ! A.style "margin: 10px auto;" $
                    H.table ! A.id "edittable"
                            ! A.class_ "table table-condensed" $ do
                        H.thead $
                            H.tr $ do
                                H.th ! A.width "50%" ! A.class_ "text-center" $
                                    "Privilege"
                                H.th ! A.width "30%" $ mempty
                                H.th ! A.width "20%" $ mempty
                        H.tbody $
                            mapM_ privToHtml privileges
                        H.tfoot $
                            H.tr $ do
                                H.td $ inp "privilege" "Privilege name"
                                H.td $ H.button ! A.class_ "btn btn-success btn-xs add-btn"
                                                $ "Add a privilege"
                                H.td mempty

                H.div ! A.class_ "alert alert-success" ! A.id "updatesuccess" $
                    "Successfully updated."

                H.div ! A.class_ "alert alert-error" ! A.id "updateerror" $
                    "An error occured when trying to update the privileges in the DB."

                H.div ! A.class_ "alert alert-error" ! A.id "fieldempty" $
                    "You left one of the fields empty."

            H.div ! A.class_ "col-md-6" $ do

                H.p ! A.class_ "lead text-center" $ do
                    "Grant or remove group privileges on "
                    H.b $ toHtml domain

                H.div ! A.class_ "text-center" ! A.style "margin: 10px auto;" $
                    H.table ! A.id "edittable2"
                            ! A.class_ "table table-condensed" $ do
                        H.thead $
                            H.tr $ do
                                H.th ! A.width "40%" ! A.class_ "text-center" $
                                    "Group"
                                H.th ! A.width "40%" ! A.class_ "text-center" $
                                    "Privilege"
                                H.th ! A.width "20%" $ mempty
                        H.tbody $
                            mapM_ groupPrivToHtml groupPrivs
                        H.tfoot $
                            H.tr $ do
                                H.td $ sel "groupSel" groups
                                H.td $ sel "privSel"  privileges
                                H.td $ H.button ! A.class_ "btn btn-success btn-xs grant-btn"
                                                $ "Grant access"

                H.div ! A.class_ "alert alert-success" ! A.id "gpsuccess" $
                    "Successfully updated."

                H.div ! A.class_ "alert alert-error" ! A.id "gperror" $
                    "An error occured when trying to update the privileges in the DB."

        H.script ! A.type_ "text/javascript"
                 ! A.src "/static/js/domainprivileges.js" $ mempty

    where privToHtml p =
              tr $ do
                td ! A.class_ "edit privilege-edit" $ toHtml p
                td $
                    a ! A.class_ "delete-btn btn btn-danger btn-xs" $ "Delete"
                td $
                    a ! href "#"
                      ! class_ "rule-btn btn btn-link btn-xs"
                      $ "Rules"

          groupPrivToHtml (group, priv) =
              tr $ do
                td $ toHtml group
                td $ toHtml priv
                td $
                    a ! A.class_ "delete-gp-btn btn btn-danger btn-xs" $ "Delete"


text:
@implementation QuestionInfo
{
    UIImage *_image;
}
-(instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}
+(instancetype)questionWithDict:(NSDictionary *)dict
{
    return [[self alloc] initWithDict:dict];
}

-(UIImage *)image
{
    if (!_image) {
        _image = [UIImage imageNamed:self.icon];
    }
    return _image;
}
+(NSArray *)questions
{
    NSString *path = [[NSBundle mainBundle]pathForResource:@"questions" ofType:@"plist"];
    NSArray *array = [NSArray arrayWithContentsOfFile:path];
    NSMutableArray *arrayM = [NSMutableArray arrayWithCapacity:array.count];
    for (NSDictionary *dict in array) {
        [arrayM addObject:[self questionWithDict:dict]];
    }
    return [arrayM copy];
}
@end


text:
begin
  require 'active_record'
rescue LoadError
  module ActiveRecord
    Rollback = Class.new(SimpleAction::Error)

    class Base
      def self.transaction(*)
        yield
      rescue Rollback
      end
    end
  end
end

module SimpleAction
  module Transactable
    extend ActiveSupport::Concern

    # @yield []
    def transaction
      return unless block_given?

      if transaction?
        ActiveRecord::Base.transaction(transaction_options) do
          yield
        end
      else
        yield
      end
    end

    def transaction=(bool)
      @@transaction = !!bool
    end

    # @return [Boolean]
    def transaction?
      defined?(@@transaction) ? @@transaction : true
    end

    # @return [Hash]
    def transaction_options
      {}
    end
  end
end


text:
require 'securerandom'

module DslUtil

  def parse_params(supplied, options)
    supplied ||= {}
    result = {}
    options.each {|k,v| result[k] = supplied[k] || v}
    result
  end

  class AliasedObjectStore
    def initialize
      @objects = {}
    end

    def get_or_create(key, &block)
      @objects[key] ||= yield(SecureRandom.hex(8))
    end

    def get(key)
      @objects[key]
    end
  end
end


text:
package com.devoxx.android.temperatureconverter;

import android.app.Activity;
import android.app.AlertDialog;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.devoxx.android.temperatureconverter.conversion.CelsiusFahrenheitConverter;
import com.devoxx.android.temperatureconverter.conversion.TemperatureConverter;

/**
 * Temperature-conversion activity.
 */
public class ConverterActivity extends Activity {

    private static final String TAG = ConverterActivity.class.getSimpleName();

    private EditText mCelsiusField;
    private TextView mFahrenheitField;
    private Button mConvertButton;
    private CelsiusFahrenheitConverter mConverter;

    public void setConverter(CelsiusFahrenheitConverter converter) {
        this.mConverter = converter;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.converter);

        mCelsiusField = (EditText) findViewById(R.id.celsius_textview);
        mFahrenheitField = (TextView) findViewById(R.id.fahrenheit_textview);
        mConvertButton = (Button) findViewById(R.id.conversion_button);
        mConvertButton.setOnClickListener(new ConvertButtonListener());
        mConverter = new TemperatureConverter();
    }

    private final class ConvertButtonListener implements View.OnClickListener {

        @Override
        public void onClick(View v) {
            if (mConverter != null) {
                final String celsius = mCelsiusField.getText().toString();
                try {
                    final float celsiusValue = Float.parseFloat(celsius);
                    final float result = mConverter.convertCelsiusToFahrenheit(celsiusValue);
                    mFahrenheitField.setText(String.valueOf(result));
                } catch (NumberFormatException e) {
                    Log.e(TAG, "Could not parse celsius value for " + celsius);
                }
            }
        }
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.converter, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case R.id.action_info:
                showInfoDialog();
                return true;
        }
        return super.onOptionsItemSelected(item);
    }

    /**
     * Show the info dialog.
     */
    private void showInfoDialog() {
        new AlertDialog.Builder(this)
                .setTitle(R.string.action_info)
                .setMessage(R.string.info)
                .show();
    }

}


text:
/**
 * Support and FAQ: visit Atmel Support
 */

#ifndef CONF_OVERSAMPLING_H
#define CONF_OVERSAMPLING_H

/**************************** Oversampling configuration*********************/
/****************************************************************************/

/**
 * \name Oversampling configuration
 */
/* ! @{ */

/**
 * \brief For each additional bit of ADC resolution, n, the signal must be
 *        oversampled 4^n times.To achieve 16 signed bit result from 12 bit
 *        signed ADC,we are choosing  4 bit additional resolution.
 *        Hence signal has  to be sampled 4^4( 4 to the power 4 ),
 *        i.e. 256 times more samples.
 *        Define this Macro as per number of additional samples required,here
 *        it did choose as 256 in this example
 */
#define ADC_OVER_SAMPLED_NUMBER        256

/**
 * \brief The scale factor, sf, given by sf = 2^n, is the factor, which is
 *        the sum of 4^n samples should be divided by, to scale the result
 *        properly.n is the desired number of extra bit.
 *        In this example we did choose 4 extra bit. Hence the value
 *        is 16, i.e. 2^4.Instead of dividing by 16,we can right shift by 4.
 *		  Hence this Macro is defined as 4.
 */
#define ADC_OVER_SAMP_SCALING_FACTOR    4

/**
 * \brief Define the Maximum ADC count with selected ADC resolution. Here we
 *        are oversampling to get 16 bit signed result.That is 15 bit Result.
 *        Hence the value of this macro will be (2^15)-1, which is 32767
 */
 #define ADC_OVER_SAMP_MAX_COUNT       32767

/**
 * \brief Define the maximum ADC count with selected ADC resolution when no
 *        oversampling is done. Here we configured to get 12 bit signed .
 *        result.That is 11 bit Result. Hence the value of this macro will be
 *        (2^11)-1, which is 2047
 */
 #define ADC_NO_OVER_SAMP_MAX_COUNT    2047

/* ! @} */

/**************************** ADC configuration for oversampling*************/
/****************************************************************************/

/**
 * \name ADC configuration for oversampling
 */
/* ! @{ */

/**
 * \brief for oversampling, setting up the positive pin. Here,
 *        selected PIN1 (PB1 for ADCB) as positive input
 */
#define ADC_OVER_SAMP_POSTIVE_PIN    ADCCH_POS_PIN1

/**
 * \brief for oversampling, setting up the negative pin. Here,
 *        selected PIN2 (PB2 for ADCB) as negative input
 */
#define ADC_OVER_SAMP_NEGATIVE_PIN  ADCCH_NEG_PIN2

/**
 * \brief Select ADCB reference voltage .Here, selected as,
 *        external reference voltage at PortB(at PB0 Pin)
 */
#define ADC_OVER_SAMP_REFSEL        ADC_REFSEL_AREFB_gc

/**
 * \brief Define the value of actual reference voltage.It is used in analog
 *        input value.Here, If external 2.5V is selected as ADC Reference,
 *        value of this macro should be reference voltage in microvolt.
 */
#define ADC_OVER_SAMP_REF_VOLT_IN_MICRO      2500000

/**
 * \brief Gain error of ADC which has to be calculated statically for each
 *        device. Gain Error is is deviation of the last output steps
 *        midpoint from the ideal line.To measure the gain error:
 *        -Increase input voltage from 0 until the last output step
 *        -The scaling factor for gain compensation equals the ideal output
 *         value for the midpoint of the last step divided by the actual value
 *         of the step
 *        Here ,given value is for a one specific device, it will vary from
 *        device to device and has to be calculated statically.
 *        It is calculated as
 *		  - (Gain error * 2^16), Here it is, (0.9984 * 2^16)
 */
#define ADC_GAIN_ERROR_FACTOR      (0xFF97)

/*! @} */

#endif /* CONF_OVERSAMPLING_H */


text:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

require_once('modules/Campaigns/utils.php');

if (!empty($_REQUEST['remove'])) clean_string($_REQUEST['remove'], "STANDARD");
if (!empty($_REQUEST['from'])) clean_string($_REQUEST['from'], "STANDARD");

if(!empty($_REQUEST['identifier'])) {
    global $beanFiles, $beanList, $current_user;

    //user is most likely not defined, retrieve admin user so that team queries are bypassed
    if(empty($current_user) || empty($current_user->id)){
            $current_user = new User();
            $current_user->retrieve('1');
    }

    $keys=log_campaign_activity($_REQUEST['identifier'],'removed');
    global $current_language;
    $mod_strings = return_module_language($current_language, 'Campaigns');

    if (!empty($keys) && $keys['target_type'] == 'Users'){
        //Users cannot opt out of receiving emails, print out warning message.
        echo $mod_strings['LBL_USERS_CANNOT_OPTOUT'];
     }elseif(!empty($keys) && isset($keys['campaign_id']) && !empty($keys['campaign_id'])){
        //we need to unsubscribe the user from this particular campaign
        $beantype = $beanList[$keys['target_type']];
        require_once($beanFiles[$beantype]);
        $focus = new $beantype();
        $focus->retrieve($keys['target_id']);
        unsubscribe($keys['campaign_id'], $focus);

    }elseif(!empty($keys)){
		$id = $keys['target_id'];
		$module = trim($keys['target_type']);
		$class = $beanList[$module];
		require_once($beanFiles[$class]);
		$mod = new $class();
		$db = DBManagerFactory::getInstance();

		$id = $db->quote($id);

		//no opt out for users.
		if(preg_match('/^[0-9A-Za-z\-]*$/', $id) && $module != 'Users'){
            //record this activity in the campaing log table..
			$query = "UPDATE email_addresses SET email_addresses.opt_out = 1 WHERE EXISTS(SELECT 1 FROM email_addr_bean_rel ear WHERE ear.bean_id = '$id' AND ear.deleted=0 AND email_addresses.id = ear.email_address_id)";
			$status=$db->query($query);
			if($status){
				echo "*";
			}
		}
    }
		//Print Confirmation Message.
		echo $mod_strings['LBL_ELECTED_TO_OPTOUT'];

}
sugar_cleanup();
?>


text:
[![Github Releases](https://img.shields.io/github/downloads/rednoah/ant-installer/total.svg)](https://github.com/rednoah/ant-installer/releases)
[![GitHub release](https://img.shields.io/github/release/rednoah/ant-installer.svg)](https://www.apache.org/dist/ant/)

## Introduction
Synology DSM package for installing the latest Apache Ant & Apache Ivy binaries on Synology NAS devices.

## Installation
Add the following __Package Source__ to Synology DSM ► Package Center ► Settings ► Package Sources:

https://get.filebot.net/syno/

On install, this package will download the latest [Apache Ant & Apache Ivy](https://www.apache.org/dist/ant/) binaries. This may take a while.


text:
import * as nls from 'vs/nls';
import * as paths from 'vs/base/common/paths';
import { RunOnceScheduler } from 'vs/base/common/async';
import * as dom from 'vs/base/browser/dom';
import * as builder from 'vs/base/browser/builder';
import { TPromise } from 'vs/base/common/winjs.base';
import * as errors from 'vs/base/common/errors';
import { EventType } from 'vs/base/common/events';
import { IActionRunner, IAction } from 'vs/base/common/actions';
import { prepareActions } from 'vs/workbench/browser/actionBarRegistry';
import { IHighlightEvent, ITree } from 'vs/base/parts/tree/browser/tree';
import { Tree } from 'vs/base/parts/tree/browser/treeImpl';
import { CollapsibleState } from 'vs/base/browser/ui/splitview/splitview';
import { CollapsibleViewletView, AdaptiveCollapsibleViewletView, CollapseAction } from 'vs/workbench/browser/viewlet';
import { IDebugService, State, IBreakpoint, IExpression } from 'vs/workbench/parts/debug/common/debug';
import { Expression, Variable, ExceptionBreakpoint, FunctionBreakpoint, Thread } from 'vs/workbench/parts/debug/common/debugModel';
import * as viewer from 'vs/workbench/parts/debug/electron-browser/debugViewer';
import { AddWatchExpressionAction, RemoveAllWatchExpressionsAction, AddFunctionBreakpointAction, ToggleBreakpointsActivatedAction, RemoveAllBreakpointsAction } from 'vs/workbench/parts/debug/browser/debugActions';
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { MenuId } from 'vs/platform/actions/common/actions';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IMessageService } from 'vs/platform/message/common/message';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';

function renderViewTree(container: HTMLElement): HTMLElement {
	const treeContainer = document.createElement('div');
	dom.addClass(treeContainer, 'debug-view-content');
	container.appendChild(treeContainer);
	return treeContainer;
}

const $ = builder.$;
const twistiePixels = 20;

export class VariablesView extends CollapsibleViewletView {

	private static MEMENTO = 'variablesview.memento';
	private onFocusStackFrameScheduler: RunOnceScheduler;

	constructor(
		actionRunner: IActionRunner,
		private settings: any,
		@IMessageService messageService: IMessageService,
		@IContextMenuService contextMenuService: IContextMenuService,
		@ITelemetryService private telemetryService: ITelemetryService,
		@IDebugService private debugService: IDebugService,
		@IKeybindingService keybindingService: IKeybindingService,
		@IInstantiationService private instantiationService: IInstantiationService
	) {
		super(actionRunner, !!settings[VariablesView.MEMENTO], nls.localize('variablesSection', "Variables Section"), messageService, keybindingService, contextMenuService);

		// Use schedulre to prevent unnecessary flashing
		this.onFocusStackFrameScheduler = new RunOnceScheduler(() => {
			// Always clear tree highlight to avoid ending up in a broken state #12203
			this.tree.clearHighlight();
			this.tree.refresh().then(() => {
				const stackFrame = this.debugService.getViewModel().focusedStackFrame;
				if (stackFrame) {
					return stackFrame.getScopes().then(scopes => {
						if (scopes.length > 0 && !scopes[0].expensive) {
							return this.tree.expand(scopes[0]);
						}
					});
				}
			}).done(null, errors.onUnexpectedError);
		}, 700);
	}

	public renderHeader(container: HTMLElement): void {
		const titleDiv = $('div.title').appendTo(container);
		$('span').text(nls.localize('variables', "Variables")).appendTo(titleDiv);

		super.renderHeader(container);
	}

	public renderBody(container: HTMLElement): void {
		dom.addClass(container, 'debug-variables');
		this.treeContainer = renderViewTree(container);

		this.tree = new Tree(this.treeContainer, {
			dataSource: new viewer.VariablesDataSource(),
			renderer: this.instantiationService.createInstance(viewer.VariablesRenderer),
			accessibilityProvider: new viewer.VariablesAccessibilityProvider(),
			controller: this.instantiationService.createInstance(viewer.VariablesController, new viewer.VariablesActionProvider(this.instantiationService), MenuId.DebugVariablesContext)
		}, {
				ariaLabel: nls.localize('variablesAriaTreeLabel', "Debug Variables"),
				twistiePixels
			});

		const viewModel = this.debugService.getViewModel();

		this.tree.setInput(viewModel);

		const collapseAction = this.instantiationService.createInstance(CollapseAction, this.tree, false, 'explorer-action collapse-explorer');
		this.toolBar.setActions(prepareActions([collapseAction]))();

		this.toDispose.push(viewModel.onDidFocusStackFrame(sf => {
			// Only delay if the stack frames got cleared and there is no active stack frame
			// Otherwise just update immediately
			if (sf) {
				this.onFocusStackFrameScheduler.schedule(0);
			} else if (!this.onFocusStackFrameScheduler.isScheduled()) {
				this.onFocusStackFrameScheduler.schedule();
			}
		}));
		this.toDispose.push(this.debugService.onDidChangeState(() => {
			const state = this.debugService.state;
			collapseAction.enabled = state === State.Running || state === State.Stopped;
		}));

		this.toDispose.push(this.debugService.getViewModel().onDidSelectExpression(expression => {
			if (!expression || !(expression instanceof Variable)) {
				return;
			}

			this.tree.refresh(expression, false).then(() => {
				this.tree.setHighlight(expression);
				this.tree.addOneTimeDisposableListener(EventType.HIGHLIGHT, (e: IHighlightEvent) => {
					if (!e.highlight) {
						this.debugService.getViewModel().setSelectedExpression(null);
					}
				});
			}).done(null, errors.onUnexpectedError);
		}));
	}

	public shutdown(): void {
		this.settings[VariablesView.MEMENTO] = (this.state === CollapsibleState.COLLAPSED);
		super.shutdown();
	}
}

export class WatchExpressionsView extends CollapsibleViewletView {

	private static MEMENTO = 'watchexpressionsview.memento';
	private onWatchExpressionsUpdatedScheduler: RunOnceScheduler;
	private toReveal: IExpression;

	constructor(
		actionRunner: IActionRunner,
		private settings: any,
		@IMessageService messageService: IMessageService,
		@IContextMenuService contextMenuService: IContextMenuService,
		@IDebugService private debugService: IDebugService,
		@IKeybindingService keybindingService: IKeybindingService,
		@IInstantiationService private instantiationService: IInstantiationService
	) {
		super(actionRunner, !!settings[WatchExpressionsView.MEMENTO], nls.localize('expressionsSection', "Expressions Section"), messageService, keybindingService, contextMenuService);

		this.toDispose.push(this.debugService.getModel().onDidChangeWatchExpressions(we => {
			// only expand when a new watch expression is added.
			if (we instanceof Expression) {
				this.expand();
			}
		}));

		this.onWatchExpressionsUpdatedScheduler = new RunOnceScheduler(() => {
			this.tree.refresh().done(() => {
				return this.toReveal instanceof Expression ? this.tree.reveal(this.toReveal) : TPromise.as(true);
			}, errors.onUnexpectedError);
		}, 50);
	}

	public renderHeader(container: HTMLElement): void {
		const titleDiv = $('div.title').appendTo(container);
		$('span').text(nls.localize('watch', "Watch")).appendTo(titleDiv);

		super.renderHeader(container);
	}

	public renderBody(container: HTMLElement): void {
		dom.addClass(container, 'debug-watch');
		this.treeContainer = renderViewTree(container);

		const actionProvider = new viewer.WatchExpressionsActionProvider(this.instantiationService);
		this.tree = new Tree(this.treeContainer, {
			dataSource: new viewer.WatchExpressionsDataSource(),
			renderer: this.instantiationService.createInstance(viewer.WatchExpressionsRenderer, actionProvider, this.actionRunner),
			accessibilityProvider: new viewer.WatchExpressionsAccessibilityProvider(),
			controller: this.instantiationService.createInstance(viewer.WatchExpressionsController, actionProvider, MenuId.DebugWatchContext),
			dnd: this.instantiationService.createInstance(viewer.WatchExpressionsDragAndDrop)
		}, {
				ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'watchAriaTreeLabel' }, "Debug Watch Expressions"),
				twistiePixels
			});

		this.tree.setInput(this.debugService.getModel());

		const addWatchExpressionAction = this.instantiationService.createInstance(AddWatchExpressionAction, AddWatchExpressionAction.ID, AddWatchExpressionAction.LABEL);
		const collapseAction = this.instantiationService.createInstance(CollapseAction, this.tree, true, 'explorer-action collapse-explorer');
		const removeAllWatchExpressionsAction = this.instantiationService.createInstance(RemoveAllWatchExpressionsAction, RemoveAllWatchExpressionsAction.ID, RemoveAllWatchExpressionsAction.LABEL);
		this.toolBar.setActions(prepareActions([addWatchExpressionAction, collapseAction, removeAllWatchExpressionsAction]))();

		this.toDispose.push(this.debugService.getModel().onDidChangeWatchExpressions(we => {
			if (!this.onWatchExpressionsUpdatedScheduler.isScheduled()) {
				this.onWatchExpressionsUpdatedScheduler.schedule();
			}
			this.toReveal = we;
		}));

		this.toDispose.push(this.debugService.getViewModel().onDidSelectExpression(expression => {
			if (!expression || !(expression instanceof Expression)) {
				return;
			}

			this.tree.refresh(expression, false).then(() => {
				this.tree.setHighlight(expression);
				this.tree.addOneTimeDisposableListener(EventType.HIGHLIGHT, (e: IHighlightEvent) => {
					if (!e.highlight) {
						this.debugService.getViewModel().setSelectedExpression(null);
					}
				});
			}).done(null, errors.onUnexpectedError);
		}));
	}

	public shutdown(): void {
		this.settings[WatchExpressionsView.MEMENTO] = (this.state === CollapsibleState.COLLAPSED);
		super.shutdown();
	}
}

export class CallStackView extends CollapsibleViewletView {

	private static MEMENTO = 'callstackview.memento';
	private pauseMessage: builder.Builder;
	private pauseMessageLabel: builder.Builder;
	private onCallStackChangeScheduler: RunOnceScheduler;

	constructor(
		actionRunner: IActionRunner,
		private settings: any,
		@IMessageService messageService: IMessageService,
		@IContextMenuService contextMenuService: IContextMenuService,
		@ITelemetryService private telemetryService: ITelemetryService,
		@IDebugService private debugService: IDebugService,
		@IKeybindingService keybindingService: IKeybindingService,
		@IInstantiationService private instantiationService: IInstantiationService
	) {
		super(actionRunner, !!settings[CallStackView.MEMENTO], nls.localize('callstackSection', "Call Stack Section"), messageService, keybindingService, contextMenuService);

		// Create scheduler to prevent unnecessary flashing of tree when reacting to changes
		this.onCallStackChangeScheduler = new RunOnceScheduler(() => {
			let newTreeInput: any = this.debugService.getModel();
			const processes = this.debugService.getModel().getProcesses();
			if (!this.debugService.getViewModel().isMultiProcessView() && processes.length) {
				const threads = processes[0].getAllThreads();
				// Only show the threads in the call stack if there is more than 1 thread.
				newTreeInput = threads.length === 1 ? threads[0] : processes[0];
			}

			// Only show the global pause message if we do not display threads.
			// Otherwsie there will be a pause message per thread and there is no need for a global one.
			if (newTreeInput instanceof Thread && newTreeInput.stoppedDetails) {
				this.pauseMessageLabel.text(nls.localize('debugStopped', "Paused on {0}", newTreeInput.stoppedDetails.reason));
				if (newTreeInput.stoppedDetails.text) {
					this.pauseMessageLabel.title(newTreeInput.stoppedDetails.text);
				}
				newTreeInput.stoppedDetails.reason === 'exception' ? this.pauseMessageLabel.addClass('exception') : this.pauseMessageLabel.removeClass('exception');
				this.pauseMessage.show();
			} else {
				this.pauseMessage.hide();
			}

			(this.tree.getInput() === newTreeInput ? this.tree.refresh() : this.tree.setInput(newTreeInput)).done(() => {
				const stackFrame = this.debugService.getViewModel().focusedStackFrame;
				if (!stackFrame) {
					return;
				}

				const thread = stackFrame.thread;
				return this.tree.expandAll([thread.process, thread]).done(() => {
					this.tree.setSelection([stackFrame]);
					return this.tree.reveal(stackFrame);
				});
			}, errors.onUnexpectedError);
		}, 50);
	}

	public renderHeader(container: HTMLElement): void {
		const title = $('div.debug-call-stack-title').appendTo(container);
		$('span.title').text(nls.localize('callStack', "Call Stack")).appendTo(title);
		this.pauseMessage = $('span.pause-message').appendTo(title);
		this.pauseMessage.hide();
		this.pauseMessageLabel = $('span.label').appendTo(this.pauseMessage);

		super.renderHeader(container);
	}

	public renderBody(container: HTMLElement): void {
		dom.addClass(container, 'debug-call-stack');
		this.treeContainer = renderViewTree(container);
		const actionProvider = this.instantiationService.createInstance(viewer.CallStackActionProvider);

		this.tree = new Tree(this.treeContainer, {
			dataSource: this.instantiationService.createInstance(viewer.CallStackDataSource),
			renderer: this.instantiationService.createInstance(viewer.CallStackRenderer),
			accessibilityProvider: this.instantiationService.createInstance(viewer.CallstackAccessibilityProvider),
			controller: this.instantiationService.createInstance(viewer.CallStackController, actionProvider, MenuId.DebugCallStackContext)
		}, {
				ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'callStackAriaLabel' }, "Debug Call Stack"),
				twistiePixels
			});

		this.toDispose.push(this.debugService.getModel().onDidChangeCallStack(() => {
			if (!this.onCallStackChangeScheduler.isScheduled()) {
				this.onCallStackChangeScheduler.schedule();
			}
		}));

		// Schedule the update of the call stack tree if the viewlet is opened after a session started #14684
		if (this.debugService.state === State.Stopped) {
			this.onCallStackChangeScheduler.schedule();
		}
	}

	public shutdown(): void {
		this.settings[CallStackView.MEMENTO] = (this.state === CollapsibleState.COLLAPSED);
		super.shutdown();
	}
}

export class BreakpointsView extends AdaptiveCollapsibleViewletView {

	private static MAX_VISIBLE_FILES = 9;
	private static MEMENTO = 'breakopintsview.memento';

	constructor(
		actionRunner: IActionRunner,
		private settings: any,
		@IContextMenuService contextMenuService: IContextMenuService,
		@IDebugService private debugService: IDebugService,
		@IKeybindingService keybindingService: IKeybindingService,
		@IInstantiationService private instantiationService: IInstantiationService
	) {
		super(actionRunner, BreakpointsView.getExpandedBodySize(
			debugService.getModel().getBreakpoints().length + debugService.getModel().getFunctionBreakpoints().length + debugService.getModel().getExceptionBreakpoints().length),
			!!settings[BreakpointsView.MEMENTO], nls.localize('breakpointsSection', "Breakpoints Section"), keybindingService, contextMenuService);

		this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange()));
	}

	public renderHeader(container: HTMLElement): void {
		const titleDiv = $('div.title').appendTo(container);
		$('span').text(nls.localize('breakpoints', "Breakpoints")).appendTo(titleDiv);

		super.renderHeader(container);
	}

	public renderBody(container: HTMLElement): void {
		dom.addClass(container, 'debug-breakpoints');
		this.treeContainer = renderViewTree(container);
		const actionProvider = new viewer.BreakpointsActionProvider(this.instantiationService, this.debugService);

		this.tree = new Tree(this.treeContainer, {
			dataSource: new viewer.BreakpointsDataSource(),
			renderer: this.instantiationService.createInstance(viewer.BreakpointsRenderer, actionProvider, this.actionRunner),
			accessibilityProvider: this.instantiationService.createInstance(viewer.BreakpointsAccessibilityProvider),
			controller: this.instantiationService.createInstance(viewer.BreakpointsController, actionProvider, MenuId.DebugBreakpointsContext),
			sorter: {
				compare(tree: ITree, element: any, otherElement: any): number {
					const first = <IBreakpoint>element;
					const second = <IBreakpoint>otherElement;
					if (first instanceof ExceptionBreakpoint) {
						return -1;
					}
					if (second instanceof ExceptionBreakpoint) {
						return 1;
					}
					if (first instanceof FunctionBreakpoint) {
						return -1;
					}
					if (second instanceof FunctionBreakpoint) {
						return 1;
					}

					if (first.uri.toString() !== second.uri.toString()) {
						return paths.basename(first.uri.fsPath).localeCompare(paths.basename(second.uri.fsPath));
					}

					return first.lineNumber - second.lineNumber;
				}
			}
		}, {
				ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'breakpointsAriaTreeLabel' }, "Debug Breakpoints"),
				twistiePixels
			});

		const debugModel = this.debugService.getModel();

		this.tree.setInput(debugModel);

		this.toDispose.push(this.debugService.getViewModel().onDidSelectFunctionBreakpoint(fbp => {
			if (!fbp || !(fbp instanceof FunctionBreakpoint)) {
				return;
			}

			this.tree.refresh(fbp, false).then(() => {
				this.tree.setHighlight(fbp);
				this.tree.addOneTimeDisposableListener(EventType.HIGHLIGHT, (e: IHighlightEvent) => {
					if (!e.highlight) {
						this.debugService.getViewModel().setSelectedFunctionBreakpoint(null);
					}
				});
			}).done(null, errors.onUnexpectedError);
		}));
	}

	public getActions(): IAction[] {
		return [
			this.instantiationService.createInstance(AddFunctionBreakpointAction, AddFunctionBreakpointAction.ID, AddFunctionBreakpointAction.LABEL),
			this.instantiationService.createInstance(ToggleBreakpointsActivatedAction, ToggleBreakpointsActivatedAction.ID, ToggleBreakpointsActivatedAction.ACTIVATE_LABEL),
			this.instantiationService.createInstance(RemoveAllBreakpointsAction, RemoveAllBreakpointsAction.ID, RemoveAllBreakpointsAction.LABEL)
		];
	}

	private onBreakpointsChange(): void {
		const model = this.debugService.getModel();
		this.expandedBodySize = BreakpointsView.getExpandedBodySize(
			model.getBreakpoints().length + model.getExceptionBreakpoints().length + model.getFunctionBreakpoints().length);

		if (this.tree) {
			this.tree.refresh();
		}
	}

	private static getExpandedBodySize(length: number): number {
		return Math.min(BreakpointsView.MAX_VISIBLE_FILES, length) * 22;
	}

	public shutdown(): void {
		this.settings[BreakpointsView.MEMENTO] = (this.state === CollapsibleState.COLLAPSED);
		super.shutdown();
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?><metatype:MetaData xmlns:metatype="http://www.osgi.org/xmlns/metatype/v1.0.0" localization="OSGI-INF/metatype/metatype">
    <OCD id="identity.application.authenticator.fido.u2f.component" name="%identity.application.authenticator.fido.u2f.component.name" description="%identity.application.authenticator.fido.u2f.component.description"/>
    <Designate pid="identity.application.authenticator.fido.u2f.component">
        <Object ocdref="identity.application.authenticator.fido.u2f.component"/>
    </Designate>
</metatype:MetaData>


text:
from django.http import Http404
from django.core.cache import cache
from django.utils import unittest
from django.test.client import RequestFactory
from django.test.utils import override_settings

from core.middleware import SubdomainMiddleware

class MiddlewareTests(unittest.TestCase):

    def setUp(self):
        self.factory = RequestFactory()
        self.middleware = SubdomainMiddleware()
        self.url = '/'

    def test_failey_cname(self):
        request = self.factory.get(self.url, HTTP_HOST='my.host.com')
        with self.assertRaises(Http404):
            self.middleware.process_request(request)
        self.assertEqual(request.cname, True)

    def test_proper_subdomain(self):
        request = self.factory.get(self.url, HTTP_HOST='pip.readthedocs.org')
        self.middleware.process_request(request)
        self.assertEqual(request.urlconf, 'core.subdomain_urls')
        self.assertEqual(request.subdomain, True)
        self.assertEqual(request.slug, 'pip')

    def test_proper_cname(self):
        cache.get = lambda x: 'my_slug'
        request = self.factory.get(self.url, HTTP_HOST='my.valid.homename')
        self.middleware.process_request(request)
        self.assertEqual(request.urlconf, 'core.subdomain_urls')
        self.assertEqual(request.cname, True)
        self.assertEqual(request.slug, 'my_slug')

    def test_djangome(self):
        request = self.factory.get(self.url, HTTP_HOST='pip.rtfd.org')
        self.middleware.process_request(request)
        self.assertEqual(request.urlconf, 'core.djangome_urls')
        self.assertEqual(request.slug, 'pip')
        self.assertFalse(hasattr(request, 'subdomain'))

    @override_settings(DEBUG=True)
    def test_debug_on(self):
        request = self.factory.get(self.url, HTTP_HOST='doesnt.really.matter')
        ret_val = self.middleware.process_request(request)
        self.assertEqual(ret_val, None)


text:
from .trainer_desc import MultiTrainer, DistMultiTrainer
from .device_worker import Hogwild, DownpourSGD

__all__ = ["TrainerFactory"]

class TrainerFactory(object):
    def __init__(self):
        pass

    def _create_trainer(self, opt_info=None):
        trainer = None
        device_worker = None
        if opt_info == None:
            # default is MultiTrainer + Hogwild
            trainer = MultiTrainer()
            device_worker = Hogwild()
            trainer._set_device_worker(device_worker)
        else:
            trainer_class = opt_info["trainer"]
            device_worker_class = opt_info["device_worker"]
            trainer = globals()[trainer_class]()
            device_worker = globals()[device_worker_class]()
            device_worker._set_fleet_desc(opt_info["fleet_desc"])
            trainer._set_device_worker(device_worker)
            trainer._set_fleet_desc(opt_info["fleet_desc"])
        return trainer


text:
void
edaf_task(std::map<std::string, std::string> params);

#endif


text:
oauth2-mock
===========

Mock for OAuth2 devs

Pour builder le projet :
1) chmox +x gradlew
2) ./gradlew build

Pour rebuilder et lancer le projet
3) ./gradlew bootrun


text:
package com.alibaba.rocketmq.client.hook;

public interface SendMessageHook {
    String hookName();

    void sendMessageBefore(final SendMessageContext context);

    void sendMessageAfter(final SendMessageContext context);
}


text:
package com.bti360.gt.search;

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

import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.common.SolrInputDocument;
import org.junit.Ignore;

@Ignore
public abstract class QueryExpectationTestCase extends BaseSolrTestCase {

    public void testExpectations(String field, String indexedText,
            QueryExpectation... expectations) throws SolrServerException {

        SolrInputDocument doc = new SolrInputDocument();
        doc.setField(field, indexedText);
        if (!doc.containsKey(UNIQUE_ID_FIELD)) {
            doc.setField(UNIQUE_ID_FIELD, "192.168.1.1");
        }
        replaceIndex(doc);

        List<QueryExpectation> failedExpectations = new ArrayList<QueryExpectation>();
        for (QueryExpectation expectation : expectations) {
            String q = String.format("%s:%s", field, expectation.getQuery());
            if (isHit(q) != expectation.isHit()) {
                failedExpectations.add(expectation);
            }
        }

        if (!failedExpectations.isEmpty()) {
            fail(String.format("The following query expectations failed for field [%s] using text [%s]: %s",
                    field, indexedText, failedExpectations));
        }
    }

}


text:
module CacheLib
  module Util
    class ExtHash
      def pop_tail
        delete(first[0])
      end
    end
  end
end


text:
title: Button Groups
---

Button groups are containers for related action items. They're great when you need to display a group of actions in a bar. These build off the button styles and work perfectly with the grid.

***

{{> examples_button_group_basic}}

***

Basic

You can create a button group using minimal markup.

HTML

{{> examples_button_group_basic_rendered}}

Rendered HTML

{{> examples_button_group_basic}}

***

Advanced

Additional classes can be added to your button group to change its appearance.

HTML

{{#markdown}}
```html
<ul class="button-group [radius round]">
  <li><a href="#" class="button [secondary alert success]">Button 1</a></li>
  <li><a href="#" class="button [secondary alert success]">Button 2</a></li>
  <li><a href="#" class="button [secondary alert success]">Button 3</a></li>
  <li><a href="#" class="button [secondary alert success]">Button 4</a></li>
</ul>
```
{{/markdown}}

Rendered HTML

Button 1

Button 2

Button 3

Button 4

#### Stacking

You can change the orientation of a button group with the `stack` classes.

`stack`: Stacks buttons vertically.

`stack-for-small`: Stacks buttons vertically on small screens and horizontally on large screens

{{#markdown}}
```html
<ul class="stack button-group">
  <li><a href="#" class="button">Button 1</a></li>
  <li><a href="#" class="button">Button 2</a></li>
</ul>
<ul class="stack-for-small round secondary button-group">
  <li><a href="#" class="button">Button 1</a></li>
  <li><a href="#" class="button">Button 2</a></li>
</ul>
```
{{/markdown}}

Stack

Button 1

Button 2

Stack for Small

Button 1

Button 2

***

## Button Bars

A button bar is a group of button groups, perfect for situations where you want groups of actions that are all related to a similar element or page. Simply wrap two or more button groups in a `.button-bar` and Foundation takes care of the rest.

Basic

You can create a button bar using minimal markup.

HTML

{{> examples_button_group_bar}}

Rendered HTML

{{> examples_button_group_bar_rendered}}

Advanced

Additional classes can be added to your button bar to change its appearance.

HTML

{{> examples_button_group_bar_advanced}}

Rendered HTML

{{> examples_button_group_bar_advanced_rendered}}

***

## Customize with Sass

Button bars can be easily customized using our provided Sass variables.

SCSS

{{> examples_button_group_variables}}

***

## Semantic Markup With Sass

You can use our mixins to use button groups on your own markup.

Basic

You can use the `button-group-container()` and `button-group-style()` mixins to create your own button groups and button bars with semantic markup, like so:

SCSS

{{#markdown}}
```scss
.custom-button-group-class {
  @include button-group-container();
  .custom-button-class {
    @include button();
  }
  & > li { @include button-group-style(); }
}
```
{{/markdown}}

You can find more information regarding button mixins here.

HTML

{{> examples_button_group_basic_mixin}}

Advanced

You can further customize your button groups using using the provided options in the `button-group-container()` and `button-group-style()` mixin:

##### Button Group Container Options

SCSS

{{> examples_button_group_container_mixin}}

##### Button Group Style Options

SCSS

{{> examples_button_group_style_mixin}}

***

### Sass Errors?

If the default "foundation" import was commented out, then make sure you import this file:

SCSS

```scss
@import "foundation/components/button-groups";
```


text:
package com.gs.collections.impl.set.mutable;

import java.util.NoSuchElementException;
import java.util.TreeSet;

import com.gs.collections.api.set.MutableSet;
import com.gs.collections.impl.test.Verify;
import org.junit.Assert;
import org.junit.Test;

/**
 * JUnit test for {@link SynchronizedMutableSet}.
 */
public class SynchronizedMutableSet2Test extends AbstractMutableSetTestCase
{
    @Override
    protected <T> MutableSet<T> classUnderTest()
    {
        return new SynchronizedMutableSet<T>(SetAdapter.adapt(new TreeSet<T>()));
    }

    @Test(expected = NoSuchElementException.class)
    public void min_empty_throws_without_comparator()
    {
        this.newWith().min();
    }

    @Test(expected = NoSuchElementException.class)
    public void max_empty_throws_without_comparator()
    {
        this.newWith().max();
    }

    @Override
    @Test
    public void testToString()
    {
        MutableSet<Integer> integer = this.newWith(1);
        Assert.assertEquals("[1]", integer.toString());
    }

    @Override
    @Test
    public void makeString()
    {
        MutableSet<Integer> integer = this.newWith(1);
        Assert.assertEquals("{1}", integer.makeString("{", ",", "}"));
    }

    @Override
    @Test
    public void appendString()
    {
        Appendable stringBuilder = new StringBuilder();
        MutableSet<Integer> integer = this.newWith(1);
        integer.appendString(stringBuilder, "{", ",", "}");
        Assert.assertEquals("{1}", stringBuilder.toString());
    }

    @Override
    @Test
    public void remove()
    {
        MutableSet<Integer> integers = this.newWith(1, 2, 3, 4);
        integers.remove(3);
        Verify.assertSetsEqual(UnifiedSet.newSetWith(1, 2, 4), integers);
    }
}