text:
require "serverspec"

set :backend, :exec

def ubuntu?
  os[:family] == "ubuntu"
end

def redhat?
  os[:family] == "redhat"
end

describe "Ubuntu package installation" do
  describe file("/etc/apt/sources.list.d/percona.list"), if: ubuntu? do
    it { should be_a_file }
    its(:content) { should match "http://repo.percona.com/apt" }
  end

  describe file("/etc/apt/preferences.d/00percona.pref"), if: ubuntu? do
    it { should be_a_file }
    its(:content) { should match "release o=Percona Development Team" }
  end

  describe package("libperconaserverclient18.1-dev"), if: ubuntu? do
    it { should be_installed }
  end

  describe package("percona-server-client-5.6"), if: ubuntu? do
    it { should be_installed }
  end

  describe package("percona-toolkit") do
    it { should be_installed }
  end
end

describe "Red Hat package installation" do
  describe yumrepo("percona"), if: redhat? do
    it { should exist }
    it { should be_enabled }
  end

  describe package("Percona-Server-devel-56"), if: redhat? do
    it { should be_installed }
  end

  describe package("Percona-Server-client-56"), if: redhat? do
    it { should be_installed }
  end

  describe package("percona-toolkit") do
    it { should be_installed }
  end
end

redpajama_set_name: RedPajamaGithub


text:
module Grape
  module Validations
    class AllowBlankValidator < Base
      def validate_param!(attr_name, params)
        return if (options_key?(:value) ? @option[:value] : @option) || !params.is_a?(Hash)

        value = params[attr_name]
        value = value.strip if value.respond_to?(:strip)

        return if false == value || value.present?

        raise Grape::Exceptions::Validation, params: [@scope.full_name(attr_name)], message: message(:blank)
      end
    end
  end
end


text:
#ifndef _RISCV_BITS_SETJMP_H
#define _RISCV_BITS_SETJMP_H

typedef struct __jmp_buf_internal_tag
  {
    /* Program counter.  */
    long int __pc;
    /* Callee-saved registers.  */
    long int __regs[12];
    /* Stack pointer.  */
    long int __sp;

    /* Callee-saved floating point registers.  */
#if defined __riscv_float_abi_double
   double __fpregs[12];
#elif !defined __riscv_float_abi_soft
# error unsupported FLEN
#endif
  } __jmp_buf[1];

#endif /* _RISCV_BITS_SETJMP_H */


text:
package com.netopyr.reduxfx.updater;

import io.vavr.collection.Array;
import io.vavr.collection.Seq;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Arrays;

public final class Update<S> {

    public static <T> Update<T> of(T state) {
        return new Update<>(state);
    }

    public static <T> Update<T> of(T state, Command... commands) {
        return new Update<>(state, Array.of(commands));
    }

    @SafeVarargs
    public static <T> Update<T> of(T state, Seq<Command>... commands) {
        return new Update<>(state, commands);
    }

    private final S state;
    private final Seq<Command> commands;

    @SafeVarargs
    private Update(S state, Seq<Command>... commands) {
        this.state = state;
        this.commands = Arrays.stream(commands).reduce(Array.empty(), Seq::appendAll);
    }

    public S getState() {
        return state;
    }

    public Seq<Command> getCommands() {
        return commands;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
                .append("state", state)
                .append("commands", commands)
                .toString();
    }
}


text:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="20dp"
    android:height="20dp"
    android:viewportWidth="20"
    android:viewportHeight="20"
    android:tint="?attr/colorControlNormal">
  <path
      android:fillColor="@android:color/white"
      android:pathData="M10,13.208 L4.833,8.062 6.062,6.833 10,10.771 13.938,6.833 15.167,8.062Z"/>
</vector>


text:
<#PSScriptInfo

.VERSION 0.1

.GUID 2b02b3ba-b43d-431b-901d-37b919005685

.AUTHOR Joshua (Windos) King

.COMPANYNAME king.geek.nz

.COPYRIGHT (c) 2015 Joshua (Windos) King. All rights reserved.

.TAGS Twitter tweet social blog

.LICENSEURI https://github.com/Windos/powershell-depot/blob/master/LICENSE.md

.PROJECTURI https://github.com/Windos/powershell-depot/blob/master/GalleryScripts/Send-BlogTweet.ps1

.RELEASENOTES
* Initial release

#>

#Requires -Module PoshTwit

<#

.DESCRIPTION
Send-BlogTweet chooses a random post from a blog's RSS feed and sends a Tweet, using PoshTwit, linking to the post.

#>
param (
    [string] $BlogFeed = 'https://king.geek.nz/rss/',
    [string] $TokenPath = 'C:\Program Files\WindowsPowerShell\Modules\PoshTwit\0.1.6\token.json'
)

$Posts = [System.Collections.ArrayList]::new()
$PageNumber = 1
$More = $true

while ($More) {
    try {
        $Page = Invoke-RestMethod -Uri "$BlogFeed$PageNumber" -ErrorAction Stop
    } catch {
        $Page = $null
    }

    if ($Page.Count -gt 0) {
        foreach ($Post in $Page) {
            $null = $Posts.Add($Post)
        }

        $PageNumber += 1
    } else {
        $More = $false
    }
}

$PostToPost = $Posts | Get-Random

$Title = $PostToPost.title.'#cdata-section'
$Excerpt = $PostToPost.description.'#cdata-section'
$Link = $PostToPost.link
$Categories = $PostToPost.category | foreach {$_.'#cdata-section'.replace(' ', '')}

$Hashtags = ''
foreach ($Category in $Categories) {
    $Hashtags += " #$Category"
}

$TweetText = "From the blog archive: ""$Title""`n`n$Excerpt$Hashtags`n$link"

$Token = Get-Content -Path $TokenPath | ConvertFrom-Json

$ParamSplat = @{
    Tweet          = $TweetText
    ConsumerKey    = $Token.ConsumerKey
    ConsumerSecret = $Token.ConsumerSecret
    AccessToken    = $Token.AccessToken
    AccessSecret   = $Token.AccessSecret
}

Publish-Tweet @ParamSplat


text:
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInsight.completion;

import com.intellij.codeInsight.lookup.LookupElement;
import com.intellij.codeInsight.lookup.LookupElementPresentation;
import com.intellij.codeInsight.lookup.WeighingContext;
import consulo.util.dataholder.Key;
import com.intellij.openapi.util.Pair;
import javax.annotation.Nonnull;

import java.util.List;

/**
 * Determines the order of completion items and the initial selection.
 *
 * @author yole
 */
public interface CompletionLookupArranger {
  Key<WeighingContext> WEIGHING_CONTEXT = Key.create("WEIGHING_CONTEXT");
  Key<Integer> PREFIX_CHANGES = Key.create("PREFIX_CHANGES");

  /**
   * Adds an element to be arranged.
   *
   * @param presentation The presentation of the element (rendered with {@link LookupElement#renderElement(LookupElementPresentation)}
   */
  void addElement(@Nonnull LookupElement element, @Nonnull CompletionSorter sorter, @Nonnull PrefixMatcher prefixMatcher, @Nonnull LookupElementPresentation presentation);

  /**
   * Adds an element to be arranged, along with its prefix matcher.
   */
  void addElement(@Nonnull CompletionResult result);

  /**
   * Returns the prefix matcher registered for the specified element.
   */
  PrefixMatcher itemMatcher(@Nonnull LookupElement item);

  /**
   * Returns the items in the appropriate order and the initial selection.
   *
   * @return Pair where the first element is the sorted list of completion items and the second item is the index of the item to select
   * initially.
   */
  Pair<List<LookupElement>, Integer> arrangeItems();
}


text:
#if GOOGLE_CUDA

#define EIGEN_USE_GPU

#include "tensorflow/core/kernels/reverse_op.h"

#include "tensorflow/core/framework/register_types.h"

namespace tensorflow {

typedef Eigen::GpuDevice GPUDevice;

#define DEFINE_REVERSE(T, DIM) \
  template struct functor::Reverse<GPUDevice, T, DIM>;
#define DEFINE_REVERSE_ALL_DIMS(T) \
  DEFINE_REVERSE(T, 0) \
  DEFINE_REVERSE(T, 1) \
  DEFINE_REVERSE(T, 2) \
  DEFINE_REVERSE(T, 3) \
  DEFINE_REVERSE(T, 4) \
  DEFINE_REVERSE(T, 5) \
  DEFINE_REVERSE(T, 6) \
  DEFINE_REVERSE(T, 7) \
  DEFINE_REVERSE(T, 8)

TF_CALL_uint8(DEFINE_REVERSE_ALL_DIMS);
TF_CALL_int8(DEFINE_REVERSE_ALL_DIMS);
TF_CALL_int32(DEFINE_REVERSE_ALL_DIMS);
TF_CALL_bool(DEFINE_REVERSE_ALL_DIMS);
TF_CALL_half(DEFINE_REVERSE_ALL_DIMS);
TF_CALL_float(DEFINE_REVERSE_ALL_DIMS);
TF_CALL_double(DEFINE_REVERSE_ALL_DIMS);
TF_CALL_complex64(DEFINE_REVERSE_ALL_DIMS);
TF_CALL_complex128(DEFINE_REVERSE_ALL_DIMS);
#undef DEFINE_REVERSE
#undef DEFINE_REVERSE_ALL_DIMS

}  // namespace tensorflow

#endif  // GOOGLE_CUDA


text:
FIND_PATH(QTSHANOIR_DIR UseQtShanoir.cmake
  /usr/lib/qtshanoir-0.1
  /usr/local/lib/qtshanoir-0.1
  /home/aabadie/Softs/builds/qtshanoir2
  DOC "QTSHANOIR directory")

SET(QTSHANOIR_CONFIG_FILE ${QTSHANOIR_DIR}/QtShanoirConfig.cmake)
SET(QTSHANOIR_USE_FILE ${QTSHANOIR_DIR}/UseQtShanoir.cmake)
# path is okay
IF (EXISTS ${QTSHANOIR_CONFIG_FILE})
  SET(QTSHANOIR_FOUND 1)
  INCLUDE (${QTSHANOIR_CONFIG_FILE})
  INCLUDE (${QTSHANOIR_USE_FILE})
