text:
PyObject* set_keypad(PyObject* self, PyObject* args)
{
	PyObject *Color;
	if (!PyArg_ParseTuple(args, "O", &Color))
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Usage: setColor(color) | setColor((R, G, B))");
		return nullptr;
	}

	COLORREF color;
	if (!Chroma.Colortest(Color, color))
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Color needs to be (0-255, 0-255, 0-255)");
		return nullptr;
	}
	return Chroma.setKeypad(color);

}

PyObject* set_keypadbycord(PyObject* self, PyObject* args)
{
	long x, y;

	PyObject *Color;
	if (!PyArg_ParseTuple(args, "llO", &x, &y, &Color))
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Usage: setbyGrid(x, y, color) | setbyGrid(x, y, (R, G, B))");
		return nullptr;
	}

	if ((x > ChromaSDK::Keypad::MAX_COLUMN) || (x < 0)) {
		PyErr_SetString(SyntaxError, "Invalid Argument! X-coordinate out of range");
		return nullptr;
	}
	else if ((y > ChromaSDK::Keypad::MAX_ROW) || (y < 0)) {
		PyErr_SetString(SyntaxError, "Invalid Argument! Y-coordinate out of range");
		return nullptr;
	}

	COLORREF color;
	if (!Chroma.Colortest(Color, color))
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Color needs to be (0-255, 0-255, 0-255)");
		return nullptr;
	}

	return Chroma.setKeypadbyCord(x, y, color);
}

PyObject* set_keypadbyrow(PyObject* self, PyObject* args)
{
	long y;

	PyObject *Color;
	if (!PyArg_ParseTuple(args, "lO", &y, &Color))
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Usage: setbyRow(row, color) | setbyRow(row, (R, G, B))");
		return nullptr;
	}

	if ((y > ChromaSDK::Keypad::MAX_ROW) || (y < 0)) {
		PyErr_SetString(SyntaxError, "Invalid Argument! Y-coordinate out of range");
		return nullptr;
	}
	COLORREF color;
	if (!Chroma.Colortest(Color, color))
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Color needs to be (0-255, 0-255, 0-255)");
		return nullptr;
	}

	return Chroma.setKeypadbyRow(y, color);

}

PyObject* set_keypadbycol(PyObject* self, PyObject* args)
{
	long x;

	PyObject *Color;
	if (!PyArg_ParseTuple(args, "lO", &x, &Color))
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Usage: setbyCol(column, color) | setbyCol(column, (R, G, B))");
		return nullptr;
	}

	if ((x > ChromaSDK::Keypad::MAX_COLUMN || x < 0)) {
		PyErr_SetString(SyntaxError, "Invalid Argument! X-coordinate out of range");
		return nullptr;
	}

	COLORREF color;
	if (!Chroma.Colortest(Color, color))
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Color needs to be (0-255, 0-255, 0-255)");
		return nullptr;
	}

	return Chroma.setKeypadbyCol(x, color);
}

PyObject* clear_keypad(PyObject* self, PyObject* args)
{
	return Chroma.clearKeypadEffect();
}

PyObject* applyEffectKeypad(PyObject* self, PyObject* args)
{
	return Chroma.applyKeypadEffect();
}

PyObject* ResetEffectKeypad(PyObject* self, PyObject* args) {

	Chroma.ResetEffects(KEYPAD_DEVICES);

	return PyUnicode_FromString("Success");
}

PyObject*ReactiveEffectKeypad(PyObject* self, PyObject* args) {

	PyObject *Color;
	int duration;
	if (!PyArg_ParseTuple(args, "lO", &duration, &Color))
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Usage: setReactive(duration, color) | setbyGrid(duration, (R, G, B))");
		return nullptr;
	}
	COLORREF color;
	if (!Chroma.Colortest(Color, color))
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Color needs to be (0-255, 0-255, 0-255)");
		return nullptr;
	}
	if ((duration < 0) || (duration > 3)) {
		PyErr_SetString(SyntaxError, "Invalid Arguments! Duration needs to be 0(short)-3(long)");
		return nullptr;
	}
	return Chroma.setKeypadReactive(duration, color);
}

PyObject*WaveEffectKeypad(PyObject* self, PyObject* args) {

	int direction;
	if (!PyArg_ParseTuple(args, "l", &direction))
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Usage: setWave(direction) | setWave(direction)");
		return nullptr;
	}

	if (direction < 0 || direction > 2) {
		PyErr_SetString(SyntaxError, "Invalid Arguments! Duration needs to be 0(left to right)-1(right to left)");
		return nullptr;
	}
	return Chroma.setKeypadWave(direction);
}

PyObject* BreathingEffectKeypad(PyObject* self, PyObject* args) {

	int temp;
	bool mode;
	PyObject* first;
	PyObject* second;
	if (!PyArg_ParseTuple(args, "IOO", &temp, &first, &second))
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Usage: setBreathing(mode, first color, second color)");
		return nullptr;
	}
	COLORREF FIRST = NULL;
	COLORREF SECOND = NULL;

	if (temp == 0){ mode = false; }
	else if (temp == 1) { mode = true; }
	else
	{
		PyErr_SetString(SyntaxError, "Invalid Arguments! Mode needs to be 0(false)-1(true)");
		return nullptr;
	}

	if (mode == RZRESULT_SUCCESS) {

		if (!Chroma.Colortest(first, FIRST))
		{
			PyErr_SetString(SyntaxError, "Invalid Arguments! Color needs to be (0-255, 0-255, 0-255)");
			return nullptr;

		}
		if (!Chroma.Colortest(second, SECOND))
		{
			PyErr_SetString(SyntaxError, "Invalid Arguments! Color needs to be (0-255, 0-255, 0-255)");
			return nullptr;
		}

	}

	return Chroma.setKeypadBreathing(mode, FIRST, SECOND);
}


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

    var Application;
    var client;

    Skype.initialize(
        {
            apiKey: config.apiKey,
        },
        function (api) {
            Application = api.application;
            client = new Application();
            init();
        },
        function (err) {
            console.log('error on initialize');
            console.log(err);
        });

    var username; //= 'danab@litwareinc.com'; //'danab@metio.net';
    var password; //= 'pass@word1'; //'dev+Uc=:)*2';
    var endpointSip; //= 'skype.helper@litwareinc.com';
    var conferenceUri;
    var chatService;
    var videoService;
    var timer = null;

    var params =
               {
                   "version": config.version,
                   "auth": null,
                   "client_id": "4c3b2c1b-364c-4ceb-9416-8371dd4ebe3a",
                   "origins": ["https://webdir.online.lync.com/autodiscover/autodiscoverservice.svc/root"],
                   "cors": true
               };

    var videoService, audioService;
    var fullscreen = false;

    var conversation = null;

    $(document).ready(function () {
        $('#doctor-name').text("Logging in...");

        $(document).on('videoConnected', hideLoadingSpinner);

        $('#btnFullScreen').click(function () {
            if (fullscreen) {
                $('#bodyContainer').toggleClass('fullscreen-container');
                $('#divCallControl').toggleClass('fullscreen');
                $('#bottomInfo').show();
                $('#sideInfo').show();
                $('#navigation').show();

                $('#videoControl').css({
                    'height': '514px',
                    'width': '800px'
                });

                $('#skypeBackgroundImage').css({
                    'height': '514px',
                    'width': '800px'
                });

                $('#patientWindow').css({
                    'height': '514px',
                    'width': '800px'
                });

                $('#callControls').css({
                    'width': '800px'
                });

                $('#bodyContainer').css({
                    'width': ''
                });

                $('#loading-content').css({
                    'left': '215px',
                    'top' : '200px'
                });

                $('#myVideo').css({
                    'top': '+15px',
                    'width': '200px',
                    'height': '120px'
                });

                $('#callButtons').css({
                    'margin-left': '325px'
                });
            }
            else {
                $('#bottomInfo').hide();
                $('#sideInfo').hide();
                $('#navigation').hide();
                $('#bodyContainer').toggleClass('fullscreen-container');
                $('#divCallControl').toggleClass('fullscreen');

                var winHeight = window.innerHeight - 66;
                var winWidth = window.innerWidth - 16;

                $('#videoControl').css({
                    'height': winHeight,
                    'width': winWidth
                });

                $('#skypeBackgroundImage').css({
                    'height': winHeight,
                    'width': winWidth
                });

                $('#patientWindow').css({
                    'height': winHeight,
                    'width': winWidth
                });

                $('#callControls').css({
                    'width': winWidth
                });

                $('#bodyContainer').css({
                    'width': winWidth
                });

                $('#loading-content').css({
                    'left': (winWidth - 342) / 2,
                    'top': (winHeight - 100) / 2 - 100
                });

                $('#myVideo').css({
                    'top':'-64px',
                    'width': winWidth / 4,
                    'height': winHeight / 4.28
                });

                $('#callButtons').css({
                    'margin-left' : (winWidth - 113) / 2
                });
            }

            $('#divCallControl').toggleClass('width-fill');
            $('#leftColumn').toggleClass('width-fill');
            fullscreen = !fullscreen;
        });

        $('#firstTextBtn').click(function () {
            $('.textAreas').hide();
            $('#firstText').fadeIn('fast');
            $('.textButtons').removeClass('font-bold');
            $('.textButtons').addClass('font-lightgray');
            $('#firstTextBtn').removeClass('font-lightgray');
            $('#firstTextBtn').addClass('font-bold');
            $('#note-title').text('Today\'s Notes:');
        });

        $('#secondTextBtn').click(function () {
            $('.textAreas').hide();
            $('#secondText').fadeIn('fast');
            $('.textButtons').removeClass('font-bold');
            $('.textButtons').addClass('font-lightgray');
            $('#secondTextBtn').removeClass('font-lightgray');
            $('#secondTextBtn').addClass('font-bold');
            $('#note-title').text('Notes from November 14, 2014:');
        });

        $('#thirdTextBtn').click(function () {
            $('.textAreas').hide();
            $('#thirdText').fadeIn('fast');
            $('.textButtons').removeClass('font-bold');
            $('.textButtons').addClass('font-lightgray');
            $('#thirdTextBtn').removeClass('font-lightgray');
            $('#thirdTextBtn').addClass('font-bold');
            $('#note-title').text('Notes from August 28, 2014:');
        });
    });

    function init() {

        username = $('#skypeUserId').val();
        password = $('#skypePassword').val();
        endpointSip = $('#endpointSip').val();
        conferenceUri = $('#conferenceUriDisplay').val();

        $('#btnHangUp').click(function () {
            client.signInManager.signOut()
            .then(function () {
                window.location.href = $('#homeLink').attr('href') + "?sip=" + encodeURIComponent($('#skypeUserId').val()) + "&patient=" + encodeURIComponent($('#patientId').val()) + "&pw=" + encodeURIComponent($('#skypePassword').val());
            }, function (error) {
                // or a failure
                alert(error || 'Cannot sign out');
            });
        });

        $('#btnVideo').click(function () {
            var conv, channel;
            if (client && client.conversations &&client.conversations.size() == 1) {

                conv = client.conversations(0);

                channel = conv.participants(0).video.channels(0);
                channel.stream.source.sink.container.set(document.getElementById('patientWindow'));
                channel.isStarted.set(true);
            }

            if (conversation) {
                var p = conversation.participants(0);
                var channel = p.video.channels(0);

                channel.stream.source.sink.container.set(document.getElementById("patientWindow")).then(function () {
                    p.video.channels(0).isStarted.set(true);
                });
            }
        });

        // sign in and start video
        client.signInManager.signIn(params).then(function () {
            $('#doctor-photo').show();
            $('#doctor-name').text('Dr. ' + client.personsAndGroupsManager.mePerson.displayName());
            $('#online-indicator').css({ 'background-color': '#5DD255' });

            joinConference();

            client.conversations.added(function (conversation) {

                var chatService, dfdChatAccept,
                    audioService, dfdAudioAccept,
                    videoService, dfdVideoAccept,
                    selfParticipant,
                    name, timerId;

                selfParticipant = conversation.selfParticipant;
                videoService = conversation.videoService;
                chatService = conversation.chatService;
                audioService = conversation.audioService;

            });

        }, function (error) {
            // if something goes wrong in either of the steps above,
            // display the error message
            //console.error(error);
            alert(error);
        });
    }

    function hideLoadingSpinner() {
        $('#loading-content').hide();
    }

    function ajaxrequest(verb, url, data, datatype) {
        return $.ajax({
            url: url,
            type: verb,
            dataType: datatype,
            data: data
        });
    }

    function GetAdhocMeeting() {
        var meetingurl;

        var getadhocmeetinginput = { Subject: 'adhocMeeting', Description: 'adhocMeeting', AccessLevel: '' };

        ajaxrequest('post', 'http://adhocmeeting.cloudapp.net/GetAdhocMeetingJob', getadhocmeetinginput, 'text').done(function (d) {
            var data = JSON.parse(d);
            var meetingUrl = data.JoinUrl;
            var discoverUri = data.DiscoverUri;
            meetingurl = data.OnlineMeetingUri;
        })
        .fail(
            function () {
                alert('Get adhoc meeting failed, please try again.');
            }
        )
        .always(
            function () {
                $(".modal").hide();
            });

        return meetingurl;
    }

    function joinConference() {
        var confUri = GetAdhocMeeting();

        conversation = client.conversationsManager.getConversationByUri(confUri);

        conversation.selfParticipant.video.state.changed(function (newState) {
            var selfChannel;
            if (newState == 'Connected') {

                var p = conversation.participants(0);
                var channel = p.video.channels(0);

                channel.stream.source.sink.container.set(document.getElementById("patientWindow")).then(function () {
                    p.video.channels(0).isStarted.set(true);
                });

                $('#loading-content').hide();
                $('#skypeBackgroundImage').hide();

                $('#patientWindow').show();
                $('#myVideo').show();

                if (p && p.displayName()) {
                    $('#patientname').html(p.displayName());
                }

                setTimeout(function () {
                    selfChannel = conversation.selfParticipant.video.channels(0);
                    selfChannel.stream.source.sink.container.set(document.getElementById("myVideo"));

                }, 2000);
            }
        });

        conversation.videoService.start();
    }

    function hangupClick() {
        client.signInManager.signOut()
            .then(function () {
            }, function (error) {
                // or a failure
                alert(error || 'Cannot sign out');
            });
    }

});

