text:
<?php
// admin user features
msv_admin_editbtn(".feedbackItem", "feedback", TABLE_FEEDBACK);

if (!empty($_REQUEST["doSendFeedback"])) {
    // extract data from request for corresponding table
    $item = msv_process_tabledata(TABLE_FEEDBACK, "feedback_");

    // execute request
    $result = msv_add_feedback($item, array("EmailNotifyUser", "EmailNotifyAdmin"));
    if ($result["ok"]) {
        msv_message_ok($result["msg"]);
    } else {
        msv_message_error($result["msg"]);
    }

    if (msv_has_messages()) {
        // pass data from request to template to autofill the form
        msv_assign_tabledata(TABLE_FEEDBACK, "feedback_");
    }
}

function loadFeedback($module) {
    // load 'sticked' items from feedback table
    $resultQuery = db_get_list(TABLE_FEEDBACK, "`sticked` > 0", "`date` desc", $module->stickedItemsCount, "");
    if ($resultQuery["ok"]) {
        // get a list of items from API result
        $listItems = $resultQuery["data"];
        // assign data to template
        msv_assign_data("feedback_sticked", $listItems);
    }
}

redpajama_set_name: RedPajamaGithub


text:
from ..misc import mkdir_p
import os

##__________________________________________________________________||
class WritePandasDataFrameToFile(object):
    def __init__(self, outPath):
        self._outPath = outPath

    def deliver(self, results):
        if results is None: return
        f = self._open(self._outPath)
        if len(results.index) == 0:
            towrite = " ".join([i for i in results.columns]) + "\n"
            towrite = towrite.encode()
            f.write(towrite)
        else:
            ## results.to_string(f, index = False)
            towrite = results.to_string(index = False) + "\n"
            towrite = towrite.encode()
            f.write(towrite)
        self._close(f)

    def _open(self, path):
        mkdir_p(os.path.dirname(path))
        return open(path, 'w')

    def _close(self, file): file.close()

##__________________________________________________________________||


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

namespace Stratus.Gameplay
{
	/// <summary>
	/// Defines what equipment a character can use
	/// </summary>
	public abstract class StratusEquipmentModel { }

	namespace Models
	{
		[Serializable]
		public class StratusStandardEquipment : StratusEquipmentModel
		{
		}
	}

}


text:
using Foundation;

namespace sync_xamarin_app
{
	[Register ("RootViewController")]
	partial class RootViewController
	{
		void ReleaseDesignerOutlets ()
		{
		}
	}
}


text:
<!DOCTYPE html>

  <title>C3 Searchable Table</title>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
  <link rel="stylesheet" media="all" href="docco.css" />

          Jump To …
          +

                  butterfly_example.ts

                  flamechart_sunburst_example.ts

                  legend_example.ts

                  pie_example.ts

                  plot_area_example.ts

                  plot_zoom_example.ts

                  sankey_example.ts

                  scatterplot_example.ts

                  stack_example.ts

                  swimlanes_example.ts

                  sync_example.ts

                  table_searchable_example.ts

                  table_selectable_example.ts

                  table_sortable_example.ts

                  timeline_example.ts

                  worldbank_example.ts

                ¶

C3 Searchable Table

A table of country data that is sortable, paginated, and searchable.

                ¶

Remember the column to specify sorting by it.

var gdp_column: c3.Table.Column<CountryData>;

                ¶

Keep track of the country we searched for

var match_country: CountryData;

                ¶

Create the Data Table

                ¶

Create a c3.Table object and set its options.  Bind to an anchor DOM element using a string selector.

var country_table: c3.Table<CountryData> = new c3.Table<CountryData>({
    anchor: '#country_table_example',

                ¶

Enable the user to sort this table.

    sortable: true,

                ¶

Limit the table to only show pages of 4 at a time,
and enable pagination to change pages.

    limit_rows: 10,
    pagination: true,

                ¶

Make the table searchable

    searchable: true,

                ¶

Create an array of column objects to describe the table columns.

    columns: [
        {
            header: { text: "Country" },
            cells: { html: (country) => '<b>' + country.name + '</b>' },
        }, {

                ¶

These columns use custom formatters to set the html content of the cell
adding commas, units, rounding, etc.  You can add raw HTML if you like.
These column also use the vis visualization support to render a bar
graph based on the cell value.

            header: { text: "Population" },
            cells: { text: (country) => d3.format(',')(country.population) },
            sort: (country) => country.population,
            vis: 'bar',
        }, {
            header: { text: "Urbanization" },
            cells: { text: (country) => country.urban_population.toFixed(1)+'%' },
            sort: (country) => country.urban_population,
            vis: 'bar',
            total_value: 100,
        }, {
            header: { text: "Land Area" },
            cells: { html: (country) => (d3.format(',')(Math.round(country.land_area))) + "km<sup>2</sup>" },
            sort: (country) => Math.round(country.land_area),
            vis: 'bar',
        },

                ¶

Assign this column to a variable gdp_column so we can refer to it below for setting the default sort.

        gdp_column = {
            header: { text: "GDP" },
            cells: { text: (country) => "$" + (d3.format(',')(Math.round(country.gdp))) + "m" },
            sort: (country) => Math.round(country.gdp),
            vis: 'bar',
        }, {

                ¶

By default, the bar visualization will base the bar width as a percentage of the
total value of all cells.  This isn't always appropriate, though, such as in the case
of GDP per capita.  So, here we manually set the total_value to be the maximum
per capita value.  Look out for Monaco!

            header: { text: "GDP per capita" },
            cells: { html: (country) => "$" + (d3.format(',')(Math.round(country.gdp_per_capita))) },
            sort: (country) => Math.round(country.gdp_per_capita),
            vis: 'bar',
            total_value: function () { return d3.max(country_table.data, (country) => country.gdp_per_capita); },
        },
    ],

                ¶

Configure the initial column to sort  the data on based on the column varible x_column we created above.

    sort_column: gdp_column,

                ¶

Style the row with class match if the country matches the one found in the search.
match_country is set in the match handler below.

    row_options: {
        classes: {
            'match': (country)=> country === match_country,
        },
    },

                ¶

Add an event handler to highlight which row was found in a search

    handlers: {
        match: function(search, found_country, i) {
            match_country = found_country;
            this.redraw();
        },
    },
});

                ¶

Modify Table Options

                ¶

Limit the number of rows

document.querySelector('#limit_rows').addEventListener('change', function () {
    country_table.limit_rows = this.checked ?
        +(<HTMLInputElement>document.querySelector('#number_of_rows')).value : undefined;
    country_table.redraw();
});
document.querySelector('#number_of_rows').addEventListener('change', function () {
    country_table.limit_rows = (<HTMLInputElement>document.querySelector('#limit_rows')).checked ?
        +this.value : undefined;
    country_table.redraw();
});

                ¶

Enable pagination to select a different page

document.querySelector('#pagination').addEventListener('change', function () {
    country_table.pagination = this.checked;
    country_table.redraw();
});

                ¶

Set how many pages are shown in the paginator

document.querySelector('#number_of_pages').addEventListener('change', function () {
    country_table.max_pages_in_paginator = +this.value;
    country_table.redraw();
});

                ¶

Allow table to be searchable if table isn't paginated

document.querySelector('#searchable_if_not_paginated').addEventListener('change', function () {
    country_table.searchable_if_not_paginated = this.checked;
    country_table.redraw();
});

                ¶

Load the Country Data

                ¶

The interface is just a type definition for TypeScript.
Ignore this for JavaScript.

interface CountryData {
    name: string;
    code: string;
    population: number;
    urban_population: number;
    gdp: number;
    gdp_per_capita: number;
    land_area: number;
}

                ¶

Load the country CSV data using D3.
This loads and merges the data from multiple tables.
The data is loaded this way to work with the file format as provided by the World Bank data source.

d3.csv('data/countries.csv')
    .row((row) => ({
        name: row['name'],
        code: row['world_bank_code'],
    })).get((error, countries:CountryData[]) => {
        var country_lookup = {};
        countries.filter((row) => !!row.code).forEach((row) => {
            country_lookup[row.code] = row;
        });

                ¶

Load the country data statistics for the year 2000
from the World Bank data format.

        d3.csv('data/gdp.csv')
            .row((row) => ({
                country_name: row['Country Name'],
                country_code: row['Country Code'],
                indicator: row['Indicator Code'],
                value: +row['Value'],
                year: +row['Year'],
            })).get((error, rows) => {
                var indicator_mapping = {
                    'SP.POP.TOTL': 'population',
                    'EN.URB.MCTY.TL.ZS': 'urban_population',
                    'AG.LND.TOTL.K2': 'land_area',
                    'NY.GDP.MKTP.CD': 'gdp',
                    'NY.GDP.PCAP.CD': 'gdp_per_capita',
                };
                for (let row of rows) {
                    if (!row.country_code) continue;
                    if (row.year !== 2000) continue;
                    if (!(row.indicator in indicator_mapping)) continue;

                ¶

Convert GDP to millions of dollars

                    if (indicator_mapping[row.indicator] === 'gdp') row.value /= 1000000;
                    country_lookup[row.country_code][indicator_mapping[row.indicator]] = row.value;
                }

                ¶

Setup the table the data and render!

                d3.selectAll('#loading').remove();
                country_table.data = countries.filter((country) => country.gdp > 0.000000001);
                country_table.render();
            });
    });


text:
import {ContentChild, Directive, forwardRef, TemplateRef, Input} from "@angular/core";

let nextId: number = 0;

@Directive({
    selector: "a2-tab"
})
export class Tab {

    @Input() name: string = "tab-" + nextId++;
    @Input() disabled: boolean = false;

    @ContentChild(forwardRef(() => TabHeader)) private header: TabHeader;
    @ContentChild(forwardRef(() => TabBody)) private body: TabBody;
}