ELSE (EXISTS ${QTSHANOIR_CONFIG_FILE})
  SET(QTSHANOIR_FOUND 0)
  IF(QTSHANOIR_FIND_REQUIRED)
    MESSAGE(FATAL_ERROR "Please set QTSHANOIR_DIR to the correct value")
  ENDIF(QTSHANOIR_FIND_REQUIRED)
ENDIF (EXISTS ${QTSHANOIR_CONFIG_FILE})


text:
from steel.base import *
from steel.fields import *


text:
.. _nuvsdcomponent:

nuvsdcomponent
===========================================

.. class:: nuvsdcomponent.NUVSDComponent(bambou.nurest_object.NUMetaRESTObject,):

System Monitoring details for components of VSD system.

Attributes
----------

- ``name``: Identifies the entity with a name.

- ``management_ip``: An optional management IP to log into this component.

- ``address``: An optional IP to access this component.

- ``description``: Description of the entity.

- ``embedded_metadata``: Metadata objects associated with this entity. This will contain a list of Metadata objects if the API request is made using the special flag to enable the embedded Metadata feature. Only a maximum of Metadata objects is returned based on the value set in the system configuration.

- ``entity_scope``: Specify if scope of entity is Data center or Enterprise level

- ``location``: Identifies the entity to be associated with a location.

- ``product_version``: Product version supported by this entity.

- ``status``: Current status of the entity. Possible values are UP, DOWN, ADMIN_DOWN, .

- ``external_id``: External object ID. Used for integration with third party systems

- ``type``: Type of the component.

Children
--------

================================================================================================================================================               ==========================================================================================
**class**                                                                                **fetcher**

:ref:`nupermission.NUPermission<nupermission>`                                                                                ``permissions``
:ref:`numetadata.NUMetadata<numetadata>`                                                                                ``metadatas``
:ref:`nuglobalmetadata.NUGlobalMetadata<nuglobalmetadata>`                                                                                ``global_metadatas``
================================================================================================================================================               ==========================================================================================

Parents
--------

- :ref:`nuvsd.NUVSD<nuvsd>`


text:
//
//  TableViewController.m
//  TestTableViewWithAutoLayout
//
//  Created by Keita on 3/20/15.
//  Copyright (c) 2015 Keita Ito. All rights reserved.
//

#import "TableViewController.h"
#import "BaseTableViewCell.h"
#import "Event.h"

@interface TableViewController ()

@end

@implementation TableViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;

    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
//#warning Potentially incomplete method implementation.
    // Return the number of sections.
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
//#warning Incomplete method implementation.
    // Return the number of rows in the section.
    return 3;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    NSString *identifier = nil;

    if (indexPath.row == 0) {
        identifier = @"EventImageCell";
    } else if (indexPath.row == 1) {
        identifier = @"EventNameCell";
    } else if (indexPath.row == 2) {
        identifier = @"EventDescriptionCell";
    }

    BaseTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier forIndexPath:indexPath];

    // Configure the cell...
    Event *event = [[Event alloc] init];
    [cell setupWithModel:event];

    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSLog(@"UITableViewAutomationDimension");

    return UITableViewAutomaticDimension;
}

/*
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the specified item to be editable.
    return YES;
}
*/

/*
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        // Delete the row from the data source
        [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
    } else if (editingStyle == UITableViewCellEditingStyleInsert) {
        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
    }
}
*/

/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
}
*/

/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the item to be re-orderable.
    return YES;
}
*/

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end


text:
'use strict';

var exec = require("child_process").execSync;

module.exports = function (grunt) {

    grunt.registerMultiTask('po2mo', 'Compile .po files into binary .mo files with msgfmt.', function () {

        var options = this.options({
            deleteSrc: false,
        });

        var renameFile = function (src, dest) {
            if (dest.indexOf('.po') > -1) {
                dest = dest.replace('.po', '.mo');
            }

            var command = 'msgfmt -o ' + dest + ' ' + src;

            grunt.verbose.writeln('Executing: ' + command);

            var child = exec(command,
                function(error, stdout, stderr){
                    if(error !== null) {
                         console.log('exec error: ' + error);
                    }
                }
            );

        };

        this.files.forEach(function (file) {
            var arraySrc  = file.src;
            var arrayDest = file.dest;

            if (!arrayDest) {
                for (var i = 0; i < arraySrc.length; i++) {
                    var fileSrc = arraySrc[i];
                    renameFile(fileSrc, fileSrc);
                }
            } else {
                renameFile(arraySrc, arrayDest);
            }

            if (options.deleteSrc) {
                grunt.file.delete(arraySrc);
            }
        });

    });

};


text:
"""
The MIT License (MIT)

Copyright (c) 2015-2020 Rapptz

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
"""

import array
import ctypes
import ctypes.util
import logging
import os.path
import sys

from .errors import DiscordException

log = logging.getLogger(__name__)
c_int_ptr = ctypes.POINTER(ctypes.c_int)
c_int16_ptr = ctypes.POINTER(ctypes.c_int16)
c_float_ptr = ctypes.POINTER(ctypes.c_float)

_lib = None

class EncoderStruct(ctypes.Structure):
    pass

EncoderStructPtr = ctypes.POINTER(EncoderStruct)

def _err_lt(result, func, args):
    if result < 0:
        log.info('error has happened in %s', func.__name__)
        raise OpusError(result)
    return result

def _err_ne(result, func, args):
    ret = args[-1]._obj
    if ret.value != 0:
        log.info('error has happened in %s', func.__name__)
        raise OpusError(ret.value)
    return result

# A list of exported functions.
# The first argument is obviously the name.
# The second one are the types of arguments it takes.
# The third is the result type.
# The fourth is the error handler.
exported_functions = [
    ('opus_strerror',
        [ctypes.c_int], ctypes.c_char_p, None),
    ('opus_encoder_get_size',
        [ctypes.c_int], ctypes.c_int, None),
    ('opus_encoder_create',
        [ctypes.c_int, ctypes.c_int, ctypes.c_int, c_int_ptr], EncoderStructPtr, _err_ne),
    ('opus_encode',
        [EncoderStructPtr, c_int16_ptr, ctypes.c_int, ctypes.c_char_p, ctypes.c_int32], ctypes.c_int32, _err_lt),
    ('opus_encoder_ctl',
        None, ctypes.c_int32, _err_lt),
    ('opus_encoder_destroy',
        [EncoderStructPtr], None, None),
]

def libopus_loader(name):
    # create the library...
    lib = ctypes.cdll.LoadLibrary(name)

    # register the functions...
    for item in exported_functions:
        func = getattr(lib, item[0])

        try:
            if item[1]:
                func.argtypes = item[1]

            func.restype = item[2]
        except KeyError:
            pass

        try:
            if item[3]:
                func.errcheck = item[3]
        except KeyError:
            log.exception("Error assigning check function to %s", func)

    return lib

def _load_default():
    global _lib
    try:
        if sys.platform == 'win32':
            _basedir = os.path.dirname(os.path.abspath(__file__))
            _bitness = 'x64' if sys.maxsize > 2**32 else 'x86'
            _filename = os.path.join(_basedir, 'bin', 'libopus-0.{}.dll'.format(_bitness))
            _lib = libopus_loader(_filename)
        else:
            _lib = libopus_loader(ctypes.util.find_library('opus'))
    except Exception:
        _lib = None

    return _lib is not None

def load_opus(name):
    """Loads the libopus shared library for use with voice.

    If this function is not called then the library uses the function
    :func:`ctypes.util.find_library` and then loads that one if available.

    Not loading a library and attempting to use PCM based AudioSources will
    lead to voice not working.

    This function propagates the exceptions thrown.

    .. warning::

        The bitness of the library must match the bitness of your python
        interpreter. If the library is 64-bit then your python interpreter
        must be 64-bit as well. Usually if there's a mismatch in bitness then
        the load will throw an exception.

    .. note::

        On Windows, this function should not need to be called as the binaries
        are automatically loaded.

    .. note::

        On Windows, the .dll extension is not necessary. However, on Linux
        the full extension is required to load the library, e.g. ``libopus.so.1``.
        On Linux however, :func:`ctypes.util.find_library` will usually find the library automatically
        without you having to call this.

    Parameters
    ----------
    name: :class:`str`
        The filename of the shared library.
    """
    global _lib
    _lib = libopus_loader(name)

def is_loaded():
    """Function to check if opus lib is successfully loaded either
    via the :func:`ctypes.util.find_library` call of :func:`load_opus`.

    This must return ``True`` for voice to work.

    Returns
    -------
    :class:`bool`
        Indicates if the opus library has been loaded.
    """
    global _lib
    return _lib is not None

class OpusError(DiscordException):
    """An exception that is thrown for libopus related errors.

    Attributes
    ----------
    code: :class:`int`
        The error code returned.
    """

    def __init__(self, code):
        self.code = code
        msg = _lib.opus_strerror(self.code).decode('utf-8')
        log.info('"%s" has happened', msg)
        super().__init__(msg)

class OpusNotLoaded(DiscordException):
    """An exception that is thrown for when libopus is not loaded."""
    pass

# Some constants...
OK = 0
APPLICATION_AUDIO    = 2049
APPLICATION_VOIP     = 2048
APPLICATION_LOWDELAY = 2051
CTL_SET_BITRATE      = 4002
CTL_SET_BANDWIDTH    = 4008
CTL_SET_FEC          = 4012
CTL_SET_PLP          = 4014
CTL_SET_SIGNAL       = 4024

band_ctl = {
    'narrow': 1101,
    'medium': 1102,
    'wide': 1103,
    'superwide': 1104,
    'full': 1105,
}

signal_ctl = {
    'auto': -1000,
    'voice': 3001,
    'music': 3002,
}

