text:
void UART16550_Init(UART16550_REGS_TypeDef * uart){

  //
  // FIFO Control, interrupt for each byte and clear FIFOs
  //
  uart->reg2.fifo_control = (UART16550_FIFO_CONTROL_CLEAR_RECIEVER |
                             UART16550_FIFO_CONTROL_CLEAR_TRANSMIT |
                             UART16550_FIFO_CONTROL_RX_TRIGGER_1);
  //
  // Set baud rate divisor
  //
  UART16550_SetDivisor(UART, 0x001A);

  //
  // Line Control Register 8 data, 1 stop, no parity
  //
  uart->line_control |= (UART16550_LINE_CONTROL_8BITS |
                         UART16550_LINE_CONTROL_1_STOP);
  return;
}

void UART16550_InterruptEnable(UART16550_REGS_TypeDef * uart, uint8_t irq){
  //
  //Turn on Interrupt
  //
  uart->reg1.interrupt_enable |= irq;

  return;
}

void UART16550_InterruptDisable(UART16550_REGS_TypeDef * uart, uint8_t irq){
  //
  //Turn off  Interrupt
  //
  uart->reg1.interrupt_enable &= ~irq;

  return;
}

void UART16550_SetDivisor(UART16550_REGS_TypeDef * uart, uint16_t divisor){
  //
  // Line Control enable writing to baud rate registers
  //
  uart->line_control |= UART16550_LINE_CONTROL_DLAB;

  //
  // Writing baud rate to low byte
  //
  uart->reg0.divisor_lsb = divisor & 0x00FF;

  //
  // Writing baud rate to the high byte
  //
  uart->reg1.divisor_msb = 0;//(divisor & 0xFF00) >> 8;

  //
  // Disable DLAB bit
  //
  uart->line_control &= ~UART16550_LINE_CONTROL_DLAB;

  return;
}

void UART16550_TransmitByte(UART16550_REGS_TypeDef * uart, uint8_t byte){

  //
  // Disable DLAB bit
  //
  uart->line_control &= ~UART16550_LINE_CONTROL_DLAB;

  //
  // Write byte to transmit FIFO
  //
  uart->reg0.data = byte;

  //
  // Wait for FIFO and Transmitter to be empty
  //
  while ((uart->line_status & UART16550_LINE_STATUS_TX) == 0);

  return;
}

void UART16550_ReceiveByte(UART16550_REGS_TypeDef * uart, uint8_t * byte){
  *byte = uart->reg0.data;
  return;
}

void UART16550_PollForReceive(UART16550_REGS_TypeDef * uart){

  //
  // We poll forever until a character has been received
  //
  while ((uart->line_status & UART16550_LINE_STATUS_DATA_READY) ==0);

  return;
}


text: Tests that comments in stylesheets are parsed correctly by the DevTools.

redpajama_set_name: RedPajamaGithub


text:
// http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
"use strict";

// Optional. You will see this name in eg. 'ps' or 'top' command
process.title = 'realtime-drawing';

// Port where we'll run the websocket server
var webSocketsServerPort = 27285;

// websocket and http servers
var webSocketServer = require('websocket').server;
var http = require('http');

// list of currently connected clients (users)
var clients = [ ];

/**
 * HTTP server
 */
var httpServer = http.createServer(function(request, response) {
});

httpServer.listen(webSocketsServerPort, function() {
    console.log((new Date()) + " Server is listening on port " + webSocketsServerPort);
});

/**
 * WebSocket server
 */
var wsServer = new webSocketServer({
    httpServer:  httpServer
});

// This callback function is called every time someone
// tries to connect to the WebSocket server
wsServer.on('request', function(request) {
    var connection = request.accept(null, request.origin);
    // we need to know client index to remove them on 'close' event
    var index = clients.push(connection) - 1;
    console.log((new Date()) + " Peer " + index + " connected.");

    // user sent some message
    connection.on('message', function(message) {
        for (var i=0; i < clients.length; i++) {
            clients[i].send(message.utf8Data);
        }
    });

    // user disconnected
    connection.on('close', function(connection) {
        console.log((new Date()) + " Peer " + index + " disconnected.");
        // remove user from the list of connected clients
        clients.splice(index, 1);
    });

});


text:
import {UserService, User} from './../user/user.service'
import {Router} from '@angular/router'
import {TimeService} from './../time/time.service'
import {Observable} from 'rxjs/Observable'
import {Component, OnInit, OnDestroy} from '@angular/core'
import 'rxjs/add/operator/take'

import {TournamentService, Zone} from './tournament.service'
import {Subscription} from 'rxjs/Subscription'

@Component({
  selector: 'home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.scss'],
})
export class HomeComponent implements OnInit, OnDestroy {
  information: Observable<string>
  isLoading: boolean = true
  zones$: Observable<Zone[]>
  user$: Observable<User>

  zoneId: string
  private subcription: Subscription

  constructor(
    private tournamentService: TournamentService,
    private timeService: TimeService,
    private router: Router,
    private userService: UserService
  ) {}

  ngOnInit() {
    this.information = this.tournamentService
      .getTournament()
      .map((t) => t.information)
    this.information.take(1).subscribe((_) => (this.isLoading = false))
    this.zones$ = this.tournamentService.getZones()
    this.subcription = this.zones$.subscribe((zones) => {
      if (zones.length <= 2 && zones.length > 1) {
        this.zoneId = zones[0].key
      }
    })
    this.user$ = this.userService.user
  }

  addTime() {
    this.timeService.openDialog()
  }

  goToZone() {
    this.router.navigate([
      '/tournament',
      this.tournamentService.key,
      'zone',
      this.zoneId,
    ])
  }

  goToCoverage() {
    this.router.navigate([
      '/tournament',
      this.tournamentService.key,
      'coverage',
    ])
  }

  ngOnDestroy() {
    this.subcription.unsubscribe()
  }
}


text:
package kafka.security.auth

import java.nio.charset.StandardCharsets
import kafka.admin.ZkSecurityMigrator
import kafka.server.QuorumTestHarness
import kafka.utils.{Logging, TestUtils}
import kafka.zk._
import org.apache.kafka.common.{KafkaException, TopicPartition, Uuid}
import org.apache.kafka.common.security.JaasUtils
import org.apache.zookeeper.data.{ACL, Stat}
import org.junit.jupiter.api.Assertions._
import org.junit.jupiter.api.{AfterEach, BeforeEach, Test, TestInfo}

import scala.util.{Failure, Success, Try}
import javax.security.auth.login.Configuration
import kafka.api.ApiVersion
import kafka.cluster.{Broker, EndPoint}
import kafka.controller.ReplicaAssignment
import org.apache.kafka.common.network.ListenerName
import org.apache.kafka.common.security.auth.SecurityProtocol
import org.apache.kafka.common.utils.Time
import org.apache.zookeeper.client.ZKClientConfig

import scala.jdk.CollectionConverters._
import scala.collection.Seq

class ZkAuthorizationTest extends QuorumTestHarness with Logging {
  val jaasFile = kafka.utils.JaasTestUtils.writeJaasContextsToFile(kafka.utils.JaasTestUtils.zkSections)
  val authProvider = "zookeeper.authProvider.1"

  @BeforeEach
  override def setUp(testInfo: TestInfo): Unit = {
    System.setProperty(JaasUtils.JAVA_LOGIN_CONFIG_PARAM, jaasFile.getAbsolutePath)
    Configuration.setConfiguration(null)
    System.setProperty(authProvider, "org.apache.zookeeper.server.auth.SASLAuthenticationProvider")
    super.setUp(testInfo)
  }

  @AfterEach
  override def tearDown(): Unit = {
    super.tearDown()
    System.clearProperty(JaasUtils.JAVA_LOGIN_CONFIG_PARAM)
    System.clearProperty(authProvider)
    Configuration.setConfiguration(null)
  }

  /**
   * Tests the method in JaasUtils that checks whether to use
   * secure ACLs and authentication with ZooKeeper.
   */
  @Test
  def testIsZkSecurityEnabled(): Unit = {
    assertTrue(JaasUtils.isZkSaslEnabled())
    Configuration.setConfiguration(null)
    System.clearProperty(JaasUtils.JAVA_LOGIN_CONFIG_PARAM)
    assertFalse(JaasUtils.isZkSaslEnabled())
    Configuration.setConfiguration(null)
    System.setProperty(JaasUtils.JAVA_LOGIN_CONFIG_PARAM, "no-such-file-exists.conf")
    assertThrows(classOf[KafkaException], () => JaasUtils.isZkSaslEnabled())
  }

  /**
   * Exercises the code in KafkaZkClient. The goal is mainly
   * to verify that the behavior of KafkaZkClient is correct
   * when isSecure is set to true.
   */
  @Test
  def testKafkaZkClient(): Unit = {
    assertTrue(zkClient.secure)
    for (path <- ZkData.PersistentZkPaths) {
      zkClient.makeSurePersistentPathExists(path)
      if (ZkData.sensitivePath(path)) {
        val aclList = zkClient.getAcl(path)
        assertEquals(1, aclList.size, s"Unexpected acl list size for $path")
        for (acl <- aclList)
          assertTrue(TestUtils.isAclSecure(acl, sensitive = true))
      } else if (!path.equals(ConsumerPathZNode.path)) {
        val aclList = zkClient.getAcl(path)
        assertEquals(2, aclList.size, s"Unexpected acl list size for $path")
        for (acl <- aclList)
          assertTrue(TestUtils.isAclSecure(acl, sensitive = false))
      }
    }

    // Test that creates Ephemeral node
    val brokerInfo = createBrokerInfo(1, "test.host", 9999, SecurityProtocol.PLAINTEXT)
    zkClient.registerBroker(brokerInfo)
    verify(brokerInfo.path)

    // Test that creates persistent nodes
    val topic1 = "topic1"
    val topicId = Some(Uuid.randomUuid())
    val assignment = Map(
      new TopicPartition(topic1, 0) -> Seq(0, 1),
      new TopicPartition(topic1, 1) -> Seq(0, 1),
      new TopicPartition(topic1, 2) -> Seq(1, 2, 3)
    )

    // create a topic assignment
    zkClient.createTopicAssignment(topic1, topicId, assignment)
    verify(TopicZNode.path(topic1))

    // Test that can create: createSequentialPersistentPath
    val seqPath = zkClient.createSequentialPersistentPath("/c", "".getBytes(StandardCharsets.UTF_8))
    verify(seqPath)

    // Test that can update Ephemeral node
    val updatedBrokerInfo = createBrokerInfo(1, "test.host2", 9995, SecurityProtocol.SSL)
    zkClient.updateBrokerInfo(updatedBrokerInfo)
    assertEquals(Some(updatedBrokerInfo.broker), zkClient.getBroker(1))

    // Test that can update persistent nodes
    val updatedAssignment = assignment - new TopicPartition(topic1, 2)
    zkClient.setTopicAssignment(topic1, topicId,
      updatedAssignment.map { case (k, v) => k -> ReplicaAssignment(v, List(), List()) })
    assertEquals(updatedAssignment.size, zkClient.getTopicPartitionCount(topic1).get)
  }

  private def createBrokerInfo(id: Int, host: String, port: Int, securityProtocol: SecurityProtocol,
                               rack: Option[String] = None): BrokerInfo =
    BrokerInfo(Broker(id, Seq(new EndPoint(host, port, ListenerName.forSecurityProtocol
    (securityProtocol), securityProtocol)), rack = rack), ApiVersion.latestVersion, jmxPort = port + 10)

  private def newKafkaZkClient(connectionString: String, isSecure: Boolean) =
    KafkaZkClient(connectionString, isSecure, 6000, 6000, Int.MaxValue, Time.SYSTEM, "ZkAuthorizationTest",
      new ZKClientConfig)

  /**
   * Tests the migration tool when making an unsecure
   * cluster secure.
   */
  @Test
  def testZkMigration(): Unit = {
    val unsecureZkClient = newKafkaZkClient(zkConnect, isSecure = false)
    try {
      testMigration(zkConnect, unsecureZkClient, zkClient)
    } finally {
      unsecureZkClient.close()
    }
  }

