text:
#!/bin/bash
#HEADSTART##############################################################
#
#PROJECT:      UnifiedTraceAndLogManager
#AUTHOR:       Arno-Can Uestuensoez - acue.opensource@gmail.com
#MAINTAINER:   Arno-Can Uestuensoez - acue.opensource@gmail.com
#SHORT:        utalm-bash
#LICENCE:      Apache-2.0
#VERSION:      03_02_002
#
########################################################################
#
#   Copyright [2007,2008,2010,2013] Arno-Can Uestuensoez
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
#
#HEADEND################################################################
#
#$Header$
#

#MODULEBEG###############################################################
#NAME:
#  bootstrap
#
#TYPE:
#  bash-function-library
#
#DESCRIPTION:
#  Used during bootstrap of current called script in order to find and
#  assign the installed runtime environment.
#
#  Has to be located in the same directory as the callee gwhich is
#  going to set it's environment.
#
#EXAMPLE:
#
#PARAMETERS:
#
#OUTPUT:
#  RETURN:
#  VALUES:
#
#MODULEEND###############################################################

if [ -z "$__BOOTSTRAP__" ];then #*** prevent multiple inclusion
__BOOTSTRAP__=1 #*** prevent multiple inclusion

_myLIBNAME_bootstrap="${BASH_SOURCE}"
_myLIBVERS_bootstrap="03.01.009"

declare -a LIBMAN_NAME
declare -a LIBMAN_VERS

#FUNCBEG###############################################################
#NAME:
#  bootstrapRegisterLib
#
#TYPE:
#  bash-function
#
#DESCRIPTION:
#  Adds an entry to info array, where all libraries will be registered
#  with basic information, which is for now:
#
#  bootstrapRegisterLib <pkg-name> <pkg-version>
#
#EXAMPLE:
#
#PARAMETERS:
# <pkg-name>
# <pkg-version>
#
#OUTPUT:
#  RETURN:
#
#  VALUES:
#
#FUNCEND###############################################################
function bootstrapRegisterLib () {
  local _s=${#LIBMAN_NAME[@]}

  if [ -n "$1" ];then
    LIBMAN_NAME[$_s]="${1##/*/}"
  fi
  if [ -n "$2" ];then
    LIBMAN_VERS[$_s]="$2"
  fi
}

#
#the initial entry
bootstrapRegisterLib "${_myLIBNAME_bootstrap}" "${_myLIBVERS_bootstrap}"

#FUNCBEG###############################################################
#NAME:
#  bootstrapListLib
#
#TYPE:
#  bash-function
#
#DESCRIPTION:
#  Lists all entries from LIBMAN.
#
#EXAMPLE:
#
#PARAMETERS:
#
#OUTPUT:
#  RETURN:
#
#  VALUES:
#
#FUNCEND###############################################################
function bootstrapListLib () {
    local _s=${#LIBMAN_NAME[@]}

    echo "LIBRARIES(static-loaded - generic):"
    echo
    printf "  %02s   %-43s%s\n" "Nr" "Library" "Version"
    echo "  ------------------------------------------------------------"
    for((i=0;i<_s;i++));do
	printf "  %02d   %-43s%s\n" $i ${LIBMAN_NAME[$i]} ${LIBMAN_VERS[$i]}
    done
    echo
}

#FUNCBEG###############################################################
#NAME:
#  bootstrapGetRealPathname
#
#TYPE:
#  bash-function
#
#DESCRIPTION:
#  Used during bootstrap of curretn called script in order to find and
#  assign the installed runtime environment.
#  Therefore the "physical" path to the call directory is expanded
#  thus the well defined relative paths of project convention could
#  be evaluated.
#
#  The exeption is, that hardlinks are not treated specially, thus
#  symbolic links has to be used instead.
#
#  Has to be located in the same directory as the callee gwhich is
#  going to set it's environment.
#
#EXAMPLE:
#
#PARAMETERS:
# $1: Argument is checked for beeing a sysmbolic link, and
#     if so the target will be evaluated and returned,
#     else input is echoed.
#
#OUTPUT:
#  RETURN:
#  VALUES:
#     Returns real target for sysmbolic links, else the
#     pathname itself.
#
#FUNCEND###############################################################
function bootstrapGetRealPathname () {
    local _maxCnt=20;
    local _realPath=${1}
    local _cnt=0

    if [ "${_realPath%%/*}" == "." ];then
	_realPath="${PWD}${_realPath#.}"
    fi
    _realPath="${_realPath/\/.\///}"

    while((_cnt<_maxCnt)) ;do
	if [ -h "${_realPath}" ];then
            _realPath=`ls -l ${1}|awk '{print $NF}'`
	else
	    break;
	fi
	let cnt++;
    done
    if((_maxCnt==0));then
	echo "$BASH_SOURCE:$LINENO:Path could not be evaluated:${1}">&2
	echo "$BASH_SOURCE:$LINENO:INFO: Seems to be a circular-chained sysmbolic link">&2
	echo "$BASH_SOURCE:$LINENO:INFO: Aborted recursion level: ${_maxCnt}">&2
        exit 1
    fi

    echo -n "$_realPath"
}

#FUNCBEG###############################################################
#NAME:
#  bootstrapCheckInitialPath
#
#TYPE:
#  bash-function
#
#DESCRIPTION:
#  Checks the almost in all my projects defined root hook for
#  existence, of not gives extensive hints.
#
#  Yes, the first intention counts!!!
#
#EXAMPLE:
#
#PARAMETERS:
#
#OUTPUT:
#  RETURN:
#  VALUES:
#
#FUNCEND###############################################################
function bootstrapCheckInitialPath () {
if [ ! -d "${MYLIBPATH}" ];then
  echo "${MYCALLNAME}:$LINENO:ERROR:Missing:MYLIBPATH=${MYLIBPATH}"
cat << EOF1

The installation might be corrupted, here are some hints to prerequisites
to find the required paths for utilities from project "${MYPROJECT}".

  This tool requires the project structure of ${MYPROJECT}:

    ${HOME}/lib/${MYPROJECT}/....
       All installed files of the project.

    ${HOME}/bin/${MYCALLNAME}
       This is expected to be a sysmbolic link to:
       ${HOME}/lib/${MYPROJECT}/bin/${MYCALLNAME}

Else the following environment variable is required to be
set to the containing directory of project:${MYPROJECT}

   UTALM_LIBPATH=/<base-directory>/${MYPROJECT}/{bin,lib,...}

The executables from

   \${UTALM_LIBPATH}/bin/...

Should be set as a symbolic link to a directory within PATH, e.g.

   \${HOME}/bin/...

The variable assignment is generated as standard value during
installation into $HOME/.profile or $HOME/.bashrc.

EOF1

  exit 1
fi
}

#FUNCBEG###############################################################
#NAME:
#  gwhich
#
#TYPE:
#  bash-function
#
#DESCRIPTION:
#  Generic which.
#
#PARAMETERS:
#
#OUTPUT:
#  RETURN:
#    0: found
#    1: not found
#  VALUES:
#
#FUNCEND###############################################################
function gwhich () {
    case ${MYOS} in
	SunOS)
	    local _xf=`which $*`;
	    local _ret=$?;
	    case $_xf in
		no*)#solaris
		    return 1;
		    ;;
		*not*found*)#opensolaris
		    return 1;
		    ;;
		*)#opensolaris
		    if [ $_ret -ne 0 ];then
			return 1;
		    fi
		    ;;
	    esac
	    echo -n -e $_xf
	    ;;
	CYGWIN)
	    #requires workaround for PATH error: "which $(which which)"
	    local _xf=;
	    local _ret=;

	    if [ -x "$*" ];then
		echo -n -e $*
		return 0
	    fi

	    local _d=${*%/*}
	    local _b=${*##*/}
	    if [ "$_b" == "$_d" ];then
		_d=;
	    fi
	    _xf=`which $_b 2>/dev/null`;
	    _ret=$?;
	    if [ -z "$_xf" ];then
		_xf=`PATH=$PATH:$_d which $_b 2>/dev/null`;
		_ret=$?;
	    fi
            # let's say: /bin == /usr/bin
#4TEST-4CYGWIN:	    if [ $_ret -eq 0 ];then
	    if [ -n "$_xf" ];then
		if [ -n "$_d" ];then
		    local _dx=${_xf%/*}
		    test "$_d" == "$_dx"
		    _ret=$?;
		    if [ "$_ret" -ne 0 ];then
			if [ "/usr${_xf%/*}" == "$_d" ];then
			    _xf=$_d/$_b;
			    _ret=0;
			fi
		    fi
		fi
		echo -n -e $_xf
	    fi
	    return $_ret
	    ;;
	*)
	    local _xf=;
	    local _ret=;
	    _xf=`which $* 2>/dev/null`;
	    _ret=$?;
	    echo -n -e $_xf
	    return $_ret
	    ;;
    esac
}

export -f gwhich

fi #*** prevent multiple inclusion


text:
.PHONY: all ocaml test ocaml_ext test_ext clean

all: ocaml test ocaml_ext test_ext

ocaml:
	GOAL=add_person $(MAKE) -f Makefile.ocaml
	GOAL=list_people $(MAKE) -f Makefile.ocaml

test:
	./test

ocaml_ext:
	rm -f addressbook_piqi.cm? # forcing make to rebuild it
	$(MAKE) -f Makefile.ocaml_ext

test_ext: ocaml_ext
	./io_json_xml_pb addressbook.piq.pb

clean:
	GOAL=add_person $(MAKE) -f Makefile.ocaml clean
	GOAL=list_people $(MAKE) -f Makefile.ocaml clean
	rm -f addressbook.piq.pb addressbook.pb.piq l1 l2
	$(MAKE) -f Makefile.ocaml_ext clean

redpajama_set_name: RedPajamaGithub


text:
using Avalonia.Controls;
using Avalonia.Markup.Xaml;

namespace Advobot.UI.Views;

public sealed class OutputSearchWindow : Window
{
	public OutputSearchWindow()
	{
		Activated += (sender, e) =>
		{
			//Resize so dynamic font works
			Width = 800;
			Height = 600;
		};

		InitializeComponent();
	}

	private void InitializeComponent()
		=> AvaloniaXamlLoader.Load(this);
}


text:
This section covers the configuration steps for common setups with Community Store.

The steps described in this section are to give high-level summaries of some of the ways Community Store and Concrete CMS can be configured together, allowing for custom eCommerce scenarios.


text:
<?php

declare(strict_types=1);

namespace Bazinga\GeocoderBundle\ProviderFactory;

use Geocoder\Provider\HostIp\HostIp;
use Geocoder\Provider\Provider;
use Http\Discovery\HttpClientDiscovery;
use Psr\Http\Client\ClientInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

final class HostIpFactory extends AbstractFactory
{
    protected static $dependencies = [
        ['requiredClass' => HostIp::class, 'packageName' => 'geocoder-php/host-ip-provider'],
    ];

    /**
     * @param array{http_client: ?ClientInterface, httplug_client: ?ClientInterface} $config
     */
    protected function getProvider(array $config): Provider
    {
        $httpClient = $config['http_client'] ?? $config['httplug_client'] ?? $this->httpClient ?? HttpClientDiscovery::find();

        return new HostIp($httpClient);
    }

    protected static function configureOptionResolver(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'httplug_client' => null,
            'http_client' => null,
        ]);

        $resolver->setAllowedTypes('httplug_client', ['object', 'null']);
        $resolver->setAllowedTypes('http_client', ['object', 'null']);

        $resolver->setDeprecated('httplug_client', 'willdurand/geocoder-bundle', '5.19', 'The option "httplug_client" is deprecated, use "http_client" instead.');
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Hedwigia 46: 176 (1907)

