text:
(function () {
    'use strict';

    var uiServices = angular.module('uiServices', ['ngResource']);

    uiServices.factory('Menu', function($resource) {
        return $resource('module/menu');
    });

    uiServices.service('BootstrapDialogManager', ['LoadingModal', '$rootScope', '$timeout', function (LoadingModal, $rootScope, $timeout) {
        var that = this, modalsList = [];

        LoadingModal.openEvent($rootScope, function(event) { that.hide(); });
        LoadingModal.closeEvent($rootScope, function(event) { that.show(); });

        this.open = function (dialog) {
            modalsList.push(dialog);

            if (modalsList.length > 1) {
                modalsList[modalsList.length-2].close();
            }
            if (!LoadingModal.isOpen()) {
                dialog.open();
            }
        };

        this.close = function (dialog) {
            dialog.close();
            that.remove(dialog);
            if (modalsList.length > 0) {
                modalsList[modalsList.length-1].open();
            }
        };

        this.remove = function (dialog) {
            var i, modalsListLength = modalsList.length;

            for (i = 0; i < modalsListLength; i += 1) {
                if (modalsList[i].options.id === dialog.options.id) {
                    modalsList.splice(i, 1);
                    break;
                }
            }
        };

        this.show = function () {
            if (modalsList.length > 0 && !LoadingModal.isOpen()) {
                modalsList[modalsList.length-1].open();
            } else if (modalsList.length > 0) {
                $timeout(function() {
                    that.show();
                }, 500);
            }
        };

        this.hide = function () {
            if (modalsList.length > 0) {
                modalsList[modalsList.length-1].close();
            }
        };

        this.onhide = function (dialog) {
            $timeout(function() {
                if (modalsList.length > 0) {
                    that.remove(dialog);
                }
            }, 200);
        };

    }]);

    uiServices.service('LoadingModal', ['$rootScope', function ($rootScope) {
        var dialog, open = false;

        this.open = function () {
            if (!open) {
                dialog = new BootstrapDialog({
                    message: function(dialogRef) {
                        var $message = $('

'),
                        pageToLoad = dialog.getData('pageToLoad');
                        $message.load(pageToLoad);

                        return $message;
                    },
                    data: {
                        'pageToLoad': '../server/resources/partials/loading-splash.html'
                    },
                    closable: false,
                    draggable: false
                });

                dialog.realize();
                dialog.getModalHeader().hide();
                dialog.getModalFooter().hide();
                dialog.getModalContent().addClass('splash');
                dialog.getModalContent().css('margin-top', '40%');
                dialog.getModalBody().css('padding', '0');

                dialog.open();

                open = true;
                $rootScope.$emit('loadingModalOpen');
            }
        };

        this.close = function () {
            if (open) {
                dialog.close();
                $rootScope.$emit('loadingModalClose');
            }
            open = false;
        };

        this.isOpen = function () {
            return open;
        };

        this.openEvent = function (scope, callback) {
            var handler = $rootScope.$on('loadingModalOpen', callback);
            scope.$on('$destroy', handler);
        };

        this.closeEvent = function (scope, callback) {
            var handler = $rootScope.$on('loadingModalClose', callback);
            scope.$on('$destroy', handler);
        };

    }]);

    uiServices.factory('ModalFactory', ['BootstrapDialogManager', function (BootstrapDialogManager) {

        var modalFactory = {},

        defaultOptions = {
            type: 'type-primary',
            title: null,
            message: null,
            closable: false,
            draggable: false,
            onhide: null,
            onshow: null,
            buttonLabel: BootstrapDialog.DEFAULT_TEXTS.OK,
            btnCancelLabel: BootstrapDialog.DEFAULT_TEXTS.CANCEL,
            btnOKLabel: BootstrapDialog.DEFAULT_TEXTS.OK,
            btnOKClass: null,
            callback: null
        },

        makeAlert = function (paramOptions) {
            var dialog,
                options = angular.copy(defaultOptions),
                defaultButtons = [{
                    label: options.buttonLabel,
                    action: function (dialogRef) {
                        dialogRef.setData('btnClicked', true);
                        if (typeof dialogRef.getData('callback') === 'function' && dialogRef.getData('callback').call(this, true) === false) {
                            return false;
                        }
                        return BootstrapDialogManager.close(dialogRef);
                    }
                }];

            options = $.extend(true, options, paramOptions);

            dialog = new BootstrapDialog({
                type: options.type,
                size: options.size,
                title: options.title,
                message: options.message,
                closable: options.closable,
                draggable: options.draggable,
                onhide: options.onhide,
                onshow: options.onshow,
                data: {
                    callback: options.callback
                },
                buttons: options.buttons && options.buttons !== undefined ? options.buttons : defaultButtons
            });
            BootstrapDialogManager.open(dialog, false);
            return dialog;
        },

        makeConfirm = function (paramOptions) {
            var dialog,
                options = angular.copy(defaultOptions),
                defaultButtons = [{
                    label: options.btnCancelLabel,
                    action: function (dialogRef) {
                        if (typeof dialogRef.getData('callback') === 'function' && dialogRef.getData('callback').call(this, false) === false) {
                            return false;
                        }
                        return BootstrapDialogManager.close(dialogRef);
                    }
                }, {
                    label: options.btnOKLabel,
                    cssClass: options.btnOKClass,
                    action: function (dialogRef) {
                        if (typeof dialogRef.getData('callback') === 'function' && dialogRef.getData('callback').call(this, true) === false) {
                            return false;
                        }
                        return BootstrapDialogManager.close(dialogRef);
                    }
                }];

            options = $.extend(true, options, paramOptions);

            if (options.btnOKClass === null) {
                options.btnOKClass = ['btn', options.type.split('-')[1]].join('-');
            }

            dialog = new BootstrapDialog({
                type: options.type,
                size: options.size,
                title: options.title,
                message: options.message,
                closable: options.closable,
                draggable: options.draggable,
                onhide: options.onhide,
                onshow: options.onshow,
                data: {
                    callback: options.callback
                },
                buttons: options.buttons && options.buttons !== undefined ? options.buttons : defaultButtons
            });
            BootstrapDialogManager.open(dialog, false);
            return dialog;
        };

        modalFactory.showConfirm = function (msg, title, callback) {
            if (typeof msg === 'object' && msg.constructor === {}.constructor) {
                return makeConfirm(msg);
            } else {
                return makeConfirm({
                    message: jQuery.i18n.prop(msg),
                    title: title && title !== undefined ? jQuery.i18n.prop(title) : jQuery.i18n.prop('server.bootstrapDialog.confirm'),
                    callback: callback && callback !== undefined ? callback : null
                });
            }
        };

        modalFactory.showAlert = function (msg, title, callback) {
            if (typeof msg === 'object' && msg.constructor === {}.constructor) {
                return makeAlert(msg);
            } else {
                return makeAlert({
                    message: jQuery.i18n.prop(msg),
                    title: title && title !== undefined ? jQuery.i18n.prop(title) : jQuery.i18n.prop('server.bootstrapDialog.alert'),
                    callback: callback && callback !== undefined ? callback : null
                });
            }
        };

        modalFactory.showSuccessAlert = function (msg, title, callback) {
            return makeAlert({
                type: 'type-success',
                title: title && title !== undefined ? jQuery.i18n.prop(title) : jQuery.i18n.prop('server.success'),
                message: jQuery.i18n.prop(msg),
                callback: callback && callback !== undefined ? callback : null
            });
        };

        modalFactory.showErrorAlert = function (msg, title, rawMsg) {
            if (!msg && !rawMsg) {
                msg = 'server.error.errorUnknown';
            }
            return makeAlert({
                type: 'type-danger', //Error type
                title: title && title !== undefined ? jQuery.i18n.prop(title) : jQuery.i18n.prop('server.error'),
                message: msg && msg !== undefined ? jQuery.i18n.prop(msg) : rawMsg
            });
        };

        modalFactory.showErrorAlertWithResponse = function (defaultMsg, title, response, callback) {
            var msg = { value: "server.error", literal: false, params: [] },
                responseData = (typeof(response) === 'string') ? response : response.data;

            msg = parseResponse(responseData, defaultMsg);

            if (callback) {
                callback(msg.value, title, msg.params);
            } else if (msg.literal) {
                return makeAlert({
                    type: 'type-danger',
                    title: title && title !== undefined ? jQuery.i18n.prop(title) : jQuery.i18n.prop('server.error'),
                    message: msg.value,
                    callback: callback
                });
            } else {
                return makeAlert({
                    type: 'type-danger', //Error type
                    title: title && title !== undefined ? jQuery.i18n.prop(title) : jQuery.i18n.prop('server.error'),
                    message: jQuery.i18n.prop.apply(null, [msg.value].concat(msg.params))
                });
            }
        };

        modalFactory.showErrorWithStackTrace = function(msg, title, response) {
            var defaultMsg = 'server.error';
            if (response) {
                if(response.responseText) {
                    response = response.responseText;
                } else if(response.data) {
                    response = response.data;
                }
            }
            if (!msg) {
                msg = defaultMsg;
            }
            return makeAlert({
                type: 'type-danger', //Error type
                size: 'size-wide',
                title: title && title !== undefined ? jQuery.i18n.prop(title) : jQuery.i18n.prop('server.error'),
                message: jQuery.i18n.prop(msg).bold() + ": \n" + response
            });
        };

        return modalFactory;

    }]);
}());


text:
#import "OSAElementDefinition.h"

@interface OSAElementDefinition (IDEScriptingDefinitionDocumentLocation)
- (id)documentLocation_elementOrPropertyCode;
- (id)documentLocation_commandOrClassCode;
- (id)documentLocation_classDefinition;
@end

redpajama_set_name: RedPajamaGithub


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

<TITLE>
Àà darks.orm.core.aspect.QueryAspectAdapter µÄʹÓÃ
</TITLE>

<META NAME="date" CONTENT="2014-09-10">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      ¸ÅÊö
      Èí¼þ°ü
      Àà
    ʹÓÃ
      Ê÷
      Òѹýʱ
      Ë÷Òý
      °ïÖú

 ÉÏÒ»¸ö
 ÏÂÒ»¸ö

  ¿ò¼Ü
 ÎÞ¿ò¼Ü

  ËùÓÐÀà

Àà darks.orm.core.aspect.QueryAspectAdapter
µÄʹÓÃ

ʹÓà QueryAspectAdapter µÄÈí¼þ°ü

darks.orm.core.aspect

darks.orm.core.aspect.jclass

darks.orm.core.aspect.js

darks.orm.core.aspect.jython

darks.orm.core.aspect ÖÐ QueryAspectAdapter µÄʹÓÃ

·µ»Ø QueryAspectAdapter µÄ darks.orm.core.aspect Öеķ½·¨

 QueryAspectAdapter
AspectQueryContext.createQueryAspect(AspectData aspectData)

          ¸ù¾ÝA

 QueryAspectAdapter
AspectQueryContext.getQueryAspect()

²ÎÊýÀàÐÍΪ QueryAspectAdapter µÄ darks.orm.core.aspect Öеķ½·¨

 void
AspectQueryContext.setQueryAspect(QueryAspectAdapter queryAspect)

darks.orm.core.aspect.jclass ÖÐ QueryAspectAdapter µÄʹÓÃ

darks.orm.core.aspect.jclass ÖÐ QueryAspectAdapter µÄ×ÓÀà

 class
JavaClassQueryAspect

darks.orm.core.aspect.js ÖÐ QueryAspectAdapter µÄʹÓÃ

darks.orm.core.aspect.js ÖÐ QueryAspectAdapter µÄ×ÓÀà

 class
JsQueryAspect

darks.orm.core.aspect.jython ÖÐ QueryAspectAdapter µÄʹÓÃ

darks.orm.core.aspect.jython ÖÐ QueryAspectAdapter µÄ×ÓÀà

 class
PythonQueryAspect

      ¸ÅÊö
      Èí¼þ°ü
      Àà
    ʹÓÃ
      Ê÷
      Òѹýʱ
      Ë÷Òý
      °ïÖú

 ÉÏÒ»¸ö
 ÏÂÒ»¸ö

  ¿ò¼Ü
 ÎÞ¿ò¼Ü

  ËùÓÐÀà


text:
uploadify3_demo
===============

This is my Chinese demonstration project on uploadify hehehe


text:
package com.ing.baker.petrinet.api

trait MarkingOps {

  /**
   * Some convenience method additions to work with Markings.
   */
  implicit class MarkingFunctions[P](marking: Marking[P]) {

    def multiplicities: MultiSet[P] = marking.view.map { case (key, value) => (key, value.multisetSize)}.toMap

    def add(p: P, value: Any, count: Int = 1): Marking[P] = {
      val newTokens = marking.getOrElse(p, MultiSet.empty).multisetIncrement(value, count)
      marking.+(p -> newTokens)
    }

    def |-|(other: Marking[P]): Marking[P] = other.keySet.foldLeft(marking) {

      case (result, place) =>

        marking.get(place) match {
          case None => result
          case Some(tokens) =>
            val newTokens = tokens.multisetDifference(other(place))
            if (newTokens.isEmpty)
              result - place
            else
              result + (place -> newTokens)
        }
    }

    def |+|(other: Marking[P]): Marking[P] = other.keySet.foldLeft(marking) {
      case (result, place) =>
        val newTokens = marking.get(place) match {
          case None         => other(place)
          case Some(tokens) => tokens.multisetSum(other(place))
        }

        result + (place -> newTokens)
    }
  }

  implicit class IterableToMarking[P](i: Iterable[(P, MultiSet[Any])]) {
    def toMarking: Marking[P] = i.toMap[P, MultiSet[Any]]
  }

  /**
    * maps a MultiSet of Places to a Marking with always null values.

    * Having null values here is due to the design of petrinet library which uses a ColoredPetriNet which supports tokens with values.

    * Here we only know the Place and the number of tokens, but not the values, so the value is initialized to null.
    * @param mset MultiSet of Places
    * @tparam P Place type parameter
    * @return Marking (state of the petrinet) with 'null' token values
    */
  implicit class MultiSetToMarking[P](mset: MultiSet[P]) {
    def toMarking: Marking[P] = mset.map { case (p, n) => p -> Map[Any, Int](Tuple2(null, n)) }.toMarking
  }
}


text:
namespace caffe {

template <typename Dtype>
void CuDNNTanHLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom,
      const vector<Blob<Dtype>*>& top) {
  TanHLayer<Dtype>::LayerSetUp(bottom, top);
  // initialize cuDNN
  CUDNN_CHECK(cudnnCreate(&handle_));
  cudnn::createTensorDesc<Dtype>(&bottom_desc_);
  cudnn::createTensorDesc<Dtype>(&top_desc_);
  cudnn::createActivationDescriptor<Dtype>(&activ_desc_, CUDNN_ACTIVATION_TANH);
  handles_setup_ = true;
}

template <typename Dtype>
void CuDNNTanHLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,
      const vector<Blob<Dtype>*>& top) {
  TanHLayer<Dtype>::Reshape(bottom, top);

  cudnn::setTensorNdDesc<Dtype>(&bottom_desc_, bottom[0]->shape());
  cudnn::setTensorNdDesc<Dtype>(&top_desc_, top[0]->shape());
}