  /**
   * Tests the migration tool when making a secure
   * cluster unsecure.
   */
  @Test
  def testZkAntiMigration(): Unit = {
    val unsecureZkClient = newKafkaZkClient(zkConnect, isSecure = false)
    try {
      testMigration(zkConnect, zkClient, unsecureZkClient)
    } finally {
      unsecureZkClient.close()
    }
  }

  /**
   * Tests that the persistent paths cannot be deleted.
   */
  @Test
  def testDelete(): Unit = {
    info(s"zkConnect string: $zkConnect")
    ZkSecurityMigrator.run(Array("--zookeeper.acl=secure", s"--zookeeper.connect=$zkConnect"))
    deleteAllUnsecure()
  }

  /**
   * Tests that znodes cannot be deleted when the
   * persistent paths have children.
   */
  @Test
  def testDeleteRecursive(): Unit = {
    info(s"zkConnect string: $zkConnect")
    for (path <- ZkData.SecureRootPaths) {
      info(s"Creating $path")
      zkClient.makeSurePersistentPathExists(path)
      zkClient.createRecursive(s"$path/fpjwashere", "".getBytes(StandardCharsets.UTF_8))
    }
    zkClient.setAcl("/", zkClient.defaultAcls("/"))
    deleteAllUnsecure()
  }

  /**
   * Tests the migration tool when chroot is being used.
   */
  @Test
  def testChroot(): Unit = {
    val zkUrl = zkConnect + "/kafka"
    zkClient.createRecursive("/kafka")
    val unsecureZkClient = newKafkaZkClient(zkUrl, isSecure = false)
    val secureZkClient = newKafkaZkClient(zkUrl, isSecure = true)
    try {
      testMigration(zkUrl, unsecureZkClient, secureZkClient)
    } finally {
      unsecureZkClient.close()
      secureZkClient.close()
    }
  }

  /**
   * Exercises the migration tool. It is used in these test cases:
   * testZkMigration, testZkAntiMigration, testChroot.
   */
  private def testMigration(zkUrl: String, firstZk: KafkaZkClient, secondZk: KafkaZkClient): Unit = {
    info(s"zkConnect string: $zkUrl")
    for (path <- ZkData.SecureRootPaths ++ ZkData.SensitiveRootPaths) {
      info(s"Creating $path")
      firstZk.makeSurePersistentPathExists(path)
      // Create a child for each znode to exercise the recurrent
      // traversal of the data tree
      firstZk.createRecursive(s"$path/fpjwashere", "".getBytes(StandardCharsets.UTF_8))
    }
    // Getting security option to determine how to verify ACLs.
    // Additionally, we create the consumers znode (not in
    // securePersistentZkPaths) to make sure that we don't
    // add ACLs to it.
    val secureOpt: String =
      if (secondZk.secure) {
        firstZk.createRecursive(ConsumerPathZNode.path)
        "secure"
      } else {
        secondZk.createRecursive(ConsumerPathZNode.path)
        "unsecure"
      }
    ZkSecurityMigrator.run(Array(s"--zookeeper.acl=$secureOpt", s"--zookeeper.connect=$zkUrl"))
    info("Done with migration")
    for (path <- ZkData.SecureRootPaths ++ ZkData.SensitiveRootPaths) {
      val sensitive = ZkData.sensitivePath(path)
      val listParent = secondZk.getAcl(path)
      assertTrue(isAclCorrect(listParent, secondZk.secure, sensitive), path)

      val childPath = path + "/fpjwashere"
      val listChild = secondZk.getAcl(childPath)
      assertTrue(isAclCorrect(listChild, secondZk.secure, sensitive), childPath)
    }
    // Check consumers path.
    val consumersAcl = firstZk.getAcl(ConsumerPathZNode.path)
    assertTrue(isAclCorrect(consumersAcl, false, false), ConsumerPathZNode.path)
    assertTrue(isAclCorrect(firstZk.getAcl("/kafka-acl-extended"), secondZk.secure,
      ZkData.sensitivePath(ExtendedAclZNode.path)), "/kafka-acl-extended")
  }

  /**
   * Verifies that the path has the appropriate secure ACL.
   */
  private def verify(path: String): Unit = {
    val sensitive = ZkData.sensitivePath(path)
    val list = zkClient.getAcl(path)
    assertTrue(list.forall(TestUtils.isAclSecure(_, sensitive)))
  }

  /**
   * Verifies ACL.
   */
  private def isAclCorrect(list: Seq[ACL], secure: Boolean, sensitive: Boolean): Boolean = {
    val isListSizeCorrect =
      if (secure && !sensitive)
        list.size == 2
      else
        list.size == 1
    isListSizeCorrect && list.forall(
      if (secure)
        TestUtils.isAclSecure(_, sensitive)
      else
        TestUtils.isAclUnsecure
    )
  }

  /**
   * Sets up and starts the recursive execution of deletes.
   * This is used in the testDelete and testDeleteRecursive
   * test cases.
   */
  private def deleteAllUnsecure(): Unit = {
    System.setProperty(JaasUtils.ZK_SASL_CLIENT, "false")
    val unsecureZkClient = newKafkaZkClient(zkConnect, isSecure = false)
    val result: Try[Boolean] = {
      deleteRecursive(unsecureZkClient, "/")
    }
    // Clean up before leaving the test case
    unsecureZkClient.close()
    System.clearProperty(JaasUtils.ZK_SASL_CLIENT)

    // Fail the test if able to delete
    result match {
      case Success(_) => // All done
      case Failure(e) => fail(e.getMessage)
    }
  }

  /**
   * Tries to delete znodes recursively
   */
  private def deleteRecursive(zkClient: KafkaZkClient, path: String): Try[Boolean] = {
    info(s"Deleting $path")
    var result: Try[Boolean] = Success(true)
    for (child <- zkClient.getChildren(path))
      result = (path match {
        case "/" => deleteRecursive(zkClient, s"/$child")
        case path => deleteRecursive(zkClient, s"$path/$child")
      }) match {
        case Success(_) => result
        case Failure(e) => Failure(e)
      }
    path match {
      // Do not try to delete the root
      case "/" => result
      // For all other paths, try to delete it
      case path =>
        try {
          zkClient.deletePath(path, recursiveDelete = false)
          Failure(new Exception(s"Have been able to delete $path"))
        } catch {
          case _: Exception => result
        }
    }
  }

  @Test
  def testConsumerOffsetPathAcls(): Unit = {
    zkClient.makeSurePersistentPathExists(ConsumerPathZNode.path)

    val consumerPathAcls = zkClient.currentZooKeeper.getACL(ConsumerPathZNode.path, new Stat())
    assertTrue(consumerPathAcls.asScala.forall(TestUtils.isAclUnsecure), "old consumer znode path acls are not open")
  }
}


text:
% Sebastian Daza - Curriculum Vitae

\documentclass[10pt,letterpaper]{article}
\usepackage{hyperref}
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{mathptmx}

% Fonts
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% \usepackage{fontspec}
%\usepackage{mathpazo}
% \usepackage[urw-garamond]{mathdesign}
\usepackage{ebgaramond}
%\usepackage{fourier}

% Set your name here
\def\name{Sebastian Daza}

% The following metadata will show up in the PDF properties
\hypersetup{
  colorlinks = true,
  urlcolor = black,
  pdfauthor = {\name},
  pdfkeywords = {sociology, demography, quantitative methods, criminology},
  pdftitle = {\name: Curriculum Vitae},
  pdfsubject = {Curriculum Vitae},
  pdfpagemode = UseNone
}

\geometry{
  body={6.5in, 9.0in},
  left=1.0in,
  top=1.0in
}

% Customize page headers
\pagestyle{myheadings}
\markright{\name}
\thispagestyle{empty}

% Custom section fonts
\usepackage{sectsty}
\sectionfont{\rmfamily\mdseries\Large}
\subsectionfont{\rmfamily\mdseries\itshape\large}

% Other possible font commands include:
% \ttfamily for teletype,
% \sffamily for sans serif,
% \bfseries for bold,
% \scshape for small caps,
% \normalsize, \large, \Large, \LARGE sizes.

% Don't indent paragraphs.
\setlength\parindent{0em}

% Make lists without bullets and compact spacing
\renewenvironment{itemize}{
  \begin{list}{}{
    \setlength{\leftmargin}{1.5em}
    \setlength{\itemsep}{0.25em}
    \setlength{\parskip}{0pt}
    \setlength{\parsep}{0.25em}
  }
}{
  \end{list}
}

\begin{document}

% Place name at left
%{\huge \name}

% Alternatively, print name centered and bold:
\centerline{\huge \name}

\bigskip
\bigskip

\begin{minipage}[t]{.75\textwidth}
  Department of Sociology \\
  University of Wisconsin-Madison \\
  1180 Observatory Drive \\
  Madison, WI 53706-1393 \\