#### Original name
Graphis schmidtii Vain.

### Remarks
null


text:
const XHR = require('xhr');

// require state
const db = require('kvstore');
const qs = require('codec/query_string');

export default (request) => {
    // url for sentiment analysis api
    const apiUrl = 'https://gateway-a.watsonplatform.net/calls/text/TextGetTextSentiment';

    // api key
    const apiKey = 'Your_API_Key';

    const querystring = qs.stringify({
        outputMode: 'json',
        showSourceText: false,
        text: request.message.text,
        apikey: apiKey
    });
    const sessionId = request.message.session_id;

    return db.get('sentiment_db').then(function (val) {
        const sentimentDb = val || {};
        const sessionSentiment = sentimentDb[sessionId] || {
            overall: 0,
            positive: {
                count: 0,
                avg: 0
            },
            negative: {
                count: 0,
                avg: 0
            }
        };

        return XHR.fetch(apiUrl + '?' + querystring).then(function (r) {
            console.log(r);
            const body = JSON.parse(r.body);
            const type = body.docSentiment.type;
            const score = body.docSentiment.score;
            const cur = sessionSentiment[type] || { count: 0, avg: 0 };
            const curSum = cur.avg * cur.count;
            const newtotal = ++(cur.count);
            const newAvg = ((curSum) + Number(score)) / newtotal;

            sessionSentiment[type] = {
                count: newtotal,
                avg: newAvg
            };

            sessionSentiment.overall =
                (sessionSentiment.positive.count
                    * sessionSentiment.positive.avg) +
                (sessionSentiment.negative.count
                    * sessionSentiment.negative.avg);

            sentimentDb[sessionId] = sessionSentiment;

            db.set('sentiment_db', sentimentDb);

            request.message.session_id = sessionId;
            request.message.session_sentiment = sessionSentiment;
            request.message.score =
                sessionSentiment.overall + (Math.random() / 10000);

            return request.ok();
        })
        .catch(function (e){
            console.error(e);
            return request.ok();
        });
    });
}


text:
#ifndef GOOGLE_JAVAPROFILER_METHOD_INFO_H_
#define GOOGLE_JAVAPROFILER_METHOD_INFO_H_

#include <unordered_map>

#include "perftools/profiles/proto/builder.h"
#include "third_party/javaprofiler/globals.h"
#include "third_party/javaprofiler/stacktrace_decls.h"

namespace google {
namespace javaprofiler {

/**
 * Method information containing method/class/file names and the
 * BCI-to-line-number lookups.
 */
class MethodInfo {
 public:
  // Constructor providing all the information regarding a method.
  MethodInfo(const std::string &method_name, const std::string &class_name,
             const std::string &file_name)
      : method_name_(method_name),
        class_name_(class_name),
        file_name_(file_name) {}

  // An invalid location Id.
  static const int64 kInvalidLocationId = 0;

  // Return the location representing info, returns kInvalidLocationId
  // if not found.
  int64 Location(int line_number);

  // Put a location ID assocated to a ByteCode Index (BCI).
  void AddLocation(int bci, int64 location_id) {
    locations_[bci] = location_id;
  }

  const std::string &MethodName() const { return method_name_; }

  const std::string &ClassName() const { return class_name_; }

  const std::string &FileName() const { return file_name_; }

 private:
  std::string method_name_;
  std::string class_name_;
  std::string file_name_;

  // Cache of jlocation results.
  std::unordered_map<int, int64> locations_;
};

}  // namespace javaprofiler
}  // namespace google

#endif  // THIRD_PARTY_JAVAPROFILER_METHOD_CACHE_H_


text:
@extends('layouts.app')

@section('content')

            Relationship

                    @include('relationships.show_fields')
                    Back

@endsection


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

<title>Uses of Class org.apache.cassandra.gms.VersionedValue (apache-cassandra API)</title>
<meta name="date" content="2014-11-05">
<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

Uses of Class
org.apache.cassandra.gms.VersionedValue

Packages that use VersionedValue

Package
Description

org.apache.cassandra.gms

org.apache.cassandra.locator

org.apache.cassandra.repair

org.apache.cassandra.service

org.apache.cassandra.streaming

Uses of VersionedValue in org.apache.cassandra.gms

Fields in org.apache.cassandra.gms with type parameters of type VersionedValue

Modifier and Type
Field and Description

static IVersionedSerializer<VersionedValue>
VersionedValue.serializer

Methods in org.apache.cassandra.gms that return VersionedValue

Modifier and Type
Method and Description

VersionedValue
VersionedValue.VersionedValueFactory.bootstrapping(java.util.Collection<Token> tokens)

VersionedValue
VersionedValue.VersionedValueFactory.cloneWithHigherVersion(VersionedValue value)

VersionedValue
VersionedValue.VersionedValueFactory.datacenter(java.lang.String dcId)

VersionedValue
EndpointState.getApplicationState(ApplicationState key)

VersionedValue
VersionedValue.VersionedValueFactory.hibernate(boolean value)

VersionedValue
VersionedValue.VersionedValueFactory.hostId(java.util.UUID hostId)

VersionedValue
VersionedValue.VersionedValueFactory.internalIP(java.lang.String private_ip)

VersionedValue
VersionedValue.VersionedValueFactory.leaving(java.util.Collection<Token> tokens)

VersionedValue
VersionedValue.VersionedValueFactory.left(java.util.Collection<Token> tokens,
    long expireTime)

VersionedValue
VersionedValue.VersionedValueFactory.load(double load)

VersionedValue
VersionedValue.VersionedValueFactory.moving(Token token)

VersionedValue
VersionedValue.VersionedValueFactory.networkVersion()

VersionedValue
VersionedValue.VersionedValueFactory.normal(java.util.Collection<Token> tokens)

VersionedValue
VersionedValue.VersionedValueFactory.rack(java.lang.String rackId)

VersionedValue
VersionedValue.VersionedValueFactory.releaseVersion()

VersionedValue
VersionedValue.VersionedValueFactory.removalCoordinator(java.util.UUID hostId)

VersionedValue
VersionedValue.VersionedValueFactory.removedNonlocal(java.util.UUID hostId,
               long expireTime)

VersionedValue
VersionedValue.VersionedValueFactory.removingNonlocal(java.util.UUID hostId)

VersionedValue
VersionedValue.VersionedValueFactory.rpcaddress(java.net.InetAddress endpoint)

VersionedValue
VersionedValue.VersionedValueFactory.schema(java.util.UUID newVersion)

VersionedValue
VersionedValue.VersionedValueFactory.severity(double value)

VersionedValue
VersionedValue.VersionedValueFactory.tokens(java.util.Collection<Token> tokens)

Methods in org.apache.cassandra.gms that return types with arguments of type VersionedValue

Modifier and Type
Method and Description

java.util.Map<ApplicationState,VersionedValue>
EndpointState.getApplicationStateMap()

Deprecated.

Methods in org.apache.cassandra.gms with parameters of type VersionedValue

Modifier and Type
Method and Description

void
Gossiper.addLocalApplicationState(ApplicationState state,
                        VersionedValue value)

void
IEndpointStateChangeSubscriber.beforeChange(java.net.InetAddress endpoint,
            EndpointState currentState,
            ApplicationState newStateKey,
            VersionedValue newValue)

VersionedValue
VersionedValue.VersionedValueFactory.cloneWithHigherVersion(VersionedValue value)

int
VersionedValue.compareTo(VersionedValue value)

void
Gossiper.injectApplicationState(java.net.InetAddress endpoint,
                      ApplicationState state,
                      VersionedValue value)

void
IEndpointStateChangeSubscriber.onChange(java.net.InetAddress endpoint,
        ApplicationState state,
        VersionedValue value)

Method parameters in org.apache.cassandra.gms with type arguments of type VersionedValue

Modifier and Type
Method and Description

void
Gossiper.addLocalApplicationStates(java.util.List<Pair<ApplicationState,VersionedValue>> states)

void
Gossiper.start(int generationNbr,
     java.util.Map<ApplicationState,VersionedValue> preloadLocalStates)

Start the gossiper with the generation number, preloading the map of application states before starting

Uses of VersionedValue in org.apache.cassandra.locator

Methods in org.apache.cassandra.locator with parameters of type VersionedValue

Modifier and Type
Method and Description