template <typename Dtype>
CuDNNTanHLayer<Dtype>::~CuDNNTanHLayer() {
  // Check that handles have been setup before destroying.
  if (!handles_setup_) { return; }

  cudnnDestroyTensorDescriptor(this->bottom_desc_);
  cudnnDestroyTensorDescriptor(this->top_desc_);
  cudnnDestroy(this->handle_);
}

INSTANTIATE_CLASS(CuDNNTanHLayer);

}  // namespace caffe
#endif


text:
const ProductsService = ($http) => {
  return {
    fetch: (url) => {
      return $http.get(url);
    }};
};

ProductsService.$inject = ['$http'];

export {ProductsService};


text:
BufferQueue::BufferQueue(unsigned int uiSize) : m_pBuffer(NULL), m_uiSize(uiSize), m_uiHead(0), m_uiTail(0), m_uiNumFullElements(0)
{
    // Create Semaphore to monitor the number of full elements
    // initial value is 0, the max value is uiSize
    m_NumFull.create(0, m_uiSize);

    // Create Semaphore to monitor the number of empty elements
    // initial value is uiSize, the max value is uiSize
    m_NumEmpty.create(uiSize, m_uiSize);

    m_pBuffer = new BufferElement[m_uiSize];

    for (unsigned int i = 0; i < m_uiSize; i++)
    {
        m_pBuffer[i].Mutex.create(1, 1);
        m_pBuffer[i].pData      = NULL;
    }
}

BufferQueue::~BufferQueue()
{
    m_NumFull.destroy();
    m_NumEmpty.destroy();

    if (m_pBuffer)
    {
        // Release all semaphores
        for (unsigned int i = 0; i < m_uiSize; i++)
        {
            m_pBuffer[i].Mutex.destroy();
        }

        delete [] m_pBuffer;
    }
}

// assigns memory to this buffer.
void BufferQueue::setBufferMemory(unsigned int uiId, void* pData)
{
    if (m_pBuffer && uiId < m_uiSize)
    {
        m_pBuffer[uiId].Mutex.waitForObject();
        m_pBuffer[uiId].pData  = pData;

        m_pBuffer[uiId].Mutex.release();
    }
}

// Produces an entry
// get a buffer for writing. Buffer will be filled
unsigned int BufferQueue::getBufferForWriting(void* &pBuffer)
{
    // Wait until an empty slot is available
    m_NumEmpty.waitForObject();

    // Enter critical section
    m_pBuffer[m_uiHead].Mutex.waitForObject();

    pBuffer = m_pBuffer[m_uiHead].pData;

    return m_uiHead;
}

// Mark buffer as full, ready to be consumed
void BufferQueue::releaseWriteBuffer()
{
    // Leave critical section
    m_pBuffer[m_uiHead].Mutex.release();

    // Increment the number of full buffers
    m_NumFull.release();

    ++m_uiNumFullElements;

    // switch to next buffer
    m_uiHead = (m_uiHead + 1) % m_uiSize;
}

// get a buffer for reading
unsigned int BufferQueue::getBufferForReading(void* &pBuffer)
{
    // Wait until the buffer is available
    m_NumFull.waitForObject();

    // Block buffer
    m_pBuffer[m_uiTail].Mutex.waitForObject();

    pBuffer = m_pBuffer[m_uiTail].pData;

    return m_uiTail;
}

// Check if a full buffer is ready but do not block in case no buffer is available
bool BufferQueue::getBufferForReadingIfAvailable(void* &pBuffer, unsigned int &uiIdx)
{
    bool bStatus = m_NumFull.waitForObject(0);

    if (bStatus)
    {
        // Block buffer
        m_pBuffer[m_uiTail].Mutex.waitForObject();

        pBuffer = m_pBuffer[m_uiTail].pData;

        uiIdx = m_uiTail;

        return true;
    }

    return false;
}

// Mark buffer as empty, ready to be filled
void BufferQueue::releaseReadBuffer()
{
    // Release buffer
    m_pBuffer[m_uiTail].Mutex.release();

    // Increase number of empty buffers
    m_NumEmpty.release();

    --m_uiNumFullElements;

    // switch to next buffer
    m_uiTail = (m_uiTail + 1) % m_uiSize;
}


text:
<?php

namespace Pagekit\System\Event;

use Pagekit\Application as App;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class ThemeListener implements EventSubscriberInterface
{
    /**
     * Loads the site/admin theme.
     */
    public function onSystemInit()
    {
        $app = App::getInstance();
        $theme = $app['module']['system']->config('theme.site');

        $app['module']->load($theme);
        if ($app['theme.site'] = $app['module']->get($theme)) {
            $app->on('system.site', function () use ($app) {
                $app['view']->setLayout($app['theme.site']->getLayout());
            });
        }
    }

    /**
     * {@inheritdoc}
     */
    public static function getSubscribedEvents()
    {
        return [
            'system.init' => ['onSystemInit', 10]
        ];
    }
}


text:
package ca.uhn.fhir.jpa.mdm.svc;

import ca.uhn.fhir.jpa.entity.MdmLink;
import ca.uhn.fhir.jpa.mdm.BaseMdmR4Test;
import ca.uhn.fhir.mdm.api.MdmConstants;
import ca.uhn.fhir.mdm.model.CanonicalEID;
import ca.uhn.fhir.mdm.util.EIDHelper;
import org.hl7.fhir.instance.model.api.IAnyResource;
import org.hl7.fhir.r4.model.Identifier;
import org.hl7.fhir.r4.model.Patient;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.TestPropertySource;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import static ca.uhn.fhir.mdm.api.MdmMatchResultEnum.MATCH;
import static ca.uhn.fhir.mdm.api.MdmMatchResultEnum.POSSIBLE_DUPLICATE;
import static ca.uhn.fhir.mdm.api.MdmMatchResultEnum.POSSIBLE_MATCH;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.in;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.slf4j.LoggerFactory.getLogger;

@TestPropertySource(properties = {
	"mdm.prevent_multiple_eids=false"
})
public class MdmMatchLinkSvcMultipleEidModeTest extends BaseMdmR4Test {
	private static final Logger ourLog = getLogger(MdmMatchLinkSvcMultipleEidModeTest.class);
	@Autowired
	private EIDHelper myEidHelper;

	@Test
	public void testIncomingPatientWithEIDThatMatchesGoldenResourceWithHapiEidAddsExternalEidsToGoldenResource() {
		// Existing GoldenResource with system-assigned EID found linked from matched Patient.  incoming Patient has EID.
		// Replace GoldenResource system-assigned EID with Patient EID.
		Patient patient = createPatientAndUpdateLinks(buildJanePatient());
		assertLinksMatchResult(MATCH);
		assertLinksCreatedNewResource(true);
		assertLinksMatchedByEid(false);

		IAnyResource janeGoldenResource = getGoldenResourceFromTargetResource(patient);
		List<CanonicalEID> hapiEid = myEidHelper.getHapiEid(janeGoldenResource);
		String foundHapiEid = hapiEid.get(0).getValue();

		Patient janePatient = buildJanePatient();
		addExternalEID(janePatient, "12345");
		addExternalEID(janePatient, "67890");
		createPatientAndUpdateLinks(janePatient);
		assertLinksMatchResult(MATCH, MATCH);
		assertLinksCreatedNewResource(true, false);
		assertLinksMatchedByEid(false, false);

		//We want to make sure the patients were linked to the same GoldenResource.
		assertThat(patient, is(sameGoldenResourceAs(janePatient)));

		Patient sourcePatient = (Patient) getGoldenResourceFromTargetResource(patient);

		List<Identifier> identifier = sourcePatient.getIdentifier();

		//The collision should have kept the old identifier
		Identifier firstIdentifier = identifier.get(0);
		assertThat(firstIdentifier.getSystem(), is(equalTo(MdmConstants.HAPI_ENTERPRISE_IDENTIFIER_SYSTEM)));
		assertThat(firstIdentifier.getValue(), is(equalTo(foundHapiEid)));

		//The collision should have added a new identifier with the external system.
		Identifier secondIdentifier = identifier.get(1);
		assertThat(secondIdentifier.getSystem(), is(equalTo(myMdmSettings.getMdmRules().getEnterpriseEIDSystem())));
		assertThat(secondIdentifier.getValue(), is(equalTo("12345")));

		Identifier thirdIdentifier = identifier.get(2);
		assertThat(thirdIdentifier.getSystem(), is(equalTo(myMdmSettings.getMdmRules().getEnterpriseEIDSystem())));
		assertThat(thirdIdentifier.getValue(), is(equalTo("67890")));
	}

	@Test
	// Test Case #4
	public void testHavingMultipleEIDsOnIncomingPatientMatchesCorrectly() {

		Patient patient1 = buildJanePatient();
		addExternalEID(patient1, "id_1");
		addExternalEID(patient1, "id_2");
		addExternalEID(patient1, "id_3");
		addExternalEID(patient1, "id_4");
		createPatientAndUpdateLinks(patient1);
		assertLinksMatchResult(MATCH);
		assertLinksCreatedNewResource(true);
		assertLinksMatchedByEid(false);

		Patient patient2 = buildPaulPatient();
		addExternalEID(patient2, "id_5");
		addExternalEID(patient2, "id_1");
		patient2 = createPatientAndUpdateLinks(patient2);
		assertLinksMatchResult(MATCH, MATCH);
		assertLinksCreatedNewResource(true, false);
		assertLinksMatchedByEid(false, true);

		assertThat(patient1, is(sameGoldenResourceAs(patient2)));

		clearExternalEIDs(patient2);
		addExternalEID(patient2, "id_6");

		//At this point, there should be 5 EIDs on the GoldenResource
		Patient patientFromTarget = (Patient) getGoldenResourceFromTargetResource(patient2);
		assertThat(patientFromTarget.getIdentifier(), hasSize(5));

		updatePatientAndUpdateLinks(patient2);
		assertLinksMatchResult(MATCH, MATCH);
		assertLinksCreatedNewResource(true, false);
		assertLinksMatchedByEid(false, true);

		assertThat(patient1, is(sameGoldenResourceAs(patient2)));

		patientFromTarget = (Patient) getGoldenResourceFromTargetResource(patient2);
		assertThat(patientFromTarget.getIdentifier(), hasSize(6));
	}

