text:
#include "s2n_test.h"

#include <s2n.h>
#include <string.h>

#include "utils/s2n_map.h"

int main(int argc, char **argv)
{
    char keystr[sizeof("ffff")];
    char valstr[sizeof("16384")];
    struct s2n_map *empty, *map;
    struct s2n_blob key;
    struct s2n_blob val;

    BEGIN_TEST();

    EXPECT_NOT_NULL(empty = s2n_map_new());

    /* Try a lookup on an empty map. Expect an error because the map is still mutable. */
    EXPECT_SUCCESS(snprintf(keystr, sizeof(keystr), "%04x", 1234));
    key.data = (void *) keystr;
    key.size = strlen(keystr) + 1;
    EXPECT_FAILURE(s2n_map_lookup(empty, &key, &val));

    EXPECT_SUCCESS(snprintf(valstr, sizeof(valstr), "%05d", 1234));
    val.data = (void *) valstr;
    val.size = strlen(valstr) + 1;

    /* Try to add/put key with zero-size data. Expect failures */
    key.size = 0;
    EXPECT_FAILURE(s2n_map_add(empty, &key, &val));
    EXPECT_FAILURE(s2n_map_put(empty, &key, &val));
    key.size = strlen(keystr) + 1;

    /* Make the empty map complete */
    EXPECT_SUCCESS(s2n_map_complete(empty));

    /* Lookup and expect no result */
    EXPECT_EQUAL(s2n_map_lookup(empty, &key, &val), 0);

    /* Done with the empty map */
    EXPECT_SUCCESS(s2n_map_free(empty));

    /* Expect failure since initial map size is zero */
    EXPECT_NULL(map = s2n_map_new_with_initial_capacity(0));

    /* Create map with the smallest initial size */
    EXPECT_NOT_NULL(map = s2n_map_new_with_initial_capacity(1));

    /* Insert 8k key value pairs of the form hex(i) -> dec(i) */
    for (int i = 0; i < 8192; i++) {
        EXPECT_SUCCESS(snprintf(keystr, sizeof(keystr), "%04x", i));
        EXPECT_SUCCESS(snprintf(valstr, sizeof(valstr), "%05d", i));

        key.data = (void *) keystr;
        key.size = strlen(keystr) + 1;
        val.data = (void *) valstr;
        val.size = strlen(valstr) + 1;

        EXPECT_SUCCESS(s2n_map_add(map, &key, &val));
    }

    /* Try adding some duplicates */
    for (int i = 0; i < 10; i++) {
        EXPECT_SUCCESS(snprintf(keystr, sizeof(keystr), "%04x", i));
        EXPECT_SUCCESS(snprintf(valstr, sizeof(valstr), "%05d", i));

        key.data = (void *) keystr;
        key.size = strlen(keystr) + 1;
        val.data = (void *) valstr;
        val.size = strlen(valstr) + 1;

        EXPECT_FAILURE(s2n_map_add(map, &key, &val));
    }

    /* Try replacing some entries */
    for (int i = 0; i < 10; i++) {
        EXPECT_SUCCESS(snprintf(keystr, sizeof(keystr), "%04x", i));
        EXPECT_SUCCESS(snprintf(valstr, sizeof(valstr), "%05d", i+1));

        key.data = (void *) keystr;
        key.size = strlen(keystr) + 1;
        val.data = (void *) valstr;
        val.size = strlen(valstr) + 1;

        EXPECT_SUCCESS(s2n_map_put(map, &key, &val));
    }

    /* Try a lookup before the map is complete: should fail */
    EXPECT_SUCCESS(snprintf(keystr, sizeof(keystr), "%04x", 1));
    EXPECT_FAILURE(s2n_map_lookup(map, &key, &val));

    /* Make the map complete */
    EXPECT_SUCCESS(s2n_map_complete(map));

    /* Make sure that add-after-complete fails */
    EXPECT_SUCCESS(snprintf(keystr, sizeof(keystr), "%04x", 8193));
    EXPECT_SUCCESS(snprintf(valstr, sizeof(valstr), "%05d", 8193));

    key.data = (void *) keystr;
    key.size = strlen(keystr) + 1;
    val.data = (void *) valstr;
    val.size = strlen(valstr) + 1;

    EXPECT_FAILURE(s2n_map_add(map, &key, &val));

    /* Check for equivalence */
    for (int i = 0; i < 8192; i++) {

        if (i >= 10) {
            EXPECT_SUCCESS(snprintf(keystr, sizeof(keystr), "%04x", i));
            EXPECT_SUCCESS(snprintf(valstr, sizeof(valstr), "%05d", i));
        }
        else {
            /* The first 10 entries were overwritten with i+1 */
            EXPECT_SUCCESS(snprintf(keystr, sizeof(keystr), "%04x", i));
            EXPECT_SUCCESS(snprintf(valstr, sizeof(valstr), "%05d", i+1));
        }

        key.data = (void *) keystr;
        key.size = strlen(keystr) + 1;

        EXPECT_EQUAL(s2n_map_lookup(map, &key, &val), 1);

        EXPECT_SUCCESS(memcmp(val.data, valstr, strlen(valstr) + 1));
    }

    /* Check for a key that shouldn't be there */
    EXPECT_SUCCESS(snprintf(keystr, sizeof(keystr), "%04x", 8193));
    key.data = (void *) keystr;
    key.size = strlen(keystr) + 1;
    EXPECT_EQUAL(s2n_map_lookup(map, &key, &val), 0);

    /* Make the map mutable */
    EXPECT_SUCCESS(s2n_map_unlock(map));
    /* Make sure that add-after-unlock succeeds */
    EXPECT_SUCCESS(snprintf(keystr, sizeof(keystr), "%04x", 8193));
    EXPECT_SUCCESS(snprintf(valstr, sizeof(valstr), "%05d", 8193));

    key.data = (void *) keystr;
    key.size = strlen(keystr) + 1;
    val.data = (void *) valstr;
    val.size = strlen(valstr) + 1;

    EXPECT_SUCCESS(s2n_map_add(map, &key, &val));

    /* Complete the map again */
    EXPECT_SUCCESS(s2n_map_complete(map));

    /* Check the element added after map unlock */
    EXPECT_EQUAL(s2n_map_lookup(map, &key, &val), 1);
    EXPECT_SUCCESS(memcmp(val.data, valstr, strlen(valstr) + 1));

    EXPECT_SUCCESS(s2n_map_free(map));

    END_TEST();
}


text:
/**
 *
 */

package HW8_101044044;

/**
 * @author talayhan
 *
 */
public class Family {
	// Data fields
	private Person father = null;
	private Person mother = null;
	private Person [] children;

	/** The current size of the children array */
	private int size = 0;

	/** The current size of the array */
	private final static int INITIAL_CAPACITY = 10;

	/** T */
	private int capacity = INITIAL_CAPACITY;
	public static int numberOfFamilies = 0;

	/**
	 * No parameter constructor. */
	public Family(){
		++numberOfFamilies; //increase family number
		children = new Person [INITIAL_CAPACITY];
	}

	/**
	 * Two paramater constructor. */
	public Family(Person father, Person mother){
		if(father.getGender().equals(mother.getGender())){
			throw new IllegalArgumentException("Father and Mother should have different" +
					" gender!");
		}
		this.father = father;
		this.mother = mother;
		children = new Person [INITIAL_CAPACITY];
		++numberOfFamilies;
	}

	/**
	 * Allocate a new array to hold */
	private void reallocate(){
		capacity = capacity * 2;
		Person[] newArray = new Person[capacity];
		System.arraycopy(children, 0, newArray, 0, children.length);

		children = newArray;
	}

	/**
	 * Method at() returns the child at the given index.
	 * @param int index
	 * @return Person at the given index.  */
	public Person at(int index){
		// Validty check
		if(index < 0 || index >= size){
			throw new IndexOutOfBoundsException("Invalid index!");
		}
		return children[index];
	}

	/**
	 * Method add() that adds the Person as a child
	 * to the family.
	 * @param Person as a child. */
	public void add(Person child){
		if (size >= capacity) {
			reallocate();
		}
		children[size] = child;
		++size;
	}

	/*
	 * Method compareTo() comparing two families, and
	 * returns true if two families are equal.
	 * @return boolean
	 * @param Family object
	 *  **/
	public boolean compareTo(Family other){
		if(this.hashCode() == other.hashCode()){
			return true;
		}
		return false;
	}

	/**
	 * Override method toString()
	 * @return String
	 * */
	public String toString(){
		String s = "\t\tFamily Informations\n";
		s += "Father: \n" + father.toString();
		s += "Mother: \n" + mother.toString();
		for (int i = 0; i < size; i++) {
			s += "Child" + i + ":\n" + children[i].toString();
		}
		return s;
	}
	/**
	 * Method isRelative() returns true if one of the persons is a
	 * relative of the other by equals sirname the family array list.
	 * @param get two person objects and family objects array
	 * @return boolean type, true or false.
	 *  */
	public static boolean isRelative(Person one, Person two, Family[] families){
		if(one.getLastName() == two.getLastName())
			return true;

		for (int i = 0; i < families.length; i++) {
			String comp = families[i].father.getLastName();
			if(comp == one.getLastName() ||
				comp == two.getLastName()){
				return true;
			}
		}
		return false;
	}

	//Gettters and setters methods.
	public Person getFather() {
		return father;
	}

	public void setFather(Person father) {
		this.father = father;
	}

	public Person getMother() {
		return mother;
	}

	public void setMother(Person mother) {
		this.mother = mother;
	}

	public Person[] getChildren() {
		return children;
	}

	public void setChildren(Person[] children) {
		this.children = children;
	}

	public static int getNumberOfFamilies() {
		return numberOfFamilies;
	}

	// Actually, Java take cares of all clean up resources,
	// But we should decrease number of families in destructor,
	protected void finalize(){
		--numberOfFamilies;
	}

}

redpajama_set_name: RedPajamaGithub


text:
/**
 * @jsx React.DOM
 */
'use strict';

var assert = require('assert');
var React = require('react');
var route = require('../route');
var descriptors = require('../descriptors');
var Routes = descriptors.Routes;
var Route = descriptors.Route;