class Encoder:
    SAMPLING_RATE = 48000
    CHANNELS = 2
    FRAME_LENGTH = 20
    SAMPLE_SIZE = 4 # (bit_rate / 8) * CHANNELS (bit_rate == 16)
    SAMPLES_PER_FRAME = int(SAMPLING_RATE / 1000 * FRAME_LENGTH)

    FRAME_SIZE = SAMPLES_PER_FRAME * SAMPLE_SIZE

    def __init__(self, application=APPLICATION_AUDIO):
        self.application = application

        if not is_loaded():
            if not _load_default():
                raise OpusNotLoaded()

        self._state = self._create_state()
        self.set_bitrate(128)
        self.set_fec(True)
        self.set_expected_packet_loss_percent(0.15)
        self.set_bandwidth('full')
        self.set_signal_type('auto')

    def __del__(self):
        if hasattr(self, '_state'):
            _lib.opus_encoder_destroy(self._state)
            self._state = None

    def _create_state(self):
        ret = ctypes.c_int()
        return _lib.opus_encoder_create(self.SAMPLING_RATE, self.CHANNELS, self.application, ctypes.byref(ret))

    def set_bitrate(self, kbps):
        kbps = min(512, max(16, int(kbps)))

        _lib.opus_encoder_ctl(self._state, CTL_SET_BITRATE, kbps * 1024)
        return kbps

    def set_bandwidth(self, req):
        if req not in band_ctl:
            raise KeyError('%r is not a valid bandwidth setting. Try one of: %s' % (req, ','.join(band_ctl)))

        k = band_ctl[req]
        _lib.opus_encoder_ctl(self._state, CTL_SET_BANDWIDTH, k)

    def set_signal_type(self, req):
        if req not in signal_ctl:
            raise KeyError('%r is not a valid signal setting. Try one of: %s' % (req, ','.join(signal_ctl)))

        k = signal_ctl[req]
        _lib.opus_encoder_ctl(self._state, CTL_SET_SIGNAL, k)

    def set_fec(self, enabled=True):
        _lib.opus_encoder_ctl(self._state, CTL_SET_FEC, 1 if enabled else 0)

    def set_expected_packet_loss_percent(self, percentage):
        _lib.opus_encoder_ctl(self._state, CTL_SET_PLP, min(100, max(0, int(percentage * 100))))

    def encode(self, pcm, frame_size):
        max_data_bytes = len(pcm)
        pcm = ctypes.cast(pcm, c_int16_ptr)
        data = (ctypes.c_char * max_data_bytes)()

        ret = _lib.opus_encode(self._state, pcm, frame_size, data, max_data_bytes)

        return array.array('b', data[:ret]).tobytes()


text:
package uk.org.ngo.squeezer.itemlist.dialog;

import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnKeyListener;
import android.widget.EditText;

import uk.org.ngo.squeezer.R;

public abstract class BaseFilterDialog extends DialogFragment {

    protected View filterForm;

    protected abstract void filter();

    @NonNull
    @SuppressLint("InflateParams") // OK, as view is passed to AlertDialog.Builder.setView()
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        filterForm = getActivity().getLayoutInflater().inflate(R.layout.filter_dialog, null);
        builder.setTitle(R.string.menu_item_filter);
        builder.setView(filterForm);

        EditText editText = (EditText) filterForm.findViewById(R.id.search_string);
        editText.setOnKeyListener(new OnKeyListener() {
            @Override
            public boolean onKey(View v, int keyCode, KeyEvent event) {
                if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode
                        == KeyEvent.KEYCODE_ENTER)) {
                    filter();
                    dismiss();
                    return true;
                }
                return false;
            }
        });

        builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                filter();
            }
        });
        builder.setNegativeButton(android.R.string.cancel, null);

        return builder.create();
    }

}


text:
<?php
if (strtolower($_SERVER['REQUEST_METHOD']) != 'get') {
  // Returning "405: Method Not Allowed" if another method is provided
  exit(405);
}

// Adding default parameters to the call to offentligkonst.ses API
$parameters = $_GET;
$parameters['json']       = 'compact';
// Removes artworks located inside building
$parameters['is_inside']  = 'false';
// Removes artworks that have been destroyed or removed
$parameters['is_removed'] = 'false';
// Removed dublicates
$parameters['has_same']   = 'false';
if(isset($parameters['format'])) {
  $format = $parameters['format'];
  if(!($format == 'json' || $format == 'geojson')) {
    echo json_encode(array('error' => 'Format Not Recognised'));
    exit(602);
  }
}

// Initializing required values to retrieve artworks from Offentligkonst.ses API
$curlCounter = 0;
$result = "";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://offentligkonst.se/api/api.php?'.http_build_query($parameters));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// This file might be called asynchronous multiple times
// That might result in empty results from the API
// To be sure to retrieve data the request is tried up to five times
while($result == "" && $curlCounter < 5) {
  $result = curl_exec($ch);
}
curl_close($ch);
// Checking if the API call encountered any error
/*if($result === false) {
  echo json_encode(array('error' => curl_error($ch)));
  exit(630);
}*/
// Decoding JSON response
$response = json_decode(
  $result,
  true
);
/*if($response == NULL) {
  echo json_encode(array('error' => "Received JSON response was wrong formated"));
  exit(630);
}*/
$head = $response['head'];
if($head['status'] == '0') {
  echo json_encode(array('error' => $head['error_message']));
  exit($head['error_number']);
}
// If GeoJSON was requested the data is send as response
if($parameters['format'] == 'geojson') {
  echo json_encode($response);
  exit();
}

// Loads the ids for the artworks that are currently reported to have faultz coordinates
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://tools.wmflabs.org/wakt/api/apiReport.php');
curl_setopt($ch, CURLOPT_USERAGENT, "WAKT/1.0");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$reports = json_decode($result, true);

// Adding a reported key to the json data containing one artwork
// The artworks id returned from the API call is compared to the ids currently reported
foreach ($response['body'] as &$hit) {
  $hit = $hit['hit'];
  $hit['reported'] = in_array($hit['id'], $reports)? 1 : 0;
}
echo json_encode($response);
?>


text:
- [X] Set parameter sets where required
- [X] Alias (for function and maybe parameters)
- [X] Package as Module
- [X] Ability to change sound
- [X] Provide better feedback to users without PowerShell shortcut in start menu/screen
- [X] Fill out comment based help
- [X] Nicer validation script output (break out to function which throws)
- [X] Refactor
    - [X] Parameter Names?
	- [X] Variable names make sense?
	- [X] Any redundant code?
	- [X] Switch statement best way of taking care of text
- [X] AppId as Parameter (user can pass it in)
- [X] Default AppId gathered at run time using Get-StartApps
- [X] Add silent switch (toast makes no sound)
- [X] Don't try adding an image if a template with no image is selected

## Meta

- [ ] Write better install instructions for README.md
- [ ] Write install.ps1 script and chocolatey style Invoke-Expression install instructions
- [X] Write build script for compiling new .zip archives for point releases.


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

<title>SprmBuffer (POI API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

PREV CLASS

NEXT CLASS

FRAMES

NO FRAMES

All Classes

SUMMARY:

NESTED |

FIELD |

CONSTR |

METHOD

DETAIL:

FIELD |

CONSTR |

METHOD

org.apache.poi.hwpf.sprm

Class SprmBuffer

java.lang.Object

org.apache.poi.hwpf.sprm.SprmBuffer

All Implemented Interfaces:

java.lang.Cloneable

@Internal
public final class SprmBuffer
extends java.lang.Object
implements java.lang.Cloneable

Constructor Summary

Constructors

Constructor and Description

SprmBuffer()

Deprecated.

Use SprmBuffer(int) instead

SprmBuffer(byte[] buf)

Deprecated.

Use SprmBuffer(byte[],int) instead

SprmBuffer(byte[] buf,
          boolean istd)

Deprecated.

Use SprmBuffer(byte[],boolean,int) instead

SprmBuffer(byte[] buf,
          boolean istd,
          int sprmsStartOffset)

SprmBuffer(byte[] buf,
          int _sprmsStartOffset)

SprmBuffer(int sprmsStartOffset)

Method Summary

Methods

Modifier and Type
Method and Description

void
addSprm(short opcode,
       byte operand)

void
addSprm(short opcode,
       byte[] operand)

void
addSprm(short opcode,
       int operand)

void
addSprm(short opcode,
       short operand)

void
append(byte[] grpprl)

void
append(byte[] grpprl,
      int offset)

SprmBuffer
clone()

boolean
equals(java.lang.Object obj)

SprmOperation
findSprm(short opcode)

int
hashCode()

SprmIterator
iterator()

byte[]
toByteArray()

java.lang.String
toString()

void
updateSprm(short opcode,
          boolean operand)

void
updateSprm(short opcode,
          byte operand)

void
updateSprm(short opcode,
          int operand)

void
updateSprm(short opcode,
          short operand)

Methods inherited from class java.lang.Object

finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SprmBuffer

@Deprecated
public SprmBuffer()

Deprecated. Use SprmBuffer(int) instead

SprmBuffer

@Deprecated
public SprmBuffer(byte[] buf)

Deprecated. Use SprmBuffer(byte[],int) instead

SprmBuffer

@Deprecated
public SprmBuffer(byte[] buf,
                     boolean istd)

Deprecated. Use SprmBuffer(byte[],boolean,int) instead

SprmBuffer

public SprmBuffer(byte[] buf,
          boolean istd,
          int sprmsStartOffset)

SprmBuffer

public SprmBuffer(byte[] buf,
          int _sprmsStartOffset)

SprmBuffer

public SprmBuffer(int sprmsStartOffset)

Method Detail

addSprm

public void addSprm(short opcode,
           byte operand)

addSprm

public void addSprm(short opcode,
           byte[] operand)

addSprm

public void addSprm(short opcode,
           int operand)

addSprm

public void addSprm(short opcode,
           short operand)

append

public void append(byte[] grpprl)

append

public void append(byte[] grpprl,
          int offset)

clone

public SprmBuffer clone()

Overrides:

clone in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)

