text:
"use strict";

const {strict: assert} = require("assert");

const {zrequire} = require("../zjsunit/namespace");
const {run_test} = require("../zjsunit/test");
const {user_settings} = require("../zjsunit/zpage_params");

const settings_config = zrequire("settings_config");

run_test("all_notifications", () => {
    user_settings.enable_stream_desktop_notifications = false;
    user_settings.enable_stream_audible_notifications = true;
    user_settings.enable_stream_push_notifications = true;
    user_settings.enable_stream_email_notifications = false;
    user_settings.enable_desktop_notifications = false;
    user_settings.enable_sounds = true;
    user_settings.enable_offline_push_notifications = false;
    user_settings.enable_offline_email_notifications = true;

    // Check that it throws error if incorrect settings name
    // is passed. In this case, we articulate that with
    // wildcard_mentions_notify being undefined, which will be
    // the case, if a wrong setting_name is passed.
    let error_message;
    let error_name;
    try {
        settings_config.all_notifications(user_settings);
    } catch (error) {
        error_name = error.name;
        error_message = error.message;
    }
    assert.equal(error_name, "TypeError");
    assert.equal(error_message, "Incorrect setting_name passed: wildcard_mentions_notify");

    user_settings.wildcard_mentions_notify = false;
    const notifications = settings_config.all_notifications(user_settings);

    assert.deepEqual(notifications.general_settings, [
        {
            label: "translated: Streams",
            notification_settings: [
                {
                    is_checked: false,
                    is_disabled: false,
                    setting_name: "enable_stream_desktop_notifications",
                },
                {
                    is_checked: true,
                    is_disabled: false,
                    setting_name: "enable_stream_audible_notifications",
                },
                {
                    is_checked: true,
                    is_disabled: true,
                    setting_name: "enable_stream_push_notifications",
                },
                {
                    is_checked: false,
                    is_disabled: false,
                    setting_name: "enable_stream_email_notifications",
                },
                {
                    is_checked: false,
                    is_disabled: false,
                    setting_name: "wildcard_mentions_notify",
                },
            ],
        },
        {
            label: "translated: PMs, mentions, and alerts",
            notification_settings: [
                {
                    is_checked: false,
                    is_disabled: false,
                    setting_name: "enable_desktop_notifications",
                },
                {
                    is_checked: true,
                    is_disabled: false,
                    setting_name: "enable_sounds",
                },
                {
                    is_checked: false,
                    is_disabled: true,
                    setting_name: "enable_offline_push_notifications",
                },
                {
                    is_checked: true,
                    is_disabled: false,
                    setting_name: "enable_offline_email_notifications",
                },
                {
                    is_checked: false,
                    is_disabled: true,
                    setting_name: "",
                },
            ],
        },
    ]);
});


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

package com.google.devtools.build.lib.runtime;

/**
 * This event is fired when the Blaze command is complete
 * (clean, build, test, etc.).
 */
public class CommandCompleteEvent extends CommandEvent {

  private final int exitCode;

  /**
   * @param exitCode the exit code of the blaze command
   */
  public CommandCompleteEvent(int exitCode) {
    this.exitCode = exitCode;
  }

  /**
   * @return the exit code of the blaze command
   */
  public int getExitCode() {
    return exitCode;
  }
}

redpajama_set_name: RedPajamaGithub


text:
/* Created by Jacob Rodgers
   10/11/17
 */

 public class insertionSort {

     public void iSort(int userArray[]){
         for (int i = 1; i < userArray.length; i++){
             //create an index variable for tracking current number
             int index = userArray[i];
             //and a second counting variable, j
             int j = i - 1;

             //Iterate through entire Array comparing each variable to the index assigned above
             while ((j >= 0) && (userArray[j] > index)) {
                 //If there is a number out of order then we will switch them
                 userArray[j+1] = userArray[j];
                 j = j - 1;
             }
             userArray[j+1] = index;
         }
     }
 }


text:
<!DOCTYPE>

		<title>Relational selectors</title>

Winter 2012 Town Hall speakers

January 20, 2012: David Brancaccio

February 17, 2012: Robert Fitzpatrick

March 17, 2012: Juan Williams

Post-lecture luncheons

Extend the excitement of Town Hall by purchasing tickets to the
			luncheons. This unique opportunity allows you to ask more questions
			of the speakers.

A limited number of tickets are available. Call now for reservations.

Contact us by phone at (559) 555-1212.

Copyright 2012


text:
/**
 * Spring social configuration.
 */
package univers.torri.fr.security.social;


text:
package org.jboss.weld.ejb.spi.helpers;

import org.jboss.weld.ejb.spi.BusinessInterfaceDescriptor;

/**
 * An implementation of {@link BusinessInterfaceDescriptor} which forwards all its method calls to another
 * {@link BusinessInterfaceDescriptor} . Subclasses should override one or more methods to modify the behavior of the backing
 * {@link BusinessInterfaceDescriptor} as desired per the decorator
 * pattern.
 *
 * @author Pete Muir
 *
 */
public abstract class ForwadingBusinessInterfaceDescriptor<T> implements BusinessInterfaceDescriptor<T> {

    protected abstract BusinessInterfaceDescriptor<T> delegate();

    public Class<T> getInterface() {
        return delegate().getInterface();
    }

    @Override
    public boolean equals(Object obj) {
        return delegate().equals(obj);
    }

    @Override
    public String toString() {
        return delegate().toString();
    }

    @Override
    public int hashCode() {
        return delegate().hashCode();
    }

}


text:
require 'jenkins'
require 'logging-helper'
require 'shell-helper'
require 'smithers'
require 'git'
require 'date'
require 'json'
require 'chef/data_bags/reader'

include LoggingHelper::LogToTerminal
include ShellHelper::Shell

desc "create the pipeline management jobs: creator and destroyer"
task :create_or_update_pipeline_management do
  Dir.glob("#{$WORKSPACE_SETTINGS[:ecosystem][:paths][:ruby][:home]}/smithers/jobs/*.rb"){|smithers_file|
    Smithers::SmithersFile.new(
      smithers_file_path: smithers_file,
      jenkins_url: Jenkins.url,
      jenkins_ssl: Jenkins.ssl?,
      jenkins_username: Jenkins.credentials[:username],
      jenkins_password: Jenkins.credentials[:password]
    ).run
  }
end

desc "create or update jobs"
task :create_or_update_jobs do
  next unless create_or_update?
  puts "creating or updating"

  Dir.glob("#{$WORKSPACE_SETTINGS[:paths][:project][:jenkins][:home]}/**/Smithersfile"){|smithers_file|
    debug smithers_file
    Dir.chdir(File.dirname(smithers_file)){
      Smithers::SmithersFile.new(
        smithers_file_path: 'Smithersfile',
        jenkins_url: Jenkins.url,
        jenkins_ssl: Jenkins.ssl?,
        jenkins_username: Jenkins.credentials[:username],
        jenkins_password: Jenkins.credentials[:password],
        to_stdout: false
      ).run
    }
  }
end