describe('route', function() {

  var Main = React.createClass({
    render: function() {
      return
main
;
    }
  });

  var Page = React.createClass({
    render: function() {
      return
page
;
    }
  });

  var routes = (
    <Routes>
      <Route name="main" path="/" view={Main} />
      <Route name="page" path="/page" view={Page} />
    </Routes>
  );

  it('routes /', function(done) {
    route(routes, '/').then(function(View) {
      var view = <View />;
      assert.equal(view.type.displayName, 'Main');
      done();
    }).catch(done);
  });

  it('routes /page', function(done) {
    route(routes, '/page').then(function(View) {
      var view = <View />;
      assert.equal(view.type.displayName, 'Page');
      done();
    }).catch(done);
  });

  it('routes /page?foo=bar', function(done) {
    route(routes, '/page', 'foo=bar').then(function(View) {
      var view = <View />;
      assert.equal(view.type.displayName, 'Page');
      done();
    }).catch(done);
  });

  it('routes /page?foo=bar (parsed query)', function(done) {
    route(routes, '/page', {foo: 'bar'}).then(function(View) {
      var view = <View />;
      assert.equal(view.type.displayName, 'Page');
      done();
    }).catch(done);
  });

});


text:
/* Galleria Classic Theme 2012-08-07 | https://raw.github.com/aino/galleria/master/LICENSE | (c) Aino */

#galleria-loader{height:1px!important}

.galleria-container {
  position: relative;
  overflow: hidden;
}
.galleria-container img {
  -moz-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
}
.galleria-stage {
  background: #222;
  background: rgba( 0, 0, 0, .15 );
  position: absolute;
  top: 0;
  bottom: 80px;
  left: 10px;
  right: 10px;
  overflow:hidden;
  -moz-border-radius: 4px;
  -webkit-border-radius: 4px;
  border-radius: 4px;
}
.galleria-thumbnails-container {
  height: 70px;
  bottom: 0;
  position: absolute;
  left: 10px;
  right: 10px;
  z-index: 2;
}
.galleria-carousel .galleria-thumbnails-list {
  margin-left: 30px;
  margin-right: 30px;
}
.galleria-thumbnails .galleria-image {
  height: 60px;
  width: 90px;
  background: transparent;
  margin: 0 10px 0 0;
  float: left;
  cursor: pointer;
}
.galleria-counter {
  position: absolute;
  bottom: 10px;
  left: 10px;
  text-align: right;
  z-index: 2;
}
.galleria-loader {
  width: 20px;
  height: 20px;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: none;
  background: url('classic-loader.gif') no-repeat 2px 2px;
}
.galleria-info {
  width: 50%;
  top: 15px;
  left: 25px;
  z-index: 2;
  position: absolute;
}
.galleria-info-text {
  background: #000;
  background: rgba(0, 0, 0, .4);
  padding: 15px;
  display: none;
  -moz-border-radius: 4px;
  -webkit-border-radius: 4px;
  border-radius: 4px;
}
.galleria-info-title {
  font-size: 1.4em;
  line-height: 1.4em;
  font-weight: bold;
  margin: 0;
  color: #fff;
}
.galleria-info-description {
  font-size: 1.2em;
  line-height: 1.2em;
  margin: 0;
  color: #bbb;
}
.galleria-info-title+.galleria-info-description { margin-top: 7px; }
.galleria-info-close {
  width: 9px;
  height: 9px;
  position: absolute;
  top: 10px;
  right: 10px;
  background-position: -753px -11px;
  opacity: .5;
  filter: alpha(opacity=50);
  cursor: pointer;
  display: none;
}
.notouch .galleria-info-close:hover{
  opacity:1;
  filter: alpha(opacity=100);
}
.touch .galleria-info-close:active{
  opacity:1;
  filter: alpha(opacity=100);
}
.galleria-info-link {
  background-position: -669px -5px;
  opacity: .7;
  filter: alpha(opacity=70);
  position: absolute;
  width: 20px;
  height: 20px;
  cursor: pointer;
}
.notouch .galleria-info-link:hover {
  opacity: 1;
  filter: alpha(opacity=100);
}
.touch .galleria-info-link:active {
  opacity: 1;
  filter: alpha(opacity=100);
}
.galleria-image-nav {
  position: absolute;
  top: 50%;
  margin-top: -62px;
  width: 100%;
  height: 62px;
  left: 0;
}
.galleria-image-nav-left,
.galleria-image-nav-right {
  opacity: .3;
  filter: alpha(opacity=30);
  cursor: pointer;
  width: 62px;
  height: 124px;
  position: absolute;
  left: 15px;
  z-index: 2;
  background-position: 0 46px;
}
.galleria-image-nav-right {
  left: auto;
  right: 15px;
  background-position: -254px 46px;
  z-index: 2;
}
.notouch .galleria-image-nav-left:hover,
.notouch .galleria-image-nav-right:hover {
  opacity: 1;
  filter: alpha(opacity=100);
}
.touch .galleria-image-nav-left:active,
.touch .galleria-image-nav-right:active {
  opacity: 1;
  filter: alpha(opacity=100);
}
.galleria-thumb-nav-left,
.galleria-thumb-nav-right {
  cursor: pointer;
  display: none;
  background-position: -495px 5px;
  position: absolute;
  left: 0;
  top: 0;
  height: 40px;
  width: 23px;
  z-index: 3;
  opacity: .8;
  filter: alpha(opacity=80);
}
.galleria-thumb-nav-right {
  background-position: -578px 5px;
  border-right: none;
  right: 0;
  left: auto;
}
.galleria-thumbnails-container .disabled {
  opacity: .2;
  filter: alpha(opacity=20);
  cursor: default;
}
.notouch .galleria-thumb-nav-left:hover,
.notouch .galleria-thumb-nav-right:hover {
  opacity: 1;
  filter: alpha(opacity=100);
  background-color: #111;
}
.touch .galleria-thumb-nav-left:active,
.touch .galleria-thumb-nav-right:active {
  opacity: 1;
  filter: alpha(opacity=100);
  background-color: #111;
}
.notouch .galleria-thumbnails-container .disabled:hover {
  opacity: .2;
  filter: alpha(opacity=20);
  background-color: transparent;
}

.galleria-carousel .galleria-thumb-nav-left,
.galleria-carousel .galleria-thumb-nav-right {
  display: block;
}
.galleria-thumb-nav-left,
.galleria-thumb-nav-right,
.galleria-info-link,
.galleria-info-close,
.galleria-image-nav-left,
.galleria-image-nav-right {
  background-image: url('classic-map.png');
  background-repeat: no-repeat;
}


text:
Ext.define('KitchenSink.view.ProfileSwitcher', {
    extend: 'Ext.Component',
    xtype: 'profileSwitcher',
    cls: 'ks-profile-switcher',

    readProfileInfo: function() {
        var profile = location.href.match(/profile=([\w\-]+)/),
            locale = location.href.match(/locale=([\w\-]+)/);

        profile = (profile && profile[1]) || (Ext.platformTags.phone ? 'modern-neptune' : 'triton');
        locale = locale && locale[1] || 'en';

        if (!Ext.profileName && !!profile) {
            var m = profile.match(/^([\w\-]+)-(?:he)$/);
            Ext.profileName = m ? m[1] : profile;
        }

        this.profile = profile;
        this.locale = locale;
    },

    setQueryParam: function(name, value, preserveHash) {
        var query = Ext.Object.fromQueryString(location.search),
            queryString;

        query[name] = value;

        queryString = Ext.Object.toQueryString(query);
        if (preserveHash) {
            location.search = queryString;
        } else {
            window.location = location.pathname + '?' + queryString;
        }
    },

    initComponent: function() {
        var me = this,
            menuItems = [],
            classicProfiles = {
                triton: 'Triton',
                neptune: 'Neptune',
                'neptune-touch': 'Neptune Touch',
                crisp: 'Crisp',
                'crisp-touch': 'Crisp Touch',
                classic: 'Classic',
                gray: 'Gray'
            },
            modernProfiles = {
                'modern-triton': 'Modern Triton',
                'modern-neptune': 'Modern Neptune',
                //blackberry: 'Blackberry',
                cupertino: 'Cupertino',
                mountainview: 'Mountain View',
                windows: 'Windows'
            },
            menu, profileId;

        me.readProfileInfo();

        function makeItem(value, text, paramName) {
            paramName = paramName || "profile";

            var checked = value === (paramName === "profile" ? me.profile : me.locale);

            return {
                text: text,
                group: (paramName === 'profile' ? 'profilegroup' : 'localegroup'),
                checked: checked,
                handler: function () {
                    if (!checked) {
                        if(paramName === 'profile') {
                            me.setQueryParam('profile', value, value in classicProfiles);
                        } else {
                            me.setQueryParam('locale', value);
                        }
                    }
                }
            };
        }

        for (profileId in classicProfiles) {
            menuItems.push(makeItem(profileId, classicProfiles[profileId]));
        }

        menuItems.push('-');

        for (profileId in modernProfiles) {
            menuItems.push(makeItem(profileId, modernProfiles[profileId]));
        }

        menuItems.push('-');

        menuItems.push(makeItem('en', 'English', 'locale'));
        menuItems.push(makeItem('he', 'Hebrew', 'locale'));

        menu = new Ext.menu.Menu({
            items: menuItems
        });

        this.on({
            scope: this,
            click: function (e) {
                menu.showBy(this);
            },
            element: 'el'
        });

        this.callParent();
    }
});


text:
@class ALAssetRepresentation;
@class ALAssetsLibrary;

@interface BOXAssetInputStream : NSInputStream <NSStreamDelegate>

- (instancetype)initWithAssetRepresentation:(ALAssetRepresentation *)assetRepresentation assetsLibrary:(ALAssetsLibrary *)assetsLibrary;

@end


text:
const enterExit = () => ({ scale: 0, opacity: 0 });

export const enter = enterExit;
export const exit = enterExit;

export const entered = () => ({ scale: 1, opacity: 1 });


text:
<?php
/**
 * Intreface DAO
 *
 * @author: http://phpdao.com
 * @date: 2015-10-31 12:43
 */
interface CategoriasDAO{

	/**
	 * Get Domain object by primry key
	 *
	 * @param String $id primary key
	 * @Return Categorias
	 */
	public function load($id);

	/**
	 * Get all records from table
	 */
	public function queryAll();

	/**
	 * Get all records from table ordered by field
	 * @Param $orderColumn column name
	 */
	public function queryAllOrderBy($orderColumn);

	/**
 	 * Delete record from table
 	 * @param categoria primary key
 	 */
	public function delete($id);