@Directive({
    selector: "template[tabHeader]"
})
export class TabHeader {
    constructor(public templateRef: TemplateRef<any>) {
    }
}

@Directive({
    selector: "template[tabBody]"
})
export class TabBody {
    constructor(public templateRef: TemplateRef<any>) {
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="meruvian.workshop"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="15"
        android:targetSdkVersion="24" />

    <application
        android:name="com.android.tools.fd.runtime.BootstrapApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >
        <activity android:name="meruvian.workshop.MainActivity" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>


text:
/** Description of CAENRFIDController
 *
 * @author Sergi Diaz Sanjuan
 * @version 1.61 Build May 13, 2015.
 */

package com.xop.CAENController;

import java.awt.Desktop;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;

import java.awt.Toolkit;
import java.net.URL;
import java.awt.Color;
import java.awt.Font;

public class DialogAbout extends JDialog {
	private static final long serialVersionUID = 1L;

	private int mDialogAboutWidth = 450;
	private int mDialogAboutHeight = 300;

	/** Create the dialog.*/
	public DialogAbout() {
		URL url = MainApplication.class.getResource("/ico_24x24.png");
		setIconImage(Toolkit.getDefaultToolkit().getImage(url));
		setBounds(
				(int)(MainApplication.mScreenSize.getWidth() - mDialogAboutWidth)/2,
				(int)(MainApplication.mScreenSize.getHeight() - mDialogAboutHeight)/2,
				mDialogAboutWidth,
				mDialogAboutHeight);
		getContentPane().setLayout(null);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setBounds(0, 228, 434, 33);
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane);
			{
				JButton okButton = new JButton(Messages.getString("com.xop.dialogAbout.buttonText")); //$NON-NLS-1$
				okButton.addActionListener(new close());
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);

			}
		}
		{
			JPanel panel = new JPanel();
			panel.setBounds(0, 11, 424, 206);
			getContentPane().add(panel);
			panel.setLayout(null);
			{
				JLabel lblSergiDiazSanjuan = new JLabel(Messages.getString("com.xop.dialogAbout.name")); //$NON-NLS-1$
				lblSergiDiazSanjuan.setFont(new Font("Tahoma", Font.PLAIN, 16));
				lblSergiDiazSanjuan.setHorizontalAlignment(SwingConstants.CENTER);
				lblSergiDiazSanjuan.setBounds(0, 26, 424, 26);
				panel.add(lblSergiDiazSanjuan);
			}
			{
				JLabel lblCopyright = new JLabel(Messages.getString("com.xop.dialogAbout.copyright")); //$NON-NLS-1$
				lblCopyright.setHorizontalAlignment(SwingConstants.CENTER);
				lblCopyright.setBounds(0, 165, 424, 14);
				panel.add(lblCopyright);
			}
			JLabel gitHubLink = new JLabel(Messages.getString("DialogAbout.gitHubLink.text")); //$NON-NLS-1$ //$NON-NLS-1$
			gitHubLink.setForeground(Color.BLUE);
			gitHubLink.setBounds(0, 102, 424, 14);
			panel.add(gitHubLink);
			gitHubLink.setHorizontalAlignment(SwingConstants.CENTER);
			{
				JLabel lblGithubRepository = new JLabel(Messages.getString("DialogAbout.lblGithubRepository.text")); //$NON-NLS-1$
				lblGithubRepository.setHorizontalAlignment(SwingConstants.CENTER);
				lblGithubRepository.setBounds(0, 77, 424, 14);
				panel.add(lblGithubRepository);
			}
			//TODO Add github repository
		}
		String gitUrl = "https://github.com/sergi413/CAEN_RFID_Controller";
	}

	/** Close/Hide dialog on press **/
	private class close implements ActionListener {
	    @Override
		public void actionPerformed(ActionEvent e){
	        //Hide Dialog on press
	    	setVisible(false);
	        if (MainApplication.D) System.out.println("Dialog OK clicked!");  //$NON-NLS-1$
	    }
	}
}


text:
package tests.rescala.testtools

import rescala.interface.RescalaInterface

class SetAndExtractTransactionHandle[Api <: RescalaInterface](val api: Api) {
  import api._
  def SetAndExtractTransactionHandle[A, N](source: Source[A], value: A)(implicit engine: Scheduler): Initializer = {
    engine.forceNewTransaction(source) { implicit t =>
      source.admit(value)
      t.tx.initializer
    }
  }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Boletus polyporoides Gentilli

### Remarks
null


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Batista & Ciferri, Quad. Lab. crittogam. , Pavia 31: 42 (1963)

#### Original name
Asbolisia inocarpi Bat.

### Remarks
null


text:
namespace iem {

//TEST(PriceTest, SpaceMeasure) {
//  constexpr std::size_t price_align_size = 16;
//  EXPECT_EQ(price_align_size, alignSize<Price>());
//}

TEST(PriceTest, NoThrowMovable) {
  EXPECT_TRUE(std::is_nothrow_move_constructible<Price>::value);
}

TEST(PriceTest, ConstructorException) {
  ASSERT_THROW(Price(NanTick - 1), std::invalid_argument);
}

TEST(PriceTest, MethodTicksSetsCorrectly) {
  Price p;
  const Ticks t = 450;
  p.set(t);
  EXPECT_EQ(t, p.ticks());
}

TEST(PriceTest, TicksPerPoint) {
  Price p;
  EXPECT_EQ(1000, p.ticks_per_point());
}

TEST(PriceTest, SessionStringFormat) {
  std::map<Price, std::string> price_expected_str_map{
      {Price(999), "0.999"},
      {Price(), "----"},
  };

  constexpr std::size_t kLen = 8;
  char c_str[kLen];

  for (const auto& it : price_expected_str_map) {
    // Test snprint_price directly
    snprintf_price(c_str, kLen, it.first);
    EXPECT_EQ(std::string(c_str), it.second);

    // Test to_string
    EXPECT_EQ(to_string(it.first), it.second);
  }
}

}  // namespace iem


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.connectedvmware.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Defines the virtual disk update. */
@Fluent
public final class VirtualDiskUpdate {
    /*
     * Gets or sets the name of the virtual disk.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * Gets or sets the disk total size.
     */
    @JsonProperty(value = "diskSizeGB")
    private Integer diskSizeGB;

    /*
     * Gets or sets the device key value.
     */
    @JsonProperty(value = "deviceKey")
    private Integer deviceKey;

    /*
     * Gets or sets the disk mode.
     */
    @JsonProperty(value = "diskMode")
    private DiskMode diskMode;

    /*
     * Gets or sets the controller id.
     */
    @JsonProperty(value = "controllerKey")
    private Integer controllerKey;

    /*
     * Gets or sets the unit number of the disk on the controller.
     */
    @JsonProperty(value = "unitNumber")
    private Integer unitNumber;

    /*
     * Gets or sets the device name.
     */
    @JsonProperty(value = "deviceName")
    private String deviceName;

    /*
     * Gets or sets the disk backing type.
     */
    @JsonProperty(value = "diskType")
    private DiskType diskType;

    /**
     * Get the name property: Gets or sets the name of the virtual disk.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Gets or sets the name of the virtual disk.
     *
     * @param name the name value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the diskSizeGB property: Gets or sets the disk total size.
     *
     * @return the diskSizeGB value.
     */
    public Integer diskSizeGB() {
        return this.diskSizeGB;
    }

    /**
     * Set the diskSizeGB property: Gets or sets the disk total size.
     *
     * @param diskSizeGB the diskSizeGB value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withDiskSizeGB(Integer diskSizeGB) {
        this.diskSizeGB = diskSizeGB;
        return this;
    }

    /**
     * Get the deviceKey property: Gets or sets the device key value.
     *
     * @return the deviceKey value.
     */
    public Integer deviceKey() {
        return this.deviceKey;
    }

    /**
     * Set the deviceKey property: Gets or sets the device key value.
     *
     * @param deviceKey the deviceKey value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withDeviceKey(Integer deviceKey) {
        this.deviceKey = deviceKey;
        return this;
    }

    /**
     * Get the diskMode property: Gets or sets the disk mode.
     *
     * @return the diskMode value.
     */
    public DiskMode diskMode() {
        return this.diskMode;
    }

    /**
     * Set the diskMode property: Gets or sets the disk mode.
     *
     * @param diskMode the diskMode value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withDiskMode(DiskMode diskMode) {
        this.diskMode = diskMode;
        return this;
    }

    /**
     * Get the controllerKey property: Gets or sets the controller id.
     *
     * @return the controllerKey value.
     */
    public Integer controllerKey() {
        return this.controllerKey;
    }

    /**
     * Set the controllerKey property: Gets or sets the controller id.
     *
     * @param controllerKey the controllerKey value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withControllerKey(Integer controllerKey) {
        this.controllerKey = controllerKey;
        return this;
    }

    /**
     * Get the unitNumber property: Gets or sets the unit number of the disk on the controller.
     *
     * @return the unitNumber value.
     */
    public Integer unitNumber() {
        return this.unitNumber;
    }

    /**
     * Set the unitNumber property: Gets or sets the unit number of the disk on the controller.
     *
     * @param unitNumber the unitNumber value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withUnitNumber(Integer unitNumber) {
        this.unitNumber = unitNumber;
        return this;
    }

    /**
     * Get the deviceName property: Gets or sets the device name.
     *
     * @return the deviceName value.
     */
    public String deviceName() {
        return this.deviceName;
    }

    /**
     * Set the deviceName property: Gets or sets the device name.
     *
     * @param deviceName the deviceName value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withDeviceName(String deviceName) {
        this.deviceName = deviceName;
        return this;
    }

    /**
     * Get the diskType property: Gets or sets the disk backing type.
     *
     * @return the diskType value.
     */
    public DiskType diskType() {
        return this.diskType;
    }