redpajama_set_name: RedPajamaGithub


text:
module BubbleWrap
  module MIDI
    module Ext
      # UniqueID of an external device/entity/endpoint attached to this one.
      # As of Mac OS X 10.3, Audio MIDI Setup maintains endpoint-to-external
      # endpoint connections (in 10.2, it connected devices to devices).
      # The property is non-existant or 0 if there is no connection.
      #
      # Beginning with CoreMIDI 1.3, this property may also be an array of
      # integers, to allow specifying that a driver object connects to
      # multiple external objects (via MIDI thru-ing or splitting).
      # This property may also exist for external devices/entities/endpoints,
      # in which case it signifies a MIDI Thru connection to another external
      # device/entity/endpoint (again, it is strongly recommended that it be
      # an endpoint).
      #
      # Available in iOS 4.2 and later.
      module ConnectionUniqueID

        def connection_unique_id
          uid_p = Pointer.new(:int)
          MIDI.status{MIDIObjectGetIntegerProperty(midi_id, KMIDIPropertyUniqueID, uid_p)}
          uid_p[0]
        end

        def connection_unique_id=(id)
          if id.is_a? Enumerable
            MIDI.status{MIDIObjectSetData(midi_id, KMIDIPropertyConnectionUniqueID, id.to_a)}
          else
            MIDI.status{MIDIObjectSetIntegerProperty(midi_id, KMIDIPropertyConnectionUniqueID, id)}
          end
          id
        end

      end
    end
  end
end


text:
import datetime
from django.contrib.auth.decorators import login_required
from django.http import *
from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext
from djime.statistics.forms import DateSelectionForm
from teams.models import Team
from djime.models import TimeSlice
import djime.statistics.flashcharts as flashcharts
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from exceptions import ValueError
from math import floor

@login_required()
def index(request):
    return render_to_response('statistics/index.html', {},
                              context_instance=RequestContext(request))

@login_required()
def display_user_week(request, user_id, year, week):
    if int(request.user.id) != int(user_id):
        return HttpResponseForbidden(_('Access denied'))
    return render_to_response('statistics/display_user_week.html', {'week': week, 'year': year, 'user_id': user_id},
                                      context_instance=RequestContext(request))

@login_required()
def display_user_month(request, user_id, year, month):
    if int(request.user.id) != int(user_id):
        return HttpResponseForbidden(_('Access denied'))
    return render_to_response('statistics/display_user_month.html', {'month' : month, 'year': year, 'user_id': user_id},
                                      context_instance=RequestContext(request))

@login_required()
def user_date_selection_form(request, user_id):
    if request.method not in ('POST', 'GET'):
        return HttpResponseNotAllowed('POST', 'GET')

    if request.method == 'GET':
        form = DateSelectionForm()
        return render_to_response('statistics/user_date_selection.html', {'user_id': user_id, 'form': form},
                                      context_instance=RequestContext(request))

    if request.method == 'POST':
        form = DateSelectionForm(request.POST)
        if form.is_valid():
            start = form.cleaned_data['start']
            end = form.cleaned_data['end']
            return HttpResponseRedirect('/statistics/user/%s/date/%s/%s/' % (user_id, start, end))
        else:
            return render_to_response('statistics/user_date_selection.html', {'user_id': user_id, 'form': form},
                                      context_instance=RequestContext(request))

@login_required()
def display_user_date_selection(request, user_id, start_date, end_date):
    if int(request.user.id) != int(user_id):
        return HttpResponseForbidden('Access denied')
    s_date = start_date.split('-')
    e_date = end_date.split('-')
    try:
        date_diff = datetime.date(int(e_date[0]), int(e_date[1]), int(e_date[2])) - datetime.date(int(s_date[0]), int(s_date[1]), int(s_date[2]))
        if date_diff < datetime.timedelta(days=60) and date_diff > datetime.timedelta(days=0):
            return render_to_response('statistics/display_user_date.html', {'user_id': user_id, 'start_date': start_date, 'end_date': end_date},
                                          context_instance=RequestContext(request))
        else:
            return HttpResponse(_('Invalid date, min 1 day and max 60 days'))
    except ValueError:
        return HttpResponse(_('Invalid date, must be yyyy-mm-dd'))

@login_required()
def display_team_week(request, team_id, year, week):
    team = get_object_or_404(Team, pk=int(team_id))
    members = team.members.all()
    members_id = []
    for member in members:
        members_id.append(member.id)
    if request.user.id not in members_id:
        return HttpResponseForbidden(_('Access denied'))

    return render_to_response('statistics/display_team_week.html', {'week': week, 'year': year, 'team_id': team_id, 'team': team},
                                      context_instance=RequestContext(request))

@login_required()
def display_team_month(request, team_id, year, month):
    team = get_object_or_404(Team, pk=int(team_id))
    members = team.members.all()
    members_id = []
    for member in members:
        members_id.append(member.id)
    if request.user.id not in members_id:
        return HttpResponseForbidden(_('Access denied'))

    return render_to_response('statistics/display_team_month.html', {'month' : month, 'year': year, 'team_id': team_id, 'team': team},
                                      context_instance=RequestContext(request))

@login_required()
def team_date_selection_form(request, team_id):
    if request.method not in ('POST', 'GET'):
        return HttpResponseNotAllowed('POST', 'GET')

    if request.method == 'GET':
        form = DateSelectionForm()
        return render_to_response('statistics/team_date_selection.html', {'team_id': team_id, 'form': form, 'team': team},
                                      context_instance=RequestContext(request))

    if request.method == 'POST':
        form = DateSelectionForm(request.POST)
        if form.is_valid():
            start = form.cleaned_data['start']
            end = form.cleaned_data['end']
            return HttpResponseRedirect('/statistics/team/%s/date/%s/%s/' % (team_id, start, end))
        else:
            return render_to_response('statistics/team_date_selection.html', {'team_id': team_id, 'form': form, 'team': team},
                                      context_instance=RequestContext(request))

@login_required()
def display_team_date_selection(request, team_id, start_date, end_date):
    team = get_object_or_404(Team, pk=int(team_id))
    members = team.members.all()
    members_id = []
    for member in members:
        members_id.append(member.id)
    if request.user.id not in members_id:
        return HttpResponseForbidden(_('Access denied'))

    s_date = start_date.split('-')
    e_date = end_date.split('-')
    try:
        date_diff = datetime.date(int(e_date[0]), int(e_date[1]), int(e_date[2])) - datetime.date(int(s_date[0]), int(s_date[1]), int(s_date[2]))
        if date_diff < datetime.timedelta(days=60) and date_diff > datetime.timedelta(days=0):
            return render_to_response('statistics/display_team_date.html', {'team_id': team_id, 'start_date': start_date, 'end_date': end_date, 'team': team, 'team': team},
                                      context_instance=RequestContext(request))
        else:
            return HttpResponse(_('Invalid date, min 1 day and max 60 days'))
    except ValueError:
        return HttpResponse(_('Invalid date, must be yyyy-mm-dd'))