	/**
 	 * Insert record to table
 	 *
 	 * @param Categorias categoria
 	 */
	public function insert($categoria);

	/**
 	 * Update record in table
 	 *
 	 * @param Categorias categoria
 	 */
	public function update($categoria);

	/**
	 * Delete all rows
	 */
	public function clean();

	public function queryByNome($value);

	public function queryByDescricao($value);

	public function deleteByNome($value);

	public function deleteByDescricao($value);

}
?>


text:
                menu

Home

About Us

Gallery

Forum

Google Code-in 2017

cloud_downloadGet The Game!

Home

About Us

Gallery

Forum

Google Code-in 2017

cloud_downloadDownload


text:
class CourseSerializer < ActiveModel::Serializer
  attributes :name, :status
  belongs_to :client
  has_many :assignments
  has_many :students
  has_many :teachers
end


text:
import i18next from 'i18next';
import jqueryI18next from 'jquery-i18next';

import * as skillset from './modules/skillset';

'use strict';

var english = require(".././locales/en.json");
var german = require(".././locales/de.json");

var resources = {
  en: english,
  de: german
};

function initSmoothScrolling(){
  // Select all links with hashes
  $('a[href*="#"]')
    // Remove links that don't actually link to anything
    .not('[href="#"]')
    .not('[href="#0"]')
    .click(function(event) {
      // On-page links
      if (
        location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') &&
        location.hostname == this.hostname
      ) {
        // Figure out element to scroll to
        var target = $(this.hash);
        target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
        // Does a scroll target exist?
        if (target.length) {
          // Only prevent default if animation is actually gonna happen
          event.preventDefault();
          $('html, body').animate({
            scrollTop: target.offset().top
          }, 1000, function() {
            // Callback after animation
            // Must change focus!
            var $target = $(target);
            $target.focus();
            if ($target.is(":focus")) { // Checking if the target was focused
              return false;
            } else {
              $target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
              $target.focus(); // Set focus again
            }
          });
        }
      }
    });
}

function fadeInScrollTopButton(){
  if ($(window).scrollTop() > 250) {
    $('.back-to-top').fadeIn(400);
  } else {
    $('.back-to-top').fadeOut(400);
  }
}

var languageLookup = {
  "Deutsch": "de",
  "English": "en"
}

function switchLanguage(event){
  var target = $(event.target);
  // if($(event.target).hasClass("active"))
  //   return;
  $("#languages .language").removeClass("active");
  target.addClass("active");
  i18next.changeLanguage(languageLookup[target.text()]);
  $("[data-i18n]").localize();
}

function addLanguageSwitchHandler(){
  $("#languages .language").click(switchLanguage)
}

function initJqueryI18next(){
  i18next.init({
    lng: 'en',
    debug: true,
    resources: resources
  }, function(err, t) {
    // initialized and ready to go!
  });

  jqueryI18next.init(i18next, $, {
    tName: 't', // --> appends $.t = i18next.t
    i18nName: 'i18n', // --> appends $.i18n = i18next
    handleName: 'localize', // --> appends $(selector).localize(opts);
    selectorAttr: 'data-i18n', // selector for translating elements
    targetAttr: 'i18n-target', // data-() attribute to grab target element to translate (if diffrent then itself)
    optionsAttr: 'i18n-options', // data-() attribute that contains options, will load/set if useOptionsAttr = true
    useOptionsAttr: false, // see optionsAttr
    parseDefaultValueFromContent: true // parses default values from content ele.val or ele.text
  });
}

// DOM is ready
$(function(){
  initSmoothScrolling();
  initJqueryI18next();
  addLanguageSwitchHandler();
  skillset.init();
  $(window).scroll(fadeInScrollTopButton);
  $("#loader").removeClass("active");
});


text:
layout: default
---

  {% if page.video %}
    {% if page.video_youtube %}{% endif %}
    <video id="bg-video" preload="auto" autoplay="true" loop="loop" muted="muted" volume="0">
      {% if page.video_youtube %}{% endif %}
      {% if page.video_webm %}<source src="{{ page.video_webm }}" type="video/webm">{% endif %}
      {% if page.video_ogv %}<source src="{{ page.video_ogv }}" type="video/ogg ogv">{% endif %}
      {% if page.video_mp4 %}<source src="{{ page.video_mp4 }}" type="video/mp4">{% endif %}
    </video>
    {% if page.video_pattern %}

{% endif %}
  {% endif %}
  {{ content }}


text:
package com.linecorp.armeria.internal.common.grpc;

import static org.assertj.core.api.Assertions.assertThat;

import java.io.ByteArrayInputStream;
import java.util.stream.Stream;

import org.curioswitch.common.protobuf.json.MessageMarshaller;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

import com.linecorp.armeria.common.grpc.GrpcJsonMarshaller;
import com.linecorp.armeria.common.grpc.GrpcSerializationFormats;
import com.linecorp.armeria.common.grpc.protocol.DeframedMessage;
import com.linecorp.armeria.grpc.testing.Messages.SimpleRequest;
import com.linecorp.armeria.grpc.testing.Messages.SimpleResponse;
import com.linecorp.armeria.grpc.testing.TestServiceGrpc;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.ByteBufUtil;

class GrpcMessageMarshallerTest {

    private static Stream<GrpcJsonMarshaller> grpcJsonMarshallerStream() {
        final DefaultJsonMarshaller protobufJacksonJsonMarshaller =
                new DefaultJsonMarshaller(MessageMarshaller.builder()
                                                           .register(SimpleRequest.getDefaultInstance())
                                                           .register(SimpleResponse.getDefaultInstance())
                                                           .build());
        return Stream.of(protobufJacksonJsonMarshaller, GrpcJsonMarshaller.ofGson());
    }

    private static Stream<Arguments> jsonMarshallerArgs() {
        return grpcJsonMarshallerStream().map(Arguments::of);
    }

    static GrpcMessageMarshaller<SimpleRequest, SimpleResponse> messageMarshaller(
            GrpcJsonMarshaller grpcJsonMarshaller) {
        return new GrpcMessageMarshaller<>(ByteBufAllocator.DEFAULT,
                                           GrpcSerializationFormats.PROTO,
                                           TestServiceGrpc.getUnaryCallMethod(),
                                           grpcJsonMarshaller,
                                           false);
    }

    private static Stream<Arguments> messageMarshallerArgs() {
        return grpcJsonMarshallerStream().map(GrpcMessageMarshallerTest::messageMarshaller)
                                         .map(Arguments::of);
    }

    @ParameterizedTest
    @MethodSource("messageMarshallerArgs")
    void serializeRequest(GrpcMessageMarshaller<SimpleRequest, SimpleResponse> marshaller) throws Exception {
        final ByteBuf serialized = marshaller.serializeRequest(GrpcTestUtil.REQUEST_MESSAGE);
        assertThat(ByteBufUtil.getBytes(serialized))
                .containsExactly(GrpcTestUtil.REQUEST_MESSAGE.toByteArray());
        serialized.release();
    }

    @ParameterizedTest
    @MethodSource("messageMarshallerArgs")
    void deserializeRequest_byteBuf(GrpcMessageMarshaller<SimpleRequest, SimpleResponse> marshaller)
            throws Exception {
        final ByteBuf buf = ByteBufAllocator.DEFAULT.buffer(GrpcTestUtil.REQUEST_MESSAGE.getSerializedSize());
        assertThat(buf.refCnt()).isEqualTo(1);
        buf.writeBytes(GrpcTestUtil.REQUEST_MESSAGE.toByteArray());
        final SimpleRequest request = marshaller.deserializeRequest(new DeframedMessage(buf, 0), false);
        assertThat(request).isEqualTo(GrpcTestUtil.REQUEST_MESSAGE);
        assertThat(buf.refCnt()).isEqualTo(0);
    }

    @ParameterizedTest
    @MethodSource("jsonMarshallerArgs")
    void deserializeRequest_wrappedByteBuf(GrpcJsonMarshaller grpcJsonMarshaller) throws Exception {
        final GrpcMessageMarshaller<SimpleRequest, SimpleResponse> marshaller =
                new GrpcMessageMarshaller<>(ByteBufAllocator.DEFAULT,
                                            GrpcSerializationFormats.PROTO,
                                            TestServiceGrpc.getUnaryCallMethod(),
                                            grpcJsonMarshaller,
                                            true);
        final ByteBuf buf = ByteBufAllocator.DEFAULT.buffer(GrpcTestUtil.REQUEST_MESSAGE.getSerializedSize());
        assertThat(buf.refCnt()).isEqualTo(1);
        buf.writeBytes(GrpcTestUtil.REQUEST_MESSAGE.toByteArray());
        final SimpleRequest request = marshaller.deserializeRequest(new DeframedMessage(buf, 0), false);
        assertThat(request).isEqualTo(GrpcTestUtil.REQUEST_MESSAGE);
        assertThat(buf.refCnt()).isEqualTo(1);
        buf.release();
    }

    @ParameterizedTest
    @MethodSource("messageMarshallerArgs")
    void deserializeRequest_stream(GrpcMessageMarshaller<SimpleRequest, SimpleResponse> marshaller)
            throws Exception {
        final SimpleRequest request = marshaller.deserializeRequest(
                new DeframedMessage(new ByteArrayInputStream(GrpcTestUtil.REQUEST_MESSAGE.toByteArray()), 0),
                false);
        assertThat(request).isEqualTo(GrpcTestUtil.REQUEST_MESSAGE);
    }

    @ParameterizedTest
    @MethodSource("messageMarshallerArgs")
    void serializeResponse(GrpcMessageMarshaller<SimpleRequest, SimpleResponse> marshaller) throws Exception {
        final ByteBuf serialized = marshaller.serializeResponse(GrpcTestUtil.RESPONSE_MESSAGE);
        assertThat(ByteBufUtil.getBytes(serialized))
                .containsExactly(GrpcTestUtil.RESPONSE_MESSAGE.toByteArray());
        serialized.release();
    }

    @ParameterizedTest
    @MethodSource("messageMarshallerArgs")
    void deserializeResponse_bytebuf(GrpcMessageMarshaller<SimpleRequest, SimpleResponse> marshaller)
            throws Exception {
        final ByteBuf buf = ByteBufAllocator.DEFAULT.buffer(GrpcTestUtil.RESPONSE_MESSAGE.getSerializedSize());
        assertThat(buf.refCnt()).isEqualTo(1);
        buf.writeBytes(GrpcTestUtil.RESPONSE_MESSAGE.toByteArray());
        final SimpleResponse response = marshaller.deserializeResponse(new DeframedMessage(buf, 0), false);
        assertThat(response).isEqualTo(GrpcTestUtil.RESPONSE_MESSAGE);
        assertThat(buf.refCnt()).isEqualTo(0);
    }

