text:
var namespace = { window : {} };
utils.include('prefs.js', namespace, 'Shift_JIS');

var sv;
var random = parseInt(Math.random() * 65000);

function clearTestPrefs()
{
	utils.clearPref(random+'.bool');
	utils.clearPref(random+'.int');
	utils.clearPref(random+'.string');
	utils.clearPref(random+'.domain1.pref');
	utils.clearPref(random+'.domain2.pref');
	utils.clearPref(random+'.domain3.pref');
}

function setUp()
{
	sv = {};
	sv.__proto__ = namespace.window['piro.sakura.ne.jp'].prefs;
	clearTestPrefs();
}

function tearDown()
{
	clearTestPrefs();
}

function test_setAndGetPref()
{
	function assertSetAndGetPref(aPref, aValue)
	{
		assert.isNull(utils.getPref(aPref));
		assert.isNull(sv.getPref(aPref));

		sv.setPref(aPref, aValue);

		assert.isNotNull(utils.getPref(aPref));
		assert.equals(aValue, utils.getPref(aPref));

		assert.isNotNull(sv.getPref(aPref));
		assert.equals(aValue, sv.getPref(aPref));

		sv.clearPref(aPref);
		assert.isNull(utils.getPref(aPref));
		assert.isNull(sv.getPref(aPref));
	}

	assertSetAndGetPref(random+'.bool', true);
	assertSetAndGetPref(random+'.int', 29);
	assertSetAndGetPref(random+'.string', 'string');
}

test_getChildren.setUp = function() {
	utils.clearPref(random+'.item1');
	utils.clearPref(random+'.item1.child1');
	utils.clearPref(random+'.item1.child2');
	utils.clearPref(random+'.item2');
	utils.clearPref(random+'.item2.child1');
	utils.clearPref(random+'.item2.child2');
	utils.clearPref(random+'.item3');
	utils.clearPref(random+'.item3.child1');
	utils.clearPref(random+'.item3.child2');
	utils.clearPref(random+'.item4.onlyChild1');
	utils.clearPref(random+'.item4.onlyChild2');
};
test_getChildren.tearDown = test_getChildren.setUp;
function test_getChildren()
{
	utils.setPref(random+'.item1', true);
	utils.setPref(random+'.item1.child1', true);
	utils.setPref(random+'.item1.child2', true);
	utils.setPref(random+'.item2', true);
	utils.setPref(random+'.item2.child1', true);
	utils.setPref(random+'.item2.child2', true);
	utils.setPref(random+'.item3', true);
	utils.setPref(random+'.item3.child1', true);
	utils.setPref(random+'.item3.child2', true);
	utils.setPref(random+'.item4.onlyChild1', true);
	utils.setPref(random+'.item4.onlyChild2', true);

	var descendant = [
			random+'.item1',
			random+'.item1.child1',
			random+'.item1.child2',
			random+'.item2',
			random+'.item2.child1',
			random+'.item2.child2',
			random+'.item3',
			random+'.item3.child1',
			random+'.item3.child2',
			random+'.item4.onlyChild1',
			random+'.item4.onlyChild2'
		];
	assert.equals(descendant, sv.getDescendant(random));
	assert.equals(descendant, sv.getDescendant(random+'.'));

	var children = [
			random+'.item1',
			random+'.item2',
			random+'.item3',
			random+'.item4'
		];
	assert.equals(children, sv.getChildren(random));
	assert.equals(children, sv.getChildren(random+'.'));
}

function test_listeners()
{
	var singleDomainListener = {
			domain  : random+'.domain1',
			observe : function(aSubject, aTopic, aData)
			{
				this.messages.push([aTopic, aData]);
			},
			messages : []
		};

	var multipleDomainsListener = {
			domains : [
				random+'.domain2',
				random+'.domain3'
			],
			observe : function(aSubject, aTopic, aData)
			{
				this.messages.push([aTopic, aData]);
			},
			messages : []
		};

	sv.addPrefListener(singleDomainListener);
	utils.setPref(random+'.domain1.pref', true);
	utils.setPref(random+'.domain1.pref', false);
	assert.equals(
		[
			['nsPref:changed', random+'.domain1.pref'],
			['nsPref:changed', random+'.domain1.pref']
		],
		singleDomainListener.messages
	);
	singleDomainListener.messages = [];
	sv.removePrefListener(singleDomainListener);
	utils.setPref(random+'.domain1.pref', true);
	utils.setPref(random+'.domain1.pref', false);
	assert.equals([], singleDomainListener.messages);

	sv.addPrefListener(multipleDomainsListener);
	utils.setPref(random+'.domain2.pref', true);
	utils.setPref(random+'.domain3.pref', true);
	utils.setPref(random+'.domain2.pref', false);
	utils.setPref(random+'.domain3.pref', false);
	assert.equals(
		[
			['nsPref:changed', random+'.domain2.pref'],
			['nsPref:changed', random+'.domain3.pref'],
			['nsPref:changed', random+'.domain2.pref'],
			['nsPref:changed', random+'.domain3.pref']
		],
		multipleDomainsListener.messages
	);
	multipleDomainsListener.messages = [];
	sv.removePrefListener(multipleDomainsListener);
	utils.setPref(random+'.domain2.pref', true);
	utils.setPref(random+'.domain3.pref', true);
	utils.setPref(random+'.domain2.pref', false);
	utils.setPref(random+'.domain3.pref', false);
	assert.equals([], multipleDomainsListener.messages);
}


text:
<?php
include_once($_SERVER['DOCUMENT_ROOT'].'/include/autoprepend.php');
/*
	$Author: pierre $
	$Id: pageLiteEditor4.php,v 1.2 2014-07-16 13:06:01 pierre Exp $

	$Log: pageLiteEditor4.php,v $
	Revision 1.2  2014-07-16 13:06:01  pierre
	*** empty log message ***

	Revision 1.1  2013-09-30 09:43:16  raphael
	*** empty log message ***

	Revision 1.6  2013-03-01 10:28:20  pierre
	*** empty log message ***

	Revision 1.5  2012-07-31 14:24:50  pierre
	*** empty log message ***

	Revision 1.4  2012-04-13 07:18:38  pierre
	*** empty log message ***

	Revision 1.3  2012-02-08 16:02:26  pierre
	*** empty log message ***

	Revision 1.2  2010-08-25 16:09:23  pierre
	cms_theme

	Revision 1.1  2010-08-23 08:29:52  pierre
	*** empty log message ***

	Revision 1.12  2009-09-24 08:53:14  pierre
	*** empty log message ***

	Revision 1.11  2009-03-03 10:32:54  thao
	*** empty log message ***

	Revision 1.10  2009-03-02 13:46:39  thao
	*** empty log message ***

	Revision 1.9  2009-03-02 11:26:50  thao
	*** empty log message ***

	Revision 1.8  2008-11-28 14:09:56  pierre
	*** empty log message ***

	Revision 1.7  2008-11-27 11:34:35  pierre
	*** empty log message ***

	Revision 1.6  2008-11-06 12:03:54  pierre
	*** empty log message ***

	Revision 1.5  2008-07-16 10:48:36  pierre
	*** empty log message ***

	Revision 1.4  2007/11/26 16:58:27  thao
	*** empty log message ***

	Revision 1.3  2007/11/16 13:57:28  remy
	*** empty log message ***

	Revision 1.2  2007/08/28 15:55:28  pierre
	*** empty log message ***

	Revision 1.1  2007/08/08 14:26:26  thao
	*** empty log message ***

	Revision 1.4  2007/08/08 14:16:15  thao
	*** empty log message ***

	Revision 1.3  2007/08/08 13:56:04  thao
	*** empty log message ***

	Revision 1.2  2007/03/27 15:10:39  pierre
	*** empty log message ***

	Revision 1.1  2006/12/15 12:30:11  pierre
	*** empty log message ***

	Revision 1.1.1.1  2006/01/25 15:14:32  pierre
	projet CCitron AWS 2006 Nouveau Website

	Revision 1.3  2005/12/20 09:12:10  sylvie
	application des styles

	Revision 1.2  2005/10/28 07:53:14  sylvie
	*** empty log message ***

	Revision 1.1.1.1  2005/10/20 13:10:53  pierre
	Espace V2

	Revision 1.4  2005/06/07 12:16:20  michael
	Créa/ajout page
	Enlève message d'écrasement de page si on est en modif

	Revision 1.3  2005/06/07 10:01:15  michael
	Ajout d'un message "voulez-vous écraser la page..."

	Revision 1.2  2005/06/07 07:42:43  michael
	Vive les espaces!

	Revision 1.1.1.1  2005/04/18 13:53:29  pierre
	again

	Revision 1.1.1.1  2005/04/18 09:04:21  pierre
	oremip new

	Revision 1.1.1.1  2004/11/03 13:49:54  ddinside
	lancement du projet - import de adequat

	Revision 1.3  2004/06/16 15:23:19  ddinside
	inclusion corrections

	Revision 1.2  2004/04/26 08:07:09  melanie
	*** empty log message ***

	Revision 1.1.1.1  2004/04/01 09:20:27  ddinside
	Création du projet CMS Couleur Citron nom de code : tipunch

	Revision 1.6  2004/02/05 15:56:25  ddinside
	ajout fonctionnalite de suppression de pages
	ajout des styles dans spaw
	debuggauge prob du nom de fichier limite à 30 caracteres

	Revision 1.5  2004/01/27 12:12:50  ddinside
	application de dos2unix sur les scripts SQL
	modification des scripts d'ajout pour correction bug lors d'une modif de page
	ajout foncitonnalité de modification de page
	ajout visu d'une page si créée

	Revision 1.4  2004/01/20 15:16:38  ddinside
	mise à jour de plein de choses
	ajout de gabarit vie des quartiers
	eclatement gabarits par des includes pour contourner prob des flashs non finalisés

	Revision 1.3  2004/01/07 18:27:37  ddinside
	première mise à niveau pour plein de choses

	Revision 1.2  2003/11/26 13:08:42  ddinside
	nettoyage des fichiers temporaires commités par erreur
	ajout config spaw
	corrections bug menu et positionnement des divs

*/
	include_once($_SERVER['DOCUMENT_ROOT'].'/include/cms-inc/arbominisite.lib.php');
	include_once($_SERVER['DOCUMENT_ROOT'].'/include/cms-inc/composants.lib.php');
	include_once($_SERVER['DOCUMENT_ROOT'].'/include/cms-inc/pages.lib.php');
	include_once($_SERVER['DOCUMENT_ROOT'].'/include/cms-inc/gabarit.lib.php');
	include_once($_SERVER['DOCUMENT_ROOT'].'/include/cms-inc/selectSite.php');

	include_once($_SERVER['DOCUMENT_ROOT'].'/include/cms-inc/include_class.php');

	// site sur lequel on est positionné
	$idSite = $_SESSION['idSite_travail'];
	if ($idSite == "") die ("Appel incorrect de la fonctionnalité");
	$oSite = new Cms_site($idSite);

	activateMenu('gestionpage');  //permet de dérouler le menu contextuellement

	// gabarit
	$oGab = new Cms_page($_GET['idGab']);

	// répertoire des gabarits pour ce site
	$DIR_GABARITS = getRepGabarit($idSite);

$_SESSION['divArray']=null;
$divArray = array();
$datatxt = $_POST['serializedData'];