def create_or_update?
    return true if Jenkins.branch_has_jobs?(Git.branch_name)

    debug "#{Git.branch_name} has no jobs"
    puts "#{Git.branch_name} has no jobs"

    smithers_changed = false
    Jenkins.current_build_commit_hash_list.each{|commit_hash|
      #merge commits will not appear here because Jenkins doesn't list them
      Jenkins.files_affected_by_commit(commit_hash).each{|affected_file|
        debug "file found associated with current build is #{affected_file}"
        if Jenkins.file_is_smithers?(affected_file)
            debug "smithers file has file name: #{affected_file}"
            smithers_changed = true
            break
        end
      }
      break if smithers_changed
    }

    if smithers_changed
      return true
    else
      #merge triggered the build
      return false
    end
end

desc "delete jobs for branches that have been deleted"
task :delete_orphaned_jobs do
  Git.fetch_and_prune_remote_branches

  Jenkins.job.list("^#{$WORKSPACE_SETTINGS[:project][:name]}-\.-.*-\.-.*").each{|job_name|
    project_name, branch_name, job_short_name = job_name.split($WORKSPACE_SETTINGS[:delimiter])

    next if job_short_name.nil?
      debug {"checking if branch #{branch_name} exists for #{job_name}"}
    unless Git.remote_branches.include?(branch_name)
      puts "deleting job #{job_name}, branch #{branch_name} does not exist"
      Jenkins.job.delete(job_name)
    end
  }
end

desc "list all projects"
task :list_all_projects do
  puts Jenkins.job.list_all.collect{|job_name|
    project_name, branch_name, job_short_name = job_name.split($WORKSPACE_SETTINGS[:delimiter])

    project_name
  }.uniq
end

desc "list matching jobs"
task :list_matching_jobs, :pattern do |t, args|
  Jenkins.job.list(args.pattern).each{|job_name|
    project_name, branch_name, job_short_name = job_name.split($WORKSPACE_SETTINGS[:delimiter])

    puts "job_name: #{job_name}
    project_name:   #{project_name}
    branch:         #{branch_name}
    job_short_name: #{job_short_name}
    "

  }
end

def job_exclutions_from_deletion
  [
    /^next$/
  ]
end

def legacy_or_old_job?(job_details)

  date = job_details['description'].split($WORKSPACE_SETTINGS[:delimiter])[1]
  return true if date.nil?

  created_date =  date.strip.split('"')[3]
  date_string =  Date.strptime(created_date.to_s , '%Y-%m-%d')
  days_old = (Date.today - date_string).to_i
  return days_old > 10

end

desc "delete disabled jobs"
task :delete_disabled_jobs, :dry_run do |t, args|
  dry_run = args.dry_run == 'false' ? false : true
  puts "dry_run -> #{dry_run.inspect}"

  Jenkins.job.list("^#{$WORKSPACE_SETTINGS[:project][:name]}-\.-.*-\.-.*").each{|job|

    job_details = Jenkins.job.list_details(job)

    if legacy_or_old_job?(job_details) && job_details['color'] == 'disabled' && job_details['builds'].empty?
      project_name, branch_name, job_short_name = job.split($WORKSPACE_SETTINGS[:delimiter])

      next if job_short_name.nil?
        puts "checking if branch #{branch_name} is excluded from deletion for #{job}"
      unless job_exclutions_from_deletion.any?{|exclusion_pattern| branch_name =~ exclusion_pattern}
        warn "deleting job #{job}"
        Jenkins.job.delete(job) unless dry_run
      end
    end
 }
end

desc "list jenkins slaves"
task :list_jenkins_slaves do
  Jenkins.client.node.list.each{|node_name|
    next if node_name == 'master'

    response = Jenkins.client.api_post_request(
      "/computer/#{node_name}/scriptText",
      {
        'script' => 'import hudson.model.Computer.ListPossibleNames
def names = (new ListPossibleNames()).call()
println names[0]
'
      },
      true
    )
    puts "#{node_name} -> #{response.body}"
  }
end


text:
module.exports = (sequelize, DataTypes) => {
	const AwardType = sequelize.define('AwardType', {
		id: {
			type: DataTypes.INTEGER,
			autoIncrement: true,
			primaryKey: true
		},
		name: {
			type: DataTypes.STRING,
		},
		multiple: {
			type: DataTypes.BOOLEAN,
		}
	})

	return AwardType
}


text:
function CleanOptions(id) {
	var container = document.getElementById(id);
	var OptionsDiv = container.getElementsByClassName('AjaxSelectOptionsDiv')[0];
	while (OptionsDiv.firstChild) {
		OptionsDiv.removeChild(OptionsDiv.firstChild);
	}
}

function ListOptions(obj) {
	var id = obj.id;
	var container = document.getElementById(id);
	var OptionsDiv = container.getElementsByClassName('AjaxSelectOptionsDiv')[0];
	CleanOptions(id);
	var options = obj.list;
	for (var i=0; i<options.length; i++) {
		var option = options[i];
		var OptionDiv = document.createElement('div');
		OptionDiv.innerHTML=option.OptionText;
		SetDataAttribute(OptionDiv, 'value', option.value);
		SetDataAttribute(OptionDiv, 'InputText', option.InputText);
		OptionDiv.classList.add('AjaxSelectOption');

		// Here the event is mousedown instead of click, as click is fired after blur whereas mousedown is fired before.
		OptionDiv.addEventListener('mousedown', function(e) {
			var container = this.parentNode.parentNode;
			var value = GetDataAttribute(this, 'value');
			var text = GetDataAttribute(this, 'InputText');
			container.getElementsByClassName('AjaxSelectValue')[0].value=value;
			container.getElementsByClassName('AjaxSelectText')[0].value=text;
		});

		OptionsDiv.appendChild(OptionDiv);
	}
}

function GetSelectSuggestions(input) {
	var id = input.parentNode.id;
	var val = input.value;
	var type = GetDataAttribute(input, 'request_type');
	var LastString = GetDataAttribute(input, 'last_string');
	if (LastString == val) return;
	else SetDataAttribute(input, 'last_string', val);

	if (val == '') CleanOptions(id);
	else MakeAjaxRequest('../Modify/SelectSuggestions.php', {id: id, str: val, type: type}, ListOptions, 1);
}

function RenderSelect(obj) {
	var id = obj.id;
	var type = obj.type;
	var TextSelect = document.createElement('input');
	TextSelect.classList.add('AjaxSelectText');
	TextSelect.setAttribute('type', 'text');
	SetDataAttribute(TextSelect, 'request_type', type);
	SetDataAttribute(TextSelect, 'last_string', '');

	if (type == 'contestant') TextSelect.setAttribute('placeholder', 'Cognome Nome');

	// Key pressed
	TextSelect.addEventListener('keyup', function(e) {
		GetSelectSuggestions(this);
		var ValueInput = this.nextSibling;
		ValueInput.value='';
		this.classList.remove('AjaxSelectTextGood');
		this.classList.remove('AjaxSelectTextBad');
	});

	// Losing focus
	TextSelect.addEventListener('blur', function(e) {
		var TextInput = this;
		var ValueInput = this.nextSibling;
		var OptionsDiv = this.parentNode.getElementsByClassName('AjaxSelectOptionsDiv')[0];
		OptionsDiv.classList.add('hidden');
		if (ValueInput.value != '') TextInput.classList.add('AjaxSelectTextGood');
		else if (TextInput.value != '') TextInput.classList.add('AjaxSelectTextBad');
	});

	// Getting focus
	TextSelect.addEventListener('focus', function(e) {
		GetSelectSuggestions(this);
		var OptionsDiv = this.parentNode.getElementsByClassName('AjaxSelectOptionsDiv')[0];
		OptionsDiv.classList.remove('hidden');
		this.classList.remove('AjaxSelectTextGood');
		this.classList.remove('AjaxSelectTextBad');
	});

	var ValueSelect = document.createElement('input');
	ValueSelect.classList.add('AjaxSelectValue');
	if (obj.name != null) ValueSelect.name = obj.name;

	var ContainerDiv = document.createElement('div');
	ContainerDiv.id = id;
	ContainerDiv.classList.add('AjaxSelectContainer');

	var OptionsDiv = document.createElement('div');
	OptionsDiv.classList.add('AjaxSelectOptionsDiv');
	OptionsDiv.classList.add('hidden');
	ContainerDiv.appendChild(TextSelect);
	ContainerDiv.appendChild(ValueSelect);
	ContainerDiv.appendChild(OptionsDiv);
	return ContainerDiv;
}