Overrides:

equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:

hashCode in class java.lang.Object

findSprm

public SprmOperation findSprm(short opcode)

toByteArray

public byte[] toByteArray()

iterator

public SprmIterator iterator()

updateSprm

public void updateSprm(short opcode,
              byte operand)

updateSprm

public void updateSprm(short opcode,
              boolean operand)

updateSprm

public void updateSprm(short opcode,
              int operand)

updateSprm

public void updateSprm(short opcode,
              short operand)

toString

public java.lang.String toString()

Overrides:

toString in class java.lang.Object

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

PREV CLASS

NEXT CLASS

FRAMES

NO FRAMES

All Classes

SUMMARY:

NESTED |

FIELD |

CONSTR |

METHOD

DETAIL:

FIELD |

CONSTR |

METHOD

                Copyright 2016 The Apache Software Foundation or
        its licensors, as applicable.


text:
using System;
using System.Collections.Generic;
using SIL.Lift;
using SIL.ObjectModel;

namespace SIL.DictionaryServices.Model
{
	public sealed class LexExampleSentence: PalasoDataObject, ICloneable<LexExampleSentence>, IEquatable<LexExampleSentence>
	{
		private string _translationType;

		//!!What!! Is this done this way so that we don't end up storing
		//  the data in the object database?
		//Answer:
		//This was done to avoid magic strings for property retrieval That way we can say
		//lexSentence.GetProperty<MultiText>(LexExampleSentence.WellKnownProperties.ExampleSentence) instead of lexSentence.GetProperty<MultiText>("ExampleSentence") --TA 9/24/2012
		public new class WellKnownProperties: PalasoDataObject.WellKnownProperties
		{
			public static string ExampleSentence = "ExampleSentence";
			public static string Translation = "ExampleTranslation";
			public static string Source = "source";

			public static bool Contains(string fieldName)
			{
				List<string> list =
					new List<string>(new string[] {ExampleSentence, Source, Translation});
				return list.Contains(fieldName);
			}
		} ;

		public LexExampleSentence(PalasoDataObject parent): base(parent)
		{
			var sentence = GetOrCreateProperty<MultiText>(WellKnownProperties.ExampleSentence);
			sentence.Parent = this;
			var translation = GetOrCreateProperty<MultiText>(WellKnownProperties.Translation);
			translation.Parent = this;
			WireUpEvents();
		}

		/// <summary>
		/// Used when a list of these items adds via "AddNew", where we have to have a default constructor.
		/// The parent is added in an even handler, on the parent, which is called by the list.
		/// </summary>
		public LexExampleSentence(): this(null) {}

		public MultiText Sentence
		{
			get { return GetOrCreateProperty<MultiText>(WellKnownProperties.ExampleSentence); }
		}

		public MultiText Translation
		{
			get { return GetOrCreateProperty<MultiText>(WellKnownProperties.Translation); }
		}

		public override bool IsEmpty
		{
			get { return Sentence.Empty && Translation.Empty && !HasProperties; }
		}

		/// <summary>
		/// Supports round-tripping, though we don't use it
		/// </summary>
		public string TranslationType
		{
			get { return _translationType; }
			set { _translationType = value; }
		}

		public LexExampleSentence Clone()
		{
			var clone = new LexExampleSentence();
			clone._translationType = _translationType;
			//We clear the properties here because ExampleSentence comes with ExampleSentence and ExampleTranslation properties on construction
			//and it's just easier to treat them like any other property on clone
			clone.Properties.Clear();
			foreach (var keyValuePairToClone in Properties)
			{
				clone.AddProperty(keyValuePairToClone.Key, keyValuePairToClone.Value.Clone());
			}
			return clone;
		}

		public override bool Equals(Object obj)
		{
			if (!(obj is LexExampleSentence)) return false;
			return Equals((LexExampleSentence)obj);
		}

		public bool Equals(LexExampleSentence other)
		{
			if (ReferenceEquals(null, other)) return false;
			if (ReferenceEquals(this, other)) return true;
			if (!base.Equals(other)) return false;
			if ((_translationType != null && !_translationType.Equals(other._translationType)) || (other._translationType != null && !other._translationType.Equals(_translationType))) return false;
			return true;
		}
	}
}


text:
<?php
return array(

    'application.models.*',
    'application.components.*',
    'application.extensions.*',
	'application.extensions.easyPaypal.*',
    'ext.giix-components.*',

    'application.modules.user.UserModule',
    'application.modules.user.models.*',
    'application.modules.user.components.*',

	'application.modules.rights.*',
	'application.modules.rights.components.*',

	'application.modules.contacts.ContactModule',
	'application.modules.contacts.models.*',
	'application.modules.contacts.components.*',

	'application.modules.services.ServicesModule',
	'application.modules.services.models.*',
	'application.modules.services.components.*',

	'application.modules.new.NewModule',
	'application.modules.new.models.*',
	'application.modules.new.components.*',

	'application.modules.projects.ProjectsModule',
	'application.modules.projects.models.*',
	'application.modules.projects.components.*',

	'application.modules.stocks.StocksModule',
	'application.modules.stocks.models.*',
	'application.modules.stocks.components.*',

	'application.modules.bookings.BookingsModule',
	'application.modules.bookings.models.*',
	'application.modules.bookings.components.*',

	'editable.*', //easy include of editable classes

	// include bootstrap
	'bootstrap.helpers.TbHtml',
	'bootstrap.helpers.TbArray',
	'bootstrap.behaviors.*'

);


text:
package com.defano.wyldcard.sound;

public class MusicalNote {

    private final MusicalPitch frequency;
    private final MusicalDuration duration;

    public MusicalNote (MusicalPitch frequency, MusicalDuration duration) {
        this.frequency = frequency;
        this.duration = duration;
    }

    public static MusicalNote fromMiddleCQuarterNote() {
        return new MusicalNote(MusicalPitch.C4, MusicalDuration.QUARTER);
    }

    public static MusicalNote fromNameAccidentalOctaveDuration(char name, char accidental, int octave, MusicalDuration duration) {
        return new MusicalNote(MusicalPitch.of(name, accidental, octave), duration);
    }

    public static MusicalNote fromString(MusicalNote previousNote, String note) {
        if (note == null || note.length() == 0) {
            return previousNote;
        }

        int index = 0;

        Character name = parseName(note, index);
        Character accidental = parseAccidental(note, name != null ? ++index : index);
        Integer octave = parseOctave(note, accidental != null ? ++ index : index);
        MusicalDuration duration = parseDuration(note, octave != null ? ++index : index);

        return MusicalNote.fromNameAccidentalOctaveDuration(
                name == null ? previousNote.getFrequency().getName() : name,
                accidental == null ? '-' : accidental,
                octave == null ? previousNote.getFrequency().getOctave() : octave,
                duration == null ? previousNote.duration.getUndotted() : duration);
    }

    public MusicalPitch getFrequency() {
        return frequency;
    }

    public MusicalDuration getDuration() {
        return duration;
    }

    private static Character parseAccidental(String note, int index) {
        if (note.length() <= index) {
            return null;
        }

        if (note.substring(index).contains("#")) {
            return '#';
        }

        if (note.substring(index).contains("b")) {
            return 'b';
        }

        return null;
    }

    private static Character parseName(String note, int index) {
        if (note.length() <= index) {
            return null;
        }

        if (note.charAt(index) >= 'a' && note.charAt(index) <= 'g') return note.charAt(index);
        if (note.charAt(index) == 'r') return note.charAt(index);

        return null;
    }

    private static Integer parseOctave(String note, int index) {
        int octave;

        if (note.length() <= index) {
            return null;
        }

        try {
            octave = Integer.parseInt(note.substring(index, index + 1));
        } catch (NumberFormatException e) {
            octave = -1;
        }

        return (octave >= 0 && octave <= 8) ? octave : null;
    }

    private static MusicalDuration parseDuration(String note, int index) {
        if (note.length() <= index) {
            return null;
        }

        return MusicalDuration.fromString(note.substring(index));
    }
}


text:
module ApplicationHelper
  include NavigationHelper

  def contact_number(appointment)
    if appointment.due_diligence?
      '0800 015 4906'
    elsif appointment.embedded?
      '0800 100 166'
    else
      '0800 138 3944'
    end
  end

  def contact_hours(appointment)
    if appointment.due_diligence?
      '9am to 5pm'
    else
      '8am to 6:30pm'
    end
  end

  def book_an_appointment_link?
    true
  end

  def link_to_guide(guide)
    capture do
      if guide.option?
        concat content_tag(:span, nil, class: "circle circle--s circle--#{guide.id}")
      end

      concat link_to(guide.label, guide.url, class: 't-guide-link')
    end
  end

  def disable_scroll_to_top
    '<meta name="disable_scroll_to_top" content="true"/>'.html_safe
  end
end


text:
using Microsoft.CodeAnalysis;

namespace DotvvmAcademy.Meta
{
    public interface ITypedConstantExtractor
    {
        object Extract(TypedConstant constant);
    }
}


text:
test:
	jasmine-node --color spec


text:
import { NgModule } from '@angular/core';
import { IonicPageModule } from '../../../../../..';
import { NonTabOne } from './non-tab-one';

@NgModule({
  imports: [
    IonicPageModule.forChild(NonTabOne)
  ],
  declarations: [
    NonTabOne
  ]
})
export class NonTabOneModule { }


text:
layout: doc
title: Gegevens uit het veld bewerken
permalink: /nl/josm/editing-with-josm/
lang: nl
category: josm
---

Gegevens uit het veld bewerken
==================

> Deze handleiding kan worden gedownload als [josm_editing-with-josm_nl.odt](/files/josm_editing-with-josm_nl.odt) of [josm_editing-with-josm_nl.pdf](/files/josm_editing-with-josm_nl.pdf)
> Bijgewerkt op 13-07-2015