    /**
     * Set the diskType property: Gets or sets the disk backing type.
     *
     * @param diskType the diskType value to set.
     * @return the VirtualDiskUpdate object itself.
     */
    public VirtualDiskUpdate withDiskType(DiskType diskType) {
        this.diskType = diskType;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}


text:
using System;
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.ResourceManager;

namespace Azure.ResourceManager.Batch
{
    /// <summary>
    /// A Class representing a BatchPrivateEndpointConnection along with the instance operations that can be performed on it.
    /// If you have a <see cref="ResourceIdentifier" /> you can construct a <see cref="BatchPrivateEndpointConnectionResource" />
    /// from an instance of <see cref="ArmClient" /> using the GetBatchPrivateEndpointConnectionResource method.
    /// Otherwise you can get one from its parent resource <see cref="BatchAccountResource" /> using the GetBatchPrivateEndpointConnection method.
    /// </summary>
    public partial class BatchPrivateEndpointConnectionResource : ArmResource
    {
        /// <summary> Generate the resource identifier of a <see cref="BatchPrivateEndpointConnectionResource"/> instance. </summary>
        public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string privateEndpointConnectionName)
        {
            var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}";
            return new ResourceIdentifier(resourceId);
        }

        private readonly ClientDiagnostics _batchPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics;
        private readonly PrivateEndpointConnectionRestOperations _batchPrivateEndpointConnectionPrivateEndpointConnectionRestClient;
        private readonly BatchPrivateEndpointConnectionData _data;

        /// <summary> Initializes a new instance of the <see cref="BatchPrivateEndpointConnectionResource"/> class for mocking. </summary>
        protected BatchPrivateEndpointConnectionResource()
        {
        }

        /// <summary> Initializes a new instance of the <see cref = "BatchPrivateEndpointConnectionResource"/> class. </summary>
        /// <param name="client"> The client parameters to use in these operations. </param>
        /// <param name="data"> The resource that is the target of operations. </param>
        internal BatchPrivateEndpointConnectionResource(ArmClient client, BatchPrivateEndpointConnectionData data) : this(client, data.Id)
        {
            HasData = true;
            _data = data;
        }

        /// <summary> Initializes a new instance of the <see cref="BatchPrivateEndpointConnectionResource"/> class. </summary>
        /// <param name="client"> The client parameters to use in these operations. </param>
        /// <param name="id"> The identifier of the resource that is the target of operations. </param>
        internal BatchPrivateEndpointConnectionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
        {
            _batchPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Batch", ResourceType.Namespace, Diagnostics);
            TryGetApiVersion(ResourceType, out string batchPrivateEndpointConnectionPrivateEndpointConnectionApiVersion);
            _batchPrivateEndpointConnectionPrivateEndpointConnectionRestClient = new PrivateEndpointConnectionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, batchPrivateEndpointConnectionPrivateEndpointConnectionApiVersion);
#if DEBUG
			ValidateResourceId(Id);
#endif
        }

        /// <summary> Gets the resource type for the operations. </summary>
        public static readonly ResourceType ResourceType = "Microsoft.Batch/batchAccounts/privateEndpointConnections";

        /// <summary> Gets whether or not the current instance has data. </summary>
        public virtual bool HasData { get; }

        /// <summary> Gets the data representing this Feature. </summary>
        /// <exception cref="InvalidOperationException"> Throws if there is no data loaded in the current instance. </exception>
        public virtual BatchPrivateEndpointConnectionData Data
        {
            get
            {
                if (!HasData)
                    throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
                return _data;
            }
        }

        internal static void ValidateResourceId(ResourceIdentifier id)
        {
            if (id.ResourceType != ResourceType)
                throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
        }

        /// <summary>
        /// Gets information about the specified private endpoint connection.
        /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}
        /// Operation Id: PrivateEndpointConnection_Get
        /// </summary>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public virtual async Task<Response<BatchPrivateEndpointConnectionResource>> GetAsync(CancellationToken cancellationToken = default)
        {
            using var scope = _batchPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("BatchPrivateEndpointConnectionResource.Get");
            scope.Start();
            try
            {
                var response = await _batchPrivateEndpointConnectionPrivateEndpointConnectionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
                if (response.Value == null)
                    throw new RequestFailedException(response.GetRawResponse());
                return Response.FromValue(new BatchPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse());
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }

        /// <summary>
        /// Gets information about the specified private endpoint connection.
        /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}
        /// Operation Id: PrivateEndpointConnection_Get
        /// </summary>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public virtual Response<BatchPrivateEndpointConnectionResource> Get(CancellationToken cancellationToken = default)
        {
            using var scope = _batchPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("BatchPrivateEndpointConnectionResource.Get");
            scope.Start();
            try
            {
                var response = _batchPrivateEndpointConnectionPrivateEndpointConnectionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
                if (response.Value == null)
                    throw new RequestFailedException(response.GetRawResponse());
                return Response.FromValue(new BatchPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse());
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }

        /// <summary>
        /// Deletes the specified private endpoint connection.
        /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}
        /// Operation Id: PrivateEndpointConnection_Delete
        /// </summary>
        /// <param name="waitUntil"> <see cref="WaitUntil.Completed"/> if the method should wait to return until the long-running operation has completed on the service; <see cref="WaitUntil.Started"/> if it should return after starting the operation. For more information on long-running operations, please see <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/LongRunningOperations.md"> Azure.Core Long-Running Operation samples</see>. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public virtual async Task<ArmOperation> DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
        {
            using var scope = _batchPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("BatchPrivateEndpointConnectionResource.Delete");
            scope.Start();
            try
            {
                var response = await _batchPrivateEndpointConnectionPrivateEndpointConnectionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
                var operation = new BatchArmOperation(_batchPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics, Pipeline, _batchPrivateEndpointConnectionPrivateEndpointConnectionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation);
                if (waitUntil == WaitUntil.Completed)
                    await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
                return operation;
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }

        /// <summary>
        /// Deletes the specified private endpoint connection.
        /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}
        /// Operation Id: PrivateEndpointConnection_Delete
        /// </summary>
        /// <param name="waitUntil"> <see cref="WaitUntil.Completed"/> if the method should wait to return until the long-running operation has completed on the service; <see cref="WaitUntil.Started"/> if it should return after starting the operation. For more information on long-running operations, please see <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/LongRunningOperations.md"> Azure.Core Long-Running Operation samples</see>. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
        {
            using var scope = _batchPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("BatchPrivateEndpointConnectionResource.Delete");
            scope.Start();
            try
            {
                var response = _batchPrivateEndpointConnectionPrivateEndpointConnectionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
                var operation = new BatchArmOperation(_batchPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics, Pipeline, _batchPrivateEndpointConnectionPrivateEndpointConnectionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation);
                if (waitUntil == WaitUntil.Completed)
                    operation.WaitForCompletionResponse(cancellationToken);
                return operation;
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }

        /// <summary>
        /// Updates the properties of an existing private endpoint connection.
        /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}
        /// Operation Id: PrivateEndpointConnection_Update
        /// </summary>
        /// <param name="waitUntil"> <see cref="WaitUntil.Completed"/> if the method should wait to return until the long-running operation has completed on the service; <see cref="WaitUntil.Started"/> if it should return after starting the operation. For more information on long-running operations, please see <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/LongRunningOperations.md"> Azure.Core Long-Running Operation samples</see>. </param>
        /// <param name="data"> PrivateEndpointConnection properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged. </param>
        /// <param name="ifMatch"> The state (ETag) version of the private endpoint connection to update. This value can be omitted or set to "*" to apply the operation unconditionally. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        /// <exception cref="ArgumentNullException"> <paramref name="data"/> is null. </exception>
        public virtual async Task<ArmOperation<BatchPrivateEndpointConnectionResource>> UpdateAsync(WaitUntil waitUntil, BatchPrivateEndpointConnectionData data, ETag? ifMatch = null, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(data, nameof(data));

            using var scope = _batchPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("BatchPrivateEndpointConnectionResource.Update");
            scope.Start();
            try
            {
                var response = await _batchPrivateEndpointConnectionPrivateEndpointConnectionRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false);
                var operation = new BatchArmOperation<BatchPrivateEndpointConnectionResource>(new BatchPrivateEndpointConnectionOperationSource(Client), _batchPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics, Pipeline, _batchPrivateEndpointConnectionPrivateEndpointConnectionRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
                if (waitUntil == WaitUntil.Completed)
                    await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
                return operation;
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }

        /// <summary>
        /// Updates the properties of an existing private endpoint connection.
        /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}
        /// Operation Id: PrivateEndpointConnection_Update
        /// </summary>
        /// <param name="waitUntil"> <see cref="WaitUntil.Completed"/> if the method should wait to return until the long-running operation has completed on the service; <see cref="WaitUntil.Started"/> if it should return after starting the operation. For more information on long-running operations, please see <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/LongRunningOperations.md"> Azure.Core Long-Running Operation samples</see>. </param>
        /// <param name="data"> PrivateEndpointConnection properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged. </param>
        /// <param name="ifMatch"> The state (ETag) version of the private endpoint connection to update. This value can be omitted or set to "*" to apply the operation unconditionally. </param>
        /// <param name="cancellationToken"> The cancellation token to use. </param>
        /// <exception cref="ArgumentNullException"> <paramref name="data"/> is null. </exception>
        public virtual ArmOperation<BatchPrivateEndpointConnectionResource> Update(WaitUntil waitUntil, BatchPrivateEndpointConnectionData data, ETag? ifMatch = null, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(data, nameof(data));

            using var scope = _batchPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics.CreateScope("BatchPrivateEndpointConnectionResource.Update");
            scope.Start();
            try
            {
                var response = _batchPrivateEndpointConnectionPrivateEndpointConnectionRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken);
                var operation = new BatchArmOperation<BatchPrivateEndpointConnectionResource>(new BatchPrivateEndpointConnectionOperationSource(Client), _batchPrivateEndpointConnectionPrivateEndpointConnectionClientDiagnostics, Pipeline, _batchPrivateEndpointConnectionPrivateEndpointConnectionRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
                if (waitUntil == WaitUntil.Completed)
                    operation.WaitForCompletion(cancellationToken);
                return operation;
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }
    }
}