function GetSelectText(id) {
	return document.getElementById(id).getElementsByClassName('AjaxSelectText')[0].value;
}

function GetSelectValue(id) {
	return document.getElementById(id).getElementsByClassName('AjaxSelectValue')[0].value;
}

function GetSelectStatus(id) {
	if (GetSelectText(id) == '' && GetSelectValue(id) == '') return '0'; // empty
	if (GetSelectText(id) == '' || GetSelectValue(id) == '') return '-1'; // incorrect
	return '1'; // correct
}

//The variable SelectsInformation is defined server-side
if (SelectsInformation != null) {
	for (var i=0; i<SelectsInformation.length; i++) {
		var select = SelectsInformation[i];
		var DivToSelect = document.getElementById('DivToSelect'+i);
		DivToSelect.parentNode.replaceChild(RenderSelect(select), DivToSelect);
	}
}


text:
/*
 * RegisterCatalog.java
 *
 * Created on 02. Juni 2007, 23:46
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.huberb.nbpmdrulesets.catalog;

import java.awt.Image;
import java.beans.PropertyChangeListener;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.netbeans.modules.xml.catalog.spi.CatalogDescriptor;
import org.netbeans.modules.xml.catalog.spi.CatalogListener;
import org.netbeans.modules.xml.catalog.spi.CatalogReader;
import org.openide.util.Utilities;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

/**
 * Catalog to register Schema files to runtime tab
 *
 * @author HuberB1
 *
 */
public class RegisterCatalog implements CatalogReader, CatalogDescriptor, EntityResolver {
    // RULESET
    private static final String RULESET_XSD = "ruleset_xml_schema.xsd";
    private static final String RULESET = "http://pmd.sf.net/ruleset/1.0.0";
    private static final String RULESET_URL = "nbres:/org/huberb/nbpmdrulesets/resources/ruleset_xml_schema.xsd";
    private static final String RULESET_ID = "SCHEMA:" + RULESET;

    /** Creates a new instance of RegisterCatalog */
    public RegisterCatalog() {
    }

    @Override
    public Iterator getPublicIDs() {
        List<String> list = new ArrayList<>();
        list.add(RULESET_ID);

        return list.listIterator();
    }

    @Override
    public void refresh() {
    }

    @Override
    public String getSystemID(String publicId) {
        if(publicId.equals(RULESET_ID)) {
            return RULESET_URL;
        } else {
            return null;
        }
    }

    @Override
    public String resolveURI(String string) {
        return null;
    }

    @Override
    public String resolvePublic(String string) {
        return null;
    }

    @Override
    public void addCatalogListener(CatalogListener catalogListener) {
    }

    @Override
    public void removeCatalogListener(CatalogListener catalogListener) {
    }

    @Override
    public Image getIcon(int i) {
        return Utilities.loadImage("org/huberb/nbpmdrulesets/resources/PMDOptionsSettingsIcon.gif");
    }

    @Override
    public String getDisplayName() {
        return "PMD Ruleset Catalog";
    }

    @Override
    public String getShortDescription() {
        return "XML Catalog for PMD Ruleset Schema";
    }

    @Override
    public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener) {
    }

    @Override
    public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener) {
    }

    @Override
    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
        if (RULESET.equals(systemId)){
            return new org.xml.sax.InputSource(RULESET_URL);
        }
        if (systemId != null && systemId.endsWith(RULESET_XSD)){
            return new org.xml.sax.InputSource(RULESET_URL);
        }

        return null;
    }
}


text:
const HOST_URL = 'http://localhost'
const PORT = 3000

module.exports = {

  env: 'development',

  port: PORT,

  client: {
    host: `${HOST_URL}`,
    env: 'development',
    port: PORT
  },

  forge: {

    viewer: {
      viewer3D: 'https://developer.api.autodesk.com/derivativeservice/v2/viewers/viewer3D.js?v=3.3',
      threeJS:  'https://developer.api.autodesk.com/derivativeservice/v2/viewers/three.js?v=3.3',
      style:    'https://developer.api.autodesk.com/derivativeservice/v2/viewers/style.css?v=3.3'
    },

    oauth: {

      redirectUri: `${HOST_URL}:3000/api/forge/callback/oauth`,
      authenticationUri: '/authentication/v1/authenticate',
      refreshTokenUri: '/authentication/v1/refreshtoken',
      authorizationUri: '/authentication/v1/authorize',
      accessTokenUri: '/authentication/v1/gettoken',
      baseUri: 'https://developer.api.autodesk.com',
      clientSecret: process.env.FORGE_DEV_CLIENT_SECRET,
      clientId: process.env.FORGE_DEV_CLIENT_ID,

      scope: [
        'data:read',
        'data:write',
        'data:create',
        'data:search',
        'bucket:read',
        'bucket:create',
        'bucket:delete'
      ]
    }
  }
}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Goldammer.MAIExtensions.DAQ;
using Goldammer;

namespace MAIRecorder {
    public partial class FormDSTargetConfigBase : Form {

        #region private

        private void button1_Click(object sender, EventArgs e) {
            CreateTarget();
        }

        #endregion

        #region protected

        protected IDataSinkTarget m_target;

        protected String m_TargetFileName = "not set.";

        protected virtual void CreateTarget() {
        }

        #endregion

        #region public

        public FormDSTargetConfigBase() {
            InitializeComponent();
        }

        public static IDataSinkTarget ShowAsDialog(string AIMenuText, out string AOString) {
            FormDSTargetConfigBase dts = null;
            AOString = "not set.";

            if (AIMenuText.StartsWith("CSV"))
                dts = new FormDSTargetCSV();
            if (AIMenuText.StartsWith("RAW"))
                dts = new FormDSTargetRAW();
            if (AIMenuText.StartsWith("TDMS"))
                dts = new FormDSTargetTDMS();
            if (AIMenuText.StartsWith("TAFF"))
                dts = new FormDSTargetTAFFMAT();
            if (AIMenuText.StartsWith("Database"))
                dts = new FormDSTargetDB();
            if (AIMenuText.StartsWith("WAV"))
                dts = new FormDSTargetWAV();
            if (dts == null) {
                return null;
            }
            if (dts.ShowDialog() == DialogResult.OK) {
                AOString = dts.m_TargetFileName;
                return dts.m_target;
            }
            return null;
        }

        #endregion

    }
}


text:
package org.fakekoji.core.utils.matrix.formatter;