foreach (split('##', $datatxt) as $k => $v ) {
	if ($k==0)
		$v = preg_replace('/^#/','',$v);
	if ($k==(sizeof(split('##', $datatxt))-1))
		$v = preg_replace('/#$/','',$v);
	$t = split('#',$v);
	$id = $t[0];
	$attr = $t[1];
	$tmparray = array(
		'id' => $id
	);
	foreach(split(',',$attr) as $kk => $vv) {
		$t = split('=',$vv);
		if(strlen($t[0]) >0)
			$tmparray[$t[0]] = $t[1];
		if(strlen($t[2]) >0)
			$tmparray[$t[0]] = $t[1].'='.$t[2];
	}
	$divArray[$k] = $tmparray;
}
$divArray['gabarit'] = $oGab->getId_page();
$divArray['valid'] = 1;
$datas=serialize($divArray);
$_SESSION['page']=$datas;

$array = array();
foreach($divArray as $k => $v) {
	if(is_array($v))
		$array[$v['id']] = $v;
}
$_SESSION['divArray'] = $array;

$disabled="";
$foldername="Racine";
$name="";
$folder_id="0";

$sTitre = "Créer";

if($_GET['id'] > 0) {
	$pageInfos = getPageById($_GET['id']);
	$name=$pageInfos['name'];
	$folder_id=$pageInfos['node_id'];
	$foldername=$pageInfos['libelle'];
	$disabled="disabled";

$sTitre = "Modifier";
}

function drawFileInPath($idSite, $VPath) {
// Les chemin absolu + pages du dossier en cours
// $VPath = Virtual path (0,15,85)
	$contenus = getFolderPages($idSite, $VPath);
	$node_id = preg_replace("/(.*,)/","",$VPath);
	$retour="";
	if((is_array($contenus)) && (sizeof($contenus)!=0)) {

		foreach ($contenus as $k => $page) {
	$retour.='	tab_file[tab_file.length] = "'. $node_id ."§". str_replace('"','\"', str_replace('.php','',$page['name'])) .'";'."\n";
		}
	}
	return $retour;
}

function DrawRecursDir($idSite, $VPath) {
	global $db;
	$current_path = getNodeInfos($db,$VPath);
	$childs = getNodeChildren($idSite, $db, $VPath);
	$htmlchilds = '';
	if (count($childs)!=0) {
		// Il existe encore des sous répertoires
		// => on relance la fonction pour chaque enfant
		foreach($childs as $key => $child) {
			$htmlchilds .= DrawRecursDir($idSite, $VPath.",".$child['id']);
		}
	}
	return drawFileInPath($idSite, $VPath) . $htmlchilds;
}

?>

<link rel="stylesheet" type="text/css" href="/backoffice/cms/css/bo.css">
<form name="savePage" action="pageLiteEditor5.php?id=<?php echo $_GET['id']; ?>&idGab=<?php echo $_GET['idGab']?>&idThe=<?php echo $_GET['idThe']?>" method="post">
<input type="hidden" name="serial" id="serial" value="<?php echo $datas; ?>"/>
<input type="hidden" name="node_id" id="node_id" value="<?php echo $folder_id; ?>"/>
<input type="hidden" name="BeToSave" id="BeToSave" value="<?php echo  $_POST['BeToSave'] ; ?>"/>
<input type="hidden" name="idGab" id="idGab" value="<?php echo $_GET['idGab']; ?>"/>
<input type="hidden" name="idThe" id="idThe" value="<?php echo $_GET['idThe']; ?>"/>

PAGE > <?php $translator->echoTransByCode('Creer_une_page'); ?> >
<?php $translator->echoTransByCode('Etape_3'); ?>

<?php

(isset($_SESSION["pageLiteEditor4_nom"]) && $_SESSION["pageLiteEditor4_nom"]!="") ? $nom = $_SESSION["pageLiteEditor4_nom"] : $nom="nom : ";
(isset($_SESSION["pageLiteEditor4_dossier"]) && $_SESSION["pageLiteEditor4_dossier"]!="") ? $dossier = $_SESSION["pageLiteEditor4_dossier"] : $dossier="Dossier de stockage : ";
(isset($_SESSION["pageLiteEditor4_racine"]) && $_SESSION["pageLiteEditor4_racine"]!="") ? $foldername = $_SESSION["pageLiteEditor4_choisir_dossier"] : $foldername=$foldername;
(isset($_SESSION["pageLiteEditor4_choisir_dossier"]) && $_SESSION["pageLiteEditor4_choisir_dossier"]!="") ? $choisir_dossier = $_SESSION["pageLiteEditor4_choisir_dossier"] : $choisir_dossier=" choisir le dossier";

?>

  <?php $translator->echoTransByCode('Composants_nom'); ?>
  <input name="name" type="text" class="arbo" id="nameid" value="<?php echo $name; ?>" size="35" maxlength="50" <?php echo $disabled;?> pattern="^([a-z]|[A-Z]|[0-9]|_)+$" errorMsg="Merci de spécifier un nom ne comportant que des caractères alphanumériques sans espace.">

  <?php $translator->echoTransByCode('dossier_de_stockage'); ?>
  <input name="foldername" type="text" disabled class="arbo" id="foldername" value="<?php echo $foldername;?>" size="20" pattern="^.+$" errorMsg="Veuillez spécifier un dossier d'enregistrement."> <?php if(!$_GET['id'] > 0) { ?><?php echo $choisir_dossier; ?><?php } ?>

  <input name="Retour" type="button" class="arbo" onClick="document.location='pageLiteEditor3.php?<?php echo $_SERVER['QUERY_STRING']; ?>';" value="<< <?php $translator->echoTransByCode('Retour'); ?>">
  <input name="Suite >>" type="button" class="arbo" onClick="if(okfile()){ document.forms[0].name.disabled=false; submit();}" value="<?php $translator->echoTransByCode('Suite'); ?> >>">

</form>
<?php
include_once($_SERVER['DOCUMENT_ROOT'].'/include/autoappend.php');
?>

redpajama_set_name: RedPajamaGithub


text:
layout: page
title: Oliver Networks Executive Retreat
date: 2016-05-24
author: Randy Lynch
tags: weekly links, java
status: published
summary: Mauris convallis erat mollis magna ornare.
banner: images/banner/leisure-04.jpg
booking:
  startDate: 11/01/2018
  endDate: 11/06/2018
  ctyhocn: SHMTXHX
  groupCode: ONER
published: true
---
Ut aliquam porta libero, vel porta est egestas at. Morbi ultrices, orci at vestibulum lacinia, tortor tellus fermentum ante, in lacinia tellus nunc vel massa. Vivamus eleifend est non sapien auctor ornare. Vivamus varius, tortor a facilisis dapibus, diam nulla placerat lorem, a commodo erat massa a mi. Integer id nulla mattis nulla maximus rhoncus. Sed lacus nibh, pretium tincidunt justo sit amet, consequat mattis nibh. Aliquam ullamcorper erat sed orci dignissim, id molestie libero tincidunt. Phasellus vulputate nulla nibh, id pellentesque ipsum ultrices nec.

* Vestibulum varius magna eget maximus malesuada
* Aliquam et ante porta, ultrices magna in, ullamcorper mi
* Donec pretium eros a interdum interdum
* Quisque ornare erat in scelerisque vulputate.

Duis sit amet blandit leo. Aliquam consectetur fringilla velit eu ultrices. Sed elementum vulputate urna, in tincidunt mauris rutrum id. Mauris at leo nec arcu tristique vestibulum. Nullam non justo urna. Mauris nec scelerisque augue. Aliquam sagittis lectus tortor, nec euismod eros tincidunt non. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent varius consectetur augue eu consectetur. Sed faucibus vitae erat eu malesuada.


text:
aerostore
=========