text:
package com.fxt.model.po;

@SuppressWarnings("serial")
public class MaterialCategory implements java.io.Serializable
{
	private Long Id;
	private String Name;
	private Short CategoryLevel;
	private MaterialCategory materialCategory;

	public MaterialCategory()
	{

	}

	public MaterialCategory(Long Id)
	{
		this.Id = Id;
	}

	public MaterialCategory(String name, Short categoryLevel,
			MaterialCategory materialCategory) {
		Name = name;
		CategoryLevel = categoryLevel;
		this.materialCategory = materialCategory;
	}

	public Long getId() {
		return Id;
	}

	public void setId(Long id) {
		Id = id;
	}

	public String getName() {
		return Name;
	}

	public void setName(String name) {
		Name = name;
	}

	public Short getCategoryLevel() {
		return CategoryLevel;
	}

	public void setCategoryLevel(Short categoryLevel) {
		CategoryLevel = categoryLevel;
	}

	public MaterialCategory getMaterialCategory() {
		return materialCategory;
	}

	public void setMaterialCategory(MaterialCategory materialCategory) {
		this.materialCategory = materialCategory;
	}

}


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

namespace BrainBit.StateMachine
{
	public enum StateType
	{
		AND,
		OR
	}

	public class State: IEquatable<State>
	{
		public delegate bool stateCheck ();

		public delegate IEnumerator stateAction (State state);

		private Guid _id;
		private stateCheck _check;
		private stateAction _action;
		private List<State> _children;
		private StateType _type;
		private State _parent;
		private bool _stateRunning;
		private bool _actionRunning;

		public State ()
		{
			this._init ();
		}

		public State (StateType type)
		{
			this._init ();
			this._type = type;
		}

		public State (stateAction action, StateType type)
		{
			this._init ();
			this._type = type;
			this._action = action;
		}

		public State (stateAction action)
		{
			this._init ();
			this._action = action;
		}

		public State (stateCheck check, stateAction action, StateType type)
		{
			this._init ();
			this._check = check;
			this._action = action;
			this._type = type;
		}

		public State (stateCheck check, stateAction action)
		{
			this._init ();
			this._check = check;
			this._action = action;
		}

		public State (stateCheck check, stateAction action, StateType type, List<State> children)
		{
			this._id = Guid.NewGuid ();
			this._check = check;
			this._action = action;
			this._type = type;
			if (children != null) {
				this._children = children;
			} else {
				this._children = new List<State> ();
			}
		}

		private void _init ()
		{
			this._id = Guid.NewGuid ();
			this._children = new List<State> ();
			this._type = StateType.AND;
			this._action = null;
			this._check = () => {
				return true;
			};
		}

		public State Parent {
			get {
				return this._parent;
			}
			set {
				if (this._parent != null) {
					this._parent.Children.Remove (this);
				}

				this._parent = value;
				if (this._parent != null) {
					this._parent.Children.Add (this);
				}
			}
		}

		public List<State> Children {
			get {
				return this._children;
			}
		}

		public bool StateRunning {
			get {
				return this._stateRunning;
			}
			set {
				this._stateRunning = value;
			}
		}

		public bool ActionRunning {
			get {
				return this._actionRunning;
			}
			set {
				this._actionRunning = value;
			}
		}
		public bool Check {
			get {
				if (this._check != null) {
					return this._check ();
				} else {
					return true;
				}
			}
		}

		public StateType Type{
			get{
				return this._type;
			}
		}

		public void Action(MonoBehaveProxy proxy)
		{
			if (this._action != null) {
				this._actionRunning = true;
				proxy.StartCoroutine(this._action(this));
			}
		}

	#region IEquatable implementation
		public bool Equals (State other)
		{
			return this._id == other._id;
		}
	#endregion
	}
}


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

namespace EasyNetQ
{
    public static class LinqExtensions
    {
        // http://mikehadlow.blogspot.co.uk/2012/04/useful-linq-extension-method.html
        public static IEnumerable<T> Intersperse<T>(this IEnumerable<T> items, T separator)
        {
            var first = true;
            foreach (var item in items)
            {
                if (first) first = false;
                else
                {
                    yield return separator;
                }
                yield return item;
            }
        }

        public static IEnumerable<KeyValuePair<string, string>> EnumerateDictionary(this IDictionary<string, object> dictionary)
        {
            return from KeyValuePair<string, object> entry in dictionary
                   select new KeyValuePair<string, string>(entry.Key, entry.Value.ToString());
        }

        public static IEnumerable<T> SurroundWith<T>(this IEnumerable<T> items, T first, T last)
        {
            yield return first;
            foreach (var item in items)
            {
                yield return item;
            }
            yield return last;
        }

        public static void Shuffle<T>(this IList<T> list)
        {
            var n = list.Count;
            while (n > 1)
            {
                n--;
                var k = Random.Next(n + 1);
                var value = list[k];
                list[k] = list[n];
                list[n] = value;
            }
        }

        [ThreadStatic] private static Random random;

        private static Random Random { get { return random ?? (random = new Random(Environment.TickCount)); } }
    }
}


text:
package com.vaguehope.onosendai.util;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.SoftReference;

import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;
import android.graphics.BitmapRegionDecoder;
import android.graphics.Rect;
import android.net.Uri;
import android.provider.MediaStore.MediaColumns;

public class ImageMetadata implements Titleable {

	private static final String SCHEME_FILE = "file";
	private static final String SCHEME_CONTENT = "content";
	private static final LogWrapper LOG = new LogWrapper("IM");

	private final Context context;
	private final Uri uri;
	private final long size;
	private final String name;

	private final Object[] bitmapLock = new Object[0];
	private volatile AssetFileDescriptor fileDescriptor;
	private volatile SoftReference<Bitmap> cacheBitmap;
	private volatile int cacheScale = -1;

	private volatile int cachedWidth = -1;
	private volatile int cachedHeight = -1;

	public ImageMetadata (final Context context, final Uri uri) {
		this.context = context;
		this.uri = uri;
		if (uri == null) {
			this.size = 0;
			this.name = null;
		}
		else if (SCHEME_CONTENT.equals(uri.getScheme())) {
			final Cursor cursor = context.getContentResolver().query(uri, new String[] {
					MediaColumns.SIZE, MediaColumns.DISPLAY_NAME
			}, null, null, null);
			try {
				if (cursor != null) {
					cursor.moveToFirst();
					final int colSize = cursor.getColumnIndex(MediaColumns.SIZE);
					final int colDisplayName = cursor.getColumnIndex(MediaColumns.DISPLAY_NAME); // Filename with extension.
					this.size = cursor.getLong(colSize);
					this.name = cursor.getString(colDisplayName);
				}
				else {
					throw new IllegalArgumentException("Resource not found: " + uri);
				}
			}
			finally {
				IoHelper.closeQuietly(cursor);
			}
		}
		else if (SCHEME_FILE.equals(uri.getScheme())) {
			this.size = new File(uri.getPath()).length();
			this.name = uri.getLastPathSegment();
		}
		else {
			throw new IllegalArgumentException("Unknown resource type: " + uri);
		}
	}

	public boolean exists () {
		return this.uri != null;
	}

	/**
	 * With file extension.
	 */
	public String getName () {
		return this.name;
	}

	public long getSize () {
		return this.size;
	}

	@Override
	public String getUiTitle () {
		if (this.name == null) return "(empty)";
		return String.format("%s (%s)", this.name, IoHelper.readableFileSize(this.size));
	}

	public InputStream open () throws IOException {
		if (this.uri == null) return null;
		if (SCHEME_FILE.equals(this.uri.getScheme())) return new FileInputStream(new File(this.uri.getPath()));
		if (SCHEME_CONTENT.equals(this.uri.getScheme())) return this.context.getContentResolver().openInputStream(this.uri);
		throw new IllegalArgumentException("Unknown resource type: " + this.uri);
	}

	private AssetFileDescriptor openFileDescriptor () throws IOException {
		if (this.uri == null) return null;
		synchronized (this.bitmapLock) {
			if (this.fileDescriptor == null) {
				if (SCHEME_FILE.equals(this.uri.getScheme()) || SCHEME_CONTENT.equals(this.uri.getScheme())) {
					this.fileDescriptor = this.context.getContentResolver().openAssetFileDescriptor(this.uri, "r");
				}
				else {
					throw new IllegalArgumentException("Unknown resource type: " + this.uri);
				}
			}
			return this.fileDescriptor;
		}
	}

	public int getWidth () throws IOException {
		if (this.cachedWidth < 1) readDimentions();
		return this.cachedWidth;
	}

	public int getHeight () throws IOException {
		if (this.cachedHeight < 1) readDimentions();
		return this.cachedHeight;
	}

	private void readDimentions () throws IOException {
		synchronized (this.bitmapLock) {
			final Options opts = new Options();
			opts.inJustDecodeBounds = true;
			BitmapFactory.decodeFileDescriptor(openFileDescriptor().getFileDescriptor(), null, opts);
			this.cachedWidth = opts.outWidth;
			this.cachedHeight = opts.outHeight;
		}
	}

	public Bitmap getBitmap (final int scalePercentage) throws IOException {
		return getBitmap(scalePercentage, null);
	}