import org.fakekoji.core.AccessibleSettings;
import org.fakekoji.core.utils.matrix.cell.CellGroup;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Optional;

public class HtmlAjaxFormatter extends HtmlSpanningFormatter {

    private static Object LOCK = new Object();
    private static String HEADER = null;
    private final File errorStream = null; //maybe to append it somewhen somewhere
    private final AccessibleSettings settings;

    public HtmlAjaxFormatter(final boolean expandNames, final String[] projects, AccessibleSettings settings) throws IOException {
        super(expandNames, projects);
        this.settings = settings;
        getHeader();
    }

    @Override
    public String tableStart() {
        return "<html>" + getHeaderCatched() + super.tableStart();
    }

    private String getHeaderCatched() {
        try {
            return getHeader();
        } catch (IOException ex) {
            throw new RuntimeException(ex);
        }
    }

    private String getHeader() throws IOException {
        synchronized (LOCK) {
            if (HEADER == null) {
                InputStream is = this.getClass().getResourceAsStream("/org/fakekoji/core/utils/matrix/formatter/ajax.html");
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                byte[] buffer = new byte[1024];
                int len;
                while ((len = is.read(buffer)) != -1) {
                    os.write(buffer, 0, len);
                }
                HEADER = new String(os.toByteArray(), "utf-8").
                        replace("{OTOOL_BASE_URL}", AccessibleSettings.master.baseUrl + ":" + settings.getWebappPort()).
                        replace("{HISTORY_URL}", AccessibleSettings.master.history).
                        replace("{JENKINS_BASE_URL}", settings.getJenkinsUrl());
            }
        }
        return HEADER;
    }

    @Override
    public String tableEnd() {
        return super.tableEnd() + "</html>";
    }

    @Override
    String cell(final String jobId, final String content) {
        return renderTableCell(content +
                "<button class=\"waiverButton\" type=\"button\" onClick=\"showAll('"+jobId+"')\">results+waive</button>"+
                "<button class=\"reloadButton\" type=\"button\" onClick=\"reloadJob('"+jobId+"')\" style=\"display:none\">reload-job</button>"
                , "id=\""+jobId+"\"");
    }
}


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

namespace Sanatana.Notifications.NDR.AWS.SES
{
    public class AmazonSesMail
    {
        //properties
        public string Timestamp { get; set; }
        public string Source { get; set; }
        public string MessageId { get; set; }
        public List<string> Destination { get; set; }

    }
}


text:
module ExtraProperties
  class Manager
    attr_reader :properties, :required_properties

    def initialize schema, db_values
      @schema = schema
      @db_values = db_values
      initialize_properties
    end

    def initialize_properties
      @properties = []
      @required_properties = []
      @schema.each do |definition|
        property = property_by_definition(definition)
        @properties << property
        @required_properties << property if definition['required']
      end
    end

  private

    def property_by_definition definition
      klass = get_property_klass(definition['type'])
      value = extract_property_value klass, definition['name']
      property = klass.new(definition, value)
    end

    def extract_property_value klass, prefix
      if klass.multistorage?
        klass.multistorage_postfixes.inject({}) do |result, postfix|
          result.merge(postfix => @db_values["#{prefix}_#{postfix}"])
        end
      else
        @db_values[prefix]
      end
    end

    def get_property_klass type
      Object.const_get("ExtraProperties").const_get("PropertyTypes").
        const_get("#{type.camelize}Type")
    end
  end
end


text:
/**
    File Name:          7.8.2.js
    ECMA Section:       7.8.2 Examples of Automatic Semicolon Insertion
    Description:        compare some specific examples of the automatic
                        insertion rules in the EMCA specification.
    Author:             christine@netscape.com
    Date:               15 september 1997
*/

    var SECTION="7.8.2";
    var VERSION="ECMA_1"
    startTest();
    writeHeaderToLog(SECTION+" "+"Examples of Semicolon Insertion");

    testcases = getTestCases();
    test();

function getTestCases() {
    var array = new Array();
    var item = 0;

//    array[item++] = new TestCase( "7.8.2",  "{ 1 \n 2 } 3",      3,         "{ 1 \n 2 } 3" );
    array[item++] = new TestCase( "7.8.2",  "{ 1 2 } 3",         "error",   eval("{1 2 } 3")     );

    return ( array );
}


text:
module Geo
  class District < ActiveRecord::Base
    belongs_to :country, foreign_key: :country_code
    belongs_to :region
    has_many :cities

    validates :country, :region, presence: true
  end
end


text:
'use strict'

// Load requirements
const slack = require('slack')
const words = require('words')

// Load module requirements
const emojis = require('../../emojis')
const users = require('../../users')
const logger = require('../../log')
const i18n = require('../../locale')

// Updates a users status icon and message
function changeStatus (action, user) {
  return new Promise((resolve, reject) => {
    // Parse user data
    let emoji = user.profile.status_emoji.replace(/:/g, '')
    let status = user.profile.status_text || ''

    // Build the response object
    let response = {
      name: users.users[user.id].short_name,
      type: 'status',
      before: {
        emoji: emoji,
        status: status
      },
      after: {
        emoji: (action.emoji ? emojis.random() : emoji),
        status: (action.status ? words({min: 2, max: 5, join: ' '}) : status)
      }
    }

    // Run the profile update
    slack.users.profile.set({
      token: process.env.SLACK_TOKEN,
      user: user.id,
      profile: {
        status_emoji: ':' + response.after.emoji + ':',
        status_text: response.after.status
      }
    }, (err, data) => {
      // Handle any errors
      if (err !== null) {
        // Check for an invalid emoji
        if (/profile_status_set_failed_not_valid_emoji/ig.test(err.message)) {
          // Stop it being used again
          emojis.invalidate(response.after.emoji)

          // DEBUG
          logger.info(i18n.t('bot.actions.status.try_again', user.short_name))

          // Try again
          return changeStatus(action, user).then((result) => {
            return resolve(result)
          }).catch((err) => {
            return reject(err)
          })
        }

        // Otherwise reject with the error
        return reject(err)
      }

      // Update the user tracking
      users.users[user.id].emoji = response.after.emoji
      users.users[user.id].text = response.after.status

      // Seems okay, resolve it
      return resolve(response)
    })
  })
}

// Export for use
module.exports = changeStatus


text:
package gr.plushost.prototypeapp.viewanimations.fading_exits;

import android.animation.ObjectAnimator;
import android.view.View;

import gr.plushost.prototypeapp.viewanimations.BaseViewAnimator;

public class FadeOutUpAnimator extends BaseViewAnimator {
    @Override
    public void prepare(View target) {
        getAnimatorAgent().playTogether(
                ObjectAnimator.ofFloat(target, "alpha", 1, 0),
                ObjectAnimator.ofFloat(target,"translationY",0,-target.getHeight()/4)
        );
    }
}


text:
import { Telemetry } from "./Telemetry";
/**
 * Telemetry about the call to remote component
 */
export interface DependencyTelemetry extends Telemetry {
    /**
     * Type name of the telemetry, such as HTTP of SQL
     */
    dependencyTypeName: string;
    /**
     * Remote component general target information
     * If left empty, this will be prepopulated with an extracted hostname from the data field, if it is a url.
     * This prepopulation happens when calling `trackDependency`. Use `track` directly to avoid this behavior.
     */
    target?: string;
    /**
     * Remote call name
     */
    name: string;
    /**
     * Remote call data. This is the most detailed information about the call, such as full URL or SQL statement
     */
    data: string;
    /**
     * Remote call duration in ms
     */
    duration: number;
    /**
     * Result code returned form the remote component. This is domain specific and can be HTTP status code or SQL result code
     */
    resultCode: string | number;
    /**
     * True if remote call was successful, false otherwise
     */
    success: boolean;
}