    @ParameterizedTest
    @MethodSource("jsonMarshallerArgs")
    void deserializeResponse_wrappedByteBuf(GrpcJsonMarshaller grpcJsonMarshaller) throws Exception {
        final GrpcMessageMarshaller<SimpleRequest, SimpleResponse> marshaller =
                new GrpcMessageMarshaller<>(ByteBufAllocator.DEFAULT,
                                            GrpcSerializationFormats.PROTO,
                                            TestServiceGrpc.getUnaryCallMethod(),
                                            grpcJsonMarshaller,
                                            true);
        final ByteBuf buf = ByteBufAllocator.DEFAULT.buffer(GrpcTestUtil.RESPONSE_MESSAGE.getSerializedSize());
        assertThat(buf.refCnt()).isEqualTo(1);
        buf.writeBytes(GrpcTestUtil.RESPONSE_MESSAGE.toByteArray());
        final SimpleResponse response = marshaller.deserializeResponse(new DeframedMessage(buf, 0), false);
        assertThat(response).isEqualTo(GrpcTestUtil.RESPONSE_MESSAGE);
        assertThat(buf.refCnt()).isEqualTo(1);
        buf.release();
    }

    @ParameterizedTest
    @MethodSource("messageMarshallerArgs")
    void deserializeResponse_stream(GrpcMessageMarshaller<SimpleRequest, SimpleResponse> marshaller)
            throws Exception {
        final SimpleResponse response = marshaller.deserializeResponse(
                new DeframedMessage(new ByteArrayInputStream(GrpcTestUtil.RESPONSE_MESSAGE.toByteArray()), 0),
                false);
        assertThat(response).isEqualTo(GrpcTestUtil.RESPONSE_MESSAGE);
    }
}


text:
module GHTorrent
  module Commands
    module RepoUpdater

      include GHTorrent::Retriever
      include GHTorrent::Persister
      include GHTorrent::Logging

      def settings
        raise "Unimplemented"
      end

      def persister
        @persister ||= connect(:mongo, settings)
      end

      def db
        ght.db
      end

      def ght
        @ght ||= TransactedGHTorrent.new(settings)
      end

      def date(arg)
        if arg.class != Time
          Time.parse(arg)#.to_i
        else
          arg
        end
      end

      def set_deleted(owner, repo)
        db.from(:projects, :users).\
        where(:projects__owner_id => :users__id).\
        where(:users__login => owner).\
        where(:projects__name => repo).\
        update(:projects__deleted => true)
        info("Repo #{owner}/#{repo} marked as deleted")
      end

      def update_mysql(owner, repo, retrieved)

        parent = unless retrieved['parent'].nil?
                   ght.ensure_repo(retrieved['parent']['owner']['login'],
                                   retrieved['parent']['name'])
                 end

        db.from(:projects, :users).\
        where(:projects__owner_id => :users__id).\
        where(:users__login => owner).\
        where(:projects__name => repo).\
        update(:projects__url         => retrieved['url'],
               :projects__description => retrieved['description'],
               :projects__language    => retrieved['language'],
               :projects__created_at  => date(retrieved['created_at']),
               :projects__updated_at  => Time.now,
               :projects__forked_from => unless parent.nil? then parent[:id] end)
        info("Repo #{owner}/#{repo} updated")

        ght.ensure_languages(owner, repo)
      end

      def get_project_mysql(owner, repo)
        db.from(:projects, :users).\
        where(:projects__owner_id => :users__id).\
        where(:users__login => owner).\
        where(:projects__name => repo).first
      end

      def update_mongo(owner, repo, new_repo)
        r = persister.del(:repos, {'owner.login' => owner, 'name' => repo})
        persister.store(:repos, new_repo)
        if r > 0
          debug("Persister entry for repo #{owner}/#{repo} updated (#{r} records removed)")
        else
          debug("Added persister entry for repo #{owner}/#{repo}")
        end
      end

      def process_project(owner, name)
        in_mongo = persister.find(:repos, {'owner.login' => owner, 'name' => name })
        on_github = api_request(ghurl ("repos/#{owner}/#{name}"))

        ght.transaction do

          unless in_mongo.empty? and on_github.empty?
            in_mysql = get_project_mysql(owner, name)
          end

          if in_mongo.empty?
            if on_github.empty?
              if in_mysql.nil?
                # Project does not exist anywhere
                warn "Repo #{owner}/#{name} does not exist anywhere"
              else
                # Project exists in MySQL but not on Github or Mongo
                # Mark it as deleted
                set_deleted(owner, name)
              end
            else
              if in_mysql.nil?
                # Project does not exist in MySQL or Mongo, but exists on Github
                update_mysql(owner, name, on_github)
              else
                # Project does not exist in Mongo, but exists on Github and MySQL
                update_mongo(owner, name, on_github)
                update_mysql(owner, name, on_github)
                return # This is to avoid calling update_mongo again at the end
              end
            end
          else
            if on_github.empty?
              if in_mysql.nil?
                # noop
              else
                # Project deleted on Github, but exists in Mongo and Mysql
                set_deleted(owner, name)
              end
            else
              if in_mysql.nil?
                #
                update_mysql(owner, name, on_github)
              else
                # Project exists in Mongo, Mysql and Gitub
                update_mysql(owner, name, on_github)
              end
            end
          end
        end

        # Refresh MongoDb with the latest info from GitHub
        unless on_github.empty?
          update_mongo(owner, name, on_github)
        end
      end
    end
  end
end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
using Twilio;
using Twilio.TwiML;
using Microsoft.Framework.OptionsModel;

namespace TwilioMakeAndReceiveCalls.Controllers
{
    public class HomeController : Controller
    {

        private readonly IOptions<TwilioSettings> _twilioSettings;

        /*
          Twilio settings are injected via dependency injectio
        */
        public HomeController(IOptions<TwilioSettings> twilioSettings)
        {
            _twilioSettings = twilioSettings;
        }

        public IActionResult Index()
        {
            return View();

        }

        [HttpPost]
        public IActionResult MakeCall(string number)
        {
            var client = new TwilioRestClient(
              _twilioSettings.Options.AccountSid,
              _twilioSettings.Options.AuthToken
            );
            var results = client.InitiateOutboundCall(
              _twilioSettings.Options.MyOwnNumber,
              number, "http://www.televisiontunes.com/uploads/audio/Star%20Wars%20-%20The%20Imperial%20March.mp3");
            if (results.RestException != null)
            {
                return Content(results.RestException.Message);
            }
            return Content("The call has been is initiated");
        }

        [HttpGet]
        public IActionResult ReceiveCall()
        {
            var twiml = new TwilioResponse();
            twiml.Say("You are calling Marcos Placona").Dial(_twilioSettings.Options.MyOwnNumber);
            return Content(twiml.ToString());
        }

        public IActionResult Error()
        {
            return View("~/Views/Shared/Error.cshtml");
        }
    }
}


text:
set -o errexit
set -o nounset
set -o pipefail

SCRIPT_ROOT="$(dirname "${BASH_SOURCE[0]}")/.."

cd "${SCRIPT_ROOT}"

# Grab mockgen version from go.mod
MOCKGEN_VERSION=$(grep 'github.com/golang/mock' go.mod | awk '{print $2}')

if [[ ! $(mockgen -version) == "${MOCKGEN_VERSION}" ]]; then
  echo "You must use ${MOCKGEN_VERSION} mockgen version to run this script"
  echo "To install mockgen follow this doc: https://github.com/golang/mock/tree/main#installation"
  echo "Run 'mockgen -version' to check the installed version"
  exit 1
fi

echo "Generating v1beta1 Suggestion RPC Client..."
mockgen -package mock -destination pkg/mock/v1beta1/api/suggestion.go github.com/kubeflow/katib/pkg/apis/manager/v1beta1 SuggestionClient
echo "Generating v1beta1 EarlyStopping RPC Client..."
mockgen -package mock -destination pkg/mock/v1beta1/api/earlystopping.go github.com/kubeflow/katib/pkg/apis/manager/v1beta1 EarlyStoppingClient
echo "Generating v1beta1 KatibDBInterface..."
mockgen -package mock -destination pkg/mock/v1beta1/db/db.go github.com/kubeflow/katib/pkg/db/v1beta1/common KatibDBInterface
echo "Generating v1beta1 Generator..."
mockgen -package mock -destination pkg/mock/v1beta1/experiment/manifest/generator.go github.com/kubeflow/katib/pkg/controller.v1beta1/experiment/manifest Generator
echo "Generating v1beta1 KatibClient..."
mockgen -package mock -destination pkg/mock/v1beta1/util/katibclient/katibclient.go github.com/kubeflow/katib/pkg/util/v1beta1/katibclient Client
echo "Generating v1beta1 ManagerClient in Trial Controller..."
mockgen -package mock -destination pkg/mock/v1beta1/trial/managerclient/katibmanager.go github.com/kubeflow/katib/pkg/controller.v1beta1/trial/managerclient ManagerClient
echo "Generating v1beta1 Suggestion in Experiment Controller..."
mockgen -package mock -destination pkg/mock/v1beta1/experiment/suggestion/suggestion.go github.com/kubeflow/katib/pkg/controller.v1beta1/experiment/suggestion Suggestion
echo "Generating v1beta1 SuggestionClient in Suggestion Controller..."
mockgen -package mock -destination pkg/mock/v1beta1/suggestion/suggestionclient/suggestionclient.go github.com/kubeflow/katib/pkg/controller.v1beta1/suggestion/suggestionclient SuggestionClient


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

<title>de.uni_mannheim.informatik.swt.bibTexConverter.src.io</title>
<meta name="date" content="2012-09-29">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">

de.uni_mannheim.informatik.swt.bibTexConverter.src.io

Classes

Log


text:
html {
  height: 100%;
}

body {
  position: relative;
  margin: 0;
  padding-bottom: 50px;
  min-height: 100%;
}

.wrapper {
  margin: 0 auto;
}

.verticalClass {
  position: fixed;
}