	public Bitmap getBitmap (final int scalePercentage, final Rect cropRect) throws IOException {
		synchronized (this.bitmapLock) {
			final Bitmap cached = this.cacheBitmap == null ? null : this.cacheBitmap.get();

			if (cached != null && scalePercentage != this.cacheScale) {
				this.cacheBitmap = null;
				cached.recycle();
			}

			if (cached == null || scalePercentage != this.cacheScale) {
				final Bitmap fresh = readBitmap(scalePercentage, cropRect);
				this.cacheScale = scalePercentage;
				this.cacheBitmap = new SoftReference<Bitmap>(fresh);
				return fresh;
			}
			return cached;
		}
	}

	private Bitmap readBitmap (final int scalePercentage, final Rect cropRect) throws IOException {
		if (100 % scalePercentage != 0) throw new IllegalArgumentException("scalePercentage " + scalePercentage + " is not a int ratio.");
		final Options opts = new Options();
		opts.inPurgeable = true;
		opts.inInputShareable = true;
		opts.inSampleSize = 100 / scalePercentage;

		if (cropRect != null) {
			final BitmapRegionDecoder dec = BitmapRegionDecoder.newInstance(openFileDescriptor().getFileDescriptor(), true);
			try {
				return dec.decodeRegion(cropRect, opts);
			}
			finally {
				dec.recycle();
			}
		}

		return BitmapFactory.decodeFileDescriptor(openFileDescriptor().getFileDescriptor(), null, opts);
	}

	public void recycle () {
		synchronized (this.bitmapLock) {
			if (this.cacheBitmap != null) {
				final Bitmap cached = this.cacheBitmap.get();
				if (cached != null) cached.recycle();
				this.cacheBitmap = null;
			}
			if (this.fileDescriptor != null) {
				try {
					this.fileDescriptor.close();
				}
				catch (final IOException e) {
					LOG.w("Failed to dispose of fileDescriptor.", e);
				}
				this.fileDescriptor = null;
			}
		}
	}

	@Override
	public String toString () {
		return new StringBuilder(getClass().getSimpleName()).append("{").append(this.uri)
				.append(",").append(this.name)
				.append(",").append(this.size)
				.append("}").toString();
	}

//	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

	public static boolean isUnderstoodResource (final Uri uri) {
		if (uri == null) return false;
		return SCHEME_CONTENT.equals(uri.getScheme()) || SCHEME_FILE.equals(uri.getScheme());
	}

	public static boolean isRemoteResource (final Uri uri) {
		if (uri == null) return false;
		return SCHEME_CONTENT.equals(uri.getScheme());
	}

}


text:
About

Lorem ipsum dolor sit amet consectetur.

2009-2011

Our Humble Beginnings

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!

March 2011

An Agency is Born

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!

December 2012

Transition to Full Service

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!

July 2014

Phase Two Expansion

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!

Be Part

Of Our

Story!


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

namespace iTunesSVKS_2.Common
{
    static class Cover
    {
        /// <summary>
        /// Ссылки на различные размеры изображения обложки
        /// </summary>
        public struct CoverSizes
        {
            public string Mega;
            public string Extralarge;
            public string Large;
            public string Medium;
            public string Small;
        }
    }
}


text:
const filename = require('path').basename(__filename);
const fn = require(`../${filename}`);

const _ = require('lodash');
const expect = require('chai').expect;
const seriesList = require('./fixtures/seriesList.js')();
const invoke = require('./helpers/invoke_series_fn.js');

describe(filename, function () {
  it('should return the positive value of every value', function () {

    return invoke(fn, [seriesList]).then(function (result) {
      const before = _.filter(result.input[0].list[0].data, function (point) {
        return (point[1] < 0);
      });

      const after = _.filter(result.output.list[0].data, function (point) {
        return (point[1] < 0);
      });

      expect(before.length > 0).to.eql(true);
      expect(result.output.list[0].data.length > 0).to.eql(true);
      expect(after.length).to.eql(0);
    });
  });
});


text:
def FOUR_CHAR_CODE(x): return x
listNotifyNothing = FOUR_CHAR_CODE('nada')
listNotifyClick = FOUR_CHAR_CODE('clik')
listNotifyDoubleClick = FOUR_CHAR_CODE('dblc')
listNotifyPreClick = FOUR_CHAR_CODE('pclk')
lDrawingModeOffBit = 3
lDoVAutoscrollBit = 1
lDoHAutoscrollBit = 0
lDrawingModeOff = 8
lDoVAutoscroll = 2
lDoHAutoscroll = 1
lOnlyOneBit = 7
lExtendDragBit = 6
lNoDisjointBit = 5
lNoExtendBit = 4
lNoRectBit = 3
lUseSenseBit = 2
lNoNilHiliteBit = 1
lOnlyOne = -128
lExtendDrag = 64
lNoDisjoint = 32
lNoExtend = 16
lNoRect = 8
lUseSense = 4
lNoNilHilite = 2
lInitMsg = 0
lDrawMsg = 1
lHiliteMsg = 2
lCloseMsg = 3
kListDefProcPtr = 0
kListDefUserProcType = kListDefProcPtr
kListDefStandardTextType = 1
kListDefStandardIconType = 2


text:
<!DOCTYPE html>

	<title>SP.X Demo</title>
	<meta charset="utf-8">

Toggle DOMChangeHelper activity

Toggle Ticker timeScale


text:
#include "e.h"

struct _E_Config_Dialog_Data
{
   Eina_List           *desks;
   Ecore_Event_Handler *desk_change_handler;

   struct
   {
      Evas_Object *list, *add, *del;
   } obj;
};

/* local function prototypes */
static void        *_create_data(E_Config_Dialog *cfd);
static void         _free_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata);
static Evas_Object *_basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata);
static Eina_Bool    _desks_update(void *data, int ev_type EINA_UNUSED, void *ev EINA_UNUSED);
static int          _cb_desks_sort(const void *data1, const void *data2);
static void         _fill_apps_list(E_Config_Dialog_Data *cfdata, Evas_Object *il);
static void         _btn_cb_add(void *data, void *data2);
static void         _btn_cb_del(void *data, void *data2);
static void         _widget_list_selection_changed(void *data, Evas_Object *obj EINA_UNUSED);

E_Config_Dialog *
e_int_config_apps_personal(Evas_Object *parent EINA_UNUSED, const char *params EINA_UNUSED)
{
   E_Config_Dialog *cfd;
   E_Config_Dialog_View *v;

   if (e_config_dialog_find("E", "applications/personal_applications"))
     return NULL;

   v = E_NEW(E_Config_Dialog_View, 1);
   v->create_cfdata = _create_data;
   v->free_cfdata = _free_data;
   v->basic.create_widgets = _basic_create;

   cfd = e_config_dialog_new(NULL, _("Personal Application Launchers"),
                             "E", "applications/personal_applications",
                             "preferences-applications-personal", 0, v, NULL);
   return cfd;
}

/* local function prototypes */
static void *
_create_data(E_Config_Dialog *cfd EINA_UNUSED)
{
   E_Config_Dialog_Data *cfdata;

   cfdata = E_NEW(E_Config_Dialog_Data, 1);
   cfdata->desk_change_handler = ecore_event_handler_add
       (EFREET_EVENT_DESKTOP_CACHE_UPDATE, _desks_update, cfdata);

   return cfdata;
}

static void
_free_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{
   Efreet_Desktop *desk;

   EINA_LIST_FREE(cfdata->desks, desk)
     efreet_desktop_free(desk);
   if (cfdata->desk_change_handler)
     ecore_event_handler_del(cfdata->desk_change_handler);
   E_FREE(cfdata);
}

static Evas_Object *
_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
   Evas_Object *of, *li, *ob;
   Evas_Coord mw, mh;

   e_dialog_resizable_set(cfd->dia, 1);

   of = e_widget_table_add(e_win_evas_win_get(evas), 0);

   li = e_widget_ilist_add(evas, 24, 24, NULL);
   cfdata->obj.list = li;
   e_widget_ilist_multi_select_set(li, EINA_TRUE);
   e_widget_size_min_get(li, &mw, &mh);
   if (mw < (200 * e_scale)) mw = 200 * e_scale;
   if (mh < (160 * e_scale)) mh = 160 * e_scale;
   e_widget_size_min_set(li, mw, mh);
   e_widget_on_change_hook_set(li, _widget_list_selection_changed, cfdata);
   e_widget_table_object_append(of, li, 0, 1, 2, 1, 1, 1, 1, 1);

   _fill_apps_list(cfdata, cfdata->obj.list);
   e_widget_ilist_go(li);

   ob = e_widget_button_add(evas, _("Add"), "list-add", _btn_cb_add, cfdata, NULL);
   cfdata->obj.add = ob;
   e_widget_table_object_append(of, ob, 0, 2, 1, 1, 1, 1, 1, 0);

   ob = e_widget_button_add(evas, _("Remove"), "list-remove", _btn_cb_del, cfdata, NULL);
   cfdata->obj.del = ob;
   e_widget_disabled_set(ob, 1);
   e_widget_table_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 0);

   elm_win_center(cfd->dia->win, 1, 1);
   return of;
}

static Eina_Bool
_desks_update(void *data, int ev_type EINA_UNUSED, void *ev EINA_UNUSED)
{
   E_Config_Dialog_Data *cfdata = data;
   Efreet_Desktop *desk;

   EINA_LIST_FREE(cfdata->desks, desk)
     efreet_desktop_free(desk);
   _fill_apps_list(cfdata, cfdata->obj.list);
   return ECORE_CALLBACK_PASS_ON;
}

static int
_cb_desks_sort(const void *data1, const void *data2)
{
   const Efreet_Desktop *d1, *d2;

   if (!(d1 = data1)) return 1;
   if (!d1->name) return 1;
   if (!(d2 = data2)) return -1;
   if (!d2->name) return -1;
   return strcmp(d1->name, d2->name);
}