We hebben nu alle bouwblokken voor het maken van kaarten met OpenStreetMap behandeld.
In het gedeelte [Mapping with a Smartphone, GPS or Paper](/nl/mobile-mapping/) kunt u zien hoe u mobiele gereedschappen gebruikt om een gebied te verkennen en vast te leggen.

In dit hoofdstuk keren we nog een keer terug naar JOSM en kijken we naar een aantal nieuwe
concepten die we tot op heden nog niet behandeld hebben.

Lagen in JOSM
-----------
Als u alles gevolgd heeft zou het u opgevallen kunnen zijn dat we allerlei soorten
verschillende dingen kunnen toevoegen in JOSM. We kunnen gegevens van OSM downloaden, satellietafbeeldingen van Bing toevoegen,
load GPS-sporen en punten laden, en Veldbeschrijvingen toevoegen - welke alle wordne weergegeven
in het kaartvenster van JOSM.

Het zal u misschien zijn opgevallen dat, elke keer als u iets nieuws toevoegt aan JOSM, een aanvullend
item wordt toegevoegd aan het Lagenpaneel aan de rechterzijde van JOSM. Afhankelijk van wat u heeft
geopend, zou uw Lagenpaneel er ongeveer zo uit kunnen zien:

![Layers panel][]

Elk item in deze lijst vertegenwoordigt een verschillende bron van gegevens die
u heeft geopend in uw kaartvenster. In dit voorbeeld is "Data Layer
1" de gegevens van OpenStreetMap die we bewerken. "Field Papers" is
de laag die werd gemaakt toen we onze Veldformulieren toevoegden aan JOSM.

Indien u satellietafbeeldingen van Bing toevoegt, zal een nieuwe laag, genaamd "Bing Sat", in het Lagenpaneel verschijnen.

Het concept van lagen is soms moeilijk te begrijpen. Een goede manier om het te visualiseren is dat elke
laag is als een semi-doorzichtig stuk papier, en zijn zijn allemaal bovenop elkaar
gestapeld. Elk stuk papier bevat een bepaald type informatie, en zijn kunnen opnieuw worden geschikt
op elke manier die u wilt.

Lage die als verwijzingen worden gebruikt, zoals satellietafbeeldingen, GPS-sporen en Veldformulieren
worden vaak "basislagen" genoemd. De laag met gegevens van OSM is de laag waar u in feite mee werkt.

-   Klik, om een laag te verplaatsen, er op in het Lagenpaneel en klik op de pijl naar boven
    of naar beneden om hem te verplaatsen.

![Layers up down][]

-  Selecteer, om een laag te verbergen, die met uw muis en
    klik op de knop Weergeven/Verbergen:

![Layers show hide][]

-  U zou moeten zien dat de door u geselecteerde laag verdwijnt van de kaart
    venster. Klik opnieuw op Weergeven/Verbergen en het zal weer verschijnen.
-  U kunt een laag verwijderen door die te selecteren en de knop Delete
    te gebruiken:

![Layers delete][]

- Tenslotte is het belangrijk te weten dat u alleen de laag kunt bewerken die
    als *actief* wordt beschouwd door JOSM. Als u niet in staat bent de kaart te bewerken in
    uw kaartvenster, is dat waarschijnlijk omdat u niet de juiste
    laag als actief hebt ingesteld. De meeste lagen, zoals GPS-punten, Veld
    formulieren en satellietafbeeldingen, kunnen niet worden bewerkt. De enige lagen die
    die kunnen worden bewerkt zijn gegevens van OpenStreetMap, die gewoonlijk is genaamd
    "Gegevenslaag 1".
-  Selecteer, om een laag actief te maken, die in het Lagenpaneel en klik op
    de knop Activeren:

![Layers activate][]

GPS-gegevens en Veldformulieren gebruiken
-------------------------------
In de hoofdstukken [Mapping with a Smartphone, GPS or Paper](/nl/mobile-mapping/) zagen we hoe gegevens te verzamelen met een GPS
en Veldformulieren, en hoe die in JOSM te laden als een laag.

Als u eenmaal veldonderzoek hebt gedaan met één van deze gereedschappen, dient u nog steeds
digitaal de informatie toe te voegen aan OpenStreetMap.

U doet dit met hetzelfde proces als dat wat u eerder leerde - **downloaden,
bewerken, opslaan**. Het verschil is dat in plaats van alleen satelliet
afbeeldingen te gebruiken als een basislaag, kunt u ook uw GPS-gegevens, Veldformulieren,
notities, of een combinatie daarvan gebruiken.

-   Bijvoorbeeld: laten we er van uitgaan dat u uw GPS-punten als een achtergrond
    laag in JOSM, u heeft een punt op uw GPS opgeslagen onder de naam 030, en
    u schreef in uw notitieboekje dat 030 een school is. Voor het toevoegen van dit punt
    in OpenStreetMap, selecteert u het gereedschap Tekenen, en
    dubbelklik op punt 030 in uw kaartvenster. Dit zal
    een punt maken. Ga dan naar het menu Voorkeuzen en zoek naar de voorkeuze voor
    school. Voer de naam van de school in en klik op "Voorkeuze toepassen". Doe
    hetzelfde om lijnen en vormen toe te voegen.

![GPS in JOSM][]

Tags
----
Wanneer u een punt, lijn, of vorm tekent, heeft het een locatie, maar geen
informatie over wat het is. Met andere woorden, we weten **waar** het
is, maar niet **wat** het is. Hiervoor gebruikten we items
uit het menu Voorkeuzen om te definiëren **wat** het is. De manier
waarop OpenStreetMap weet **wat** een object is is door **tags** te gebruiken.

Een tag is als een label dat u op iets kunt plakken. Bijvoorbeeld, als
als we een vierkant tekenen, is het slechts een vierkant. Maar dan voegen we attributen toe
die beschrijven wat het is: dit vierkant is een gebouw; de naam van
het gebouw is "Menara Thamrin"; het gebouw is 16 lagen hoog.

U kunt net zoveel tags aan een object toevoegen als u wilt. Tags worden opgeslagen als
paren van tekst, genaamd **sleutels** en de **waarden**. In
OpenStreetMap zouden de hierboven geschreven tags zouden in feite zijn:

-   building = yes
-   name = Menara Thamrin
-   building:levels = 16

Wanneer u een object in JOSM selecteert, kunt u alle tags die er aan zijn
verbonden in het paneel Eigenschappen aan de rechterzijde.

![Properties panel][]

### Tags bewerken
U kunt tags toevoegen, bewerken of verwijderen vanuit het paneel Eigenschappen. De tags zijn echter
traditioneel in het Engels en kunnen soms verwarrend zijn, dus is
het vaak eenvoudiger om het menu Voorkeuzen te gebruiken. Wanneer u tags toevoegt of wijzigt, worden de attributen
van het object gewijzigd.

-   Selecteer eerst een object om de tags ervan te bewerken.
-   Bewerk dan de tags op één van de twee manieren: (1) Gebruik het menu Voorkeuzen,
    of (2) bewerk de tags direct in het venster Eigenschappen aan de rechterzijde.

### Veel voorkomende fout: Taggen van knopen wanneer u lijnen of polygonen wilt taggen
Wanneer u de attributen van een punt bewerkt, zult u eerst
het punt selecteren en dan tags toevoegen, ofwel via het menu Voorkeuzen of direct
in het paneel Eigenschappen. Een veel voorkomende fout gebeurt vaak bij het toevoegen van attributen aan een
lijn of een vorm. Bij het selecteren van het object, is het belangrijk dat u
de lijn selecteert, en NIET de punten die de lijn vormen.

Dit komt regelmatig voor omdat bewerkers het gereedschap selectie in JOSM gebruiken om een
vak rondom een object te tekenen, wat er voor zorgt dat alles, zowel de lijn **en** de knopen
worden geselecteerd, en wanneer u tags toevoegt worden zij ook toegepast op de
knopen. Zorg er voor **alleen** lijnen te selecteren wanneer u daaraan tags
 wilt toevoegen.

![Nodes mistake][]

OSM-bestanden opslaan
----------------
Wanneer u in JOSM bewerkt, is het altijd een goed idee om te downloaden, te bewerken, en
wijzigingen te uploaden in een redelijk korte periode. U wilt niet de ene dag
gegevens downloaden, en dan een paar dagen wachten om uw bewerkingen te uploaden. Wat als
iemand anders hetzelfde gebied bewerkt gedurende die tijd? Dat zal fouten en conflicten veroorzaken.

Wees niet bang om uw bewerkingen regelmatig te uploaden. Dat zorgt er voor dat uw wijzigingen zullen
worden opgeslagen in de database en u zult uw harde werk niet verliezen.

Als u werkt in één enkel gebied, is het een goed idee om de kaartgegevens te downloaden
elke keer als u wilt bewerken, voor het geval een andere gebruiker wijzigingen heeft gemaakt.

Hoewel u altijd zou moeten proberen gegevens van OSM te downloaden als u klaar bent om te gaan bewerken,
en uw wijzigingen regelmatig zou moeten uploaden, zouden er gevallen kunnen zijn waarin u
de gegevens van OSM wilt opslaan op uw computer. Bijvoorbeeld als uw verbinding
met het internet wordt onderbroken,dan wilt u gegevens downloaden, ze opslaan, bewerken, en dan uw
wijzigingen later uploaden.

-  Zorg er voor, om een OSM-bestand op te slaan, dat het de actieve laag is in
    het Lagenpaneel. Klik op "Bestand" in het bovenste menu, en klik op "Opslaan".
    Kies een locatie voor het bestand en geef het een naam. U kunt ook opslaan
    door op deze knop te klikken:

![JOSM save button][]

-  U kunt nu JOSM sluiten en uw gegevens zullen zijn opgeslagen. Wanneer u
    het bestand opnieuw wilt openen, open eenvoudigweg JOSM, ga naar het menu "Bestand", en
    klik op "Openen..."