.verticalClass .navbar {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  border-radius: 0;
  width: 200px;
  transition: all 0.5s ease-in-out;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 1001;
}

.verticalClass .navbar .container-fluid {
  padding: 0;
  margin: 0;
}

.verticalClass .navbar .container-fluid .navbar-collapse {
  padding: 0;
  margin: 0;
}

.verticalClass .navbar .container-fluid .navbar-brand {
  margin: 0 !important;
}

.verticalClass .navbar .container-fluid .collapse {
  display: block;
}

.verticalClass .navbar .container-fluid .navbar-nav {
  width: 100%;
  margin: 0;
  height: calc(100vh - 50px);
  overflow-y: auto;
}

.verticalClass .navbar .container-fluid .navbar-nav li {
  width: 100%;
}

.verticalClass .navbar .container-fluid .navbar-nav li a {
  padding: 15px 57px 15px 15px;
  line-height: 20px;
}

.verticalClass .navbar .container-fluid .navbar-nav li a span {
  position: absolute;
  top: 50%;
  right: 20px;
  margin-top: -11px;
  font-size: 22px;
}

.verticalClass .navbar .navbar-header {
  width: 100%;
  margin: 0;
}

.verticalClass .navbar .navbar-header .navbar-toggle {
  display: block;
  border-radius: 0;
  border: 0;
  position: absolute;
  top: 0;
  left: 210px;
}

.verticalClass.nav-closed {
  position: relative;
}

.verticalClass.nav-closed .navbar {
  margin-left: -200px;
}

.verticalClass.nav-closed .tab-content {
  margin-left: 0;
}

.verticalClass .tab-content .tab-pane .container-max-width {
  max-width: 1024px;
  margin: 0 auto;
}

.footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #f8f8f8;
  text-align: center;
}


text:
package com.capitalone.dashboard.model;

import org.springframework.data.mongodb.core.mapping.Document;

import javax.validation.constraints.NotNull;
import java.util.List;

@Document(collection = "gamification_metrics")
public class GamificationMetric extends BaseModel {

    @NotNull
    private String metricName;
    private String formattedName;
    private String symbol;
    private String description;
    private Boolean enabled;

    private List<GamificationScoringRange> gamificationScoringRanges;

    public List<GamificationScoringRange> getGamificationScoringRanges() {
        return gamificationScoringRanges;
    }

    public void setGamificationScoringRanges(List<GamificationScoringRange> gamificationScoringRanges) {
        this.gamificationScoringRanges = gamificationScoringRanges;
    }

    public String getMetricName() {
        return metricName;
    }

    public void setMetricName(String metricName) {
        this.metricName = metricName;
    }

    public String getFormattedName() {
        return formattedName;
    }

    public void setFormattedName(String formattedName) {
        this.formattedName = formattedName;
    }

    public String getSymbol() {
        return symbol;
    }

    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    @Override
    public int hashCode() {
        return this.getId() != null ? this.getId().hashCode() : 0;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        GamificationMetric other = (GamificationMetric) obj;
        return other.metricName.equals(this.metricName) && other.getId().equals(this.getId());
    }
}


text:
using WebKit::WebDatabase;

namespace content {
namespace {

const int kResultHistogramSize = 50;
const int kCallsiteHistogramSize = 10;

int DetermineHistogramResult(int websql_error, int sqlite_error) {
  // If we have a sqlite error, log it after trimming the extended bits.
  // There are 26 possible values, but we leave room for some new ones.
  if (sqlite_error)
    return std::min(sqlite_error & 0xff, 30);

  // Otherwise, websql_error may be an SQLExceptionCode, SQLErrorCode
  // or a DOMExceptionCode, or -1 for success.
  if (websql_error == -1)
    return 0;  // no error

  // SQLExceptionCode starts at 1000
  if (websql_error >= 1000)
    websql_error -= 1000;

  return std::min(websql_error + 30, kResultHistogramSize - 1);
}

#define HISTOGRAM_WEBSQL_RESULT(name, database, callsite, \
                                websql_error, sqlite_error) \
  do { \
    DCHECK(callsite < kCallsiteHistogramSize); \
    int result = DetermineHistogramResult(websql_error, sqlite_error); \
    if (database.isSyncDatabase()) { \
      UMA_HISTOGRAM_ENUMERATION("websql.Sync." name, \
                                result, kResultHistogramSize); \
      if (result) { \
        UMA_HISTOGRAM_ENUMERATION("websql.Sync." name ".ErrorSite", \
                                  callsite, kCallsiteHistogramSize); \
      } \
    } else { \
      UMA_HISTOGRAM_ENUMERATION("websql.Async." name, \
                                result, kResultHistogramSize); \
      if (result) { \
        UMA_HISTOGRAM_ENUMERATION("websql.Async." name ".ErrorSite", \
                                  callsite, kCallsiteHistogramSize); \
      } \
    } \
  } while (0)

}  // namespace

WebDatabaseObserverImpl::WebDatabaseObserverImpl(
    IPC::SyncMessageFilter* sender)
    : sender_(sender),
      open_connections_(new webkit_database::DatabaseConnectionsWrapper) {
  DCHECK(sender);
}

WebDatabaseObserverImpl::~WebDatabaseObserverImpl() {
}

void WebDatabaseObserverImpl::databaseOpened(
    const WebDatabase& database) {
  std::string origin_identifier =
      database.securityOrigin().databaseIdentifier().utf8();
  string16 database_name = database.name();
  open_connections_->AddOpenConnection(origin_identifier, database_name);
  sender_->Send(new DatabaseHostMsg_Opened(
      origin_identifier, database_name,
      database.displayName(), database.estimatedSize()));
}

void WebDatabaseObserverImpl::databaseModified(
    const WebDatabase& database) {
  sender_->Send(new DatabaseHostMsg_Modified(
      database.securityOrigin().databaseIdentifier().utf8(), database.name()));
}

void WebDatabaseObserverImpl::databaseClosed(
    const WebDatabase& database) {
  std::string origin_identifier =
      database.securityOrigin().databaseIdentifier().utf8();
  string16 database_name = database.name();
  sender_->Send(new DatabaseHostMsg_Closed(
      origin_identifier, database_name));
  open_connections_->RemoveOpenConnection(origin_identifier, database_name);
}

void WebDatabaseObserverImpl::reportOpenDatabaseResult(
    const WebDatabase& database, int callsite, int websql_error,
    int sqlite_error) {
  HISTOGRAM_WEBSQL_RESULT("OpenResult", database, callsite,
                          websql_error, sqlite_error);
  HandleSqliteError(database, sqlite_error);
}

void WebDatabaseObserverImpl::reportChangeVersionResult(
    const WebDatabase& database, int callsite, int websql_error,
    int sqlite_error) {
  HISTOGRAM_WEBSQL_RESULT("ChangeVersionResult", database, callsite,
                          websql_error, sqlite_error);
  HandleSqliteError(database, sqlite_error);
}

void WebDatabaseObserverImpl::reportStartTransactionResult(
    const WebDatabase& database, int callsite, int websql_error,
    int sqlite_error) {
  HISTOGRAM_WEBSQL_RESULT("BeginResult", database, callsite,
                          websql_error, sqlite_error);
  HandleSqliteError(database, sqlite_error);
}

void WebDatabaseObserverImpl::reportCommitTransactionResult(
    const WebDatabase& database, int callsite, int websql_error,
    int sqlite_error) {
  HISTOGRAM_WEBSQL_RESULT("CommitResult", database, callsite,
                          websql_error, sqlite_error);
  HandleSqliteError(database, sqlite_error);
}

void WebDatabaseObserverImpl::reportExecuteStatementResult(
    const WebDatabase& database, int callsite, int websql_error,
    int sqlite_error) {
  HISTOGRAM_WEBSQL_RESULT("StatementResult", database, callsite,
                          websql_error, sqlite_error);
  HandleSqliteError(database, sqlite_error);
}

void WebDatabaseObserverImpl::reportVacuumDatabaseResult(
    const WebDatabase& database, int sqlite_error) {
  int result = DetermineHistogramResult(-1, sqlite_error);
  if (database.isSyncDatabase()) {
    UMA_HISTOGRAM_ENUMERATION("websql.Sync.VacuumResult",
                              result, kResultHistogramSize);
  } else {
    UMA_HISTOGRAM_ENUMERATION("websql.Async.VacuumResult",
                              result, kResultHistogramSize);
  }
  HandleSqliteError(database, sqlite_error);
}

void WebDatabaseObserverImpl::WaitForAllDatabasesToClose() {
  open_connections_->WaitForAllDatabasesToClose();
}

void WebDatabaseObserverImpl::HandleSqliteError(
    const WebDatabase& database, int error) {
  // We filter out errors which the backend doesn't act on to avoid
  // a unnecessary ipc traffic, this method can get called at a fairly
  // high frequency (per-sqlstatement).
  if (error == SQLITE_CORRUPT || error == SQLITE_NOTADB) {
    sender_->Send(new DatabaseHostMsg_HandleSqliteError(
        database.securityOrigin().databaseIdentifier().utf8(),
        database.name(),
        error));
  }
}

}  // namespace content


text:
// Copyright (c) Aghyad khlefawi. All rights reserved.
// Licensed under the MIT License. See LICENSE file in the project root for full license information.

using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows.Controls;

namespace Coddee.WPF.Controls
{
    /// <summary>
    /// Base class for Coddee controls.
    /// </summary>
    public class CoddeeControl : Control,INotifyPropertyChanged
    {
        static CoddeeControl()
        {
            if (WPFApplication.Current != null)
                _container = WPFApplication.Current.GetContainer();
        }

        /// <summary>
        /// Application dependency container.
        /// </summary>
        protected static readonly IContainer _container;

        /// <inheritdoc />
        public event PropertyChangedEventHandler PropertyChanged;

        /// <summary>
        /// Raises the <see cref="PropertyChanged"/> event.
        /// </summary>
        /// <param name="propertyName"></param>
        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}


text:
using System;

using AutoMapper;

using Moq;
using NUnit.Framework;

using Parser.Common.Contracts;
using Parser.Common.Providers;

namespace Parser.Common.Tests.ProvidersTests.ObjectMapperProviderTests
{
    [TestFixture]
    public class Constructor_Should
    {
        [Test]
        public void CreateCorrectIObjectMapperProviderInstance_WhenParametersAreValid()
        {
            // Arrange
            var mapper = new Mock<IMapper>();

            // Act
            var actualInstance = new ObjectMapperProvider(mapper.Object);

            // Assert
            Assert.That(actualInstance, Is.Not.Null);
            Assert.That(actualInstance, Is.InstanceOf<IObjectMapperProvider>());
        }

