text:
namespace {

sync_pb::AttachmentIdProto IdToProto(
    const syncer::AttachmentId& attachment_id) {
  return attachment_id.GetProto();
}

syncer::AttachmentId ProtoToId(const sync_pb::AttachmentIdProto& proto) {
  return syncer::AttachmentId::CreateFromProto(proto);
}

// Return true iff |attachment_ids| contains duplicates.
bool ContainsDuplicateAttachments(
    const syncer::AttachmentIdList& attachment_ids) {
  syncer::AttachmentIdSet id_set;
  id_set.insert(attachment_ids.begin(), attachment_ids.end());
  return id_set.size() != attachment_ids.size();
}

}  // namespace

namespace syncer {

void SyncData::ImmutableSyncEntityTraits::InitializeWrapper(Wrapper* wrapper) {
  *wrapper = new sync_pb::SyncEntity();
}

void SyncData::ImmutableSyncEntityTraits::DestroyWrapper(Wrapper* wrapper) {
  delete *wrapper;
}

const sync_pb::SyncEntity& SyncData::ImmutableSyncEntityTraits::Unwrap(
    const Wrapper& wrapper) {
  return *wrapper;
}

sync_pb::SyncEntity* SyncData::ImmutableSyncEntityTraits::UnwrapMutable(
    Wrapper* wrapper) {
  return *wrapper;
}

void SyncData::ImmutableSyncEntityTraits::Swap(sync_pb::SyncEntity* t1,
                                               sync_pb::SyncEntity* t2) {
  t1->Swap(t2);
}

SyncData::SyncData() : id_(kInvalidId), is_valid_(false) {}

SyncData::SyncData(int64 id,
                   sync_pb::SyncEntity* entity,
                   const base::Time& remote_modification_time,
                   const syncer::AttachmentServiceProxy& attachment_service)
    : id_(id),
      remote_modification_time_(remote_modification_time),
      immutable_entity_(entity),
      attachment_service_(attachment_service),
      is_valid_(true) {}

SyncData::~SyncData() {}

// Static.
SyncData SyncData::CreateLocalDelete(const std::string& sync_tag,
                                     ModelType datatype) {
  sync_pb::EntitySpecifics specifics;
  AddDefaultFieldValue(datatype, &specifics);
  return CreateLocalData(sync_tag, std::string(), specifics);
}

// Static.
SyncData SyncData::CreateLocalData(const std::string& sync_tag,
                                   const std::string& non_unique_title,
                                   const sync_pb::EntitySpecifics& specifics) {
  syncer::AttachmentIdList attachment_ids;
  return CreateLocalDataWithAttachments(
      sync_tag, non_unique_title, specifics, attachment_ids);
}

// Static.
SyncData SyncData::CreateLocalDataWithAttachments(
    const std::string& sync_tag,
    const std::string& non_unique_title,
    const sync_pb::EntitySpecifics& specifics,
    const AttachmentIdList& attachment_ids) {
  DCHECK(!ContainsDuplicateAttachments(attachment_ids));
  sync_pb::SyncEntity entity;
  entity.set_client_defined_unique_tag(sync_tag);
  entity.set_non_unique_name(non_unique_title);
  entity.mutable_specifics()->CopyFrom(specifics);
  std::transform(attachment_ids.begin(),
                 attachment_ids.end(),
                 RepeatedFieldBackInserter(entity.mutable_attachment_id()),
                 IdToProto);
  return SyncData(kInvalidId,
                  &entity,
                  base::Time(),
                  AttachmentServiceProxy());
}

// Static.
SyncData SyncData::CreateRemoteData(
    int64 id,
    const sync_pb::EntitySpecifics& specifics,
    const base::Time& modification_time,
    const AttachmentIdList& attachment_ids,
    const AttachmentServiceProxy& attachment_service) {
  DCHECK_NE(id, kInvalidId);
  sync_pb::SyncEntity entity;
  entity.mutable_specifics()->CopyFrom(specifics);
  std::transform(attachment_ids.begin(),
                 attachment_ids.end(),
                 RepeatedFieldBackInserter(entity.mutable_attachment_id()),
                 IdToProto);
  return SyncData(id, &entity, modification_time, attachment_service);
}

bool SyncData::IsValid() const { return is_valid_; }

const sync_pb::EntitySpecifics& SyncData::GetSpecifics() const {
  return immutable_entity_.Get().specifics();
}

ModelType SyncData::GetDataType() const {
  return GetModelTypeFromSpecifics(GetSpecifics());
}

const std::string& SyncData::GetTitle() const {
  // TODO(zea): set this for data coming from the syncer too.
  DCHECK(immutable_entity_.Get().has_non_unique_name());
  return immutable_entity_.Get().non_unique_name();
}

bool SyncData::IsLocal() const { return id_ == kInvalidId; }

std::string SyncData::ToString() const {
  if (!IsValid())
    return "<Invalid SyncData>";

  std::string type = ModelTypeToString(GetDataType());
  std::string specifics;
  scoped_ptr<base::DictionaryValue> value(
      EntitySpecificsToValue(GetSpecifics()));
  base::JSONWriter::WriteWithOptions(
      value.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &specifics);

  if (IsLocal()) {
    SyncDataLocal sync_data_local(*this);
    return "{ isLocal: true, type: " + type + ", tag: " +
           sync_data_local.GetTag() + ", title: " + GetTitle() +
           ", specifics: " + specifics + "}";
  }

  SyncDataRemote sync_data_remote(*this);
  std::string id = base::Int64ToString(sync_data_remote.GetId());
  return "{ isLocal: false, type: " + type + ", specifics: " + specifics +
         ", id: " + id + "}";
}

void PrintTo(const SyncData& sync_data, std::ostream* os) {
  *os << sync_data.ToString();
}

AttachmentIdList SyncData::GetAttachmentIds() const {
  AttachmentIdList result;
  const sync_pb::SyncEntity& entity = immutable_entity_.Get();
  std::transform(entity.attachment_id().begin(),
                 entity.attachment_id().end(),
                 std::back_inserter(result),
                 ProtoToId);
  return result;
}

SyncDataLocal::SyncDataLocal(const SyncData& sync_data) : SyncData(sync_data) {
  DCHECK(sync_data.IsLocal());
}

SyncDataLocal::~SyncDataLocal() {}

const std::string& SyncDataLocal::GetTag() const {
  return immutable_entity_.Get().client_defined_unique_tag();
}

SyncDataRemote::SyncDataRemote(const SyncData& sync_data)
    : SyncData(sync_data) {
  DCHECK(!sync_data.IsLocal());
}

SyncDataRemote::~SyncDataRemote() {}

const base::Time& SyncDataRemote::GetModifiedTime() const {
  return remote_modification_time_;
}

int64 SyncDataRemote::GetId() const {
  return id_;
}

void SyncDataRemote::GetOrDownloadAttachments(
    const AttachmentIdList& attachment_ids,
    const AttachmentService::GetOrDownloadCallback& callback) {
  attachment_service_.GetOrDownloadAttachments(attachment_ids, callback);
}

}  // namespace syncer


text:
import { Element } from '../../models';
import { Class } from '../../models';
import { ResolvedXMINode } from '../encoding/ResolvedXMINode';
import { XMIDecoder } from '../encoding/XMIDecoder';
import { ClassifierVisitor } from './ClassifierVisitor';

export class ClassVisitor extends ClassifierVisitor {
  createInstance(node: ResolvedXMINode): Element {
    return new Class();
  }

  visitOwnedElement(decoder: XMIDecoder, name: string, childNode: ResolvedXMINode, parent: Element, parentNode: ResolvedXMINode): void {
    if (!(parent instanceof Class)) return;

    switch (name) {
      case 'generalization': {
        let general: any = childNode.get('general')![0];

        if (typeof general === 'string') {
          general = childNode.getNodeByID(general);
        }

        if (general instanceof ResolvedXMINode) {
          const generalClass = decoder.decodeNode(general);
          if (generalClass instanceof Class) {
            parent.generalizations.add(generalClass);
            generalClass.specializations.add(parent);
          }
        } else {
          // console.error(`Could not find generalization: ${general}`);
        }

        return;
      }

      default:
        super.visitOwnedElement(decoder, name, childNode, parent, parentNode);
    }
  }
}

redpajama_set_name: RedPajamaGithub