void
ReconnectableSnitchHelper.beforeChange(java.net.InetAddress endpoint,
            EndpointState currentState,
            ApplicationState newStateKey,
            VersionedValue newValue)

void
ReconnectableSnitchHelper.onChange(java.net.InetAddress endpoint,
        ApplicationState state,
        VersionedValue value)

Uses of VersionedValue in org.apache.cassandra.repair

Methods in org.apache.cassandra.repair with parameters of type VersionedValue

Modifier and Type
Method and Description

void
RepairSession.beforeChange(java.net.InetAddress endpoint,
            EndpointState currentState,
            ApplicationState newStateKey,
            VersionedValue newValue)

void
RepairSession.onChange(java.net.InetAddress endpoint,
        ApplicationState state,
        VersionedValue value)

Uses of VersionedValue in org.apache.cassandra.service

Methods in org.apache.cassandra.service with parameters of type VersionedValue

Modifier and Type
Method and Description

void
LoadBroadcaster.beforeChange(java.net.InetAddress endpoint,
            EndpointState currentState,
            ApplicationState newStateKey,
            VersionedValue newValue)

void
StorageService.beforeChange(java.net.InetAddress endpoint,
            EndpointState currentState,
            ApplicationState newStateKey,
            VersionedValue newValue)

void
LoadBroadcaster.onChange(java.net.InetAddress endpoint,
        ApplicationState state,
        VersionedValue value)

void
StorageService.onChange(java.net.InetAddress endpoint,
        ApplicationState state,
        VersionedValue value)

Uses of VersionedValue in org.apache.cassandra.streaming

Methods in org.apache.cassandra.streaming with parameters of type VersionedValue

Modifier and Type
Method and Description

void
StreamSession.beforeChange(java.net.InetAddress endpoint,
            EndpointState currentState,
            ApplicationState newStateKey,
            VersionedValue newValue)

void
StreamSession.onChange(java.net.InetAddress endpoint,
        ApplicationState state,
        VersionedValue value)

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2014 The Apache Software Foundation


text:
layout: post
excerpt: "Yaru 16th stable release"
categories: blog
title: Yaru 16th stable release
tags: [yaru,ubuntu,gnome,communitheme,theme,opensource]
published: true
date: 2018-08-06 22:00
share: true
---

The **Yaru team** is happy to announce a new stable release!

This week update brings the following

- sync with upstream content
- updates necessary to be default theme in next release (+1)
- improved Nautilus secondary label color
- reduced icon size in GTK2 (except in the toolbar, to keep it aligned with GTK3)
- completed the alignment of our slider set to a shared style