        [Test]
        public void ThrowArgumentNullException_WhenIMapperParameterIsNull()
        {
            // Arrange
            IMapper mapper = null;

            // Act & Assert
            Assert.That(
                () => new ObjectMapperProvider(mapper),
                Throws.InstanceOf<ArgumentNullException>().With.Message.Contains(nameof(IMapper)));
        }
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

  <title>standard.lib.face.FaceRecognize</title>
  <link href="css/style.css" rel="stylesheet" type="text/css">
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >

    Concept Framework 2.2 documentation
  	Contents | Index

standard.lib.face.FaceRecognize

     Name
     Version
     Deprecated

     FaceRecognize
     version 2
     no

Prototype:

number FaceRecognize(string source, array trainig_data[, var number confidence, number type=OBJECT_FILE|OBJECT_CAMERA|OBJECT_BUFFER,  string training_filename="", var number out_handle=null]);

Description:

Recognizes a face and returns its index. training_data must be an array of files in type format (file or streams). If training filename is specified and training_data is an empty array, the training data will be loaded from that file. If training_data is not empty, the training data will be saved to that file.

out_handle caches all the used vectors, and you should use it only when heavy processing is done. Just pass a named variable to hold the vectors, and call CloseRecognize on it when you're done.

Example:

		var arr2=["out/out0.png", "out/out1.png", "out/out2.png"];
		echo FaceRecognize("out/out3.png", arr2, var coef, OBJECT_FILE, "", var container);
		echo "($coef)";
		CloseRecognize(container);

Returns:

Most probabile face.

Documented by Devronium Autodocumenter Alpha, generation time: Sun Jan 27 18:15:35 2013
 GMT	(c)2013 Devronium Applications


text:
<?php

/**
 * All kind of statistics about the site
 *
 * @package statistics
 * @version 0.7.0
 * @author Feliz Team
 * @copyright Copyright (c) Feliz Team 2008-2014
 * @license BSD
 */

defined('COT_CODE') or die('Wrong URL');


text:
using System;
using System.Threading;
using System.Runtime.InteropServices;

class Test {
	delegate int SimpleDelegate (int a);

	static int cb_state = 0;

	static int F (int a) {
		Console.WriteLine ("Test.F from delegate: " + a);
		throw new NotImplementedException ();
	}

	static void async_callback (IAsyncResult ar)
	{
		Console.WriteLine ("Async Callback " + ar.AsyncState);
		cb_state = 1;
		throw new NotImplementedException ();
	}

	static int Main () {
		SimpleDelegate d = new SimpleDelegate (F);
		AsyncCallback ac = new AsyncCallback (async_callback);
		string state1 = "STATE1";
		int res = 0;

		IAsyncResult ar1 = d.BeginInvoke (1, ac, state1);

		ar1.AsyncWaitHandle.WaitOne ();

		try {
			res = d.EndInvoke (ar1);
		} catch (NotImplementedException) {
			res = 1;
			Console.WriteLine ("received exception ... OK");
		}

		while (cb_state == 0)
			Thread.Sleep (0);

		if (cb_state != 1)
			return 1;

		if (res != 1)
			return 2;

		return 0;
	}
}


text:
// ************************************
// KL 27 Mar 2016 add testing for mapUtils as strict RPC is coming in
// ************************************

package main

import (
	"encoding/json"
	"fmt"
	"reflect"
	"strings"
	"testing"
	"time"
)

var samplesStartLine = 36

var testsamples = `
{
    "event1": {
        "assetID": "ASSET001",
        "carrier": "UPS",
        "extension": {
            "arr": ["s1", "s2", "s3"]
        },
        "location": {
        },
        "temperature": 123.456,
        "timestamp": "2016-03-17T01:51:23.51620144Z"
    },
    "event2": {
        "AssetID": "ASSET001",
        "carrier": "UPS",
        "extension": {
            "arrint": [1, 2]
        },
        "location": {
            "latitude": 123.456
        },
        "Temperature": 123.456,
        "timestamp": "2016-03-17T01:51:23.51620144Z"
    },
    "event3": {
        "assetid": "ASSET001",
        "carrier": "UPS",
        "extension": {
            "arr": []
        },
        "location": {
            "longitude": 123.456
        },
        "tEmperature": 123.456,
        "timestamp": "2016-03-17T01:51:23.51620144Z"
    }
}`

var testparm1 = `
{
    "assetID": "ASSET001",
    "carrier": "UPS",
    "temperature": 2.2,
    "integer": 2,
    "bool": true,
	"sarr": ["a","b"],
	"aa" : {
		"bb" : {
			"cc" : "d"
		}
	}
}`

func printUnmarshalError(js string, err interface{}) {
	syntax, ok := err.(*json.SyntaxError)
	if !ok {
		fmt.Println("*********** ERR trying to get syntax error location **************\n", err)
		return
	}

	start, end := strings.LastIndex(js[:syntax.Offset], "\n")+1, len(js)
	if idx := strings.Index(js[start:], "\n"); idx >= 0 {
		end = start + idx
	}

	line, pos := strings.Count(js[:start], "\n"), int(syntax.Offset)-start-1
	// note, the offset here is the line number in this file
	// of the test samples json string definition (it happens to work out)
	fmt.Printf("Error in line %d: %s \n", line+samplesStartLine, err)
	fmt.Printf("%s\n%s^\n\n", js[start:end], strings.Repeat(" ", pos))
}

func getTestObjects(t *testing.T) map[string]interface{} {
	var o interface{}
	err := json.Unmarshal([]byte(testsamples), &o)
	if err != nil {
		printUnmarshalError(testsamples, err)
		t.Fatalf("unmarshal test samples failed: %s", err)
	} else {
		omap, found := o.(map[string]interface{})
		if found {
			return omap
		}
		t.Fatalf("test samples not map shape, is: %s", reflect.TypeOf(o))
	}
	return make(map[string]interface{})
}

func getTestParms(t *testing.T) interface{} {
	var o interface{}
	err := json.Unmarshal([]byte(testparm1), &o)
	if err != nil {
		printUnmarshalError(testsamples, err)
		t.Fatalf("unmarshal test samples failed: %s", err)
	}
	return o
}

func TestContains(t *testing.T) {
	t.Log("Enter TestContains")
	o := getTestObjects(t)
	ev1, found := getObject(o, "event1.extension.arr")
	if !found {
		t.Fatal("event1.extension.arr not found")
	}
	if !contains(ev1, "s2") {
		t.Fatal("event1.extension.arr should contain s2")
	}
	if contains(ev1, "s6") {
		t.Fatal("event1.extension.arr should not contain s6")
	}
	ev2, found := getObject(o, "event2.extension.arrint")
	if !found {
		t.Fatal("event2.extension.arrint not found")
	}
	// for the next 2, remember that JSON unmarshals numbers as float64
	if !contains(ev2, float64(2)) {
		t.Fatal("event2.extension.arr should contain 2")
	}
	if contains(ev2, float64(3)) {
		t.Fatal("event2.extension.arr should not contain 3")
	}
	ev3, found := getObject(o, "event3.extension.arr")
	if !found {
		t.Fatal("event3.extension.arr not found")
	}
	if contains(ev3, "s2") {
		t.Fatal("event2.extension.arr should not contain s2")
	}
}

func TestDeepMerge(t *testing.T) {
	t.Log("Enter TestDeepMerge")
	o := getTestObjects(t)
	ev1, found := getObject(o, "event1")
	if !found {
		t.Fatal("event1 not found")
	}
	ev2, found := getObject(o, "event2")
	if !found {
		t.Fatal("event2 not found")
	}
	ev3, found := getObject(o, "event3")
	if !found {
		t.Fatal("event3 not found")
	}
	state1 := ev1
	//fmt.Printf("*** State1: %s\n", prettyPrint(state1))
	_, found = getObject(state1, "location.latitude")
	if found {
		t.Fatal("state1.location should not contain latitude")
	}
	_, found = getObject(state1, "location.longitude")
	if found {
		t.Fatal("state1.location should not contain longitude")
	}
	state2 := deepMerge(ev2, state1)
	//fmt.Printf("*** State2: %s\n", prettyPrint(state2))
	_, found = getObject(state1, "location.latitude")
	if !found {
		t.Fatal("state2.location should contain latitude")
	}
	_, found = getObject(state1, "location.longitude")
	if found {
		t.Fatal("state2.location should not contain longitude")
	}
	state3 := deepMerge(ev3, state2)
	//fmt.Printf("*** State3: %s\n", prettyPrint(state3))
	_, found = getObject(state3, "location.latitude")
	if !found {
		t.Fatal("state2.location should contain latitude")
	}
	_, found = getObject(state3, "location.longitude")
	if !found {
		t.Fatal("state3.location should contain longitude")
	}
}

func TestParms(t *testing.T) {
	fmt.Println("Enter TestContains")
	o := getTestParms(t)
	_, found := getObject(o, "assetID")
	if !found {
		t.Fatal("assetID not found")
	}
}

func TestArgsMap(t *testing.T) {
	fmt.Println("Enter TestArgsMap")
	o := getTestParms(t)
	var a ArgsMap = o.(map[string]interface{})
	_, found := getObject(a, "assetID")
	if !found {
		t.Fatal("assetID not found")
	}
}

func TestGetByType(t *testing.T) {
	fmt.Println("Enter TestByType")
	o := getTestParms(t)
	_, found := getObjectAsString(o, "assetID")
	if !found {
		t.Fatal("typeof assetID should be string")
	}

	_, found = getObjectAsStringArray(o, "sarr")
	if !found {
		t.Fatalf("typeof sarr should be []string")
	}

	_, found = getObjectAsNumber(o, "temperature")
	if !found {
		t.Fatal("typeof temperature should be number")
	}

	_, found = getObjectAsInteger(o, "temperature")
	if !found {
		t.Fatal("type of temperature should be integer")
	}

	_, found = getObjectAsInteger(o, "integer")
	if !found {
		t.Fatal("typeof integer should be integer")
	}

	_, found = getObjectAsMap(o, "aa")
	if !found {
		t.Fatal("typeof aa should be map")
	}
}

func TestPutObject(t *testing.T) {
	fmt.Println("Enter TestPutObject")
	o := getTestParms(t)

	fmt.Printf("Object before: %+v\n\n", o)

	o, ok := putObject(o, "time", time.Now())
	if !ok {
		t.Fatal("could not put time")
	}

	o, ok = putObject(o, "anInt", 1)
	if !ok {
		t.Fatal("could not put anInt")
	}

	o, ok = putObject(o, "aFloat", 1.567)
	if !ok {
		t.Fatal("could not put aFloat")
	}

	i, found := getObjectAsInteger(o, "anInt")
	if !found {
		t.Fatal("anInt not an integer")
	}
	fmt.Println("anInt: ", i, " TypeOF i: ", reflect.TypeOf(i))

	n, found := getObjectAsNumber(o, "aFloat")
	if !found {
		t.Fatal("aFloat not a float")
	}
	fmt.Println("aFloat: ", n, " TypeOF n: ", reflect.TypeOf(n))

	o, ok = putObject(o, "maintenance.status", "inventory")
	if !ok {
		t.Fatal("could not put maintenance.status")
	}

	o, ok = putObject(o, "a.b.c.d.lastmaplevel.status", "installed")
	if !ok {
		t.Fatal("could not put a.b.c.d.lastmaplevel.status")
	}

	fmt.Printf("Object after: %+v\n\n", o)

}

func TestRemoveObject(t *testing.T) {
	fmt.Println("Enter TestRemoveObject")
	o := getTestParms(t)

	fmt.Printf("Object before: %+v\n\n", o)

	o, ok := removeObject(o, "assetID")
	if !ok {
		t.Fatal("could not remove assetID")
	}

	o, ok = removeObject(o, "carrier")
	if !ok {
		t.Fatal("could not remove carrier")
	}

	o, ok = removeObject(o, "aa.bb.cc")
	if !ok {
		t.Fatal("could not remove aa.bb.cc")
	}

	fmt.Printf("Object after removal of aa.bb.cc: %+v\n\n", o)

	o, ok = removeObject(o, "aa")
	if !ok {
		t.Fatal("could not remove aa")
	}

	fmt.Printf("Object after: %+v\n\n", o)
}

func TestAsStringArray(t *testing.T) {
	fmt.Println("Enter TestAsStringArray")

	s, ok := asStringArray([]string{"a"})
	if !ok {
		t.Fatal("could convert []string{'a'} to string array")
	}
	fmt.Printf("TestAsStringArray: conversion of []string{'a'} created %#v\n", s)

	_, ok = asStringArray([]int{2, 3, 4})
	if ok {
		t.Fatal("converted []int{2, 3, 4} to string array, how?")
	}

	s, ok = asStringArray("astring")
	if !ok {
		t.Fatal("failed to convert 'astring' to string array")
	}
	fmt.Printf("TestAsStringArray: conversion of 'astring' created %#v\n", s)

	s, ok = asStringArray(`["a", "b", "c"]`)
	if !ok {
		t.Fatal("failed to convert JSON a,b,c to string array")
	}
	fmt.Printf("TestAsStringArray: conversion of JSON array ['a', 'b', 'c'] created %#v\n", s)
}

func TestAddToStringArray(t *testing.T) {
	fmt.Println("Enter TestAddToStringArray")
	o := getTestParms(t)

	fmt.Printf("Object before: %+v\n\n", o)

	o, ok := addToStringArray(o, "sarr", []string{"d", "b", "c"})
	if !ok {
		t.Fatal("could not merge [d,b,c] into sarr")
	}
	fmt.Printf("Object d,b,c added: %+v\n\n", o)

	o, ok = addToStringArray(o, "unknown", []string{"unk"})
	if !ok {
		t.Fatal("could not add new array unknown : [unk]")
	}
	r, ok := getObjectAsStringArray(o, "unknown")
	if ok {
		if r[0] != "unk" {
			t.Fatal("o[unknown] != unk")
		}
	} else {
		t.Fatal("o[unknown] is missing")
	}
	fmt.Printf("Object unkown added: %+v\n\n", o)

	o, ok = addToStringArray(o, "sarr", "astring")
	if !ok {
		t.Fatal("could not merge 'astring' into sarr")
	}
	fmt.Printf("Object astring added: %+v\n\n", o)

	fmt.Printf("Object after: %+v\n\n", o)

	// next one destroys o
	o, ok = addToStringArray("", "sarr", "astring")
	if ok {
		t.Fatal("passed in string instead of map, but it did not fail")
	}

	fmt.Printf("Object after destruction by not checking for nil: %+v\n\n", o)

}

func TestRemoveFromStringArray(t *testing.T) {
	fmt.Println("Enter TestRemoveFromStringArray")
	o := getTestParms(t)

	fmt.Printf("Object before: %+v\n\n", o)

	o, ok := removeFromStringArray(o, "sarr", []string{"d", "b", "c"})
	if !ok {
		t.Fatal("could not remove [d,b,c] from sarr")
	}
	if test, ok := getObjectAsStringArray(o, "sarr"); !ok {
		t.Fatal("sarr is missing from test data")
	} else {
		if len(test) != 1 {
			t.Fatal("sarr should just contain one entry")
		}
	}

	o, ok = removeFromStringArray(o, "unknown", []string{"unk"})
	if ok {
		t.Fatal("successfully removed non-existent entry from unknown : [unk]")
	}

	o, ok = removeFromStringArray(o, "sarr", "a")
	if !ok {
		t.Fatal("could not remove 'a' from sarr")
	}
	if test, ok := getObjectAsStringArray(o, "sarr"); !ok {
		t.Fatal("sarr is missing from test data")
	} else {
		if len(test) > 0 {
			t.Fatal("sarr should be empty")
		}
	}

	fmt.Printf("Object after: %+v\n\n", o)

}


text:
#ifndef CAFFE_ELTWISE_LAYER_HPP_
#define CAFFE_ELTWISE_LAYER_HPP_

#include <vector>

#include "../layer.hpp"

namespace caffe {

/**
 * @brief Compute elementwise operations, such as product and sum,
 *        along multiple input Blobs.
 *
 * TODO(dox): thorough documentation for Forward, Backward, and proto params.
 */
class EltwiseLayer : public Layer {
 public:
  explicit EltwiseLayer(const LayerParameter& param)
      : Layer(param) {}
  virtual void LayerSetUp(const vector<Blob*>& bottom,
                          const vector<Blob*>& top);
  virtual void Reshape(const vector<Blob*>& bottom,
                       const vector<Blob*>& top);