text:
The Mapbender3 - IconSet was created and produced with the [IcoMoon](https://icomoon.io/) web app.

These icons are used by many GIS projects, such as [mapbender](http://mapbender3.org/).
By vector icons the resolution of the display on each platform is adapted to the circumstances of the screen.

## Preview
It's posible to see live example of the icons [here](http://rawgit.com/mapbender/icons/master/demo.html)

## Installation
```sh
composer require mapbender/mapbender-icons
```

## Change font

To change the icons to use the [IcoMoon](https://icomoon.io/app/#/select) site.

* Click on Import Icons on the toolbar
* Select and load the [selection.json](selection.json) project file.
* Edit the existing mapbender-icons "Selection"
* Click "Generate Font" on the bottom panel


text:
import TransitionManager from './transitions/TransitionManager';

export default function (firstBlood) {
  if (firstBlood) {
    const transitionManager = new TransitionManager();
  }
}


text:
package com.microsoft.dxbrazil.changefeed.source;

import com.microsoft.azure.documentdb.*;
import com.microsoft.dxbrazil.changefeed.*;

import java.util.ArrayList;
import java.util.List;

public class CosmosDBSource implements DataSource {

    private DocumentClient _client;
    private String _serviceEndpoint;
    private String _masterKey;
    private String _databaseName;
    private String _CollectionName;
    private int _maxRecords;

    /**
     *
     * @param serviceEndpoint
     * @param masterKey
     * @param databaseName
     * @param collectionName
     */
    public CosmosDBSource(String serviceEndpoint, String masterKey, String databaseName, String collectionName ){
        this._masterKey = masterKey;
        this._serviceEndpoint = serviceEndpoint;
        this._databaseName = databaseName;
        this._CollectionName = collectionName;
        this._maxRecords = 100;
    }

    /**
     *
     * @param serviceEndpoint
     * @param masterKey
     * @param databaseName
     * @param collectionName
     * @param MaxRecords
     */
    public CosmosDBSource(String serviceEndpoint, String masterKey, String databaseName, String collectionName, int MaxRecords ){

        this._masterKey = masterKey;
        this._serviceEndpoint = serviceEndpoint;
        this._databaseName = databaseName;
        this._CollectionName = collectionName;
        this._maxRecords = MaxRecords;
    }

    @Override
    public void init() {
        if( _client != null )
            return;

        this._client = new DocumentClient(this._serviceEndpoint,
                this._masterKey,
                new ConnectionPolicy(),
                ConsistencyLevel.Session);
    }

    @Override
    public List<Partition> listPartition() {
        String collectionLink = String.format("/dbs/%s/colls/%s", this._databaseName, this._CollectionName);
        FeedOptions options = new FeedOptions();

        List<PartitionKeyRange> partitionKeys = new ArrayList<>();
        List<Partition>  partitions =  new ArrayList<>();
        String checkpointContinuation = null;

        do {
            options.setRequestContinuation(checkpointContinuation);
            FeedResponse<PartitionKeyRange> range = _client.readPartitionKeyRanges(collectionLink, options);
            try {
                partitionKeys.addAll(range.getQueryIterable().fetchNextBlock());
            }catch (DocumentClientException ex){}

            checkpointContinuation = range.getResponseContinuation(); //PartitionLSN
        } while (checkpointContinuation != null);

        for(PartitionKeyRange pkRange: partitionKeys){
            PartitionInfo partition = new PartitionInfo(this._databaseName, this._CollectionName, pkRange.getId(), "0", PartitionInfo.PartitionStatus.SYNCING);//, this._maxRecords );
            partitions.add(partition);
        }

        return partitions;
    }

    public List<DataMessage> readMessages(Partition partition) {

        List<DataMessage> result = new ArrayList<>();

        String collectionLink = String.format("/dbs/%s/colls/%s", this._databaseName, this._CollectionName);

        FeedResponse<Document> queryResults = null;
        String partitionKeyRangeId = null;

        partitionKeyRangeId = ((PartitionInfo)partition).ID; //PartitionLSN
        ChangeFeedOptions options = new ChangeFeedOptions();
        options.setPartitionKeyRangeId(partitionKeyRangeId);

        if (((PartitionInfo)partition).Etag.equals("")){
            options.setStartFromBeginning(true);
        }else{
            options.setStartFromBeginning(false);
            options.setRequestContinuation(((PartitionInfo)partition).Etag);
        }

        options.setPageSize(100);

        int counter = 0;
        try {

            FeedResponse<Document> query = null;
            do {

                //
                System.out.println(String.format("Collection name: %s \t PartitionID: %s \t LastEtag: %s ",((PartitionInfo)partition).CollName , ((PartitionInfo)partition).ID, ((PartitionInfo)partition).Etag));
                //
                query = _client.queryDocumentChangeFeed(collectionLink, options);
                List<Document> docs = query.getQueryIterable().fetchNextBlock();

                if (docs != null) {
                    result.addAll(CosmosDBMessage.ToCosmoDBMessage(docs));
                    counter += docs.size();
                }

                options.setRequestContinuation(query.getResponseContinuation()); //PartitionLSN
                ((PartitionInfo)partition).Etag = options.getRequestContinuation();

            } while (query.getQueryIterator().hasNext() && counter <= this._maxRecords);

        }catch (DocumentClientException ex){}

        return result;

    }

    @Override
    public void close() {
        _client.close();
    }

}


text:
<?php

namespace Kunstmaan\AdminNodeBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;

/**
 * NodeTranslationAdminType
 */
class NodeTranslationAdminType extends AbstractType
{
    /**
     * @param FormBuilderInterface $builder
     * @param array                $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('id', 'hidden');
        //$builder->add('node', 'entity_id', array('class' => 'Kunstmaan\AdminNodeBundle\Entity\Node'));
        $builder->add('slug');
        $builder->add(
            'weight',
            'choice',
            array(
                'choices'     => array_combine(range(-50, 50), range(-50, 50)),
                'empty_value' => false
            )
        );
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'nodetranslation';
    }

    /**
     * @param array $options
     *
     * @return array
     */
    public function getDefaultOptions(array $options)
    {
        return array(
            'data_class' => 'Kunstmaan\AdminNodeBundle\Entity\NodeTranslation',
        );
    }
}


text:
require 'spec_helper'
module Alf
  module Algebra
    describe Wrap do

      let(:operator_class){ Wrap }

      it_should_behave_like("An operator class")

      context '--no-allbut' do
        subject{ a_lispy.wrap(an_operand, [:a, :b], :wraped) }

        it { should be_a(Wrap) }

        it 'should not be allbut' do
          subject.allbut.should be_false
        end
      end

      context '--allbut' do
        subject{ a_lispy.wrap(an_operand, [:a, :b], :wraped, :allbut => true) }

        it { should be_a(Wrap) }

        it 'should be allbut' do
          subject.allbut.should be_true
        end
      end
    end
  end
end


text:
 - https://coteditor.com/

## Install KonaWiki highlight

 - 1) Open CotEditor
 - 2) MainMenu > ScriptMenu > Open Script Folder
 - 3) Copy KonaWiki.yaml to Syntaxes directory


text:
1. SELECT * FROM states;

2. SELECT * FROM regions;

3. SELECT state_name, population FROM states;

4. SELECT state_name, population FROM states
   ORDER BY population DESC;

5. SELECT state_name FROM states WHERE region_id = 7;

6. SELECT state_name, population_density FROM states
   WHERE population_density > 50
   ORDER BY population_density ASC;

7. SELECT state_name FROM states
   WHERE population BETWEEN 1000000 and 1500000;

8. SELECT state_name, region_id FROM states
   ORDER BY region_id ASC;

9. SELECT region_name FROM regions
   WHERE region_name LIKE '%Central%';

10. SELECT region_name, state_name FROM regions
    LEFT JOIN states
    ON states.region_id=regions.id
    ORDER BY states.region_id ASC;

![Alt text](outfit_schema.png "Outfit Schema")

//
What are databases for?

  Databases are used to store information. They are much better for large data sets than data structures like arrays or hashes. With a database, we can selectively retrieve the information that we need, instead of retrieving all of it, and using up memory. You can also add data to this and modify as you see fit.

What is a one-to-many relationship?

  This means that if item_type_1 is related to category_1, and category_1 one has many item_types related to it. The example given in the text is much better. Wisconsin belongs to the East North Central Region. The East North Central region has many states.

What is a primary key? What is a foreign key? How can you determine which is which?

  The primary key is a unique key that is associate with only one row in a table. The foreign key is a value that is present in a different table that is being accessed. A primary key is always unique. A foreign key does not have to be unique. A foreign key will always be linked to another table. A primary key will not be linked to another table.

How can you select information out of a SQL database? What are some general guidelines for that?

  The basic command to select data is
  '''
  SELECT column_name_1, column_name_2 FROM table_name;
  '''

  There are many ways to modify this commands like WHERE and ORDER BY are also useful for selecting data.


text:
package org.apache.pluto.container.bean.processor.fixtures;

import javax.mvc.RedirectScoped;
import java.io.Serializable;

/**
 * Verifies that an {@literal @}RedirectScoped bean is recognized.
 *
 * @author Scott Nicklous
 * @author Neil Griffin
 */
@RedirectScoped
public class RedirectScopedClass implements Serializable {

	private static final long serialVersionUID = 3676449534190350039L;
}


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Index of new symbols in 2.46: GLib Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GLib Reference Manual">
<link rel="up" href="index.html" title="GLib Reference Manual">
<link rel="prev" href="api-index-2-44.html" title="Index of new symbols in 2.44">
<link rel="next" href="api-index-2-48.html" title="Index of new symbols in 2.48">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">

A
                     |
                  L
                     |
                  T

Index of new symbols in 2.46

A

g_assert_cmpmem, macro in Testing

g_async_queue_push_front, function in Asynchronous Queues

g_async_queue_push_front_unlocked, function in Asynchronous Queues

g_async_queue_remove, function in Asynchronous Queues

g_async_queue_remove_unlocked, function in Asynchronous Queues

L

GLIB_VERSION_2_46, macro in Version Information

g_log_set_handler_full, function in Message Logging

T

g_thread_pool_move_to_front, function in Thread Pools

Generated by GTK-Doc V1.25.1


text:
{% extends "home/base.html" %}

{% load wagtailcore_tags demo_tags wagtailimages_tags static %}

{% block extra_css %}
        {% image self.feed_image width-2000 as bg_image %}

{% endblock %}

{% block content %}

{% with rooms=self.rooms %}
    {% for room in rooms %}

                {% if request.user.is_authenticated or room.public %}

#{{ room.title }}

                {% if room.search_description %}

{{ room.search_description }}

                {% endif %}

            {% endif %}

    {% endfor %}
{% endwith %}

{% with rooms=self.rooms2 %}

    {% for room in rooms %}

                {% if request.user.is_authenticated or room.public %}

#{{ room.title }}

                {% if room.feed_image %}

                {% image room.feed_image width-150 as img %}

                {% endif %}

                {% if room.search_description %}

{{ room.search_description }}

                {% endif %}

            {% endif %}

    {% endfor %}