static void
_fill_apps_list(E_Config_Dialog_Data *cfdata, Evas_Object *il)
{
   Eina_List *desks = NULL, *l;
   Efreet_Desktop *desk = NULL;
   Evas *evas;
   const char *desktop_dir = e_user_desktop_dir_get();
   int n = 0;

   if (!desktop_dir) return;

   n = strlen(desktop_dir);

   if (!cfdata->desks)
     {
        desks = efreet_util_desktop_name_glob_list("*");
        EINA_LIST_FREE(desks, desk)
          {
             if (desk->no_display)
               {
                  efreet_desktop_free(desk);
                  continue;
               }
             if (!strncmp(desk->orig_path, desktop_dir, n))
               cfdata->desks = eina_list_append(cfdata->desks, desk);
             else
               efreet_desktop_free(desk);
          }
        cfdata->desks = eina_list_sort(cfdata->desks, -1, _cb_desks_sort);
     }

   evas = evas_object_evas_get(il);
   evas_event_freeze(evas);
   edje_freeze();
   e_widget_ilist_freeze(il);
   e_widget_ilist_clear(il);

   EINA_LIST_FOREACH(cfdata->desks, l, desk)
     {
        Evas_Object *icon = e_util_desktop_icon_add(desk, 24, evas);

        e_widget_ilist_append(il, icon, desk->name,
                              NULL, desk->orig_path,
                              desk->orig_path);
     }

   e_widget_ilist_go(il);
   e_widget_ilist_thaw(il);
   edje_thaw();
   evas_event_thaw(evas);
}

static void
_btn_cb_add(void *data EINA_UNUSED, void *data2 EINA_UNUSED)
{
   e_desktop_edit(NULL);
}

static void
_btn_cb_del(void *data, void *data2 EINA_UNUSED)
{
   E_Config_Dialog_Data *cfdata = data;
   const Eina_List *l;
   const E_Ilist_Item *it;
   int x = -1;

   EINA_LIST_FOREACH(e_widget_ilist_items_get(cfdata->obj.list), l, it)
     {
        const char *file;

        x++;
        if (!it->selected) continue;
        file = e_widget_ilist_item_data_get(it);
        if (!file) break;
        ecore_file_unlink(file);
        e_widget_ilist_remove_num(cfdata->obj.list, x);
     }
   e_int_menus_cache_clear();
}

static void
_widget_list_selection_changed(void *data, Evas_Object *obj EINA_UNUSED)
{
   E_Config_Dialog_Data *cfdata = data;

   e_widget_disabled_set(cfdata->obj.del, !e_widget_ilist_selected_count_get(cfdata->obj.list));
}


text:
To use this script, you must get an API key from [picnic.sh](http://picnic.sh)

## Installation

```
# download the script
curl -O https://raw.githubusercontent.com/ketchupinc/picnic-sh/master/picnic.sh

# make the script executable
chmod +x picnic.sh

# add your api key by opening the file and adding it to the top line
nano picnic.sh

```

## Examples

```
# list the websites you've purchased
./picnic.sh --list

# get the price of a new domain
./picnic.sh --price mynewdomain.com

# buy the domain and set the HTML
./picnic.sh --create mynewdomain.com "<html><body>coming soon.</body></html>"

# update the content of your website
./picnic.sh --update mynewdomain.com "<html><body>coming soon.</body></html>"
```

## Questions?

Contact us at help [ a t ] picnic.sh


text:
Brewer.Venda = (function() {

	function Venda(tabelaItens) {
		this.tabelaItens = tabelaItens;
		this.valorTotalBox = $('.js-valor-total-box');
		this.valorFreteInput = $('#valorFrete');
		this.valorDescontoInput = $('#valorDesconto');

		this.valorTotalItens = this.tabelaItens.valorTotal();
		this.valorFrete = this.valorFreteInput.data('valor');
		this.valorDesconto = this.valorDescontoInput.data('valor');
	}

	Venda.prototype.iniciar = function() {
		this.tabelaItens.on('tabela-itens-atualizada', onTabelaItensAtualizada.bind(this));
		this.valorFreteInput.on('keyup', onValorFreteAlterado.bind(this));
		this.valorDescontoInput.on('keyup', onValorDescontoAlterado.bind(this));

		this.tabelaItens.on('tabela-itens-atualizada', onValoresAlterados.bind(this));
		this.valorFreteInput.on('keyup', onValoresAlterados.bind(this));
		this.valorDescontoInput.on('keyup', onValoresAlterados.bind(this));

		onValoresAlterados.call(this);
	}

	function onTabelaItensAtualizada(evento, valorTotalItens) {
		this.valorTotalItens = valorTotalItens == null ? 0 : valorTotalItens;

	}

	function onValorFreteAlterado(evento) {
		this.valorFrete = Brewer.recuperarValor($(evento.target).val());
	}

	function onValorDescontoAlterado(evento) {
		this.valorDesconto = Brewer.recuperarValor($(evento.target).val());
	}

	function onValoresAlterados() {
		var valorTotal = numeral(this.valorTotalItens) + numeral(this.valorFrete) - numeral(this.valorDesconto);
		this.valorTotalBox.html(Brewer.FormatarMoeda(valorTotal));

		if (valorTotal < 0) {
			$('.js-valor-negativo').addClass('bw-vermelho');
		}
	}

	return Venda;
}());

$(function() {
	var autocompleteItens = new Brewer.AutocompleteItens();
	autocompleteItens.iniciar();

	var tabelaItens = new Brewer.TabelaItens(autocompleteItens);
	tabelaItens.iniciar();

	var venda = new Brewer.Venda(tabelaItens);
	venda.iniciar();
});


text:
using System;
using System.Diagnostics;
using System.Dynamic.Utils;
using System.Reflection;

namespace System.Linq.Expressions.Interpreter
{
    internal abstract class MulInstruction : Instruction
    {
        private static Instruction s_int16,s_int32,s_int64,s_UInt16,s_UInt32,s_UInt64,s_single,s_double;

        public override int ConsumedStack { get { return 2; } }
        public override int ProducedStack { get { return 1; } }
        public override string InstructionName
        {
            get { return "Mul"; }
        }
        private MulInstruction()
        {
        }

        internal sealed class MulInt32 : MulInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = ScriptingRuntimeHelpers.Int32ToObject(unchecked((Int32)l * (Int32)r));
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulInt16 : MulInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (Int16)unchecked((Int16)l * (Int16)r);
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulInt64 : MulInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (Int64)unchecked((Int64)l * (Int64)r);
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulUInt16 : MulInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (UInt16)unchecked((UInt16)l * (UInt16)r);
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulUInt32 : MulInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (UInt32)unchecked((UInt32)l * (UInt32)r);
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulUInt64 : MulInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (UInt64)unchecked((UInt64)l * (UInt64)r);
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulSingle : MulInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (Single)((Single)l * (Single)r);
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulDouble : MulInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (Double)l * (Double)r;
                }
                frame.StackIndex--;
                return +1;
            }
        }

        public static Instruction Create(Type type)
        {
            Debug.Assert(!type.GetTypeInfo().IsEnum);
            switch (System.Dynamic.Utils.TypeExtensions.GetTypeCode(TypeUtils.GetNonNullableType(type)))
            {
                case TypeCode.Int16: return s_int16 ?? (s_int16 = new MulInt16());
                case TypeCode.Int32: return s_int32 ?? (s_int32 = new MulInt32());
                case TypeCode.Int64: return s_int64 ?? (s_int64 = new MulInt64());
                case TypeCode.UInt16: return s_UInt16 ?? (s_UInt16 = new MulUInt16());
                case TypeCode.UInt32: return s_UInt32 ?? (s_UInt32 = new MulUInt32());
                case TypeCode.UInt64: return s_UInt64 ?? (s_UInt64 = new MulUInt64());
                case TypeCode.Single: return s_single ?? (s_single = new MulSingle());
                case TypeCode.Double: return s_double ?? (s_double = new MulDouble());

                default:
                    throw Error.ExpressionNotSupportedForType("Mul", type);
            }
        }

        public override string ToString()
        {
            return "Mul()";
        }
    }

    internal abstract class MulOvfInstruction : Instruction
    {
        private static Instruction s_int16,s_int32,s_int64,s_UInt16,s_UInt32,s_UInt64,s_single,s_double;

        public override int ConsumedStack { get { return 2; } }
        public override int ProducedStack { get { return 1; } }
        public override string InstructionName
        {
            get { return "MulOvf"; }
        }
        private MulOvfInstruction()
        {
        }

        internal sealed class MulOvfInt32 : MulOvfInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = ScriptingRuntimeHelpers.Int32ToObject(checked((Int32)l * (Int32)r));
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulOvfInt16 : MulOvfInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (Int16)checked((Int16)l * (Int16)r);
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulOvfInt64 : MulOvfInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (Int64)checked((Int64)l * (Int64)r);
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulOvfUInt16 : MulOvfInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (UInt16)checked((UInt16)l * (UInt16)r);
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulOvfUInt32 : MulOvfInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (UInt32)checked((UInt32)l * (UInt32)r);
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulOvfUInt64 : MulOvfInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (UInt64)checked((UInt64)l * (UInt64)r);
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulOvfSingle : MulOvfInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (Single)((Single)l * (Single)r);
                }
                frame.StackIndex--;
                return +1;
            }
        }

        internal sealed class MulOvfDouble : MulOvfInstruction
        {
            public override int Run(InterpretedFrame frame)
            {
                object l = frame.Data[frame.StackIndex - 2];
                object r = frame.Data[frame.StackIndex - 1];
                if (l == null || r == null)
                {
                    frame.Data[frame.StackIndex - 2] = null;
                }
                else
                {
                    frame.Data[frame.StackIndex - 2] = (Double)l * (Double)r;
                }
                frame.StackIndex--;
                return +1;
            }
        }

        public static Instruction Create(Type type)
        {
            Debug.Assert(!type.GetTypeInfo().IsEnum);
            switch (System.Dynamic.Utils.TypeExtensions.GetTypeCode(TypeUtils.GetNonNullableType(type)))
            {
                case TypeCode.Int16: return s_int16 ?? (s_int16 = new MulOvfInt16());
                case TypeCode.Int32: return s_int32 ?? (s_int32 = new MulOvfInt32());
                case TypeCode.Int64: return s_int64 ?? (s_int64 = new MulOvfInt64());
                case TypeCode.UInt16: return s_UInt16 ?? (s_UInt16 = new MulOvfUInt16());
                case TypeCode.UInt32: return s_UInt32 ?? (s_UInt32 = new MulOvfUInt32());
                case TypeCode.UInt64: return s_UInt64 ?? (s_UInt64 = new MulOvfUInt64());
                case TypeCode.Single: return s_single ?? (s_single = new MulOvfSingle());
                case TypeCode.Double: return s_double ?? (s_double = new MulOvfDouble());

                default:
                    throw Error.ExpressionNotSupportedForType("MulOvf", type);
            }
        }

        public override string ToString()
        {
            return "MulOvf()";
        }
    }
}