Samenvatting
-------
In dit hoofdstuk hebben we meer in detail gekeken naar de interface van JOSM interface en geleerd
over lagen en tags. U zou nu een goede basis moeten hebben om dingen in kaart te brengen en hoe
OpenStreetMap te bewerken.

[Layers panel]: /images/josm/josm_layers-panel.png
[Layers up down]: /images/josm/josm_layers-panel-up-down.png
[Layers show hide]: /images/josm/josm_layers-panel-show-hide.png
[Layers delete]: /images/josm/josm_layers-panel-delete.png
[Layers activate]: /images/josm/josm_layers-panel-activate.png
[GPS in JOSM]: /images/josm/josm_gps-layer.png
[Properties panel]: /images/josm/josm_properties-panel.png
[Nodes mistake]: /images/josm/josm_nodes-selected-mistake.png
[JOSM save button]: /images/josm/josm_save-button.png


text:
package org.elasticsearch.test.rest.yaml;

import org.apache.logging.log4j.Logger;
import org.elasticsearch.Version;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.xcontent.XContentFactory;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Execution context passed across the REST tests.
 * Holds the REST client used to communicate with elasticsearch.
 * Caches the last obtained test response and allows to stash part of it within variables
 * that can be used as input values in following requests.
 */
public class ClientYamlTestExecutionContext {

    private static final Logger logger = Loggers.getLogger(ClientYamlTestExecutionContext.class);

    private final Stash stash = new Stash();
    private final ClientYamlTestClient clientYamlTestClient;

    private ClientYamlTestResponse response;

    public ClientYamlTestExecutionContext(ClientYamlTestClient clientYamlTestClient) {
        this.clientYamlTestClient = clientYamlTestClient;
    }

    /**
     * Calls an elasticsearch api with the parameters and request body provided as arguments.
     * Saves the obtained response in the execution context.
     */
    public ClientYamlTestResponse callApi(String apiName, Map<String, String> params, List<Map<String, Object>> bodies,
                                    Map<String, String> headers) throws IOException {
        //makes a copy of the parameters before modifying them for this specific request
        HashMap<String, String> requestParams = new HashMap<>(params);
        requestParams.putIfAbsent("error_trace", "true"); // By default ask for error traces, this my be overridden by params
        for (Map.Entry<String, String> entry : requestParams.entrySet()) {
            if (stash.containsStashedValue(entry.getValue())) {
                entry.setValue(stash.getValue(entry.getValue()).toString());
            }
        }

        String body = actualBody(bodies);
        try {
            response = callApiInternal(apiName, requestParams, body, headers);
            return response;
        } catch(ClientYamlTestResponseException e) {
            response = e.getRestTestResponse();
            throw e;
        } finally {
            // if we hit a bad exception the response is null
            Object responseBody = response != null ? response.getBody() : null;
            //we always stash the last response body
            stash.stashValue("body", responseBody);
        }
    }

    private String actualBody(List<Map<String, Object>> bodies) throws IOException {
        if (bodies.isEmpty()) {
            return "";
        }

        if (bodies.size() == 1) {
            return bodyAsString(stash.replaceStashedValues(bodies.get(0)));
        }

        StringBuilder bodyBuilder = new StringBuilder();
        for (Map<String, Object> body : bodies) {
            bodyBuilder.append(bodyAsString(stash.replaceStashedValues(body))).append("\n");
        }
        return bodyBuilder.toString();
    }

    private String bodyAsString(Map<String, Object> body) throws IOException {
        return XContentFactory.jsonBuilder().map(body).string();
    }

    private ClientYamlTestResponse callApiInternal(String apiName, Map<String, String> params, String body, Map<String, String> headers)
            throws IOException  {
        return clientYamlTestClient.callApi(apiName, params, body, headers);
    }

    /**
     * Extracts a specific value from the last saved response
     */
    public Object response(String path) throws IOException {
        return response.evaluate(path, stash);
    }

    /**
     * Clears the last obtained response and the stashed fields
     */
    public void clear() {
        logger.debug("resetting client, response and stash");
        response = null;
        stash.clear();
    }

    public Stash stash() {
        return stash;
    }

    /**
     * Returns the current es version as a string
     */
    public Version esVersion() {
        return clientYamlTestClient.getEsVersion();
    }

}


text:
import argparse
parser = argparse.ArgumentParser(description='calculate X to the power of Y')

# -v and -q are conflicting or 'mutually exclusive'
group = parser.add_mutually_exclusive_group()
group.add_argument('-v', '--verbose', action="store_true")
group.add_argument('-q', '--quiet', action='store_true')

parser.add_argument('x', type=int, help='the base')
parser.add_argument('y', type=int, help='the exponent')

args = parser.parse_args()

answer = args.x**args.y

if args.quiet:
  print answer
elif args.verbose:
  print "{} to the power of {} equals {}".format(args.x, args.y, answer)
else:
  print "{}^{} == {}".format(args.x, args.y, answer)


text:
<li <f:if condition="{jobPosition.parent.parent}">class="collapsed"</f:if>>

		<f:if condition="{jobPosition.person.profilePhoto}">
			<f:then>

			</f:then>
			<f:else>

			</f:else>
		</f:if>

		<f:if condition="{jobPosition.person}">
			<f:then>

{jobPosition.person.name}

			</f:then>
			<f:else>

not assigned yet

			</f:else>
		</f:if>

{jobPosition.name}

		<f:if condition="{jobPostion.department">

{jobPosition.department.name}

		</f:if>

		<a href="{f:uri.action(package:'Beech.CLA', controller:'JobPosition', action:'edit', arguments: {jobPosition: jobPosition})}" data-toggle="modal-ajax" data-target="#modal" modal-size="small" title="<f:translate id="action.edit">Edit</f:translate>">

		<a href="{f:uri.action(package:'Beech.CLA', controller:'JobPosition', action:'new', arguments: {parentJobPosition: jobPosition})}" data-toggle="modal-ajax" data-target="#modal" modal-size="small" title="<f:translate id="action.add-jopPosition">Add JobPosition</f:translate>">

	<f:if condition="{jobPosition.children}">

			<f:for each="{jobPosition.children}" as="child" iteration="iterator">
				<f:render partial="JobPosition/VisialNode" arguments="{jobPosition:child}" />
			</f:for>

	</f:if>


text:
"use strict";
const typed_dom_1 = require("./typed-dom");
const search_patient_1 = require("./search-patient");
class RecordsSearchPatient {
    constructor() {
        this.onGotoRecordsByDate = () => { };
        this.search = new search_patient_1.SearchPatient();
        this.dom = typed_dom_1.h.div({}, [
            this.topMenu(),
            typed_dom_1.h.h1({}, ["患者ごとの診療録リスト"]),
            this.search.dom
        ]);
    }
    setOnSelect(cb) {
        this.search.setOnSelect(cb);
    }
    setOnGotoRecordsByDate(cb) {
        this.onGotoRecordsByDate = cb;
    }
    topMenu() {
        let bindClick = (e) => {
            e.addEventListener("click", event => {
                this.onGotoRecordsByDate();
            });
        };
        return typed_dom_1.h.div({}, [
            typed_dom_1.f.a(bindClick, {}, ["診察日ごとの診療録へ"])
        ]);
    }
}
exports.RecordsSearchPatient = RecordsSearchPatient;


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>com.fasterxml.jackson.core.util Class Hierarchy (Jackson-core 2.3.0 API)</title>
<meta name="date" content="2013-11-13">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Hierarchy For Package com.fasterxml.jackson.core.util

Package Hierarchies:

All Packages

Class Hierarchy

java.lang.Object

java.util.AbstractMap<K,V> (implements java.util.Map<K,V>)

java.util.concurrent.ConcurrentHashMap<K,V> (implements java.util.concurrent.ConcurrentMap<K,V>, java.io.Serializable)

com.fasterxml.jackson.core.util.InternCache

com.fasterxml.jackson.core.util.BufferRecycler

com.fasterxml.jackson.core.util.DefaultPrettyPrinter (implements com.fasterxml.jackson.core.util.Instantiatable<T>, com.fasterxml.jackson.core.PrettyPrinter, java.io.Serializable)

com.fasterxml.jackson.core.util.DefaultPrettyPrinter.NopIndenter (implements com.fasterxml.jackson.core.util.DefaultPrettyPrinter.Indenter, java.io.Serializable)

com.fasterxml.jackson.core.util.DefaultPrettyPrinter.FixedSpaceIndenter

com.fasterxml.jackson.core.util.DefaultPrettyPrinter.Lf2SpacesIndenter

com.fasterxml.jackson.core.JsonGenerator (implements java.io.Closeable, java.io.Flushable, com.fasterxml.jackson.core.Versioned)

com.fasterxml.jackson.core.util.JsonGeneratorDelegate

com.fasterxml.jackson.core.JsonParser (implements java.io.Closeable, com.fasterxml.jackson.core.Versioned)

com.fasterxml.jackson.core.util.JsonParserDelegate

com.fasterxml.jackson.core.util.JsonParserSequence

com.fasterxml.jackson.core.util.MinimalPrettyPrinter (implements com.fasterxml.jackson.core.PrettyPrinter, java.io.Serializable)

java.io.OutputStream (implements java.io.Closeable, java.io.Flushable)

com.fasterxml.jackson.core.util.ByteArrayBuilder

com.fasterxml.jackson.core.util.TextBuffer

com.fasterxml.jackson.core.util.VersionUtil

Interface Hierarchy

com.fasterxml.jackson.core.util.DefaultPrettyPrinter.Indenter

com.fasterxml.jackson.core.util.Instantiatable<T>

Enum Hierarchy

java.lang.Object

java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)

com.fasterxml.jackson.core.util.BufferRecycler.ByteBufferType

com.fasterxml.jackson.core.util.BufferRecycler.CharBufferType

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2012-2013 FasterXML. All Rights Reserved.