@login_required()
def display_team_stat_week(request, team_id, week, year):
    team = get_object_or_404(Team, pk=int(team_id))
    members = team.members.all()
    members_id = []
    for member in members:
        members_id.append(member.id)
    if request.user.id not in members_id:
        return HttpResponseForbidden(_('Access denied'))

    return render_to_response('statistics/display_team_stat_week.html', {'week': week, 'year': year, 'team_id': team_id, 'team': team},
                                      context_instance=RequestContext(request))

@login_required()
def display_team_stat_month(request, team_id, month, year):
    team = get_object_or_404(Team, pk=int(team_id))
    members = team.members.all()
    members_id = []
    for member in members:
        members_id.append(member.id)
    if request.user.id not in members_id:
        return HttpResponseForbidden(_('Access denied'))

    return render_to_response('statistics/display_team_stat_month.html', {'month': month, 'year': year, 'team_id': team_id, 'team': team},
                                      context_instance=RequestContext(request))

@login_required()
def team_stat_date_selection_form(request, team_id):
    if request.method not in ('POST', 'GET'):
        return HttpResponseNotAllowed('POST', 'GET')

    if request.method == 'GET':
        form = DateSelectionForm()
        return render_to_response('statistics/team_stat_date_selection.html', {'team_id': team_id, 'form': form, 'team': team},
                                      context_instance=RequestContext(request))

    if request.method == 'POST':
        form = DateSelectionForm(request.POST)
        if form.is_valid():
            start = form.cleaned_data['start']
            end = form.cleaned_data['end']
            return HttpResponseRedirect('/statistics/team_stat/%s/date/%s/%s/' % (team_id, start, end))
        else:
            return render_to_response('statistics/team_stat_date_selection.html', {'team_id': team_id, 'form': form, 'team': team},
                                      context_instance=RequestContext(request))

@login_required()
def display_team_stat_date_selection(request, team_id, start_date, end_date):
    team = get_object_or_404(Team, pk=int(team_id))
    members = team.members.all()
    members_id = []
    for member in members:
        members_id.append(member.id)
    if request.user.id not in members_id:
        return HttpResponseForbidden(_('Access denied'))

    s_date = start_date.split('-')
    e_date = end_date.split('-')
    try:
        date_diff = datetime.date(int(e_date[0]), int(e_date[1]), int(e_date[2])) - datetime.date(int(s_date[0]), int(s_date[1]), int(s_date[2]))
        if date_diff < datetime.timedelta(days=60) and date_diff > datetime.timedelta(days=0):
            return render_to_response('statistics/display_team_stat_date.html', {'team_id': team_id, 'start_date': start_date, 'end_date': end_date, 'team': team},
                                      context_instance=RequestContext(request))
        else:
            return HttpResponse(_('Invalid date, min 1 day and max 60 days'))
    except ValueError:
        return HttpResponse(_('Invalid date, must be yyyy-mm-dd'))

def data_user_week(request, week, year, user_id):
    if request.method != 'GET':
         return HttpResponseNotAllowed('GET')

    week = int(week)
    year = int(year)
    return HttpResponse(flashcharts.user_week_json(request.user, week, year))

def data_user_month(request, month, year, user_id):
    if request.method != 'GET':
         return HttpResponseNotAllowed('GET')

    month = int(month)
    year = int(year)
    return HttpResponse(flashcharts.user_month_json(request.user, month, year))

def data_user_date(request, user_id, start_date, end_date):
    return HttpResponse(flashcharts.user_date_json(request.user, start_date, end_date))

def data_team_week(request, week, year, team_id):
    # this method is the same as user.
    if request.method != 'GET':
         return HttpResponseNotAllowed('GET')

    week = int(week)
    year = int(year)
    team = get_object_or_404(Team, pk=int(team_id))
    return HttpResponse(flashcharts.team_week_json(team, week, year))

def data_team_month(request, month, year, team_id):
    if request.method != 'GET':
         return HttpResponseNotAllowed('GET')

    month = int(month)
    year = int(year)
    team = get_object_or_404(Team, pk=int(team_id))
    return HttpResponse(flashcharts.team_month_json(team, month, year))

def data_team_date(request, team_id, start_date, end_date):
    team = get_object_or_404(Team, pk=int(team_id))
    return HttpResponse(flashcharts.team_date_json(team, start_date, end_date))

def data_team_stat_week(request, team_id, week, year):
    week = int(week)
    year = int(year)
    team = get_object_or_404(Team, pk=int(team_id))
    return HttpResponse(flashcharts.team_stat_week_json(team, week, year))

def data_team_stat_month(request, team_id, month, year):
    team = get_object_or_404(Team, pk=int(team_id))
    month = int(month)
    year = int(year)
    return HttpResponse(flashcharts.team_stat_month_json(team, month, year))

def data_team_stat_date(request, team_id, start_date, end_date):
    team = get_object_or_404(Team, pk=int(team_id))
    return HttpResponse(flashcharts.team_stat_date_json(team, start_date, end_date))

@login_required()
def billing_index(request):
    users = User.objects.all()
    return render_to_response('statistics/billing_index.html', {'users': users},
                            context_instance=RequestContext(request))

@login_required()
def user_billing(request, user_id):
    user = get_object_or_404(User, pk=user_id)
    if request.method == 'GET':
        return render_to_response('statistics/billing_time_page.html', {'sellected_user': user, 'form': DateSelectionForm()},
                            context_instance=RequestContext(request))
    elif request.method == 'POST':
        post = request.POST
        if request.POST.has_key('number-of-weeks'):
            date = request.POST['start-date']
            number_of_weeks = request.POST['number-of-weeks']
            if not re.match("[0-9]{4}[-]{1}[0-9]{2}[-]{1}[0-9]{2}$", request.POST['start-date']):
                request.user.message_set.create(message=_("Invalid date format, must be yyyy-mm-dd."))
                return render_to_response('statistics/billing_time_page.html', {'sellected_user': user, 'form': DateSelectionForm()},
                                          context_instance=RequestContext(request))
            return HttpResponseRedirect('/statistics/billing/%s/week/%s/%s/' % (user_id, date, number_of_weeks))
            raise
        elif request.POST.has_key('date'):
            form = DateSelectionForm(request.POST)
            if form.is_valid():
                start = form.cleaned_data['start']
                end = form.cleaned_data['end']
                return HttpResponseRedirect('/statistics/billing/%s/date/%s/%s/' % (user_id, start, end))
            else:
                return render_to_response('statistics/billing_time_page.html', {'sellected_user': user, 'form': form},
                                          context_instance=RequestContext(request))

@login_required()
def user_billing_weeks(request, user_id, date, number_of_weeks):
    user = get_object_or_404(User, pk=user_id)
    if number_of_weeks > 5:
        number_of_weeks = 4
    date_list = date.split('-')
    try:
        start_date = datetime.date(int(date_list[0]), int(date_list[1]), int(date_list[2]))
    except ValueError:
        return HttpResponse(_('Invalid date, must be yyyy-mm-dd'))
    end_date = start_date + datetime.timedelta(days=number_of_weeks*7)
    slice_set = TimeSlice.objects.filter(user=user, begin__range=(start_date, end_date))
    project_dict = {}
    for time_slice in slice_set:
        if time_slice.slip.project not in project_dict.keys():
            project_dict[time_slice.slip.project] = {}
            project_dict[time_slice.slip.project]['slips'] = {}
            project_dict[time_slice.slip.project]['slips'][time_slice.slip] = [time_slice.slip, time_slice.duration]
            project_dict[time_slice.slip.project]['duration'] = time_slice.duration
            project_dict[time_slice.slip.project]['project'] = time_slice.slip.project
        else:
            if time_slice.slip not in project_dict[time_slice.slip.project]['slips'].keys():
                project_dict[time_slice.slip.project]['slips'][time_slice.slip] = [time_slice.slip, time_slice.duration]
                project_dict[time_slice.slip.project]['duration'] += time_slice.duration
            else:
                project_dict[time_slice.slip.project]['slips'][time_slice.slip][1] += time_slice.duration
                project_dict[time_slice.slip.project]['duration'] += time_slice.duration

    for key in project_dict.keys():
        project_dict[key]['duration'] = '%02i:%02i' % (floor(project_dict[key]['duration'] / 3600), floor(project_dict[key]['duration'] % 3600 ) / 60)
        for key_slip in project_dict[key]['slips'].keys():
            project_dict[key]['slips'][key_slip][1] = '%02i:%02i' % (floor(project_dict[key]['slips'][key_slip][1] / 3600), floor(project_dict[key]['slips'][key_slip][1] % 3600 ) / 60)

    return render_to_response('statistics/billing_page.html', {'user': user, 'start_date': start_date, 'end_date': end_date, 'project_dict': project_dict},
                                context_instance=RequestContext(request))

def user_billing_date(request, user_id, start_date, end_date):
    user = get_object_or_404(User, pk=user_id)
    try:
        start_date = datetime.datetime.strptime(start_date, '%Y-%m-%d').date()
        end_date = datetime.datetime.strptime(end_date, '%Y-%m-%d').date()
    except ValueError:
        return HttpResponse('Invalid dateformat, must be yyyy-mm-dd')
    slice_set = TimeSlice.objects.filter(user=user, begin__range=(start_date, end_date))
    project_dict = {}
    for time_slice in slice_set:
        if time_slice.slip.project not in project_dict.keys():
            project_dict[time_slice.slip.project] = {}
            project_dict[time_slice.slip.project]['slips'] = {}
            project_dict[time_slice.slip.project]['slips'][time_slice.slip] = [time_slice.slip, time_slice.duration]
            project_dict[time_slice.slip.project]['duration'] = time_slice.duration
            project_dict[time_slice.slip.project]['project'] = time_slice.slip.project
        else:
            if time_slice.slip not in project_dict[time_slice.slip.project]['slips'].keys():
                project_dict[time_slice.slip.project]['slips'][time_slice.slip] = [time_slice.slip, time_slice.duration]
                project_dict[time_slice.slip.project]['duration'] += time_slice.duration
            else:
                project_dict[time_slice.slip.project]['slips'][time_slice.slip][1] += time_slice.duration
                project_dict[time_slice.slip.project]['duration'] += time_slice.duration

    for key in project_dict.keys():
        project_dict[key]['duration'] = '%02i:%02i' % (floor(project_dict[key]['duration'] / 3600), floor(project_dict[key]['duration'] % 3600 ) / 60)
        for key_slip in project_dict[key]['slips'].keys():
            project_dict[key]['slips'][key_slip][1] = '%02i:%02i' % (floor(project_dict[key]['slips'][key_slip][1] / 3600), floor(project_dict[key]['slips'][key_slip][1] % 3600 ) / 60)

    return render_to_response('statistics/billing_page.html', {'user': user, 'start_date': start_date, 'end_date': end_date, 'project_dict': project_dict},
                                context_instance=RequestContext(request))