{% endwith %}
                {# Uses serve method defined in models.py - allows for paging if required #}
                {# See also standard index for creating a listing with a tag #}
{% comment %}
                    {% standard_index_listing calling_page=self %}
{% endcomment %}

    {# {% include "home/includes/related_links.html" with related_links=self.related_links.all only %} #}
{% endblock %}


text:
/**
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @author Andreas Joelsson (andreas.joelsson@gmail.com)
 */
package io.github.scrier.opus.common.nuke;

import java.io.IOException;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.hazelcast.nio.ObjectDataInput;
import com.hazelcast.nio.ObjectDataOutput;

import io.github.scrier.opus.common.message.BaseMsgC;
import io.github.scrier.opus.common.message.SendIF;

public class NukeStopAllReqMsgC extends BaseMsgC {

	private static Logger log = LogManager.getLogger(NukeStopAllReqMsgC.class);

	/**
	 * Constructor
	 */
	public NukeStopAllReqMsgC() {
		super(NukeMsgFactory.FACTORY_ID, NukeMsgFactory.NUKE_STOP_ALL_REQ);
		log.trace("NukeStopAllReqMsgC()");
	}

	/**
	 * Constructor
	 * @param sendIF the SendIF to use for distribution
	 */
	public NukeStopAllReqMsgC(SendIF sendIF) {
		super(NukeMsgFactory.FACTORY_ID, NukeMsgFactory.NUKE_STOP_ALL_REQ, sendIF);
		log.trace("NukeStopAllReqMsgC(" + sendIF + ")");
	}

	/**
	 * Copy constructor
	 * @param obj2copy DukeCommand object
	 */
	public NukeStopAllReqMsgC(NukeStopAllReqMsgC obj2copy) {
		super(obj2copy);
		log.trace("NukeStopAllReqMsgC(" + obj2copy + ")");
	}

	/**
	 * Cast constructor
	 * @param input BaseNukeC object
	 * @throws ClassCastException if provided with a mismatching class.
	 */
	public NukeStopAllReqMsgC(BaseMsgC input) throws ClassCastException {
		super(input);
		log.trace("NukeStopAllReqMsgC(" + input + ")");
		if( input instanceof NukeStopAllReqMsgC ) {
			// no parameters.
		} else {
			throw new ClassCastException("Data with id " + input.getId() + " is not an instanceof NukeStopAllReqMsgC[" + NukeMsgFactory.NUKE_STOP_ALL_REQ + "], are you using correct class?");
		}
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public void readData(ObjectDataInput in) throws IOException {
		log.trace("readData(" + in + ")");
		super.readData(in);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public void writeData(ObjectDataOutput out) throws IOException {
		log.trace("writeData(" + out + ")");
		super.writeData(out);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public String toString() {
		return "NukeStopAllReqMsgC - " + super.toString();
	}

}


text:
declare var require: {
    <T>(path: string): T;
    (paths: string[], callback: (...modules: any[]) => void): void;
    ensure: (paths: string[], callback: (require: <T>(path: string) => T) => void) => void;
};

declare interface UploadButtonProps {
    containerClass: string,
    labelClass: string,
    buttonText: string,
    inputClass: string
}


text:
package com.amazon.ask.request;

/**
 * Input to an Alexa skill.
 */
public interface SkillRequest {

    /**
     * Retrieves request in it's raw format.
     * @return byte array.
     */
    byte[] getRawRequest();

}


text:
/**@file
 *
 * @defgroup app_simple_timer Simple Timer
 * @{
 * @ingroup  app_common
 *
 * @brief    Simple timer module.
 *
 * Supported features and limitations:
 * - Two modes: single shot mode and repeated mode.
 * - No more than one timer can run simultaneously.
 * - The timer is hard-coded to use the TIMER1 peripheral and compare channel 0.
 */

#ifndef TIMER_H__
#define TIMER_H__

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

/**@brief Timer time-out handler type. */
typedef void (*app_simple_timer_timeout_handler_t)(void * p_context);

/**@brief Timer modes. */
typedef enum
{
    APP_SIMPLE_TIMER_MODE_SINGLE_SHOT,   /**< The timer will expire only once. */
    APP_SIMPLE_TIMER_MODE_REPEATED       /**< The timer will restart each time it expires. */
} app_simple_timer_mode_t;

/**@brief Function for configuring and setting up the timer hardware.
 *
 * @note  Timer frequency is configured statically.
 *
 * @retval NRF_SUCCESS             If the operation is successful.
 * @retval NRF_ERROR_INVALID_STATE If the operation fails because the timer is already initialized.
 * @retval NRF_ERROR_INVALID_PARAM If the operation fails because some configuration parameter is
 *                                 not valid.
 */
uint32_t app_simple_timer_init(void);

/**@brief Function for starting a timer.
 *
 * @note  If this function is called for a timer that is already running, the currently running
 *        timer is stopped before starting the new one.
 *
 * @param[in] mode                 Timer mode (see @ref app_simple_timer_mode_t).
 * @param[in] timeout_handler      Function to be executed when the timer expires
 *                                 (see @ref app_simple_timer_timeout_handler_t).
 * @param[in] timeout_ticks        Number of timer ticks to time-out event.
 * @param[in] p_context            General purpose pointer. Will be passed to the time-out handler
 *                                 when the timer expires.
 *
 * @retval NRF_SUCCESS             If the operation is successful.
 * @retval NRF_ERROR_INVALID_STATE If the operation fails because @ref app_simple_timer_init has not
 *                                 been called and the operation is not allowed in this state.
 * @retval NRF_ERROR_NULL          If the operation fails because timeout_handler is NULL.
 * @retval NRF_ERROR_INVALID_PARAM If the operation fails because "mode" parameter is not valid.
 */

uint32_t app_simple_timer_start(app_simple_timer_mode_t            mode,
                                app_simple_timer_timeout_handler_t timeout_handler,
                                uint16_t                           timeout_ticks,
                                void *                             p_context);

/**@brief Function for stopping the timer.
 *
 * @retval NRF_SUCCESS             If the operation is successful.
 */
uint32_t app_simple_timer_stop(void);

/**@brief Function for uninitializing the timer. Should be called also when the timer is not used
 *        anymore to reach lowest power consumption in system.
 *
 * @note  The function switches off the internal core of the timer to reach lowest power consumption
 *        in system. The startup time from this state may be longer compared to starting the timer
 *        from the stopped state.
 *
 * @retval NRF_SUCCESS             If the operation is successful.
 */
uint32_t app_simple_timer_uninit(void);

#ifdef __cplusplus
}
#endif

#endif // TIMER_H__

/** @} */


text:
require 'rails/generators/migration'

module SemanticallyTaggable
  class MigrationGenerator < Rails::Generators::Base
    include Rails::Generators::Migration

    desc "Generates migration for Tag, Tagging, Scheme and Taxonomy models"

    def self.orm
      Rails::Generators.options[:rails][:orm]
    end

    def self.source_root
      File.join(File.dirname(__FILE__), 'templates', (orm.to_s unless orm.class.eql?(String)) )
    end

    def self.orm_has_migration?
      [:active_record].include? orm
    end

    def self.next_migration_number(path)
      Time.now.utc.strftime("%Y%m%d%H%M%S")
    end

    def create_migration_file
      if self.class.orm_has_migration?
        migration_template 'migration.rb', 'db/migrate/semantically_taggable_migration'
      end
    end
  end
end


text:
angular.module('app')
  .directive('uiSidebar', ['$timeout', function($timeout) {
    return {
      restrict: 'AC',
      templateUrl:'tpl/side_bar.html',
      link: function(scope, el, attr) {
          //todo
      }
    };
  }]);


text:
package com.netflix.genie.core.properties;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;

/**
 * All properties related to jobs in Genie.
 *
 * @author tgianos
 * @since 3.0.0
 */
@Getter
@Setter
public class JobsProperties {
    @NotNull
    private JobsCleanupProperties cleanup = new JobsCleanupProperties();

    @NotNull
    private JobsForwardingProperties forwarding = new JobsForwardingProperties();

    @NotNull
    private JobsLocationsProperties locations = new JobsLocationsProperties();

    @NotNull
    private JobsMaxProperties max = new JobsMaxProperties();

    @NotNull
    private JobsMemoryProperties memory = new JobsMemoryProperties();

    @NotNull
    private JobsUsersProperties users = new JobsUsersProperties();
}


text:
$version=$(select-string -Path Dockerfile -Pattern "ENV APACHE_VERSION").ToString().split()[-1]
docker run --name apache -d -p 8080:80 apache:$version
Start-Sleep -Seconds 5
$req = Invoke-WebRequest http://$(docker inspect -f '{{ .NetworkSettings.Networks.nat.IPAddress }}' apache) -UseBasicParsing
$code = $req.statuscode
if ($code -ne 200) {
  throw "Apache test failed!"
}
docker logs apache


text:
 export function startsWith(str, searchString, position){
      position = position || 0;
      return str.substr(position, searchString.length) === searchString;
  };

 export function endsWith (str, searchString, position) {
      var subjectString = str.toString();
      if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {
        position = subjectString.length;
      }
      position -= searchString.length;
      var lastIndex = subjectString.indexOf(searchString, position);
      return lastIndex !== -1 && lastIndex === position;
  };

 export function includes(str, search, start) {
    'use strict';
    if (typeof start !== 'number') {
      start = 0;
    }

    if (start + search.length > str.length) {
      return false;
    } else {
      return str.indexOf(search, start) !== -1;
    }
  };


text:
import { h } from 'preact' /** @jsx h */
import { Link } from 'preact-router'
import { FormattedMessage } from 'react-intl'
import { Header, LayoutDefault } from '~src/views/layout/layout'
import {
  ButtonPrimary,
  ButtonOutline,
  MemorySummary,
  Quote,
  Silhouette,
  TopBar,
} from '~src/views/components'
import * as string from '~src/utils/string'
import * as paths from '~src/paths'

export default ({ loading, allMemories, nextPage, totalCount }) => (
  <LayoutDefault>

      <TopBar />

        <Silhouette variation="blue-2" className="variation-blue-2" />

          <FormattedMessage
            id="page--memories-list.title"
            defaultMessage="Veja todas as homenagens"
          />

          <FormattedMessage
            id="page--memories-list.subtitle"
            defaultMessage="Mural com todas as vítimas de homicídios na América Latina."
          />

        {!loading && allMemories.length && allMemories.map(memory => (

            <MemorySummary
              name={memory.victimName}
              owner={memory.ownerFirstName}
              birthYear={memory.victimBornAt}
              deathYear={memory.victimDeadAt}
              description={memory.victimHistory}
              image={`${process.env.SERVER_DOMAIN}${memory.victimPhoto}`}
              imageWidth="220px"
              imageHeight="180px"
              imageAlignmentLeft={0}
              distanceY="100px"
              distanceX="30%"
              width="63%"
            />
            <Quote>
              {memory.victimRememberText}
            </Quote>

              <ButtonOutline
                TagName={Link}
                href={paths.memory(string.slugify(memory.victimName))}
              >
                <FormattedMessage
                  id="page--memories-list.see-memory"
                  defaultMessage="Ver homenagem"
                />
              </ButtonOutline>

        ))}

        <Silhouette variation="1" className="variation-1 is-hidden-mobile" />
        {allMemories.length < totalCount && (
          <ButtonPrimary onClick={() => { nextPage() }}>
            <FormattedMessage
              id="page--memories-list.see-more-memories"
              defaultMessage="Ver mais homenagens"
            />
          </ButtonPrimary>
        )}

  </LayoutDefault>
)


text:
package com.issac.isoc.dao;

import com.issac.isoc.model.Proposal;

/**
 * Created by OPSKMC on 5/4/15.
 */
public class ProposalDAO extends DAO<Proposal>{
}


text:
package hudson.tools;

import hudson.ExtensionPoint;
import hudson.FilePath;
import hudson.Util;
import hudson.model.Describable;
import hudson.model.Hudson;
import hudson.model.Label;
import hudson.model.Node;
import hudson.model.TaskListener;
import java.io.IOException;
import org.kohsuke.stapler.DataBoundConstructor;

/**
 * An object which can ensure that a generic {@link ToolInstallation} in fact exists on a node.
 *
 * The subclass should have a {@link ToolInstallerDescriptor}.
 * A {@code config.jelly} should be provided to customize specific fields;
 * {@code <t:label xmlns:t="/hudson/tools"/>} to customize {@code label}.
 * @see Tool Auto-Installation
 * @since 1.305
 */
public abstract class ToolInstaller implements Describable<ToolInstaller>, ExtensionPoint {

    private final String label;

    protected transient ToolInstallation tool;

    /**
     * Subclasses should pass these parameters in using {@link DataBoundConstructor}.
     */
    protected ToolInstaller(String label) {
        this.label = Util.fixEmptyAndTrim(label);
    }

    /**
     * Called during the initialization to tell {@link ToolInstaller} what {@link ToolInstallation}
     * it is configured against.
     */
    protected void setTool(ToolInstallation t) {
        this.tool = t;
    }

    /**
     * Label to limit which nodes this installation can be performed on.
     * Can be null to not impose a limit.
     */
    public final String getLabel() {
        return label;
    }

    /**
     * Checks whether this installer can be applied to a given node.
     * (By default, just checks the label.)
     */
    public boolean appliesTo(Node node) {
        Label l = Hudson.getInstance().getLabel(label);
        return l == null || l.contains(node);
    }

    /**
     * Ensure that the configured tool is really installed.
     * If it is already installed, do nothing.
     * Called only if {@link #appliesTo(Node)} are true.
     * @param tool the tool being installed
     * @param node the computer on which to install the tool
     * @param log any status messages produced by the installation go here
     * @return the (directory) path at which the tool can be found,
     *         typically coming from {@link #preferredLocation}
     * @throws IOException if installation fails
     * @throws InterruptedException if communication with a slave is interrupted
     */
    public abstract FilePath performInstallation(ToolInstallation tool, Node node, TaskListener log) throws IOException, InterruptedException;

    /**
     * Convenience method to find a location to install a tool.
     * @param tool the tool being installed
     * @param node the computer on which to install the tool
     * @return {@link ToolInstallation#getHome} if specified, else a path within the local
     *         Hudson work area named according to {@link ToolInstallation#getName}
     * @since 1.310
     */
    protected final FilePath preferredLocation(ToolInstallation tool, Node node) {
        if (node == null) {
            throw new IllegalArgumentException("must pass non-null node");
        }
        String home = Util.fixEmptyAndTrim(tool.getHome());
        if (home == null) {
            // XXX should this somehow uniquify paths among ToolInstallation.all()?
            home = tool.getName().replaceAll("[^A-Za-z0-9_.-]+", "_");
        }
        FilePath root = node.getRootPath();
        if (root == null) {
            throw new IllegalArgumentException("Node " + node.getDisplayName() + " seems to be offline");
        }
        return root.child("tools").child(home);
    }

    public ToolInstallerDescriptor<?> getDescriptor() {
        return (ToolInstallerDescriptor) Hudson.getInstance().getDescriptorOrDie(getClass());
    }
}


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

class ProtocolHandler {
  constructor(protocol) {
    this.protocol = protocol
  }

  handle(search) {
    return new Promise((resolve, reject) => {
      const s = new URLSearchParams(search).get('s')
      if (typeof s !== 'string') {
        return resolve(false)
      }

      let url = new URL(s)
      if (url.protocol !== this.protocol) {
        reject(
          new Error(`Presented url '${url}' does not start with expected protocol ${this.protocol}`)
        )
      }

      // Right now new URL with custom protocol puts everything into the pathname, so we fix this early
      url = new URL(url.href.replace(this.protocol, 'http:'))

      console.log(url.host)

      if (url.host === 'gist' || url.host === 'g') {
        const id = url.pathname.substr(1)
        return this._handleGist(id, resolve, reject)
      }

      this._handleDefault(url, resolve, reject)
    })
  }

  _buildConfiguration(name, content) {
    if (content.includes('@author')) {
      const match = content.match(/@author(?:\[\])?\s*=\s*([^<\r\n]*)/)
      if (match[1]) {
        name = `Shared/from ${match[1]}`
      }
    }
    return {
      name,
      id: 'new',
      enabled: false,
      content
    }
  }

  _handleDefault(url, resolve, reject) {
    axios({ url })
      .then((response) => {
        if (response.status === 200 && typeof response.data === 'string') {
          resolve(this._buildConfiguration(`Shared/${url.href}`, response.data))
        }
      })
      .catch((error) => {
        error.message = `Could not handle ${url}, error was: ${error.message}`
        reject(error)
      })
  }

  _handleGist(id, resolve, reject) {
    const url = `https://gist.github.com/${id}/`
    axios({
      url
    })
      .then((response) => {
        if (response.status === 200) {
          const url = response.request.responseURL + '/raw'
          axios({
            url
          })
            .then((response) => {
              resolve(this._buildConfiguration(`Shared/${id}`, response.data))
            })
            .catch((error) => {
              error.message = `Could not handle ${url}, error was: ${error.message}`
              reject(error)
            })
        }
      })
      .catch((error) => {
        error.message = `Could not handle ${url}, error was: ${error.message}`
        reject(error)
      })
  }
}

export default ProtocolHandler


text:
<?php
/**
 * User library configuration.
 *
 * In order to log a user in, a user must have the "login" role. You may create
 * and assign any other role to your users.
 */

/**
 * Type of hash to use for passwords. Any algorithm supported by the hash function
 * can be used here. Note that the length of your password is determined by the
 * hash type + the number of salt characters.
 *
 * @see http://php.net/hash
 * @see http://php.net/hash_algos
 */
$config['hash_method'] = 'sha1';

/**
 * Defines the hash offsets to insert the salt at. The password hash length
 * will be increased by the total number of offsets.
 */
$config['salt_pattern'] = array(1, 3, 5, 9, 14, 15, 20, 21, 28, 30);

/**
 * Set the auto-login (remember me) cookie lifetime, in seconds. The default
 * lifetime is two weeks.
 */
$config['lifetime'] = 1209600;

/**
 * Set the session key that will be used to store the current user.
 */
$config['session_key'] = 'user';

/**
 * Auto-login cookie name.
 */
$config['cookie_name'] = 'autologin';

/**
 * Username restrictions
 */
$config['username'] = array(
	'chars'      => 'a-zA-Z0-9_\-\^\. ',
	'length_min' => 3,
	'length_max' => 20,
);

/**
 * Password restrictions
 */
$config['password'] = array(
	'length_min' => 5,
);


text:
package org.openstack.atlas.common.ip;

import org.openstack.atlas.common.ip.exception.IPStringConversionException1;
import org.openstack.atlas.common.ip.exception.IpTypeMissMatchException;

import java.util.ArrayList;
import java.util.List;

public class IPv6Cidrs {
    private List<IPv6Cidr> cidrs;

    public IPv6Cidrs(){
    }

    public List<IPv6Cidr> getCidrs() {
        if(cidrs == null){
            cidrs = new ArrayList<IPv6Cidr>();
        }
        return cidrs;
    }

    public void setCidrs(List<IPv6Cidr> cidrs) {
        this.cidrs = cidrs;
    }

    public boolean contains(String ip) throws IPStringConversionException1, IpTypeMissMatchException {
        for(IPv6Cidr cidr : cidrs){
            if(cidr.contains(ip)) {
                return true;
            }

        }
        return false;
    }
}


text:
    <meta charset="utf-8">
    <title>Nate Blog</title>
    <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'>

    <meta name="description" content="For some reason I'm having trouble wrapping my head around working with git.  Of all things I've tried to use it has been the most frustrating and confusing.  It at least could take me out to dinner before it mind fucks me.  That said I just wanted to leave a link to a good stack overflow answer to the question Why does Git say my master branch is "already up to date" even though it is not?.

" />
    <meta property="og:description" content="For some reason I'm having trouble wrapping my head around working with git.  Of all things I've tried to use it has been the most frustrating and confusing.  It at least could take me out to dinner before it mind fucks me.  That said I just wanted to leave a link to a good stack overflow answer to the question Why does Git say my master branch is "already up to date" even though it is not?.

" />

    <meta name="author" content="Nate Blog" />

    <meta property="og:title" content="Git Hard" />
    <meta property="twitter:title" content="Git Hard" />

    <link rel="stylesheet" href="/css/styles.css">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

          Nate Blog
          menu

Home

Tags

About

Home

Tags

About

      Back to Top

Git Hard

$%^@%$!

15 December 2015

      git

For some reason I'm having trouble wrapping my head around working with git.  Of all things I've tried to use it has been the most frustrating and confusing.  It at least could take me out to dinner before it mind fucks me.  That said I just wanted to leave a link to a good stack overflow answer to the question Why does Git say my master branch is "already up to date" even though it is not?.


text:
(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)

AppendTo[$Path,ToFileName[{NotebookDirectory[]}]];
<<matrixEDC.m
<<algebraDirac`

lagrWZ[coord_List][gauge_,potentials_List]:= Module[{dim,temp},
dim=Length@coord;
temp=Sum[1/n! wedgePower[gauge,n],{n,0,dim+1}]\[Wedge]Plus@@potentials;
projectDim[temp,dim]
]

partition[dim_,n_]:=Module[{perm,ans},perm=Sort/@Permutations[Range[dim],{n}];
ans=DeleteDuplicates@perm](*It's inefficient*)

wedgePower[G_,n_/;n>=1]:=wedgePower[G,n-1]\[Wedge]G
wedgePower[G_,0]:=1
(*Alternative definition:*)
(*wedgePower[G_,n_/;n\[GreaterEqual]1]:= Wedge@@Table[G,{i,1,n}]*)
wedgeForm[coord_List][coef_List, base_List]:=coef.(Wedge@@d[Part[coord,#]]&/@base)
wedgeForm::usage="wedgeForm[coord][coefList, basisNumericalList] constructs the form with wedge products, e.g. f d[x]\[Wedge]d[y] + g d[x]\[Wedge]d[z] ";

formConstruct[coord_List][\[Gamma]_,0]:=\[Gamma][0]
formConstruct[coord_List][\[Gamma]_,n_]:=Module[{components,dim},
dim=Length@coord;
components=partition[dim,n];
wedgeForm[coord][\[Gamma]@@@components,components]
]
formConstruct::usage="formConstruct[coord][name, dim] constructs a form of given name and dimension from partitions of the dimension of the manifold specified by coord. It uses wedgeForm[]. ";

Clear[\[Gamma],\[CapitalGamma],\[ScriptCapitalK]];
nonCommutativeHead[\[Gamma]];nonCommutativeHead[\[CapitalGamma]];
Protect[\[Gamma],\[CapitalGamma],\[ScriptCapitalK]];

getDimBasis[expr_]:=Module[{base, dimList},
base=basis[Wedge][expr];
dimList=Count[#,_d]&/@base;
listsToRule[base, dimList]
]
getDimBasis::usage="getDimBasis[expr] returns a list of type {d[x]\[Wedge]d[y] -> 2, ... }.";

projectDim[expr_,0]:=expr/.Wedge->zero
projectDim[expr_,dim_]:=Module[{projected},
projected=Select[Association@getDimBasis[expr],#==dim &];
Coefficient[expr,Keys@projected].Keys[projected]
]
projectDim::usage="projectDim[expr, dim] selects only the term with given dim from expr.";

dBraneProj[coord_List][Fcoef_List, Fbasis_List]:=Module[{dim,Fform, \[Gamma]Form, expr,\[Xi]},
dim=Length@coord;
(* Brute force approach: build the most general Subscript[\[Gamma], (n)], contract it with \[ExponentialE]^F and project to the dimension we want *)
\[Gamma]Form[n_]:=formConstruct[coord][\[Gamma],n];
Fform=wedgeForm[coord][Fcoef, Fbasis];
expr=Sum[1/n! wedgePower[Fform,n],{n,0,dim+1}]\[Wedge]Sum[\[Gamma]Form[n]\[ScriptCapitalK]^Mod[n/2,2],{n,0,dim,2}];
projectDim[expr,dim]/.listsToRule[d[coord],d/@Array[\[Xi],dim]]/.Wedge[x__]-> 1/.\[CapitalGamma]-> antisym[\[CapitalGamma]]
(* The names of the coordinates are replaced to an ordered array, in order to sort the basis. Then, I make the basis disappear in the last replacement rule *)
]
dBraneProj::usage="dBraneProj[coord][Fcoef, Fbasis] returns the STRIPPED, i.e. no prefactor (-1/LDBI/exp(Dilaton)), nor \[ScriptCapitalI] in the rightmost side, kappa symmetry projector of the Dbrane specified by coord with field F = {coef_List, basis_List}. \[ScriptCapitalK]\[Psi] = \!\(\*SuperscriptBox[\(\[Psi]\), \(*\)]\) and \[ScriptCapitalI]\[Psi] = -i\[Psi], where \[Psi] is a spinor. See Skenderis-Taylor hep-th/0204054.";

\[Gamma]Components[signature_][vierbein_,coord_,inducedCoord_,pullback_][i__]:=Module[{l,list,selectComponents},
(*Subscript[\[Gamma], (n)] = 1/n!Subscript[\[Gamma], {Subscript[a, 1],...,Subscript[a, n]}](d\[Xi]^Subscript[a, 1])\[Wedge]...\[Wedge]d\[Xi]^Subscript[a, n]*)
l=Length@coord;
list=Transpose[Grad[pullback,inducedCoord]].Array[\[Gamma],l];
selectComponents=list[[#]]&/@{i};
mergeArguments[\[Gamma]]@@selectComponents/.\[Gamma]->antisym[\[Gamma]]
]
\[Gamma]Components[signature_][vierbein_,coord_,inducedCoord_,pullback_][i_]:=1;
\[Gamma]Components::usage="\[Gamma]Components[signature][vielb, coord, inducedCoord, pullback][i__] returns \!\(\*SubscriptBox[\(\[Gamma]\), \({\*SubscriptBox[\(a\), \(1\)],  ... , \*SubscriptBox[\(a\), \(n\)]}\)]\) = \!\(\*SubscriptBox[\(\[PartialD]\), SubscriptBox[\(a\), \(1\)]]\)\!\(\*SuperscriptBox[\(X\), SubscriptBox[\(\[Mu]\), \(1\)]]\)...\!\(\*SubscriptBox[\(\[PartialD]\), SubscriptBox[\(a\), \(n\)]]\)\!\(\*SuperscriptBox[\(X\), SubscriptBox[\(\[Mu]\), \(n\)]]\) \!\(\*SubscriptBox[\(\[Gamma]\), \(\(\*SubscriptBox[\(\[Mu]\), \(1\)] ... \) \*SubscriptBox[\(\[Mu]\), \(n\)]\)]\), where \!\(\*SubscriptBox[\(\[Gamma]\), \(\(\*SubscriptBox[\(\[Mu]\), \(1\)] ... \) \*SubscriptBox[\(\[Mu]\), \(n\)]\)]\) are curved space gamma matrices.
\!\(\*SubscriptBox[\(\[Gamma]\), \((n)\)]\) = \!\(\*FractionBox[\(1\), \(n!\)]\)\!\(\*SubscriptBox[\(\[Gamma]\), \({\*SubscriptBox[\(a\), \(1\)],  ... , \*SubscriptBox[\(a\), \(n\)]}\)]\)\!\(\*SuperscriptBox[\(d\[Xi]\), SubscriptBox[\(a\), \(1\)]]\)\[Wedge]...\[Wedge]\!\(\*SuperscriptBox[\(d\[Xi]\), SubscriptBox[\(a\), \(n\)]]\).";

\[Gamma]ComponentsLocal[signature_][vierbein_,coord_,inducedCoord_,pullback_][i__]:=Module[{l,list,selectComponents,pullbackRule},
(*Subscript[\[Gamma], (n)] = 1/n!\!\(
\*SubscriptBox[\(\[PartialD]\),
SubscriptBox[\(a\), \(1\)]]
\*SuperscriptBox[\(X\),
SubscriptBox[\(\[Mu]\), \(1\)]]\)...\!\(
\*SubscriptBox[\(\[PartialD]\),
SubscriptBox[\(a\), \(n\)]]
\*SuperscriptBox[\(X\),
SubscriptBox[\(\[Mu]\), \(n\)]]\) Subsuperscript[E, Subscript[\[Mu], 1], Subscript[M, 1]]...Subsuperscript[E, Subscript[\[Mu], n], Subscript[M, n]] Subscript[\[CapitalGamma], Subscript[M, 1]...Subscript[M, n]](d\[Xi]^Subscript[a, 1])\[Wedge]...\[Wedge]d\[Xi]^Subscript[a, n]*)
l=Length@coord;
pullbackRule=listsToRule[coord,pullback];
list=Transpose[Grad[pullback,inducedCoord]].(vierbein/.pullbackRule).Array[\[CapitalGamma],l];
selectComponents=list[[#]]&/@{i};
mergeArguments[\[CapitalGamma]]@@selectComponents/.\[CapitalGamma]->antisym[\[CapitalGamma]]
]
\[Gamma]ComponentsLocal[signature_][vierbein_,coord_,inducedCoord_,pullback_][i_]:=1;
\[Gamma]ComponentsLocal::usage="\[Gamma]ComponentsLocal[signature][vielb, coord, inducedCoord, pullback][i__] returns \!\(\*SubscriptBox[\(\[Gamma]\), \({\*SubscriptBox[\(a\), \(1\)],  ... , \*SubscriptBox[\(a\), \(n\)]}\)]\) = \!\(\*SubscriptBox[\(\[PartialD]\), SubscriptBox[\(a\), \(1\)]]\)\!\(\*SuperscriptBox[\(X\), SubscriptBox[\(\[Mu]\), \(1\)]]\)...\!\(\*SubscriptBox[\(\[PartialD]\), SubscriptBox[\(a\), \(n\)]]\)\!\(\*SuperscriptBox[\(X\), SubscriptBox[\(\[Mu]\), \(n\)]]\) \!\(\*SubsuperscriptBox[\(E\), SubscriptBox[\(\[Mu]\), \(1\)], SubscriptBox[\(M\), \(1\)]]\)...\!\(\*SubsuperscriptBox[\(E\), SubscriptBox[\(\[Mu]\), \(n\)], SubscriptBox[\(M\), \(n\)]]\) \!\(\*SubscriptBox[\(\[CapitalGamma]\), \(\(\*SubscriptBox[\(M\), \(1\)] ... \) \*SubscriptBox[\(M\), \(n\)]\)]\), where \!\(\*SubscriptBox[\(\[CapitalGamma]\), \(\(\*SubscriptBox[\(M\), \(1\)] ... \) \*SubscriptBox[\(M\), \(n\)]\)]\) are flat space gamma matrices.
\!\(\*SubscriptBox[\(\[Gamma]\), \((n)\)]\) = \!\(\*FractionBox[\(1\), \(n!\)]\)\!\(\*SubscriptBox[\(\[Gamma]\), \({\*SubscriptBox[\(a\), \(1\)],  ... , \*SubscriptBox[\(a\), \(n\)]}\)]\)\!\(\*SuperscriptBox[\(d\[Xi]\), SubscriptBox[\(a\), \(1\)]]\)\[Wedge]...\[Wedge]\!\(\*SuperscriptBox[\(d\[Xi]\), SubscriptBox[\(a\), \(n\)]]\).";


text:
from __future__ import unicode_literals

from django.db import migrations

class Migration(migrations.Migration):

    dependencies = [
        ('product', '0030_auto_20170206_0407'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='product',
            name='weight',
        ),
        migrations.RemoveField(
            model_name='productvariant',
            name='weight_override',
        ),
    ]


text:
package org.teamstbf.yats.ui;

import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Region;

//@@author A0138952W

public class TimeCard extends UiPart<Region> {

    private static final String FXML = "TimeCard.fxml";

    private static final int TASK_TITLE = 0;
    private static final int TASK_TIME_START = 1;
    private static final int TASK_TIME_END = 2;
    private static final int TASK_LOCATION = 3;

    @FXML
    private HBox cardPane;
    @FXML
    private Label taskStartTime;
    @FXML
    private Label taskEndTime;
    @FXML
    private Label taskTitle;
    @FXML
    private Label taskLocation;

    public TimeCard(String[] taskSlot) {
        super(FXML);
        taskStartTime.setText(taskSlot[TASK_TIME_START]);
        taskEndTime.setText(taskSlot[TASK_TIME_END]);
        taskTitle.setText(taskSlot[TASK_TITLE]);
        taskLocation.setText(taskSlot[TASK_LOCATION]);
    }
}


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

    Copyright 2016-2019 The OpenTracing Authors

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
    in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software distributed under the License
    is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
    or implied. See the License for the specific language governing permissions and limitations under
    the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <groupId>io.opentracing.contrib</groupId>
  <artifactId>jdbi-opentracing</artifactId>
  <version>0.6.3-SNAPSHOT</version>
  <packaging>pom</packaging>

  <modules>
    <module>opentracing-jdbi</module>
    <module>opentracing-jdbi3</module>
  </modules>

  <name>${project.groupId}:${project.artifactId}</name>
  <description>Root module for OpenTracing JDBI Instrumentation</description>
  <url>https://github.com/opentracing-contrib/java-jdbi</url>
  <inceptionYear>2016-2019</inceptionYear>

  <scm>
    <url>http://github.com/opentracing-contrib/java-jdbi</url>
    <connection>scm:git:https://github.com/opentracing-contrib/java-jdbi.git</connection>
    <developerConnection>scm:git:https://github.com/opentracing-contrib/java-jdbi.git
    </developerConnection>
    <tag>HEAD</tag>
  </scm>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>OpenTracing</name>
    <url>http://opentracing.io/</url>
  </organization>

  <developers>
    <developer>
      <id>bensigelman</id>
      <name>Ben Sigelman</name>
      <email>bhs@lightstep.com</email>
    </developer>
    <developer>
      <id>joeblubaugh_lightstep</id>
      <name>Joe Blubaugh</name>
      <email>joe@lightstep.com</email>
    </developer>
    <developer>
      <id>malafeev</id>
      <name>Sergei Malafeev</name>
      <email>sergeymalafeev@gmail.com</email>
    </developer>
  </developers>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/opentracing-contrib/java-jdbi/issues</url>
  </issueManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>

    <opentracing.version>0.33.0</opentracing.version>
    <coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
    <jacoco-maven-plugin.version>0.8.4</jacoco-maven-plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.opentracing</groupId>
      <artifactId>opentracing-api</artifactId>
      <version>${opentracing.version}</version>
    </dependency>

    <dependency>
      <groupId>io.opentracing</groupId>
      <artifactId>opentracing-mock</artifactId>
      <version>${opentracing.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.4.199</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <tagNameFormat>@{project.version}</tagNameFormat>
        </configuration>
      </plugin>
      <plugin>
        <groupId>io.zipkin.centralsync-maven-plugin</groupId>
        <artifactId>centralsync-maven-plugin</artifactId>
        <version>0.1.1</version>
        <configuration>
          <subject>opentracing</subject>
          <repo>maven</repo>
          <packageName>opentracing-jdbi</packageName>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>3.0</version>
        <configuration>
          <mapping>
            <java>SLASHSTAR_STYLE</java>
          </mapping>
          <header>header.txt</header>
          <strictCheck>true</strictCheck>
          <excludes>
            <exclude>LICENSE</exclude>
            <exclude>Makefile</exclude>
            <exclude>mvnw</exclude>
            <exclude>mvnw.cmd</exclude>
            <exclude>.mvn/wrapper/maven-wrapper.properties</exclude>
            <exclude>.coveralls.yml</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>compile</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eluder.coveralls</groupId>
        <artifactId>coveralls-maven-plugin</artifactId>
        <version>${coveralls-maven-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <distributionManagement>
    <repository>
      <id>bintray</id>
      <url>https://api.bintray.com/maven/opentracing/maven/opentracing-jdbi/;publish=1</url>
    </repository>
    <snapshotRepository>
      <id>jfrog-snapshots</id>
      <url>https://oss.jfrog.org/artifactory/oss-snapshot-local</url>
    </snapshotRepository>
  </distributionManagement>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- Creates source jar -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- Creates javadoc jar -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.1.1</version>
            <configuration>
              <failOnError>false</failOnError>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <phase>package</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>


text:
class Admin::SubMenuCell < ::Admin::MenuCell

  protected

  def build_item(name, attributes)
    item = super
    enhanced_class = "#{'on' if name.to_s == sections(:sub)} #{item[:class]}"
    item.merge(:class => enhanced_class)
  end

end


text:
#include "usb/internal/PolledQueue.h"

#include "events/mbed_events.h"
#include "platform/Callback.h"

events::PolledQueue::PolledQueue(mbed::Callback<void()> cb): _cb(cb)
{

}

events::PolledQueue::~PolledQueue()
{

}

void events::PolledQueue::dispatch()
{
    core_util_critical_section_enter();
    uint64_t buf[MBED_MAX_TASK_SIZE / sizeof(uint64_t)];

    while (true) {

        // Atomically dequeue the task and copy the callback
        TaskBase *task = _list.dequeue();
        if (!task) {
            break;
        }
        MBED_ASSERT(sizeof(buf) >= task_size(task));
        TaskBase::run_callback_t callback = task_start(task, (uint8_t *)buf, sizeof(buf));

        // Run the callback outside the critical section
        core_util_critical_section_exit();
        callback((uint8_t *)buf);
        core_util_critical_section_enter();

        // Finish
        task_finish(task);
        task = NULL;

    }

    core_util_critical_section_exit();
}

void events::PolledQueue::attach(mbed::Callback<void()> cb)
{
    core_util_critical_section_enter();

    _cb = cb;

    core_util_critical_section_exit();
}

void events::PolledQueue::post(TaskBase *task)
{
    core_util_critical_section_enter();

    bool empty = _list.head() == NULL;
    _list.remove(task);
    _list.enqueue(task);
    if (empty && _cb) {
        _cb();
    }

    core_util_critical_section_exit();
}

void events::PolledQueue::cancel(TaskBase *task)
{
    core_util_critical_section_enter();

    _list.remove(task);

    core_util_critical_section_exit();
}


text:
require 'rails_helper'

RSpec.describe CommentThread, type: :model do
  context '#key' do
    it 'validates the presence of key' do
      thread = build_stubbed :comment_thread, key: nil

      expect(thread).not_to be_valid
    end

    it 'is unguessable' do
      thread = build_stubbed :comment_thread

      expect(thread.key).to match(/\h{8}-\h{4}-\h{4}-\h{4}-\h{12}/)
    end

    it 'is unique' do
      thread1 = build_stubbed :comment_thread
      thread2 = build_stubbed :comment_thread

      expect(thread1.key).not_to eq thread2.key
    end
  end
end


text:
- Updated `@expo/config-plugins` from `4.0.2` to `4.0.14` ([#15621](https://github.com/expo/expo/pull/15621) by [@EvanBacon](https://github.com/EvanBacon))

## 5.1.0 — 2021-12-03

_This version does not introduce any user-facing changes._

## 5.0.1 — 2021-10-01

_This version does not introduce any user-facing changes._

## 5.0.0 — 2021-09-28

### 🛠 Breaking changes

- Dropped support for iOS 11.0 ([#14383](https://github.com/expo/expo/pull/14383) by [@cruzach](https://github.com/cruzach))

### 🐛 Bug fixes

- Fix building errors from use_frameworks! in Podfile. ([#14523](https://github.com/expo/expo/pull/14523) by [@kudo](https://github.com/kudo))

### 💡 Others

- Migrated from `@unimodules/core` to `expo-modules-core`. ([#13757](https://github.com/expo/expo/pull/13757) by [@tsapeta](https://github.com/tsapeta))
- Updated `@expo/config-plugins` ([#14443](https://github.com/expo/expo/pull/14443) by [@EvanBacon](https://github.com/EvanBacon))

## 4.2.0 — 2021-06-16

### 🎉 New features

- [plugin] Refactor imports ([#13029](https://github.com/expo/expo/pull/13029) by [@EvanBacon](https://github.com/EvanBacon))

### 🐛 Bug fixes

- Enable kotlin in all modules. ([#12716](https://github.com/expo/expo/pull/12716) by [@wschurman](https://github.com/wschurman))

### 💡 Others

- Build Android code using Java 8 to fix Android instrumented test build error. ([#12939](https://github.com/expo/expo/pull/12939) by [@kudo](https://github.com/kudo))

## 4.1.0 — 2021-03-10

### 🎉 New features

- Updated Android build configuration to target Android 11 (added support for Android SDK 30). ([#11647](https://github.com/expo/expo/pull/11647) by [@bbarthec](https://github.com/bbarthec))

### 🐛 Bug fixes

- Remove peerDependencies and unimodulePeerDependencies from Expo modules. ([#11980](https://github.com/expo/expo/pull/11980) by [@brentvatne](https://github.com/brentvatne))

## 4.0.0 — 2021-01-15

### ⚠ Notices

- The package is now shipped with prebuilt binaries on iOS. You can read more about it on [expo.fyi/prebuilt-modules](https://expo.fyi/prebuilt-modules). ([#11224](https://github.com/expo/expo/pull/11224) by [@tsapeta](https://github.com/tsapeta))

### 🛠 Breaking changes

- Dropped support for iOS 10.0 ([#11344](https://github.com/expo/expo/pull/11344) by [@tsapeta](https://github.com/tsapeta))

### 🎉 New features

- Created config plugin. ([#11623](https://github.com/expo/expo/pull/11623) by [@EvanBacon](https://github.com/EvanBacon))

### 🐛 Bug fixes

- remove ts-ignore from plugin. ([#11633](https://github.com/expo/expo/pull/11633) by [@EvanBacon](https://github.com/EvanBacon))

## 3.0.0 — 2020-11-17

### 🛠 Breaking changes

- On iOS enabled `use_frameworks!` usage by replacing `React` dependency with `React-Core`. ([#11057](https://github.com/expo/expo/pull/11057) by [@bbarthec](https://github.com/bbarthec))

## 2.3.1 — 2020-09-16

### 🎉 New features

- Updated `react-native-branch` vendored code to 5.0.0, upgraded underlying Branch SDKs, see [`react-native-branch`'s changelog](https://github.com/BranchMetrics/react-native-branch-deep-linking-attribution/blob/master/ChangeLog.md) for full list of changes. ([#10204](https://github.com/expo/expo/pull/10204) by [@sjchmiela](https://github.com/sjchmiela))

## 2.3.0 — 2020-08-18

### 🎉 New features

- Updated `react-native-branch` vendored code to 5.0.0-rc.1, upgraded underlying Branch SDKs, see [`react-native-branch`'s changelog](https://github.com/BranchMetrics/react-native-branch-deep-linking-attribution/blob/master/ChangeLog.md) for full list of changes. ([#9625](https://github.com/expo/expo/pull/9625) by [@sjchmiela](https://github.com/sjchmiela))

## 2.2.1 — 2020-05-29

_This version does not introduce any user-facing changes._

## 2.2.0 — 2020-05-27

_This version does not introduce any user-facing changes._


text:
using System;
using System.Windows.Data;
using System.Windows.Markup;

namespace Restless.Tools.Converters
{
    /// <summary>
    /// Provides a converter that accepts a string value and returns a masked string value.
    /// </summary>
    public class StringToMaskedStringConverter : MarkupExtension, IValueConverter
    {
        #region Public methods
        /// <summary>
        /// Masks a string.
        /// </summary>
        /// <param name="value">The string to be masked.</param>
        /// <param name="targetType">Not used.</param>
        /// <param name="parameter">If an integer, indicates the number of asterisks to return as the masked string.</param>
        /// <param name="culture">Not used.</param>
        /// <returns>The masked string</returns>
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            int count = 12;
            if (parameter is int) count = (int)parameter;
            return new string('*', count);
        }

        /// <summary>
        /// This method is not used. It throws a <see cref="NotImplementedException"/>
        /// </summary>
        /// <param name="value">n/a</param>
        /// <param name="targetType">n/a</param>
        /// <param name="parameter">n/a</param>
        /// <param name="culture">n/a</param>
        /// <returns>n/a</returns>
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Gets the object that is set as the value of the target property for this markup extension.
        /// </summary>
        /// <param name="serviceProvider">Object that can provide services for the markup extension.</param>
        /// <returns>This object.</returns>
        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            return this;
        }
        #endregion
    }
}


text:
 TFA Star Wars Weapons Repository
 ======

Feel free to help improve these addons by making changes locally and sending in pull requests with finished work.  Your work is your own and this repository is only designed to make it easier on you, and everybody else, to fix bugs and improve the overall quality of this content.

### Guidelines:
1. Your work is your own. It is okay to be protective of your own work and to make sure that it stays the way you want it to.
2. Unless you have shown to be totally trustworth when it comes to your changes to this repository you will have to work off a pull request only access. This is to prevent people from breaking your own work as much as you breaking someone elses.
3. Feel free to ask questions, discuss changes, and even use this repository as a reference point for people interested in your specific addon. A lot of people use this content and it makes sense for them to be able to know what we are working on. (to, at the very least, avoid having to answer their question every time they ask)
4. It is 100% okay to use this repository as a way to have players create bug reports for your addon. In fact it's probably the best way to go about helping the players.
5. If necessary moving your addon to a seperate repository can be done. Just try to leave a link to the new location here in the readme.

### Tutorials, Guides, Resources!
If you are new to Git please do not be put off by the concept of an unfamiliar system. The use of git is quite simple and can extremely useful when working in a large group on a project like this.

The download for git bash can be found [here.](https://git-for-windows.github.io/) Make sure to fork the repository and set this one as your upstream.

```lua
-- after downloading gitbash find a folder you are comfortable working from.
-- right click somewhere inside that folder and click "git bash here"
-- type out the following commands to set up everything.
git clone "https://github.com/yourgithubname/tfa-sw-weapons-repository.git"
-- The above command can take a while to finish.
-- Once finished go inside the new folder and git bash here again.
git remote -v
-- you should see the origin as your own personal repo. To add the live repo as your upstream do the next command.
git remote add upstream https://github.com/Servius/tfa-sw-weapons-repository.git
-- Now you can do git pull upstream and youll get any updates that are accepted into the main repo.

-- Once youve setup all the above you will want to be able to push your changes. Do the following:
git status
git add "*"
git commit -m "What you did; Other thing you did"
git push
-- Go to your own repository and click on merge requests -> create new merge request ->
-- make sure you are aiming your own repo at the main repo
-- Describe what you are changing and whats been done in the description and title.
-- It will also list out your commits so don't worry about being super descriptive.
```

 If you are having trouble getting started with git feel free to use any of the resources posted below:

- Go to the following link to look through a tutorial I have setup:
https://docs.google.com/document/d/1o599ftTRcHWWmDRIibNfC5NcJJF1YTY9IizqnxzgM7U/edit?usp=sharing

- You can also watch the video located here:
https://www.youtube.com/watch?v=72a28tleThY&t=484s

## RULES OF USE
- It is completley unacceptable to claim any of the work posted here by someone else as your own work.
- You may not re-upload other peoples work under any circumstances.
If found violating any of the above a [DMCA])https://www.google.com/search?q=dmca&rlz=1C1CHBD_enUS728US728&oq=dmca&aqs=chrome..69i57.575j0j7&sourceid=chrome&ie=UTF-8) will be filed.


text:
class Mu < Formula
  desc "Tool for searching e-mail messages stored in the maildir-format"
  homepage "http://www.djcbsoftware.nl/code/mu/"
  url "https://github.com/djcb/mu-releases/raw/master/mu-0.9.16.tar.gz"
  sha256 "55dff47f1ec2ea5a409a882009888c4f1b2b6ef2d81ee29753a649654752ee7e"
  head "https://github.com/djcb/mu.git"

  bottle do
    revision 1
    sha256 "e0e3532baa75ecee2d71a264a8bed4725a1dc1a6ecb9b0afbcc6f225a77dd06e" => :el_capitan
    sha256 "927ba3c36a061061c679ad91319d614532dbbd7c450ec0e0172681465b8f06e3" => :yosemite
    sha256 "99553174cd38a3d19993a94c07dafab56e98f591ac5054bf6b79d1d6b13f5e02" => :mavericks
  end

  depends_on "autoconf" => :build
  depends_on "automake" => :build
  depends_on "libtool" => :build
  depends_on "pkg-config" => :build
  depends_on "gettext"
  depends_on "glib"
  depends_on "gmime"
  depends_on "xapian"
  depends_on :emacs => ["23", :optional]

  def install
    # Explicitly tell the build not to include emacs support as the version
    # shipped by default with Mac OS X is too old.
    ENV["EMACS"] = "no" if build.without? "emacs"

    system "autoreconf", "-ivf"
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--with-lispdir=#{elisp}"
    system "make"
    system "make", "install"
  end

  def caveats; <<-EOS.undent
    Existing mu users are recommended to run the following after upgrading:

      mu index --rebuild
    EOS
  end

  # Regression test for:
  # https://github.com/djcb/mu/issues/397
  # https://github.com/djcb/mu/issues/380
  # https://github.com/djcb/mu/issues/332
  test do
    mkdir (testpath/"cur")

    (testpath/"cur/1234567890.11111_1.host1!2,S").write <<-EOS.undent
      From: "Road Runner" <fasterthanyou@example.com>
      To: "Wile E. Coyote" <wile@example.com>
      Date: Mon, 4 Aug 2008 11:40:49 +0200
      Message-id: <1111111111@example.com>

      Beep beep!
    EOS

    (testpath/"cur/0987654321.22222_2.host2!2,S").write <<-EOS.undent
      From: "Wile E. Coyote" <wile@example.com>
      To: "Road Runner" <fasterthanyou@example.com>
      Date: Mon, 4 Aug 2008 12:40:49 +0200
      Message-id: <2222222222@example.com>
      References: <1111111111@example.com>

      This used to happen outdoors. It was more fun then.
    EOS

    system "#{bin}/mu", "index",
                        "--muhome",
                        testpath,
                        "--maildir=#{testpath}"

    mu_find = "#{bin}/mu find --muhome #{testpath} "
    find_message = "#{mu_find} msgid:2222222222@example.com"
    find_message_and_related = "#{mu_find} --include-related msgid:2222222222@example.com"

    assert_equal 1, shell_output(find_message).lines.count
    assert_equal 2, shell_output(find_message_and_related).lines.count,
                 "You tripped over https://github.com/djcb/mu/issues/380\n\t--related doesn't work. Everything else should"
  end
end


text:
.class public Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;
.super Lorg/jets3t/service/impl/rest/SimpleHandler;
.source "CloudFrontXmlResponsesSaxParser.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "InvalidationListHandler"
.end annotation

# instance fields
.field private invalidationList:Lorg/jets3t/service/model/cloudfront/InvalidationList;

.field private invalidationSummaries:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lorg/jets3t/service/model/cloudfront/InvalidationSummary;",
            ">;"
        }
    .end annotation
.end field

.field private invalidationSummaryId:Ljava/lang/String;

.field private invalidationSummaryStatus:Ljava/lang/String;

.field private isTruncated:Z

.field private marker:Ljava/lang/String;

.field private maxItems:I

.field private nextMarker:Ljava/lang/String;

.field final synthetic this$0:Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser;

# direct methods
.method public constructor <init>(Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser;Lorg/xml/sax/XMLReader;)V
    .locals 2
    .param p2, "xr"    # Lorg/xml/sax/XMLReader;

    .prologue
    const/4 v1, 0x0

    .line 750
    iput-object p1, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->this$0:Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser;

    .line 751
    invoke-direct {p0, p2}, Lorg/jets3t/service/impl/rest/SimpleHandler;-><init>(Lorg/xml/sax/XMLReader;)V

    .line 740
    iput-object v1, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->marker:Ljava/lang/String;

    .line 741
    iput-object v1, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->nextMarker:Ljava/lang/String;

    .line 742
    const/16 v0, 0x64

    iput v0, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->maxItems:I

    .line 743
    const/4 v0, 0x0

    iput-boolean v0, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->isTruncated:Z

    .line 744
    iput-object v1, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->invalidationSummaryId:Ljava/lang/String;

    .line 745
    iput-object v1, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->invalidationSummaryStatus:Ljava/lang/String;

    .line 746
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->invalidationSummaries:Ljava/util/List;

    .line 748
    iput-object v1, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->invalidationList:Lorg/jets3t/service/model/cloudfront/InvalidationList;

    .line 752
    return-void
.end method

# virtual methods
.method public endId(Ljava/lang/String;)V
    .locals 0
    .param p1, "text"    # Ljava/lang/String;

    .prologue
    .line 792
    iput-object p1, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->invalidationSummaryId:Ljava/lang/String;

    .line 793
    return-void
.end method

.method public endInvalidationList(Ljava/lang/String;)V
    .locals 6
    .param p1, "ignore"    # Ljava/lang/String;

    .prologue
    .line 803
    new-instance v0, Lorg/jets3t/service/model/cloudfront/InvalidationList;

    iget-object v1, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->marker:Ljava/lang/String;

    iget-object v2, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->nextMarker:Ljava/lang/String;

    iget v3, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->maxItems:I

    iget-boolean v4, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->isTruncated:Z

    iget-object v5, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->invalidationSummaries:Ljava/util/List;

    invoke-direct/range {v0 .. v5}, Lorg/jets3t/service/model/cloudfront/InvalidationList;-><init>(Ljava/lang/String;Ljava/lang/String;IZLjava/util/List;)V

    iput-object v0, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->invalidationList:Lorg/jets3t/service/model/cloudfront/InvalidationList;

    .line 806
    return-void
.end method

.method public endIsTruncated(Ljava/lang/String;)V
    .locals 1
    .param p1, "text"    # Ljava/lang/String;

    .prologue
    .line 787
    const-string v0, "true"

    invoke-virtual {v0, p1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->isTruncated:Z

    .line 788
    return-void
.end method

.method public endMarker(Ljava/lang/String;)V
    .locals 0
    .param p1, "text"    # Ljava/lang/String;

    .prologue
    .line 775
    iput-object p1, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->marker:Ljava/lang/String;

    .line 776
    return-void
.end method

.method public endMaxItems(Ljava/lang/String;)V
    .locals 1
    .param p1, "text"    # Ljava/lang/String;

    .prologue
    .line 783
    invoke-static {p1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0

    iput v0, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->maxItems:I

    .line 784
    return-void
.end method

.method public endNextMarker(Ljava/lang/String;)V
    .locals 0
    .param p1, "text"    # Ljava/lang/String;

    .prologue
    .line 779
    iput-object p1, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->nextMarker:Ljava/lang/String;

    .line 780
    return-void
.end method

.method public endStatus(Ljava/lang/String;)V
    .locals 4
    .param p1, "text"    # Ljava/lang/String;

    .prologue
    .line 797
    iput-object p1, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->invalidationSummaryStatus:Ljava/lang/String;

    .line 798
    iget-object v0, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->invalidationSummaries:Ljava/util/List;

    new-instance v1, Lorg/jets3t/service/model/cloudfront/InvalidationSummary;

    iget-object v2, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->invalidationSummaryId:Ljava/lang/String;

    iget-object v3, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->invalidationSummaryStatus:Ljava/lang/String;

    invoke-direct {v1, v2, v3}, Lorg/jets3t/service/model/cloudfront/InvalidationSummary;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 800
    return-void
.end method

.method public getInvalidationList()Lorg/jets3t/service/model/cloudfront/InvalidationList;
    .locals 1

    .prologue
    .line 755
    iget-object v0, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->invalidationList:Lorg/jets3t/service/model/cloudfront/InvalidationList;

    return-object v0
.end method

.method public getMarker()Ljava/lang/String;
    .locals 1

    .prologue
    .line 763
    iget-object v0, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->marker:Ljava/lang/String;

    return-object v0
.end method

.method public getMaxItems()I
    .locals 1

    .prologue
    .line 771
    iget v0, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->maxItems:I

    return v0
.end method

.method public getNextMarker()Ljava/lang/String;
    .locals 1

    .prologue
    .line 767
    iget-object v0, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->nextMarker:Ljava/lang/String;

    return-object v0
.end method

.method public isTruncated()Z
    .locals 1

    .prologue
    .line 759
    iget-boolean v0, p0, Lorg/jets3t/service/impl/rest/CloudFrontXmlResponsesSaxParser$InvalidationListHandler;->isTruncated:Z

    return v0
.end method


text:
Editar Funcionario

        <form class="form-horizontal" data-ng-submit="update()" novalidate>
            <fieldset>

                    Nombre

                        <input type="text" data-ng-model="functionary.firstName" id="firstname" class="form-control align-field" required>

                    Primer apellido

                        <input type="text" data-ng-model="functionary.firstSurname" id="firstsurname" class="form-control align-field" required>

                    Segundo apellido

                        <input type="text" data-ng-model="functionary.secondSurname" id="secondsurname" class="form-control align-field" required>

                    Cédula

                        <input type="text" data-ng-model="functionary.identification" id="identification" class="form-control align-field" required>

                    Fecha de nacimiento

                        <input id="birthdate" type="text" placeholder='dd/mm/yyyy' data-ng-model="functionary.birthdate" class="form-control align-field"required />

                    Estado Civil

                        <select class="form-control align-field" data-ng-model="maritalStatus" id="maritalstatus"
                                ng-options="maritalStatus as maritalStatus.maritalStatus for maritalStatus in optionsMaritalStatus">
                        </select>

                    Dirección

                        <input type="text" data-ng-model="functionary.address" id="address" class="form-control align-field" required>

                    Teléfono Hogar

                        <input type="text" ng-minlength="8" maxlength="8" onkeypress='return event.charCode >= 48 && event.charCode <= 57' data-ng-model="functionary.phoneNumber" id="phonenumber" class="form-control align-field">

                    Celular

                        <input type="text" ng-minlength="8" maxlength="8" onkeypress='return event.charCode >= 48 && event.charCode <= 57' data-ng-model="functionary.cellphoneNumber" id="cellphonenumber" class="form-control align-field" required>

                    Email

                        <input type="email" data-ng-model="functionary.email" id="email" class="form-control align-field" required>

                    Rol

                        <select class="form-control align-field" data-ng-model="role" id="role"
                                ng-options="role as role.role for role in optionsFunctionaryRoles">
                        </select>

                    Fecha de contratación

                        <input id="hireDate" type="text" placeholder='dd/mm/yyyy' data-ng-model="functionary.hireDate" class="form-control align-field"required />

                    Estado

                        <select class="form-control align-field" data-ng-model="status" id="status"
                                ng-options="status as status.status for status in optionsFunctionaryStatus">
                        </select>

                    <input type="submit" value="Guardar" class="btn btn-lg btn-success">

            </fieldset>
        </form>


text:
#include "webrtc/video_engine/vie_remb.h"

#include <assert.h>

#include <algorithm>

#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
#include "webrtc/modules/utility/interface/process_thread.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
#include "webrtc/system_wrappers/interface/tick_util.h"
#include "webrtc/system_wrappers/interface/trace.h"

namespace webrtc {

const int kRembSendIntervalMs = 200;

// % threshold for if we should send a new REMB asap.
const unsigned int kSendThresholdPercent = 97;

VieRemb::VieRemb()
    : list_crit_(CriticalSectionWrapper::CreateCriticalSection()),
      last_remb_time_(TickTime::MillisecondTimestamp()),
      last_send_bitrate_(0),
      bitrate_(0) {}

VieRemb::~VieRemb() {}

void VieRemb::AddReceiveChannel(RtpRtcp* rtp_rtcp) {
  assert(rtp_rtcp);

  CriticalSectionScoped cs(list_crit_.get());
  if (std::find(receive_modules_.begin(), receive_modules_.end(), rtp_rtcp) !=
      receive_modules_.end())
    return;

  // The module probably doesn't have a remote SSRC yet, so don't add it to the
  // map.
  receive_modules_.push_back(rtp_rtcp);
}

void VieRemb::RemoveReceiveChannel(RtpRtcp* rtp_rtcp) {
  assert(rtp_rtcp);

  CriticalSectionScoped cs(list_crit_.get());
  for (RtpModules::iterator it = receive_modules_.begin();
       it != receive_modules_.end(); ++it) {
    if ((*it) == rtp_rtcp) {
      receive_modules_.erase(it);
      break;
    }
  }
}

void VieRemb::AddRembSender(RtpRtcp* rtp_rtcp) {
  assert(rtp_rtcp);

  CriticalSectionScoped cs(list_crit_.get());

  // Verify this module hasn't been added earlier.
  if (std::find(rtcp_sender_.begin(), rtcp_sender_.end(), rtp_rtcp) !=
      rtcp_sender_.end())
    return;
  rtcp_sender_.push_back(rtp_rtcp);
}

void VieRemb::RemoveRembSender(RtpRtcp* rtp_rtcp) {
  assert(rtp_rtcp);

  CriticalSectionScoped cs(list_crit_.get());
  for (RtpModules::iterator it = rtcp_sender_.begin();
       it != rtcp_sender_.end(); ++it) {
    if ((*it) == rtp_rtcp) {
      rtcp_sender_.erase(it);
      return;
    }
  }
}

bool VieRemb::InUse() const {
  CriticalSectionScoped cs(list_crit_.get());
  if (receive_modules_.empty() && rtcp_sender_.empty())
    return false;
  else
    return true;
}

void VieRemb::OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs,
                                      unsigned int bitrate) {
  list_crit_->Enter();
  // If we already have an estimate, check if the new total estimate is below
  // kSendThresholdPercent of the previous estimate.
  if (last_send_bitrate_ > 0) {
    unsigned int new_remb_bitrate = last_send_bitrate_ - bitrate_ + bitrate;

    if (new_remb_bitrate < kSendThresholdPercent * last_send_bitrate_ / 100) {
      // The new bitrate estimate is less than kSendThresholdPercent % of the
      // last report. Send a REMB asap.
      last_remb_time_ = TickTime::MillisecondTimestamp() - kRembSendIntervalMs;
    }
  }
  bitrate_ = bitrate;

  // Calculate total receive bitrate estimate.
  int64_t now = TickTime::MillisecondTimestamp();

  if (now - last_remb_time_ < kRembSendIntervalMs) {
    list_crit_->Leave();
    return;
  }
  last_remb_time_ = now;

  if (ssrcs.empty() || receive_modules_.empty()) {
    list_crit_->Leave();
    return;
  }

  // Send a REMB packet.
  RtpRtcp* sender = NULL;
  if (!rtcp_sender_.empty()) {
    sender = rtcp_sender_.front();
  } else {
    sender = receive_modules_.front();
  }
  last_send_bitrate_ = bitrate_;

  list_crit_->Leave();

  if (sender) {
    sender->SetREMBData(bitrate_, ssrcs);
  }
}

}  // namespace webrtc


text:
package com.boundlessgeo.spatialconnect.stores;

import com.boundlessgeo.spatialconnect.geometries.SCSpatialFeature;

import java.util.Map;

import rx.Observable;

public interface ISyncableStore {
    void updateAuditTable(SCSpatialFeature scSpatialFeature);
    Map<String, Object> generateSendPayload(SCSpatialFeature scSpatialFeature);
    Observable<SCSpatialFeature> unSent();
    String syncChannel();
}


text:
package com.intellij.appengine.sdk;

import com.intellij.execution.configurations.ParametersList;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.io.File;
import java.util.List;

/**
 * @author nik
 */
public interface AppEngineSdk {

  @NotNull
  String getSdkHomePath();

  @NotNull
  File getAppCfgFile();

  @NotNull
  File getToolsApiJarFile();

  @NotNull
  File[] getLibraries();

  boolean isClassInWhiteList(@NotNull String className);

  @Nullable
  String getVersion();

  boolean isMethodInBlacklist(@NotNull String className, @NotNull String methodName);

  boolean isValid();

  @NotNull
  String getOrmLibDirectoryPath();

  @NotNull
  List<String> getUserLibraryPaths();

  @NotNull
  VirtualFile[] getOrmLibSources();

  @NotNull
  File getApplicationSchemeFile();

  @NotNull
  File getWebSchemeFile();

  @NotNull
  File[] getJspLibraries();

  void patchJavaParametersForDevServer(@NotNull ParametersList vmParameters);
}


text:
<?php

namespace OC\PlatformBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use OC\PlatformBundle\Entity\Advert;
use OC\PlatformBundle\Entity\Image;
use OC\PlatformBundle\Entity\Application;
use OC\PlatformBundle\Entity\AdvertSkill;

class AdvertController extends Controller
{
    public function indexAction($page)
    {
      if ($page <1) {
         throw new NotFoundHttpException('Page "'.$page.'" inexistante.');
      }
      $em = $this->getDoctrine()->getManager();
      $listAdverts = $em->getRepository("OCPlatformBundle:Advert")->findAll();

      $content = $this->render(
            'OCPlatformBundle:Advert:index.html.twig',
            array('listAdverts'=>$listAdverts)
         );
      return new Response($content);
    }

   public function viewAction($id, Request $request)
   {
      $em = $this->getDoctrine()->getManager();
      $repository = $em->getRepository('OCPlatformBundle:Advert');

      $advert = $repository->find($id);

      if (null === $advert) {
         throw new NotFoundHttpException("L'annonce d'id ".$id." n'existe pas");
      }

      $listApplications = $em->getRepository('OCPlatformBundle:Application')
         ->findBy(array('advert'=>$advert));

      $listAdvertSkills = $em->getRepository('OCPlatformBundle:AdvertSkill')
         ->findBy(array('advert'=>$advert));
      return $this->render(
            'OCPlatformBundle:Advert:view.html.twig',
            array(
               'advert' => $advert,
               'listApplications' => $listApplications,
               'listAdvertSkills' => $listAdvertSkills,
            )
         );
   }

   public function addAction(Request $request)
   {
      $em = $this->getDoctrine()->getManager();
      $advert = new Advert();
      $advert->setTitle('Recherche développeur Symfony');
      $advert->setAuthor('marinfrederic@gmail.com');
      $advert->setContent('lorem ipsum blah blabla');

      $image = new Image();
      $image->setUrl('http://sdz-upload.s3.amazonaws.com/prod/upload/job-de-reve.jpg');
      $image->setAlt('Job de rêve');

      $advert->setImage($image);

      $application1 = new Application();
      $application1->setAuthor('fred');
      $application1->setContent('Hire me!');
      $application1->setAdvert($advert);

      $application2 = new Application();
      $application2->setAuthor('fred');
      $application2->setContent('For real! I am the one');
      $application2->setAdvert($advert);

      $listSkills = $em->getRepository('OCPlatformBundle:Skill')->findAll();
      foreach ($listSkills as $skill) {
         $advertSkill = new AdvertSkill();
         $advertSkill->setAdvert($advert);
         $advertSkill->setSkill($skill);
         $advertSkill->setLevel("Expert");
         $em->persist($advertSkill);
      }
      $em->persist($advert);
      $em->persist($application1);
      $em->persist($application2);
      $em->flush();

      if ($request->isMethod('POST')) {
         $session = $request->getSession();
         $session->getFlashBag()->add('info', 'Annonce bien enregistrée');
         return $this->redirectToRoute("oc_platform_view", array('id' => $advert->getId()));
      }
      return $this->render('OCPlatformBundle:Advert:add.html.twig');
   }

   public function editAction($id, Request $request)
   {
      $em = $this->getDoctrine()->getManager();

      $advert = $em->getRepository("OCPlatformBundle:Advert")->find($id);

      if ($advert === null) {
         throw new NotFoundException("Annonce non trouvée");
      }
      $listCategories = $em->getRepository('OCPlatformBundle:Category')->findAll();
      foreach ($listCategories as $category) {
         $advert->addCategory($category);
      }
      $em->flush();
      if ($request->isMethod('POST')) {
         $request->getSession()->getFlashBag()->add('info', 'Annonce bien modifiée');
         return $this->redirectToRoute("oc_platform_view", array('id' => 5));
      }
      return $this->render('OCPlatformBundle:Advert:edit.html.twig', array('advert'=>$advert));
   }

   public function deleteAction($id)
   {
      $em = $this->getDoctrine()->getManager();
      $advert = $em->getRepository('OCPlatformBundle:Advert')->find($id);

      if ($advert === null ){
         throw new NotFoundException("Annonce non trouvée");
      }

      foreach ($advert->getCategories() as $category) {
         $advert->removeCategory($category);
      }
      $em->flush();
      return $this->render('OCPlatformBundle:Advert:delete.html.twig');
   }

   public function menuAction($limit)
   {
      $listAdverts = array(
         array('id'=>2, 'title'=>'Recherche développeur Symfony'),
         array('id'=>5, 'title'=>'Mission de webmaster'),
         array('id'=>9, 'title'=>'Offre de stage webdesigner')
      );

      return $this->render('OCPlatformBundle:Advert:menu.html.twig',
         array('listAdverts'=>$listAdverts)
      );
   }
}


text:
#include "run.h"
#include "options.h"
#include "histogram.h"

int main(int argc, char *argv[]) {
	program_options_t program_options = {
"Histogram collects a set of photon correlation events and counts them into\n"
"bins defined by their relative time delays. The histograms are also\n"
"separated by the identities of each channel in the correlation, such that\n"
"all cross-correlations can be recovered. The output is similar to the \n"
"correlation events, except that the delay limits are now given:\n"
"   (t2, order 2)\n"
"   channel 0, channel 1, t1-t0 lower, t1-t0 upper, counts\n"
"Extension to higher orders creates more channel-delay pairs, and for t3 mode\n"
"the pair becomes a channel-pulse-time tuple.\n"
"\n"
"An order 1 correlation of t3 data is possible, since this is already \n"
"implicitly a correlation of a sync source and a photon stream. This is\n"
"useful for calculating a photoluminescence lifetime, for example.\n",
		{OPT_HELP, OPT_VERBOSE, OPT_VERSION,
			OPT_FILE_IN, OPT_FILE_OUT,
			OPT_MODE, OPT_CHANNELS, OPT_ORDER,
			OPT_TIME, OPT_PULSE, OPT_TIME_SCALE, OPT_PULSE_SCALE, OPT_EOF}};

	return(run(&program_options, histogram_dispatch, argc, argv));
}