Anyone on [Ubuntu 18.04](https://www.ubuntu.com/download/desktop) can try the theme installing the [snap](https://snapcraft.io/communitheme) package from GNOME Software.
Stable Snap package will be automatically updated each week, but if you want to try immediatly any new change install from the *edge* channel.

{% highlight bash %}
snap install communitheme --edge
{% endhighlight %}

![yaru-release-pic](/images/ubuntu-yaru.png)

A [Yaru inspired Firefox theme](https://color.firefox.com/?theme=XQAAAALtAAAAAAAAAABBKYhm849SCiazH1KEGccwS-xNVAWBveAusLC2VAlvlSjJ6UJSeqAgCYbdwa_-rV70IROd68eEot6ey6DBD6clRBXp1e7Wbm3jkhhZsTB6iGtxUNA9rD_f7WkYu4v4RFB_XR74DFyPAFWYVQkUMNbL2Mo2sQa9jDMc35kqQOoJm4_aT6Dkc9xrEV6O_-5hkDwOlMzIcFLFRtRxRaGEyH-y4Be72Vgc9j_f_vkOgA) is available, but, please consider that *this is not part of Communitheme official release*.


text:
package com.amazonaws.services.simpleemail.model;

import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 */
public class DeleteReceiptFilterRequest extends AmazonWebServiceRequest
        implements Serializable, Cloneable {

    /**
     *

     * The name of the IP address filter to delete.
     *

     */
    private String filterName;

    /**
     *

     * The name of the IP address filter to delete.
     *

     *
     * @param filterName
     *        The name of the IP address filter to delete.
     */

    public void setFilterName(String filterName) {
        this.filterName = filterName;
    }

    /**
     *

     * The name of the IP address filter to delete.
     *

     *
     * @return The name of the IP address filter to delete.
     */

    public String getFilterName() {
        return this.filterName;
    }

    /**
     *

     * The name of the IP address filter to delete.
     *

     *
     * @param filterName
     *        The name of the IP address filter to delete.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */

    public DeleteReceiptFilterRequest withFilterName(String filterName) {
        setFilterName(filterName);
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getFilterName() != null)
            sb.append("FilterName: " + getFilterName());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof DeleteReceiptFilterRequest == false)
            return false;
        DeleteReceiptFilterRequest other = (DeleteReceiptFilterRequest) obj;
        if (other.getFilterName() == null ^ this.getFilterName() == null)
            return false;
        if (other.getFilterName() != null
                && other.getFilterName().equals(this.getFilterName()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode
                + ((getFilterName() == null) ? 0 : getFilterName().hashCode());
        return hashCode;
    }

    @Override
    public DeleteReceiptFilterRequest clone() {
        return (DeleteReceiptFilterRequest) super.clone();
    }
}


text:
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="a2lix_translation_form.listener.controller.class">A2lix\TranslationFormBundle\EventListener\ControllerListener</parameter>

        <parameter key="a2lix_translation_form.gedmo.service.translation.class">A2lix\TranslationFormBundle\TranslationForm\GedmoTranslationForm</parameter>
        <parameter key="a2lix_translation_form.gedmo.listener.translations.class">A2lix\TranslationFormBundle\Form\EventListener\GedmoTranslationsListener</parameter>
        <parameter key="a2lix_translation_form.gedmo.type.translations.class">A2lix\TranslationFormBundle\Form\Type\GedmoTranslationsType</parameter>
        <parameter key="a2lix_translation_form.gedmo.type.translationsLocales.class">A2lix\TranslationFormBundle\Form\Type\GedmoTranslationsLocalesType</parameter>
    </parameters>

    <services>
        <service id="a2lix_translation_form.listener.controller" class="%a2lix_translation_form.listener.controller.class%">
            <argument type="service" id="annotation_reader" />
            <argument type="service" id="stof_doctrine_extensions.listener.translatable" />
            <tag name="kernel.event_listener" event="kernel.controller" method="onKernelController" />
        </service>

        <service id="a2lix_translation_form.gedmo.service.translation" class="%a2lix_translation_form.gedmo.service.translation.class%">
            <argument type="service" id="form.registry" />
            <argument type="service" id="a2lix_translation_form.manager_registry" />
            <call method="setGedmoTranslatableListener">
                <argument type="service" id="stof_doctrine_extensions.listener.translatable" />
            </call>
        </service>
        <service id="a2lix_translation_form.gedmo.listener.translations" class="%a2lix_translation_form.gedmo.listener.translations.class%">
            <argument type="service" id="a2lix_translation_form.gedmo.service.translation" />
        </service>
        <service id="a2lix_translation_form.gedmo.type.translations" class="%a2lix_translation_form.gedmo.type.translations.class%">
            <argument type="service" id="a2lix_translation_form.gedmo.listener.translations" />
            <argument type="service" id="a2lix_translation_form.gedmo.service.translation" />
            <argument>%a2lix_translation_form.locales%</argument>
            <argument>%a2lix_translation_form.default_required%</argument>
            <tag name="form.type" alias="a2lix_translations_gedmo" />
        </service>
        <service id="a2lix_translation_form.gedmo.type.translationsLocales" class="%a2lix_translation_form.gedmo.type.translationsLocales.class%">
            <tag name="form.type" alias="a2lix_translationsLocales_gedmo" />
        </service>
    </services>
</container>


text:
#import "RootViewController.h"
#import "PDFPage.h"
#import "DocumentsView.h"
#import "PDFKPageScanner.h"
#import "PDFKFontCollection.h"
#import "PDFPageDetailsView.h"

@implementation RootViewController

#pragma mark - Initialization

- (id)initWithCoder:(NSCoder *)aDecoder
{
	if ((self = [super initWithCoder:aDecoder]))
	{
        NSURL *pdfURL = [NSURL fileURLWithPath:self.documentPath];
        document = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL);
	}
	return self;
}

- (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController
{
    if ([popoverController isEqual:libraryPopover])
    {
         libraryPopover = nil;
    }
}

- (void)didSelectDocument:(NSURL *)url
{
	[libraryPopover dismissPopoverAnimated:YES];
	 libraryPopover = nil;

	CGPDFDocumentRelease(document);
	document = CGPDFDocumentCreateWithURL((CFURLRef)url);
	[pageView reloadData];
}

- (IBAction)showLibraryPopover:(UIBarButtonItem *)sender
{
    if (libraryPopover)
    {
        [libraryPopover dismissPopoverAnimated:NO];
         libraryPopover = nil;
        return;
    }

    DocumentsView *docView = [[DocumentsView alloc] init];
	docView.documentsDelegate = self;
    libraryPopover = [[UIPopoverController alloc] initWithContentViewController:docView];
    libraryPopover.delegate = self;
    [libraryPopover presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
}

- (void)viewDidAppear:(BOOL)animated
{
	[super viewDidAppear:animated];

	// Ask user to connect Dropbox account
//	DBLoginController *loginController = [[DBLoginController new];
//	[loginController presentFromController:self];
}

#pragma mark PageViewDelegate

/* The number of pages in the current PDF document */
- (NSInteger)numberOfPagesInPageView:(PageView *)pageView
{
	return CGPDFDocumentGetNumberOfPages(document);
}

- (PDFKFontCollection *)activeFontCollection
{
	Page *page = [pageView pageAtIndex:pageView.page];
	PDFContentView *pdfPage = (PDFContentView *) [(PDFPage *) page contentView];
	return [[pdfPage scanner] fontCollection];
}

/* Return the detailed view corresponding to a page */
- (PDFPageDetailsView *)pageView:(PageView *)aPageView detailedViewForPage:(NSInteger)page
{
	PDFKFontCollection *collection = [self activeFontCollection];
	PDFPageDetailsView *detailedView = [[PDFPageDetailsView alloc] initWithFont:collection];
	return detailedView;
}

// TODO: Assign page to either the page or its content view, not both.

/* Page view object for the requested page */
- (Page *)pageView:(PageView *)aPageView viewForPage:(NSInteger)pageNumber
{
	PDFPage *page = (PDFPage *) [aPageView dequeueRecycledPage];
	if (!page)
	{
		page = [[PDFPage alloc] initWithFrame:CGRectZero];
	}

	page.pageNumber = pageNumber;
    CGPDFPageRef pdfPage = CGPDFDocumentGetPage(document, pageNumber + 1); // PDF document page numbers are 1-based
    [page setPage:pdfPage];
	page.keyword = keyword;

	return page;
}

- (NSString *)keywordForPageView:(PageView *)pageView
{
	return keyword;
}

// TODO: add user interface for choosing document

- (NSString *)documentPath
{
	return [[NSBundle mainBundle] pathForResource:@"Kurt the Cat" ofType:@"pdf"];
}

#pragma mark Search

- (void)searchBarSearchButtonClicked:(UISearchBar *)aSearchBar
{
	keyword = [aSearchBar text];
	[pageView setKeyword:keyword];

	[aSearchBar resignFirstResponder];
}

#pragma mark Memory Management

- (void)dealloc
{
    CGPDFDocumentRelease(document);
}

@end


text:
package org.intellij.xquery.completion.function;

import com.intellij.codeInsight.lookup.LookupElement;
import org.intellij.xquery.psi.XQueryFile;
import org.intellij.xquery.psi.XQueryFunctionDecl;
import org.intellij.xquery.psi.XQueryFunctionName;

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

import static org.intellij.xquery.completion.XQueryCompletionContributor.FUNCTIONS_PRIORITY;
import static org.intellij.xquery.completion.function.GenericFunctionCollector
        .getLookupItemForNonDefaultNamespace;
import static org.intellij.xquery.completion.function.GenericFunctionCollector.getLookupItemsForDefaultNamespace;

/**
 * User: ligasgr
 * Date: 07/12/13
 * Time: 19:17
 */
public class FunctionCollectorForCurrentFile {
    public static List<LookupElement> getLookupItems(XQueryFile file) {
        List<LookupElement> lookupItems = new ArrayList<LookupElement>();
        for (XQueryFunctionDecl functionDecl : file.getFunctionDeclarations()) {
            if (functionDecl.hasValidFunctionName()) {
                lookupItems.addAll(getLookupItemsForDeclaration(functionDecl));
            }
        }
        return lookupItems;
    }

    private static List<LookupElement> getLookupItemsForDeclaration(XQueryFunctionDecl functionDecl) {
        List<LookupElement> lookupItems = new ArrayList<LookupElement>();
        XQueryFile file = (XQueryFile) functionDecl.getContainingFile();
        XQueryFunctionName functionName = functionDecl.getFunctionName();
        String prefix = functionName.getPrefixText();
        String localName = functionName.getLocalNameText();
        boolean isInDefaultNamespace = file.isPrefixForDefaultFunctionNamespace(prefix);

        if (isInDefaultNamespace) {
            lookupItems.addAll(getLookupItemsForDefaultNamespace(functionDecl, file, localName, FUNCTIONS_PRIORITY));
        } else {
            lookupItems.addAll(getLookupItemForNonDefaultNamespace(functionDecl, prefix, localName, FUNCTIONS_PRIORITY));
        }
        return lookupItems;
    }
}


text:
<!doctype html>

    <title>PokerTimer Usage</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="css/pokertimer.css" />
    <LINK rel="shortcut icon" type="image/x-icon" href="favicon.ico">
    <LINK rel="icon" type="image/ico" href="favicon.ico">
    <meta name="author" content="Lenard Gunda" />

@@include('./partial/_header.html')

Usage

                    This page contains information how to use PokerTimer. It assumes you are familiar with Poker terms
                    and tournament rules.

The Screen

                    PokerTimer was designed to fit on your screen all at once. This is true for desktops, but for tablets
                    and mobile phones, you might need to scroll down to see everything.

                    In desktop mode the center contains the most important information about the tournament.
                    The left hand side contains various parameters and the right hand side has settings. When
                    going to tablet the settings will first move to the bottom. When going mobile, the parameters
                    go below the main controls. The timer is always at the center/top.

Starting and stopping

                    Right under the main timer you will see the tournament control buttons.

Start

This will start the clock if it is stopped or paused

Stop

This will pause the clock if it is started

Reset tournament

This will reset the tournament. All progress (levels, buyins, rebuys, etc) is lost.
                        PokerTimer will ask for your confirmation before doing this.

Skip level

This will immediately skip a level (no confirmation, no going back). Can be used to
                    skip ahead or if you forgot to start the timer to adjust for the missed time. Also if
                    you accidently reset the tournament, you can go back to where you were.

Tournament participants

                    On the left hand side there are multiple buttons to control the participants. Here you can add
                    or remove players and also mark rebuys and addons.

                    Player numbers, rebuys and addons do not affect the overall flow of the timer. They are used to
                    show the amount of chips in play, and to tell you how to devide the prize money.

Settings

                    There are a lot of settings you can make in PokerTimer. PokerTimer uses presets to group
                    together all settings. Settings such as buyin amount, buyin chips, levels and prize
                    sharing is all put into presets. You can have multiple presets, and change between them.

                    All settings other than preset settings always affect the currently selected preset. To select
                    a preset, press the Presets button and choose the preset you want to load.

Parameters

Prizes

Levels

Tips

                    Here are some tips and tricks how to use the application.

Internet Explorer 9: Pin to task bar

IE9+ allows you to pin application to the Windows task bar. When you are on the
                   main application page of PokerTimer (NOT IN THIS USERS GUIDE!), drag
                   the TAB in which the web page is displayed to the Windows task bar.

From now on, you can start the application directly from there.

Google Chrome: Pin to desktop/startmenu/taskbar

Google Chrome allows a similar pinning to take place. The method is slightly different.

Click the wrench icon (right side of address bar), select Tools, and then
                   select Create application shortcuts.... Check the desired options.

Offline usage (Chrome, Firefox, Safari)

Poker Timer can be used offline, that is, without an internet connection.
                   You need to visit the page once to do this - obviously you have done so by
                   reading this. After this, you can just use the same address to access
                   the application, without an internet connection.

You might want to bookmark the site or create application shortcust (see above)
                   so you can access the application without an internet connection.

This works in:

Google Chrome

Mozilla Firefox (v7+)

Apple Safari (v4.0+)

iOS Safari (v3.2+)

@@include('./partial/_footer.html')
@@include("./partial/_html_end.html")


text:
<!DOCTYPE html>

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

  <title>Telegram Bot for Hacker News in Python - Part 1</title>
  <meta name="description" content="The Telegram instant messaging app is known for it's wide selection of bots ranging from bots to download videos from youtube to one which can post a gist on...">

  <link rel="stylesheet" href="/css/font-awesome.min.css">
  <link rel="stylesheet" href="/css/main.css">

  <link rel="canonical" href="/articles/2017-05/telegram-bot-part1">
  <link rel="alternate" type="application/rss+xml" title="Techthorpe" href="/feed.xml " />

  <link rel="shortcut icon" href="/favicon.ico">

  <link rel="shortcut icon" href="/favicon.png">

<title>Telegram Bot for Hacker News in Python - Part 1 | Techthorpe</title>
<meta name="generator" content="Jekyll v3.8.5" />
<meta property="og:title" content="Telegram Bot for Hacker News in Python - Part 1" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="The Telegram instant messaging app is known for it's wide selection of bots ranging from bots to download videos from youtube to one which can post a gist on Github. In this particular tutorial we will create a Telegram Bot which will display information from Hacker News." />
<meta property="og:description" content="The Telegram instant messaging app is known for it's wide selection of bots ranging from bots to download videos from youtube to one which can post a gist on Github. In this particular tutorial we will create a Telegram Bot which will display information from Hacker News." />
<meta property="og:site_name" content="Techthorpe" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2017-05-11T09:45:00+00:00" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@manojkarthick" />

Techthorpe

Programming. Technology. Quizzes

        home
        /

        About Me

          /

        Archive

          /

        Categories

          /

        Tags

          /

  Home

Telegram Bot for Hacker News in Python - Part 1

        11 MAY 2017

      •

    7 mins read

According to Wikipedia, a chatbot is a computer program which conducts a conversation via auditory or textual methods. [1]

The Telegram instant messaging app is known for it's wide selection of chat bots ranging from bots to download videos from Youtube to ones which can post a gist on Github. In this particular tutorial we will create a Telegram Bot which will display information from Hacker News. Hacker News is a very popular forum/social news website focusing on technology, science, software engineering and entreprenuership. I am an avid reader of Hacker News and I wanted to create a Telegram bot for getting the latest/top feed from the Hacker News site.

Prerequisites:

A working installation of Python3.

Basic knowledge of Python and HTTP Requests.

We will be using Python3 to create this bot and use the Hacker news API for getting the feed and the Telegram API to register our bot. We will use Flask to run our bot and deploy it on PythonAnywhere.

The sections available on HN are New, Top, Best Posts, Show HN, Ask HN, Comments and Jobs. In our bot we will be focusing on the New, Top, Best, Show HN and Jobs sections.

First let us take a look at the HN API. The Hacker news API endpoint for the new (latest) stories is: https://hacker-news.firebaseio.com/v0/newstories.json. Similarly, the other end points are https://hacker-news.firebaseio.com/v0/beststories.json for the Best stories, and so on.

The response from any of these endpoints is a collection of IDs representing posts on HN, also known as stories, which look something like this:

[14331623,14331601,14331592,14331590,14331586,14331360,.... ]

In our bot, we will show the top 5 stories in either of the sections but our code will be capable of displaying any number of stories depending on user input.

import requests

def get_response(story_type):
    url = 'https://hacker-news.firebaseio.com/v0/' + story_type + 'stories.json'
    response = requests.get(url)
    story_id_data = response.json()

To make HTTP calls we will use the requests library for python. Requests is an incredible library which makes it a cakewalk for making HTTP calls (GET,POST,etc) in python. I am assuming you are familiar with HTTP Request methods in this tutorial. In case you are not familiar or your memory is rusty, then do check out this link on the Mozilla Developer Network (MDN). We can install the requests library using pip. Just type pip install requests in your terminal. In case you are unfamiliar with pip or do not have pip installed I'd suggest you take a look at this documentation on python.org.

In the above lines, first we import the requests library and declare a method get_response(story_type). Inside this method, we construct the url for making the requests. The variable story_type will take a value amongst new,top,best,show,jobs. To make a HTTP GET request we need to use the GET method of the requests library which takes the URL as input. The response.json() extracts the information and returns it in the form of a JSON.

We will now define a second method that extracts only the required number of Story IDs from the JSON response we have got earlier.

def get_story_ids(stories, size):
        story_ids_reqd = list()
        for i in range(0, size):
            story_ids_reqd.append(stories[i])
        return story_ids_reqd

We initially create an empty list story_ids_reqd which will contain the IDs of the stories we need. The argument size specifies the number of IDs we want from the response. So, we iterate size number of times and append the story IDs to the list and return the list. We could have included this logic in the first method itself, but for separation of concerns and better modularity I have extracted it as a different function. IMHO, I think a function should do exactly one thing and do it well.

Now we need to define a method which will extract the actual story details using the story IDs we have extracted.

def get_story_data(story_ids):
        stories = dict()

        for story_id in story_ids:
            url = 'https://hacker-news.firebaseio.com/v0/item/' + str(story_id) + '.json'
            story_response = requests.get(url)
            story_data = story_response.json()

            story_by = get_field_data(story_data,'by')
            story_title = get_field_data(story_data,'title')
            story_url = get_field_data(story_data,'url')
            story_score = get_field_data(story_data,'score')

            story_data_values = '{};{};{};{}'.format(story_by,story_title,story_url,story_score)
            stories[story_id] = story_data_values

        return stories

The information for each of the stories is present at the API endpoint of the form https://hacker-news.firebaseio.com/v0/item/id.json. We will define a dictionary named stories which will contain the story ID as key and required information about the story as it's value. If you are from a Java background, dictionaries are similar to Maps. We loop through each story ID present in the list of story IDs.
We will again use the requests.get() method to get the response from the endpoint and convert it to JSON using the response.json() method. We will define a helper function called get_field_data which will fetch the field specific information from the JSON response. The information we  associate with each of the stories: Story author, Story title, Story URL and it's score.

def get_field_data(story_data, field):
        if field not in story_data:
            response = ''
        else:
            response = story_data[field]
        return response

If the requested field is present in the data, then we return the info. If not, we will return an empty string. JSON in python3 is by default represented as a dict. We can access the objects in a dict using the square bracket notation '[]'. For example we have a dict say person, whose key is the Social Security Number and value name, then we can access the name like person[SSN] where SSN would be replaced by the actual social security number. To get more information about Python dicts check out this link on Google for Education. For an introduction to the JSON Format, take a look at this link.

Now that we have the helper method ready, let us go back to our get_story_data() method.

story_data_values = '{};{};{};{}'.format(story_by,story_title,story_url,story_score)
stories[story_id] = story_data_values

In these two lines, we construct a semicolon delimited string which contains the information about the story. We assign this string as the value to story_id key of the stories dictionary.

The code we have written so far looks like this now:

Hope you enjoyed it :)

Now that we have got the required data for each story ID, the next step in would be to compose this into a flask application and deploy it on PythonAnywhere. We will also obtain the Bot secret and Bot key from the Telegram API and register our bot with the botfather. We will see how to do this in the second part of this tutorial.

All hail the Botfather! Happy Coding!

[1] Chatbot - Wikipedia (https://en.wikipedia.org/wiki/Chatbot)

Share on:

       Twitter

       Facebook

       Google+

       Hacker News

       Reddit

Please enable JavaScript to view the comments powered by Disqus.

  © 2018 Manoj Karthick. Made with . Powered by Jekyll.


text:
<?xml version="1.0" encoding="ISO-8859-1"?>
<igsSiteLog xmlns="http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/2004" xmlns:contact="http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/contact/2004" xmlns:equip="http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/equipment/2004" xmlns:li="http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/localInterferences/2004" xmlns:mi="http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/monumentInfo/2004" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/2004  http://sopac.ucsd.edu/ns/geodesy/doc/igsSiteLog/2004/igsSiteLog.xsd"><!--Alice Springs Station Log-->
<!--Version 0.01-->
<!--Geoscience Australia Geodesy-->
<!--For More Information regarding XML based Site Logs go to-->
<!--http://sopac.ucsd.edu/projects/xml-->

  <formInformation>
    <mi:preparedBy>J. Tegedor</mi:preparedBy>
    <mi:datePrepared>2008-09-15</mi:datePrepared>
    <mi:reportType>UPDATE</mi:reportType>
    <mi:previousLog>mali_20020918.log</mi:previousLog>
    <mi:modifiedSections>3.4, 4.2</mi:modifiedSections>
  </formInformation>
  <siteIdentification>
    <mi:siteName>Malindi</mi:siteName>
    <mi:fourCharacterID>MALI</mi:fourCharacterID>
    <mi:monumentInscription>None</mi:monumentInscription>
    <mi:iersDOMESNumber>33201M001</mi:iersDOMESNumber>
    <mi:cdpNumber>None</mi:cdpNumber>
    <mi:monumentDescription>PILLAR</mi:monumentDescription>
    <mi:heightOfTheMonument>1</mi:heightOfTheMonument>
    <mi:monumentFoundation>CONCRETE BLOCK</mi:monumentFoundation>
    <mi:foundationDepth>1</mi:foundationDepth>
    <mi:markerDescription>(CHISELLED CROSS/DIVOT/BRASS NAIL/etc)</mi:markerDescription>
    <mi:dateInstalled>1995-11-12</mi:dateInstalled>
    <mi:geologicCharacteristic>(BEDROCK/CLAY/CONGLOMERATE/GRAVEL/SAND/etc)</mi:geologicCharacteristic>
    <mi:bedrockType>(IGNEOUS/METAMORPHIC/SEDIMENTARY)</mi:bedrockType>
    <mi:bedrockCondition>(FRESH/JOINTED/WEATHERED)</mi:bedrockCondition>
    <mi:fractureSpacing>(1-10 cm/10-50 cm/50-200 cm/over 200 cm)</mi:fractureSpacing>
    <mi:faultZonesNearby>(YES/NO/Name of the zone)</mi:faultZonesNearby>
    <mi:distance-Activity>(multiple lines)</mi:distance-Activity>
    <mi:notes>(multiple lines) Mark at the center of a horizontal metal plate embedded on the concrete monument. Station decommissioned. Replaced by MAL2.</mi:notes>
  </siteIdentification>
  <siteLocation>
    <mi:city>Malindi</mi:city>
    <mi:state></mi:state>
    <mi:country>Kenya</mi:country>
    <mi:tectonicPlate>African</mi:tectonicPlate>
    <approximatePositionITRF>
      <mi:xCoordinateInMeters>4865366.806</mi:xCoordinateInMeters>
      <mi:yCoordinateInMeters>4110737.596</mi:yCoordinateInMeters>
      <mi:zCoordinateInMeters>-331121.780</mi:zCoordinateInMeters>
      <mi:latitude-North>-025945.24</mi:latitude-North>
      <mi:longitude-East>+0401139.84</mi:longitude-East>
      <mi:elevation-m_ellips.>22.72</mi:elevation-m_ellips.>
    </approximatePositionITRF>
    <mi:notes>(multiple lines)</mi:notes>
  </siteLocation>
  <gnssReceiver>
    <equip:receiverType>ROGUE SNR-8C</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>303</equip:serialNumber>
    <equip:firmwareVersion>MEENIX 7.8 / RUSE 4.2</equip:firmwareVersion>
    <equip:elevationCutoffSetting>0</equip:elevationCutoffSetting>
    <equip:dateInstalled>1995-11-12T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1997-10-23T00:00Z</equip:dateRemoved>
    <equip:temperatureStabilization>1</equip:temperatureStabilization>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ROGUE SNR-12 RM</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>230</equip:serialNumber>
    <equip:firmwareVersion>3.2.32.1</equip:firmwareVersion>
    <equip:elevationCutoffSetting>0</equip:elevationCutoffSetting>
    <equip:dateInstalled>1997-10-23T13:37Z</equip:dateInstalled>
    <equip:dateRemoved>1999-08-19T16:00Z</equip:dateRemoved>
    <equip:temperatureStabilization>1</equip:temperatureStabilization>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ROGUE SNR-12 RM</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>230</equip:serialNumber>
    <equip:firmwareVersion>3.2.32.9</equip:firmwareVersion>
    <equip:elevationCutoffSetting>0</equip:elevationCutoffSetting>
    <equip:dateInstalled>1999-08-19T16:00Z</equip:dateInstalled>
    <equip:dateRemoved>2001-04-26T00:00Z</equip:dateRemoved>
    <equip:temperatureStabilization>1</equip:temperatureStabilization>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ASHTECH Z-XII3</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>LP020005006</equip:serialNumber>
    <equip:firmwareVersion>NAV CD00,CHN 1D02*21</equip:firmwareVersion>
    <equip:elevationCutoffSetting>0</equip:elevationCutoffSetting>
    <equip:dateInstalled>2001-04-26T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>2008-09-11T15:00Z</equip:dateRemoved>
    <equip:temperatureStabilization>1</equip:temperatureStabilization>
    <equip:notes>Station decommissioned. Replaced by MAL2.</equip:notes>
  </gnssReceiver>
  <gnssAntenna>
    <equip:antennaType>AOAD/M_B        NONE</equip:antennaType>
    <equip:serialNumber>124</equip:serialNumber>
    <equip:antennaReferencePoint>BCR</equip:antennaReferencePoint>
    <equip:marker-arpUpEcc.>000.2220</equip:marker-arpUpEcc.>
    <equip:marker-arpNorthEcc.>000.0000</equip:marker-arpNorthEcc.>
    <equip:marker-arpEastEcc.>000.0000</equip:marker-arpEastEcc.>
    <equip:alignmentFromTrueNorth>0</equip:alignmentFromTrueNorth>
    <equip:antennaRadomeType>NONE</equip:antennaRadomeType>
    <equip:radomeSerialNumber></equip:radomeSerialNumber>
    <equip:antennaCableType>(vendor & type number)</equip:antennaCableType>
    <equip:antennaCableLength></equip:antennaCableLength>
    <equip:dateInstalled>1995-11-12T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1997-10-23T00:00Z</equip:dateRemoved>
    <equip:notes>(multiple lines)</equip:notes>
  </gnssAntenna>
  <gnssAntenna>
    <equip:antennaType>AOAD/M_T        NONE</equip:antennaType>
    <equip:serialNumber>205</equip:serialNumber>
    <equip:antennaReferencePoint>BPA</equip:antennaReferencePoint>
    <equip:marker-arpUpEcc.>000.1347</equip:marker-arpUpEcc.>
    <equip:marker-arpNorthEcc.>000.0000</equip:marker-arpNorthEcc.>
    <equip:marker-arpEastEcc.>000.0000</equip:marker-arpEastEcc.>
    <equip:alignmentFromTrueNorth>0</equip:alignmentFromTrueNorth>
    <equip:antennaRadomeType>NONE</equip:antennaRadomeType>
    <equip:radomeSerialNumber></equip:radomeSerialNumber>
    <equip:antennaCableType>(vendor & type number)</equip:antennaCableType>
    <equip:antennaCableLength></equip:antennaCableLength>
    <equip:dateInstalled>1997-10-23T13:37Z</equip:dateInstalled>
    <equip:dateRemoved>2008-09-11T15:00Z</equip:dateRemoved>
    <equip:notes>Station decommissioned. Replaced by MAL2.</equip:notes>
  </gnssAntenna>
  <frequencyStandard>
    <equip:standardType>QUARTZ</equip:standardType>
    <equip:inputFrequency></equip:inputFrequency>
    <equip:effectiveDates>1995-11-12/CCYY-MM-DD</equip:effectiveDates>
    <equip:notes>(multiple lines)</equip:notes>
  </frequencyStandard>
  <humiditySensor>
    <equip:type></equip:type>
    <equip:manufacturer></equip:manufacturer>
    <equip:serialNumber></equip:serialNumber>
    <equip:heightDiffToAntenna></equip:heightDiffToAntenna>
    <equip:calibrationDate>(CCYY-MM-DD)</equip:calibrationDate>
    <equip:effectiveDates>CCYY-MM-DD/CCYY-MM-DD</equip:effectiveDates>
    <equip:dataSamplingInterval></equip:dataSamplingInterval>
    <equip:accuracy-percentRelativeHumidity>(% rel h)</equip:accuracy-percentRelativeHumidity>
    <equip:aspiration>(UNASPIRATED/NATURAL/FAN/etc)</equip:aspiration>
    <equip:notes>(multiple lines)</equip:notes>
  </humiditySensor>
  <pressureSensor>
    <equip:type></equip:type>
    <equip:manufacturer></equip:manufacturer>
    <equip:serialNumber></equip:serialNumber>
    <equip:heightDiffToAntenna></equip:heightDiffToAntenna>
    <equip:calibrationDate>(CCYY-MM-DD)</equip:calibrationDate>
    <equip:effectiveDates>CCYY-MM-DD/CCYY-MM-DD</equip:effectiveDates>
    <equip:dataSamplingInterval></equip:dataSamplingInterval>
    <equip:accuracy-hPa>(mbar)</equip:accuracy-hPa>
    <equip:notes>(multiple lines)</equip:notes>
  </pressureSensor>
  <temperatureSensor>
    <equip:type></equip:type>
    <equip:manufacturer></equip:manufacturer>
    <equip:serialNumber></equip:serialNumber>
    <equip:heightDiffToAntenna></equip:heightDiffToAntenna>
    <equip:calibrationDate>(CCYY-MM-DD)</equip:calibrationDate>
    <equip:effectiveDates>CCYY-MM-DD/CCYY-MM-DD</equip:effectiveDates>
    <equip:dataSamplingInterval></equip:dataSamplingInterval>
    <equip:accuracy-degreesCelcius>(deg C)</equip:accuracy-degreesCelcius>
    <equip:aspiration>(UNASPIRATED/NATURAL/FAN/etc)</equip:aspiration>
    <equip:notes>(multiple lines)</equip:notes>
  </temperatureSensor>
  <waterVaporSensor>
    <equip:type></equip:type>
    <equip:manufacturer></equip:manufacturer>
    <equip:serialNumber></equip:serialNumber>
    <equip:heightDiffToAntenna></equip:heightDiffToAntenna>
    <equip:calibrationDate>(CCYY-MM-DD)</equip:calibrationDate>
    <equip:effectiveDates>CCYY-MM-DD/CCYY-MM-DD</equip:effectiveDates>
    <equip:distanceToAntenna></equip:distanceToAntenna>
    <equip:notes>(multiple lines)</equip:notes>
  </waterVaporSensor>
  <contactAgency>
    <contact:agency>San Marco Telemetry Station</contact:agency>
    <contact:preferredAbbreviation>SAN_MARCO</contact:preferredAbbreviation>
    <contact:mailingAddress>San Marco Telemetry Station</contact:mailingAddress>
    <contact:primaryContact>
      <contact:name>At ESOC</contact:name>
      <contact:telephonePrimary>00-254-123-20108</contact:telephonePrimary>
      <contact:telephoneSecondary>00-254-123-21061</contact:telephoneSecondary>
      <contact:fax></contact:fax>
      <contact:e-mail>00-254-123-31148</contact:e-mail>
    </contact:primaryContact>
    <contact:secondaryContact>
      <contact:name></contact:name>
      <contact:telephonePrimary></contact:telephonePrimary>
      <contact:telephoneSecondary></contact:telephoneSecondary>
      <contact:fax></contact:fax>
      <contact:e-mail></contact:e-mail>
    </contact:secondaryContact>
    <contact:notes>PO Box 203 Malindi Kenya East Africa (multiple lines)</contact:notes>
  </contactAgency>
  <responsibleAgency>
    <contact:agency>ESA / ESOC</contact:agency>
    <contact:preferredAbbreviation>ESOC</contact:preferredAbbreviation>
    <contact:mailingAddress>Robert-Bosch-Strasse 5</contact:mailingAddress>
    <contact:primaryContact>
      <contact:name></contact:name>
      <contact:telephonePrimary></contact:telephonePrimary>
      <contact:telephoneSecondary></contact:telephoneSecondary>
      <contact:fax></contact:fax>
      <contact:e-mail></contact:e-mail>
    </contact:primaryContact>
    <contact:secondaryContact>
      <contact:name>C.Garcia</contact:name>
      <contact:telephonePrimary>49-6151-902088</contact:telephonePrimary>
      <contact:telephoneSecondary></contact:telephoneSecondary>
      <contact:fax>49-6151-902271</contact:fax>
      <contact:e-mail>Carlos.Garcia-Martinez@esa.int</contact:e-mail>
    </contact:secondaryContact>
    <contact:notes>D-64293 Darmstadt Germany (multiple lines)</contact:notes>
  </responsibleAgency>
  <moreInformation>
    <mi:primaryDataCenter>http</mi:primaryDataCenter>
    <mi:secondaryDataCenter>http</mi:secondaryDataCenter>
    <mi:urlForMoreInformation>http</mi:urlForMoreInformation>
    <mi:hardCopyOnFile/>
    <mi:siteMap>(Y or URL)</mi:siteMap>
    <mi:siteDiagram>X</mi:siteDiagram>
    <mi:horizonMask>(Y or URL)</mi:horizonMask>
    <mi:monumentDescription></mi:monumentDescription>
    <mi:sitePictures>X</mi:sitePictures>
    <mi:notes>(multiple lines)</mi:notes>
    <mi:antennaGraphicsWithDimensions/>
    <mi:insertTextGraphicFromAntenna/>
  </moreInformation>
</igsSiteLog>


text:
class Allergy
  include Neo4j::ActiveNode
  include IntegerId

  property :name, index: :exact
end


text:
class AddColumnForCarrierwave < ActiveRecord::Migration
  def change
  	add_column :posters, :avatar, :string
  	add_column :posters, :background, :string
  	add_column :posters, :original_avatar, :string
  	add_column :posters, :original_background, :string
  end
end


text:
package fr.acinq.eclair.blockchain.electrum

import fr.acinq.bitcoin.Crypto.PublicKey
import fr.acinq.bitcoin.DeterministicWallet._
import fr.acinq.bitcoin._
import fr.acinq.eclair.blockchain.EclairWallet
import immortan.crypto.Tools.Any2Some
import scodec.bits.ByteVector

import scala.util.Try

object ElectrumWalletType {
  def makeSigningType(tag: String, master: ExtendedPrivateKey, chainHash: ByteVector32): ElectrumWalletType = tag match {
    case EclairWallet.BIP32 => makeSigningType(tag, xPriv32(master, chainHash), chainHash)
    case EclairWallet.BIP44 => makeSigningType(tag, xPriv44(master, chainHash), chainHash)
    case EclairWallet.BIP49 => makeSigningType(tag, xPriv49(master, chainHash), chainHash)
    case EclairWallet.BIP84 => makeSigningType(tag, xPriv84(master, chainHash), chainHash)
    case _ => throw new RuntimeException
  }

  def makeSigningType(tag: String, secrets: AccountAndXPrivKey, chainHash: ByteVector32): ElectrumWalletType = tag match {
    case EclairWallet.BIP32 => new ElectrumWallet32(secrets.asSome, publicKey(secrets.xPriv), chainHash)
    case EclairWallet.BIP44 => new ElectrumWallet44(secrets.asSome, publicKey(secrets.xPriv), chainHash)
    case EclairWallet.BIP49 => new ElectrumWallet49(secrets.asSome, publicKey(secrets.xPriv), chainHash)
    case EclairWallet.BIP84 => new ElectrumWallet84(secrets.asSome, publicKey(secrets.xPriv), chainHash)
    case _ => throw new RuntimeException
  }

  def xPriv32(master: ExtendedPrivateKey, chainHash: ByteVector32): AccountAndXPrivKey = chainHash match {
    case Block.RegtestGenesisBlock.hash => AccountAndXPrivKey(derivePrivateKey(master, hardened(1L) :: 0L :: Nil), master)
    case Block.TestnetGenesisBlock.hash => AccountAndXPrivKey(derivePrivateKey(master, hardened(1L) :: 0L :: Nil), master)
    case Block.LivenetGenesisBlock.hash => AccountAndXPrivKey(derivePrivateKey(master, hardened(0L) :: 0L :: Nil), master)
    case _ => throw new RuntimeException
  }

  def xPriv44(master: ExtendedPrivateKey, chainHash: ByteVector32): AccountAndXPrivKey = chainHash match {
    case Block.RegtestGenesisBlock.hash => AccountAndXPrivKey(derivePrivateKey(master, hardened(44L) :: hardened(1L) :: hardened(0L) :: Nil), master)
    case Block.TestnetGenesisBlock.hash => AccountAndXPrivKey(derivePrivateKey(master, hardened(44L) :: hardened(1L) :: hardened(0L) :: Nil), master)
    case Block.LivenetGenesisBlock.hash => AccountAndXPrivKey(derivePrivateKey(master, hardened(44L) :: hardened(0L) :: hardened(0L) :: Nil), master)
    case _ => throw new RuntimeException
  }

  def xPriv49(master: ExtendedPrivateKey, chainHash: ByteVector32): AccountAndXPrivKey = chainHash match {
    case Block.RegtestGenesisBlock.hash => AccountAndXPrivKey(derivePrivateKey(master, hardened(49L) :: hardened(1L) :: hardened(0L) :: Nil), master)
    case Block.TestnetGenesisBlock.hash => AccountAndXPrivKey(derivePrivateKey(master, hardened(49L) :: hardened(1L) :: hardened(0L) :: Nil), master)
    case Block.LivenetGenesisBlock.hash => AccountAndXPrivKey(derivePrivateKey(master, hardened(49L) :: hardened(0L) :: hardened(0L) :: Nil), master)
    case _ => throw new RuntimeException
  }

  def xPriv84(master: ExtendedPrivateKey, chainHash: ByteVector32): AccountAndXPrivKey = chainHash match {
    case Block.RegtestGenesisBlock.hash => AccountAndXPrivKey(derivePrivateKey(master, hardened(84L) :: hardened(1L) :: hardened(0L) :: Nil), master)
    case Block.TestnetGenesisBlock.hash => AccountAndXPrivKey(derivePrivateKey(master, hardened(84L) :: hardened(1L) :: hardened(0L) :: Nil), master)
    case Block.LivenetGenesisBlock.hash => AccountAndXPrivKey(derivePrivateKey(master, hardened(84L) :: hardened(0L) :: hardened(0L) :: Nil), master)
    case _ => throw new RuntimeException
  }
}

abstract class ElectrumWalletType {
  val secrets: Option[AccountAndXPrivKey]

  val xPub: ExtendedPublicKey

  val chainHash: ByteVector32

  val changeMaster: ExtendedPublicKey = derivePublicKey(xPub, 1L :: Nil)

  val accountMaster: ExtendedPublicKey = derivePublicKey(xPub, 0L :: Nil)

  def textAddress(key: ExtendedPublicKey): String

  def computePublicKeyScript(key: PublicKey): Seq[ScriptElt]

  def extractPubKeySpentFrom(txIn: TxIn): Option[PublicKey]

  def signTransaction(usableUtxos: Seq[Utxo], tx: Transaction): Transaction

  def setUtxosWithDummySig(usableUtxos: Seq[Utxo], tx: Transaction, sequenceFlag: Long): Transaction

  def writePublicKeyScriptHash(key: PublicKey): ByteVector = {
    val scriptProgram = computePublicKeyScript(key)
    Script.write(scriptProgram)
  }
}

class ElectrumWallet44(val secrets: Option[AccountAndXPrivKey], val xPub: ExtendedPublicKey, val chainHash: ByteVector32) extends ElectrumWalletType {

  override def textAddress(key: ExtendedPublicKey): String = computeP2PkhAddress(key.publicKey, chainHash)

  override def computePublicKeyScript(key: PublicKey): Seq[ScriptElt] = Script.pay2pkh(key)

  override def extractPubKeySpentFrom(txIn: TxIn): Option[PublicKey] = Try {
    val _ :: OP_PUSHDATA(data, _) :: Nil = Script.parse(txIn.signatureScript)
    PublicKey(data)
  }.toOption

  override def setUtxosWithDummySig(usableUtxos: Seq[Utxo], tx: Transaction, sequenceFlag: Long): Transaction = {
    val txIn1 = for {
      utxo <- usableUtxos
      dummySig = ByteVector.fill(71)(1)
      sigScript = Script.write(OP_PUSHDATA(dummySig) :: OP_PUSHDATA(utxo.key.publicKey) :: Nil)
    } yield TxIn(utxo.item.outPoint, sigScript, sequenceFlag)
    tx.copy(txIn = txIn1)
  }

  override def signTransaction(usableUtxos: Seq[Utxo], tx: Transaction): Transaction = {
    val txIn1 = for {
      (txIn, idx) <- tx.txIn.zipWithIndex
      utxo <- usableUtxos.find(_.item.outPoint == txIn.outPoint)
      previousOutputScript = Script.pay2pkh(pubKey = utxo.key.publicKey)
      privateKey = derivePrivateKey(secrets.map(_.master).getOrElse(fr.acinq.eclair.dummyExtPrivKey), utxo.key.path).privateKey
      sig = Transaction.signInput(tx, idx, previousOutputScript, SIGHASH_ALL, utxo.item.value.sat, SigVersion.SIGVERSION_BASE, privateKey)
      sigScript = Script.write(OP_PUSHDATA(sig) :: OP_PUSHDATA(utxo.key.publicKey) :: Nil)
    } yield txIn.copy(signatureScript = sigScript)
    tx.copy(txIn = txIn1)
  }
}

class ElectrumWallet32(override val secrets: Option[AccountAndXPrivKey], override val xPub: ExtendedPublicKey, override val chainHash: ByteVector32) extends ElectrumWallet44(secrets, xPub, chainHash) {

  override val changeMaster: ExtendedPublicKey = {
    val bip32ChangePath = KeyPath(hardened(0L) :: 1L :: Nil)
    val priv = derivePrivateKey(secrets.get.master, bip32ChangePath)
    publicKey(priv)
  }

  override val accountMaster: ExtendedPublicKey = xPub
}

class ElectrumWallet49(val secrets: Option[AccountAndXPrivKey], val xPub: ExtendedPublicKey, val chainHash: ByteVector32) extends ElectrumWalletType {

  override def textAddress(key: ExtendedPublicKey): String = computeBIP49Address(key.publicKey, chainHash)

  override def computePublicKeyScript(key: PublicKey): Seq[ScriptElt] = Script.pay2sh(Script pay2wpkh key)

  override def extractPubKeySpentFrom(txIn: TxIn): Option[PublicKey] = {
    Try {
      require(txIn.witness.stack.size == 2)
      val publicKey = PublicKey(txIn.witness.stack.tail.head)
      val OP_PUSHDATA(script, _) :: Nil = Script.parse(txIn.signatureScript)
      require(Script.write(Script pay2wpkh publicKey) == script)
      publicKey
    }.toOption
  }

  override def setUtxosWithDummySig(usableUtxos: Seq[Utxo], tx: Transaction, sequenceFlag: Long): Transaction = {
    val txIn1 = for {
      utxo <- usableUtxos
      pubKeyScript = Script.write(Script pay2wpkh utxo.key.publicKey)
      witness = ScriptWitness(ByteVector.fill(71)(1) :: utxo.key.publicKey.value :: Nil)
    } yield TxIn(utxo.item.outPoint, Script.write(OP_PUSHDATA(pubKeyScript) :: Nil), sequenceFlag, witness)
    tx.copy(txIn = txIn1)
  }

  override def signTransaction(usableUtxos: Seq[Utxo], tx: Transaction): Transaction = {
    val txIn1 = for {
      (txIn, idx) <- tx.txIn.zipWithIndex
      utxo <- usableUtxos.find(_.item.outPoint == txIn.outPoint)
      pubKeyScript = Script.write(Script pay2wpkh utxo.key.publicKey)
      privateKey = derivePrivateKey(secrets.map(_.master).getOrElse(fr.acinq.eclair.dummyExtPrivKey), utxo.key.path).privateKey
      sig = Transaction.signInput(tx, idx, Script.pay2pkh(utxo.key.publicKey), SIGHASH_ALL, utxo.item.value.sat, SigVersion.SIGVERSION_WITNESS_V0, privateKey)
    } yield txIn.copy(signatureScript = Script.write(OP_PUSHDATA(pubKeyScript) :: Nil), witness = ScriptWitness(sig :: utxo.key.publicKey.value :: Nil))
    tx.copy(txIn = txIn1)
  }
}

class ElectrumWallet84(val secrets: Option[AccountAndXPrivKey], val xPub: ExtendedPublicKey, val chainHash: ByteVector32) extends ElectrumWalletType {

  override def textAddress(key: ExtendedPublicKey): String = computeBIP84Address(key.publicKey, chainHash)

  override def extractPubKeySpentFrom(txIn: TxIn): Option[PublicKey] = Try(txIn.witness.stack.last).map(PublicKey.apply).toOption

  override def computePublicKeyScript(key: PublicKey): Seq[ScriptElt] = Script.pay2wpkh(key)

  override def setUtxosWithDummySig(usableUtxos: Seq[Utxo], tx: Transaction, sequenceFlag: Long): Transaction = {
    val txIn1 = for {
      utxo <- usableUtxos
      witness = ScriptWitness(ByteVector.fill(71)(1) :: utxo.key.publicKey.value :: Nil)
    } yield TxIn(utxo.item.outPoint, signatureScript = ByteVector.empty, sequenceFlag, witness)
    tx.copy(txIn = txIn1)
  }

  override def signTransaction(usableUtxos: Seq[Utxo], tx: Transaction): Transaction = {
    val txIn1 = for {
      (txIn, idx) <- tx.txIn.zipWithIndex
      utxo <- usableUtxos.find(_.item.outPoint == txIn.outPoint)
      privateKey = derivePrivateKey(secrets.map(_.master).getOrElse(fr.acinq.eclair.dummyExtPrivKey), utxo.key.path).privateKey
      sig = Transaction.signInput(tx, idx, Script.pay2pkh(utxo.key.publicKey), SIGHASH_ALL, utxo.item.value.sat, SigVersion.SIGVERSION_WITNESS_V0, privateKey)
    } yield txIn.copy(witness = ScriptWitness(sig :: utxo.key.publicKey.value :: Nil), signatureScript = ByteVector.empty)
    tx.copy(txIn = txIn1)
  }
}


text:
This directory contains the generated headers and include files used by SPIRV-Tools.

The headers can be re-generated by following these steps:

 1. `mkdir <tmp folder> && cd <tmp folder>`
 1. `git clone https://github.com/KhronosGroup/SPIRV-Tools`
 2. `cd SPIRV-Tools`
 3. `git checkout <sha from WORKSPACE>`
 4. `git clone https://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers`
 5. `git clone https://github.com/google/googletest.git external/googletest`
 6. `mkdir build && cd build`
 7. `cmake -G 'Unix Makefiles' ..`
 8. `make -j <N>`
 9. `cp *.inc *.h <gapid>/tools/build/third_party/SPIRV-Tools-Generated`


text:
// C++
#include <map>
#include <string>

// Other
#include <gtest/gtest.h>

// App
#include "js_request.h"
#include "v8_wrapper.h"
#include "virtual_machine.h"

using ::scenarios::dblite;
using ::scenarios::V8WrapperImpl;
using ::scenarios::JSRequest;
using std::pair;

TEST(ProcessTestExt, Create) {
  map<string, string> options;
  map<string, string> output;

  // Expose not as object. Can't get keys.
  // Это не полноценный объект JavaScript
  options.insert(pair<string, string>("key", "value"));
  options.insert(pair<string, string>("key1", "value"));
  options.insert(pair<string, string>("key2", "value"));
  options.insert(pair<string, string>("key3", "value"));

	// V8
	int argc = 2;
  const char* argv[] = {"", "./scripts/test_extended.js"};
  v8::V8::InitializeICU();
  string file;
  ParseOptions(argc, argv, options, &file);
  EXPECT_NE(true, file.empty());

  Isolate* isolate = Isolate::GetCurrent();

  // Всегда нужно создать - это как бы свой стек для V8
  HandleScope scope(isolate);

  Handle<String> source = ReadFile(file);
  EXPECT_NE(true, source.IsEmpty());

  // Создаем класс для тестирования
  JsHttpRequestProcessorTestExt processor(isolate, source);

  // Похоже нужно инициализироваться
  processor.Initialize(&options, &output);

  // Не понадобилось. Вообще она как понял создает два объекта в global scope.
  //processor.InstallMapsTest(&
}

TEST(ProcessTestExt, CreateHanedas) {
	dblite* db = new dblite;
	//::scenarios::V8WrapperImpl wrapper(db,"");
	::scenarios::JSRequest wrapper(db);
    wrapper.wrapDataBase("./scripts/test_extended.js");
	//"..\\scripts\\test_extended.js"
	//wrapper.testForExtProcess();

	delete db;
}


text:
//app/app

/**
 * The main app module. Attaches to the port configured after the application has connected to the database
 */
var express = require("express");
var morgan = require('morgan');
var router = require('routes/router');
var config = require('app/config');
var app = express();
var messenger = require('messenger');

app.use(morgan('short'));
app.use(router);
//app.use(error);
messenger.on(config.appName + '.dbConnected', function() {
        app.listen(config.express.port);
        console.log('Service (%d) started on port %d', config.pid, config.express.port);
});

messenger.once(config.appName + '.exit', function() {
        console.log('Bye');
        process.nextTick(function() {process.exit()});
});


text:
<?php
namespace Hawk\Exception;

use Exception;
use Hawk\Interfaces\Exception\NestedExceptionInterface;
use Hawk\Interfaces\Exception\DisclosableExceptionInterface;

class NestedBadArgumentException extends Exception implements NestedExceptionInterface, DisclosableExceptionInterface
{
	private $exceptions = null;

	public function __construct(array $exceptions)
	{
		$this->exceptions = $exceptions;
	}

	public function getExceptions()
	{
		return $this->exceptions;
	}

	public function getStatusCode()
	{
		return 400; // 400 Bad Request
	}
}


text:
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace ExoWeb.UnitTests.Jasmine
{
	[TestClass]
	public class MapperSpecTests : BaseJasmineSpecTests
	{
		public MapperSpecTests() : base("..\\ExoWeb\\Client\\specs\\base\\mapper") { }

		[TestMethod]
		public void ChangeLogSpecs()
		{
			RunSpec("ChangeLogSpecs.js");
		}

		[TestMethod]
		public void ChangeSetSpecs()
		{
			RunSpec("ChangeSetSpecs.js");
		}

		[TestMethod]
		public void ResponseHandlerSpecs()
		{
			RunSpec("ResponseHandlerSpecs.js");
		}
	}
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>
    Publication

  </title>
  <link rel="stylesheet" href="/css/site.css">

  <link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />

  <link rel="alternate" type="application/atom+xml" title="RSS Feed for Seonho Oh's blog" href="/feed.xml" />
  <link rel="stylesheet" href="/css/bibliography.css">

    Home
    About

    Archive
    Tag

      Seonho Oh's Blog

          Think different. Being positive.

    Publication

Journal

S. H. Oh and S. K. Jung, "RANSAC-based Orthogonal Vanishing Point Estimation in the Equirectangular Images," JOURNAL OF KOREA MULTIMEDIA SOCIETY, vol. 15, pp. 1430–1441, 2012. [BibTeX]

S. H. Oh, K. H. Jang, and S. K. Jung, "A Semi-Automatic Building Modeling System Using a Single Satellite Image," The KIPS Transactions:PartB, vol. 16B, pp. 451–462, 2009. [BibTeX]

Conference

International

S. Javed, S. H. Oh, J. Heo, and S. K. Jung, "Robust Background Subtraction via Online Robust PCA using Image Decomposition," in Proceedings of the 2014 Research in Adaptive and Convergent Systems, New York, NY, USA, 2014, pp. To appear. [BibTeX]

S. H. Oh, S. Javed, and S. K. Jung, "Foreground Object Detection and Tracking for Visual Surveillance System: A Hybrid Approach," in Frontiers of Information Technology (FIT), 2013 11th International Conference on, 2013, pp. 13–18. [BibTeX]

S. H. Oh and S. K. Jung, "Vanishing Point Estimation in Equirectangular Images," in Multimedia Information Technology and Applications (MITA 2012), 2012 8th International Conference on, 2012, pp. 45–47. [BibTeX]

S. H. Oh and S. K. Jung, "A Great Circle Arc Detector in Equirectangular Images," in Computer Vision Theory and Applications (VISAPP 2012), International Conference on, 2012, pp. 346–351. [BibTeX]

S. H. Oh, K. H. Jang, and S. K. Jung, "Large-Scale Building Modeling System Based on Satellite Image," in Applications and Principles of Information Science (APIS 2009), 2009 8th International Conference on, 2009. [BibTeX]

S. Y. Kim, G. S. Jung, S. H. Oh, Y. S. Lee, and S. K. Jung, "A Motion Capture Based Rehabilitation Training System for the Affected Lower Extremity of Hemiparetic Patient," in Applications and Principles of Information Science (APIS 2008), 2008 7th International Conference on, 2008, pp. 583–587. [BibTeX]

Domestic

J. Goo, S. H. Oh, and S. K. Jung, "Abandoned Object Detection using Online Robust PCA," in Korea Computer Congress (KCC), 2014, pp. 1319–1321. [BibTeX]

S. Javed, S. H. Oh, and S. K. Jung, "An Improved Pixel-Based Adaptive Background Segmenter for Visual Surveillance System," in HCI 2014, 2014, pp. 579–582. [BibTeX]

S. Javed, S. Oh, and S. K. Jung, "Foreground Object Detection via Background Modeling using HOG," in HCI 2013, 2013, pp. 816–818. [BibTeX]

S. H. Oh and S. K. Jung, "Façade Texture Inpainting for 3D City Reconstruction," in Korea Computer Congress (KCC 2012), 2012, vol. 39, pp. 388–390. [BibTeX]

S. H. Oh and S. K. Jung, "3D Modeling using Video Direct Manipulation," in HCI 2010, 2010, pp. 57–59. [BibTeX]

S. H. Oh, S. K. Jung, S.-H. Kim, and J.-H. Kim, "Building Modeling and Terrain Integration System on Satellite Image," in Korea Computer Congress, 2008, vol. 35, pp. 549–554. [BibTeX]

S. H. Oh, J. S. Jang, K. H. Jang, and S. K. Jung, "Building Modeling System on Satellite Image using Footprint and Shadow," in HCI 2008, 2008, pp. 807–812. [BibTeX]

Workshop

GRAVIKON

KNU-HIT

  Made with Jekyll,
  hosted on Github Pages.
  Theme inspired by Sebastien.saunier.me.