text:
package org.apache.spark.executor

import org.apache.spark.util.SparkExitCode._

/**
 * These are exit codes that executors should use to provide the master with information about
 * executor failures assuming that cluster management framework can capture the exit codes (but
 * perhaps not log files). The exit code constants here are chosen to be unlikely to conflict
 * with "natural" exit statuses that may be caused by the JVM or user code. In particular,
 * exit codes 128+ arise on some Unix-likes as a result of signals, and it appears that the
 * OpenJDK JVM may use exit code 1 in some of its own "last chance" code.
 */
private[spark]
object ExecutorExitCode {

  /** DiskStore failed to create a local temporary directory after many attempts. */
  val DISK_STORE_FAILED_TO_CREATE_DIR = 53

  /** ExternalBlockStore failed to initialize after many attempts. */
  val EXTERNAL_BLOCK_STORE_FAILED_TO_INITIALIZE = 54

  /** ExternalBlockStore failed to create a local temporary directory after many attempts. */
  val EXTERNAL_BLOCK_STORE_FAILED_TO_CREATE_DIR = 55

  /**
   * Executor is unable to send heartbeats to the driver more than
   * "spark.executor.heartbeat.maxFailures" times.
   */
  val HEARTBEAT_FAILURE = 56

  def explainExitCode(exitCode: Int): String = {
    exitCode match {
      case UNCAUGHT_EXCEPTION => "Uncaught exception"
      case UNCAUGHT_EXCEPTION_TWICE => "Uncaught exception, and logging the exception failed"
      case OOM => "OutOfMemoryError"
      case DISK_STORE_FAILED_TO_CREATE_DIR =>
        "Failed to create local directory (bad spark.local.dir?)"
      // TODO: replace external block store with concrete implementation name
      case EXTERNAL_BLOCK_STORE_FAILED_TO_INITIALIZE => "ExternalBlockStore failed to initialize."
      // TODO: replace external block store with concrete implementation name
      case EXTERNAL_BLOCK_STORE_FAILED_TO_CREATE_DIR =>
        "ExternalBlockStore failed to create a local temporary directory."
      case HEARTBEAT_FAILURE =>
        "Unable to send heartbeats to driver."
      case _ =>
        "Unknown executor exit code (" + exitCode + ")" + (
          if (exitCode > 128) {
            " (died from signal " + (exitCode - 128) + "?)"
          } else {
            ""
          }
        )
    }
  }
}


text:
using System;
using NHibernate;
using NHibernate.Cfg;
using System.Collections;
using nhibernator.BLL;
//using NHibernate.Expression;
using Iesi.Collections;

[assembly: log4net.Config.XmlConfigurator(Watch = true)]
namespace nhibernator.DLL
{
	/// <summary>
	/// Data Layer Logic for loading/saving Customers
	/// </summary>
	public class CustomerFactory :  IDisposable
	{
		Configuration config;
		ISessionFactory factory;
		ISession session;

		/// <summary>
		/// Get All Customers, should rarely be used...
		/// </summary>
		/// <returns>Complete list of customers</returns>
		public IList GetCustomers()
		{
            IList customers = new System.Collections.ArrayList();
			ITransaction tx = null;
			string id = string.Empty;
            try
            {
                if (!session.IsConnected)
                {
                    session.Reconnect();
                }
                tx = session.BeginTransaction();

                IQuery qry = session.CreateQuery("from Customer c")
                                    .SetCacheable(true);
                customers = qry.List();
                tx.Commit();
            }
            catch (Exception ex)
            {

                tx.Rollback();
                session.Clear();
                session.Disconnect();
                throw ex;
            }
			return customers;
		}

		/// <summary>
		/// Gets a Customer
		/// </summary>
		/// <param name="CustomerID">string representing customer id</param>
		/// <returns>Object representing customer of "Customer" type. </returns>
		public Customer GetCustomer(string CustomerID)
		{
			Customer customer = null;
			ITransaction tx = null;

			//int ordercount =0;
            try
            {
                if (!session.IsConnected)
                {
                    session.Reconnect();
                }
                tx = session.BeginTransaction();

                customer = (Customer)session.Get(typeof(Customer), CustomerID);

                tx.Commit();
            }
            catch (Exception ex)
            {
                tx.Rollback();
                session.Clear();
                session.Disconnect();
                throw ex;
            }
			return customer;
		}

        public Customer GetCustomerOrders(string CustomerID)
        {
            Customer customer = null;
            ITransaction tx = null;

            try
            {
                if (!session.IsConnected)
                {
                    session.Reconnect();
                }
                tx = session.BeginTransaction();

                customer = (Customer)session.Get(typeof(Customer), CustomerID);

                tx.Commit();
            }
            catch (Exception ex)
            {
                tx.Rollback();
                throw ex;
            }
            return customer;
        }

		/// <summary>
		/// Add current customer in database.
		/// </summary>
		/// <param name="cust">Customer to save.</param>
		public void SaveCustomer(Customer customer)
		{
			ITransaction tx = null;
			try
			{
				if(!session.IsConnected)
				{
					session.Reconnect();
				}

				tx = session.BeginTransaction();

                session.Save(customer);
                session.Flush();
                tx.Commit();
                Console.WriteLine("\nCustomer with ID: " + customer.CustomerID + " successfully added into database");
			}
			catch (Exception ex)
			{
				tx.Rollback();
                session.Clear();
				session.Disconnect();
                throw ex.InnerException;
			}
		}

        /// <summary>
        /// Insert/Update current customer in database.
        /// </summary>
        /// <param name="cust">Customer to update.</param>
        public void UpdateCustomer(Customer customer)
        {
            ITransaction tx = null;
            try
            {
                if (!session.IsConnected)
                {
                    session.Reconnect();
                }

                tx = session.BeginTransaction();

                session.Merge(customer);
                session.Flush();
                tx.Commit();
                Console.WriteLine("\nCustomer with ID: " + customer.CustomerID + " successfully updated into database");
            }
            catch (Exception ex)
            {
                tx.Rollback();
                session.Clear();
                session.Disconnect();
                throw ex.InnerException;
                // handle exception
            }
        }

        /// <summary>
        /// Removes the customer with customerID
        /// </summary>
        /// <param name="CustomerID"></param>
        public void RemoveCustomer(string  CustomerID)
        {
            ITransaction tx = null;
            Customer customer;
            try
            {
                if (!session.IsConnected)
                {
                    session.Reconnect();
                }

                tx = session.BeginTransaction();
                IEnumerator enumerator = session.CreateQuery("select cust " + "from Customer cust where " +
                                                            "cust.CustomerID = '" + CustomerID + "'").Enumerable().GetEnumerator();

                enumerator.MoveNext();
                customer = (Customer)enumerator.Current;
                if (customer != null)
                {
                    session.Delete(customer);
                    factory.Evict(typeof(Customer), CustomerID);
                    factory.EvictCollection(typeof(Customer).ToString() + ".Orders", CustomerID);

                    Console.WriteLine("\nCustomer with ID: " + CustomerID + " successfully deleted from database");
                }
                else
                {
                    Console.WriteLine("No such customer exist.");
                }
                tx.Commit();
            }
            catch (Exception ex)
            {
                tx.Rollback();
                session.Clear();
                session.Disconnect();
                throw ex;
                // handle exception
            }
        }

        /// <summary>
        /// Clears and disconnects the session
        /// </summary>
        public void SessionDisconnect()
        {
            session.Clear();
            session.Disconnect();
        }

		/// <summary>
		/// Create a customer factory based on the configuration given in the configuration file
		/// </summary>
		public CustomerFactory()
		{
            this.ConfigureLog4Net();
			config = new Configuration();
			config.AddAssembly("nhibernator");
			factory = config.BuildSessionFactory();
			session = factory.OpenSession();

		}

        /// <summary>
        /// Reads Log4Net configurations from application configuration file
        /// </summary>
        private void ConfigureLog4Net()
        {
            log4net.Config.XmlConfigurator.Configure();
        }

		/// <summary>
		/// Make sure we clean up session etc.
		/// </summary>
		public void Dispose()
		{
			session.Dispose();
			factory.Close();
		}
	}
}


text:
/*-
 */
#ifndef _CRYPTO_SCRYPT_H_
#define _CRYPTO_SCRYPT_H_

#include <stdint.h>

/**
 * crypto_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen):
 * Compute scrypt(passwd[0 .. passwdlen - 1], salt[0 .. saltlen - 1], N, r,
 * p, buflen) and write the result into buf.  The parameters r, p, and buflen
 * must satisfy r * p < 2^30 and buflen <= (2^32 - 1) * 32.  The parameter N
 * must be a power of 2 greater than 1.
 *
 * libscrypt_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen):
 * password; duh
 * N: CPU AND RAM cost (first modifier)
 * r: RAM Cost
 * p: CPU cost (parallelisation)
 * In short, N is your main performance modifier. Values of r = 8, p = 1 are
 * standard unless you want to modify the CPU/RAM ratio.
 * Return 0 on success; or -1 on error.
 */