text:
html, body, #container, .fill {
    position:absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.viewer, #map {
    position:absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.react-draggable .panel-heading {
    cursor: move;
}

.btn-xs {
    font-size: 15px;
}
.ol-attribution li:first-child{
    display:none;
    visibility: hidden;
}
.leaflet-control-attribution a:first-child{
    display:none;
    visibility: hidden;
}
.Sortable {
  position: relative;
  display: block;
  overflow: visible;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.SortableItem {
  cursor: -webkit-grab; cursor:-moz-grab; cursor: grab;
}

.SortableItem.is-dragging {
  cursor: move;
  position: absolute;
  z-index: 1688;
  background-color: rgba(218, 218, 218, 0.8);;
  border: 1px dashed #8E8E8E;
  border-radius: 5px;
  box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.28);
}

.SortableItem.is-placeholder {
  border: 1px dashed #8E8E8E;
  border-radius: 5px;
}

.SortableItem.is-undraggable {
  cursor: not-allowed;
}

.map-logo{
	position:absolute;
	width:90px;
	height:27px;
	bottom:5px;
	left:5px;
	background-image:url(../img/mapstore2_logo.png);
	background-repeat:no-repeat;
	background-size:contain;
    cursor: pointer;
}

.map-logo > img{
    width: 90px;
    height: 27px;
    opacity: 0;
}

.with-love {
    position:absolute;
	width:90px;
	height:27px;
	bottom:5px;
	margin-left:auto;
	margin-right:auto;
	left:0;
	right:0;
    background-image:url(../img/made-in-italy-logo.png);
	background-size:contain;
}

#mapstore-scalebox-container {
    z-index: 10;
    bottom: -16px !important;
    right: 55px;
    left: auto !important;
    position: absolute;
    margin: 8px;
    width: 148px;
}

#mapstore-scalebox {
    width: 148px;
}

.leafletbottom.leafletright, .leaflet-control-minimap{
    bottom: 47px !important;
    right: 49px !important;
}

.leaflet-control-scale {
    position: absolute;
    bottom: -1px;
    right: 47px;
    z-index: 1000;
}
.leaflet-control-attribution {
    width: 165px;
    position: absolute;
    right: 0;
    bottom: 0;
}

.leaflet-bottom.leaflet-right {
    margin-bottom: 0 !important;
}

.ol-custom-overviewmap, .ol-custom-overviewmap.ol-uncollapsible {
    bottom: 55px !important;
    left: auto !important;
    right: 57px !important;
    top: auto !important;
}

.ol-scale-line.ol-unselectable {
    right: 58px;
    left: auto;
    bottom: 3px;
}

#navigationBar .mapToolbar {
    top: auto !important;
    bottom: 5px;
    right: 0 !important;
}

#navigationBar .toolbar-panel {
    bottom: 80px !important;
}

#identifyBar .mapToolbar {
    top: auto !important;
    bottom: 5px;
    right: 212px !important;
}

.panel-close {
    float: right;
    width: 10px;
    cursor: pointer;
}

#mapstore-mousepositionsettings .form-group {
    margin-bottom: 0 !important;
}

#mapstore-mousepositionsettings select, #mapstore-mousepositionsettings button {
    width: 50% !important;
    float: right;
    height: 35px;
}

#mapstore-mousepositionsettings label {
    width: 100% !important;
}

#mapstore-globalspinner  {
    margin: 0 !important;
    width: 40px !important;
    position:static !important;
    border-radius: 0 !important;
}

#mapstore-mouseposition .label-info {
    white-space: normal !important;
    color: black !important;
    font-size: 110%;
    padding: 0 !important;
}

#mapstore-mouseposition {
    bottom: 5px !important;
    right: 264px !important;
    top: auto !important;
    margin: 0 !important;
    text-shadow: none !important;
    background-color: white !important;
    width: 160px !important;
    height: 46px !important;
    padding-left: 5px;
    padding-top: 2px;
}

#mapstore-mouseposition h5 {
    margin-top: 5px !important;
}

.mouseposition-separator {
    display: block;
}

#drawer-menu-button {
     position: absolute;
}

#mapstore-drawermenu > div > div:nth-child(2) {
    display: none;
}

.navButtons {
    float: right;
}

.nav-content #background-switcher .thumbnail {
    border-radius: 0 !important;
    margin-bottom: 40px;
    width: 220px !important;
}
.nav-content #background-switcher .thumbnail img {
    border-radius: 0 !important;
    height: 90px;
    width: 220px !important;
}

.nav-content #background-switcher .thumbnail .caption {
    font-size: 14px !important;
    text-align: left !important;
    top: -20px !important;
    position: absolute !important;
}

.nav-content #background-switcher {
    margin-top: 10px;
}

#mapstore-drawermenu .nav-menu {
    background: rgba(255,255,255,1);
}

#mapstore-drawermenu .panel {
    border: none !important;
    box-shadow: none !important;
}

.swipe-header-left-button {
    float: none !important;
    right: 45px;
    top: 4px;
    position: absolute;
}

.swipe-header-right-button {
    float: none !important;
    position: absolute;
    top: 4px;
    right: 5px;
}

#mapstore-identify-revgeocoder {
    min-height: 40px;
    margin-bottom: 10px;
    border-bottom: solid 1px #BBB;
}

#mapstore-getfeatureinfo {
    max-width: 100%;
}

@media (min-width: 500px) {
    #mapstore-getfeatureinfo {
        min-width: 500px !important;
    }
}

#mapstore-getfeatureinfo .swipeable-view .panel-heading {
    background-color: white;
    border: none;
    height: 60px;
    padding: 0;
}

#mapstore-getfeatureinfo .swipeable-view .panel {
    border: none;
}

#mapstore-getfeatureinfo .modal-body .panel-body {
    padding: 0;
}

#mapstore-getfeatureinfo .swipeable-view .panel-heading .swipe-header-left-button {
    right: 55px;
    top: 0;
}

#mapstore-getfeatureinfo .swipeable-view .panel-heading .swipe-header-right-button {
    top: 0;
}

#mapstore-getfeatureinfo .swipeable-view .panel-title {
    font-weight: bold;
}

#mapstore-settings .btn-group {
    width: auto;
    float: right;
}

#mapstore-settings .modal-body #mapstore-mousepositionsettings button {
    float: none;
    margin-left: 50%;
}

#mapstore-settings .modal-body #mapstore-mousepositionsettings select {
    float: none;
    margin-left: 50%;
}

#mapstore-settings .modal-body .form-group {
    margin-top: 15px;
    border-top: solid 1px #EEE;
    padding-top: 10px;
}

.modal-header button.close {
    margin-top: -7px;
    opacity: 1;
}

.modal-header button.close:hover {
    opacity: 0.5;
    color: white;
}

.modal-header button.close:focus {
    opacity: 0.5;
    color: white;
}
@media (min-width: 992px) {
    #mapstore-print-panel {
        width: 825px !important;
    }
}

@media (max-width: 991px) {
    #mapstore-print-panel {
        width: 500px !important;
    }
}

.panel-close:after {
    content: 'x';
}

#mapstore-print-panel .modal-body .print-mappreview-refresh {
    top: -96px;
}

#mapstore-print-panel .print-submit {
    float: right;
}

#mapstore-print-panel input[type=radio] {
    margin-left: 20px;
}

#mapstore-print-panel .print-map-preview {
    margin-bottom: 15px;
}

#mapstore-print-panel .panel-default {
    border: none;
}

#mapstore-print-panel .panel-heading .panel-title {
    font-weight: bold;
}

#mapstore-print-panel .panel-heading {
    padding-left: 0;
    background-color: transparent;
}

#mapstore-print-panel .panel-body {
    padding: 10px;
    border: solid 1px #078AA3;
}

#mapstore-print-panel .form-control {
    padding: 0 10px;
    height: 25px;
}

#mapstore-print-panel .print-download {
    margin-right: 10px;
}

#mapstore-print-panel .print-download a {
    color: white;
}

#mapstore-print-panel .print-legend-options .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

#mapstore-snapshot-panel {
    position: absolute;
    right: 200px;
    min-width: 725px;
}

#mapstore-catalog-panel {
    width: auto;
    position: absolute;
    right: 200px;
    margin-top: 100px;
    display: inline-block;
}

#mapstore-catalog-panel .record-item {
    height: 150px;
}

#mapstore-about {
    position: fixed;
    top: 0;
    left: calc(50% - 500px);
    width: 500px;
}

#mapstore-login-panel {
    width: 300px;
}
#mapstore-login-panel button {
    float: right !important;
}

.modal {
    overflow-y: auto !important;
}

.draggable-header {
    cursor: move;
}

.ms2-loading {
    background-color: #078aa3 !important;
    border-bottom: 2px solid #5C9FB4 !important;
}

.ms2-loading .circle-wrapper {
    width: 30px;
    height: 30px;
    margin-left: 10px !important;
    margin-top: 10px !important;
}

.ms2-loading .circle-wrapper .circle:before {
    background-color: white !important;
}

.modal-body {
    background-color: white;
}

#mapstore-shapefile-upload {
    width: 300px;
}

#mapstore-shapefile-upload button {
    float: right;
}

#mapstore-layer-settings {
    min-width: 400px;
}

#mapstore-layer-settings .noUi-background {
    background:#CCC;
}

#mapstore-layer-settings .noUi-horizontal {
    height: 2px;
	width: 260px;
	margin:auto;
}
#mapstore-layer-settings .noUi-target {
    position: relative;
    direction: ltr;
}

#mapstore-layer-settings .noUi-base {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

#mapstore-layer-settings .noUi-horizontal .noUi-handle {
    width: 23px;
    height: 23px;
    top: -10px;
}

#mapstore-layer-settings .noUi-handle {
    background: #078AA3;
    cursor: default;
	border-radius:50px;
}

#mapstore-layer-settings .noUi-handle {
    position: relative;
    z-index: 1;
}
#mapstore-layer-settings .noUi-target, .noUi-target * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -ms-touch-action: none;
    touch-action: none;
    -ms-user-select: none;
    -moz-user-select: none;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

#mapstore-layer-settings .noUi-target {
    position: relative;
    direction: ltr;
}

#mapstore-layer-settings .noUi-target {
    width: 94%;
    margin-bottom: 10px;
}

#mapstore-layer-settings .noUi-handle:before, #mapstore-layer-settings .noUi-handle:after {
    background: none;
}