\end{minipage}
\begin{minipage}[t]{0.3\textwidth}
  % Phone: (608) 628-8548 \\
  Email: \href{mailto:sdaza@ssc.wisc.edu}{sdaza@ssc.wisc.edu} \\
  \href{https://sdaza.com/}{https://sdaza.com} \\

\end{minipage}

\bigskip
\bigskip

\section*{Education}

\begin{itemize}
  \item Ph.D., Sociology - Demography, University Wisconsin--Madison, 2021.
  \item Fellow, \href{https://www.thedataincubator.com/fellowship.html}{The Data Incubator}, 2017.
    % Received May 16, 2010
  \item M.A. Sociology, Catholic University of Chile, 2009.
    % Received May 14, 2006
  \item B.S. Sociology, Catholic University of Chile, 2004.
    % Received May 14, 2004
\end{itemize}

\section*{Fields of Research Interest}

\begin{itemize}
\item Social Demography, Health, Social Complexity, Social Networks, Deviance and Crime, Surveys and Methods.
\end{itemize}

\section*{Research}

\subsection*{Peer-Reviewed Articles}

\begin{itemize}

\item Daza, Sebastian, Alberto Palloni and Jerrett Jones (2020).
  \textit{\href{https://rdcu.be/b278V}
  {The Consequences of Incarceration for Mortality for the United States}
  }.
  Demography.

\item Venkataramani, Atheendar S., Sebastian Daza and Ezekiel Emanuel (2020).
  \textit{
  \href{doi:10.1001/jamainternmed.2019.6532}
  {Association of Social Mobility With the Income-Related Longevity Gap in the United States: A Cross-Sectional, County-Level Study}
  }.
 JAMA Internal Medicine.

\item Larroulet, Pilar, Droppelmann, Catalina, Del Villar, Paloma, Daza, Sebastian, Figueroa, Ana, and Osorio, Victoria (2020).
    \textit{
  \href{https://www.crimejusticejournal.com/article/view/1467}
  {Who Is Transitioning out of Prison? Characterising Female Offenders and Their Needs in Chile}
  }.
International Journal for Crime, Justice and Social Democracy.

 \item Daza, Sebastian and Kurt Kreuger (2019).
  \textit{
  \href{https://doi.org/10.1177/0049124119826147}
  {Agent-Based Models for Assessing Complex Statistical Models: An Example Evaluating Selection and Social Influence Estimates from the SIENA model}
  }.
 Sociological Methods and Research.

\end{itemize}

\subsection*{Work in progress}

\begin{itemize}

\item Daza, Sebastian and Alberto Palloni (2021). {\textit{Early Exposure to County Income Mobility and Adult Individual Health in the United States.}}
\item Larroulet, Pilar, Sebastian Daza and Ignacio Borquez (2021). {\textit{Employment Trajectories among Females Returning from Prison.}}
\item Voigt, Mathias, Daza, Sebastian, Ordanovich, Dariya, and Palloni, Alberto (2021). {\textit{Trends in Education-Specific Differences in Disability-Free Life Expectancy in Spain, 2008-2017}}.
\item Daza, Sebastian and Alberto Palloni (2019). {\textit{Income Inequality, Income Mobility, and Mortality in the U.S.}} Under review.
\item Palloni, Alberto, Hiram Beltrán-Sánchezx and Sebastian Daza (2021). {\textit{Uncertainty and Mortality Estimates in the Latin American and Caribbean (LAC) Region.}}

\end{itemize}

\subsection*{Other Publications and Reports}

\begin{itemize}

\item Somma, Nicolas and Sebastian Daza (2011).
  \textit{
  \href{https://sdaza.com/assets/pdf/articulo-nicolas-somma.pdf}
  {Why did the Concertación Lose? Age, Egotropic Vote, and Political Divisions in the 2009--2010 Chilean Election}
  }.
  Cuadernos ISUC, Vol. 1, Num. 3.

\item Daza, Sebastian (2009). Complementary Study on the Evaluation of the 2003--2008, National Strategy Against Drug Use. National Budget Agency for the Exchequer, Chile.

\item Daza, Sebastian, Daniella Leal and Von Hausen, Carolina (2009). Design and Validation of Context Questionnaires for the National System of Educational Assessment. Ministry of Education, Chile.

\item Cereceda, Luz, Sebastian Daza and Daniella Leal (2008). Results of the National Survey \textit{Actors in the Educational System}. Ministry of Education, Chile.

\item Valenzuela, Eduardo, Sebastian Daza and Andrés Biehl (2007). Results of the Survey \textit{Social Cohesion in Latin America}. Corporation for Latin American Studies, Chile.

\item Valenzuela, Eduardo and Sebastian Daza (2006). A Study on Drug Use and Associated Factors Among Underage Offenders. National Service of Minors, Chile.

\item Herrera, Soledad, Sebastian Daza, Daniella Leal and Eliana Vivencio (2006). A Series of Studies on Socio--Economic Characterization, 2003. Ministry of Planning and Cooperation, Chile.

\item Daza, Sebastian and Darinka Radovic (2005). Report on the Evaluation of the Unit of School Psycho--Social Care and Welfare. Corporación Municipal Puente Alto, Chile.

\item Daza, Sebastian and  Macarena Vivent (2004). Report on the Evaluation of the Project SaludArte. Corporación Municipal Puente Alto, Chile.

\item Daza, Sebastian and Macarena Vivent (2003). Towards the Creation of a Quality-of-Life Instrument for Minors Between Ages 0 and 3. Department of Public Health, Catholic University of Chile.

\end{itemize}

\subsection*{Unpublished Working Papers}

\begin{itemize}

\item Palloni, Alberto and Sebastian Daza (2014).
   \textit{Intergenerational Transfers in the U.S., Economic Inequality, and Social Stratification.}

\item Daza, Sebastian and Jason Fletcher (2016).
  \textit{Consequences of Childbearing in Delinquency and Substance Use.}

\item Daza, Sebastian, Eric Grodsky and Ann Meier (2014).
  \textit{Exploring the Consequences of Adolescent Sex in Behavioral Context.}

\item Daza, Sebastian (2013).
  %\href{}
  \textit{Drug Use and Crime Transitions Among Young Offenders in Chile}.
  % Revise and resubmit at \textit{Econometrics Journal}.

\item Daza, Sebastian (2013).
  %\href{}
  \textit{Segregation and Student Composition Effects on Academic Achievement in Chile}.
  %Revise and resubmit at \textit{Econometrics Journal}.

\item Daza, Sebastian (2012).
  %\href{}
  \textit{Substance Use, Family, and Peers Effects among Chilean Adolescents}.
  %Revise and resubmit at \textit{Quantitative Economics}.

\item Daza, Sebastian (2011).
  %\href{}
  \textit{Patterns and Progressions of Substance Use among Chilean Adolescents}.
  %Revise and resubmit at \textit{Quantitative Economics}.

\end{itemize}

\section*{Professional Experience}

\subsection*{\href{http://iegd.csic.es/}{Institute of Economy Geography and Demography, CSIC-CCHS, Spain}}

\begin{itemize}
\item \href{https://echo-erc.csic.es/}{Senior Researcher ECHO, European Research Council (ERC) project, December 2019--Present.}
\end{itemize}

\subsection*{\href{https://juntosglobal.com/}{Juntos Global, USA}}

\begin{itemize}
\item \href{https://juntosglobal.com/}{Senior Data Scientist, May 2018--December 2019.}
\end{itemize}

\subsection*{\href{http://sociologia.uc.cl/}{University of Wisconsin-Madison, US}}

\begin{itemize}
\item \href{http://www.ssc.wisc.edu/cde/people/grads.php}{Research Assistant, Center for Demography and Ecology UW--Madison, September 2014--August 2018.}
\item \href{http://www.ssc.wisc.edu/cde/people/grads.php}{Project Assistant, Center for Demography and Ecology UW--Madison, January 2011--August 2014.}
\end{itemize}

\subsection*{\href{http://sociologia.uc.cl/}{Catholic University of Chile}}
 \begin{itemize}
 \item \href{http://justiciaysociedad.uc.cl/nosotros/investigadores-asociados}{Research Associate, Center for Justice and Society Studies, August 2016--present.}
 \item \href{http://sociologia.uc.cl/desuc}{Research Associate, Department of Sociology, August 2010--December 2017}
 \item Director of Applied Studies (DESUC), Department of Sociology, 2005--2010.
 \item Lecturer, Department of Sociology, 2008--2010.
 \item Instructor, Department of Sociology, \href{http://www.educacioncontinua.uc.cl}{Professional Certificate in Quantitative Methods}, 2008--2010.
 \end{itemize}

\subsection*{\href{http://www.udp.cl/facultades_carreras/ciencias_sociales-historia/}{Diego Portales University, Chile}}

\begin{itemize}
\item Lecturer, Department of Sociology, 2007.
\end{itemize}

\subsection*{Non-Academic Institutions}

\begin{itemize}
\item \href{http://juntosglobal.com/}{Senior Quantitative Social Scientitst, Juntos Inc, US, May 2018--present.}
\item Principal Researcher, Evaluation of Program \textit{School Psycho-Social Care and Welfare}, Corporación Municipal de Puente Alto, Chile, 2003--2008.
\item \href{http://www.latinobarometro.org}{Researcher, Corporación Latinobarómetro, Chile, 2005.}
\item \href{http://www.feedback.cl}{Researcher, Feedback Consultancy, Chile, 2004.}
\end{itemize}

\section*{Teaching}

\subsection*{\href{http://sociologia.uc.cl/}{Catholic University, Department of Sociology}}

\begin{itemize}
\item Advanced Methods of Social Research, 2008--2009.
\item Qualitative Analysis Techniques using \href{http://www.qsrinternational.com/}{Nvivo}, 2009.
\item Advanced Analysis of Social Data, 2008--2009.
\item An Introduction to the Analysis of Social Data, 2009.
\item Design and Implementation of Social Surveys, 2008.
\end{itemize}

\subsection*{\href{http://www.udp.cl/facultades_carreras/ciencias_sociales-historia/}{Diego Portales University, Chile, Department of Sociology}}

\begin{itemize}
\item Introduction to Statistics, 2007.
\end{itemize}

\section*{Conference and Seminar Presentations}

\begin{itemize}

\item TRENDS Conference: Why is Health in the US Continuing to Lag Behind? May 2021. {\textit{Early Exposure to County Income Mobility and Adult Individual Health in the United States.}}

\item Virtual Annual Meeting of the Population Association of America, May 2021. {\textit{Early Exposure to County Income Mobility and Adult Individual Health in the United States.}}

\item Congreso Internacional de la Sociedad Chilena de Criminología, November 2020. {\textit{Trayectorias Laborales de Mujeres que Salen en
Libertad.}}

\item European Population Conference, 2020. {\textit{Contextual Income Mobility and Individual Health.}}

\item Life Course Influences on Later Life Health and Wellbeing, Institute for Social Research, Ann Arbor, MI, June 2017. {\textit{The Consequences of Incarceration for Mortality.}}

\item Life Course Influences on Later Life Health and Wellbeing, Institute for Social Research, Ann Arbor, MI, June 2017. {\textit{The Consequences of Incarceration for Mortality.}}

\item  Annual Meeting of the Population Association of America, Chicago, IL, April 2017. {\textit{Income Inequality, Income Mobility, and Mortality in the U.S.}}

\item  Annual Meeting of the Population Association of America, Chicago, IL, April 2017. {\textit{Examining the Stochastic Actor-Oriented Model (Siena) for Selection and Influence Estimation under Misspecification}}

\item  Annual Meeting of the Population Association of America, Chicago, IL, April 2017. {\textit{The Consequences of Incarceration for Mortality.}}

\item  Annual Meeting of the Population Association of America, Washington, D.C., March-April 2016. {\textit{Consequences of Childbearing in Delinquency and Substance Use.}}

\item  Annual Meeting of the Population Association of America, Boston, MA, May 2014. {\textit{Private Intergenerational Transfers between Parents and Children in the U.S., and Consequences of the Great Recession.}}

\item  Annual Meeting of the Population Association of America, Boston, MA, May 2014. {\textit{Exploring the Consequences of Adolescent Sex in Behavioral Context.}}

\item Weighting Workshop, University of Wisconsin–Madison, September 2012. \textit{Longitudinal Study of Drug Use in Chile (LSDU): Some Questions about Sampling Weights}.

\item	Presentation to the Milenio Scientific Committee of the results of project Relationship between the Onset of Drug Use and the Initiation in Delinquent Behavior in a Prison Population, 2009

\item Presentation of the results of the Survey on Social Cohesion in Latin America. Methodological Design of the Study and Results on Educational and Social Mobility. \href{http://www.cieplan.org/}{Corporation for Latin American Studies}, 2007.

\item Presentation of the Results of the Program for School Psycho-Social Welfare. Corporación Municipal de Puente Alto, 2005.

\item Chile's 30th Seminar on Public Health, Diego Portales Convention Centre, October 1st, 2nd and 3rd, 2003. Presentation of the results of the research: Towards the Creation of a Quality-of-Life Instrument for Minors between Ages 0 and 3, 2003.

\end{itemize}

\section*{Professional Activities}

\begin{itemize}
\item Member, Population Association of America, 2012--Present.
\item Mentor for new graduate students, Department of Sociology, UW-Madison,
August 2013 – 2014.
\item Reviewer: \textit{Journal of the American Medical Association (JAMA)}, \textit{PLOS One}, \textit{Social Science and Medicine}, \textit{Race and Social Problems}, \textit{Journal of Policy Analysis and Management}.
\end{itemize}

\section*{Grants}

\begin{itemize}
\item National Institute on Aging, Small Grants for Research Using PSID Data, \textit{The Consequences of Incarceration for Health and Mortality},  \$20,000, May 2016 - June 2017
\item Exetension National Institute on Aging, Small Grants for Research Using PSID Data, \textit{The Consequences of Incarceration for Health and Mortality},  \$15,000, May 2017 - June 2018
\item San Carlos de Maipo Foundation, \textit{Chile Re-entry Study}, \$150,000, Jan 2016 - June 2018.
\end{itemize}

\section*{Honors, Awards, \& Fellowships}

\begin{itemize}
\item Grant to attend Agent-based Modeling workshop, Technische Universität Dresden, Germany, 2015.
\item Grant to attend Agent-based Modeling workshop, Max Planck Institute for Demographic Research (MPIDR), Germany, 2014.
\item Best Master's Thesis Award, Catholic University of Chile, 2010.
\item \href{http://www.becaschile.cl}{Chilean Ph.D. Scholarship, BecasChile, 2010-2014.}
\item Scholarship for Master's Degree at Catholic University of Chile.
\item Scholarship for Undergraduate Studies in Sociology at Catholic University of Chile.
\end{itemize}

\section*{Workshops Attended}

\begin{itemize}

\item Agent-Based and Hybrid Modeling Bootcamp and Incubator for Health Researchers, August 2016. Instructor: Nathaniel Osgood.
\item Agent-based Model Analysis, Technische Universität Dresden, Germany, July 2015. Competitive selection.
\item Agent-based Modeling and Simulation, Max Planck Institute for Demographic Research (MPIDR), Rostock, Germany, October 2014. Competitive selection.
\item The Pathways to Desistance Study: Analyzing the Life Event Calendar Data for Substance Abuse Research. ICPSR/NAHDAP Summer Program Workshop, July 2014, Ann Arbor, MI.
\item Doing Bayesian Data Analysis, University of Wisconsin--Madison, July 2012. Instructor: John Kruschke.
\item Social Network Analysis with Stochastic Actor-based Models, Summer Institutes in Statistics,  University of Kansas, June 2011. Instructor: \href{http://www.ppsw.rug.nl/~steglich/sites/index.htm}{Christian E. G. Steglich}.

 \end{itemize}

\section*{Languages}

\begin{itemize}
\item English (Proficient), Spanish (Native).
\end{itemize}

\section*{Computer Skills}

\begin{itemize}
\item \textit{Statistical Analysis Software:} R, Stata, Mplus, HLM, SPSS, SAS, and CTM.
\item \textit{Data Science}: Machine Learning, NLP, Model Ensemble, Apache Spark, Databricks, Dash, Shiny.
\item \textit{Agent-based Modeling}: Anylogic, NetLogo.
\item \textit{General Programming}: Python and Java.
\item \textit{Social Network Analysis:} R (RSiena, Statnet), Python (NetworkX, graph-tool), Ucinet.
\item \textit{Qualitative Data Analysis Software:} \href{http://www.qsrinternational.com/}{Nvivo}.
\item \textit{Census and Survey Processing:} CsPro.
% \item \textit{Other:} \LaTeX{}.
\end{itemize}

\section*{Software}

\begin{itemize}
\item \href{https://github.com/sdaza/acsr}{\texttt{acsr}: R package to manage data from the US Census American Community Survey (ACS)}. Created for the Applied Population Laboratory at UW--Madison, May 2015.
\item \href{https://github.com/sdaza/sampler}{\texttt{sampler}: R package to compute sample sizes and errors for survey design}.
\end{itemize}

\section*{References}

\begin{itemize}
\item Alberto Palloni, Ph.D.\\
Samuel Preston Professor of Sociology, UW-Madison\\
(608) 262--2182, \href{mailto:palloni@ssc.wisc.edu}{palloni@ssc.wisc.edu}

% \item Jason Fletcher, Ph.D.\\
% Associate Professor of Public Affairs and Sociology, UW-Madison\\
% (608) 262-4436 \href{mailto:jfletcher@ssc.wisc.edu}{jfletcher@ssc.wisc.edu}
% \end{itemize}
\item Jenna Nobles, Ph.D.\\
Assistant Professor of Sociology, UW-Madison\\
(608) 262--4024, \href{mailto:jnobles@ssc.wisc.edu}{jnobles@ssc.wisc.edu}
\end{itemize}

\bigskip
\bigskip
\begin{center}
  \begin{small}
    \textit{Last updated: \today}
  \end{small}
\end{center}

% Footer

\end{document}


text:
*********************************
Data Access and Security Overview
*********************************

Understanding Data Access Levels
--------------------------------

* **Public Data**  Sometimes the word "public" is misinterpreted as meaning "open".  All of the TCGA data is *public* data, and much of it is *open*, meaning that it is accessible and available to *all* users; while some low-level TCGA data is *controlled* and restricted to authorized users.
* **Open-Access Data**  Depending on how you categorize the data, *most* of the TCGA data is open-access data.  This includes all de-identified clinical and biospecimen data, as well as all Level-3 molecular data including gene expression data, DNA methylation data, DNA copy-number data, protein expression data, somatic mutation calls, etc.
* **Controlled-Access Data**  All low-level sequence data (both DNA-seq and RNA-seq), the raw SNP array data (CEL files), germline mutation calls, and a small amount of other data are treated as *controlled* data and require that a user is properly authenticated and have dbGaP authorization prior to accessing these data.

Note that many public, open-access datasets may still be **restricted** in various ways.  Typically, a **License** document containing explicit terms of use will be associated with each dataset.  Some institutions have their own licenses, though many uses one of the `Creative Commons <https://creativecommons.org/>`_ licenses.  License terms apply to both data and source-code, so please be aware of the terms of a license whenever you plan to reuse data or source code produced by someone else. We  recommend that you review the `TCGA Publication Guidelines <https://www.cancer.gov/about-nci/organization/ccg/research/structural-genomics/tcga/using-tcga/citing-tcga>`_.

Understanding Data Security
---------------------------

Much of the low-level TCGA and TARGET data (including DNA and RNA reads, and SNP CEL files, for example) are
classified as "controlled access data" and are under the control of the
`dbGaP <http://www.ncbi.nlm.nih.gov/projects/gap/cgi-bin/about.html>`_
Data Access Committee (DAC).

Investigator(s) requesting to receive genomic data in accordance with the
`NIH Genomic Data Sharing Policy <https://gdc.cancer.gov/access-data/data-access-policies>`_
are required to submit:

* a **data access request** (DAR)
* a **research use statement** (RUS)

**Note:** Requesters and institutional signing officials (SO) must have NIH eRA user IDs to begin this process. Visit the `electronic Research Administration <http://era.nih.gov>`_ (eRA) for more information on registering for an NIH eRA account. NIH staff may utilize their NIH login. (See the `dbGaP Data Access Request Portal <http://dbgap.ncbi.nlm.nih.gov/aa/wga.cgi?login=&page=login>`_
for additional `instructions <https://osp.od.nih.gov/wp-content/uploads/Extramural_Flowcharts_for_Data_Access.pdf>`_.)

Additionally, they must:

*  Submit a `Data Use Certification <https://osp.od.nih.gov/wp-content/uploads/Model_DUC.pdf>`_ (DUC) co-signed by the designated Institutional Official(s) at their sponsoring institution
*  Protect data confidentiality (any data which has been designated "controlled" **must** be protected accordingly, unless prior release authorization is obtained from an NCI data custodian)
*  Ensure that appropriate data security measures are in place

**Google Cloud Platform and Access Control**

In the context of Google Cloud Platform (GCP) projects, it is important to realize that all members of a GCP project must have at least read access to all data stored within that project, as well as to all virtual machines, boot disks, and persistent disks attached to that project.

Therefore, if a principle investigator (PI) establishes a GCP project (project-A) for the purposes of analyzing controlled data (*eg* performing mutation analysis on TCGA sequence data), then:

- *All* members of project-A must be authorized to view controlled data.
- The outputs of certain analyses performed on controlled data, if they are summary in nature, may no longer be controlled data and could be copied to a second GCP project (project-B) for further downstream analyses by researchers who are not authorized to view controlled data.
- Researchers who are not authorized to view controlled data could be made members of project-B, while users who *are* authorized could be members of both project-A *and* project-B.

**Your Responsibilities**

The PI and the PI's institution are *responsible* for and will be held *accountable* for ensuring the security of controlled data, not the cloud service provider.  The Google Cloud Platform has been certified as `FedRAMP compliant <https://marketplace.fedramp.gov/#/product/google-services-google-cloud-platform-products-and-underlying-infrastructure?sort=productName&productNameSearch=google>`_
which means that it has been independently assessed and shown to meet all necessary `FedRAMP <https://www.fedramp.gov/>`_ security controls.  This provides the assurance that the data security and access control mechanisms implemented by the Google Cloud Platform and made available to end users are sufficient to safeguard the data.  However, it remains the PI's responsibility to ensure that these access control mechanisms are used appropriately and effectively within the context of the PI's GCP project.

You should think about securing controlled data within the context of your GCP project in the same way that you
would think about securing controlled data that you might download to a file server or compute cluster at your
own institution.  Your responsibilities regarding the appropriate use of the data are the same in a cloud environment.
For more information, please refer to the
`NIH Security Best Practices for Controlled-Access Data <http://www.ncbi.nlm.nih.gov/projects/gap/cgi-bin/GetPdf.cgi?document_name=dbgap_2b_security_procedures.pdf>`_.


text:
import itertools

from django.contrib.admin import ModelAdmin, register, site
from django.core.urlresolvers import reverse
from django.shortcuts import render
from django.utils.html import format_html
from django.utils.timezone import now
from djangohelpers.export_action import admin_list_export

from . import models
from opendebates_emails.models import send_email

site.password_change_template = 'admin/registration/password_change_form.html'
site.password_change_done_template = 'admin/registration/password_change_done.html'

def debate_link(debate):
    return format_html(
        '{}'.format(
            reverse('admin:opendebates_debate_change', args=(debate.pk,)),
            debate.prefix)
    )

@register(models.Category)
class CategoryAdmin(ModelAdmin):
    list_display = ('name', 'prefix')
    list_filter = ('debate__prefix',)
    list_select_related = ('debate',)

    actions = (admin_list_export,)

    def prefix(self, obj):
        return debate_link(obj.debate)
    prefix.short_description = "Debate prefix"

@register(models.Submission)
class SubmissionAdmin(ModelAdmin):
    list_display = ['id', 'prefix'] + [f.name for f in models.Submission._meta.fields
                                       if f.name != 'id']
    list_filter = ('approved', 'category__debate__prefix')
    list_select_related = ('category__debate',)

    search_fields = ('idea',)
    actions = [admin_list_export, 'remove_submissions']
    raw_id_fields = ['voter', 'duplicate_of']

    def prefix(self, obj):
        return debate_link(obj.category.debate)
    prefix.short_description = "Debate prefix"

    def remove_submissions(self, request, queryset):
        "Custom action to mark submissions 'unapproved' and to notify users by email."
        if request.POST.get('post'):
            count = 0
            removal_time = now()
            # only email user if submission changes status, hence the filter
            for submission in queryset.filter(approved=True):
                count += 1
                submission.approved = False
                submission.moderated_removal = True
                submission.moderated_at = removal_time
                submission.removal_flags.all().update(reviewed=True)
                submission.save()
                send_email("idea_is_removed", {"idea": submission})
            if count == 1:
                msg = "Removed 1 submission"
            else:
                msg = "Removed {} submissions".format(count)
            self.message_user(request, msg)
            return None  # returning None causes us to return to changelist
        context = {'queryset': queryset}
        return render(request, 'opendebates/admin/remove_submissions.html', context)
    remove_submissions.short_description = 'Remove selected submissions'

    def get_actions(self, request):
        # Remove the default 'Delete selected...' action
        actions = super(SubmissionAdmin, self).get_actions(request)
        if 'delete_selected' in actions:
            del actions['delete_selected']
        return actions

@register(models.Voter)
class VoterAdmin(ModelAdmin):
    list_display = [f.name for f in models.Voter._meta.fields]
    actions = [admin_list_export]
    raw_id_fields = ['user']
    search_fields = ('email',)

@register(models.Vote)
class VoteAdmin(ModelAdmin):
    list_display = ['id', 'prefix'] + [f.name for f in models.Vote._meta.fields
                                       if f.name != 'id']
    list_filter = ('submission__category__debate__prefix',)
    list_select_related = ('submission__category__debate',)

    actions = [admin_list_export]
    raw_id_fields = ['submission', 'voter', 'original_merged_submission']

    def prefix(self, obj):
        return debate_link(obj.submission.category.debate)
    prefix.short_description = "Debate prefix"

@register(models.Candidate)
class CandidateAdmin(ModelAdmin):
    list_display = [f.name for f in models.Candidate._meta.fields]
    actions = [admin_list_export]

@register(models.Flag)
class FlagAdmin(ModelAdmin):
    list_display = ('id', 'prefix', 'to_remove', 'duplicate_of', 'voter', 'reviewed', 'note')
    list_filter = ('to_remove__category__debate__prefix',)
    list_select_related = ('to_remove__category__debate',)

    actions = [admin_list_export]
    raw_id_fields = ['to_remove', 'duplicate_of', 'voter']

    def prefix(self, obj):
        return debate_link(obj.to_remove.category.debate)
    prefix.short_description = "Debate prefix"

@register(models.TopSubmissionCategory)
class TopSubmissionCategoryAdmin(ModelAdmin):
    list_display = ('slug', 'prefix', 'title')
    list_filter = ('debate__prefix',)
    list_select_related = ('debate',)

    def prefix(self, obj):
        return debate_link(obj.debate)
    prefix.short_description = "Debate prefix"

@register(models.Debate)
class DebateAdmin(ModelAdmin):
    list_display = ['prefix', 'site', 'debate_time', 'previous_debate_time',
                    'show_question_votes', 'show_total_votes', 'allow_sorting_by_votes']
    actions = ['reset_current_votes']
    _fields = [f.name for f in models.Debate._meta.get_fields() if f.name != 'id']
    fieldsets = [
        ('General Settings', {
            'fields': ['site', 'prefix', 'theme', 'show_question_votes', 'show_total_votes',
                       'allow_sorting_by_votes',
                       'allow_voting_and_submitting_questions',
                       'inline_css']
        }),
        ('Debate Details', {
            'fields': [f for f in _fields if 'debate_' in f],
        }),
        ('Announcement Details', {
            'fields': [f for f in _fields if f.startswith('announcement_')],
        }),
        ('Site Content', {
            'fields': ['hashtag', 'banner_header_title', 'banner_header_copy',
                       'popup_after_submission_text'],
        }),
        ('Email Share', {
            'fields': [f for f in _fields if f.startswith('email_')],
        }),
        ('Facebook Meta Data', {
            'fields': ['facebook_image'],
        }),
        ('Facebook Share of the Whole Site', {
            'fields': ['facebook_site_title', 'facebook_site_description'],
        }),
        ('Facebook Share of Individual Questions', {
            'fields': ['facebook_question_title', 'facebook_question_description'],
        }),
        ('Twitter Meta Data', {
            'fields': ['twitter_image', 'twitter_site_description',
                       'twitter_question_description'],
        }),
        ('Twitter Share of the Whole Site', {
            'fields': ['twitter_site_title', 'twitter_site_text'],
        }),
        ('Twitter Share of Individual Questions', {
            'fields': ['twitter_question_title',
                       'twitter_question_text_with_handle',
                       'twitter_question_text_no_handle'],
        }),
    ]
    # XXX need to remove related fields from this (e.g., 'candidates')
    _used_fields = [fieldset[1]['fields'] for fieldset in fieldsets]
    _used_fields = set(itertools.chain.from_iterable(_used_fields))
    _missed_fields = set(_fields) - _used_fields
    # if _missed_fields:
    #     fieldsets.append(('Other', {'fields': sorted(list(_missed_fields))}))

    def reset_current_votes(self, request, queryset):
        models.Submission.objects.update(
            category__debate__in=queryset).update(current_votes=0)
    reset_current_votes.short_description = "Reset vote counts since the last debate"

@register(models.FlatPageMetadataOverride)
class FlatPageMetadataOverrideAdmin(ModelAdmin):
    list_display = ['flatpage_url']

    def flatpage_url(self, obj):
        return obj.page.url

    def get_queryset(self, request):
        return super(FlatPageMetadataOverrideAdmin, self).get_queryset(
            request).select_related("page")

@register(models.ZipCode)
class ZipCodeAdmin(ModelAdmin):
    list_display = ['zip', 'city', 'state']
    list_filter = ['state']


text:
extern "Java"
{
  namespace gnu
  {
    namespace xml
    {
      namespace stream
      {
          class XIncludeFilter;
      }
    }
  }
  namespace java
  {
    namespace net
    {
        class URLConnection;
    }
  }
  namespace javax
  {
    namespace xml
    {
      namespace namespace$
      {
          class QName;
      }
      namespace parsers
      {
          class DocumentBuilder;
      }
      namespace stream
      {
          class XMLStreamReader;
      }
    }
  }
  namespace org
  {
    namespace w3c
    {
      namespace dom
      {
          class Document;
          class Node;
        namespace traversal
        {
            class DocumentTraversal;
            class TreeWalker;
        }
        namespace xpath
        {
            class XPathEvaluator;
            class XPathResult;
        }
      }
    }
  }
}

class gnu::xml::stream::XIncludeFilter : public ::javax::xml::stream::util::StreamReaderDelegate
{

public: // actually package-private
  XIncludeFilter(::javax::xml::stream::XMLStreamReader *, ::java::lang::String *, jboolean, jboolean, jboolean);
public:
  virtual jint getAttributeCount();
  virtual ::java::lang::String * getAttributeLocalName(jint);
  virtual ::java::lang::String * getAttributeNamespace(jint);
  virtual ::java::lang::String * getAttributePrefix(jint);
  virtual ::javax::xml::namespace$::QName * getAttributeName(jint);
  virtual ::java::lang::String * getAttributeType(jint);
  virtual jboolean isAttributeSpecified(jint);
  virtual ::java::lang::String * getAttributeValue(jint);
  virtual ::java::lang::String * getAttributeValue(::java::lang::String *, ::java::lang::String *);
  virtual ::java::lang::String * getElementText();
  virtual jint getEventType();
  virtual ::java::lang::String * getLocalName();
  virtual ::javax::xml::namespace$::QName * getName();
  virtual ::java::lang::String * getNamespaceURI();
  virtual ::java::lang::String * getPIData();
  virtual ::java::lang::String * getPITarget();
  virtual ::java::lang::String * getPrefix();
  virtual ::java::lang::String * getText();
  virtual JArray< jchar > * getTextCharacters();
  virtual jint getTextCharacters(jint, JArray< jchar > *, jint, jint);
  virtual jint getTextLength();
  virtual jint getTextStart();
  virtual jboolean hasNext();
  virtual jint next();
public: // actually package-private
  virtual jboolean isSpace(JArray< jchar > *, jint);
  virtual ::java::lang::String * getBaseURI();
  virtual jboolean includeResource(::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *);
  virtual ::java::net::URLConnection * getURLConnection(::java::lang::String *, ::java::lang::String *, ::java::lang::String *);
  virtual ::org::w3c::dom::Document * getDocument(::org::w3c::dom::Node *);
  virtual ::javax::xml::parsers::DocumentBuilder * getDocumentBuilder();
  virtual ::org::w3c::dom::traversal::DocumentTraversal * getDocumentTraversal(::org::w3c::dom::Document *);
  virtual ::org::w3c::dom::xpath::XPathEvaluator * getXPathEvaluator(::org::w3c::dom::Document *);
  static ::java::lang::String * getParameter(::java::lang::String *, ::java::lang::String *);
  static ::java::lang::String * XINCLUDE_NS_URI;
  static const jint SHOW_FLAGS = 221;
  ::java::lang::String * __attribute__((aligned(__alignof__( ::javax::xml::stream::util::StreamReaderDelegate)))) systemId;
  jboolean namespaceAware;
  jboolean validating;
  jboolean expandERefs;
  ::java::lang::String * href;
  jint event;
  jboolean included;
  ::org::w3c::dom::xpath::XPathResult * result;
  jint snapshotIndex;
  ::org::w3c::dom::Node * current;
  ::org::w3c::dom::traversal::TreeWalker * walker;
  ::java::util::HashSet * seen;
  jboolean backtracking;
  jboolean lookahead;
  ::java::io::Reader * includedText;
  JArray< jchar > * buf;
  jint len;
  jboolean inInclude;
  jboolean inFallback;
  jboolean seenFallback;
  ::javax::xml::parsers::DocumentBuilder * builder;
public:
  static ::java::lang::Class class$;
};

#endif // __gnu_xml_stream_XIncludeFilter__


text:
namespace chromeos {

class Printer;

// Calculates a list of available printers from four policies: Data (json with
// all printers), AccessMode (see below), Whitelist and Blacklist (lists with
// ids). All methods must be called from the same sequence and all observers'
// notifications will be called from this sequence. Resultant list of available
// printers are calculated asynchronously on a dedicated internal sequence.
class BulkPrintersCalculator
    : public base::SupportsWeakPtr<BulkPrintersCalculator> {
 public:
  // Algorithm used to calculate a list of available printers from the content
  // of the "Data" policy.
  enum AccessMode {
    UNSET = -1,
    // Printers in the blacklist are disallowed.  Others are allowed.
    BLACKLIST_ONLY = 0,
    // Only printers in the whitelist are allowed.
    WHITELIST_ONLY = 1,
    // All printers in the "Data" policy are allowed.
    ALL_ACCESS = 2
  };

  class Observer {
   public:
    // Observer is notified by this call when the state of the object changes.
    // See the section "Methods returning the state of the object" below to
    // learn about parameters defining the state of the object. |sender| is
    // a pointer to the object calling the notification.
    virtual void OnPrintersChanged(const BulkPrintersCalculator* sender) = 0;
  };

  static std::unique_ptr<BulkPrintersCalculator> Create();
  virtual ~BulkPrintersCalculator() = default;

  virtual void AddObserver(Observer* observer) = 0;
  virtual void RemoveObserver(Observer* observer) = 0;

  // ========================= Methods setting values of the four policies

  // Sets the "Data" policy. |data| is a list of all printers in JSON format.
  virtual void SetData(std::unique_ptr<std::string> data) = 0;
  // Clears the "Data" policy.
  virtual void ClearData() = 0;

  // Sets the "AccessMode" policy. See description of the AccessMode enum.
  virtual void SetAccessMode(AccessMode mode) = 0;
  // Sets the "Blacklist" policy. |blacklist| is a list of printers ids.
  virtual void SetBlacklist(const std::vector<std::string>& blacklist) = 0;
  // Sets the "Whitelist" policy. |whitelist| is a list of printers ids.
  virtual void SetWhitelist(const std::vector<std::string>& whitelist) = 0;

  // ========================= Methods returning the state of the object
  // Methods returning the three parameters defining the state of the object.

  // Returns true if the "Data" policy has been set with SetData(...) method
  // (may be not processed yet). Returns false if the "Data" policy has been
  // cleared with ClearData() method or SetData(...) has been never called.
  virtual bool IsDataPolicySet() const = 0;
  // Returns false if current policies were not processed yet. Returns true
  // if there is no on-going calculations and the method below returns the
  // list of available printers that is up-to-date with current policies.
  virtual bool IsComplete() const = 0;
  // Returns a reference to a resultant list of available printers. Keys are
  // printers ids. If the list of available printers cannot be calculated
  // (because of some error or missing policy), an empty map is returned.
  virtual const std::unordered_map<std::string, Printer>& GetPrinters()
      const = 0;
};

}  // namespace chromeos

#endif  // CHROME_BROWSER_CHROMEOS_PRINTING_BULK_PRINTERS_CALCULATOR_H_


text:
Development
===========

Git repository
--------------

You find the repository on github:
https://github.com/pokerregion/poker

In the ``dend/`` branches, there are ideas which doesn't work or has been abandoned for some reason.
They are there for reference as "this has been tried".

I develop in a very simple `Workflow`_. (Before 662f5d73be1efbf6eaf173da448e0410da431b2c you can
see bigger merge bubbles, because I handled hand history parser code and the rest as two separate
projects, but made a subtree merge and handle them in this package.)
Feature branches with rebases on top of master.
Only merge stable code into master.

The repository tags will match PyPi release numbers.

Versioning
----------

I use `Semantic Versioning`_, except for major versions like 1.0, 2.0,
because I think 1.0.0 looks stupid :)

Coding style
------------

PEP8 except for line length, which is 99 max (hard limit).
If your code exceeds 99 characters, you do something wrong anyway, you need to refactor it
(e.g. to deeply nested, harder to understand)

Dates and times
---------------

Every datetime throughout the library is in UTC with tzinfo set to ``pytz.UTC``.
If you found a case where it's not, it's a bug, please `report it on GitHub!`_
The right way for setting a date correctly e.g. from PokerStars ET time is:

.. code-block:: python

   >>> import pytz
   >>> ET = pytz.timezone('US/Eastern')
   >>> ET.localize(some_datetime).astimezone(pytz.UTC)

This will consider DST settings and ambiguous times. Fro more information, see `pytz documentation`_!

Unicode vs Bytes
----------------

The library uses the strategy from Python 3: internally, everything is using unicode, and things are
converted only the I/O boundaries (e.g. opening/writing files).
This is implemented by the future mechanism:

.. code-block:: python

   from __future__ import unicode_literals

this way, all newly defined text will be unicode by default. I only check for unicode everywhere
in the code, not str, please watch this! It might feel strange the first time, but when the time comes
to convert the library to Python3, it will be much easier!

New hand history parser
-----------------------

.. note:: Hand history parsing API will change for sure until 1.0 is done.

If you want to support a new poker room you have to subclass the appropriate class from
:mod:`poker.handhistory` like :class:`poker.handhistory._SplittableHandHistory` depending on the
type of hand history file, like XML, or similar to pokerstars and FTP,
define a couple of methods and done.

.. code-block:: python

   class NewPokerRoomHandHistory(HandHistory):
   """Implement PokerRoom specific parsing."""

      def parse_header(self):
         # Parse header only! Usually just the first line. The whole purpose is to do it fast!
         # No need to call super()

      def _parse_table(self):
         # parses table name

      def _parse_players(self):
         # parses players, player positions, stacks, etc
         # set self.players attribute

      def _parse_button(self):

      def _parse_hero(self):

      def _parse_preflop(self):

      def _parse_street(self):

      def _parse_showdown(self):

      def _parse_pot(self):

      def _parse_board(self):

      def _parse_winners(self):

      def _parse_extra(self):

You **have to** provide all common attributes, and *may* provide PokerRoom specific extra
attributes described in the base :class:`poker.handhistory.HandHistory` class API documentation.

Testing
-------

The framework contains a lot of tests (over 400). The basic elements like Card, Hand, Range, etc.
are fully tested.

All the unit tests are written in `pytest`_. I choose it because it offers very nice funcionality,
and no-boilerplate code for tests. No need to sublass anything, just prefix classes with ``Test``
and methods with ``test_``.

All assertion use the default python ``assert`` keyword.

You need to install the ``poker`` package in development mode::

    # from directory where setup.py file is
    $ pip install -e .

and install `pytest`_ and run it directly::

    $ pip install pytest
    $ py.test

from the poker module directory and `pytest`_ will automatically pick up all unit tests.

About the state of Python3
--------------------------

Originally I started the library in Python3.4 only, and though everything worked well for a while and
library support seemed fine, the tooling around Python3 is not there at all yet. PyPy, PyInstaller
Kivy, etc, etc. doesnt't support Python3.4 at all, but even if they do, there are bugs/problems which
are hard to solve, beceause nobody experienced it before. A nice example is that I found a bug in the
3.4 standard library enum module.

As a consequence of this, at v0.22.0 I converted the whole repository to Python2 only. The long-term
strategy is to use Python2 for everything until the tooling for Python3.4 catch up, and at that point,
convert it to Python3.4 and continue from there. I don't want to develop a 2 and 3 compatible library
for such a niche market, because it's very time consuming, please don't even ask me! (E.g. it took
straight 10 hours to convert the whole library to Python2, with no new code at all...)

.. _pytest: http://pytest.org/
.. _Workflow: https://guides.github.com/introduction/flow/index.html
.. _Semantic Versioning: http://semver.org/
.. _report it on GitHub!: https://github.com/pokerregion/poker/issues/new?title=Incorrect+datetime
.. _pytz documentation: http://pytz.sourceforge.net/#localized-times-and-date-arithmetic


text:
package org.herac.tuxguitar.player.impl.midiport.fluidsynth.type;

public class StringRef {

	private String value;

	public StringRef(){
		this.value = new String();
	}

	public String getValue() {
		return this.value;
	}

	public void setValue(String value) {
		this.value = value;
	}
}


text:
#ifndef GLOBUS_FTP_CLIENT_PERF_PLUGIN_H
#define GLOBUS_FTP_CLIENT_PERF_PLUGIN_H

/**
 * @file globus_ftp_client_perf_plugin.h
 * @brief GridFTP Performance Marker Plugin Implementation
 */

/**
 * @defgroup globus_ftp_client_perf_plugin Performance Marker Plugin
 * @ingroup globus_ftp_client_plugins
 * @brief Performance Marker Plugin
 *
 * The FTP Performance Marker plugin allows the user to obtain
 * performance markers for all types of transfers except a
 * third party transfer in which Extended Block mode is not enabled.
 *
 * These markers may be generated internally, or they may be received
 * from a server ('put' or third_party_transfer' only).
 *
 * Copy constructor and destructor callbacks are also provided to allow
 * one to more easily layer other plugins on top of this one.
 */

#include "globus_ftp_client.h"
#include "globus_ftp_client_plugin.h"

#ifdef __cplusplus
extern "C" {
#endif

/** Module descriptor
 * @ingroup globus_ftp_client_perf_plugin
 */
#define GLOBUS_FTP_CLIENT_PERF_PLUGIN_MODULE (&globus_i_ftp_client_perf_plugin_module)

extern
globus_module_descriptor_t globus_i_ftp_client_perf_plugin_module;

/**
 * Transfer begin callback
 * @ingroup globus_ftp_client_perf_plugin
 *
 * This callback is called when a get, put, or third party transfer is
 * started. Note that it is possible for this callback to be made multiple
 * times before ever receiving the complete callback... this would be the case
 * if a transfer was restarted.  The 'restart' will indicate whether or not we
 * have been restarted.
 *
 * @param handle
 *        this the client handle that this transfer will be occurring on
 *
 * @param user_specific
 *        this is user specific data either created by the copy method,
 *        or, if a copy method was not specified, the value passed to
 *        init
 *
 * @param source_url
 *        source of the transfer (GLOBUS_NULL if 'put')
 *
 * @param dest_url
 *        dest of the transfer (GLOBUS_NULL if 'get')
 *
 * @param restart
 *        boolean indicating whether this callback is result of a restart
 *
 * @return
 *        - n/a
 */

typedef void (*globus_ftp_client_perf_plugin_begin_cb_t)(
    void *                                          user_specific,
    globus_ftp_client_handle_t *                    handle,
    const char *                                    source_url,
    const char *                                    dest_url,
    globus_bool_t                                   restart);

/**
 * Performance marker received callback
 * @ingroup globus_ftp_client_perf_plugin
 *
 * This callback is called for all types of transfers except a third
 * party in which extended block mode is not used (because 112 perf markers
 * won't be sent in that case). For extended mode 'put' and '3pt', actual 112
 * perf markers will be used and the frequency of this callback is dependent
 * upon the frequency those messages are received. For 'put' in which
 * extended block mode is not enabled and 'get' transfers, the information in
 * this callback will be determined locally and the frequency of this callback
 * will be at a maximum of one per second.
 *
 * @param handle
 *        this the client handle that this transfer is occurring on
 *
 * @param user_specific
 *        this is user specific data either created by the copy method,
 *        or, if a copy method was not specified, the value passed to
 *        init
 *
 * @param time_stamp_int
 *        the timestamp at which the number of bytes is valid (integer part)
 *
 * @param time_stamp_tenth
 *        the timestamp at which the number of bytes is valid (tenth part)
 *
 * @param stripe_ndx
 *        the stripe index this data refers to
 *
 * @param num_stripes total number of stripes involved in this transfer
 *
 * @param nbytes
 *        the total bytes transferred on this stripe
 *
 * @return
 *        - n/a
 */

typedef void (*globus_ftp_client_perf_plugin_marker_cb_t)(
    void *                                          user_specific,
    globus_ftp_client_handle_t *                    handle,
    long                                            time_stamp_int,
    char                                            time_stamp_tenth,
    int                                             stripe_ndx,
    int                                             num_stripes,
    globus_off_t                                    nbytes);

/**
 * Transfer complete callback
 * @ingroup globus_ftp_client_perf_plugin
 *
 * This callback will be called upon transfer completion (successful or
 * otherwise)
 *
 * @param handle
 *        this the client handle that this transfer was occurring on
 *
 * @param user_specific
 *        this is user specific data either created by the copy method,
 *        or, if a copy method was not specified, the value passed to
 *        init
 *
 * @param success
 *        indicates whether this transfer completed successfully or was
 *        interrupted (by error or abort)
 *
 * @return
 *        - n/a
 */

typedef void (*globus_ftp_client_perf_plugin_complete_cb_t)(
    void *                                          user_specific,
    globus_ftp_client_handle_t *                    handle,
    globus_bool_t                                   success);

/**
 * Copy constructor
 * @ingroup globus_ftp_client_perf_plugin
 *
 * This callback will be called when a copy of this plugin is made,
 * it is intended to allow initialization of a new user_specific data
 *
 * @param user_specific
 *        this is user specific data either created by this copy
 *        method, or the value passed to init
 *
 * @return
 *        - a pointer to a user specific piece of data
 *        - GLOBUS_NULL (does not indicate error)
 */

typedef void * (*globus_ftp_client_perf_plugin_user_copy_cb_t)(
    void *                                          user_specific);

/**
 * Destructor
 * @ingroup globus_ftp_client_perf_plugin
 *
 * This callback will be called when a copy of this plugin is destroyed,
 * it is intended to allow the user to free up any memory associated with
 * the user specific data
 *
 * @param user_specific
 *        this is user specific data created by the copy method
 *
 * @return
 *        - n/a
 */

typedef void (*globus_ftp_client_perf_plugin_user_destroy_cb_t)(
    void *                                          user_specific);

globus_result_t
globus_ftp_client_perf_plugin_init(
    globus_ftp_client_plugin_t *                    plugin,
    globus_ftp_client_perf_plugin_begin_cb_t        begin_cb,
    globus_ftp_client_perf_plugin_marker_cb_t       marker_cb,
    globus_ftp_client_perf_plugin_complete_cb_t     complete_cb,
    void *                                          user_specific);

globus_result_t
globus_ftp_client_perf_plugin_set_copy_destroy(
    globus_ftp_client_plugin_t *                    plugin,
    globus_ftp_client_perf_plugin_user_copy_cb_t    copy_cb,
    globus_ftp_client_perf_plugin_user_destroy_cb_t destroy_cb);

globus_result_t
globus_ftp_client_perf_plugin_destroy(
    globus_ftp_client_plugin_t *                    plugin);

globus_result_t
globus_ftp_client_perf_plugin_get_user_specific(
    globus_ftp_client_plugin_t *                    plugin,
    void **                                         user_specific);

#ifdef __cplusplus
}
#endif

#endif /* GLOBUS_FTP_CLIENT_PERF_PLUGIN_H */


text:
<?php

namespace Zimbra\Mail\Struct;

use Zimbra\Common\TypedSequence;
use Zimbra\Enum\ParticipationStatus;
use Zimbra\Struct\Base;

/**
 * CalendarAttendee struct class
 *
 * @package    Zimbra
 * @subpackage Mail
 * @category   Struct
 * @author     Nguyen Van Nguyen - nguyennv1981@gmail.com
 * @copyright  Copyright © 2013 by Nguyen Van Nguyen.
 */
class CalendarAttendee extends Base
{
    /**
     * Non-standard parameters (XPARAMs)
     * @var TypedSequence<XParam>
     */
    private $_xparams;

    /**
     * Constructor method for CalendarAttendee
     * @param array $xparams Non-standard parameters (XPARAMs)
     * @param string $address Email address (without "MAILTO:")
     * @param string $url URL - has same value as {email-address}.
     * @param string $displayName Friendly name - "CN" in iCalendar
     * @param string $sentBy iCalendar SENT-BY
     * @param string $dir iCalendar DIR - Reference to a directory entry associated with the calendar user. the setProperty.
     * @param string $lang iCalendar LANGUAGE - As defined in RFC5646 * (e.g. "en-US")
     * @param string $cutype iCalendar CUTYPE (Calendar user type)
     * @param string $role iCalendar ROLE
     * @param ParticipationStatus $ptst
     * @param bool   $rsvp iCalendar RSVP iCalendar PTST (Participation status).
     * @param string $member iCalendar MEMBER - The group or list membership of the calendar user
     * @param string $delTo iCalendar DELEGATED-TO
     * @param string $delFrom iCalendar DELEGATED-FROM
     * @return self
     */
    public function __construct(
        $address = null,
        $url = null,
        $displayName = null,
        $sentBy = null,
        $dir = null,
        $lang = null,
        $cutype = null,
        $role = null,
        ParticipationStatus $partStat = null,
        $rsvp = null,
        $member = null,
        $delTo = null,
        $delFrom = null,
        array $xparams = []
    )
    {
        parent::__construct();

        if(null !== $address)
        {
            $this->setProperty('a', trim($address));
        }
        if(null !== $url)
        {
            $this->setProperty('url', trim($url));
        }
        if(null !== $displayName)
        {
            $this->setProperty('d', trim($displayName));
        }
        if(null !== $sentBy)
        {
            $this->setProperty('sentBy', trim($sentBy));
        }
        if(null !== $dir)
        {
            $this->setProperty('dir', trim($dir));
        }
        if(null !== $lang)
        {
            $this->setProperty('lang', trim($lang));
        }
        if(null !== $cutype)
        {
            $this->setProperty('cutype', trim($cutype));
        }
        if(null !== $role)
        {
            $this->setProperty('role', trim($role));
        }
        if($partStat instanceof ParticipationStatus)
        {
            $this->setProperty('ptst', $partStat);
        }
        if(null !== $rsvp)
        {
            $this->setProperty('rsvp', (bool) $rsvp);
        }
        if(null !== $member)
        {
            $this->setProperty('member', trim($member));
        }
        if(null !== $delTo)
        {
            $this->setProperty('delTo', trim($delTo));
        }
        if(null !== $delFrom)
        {
            $this->setProperty('delFrom', trim($delFrom));
        }

        $this->setXParams($xparams);
        $this->on('before', function(Base $sender)
        {
            if($sender->getXParams()->count())
            {
                $sender->setChild('xparam', $sender->getXParams()->all());
            }
        });
    }

    /**
     * Add xparam
     *
     * @param  XParam $xparam
     * @return self
     */
    public function addXParam(XParam $xparam)
    {
        $this->_xparams->add($xparam);
        return $this;
    }

    /**
     * Sets xparam sequence
     *
     * @param  array $xparams
     * @return self
     */
    public function setXParams(array $xparams)
    {
        $this->_xparams = new TypedSequence('Zimbra\Mail\Struct\XParam', $xparams);
        return $this;
    }

    /**
     * Gets xparam sequence
     *
     * @return Sequence
     */
    public function getXParams()
    {
        return $this->_xparams;
    }

    /**
     * Gets address
     *
     * @return string
     */
    public function getAddress()
    {
        return $this->getProperty('a');
    }

    /**
     * Sets address
     *
     * @param  string $address
     * @return self
     */
    public function setAddress($address)
    {
        return $this->setProperty('a', trim($address));
    }

    /**
     * Gets url
     *
     * @return string
     */
    public function getUrl()
    {
        return $this->getProperty('url');
    }

    /**
     * Sets url
     *
     * @param  string $url
     * @return self
     */
    public function setUrl($url)
    {
        return $this->setProperty('url', trim($url));
    }

    /**
     * Gets display name
     *
     * @return string
     */
    public function getDisplayName()
    {
        return $this->getProperty('d');
    }

    /**
     * Sets display name
     *
     * @param  string $displayName
     * @return self
     */
    public function setDisplayName($displayName)
    {
        return $this->setProperty('d', trim($displayName));
    }

    /**
     * Gets sent by
     *
     * @return string
     */
    public function getSentBy()
    {
        return $this->getProperty('sentBy');
    }

    /**
     * Sets sent by
     *
     * @param  string $sentBy
     * @return self
     */
    public function setSentBy($sentBy)
    {
        return $this->setProperty('sentBy', trim($sentBy));
    }

    /**
     * Gets sent by
     *
     * @return string
     */
    public function getDir()
    {
        return $this->getProperty('dir');
    }

    /**
     * Sets sent by
     *
     * @param  string $dir
     * @return self
     */
    public function setDir($dir)
    {
        return $this->setProperty('dir', trim($dir));
    }

    /**
     * Gets lang
     *
     * @return string
     */
    public function getLanguage()
    {
        return $this->getProperty('lang');
    }

    /**
     * Sets lang
     *
     * @param  string $lang
     * @return self
     */
    public function setLanguage($lang)
    {
        return $this->setProperty('lang', trim($lang));
    }

    /**
     * Gets cutype
     *
     * @return string
     */
    public function getCuType()
    {
        return $this->getProperty('cutype');
    }

    /**
     * Sets cutype
     *
     * @param  string $cutype
     * @return self
     */
    public function setCuType($cutype)
    {
        return $this->setProperty('cutype', trim($cutype));
    }

    /**
     * Gets role
     *
     * @return string
     */
    public function getRole()
    {
        return $this->getProperty('role');
    }

    /**
     * Sets role
     *
     * @param  string $role
     * @return self
     */
    public function setRole($role)
    {
        return $this->setProperty('role', trim($role));
    }

    /**
     * Gets ptst
     *
     * @return ParticipationStatus
     */
    public function getPartStat()
    {
        return $this->getProperty('ptst');
    }

    /**
     * Sets ptst
     *
     * @param  ParticipationStatus $ptst
     * @return self
     */
    public function setPartStat(ParticipationStatus $ptst)
    {
        return $this->setProperty('ptst', $ptst);
    }

    /**
     * Gets rsvp
     *
     * @return bool
     */
    public function getRsvp()
    {
        return $this->getProperty('rsvp');
    }

    /**
     * Sets rsvp
     *
     * @param  bool $rsvp
     * @return self
     */
    public function setRsvp($rsvp)
    {
        return $this->setProperty('rsvp', (bool) $rsvp);
    }

    /**
     * Gets member
     *
     * @return string
     */
    public function getMember()
    {
        return $this->getProperty('member');
    }

    /**
     * Sets member
     *
     * @param  string $member
     * @return self
     */
    public function setMember($member)
    {
        return $this->setProperty('member', trim($member));
    }

    /**
     * Gets delTo
     *
     * @return string
     */
    public function getDelegatedTo()
    {
        return $this->getProperty('delTo');
    }

    /**
     * Sets delTo
     *
     * @param  string $delTo
     * @return self
     */
    public function setDelegatedTo($delTo)
    {
        return $this->setProperty('delTo', trim($delTo));
    }

    /**
     * Gets delFrom
     *
     * @return string
     */
    public function getDelegatedFrom()
    {
        return $this->getProperty('delFrom');
    }

    /**
     * Sets delFrom
     *
     * @param  string $delFrom
     * @return self
     */
    public function setDelegatedFrom($delFrom)
    {
        return $this->setProperty('delFrom', trim($delFrom));
    }

    /**
     * Returns the array representation of this class
     *
     * @param  string $name
     * @return array
     */
    public function toArray($name = 'at')
    {
        return parent::toArray($name);
    }

    /**
     * Method returning the xml representative this class
     *
     * @param  string $name
     * @return SimpleXML
     */
    public function toXml($name = 'at')
    {
        return parent::toXml($name);
    }
}


text:
package org.apache.bigtop.itest.hbase.smoke;

import java.net.URL;
import java.util.Random;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.PerformanceEvaluation;
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.ResultScanner;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles;
import org.apache.hadoop.hbase.mapreduce.NMapInputFormat;
import org.apache.hadoop.hbase.util.Bytes;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import org.junit.AfterClass;
import org.junit.Test;

import org.apache.bigtop.itest.JarContent;
import org.apache.bigtop.itest.shell.Shell;
import org.apache.bigtop.itest.hbase.util.HBaseTestUtil;

public class TestHFileOutputFormat {
  private static final int ROWSPERSPLIT = 1024;

  private static final byte[][] FAMILIES =
    { Bytes.add(PerformanceEvaluation.FAMILY_NAME, Bytes.toBytes("-A")),
      Bytes.add(PerformanceEvaluation.FAMILY_NAME, Bytes.toBytes("-B"))};

  private static final String HBASE_HOME = System.getenv("HBASE_HOME");
  private static final String HBASE_CONF_DIR = System.getenv("HBASE_CONF_DIR");
  static {
    assertNotNull("HBASE_HOME has to be set to run this test",
        HBASE_HOME);
    assertNotNull("HBASE_CONF_DIR has to be set to run this test",
        HBASE_CONF_DIR);
  }
  private static String hbase_jar =
    JarContent.getJarName(HBASE_HOME, "hbase-.*(?<!tests).jar");
  private static String hbase_tests_jar =
    JarContent.getJarName(HBASE_HOME, "hbase-.*tests.jar");
  private static URL incrload_jar_url =
    JarContent.getJarURL(org.apache.bigtop.itest.hbase.smoke.IncrementalPELoad.class);
  static {
    assertNotNull("Can't find hbase.jar", hbase_jar);
    assertNotNull("Can't find hbase-tests.jar", hbase_tests_jar);
    assertNotNull("Can't find jar containing IncrementalPELoad class", incrload_jar_url);
  }
  private static final String HBASE_JAR = HBASE_HOME + "/" + hbase_jar;
  private static final String HBASE_TESTS_JAR = HBASE_HOME + "/" + hbase_tests_jar;
  private static final String ZOOKEEPER_JAR = HBASE_HOME + "/lib/zookeeper.jar";
  private static final String INCRLOAD_JAR = incrload_jar_url.getFile();
  private static final String INCRLOAD = "org.apache.bigtop.itest.hbase.smoke.IncrementalPELoad";
  private static final String USER = System.getProperty("user.name");
  private static Shell sh = new Shell("/bin/bash -s");

  @AfterClass
  public static void cleanUp() {
    // delete junk from HDFS
    sh.exec("hadoop fs -rmr -skipTrash /user/" + USER + "/partitions_*");
    assertTrue("HDFS cleanup failed", sh.getRet() == 0);
  }

  @Test
  public void testMRIncrementalLoad() throws Exception {
    doIncrementalLoadTest("testMRIncrementalLoad", false);
  }

  @Test
  public void testMRIncrementalLoadWithSplit() throws Exception {
    doIncrementalLoadTest("testMRIncrementalLoadWithSplit", true);
  }

  private byte [][] generateRandomSplitKeys(int numKeys) {
    Random random = new Random();
    byte[][] ret = new byte[numKeys][];
    for (int i = 0; i < numKeys; i++) {
      ret[i] = PerformanceEvaluation.generateValue(random);
    }
    return ret;
  }

  private void doIncrementalLoadTest(String testName, boolean shouldChangeRegions)
      throws Exception {
    FileSystem fs = HBaseTestUtil.getClusterFileSystem();
    Path testDir =  HBaseTestUtil.getMROutputDir(testName);
    byte[][] splitKeys = generateRandomSplitKeys(4);

    Configuration conf = HBaseConfiguration.create();
    HBaseAdmin admin = new HBaseAdmin(conf);
    final byte[] TABLE_NAME = HBaseTestUtil.getTestTableName(testName);
    HTableDescriptor tbldesc = new HTableDescriptor(TABLE_NAME);
    HColumnDescriptor coldesc1 = new HColumnDescriptor(FAMILIES[0]);
    HColumnDescriptor coldesc2 = new HColumnDescriptor(FAMILIES[1]);
    tbldesc.addFamily(coldesc1);
    tbldesc.addFamily(coldesc2);
    admin.createTable(tbldesc, splitKeys);
    HTable table = new HTable(TABLE_NAME);
    assertEquals("Should start with empty table",
        0, HBaseTestUtil.countRows(table));

    // Generate the bulk load files
    runIncrementalPELoad(Bytes.toString(TABLE_NAME), testDir.toString());
    // This doesn't write into the table, just makes files
    assertEquals("HFOF should not touch actual table",
        0, HBaseTestUtil.countRows(table));

    // Make sure that a directory was created for every CF
    int dir = 0;
    for (FileStatus f : fs.listStatus(testDir)) {
      for (byte[] family : FAMILIES) {
        if (Bytes.toString(family).equals(f.getPath().getName())) {
          ++dir;
        }
      }
    }
    assertEquals("Column family not found in FS.", FAMILIES.length, dir);

    // handle the split case
    if (shouldChangeRegions) {
      admin.disableTable(TABLE_NAME);
      admin.deleteTable(TABLE_NAME);
      byte[][] newSplitKeys = generateRandomSplitKeys(14);
      admin.createTable(tbldesc, newSplitKeys);
    }

    // Before we can load the HFiles, we need to set the permissions so that
    // HBase has write access to testDir's contents
    chmod(testDir.toString());

    // Perform the actual load
    new LoadIncrementalHFiles(conf).doBulkLoad(testDir, table);

    // Ensure data shows up
    int expectedRows = NMapInputFormat.getNumMapTasks(conf) * ROWSPERSPLIT;
    assertEquals("LoadIncrementalHFiles should put expected data in table",
                 expectedRows, HBaseTestUtil.countRows(table));
    Scan scan = new Scan();
    ResultScanner results = table.getScanner(scan);
    int count = 0;
    for (Result res : results) {
      count++;
      assertEquals(FAMILIES.length, res.raw().length);
      KeyValue first = res.raw()[0];
      for (KeyValue kv : res.raw()) {
        assertTrue(KeyValue.COMPARATOR.matchingRows(first, kv));
        assertTrue(Bytes.equals(first.getValue(), kv.getValue()));
      }
    }
    results.close();
    String tableDigestBefore = HBaseTestUtil.checksumRows(table);

    // Cause regions to reopen
    admin.disableTable(TABLE_NAME);
    admin.enableTable(TABLE_NAME);
    assertEquals("Data should remain after reopening of regions",
                 tableDigestBefore, HBaseTestUtil.checksumRows(table));

    // cleanup
    // - disable and drop table
    admin.disableTable(TABLE_NAME);
    admin.deleteTable(TABLE_NAME);
    // - remove incremental load output
    fs.delete(testDir, true);
  }

  private void chmod(String uri) {
    sh.exec("hadoop fs -chmod -R 777 " + uri);
    assertEquals("chmod failed", 0, sh.getRet());
  }

  private void runIncrementalPELoad(String table, String outDir) {
    sh.exec("export HADOOP_CLASSPATH=" + HBASE_CONF_DIR + ":" + HBASE_JAR + ":" + HBASE_TESTS_JAR + ":" + ZOOKEEPER_JAR,
            "hadoop jar " + INCRLOAD_JAR + " " + INCRLOAD +
            " -libjars " + HBASE_JAR + "," + HBASE_TESTS_JAR +
            " " + table + " " + outDir);
    assertEquals("MR job failed", 0, sh.getRet());
  }

}


text:
<?php

$lang = array(

'msm_product_name' =>
'Gestionnaire de site multiples',

'msm_version' =>
'Version : ',

'msm_build_number' =>
'Moutûre : ',

'sites_administration' =>
"Administration des sites",

'site_management' =>
"Gestion des sites",

'site_id' =>
"ID du site",

'site_name' =>
"Nom court du site",

'site_label' =>
"Intitulé du site",

'create_new_site' =>
"Créer un nouveau site",

'edit_site' =>
"Éditer le site",

'site_description' =>
"Description du site",

'site_administration_set' =>
"Set Administration",

'site_mailinglists_set' =>
"Set liste de diffusion",

'site_members_set' =>
"Set membres",

'site_templates_set' =>
"Set modèles",

'site_channels_set' =>
"Set canaux",

'no_site_name' =>
"Aucun nom de site",

'no_site_label' =>
"Aucun intitulé de site",

'site_name_taken' =>
"Nom du site déjà pris",

'new_set_missing_name' =>
"Vous avez oublié le nom d'un de vos nouveaux Sets.",

'site_created' =>
"Site créé",

'site_updated' =>
"Site mis à jour",

'unable_to_locate_specialty' =>
"Impossible de localiser les modèles spécialisés. Veuillez vérifier que vous avez téléchargé tous les fichiers de langue.",

'delete_site' =>
"Supprimer le site",

'delete_site_confirmation' =>
"Êtes-vous sûr de vouloir définitivement supprimer ce site ?",

'site_deleted' =>
"Site supprimé",

'set_management' =>
"Gestion des Sets",

'new_set' =>
"Nouveau Set",

'edit_set' =>
"Éditer Set",

'create_new_set' =>
"Créer un nouveau Set",

'set_created' =>
"Set créé",

'set_updated' =>
"Set mis à jour",

'unable_to_locate_specialty' =>
"Impossible de localiser les modèles spécialisés. Veuillez vérifier que vous avez téléchargé tous les fichiers de langue.",

'delete_set' =>
"Supprimer le Set",

'delete_set_confirmation' =>
"Êtes-vous sûr de vouloir définitivement supprimer ce set ?",

'set_deleted' =>
"Set supprimé",

'site_set_id' =>
"ID du Set",

'site_set_name' =>
"Nom du Set",

'site_set_type' =>
"Type de Set",

'site_set_name_taken' =>
"Nom du Set déjà pris",

'move_data' =>
"Déplacer les données",

'do_nothing' =>
"Ne rien faire",

'move_options' =>
"Déplacer les options",

'move_channel_move_data' =>
"Déplacer les données de canal et les articles de canal",

'duplicate_channel_no_data' =>
"Dupliquer le canal, ne pas dupliquer les articles du canal",

'duplicate_channel_all_data' =>
"Dupliquer le canal et les articles",

'move_template_group' =>
"Déplacer le groupe de modèles",

'duplicate_template_group' =>
"Dupliquer le groupe de modèles",

'move_global_variables' =>
"Déplacer les variables globales",

'duplicate_global_variables' =>
"Dupliquer les variables globales",

'move_upload_destination' =>
"Déplacer la destination du téléchargement",

'duplicate_upload_destination' =>
"Dupliquer la destination du téléchargement",

'choose_site' =>
"Choisissez un site vers lequel basculer",

'switch_site' =>
"Basculer le site",

'timeout_warning' =>
"La duplication de grande quantité de données peut être un processus intensif, et peut causer un dépassement des limites de mémoire et de temps d'exécution du serveur, causant la perte de données.

 Veillez à toujours sauvegarder votre base de données avant d'exécuter une duplication, et si vous rencontrez des problèmes consultez votre hébergeur pour augmenter les capacités du serveur.",

''=>''
);

/* End of file sites_lang.php */
/* Location: ./system/expressionengine/language/french/sites_lang.php */


text:
<?php

use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            new Symfony\Bundle\TwigBundle\TwigBundle(),
            new Symfony\Bundle\MonologBundle\MonologBundle(),
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
            new Symfony\Bundle\AsseticBundle\AsseticBundle(),
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
            new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),

            new AppVentus\AjaxBundle\AvAjaxBundle(),
            new AppVentus\AsseticInjectorBundle\AvAsseticInjectorBundle(),
            new AppVentus\AlertifyBundle\AvAlertifyBundle(),
            new AppVentus\Awesome\ShortcutsBundle\AvAwesomeShortcutsBundle(),
            new AppVentus\Awesome\SpoolMailerBundle\AvAwesomeSpoolMailerBundle(),
            new AppVentus\ListBundle\AvListBundle(),
            new JMS\AopBundle\JMSAopBundle(),
            new JMS\DiExtraBundle\JMSDiExtraBundle($this),
            new JMS\I18nRoutingBundle\JMSI18nRoutingBundle(),
            new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
            new JMS\TranslationBundle\JMSTranslationBundle(),
            new Knp\Bundle\MenuBundle\KnpMenuBundle(),
            new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(),
            new Liip\ImagineBundle\LiipImagineBundle(),
            new Mopa\Bundle\BootstrapBundle\MopaBootstrapBundle(),
            new WhiteOctober\SwiftMailerDBBundle\WhiteOctoberSwiftMailerDBBundle(),
            new FOS\UserBundle\FOSUserBundle(),
            new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
            new Ivory\CKEditorBundle\IvoryCKEditorBundle(),

            //Victoire bundles
            new Victoire\Bundle\CoreBundle\VictoireCoreBundle(),
            new Victoire\Bundle\TwigBundle\VictoireTwigBundle(),
            new Victoire\Bundle\BlogBundle\VictoireBlogBundle(),
            new Victoire\Bundle\BusinessEntityBundle\VictoireBusinessEntityBundle(),
            new Victoire\Bundle\BusinessPageBundle\VictoireBusinessPageBundle(),
            new Victoire\Bundle\FilterBundle\VictoireFilterBundle(),
            new Victoire\Bundle\FormBundle\VictoireFormBundle(),
            new Victoire\Bundle\I18nBundle\VictoireI18nBundle(),
            new Victoire\Bundle\PageBundle\VictoirePageBundle(),
            new Victoire\Bundle\QueryBundle\VictoireQueryBundle(),
            new Victoire\Bundle\MediaBundle\VictoireMediaBundle(),
            new Victoire\Bundle\SeoBundle\VictoireSeoBundle(),
            new Victoire\Bundle\SitemapBundle\VictoireSitemapBundle(),
            new Victoire\Bundle\TemplateBundle\VictoireTemplateBundle(),
            new Victoire\Bundle\UserBundle\VictoireUserBundle(),
            new Victoire\Bundle\WidgetBundle\VictoireWidgetBundle(),
            new Victoire\Bundle\WidgetMapBundle\VictoireWidgetMapBundle(),
            new Victoire\Bundle\AnalyticsBundle\VictoireAnalyticsBundle(),
            new Victoire\Bundle\ViewReferenceBundle\ViewReferenceBundle(),

            //Victoire Widgets
            new Victoire\Widget\ArticleListBundle\VictoireWidgetArticleListBundle(),
            new Victoire\Widget\BreadcrumbBundle\VictoireWidgetBreadcrumbBundle(),
            new Victoire\Widget\ButtonBundle\VictoireWidgetButtonBundle(),
            new Victoire\Widget\FileBundle\VictoireWidgetFileBundle(),
            new Victoire\Widget\DisqusBundle\VictoireWidgetDisqusBundle(),
            new Victoire\Widget\FilterBundle\VictoireWidgetFilterBundle(),
            new Victoire\Widget\HtmlBundle\VictoireWidgetHtmlBundle(),
            new Victoire\Widget\ImageBundle\VictoireWidgetImageBundle(),
            new Victoire\Widget\LayoutBundle\VictoireWidgetLayoutBundle(),
            new Victoire\Widget\ListingBundle\VictoireWidgetListingBundle(),
            new Victoire\Widget\MarkdownBundle\VictoireWidgetMarkdownBundle(),
            new Victoire\Widget\MenuBundle\VictoireWidgetMenuBundle(),
            new Victoire\Widget\RenderBundle\VictoireWidgetRenderBundle(),
            new Victoire\Widget\TextBundle\VictoireWidgetTextBundle(),
            new Victoire\Widget\TitleBundle\VictoireWidgetTitleBundle(),
            new Victoire\Widget\SliderBundle\VictoireWidgetSliderBundle(),
            new Victoire\Widget\SitemapBundle\VictoireWidgetSitemapBundle(),
            new Victoire\Widget\CKEditorBundle\VictoireWidgetCKEditorBundle(),
            new Victoire\Widget\TabBundle\VictoireWidgetTabBundle(),
            new Victoire\Widget\ShareThisBundle\VictoireWidgetShareThisBundle(),
            new Victoire\Widget\FormBundle\VictoireWidgetFormBundle(),
            new Victoire\Widget\CookieLawBundle\VictoireWidgetCookieLawBundle(),
            new Victoire\Widget\DateBundle\VictoireWidgetDateBundle(),
            new Victoire\Widget\RichListBundle\VictoireWidgetRichListBundle(),
            new Victoire\Widget\SocialButtonsBundle\VictoireWidgetSocialButtonsBundle(),
            new Victoire\Widget\StatisticBundle\VictoireWidgetStatisticBundle(),
            new Victoire\Widget\LocaleSwitcherBundle\VictoireWidgetLocaleSwitcherBundle(),

            new Front\TemplateBundle\FrontTemplateBundle(),
            new Front\AppBundle\AppBundle(),
        ];

        if (in_array($this->getEnvironment(), ['dev', 'test'])) {
            $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
            $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
        }

        return $bundles;
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
    }
}