text:
using System;
using System.IO;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Reflection;
using Microsoft.CSharp;

namespace MbUnit.Framework.Utils
{
    public class SnippetCompiler
    {
        private CodeDomProvider provider;
        private ICodeCompiler compiler;
        private StringWriter _out=new StringWriter();
        private CompilerParameters parameters = new CompilerParameters();
        private CompilerResults results = null;

        public SnippetCompiler()
        {
            this.provider = new CSharpCodeProvider();
            this.compiler = this.provider.CreateCompiler();
            this.parameters = new CompilerParameters();
            this.parameters.GenerateInMemory = false;
            this.parameters.IncludeDebugInformation = true;
            this.parameters.ReferencedAssemblies.Add("System.dll");
            this.parameters.OutputAssembly =
                String.Format("MbUnit.Tests.Snippet.{0}.dll",
                    DateTime.Now.Ticks
                    );
        }

        public ICodeCompiler Compiler
        {
            get
            {
                return this.compiler;
            }
        }

        public TextWriter Out
        {
            get
            {
                return this._out;
            }
        }

        public CompilerParameters Parameters
        {
            get
            {
                return this.parameters;
            }
        }

        public CompilerResults Results
        {
            get
            {
                return this.results;
            }
        }

        public void Clear()
        {
            this._out = new StringWriter();
        }

        public void LoadFromResource(string name, Assembly a)
        {
            if (name == null)
                throw new ArgumentNullException("name");
            if (name.Length == 0)
                throw new ArgumentException("Lengh cannot be 0", "name");
            if (a == null)
                throw new ArgumentNullException("a");

            Stream stream = a.GetManifestResourceStream(name);
            if (stream == null)
                throw new ArgumentException("Could not find resource", name);
            using (StreamReader sr = new StreamReader(stream))
            {
                this.Out.Write(sr.ReadToEnd());
            }
        }

        public void Compile()
        {
            this.results = this.compiler.CompileAssemblyFromSource(this.Parameters, this.Out.ToString());
        }

        public void ShowErrors(TextWriter writer)
        {
            if (this.Results == null)
                throw new InvalidOperationException("Must compile something first");

            if (this.Results.Errors.Count > 0)
            {
                foreach (CompilerError ce in this.Results.Errors)
                {
                    writer.WriteLine("  {0}", ce.ToString());
                    writer.WriteLine();
                }
            }
            else
                writer.WriteLine("Compilation successful");
        }
    }
}


text:
<?php

/**
 * sfBrowser simulates a browser which can surf a symfony application.
 *
 * @package    symfony
 * @subpackage util
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: sfBrowser.class.php 15726 2009-02-23 15:56:12Z fabien $
 */
class sfBrowser extends sfBrowserBase
{
  protected
    $listeners        = array(),
    $context          = null,
    $currentException = null;

  /**
   * Calls a request to a uri.
   */
  protected function doCall()
  {
    // recycle our context object
    $this->context = $this->getContext(true);

    sfConfig::set('sf_test', true);

    // we register a fake rendering filter
    sfConfig::set('sf_rendering_filter', array('sfFakeRenderingFilter', null));

    $this->resetCurrentException();

    // dispatch our request
    ob_start();
    $this->context->getController()->dispatch();
    $retval = ob_get_clean();

    // append retval to the response content
    $this->context->getResponse()->setContent($retval);

    // manually shutdown user to save current session data
    if ($this->context->getUser())
    {
      $this->context->getUser()->shutdown();
      $this->context->getStorage()->shutdown();
    }
  }

  /**
   * Returns the current application context.
   *
   * @param  bool $forceReload  true to force context reload, false otherwise
   *
   * @return sfContext
   */
  public function getContext($forceReload = false)
  {
    if (is_null($this->context) || $forceReload)
    {
      $isContextEmpty = is_null($this->context);
      $context = $isContextEmpty ? sfContext::getInstance() : $this->context;

      $currentConfiguration = $context->getConfiguration();
      $configuration = ProjectConfiguration::getApplicationConfiguration($currentConfiguration->getApplication(), $currentConfiguration->getEnvironment(), $currentConfiguration->isDebug());
      $this->context = sfContext::createInstance($configuration);
      unset($currentConfiguration);

      if (!$isContextEmpty)
      {
        sfConfig::clear();
        sfConfig::add($this->rawConfiguration);
      }
      else
      {
        $this->rawConfiguration = sfConfig::getAll();
      }

      $this->context->getEventDispatcher()->connect('application.throw_exception', array($this, 'ListenToException'));
      foreach ($this->listeners as $name => $listener)
      {
        $this->context->getEventDispatcher()->connect($name, $listener);
      }
    }

    return $this->context;
  }

  public function addListener($name, $listener)
  {
    $this->listeners[$name] = $listener;
  }

  /**
   * Gets response.
   *
   * @return sfWebResponse
   */
  public function getResponse()
  {
    return $this->context->getResponse();
  }

  /**
   * Gets request.
   *
   * @return sfWebRequest
   */
  public function getRequest()
  {
    return $this->context->getRequest();
  }

  /**
   * Gets user.
   *
   * @return sfUser
   */
  public function getUser()
  {
    return $this->context->getUser();
  }

  /**
   * Shutdown function to clean up and remove sessions
   *
   * @return void
   */
  public function shutdown()
  {
    parent::shutdown();

    // we remove all session data
    sfToolkit::clearDirectory(sfConfig::get('sf_test_cache_dir').'/sessions');
  }

  /**
   * Listener for exceptions
   *
   * @param  sfEvent $event  The event to handle
   *
   * @return void
   */
  public function listenToException(sfEvent $event)
  {
    $this->setCurrentException($event->getSubject());
  }
}

class sfFakeRenderingFilter extends sfFilter
{
  public function execute($filterChain)
  {
    $filterChain->execute();

    $this->context->getResponse()->sendContent();
  }
}


text:
package io.fintrospect.renderers

import com.twitter.finagle.Service
import com.twitter.finagle.http.Method.{Get, Post}
import com.twitter.finagle.http.path.Root
import com.twitter.finagle.http.{Request, Status}
import com.twitter.util.{Await, Future}
import io.fintrospect.ContentTypes.{APPLICATION_ATOM_XML, APPLICATION_JSON, APPLICATION_SVG_XML}
import io.fintrospect._
import io.fintrospect.formats.Argo
import io.fintrospect.formats.Argo.JsonFormat.{number, obj, parse}
import io.fintrospect.parameters._
import io.fintrospect.util.HttpRequestResponseUtil.statusAndContentFrom
import io.fintrospect.util.{Echo, ExtractionError}
import org.scalatest.{FunSpec, Matchers}

import scala.io.Source

abstract class ArgoJsonModuleRendererTest() extends FunSpec with Matchers {
  def name: String = this.getClass.getSimpleName

  def renderer: ModuleRenderer