.btn .badge {
    position: absolute;
    top: -10px;
    left: -10px;
}

.themed .btn .badge {
    top: -35px;
    left: -50px;
}

#helpbadge-scaleBox {
    left: 0 !important;
    background-color: #078aa3;
    color: #ffffff;
}

#mapstore-navbar #helpbadge-search-help {
    position: absolute;
    left: -10px;
    bottom: -8px;
    z-index: 1;
    background-color: #078aa3;
    color: #ffffff;
}

.badge {
    cursor: pointer;
}

#navigationBar #locate-btn {
    position: static;
}


text:
/*
 * This file is auto-generated.  DO NOT MODIFY.
 * Original file: /Users/kishonti/work/_ronen/android-chromium-view/eyes-free/src/com/googlecode/eyesfree/braille/display/IBrailleServiceCallback.aidl
 */
package com.googlecode.eyesfree.braille.display;
/**
 * Callback interface that a braille display client can expose to
 * get information about various braille display events.
 */
public interface IBrailleServiceCallback extends android.os.IInterface
{
/** Local-side IPC implementation stub class. */
public static abstract class Stub extends android.os.Binder implements com.googlecode.eyesfree.braille.display.IBrailleServiceCallback
{
private static final java.lang.String DESCRIPTOR = "com.googlecode.eyesfree.braille.display.IBrailleServiceCallback";
/** Construct the stub at attach it to the interface. */
public Stub()
{
this.attachInterface(this, DESCRIPTOR);
}
/**
 * Cast an IBinder object into an com.googlecode.eyesfree.braille.display.IBrailleServiceCallback interface,
 * generating a proxy if needed.
 */
public static com.googlecode.eyesfree.braille.display.IBrailleServiceCallback asInterface(android.os.IBinder obj)
{
if ((obj==null)) {
return null;
}
android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (((iin!=null)&&(iin instanceof com.googlecode.eyesfree.braille.display.IBrailleServiceCallback))) {
return ((com.googlecode.eyesfree.braille.display.IBrailleServiceCallback)iin);
}
return new com.googlecode.eyesfree.braille.display.IBrailleServiceCallback.Stub.Proxy(obj);
}
@Override public android.os.IBinder asBinder()
{
return this;
}
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
switch (code)
{
case INTERFACE_TRANSACTION:
{
reply.writeString(DESCRIPTOR);
return true;
}
case TRANSACTION_onDisplayConnected:
{
data.enforceInterface(DESCRIPTOR);
com.googlecode.eyesfree.braille.display.BrailleDisplayProperties _arg0;
if ((0!=data.readInt())) {
_arg0 = com.googlecode.eyesfree.braille.display.BrailleDisplayProperties.CREATOR.createFromParcel(data);
}
else {
_arg0 = null;
}
this.onDisplayConnected(_arg0);
reply.writeNoException();
return true;
}
case TRANSACTION_onDisplayDisconnected:
{
data.enforceInterface(DESCRIPTOR);
this.onDisplayDisconnected();
reply.writeNoException();
return true;
}
case TRANSACTION_onInput:
{
data.enforceInterface(DESCRIPTOR);
com.googlecode.eyesfree.braille.display.BrailleInputEvent _arg0;
if ((0!=data.readInt())) {
_arg0 = com.googlecode.eyesfree.braille.display.BrailleInputEvent.CREATOR.createFromParcel(data);
}
else {
_arg0 = null;
}
this.onInput(_arg0);
reply.writeNoException();
return true;
}
}
return super.onTransact(code, data, reply, flags);
}
private static class Proxy implements com.googlecode.eyesfree.braille.display.IBrailleServiceCallback
{
private android.os.IBinder mRemote;
Proxy(android.os.IBinder remote)
{
mRemote = remote;
}
@Override public android.os.IBinder asBinder()
{
return mRemote;
}
public java.lang.String getInterfaceDescriptor()
{
return DESCRIPTOR;
}
@Override public void onDisplayConnected(com.googlecode.eyesfree.braille.display.BrailleDisplayProperties displayProperties) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain();
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
if ((displayProperties!=null)) {
_data.writeInt(1);
displayProperties.writeToParcel(_data, 0);
}
else {
_data.writeInt(0);
}
mRemote.transact(Stub.TRANSACTION_onDisplayConnected, _data, _reply, 0);
_reply.readException();
}
finally {
_reply.recycle();
_data.recycle();
}
}
@Override public void onDisplayDisconnected() throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain();
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
mRemote.transact(Stub.TRANSACTION_onDisplayDisconnected, _data, _reply, 0);
_reply.readException();
}
finally {
_reply.recycle();
_data.recycle();
}
}
@Override public void onInput(com.googlecode.eyesfree.braille.display.BrailleInputEvent inputEvent) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain();
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
if ((inputEvent!=null)) {
_data.writeInt(1);
inputEvent.writeToParcel(_data, 0);
}
else {
_data.writeInt(0);
}
mRemote.transact(Stub.TRANSACTION_onInput, _data, _reply, 0);
_reply.readException();
}
finally {
_reply.recycle();
_data.recycle();
}
}
}
static final int TRANSACTION_onDisplayConnected = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
static final int TRANSACTION_onDisplayDisconnected = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);
static final int TRANSACTION_onInput = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);
}
public void onDisplayConnected(com.googlecode.eyesfree.braille.display.BrailleDisplayProperties displayProperties) throws android.os.RemoteException;
public void onDisplayDisconnected() throws android.os.RemoteException;
public void onInput(com.googlecode.eyesfree.braille.display.BrailleInputEvent inputEvent) throws android.os.RemoteException;
}


text:
(function (init) {
    'use strict';
    // The global jQuery object is passed as a parameter
    init(window.jQuery, window, document);

}(function ($, window, document) {
    'use strict';

    //plugin name
    var appbar = "appbar",
        //get instance
        self = null,
        //defaults
        defaults = {
            "gd-is-extended": "",
            "gd-is-special": ""
        };

    //main function
    function AppBar($element, options) {
        self = this;
        this.element = $element;
        this._defaults = defaults;
        this.options = $.extend({}, defaults, options);

        //init
        self.init($element);
    }

    // Get Nav links
    AppBar.prototype.getNav = function ($element, $gdelem) {
        // console.log($element.parent())
        if ($gdelem.length > 0) {
            var $parent = $element.parent();
            $element.detach();
            for (var a = 0; a < $gdelem.length; a++) {
                var attributes = $element[0].attributes,
                    i = attributes.length;
                while (i--) {
                    $element[0].removeAttributeNode(attributes[i]);
                }
                self.getAttrs($element, $gdelem.eq(a))
                var className = $element[0].className;
                if (className !== ''){
                    $element[0].className = ('tab ' + className);
                }else {
                    $element[0].className = 'tab';
                }
                var href = $element.attr('href'),
                    $anchor = $element.find('>a');
                $element.removeAttr('href');
                $anchor.attr('href', href);
                self.getHtml($anchor, $gdelem.eq(a));
                $element.clone().appendTo($parent);
            }
        }
        //console.log($element.closest('nav').find('> ul > li').not('.app-logo'));
    }

    // Get html
    AppBar.prototype.getHtml = function ($element, $gdelem) {
            if ($gdelem.length > 0) {
                $element.html($gdelem.html());
            }
        }
        // Get attributes
    AppBar.prototype.getAttrs = function ($element, $gdelem) {
        if ($gdelem.length > 0) {
            var attributes = $gdelem[0].attributes,
                aLength = attributes.length;
            for (var a = 0; a < aLength; a++) {
                var key = attributes[a].name.toLowerCase(),
                    value = attributes[a].value;
                $element.attr(key, value);
            }
        }
    }

    // Construct
    AppBar.prototype.construct = function ($element, $gdelem) {
        var $elAppBar = $element.find('#appbar'),
            $elAppTitle = $element.find('h1.app-title'),
            $gdAppTitle = $gdelem.find('app-title'),
            $elAppViewTitle = $element.find('h2.app-view-title'),
            $gdAppViewTitle = $gdelem.find('app-view-title'),
            $elAppNav = $element.find('nav'),
            $gdAppNav = $gdelem.find('app-nav'),
            $elNavLink = $element.find('nav > ul > li').not('.app-logo'),
            $gdNavLink = $gdelem.find('app-link');

        // app bar
        self.getAttrs($elAppBar, $gdelem);
        // app title
        self.getHtml($elAppTitle, $gdAppTitle);
        self.getAttrs($elAppTitle, $gdAppTitle);
        // app view title
        self.getHtml($elAppViewTitle, $gdAppViewTitle);
        self.getAttrs($elAppViewTitle, $gdAppViewTitle);
        // app nav
        self.getAttrs($elAppNav, $gdAppNav);
        self.getNav($elNavLink, $gdNavLink);
    }

    // Template
    AppBar.prototype.template = function ($element, $gdelem) {
        $element.html(
            '
' +
                '

' +
                '
' +
                    '' +
                        '
Main Navigation
' +
                        '
' +
                            '

' +
                            '' +
                            '

' +
                        '
' +
                    '' +
                    '

' +
                '
' +
                '
' +
                    '

' +
                '
' +
            '
'
        )
        self.construct($element, $gdelem);
    }

    // Init
    AppBar.prototype.init = function ($element, $gdelem) {
        var $gdelem = $element.clone();
        self.template($element, $gdelem);
    };

    //create the AppBar instance
    var gdAppbarProto = Object.create(HTMLElement.prototype);
    gdAppbarProto.attachedCallback = function () {
        var $element = $(this),
            options = {},
            attributes = this.attributes,
            aLength = attributes.length;
        for (var a = 0; a < aLength; a++) {
            options[attributes[a].name.toLowerCase()] = attributes[a].value;
        }
        new AppBar($element, options);
        console.log("appbar attached");
    };
    document.registerElement("gd-appbar", {
        prototype: gdAppbarProto
    });
}));


text:
package com.cronutils.validation;

import com.cronutils.model.CronType;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = CronValidator.class)
@Inherited
@Documented
public @interface Cron {

    String message() default "UNUSED";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

    CronType type();

}


text:
/*
 * Do not modify this file. This file is generated from the ecs-2014-11-13.normal.json service model.
 */
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;

using Amazon.Runtime;
using Amazon.Runtime.Internal;

namespace Amazon.ECS.Model
{
    ///
    /// An Amazon EC2 instance that is running the Amazon ECS agent and has been registered
    /// with a cluster.
    ///
    public partial class ContainerInstance
    {
        private bool? _agentConnected;
        private AgentUpdateStatus _agentUpdateStatus;
        private string _containerInstanceArn;
        private string _ec2InstanceId;
        private int? _pendingTasksCount;
        private List<Resource> _registeredResources = new List<Resource>();
        private List<Resource> _remainingResources = new List<Resource>();
        private int? _runningTasksCount;
        private string _status;
        private VersionInfo _versionInfo;