int libscrypt_scrypt(const uint8_t *, size_t, const uint8_t *, size_t, uint64_t,
    uint32_t, uint32_t, /*@out@*/ uint8_t *, size_t);

/* Converts a series of input parameters to a MCF form for storage */
int libscrypt_mcf(uint32_t N, uint32_t r, uint32_t p, const char *salt,
	const char *hash, char *mcf);

/* Generates a salt. Uses /dev/urandom/
 */
int libscrypt_salt_gen(/*@out@*/ uint8_t *rand, size_t len);

/* Checks a given MCF against a password */
int libscrypt_check(char *mcf, const char *password);

/* Creates a hash of a passphrase using a randomly generated salt */
/* Returns >0 on success, or 0 for fail */
int libscrypt_hash(char *dst, const char* passphrase, uint32_t N, uint8_t r,
	uint8_t p);

/* Sane default values */
#define SCRYPT_HASH_LEN 64 /* This can be user defined -
 *but 64 is the reference size
 */
#define SCRYPT_SAFE_N 30 /* This is much higher than you want. It's just
			  * a blocker for insane defines
			  */
#define SCRYPT_SALT_LEN 16 /* This is just a recommended size */
#define SCRYPT_MCF_LEN 125 /* mcf is 120 byte + nul */
#define SCRYPT_MCF_ID "$s1"
#define SCRYPT_N 16384
#define SCRYPT_r 8
#define SCRYPT_p 16
#endif /* !_CRYPTO_SCRYPT_H_ */


text:
objtojs
=======

A nodejs module to parses WaveFront Object (.obj) files to javascript or JSON.

Overview
--------
Parse WaveFront Object file (.obj) to a javascript object and/or JSON.

Option to save the parsed data to a JSON file which will also break down the data to segments and save each segment to it's own JSON file.

Installation
------------
> npm install objtojs

Dependencies
------------
mtltojs

Usage:
-------
Returns a js object and optional JSON.

var parser = require("objtojs");

```javascript
// Async call
parser.parse(file, function(err, data){
  // do stuff with data
});
```
or

```javascript
//Synchronous call
var data = parser.parseSync("C:/3d/materials/sample.obj");
```

Methods
-------
parse - Is an async method which takes in a filepath and optional options object.  Returns a js objected of the parsed data. Options to save JSON and log information to a file. For options See below

`parse(file[,options], callback)`

parseSync - Is a synchronous call which takes the same arguments as the asynchronous parse call..

`parseSync(file[,options])`

Parameters
----------
These are the parameters for methods...

`parse(file, options, callback)` and `parseSync(file, options)`

file - <string> - full path to the .mtl file.
options - <object> - flags for events such as logging, saving to JSON files, etc...
callback - <function> - callback function only for the async call 'parse'.

Options
-------
Is a js object that contains configurations for logging, saving JSON files, etc...

parseComments - `bool` (default: `false`) - flag to retain comments when parsing the file.

verbose - `bool` (default: `false`) - flag to write parsing details to the nodejs console.

logging - `bool` (default: `false`) - flag to write and save parsing details to a log file.

returnJSON - `bool` (default: `false`) - flag to have the a JSON string of the parsed object returned with the js object.

saveJSON - `bool` (default: `false`) - flag to save the parsed data as a JSON string to file.
parseMTLFile - `bool` (default: false) - flag to parse material file referenced in the object file.

returnMTLJSON - `bool` (default: false) - flag to return parsed material file data as JSON.  NOTE: This flag is ignored if parseMTLFile is false.

saveMTLJSON - `bool` (default: false) - flag to save the parsed material file data as JSON.  NOTE: This flag is ignored if parseMTLFile is false.

Default Option object if the options parameter is omitted...
```javascript
options = {
  parseComments: false,
  verbose: false,
  logging: false,
  returnJSON: false,
  saveJSON: false,
  parseMTLFile: false,
  returnMTLJSON: false,
  saveMTLJSON: false
}
```

License
-------
MIT

## Release History

* 0.1.0 Initial Release


text:
CREATE OR REPLACE FUNCTION ts.updatedatasetvariable(_oldvariableid integer, _newvariableid integer, _sampleid1 integer, _sampleid2 integer)
 RETURNS void
 LANGUAGE sql
AS $function$
	UPDATE ndb.data
	SET   variableid = _newvariableid
	WHERE (variableid = _oldvariableid AND sampleid >= _sampleid1 AND
      sampleid <= _sampleid2)
$function$


text:
<?php

/**
* <auto-generated>
*     This code was generated by Codezu.
*
*     Changes to this file may cause incorrect behavior and will be lost if
*     the code is regenerated.
* </auto-generated>
*/

namespace Mozu\Api\Clients\Commerce\Settings\Checkout;

use Mozu\Api\MozuClient;
use Mozu\Api\Urls\Commerce\Settings\Checkout\PaymentSettingsUrl;

/**
* Use the Payment Settings resource to specify settings when creating payments for order checkout on the site.
*/
class PaymentSettingsClient {

	/**
	* Retrieves the schema and definition along with the actual instance values of the third-party payment service workflow configured for the corresponding fully qualified name.
	*
	* @param string $fullyQualifiedName Fully qualified name of the attribute for the third-party payment workflow.
	* @param string $responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
	* @return MozuClient
	*/
	public static function getThirdPartyPaymentWorkflowWithValuesClient($fullyQualifiedName, $responseFields =  null)
	{
		$url = PaymentSettingsUrl::getThirdPartyPaymentWorkflowWithValuesUrl($fullyQualifiedName, $responseFields);
		$mozuClient = new MozuClient();
		$mozuClient->withResourceUrl($url);
		return $mozuClient;

	}

	/**
	* Retrieves the schema and definition of all third-party payment service workflows configured for the site.
	*
	* @return MozuClient
	*/
	public static function getThirdPartyPaymentWorkflowsClient()
	{
		$url = PaymentSettingsUrl::getThirdPartyPaymentWorkflowsUrl();
		$mozuClient = new MozuClient();
		$mozuClient->withResourceUrl($url);
		return $mozuClient;

	}

	/**
	* Adds a third-party payment workflow to the site. A third-party payment workflow is a definition of a process by which a third-party payment provider (such as Amazon Payments or PayPal Express) interacts with the Mozu platform.
	*
	* @param ExternalPaymentWorkflowDefinition $definition Properties of an external payment processing workflow defined for the site. At this time, only PayPal Express is supported.
	*/
	public static function addThirdPartyPaymentWorkflowClient($definition)
	{
		$url = PaymentSettingsUrl::addThirdPartyPaymentWorkflowUrl();
		$mozuClient = new MozuClient();
		$mozuClient->withResourceUrl($url)->withBody($definition);
		return $mozuClient;

	}

	/**
	* Deletes a third-party payment workflow. A third-party payment workflow is a definition of a process by which a third-party payment provider (such as Amazon Payments or PayPal Express) interacts with the Mozu platform.
	*
	* @param string $fullyQualifiedName Fully qualified name of the attribute for the third-party payment workflow.
	*/
	public static function deleteThirdPartyPaymentWorkflowClient($fullyQualifiedName)
	{
		$url = PaymentSettingsUrl::deleteThirdPartyPaymentWorkflowUrl($fullyQualifiedName);
		$mozuClient = new MozuClient();
		$mozuClient->withResourceUrl($url);
		return $mozuClient;

	}

}

?>


text:
var loggly = require('loggly');

/*var client = loggly.createClient({
  token: "1cae3802-0bfb-4462-8b6f-4697c794867c",
  subdomain: "edwinacevedo",
  tags: ["NodeJS"],
  json: true
});*/

// we can use loggly's api to send logs from multiple servers to loggly,
// which assembles these into a comprehensible whole
function logger(tag) {
    return loggly.createClient({
      token: "process.env.LOGGLY_TOKEN",
      subdomain: "edwinacevedo",
      tags: ['NodeJS', tag],
      json: true
    });
    return client;
  }
  /*client.log("Hello World from Node.js!");*/ //logs this to loggly

module.exports = logger;


text:
#include "src/core/lib/surface/channel_stack_type.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>

bool grpc_channel_stack_type_is_client(grpc_channel_stack_type type) {
  switch (type) {
    case GRPC_CLIENT_CHANNEL:
      return true;
    case GRPC_CLIENT_SUBCHANNEL:
      return true;
    case GRPC_CLIENT_LAME_CHANNEL:
      return true;
    case GRPC_CLIENT_DIRECT_CHANNEL:
      return true;
    case GRPC_SERVER_CHANNEL:
      return false;
    case GRPC_NUM_CHANNEL_STACK_TYPES:
      break;
  }
  GPR_UNREACHABLE_CODE(return true;);
}

const char *grpc_channel_stack_type_string(grpc_channel_stack_type type) {
  switch (type) {
    case GRPC_CLIENT_CHANNEL:
      return "CLIENT_CHANNEL";
    case GRPC_CLIENT_SUBCHANNEL:
      return "CLIENT_SUBCHANNEL";
    case GRPC_SERVER_CHANNEL:
      return "SERVER_CHANNEL";
    case GRPC_CLIENT_LAME_CHANNEL:
      return "CLIENT_LAME_CHANNEL";
    case GRPC_CLIENT_DIRECT_CHANNEL:
      return "CLIENT_DIRECT_CHANNEL";
    case GRPC_NUM_CHANNEL_STACK_TYPES:
      break;
  }
  GPR_UNREACHABLE_CODE(return "UNKNOWN");
}