  describe(name) {
    it("renders as expected") {

      val customBody = Body.json("the body of the message", obj("anObject" -> obj("notAStringField" -> number(123))))

      val module = RouteModule(Root / "basepath", renderer)
        .securedBy(ApiKey(Header.required.string("the_api_key"), Service.const(Future(true))))
        .withRoute(
          RouteSpec("summary of this route", "some rambling description of what this thing actually does")
            .producing(APPLICATION_JSON)
            .taking(Header.optional.string("header", "description of the header"))
            .returning(ResponseSpec.json(Status.Ok -> "peachy", obj("anAnotherObject" -> obj("aNumberField" -> number(123)))))
            .returning(ResponseSpec.json(Status.Accepted -> "peachy", obj("anAnotherObject" -> obj("aNumberField" -> number(123)))))
            .returning(Status.Forbidden -> "no way jose")
            .taggedWith("tag3")
            .taggedWith("tag1")
            .at(Get) / "echo" / Path.string("message") bindTo ((s: String) => Echo(s)))
        .withRoute(
          RouteSpec("a post endpoint")
            .consuming(APPLICATION_ATOM_XML, APPLICATION_SVG_XML)
            .producing(APPLICATION_JSON)
            .returning(ResponseSpec.json(Status.Forbidden -> "no way jose", obj("aString" -> Argo.JsonFormat.string("a message of some kind"))))
            .taking(Query.required.int("query"))
            .body(customBody)
            .taggedWith("tag1")
            .taggedWith(TagInfo("tag2", "description of tag"), TagInfo("tag2", "description of tag"))
            .at(Post) / "echo" / Path.string("message") bindTo ((s: String) => Echo(s)))
        .withRoute(
          RouteSpec("a friendly endpoint")
            .taking(Query.required.boolean("query", "description of the query"))
            .body(Body.form(FormField.required.int("form", "description of the form")))
            .at(Get) / "welcome" / Path.string("firstName") / "bertrand" / Path.string("secondName") bindTo ((x: String, y: String, z: String) => Echo(x, y, z)))

      val expected = parse(Source.fromInputStream(this.getClass.getResourceAsStream(s"$name.json")).mkString)

      val actual = Await.result(module.toService(Request("/basepath"))).contentString
//      println(Argo.JsonFormat.pretty(parse(actual)))
      parse(actual) shouldBe expected
    }

    it("can build 400") {
      val response = statusAndContentFrom(renderer.badRequest(Seq(ExtractionError(Query.required.string("bob"), "missing"))))
      response._1 shouldBe Status.BadRequest
      parse(response._2).getStringValue("message") shouldBe "Missing/invalid parameters"
    }

    it("can build 404") {
      val response = statusAndContentFrom(renderer.notFound(Request()))
      response._1 shouldBe Status.NotFound
      parse(response._2).getStringValue("message") shouldBe "No route found on this path. Have you used the correct HTTP verb?"
    }

  }
}


text:
package zson

import (
	"encoding/json"
	"errors"
	"fmt"
)

type StringOrArray []string

func (s StringOrArray) MarshalJSON() ([]byte, error) {
	if len(s) == 1 {
		return json.Marshal(s[0])
	}
	arr := []string(s)
	return json.Marshal(arr)
}

func (s *StringOrArray) UnmarshalJSON(b []byte) error {
	var raw interface{}
	if err := json.Unmarshal(b, &raw); err != nil {
		return err
	}
	switch raw.(type) {
	case nil:
		*s = make([]string, 0)
	case string:
		out := make([]string, 1)
		out[0] = raw.(string)
		*s = out
	case []interface{}:
		arr := raw.([]interface{})
		out := make([]string, len(arr))
		for idx, elt := range arr {
			switch t := elt.(type) {
			case string:
				out[idx] = elt.(string)
			default:
				return fmt.Errorf("Error: element %d of array is a %v, (expected string)", idx, t)
			}
		}
		*s = out
	default:
		return errors.New("Not a string or an array")
	}
	return nil
}

func (s *StringOrArray) Empty() bool {
	if s == nil {
		return true
	}
	if *s == nil {
		return true
	}
	if len(*s) == 0 {
		return true
	}
	return false
}


text:
 Defines the Managed Navigation settings of the site

**Namespace:** [OfficeDevPnP.Core.Framework.Provisioning.Model](OfficeDevPnP.Core.Framework.Provisioning.Model.md)
**Assembly:** OfficeDevPnP.Core.dll
## Syntax
```C#
public ManagedNavigation ManagedNavigation { get; }
```

### Property Value
Type: [OfficeDevPnP.Core.Framework.Provisioning.Model.ManagedNavigation](OfficeDevPnP.Core.Framework.Provisioning.Model.ManagedNavigation.md)

## See also
- [BaseNavigationKind](OfficeDevPnP.Core.Framework.Provisioning.Model.BaseNavigationKind.md)
- [OfficeDevPnP.Core.Framework.Provisioning.Model](OfficeDevPnP.Core.Framework.Provisioning.Model.md)


text:
<?php
session_start();
?>

<html>
<body>

<?php
if (isset($_POST['username_new']))
{
	$attempted_username = $_POST['username_new'];
}
if (isset($_POST['password_new']))
{
	$attempted_password = $_POST['password_new'];
}
if($_POST['username_new']=="" || $_POST['password_new']=="")
{
	header('Location: register.html');
	die();
}
$fp = fopen("passwords.txt", "r+");
$string_holder;
$counter = 0;
$flag = true;
while (!feof($fp))
{
	$string_holder[$counter] = fgets($fp);
	$counter++;
}
foreach ( $string_holder as $value)
{
	$tempholder = explode('#',$value);
	if ( $attempted_username == $tempholder[0] )
	{
		$test_string = $tempholder[0];
		header('Location: taken_error.php');
		$flag = false;
		die();
	}
	unset($tempholder);
}
if ($flag != false)
{
	$tempholder = explode("#",$string_holder[0]);
	$_SESSION['test'] = $tempholder[0];
	$string_to_write = $attempted_username."#".$attempted_password."\r\n";
	$store_word = $string_to_write.file_get_contents("passwords.txt");
	file_put_contents("passwords.txt", $store_word);
	header('Location: success_join.php');
	die();
}
echo "failed?";
?>

</body>
</html>


text:
use std::convert::From;
use std::error::Error as StdError;
use std::fmt::{self, Display, Write};
use std::ffi::NulError;

#[derive(Debug)]
/// The generic "things can fail in a myriad of ways" enum. This type is not
/// indended to be exhaustively matched, and new variants may be added in the
/// future without a major version bump.
pub enum Error {
    InvalidCString(NulError),
    DatabaseError(String),
    NotFound,
    QueryBuilderError(Box<StdError>),
    #[doc(hidden)]
    __Nonexhaustive,
}

#[derive(Debug)]
pub enum ConnectionError {
    InvalidCString(NulError),
    BadConnection(String),
}

#[derive(Debug, PartialEq)]
pub enum TransactionError<E> {
    CouldntCreateTransaction(Error),
    UserReturnedError(E),
}

pub type QueryResult<T> = Result<T, Error>;
pub type ConnectionResult<T> = Result<T, ConnectionError>;
pub type TransactionResult<T, E> = Result<T, TransactionError<E>>;

pub trait OptionalExtension<T> {
    fn optional(self) -> Result<Option<T>, Error>;
}