        ///
        /// Gets and sets the property AgentConnected.
        /// <para>
        /// This parameter returns true if the agent is actually connected to Amazon
        /// ECS. Registered instances with an agent that may be unhealthy or stopped will return
        /// false, and instances without a connected agent cannot accept placement
        /// request.
        /// </para>
        ///
        public bool AgentConnected
        {
            get { return this._agentConnected.GetValueOrDefault(); }
            set { this._agentConnected = value; }
        }

        // Check to see if AgentConnected property is set
        internal bool IsSetAgentConnected()
        {
            return this._agentConnected.HasValue;
        }

        ///
        /// Gets and sets the property AgentUpdateStatus.
        /// <para>
        /// The status of the most recent agent update. If an update has never been requested,
        /// this value is NULL.
        /// </para>
        ///
        public AgentUpdateStatus AgentUpdateStatus
        {
            get { return this._agentUpdateStatus; }
            set { this._agentUpdateStatus = value; }
        }

        // Check to see if AgentUpdateStatus property is set
        internal bool IsSetAgentUpdateStatus()
        {
            return this._agentUpdateStatus != null;
        }

        ///
        /// Gets and sets the property ContainerInstanceArn.
        /// <para>
        /// The Amazon Resource Name (ARN) of the container instance. The ARN contains the arn:aws:ecs
        /// namespace, followed by the region of the container instance, the AWS account ID of
        /// the container instance owner, the container-instance namespace, and then
        /// the container instance UUID. For example, arn:aws:ecs:region:aws_account_id:container-instance/container_instance_UUID.
        /// </para>
        ///
        public string ContainerInstanceArn
        {
            get { return this._containerInstanceArn; }
            set { this._containerInstanceArn = value; }
        }

        // Check to see if ContainerInstanceArn property is set
        internal bool IsSetContainerInstanceArn()
        {
            return this._containerInstanceArn != null;
        }

        ///
        /// Gets and sets the property Ec2InstanceId.
        /// <para>
        /// The Amazon EC2 instance ID of the container instance.
        /// </para>
        ///
        public string Ec2InstanceId
        {
            get { return this._ec2InstanceId; }
            set { this._ec2InstanceId = value; }
        }

        // Check to see if Ec2InstanceId property is set
        internal bool IsSetEc2InstanceId()
        {
            return this._ec2InstanceId != null;
        }

        ///
        /// Gets and sets the property PendingTasksCount.
        /// <para>
        /// The number of tasks on the container instance that are in the PENDING
        /// status.
        /// </para>
        ///
        public int PendingTasksCount
        {
            get { return this._pendingTasksCount.GetValueOrDefault(); }
            set { this._pendingTasksCount = value; }
        }

        // Check to see if PendingTasksCount property is set
        internal bool IsSetPendingTasksCount()
        {
            return this._pendingTasksCount.HasValue;
        }

        ///
        /// Gets and sets the property RegisteredResources.
        /// <para>
        /// The registered resources on the container instance that are in use by current tasks.
        /// </para>
        ///
        public List<Resource> RegisteredResources
        {
            get { return this._registeredResources; }
            set { this._registeredResources = value; }
        }

        // Check to see if RegisteredResources property is set
        internal bool IsSetRegisteredResources()
        {
            return this._registeredResources != null && this._registeredResources.Count > 0;
        }

        ///
        /// Gets and sets the property RemainingResources.
        /// <para>
        /// The remaining resources of the container instance that are available for new tasks.
        /// </para>
        ///
        public List<Resource> RemainingResources
        {
            get { return this._remainingResources; }
            set { this._remainingResources = value; }
        }

        // Check to see if RemainingResources property is set
        internal bool IsSetRemainingResources()
        {
            return this._remainingResources != null && this._remainingResources.Count > 0;
        }

        ///
        /// Gets and sets the property RunningTasksCount.
        /// <para>
        /// The number of tasks on the container instance that are in the RUNNING
        /// status.
        /// </para>
        ///
        public int RunningTasksCount
        {
            get { return this._runningTasksCount.GetValueOrDefault(); }
            set { this._runningTasksCount = value; }
        }

        // Check to see if RunningTasksCount property is set
        internal bool IsSetRunningTasksCount()
        {
            return this._runningTasksCount.HasValue;
        }

        ///
        /// Gets and sets the property Status.
        /// <para>
        /// The status of the container instance. The valid values are ACTIVE or
        /// INACTIVE. ACTIVE indicates that the container instance can
        /// accept tasks.
        /// </para>
        ///
        public string Status
        {
            get { return this._status; }
            set { this._status = value; }
        }

        // Check to see if Status property is set
        internal bool IsSetStatus()
        {
            return this._status != null;
        }

        ///
        /// Gets and sets the property VersionInfo.
        /// <para>
        /// The version information for the Amazon ECS container agent and Docker daemon running
        /// on the container instance.
        /// </para>
        ///
        public VersionInfo VersionInfo
        {
            get { return this._versionInfo; }
            set { this._versionInfo = value; }
        }

        // Check to see if VersionInfo property is set
        internal bool IsSetVersionInfo()
        {
            return this._versionInfo != null;
        }

    }
}


text:
import sys
import clr
from System.IO import Path, Directory, FileInfo

dir = Path.Combine(sys.prefix, 'DLLs')
if Directory.Exists(dir):
    sys.path.append(dir)
    files = Directory.GetFiles(dir)
    for file in files:
        if file.lower().endswith('.dll'):
            try:
                clr.AddReference(FileInfo(file).Name)
            except:
                pass

import sys
from System.IO import Directory, Path

parent = Path.Combine(sys.prefix, '..')
lib = Path.Combine(parent, 'Lib')
if Directory.Exists(lib):
    sys.path.append(lib)

import fepy
fepy.install()


text:
  Le Port est
       un village
       localisé dans le département de l'Ariège en Midi-Pyrénées. On dénombrait 198 habitants en 2008.

À proximité de Le Port sont positionnées géographiquement les villes de
Saint-Lizier située à 11 km, 1 477 habitants,
Boussenac située à 4 km, 187 habitants,
Massat située à 3 km, 707 habitants,
Aleu située à 9 km, 141 habitants,
Aulus-les-Bains localisée à 9 km, 203 habitants,
Ercé située à 7 km, 529 habitants,
 entre autres. De plus, Le Port est située à seulement 21 km de Foix.

La ville propose quelques  équipements sportifs, elle dispose, entre autres, de un domaine skiable et une boucle de randonnée.

Le nombre de logements, à Le Port, se décomposait en 2011 en neuf appartements et 440 maisons soit
 un marché plutôt équilibré.

Si vous envisagez de emmenager à Le Port, vous pourrez aisément trouver une maison à vendre.


text:
namespace look.communication.Model
{
    using System.ServiceModel;

    public class SharingEndpoint
    {
        public string Name { get; set; }
        public EndpointAddress Address { get; set; }

        public SharingEndpoint(string name, EndpointAddress address)
        {
            this.Name = name;
            this.Address = address;
        }
    }
}


text:
<os-head-bar [nav]="false">

{{ 'Import participants' | translate }}

        <button *ngIf="hasFile && newCount" mat-button (click)="doImport()">
            {{ 'Import' | translate }}
        </button>

</os-head-bar>
<mat-card class="os-form-card import-table spacer-bottom-60">
    <mat-tab-group (selectedTabChange)="onTabChange()">

        <mat-tab label="{{ 'Text import' | translate }}">

                    {{ 'Copy and paste your participant names in this textbox.' | translate }}
                    {{ 'Keep each person in a single line.' | translate }}

                    {{ 'Comma separated names will be read as "Surname, given name(s)".' | translate }}

                <mat-form-field>
                    <textarea
                        matInput
                        osAutofocus
                        formControlName="inputtext"
                        placeholder="{{ 'Insert participants here' | translate }}"
                        cdkTextareaAutosize
                        cdkAutosizeMinRows="3"
                        cdkAutosizeMaxRows="10"
                    ></textarea>
                </mat-form-field>

                <button mat-button color="accent" (click)="parseTextArea()">
                    {{ 'Preview' | translate }}
                </button>

        </mat-tab>

        <mat-tab label="{{ 'CSV import' | translate }}">

                {{
                    'Required comma or semicolon separated values with these column header names in the first row:'
                        | translate
                }}

                    {{ entry | translate }},

                    {{
                        'One of given name, surname and username has to be filled in. All other fields are optional and may be empty.'
                            | translate
                    }}

                    {{
                        'Additional columns after the required ones may be present and will not affect the import.'
                            | translate
                    }}

            <button mat-button color="accent" (click)="downloadCsvExample()">
                {{ 'Download CSV example file' | translate }}
            </button>

                <mat-form-field>
                    <mat-label>{{ 'Encoding of the file' | translate }}</mat-label>
                    <mat-select
                        class="selection"
                        (selectionChange)="selectEncoding($event)"
                        [value]="encodings[0].value"
                    >
                        <mat-option *ngFor="let option of encodings" [value]="option.value">
                            {{ option.label | translate }}
                        </mat-option>
                    </mat-select>
                </mat-form-field>
                <mat-form-field>
                    <mat-label>{{ 'Column separator' | translate }}</mat-label>
                    <mat-select class="selection" (selectionChange)="selectColSep($event)" value="">
                        <mat-option *ngFor="let option of columnSeparators" [value]="option.value">
                            {{ option.label | translate }}
                        </mat-option>
                    </mat-select>
                </mat-form-field>
                <mat-form-field>
                    <mat-label>{{ 'Text separator' | translate }}</mat-label>
                    <mat-select class="selection" (selectionChange)="selectTextSep($event)" value='"'>
                        <mat-option *ngFor="let option of textSeparators" [value]="option.value">
                            {{ option.label | translate }}
                        </mat-option>
                    </mat-select>
                </mat-form-field>

                    <input
                        id="user-import-file-input"
                        type="file"
                        class="hidden-input"
                        accept="text"
                        #fileInput
                        (change)="onSelectFile($event)"
                    />
                    <button
                        mat-button
                        color="accent"
                        onclick="document.getElementById('user-import-file-input').click()"
                    >
                        {{ 'Select file' | translate }}
                    </button>

        </mat-tab>
    </mat-tab-group>
</mat-card>

<mat-card *ngIf="hasFile" class="os-form-card spacer-bottom-60">