	@Test
	public void testDuplicateGoldenResourceLinkIsCreatedWhenAnIncomingPatientArrivesWithEIDThatMatchesAnotherEIDPatient() {
		Patient patient1 = buildJanePatient();
		addExternalEID(patient1, "eid-1");
		addExternalEID(patient1, "eid-11");
		patient1 = createPatientAndUpdateLinks(patient1);
		assertLinksMatchResult(MATCH);
		assertLinksCreatedNewResource(true);
		assertLinksMatchedByEid(false);

		Patient patient2 = buildJanePatient();
		addExternalEID(patient2, "eid-2");
		addExternalEID(patient2, "eid-22");
		patient2 = createPatientAndUpdateLinks(patient2);
		assertLinksMatchResult(MATCH, MATCH, POSSIBLE_DUPLICATE);
		assertLinksCreatedNewResource(true, true, false);
		assertLinksMatchedByEid(false, false, true);

		List<MdmLink> possibleDuplicates = myMdmLinkDaoSvc.getPossibleDuplicates();
		assertThat(possibleDuplicates, hasSize(1));

		List<Long> duplicatePids = Stream.of(patient1, patient2)
			.map(this::getGoldenResourceFromTargetResource)
			.map(myIdHelperService::getPidOrNull)
			.collect(Collectors.toList());

		//The two GoldenResources related to the patients should both show up in the only existing POSSIBLE_DUPLICATE MdmLink.
		MdmLink mdmLink = possibleDuplicates.get(0);
		assertThat(mdmLink.getGoldenResourcePid(), is(in(duplicatePids)));
		assertThat(mdmLink.getSourcePid(), is(in(duplicatePids)));
	}

	@Test
	// Test Case #5
	public void testWhenPatientEidUpdateWouldCauseALinkChangeThatDuplicateGoldenResourceIsCreatedInstead() {
		Patient patient1 = buildJanePatient();
		addExternalEID(patient1, "eid-1");
		addExternalEID(patient1, "eid-11");
		patient1 = createPatientAndUpdateLinks(patient1);
		assertLinksMatchResult(MATCH);
		assertLinksCreatedNewResource(true);
		assertLinksMatchedByEid(false);

		Patient patient2 = buildPaulPatient();
		addExternalEID(patient2, "eid-2");
		addExternalEID(patient2, "eid-22");
		patient2 = createPatientAndUpdateLinks(patient2);
		assertLinksMatchResult(MATCH, MATCH);
		assertLinksCreatedNewResource(true, true);
		assertLinksMatchedByEid(false, false);

		Patient patient3 = buildPaulPatient();
		addExternalEID(patient3, "eid-22");
		patient3 = createPatientAndUpdateLinks(patient3);
		assertLinksMatchResult(MATCH, MATCH, MATCH);
		assertLinksCreatedNewResource(true, true, false);
		assertLinksMatchedByEid(false, false, true);

		//Now, Patient 2 and 3 are linked, and the GoldenResource has 2 eids.
		assertThat(patient2, is(sameGoldenResourceAs(patient3)));

		//Now lets change one of the EIDs on the second patient to one that matches our original patient.
		//This should create a situation in which the incoming EIDs are matched to _two_ different GoldenResources. In this case, we want to
		//set them all to possible_match, and set the two GoldenResources as possible duplicates.
		patient2.getIdentifier().clear();
		addExternalEID(patient2, "eid-11");
		addExternalEID(patient2, "eid-22");
		patient2 = updatePatientAndUpdateLinks(patient2);
		logAllLinks();
		assertLinksMatchResult(MATCH, POSSIBLE_MATCH, MATCH, POSSIBLE_MATCH, POSSIBLE_DUPLICATE);
		assertLinksCreatedNewResource(true, true, false, false, false);
		assertLinksMatchedByEid(false, true, true, true, true);

		assertThat(patient2, is(not(matchedToAGoldenResource())));
		assertThat(patient2, is(possibleMatchWith(patient1)));
		assertThat(patient2, is(possibleMatchWith(patient3)));

		List<MdmLink> possibleDuplicates = myMdmLinkDaoSvc.getPossibleDuplicates();
		assertThat(possibleDuplicates, hasSize(1));
		assertThat(patient3, is(possibleDuplicateOf(patient1)));
	}
}


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

namespace Nucleus.Game
{
    /// <summary>
    /// An abstract base class for documents which act as a save file
    /// for a game state
    /// </summary>
    [Serializable]
    public abstract class GameSaveFile : Document
    {
        #region Methods

        /// <summary>
        /// Retrieve the game state (if any) stored in this save file
        /// </summary>
        /// <returns></returns>
        public abstract GameState RetrieveState();

        #endregion

        #region Static Methods

        /// <summary>
        /// Load a ModelDocument from a file stored in binary format
        /// </summary>
        /// <param name="filePath">The path of the file to be loaded.</param>
        /// <returns>The loaded document, if a document could indeed be loaded.
        /// Else, null.</returns>
        public static GameSaveFile Load(FilePath filePath)
        {
            return Load<GameSaveFile>(filePath);
        }

        #endregion
    }

    /// <summary>
    /// An abstract base class for game save files which store a
    /// particular type of game state
    /// </summary>
    /// <typeparam name="TState"></typeparam>
    [Serializable]
    public abstract class GameSaveFile<TState> : GameSaveFile
        where TState : GameState
    {
        #region Properties

        /// <summary>
        /// Private backing member variable for the State property
        /// </summary>
        private TState _State;

        /// <summary>
        /// The state which is stored in this file
        /// </summary>
        public TState State
        {
            get { return _State; }
            set { _State = value; }
        }

        #endregion

        #region Methods

        /// <summary>
        /// Retrieve the game state (if any) stored in this save file
        /// </summary>
        /// <returns></returns>
        public override GameState RetrieveState()
        {
            return State;
        }

        #endregion
    }

}


text:
<?php

namespace Chippyash\Test\Type\Number\Rational;

use Chippyash\Type\Number\IntType;
use Chippyash\Type\RequiredType;

class AbstractRationalTypeTest extends \PHPUnit_Framework_TestCase
{

    /**
     * Mock
     * @var \Chippyash\Type\Number\Rational\AbstractRationalType
     */
    protected $object;

    public function setUp()
    {
        RequiredType::getInstance()->set(RequiredType::TYPE_NATIVE);
        $this->object = $this->getMockForAbstractClass(
                'Chippyash\Type\Number\Rational\AbstractRationalType',
                array(new IntType(3), new IntType(4)));
    }

    public function testMagicInvokeProxiesToGet()
    {
        $o = $this->object;
        $this->assertEquals(3 / 4, $o());
    }

    public function testSetReturnsObject()
    {
        $o = $this->object;
        $this->assertInstanceOf(
                'Chippyash\Type\Number\Rational\AbstractRationalType',
                $o->set(new IntType(3), new IntType(4)));
    }

    /**
     * @expectedException InvalidArgumentException
     * @expectedExceptionMessage Expected 2 parameters, got 1
     */
    public function testSetExpectsAtLeastTwoParameters()
    {
        $this->object->set('foo');
    }

    /**
     * @expectedException InvalidArgumentException
     * @expectedExceptionMessage Invalid Type (string) at position 0
     */
    public function testSetProxiesToSetFromTypesWithTwoParametersExpectsIntTypeParameters()
    {
        $this->object->set('foo','bar');
    }

    public function testNumeratorReturnsValue()
    {
        $this->assertEquals(new IntType(3), $this->object->numerator());
    }

    public function testDenominatorReturnsValue()
    {
        $this->assertEquals(new IntType(4), $this->object->denominator());
    }

    public function testGetReturnsValue()
    {
        $o = $this->object;
        $this->assertEquals(0.75, $o->get());
    }

    public function testAsComplexReturnsComplexType()
    {
        $c = $this->object->asComplex();
        $this->assertInstanceOf('\Chippyash\Type\Number\Complex\ComplexType', $c);
        $this->assertEquals('3/4', (string) $c);
        $this->assertInstanceOf('Chippyash\Type\Number\Rational\RationalType', $c->r());
        $this->assertInstanceOf('Chippyash\Type\Number\Rational\RationalType', $c->i());
    }

    public function testAsRationalReturnsRationalType()
    {
        $o = $this->object;
        $r = $o->AsRational();
        $this->assertEquals($o, $r);
    }

    public function testAsFloatTypeReturnsFloatType()
    {
        $o = $this->object;
        $f = $o->asFloatType();
        $this->assertInstanceOf('\Chippyash\Type\Number\FloatType', $f);
        $this->assertEquals(0.75, $f());
    }

    public function testAsIntTypeReturnsIntType()
    {
        $o = $this->object;
        $i = $o->AsIntType();
        $this->assertInstanceOf('\Chippyash\Type\Number\IntType', $i);
        $this->assertEquals(0, $i());
    }
}


text:
prepare () {
    TARGETDIR=${TARGETDIR:-/tmp}
    TARGETNAME=${TARGETNAME:-FAKE-KERNEL-PACKAGE}

    # specific, or common testplan, or common testrun, or process ID
    TARGETID=${TARGETID:-${TAPPER_TESTPLAN:-${TAPPER_TESTRUN:-$$}}}
    GENERATED_FILE="$TARGETDIR/$TARGETNAME-$TARGETID.tgz"
}

build_kernel ()
{

    # build the fake kernel package

    tempdir=$(mktemp -d)
    CONTEXT=context.txt
    BUILER_TAP="$tempdir/$TARGETID.tap"

    # create builder report outside of STDOUT
    echo "1..3"                                               > $BUILER_TAP
    echo "# Tapper-suite-name: " $(basename $0)              >> $BUILER_TAP
    echo "# Tapper-machine-name: " $(hostname)               >> $BUILER_TAP   # alternative: use $TAPPER_HOSTNAME (the *target* hostname)
    if [ -n "$TAPPER_TESTRUN" ] ; then
        echo "# Tapper-reportgroup-testrun: $TAPPER_TESTRUN" >> $BUILER_TAP
    fi
    if [ ! -d "$tempdir" ] ; then echo -n "not "             >> $BUILER_TAP ; fi
    echo "ok - tempdir created"                              >> $BUILER_TAP

    cd $tempdir
    (
        echo "------------------------------------------------------------"
        echo ""
        echo "We were called with:"
        echo "  $0 " "${@}"
        echo ""
        echo "------------------------------------------------------------"
        echo ""
        echo "some env:"
        echo ""
        echo "CHOST: $CHOST"
        echo "CFLAGS: $CFLAGS"
        echo "CXXFLAGS: $CXXFLAGS"
        echo "TARGETDIR: $TARGETDIR"
        echo "TARGETID: $TARGETID"
        echo "TARGETNAME: $TARGETNAME"
        echo "TAPPER_TESTRUN: $TAPPER_TESTRUN"
        echo "TAPPER_TESTPLAN: $TAPPER_TESTPLAN"
        echo "TAPPER_HOSTNAME: $TAPPER_HOSTNAME"
        echo "TAPPER_SERVER: $TAPPER_SERVER_"
        echo "TAPPER_REPORT_SERVER: $TAPPER_REPORT_SERVER"
        echo "TAPPER_REPORT_PORT: $TAPPER_REPORT_PORT"
        echo "TAPPER_REPORT_API_PORT: $TAPPER_REPORT_API_PORT"
        echo ""
        echo "full env:"
        echo ""
        echo "------------------------------------------------------------"
        echo ""
        env|grep -v LESS_TERMCAP
    ) > $CONTEXT

    FAKEKERNEL="kernel-3.0-$TARGETID.tar.gz"
    echo "affe zomtec birne tiger fink und star" > $FAKEKERNEL

    echo "ok - fake kernel generated"           >> $BUILER_TAP
    echo "# generated kernel: $FAKEKERNEL"      >> $BUILER_TAP

    tar czf $GENERATED_FILE *

    echo "ok - package generated"               >> $BUILER_TAP
    echo "# generated package: $GENERATED_FILE" >> $BUILER_TAP

    send_builder_report

    rm -fr "$tempdir"
}

output_precondition ()
{
    echo "---
precondition_type: testprogram
program: $HOME/.tapper/hello-world/controlfiles/example_kernel_install.sh
parameters:
  - $GENERATED_FILE
capture: tap
---
precondition_type: testprogram
program: /bin/sleep
parameters:
  - 2
"
}

# stolen from tapper-autoreport.autoreport_start()
send_builder_report ()
{
    NETCAT=$(which netcat 2> /dev/null || which nc 2> /dev/null)
    # does it provide -q option
    if $NETCAT -h 2>&1 |grep -q -- '-q.*quit' ; then
        NETCAT="$NETCAT -q3"
    else
        NETCAT="$NETCAT -w3"
    fi

    if [ -n "$TAPPER_REPORT_SERVER" -a -n "$TAPPER_REPORT_PORT" ] ; then
        MYNETCAT="$NETCAT $TAPPER_REPORT_SERVER $TAPPER_REPORT_PORT"
        output=$(cat $BUILER_TAP | $MYNETCAT ) # capture STDOUT to not pollute our own
    fi
}

main ()
{
    prepare

    # avoid rebuilding the same
    if [ -e $GENERATED_FILE ] ; then
        # make it a YAML '#' comment line, just in case someone redirects us STDOUT
        echo "# File $GENERATED_FILE already exists - skip building." 1>&2
    else
        build_kernel
    fi

    output_precondition
}

main