  virtual const char* type() const { return "Eltwise"; }
  virtual int MinBottomBlobs() const { return 2; }
  virtual int ExactNumTopBlobs() const { return 1; }

 protected:
  virtual void Forward_cpu(const vector<Blob*>& bottom,
      const vector<Blob*>& top);
  virtual void Forward_gpu(const vector<Blob*>& bottom,
      const vector<Blob*>& top);

  EltwiseParameter_EltwiseOp op_;
  vector<real_t> coeffs_;

  bool stable_prod_grad_;
};

}  // namespace caffe

#endif  // CAFFE_ELTWISE_LAYER_HPP_


text:
<Type Name="SoapTypeAttribute" FullName="System.Xml.Serialization.SoapTypeAttribute">
  <TypeSignature Maintainer="auto" Language="C#" Value="public class SoapTypeAttribute : Attribute" />
  <AssemblyInfo>
    <AssemblyName>System.Xml</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey>
    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadSafetyStatement>To be added</ThreadSafetyStatement>
  <Base>
    <BaseTypeName>System.Attribute</BaseTypeName>
  </Base>
  <Interfaces />
  <Attributes>
    <Attribute>
      <AttributeName>System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Enum | System.AttributeTargets.Interface)</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    To be added
    <remarks>To be added</remarks>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public SoapTypeAttribute ();" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters />
      <Docs>
        To be added
        <remarks>To be added</remarks>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public SoapTypeAttribute (string typeName);" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters>
        <Parameter Name="typeName" Type="System.String" />
      </Parameters>
      <Docs>
        <param name="typeName">To be added: an object of type 'string'</param>
        To be added
        <remarks>To be added</remarks>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public SoapTypeAttribute (string typeName, string ns);" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters>
        <Parameter Name="typeName" Type="System.String" />
        <Parameter Name="ns" Type="System.String" />
      </Parameters>
      <Docs>
        <param name="typeName">To be added: an object of type 'string'</param>
        <param name="ns">To be added: an object of type 'string'</param>
        To be added
        <remarks>To be added</remarks>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="IncludeInSchema">
      <MemberSignature Language="C#" Value="public bool IncludeInSchema { set; get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        To be added
        <value>To be added: an object of type 'bool'</value>
        <remarks>To be added</remarks>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="Namespace">
      <MemberSignature Language="C#" Value="public string Namespace { set; get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        To be added
        <value>To be added: an object of type 'string'</value>
        <remarks>To be added</remarks>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="TypeName">
      <MemberSignature Language="C#" Value="public string TypeName { set; get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        To be added
        <value>To be added: an object of type 'string'</value>
        <remarks>To be added</remarks>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
  </Members>
</Type>


text:
-- MySQL dump 10.13  Distrib 5.1.61, for redhat-linux-gnu (x86_64)
--
-- Host: mysql-eg-enaprod.ebi.ac.uk    Database: ensembl_compara_family_test
-- ------------------------------------------------------
-- Server version	5.5.36-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `constrained_element`
--

DROP TABLE IF EXISTS `constrained_element`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `constrained_element` (
  `constrained_element_id` bigint(20) unsigned NOT NULL,
  `dnafrag_id` bigint(20) unsigned NOT NULL,
  `dnafrag_start` int(12) unsigned NOT NULL,
  `dnafrag_end` int(12) unsigned NOT NULL,
  `dnafrag_strand` int(2) DEFAULT NULL,
  `method_link_species_set_id` int(10) unsigned NOT NULL,
  `p_value` double DEFAULT NULL,
  `score` double NOT NULL DEFAULT '0',
  KEY `dnafrag_id` (`dnafrag_id`),
  KEY `constrained_element_id_idx` (`constrained_element_id`),
  KEY `mlssid_idx` (`method_link_species_set_id`),
  KEY `mlssid_dfId_dfStart_dfEnd_idx` (`method_link_species_set_id`,`dnafrag_id`,`dnafrag_start`,`dnafrag_end`),
  KEY `mlssid_dfId_idx` (`method_link_species_set_id`,`dnafrag_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 CHECKSUM=1;
/*!40101 SET character_set_client = @saved_cs_client */;

/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2014-09-02 11:17:21


text:
module EasyAWS
  module CloudFormation
    class Template
      class Parameter
        include EasyAWS::ParameterizedInitializer

        TYPES = [:string, :number, :list]
        TYPES_MAP = {string: 'String', number: 'Number', list: 'CommaDelimitedList'}

        attr_accessor :name, :type

        FIELDS_MAP = [:description, :default, :no_echo, :allowed_values, :allowed_pattern,
          :min_length, :max_length, :min_value, :max_value, :constraint_description].each_with_object({}) {|s, h|
            attr_accessor s
            h[s] = s.to_s.camelize
        }

        def to_h
          FIELDS_MAP.each_with_object('Type' => TYPES_MAP[type]) do |(method, key), h|
            if v = self.send(method)
              h[key] = v
            end
          end
        end

        class Collection < Array
          def add(name, type, options = {})
            Parameter.new(options.merge({name: name, type: type})).tap { |parameter| push parameter }
          end

          # define helper methods 'string()', 'number()', 'list()'
          Parameter::TYPES.each {|type|
            module_eval <<-EOF
              def #{type}(name, options = {}, &block)
                parameter = add(name, :#{type}, options)
                DSLBlock.eval_using(parameter, block) if block_given?
                parameter
              end
            EOF
          }

          def to_h
            each_with_object({}) {|parameter, h| h[parameter.name] = parameter.to_h }
          end
        end

      end
    end
  end
end


text:
module.exports = require('../../../../../../../').definePreCondition({
  name: '',  // optional, default is file name without extension
  payload: '', // if not defined it will use what is defined as default in aggregate or pass the whole command...
  description: 'authorization',
  priority: 1 // optional, default Infinity, all pre-conditions will be sorted by this value
}, function (command, agg, callback) {
  if (command.notAuthorized) {
    return callback('not authorized');
    // or
    // return callback(new Error('not authorized'));
    // or
    // return callback(new Error()); // if no error message is defined then the description will be taken
  }
  callback(null);
});


text:
package com.intellij.openapi.editor.colors;

import com.intellij.openapi.editor.markup.TextAttributes;
import com.intellij.openapi.options.FontSize;
import consulo.ui.color.ColorValue;
import consulo.util.pointers.Named;
import org.jdom.Element;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.awt.*;
import java.util.Map;

public interface EditorColorsScheme extends Cloneable, TextAttributesScheme, Named {
  String DEFAULT_SCHEME_NAME = "Default";

  void setName(String name);

  void setAttributes(TextAttributesKey key, TextAttributes attributes);

  @Nonnull
  ColorValue getDefaultBackground();

  @Nonnull
  ColorValue getDefaultForeground();

  @Nullable
  ColorValue getColor(EditorColorKey key);

  void setColor(EditorColorKey key, ColorValue color);

  void fillColors(Map<EditorColorKey, ColorValue> colors);

  /**
   * The IDE has allowed to configure only a single font family for a while. However, that doesn't handle a situation when
   * that font family is unable to display particular char - fallback font family was chosen randomly from the whole collection
   * of all registered fonts.
   * <p>
   * Now it's possible to specify more than one font, i.e. directly indicated 'fallback fonts sequence' (see {@link FontPreferences}).
   * However, old single font-based API is still here in order to preserve backward compatibility ({@link #getEditorFontName()} and
   * {@link #getEditorFontSize()}). I.e. those methods are just re-written in order to use {@link FontPreferences} object exposed
   * by this method.
   *
   * @return font preferences to use
   */
  @Nonnull
  FontPreferences getFontPreferences();

  void setFontPreferences(@Nonnull FontPreferences preferences);

  String getEditorFontName();

  void setEditorFontName(String fontName);

  int getEditorFontSize();

  /**
   * @return editor font size with scaling
   */
  int getEditorFontSize(boolean scale);

  void setEditorFontSize(int fontSize);

  FontSize getQuickDocFontSize();

  void setQuickDocFontSize(@Nonnull FontSize fontSize);

  Font getFont(EditorFontType key);

  void setFont(EditorFontType key, Font font);

  float getLineSpacing();

  void setLineSpacing(float lineSpacing);

  EditorColorsScheme clone();

  /**
   * @return console font preferences to use
   * @see #getFontPreferences()
   */
  @Nonnull
  FontPreferences getConsoleFontPreferences();

  void setConsoleFontPreferences(@Nonnull FontPreferences preferences);

  String getConsoleFontName();

  void setConsoleFontName(String fontName);

  /**
   * @return console font size with scaling
   */
  int getConsoleFontSize();

  int getConsoleFontSize(boolean scale);

  void setConsoleFontSize(int fontSize);

  float getConsoleLineSpacing();

  void setConsoleLineSpacing(float lineSpacing);

  void readExternal(Element parentNode);
}


text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<link rel="stylesheet" href="/cinema/css/styles.css">

	<title>Cinema</title>

Bienvenido al cinema

	Eliminar reservas

Dinero : {{cash}}

Dinero por preferencial: {{pCash}}

Dinero por tiquete normal: {{cCash}}

Personas : {{person}}

			Fecha
			<input id="dates" ng-model="date" type="date">
			<button ng-click="getElementByDate()">Buscar</button>

			Sala
			<select id="room" ng-model="rooms" ng-change="getChange(rooms)">
				<option value="comedia">Comedia</option>
				<option value="terror">Terror</option>
				<option value="drama">Drama</option>
				<option value="accion">Accion</option>
			</select>

				DISPONIBLE
				OCUPADO

					{{item.silla}}

				DISPONIBLE
				OCUPADO

					{{item.silla}}

				DISPONIBLE
				OCUPADO

					{{item.silla}}

				DISPONIBLE
				OCUPADO

					{{item.silla}}

		<form class="rooms" ng-show="rooms == 'accion' || rooms == 'drama' || rooms == 'terror' || rooms == 'comedia'">

Sistema de reservas

			Nombre
			<input id="registro" ng-bind="ajax1" ng-model="nameSubmit" type="text">

			Ciudad
			<input id="registro" ng-bind="ajax2" ng-model="citySubmit" type="text">

			Modo
			<select id="registro" ng-model="mode" autofocus>
				<option value="0">Reservar</option>
				<option value="1">Eliminar</option>
			</select>

			Sillas

			<button ng-click="reservar(rooms)">Reservar</button>
		</form>

Las sillas preferenciales son las el primer 10% de cada sala


text:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Hand Made Hero on Guowei Lv</title>
    <link>https://www.lvguowei.me/tags/hand-made-hero/</link>
    <description>Recent content in Hand Made Hero on Guowei Lv</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 20 Jul 2017 09:06:31 +0300</lastBuildDate>

	<atom:link href="https://www.lvguowei.me/tags/hand-made-hero/index.xml" rel="self" type="application/rss+xml" />

    <item>
      <title>How To Follow Hand Made Hero On Linux</title>
      <link>https://www.lvguowei.me/post/how-to-follow-hand-made-hero-on-linux/</link>
      <pubDate>Thu, 20 Jul 2017 09:06:31 +0300</pubDate>

      <guid>https://www.lvguowei.me/post/how-to-follow-hand-made-hero-on-linux/</guid>
      <description>If you are a Linux person and you want to follow the awesome Hand Made Hero, here are how I am doing it(on Arch Linux).
 Install VirtualBox. Create a Windows virtual machine(at least Win7 + SP1, you can download a ISO image from here), pay attention to the hard drive size, 25G is too small, increase it to like 50G at least. In order to make the full scren mode work, we have to install something called Guest Addition.</description>
    </item>

  </channel>
</rss>


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

<rootTag>
  <Award>
    <AwardTitle>PostDoctoral Research Fellowship</AwardTitle>
    <AwardEffectiveDate>09/01/2008</AwardEffectiveDate>
    <AwardExpirationDate>08/31/2012</AwardExpirationDate>
    <AwardAmount>108000</AwardAmount>
    <AwardInstrument>
      <Value>Fellowship</Value>
    </AwardInstrument>
    <Organization>
      03040000
      <Directorate>
        <LongName>Direct For Mathematical & Physical Scien</LongName>
      </Directorate>
      <Division>
        <LongName>Division Of Mathematical Sciences</LongName>
      </Division>
    </Organization>
    <ProgramOfficer>
      <SignBlockName>Bruce P. Palka</SignBlockName>
    </ProgramOfficer>
    <AbstractNarration>Postdoctoral Research Fellowship</AbstractNarration>
    <MinAmdLetterDate>04/29/2008</MinAmdLetterDate>
    <MaxAmdLetterDate>04/29/2008</MaxAmdLetterDate>
    <ARRAAmount/>
    <AwardID>0802977</AwardID>
    <Investigator>
      <FirstName>Sarah</FirstName>
      <LastName>Koch</LastName>
      <EmailAddress/>
      <StartDate>04/29/2008</StartDate>
      <EndDate/>
      <RoleCode>Principal Investigator</RoleCode>
    </Investigator>
    <Institution>
      <Name>Koch Sarah C</Name>
      <CityName>Ithaca</CityName>
      <ZipCode>148534201</ZipCode>
      <PhoneNumber/>
      <StreetAddress/>
      <CountryName>United States</CountryName>
      <StateName>New York</StateName>
      <StateCode>NY</StateCode>
    </Institution>
    <FoaInformation>
      0000099
      <Name>Other Applications NEC</Name>
    </FoaInformation>
  </Award>
</rootTag>


text:
@implementation NSObject (PS)
- (NSDictionary *)toDictionaryWithJSON:(id)json
{
    if (!json || json == (id)kCFNull) return nil;
    NSDictionary * dict = nil;
    NSData * jsonData = nil;
    if ([json isKindOfClass:[NSDictionary class]])
    {
        dict = json;
    }
    else if ([json isKindOfClass:[NSString class]])
    {
        jsonData = [(NSString *)json dataUsingEncoding : NSUTF8StringEncoding];
    }
    else if ([json isKindOfClass:[NSData class]])
    {
        jsonData = json;
    }
    if (jsonData)
    {
        dict = [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:NULL];
        if (![dict isKindOfClass:[NSDictionary class]]) dict = nil;
    }
    return dict;
}

@end