impl<T> OptionalExtension<T> for QueryResult<T> {
    fn optional(self) -> Result<Option<T>, Error> {
        match self {
            Ok(value) => Ok(Some(value)),
            Err(Error::NotFound) => Ok(None),
            Err(e) => Err(e),
        }
    }
}

impl From<NulError> for ConnectionError {
    fn from(e: NulError) -> Self {
        ConnectionError::InvalidCString(e)
    }
}

impl From<NulError> for Error {
    fn from(e: NulError) -> Self {
        Error::InvalidCString(e)
    }
}

impl<E> From<Error> for TransactionError<E> {
    fn from(e: Error) -> Self {
        TransactionError::CouldntCreateTransaction(e)
    }
}

impl From<TransactionError<Error>> for Error {
    fn from(e: TransactionError<Error>) -> Self {
        match e {
            TransactionError::CouldntCreateTransaction(e) => e,
            TransactionError::UserReturnedError(e) => e,
        }
    }
}

impl Display for Error {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match self {
            &Error::InvalidCString(ref nul_err) => nul_err.fmt(f),
            &Error::DatabaseError(ref s) => write!(f, "{}", &s),
            &Error::NotFound => f.write_str("NotFound"),
            &Error::QueryBuilderError(ref e) => e.fmt(f),
            &Error::__Nonexhaustive => unreachable!(),
        }
    }
}

impl StdError for Error {
    fn description(&self) -> &str {
        match self {
            &Error::InvalidCString(ref nul_err) => nul_err.description(),
            &Error::DatabaseError(ref s) => &s,
            &Error::NotFound => "Record not found",
            &Error::QueryBuilderError(ref e) => e.description(),
            &Error::__Nonexhaustive => unreachable!(),
        }
    }
}

impl Display for ConnectionError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match self {
            &ConnectionError::InvalidCString(ref nul_err) => nul_err.fmt(f),
            &ConnectionError::BadConnection(ref s) => write!(f, "{}", &s),
        }
    }
}

impl StdError for ConnectionError {
    fn description(&self) -> &str {
        match self {
            &ConnectionError::InvalidCString(ref nul_err) => nul_err.description(),
            &ConnectionError::BadConnection(ref s) => &s,
        }
    }
}

impl<E: Display> Display for TransactionError<E> {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match self {
            &TransactionError::CouldntCreateTransaction(ref e) => e.fmt(f),
            &TransactionError::UserReturnedError(ref e) => e.fmt(f),
        }
    }
}

impl<E: StdError> StdError for TransactionError<E> {
    fn description(&self) -> &str {
        match self {
            &TransactionError::CouldntCreateTransaction(ref e) => e.description(),
            &TransactionError::UserReturnedError(ref e) => e.description(),
        }
    }
}

impl PartialEq for Error {
    fn eq(&self, other: &Error) -> bool {
        match (self, other) {
            (&Error::InvalidCString(ref a), &Error::InvalidCString(ref b)) => a == b,
            (&Error::DatabaseError(ref a), &Error::DatabaseError(ref b)) => a == b,
            (&Error::NotFound, &Error::NotFound) => true,
            _ => false,
        }
    }
}


text:
#include "../../include/kernelevaluation.h"
#include "../../include/utilities.h"

/**
 * Evaluate a row of the gram matrix
 * @param d_xtraindata device pointer to the training set
 * @param d_dottraindata device pointer to the array containing the dot product of the row with itself
 * @param d_kernelrow device pointer that will store the array extracted from d_xtraindata.
 * @param d_kerneldot device pointer that will store the result of the kernel evaluation
 * @param d_kdata device pointer to the matrix that stores the cached values
 * @param gid index that points to the point in d_xtraindata to be  calculated
 * @param cacheid index that points to the location in cache that will keep the results
 * @param ntraining number of training samples in the training set
 * @param nfeatures number of features in the training samples
 * @param beta value of the parameter of the RBF kernel
 * @param a if using polynomial or sigmoid kernel the value of a x_i x_j
 * @param b if using polynomial or sigmoid kernel the value of b
 * @param d if using polynomial kernel
 * @param kernelcode code that indicates the kernel type to run
 */
void kerneleval ( 	float* d_xtraindata,
					float* d_dottraindata,
					float* d_kernelrow,
					float* d_kerneldot,
					float* d_kdata,
					int gid,
					int cacheid,
					int ntraining,
					int nfeatures,
					float beta,
					float a,
					float b,
					float d,
					int kernelcode)
{

	int numThreads = (nfeatures < MAXTHREADS*2) ? nextPow2((nfeatures + 1)/ 2) : MAXTHREADS;
	int numBlocks = (nfeatures + (numThreads * 2 - 1)) / (numThreads * 2);
	int numBlocksRed = min(MAXBLOCKS, numBlocks);

	dim3 dimBlockKernelRow(numThreads, 1, 1);
	dim3 dimGridKernelRow(numBlocksRed, 1, 1);

	int smemSize = 0;
	bool isNtrainingPow2=isPow2(nfeatures);

	if(isNtrainingPow2)
	{
		switch (numThreads)
		{
			case 512:
				ExtractKernelRow <512,true><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case 256:
				ExtractKernelRow <256,true><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case 128:
				ExtractKernelRow <128,true><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case 64:
				ExtractKernelRow <64,true><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case 32:
				ExtractKernelRow <32,true><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case 16:
				ExtractKernelRow <16,true><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case  8:
				ExtractKernelRow <8,true><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case  4:
				ExtractKernelRow <4,true><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case  2:
				ExtractKernelRow <2,true><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case  1:
				ExtractKernelRow <1,true><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
		}
	}
	else
	{
		switch (numThreads)
		{
			case 512:
				ExtractKernelRow <512,false><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case 256:
				ExtractKernelRow <256,false><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case 128:
				ExtractKernelRow <128,false><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case 64:
				ExtractKernelRow <64,false><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case 32:
				ExtractKernelRow <32,false><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case 16:
				ExtractKernelRow <16,false><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case  8:
				ExtractKernelRow <8,false><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case  4:
				ExtractKernelRow <4,false><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case  2:
				ExtractKernelRow <2,false><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
			case  1:
				ExtractKernelRow <1,false><<< dimGridKernelRow, dimBlockKernelRow, smemSize >>>(d_xtraindata,d_kernelrow,	gid,ntraining,nfeatures); break;
		}
	}

	cudaThreadSynchronize();

	cublasSgemv ('n',ntraining,	nfeatures,1,d_xtraindata,ntraining,d_kernelrow,	1,0,d_kerneldot,1);
	cublasStatus status;
	status = cublasGetError();
	if (status != CUBLAS_STATUS_SUCCESS) {
		fprintf (stderr, "!!!! kernel execution error.\n");
	}

	numThreads = (ntraining < MAXTHREADS*2) ? nextPow2((ntraining + 1)/ 2) : MAXTHREADS;
	numBlocks = (ntraining + (numThreads * 2 - 1)) / (numThreads * 2);
	numBlocksRed = min(MAXBLOCKS, numBlocks);

	dim3 dimBlockReduction(numThreads, 1, 1);
	dim3 dimGridReduction(numBlocksRed, 1, 1);

	smemSize = 0;
	isNtrainingPow2=isPow2(ntraining);

	if(isNtrainingPow2)
	{
		switch (numThreads)
		{
			case 512:
				SetKernelDot <512,true><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case 256:
				SetKernelDot <256,true><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case 128:
				SetKernelDot <128,true><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case 64:
				SetKernelDot <64,true><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case 32:
				SetKernelDot <32,true><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case 16:
				SetKernelDot <16,true><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case  8:
				SetKernelDot <8,true><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case  4:
				SetKernelDot <4,true><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case  2:
				SetKernelDot <2,true><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case  1:
				SetKernelDot <1,true><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
		}
	}
	else
	{
		switch (numThreads)
		{
			case 512:
				SetKernelDot <512,false><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case 256:
				SetKernelDot <256,false><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case 128:
				SetKernelDot <128,false><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case 64:
				SetKernelDot <64,false><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case 32:
				SetKernelDot <32,false><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case 16:
				SetKernelDot <16,false><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case  8:
				SetKernelDot <8,false><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case  4:
				SetKernelDot <4,false><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case  2:
				SetKernelDot <2,false><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
			case  1:
				SetKernelDot <1,false><<< dimGridReduction, dimBlockReduction, smemSize >>>(d_kdata,d_dottraindata,d_kerneldot,gid,cacheid,ntraining,beta,a,b,d,kernelcode); break;
		}
	}

	cudaThreadSynchronize();

}


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.11.22 at 01:45:09 PM EST
//