text:
/*
 *@name Recursión
 *@description Una demonstración de recursión, que significa funciones llamándose a sí mismas.
 * Fíjate cómo la función drawCircle() se llama a sí misma al final del bloque de código.
 * Continúa haciéndolo hasta que la variable "level" es igual a 1.
*/

function setup() {
  createCanvas(720, 400);
  noStroke();
  noLoop();
}

function draw() {
  drawCircle(width/2, 280, 6);
}

function drawCircle(x, radius, level) {
  var tt = 126 * level/4.0;
  fill(tt);
  ellipse(x, height/2, radius*2, radius*2);
  if(level > 1) {
    level = level - 1;
    drawCircle(x - radius/2, radius/2, level);
    drawCircle(x + radius/2, radius/2, level);
  }
}


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

    <title>YUI: Overlay with rounded corners & a knob</title>
    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.3.1/build/reset-fonts-grids/reset-fonts-grids.css">
    <link rel="stylesheet" href="http://blog.davglass.com/wp-content/themes/davglass/style.css" type="text/css">
    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.3.1/build/container/assets/container.css">
    <link rel="stylesheet" type="text/css" href="http://us.js2.yimg.com/us.js.yimg.com/i/ydn/yuiweb/css/dpsyntax-min-11.css">
    <link rel="stylesheet" type="text/css" href="style.css">

YUI: Overlay with rounded corners & a knob

        This is a test.
        This is a test.
        This is a test.
        This is a test.
        This is a test.

The HTML

<textarea name="code" class="HTML">

        This is a test.
        This is a test.
        This is a test.
        This is a test.
        This is a test.

</textarea>

The Javascript

<textarea name="code" class="JScript">
(function() {
    var Event = YAHOO.util.Event,
        panel = null;

    Event.onDOMReady(function() {
        panel = new YAHOO.widget.Overlay('dlg', {
            visible: true,
            height: '150px',
            width: '250px',
            xy: [100, 100]
        });
        panel.render(document.body);
	});

    dp.SyntaxHighlighter.HighlightAll('code');

})();
</textarea>

The CSS

<textarea name="code" class="HTML">
<?php
include('style.css');
?>
</textarea>