{{ 'Preview' | translate }}

            <mat-icon inline>playlist_add</mat-icon>
             {{ newCount }}  {{ 'Participant(s) will be imported.' | translate }}

            <mat-icon inline>warning</mat-icon>
             {{ nonImportableCount }}  {{ 'entries will be ommitted.' | translate }}

            <mat-icon inline>done</mat-icon>
             {{ doneCount }}  {{ 'Participants have been imported.' | translate }}

        {{ 'After verifiy the preview click on "import" please (see top right).' | translate }}

    <mat-select *ngIf="nonImportableCount" class="filter-imports" [(value)]="shown" (selectionChange)="setFilter()">
        <mat-option value="all">{{ 'Show all' | translate }}</mat-option>
        <mat-option value="error">{{ 'Show errors only' | translate }}</mat-option>
        <mat-option value="noerror">{{ 'Show correct entries only' | translate }}</mat-option>
    </mat-select>

        <pbl-ngrid
            class="import-preview-table"
            vScrollFixed="50"
            [showHeader]="true"
            [dataSource]="vScrollDataSource"
            [columns]="columnSet"
        >

                <mat-checkbox disabled [checked]="value"></mat-checkbox>

                    <mat-icon
                        class="red-warning-text"
                        matTooltip="{{ entry.errors.length }} {{ 'errors' | translate }}"
                    >
                        {{ getActionIcon(entry) }}
                    </mat-icon>
                    <mat-icon
                        color="warn"
                        *ngIf="hasError(entry, 'ParsingErrors')"
                        matTooltip="{{ getVerboseError('ParsingErrors') | translate }}"
                    >
                        warning
                    </mat-icon>

                    <mat-icon matTooltip="{{ 'Participant will be imported' | translate }}">
                        {{ getActionIcon(entry) }}
                    </mat-icon>

                    <mat-icon matTooltip="{{ 'Participant has been imported' | translate }}">
                        {{ getActionIcon(entry) }}
                    </mat-icon>

                    {{ group.name | translate }}
                     <mat-icon class="new-icon" color="accent">add</mat-icon>
                    ,

                {{ gender | translate }}

        </pbl-ngrid>

</mat-card>


text:
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Person=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var Person = (function () {
    function Person(firstName, lastName) {
        this.firstName = firstName;
        this.lastName = lastName;
        this.fullName = firstName + " " + lastName;
    }
    return Person;
})();

module.exports = Person;

},{}]},{},[1])(1)
});


text:
/* Generated file, do not edit */

#ifndef CXXTEST_RUNNING
#define CXXTEST_RUNNING
#endif

#define _CXXTEST_HAVE_STD
#define _CXXTEST_HAVE_EH
#include <cxxtest/TestListener.h>
#include <cxxtest/TestTracker.h>
#include <cxxtest/TestRunner.h>
#include <cxxtest/RealDescriptions.h>
#include <cxxtest/TestMain.h>
#include <cxxtest/ParenPrinter.h>

int main( int argc, char *argv[] ) {
 int status;
    CxxTest::ParenPrinter tmp;
    CxxTest::RealWorldDescription::_worldName = "cxxtest";
    status = CxxTest::Main< CxxTest::ParenPrinter >( tmp, argc, argv );
    return status;
}
bool suite_BiTestSuite_init = false;
#include "..\BiTestSuite.h"

static BiTestSuite suite_BiTestSuite;

static CxxTest::List Tests_BiTestSuite = { 0, 0 };
CxxTest::StaticSuiteDescription suiteDescription_BiTestSuite( "../BiTestSuite.h", 43, "BiTestSuite", suite_BiTestSuite, Tests_BiTestSuite );

static class TestDescription_suite_BiTestSuite_TestCase1 : public CxxTest::RealTestDescription {
public:
 TestDescription_suite_BiTestSuite_TestCase1() : CxxTest::RealTestDescription( Tests_BiTestSuite, suiteDescription_BiTestSuite, 74, "TestCase1" ) {}
 void runTest() { suite_BiTestSuite.TestCase1(); }
} testDescription_suite_BiTestSuite_TestCase1;

#include <cxxtest/Root.cpp>
const char* CxxTest::RealWorldDescription::_worldName = "cxxtest";


text:
package io.github.zutherb.appstash.common.service;

import java.util.List;

/**
 * Abstract Repository that provides all must crud functions
 *
 * @author zutherb
 */
public interface AbstractService <D>{
    void dropCollection();
    long countAll();
    List<D> findAll();
    void save(D object);
    void delete(D object);
}


text:
Compile with:

    npm install

Load into a running process:

    frida Twitter -l _agent.js

Talk to it:

    curl http://127.0.0.1:1337/modules