text:
<!DOCTYPE html>

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="generator" content="Hugo 0.57.2" />
<meta property="og:title" content="Sponsor" />
<meta name="twitter:title" content="Sponsor"/>
<meta itemprop="name" content="Sponsor"><meta property="og:description" content="Sponsor devopsdays Toronto 2018" />
  <meta name="twitter:description" content="Sponsor devopsdays Toronto 2018" />
  <meta itemprop="description" content="Sponsor devopsdays Toronto 2018"><meta name="twitter:site" content="@devopsdays">
<meta property="og:type" content="event" />
<meta property="og:url" content="/events/2018-toronto/sponsor/" /><meta name="twitter:creator" content="@devopsdaysTO" /><meta name="twitter:label1" value="Event" />
  <meta name="twitter:data1" value="devopsdays Toronto 2018" /><meta name="twitter:label2" value="Dates" />
    <meta name="twitter:data2" value="May 30 - 31, 2018" /><meta property="og:image" content="https://www.devopsdays.org/img/sharing.jpg" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://www.devopsdays.org/img/sharing.jpg" />
<meta itemprop="image" content="https://www.devopsdays.org/img/sharing.jpg" />
<meta property="fb:app_id" content="1904065206497317" /><meta itemprop="wordCount" content="254">
<title>devopsdays Toronto 2018 - sponsorship information
</title>

<link href="/css/site.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:300,400,700" rel="stylesheet"><link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192"  href="/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">

      <link href="/events/index.xml" rel="alternate" type="application/rss+xml" title="DevOpsDays" />
      <link href="/events/index.xml" rel="feed" type="application/rss+xml" title="DevOpsDays" />

  DevOpsDays

<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">

</button>

events

blog

sponsor

speaking

organizing

about

  Toronto
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar2">

</button>

                  location

                  program

                  speakers

                  sponsor

                  contact

                  conduct

devopsdays Toronto - Sponsor

The devopsdays event mandate is to bring the highest quality speakers, experts and the curious together. By sponsoring devopsdays, you will be exposing your company's brand and services to Toronto's top talent in this rapidly growing space. (And feel great about it, too!)

Download our prospectus to see the features of the various sponsorship options.

We greatly value sponsors for this open event. If you are interested in sponsoring, please email us at organizers-toronto-2018@devopsdays.org
.

Platinum Sponsors

Gold Sponsors

Silver Sponsors

Lanyard Sponsors

Happy Hour Sponsors
Join as Happy Hour Sponsor!

Lunch Sponsors
Join as Lunch Sponsor!

Bronze Sponsors
Join as Bronze Sponsor!

@DEVOPSDAYS

BLOG

10 years of devopsdays

by Kris Buytaert - 10 May, 2019

It’s hard to believe but it is almost 10 years ago since #devopsdays happened for the first time in Gent. Back then there were almost 70 of us talking about topics that were of interest to both Operations and Development, we were exchanging our ideas and experiences `on how we were improving the quality of software delivery.
Our ideas got started on the crossroads of Open Source, Agile and early Cloud Adoption.

Blogs

10 May, 2019

Feed

CFP OPEN
Campinas
Macapá
Shanghai
Recife
Charlotte
Prague
Tokyo
Salt Lake City

Propose a talk at an event near you!

About

    devopsdays is a worldwide community conference series for anyone interested in IT improvement.

    About devopsdays

    Privacy Policy

    Code of Conduct


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <integer name="sections_rows_count">4</integer>

</resources>


text:
using System;

public static class Program {
    public static void Main () {
        var parseMethodInfo = typeof(int).GetMethod("Parse", new Type[] { typeof(string) });
        var result = parseMethodInfo.Invoke(null, new object[] { "14" });

        Console.WriteLine(result);
    }
}


text:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;

public class GameController : MonoBehaviour {

	bool initiated = false; //Used to check if the Start button was pressed (in the main loop - UPDATE method)
	float timeElapsed; //Turn timer
	float randomTurnTimer = 1.50f;
	float randomActionTimer = 1.50f;
	Color sliderColor;

	// Counter for the number of turns per team. Used in unit tests
	int numAllies = 0;
	int numEnemies = 0;

	//TextField names
	string stateTextName = "TextCenter";
	string timerTextName = "TextTimer";
	string queueTextName = "TextQueue";
	string queueActionTextName = "TextAction";
	string allyTeamTextName = "AlliesLabelText";
	string enemyTeamTextName = "EnemiesLabelText";

	//Lists used for turn and action queues
	List<string> slidersTurnQueue = new List<string>();
	List<string> slidersActionQueue = new List<string> ();

	//List used  to identify enemies and allies
	List<string> slidersNameList = new List<string>();

	//Hashmaps
	Dictionary <string, int> speedList;		//Speeds related to player
	Dictionary <string, Text> textFields;	//TextFields related to their names
	Dictionary <string, Slider> sliders;	//Sliders related to their names

	//Input: speed for each ally or enemy in combat, passed as a script parameter
	public int Ally1Speed;
	public int Ally2Speed;
	public int Ally3Speed;
	public int Ally4Speed;
	public int Enemy1Speed;
	public int Enemy2Speed;
	public int Enemy3Speed;
	public int Enemy4Speed;

	//Loading of speed parameters in the speed hashmap
	void loadSpeedList(){
		speedList = new Dictionary<string,int> ();
		speedList.Add ("Ally1", Ally1Speed);
		speedList.Add ("Ally2", Ally2Speed);
		speedList.Add ("Ally3", Ally3Speed);
		speedList.Add ("Ally4", Ally4Speed);
		speedList.Add ("Enemy1", Enemy1Speed);
		speedList.Add ("Enemy2", Enemy2Speed);
		speedList.Add ("Enemy3", Enemy3Speed);
		speedList.Add ("Enemy4", Enemy4Speed);
	}

	//INPUT:Variables used to simulate idle time or animations
	public float minRndRange;
	public float maxRndRange;

	//INPUT: variable used to set initial timer value
	public float timeElapsedDefault;

	//When the object -to which this script has been attached- is created, START method is triggered
	void Start(){
		//Load every Text object in the Hashmap, identifying them by their names
		textFields= new Dictionary <string, Text>();
		Text[] textFieldsArray = FindObjectsOfType (typeof(Text)) as Text[];
		foreach (Text txt in textFieldsArray) {
			textFields.Add(txt.name,txt);
		}

		//Load every slider (which represents one fighter) in the Hashmap
		sliders = new Dictionary <string,Slider>();
		Slider [] sliderArray = FindObjectsOfType (typeof(Slider)) as Slider[];
		foreach (Slider sld in sliderArray) {
			sliders.Add(sld.name,sld);
			slidersNameList.Add(sld.name);
		}
		//Save default color in sliderColor variable
		Image img = (Image)sliderArray[0].fillRect.transform.GetComponent("Image");
		sliderColor = img.color;

		//Load speeds [add them in the remaining Hashmap]
		loadSpeedList();

		//Set maximum value for the timer
		timeElapsed = timeElapsedDefault;
	}

	/* ----- BUTTON LISTENERS ---- //
	StartFight and PerformAction are the two methods triggered when pressing buttons in the interface.
	This can be set up updating the "onClick" method in any of the Button objects
	*/

	//Initiates the simulation
	public void StartFight () {
		//Set values to zero in the event that it was already running
		ValuesToZero ();
		//Update interface to show that fight has started
		textFields[stateTextName].text = "Fight initiated";
		textFields[timerTextName].text = "TIMER: " + timeElapsed.ToString();
		initiated = true;
	}

	//Simulates an action
	public void PerformAction (int index) {
		// Right now every button does the same: stopping and reseting the timer
		if (index == 0) {
			//Check if there's someone in the turn queue
			if (slidersTurnQueue.Count>0){
				string name = slidersTurnQueue[0];
				//Check if that someone is an ally
				if (name.Contains("Ally")){
					//Reset Slider to zero and add ally to the action Queue
					ResetSliderValue(slidersTurnQueue[0]);
					slidersTurnQueue.RemoveAt(0);
					slidersActionQueue.Add(name);
					//Reset timer
					timeElapsed = timeElapsedDefault;
				}
			}
		}
	}

	void Update(){
		/*Main loop that is only executed if fight started. This may have to be moved to FixedUpdate or LateUpdate
		 * depending on whether animations, graphic particles and interactions are added in this script or not.
		*/
		if (initiated) {
			// Check if turn queue isnt empty
			if (slidersTurnQueue.Count>0){
				// If it's an ally turn, decrease turn timer
				if (slidersTurnQueue[0].Contains("Ally")){
					timeElapsed -= Time.deltaTime;
				}
				// If not, it's an enemy turn, and AI is simulated
				else {
					ServeTurnQueue();
				}
				// If timer reaches 0, reset timer to default and ally slider to zero and remove from the queue
				if (timeElapsed<=0){
					ResetSliderValue(slidersTurnQueue[0]);
					slidersTurnQueue.RemoveAt(0);
					timeElapsed = timeElapsedDefault;
				}
			}
			//Update interface with current timer value, rounded with 2 decimals
			timeElapsed = Mathf.Round(timeElapsed * 100.0f)/100.0f;
			textFields[timerTextName].text = "TIMER: " + timeElapsed.ToString();

			IncreaseValues(); //Method that handles the automatic increasing of sliders

			//Check if there's a pending animation in the Action Queue and simulate it
			if (slidersActionQueue.Count>0){
				ServeActionQueue();
			}

			//Finally, update interface with the newest action and turn queues
			UpdateTurnQueue();
			UpdateActionQueue();
		}

	}

	/* AI AND ACTION SIMULATION + QUEUE UPDATERS
	 *
	 * These first two methods use RNG based timers to simulate AI decisions and animations
	 * Last two methods are used to update the UI queues
	 *
	 */