text:
Routable is an in-app native URL router, for Android. Also available for [iOS](https://github.com/usepropeller/routable-ios).

## Usage

Set up your app's router and URLs:

```java
import com.usepropeller.routable.Router;

public class PropellerApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();

        // Set the global context
        Router.sharedRouter().setContext(getApplicationContext());
        // Symbol-esque params are passed as intent extras to the activities
        Router.sharedRouter().map("users/:id", UserActivity.class);
        Router.sharedRouter().map("users/new/:name/:zip", NewUserActivity.class);
    }
}
```

In your `Activity` classes, add support for the URL params:

```java
import com.usepropeller.routable.Router;

public class UserActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Bundle intentExtras = getIntent().getExtras();
        // Note this extra, and how it corresponds to the ":id" above
        String userId = intentExtras.get("id");
    }
}

public class NewUserActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Bundle intentExtras = getIntent().getExtras();
        // Corresponds to the ":name" above
        String name = intentExtras.get("name");
        // Corresponds to the ":zip" above
        String zip = intentExtras.get("zip");
    }
}
```

*Anywhere* else in your app, open some URLs:

```java
// starts a new UserActivity
Router.sharedRouter().open("users/16");
// starts a new NewUserActivity
Router.sharedRouter().open("users/new/Clay/94303");
```

## Installation

Routable is currently an Android library project (so no Maven).

If you're in a hurry, you can just copy-paste the [Router.java](https://github.com/usepropeller/routable-android/blob/master/src/com/usepropeller/routable/Router.java) file.

Or if you're being a little more proactive, you should import the Routable project (this entire git repo) into Eclipse and [reference it](http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject) in your own project.

## Features

### Routable Functions

You can call arbitrary blocks of code with Routable:

```java
Router.sharedRouter().map("logout", new Router.RouterCallback() {
    public void run(Router.RouteContext context) {
        User.logout();
    }
});

// Somewhere else
Router.sharedRouter().open("logout");
```

### Open External URLs

Sometimes you want to open a URL outside of your app, like a YouTube URL or open a web URL in the browser. You can use Routable to do that:

```java
Router.sharedRouter().openExternal("http://www.youtube.com/watch?v=oHg5SJYRHA0")
```

### Multiple Routers

If you need to use multiple routers, simply create new instances of `Router`:

```java
Router adminRouter = new Router();

Router userRouter = new Router();
```

## Contact

Clay Allsopp ([http://clayallsopp.com](http://clayallsopp.com))

- [http://twitter.com/clayallsopp](http://twitter.com/clayallsopp)
- [clay@usepropeller.com](clay@usepropeller.com)

## License

Routable for Android is available under the MIT license. See the LICENSE file for more info.


text:
'use strict';

module.exports = block;

/* Stringify a block node with block children (e.g., `root`
 * or `blockquote`).
 * Knows about code following a list, or adjacent lists
 * with similar bullets, and places an extra newline
 * between them. */
function block(node) {
  var self = this;
  var values = [];
  var children = node.children;
  var length = children.length;
  var index = -1;
  var child;
  var prev;

  while (++index < length) {
    child = children[index];

    if (prev) {
      /* Duplicate nodes, such as a list
       * directly following another list,
       * often need multiple new lines.
       *
       * Additionally, code blocks following a list
       * might easily be mistaken for a paragraph
       * in the list itself. */
      if (child.type === prev.type && prev.type === 'list') {
        values.push(prev.ordered === child.ordered ? '\n\n\n' : '\n\n');
      } else if (prev.type === 'list' && child.type === 'code' && !child.lang) {
        values.push('\n\n\n');
      } else {
        values.push('\n\n');
      }
    }

    values.push(self.visit(child, node));

    prev = child;
  }

  return values.join('');
}


text:
using System.Windows.Controls;
using System.Windows.Input;

namespace Nitrogen.Client.Controls.TableView
{
    public interface ITableViewColumnHeader
    {
        int ColumnIndex { get; }
        TableViewColumn Column { get; }
    }

    public class TableViewColumnHeader : ContentControl, ITableViewColumnHeader
    {
        public int ColumnIndex
        {
            get { return Column.ColumnIndex; }
        }

        public TableViewColumn Column
        {
            get { return Content as TableViewColumn; }
        }

        internal void AdjustWidth(double width)
        {
            if (width < 1)
            {
                width = 1;
            }

            Width = width; // adjust the width of this control

            Column.AdjustWidth(width); // adjust the width of the column
        }

        public override void OnApplyTemplate()
        {
            var col = Content as TableViewColumn;
            if (col != null)
            {
                ContentTemplate = col.TitleTemplate;
            }

            base.OnApplyTemplate();
        }

        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
        {
            Focus();
            Column.FocusColumn();
            base.OnMouseLeftButtonDown(e);
        }

        protected override void OnMouseRightButtonDown(MouseButtonEventArgs e)
        {
            Focus();
            Column.FocusColumn();
            base.OnMouseRightButtonDown(e);
        }
    }
}


text:
Piping data from Illiad to the GDP
==================
# GDP router and/or log daemon configuration
    echo "swarm.gdp.routers=gdp-03.eecs.berkeley.edu; gdp-02.eecs.berkeley.edu; gdp-01.eecs.berkeley.edu" > /etc/ep_adm_params/gdp

# Install python dependencies
    pip install requests
    pip install pika
# Create a log without signature key
	gcl-create -k none <my.log.name>
# Run the main module periodically (every 15 mins) using cron
	crontab -e
	*/15 * * * * /usr/bin/python ~/sas-clientLib/demo/gdpConn/illiad2gdp.py


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_faker_grid_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".viewgroup.fakergrid.FakerGridViewActivity">

    <com.xdroid.adapter.viewgroup.widget.fakergrid.FakerGridView
        android:id="@+id/fgv"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/colorAccent"
        android:paddingBottom="10dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp"
        android:paddingTop="10dp"
        app:horizontalSpacing="10dp"
        app:numColumns="3"
        app:verticalSpacing="10dp"></com.xdroid.adapter.viewgroup.widget.fakergrid.FakerGridView>
</RelativeLayout>


text:
using System;
using System.Collections;
using System.Windows.Forms.Design;
using System.ComponentModel;

#endregion Using Directives

namespace ScintillaNET.Design
{
    // Provides additional design-time support for the Scintilla control
    internal sealed class ScintillaDesigner : ControlDesigner
    {
        #region Methods

        public override void InitializeNewComponent(IDictionary defaultValues)
        {
            base.InitializeNewComponent(defaultValues);

            // By default, the VS control designer will set a control's Text property to the
            // name of the control. This the accepted method of clearing the Text property
            // when the control is dropped on the form.
            PropertyDescriptor descriptor = TypeDescriptor.GetProperties(base.Component)["Text"];
            if (descriptor != null && descriptor.PropertyType == typeof(String) && !descriptor.IsReadOnly && descriptor.IsBrowsable)
                descriptor.SetValue(base.Component, String.Empty);
        }

        #endregion Methods
    }
}


text:
layout: post
authors: ["Pauline Barmby"]
title: "Workshop Summary: Gerstein Science Information Centre, University of Toronto"
date: 2014-11-14
time: "09:30:00"
category: ["Workshops", "University of Toronto"]
---

  Last week we ran a Python-based SWC workshop at the University of
  Toronto's Gerstein
  Science Information Centre.  The advertised audience was
  graduate students, post-docs and other researchers in science,
  engineering and medicine at the University of Toronto.

  The workshop had about 20 learners. Most were grad students or
  postdocs in life sciences. The pre-workshop assessment said that
  about three-quarters of learners had some programming experience
  with about half of those having some Python; maybe half of the total
  had some familiarity with the command line.  Almost none had
  experience with version control or SQL.  The instructors were
  Pauline Barmby, Greg Wilson, and Thomas Guignard; helpers were Sahar
  Rahmani, Luke Johnston, Daiva Nielsen, Tom Wright, and Fei Xu.  Our
  host was Erica Lenton.

  Nearly everyone had done the software installation prior to the
  workshop (!), and not too many problems were reported.  The laptops
  in use were roughly 50% Mac, 40% Windows, 10% Linux.  A handful of
  learners ran into the Mac Git problem, on which more below.

  The physical layout of the room was not quite ideal: the projector
  was pretty close to the screen and so the projected area on the
  screen was quite small.  This meant that we had to use quite large
  fonts so that people at the back of the room could see, and only a
  few lines at a time could be visible in a terminal window.  The
  screen was also not centred in the room, which meant that people in
  the front row sometimes couldn't see it around the instructor, and
  there was a pillar in the room which didn't help visibility either.
  The learners were pretty patient with this, but more than for most
  workshops they really needed to have material on their own machines
  to be able to follow along.  Another issue with the room was that
  the desks were fairly close together: for cases where a learner
  would have been best-served by working with a helper rather than
  following the lesson, it wasn't really practical for them to move
  elsewhere, and conversations with the helper couldn't be kept quiet
  enough to not disturb others. WiFi was OK but not great, moreso on
  the first day. D. Nielsen noted that, "it appears some learners
  didn't feel comfortable putting up a 'help' sticky note. Helpers
  need to scan the classroom and look at learner screens to spot those
  who may be struggling."

  The
  material we covered included: shell (Barmby), Git (Wilson),
  Python (Barmby and Xu), and SQL (Guignard).

  Pauline:Most of the material in the beginner shell lessons
  was covered the first morning.  I found the pace a bit rushed and I
  would have liked more time for the students to work on their own - I
  think the lessons contain too much material to really be covered in
  3 hours. Topics I skipped over or felt I didn't explain very well
  included "spaces in filenames" and "redirecting input".  I didn't
  feel that I made very good use of the sticky note system in the bash
  session, although I did try something else: I made the questions at
  the end of the lessons into multiple-choice questions where they
  weren't already, and asked the learners to vote on them with
  coloured cards (link).  I think this would have been useful except
  that the available projection screen real estate was so small that
  the questions were unreadable!

  At the morning break, we put a tar file containing the "Nelle"
  file/directory structure and a PDF file with the multiple-choice
  questions on Dropbox, and links to these in the Etherpad. Learners
  were able to grab these and found them helpful in following along
  for the remainder of the bash session.  There was a slight hiccup
  here where the Dropbox file took a while to sync, so not everyone
  had access to the tar file right away.  Feedback from the morning
  session included the request to have these files available earlier,
  and to have an outline of topics available before the session
  started, plus requests to go slower!

  The afternoon Git session went very smoothly. Greg took the learners through making
  a repository and adding a remote on GitHub, the change/add/commit/push cycle, forking an existing
  repository and adding the upstream remote, submitting pull requests, and
  managing conflicts. As mentioned above, a few students ran into the problem with Git not
  working on their Macs, for which the most obvious (but not-so-practical) fix is to
  download Xcode and recompile
  here
  is a link to the e-mail list thread on this topic.  Helpers noticed
  that a few learners were playing with the GitHub GUI, which confused
  them a bit and caused some issues when someone was trying to create
  a pull request.  Maybe mentioning the existence of the GUI but
  suggesting that learners not use it while learning the command-line
  tool would be a good thing to do in future. Several of us liked
  Greg's drawing of how pull requests work. Do we have an image of
  that online?

  Luke: I wonder just how useful learning about GitHub and
  collaborating via GitHub is, especially considering how much time it
  takes. I know in my own experience and my own department,
  collaboration on projects doesn't happen too often as everyone's
  research is so diverse. Using Github as a backup is a good idea
  though. Has teaching branching ever been done before?  That is
  something I see people within medical/health science use more often.

  Pauline: The second morning's Python session could have gone
  more smoothly. I used the IPython console in Spyder, rather than the
  IPython notebook for this, in part because I thought that the
  notebook would result in me moving too quickly and in part because
  I've been having problems with notebooks scrolling very slowly on my
  machine.  Learners in the back still had trouble reading the text
  (can't zoom in much because we would lose the view of the whole page
  that way).  At the break F. Xu suggested we might try screen sharing
  services like join.me, but in addition to the WiFi bandwidth Greg
  had other concerns, so we didn't do this.

  I suggested to students that they should clone the workshop repo in
  order to get the CSV and other files we'd be working with, and so
  that they could follow along in the notebooks; or they could also
  just download specific files from the repo (which, of course, you
  can't do directly from the GitHub website; we could have done it
  with rawgit.com if I had thought of
  that!).  Not everyone was able to clone the repo (bandwidth), and in
  retrospect it would have been better to put a handful of files in a
  separate repository or elsewhere, so that everyone could follow
  along. We did end up copying one small program directly to the
  etherpad so learners could play with it and modify it, but this is
  obviously not an ideal solution.

  Luke:As the Python lesson is one of the most useful for the
  participants to follow along I think pausing the lesson to go over
  the download process would have helped, as a helper I felt I was
  scrambling to reach everyone with problems at this point. With the
  git session we knew that some people were going to encounter
  problems.  As a general solution I think we should take 10 minutes
  at the start of each session to ensure everyone is up and
  running. Perhaps a simple script could be written to ensure
  datafiles are available.

  Because getting going in the morning consumed quite a bit of time,
  the actual lesson started late and felt quite rushed. F. Xu notes
  that the Python lesson seems pretty linear, so when learners get
  lost first they have to spend time on catching up, or they get lost
  even more.  He felt that frequent coding exercises like the Unix
  lecture weould have been helpful. Many people were also confused by
  the syntax, as we didn't deliberately explain it at the beginning; a
  syntax cheat sheet would have been helpful.  I think it would have
  been beneficial for learners to spend more time working on their
  own—especially given that we had quite a few helpers so they
  could have gotten one-to-one assistance.  I covered numpy,
  functions, and loops before the morning break, with loops,
  conditionals, and command-line scripts afterward, then Xu Fei took
  over with defensive programming.

  Fei: I spent less than 30 min on my part. I think the pace
  was okay, but I could have explained better if I had more experience
  with it. Partially because I wasn't familiar with the code examples
  given in the lessons (except the first one).  I'd totally go through
  the lessons first by myself before teaching.

  Learner feedback emphasized many of the same things as from the bash
  session: need to have files in advance, wanted more time to
  practice, lesson was too fast. Many learners recognized defensive
  programming as a concept that they had not encountered before but
  would find helpful.

  Thomas:The second afternoon's SQL session was my very first
  time teaching an entire session, and it felt great!  I was glad to
  have Tom Wright, who is a seasoned SQL teacher, in the room as a
  backup, to help students get along and to provide the all-too-needed
  visual confirmation that I wasn't saying too many wrong things (he
  did correct me when I wrongfully surmised that JOIN ON was still
  different than JOIN WHERE - apparently not anymore). Beginner's luck
  aside, I think this session went well. Feedback from students and
  Tom indicated that the pace was about right. I was concerned that
  the challenges I had prepared were going to be too simplistic and
  slow down the process too much but it turned out OK I think. From
  the survey, it transpired that the vast majority of students had no
  experience with SQL, so a slow pace was what they needed.  Helpers
  reported getting fewer requests for help during that session.

  I tried sticking to the lesson material as close as possible,
  knowing that I could not cover everything. I choose to focus on
  SELECTing content and not CREATE table nor INSERT data, based on
  what I had seen in previous workshops. Maybe that was a mistake,
  especially since Greg did use table modification statements in his
  concluding live coding session, and it would have helped if I had at
  least mentioned that those statements exist, as Tom later
  suggested. I also left out SELECT DISTINCT because I had kept it as
  a topic to be addressed together with GROUP BY clauses, which I had
  meant to address only if there was enough time. Again, this was
  unfortunate because Greg did use those statements. For the last 40
  minutes of the session, I asked the students if they preferred
  hearing about more statements (in case I would have talked about
  GROUP BY clauses) or doing one more, Hallowe'en-themed challenge. By
  way of stickies, they chose the extra challenge (which was a rather
  half-baked attempt to bring zombies in the existing sample data; I
  don't think I was very convincing, but they seemed to enjoy the
  challenge nevertheless). Tom suggested I let the students work on
  the assignment during the last break. We then decided with Greg to
  shorten that last break a bit so that we could finish earlier - a
  good idea on a festive day like this.

  On the technical side, we had to my knowledge very few
  SQLite-related issues. Students had little trouble getting SQLite to
  run, a bit more downloading the sample database and correctly
  loading it in their instance of SQLite. Some students still had
  trouble identifying that they had downloaded the sample database in
  a different directory than the one they were running SQLite in.
  Unfortunately, running sqlite3 survey.db if the survey.db file is
  not there does not return an error, it creates an empty database,
  which caused some confusion. In retrospect, Tom's approach of having
  the students download the sql file instead and then loading it in a
  new database is probably better.

  Fei: I think the students were well-prepared in terms of
  installation and downloading (thanks to the first page Thomas had
  prepared).  Students were motivated throughout the session from what
  I remembered, and some were even excited to create their own
  database during the break! I think it was very well explained and
  the number of exercises were just right.  I think many people wished
  to have the relational model diagram displayed somewhere so that
  they can constantly refer to it when querying. Personally I find it
  helpful to have it on a separate screen (or blackboard), or even
  saved as a file for them to download. Also, I am not sure why in the
  course example, the same field is named differently in different
  tables. I understand that in the real world data are messy, but for
  beginners, it adds an unnecessary cognitive load (maybe that's why
  they are asking for the diagram frequently).  For my own practice
  when creating databases, I keep the field name consistent across
  different tables.

  Luke: The SQL lesson was very well recieved, the pacing
  seemed about right to me with plenty of challenge breaks. I think
  the progressive nature of the challenges is one think that makes
  this lesson well received. Unfortunately creating tables and
  modifying data was not covered. I know this is deliberately left
  until the end of the lesson but when time doesn't allow proper
  coverage I think it needs to be mentioned, even just mentioning
  "Other SQL commands exist to create tables and insert and delete
  data." would give participants who need this functionality somewhere
  to start.

  Pauline: The big lesson I took from this (my first attempt at
  teaching bash and Python) is the need to be better-prepared on the
  learner side. Most of my prep time was focused on making sure I
  understood the content, pacing and structure, but if I had spent a
  few more minutes thinking about what the learners were going to do,
  I would have had files ready for them, saving everyone some
  frustration. Next time!


text:
Pattern: Use of `expr` with `:` to match a regex

Issue: -

## Description

ShellCheck found an `expr` command using `:` to match a regex, but the regex is not quoted and therefore being treated as a glob.

This means that if the problematic code is ever executed in a directory containing a file matching `[0-9]*`, such as `2021-reports` or `12 Angry Men [1957].mkv`, it will be replaced be replaced and cause the command to error or incorrectly match.

The regex should be quoted to avoid this, like in the correct example.

Example of **incorrect** code:

```sh
expr "$input" : [0-9]*
```

Example of **correct** code:

```sh
expr "$input" : "[0-9]*"
```

## Further Reading

* [ShellCheck - SC2305](https://github.com/koalaman/shellcheck/wiki/SC2305)


text:
<!DOCTYPE html>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1"/>

  <title>Programação da Mostra SP 42 (2018)</title>
  <meta name="author" content="" />
  <meta name="description"
        content="

A 42ª Mostra Internacional de Cinema em São Paulo, que acontece entre 18 e 31 de outubro, vai exibir 331 títulos. Os filmes selecionados para a edição estão divididos entre as seções Apresentações..."/>

  <meta name="yandex-verification" content="48a8210fc043c5e8" />

  <meta name="generator" content="Hugo 0.54.0" />

  <meta itemprop="name" content="Programação da Mostra SP 42 (2018)"/>
  <meta itemprop="description"
        content="

A 42ª Mostra Internacional de Cinema em São Paulo, que acontece entre 18 e 31 de outubro, vai exibir 331 títulos. Os filmes selecionados para a edição estão divididos entre as seções Apresentações..."/>
  <meta itemprop="image"
        content="/img/logo.svg"/>

  <meta property="og:title" content="Programação da Mostra SP 42 (2018)"/>
  <meta property="og:type"
        content="article"/>
  <meta property="og:url" content="http://www.cinetenisverde.com.br/blog/mostrasp-42-2018-programacao/"/>
  <meta property="og:image"
        content="/img/logo.svg"/>
  <meta property="og:description"
        content="

A 42ª Mostra Internacional de Cinema em São Paulo, que acontece entre 18 e 31 de outubro, vai exibir 331 títulos. Os filmes selecionados para a edição estão divididos entre as seções Apresentações..."/>
  <meta property="og:site_name" content="Cine Tênis Verde"/>
  <meta property="article:published_time"
        content="2018-10-16T18:08:03-03:00"/>
  <meta property="article:section" content="blog"/>

  <meta name="twitter:card" content="summary"/>
  <meta name="twitter:site"
        content=""/>
  <meta name="twitter:title" content="Programação da Mostra SP 42 (2018)"/>
  <meta name="twitter:description"
        content="

A 42ª Mostra Internacional de Cinema em São Paulo, que acontece entre 18 e 31 de outubro, vai exibir 331 títulos. Os filmes selecionados para a edição estão divididos entre as seções Apresentações..."/>
  <meta name="twitter:creator"
        content=""/>
  <meta name="twitter:image:src"
        content="/img/logo.svg"/>

  <link rel="stylesheet" type="text/css" href="/css/capsule.min.css"/>
  <link rel="stylesheet" type="text/css" href="/css/custom.css"/>

  <link rel="apple-touch-icon" href="/img/apple-touch-icon.png"/>
  <link rel="icon" href="/img/favicon.ico"/>

 Cine Tênis Verde

    <input type="checkbox" id="navbar-burger-state"/>

      search

      twitter

      rss

Programação da Mostra SP 42 (2018)

 Wanderley Caloni, October 16, 2018

HOMENAGENS

Prêmio Humanidade: Hirokazu Kore-eda

Prêmio Humanidade: Drauzio Varella

Prêmio Leon Cakoff: Jafar Panahi

RESTAURAÇÕES - A CELEBRAÇÃO DA NOSSA HISTÓRIA

MASP

PROGRAMAS ESPECIAIS - UM OLHAR MAIS PRÓXIMO

Centenário Mandela

Marx 200 Anos: Um Olhar Através do Cinema

Wang Bing

Fernando E. Solanas

Amos Gitai - Entre Israel e Palestina

Lars Von Trier

APRESENTAÇÃO ESPECIAL

FILMES DE ABERTURA E ENCERRAMENTO

COMPETIÇÃO NOVOS DIRETORES

PERSPECTIVA INTERNACIONAL

MOSTRA BRASIL

Realidade Virtual

Sessões na Biblioteca Roberto Santos

A 42ª Mostra Internacional de Cinema em São Paulo, que acontece entre 18 e 31 de outubro, vai exibir 331 títulos. Os filmes selecionados para a edição estão divididos entre as seções Apresentações Especiais, Homenagens, Restaurações, Competição Novos Diretores, Mostra Brasil e Perspectiva Internacional. Abaixo, veja a lista completa das obras selecionadas.

HOMENAGENS

Prêmio Humanidade: Hirokazu Kore-eda

ASSUNTO DE FAMÍLIA, de Hirokazu Kore-eda / Japão

Prêmio Humanidade: Drauzio Varella

CONVERSA COM ELE, de Bárbara Paz / Brasil

Prêmio Leon Cakoff: Jafar Panahi

3 FACES, de Jafar Panahi / Irã

RESTAURAÇÕES - A CELEBRAÇÃO DA NOSSA HISTÓRIA

A CAIXA DE PANDORA, de Georg Wilhelm Pabst / Alemanha (1928)

ASAS DO DESEJO, de Wim Wenders / França, Alemanha (1987)

O BANDIDO DA LUZ VERMELHA, de Rogério Sganzerla / Brasil (1968)

O BRAVO GUERREIRO, de Gustavo Dahl / Brasil (1969)

CENTRAL DO BRASIL, de Walter Salles / Brasil (1998)

FELIZ ANO VELHO, de Roberto Gervitz / Brasil (1988)

JARDIM DE GUERRA, de Neville de Almeida / Brasil (1968)

PIXOTE: A LEI DO MAIS FRACO, de Hector Babenco / Brasil (1981)

MASP

AS CANÇÕES, de Eduardo Coutinho / Brasil (2011)

INVICTUS, de Clint Eastwood / EUA (2009)

MATAR OU CORRER, de Carlos Manga / Brasil (1954)

ÓPERA DO MALANDRO, de Ruy Guerra / Brasil (1986)

UMA VIDA EM SEGREDO, de Suzana Amaral / Brasil (2001)

PROGRAMAS ESPECIAIS - UM OLHAR MAIS PRÓXIMO

Centenário Mandela

O ESTADO CONTRA MANDELA E OS OUTROS, de Gilles Porte, Nicolas Champeaux / França

RECONCILIAÇÃO: O MILAGRE DE MANDELA, de Michael Henry Wilson / EUA (2011)

WINNIE, de Pascale Lamche / França, Holanda, África do Sul (2017)

Marx 200 Anos: Um Olhar Através do Cinema

OITO HORAS NÃO SÃO UM DIA, de Rainer Werner Fassbinder / Alemanha (1972)

CARO MOHR - LEMBRANÇAS PESSOAIS DE KARL MARX POR PAUL LAFARGUE, de Bruno Böttge, Jörg Herrmann / Alemanha (1973)

MARX RELOADED, de Jason Barker / Alemanha (2011)

TOP GIRL OU A DEFORMAÇÃO PROFISSIONAL, de Tatjana Turanskyj / Alemanha (2014)

TRABALHOS OCASIONAIS DE UMA ESCRAVA, de Alexander Kluge / Alemanha (1973)

UM DIA NA SEPULTURA DE KARL MARX, de Peter von Bagh / Finlândia (1983)

UM JOVEM CHAMADO ENGELS, de Katja Georgi, Klaus Georgi / Alemanha (1970)

UMA MULHER FLEXÍVEL, de Tatjana Turanskyj / Alemanha (2010)

Wang Bing

ALMAS MORTAS, de Wang Bing / França, Suíça

Fernando E. Solanas

LA HORA DE LOS HORNOS, de Fernando E. Solanas, Octavio Getino / Argentina (1968)

VIAJE A LOS PUEBLOS FUMIGADOS, de Fernando E. Solanas / Argentina

Amos Gitai - Entre Israel e Palestina

A CASA, de Amos Gitai / Israel (1980)

UM TREM EM JERUSALÉM, de Amos Gitai / Israel, França

UMA CARTA PARA UM AMIGO EM GAZA, de Amos Gitai / Israel

Lars Von Trier

A CASA QUE JACK CONSTRUIU, de Lars Von Trier / Dinamarca, França, Alemanha, Suécia

ELEMENTO DE UM CRIME, de Lars von Trier / Dinamarca (1984)

EUROPA, de Lars von Trier / Dinamarca (1991)

ONDAS DO DESTINO, de Lars von Trier / Dinamarca, Suécia, França (1996)

APRESENTAÇÃO ESPECIAL

COMO FERNANDO PESSOA SALVOU PORTUGAL, de Eugène Green / Portugal, França, Bélgica

O GRANDE CIRCO MÍSTICO, de Carlos Diegues / Brasil

JULIANA NA CINEMATECA, de Diego Quinderé de Carvalho, Estevão Meneguzzo / Brasil

O MAESTRO, EM BUSCA DA ÚLTIMA MÚSICA, de Alexandre Valenti / França, Itália (2016)

NEVILLE D ALMEIDA: CRONISTA DA BELEZA E DO CAOS, de Mario Abbade / Brasil

OMINDÁ - SHOWFILME, de André Abujamra / Brasil

OMINDÁ - A UNIÃO DO MUNDO PELAS ÁGUAS, de André Abujamra, Mauro Nascimento / Brasil

PODRES DE RICOS, de Jon M. Chu / EUA

PROCURANDO POR INGMAR BERGMAN, de Margarethe von Trotta / Alemanha

VOX LIPOMA, de Jane Magnusson, Liv Strömquist / Suécia

FILMES DE ABERTURA E ENCERRAMENTO

A FAVORITA, de Yorgos Lanthimos / Reino Unido, Irlanda, EUA

ROMA, de Alfonso Cuarón / EUA, México

COMPETIÇÃO NOVOS DIRETORES

ÁGA, de Milko Lazarov / Bulgária, Alemanha, França

ALEMANHA: UM CONTO DE INVERNO, de Jann Bonny / Alemanha

AMÉRICA, de Erick Stoll, Chase Whiteside / EUA

AZOUGUE NAZARÉ, de Tiago Melo / Brasil

A BALSA, de Marcus Lindeen / Suécia

BURACO NEGRO, de Diego Araujo / Equador, República Dominicana

O CAMINHO NÃO TOMADO, de Gaopeng Tang / China

CANÇÃO DE UM VIDENTE, de Aïda Maigre-Touchet / França, Canadá, Haiti

A CAÓTICA VIDA DE NADA KADIC, de Marta Hernaiz Pidal / México, Bósnia Herzegovina

A CARGA, de Ognjen Glavonic / Sérvia, França, Croácia, Irã, Catar

CARMEN & LOLA, de Arantxa Echevarría / Espanha

CASSANDRO EL EXÓTICO! , de Marie Losier / França

CAUBÓIS FANTASMAS, de Daniel Patrick Carbone / EUA

AS CEIFADEIRAS, de Etienne Kallos / França, África do Sul, Grécia, Polônia, Suíça

CERES, de Janet Van den Brand / Holanda, Bélgica

CHARLOTTE QUER SE DIVERTIR, de Sophie Lorain / Canadá

CHRIS, O SUÍÇO, de Anja Kofmel / Suíça, Alemanha, Croácia, Finlândia

CHUVA É CANTORIA NA ALDEIA DOS MORTOS, de João Salaviza, Renée Nader Messora / Brasil, Portugal

CLÉO & PAUL, de Stéphane Demoustier / França

COM TODO O MEU HIPOTÁLAMO, de Dwein Baltazar / Filipinas

COMANDANTE ARIAN, de Alba Sotorra / Alemanha, Espanha, Síria

CON EL VIENTO, de Meritxell Colell Aparicio / Espanha, Argentina, França

O CORAÇÃO, de Fanni Metelius / Suécia

A COSTUREIRA DE SONHOS, de Rohena Gera / França, Índia

CRAVOS, de Marco Del Fiol / Brasil

CULPA, de Gustav Möller / Dinamarca

DESLEMBRO, de Flávia Castro / Brasil, França, Catar

DEVOÇÃO, de Pablo Kaes / Alemanha

DIFERENTES TIPOS DE CHUVA, de Isa Prahl / Alemanha

EL CREADOR DE UNIVERSOS, de Mercedes Dominioni / Uruguai

EL MOTOARREBATADOR, de Agustín Toscano / Argentina, Uruguai, França

ELLA & NELL, de Aline Chukwuedo / Alemanha

ENIGMA, de Ignacio Juricic Merillán / Chile

O ENTERRO DE KOJO, de Blitz Bazawule / Gana

FAMÍLIA SUBMERSA, de Maria Alché / Argentina, Brasil, Alemanha

FILME ENSAIO, de Maria Flor Leite Calaça / Brasil

FIRECRACKERS, de Jasmin Mozaffari / Canadá

FRIDAY'S CHILD, de A.J. Edwards / EUA

FUGA, de Agnieszka Smoczynska / Polônia, República Tcheca, Suécia

GAROTAS EM FUGA, de Virginie Gourmel / Bélgica, Suíça

GAROTOS CHORAM, de Damiano D Innocenzo, Fabio D Innocenzo / Itália

GAROTOS QUE GOSTAM DE GAROTAS, de Inka Achté / Finlândia, Índia, Noruega

GILDA BRASILEIRO - CONTRA O ESQUECIMENTO, de Viola Scheuerer, Roberto Manhães Reis / Suíça, Brasil, Alemanha

HAYATI: MINHA VIDA, de Sofi Escudé, Liliana Torres / Espanha, França, Catar

HEROÍNAS SILENCIOSAS, de Jenny Mackenzie, Jared Ruga, Amanda Stoddard / EUA

A HISTÓRIA DA PEDRA, de Starr Wu / Taiwan

HOLIDAY, de Isabella Eklöf / Dinamarca, Holanda, Suécia, Turquia

O HOMEM QUE ROUBOU BANKSY, de Marco Proserpio / Reino Unido, Itália

HUMBERTO MAURO, de André Di Mauro / Brasil

A IMAGEM QUE VOCÊ PERDEU, de Donal Foreman / Irlanda, EUA, França

JIBRIL, de Henrika Kull / Alemanha

JOHN MCENROE: NO IMPÉRIO NA PERFEIÇÃO, de Julien Faraut / França

JOSÉ, de Li Cheng / Guatemala

JULIA E A RAPOSA, de Inés María Barrionuevo / Argentina

KUSAMA - INFINITO, de Heather Lenz / EUA

L AMOUR DEBOUT, de Michaël Dacheux / França

LA MUERTE DEL MAESTRO, de José María Avilés / Equador

LA OMISIÓN, de Sebastián Schjaer / Argentina, Holanda, Suíça

¡LAS SANDINISTAS! , de Jenny Murray / EUA

LIMONADA, de Ioana Uricaru / Romênia, Canadá, Alemanha, Suécia

LOS DEMÁS DÍAS, de Carlos Agulló / Espanha

MALILA: A FLOR DO ADEUS, de Anucha Boonyawatana / Tailândia

O MAU EXEMPLO DE CAMERON POST, de Desiree Akhavan / EUA

MEIO IRMÃO, de Eliane Coster / Brasil

MEU QUERIDO FILHO, de Mohamed Ben Attia / Tunísia, Bélgica, França, Catar

MEU TECIDO PREFERIDO, de Gaya Jiji / França, Alemanha, Turquia

MIRIAM MENTE, de Natalia Cabral, Oriol Estrada / República Dominicana, Espanha

MOCHILA DE CHUMBO, de Darío Mascambroni / Argentina

MUERE, MONSTRUO, MUERE, de Alejandro Fadel / Argentina, França, Chile

NÃO ME TOQUE, de Adina Pintilie / Romênia, Alemanha, República Tcheca, Bulgária, França

NINA, de Olga Chajdas / Polônia

O QUE ACONTECE DEPOIS, de Julian Pörksen / Alemanha, Polônia

OBEDIÊNCIA, de Jamie Jones / Reino Unido

A ODISSEIA DE PETER, de Alexey Kuzmin-Tarasov, Anna Kolchina / Rússia

OLD BOYS, de Toby MacDonald / Reino Unido, Suécia

PÁSSAROS DO SUBÚRBIO, de Sheng Qiu / China

PEDRO E INÊS: O AMOR NÃO DESCANSA, de António Ferreira / Portugal, Brasil, França

PIEDADE, de Babis Makridis / Grécia, Polônia

A PLANTAÇÃO DE LARANJAS, de Arash Lahooti / Irã

QUANDO A TEMPESTADE ENFRAQUECE, de Sean Devlin / Filipinas, Canadá

QUERIDO EX, de Mag Hsu, Chih-Yen Hsu / Taiwan

RAFIKI, de Wanuri Kahiu / África do Sul, Quênia, França, Holanda, Alemanha, Noruega

RAY & LIZ, de Richard Billingham / Reino Unido

OS RELATÓRIOS SOBRE SARAH E SALEEM, de Muayad Alayan / Palestina, Holanda, Alemanha, México

O RETORNO, de Malene Choi / Dinamarca

REZA, de Alireza Motamedi / Irã

RIR OU MORRER, de Heikki Kujanpää / Finlândia, Suécia

ROSAS VENENOSAS, de Ahmed Fawzi Saleh / Egito, França, Catar, Emirados Árabes Unidos

SAL, de William Vega / Colômbia, França

O SAMBA É MEU DOM, de Cristiano Abud / Brasil

SELVAGEM, de Camille Vidal-Naquet / França

SEM AMOR, de Suzi Yoonessi / EUA

SÓCRATES, de Alex Moratto / Brasil

SOFIA, de Meryem Benm Barek / França, Catar

TEATRO DE GUERRA, de Lola Arias / Argentina, Espanha

A TERCEIRA ESPOSA, de Ash Mayfair / Vietnã

THE WITCH HUNTERS, de Rasko Miljkovic / Sérvia

THUNDER ROAD, de Jim Cummings / EUA

UM BURACO NA CABEÇA, de Piotr Subbotko / Polônia

UM DIA PARA SUSANA, de Giovanna Giovanini, Rodrigo Boecker / Brasil

O VENDEDOR DE PULSEIRAS, de Ere Gowda / Índia

O VENTO DA TRISTEZA SOPRA, de Tetsuya Tomina / Japão

WESTWOOD - PUNK, ÍCONE, ATIVISTA, de Lorna Tucker / Reino Unido

YOMEDDINE, de A. B. Shawky / Egito, EUA, Áustria

PERSPECTIVA INTERNACIONAL

3 DIAS EM QUIBERON, de Emily Atef / Alemanha, Áustria, França

303, de Hans Weingartner / Alemanha

O ALFABETO GREENAWAY, de Saskia Boddeke / Holanda

ALMOFADA DE ALFINETES, de Deborah Haywood / Reino Unido

AMANDA, de Mikhaël Hers / França

AMANTES NA FRONTEIRA, de Atsushi Funahashi / Portugal, Japão, EUA

AMOR ATÉ AS CINZAS, de Jia Zhang-ke / China, França, Japão

ANGKAR, de Neary Adeline Hay / França

O ANJO DO NORTE, de Jean Michel Roux / Finlândia, França

O ANÚNCIO, de Mahmut Fazil Coskun / Turquia, Bulgária

AO LESTE DA SUÉCIA, de Simo Halinen / Finlândia, Suécia

AQUI, de Hadi Mohaghegh / Irã

AQUI E AGORA, de Jakob Lass / Alemanha

A ÁRVORE DOS FRUTOS SELVAGENS, de Nuri Bilge Ceylan / Turquia, França, Alemanha, Bulgária

ASSIM COMO MEU FILHO, de Costanza Quatriglio / Itália, Croácica, Bélgica

AS SOMBRAS DO DESERTO, de Jayakrishnan Subramanian, Franziska Schoenenberger / Índia, Alemanha

AVA, de Sadaf Foroughi / Irã, Canadá, Catar

O BATERISTA E O GOLEIRO, de Nick Kelly / Irlanda

BAYONETA, de Kyzza Terrazas / México, Finlândia

BELMONTE, de Federico Veiroj / Uruguai, México, Espanha

BLACK IS BELTZA, de Fermín Muguruza / Espanha

CAFARNAUM, de Nadine Labaki / Líbano

CAMINHOS MAGNÉTICOS, de Edgar Pêra / Portugal, Brasil

CAOS AMERICANO, de James D. Stern / EUA

A CASA DIVIDIDA, de Eugene Kotlyarenko / EUA

COINCOIN E OS INUMANOS, de Bruno Dumont / França

DE MÃOS DADAS, de Nikos Kornilios / Grécia, França

DE PAI PARA FILHO, de Ya-chuan Hsiao / Taiwan

DE PARTIDA, de Ludwig Wüst / Áustria

DEIXEM OS VELHOS MORREREM, de Juri Steinhart / Suíça

DINAMARCA, de Kasper Rune Larsen / Dinamarca

A DOCE INDIFERENÇA DO MUNDO, de Adilkhan Yerzhanov / Cazaquistão, Rússia

O ANJO, de Luis Ortega / Argentina, Espanha

EM CHAMAS, de Chang-dong Lee / Coreia do Sul

ERA UMA VEZ EM NOVEMBRO, de Andrzej Jakimowski / Polônia

ESTRANHOS DA PACIÊNCIA, de Vladimir Alenikov / Rússia

EU NÃO ME IMPORTO SE ENTRARMOS PARA A HISTÓRIA COMO BÁRBAROS, de Radu Jude / Romênia, República Tcheca, França, Bulgária, Alemanha

EU SOU TEMPESTA, de Daniele Luchetti / Itália

EXTINÇÃO, de Salomé Lamas / Portugal, Alemanha

A FAVORITA, de Yorgos Lanthimos / Reino Unido, Irlanda, EUA

FUTEBOL INFINITO, de Corneliu Porumboiu / Romênia

GENESIS 2.0, de Christian Frei, Maxim Arbugaev / Suíça

GRASS, de Hong Sangsoo / Coreia do Sul

A GUERRA DE ANNA, de Aleksey Fedorchenko / Rússia

GUERRA FRIA, de Pawel Pawlikowski / Polônia, França, Reino Unido

GUTLAND, de Govinda Van Maele / Luxemburgo, Bélgica, Alemanha

O HOMEM PYKANTE - DIÁLOGOS COM PIMENTA, de Edgar Pêra / Portugal

HOTEL IMPÉRIO, de Ivo Ferreira / Portugal, Macau

O HOTEL ÀS MARGENS DO RIO, de Hong Sangsoo / Coreia do Sul

HUMANO, ESPAÇO, TEMPO E HUMANO, de Kim Ki-duk / Coreia do Sul

IMAGEM E PALAVRA, de Jean-Luc Godard / França, Suíça

O IMÓVEL, de Axel Petersen, Mans Mansson / Suécia, Reino Unido

INFILTRADO NA KLAN, de Spike Lee / EUA

O INGREDIENTE SECRETO, de Gjorce Stavreski / Macedônia, Grécia

INIMIGOS ÍNTIMOS, de David Oelhoffen / França, Bélgica

O INTÉRPRETE, de Martin Šulík / Eslováquia

ISTO É UM LAR: UMA HISTÓRIA DE REFUGIADOS, de Alexandra Shiva / EUA

JOVEM SOLIDÃO, de Claire Simon / França

JUMPMAN, de Ivan I. Tverdovsky / Rússia, Lituânia, Irlanda, França

LA QUIETUD, de Pablo Trapero / Argentina

LYUBOV - AMOR EM RUSSO, de Staffan Julén / Suécia

A MADELINE DE MADELINE, de Josephine Decker / EUA

MAYA, de Mia Hansen-Love / França

METADE DO CÉU, de Vários / China

MINHA VIDA NA ALEMANHA DE HITLER, de Jérôme Prieur / França

NA ESTRADA DA FELICIDADE, de Hsin-Yin Sung / Taiwan

A NÉVOA VERDE, de Guy Maddin, Evan Johnson, Galen Johnson / EUA

NOITE SILENCIOSA, de Piotr Domalewski / Polônia

O NOME DO MEU IRMÃO É ROBERT E ELE É UM IDIOTA, de Philip Gröning / Alemanha, França, Suíça

NUESTRO TIEMPO, de Carlos Reygadas / México, França, Alemanha, Dinamarca, Suécia

OPERAÇÃO OVERLORD, de Julius Avery / EUA

O PREÇO DE TUDO, de Nathaniel Kahn / EUA

O QUE VOCÊ IRÁ FAZER QUANDO O MUNDO ESTIVER EM CHAMAS? , de Roberto Minervini / Itália, EUA, França

O QUINTO PONTO DA BÚSSOLA, de Martin Prinoth / Alemanha, Itália

A PEÔNIA, de Joaquin Breton / Bélgica

PEREGRINAÇÃO, de João Botelho / Portugal

PODERIA ME PERDOAR? , de Marielle Heller / EUA

POR QUE SOMOS CRIATIVOS? , de Hermann Vaske / Alemanha

A PRECE, de Cédric Kahn / França

VIDAS DUPLAS, de Olivier Assayas / França

RAIVA, de Sérgio Trefaut / Portugal, Brasil, França

RETABLO, de Alvaro Delgado Aparicio / Peru, Alemanha, Noruega

O RIO, de Emir Baigazin / Cazaquistão, Polõnia, Noruega

O ROSTO, de Malgorzata Szumowska / Polônia

ROSAS SELVAGENS, de Anna Jadowska / Polônia

A ROTA SELVAGEM, de Andrew Haigh / Reino Unido

O SEGREDO DE NÁPOLES, de Ferzan Ozpetek / Itália

SEGUIR EM FRENTE, de Joachim Lafosse / Bélgica, França

O SILÊNCIO DOS OUTROS, de Almudena Carracedo, Robert Bahar / Espanha, EUA

SOBRE PAIS E FILHOS, de Talal Derki / Alemanha, Síria, Líbano, Catar

SUNSET TRUCK, de Abolfazl Saffary / Irã, Alemanha

TARDE PARA MORRER JOVEM, de Dominga Sotomayor / Chile, Brasil, Argentina

O TERMÔMETRO DE GALILEU, de Teresa Villaverde / Portugal

THE DEMINER, de Hogir Hirori, Shinwar Kamal / Suécia

THE MAN WHO KILLED DON QUIXOTE, de Terry Gilliam / Espanha, França, Bélgica, Portugal

TORNANDO-SE ASTRID, de Pernille Fischer Christensen / Suécia, Dinamarca

TRAGAM A MACONHA, de Denny Brechner, Alfonso Guerrero, Marcos Hecht / Uruguai

TREM DAS VIDAS OU A VIAGEM DE ANGÉLIQUE, de Paul Vecchiali / França

TRINTA ALMAS, de Diana Toucedo / Espanha

TÚMULOS SEM NOME, de Rithy Panh / França, Camboja

UM NOIR DOS BALCÃS, de Dražen Kuljanin / Suécia, Montenegro

UMA MULHER EM GUERRA, de Benedikt Erlingsson / França, Islândia, Ucrânia

UMA TERRA IMAGINADA, de Yeo Siew Hua / França, Holanda, Cingapura

UMA VIAGEM INESPERADA, de Juan José Jusid / Argentina, Brasil

A ÚLTIMA CRIANÇA, de Dong-seok Shin / Coreia do Sul

UTØYA - 22 DE JULHO, de Erik Poppe / Noruega

A VALSA DE WALDHEIM, de Ruth Beckermann / Áustria

VERÃO, de Kirill Serebrennikov / Rússia

VERMELHO SOL, de Benjamín Naishtat / Argentina, Brasil, França, Holanda, Alemanha

VIDA LIBRE, de Marc Recha / Espanha

VOLCANO, de Roman Bondarchuk / Ucrânia, Alemanha

VIDA SELVAGEM, de Paul Dano / EUA

MOSTRA BRASIL

ALMA CLANDESTINA, de José Barahona

BANDO, UM FILME DE: , de Lázaro Ramos, Thiago Gomes

O BARCO, de Petrus Cariry

BIA (2.0) , de Cristiano Calegari, Lucas Zampieri

CANO SERRADO, de Erik de Castro

A CIDADE DOS PIRATAS, de Otto Guerra

CLEMENTINA, de Ana Rieper

COM A PALAVRA, ARNALDO ANTUNES, de Marcelo Machado

DIAMANTINO, de Gabriel Abrantes, Daniel Schmidt / Portugal, Brasil, França

DOMINGO, de Clara Linhart, Fellipe Barbosa / Brasil, França

FABIANA, de Brunna Laboissière

FILME PAISAGEM: UM OLHAR SOBRE ROBERTO BURLE MARX, de João Vargas Penna

FRANS KRAJCBERG: MANIFESTO, de Regina Jehá

ILHA, de Ary Rosa, Glenda Nicácio

INEZITA, de Helio Goldsztejn

INTIMIDADE ENTRE ESTRANHOS, de José Alvarenja Jr.

LOS SILENCIOS, de Beatriz Seigner / Brasil, França, Colômbia

MEU NOME É DANIEL, de Daniel Gonçalves

MORMAÇO, de Marina Meliande

O OLHO E A FACA, de Paulo Sacramento

O PEQUENO MAL, de Lucas Camargo de Barros, Nicolas Thomé Zetune

AS QUATRO IRMÃS, de Evaldo Mocarzel

RASGA CORAÇÃO, de Jorge Furtado

RELATOS DO FRONT, de Renato Martins

RIO DA DÚVIDA, de Joel Pizzini

SANTO AMARO ERA SKATISTA, de Felipe Martins

SEQUESTRO RELÂMPAGO, de Tata Amaral

SIMONAL, de Leonardo Domingues

SOL ALEGRIA, de Tavinho Teixeira

SUEÑO FLORIANÓPOLIS, de Ana Katz

TEMPORADA, de André Novais Oliveira

THF: AEROPORTO CENTRAL, de Karim Aïnouz / Alemanha, Brasil, França

A TERRA NEGRA DOS KAWA, de Sérgio Andrade

TINTA BRUTA, de Marcio Reolon, Filipe Matzembacher

TODAS AS CANÇÕES DE AMOR, de Joana Mariani

TORRE DAS DONZELAS, de Susanna Lira

UMA NOITE NãO é NADA, de Alain Fresnot

VITÓRIA, de Alberto Bellezia

A VOZ DO SILÊNCIO, de André Ristum

Realidade Virtual

4 FEET: BLIND DATE, de María Belén Poncio (Argentina)

BORDERLINE, de Assaf Machnes / Israel

DONA TERESINHA, de Tocha Alves, Valter Cavalcanti / Brasil

DREAMS OF "O" , de François Blouin, Félix Lajeunesse, Paul Raphaël / Canadá

ELEGY, de Marc Guidoni / França

EYES IN THE RED WIND, de Sngmoo Lee / Coreia do Sul

FLOODPLAIN, de Deniz Tortum / Turquia

HAMMARS VR – UMA VISITA EM REALIDADE VIRTUAL NA DOS SONHOS DE INGMAR BERGMAN, de Murilo Hauser, Fernando Nogari / Brasil, Suécia

KOBOLD, de Max Sacker / Alemanha

OCUPAÇÃO MAUÁ, de Tadeu Jungle / Brasil

OVERVIEW, de Paul Mezier / França

SUN LADIES, de Christian Stephen, Celine Tricart / EUA

THE WILD IMMERSION, de Adrien Moisson, Raphaël Aupy / Grã-Bretanha, França

THROUGH THE MASKS OF LUZIA – CIRQUE DU SOLEIL, de François Blouin, Félix Lajeunesse, Paul Raphaël / Canadá

ULTRAMAN ZERO VR, de Kiyotaka Taguchi / Japão

ZERO DAYS VR, de Yasmin Elayat / EUA

Sessões na Biblioteca Roberto Santos

ALMAS SILENCIOSAS, de Aleksey Fedorchenko / Rússia (2010)

O BOTÃO DE PÉROLA, de Patricio Guzmán / Chile, França, Espanha (2015)

OS CAMPOS VOLTARÃO, de Ermanno Olmi / Itália (2014)

O ESTRANHO CASO DE ANGÉLICA, de Manoel de Oliveira / Espanha (2010)

A GANGUE, de Myroslav Slaboshpytskyi / Ucrânia (2014)

O GEBO E A SOMBRA, de Manoel de Oliveira / Portugal (2012)

HEARTSTONE, de Guðmundur Arnar Guðmundsson / Islândia, Dinamarca (2016)

METEORA, de Spiros Stathoulopoulos / Alemanha, Grécia (2012)

A MONTANHA MATTERHORN, de Diederik Ebbinge / Holanda (2013)

O PEQUENO QUINQUIN, de Bruno Dumont / França (2014)

RUN & JUMP, de Steph Green / Irlanda, Alemanha (2013)

VISITA OU MEMÓRIAS E CONFISSÕES, de Manoel de Oliveira / Portugal (1982)

        Programação da Mostra SP 42 (2018) ● Filmes selecionados para a mostra no ano de 2018 (42a. edição) ● Nota: . Categoria: blog.  Publicado em 2018-10-16.  Texto escrito por Wanderley Caloni.

Quer comentar?

      Share


text:
|          |                                                      |
| -------- | ---------------------------------------------------- |
| title    | Totem                                                |
| status   | 10                                                   |
| section  | Basic Programming Model and Runtime, SPMD, MapReduce |
| keywords | Basic Programming Model and Runtime, SPMD, MapReduce |

Totem is a project to overcome the current challenges in graph
algorithms.  The project is research the Networked Systems Laboratory
(NetSysLab) The issue resides in the scale of real world graphs and
the inability to process them on platforms other than a supercomputer.
Totem is based on a bulk synchronous parallel (BSP) model that can
enable hybrid CPU/GPU systems to process graph based applications in a
cost effective manner [@www-netsyslab].


text:
<resources>

    <!-- Base application theme, gets rid of the action bar so that we can
    make a new app bar. -->
    <!-- the light theme gives dark text color(black) so change theme in
    tool bar to dark for white to apply at text-->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!--the color primary is the tool bar color-->
        <item name="colorPrimary">@color/primary</item>
        <!--the color primary dark is the status bar color-->
        <item name="colorPrimaryDark">@color/primary_dark</item>
        <!-- Customize your theme here. -->
    </style>
    <style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">@color/primary</item>
        <item name="colorPrimaryDark">@color/primary_dark</item>
        <item name="colorAccent">@color/accent</item>
        <item name="colorControlHighlight">@color/icons</item>
        <item name="android:windowBackground">@android:color/white</item>
    </style>
</resources>


text:
function animate() {
    // animation loop
    // update size, if changed
    var canvas=$("#3d")[0];
    var width = canvas.clientWidth;
    var height = canvas.clientHeight;
    if (canvas.width !== width || canvas.height != height) {
        renderer.setSize ( width, height, false );
    }
    // render
    renderer.setClearColor(0xffffff, 0);
    renderer.clear(true);
    renderer.enableScissorTest(true);
    for (i in exp) {
        if(exp[i].render) {
            render(exp[i]);
        }
    }
    renderer.enableScissorTest(false);
    requestAnimationFrame(animate);
}

// render the scene; called by animation loop
function render(experiment) {
    var scene = experiment.render.scene;
    var camera = experiment.render.camera;
    var trackball = experiment.render.cameraControls;

    // update camera controls
    trackball.update();

    // the scene object contains the element object, which is the div in which
    // 3d data is displayed.
    var element = experiment.render.container[0];
    var rect = element.getBoundingClientRect();
    if ( rect.bottom < 0 || rect.top  > renderer.domElement.clientHeight ||
         rect.right  < 0 || rect.left > renderer.domElement.clientWidth ) {
      return;  // it's off screen
    }
    // set the viewport
    var width  = rect.right - rect.left;
    var height = rect.bottom - rect.top;
    var left   = rect.left;
    var bottom = renderer.domElement.clientHeight - rect.bottom;

    // compensate for window springiness
    var dy=window.pageYOffset;
    if(dy<0) {
        bottom-=dy;
    } else {
        dy=window.pageYOffset-document.body.scrollHeight+window.innerHeight;
        if(dy>0) {
            bottom-=dy;
        }
    }

    // place viewport
    camera.aspect = width / height;
    camera.updateProjectionMatrix();
    renderer.setViewport( left, bottom, width, height );
    renderer.setScissor( left, bottom, width, height );

    renderer.render(scene, camera);
}

// INITIAL RENDERING

// call when the brain template is loaded
function addExperiment(eid, experiment) {
    // add title/caption
    var title=(experiment.title)?experiment.title:"No Title";
    var caption=(experiment.caption)?experiment.caption:"No caption";
    $(".experiment#"+eid+" .title").append(title);
    $(".experiment#"+eid+" .caption").append(caption);

    // Configure locations to 3D view
    initTranslucentBrain(eid, experiment);
    experiment.render.spheres = new THREE.Object3D();
    experiment.render.scene.add(experiment.render.spheres);

    // Parse locations: add locations to 3d view and to stereotaxic table
    if(experiment.locations) {
        parseLocations(eid, experiment);
    }
}

function initTranslucentBrain(eid, ex)
{
    ex.render={};
    ex.render.container=$(".experiment#"+eid+" div.metaCoords");

    var container=ex.render.container;
    var width=container.width();
    var height=container.height();

    // create a scene
    ex.render.scene = new THREE.Scene();

    // create raycaster (for hit detection)
    container[0].addEventListener('mousedown', function(e){onDocumentMouseDown(e, eid, ex);}, false);

    // put a camera in the scene
    ex.render.camera    = new THREE.PerspectiveCamera(40,width/height,25,50);
    ex.render.camera.position.set(0, 0, 40);
    ex.render.scene.add(ex.render.camera);

    // create a camera control
    ex.render.cameraControls=new THREE.TrackballControls(ex.render.camera,ex.render.container[0])
    ex.render.cameraControls.noZoom=true;
    ex.render.cameraControls.addEventListener('change', function(){ex.render.light.position.copy( ex.render.camera.position );});

    // allow 'p' to make screenshot
    //THREEx.Screenshot.bindKey(renderer);

    // Add lights
    var light   = new THREE.AmbientLight( 0x3f3f3f);
    ex.render.scene.add(light );
    ex.render.light = new THREE.PointLight( 0xffffff,2,80 );
    //var   light   = new THREE.DirectionalLight( 0xffffff);
    //light.position.set( Math.random(), Math.random(), Math.random() ).normalize();
    ex.render.light.position.copy( ex.render.camera.position );
    //light.position.set( 0,0,0 );
    ex.render.scene.add(ex.render.light );

    // Load mesh (ply format)
    var oReq = new XMLHttpRequest();
    oReq.open("GET", "/static/data/lrh3.ply", true);
    oReq.responseType="text";
    oReq.onload = function(oEvent)
    {
        var tmp=this.response;
        var modifier = new THREE.SubdivisionModifier(1);

        ex.render.material=new THREE.ShaderMaterial({
            uniforms: {
                coeficient  : {
                    type    : "f",
                    value   : 1.0
                },
                power       : {
                    type    : "f",
                    value   : 2
                },
                glowColor   : {
                    type    : "c",
                    value   : new THREE.Color('grey')
                },
            },
            vertexShader    : [ 'varying vec3   vVertexWorldPosition;',
                                'varying vec3   vVertexNormal;',
                                'void main(){',
                                '   vVertexNormal   = normalize(normalMatrix * normal);',
                                '   vVertexWorldPosition    = (modelMatrix * vec4(position, 1.0)).xyz;',
                                '   gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);',
                                '}',
                                ].join('\n'),
            fragmentShader  : [ 'uniform vec3   glowColor;',
                                'uniform float  coeficient;',
                                'uniform float  power;',
                                'varying vec3   vVertexNormal;',
                                'varying vec3   vVertexWorldPosition;',
                                'void main(){',
                                '   vec3 worldCameraToVertex=vVertexWorldPosition - cameraPosition;',
                                '   vec3 viewCameraToVertex=(viewMatrix * vec4(worldCameraToVertex, 0.0)).xyz;',
                                '   viewCameraToVertex=normalize(viewCameraToVertex);',
                                '   float intensity=pow(coeficient + dot(vVertexNormal, viewCameraToVertex), power);',
                                '   gl_FragColor=vec4(glowColor, intensity);',
                                '}',
                            ].join('\n'),
            transparent : true,
            depthWrite  : false,
        });

        ex.render.geometry=new THREE.PLYLoader().parse(tmp);
        ex.render.geometry.sourceType = "ply";

        modifier.modify(ex.render.geometry);
        for(i=0;i<ex.render.geometry.vertices.length;i++)
        {
            ex.render.geometry.vertices[i].x*=0.14;
            ex.render.geometry.vertices[i].y*=0.14;
            ex.render.geometry.vertices[i].z*=0.14;
            ex.render.geometry.vertices[i].y+=3;
            ex.render.geometry.vertices[i].z-=2;
        }

        ex.render.brainmesh=new THREE.Mesh(ex.render.geometry,ex.render.material);
        ex.render.scene.add(ex.render.brainmesh);
    };
    oReq.send();
}

function parseLocations(eid, ex)
{
    // Add location spheres
    var geometry = new THREE.SphereGeometry(1,16,16);
    var color=0xff0000;
    for(j=0;j<ex.locations.length;j++)
    {
        if(ex.locations[j].sph)
        {
            color=ex.locations[j].sph.material.color;
            ex.render.spheres.remove(ex.locations[j].sph);
        }
        var x=ex.locations[j][0];
        var y=ex.locations[j][1];
        var z=ex.locations[j][2];
        var sph = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial({color: color}));
        sph.position.x=parseFloat(x)*0.14;
        sph.position.y=parseFloat(y)*0.14+3;
        sph.position.z=parseFloat(z)*0.14-2;
        ex.render.spheres.add(sph);
        ex.locations[j].sph=sph;
    }
}

// handle clicking on location spheres
function onDocumentMouseDown(event, eid, ex) {
    event.preventDefault();
    var r = event.target.getBoundingClientRect();

    mouseVector = new THREE.Vector3();
    mouseVector.x= ((event.clientX-r.left) / event.target.clientWidth ) * 2 - 1;
    mouseVector.y=-((event.clientY-r.top) / event.target.clientHeight ) * 2 + 1;

    var raycaster=new THREE.Raycaster();
    raycaster.setFromCamera(mouseVector.clone(), ex.render.camera);
    var intersects = raycaster.intersectObjects( ex.render.spheres.children );

    if(intersects.length==0)
        return;
    ex.render.spheres.children.forEach(function(sph) { sph.material.color.setRGB( 1,0,0 );});
    intersects[0].object.material.color.setRGB(0,1,0);
    $("#container"+eid+" table tbody .experiment-table-row").css({'background-color':'#e8edff'});
    for(var i=0;i<ex.locations.length;i++){
        if(ex.locations[i].sph==intersects[0].object) {
            clickedRow = $("#container"+eid+" table tbody .experiment-table-row:eq("+i+")");
            $("#container"+eid+" table tbody .experiment-table-row:eq("+i+")").css({"background-color":"lightGreen"});
            $("#container"+eid+" table .experiments-tbody").scrollTop($("#container"+eid+" table .experiments-tbody").scrollTop()
                + clickedRow.position().top - clickedRow.height());
        }
    }
}

function rowClicked(row, element) {
    var ex = exp[element];
    var i = $(row).index() - 1;
    $("#container"+ex.id+" table tbody .experiment-table-row").css({'background-color':'#e8edff'});
    ex.render.spheres.children.forEach(function( sph ) { sph.material.color.setRGB( 1,0,0 );});

    if(i >= 0) {
        $(row).css({'background-color':'lightGreen'});
        ex.locations[i].sph.material.color.setRGB(0,1,0);
        ex.selectedRow=i;
    }
}


text:
.rd.entity-image {
  cursor: pointer;
}
.rd.entity-image:hover {
  outline: 1px dashed #ccc;
  background-color: #efefef;
}
.rd.entity-image.active {
  outline: 1px dashed #999;
  background-color: #bbb;
}