package eu.datex2.schema._2_0rc1._2_0;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for UpdateMethodEnum.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *

 *

 * <simpleType name="UpdateMethodEnum">
 *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     <enumeration value="allElementUpdate"/>
 *     <enumeration value="singleElementUpdate"/>
 *     <enumeration value="snapshot"/>
 *   </restriction>
 * </simpleType>
 *

 *
 */
@XmlType(name = "UpdateMethodEnum")
@XmlEnum
public enum UpdateMethodEnum {

    @XmlEnumValue("allElementUpdate")
    ALL_ELEMENT_UPDATE("allElementUpdate"),
    @XmlEnumValue("singleElementUpdate")
    SINGLE_ELEMENT_UPDATE("singleElementUpdate"),
    @XmlEnumValue("snapshot")
    SNAPSHOT("snapshot");
    private final String value;

    UpdateMethodEnum(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static UpdateMethodEnum fromValue(String v) {
        for (UpdateMethodEnum c: UpdateMethodEnum.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

}


text:
.leaflet-buttons-control-button {
  background-color: #fff;
  border-bottom: 1px solid #ccc;
  width: 26px;
  height: 26px;
  line-height: 26px;
  display: block;
  text-align: center;
  text-decoration: none;
  color: black;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.65);
  padding: 3px;
  box-sizing: border-box;
}

.leaflet-buttons-control-button img {
  width: 100%;
}

.leaflet-buttons-control-button img.icon-polygon {
  content: url("assets/icons/polygon.png");
}

.leaflet-buttons-control-button:hover {
  cursor: pointer;
  background-color: #f4f4f4;
}

.leaflet-buttons-control-button.active {
  background-color: #f4f4f4;
}

.leaflet-buttons-control-button.active img {
  opacity: .5;
}

.leaflet-buttons-control-text-hide {
  display: none;
}
.marker-icon,
.marker-icon:focus {
  background-color: #ffffff;
  border: 1px solid #3388FF;
  border-radius: 50%;
  margin: -8px 0 0 -8px !important;
  width: 14px !important;
  height: 14px !important;
  outline: 0;
  transition: opacity ease .3s;
}

.marker-icon-middle {
  opacity: .7;
  margin: -6px 0 0 -6px !important;
  width: 10px !important;
  height: 10px !important;
}


text:
package org.apache.flink.connector.hbase1.source;

import org.apache.flink.api.common.io.InputFormat;
import org.apache.flink.connector.hbase.util.HBaseSerde;
import org.apache.flink.connector.hbase.util.HBaseTableSchema;
import org.apache.flink.table.data.RowData;

import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.TableNotFoundException;
import org.apache.hadoop.hbase.client.ConnectionFactory;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.Scan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;

/**
 * {@link InputFormat} subclass that wraps the access for HTables. Returns the result as {@link
 * RowData}
 */
public class HBaseRowDataInputFormat extends AbstractTableInputFormat<RowData> {
    private static final long serialVersionUID = 1L;
    private static final Logger LOG = LoggerFactory.getLogger(HBaseRowDataInputFormat.class);

    private final String tableName;
    private final HBaseTableSchema schema;
    private final String nullStringLiteral;

    private transient HBaseSerde serde;

    public HBaseRowDataInputFormat(
            org.apache.hadoop.conf.Configuration conf,
            String tableName,
            HBaseTableSchema schema,
            String nullStringLiteral) {
        super(conf);
        this.tableName = tableName;
        this.schema = schema;
        this.nullStringLiteral = nullStringLiteral;
    }

    @Override
    protected void initTable() throws IOException {
        this.serde = new HBaseSerde(schema, nullStringLiteral);
        if (table == null) {
            connectToTable();
        }
        if (table != null && scan == null) {
            scan = getScanner();
        }
    }

    @Override
    protected Scan getScanner() {
        return serde.createScan();
    }

    @Override
    public String getTableName() {
        return tableName;
    }

    @Override
    protected RowData mapResultToOutType(Result res) {
        return serde.convertToReusedRow(res);
    }

    private void connectToTable() throws IOException {
        try {
            connection = ConnectionFactory.createConnection(getHadoopConfiguration());
            table = (HTable) connection.getTable(TableName.valueOf(tableName));
        } catch (TableNotFoundException tnfe) {
            LOG.error("The table " + tableName + " not found ", tnfe);
            throw new RuntimeException("HBase table '" + tableName + "' not found.", tnfe);
        }
    }
}


text:
indian_book
===========
Site for indians to read , download books online/offline free of cost.
Have viewing facility and downloading freely.


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="48dp"
    android:background="@color/bg_wc_black1"
    android:clickable="true">

    <ImageView
        android:id="@+id/btn_back"
        android:layout_width="48dp"
        android:layout_height="match_parent"
        android:layout_centerVertical="true"
        android:background="@drawable/selector_back_press"
        android:padding="14dp"
        android:src="@drawable/ic_back" />

    <View
        android:layout_width="1px"
        android:layout_height="match_parent"
        android:layout_marginBottom="12dp"
        android:layout_marginTop="12dp"
        android:layout_toRightOf="@id/btn_back"
        android:background="@color/bg_wc_black2" />

    <TextView
        android:id="@+id/tv_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_marginLeft="8dp"
        android:layout_toRightOf="@id/btn_back"
        android:fontFamily="sans-serif-light"
        android:text="@string/pick_photo"
        android:textColor="@color/tv_white"
        android:textSize="18sp"
        android:textStyle="normal" />

    <Button
        android:id="@+id/btn_ok"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:background="@drawable/selector_top_ok"
        android:fontFamily="sans-serif-light"
        android:minHeight="30dp"
        android:minWidth="50dp"
        android:text="@string/ok"
        android:textColor="@color/ok_btn_color"
        android:textSize="12sp"
        android:textStyle="normal" />

    <ImageView
        android:id="@+id/btn_del"
        android:layout_width="48dp"
        android:layout_height="match_parent"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:background="@drawable/selector_back_press"
        android:padding="14dp"
        android:src="@drawable/ic_del"
        android:visibility="gone" />
</RelativeLayout>