A session store backend for [gorilla/sessions](http://www.gorillatoolkit.org/pkg/sessions) - [src](https://github.com/gorilla/sessions).

## Requirements

Depends on the [aerospike-client-go](https://github.com/aerospike/aerospike-client-go) Aerospike library.

## Installation

	go get github.com/theaidem/aerostore

## Documentation

Available on [godoc.org](http://godoc.org/github.com/theaidem/aerostore).

[Full documentation](http://www.gorillatoolkit.org/pkg/sessions) on underlying interface.

### Examples

	// Fetch new store.
	// "test" is a namespace of Aerospike cluster
	// "sessions" is a set of Aerospike cluster
	store, err := NewAeroStore("test", "sessions", "127.0.0.1", 3000, []byte("something-very-secret"))
	if err != nil {
		panic(err)
	}
	defer store.Close()

	// Get a session.
	session, err = store.Get(req, "session-key")
	if err != nil {
		log.Error(err.Error())
	}

	// Add a value.
	session.Values["foo"] = "bar"

	// Save.
	if err = sessions.Save(req, rsp); err != nil {
		log.Fatalf("Error saving session: %v", err)
	}


text:
import * as React from 'react';
import { IconBaseProps } from 'react-icon-base';
export default class TiThMenu extends React.Component<IconBaseProps, any> { }


text:
#include "ResourcePreview.h"
#include <QMouseEvent>
#include "Code/QRDUtils.h"
#include "ui_ResourcePreview.h"

ResourcePreview::ResourcePreview(ICaptureContext &c, IReplayOutput *output, QWidget *parent)
    : QFrame(parent), ui(new Ui::ResourcePreview)
{
  ui->setupUi(this);

  ui->thumbnail->SetContext(c);
  ui->thumbnail->SetOutput(output);

  Initialise();
}

ResourcePreview::ResourcePreview(bool, QWidget *parent)
    : QFrame(parent), ui(new Ui::ResourcePreview)
{
  ui->setupUi(this);

  delete ui->thumbnail;
  ui->thumbnail = NULL;
  m_ManualThumbnail = new RDLabel();
  m_ManualThumbnail->setGeometry(QRect(0, 0, 16, 16));
  m_ManualThumbnail->setScaledContents(true);
  m_ManualThumbnail->setSizePolicy(
      QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));

  ui->gridLayout->addWidget(m_ManualThumbnail, 0, 0, 1, 2);

  Initialise();
}

void ResourcePreview::Initialise()
{
  setBackgroundRole(QPalette::Background);
  setForegroundRole(QPalette::Foreground);

  QPalette Pal(palette());

  Pal.setColor(QPalette::Highlight, QColor(Qt::red));

  setPalette(Pal);

  setSelected(false);

  ui->slotLabel->setPalette(palette());
  ui->slotLabel->setBackgroundRole(QPalette::Dark);
  ui->slotLabel->setForegroundRole(QPalette::Foreground);
  ui->slotLabel->setAutoFillBackground(true);
  ui->slotLabel->setFont(Formatter::PreferredFont());
  ui->descriptionLabel->setPalette(palette());
  ui->descriptionLabel->setAutoFillBackground(true);
  ui->descriptionLabel->setBackgroundRole(QPalette::Dark);
  ui->descriptionLabel->setForegroundRole(QPalette::Foreground);
  ui->descriptionLabel->setFont(Formatter::PreferredFont());

  if(ui->thumbnail)
    QObject::connect(ui->thumbnail, &CustomPaintWidget::clicked, this, &ResourcePreview::clickEvent);
  else if(m_ManualThumbnail)
    QObject::connect(m_ManualThumbnail, &RDLabel::clicked, this, &ResourcePreview::clickEvent);
  QObject::connect(ui->slotLabel, &RDLabel::clicked, this, &ResourcePreview::clickEvent);
  QObject::connect(ui->descriptionLabel, &RDLabel::clicked, this, &ResourcePreview::clickEvent);

  if(ui->thumbnail)
    QObject::connect(ui->thumbnail, &CustomPaintWidget::doubleClicked, this,
                     &ResourcePreview::doubleClickEvent);
  else if(m_ManualThumbnail)
    QObject::connect(m_ManualThumbnail, &RDLabel::doubleClicked, this,
                     &ResourcePreview::doubleClickEvent);
  QObject::connect(ui->slotLabel, &RDLabel::doubleClicked, this, &ResourcePreview::doubleClickEvent);
  QObject::connect(ui->descriptionLabel, &RDLabel::doubleClicked, this,
                   &ResourcePreview::doubleClickEvent);
}

ResourcePreview::~ResourcePreview()
{
  delete ui;
}

void ResourcePreview::clickEvent(QMouseEvent *e)
{
  emit clicked(e);
}

void ResourcePreview::doubleClickEvent(QMouseEvent *e)
{
  emit doubleClicked(e);
}

void ResourcePreview::setSlotName(const QString &n)
{
  ui->slotLabel->setText(n);
}

void ResourcePreview::setResourceName(const QString &n)
{
  ui->descriptionLabel->setText(n);
}

void ResourcePreview::setSize(QSize s)
{
  setFixedWidth(s.width());
  setFixedHeight(s.height());
  setMinimumSize(s);
  setMaximumSize(s);
}

void ResourcePreview::setSelected(bool sel)
{
  m_Selected = sel;

  setForegroundRole(sel ? QPalette::Highlight : QPalette::Foreground);
}

WindowingData ResourcePreview::GetWidgetWindowingData()
{
  if(ui->thumbnail)
    return ui->thumbnail->GetWidgetWindowingData();
  return {};
}

QSize ResourcePreview::GetThumbSize()
{
  if(ui->thumbnail)
    return ui->thumbnail->size();

  if(m_ManualThumbnail)
    return m_ManualThumbnail->size();

  return {};
}

void ResourcePreview::UpdateThumb(QSize s, const bytebuf &imgData)
{
  if(!m_ManualThumbnail)
    return;

  QImage thumb(imgData.data(), s.width(), s.height(), s.width() * 3, QImage::Format_RGB888);
  m_ManualThumbnail->setPixmap(QPixmap::fromImage(thumb));
}

void ResourcePreview::resizeEvent(QResizeEvent *e)
{
  emit resized(this);
  QFrame::resizeEvent(e);
}


text:
function DM = ft_preproc_online_downsample_init(factor)
% function DM = ft_preproc_online_downsample_init(factor)
%
% Initialize an downsampling model with the given factor.

% 2010 S. Klanke

if factor < 1 or factor~=round(factor)
	error('Argument ''factor'' must be a positive integer number');
end

DM.factor  = factor;
DM.numSkip = 0;


text:
      {{molName}}

      <button class="mdl-button mdl-js-button mdl-button--icon" ng-click="descriptionShown = !descriptionShown" style="right:10%; top:5%; position:absolute;">
        remove_red_eye
      </button>
      <button ng-show="playlistEdit" class="mdl-button mdl-js-button mdl-button--icon" ng-click="addToPlaylist()" style="right:0.2%; top:5%; position:absolute;">
        add
      </button>

Description

{{desc}}

Author

{{author}}

Creation Date

{{creationDate}}

      View FullScreen
      chevron_right


text:
"""Four-Way Tabla Stroke Transcription and Classification Loader

.. admonition:: Dataset Info
    :class: dropdown

    The Four-Way Tabla Dataset includes audio recordings of tabla solo with onset annotations for particular
    strokes types. This dataset was published in 2021 in the context of ISMIR2021 (Online), and may be used for
    tasks related to tabla analysis, including problems such as onset detection and stroke classification.

    Total audio samples: We do have a total of 226 samples for training and 10 for testing. Each audio has
    an approximate duration of 1 minute.

    Audio specifications:

    * Sampling frequency: 44.1 kHz
    * Bit-depth: 16 bit
    * Audio format: .wav

    Dataset usage: This dataset may be used for the data-driven research of tabla stroke transcription and
    identification. In this dataset, four important tabla characteristic strokes are considered.

    Dataset structure: The dataset is split in two subsets, containing training and testing samples. Within each
    subset, there is a folder containing the audios, and another folder containing the onset annotations. The onset
    annotations are organized in a folder per each stroke type: b, d, rb, rt. Therefore, the paths to onsets would
    look like:

    .. code-block:: bash

        train/onsets/<StrokeType>/<ID>.onsets

    The dataset is made available by CompMusic under a Creative Commons
    Attribution 3.0 Unported (CC BY 3.0) License.

"""

import csv

import librosa
import numpy as np
from typing import BinaryIO, Optional, Tuple

from deprecated.sphinx import deprecated

from mirdata import annotations, core, download_utils, io, jams_utils

BIBTEX = """@article{RohitMA2021,
    author = {M.A, Rohit and Bhattacharjee, Amitrajit and Rao, Preeti},
    journal = {Proc. of the 22nd Int. Society for Music Information Retrieval Conf., Online, 2021},
    title = {{Four-way Classification of Tabla Strokes with Models Adapted from Automatic Drum Transcription}},
    year = {2021}
}"""

INDEXES = {
    "default": "1.0",
    "test": "1.0",
    "1.0": core.Index(filename="four_way_tabla_index.json"),
}

REMOTES = {
    "remote_data": download_utils.RemoteFileMetadata(
        filename="4way-tabla-ismir21-dataset.zip",
        url="https://zenodo.org/record/7110248/files/4way-tabla-ismir21-dataset.zip?download=1",
        checksum="fcddb565f260d4170877f70a7c33d69d",  # the md5 checksum
    ),
}

LICENSE_INFO = "Creative Commons Attribution 4.0 International License."

class Track(core.Track):
    """Four-Way Tabla track class

    Args:
        track_id (str): track id of the track
        data_home (str): Local path where the dataset is stored.

    Attributes:
        track_id (str): track id
        audio_path (str): audio path
        onsets_b_path (str): path to B onsets
        onsets_d_path (str): path to D onsets
        onsets_rb_path (str): path to RB onsets
        onsets_rt_path (str): path to RT onsets

    """

    def __init__(
        self,
        track_id,
        data_home,
        dataset_name,
        index,
        metadata,
    ):
        super().__init__(
            track_id,
            data_home,
            dataset_name,
            index,
            metadata,
        )

        self.audio_path = self.get_path("audio")
        self.onsets_b_path = self.get_path("onsets_b")
        self.onsets_d_path = self.get_path("onsets_d")
        self.onsets_rb_path = self.get_path("onsets_rb")
        self.onsets_rt_path = self.get_path("onsets_rt")

        self.train = True if "train" in self.audio_path else False

    @property
    def audio(self) -> Optional[Tuple[np.ndarray, float]]:
        """The track's audio

        Returns:
            * np.ndarray - audio signal
            * float - sample rate

        """
        return load_audio(self.audio_path)

    @property
    def onsets_b(self) -> Optional[annotations.BeatData]:
        """Onsets for stroke B

        Returns:
            * annotations.BeatData - onsets annotation

        """
        return load_onsets(self.onsets_b_path)

    @property
    def onsets_d(self) -> Optional[annotations.BeatData]:
        """Onsets for stroke D

        Returns:
            * annotations.BeatData - onsets annotation

        """
        return load_onsets(self.onsets_d_path)

    @property
    def onsets_rb(self) -> Optional[annotations.BeatData]:
        """Onsets for stroke RB

        Returns:
            * annotations.BeatData - onsets annotation

        """
        return load_onsets(self.onsets_rb_path)

    @property
    def onsets_rt(self) -> Optional[annotations.BeatData]:
        """Onsets for stroke RT

        Returns:
            * annotations.BeatData - onsets annotation

        """
        return load_onsets(self.onsets_rt_path)

    def to_jams(self):
        """Get the track's data in jams format

        Returns:
            jams.JAMS: the track's data in jams format

        """
        return jams_utils.jams_converter(
            audio_path=self.audio_path,
            beat_data=[
                (self.onsets_b, "onsets_b"),
                (self.onsets_d, "onsets_d"),
                (self.onsets_rb, "onsets_rb"),
                (self.onsets_rt, "onsets_rt"),
            ],
            metadata={"train": self.train},
        )

@io.coerce_to_bytes_io
def load_audio(fhandle: BinaryIO) -> Tuple[np.ndarray, float]:
    """Load a Mridangam Stroke Dataset audio file.

    Args:
        fhandle (str or file-like): File-like object or path to audio file

    Returns:
        * np.ndarray - the mono audio signal
        * float - The sample rate of the audio file
    """
    return librosa.load(fhandle, sr=44100, mono=True)

@io.coerce_to_string_io
def load_onsets(fhandle):
    """Load stroke onsets

    Args:
        fhandle (str or file-like): Local path where the pitch annotation is stored.

    Returns:
        EventData: onset annotations

    """
    onsets = []
    reader = csv.reader(fhandle, delimiter="\n")
    for line in reader:
        onsets.append(float(line[0]))

    if not onsets:
        return None
    onsets = np.array(onsets)

    # All strokes are out of an annotated metric
    beat_position = np.zeros(onsets.shape)

    return annotations.BeatData(onsets, "s", beat_position, "global_index")

@core.docstring_inherit(core.Dataset)
class Dataset(core.Dataset):
    """
    The Four-Way Tabla dataset
    """

    def __init__(self, data_home=None, version="default"):
        super().__init__(
            data_home,
            version,
            name="four_way_tabla",
            track_class=Track,
            bibtex=BIBTEX,
            indexes=INDEXES,
            remotes=REMOTES,
            license_info=LICENSE_INFO,
        )


text:
\documentclass[a4paper]{article}

% Use utf-8 encoding for foreign characters
\usepackage[utf8]{inputenc}

% This is now the recommended way for checking for PDFLaTeX:
\usepackage{ifpdf}

% Removes indent in new paragraphs and increases line-height
\usepackage{parskip}

% Include custom commands special for this report
\include{udd_custom}

\usepackage{multicol}
\usepackage{nonfloat}
\usepackage{fullpage}

\ifpdf
\usepackage[pdftex]{graphicx}
\else
\usepackage{graphicx}
\fi

\begin{document}

\setlength{\columnsep}{1cm}
\summarytitle{User Driven Development\\A Reversed Development Process}
\begin{multicols}{2}

{ \itshape
	In my master thesis I set out to put the activity of use first in the software development process. This was done by implementing an initial data handling system that can be used to extract desire paths from its use. These desire paths tell a story about what the users need to do and what they do. By allowing simple improvements and adjustments to be made to the initial system makes it possible for the system to adapt to the users' needs. Perhaps even fulfil them.
}

\section*{Use Is Important}
The importance of involving users during software development is widely known and accepted. Without involving the users there is little chance of fulfilling their needs. And in the end software development is about fulfilling the needs of the users.

Requirements engineering offer many methods to elicit requirements. Many of them truly involve the users and are able to extract valuable information from them. This information is then analyzed and transformed into requirements that decide what the system should be like. No matter if the development method is an old-fashioned waterfall method or an agile one like Extreme Programming or Scrum, there exist some form of analysis. An analysis of what is believed to be a system that the users need.

This analysis can be faulty. It can even be based on invalid information. There exists a mismatch between what people say they need and what they actually need. So errors may be introduced in the process as early as when the users describe what they need. These errors might also be enhanced if the analysis interprets the needs in an erroneous manner. No matter where an error occurs, the actual implementation of the software will depend on the analysis. The actual usage of the system will then depend on the system itself. The usage will depend on the developed software.

But wouldn't it be better if it were the other way around? Shouldn't the developed software be a reaction of the use? If the software was a reaction of usage it would probably fulfil the needs of the users.

\section*{Desire Paths}
Desire paths describe the worn paths left by people on grassy areas, or the trails left in snow where people have walked. They are perfect impressions of the peoples needs as they walk where they want, not where they are supposed. Areas where these kinds of paths exist show that the analysis of where to place the permanent roads was faulty. Its users did not accept the pattern of usage that the permanent roads demanded. Instead the users created new paths that satisfied their needs.

During software usage there is little possibility to stray from the paths that are set by the systems implementation. If the developed system isn't a successful one, there is little possibility for users to do what they need in a way that they need to do it.

Listening to users and improving already existing software is quite easy. Many companies already do it in different ways. Apple tracks what music is being played in iTunes and suggests other music that might be interesting to the listener. Larry Wall used desire paths in Linux usage when developing the programming language Perl. Microsoft Windows error reports are also a kind of desire path, as it tries to prevent the same problem from happening again.

\section*{Reverse The Process}
Instead of placing the usage last, it should be first! But in order to do that there still needs to be something to use. In my thesis I developed an initial data handling system that can be used as the first step during development. It allows for improvements to be made to aid the users and adapt to their needs. The system tracks and records what kind of data the user inputs and uses. From this information desire paths are extracted and an observing programmer can implement improvements or discuss unclarities with the users.

This initial system has been named ReUDD. It strives to be dynamic enough to be applicable to any domain, but of course has some constraints. The scope of the thesis limits the types of domains to systems of the type data in, report out. Hopefully this still includes a wide range of systems.

Moving use from the end of the process to the beginning changes the order of dependencies. Instead of having the usage depend on the system, the system will depend on the usage. It feels like a reversed development process.

\section*{Does It Work?}
ReUDD was tested and evaluated during three different tests. Each test had new users who where given a short introduction to the system and its functionality. The users were asked to use ReUDD to model an arbitrary system that they had the need for. During their use an observing programmer observed their usage. Using the different observations available in ReUDD, improvements were made and the use continued.

After the use the testers were interviewed to find out what they thought of ReUDD and if it was successful in observing their domain. The general impression was that ReUDD was easy to use and allowed the users to do what they wanted. There were some usability issues and things that need to be changed or improved, but the overall thoughts were positive. ReUDD was also successful in observing the domain modelled by the users.

So the method seems to work. Place use first and extract desire paths from it. Use the desire paths to identify the needs of the users. This information can later be used to developed successful software.

\section*{Future Versions}
The development of ReUDD will continue and eventually released as open source. It's potential to observe use seems promising and with more development it might become truly successful. At it's current state it is only a prototype and not ready for release.

\end{multicols}
\end{document}


text:
layout: post
title: Jekyll - Katy Huff
comments: true
category: posts
tags: meeting
---

# Attending

- Sandra Bogetic
- Alejandra Jolodosky
- Staffan Qvist
- Madicken Munk
- Katy Huff
- Jason Hou
- Daniel Wooten
- Ross Barnowski
- Andy Haefner
- Fatma Imamoglu
- Rachel Slaybaugh
- others...

# Katy Huff

Katy Huff is a postdoc with NSSC and BIDS.

# Jekyll

This very site is made with Jekyll. Jekyll is a Ruby-based, blog-aware, static
site generator.

## Two ways to host your Jekyll site for free on GitHub

Everybody needs a website. Google yourself. What happens? Let's get you a
website.

## username.github.com master branch

Every time someone creates a user name on github, a special space on the
internet is reserved for them at theirusername.github.com (and .io, it's a long
story).

If the user "lisemeitner" existed, then she could create a repository on github
called "lisemeitner.github.com" (or .io, it's a long story). If that repository
has a master branch, then GitHub will try to **render** it with Jekyll and
**serve** it up to the internet at lisemeitner.github.io. Note that jekyll
plug-ins used by GitHub are very minimal. Try not

If Lise doesn't want to use Jekyll, that's cool. Sites on GitHub can be plain
boring old html (like [katyhuff.github.io](http://katyhuff.github.io). To keep GitHub from trying to render
it as jekyll, she has to add an empty file (.nojekyll) in her repository.
Additionally, an index.html file has to exist at the top level of her
repository, or else there will be nothing there.

## gh-pages branch

If Lise also has a project called fission, she can have a website for it too.
That website can sit on the internet at lisemeitner.github.io/fission. All she
has to do is put either jekyll stuff or a static html page in the gh-pages
branch. The same rules apply as far as .nojekyll and plug-ins are concerned.

For an example, check out
[katyhuff.github.io/cyder](http://katyhuff.github.io/cyder).

## How does the THW site work?

Please look at the readme. We're gonna make some changes.

## What's this config file?

It's for configuring the site, silly! Let's check it out.

## What's all this stuff at the top of the posts?

It's YAML metadata. Let's talk about it.

## Serving it up locally

So, rather than rely on github to render the jekyll and serve it up on the
internet, you can also render it locally and check it out on your localhost.
You'll need to have ruby installed. Then:

    gem install jekyll

Then, if you navigate to a directory containing a jekyll site, you can serve it
up:

    jekyll serve

Now open a browser and navigate to the localhost url
[http://localhost:4000](http://localhost:4000).

## What about themes?

The THW page relies on an open source theme called left. We could swap that out
for another theme really easily. There are lots on the internets. Try [this
  page.](http://jekyllthemes.org/)

# Lightning Talks

# <+ person +> : <+ topic +>

# <+ person +> : <+ topic +>


text:
"""
This module contains all data structures needed to represent a PDDL domain and
possibly a task definition.
"""

class Type:
    """
    This class represents a PDDL type.
    """
    def __init__(self, name, parent):
        self.name = name.lower()
        self.parent = parent

    def __repr__(self):
        return self.name

    def __str__(self):
        return self.name

class Predicate:
    def __init__(self, name, signature):
        """
        name: The name of the predicate.
        signature: A list of tuples (name, [types]) to represent a list of
                   parameters and their type(s).
        """
        self.name = name
        self.signature = signature

    def __repr__(self):
        return self.name + str(self.signature)

    def __str__(self):
        return self.name + str(self.signature)

# Formula is unused right now!
#class Formula:
#    def __init__(self, operator, operands=[]):
#        # right now we only need AND
#        self._operator = operator # 'AND' | 'OR' | 'NOT'
#        self._operands = operands
#
#    def getOperator(self):
#        return self._operator
#    operator = property(getOperator)
#
#    def getOperands(self):
#        return self._operands
#    operands = property(getOperands)

class Effect:
    def __init__(self):
        """
        addlist: Set of predicates that have to be true after the action
        dellist: Set of predicates that have to be false after the action
        """
        self.addlist = set()
        self.dellist = set()

class Action:
    def __init__(self, name, signature, precondition, effect):
        """
        name: The name identifying the action
        signature: A list of tuples (name, [types]) to represent a list of
                   parameters an their type(s).
        precondition: A list of predicates that have to be true before the
                      action can be applied
        effect: An effect instance specifying the postcondition of the action
        """
        self.name = name
        self.signature = signature
        self.precondition = precondition
        self.effect = effect

class Domain:
    def __init__(self, name, types, predicates, actions, constants={}):
        """
        name: The name of the domain
        types: A dict of typename->Type instances in the domain
        predicates: A list of predicates in the domain
        actions: A list of actions in the domain
        constants: A dict of name->type pairs of the constants in the domain
        """
        self.name = name
        self.types = types
        self.predicates = predicates
        self.actions = actions
        self.constants = constants

    def __repr__(self):
        return ('< Domain definition: %s Predicates: %s Actions: %s '
                'Constants: %s >' % (self.name,
                                     [str(p) for p in self.predicates],
                                     [str(a) for a in self.actions],
                                     [str(c) for c in self.constants]))

    __str__ = __repr__

class Problem:
    def __init__(self, name, domain, objects, init, goal):
        """
        name: The name of the problem
        domain: The domain in which the problem has to be solved
        objects: A dict name->type of objects that are used in the problem
        init: A list of predicates describing the initial state
        goal: A list of predicates describing the goal state
        """
        self.name = name
        self.domain = domain
        self.objects = objects
        self.initial_state = init
        self.goal = goal

    def __repr__(self):
        return ('< Problem definition: %s '
                'Domain: %s Objects: %s Initial State: %s Goal State : %s >' %
                (self.name, self.domain.name,
                 [self.objects[o].name for o in self.objects],
                 [str(p) for p in self.initial_state],
                 [str(p) for p in self.goal]))

    __str__ = __repr__


text:
import { reducer as notificationsReducer } from 'reapop';
import { combineReducers, createStore, Store } from 'redux';
import { reducer as formReducer } from 'redux-form';

export function createActionStore() {
  const reducer = combineReducers({
    form: formReducer,
    notifications: notificationsReducer(),
  });
  return createStore(reducer) as Store;
}


text:
<!DOCTYPE html>
<link rel="import" href="packages/polymer/polymer.html">
<link rel="import" href="packages/core_elements/core_toolbar.html">
<link rel="import" href="packages/core_elements/core_icon_button.html">
<link rel="import" href="packages/paper_elements/paper_button.html">

<polymer-element name="ed-toolbar-headline">
  <template>
    <paper-button on-click="{{newHeadline}}" style="background-color: #9ade9a;" raisedButton>neues Kapitel</paper-button>
    <paper-button on-click="{{newSubHeadline}}" style="background-color: #9a9ade;" raisedButton>neues Unterkapitel</paper-button>
    <paper-button on-click="{{newText}}" style="background-color: #9a9ade;" raisedButton>neuer Absatz</paper-button>
    <paper-button on-click="{{newTextAfter}}" style="background-color: #9a9ade;" raisedButton>Kapitelende</paper-button>
  </template>
</polymer-element>

<polymer-element name="ed-toolbar-paragraph">
  <template>
    <paper-button on-click="{{newHeadline}}" style="background-color: #9ade9a;" raisedButton>neues Kapitel</paper-button>
    <paper-button on-click="{{newText}}" style="background-color: #9a9ade;" raisedButton>neuer Absatz</paper-button>
  </template>
</polymer-element>

<polymer-element name="ed-toolbar">
  <template>

      <ed-toolbar-headline></ed-toolbar-headline>

      <ed-toolbar-paragraph></ed-toolbar-paragraph>

  </template>

</polymer-element>


text:
title: Fluxul
inshort: Fluxuri de lucru fără cod [IFTTT]
translator: Microsoft Cognitive Services
---

Microsoft Flow este un uşor de utilizat, instrument de automatizare de sarcina [WYSIWYG](https://en.wikipedia.org/wiki/WYSIWYG). Fluxul vă oferă posibilitatea de a pre-program de activități care sunt repetitive, standardizate, consumatoare de timp, sau drept-up plictisitor. Fluxul este destul de uşor pentru un lucrător de zi cu zi cu nici o experienţă de programare sau tehnice, să folosească în avantajul lor.

Fluxul este deosebit de bun pentru fluxuri de lucru de aprobare, integrare mai multe aplicaţii şi servicii, şi automatizarea sarcinilor de consumatoare de timp şi monoton. Fluxul poate fi folosit pentru ceva la fel de simplu ca un document pentru aprobarea de către administratorul de rutare sau atât de complex ca întâmpinarea un angajat nou la organizaţie. Fluxurile pot fi personale (doar pentru tine) sau comune (făcute disponibile pentru toată lumea într-un departament sau companie).

Unele dintre fluxul pe cele mai puternice atribute includ său magazin [format](https://flow.microsoft.com/en-us/templates/) (pentru că de ce reinventeze roata?), [conectori](https://flow.microsoft.com/en-us/connectors/) care se poate vorbi atât Office 365 şi servicii non-Microsoft (de exemplu, Google Apps, DropBox, Salesforce, DocuSign, Stare de nervozitate), şi uşurinţa de utilizare. Puteţi chiar să utilizaţi fluxul la [programul boti](https://blog.getbizzy.io/introducing-bizzy-templates-b191b38d2370) în Microsoft Teams, gratuit, toate fără codificare.

Curgere a deschis activitatea de automatizare la masele câteva alte aplicaţii să aibă în trecut, pentru preţul său. Fluxul este [succesorul](https://docs.microsoft.com/en-us/flow/frequently-asked-questions) de fluxuri de lucru SharePoint Designer, deşi acesta nu este menit să fie un înlocuitor.

Resurse
---------

-[Microsoft fluxului dirijat de învăţare](https://docs.microsoft.com/en-us/flow/guided-learning/)
    \[Microsoft\]

-[Microsoft fluxul comunitatii](https://powerusers.microsoft.com/t5/Microsoft-Flow-Community/ct-p/FlowCommunity)
    \[Microsoft\]

-[Fluxul de blog pe săptămână](https://flow.microsoft.com/en-us/blog/category/flow-of-the-week/)
    \[Microsoft\]

Aplicaţii similare
--------------------

-IFTT

-Fluxuri de lucru SharePoint Designer

-Nintex

Feedback-ul
--------------------

-[Microsoft fluxul de idei forum](https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas)
    \[Microsoft\]

-[Microsoft fluxul comunitatii](https://powerusers.microsoft.com/t5/Microsoft-Flow-Community/ct-p/FlowCommunity)
    \[Microsoft\]

Autor
---------

-[Matt Wade](https://www.linkedin.com/in/thatmattwade/), biroul servicii MVP


text:
//  (C) Copyright Jeremy Siek 1999.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_TREE_STRUCTURE_HPP
#define BOOST_TREE_STRUCTURE_HPP

#include <boost/tuple/tuple.hpp> //For boost::tie()

namespace boost {

  template <class T>
  struct tree_traits {
    typedef typename T::node_descriptor node_descriptor;
    typedef typename T::children_iterator children_iterator;
  };

  template <class Tree, class TreeVisitor>
  void traverse_tree(typename tree_traits<Tree>::node_descriptor v,
                     Tree& t, TreeVisitor visitor)
  {
    visitor.preorder(v, t);
    typename tree_traits<Tree>::children_iterator i, end;
    boost::tie(i, end) = children(v, t);
    if (i != end) {
      traverse_tree(*i++, t, visitor);
      visitor.inorder(v, t);
      while (i != end)
        traverse_tree(*i++, t, visitor);
    } else
      visitor.inorder(v, t);
    visitor.postorder(v, t);
  }

  struct null_tree_visitor {
    template <typename Node, typename Tree> void preorder(Node, Tree&) { }
    template <typename Node, typename Tree> void inorder(Node, Tree&) { }
    template <typename Node, typename Tree> void postorder(Node, Tree&) { }
  };

} /* namespace boost */

#endif /* BOOST_TREE_STRUCTURE_HPP */


text:
This repo is mainly for jupyter notebook.

## Environment
* python 3.5+

## Dependencies
* ipython

## Interface

### nbjs.init()
*Put the code below to the first cell of notebook to initialize nbjs.*

```python
import nbjs
nbjs.init()
```

### nbjs.render(type, data)
```python
nbjs.render('word_cloud', {'data': 'hello|world', 'width': 900, 'height': 600})
```

## Support diagrams

### word cloud
* type: word_cloud
* data: string seperated by '|'
```
sample:
'hello|world|hello|nbjs'
```


text:
require "feedbag"
require "feedjira"

class FeedDiscovery
  def discover(url, finder = Feedbag, parser = Feedjira::Feed)
    get_feed_for_url(url, parser) do
      urls = finder.find(url)
      return false if urls.empty?

      get_feed_for_url(urls.first, parser) do
        return false
      end
    end
  end

  def get_feed_for_url(url, parser)
    feed = parser.fetch_and_parse(url)
    feed.feed_url ||= url
    feed
  rescue
    yield if block_given?
  end
end


text:
import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core';

@Component({
  selector: 'app-lista',
  templateUrl: './lista.component.html',
  styleUrls: ['./lista.component.css']
})
export class ListaComponent implements OnInit {

  @Input() objetos = [];
  @Output() edit = new EventEmitter();
  @Output() remove = new EventEmitter();

  constructor() { }

  ngOnInit() {
  }

  onEdit(objeto) {
    this.edit.emit(objeto);
  }

  onRemove(objeto) {
    this.remove.emit(objeto);
  }

}


text:
'use strict';

const rp = require('request-promise');

class API {

  constructor(key, responseType) {
    this.key = key;
    this.responseType = responseType || 'json';
  }

  get(qs) {
    console.log(qs);
    return rp(this.endpoint + '.' + this.responseType, {
      qs: Object.assign({
        'api-key': this.key
      }, qs)
    });
  }

}

module.exports = API;


text:
layout: default
---

## Docker Swarm


text:
import { union } from '../index';
export default union;


text:
We'll try to review and merge documentation changes quickly.

If you see something easy to change, you can probably even make the change in your browser!

## Contributing code

0. In your git-tfs clone, run `git config core.autocrlf true` so that all the line endings are unix line endings when you commit.

1. **Read the source.** It's hopefully not that intimidating.

2. **Check for issues.** There are a few issues that are low-hanging fruit. Feel free to pick them.

3. **Ask questions.** Feel free to drop me a line, or ask a question over at the [google group](http://groups.google.com/group/git-tfs-dev/), or join `#git-tfs` on FreeNode.

4. Verify that you your editor is configured to use 4 spaces instead of tabs. You could even install the [EditorConfig Extension for VisualStudio](http://visualstudiogallery.msdn.microsoft.com/c8bccfe2-650c-4b42-bc5c-845e21f96328) (such plugin exists for other editors) , and the good space configuration will be set automatically when opening the git-tfs solution.

## Pull Requests

Here are some tips on creating a pull request:

1. Write that awesome code. :sparkles:

2. Make sure the existing unit tests don't break. We try to keep the unit tests
[easy to run](https://github.com/git-tfs/git-tfs/blob/master/doc/Running-the-Unit-Tests.md).

3. We like new unit tests. If you can unit test your code, do so.
One of the pain points of the current git-tfs codebase is that parts of it are very difficult to unit test.
It's slowly getting less painful to unit test. One thing to try is to write an integration test
that runs git-tfs with the VsFake driver, similar to how the clone tests are written.

4. If you modify code in any of the client adapters (GitTfs.Vs*), please try it out with as many versions of the TFS client libraries as you can.
When you submit the pull request, include a note about which versions you have tried to compile with, and which ones you have tested with.

5. Include [documentation](https://github.com/git-tfs/git-tfs/tree/master/doc) for externally-visible changes.


text:
Namespace Forms

#Const design = True
    <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
    Partial Public Class Options
        Inherits System.Windows.Forms.Form

        'Form overrides dispose to clean up the component list.
        <System.Diagnostics.DebuggerNonUserCode()>
        Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
            MyBase.Dispose(disposing)
        End Sub

        'Required by the Windows Form Designer
        Private components As System.ComponentModel.IContainer

        'NOTE: The following procedure is required by the Windows Form Designer
        'It can be modified using the Windows Form Designer.
        'Do not modify it using the code editor.
        <System.Diagnostics.DebuggerStepThrough()>
        Private Sub InitializeComponent()
            Me.OK = New System.Windows.Forms.Button()
            Me.Cancel = New System.Windows.Forms.Button()
            Me.Tab = New System.Windows.Forms.TabControl()
            Me.tpPlugIns = New System.Windows.Forms.TabPage()
            Me.cmdConfigurePlugIn = New System.Windows.Forms.Button()
            Me.cmdRefreshPlugIns = New System.Windows.Forms.Button()
            Me.lvPlugIns = New System.Windows.Forms.ListView()
            Me.chPlugInName = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
            Me.chPlugInType = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
            Me.chExtendedInfo = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
            Me.lblPlugIns = New System.Windows.Forms.Label()
            Me.cmdBrowsePlugInPath = New System.Windows.Forms.Button()
            Me.txtPlugIsPath = New System.Windows.Forms.TextBox()
            Me.lblPlugInsPath = New System.Windows.Forms.Label()
            Me.tbLanguage = New System.Windows.Forms.TabPage()
            Me.lstLanguages = New System.Windows.Forms.ListBox()
            Me.lblSelectLanguage = New System.Windows.Forms.Label()
            Me.Tab.SuspendLayout()
            Me.tpPlugIns.SuspendLayout()
            Me.tbLanguage.SuspendLayout()
            Me.SuspendLayout()
            '
            'OK
            '
            Me.OK.DialogResult = System.Windows.Forms.DialogResult.OK
            Me.OK.Location = New System.Drawing.Point(262, 246)
            Me.OK.Name = "OK"
            Me.OK.Size = New System.Drawing.Size(75, 23)
            Me.OK.TabIndex = 2
            Me.OK.Text = "OK"
            '
            'Cancel
            '
            Me.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
            Me.Cancel.Location = New System.Drawing.Point(343, 246)
            Me.Cancel.Name = "Cancel"
            Me.Cancel.Size = New System.Drawing.Size(75, 23)
            Me.Cancel.TabIndex = 1
            Me.Cancel.Text = "Cancel"
            '
            'Tab
            '
            Me.Tab.Controls.Add(Me.tpPlugIns)
            Me.Tab.Controls.Add(Me.tbLanguage)
            Me.Tab.Location = New System.Drawing.Point(1, 2)
            Me.Tab.Name = "Tab"
            Me.Tab.SelectedIndex = 0
            Me.Tab.Size = New System.Drawing.Size(421, 238)
            Me.Tab.TabIndex = 3
            '
            'tpPlugIns
            '
            Me.tpPlugIns.Controls.Add(Me.cmdConfigurePlugIn)
            Me.tpPlugIns.Controls.Add(Me.cmdRefreshPlugIns)
            Me.tpPlugIns.Controls.Add(Me.lvPlugIns)
            Me.tpPlugIns.Controls.Add(Me.lblPlugIns)
            Me.tpPlugIns.Controls.Add(Me.cmdBrowsePlugInPath)
            Me.tpPlugIns.Controls.Add(Me.txtPlugIsPath)
            Me.tpPlugIns.Controls.Add(Me.lblPlugInsPath)
            Me.tpPlugIns.Location = New System.Drawing.Point(4, 22)
            Me.tpPlugIns.Name = "tpPlugIns"
            Me.tpPlugIns.Padding = New System.Windows.Forms.Padding(3)
            Me.tpPlugIns.Size = New System.Drawing.Size(413, 212)
            Me.tpPlugIns.TabIndex = 0
            Me.tpPlugIns.Text = "Plug-Ins"
            '
            'cmdConfigurePlugIn
            '
            Me.cmdConfigurePlugIn.Enabled = False
            Me.cmdConfigurePlugIn.Location = New System.Drawing.Point(250, 183)
            Me.cmdConfigurePlugIn.Name = "cmdConfigurePlugIn"
            Me.cmdConfigurePlugIn.Size = New System.Drawing.Size(75, 23)
            Me.cmdConfigurePlugIn.TabIndex = 6
            Me.cmdConfigurePlugIn.Text = "&Configure..."
            '
            'cmdRefreshPlugIns
            '
            Me.cmdRefreshPlugIns.Location = New System.Drawing.Point(331, 183)
            Me.cmdRefreshPlugIns.Name = "cmdRefreshPlugIns"
            Me.cmdRefreshPlugIns.Size = New System.Drawing.Size(75, 23)
            Me.cmdRefreshPlugIns.TabIndex = 5
            Me.cmdRefreshPlugIns.Text = "&Refresh"
            '
            'lvPlugIns
            '
            Me.lvPlugIns.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.chPlugInName, Me.chPlugInType, Me.chExtendedInfo})
            Me.lvPlugIns.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None
            Me.lvPlugIns.LabelWrap = False
            Me.lvPlugIns.Location = New System.Drawing.Point(10, 68)
            Me.lvPlugIns.MultiSelect = False
            Me.lvPlugIns.Name = "lvPlugIns"
            Me.lvPlugIns.Size = New System.Drawing.Size(397, 109)
            Me.lvPlugIns.TabIndex = 4
            Me.lvPlugIns.UseCompatibleStateImageBehavior = False
            '
            'chPlugInName
            '
            Me.chPlugInName.Text = "Name"
            '
            'chPlugInType
            '
            Me.chPlugInType.Text = "Type"
            '
            'chExtendedInfo
            '
            Me.chExtendedInfo.Text = "Extended Info"
            '
            'lblPlugIns
            '
            Me.lblPlugIns.AutoSize = True
            Me.lblPlugIns.Location = New System.Drawing.Point(9, 51)
            Me.lblPlugIns.Name = "lblPlugIns"
            Me.lblPlugIns.Size = New System.Drawing.Size(63, 13)
            Me.lblPlugIns.TabIndex = 3
            Me.lblPlugIns.Text = "Plug-Ins &list:"
            '
            'cmdBrowsePlugInPath
            '
            Me.cmdBrowsePlugInPath.Location = New System.Drawing.Point(384, 24)
            Me.cmdBrowsePlugInPath.Name = "cmdBrowsePlugInPath"
            Me.cmdBrowsePlugInPath.Size = New System.Drawing.Size(22, 23)
            Me.cmdBrowsePlugInPath.TabIndex = 2
            Me.cmdBrowsePlugInPath.Text = "..."
            Me.cmdBrowsePlugInPath.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
            Me.cmdBrowsePlugInPath.UseMnemonic = False
            '
            'txtPlugIsPath
            '
            Me.txtPlugIsPath.Location = New System.Drawing.Point(9, 24)
            Me.txtPlugIsPath.Name = "txtPlugIsPath"
            Me.txtPlugIsPath.Size = New System.Drawing.Size(373, 20)
            Me.txtPlugIsPath.TabIndex = 1
            '
            'lblPlugInsPath
            '
            Me.lblPlugInsPath.AutoSize = True
            Me.lblPlugInsPath.Location = New System.Drawing.Point(8, 7)
            Me.lblPlugInsPath.Name = "lblPlugInsPath"
            Me.lblPlugInsPath.Size = New System.Drawing.Size(72, 13)
            Me.lblPlugInsPath.TabIndex = 0
            Me.lblPlugInsPath.Text = "&Plug-Ins path:"
            '
            'tbLanguage
            '
            Me.tbLanguage.Controls.Add(Me.lstLanguages)
            Me.tbLanguage.Controls.Add(Me.lblSelectLanguage)
            Me.tbLanguage.Location = New System.Drawing.Point(4, 22)
            Me.tbLanguage.Name = "tbLanguage"
            Me.tbLanguage.Padding = New System.Windows.Forms.Padding(3)
            Me.tbLanguage.Size = New System.Drawing.Size(413, 212)
            Me.tbLanguage.TabIndex = 1
            Me.tbLanguage.Text = "Language"
            '
            'lstLanguages
            '
            Me.lstLanguages.FormattingEnabled = True
            Me.lstLanguages.Location = New System.Drawing.Point(9, 23)
            Me.lstLanguages.Name = "lstLanguages"
            Me.lstLanguages.Size = New System.Drawing.Size(397, 173)
            Me.lstLanguages.Sorted = True
            Me.lstLanguages.TabIndex = 1
            '
            'lblSelectLanguage
            '
            Me.lblSelectLanguage.AccessibleRole = System.Windows.Forms.AccessibleRole.List
            Me.lblSelectLanguage.AutoSize = True
            Me.lblSelectLanguage.Location = New System.Drawing.Point(8, 7)
            Me.lblSelectLanguage.Name = "lblSelectLanguage"
            Me.lblSelectLanguage.Size = New System.Drawing.Size(87, 13)
            Me.lblSelectLanguage.TabIndex = 0
            Me.lblSelectLanguage.Text = "&Select language:"
            '
            'Options
            '
            Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
            Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
            Me.ClientSize = New System.Drawing.Size(423, 276)
            Me.Controls.Add(Me.Tab)
            Me.Controls.Add(Me.OK)
            Me.Controls.Add(Me.Cancel)
            Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
            Me.MaximizeBox = False
            Me.MinimizeBox = False
            Me.Name = "Options"
            Me.Text = "Options"
            Me.Tab.ResumeLayout(False)
            Me.tpPlugIns.ResumeLayout(False)
            Me.tpPlugIns.PerformLayout()
            Me.tbLanguage.ResumeLayout(False)
            Me.tbLanguage.PerformLayout()
            Me.ResumeLayout(False)

        End Sub
        Friend WithEvents Cancel As System.Windows.Forms.Button
        Friend WithEvents OK As System.Windows.Forms.Button
        Friend WithEvents Tab As System.Windows.Forms.TabControl
        Friend WithEvents tpPlugIns As System.Windows.Forms.TabPage
        Friend WithEvents txtPlugIsPath As System.Windows.Forms.TextBox
        Friend WithEvents lblPlugInsPath As System.Windows.Forms.Label
        Friend WithEvents cmdBrowsePlugInPath As System.Windows.Forms.Button
        Friend WithEvents lblPlugIns As System.Windows.Forms.Label
        Friend WithEvents lvPlugIns As System.Windows.Forms.ListView
        Friend WithEvents chPlugInName As System.Windows.Forms.ColumnHeader
        Friend WithEvents chPlugInType As System.Windows.Forms.ColumnHeader
        Friend WithEvents cmdRefreshPlugIns As System.Windows.Forms.Button
        Friend WithEvents cmdConfigurePlugIn As System.Windows.Forms.Button
        Friend WithEvents chExtendedInfo As System.Windows.Forms.ColumnHeader
        Friend WithEvents tbLanguage As System.Windows.Forms.TabPage
        Friend WithEvents lblSelectLanguage As System.Windows.Forms.Label
        Friend WithEvents lstLanguages As System.Windows.Forms.ListBox
    End Class

End namespace


text:
import { ControllerHandler } from "./handlers/controllerHandler";
import { MethodHandler } from "./handlers/methodHandler";
import { ReflectiveInjector, Injectable } from 'injection-js';
import "reflect-metadata";

/**
 * @whatItDoes holds all the components (controllers, services, ...) and instances
 */

export class Container {
    /**
     * Array of components , each component holds its function constructor
     * and its dependencies
     */
    static components: any = [];

    /**
     * see ../handlers/controllerHandler.ts
     */
    static controllerHandlers: ControllerHandler[] = [];

    /**
     * each component (service ,controller,...) instansiated will be pushed here
     */
    static instances: any[] = [];

    /**
     * get an instance of the component
     */
    static get(token: string | Function) {

        let tokenName: string;

        if (typeof token !== "string") {
            tokenName = token["name"];
        }
        else {
            tokenName = token;
        }

        if (Container.instances[tokenName]) {
            return Container.instances[tokenName];
        }

        let component = Container.components[tokenName];

        if (component) {
            let _components = Object.keys(Container.components)
                                    .map(function(key){
                                        return Container.components[key];
                                    });

            const injector = ReflectiveInjector.resolveAndCreate(_components);
            return this.instances[tokenName] = injector.get(component);
        }

        return undefined;
    }
}


text:
DROP DATABASE IF EXISTS test1;
DROP DATABASE IF EXISTS test2;

DROP USER IF EXISTS alice;
CREATE USER alice WITH PASSWORD 'wonderland';
DROP USER IF EXISTS bob;
CREATE USER bob WITH PASSWORD 'ross';

CREATE DATABASE test1 WITH OWNER alice;
CREATE DATABASE test2 WITH OWNER bob;


text:
using Sniper.Common;

namespace Sniper.Contracts.Entities.Common
{
    public interface IHasSeverity
    {
        Severity Severity { get; set; }
    }
}


text:
module Api
  class BaseController
    module Normalizer
      #
      # Object or Hash Normalizer
      #

      # Note: revisit merging direct and virtual normalize hash methods here once support for
      # virtual subcollections is added.

      def normalize_hash(type, obj, opts = {})
        Environment.fetch_encrypted_attribute_names(obj.class)
        attrs = normalize_select_attributes(obj, opts)
        result = {}

        href = new_href(type, obj["id"], obj["href"], opts)
        if href.present?
          result["href"] = href
          attrs -= ["href"]
        end

        attrs.each do |k|
          value =  normalize_direct(type, k, obj.kind_of?(ActiveRecord::Base) ? obj.try(k) : obj[k])
          result[k] = value unless value.nil?
        end
        result
      end

      def normalize_virtual(vtype, name, obj, options = {})
        return normalize_virtual_array(vtype, name, obj, options) if obj.kind_of?(Array) || obj.kind_of?(ActiveRecord::Relation)
        return normalize_virtual_hash(vtype, obj, options) if obj.respond_to?(:attributes) || obj.respond_to?(:keys)
        normalize_attr_byname(name, obj)
      end

      def normalize_virtual_array(vtype, name, obj, options)
        obj.collect { |item| normalize_virtual(vtype, name, item, options) }
      end

      def normalize_virtual_hash(vtype, obj, options)
        Environment.fetch_encrypted_attribute_names(obj.class)
        attrs = (obj.respond_to?(:attributes) ? obj.attributes.keys : obj.keys)
        attrs.each_with_object({}) do |k, res|
          value = normalize_virtual(vtype, k, obj[k], options)
          res[k] = value unless options[:ignore_nil] && value.nil?
        end
      end

      #
      # Let's normalize the attribute based on its name
      #
      def normalize_attr_byname(attr, value)
        return if value.nil?
        if Environment.normalized_attributes[:time].key?(attr.to_s)
          normalize_time(value)
        elsif Environment.normalized_attributes[:url].key?(attr.to_s)
          normalize_url(value)
        elsif Environment.normalized_attributes[:encrypted].key?(attr.to_s) || attr.to_s.include?("password")
          normalize_encrypted
        elsif Environment.normalized_attributes[:resource].key?(attr.to_s)
          normalize_resource(value)
        else
          value
        end
      end

      #
      # Timetamps should all be in the XmlSchema form, an ISO 8601
      # UTC time representation as follows: 2014-01-30T18:57:55Z
      #
      # Function takes either a Time string or Seconds since Epoch
      #
      def normalize_time(value)
        return Time.at(value).utc.iso8601 if value.kind_of?(Integer)

        value.respond_to?(:utc) ? value.utc.iso8601 : value
      end

      #
      # Let's normalize a URL
      #
      # Note, all URL's are baselined as per the request specifying versioning and such.
      #
      def normalize_url(value)
        svalue = value.to_s
        pref   = @req.api_prefix
        svalue.match(pref) ? svalue : "#{pref}/#{svalue}"
      end

      #
      # Let's normalize an href based on type and id value
      #
      def normalize_href(type, value)
        normalize_url("#{type}/#{value}")
      end

      #
      # Let's normalize href accessible resources
      #
      def normalize_resource(value)
        value.to_s.starts_with?("/") ? "#{@req.base}#{value}" : value
      end

      #
      # Let's filter out encrypted attributes, i.e. passwords
      #
      def normalize_encrypted
        nil
      end

      private

      def normalize_select_attributes(obj, opts)
        if opts[:render_attributes].present?
          opts[:render_attributes]
        elsif obj.respond_to?(:attributes) && obj.class.respond_to?(:virtual_attribute_names)
          obj.attributes.keys - obj.class.virtual_attribute_names
        elsif obj.respond_to?(:attributes)
          obj.attributes.keys
        else
          obj.keys
        end
      end

      def normalize_direct(type, name, obj)
        return normalize_direct_array(type, name, obj) if obj.kind_of?(Array) || obj.kind_of?(ActiveRecord::Relation)
        return normalize_hash(type, obj) if obj.respond_to?(:attributes) || obj.respond_to?(:keys)
        normalize_attr_byname(name, obj)
      end

      def normalize_direct_array(type, name, obj)
        obj.collect { |item| normalize_direct(type, name, item) }
      end

      def new_href(type, current_id, current_href, opts)
        normalize_href(type, current_id) if opts[:add_href] && current_id.present? && current_href.blank?
      end
    end
  end
end


text:
import sys

class ArgumentSpec(object):

    def __init__(self, name, type='Keyword', positional=None, defaults=None,
                 varargs=None, kwargs=None, supports_named=True):
        self.name = name
        self.type = type
        self.positional = positional or []
        self.defaults = defaults or []
        self.varargs = varargs
        self.kwargs = kwargs
        self.supports_named = supports_named

    @property
    def minargs(self):
        return len(self.positional) - len(self.defaults)

    @property
    def maxargs(self):
        return len(self.positional) if not self.varargs else sys.maxint


text:
package com.alibaba.rocketmq.store.config;

/**
 * @author shijia.wxr
 */
public enum BrokerRole {
    ASYNC_MASTER,
    SYNC_MASTER,
    SLAVE;
}


text:
#pragma once

// ensure the MCU series is correct
#ifndef STM32PLUS_F4
#error This class can only be used with the STM32F4 series
#endif

namespace stm32plus {

  struct TIM2_PinPackage_Remap_None {
    typedef gpio::PA0 TIM2_ETR_Pin;
    typedef gpio::PA0 TIM2_CH1_Pin;
    typedef gpio::PA1 TIM2_CH2_Pin;
    typedef gpio::PA2 TIM2_CH3_Pin;
    typedef gpio::PA3 TIM2_CH4_Pin;
  };

  struct TIM2_PinPackage_Remap_Partial1 {
    typedef gpio::PA15 TIM2_ETR_Pin;
    typedef gpio::PA15 TIM2_CH1_Pin;
    typedef gpio::PB3 TIM2_CH2_Pin;
    typedef gpio::PA2 TIM2_CH3_Pin;
    typedef gpio::PA3 TIM2_CH4_Pin;
  };

  struct TIM2_PinPackage_Remap_Partial2 {
    typedef gpio::PA0 TIM2_ETR_Pin;
    typedef gpio::PA0 TIM2_CH1_Pin;
    typedef gpio::PA1 TIM2_CH2_Pin;
    typedef gpio::PB10 TIM2_CH3_Pin;
    typedef gpio::PB11 TIM2_CH4_Pin;
  };

  struct TIM2_PinPackage_Remap_Full {
    typedef gpio::PA15 TIM2_ETR_Pin;
    typedef gpio::PA15 TIM2_CH1_Pin;
    typedef gpio::PB3 TIM2_CH2_Pin;
    typedef gpio::PB10 TIM2_CH3_Pin;
    typedef gpio::PB11 TIM2_CH4_Pin;
  };

  /**
   * Initialise GPIO pins for this timer GPIO mode
   * @tparam TPinPackage A type containing pin definitions for this timer feature
   */

  template<typename TPinPackage>
  struct TIM2_ETR {

    TIM2_ETR() {
      GpioPinInitialiser::initialise(
          reinterpret_cast<GPIO_TypeDef *>(TPinPackage::TIM2_ETR_Pin::Port),
          TPinPackage::TIM2_ETR_Pin::Pin,
          Gpio::ALTERNATE_FUNCTION,
          (GPIOSpeed_TypeDef)PeripheralTraits<PERIPHERAL_TIMER2>::GPIO_SPEED,
          Gpio::PUPD_NONE,
          Gpio::PUSH_PULL,
          GpioAlternateFunctionMapper<PERIPHERAL_TIMER2,
          TPinPackage::TIM2_ETR_Pin::Port,
          TPinPackage::TIM2_ETR_Pin::Pin>::GPIO_AF);
      }
  };

  /**
   * Initialise GPIO pins for this timer GPIO mode
   * @tparam TPinPackage A type containing pin definitions for this timer feature
   */

  template<typename TPinPackage>
  struct TIM2_CH1_IN {

    TIM2_CH1_IN() {
      GpioPinInitialiser::initialise(
          reinterpret_cast<GPIO_TypeDef *>(TPinPackage::TIM2_CH1_Pin::Port),
          TPinPackage::TIM2_CH1_Pin::Pin,
          Gpio::ALTERNATE_FUNCTION,
          (GPIOSpeed_TypeDef)PeripheralTraits<PERIPHERAL_TIMER2>::GPIO_SPEED,
          Gpio::PUPD_NONE,
          Gpio::PUSH_PULL,
          GpioAlternateFunctionMapper<PERIPHERAL_TIMER2,
          TPinPackage::TIM2_CH1_Pin::Port,
          TPinPackage::TIM2_CH1_Pin::Pin>::GPIO_AF);
      }
  };

  template<typename TPinPackage> using TIM2_CH1_OUT=TIM2_CH1_IN<TPinPackage>;

  /**
   * Initialise GPIO pins for this timer GPIO mode
   * @tparam TPinPackage A type containing pin definitions for this timer feature
   */

  template<typename TPinPackage>
  struct TIM2_CH2_IN {

    TIM2_CH2_IN() {
      GpioPinInitialiser::initialise(
          reinterpret_cast<GPIO_TypeDef *>(TPinPackage::TIM2_CH2_Pin::Port),
          TPinPackage::TIM2_CH2_Pin::Pin,
          Gpio::ALTERNATE_FUNCTION,
          (GPIOSpeed_TypeDef)PeripheralTraits<PERIPHERAL_TIMER2>::GPIO_SPEED,
          Gpio::PUPD_NONE,
          Gpio::PUSH_PULL,
          GpioAlternateFunctionMapper<PERIPHERAL_TIMER2,
          TPinPackage::TIM2_CH2_Pin::Port,
          TPinPackage::TIM2_CH2_Pin::Pin>::GPIO_AF);
      }
  };

  template<typename TPinPackage> using TIM2_CH2_OUT=TIM2_CH2_IN<TPinPackage>;

  /**
   * Initialise GPIO pins for this timer GPIO mode
   * @tparam TPinPackage A type containing pin definitions for this timer feature
   */

  template<typename TPinPackage>
  struct TIM2_CH3_IN {

    TIM2_CH3_IN() {
      GpioPinInitialiser::initialise(
          reinterpret_cast<GPIO_TypeDef *>(TPinPackage::TIM2_CH3_Pin::Port),
          TPinPackage::TIM2_CH3_Pin::Pin,
          Gpio::ALTERNATE_FUNCTION,
          (GPIOSpeed_TypeDef)PeripheralTraits<PERIPHERAL_TIMER2>::GPIO_SPEED,
          Gpio::PUPD_NONE,
          Gpio::PUSH_PULL,
          GpioAlternateFunctionMapper<PERIPHERAL_TIMER2,
          TPinPackage::TIM2_CH3_Pin::Port,
          TPinPackage::TIM2_CH3_Pin::Pin>::GPIO_AF);
      }
  };

  template<typename TPinPackage> using TIM2_CH3_OUT=TIM2_CH3_IN<TPinPackage>;

  /**
   * Initialise GPIO pins for this timer GPIO mode
   * @tparam TPinPackage A type containing pin definitions for this timer feature
   */

  template<typename TPinPackage>
  struct TIM2_CH4_IN {

    TIM2_CH4_IN() {
      GpioPinInitialiser::initialise(
          reinterpret_cast<GPIO_TypeDef *>(TPinPackage::TIM2_CH4_Pin::Port),
          TPinPackage::TIM2_CH4_Pin::Pin,
          Gpio::ALTERNATE_FUNCTION,
          (GPIOSpeed_TypeDef)PeripheralTraits<PERIPHERAL_TIMER2>::GPIO_SPEED,
          Gpio::PUPD_NONE,
          Gpio::PUSH_PULL,
          GpioAlternateFunctionMapper<PERIPHERAL_TIMER2,
          TPinPackage::TIM2_CH4_Pin::Port,
          TPinPackage::TIM2_CH4_Pin::Pin>::GPIO_AF);
      }
  };

  template<typename TPinPackage> using TIM2_CH4_OUT=TIM2_CH4_IN<TPinPackage>;

  /**
   * Timer feature to enable any number of the GPIO alternate function outputs.
   * All remap levels are supported. An example declaration could be:
   *
   * Timer2GpioFeature<TIMER_REMAP_NONE,TIM2_CH1_OUT>
   */

  template<TimerGpioRemapLevel TRemapLevel,template<typename> class... Features>
  struct Timer2GpioFeature;

  template<template<typename> class... Features>
  struct Timer2GpioFeature<TIMER_REMAP_NONE,Features...> : TimerFeatureBase,Features<TIM2_PinPackage_Remap_None>... {
    Timer2GpioFeature(Timer& timer) : TimerFeatureBase(timer) {
    }
  };

  template<template<typename> class... Features>
  struct Timer2GpioFeature<TIMER_REMAP_PARTIAL1,Features...> : TimerFeatureBase,Features<TIM2_PinPackage_Remap_Partial1>... {
    Timer2GpioFeature(Timer& timer) : TimerFeatureBase(timer) {
    }
  };

  template<template<typename> class... Features>
  struct Timer2GpioFeature<TIMER_REMAP_PARTIAL2,Features...> : TimerFeatureBase,Features<TIM2_PinPackage_Remap_Partial2>... {
    Timer2GpioFeature(Timer& timer) : TimerFeatureBase(timer) {
    }
  };

  template<template<typename> class... Features>
  struct Timer2GpioFeature<TIMER_REMAP_FULL,Features...> : TimerFeatureBase,Features<TIM2_PinPackage_Remap_Full>... {
    Timer2GpioFeature(Timer& timer) : TimerFeatureBase(timer) {
    }
  };

  /**
   * Custom structure to allow any pin mapping.
   *
   * e.g:
   *    Timer14CustomGpioFeature<TIM14_CH1_OUT<Myclass>>
   * and in "MyClass" you would do a public declaration:
   *    typedef gpio::PF9 TIM14_CH1_Pin;
   */

  template<class... Features>
  struct Timer2CustomGpioFeature : TimerFeatureBase,Features... {
    Timer2CustomGpioFeature(Timer& timer) : TimerFeatureBase(timer) {
    }
  };
}


text:
namespace Humidifier.Cognito
{
    using System.Collections.Generic;
    using UserPoolRiskConfigurationAttachmentTypes;

    public class UserPoolRiskConfigurationAttachment : Humidifier.Resource
    {
        public override string AWSTypeName
        {
            get
            {
                return @"AWS::Cognito::UserPoolRiskConfigurationAttachment";
            }
        }

        /// <summary>
        /// CompromisedCredentialsRiskConfiguration
        /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolriskconfigurationattachment.html#cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfiguration
        /// Required: False
        /// UpdateType: Mutable
        /// Type: CompromisedCredentialsRiskConfigurationType
        /// </summary>
        public CompromisedCredentialsRiskConfigurationType CompromisedCredentialsRiskConfiguration
        {
            get;
            set;
        }

        /// <summary>
        /// UserPoolId
        /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolriskconfigurationattachment.html#cfn-cognito-userpoolriskconfigurationattachment-userpoolid
        /// Required: True
        /// UpdateType: Immutable
        /// PrimitiveType: String
        /// </summary>
        public dynamic UserPoolId
        {
            get;
            set;
        }

        /// <summary>
        /// ClientId
        /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolriskconfigurationattachment.html#cfn-cognito-userpoolriskconfigurationattachment-clientid
        /// Required: True
        /// UpdateType: Immutable
        /// PrimitiveType: String
        /// </summary>
        public dynamic ClientId
        {
            get;
            set;
        }

        /// <summary>
        /// AccountTakeoverRiskConfiguration
        /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolriskconfigurationattachment.html#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfiguration
        /// Required: False
        /// UpdateType: Mutable
        /// Type: AccountTakeoverRiskConfigurationType
        /// </summary>
        public AccountTakeoverRiskConfigurationType AccountTakeoverRiskConfiguration
        {
            get;
            set;
        }

        /// <summary>
        /// RiskExceptionConfiguration
        /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpoolriskconfigurationattachment.html#cfn-cognito-userpoolriskconfigurationattachment-riskexceptionconfiguration
        /// Required: False
        /// UpdateType: Mutable
        /// Type: RiskExceptionConfigurationType
        /// </summary>
        public RiskExceptionConfigurationType RiskExceptionConfiguration
        {
            get;
            set;
        }
    }

    namespace UserPoolRiskConfigurationAttachmentTypes
    {
        public class AccountTakeoverActionsType
        {
            /// <summary>
            /// HighAction
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype.html#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-highaction
            /// Required: False
            /// UpdateType: Mutable
            /// Type: AccountTakeoverActionType
            /// </summary>
            public AccountTakeoverActionType HighAction
            {
                get;
                set;
            }

            /// <summary>
            /// LowAction
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype.html#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-lowaction
            /// Required: False
            /// UpdateType: Mutable
            /// Type: AccountTakeoverActionType
            /// </summary>
            public AccountTakeoverActionType LowAction
            {
                get;
                set;
            }

            /// <summary>
            /// MediumAction
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype.html#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractionstype-mediumaction
            /// Required: False
            /// UpdateType: Mutable
            /// Type: AccountTakeoverActionType
            /// </summary>
            public AccountTakeoverActionType MediumAction
            {
                get;
                set;
            }
        }

        public class RiskExceptionConfigurationType
        {
            /// <summary>
            /// BlockedIPRangeList
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype.html#cfn-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype-blockediprangelist
            /// Required: False
            /// UpdateType: Mutable
            /// Type: List
            /// PrimitiveItemType: String
            /// </summary>
            public dynamic BlockedIPRangeList
            {
                get;
                set;
            }

            /// <summary>
            /// SkippedIPRangeList
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype.html#cfn-cognito-userpoolriskconfigurationattachment-riskexceptionconfigurationtype-skippediprangelist
            /// Required: False
            /// UpdateType: Mutable
            /// Type: List
            /// PrimitiveItemType: String
            /// </summary>
            public dynamic SkippedIPRangeList
            {
                get;
                set;
            }
        }

        public class NotifyEmailType
        {
            /// <summary>
            /// TextBody
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-notifyemailtype.html#cfn-cognito-userpoolriskconfigurationattachment-notifyemailtype-textbody
            /// Required: False
            /// UpdateType: Mutable
            /// PrimitiveType: String
            /// </summary>
            public dynamic TextBody
            {
                get;
                set;
            }

            /// <summary>
            /// HtmlBody
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-notifyemailtype.html#cfn-cognito-userpoolriskconfigurationattachment-notifyemailtype-htmlbody
            /// Required: False
            /// UpdateType: Mutable
            /// PrimitiveType: String
            /// </summary>
            public dynamic HtmlBody
            {
                get;
                set;
            }

            /// <summary>
            /// Subject
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-notifyemailtype.html#cfn-cognito-userpoolriskconfigurationattachment-notifyemailtype-subject
            /// Required: True
            /// UpdateType: Mutable
            /// PrimitiveType: String
            /// </summary>
            public dynamic Subject
            {
                get;
                set;
            }
        }

        public class AccountTakeoverActionType
        {
            /// <summary>
            /// Notify
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype.html#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype-notify
            /// Required: True
            /// UpdateType: Mutable
            /// PrimitiveType: Boolean
            /// </summary>
            public dynamic Notify
            {
                get;
                set;
            }

            /// <summary>
            /// EventAction
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype.html#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoveractiontype-eventaction
            /// Required: True
            /// UpdateType: Mutable
            /// PrimitiveType: String
            /// </summary>
            public dynamic EventAction
            {
                get;
                set;
            }
        }

        public class CompromisedCredentialsRiskConfigurationType
        {
            /// <summary>
            /// Actions
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype.html#cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype-actions
            /// Required: True
            /// UpdateType: Mutable
            /// Type: CompromisedCredentialsActionsType
            /// </summary>
            public CompromisedCredentialsActionsType Actions
            {
                get;
                set;
            }

            /// <summary>
            /// EventFilter
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype.html#cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsriskconfigurationtype-eventfilter
            /// Required: False
            /// UpdateType: Mutable
            /// Type: List
            /// PrimitiveItemType: String
            /// </summary>
            public dynamic EventFilter
            {
                get;
                set;
            }
        }

        public class CompromisedCredentialsActionsType
        {
            /// <summary>
            /// EventAction
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-compromisedcredentialsactionstype.html#cfn-cognito-userpoolriskconfigurationattachment-compromisedcredentialsactionstype-eventaction
            /// Required: True
            /// UpdateType: Mutable
            /// PrimitiveType: String
            /// </summary>
            public dynamic EventAction
            {
                get;
                set;
            }
        }

        public class NotifyConfigurationType
        {
            /// <summary>
            /// BlockEmail
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype.html#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-blockemail
            /// Required: False
            /// UpdateType: Mutable
            /// Type: NotifyEmailType
            /// </summary>
            public NotifyEmailType BlockEmail
            {
                get;
                set;
            }

            /// <summary>
            /// ReplyTo
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype.html#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-replyto
            /// Required: False
            /// UpdateType: Mutable
            /// PrimitiveType: String
            /// </summary>
            public dynamic ReplyTo
            {
                get;
                set;
            }

            /// <summary>
            /// SourceArn
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype.html#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-sourcearn
            /// Required: True
            /// UpdateType: Mutable
            /// PrimitiveType: String
            /// </summary>
            public dynamic SourceArn
            {
                get;
                set;
            }

            /// <summary>
            /// NoActionEmail
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype.html#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-noactionemail
            /// Required: False
            /// UpdateType: Mutable
            /// Type: NotifyEmailType
            /// </summary>
            public NotifyEmailType NoActionEmail
            {
                get;
                set;
            }

            /// <summary>
            /// From
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype.html#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-from
            /// Required: False
            /// UpdateType: Mutable
            /// PrimitiveType: String
            /// </summary>
            public dynamic From
            {
                get;
                set;
            }

            /// <summary>
            /// MfaEmail
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype.html#cfn-cognito-userpoolriskconfigurationattachment-notifyconfigurationtype-mfaemail
            /// Required: False
            /// UpdateType: Mutable
            /// Type: NotifyEmailType
            /// </summary>
            public NotifyEmailType MfaEmail
            {
                get;
                set;
            }
        }

        public class AccountTakeoverRiskConfigurationType
        {
            /// <summary>
            /// Actions
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype.html#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype-actions
            /// Required: True
            /// UpdateType: Mutable
            /// Type: AccountTakeoverActionsType
            /// </summary>
            public AccountTakeoverActionsType Actions
            {
                get;
                set;
            }

            /// <summary>
            /// NotifyConfiguration
            /// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype.html#cfn-cognito-userpoolriskconfigurationattachment-accounttakeoverriskconfigurationtype-notifyconfiguration
            /// Required: False
            /// UpdateType: Mutable
            /// Type: NotifyConfigurationType
            /// </summary>
            public NotifyConfigurationType NotifyConfiguration
            {
                get;
                set;
            }
        }
    }
}


text:
Contato

Vamos fazer algo excepcional juntos.

                  Carregando…


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 330543 $ -->
<refentry xml:id="function.sqlite-last-insert-rowid" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>sqlite_last_insert_rowid</refname>
  <refname>SQLiteDatabase::lastInsertRowid</refname>
  <refpurpose>Returns the rowid of the most recently inserted row</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>int</type><methodname>sqlite_last_insert_rowid</methodname>
   <methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
  </methodsynopsis>
  <para>&style.oop; (method):</para>
  <methodsynopsis>
   <modifier>public</modifier> <type>int</type><methodname>SQLiteDatabase::lastInsertRowid</methodname>
   <void/>
  </methodsynopsis>
  <para>
   Returns the rowid of the row that was most recently inserted into the
   database <parameter>dbhandle</parameter>, if it was created as an
   auto-increment field.
  </para>
  <tip>
   <para>
    You can create auto-increment fields in SQLite by declaring them as
    <literal>INTEGER PRIMARY KEY</literal> in your table schema.
   </para>
  </tip>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>dbhandle</parameter></term>
     <listitem>
      <para>
       The SQLite Database resource; returned from <function>sqlite_open</function>
       when used procedurally.  This parameter is not required
       when using the object-oriented method.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns the row id, as an integer.
  </para>
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
 Local variables:
 mode: sgml
 sgml-omittag:t
 sgml-shorttag:t
 sgml-minimize-attributes:nil
 sgml-always-quote-attributes:t
 sgml-indent-step:1
 sgml-indent-data:t
 sgml-parent-document:nil
 sgml-default-dtd-file:"~/.phpdoc/manual.ced"
 sgml-exposed-tags:nil
 sgml-local-catalogs:nil
 sgml-local-ecat-files:nil
 End:
 vim600: syn=xml fen fdm=syntax fdl=2 si
 vim: et tw=78 syn=sgml
 vi: ts=1 sw=1
 -->