text:
This site is built with [Middleman](//middlemanapp.com/) and
[Bower](//bower.io/). Middleman compiles partials, sass, and coffeescript, into
optimized html, css, and javascript. Bower is used to manage css and javascript
third party dependencies.

## Installation

You'll need at minimum Ruby (2.0.0 suggested), RubyGems, and Bundler to get
started. Once you have all that, just run `bundle install` to install Middleman
and all it's dependencies.

## Development

Middleman comes with a simple server. Run `middleman` to start it up. That will
run on localhost:4567, which you can hit from your browser -- `open
localhost:4567`. It will refresh automatically as you change files.

## Build

You can build out the site with `rake build`, but you probably won't need this.
This happens when you run the development server, and when you publish (below).

## Create a new article

`middleman article TITLE`

## Publish

Once you're happy with your changes, commit them and run `rake publish`, which
will run the build step, add all the files to the 'gh-pages' branch and push.

## Adding Dependencies

If you want to add additional front-end dependencies (jQuery, Underscore.js,
etc.), please use Bower. For that, you'll need node, npm, then `npm install -g
bower`. Then you should be able to do something like `bower install jquery
--save`.


text:
using Renci.SshNet.Common;
using System.Collections.Generic;

namespace Renci.SshNet.Messages.Connection
{
    /// <summary>
    /// Represents "pty-req" type channel request information
    /// </summary>
    internal class PseudoTerminalRequestInfo : RequestInfo
    {
        /// <summary>
        /// Channel request name
        /// </summary>
        public const string NAME = "pty-req";

        /// <summary>
        /// Gets the name of the request.
        /// </summary>
        /// <value>
        /// The name of the request.
        /// </value>
        public override string RequestName
        {
            get { return NAME; }
        }

        /// <summary>
        /// Gets or sets the environment variable.
        /// </summary>
        /// <value>
        /// The environment variable.
        /// </value>
        public string EnvironmentVariable { get; set; }

        /// <summary>
        /// Gets or sets the columns.
        /// </summary>
        /// <value>
        /// The columns.
        /// </value>
        public uint Columns { get; set; }

        /// <summary>
        /// Gets or sets the rows.
        /// </summary>
        /// <value>
        /// The rows.
        /// </value>
        public uint Rows { get; set; }

        /// <summary>
        /// Gets or sets the width of the pixel.
        /// </summary>
        /// <value>
        /// The width of the pixel.
        /// </value>
        public uint PixelWidth { get; set; }

        /// <summary>
        /// Gets or sets the height of the pixel.
        /// </summary>
        /// <value>
        /// The height of the pixel.
        /// </value>
        public uint PixelHeight { get; set; }

        /// <summary>
        /// Gets or sets the terminal mode.
        /// </summary>
        /// <value>
        /// The terminal mode.
        /// </value>
        public IDictionary<TerminalModes, uint> TerminalModeValues { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="PseudoTerminalRequestInfo"/> class.
        /// </summary>
        public PseudoTerminalRequestInfo()
        {
            this.WantReply = true;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PseudoTerminalRequestInfo"/> class.
        /// </summary>
        /// <param name="environmentVariable">The environment variable.</param>
        /// <param name="columns">The columns.</param>
        /// <param name="rows">The rows.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="terminalModeValues">The terminal mode values.</param>
        public PseudoTerminalRequestInfo(string environmentVariable, uint columns, uint rows, uint width, uint height, IDictionary<TerminalModes, uint> terminalModeValues)
            : this()
        {
            this.EnvironmentVariable = environmentVariable;
            this.Columns = columns;
            this.Rows = rows;
            this.PixelWidth = width;
            this.PixelHeight = height;
            this.TerminalModeValues = terminalModeValues;
        }

        /// <summary>
        /// Called when type specific data need to be saved.
        /// </summary>
        protected override void SaveData()
        {
            base.SaveData();

            this.Write(this.EnvironmentVariable);
            this.Write(this.Columns);
            this.Write(this.Rows);
            this.Write(this.Rows);
            this.Write(this.PixelHeight);

            if (this.TerminalModeValues != null)
            {
                this.Write((uint)this.TerminalModeValues.Count * (1 + 4) + 1);

                foreach (var item in this.TerminalModeValues)
                {
                    this.Write((byte)item.Key);
                    this.Write(item.Value);
                }
                this.Write((byte)0);
            }
            else
            {
                this.Write((uint)0);
            }
        }
    }
}


text:
package hackerrank;

import java.util.Scanner;
import java.util.regex.Pattern;

/**
 * https://www.hackerrank.com/challenges/utopian-identification-number
 *
 * @author harish.sharma
 *
 */
public class UtopianNumbers {
    public static void main(String[] arg) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        for (int i = 0; i < n; i++) {
            String a = in.next();
            if (Pattern.matches("^[a-z]{0,3}[0-9]{2,8}[A-Z]{3,}", a)) {
                System.out.println("VALID");
            } else {
                System.out.println("INVALID");
            }
        }
        in.close();
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
    <type>org.netbeans.modules.php.project</type>
    <configuration>
        <data xmlns="http://www.netbeans.org/ns/php-project/1">
            <name>CORE-GestionHumana</name>
        </data>
        <spellchecker-wordlist xmlns="http://www.netbeans.org/ns/spellchecker-wordlist/1">
            <word>Lorem</word>
            <word>renderpartial</word>
        </spellchecker-wordlist>
    </configuration>
</project>


text:
This document is a rough guide to what will need to be completed to support
migrating from boot2docker-cli to Machine.  It is not meant to be a user guide
but more so an internal guide to what we will want to support.

## Existing Boot2Docker Instances
We will need to import the disk to "migrate" the existing Docker data to the
new Machine.  This should not be too much work as instead of creating the
virtual disk we will simply copy this one.  From there, provisioning should
happen as normal (cert regeneration, option configuration, etc).

## CLI
Currently almost every b2d command has a comparable Machine command.  I do not
feel we need to have the exact same naming but we will want to create a
migration user guide to inform the users of what is different.

## Boot2Docker Host Alias
Boot2Docker also modifies the local system host file to create a `boot2docker`
alias that can be used by the host system.  We will need to decide if we want
to support this and, if so, how to implement.  Perhaps local aliases for each
Machine name?

## Installer and Initial Setup
There is a Boot2Docker installer that assists the users in getting started.
It installs VirtualBox along with the b2d CLI.  We will need something similar.
This will probably be part of a larger installation project with the various
Docker platform tools.

## Updates
Machine already supports the `upgrade` command to update the Machine instances.
I'm not sure if we want to add a mechanism to update the local Machine binary
and/or the Docker CLI binary as well.  We will need to discuss.


text:
/**
 * Author: Normen Hansen
 */
#include "com_jme3_bullet_joints_Point2PointJoint.h"
#include "jmeBulletUtil.h"

#ifdef __cplusplus
extern "C" {
#endif

    /*
     * Class:     com_jme3_bullet_joints_Point2PointJoint
     * Method:    setDamping
     * Signature: (JF)V
     */
    JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setDamping
    (JNIEnv * env, jobject object, jlong jointId, jfloat damping) {
        btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
        if (joint == NULL) {
            jclass newExc = env->FindClass("java/lang/NullPointerException");
            env->ThrowNew(newExc, "The native object does not exist.");
            return;
        }
        joint->m_setting.m_damping = damping;
    }

    /*
     * Class:     com_jme3_bullet_joints_Point2PointJoint
     * Method:    setImpulseClamp
     * Signature: (JF)V
     */
    JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setImpulseClamp
    (JNIEnv * env, jobject object, jlong jointId, jfloat clamp) {
        btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
        if (joint == NULL) {
            jclass newExc = env->FindClass("java/lang/NullPointerException");
            env->ThrowNew(newExc, "The native object does not exist.");
            return;
        }
        joint->m_setting.m_impulseClamp = clamp;
    }

    /*
     * Class:     com_jme3_bullet_joints_Point2PointJoint
     * Method:    setTau
     * Signature: (JF)V
     */
    JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setTau
    (JNIEnv * env, jobject object, jlong jointId, jfloat tau) {
        btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
        if (joint == NULL) {
            jclass newExc = env->FindClass("java/lang/NullPointerException");
            env->ThrowNew(newExc, "The native object does not exist.");
            return;
        }
        joint->m_setting.m_tau = tau;
    }

    /*
     * Class:     com_jme3_bullet_joints_Point2PointJoint
     * Method:    getDamping
     * Signature: (J)F
     */
    JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getDamping
    (JNIEnv * env, jobject object, jlong jointId) {
        btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
        if (joint == NULL) {
            jclass newExc = env->FindClass("java/lang/NullPointerException");
            env->ThrowNew(newExc, "The native object does not exist.");
            return 0;
        }
        return joint->m_setting.m_damping;
    }

    /*
     * Class:     com_jme3_bullet_joints_Point2PointJoint
     * Method:    getImpulseClamp
     * Signature: (J)F
     */
    JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getImpulseClamp
    (JNIEnv * env, jobject object, jlong jointId) {
        btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
        if (joint == NULL) {
            jclass newExc = env->FindClass("java/lang/NullPointerException");
            env->ThrowNew(newExc, "The native object does not exist.");
            return 0;
        }
        return joint->m_setting.m_damping;
    }

    /*
     * Class:     com_jme3_bullet_joints_Point2PointJoint
     * Method:    getTau
     * Signature: (J)F
     */
    JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getTau
    (JNIEnv * env, jobject object, jlong jointId) {
        btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
        if (joint == NULL) {
            jclass newExc = env->FindClass("java/lang/NullPointerException");
            env->ThrowNew(newExc, "The native object does not exist.");
            return 0;
        }
        return joint->m_setting.m_damping;
    }

    /*
     * Class:     com_jme3_bullet_joints_Point2PointJoint
     * Method:    createJoint
     * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
     */
    JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_createJoint
    (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject pivotB) {
        jmeClasses::initJavaClasses(env);
        btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
        btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
        //TODO: matrix not needed?
        btMatrix3x3 mtx1 = btMatrix3x3();
        btMatrix3x3 mtx2 = btMatrix3x3();
        btTransform transA = btTransform(mtx1);
        jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
        btTransform transB = btTransform(mtx2);
        jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
        btHingeConstraint* joint = new btHingeConstraint(*bodyA, *bodyB, transA, transB);
        return reinterpret_cast<jlong>(joint);
    }

#ifdef __cplusplus
}
#endif


text:
package com.github.toastshaman;

import com.github.toastshaman.fibonacci.CalculateFibonacciResource;
import com.github.toastshaman.pi.CalculatePiResource;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.yammer.dropwizard.Service;
import com.yammer.dropwizard.config.Bootstrap;
import com.yammer.dropwizard.config.Environment;

public class MathService extends Service<ServiceConfiguration> {

    @Override
    public void initialize(final Bootstrap<ServiceConfiguration> bootstrap) {
        bootstrap.setName("math-service");
    }

    @Override
    public void run(final ServiceConfiguration config, final Environment env) throws Exception {
        Injector injector = createInjector(config);

        env.addResource(injector.getInstance(CalculatePiResource.class));
        env.addResource(injector.getInstance(CalculateFibonacciResource.class));
    }

    private Injector createInjector(final ServiceConfiguration conf) {
        return Guice.createInjector(new AbstractModule() {
            @Override
            protected void configure() {
                bind(ServiceConfiguration.class).toInstance(conf);
            }
        });
    }

    public static void main(final String[] args) throws Exception {
        new MathService().run(args);
    }
}


text:
package com.gemstone.gemfire.internal.tools.gfsh.app.cache.index;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.internal.cache.CachedDeserializable;

public class EntryMap extends HashMap<DataSerializable, Object> implements DataSerializable
{
	private boolean keysOnly = false;

	public EntryMap()
	{
		super();
	}

	public EntryMap(int size)
	{
		super(size);
	}

	public EntryMap(int size, float loadfactor)
	{
		this(size, loadfactor, false);
	}

	public EntryMap(int size, float loadfactor, boolean keysOnly)
	{
		super(size, loadfactor);
		this.keysOnly = keysOnly;
	}

	public void fromData(DataInput in) throws IOException,
			ClassNotFoundException
	{
		keysOnly = in.readBoolean();
		int size = in.readInt();

		if (keysOnly) {

			for(int i=0;i<size;i++)
			{
				DataSerializable key = (DataSerializable) DataSerializer.readObject(in);
				put(key, key);
			}

		} else {
			for(int i=0;i<size;i++)
			{
				DataSerializable key = (DataSerializable) DataSerializer.readObject(in);
				// This will be deserialized by Java client and this will never be used in the server...
				// We can de-serialize the value object to it's base class, rather than
				// to a byte array.
				DataSerializable value = (DataSerializable) DataSerializer.readObject(in);
				put(key, value);
			}
		}
	}

	public void toData(DataOutput out) throws IOException
	{
		out.writeBoolean(keysOnly);
		out.writeInt(size());
		if (keysOnly) {
			for (Map.Entry<DataSerializable, Object> e : entrySet()) {
				DataSerializer.writeObject(e.getKey(), out);
			}
		} else {
			for (Map.Entry<DataSerializable, Object> e : entrySet()) {
				DataSerializer.writeObject(e.getKey(), out);
				out.write(((CachedDeserializable) e.getValue()).getSerializedValue());
			}
		}
	}
}


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

{% block content %}

You will be receiving an email shortly with instructions on how to activate your account.

{% endblock %}


text:
#ifndef WEBSOCKETSCLIENT_H_
#define WEBSOCKETSCLIENT_H_

#include "WebSockets.h"
#include <ESP8266WiFi.h>
class WebSocketsClient: private WebSockets {
    public:
#ifdef __AVR__
        typedef void (*WebSocketClientEvent)(WStype_t type, uint8_t * payload, size_t length);
#else
        typedef std::function<void (WStype_t type, uint8_t * payload, size_t length)> WebSocketClientEvent;
#endif

        WebSocketsClient(void);
        ~WebSocketsClient(void);

        void begin(const char *host, uint16_t port, const char * url = "/", const char * protocol = "arduino");
        void begin(String host, uint16_t port, String url = "/", String protocol = "arduino");
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_A7_GSM)
        void begin(TinyGsmClient* client, const char *host, uint16_t port, const char * url, const char * protocol);
#endif

#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
        void beginSSL(const char *host, uint16_t port, const char * url = "/", const char * = "", const char * protocol = "arduino");
        void beginSSL(String host, uint16_t port, String url = "/", String fingerprint = "", String protocol = "arduino");
#endif

        void beginSocketIO(const char *host, uint16_t port, const char * url = "/socket.io/?EIO=3", const char * protocol = "arduino");
        void beginSocketIO(String host, uint16_t port, String url = "/socket.io/?EIO=3", String protocol = "arduino");

#if (WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP8266_ASYNC)
        void loop(void);
#else
        // Async interface not need a loop call
        void loop(void) __attribute__ ((deprecated)) {}
#endif

        void onEvent(WebSocketClientEvent cbEvent);

        bool sendTXT(uint8_t * payload, size_t length = 0, bool headerToPayload = false);
        bool sendTXT(const uint8_t * payload, size_t length = 0);
        bool sendTXT(char * payload, size_t length = 0, bool headerToPayload = false);
        bool sendTXT(const char * payload, size_t length = 0);
        bool sendTXT(String & payload);

        bool sendBIN(uint8_t * payload, size_t length, bool headerToPayload = false);
        bool sendBIN(const uint8_t * payload, size_t length);

        bool sendPing(uint8_t * payload = NULL, size_t length = 0);
        bool sendPing(String & payload);

        void disconnect(void);

        void setAuthorization(const char * user, const char * password);
        void setAuthorization(const char * auth);

        void connectedCb();

    protected:
        String _host;
        uint16_t _port;

#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
        String _fingerprint;
#endif
        WSclient_t _client;

        WebSocketClientEvent _cbEvent;

        void messageReceived(WSclient_t * client, WSopcode_t opcode, uint8_t * payload, size_t length, bool fin);

        void clientDisconnect(WSclient_t * client);
        bool clientIsConnected(WSclient_t * client);

#if (WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP8266_ASYNC)
        void handleClientData(void);
#endif

        void sendHeader(WSclient_t * client);
        void handleHeader(WSclient_t * client, String * headerLine);

        void connectFailedCb();

#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266_ASYNC)
        void asyncConnect();
#endif

        /**
         * called for sending a Event to the app
         * @param type WStype_t
         * @param payload uint8_t *
         * @param length size_t
         */
        virtual void runCbEvent(WStype_t type, uint8_t * payload, size_t length) {
            if(_cbEvent) {
                _cbEvent(type, payload, length);
            }
        }

};

#endif /* WEBSOCKETSCLIENT_H_ */