	void ServeTurnQueue(){
		//First check if turn timer has ran out
		if (randomTurnTimer <= 0) {
			//Check if there's a fighter (always an enemy) in the turn queue
			if (slidersTurnQueue.Count>0){
				string name = slidersTurnQueue[0];
				// Simulates a decision and resets the slider
				ResetSliderValue(name);
				slidersTurnQueue.RemoveAt(0);
				// Adds it to the Action Queue and resets the timer
				slidersActionQueue.Add(name);
				randomTurnTimer = Random.Range (minRndRange, maxRndRange);
			}
		}
		// If turn timer hasnt ran out, decrease its value
		randomTurnTimer -= Time.deltaTime;
	}

	void ServeActionQueue(){
		// Same logic as the ServeTurnQueue method, but it also increases both enemy and ally counters
		//(for unit test purposes)
		if (randomActionTimer <= 0) {
			if (slidersActionQueue.Count>0){
				string name = slidersActionQueue[0];
				slidersActionQueue.RemoveAt(0);
				if (name.Contains("Ally")){
					numAllies++;
					textFields [allyTeamTextName].text = "Allies - "+numAllies.ToString();
				}
				else {
					numEnemies++;
					textFields [enemyTeamTextName].text = "Enemies - "+numEnemies.ToString();

				}
				randomActionTimer = Random.Range (1.00f, 1.50f);
			}
		}
		randomActionTimer -= Time.deltaTime;
	}

	// ------ Both methods iterate over turn and action queues to represent them in the user interface
	void UpdateTurnQueue(){
		textFields [queueTextName].text = "TURN QUEUE";
		if (slidersTurnQueue.Count > 0) {
			for (int i = 0; i<slidersTurnQueue.Count; i++) {
				textFields [queueTextName].text += "\n" + slidersTurnQueue [i];
			}
			textFields [stateTextName].text = slidersTurnQueue [0] + " turn";
		}
	}

	void UpdateActionQueue(){
		textFields [queueActionTextName].text = "ACTION QUEUE";
		if (slidersActionQueue.Count > 0) {
			for (int i = 0; i<slidersActionQueue.Count; i++) {
				textFields [queueActionTextName].text += "\n" + slidersActionQueue [i];
			}
		}
	}

 //		---- Boolean methods used to check sliders state ---

	bool AllSlidersTo100(){
		bool result = true;
		for (int i = 0; i<slidersNameList.Count; i++) {
			if (sliders[slidersNameList[i]].value != 100){
				result = false;
			}
		}
		return result;
	}

	bool OneSliderTo100(){
		bool result = false;
		for (int i = 0; i<slidersNameList.Count; i++) {
			if (sliders[slidersNameList[i]].value == 100){
				result = true;
			}
		}
		return result;
	}

	// SLIDERS MODIFIERS -- Methods used to change values, properties and interface sections related to sliders

	void IncreaseValues(){
		// iterates over sliders to increase their value one by one
		for (int i = 0; i<slidersNameList.Count; i++) {
			IncreaseSliderValue(sliders[slidersNameList[i]],speedList[slidersNameList[i]]);
		}
	}

	//Resets all necesary values, sliders, interface textfields and queues
	void ValuesToZero(){
		for (int i = 0; i<slidersNameList.Count; i++) {
			ResetSliderValue(slidersNameList[i]);
		}
		timeElapsed = timeElapsedDefault;
		textFields [queueTextName].text = "TURN QUEUE";
		textFields [queueActionTextName].text = "ACTION QUEUE";
		slidersTurnQueue.RemoveRange (0, slidersTurnQueue.Count);
		slidersActionQueue.RemoveRange (0, slidersActionQueue.Count);
	}

	//Resets one slider
	void ResetSliderValue(string name){
		sliders[name].value = 0;
		Image img = (Image)sliders[name].fillRect.transform.GetComponent("Image");
		img.color = sliderColor;
	}

	void IncreaseSliderValue(Slider sld, int speed){
		if (!OneSliderTo100 ()) {
			speed = speed * 10; // Increase factor used when no one is at 100% to minimize idle times
		}
		if (sld.value != 100.0f) { // If the slider passed as parameter isnt full yet
			if (sld.value + Time.deltaTime * speed > 100) {
				//If this iteration fills the slider, set value to 100, change color and add the fighter to the turn queue
				sld.value = 100.0f;
				Image img = (Image)sld.fillRect.transform.GetComponent ("Image");
				img.color = Color.green;
				slidersTurnQueue.Add (sld.name);
			}
			else {
				// If it's not full yet and the fighter isnt currently performing an action
				if (!slidersActionQueue.Contains(sld.name)){
					sld.value += Time.deltaTime * speed; //Increase slider value
				}
			}
		}

	}
}


text:
module.exports = function( grunt ) {

	grunt.initConfig( {
		cssmin: {
			combine: {
				files: {
					'deepwiki-themes/default/build/web.min.css': [
						'deepwiki-themes/default/vendor/bootstrap/css/bootstrap.css',
						'deepwiki-themes/default/vendor/bootstrap/css/bootstrap-theme.css',
						'deepwiki-themes/default/vendor/prism/themes/prism.css',
						'deepwiki-themes/default/css/gfm.css',
						'deepwiki-themes/default/css/global.css',
					],
				},
			},
		},
		concat: {
			options: {
				sourceMap: true,
				separator: ';',
			},
			all: {
				src: [
					'deepwiki-themes/default/vendor/jquery/jquery.js',
					'deepwiki-themes/default/vendor/bootstrap/js/bootstrap.js',
					'deepwiki-themes/default/vendor/prism/components/prism-core.js',
					'deepwiki-themes/default/vendor/prism/components/prism-markup.js',
					'deepwiki-themes/default/vendor/prism/components/prism-css.js',
					'deepwiki-themes/default/vendor/prism/components/prism-clike.js',
					'deepwiki-themes/default/vendor/prism/components/prism-javascript.js',
					'deepwiki-themes/default/vendor/prism/components/prism-bash.js',
					'deepwiki-themes/default/vendor/prism/components/prism-php.js',
					'deepwiki-themes/default/vendor/prism/components/prism-php-extras.js',
					'deepwiki-themes/default/vendor/prism/components/prism-python.js',
					'deepwiki-themes/default/vendor/prism/components/prism-ini.js',
					'deepwiki-themes/default/js/global.js',
				],
				dest: 'deepwiki-themes/default/build/web.js',
			},
		},
		uglify: {
			options: {
				sourceMap: true,
				preserveComments: 'some',
			},
			all: {
				files: {
					'deepwiki-themes/default/build/web.min.js': [
						'deepwiki-themes/default/build/web.js',
					],
				},
			},
		},
	} );

	grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
	grunt.loadNpmTasks( 'grunt-contrib-concat') ;
	grunt.loadNpmTasks( 'grunt-contrib-uglify' );

	grunt.registerTask( 'default', [ 'cssmin' , 'concat', 'uglify' ] );

	readme = [
		'# DeepWiki',
		grunt.file.read( 'deepwiki-docs-example/01. About DeepWiki [about].markdown' ),
		'## Installation',
		grunt.file.read( 'deepwiki-docs-example/02. Installation.markdown' ),
		'## Quick Start',
		grunt.file.read( 'deepwiki-docs-example/03. Quick Start.markdown' ),
		'## Configuration',
		grunt.file.read( 'deepwiki-docs-example/04. Configuration.markdown' ),
		'## Writing Documents',
		grunt.file.read( 'deepwiki-docs-example/05. Writing Documents.markdown' ),
		'## Auto Deployment for Documents',
		grunt.file.read( 'deepwiki-docs-example/06. Auto Deployment for Documents.markdown' ),
		'## Theme Development',
		grunt.file.read( 'deepwiki-docs-example/07. Theme Development.markdown' ),
		'## URL Rewrite',
		grunt.file.read( 'deepwiki-docs-example/08. URL Rewrite.markdown' ),
		'## Change Log',
		grunt.file.read( 'deepwiki-docs-example/09. Change Log.markdown' ),
		'## Credits',
		grunt.file.read( 'deepwiki-docs-example/10. Credits.markdown' ),
	];
	grunt.file.write( 'README.md', readme.join( '\n' ) );

};


text:
package org.http4s
package multipart

import scala.util.{Try, Success, Failure}
import scala.util.control._
import org.http4s._
import parser._
import headers._
import Http4s._
import org.http4s.util._
import scalaz.concurrent._
import scalaz.concurrent.Task._

import scodec.bits.ByteVector
import scalaz._
import Scalaz._
import scalaz.stream._
import scalaz.stream.Process._
import org.parboiled2._
import org.log4s.getLogger

private[http4s] object MultipartDecoder {

  private[this] val logger = getLogger

  val decoder: EntityDecoder[Multipart] =
    EntityDecoder.decodeBy(MediaRange.`multipart/*`) { msg =>
      def gatherParts = {
        def go(part: Part): Process1[Headers \/ ByteVector, Part] =
          receive1Or[Headers \/ ByteVector, Part](emit(part)) {
            case -\/(headers) =>
              emit(part) fby go(Part(headers, EmptyBody))
            case \/-(chunk) =>
              go(part.copy(body = part.body ++ emit(chunk)))
          }

        receive1[Headers \/ ByteVector, Part] {
          case -\/(headers) =>
            go(Part(headers, EmptyBody))
          case \/-(chunk) =>
            Process.fail(InvalidMessageBodyFailure("No headers in first part"))
        }
      }

      msg.contentType.flatMap(_.mediaType.extensions.get("boundary")) match {
        case Some(boundary) =>
          DecodeResult {
            msg.body
              .pipe(MultipartParser.parse(Boundary(boundary)))
              .pipe(gatherParts)
              .runLog
              .map(parts => \/-(Multipart(parts, Boundary(boundary))))
              .handle {
                case e: InvalidMessageBodyFailure => -\/(e)
                case e => -\/(InvalidMessageBodyFailure("Invalid multipart body", Some(e)))
            }
          }
        case None =>
          DecodeResult.failure(InvalidMessageBodyFailure("Missing boundary extension to Content-Type"))
      }
    }
}