text:
"""
https://leetcode.com/problems/longest-palindromic-substring/

https://leetcode.com/submissions/detail/112032180/
"""

class Solution(object):
    def longestPalindrome(self, s):
        """
        :type s: str
        :rtype: str
        """
        longest = ''
        for i in range(0, len(s) * 2 - 1):
            if i % 2 == 0:
                # on number
                index = int(i / 2)
                string = s[index]
                diff = 1
                while index - diff >= 0 and index + diff < len(s) and s[index - diff] == s[index + diff]:
                    string = s[index - diff] + string + s[index - diff]
                    diff += 1
                if len(string) > len(longest):
                    longest = string
            else:
                leftIndex = int(i / 2)
                rightIndex = leftIndex + 1
                diff = 0
                string = ''
                while leftIndex - diff >= 0 and rightIndex + diff < len(s) and s[leftIndex - diff] == s[rightIndex + diff]:
                    string = s[leftIndex - diff] + string + s[leftIndex - diff]
                    diff += 1
                if len(string) > len(longest):
                    longest = string
        return longest

import unittest

class Test(unittest.TestCase):
    def test(self):
        solution = Solution()
        self.assertEqual(solution.longestPalindrome('babad'), 'bab')

if __name__ == '__main__':
    unittest.main()

redpajama_set_name: RedPajamaGithub


text:
Fedora Docker
=============

Dockfile for fedora

## Includes

- Latest Fedora
- git


text:
package model

import (
	"sort"
	"sync"
	"time"

	"github.com/ChristianNorbertBraun/seaweed-banking/seaweed-banking-account-updater/config"
)

// AccountInfo holds all information for an account from the oldest to
// the latest transaction
type AccountInfo struct {
	Name              string       `json:"name"`
	BIC               string       `json:"bic"`
	IBAN              string       `json:"iban"`
	Balance           int32        `json:"balance"`
	Predecessor       string       `json:"predecessor"`
	OldestTransaction string       `json:"oldestTransaction"`
	LatestTransaction string       `json:"latestTransaction"`
	Transactions      Transactions `json:"transactions"`
	mutex             sync.Mutex
}

// NewAccountInfo creates a new accountInfo
func NewAccountInfo(name string, bic string, iban string, balance int32, predecessor string) *AccountInfo {
	accountInfo := AccountInfo{Name: name, BIC: bic, IBAN: iban, Balance: balance, Predecessor: predecessor}
	accountInfo.Transactions = []*Transaction{}

	return &accountInfo
}

// AddTransaction adds a Transaction to the AccountInfo and updates the balance and
// the oldest and latest transaction date
func (ai *AccountInfo) AddTransaction(transaction *Transaction) (bool, *AccountInfo) {
	ai.mutex.Lock()
	defer ai.mutex.Unlock()
	if ai.Transactions.Len() < config.Configuration.Seaweed.MaxTransactionsPerAccountInfo {
		ai.Transactions = append(ai.Transactions, transaction)
		ai.Balance += transaction.ValueInSmallestUnit
		sort.Sort(ai.Transactions)

		ai.OldestTransaction = ai.Transactions[0].
			BookingDate.
			Format(time.RFC3339Nano)
		ai.LatestTransaction = ai.Transactions[ai.Transactions.Len()-1].
			BookingDate.
			Format(time.RFC3339Nano)

		return true, nil
	}

	accountInfo := NewAccountInfo(ai.Name, ai.BIC, ai.IBAN, ai.Balance, ai.OldestTransaction)
	accountInfo.AddTransaction(transaction)

	return false, accountInfo
}


text:
<?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Video extends CI_Controller {

    public function index() {
        $this->load->view('teste');
    }

    public function cadastrar() {
        $this->load->view('template/html-header');
        $this->load->view('template/header');
        $this->load->view('template/aside');
        $this->load->view('video/formCadastrar');
        $this->load->view('template/footer');
        $this->load->view('template/html-footer');
    }

    public function processaCadastrar() {
        $titulo = $this->input->post('titulo');
        $descricao = $this->input->post('descricao');
        $link = $this->input->post('link');
        $dataHora = $this->input->post('dataHora');

        $this->load->model('VideoModel');
        if ($this->VideoModel->insert($titulo, $descricao, $link, $dataHora)) {
            $response = array('result' => 'true', 'msg' => 'Vídeo cadastrado com sucesso!');
        } else {
            $response = array('result' => 'false', 'msg' => 'O vídeo não foi cadastrado!');
        }
        echo json_encode($response);
    }

    public function processaBuscar($id) {
        $this->load->model('VideoModel');
        $result = $this->VideoModel->get($id);
        $response = array();
        foreach ($result as $row) {
            $json["id"] = $row->id_vdo;
            $json["titulo"] = $row->titulo_vdo;
            $json["descricao"] = $row->descricao_vdo;
            $json["link"] = $row->link_vdo;
            $json["dataHora"] = $row->datahora_vdo;
            array_push($response, $json);
        }
        echo json_encode($response);
    }

    public function processaListar() {
        $this->load->model('VideoModel');
        $result = $this->VideoModel->getList();
        $response = array();
        foreach ($result as $row) {
            $json["id"] = $row->id_vdo;
            $json["titulo"] = $row->titulo_vdo;
            $json["descricao"] = $row->descricao_vdo;
            $json["link"] = $row->link_vdo;
            $json["dataHora"] = $row->datahora_vdo;
            array_push($response, $json);
        }
        echo json_encode($response);
    }

    public function processaAtualizar($id) {
        $titulo = $this->input->post('titulo');
        $descricao = $this->input->post('descricao');
        $link = $this->input->post('link');
        $dataHora = $this->input->post('dataHora');

        $this->load->model('VideoModel');
        if ($this->VideoModel->update($id, $titulo, $descricao, $link, $dataHora)) {
            $response = array('result' => 'true', 'msg' => 'Vídeo atualizado com sucesso!');
        } else {
            $response = array('result' => 'false', 'msg' => 'O vídeo não foi atualizado!');
        }
        echo json_encode($response);
    }

    public function processaRemover($id) {
        $this->load->model('VideoModel');
        if ($this->VideoModel->delete($id)) {
            $response = array('result' => 'true', 'msg' => 'Vídeo removido com sucesso!');
        } else {
            $response = array('result' => 'false', 'msg' => 'O vídeo não foi removido!');
        }
        echo json_encode($response);
    }

}


text:
/* http://keith-wood.name/calendars.html
   Swedish localisation for calendars datepicker for jQuery.
   Written by Anders Ekdahl ( anders@nomadiz.se). */
(function($) {
	$.calendars.picker.regional['sv'] = {
		renderer: $.calendars.picker.defaultRenderer,
        prevText: '«Förra',  prevStatus: '',
		prevJumpText: '<<', prevJumpStatus: '',
		nextText: 'Nästa»', nextStatus: '',
		nextJumpText: '>>', nextJumpStatus: '',
		currentText: 'Idag', currentStatus: '',
		todayText: 'Idag', todayStatus: '',
		clearText: 'Rensa', clearStatus: '',
		closeText: 'Stäng', closeStatus: '',
		yearStatus: '', monthStatus: '',
		weekText: 'Ve', weekStatus: '',
		dayStatus: 'DD, M d', defaultStatus: '',
		isRTL: false
	};
	$.calendars.picker.setDefaults($.calendars.picker.regional['sv']);
})(jQuery);


text:
function(prefix_list output_result input_prefix input_list)
  foreach(val IN LISTS ${input_list})
    list(APPEND FUNCTION_RESULT "${input_prefix}${val}")
  endforeach(val)
  set(${output_result} ${FUNCTION_RESULT} PARENT_SCOPE)
endfunction(prefix_list)

# Defines a macro to ease the creation of new tests
macro(create_test TestName)
  cmake_parse_arguments(BISTRO_TESTING "" "NAMESPACE;LIBRARY;PREFIX" "FILES;INCLUDE;DEPENDENCIES" ${ARGN})

  set(FINAL_TEST_NAME TEST_${BISTRO_TESTING_NAMESPACE}_${TestName})

  prefix_list(PREFIXED_SOURCES ${BISTRO_TESTING_PREFIX} BISTRO_TESTING_FILES)

  # message("----------------------DEBUG---------------------")
  # message("NAMESPACE: ${BISTRO_TESTING_NAMESPACE}")
  # message("LIBRARY: ${BISTRO_TESTING_LIBRARY}")
  # message("PREFIX: ${BISTRO_TESTING_PREFIX}")
  # message("FILES: ${BISTRO_TESTING_FILES}")
  # message("INCLUDE: ${BISTRO_TESTING_INCLUDE}")
  # message("DEPENDENCIES: ${BISTRO_TESTING_DEPENDENCIES}")
  # message("PREFIXED: ${PREFIXED_SOURCES}")
  # message("------------------------------------------------")

  add_executable(${FINAL_TEST_NAME} ${PREFIXED_SOURCES})
  target_link_libraries(
    ${FINAL_TEST_NAME}
    ${BISTRO_TESTING_LIBRARY}
    ${BISTRO_TESTING_DEPENDENCIES}
    gtest
    gtest_main
  )

  target_include_directories(${FINAL_TEST_NAME} PRIVATE ${BISTRO_TESTING_INCLUDE})
  add_test(NAME ${FINAL_TEST_NAME} COMMAND ${FINAL_TEST_NAME})
endmacro()


text:
#ifdef __cplusplus
extern "C" {
#endif

// IIS Config schema names
#define IIS_CONFIG_ADD                      L"add"
#define IIS_CONFIG_ALLOWED                  L"allowed"
#define IIS_CONFIG_APPHOST_ROOT             L"MACHINE/WEBROOT/APPHOST"
#define IIS_CONFIG_APPLICATION              L"application"
#define IIS_CONFIG_APPPOOL                  L"applicationPool"
#define IIS_CONFIG_APPPOOL_AUTO             L"autoStart"
#define IIS_CONFIG_APPPOOL_SECTION          L"system.applicationHost/applicationPools"
#define IIS_CONFIG_AUTOSTART                L"serverAutoStart"
#define IIS_CONFIG_BINDING                  L"binding"
#define IIS_CONFIG_BINDINGINFO              L"bindingInformation"
#define IIS_CONFIG_BINDINGS                 L"bindings"
#define IIS_CONFIG_DESC                     L"description"
#define IIS_CONFIG_EXECUTABLE               L"scriptProcessor"
#define IIS_CONFIG_ENABLED                  L"enabled"
#define IIS_CONFIG_ENABLE32                 L"enable32BitAppOnWin64"
#define IIS_CONFIG_FILEEXT                  L"fileExtension"
#define IIS_CONFIG_FILTER                   L"filter"
#define IIS_CONFIG_GROUPID                  L"groupId"
#define IIS_CONFIG_HEADERS                  L"customHeaders"
#define IIS_CONFIG_HTTPERRORS_SECTION       L"system.webServer/httpErrors"
#define IIS_CONFIG_ID                       L"id"
#define IIS_CONFIG_ISAPI_SECTION            L"system.webServer/isapiFilters"
#define IIS_CONFIG_HTTPPROTO_SECTION        L"system.webServer/httpProtocol"
#define IIS_CONFIG_LOG_SECTION              L"system.applicationHost/log"
#define IIS_CONFIG_LOG_UTF8                 L"logInUTF8"
#define IIS_CONFIG_LIMITS                   L"limits"
#define IIS_CONFIG_PIPELINEMODE             L"managedPipelineMode"
#define IIS_CONFIG_MANAGEDRUNTIMEVERSION    L"managedRuntimeVersion"
#define IIS_CONFIG_WEBLOG                   L"logFile"
#define IIS_CONFIG_LOGFORMAT                L"logFormat"
#define IIS_CONFIG_MIMEMAP                  L"mimeMap"
#define IIS_CONFIG_MIMETYPE                 L"mimeType"
#define IIS_CONFIG_MODULES                  L"modules"
#define IIS_CONFIG_NAME                     L"name"
#define IIS_CONFIG_PATH                     L"path"
#define IIS_CONFIG_PHYSPATH                 L"physicalPath"
#define IIS_CONFIG_PROTOCOL                 L"protocol"
#define IIS_CONFIG_RESTRICTION_SECTION      L"system.webServer/security/isapiCgiRestriction"
#define IIS_CONFIG_SITE                     L"site"
#define IIS_CONFIG_SITE_ID                  L"id"
#define IIS_CONFIG_SITES_SECTION            L"system.applicationHost/sites"
#define IIS_CONFIG_CONNECTTIMEOUT           L"connectionTimeout"
#define IIS_CONFIG_VDIR                     L"virtualDirectory"
#define IIS_CONFIG_VALUE                    L"value"
#define IIS_CONFIG_VERBS                    L"verb"
#define IIS_CONFIG_WEBLIMITS_SECTION        L"system.applicationHost/webLimits"
#define IIS_CONFIG_WEBLIMITS_MAXBAND        L"maxGlobalBandwidth"
#define IIS_CONFIG_TRUE                     L"true"
#define IIS_CONFIG_FALSE                    L"false"
#define IIS_CONFIG_ERROR                    L"error"
#define IIS_CONFIG_STATUSCODE               L"statusCode"
#define IIS_CONFIG_SUBSTATUS                L"subStatusCode"
#define IIS_CONFIG_LANGPATH                 L"prefixLanguageFilePath"
#define IIS_CONFIG_RESPMODE                 L"responseMode"
#define IIS_CONFIG_CLEAR                    L"clear"
#define IIS_CONFIG_RECYCLING                L"recycling"
#define IIS_CONFIG_PEROIDRESTART            L"periodicRestart"
#define IIS_CONFIG_TIME                     L"time"
#define IIS_CONFIG_REQUESTS                 L"requests"
#define IIS_CONFIG_SCHEDULE                 L"schedule"
#define IIS_CONFIG_MEMORY                   L"memory"
#define IIS_CONFIG_PRIVMEMORY               L"privateMemory"
#define IIS_CONFIG_PROCESSMODEL             L"processModel"
#define IIS_CONFIG_IDLETIMEOUT              L"idleTimeout"
#define IIS_CONFIG_QUEUELENGTH              L"queueLength"
#define IIS_CONFIG_IDENITITYTYPE            L"identityType"
#define IIS_CONFIG_LOCALSYSTEM              L"LocalSystem"
#define IIS_CONFIG_LOCALSERVICE             L"LocalService"
#define IIS_CONFIG_NETWORKSERVICE           L"NetworkService"
#define IIS_CONFIG_SPECIFICUSER             L"SpecificUser"
#define IIS_CONFIG_APPLICATIONPOOLIDENTITY  L"ApplicationPoolIdentity"
#define IIS_CONFIG_USERNAME                 L"userName"
#define IIS_CONFIG_PASSWORD                 L"password"
#define IIS_CONFIG_CPU                      L"cpu"
#define IIS_CONFIG_LIMIT                    L"limit"
#define IIS_CONFIG_CPU_ACTION               L"action"
#define IIS_CONFIG_KILLW3WP                 L"KillW3wp"
#define IIS_CONFIG_NOACTION                 L"NoAction"
#define IIS_CONFIG_RESETINTERVAL            L"resetInterval"
#define IIS_CONFIG_MAXWRKPROCESSES          L"maxProcesses"
#define IIS_CONFIG_HANDLERS_SECTION         L"system.webServer/handlers"
#define IIS_CONFIG_DEFAULTDOC_SECTION       L"system.webServer/defaultDocument"
#define IIS_CONFIG_ASP_SECTION              L"system.webServer/asp"
#define IIS_CONFIG_SCRIPTERROR              L"scriptErrorSentToBrowser"
#define IIS_CONFIG_STATICCONTENT_SECTION    L"system.webServer/staticContent"
#define IIS_CONFIG_HTTPEXPIRES              L"httpExpires"
#define IIS_CONFIG_MAXAGE                   L"cacheControlMaxAge"
#define IIS_CONFIG_CLIENTCACHE              L"clientCache"
#define IIS_CONFIG_CACHECONTROLMODE         L"cacheControlMode"
#define IIS_CONFIG_USEMAXAGE                L"UseMaxAge"
#define IIS_CONFIG_USEEXPIRES               L"UseExpires"
#define IIS_CONFIG_CACHECUST                L"cacheControlCustom"
#define IIS_CONFIG_ASP_SECTION              L"system.webServer/asp"
#define IIS_CONFIG_SESSION                  L"session"
#define IIS_CONFIG_ALLOWSTATE               L"allowSessionState"
#define IIS_CONFIG_TIMEOUT                  L"timeout"
#define IIS_CONFIG_BUFFERING                L"bufferingOn"
#define IIS_CONFIG_PARENTPATHS              L"enableParentPaths"
#define IIS_CONFIG_SCRIPTLANG               L"scriptLanguage"
#define IIS_CONFIG_SCRIPTTIMEOUT            L"scriptTimeout"
#define IIS_CONFIG_LIMITS                   L"limits"
#define IIS_CONFIG_ALLOWDEBUG               L"appAllowDebugging"
#define IIS_CONFIG_ALLOWCLIENTDEBUG         L"appAllowClientDebug"
#define IIS_CONFIG_CERTIFICATEHASH          L"certificateHash"
#define IIS_CONFIG_CERTIFICATESTORENAME     L"certificateStoreName"
#define IIS_CONFIG_HTTPLOGGING_SECTION      L"system.webServer/httpLogging"
#define IIS_CONFIG_DONTLOG                  L"dontLog"

typedef BOOL (CALLBACK* ENUMAPHOSTELEMENTPROC)(IAppHostElement*, LPVOID);
typedef BOOL (CALLBACK* VARIANTCOMPARATORPROC)(VARIANT*, VARIANT*);

HRESULT DAPI Iis7PutPropertyVariant(
    __in IAppHostElement *pElement,
    __in LPCWSTR wzPropName,
    __in VARIANT vtPut
    );

HRESULT DAPI Iis7PutPropertyInteger(
    __in IAppHostElement *pElement,
    __in LPCWSTR wzPropName,
    __in DWORD dValue
    );

HRESULT DAPI Iis7PutPropertyString(
    __in IAppHostElement *pElement,
    __in LPCWSTR wzPropName,
    __in LPCWSTR wzString
    );

HRESULT DAPI Iis7PutPropertyBool(
    __in IAppHostElement *pElement,
    __in LPCWSTR wzPropName,
    __in BOOL fValue);

HRESULT DAPI Iis7GetPropertyVariant(
    __in IAppHostElement *pElement,
    __in LPCWSTR wzPropName,
    __in VARIANT* vtGet
    );

HRESULT DAPI Iis7GetPropertyString(
    __in IAppHostElement *pElement,
    __in LPCWSTR wzPropName,
    __in LPWSTR* psczGet
    );

struct IIS7_APPHOSTELEMENTCOMPARISON
{
    LPCWSTR sczElementName;
    LPCWSTR sczAttributeName;
    VARIANT* pvAttributeValue;
    VARIANTCOMPARATORPROC pComparator;
};

BOOL DAPI Iis7IsMatchingAppHostElement(
    __in IAppHostElement *pElement,
    __in IIS7_APPHOSTELEMENTCOMPARISON* pComparison
    );

HRESULT DAPI Iis7FindAppHostElementString(
    __in IAppHostElementCollection *pCollection,
    __in LPCWSTR wzElementName,
    __in LPCWSTR wzAttributeName,
    __in LPCWSTR wzAttributeValue,
    __out IAppHostElement** ppElement,
    __out DWORD* pdwIndex
    );

HRESULT DAPI Iis7FindAppHostElementPath(
    __in IAppHostElementCollection *pCollection,
    __in LPCWSTR wzElementName,
    __in LPCWSTR wzAttributeName,
    __in LPCWSTR wzAttributeValue,
    __out IAppHostElement** ppElement,
    __out DWORD* pdwIndex
    );

HRESULT DAPI Iis7FindAppHostElementInteger(
    __in IAppHostElementCollection *pCollection,
    __in LPCWSTR wzElementName,
    __in LPCWSTR wzAttributeName,
    __in DWORD dwAttributeValue,
    __out IAppHostElement** ppElement,
    __out DWORD* pdwIndex
    );

HRESULT DAPI Iis7FindAppHostElementVariant(
    __in IAppHostElementCollection *pCollection,
    __in LPCWSTR wzElementName,
    __in LPCWSTR wzAttributeName,
    __in VARIANT* pvAttributeValue,
    __out IAppHostElement** ppElement,
    __out DWORD* pdwIndex
    );

HRESULT DAPI Iis7EnumAppHostElements(
    __in IAppHostElementCollection *pCollection,
    __in ENUMAPHOSTELEMENTPROC pCallback,
    __in LPVOID pContext,
    __out IAppHostElement** ppElement,
    __out DWORD* pdwIndex
    );

HRESULT DAPI Iis7FindAppHostMethod(
    __in IAppHostMethodCollection *pCollection,
    __in LPCWSTR wzMethodName,
    __out IAppHostMethod** ppMethod,
    __out DWORD* pdwIndex
    );

#ifdef __cplusplus
}
#endif


text:
#ifndef VISLIB_TextFileReader_H_INCLUDED
#define VISLIB_TextFileReader_H_INCLUDED
#if (defined(_MSC_VER) && (_MSC_VER > 1000))
#pragma once
#endif /* (defined(_MSC_VER) && (_MSC_VER > 1000)) */
#if defined(_WIN32) && defined(_MANAGED)
#pragma managed(push, off)
#endif /* defined(_WIN32) && defined(_MANAGED) */

#include "vislib/String.h"
#include "vislib/sys/File.h"

namespace vislib {
namespace sys {

/**
 * Utility class to read a text file a line at a time.
 *
 *     CURRENTLY ONLY ASCII TEXT FILES ARE SUPPORTED!
 *
 * All methods with unicode string parameters will work on ascii strings
 * and will convert their results to unicode!
 */
class TextFileReader {
public:
    /**
     * Ctor.
     *
     * @param file The file object to read from. The reader will not take
     *             the ownership of the file object specified. The caller
     *             must ensure that the file object remains valid as long
     *             as it is used by this reader. The reader will also not
     *             close or open the file!
     * @param bufferSize The size of the line buffer to be used in bytes.
     */
    TextFileReader(File* file = NULL, unsigned int bufferSize = 10240);

    /** Dtor. */
    ~TextFileReader(void);

    /**
     * Synchronises the reader position based on the position of the file
     * pointer. You must not call this method if no file object has been
     * set.
     */
    void FilePositionToReaderPosition(void);

    /**
     * Gets the size of the read buffer in bytes.
     *
     * @return The size of the read buffer in bytes.
     */
    inline unsigned int GetBufferSize(void) const {
        return this->bufSize;
    }

    /**
     * Gets the file object from which the reader reads.
     *
     * @return The file object from which the reader reads.
     */
    inline const File* GetFile(void) const {
        return this->file;
    }

    /**
     * Synchronises the position of the file pointer based on the reader
     * position. You must not call this method if no file object has been
     * set.
     */
    void ReaderPositionToFilePosition(void);

    /**
     * Reads the next line from the text file. You must not call this
     * method if no file object has been set.
     *
     * @param outLine The string to receive the content of the newly read
     *                line.
     * @param maxSize The maximum number of characters to be read from the
     *                file
     *
     * @return 'true' if a line could be successfully read, 'false'
     *         otherwise (usually eof). If 'false' is returned the value
     *         of outLine is undefined.
     */
    bool ReadLine(StringA& outLine, unsigned int maxSize = 1024);

    /**
     * Reads the next line from the text file. You must not call this
     * method if no file object has been set.
     *
     * @param outLine The string to receive the content of the newly read
     *                line.
     * @param maxSize The maximum number of characters to be read from the
     *                file
     *
     * @return 'true' if a line could be successfully read, 'false'
     *         otherwise (usually eof). If 'false' is returned the value
     *         of outLine is undefined.
     */
    bool ReadLine(StringW& outLine, unsigned int maxSize = 1024);

    /**
     * Reads the next line from the text file. You must not call this
     * method if no file object has been set.
     *
     * @param maxSize The maximum number of characters to be read from the
     *                file
     *
     * @return The content of the newly read line.
     */
    inline StringA ReadLineA(unsigned int maxSize = 1024) {
        StringA line;
        if (!this->ReadLine(line, maxSize)) {
            line.Clear();
        }
        return line;
    }

    /**
     * Reads the next line from the text file. You must not call this
     * method if no file object has been set.
     *
     * @param success Receives the return value of 'ReadLine': 'true' if a
     *                line had be read successfully, 'false' otherwise.
     * @param maxSize The maximum number of characters to be read from the
     *                file
     *
     * @return The content of the newly read line.
     */
    inline StringA ReadLineA(bool& success, unsigned int maxSize = 1024) {
        StringA line;
        if ((success = this->ReadLine(line, maxSize)) == false) {
            line.Clear();
        }
        return line;
    }

    /**
     * Reads the next line from the text file. You must not call this
     * method if no file object has been set.
     *
     * @param maxSize The maximum number of characters to be read from the
     *                file
     *
     * @return The content of the newly read line.
     */
    inline StringW ReadLineW(unsigned int maxSize = 1024) {
        StringW line;
        if (!this->ReadLine(line, maxSize)) {
            line.Clear();
        }
        return line;
    }

    /**
     * Reads the next line from the text file. You must not call this
     * method if no file object has been set.
     *
     * @param maxSize The maximum number of characters to be read from the
     *                file
     *
     * @return The content of the newly read line.
     */
    inline StringW ReadLineW(bool& success, unsigned int maxSize = 1024) {
        StringW line;
        if ((success = this->ReadLine(line, maxSize)) == false) {
            line.Clear();
        }
        return line;
    }

    /**
     * Sets the size of the read buffer in bytes.
     *
     * @param bufferSize The new size of the read buffer in bytes.
     */
    void SetBufferSize(unsigned int bufferSize);

    /**
     * Sets the file to be read from, replacing any previously set file
     * object. The object being replace will not be closed or deleted by
     * the reader, nor will the reader take ownership of the new file
     * object. The caller must ensure that the new file object remains
     * valid as long as it is used by the reader. This implicitly calls
     * 'ReaderPositionToFilePosition' on the old file object if necessary
     * and 'FilePositionToReaderPosition' on the new file object.
     *
     * @param file The new file object to read from.
     */
    void SetFile(File* file);

private:
    /** Forbidden copy ctor. */
    TextFileReader(const TextFileReader& src);

    /** Forbidden assignment operator */
    TextFileReader& operator=(const TextFileReader& src);

    /** The read buffer */
    char* buf;

    /** The position of the file pointer inside the buffer */
    unsigned int bufPos;

    /** The size of the buffer memory */
    unsigned int bufSize;

    /** The starting point of the buffer in the file */
    File::FileSize bufStart;

    /** The file object to be used. */
    File* file;

    /** The size of the valid portion of the buffer */
    unsigned int validBufSize;
};

} /* end namespace sys */
} /* end namespace vislib */

#if defined(_WIN32) && defined(_MANAGED)
#pragma managed(pop)
#endif /* defined(_WIN32) && defined(_MANAGED) */
#endif /* VISLIB_TextFileReader_H_INCLUDED */


text:
<?php
if(!defined('IN_INDEX')) exit;

if(isset($_SESSION[$settings['session_prefix'].'user_id']) && $_SESSION[$settings['session_prefix'].'user_type']==1)
 {
  if(isset($_POST['spam_protection_submit']))
   {
    // banists:
    if(isset($_POST['banned_ips']) && trim($_POST['banned_ips']) != '')
     {
      $banned_ips_array = preg_split('/\015\012|\015|\012/',$_POST['banned_ips']);
      foreach($banned_ips_array as $banned_ip)
       {
        if(trim($banned_ip)!='') $banned_ips_array_checked[] = trim($banned_ip);
       }
      natcasesort($banned_ips_array_checked);
      $banned_ips = implode("\n", $banned_ips_array_checked);
      if(is_ip_banned($_SERVER['REMOTE_ADDR'], $banned_ips_array_checked)) $errors[] = 'error_own_ip_banned';
     }
    else $banned_ips = '';

    if(isset($_POST['banned_user_agents']) && trim($_POST['banned_user_agents']) != '')
     {
      $banned_user_agents_array = preg_split('/\015\012|\015|\012/',$_POST['banned_user_agents']);
      foreach($banned_user_agents_array as $banned_user_agent)
       {
        if(trim($banned_user_agent)!='') $banned_user_agents_array_checked[] = trim($banned_user_agent);
       }
      natcasesort($banned_user_agents_array_checked);
      $banned_user_agents = implode("\n", $banned_user_agents_array_checked);
      if(is_user_agent_banned($_SERVER['HTTP_USER_AGENT'], $banned_user_agents_array_checked)) $errors[] = 'error_own_user_agent_banned';
     }
    else $banned_user_agents = '';

    if(isset($_POST['not_accepted_words']) && trim($_POST['not_accepted_words']) != '')
     {
      $not_accepted_words_array = preg_split('/\015\012|\015|\012/',$_POST['not_accepted_words']);
      foreach($not_accepted_words_array as $not_accepted_word)
       {
        if(trim($not_accepted_word)!='') $not_accepted_words_array_checked[] = trim($not_accepted_word);
       }
      natcasesort($not_accepted_words_array_checked);
      $not_accepted_words = implode("\n", $not_accepted_words_array_checked);
     }
    else $not_accepted_words = '';

    $akismet_key = !empty($_POST['akismet_key']) ? $_POST['akismet_key'] : '';
    $akismet_entry_check = isset($_POST['akismet_entry_check']) ? 1 : 0;
    $akismet_mail_check = isset($_POST['akismet_mail_check']) ? 1 : 0;

    if(trim($banned_ips=='') && trim($banned_user_agents=='')) $check_access_permission = 0;
    else $check_access_permission = 1;

    if(empty($errors))
     {
      Database::$content->beginTransaction();
      $dbr = Database::$content->prepare("UPDATE ".Database::$db_settings['banlists_table']." SET list=:list WHERE name=:name");
      $dbr->bindValue(':name', 'ips', PDO::PARAM_STR);
      $dbr->bindParam(':list', $banned_ips, PDO::PARAM_STR);
      $dbr->execute();
      $dbr->bindValue(':name', 'user_agents', PDO::PARAM_STR);
      $dbr->bindParam(':list', $banned_user_agents, PDO::PARAM_STR);
      $dbr->execute();
      $dbr->bindValue(':name', 'words', PDO::PARAM_STR);
      $dbr->bindParam(':list', $not_accepted_words, PDO::PARAM_STR);
      $dbr->execute();
      Database::$content->commit();

      Database::$content->beginTransaction();
      $dbr = Database::$content->prepare("UPDATE ".Database::$db_settings['settings_table']." SET value=:value WHERE name=:name");
      $dbr->bindValue(':name', 'akismet_key', PDO::PARAM_STR);
      $dbr->bindParam(':value', $akismet_key, PDO::PARAM_STR);
      $dbr->execute();
      $dbr->bindValue(':name', 'akismet_entry_check', PDO::PARAM_STR);
      $dbr->bindParam(':value', $akismet_entry_check, PDO::PARAM_STR);
      $dbr->execute();
      $dbr->bindValue(':name', 'akismet_mail_check', PDO::PARAM_STR);
      $dbr->bindParam(':value', $akismet_mail_check, PDO::PARAM_STR);
      $dbr->execute();
      $dbr->bindValue(':name', 'check_access_permission', PDO::PARAM_STR);
      $dbr->bindParam(':value', $check_access_permission, PDO::PARAM_STR);
      $dbr->execute();
      Database::$content->commit();

      header('Location: '.BASE_URL.ADMIN_DIR.'index.php?mode=spam_protection&saved=true');
      exit;
     }

    if(isset($errors))
     {
      $template->assign('errors',$errors);
      if(isset($_POST['banned_ips'])) $template->assign('banned_ips',htmlspecialchars(stripslashes($_POST['banned_ips'])));
      if(isset($_POST['banned_user_agents'])) $template->assign('banned_user_agents',htmlspecialchars(stripslashes($_POST['banned_user_agents'])));
      if(isset($_POST['not_accepted_words'])) $template->assign('not_accepted_words',htmlspecialchars(stripslashes($_POST['not_accepted_words'])));
      if(isset($_POST['akismet_key'])) $template->assign('akismet_key',htmlspecialchars(stripslashes($_POST['akismet_key'])));
      if(isset($_POST['akismet_entry_check'])) $template->assign('akismet_entry_check',intval($_POST['akismet_entry_check']));
      if(isset($_POST['akismet_mail_check'])) $template->assign('akismet_mail_check',intval($_POST['akismet_mail_check']));

     }

   }
  else
   {
    $dbr = Database::$content->query("SELECT name, list FROM ".Database::$db_settings['banlists_table']);
    while($data = $dbr->fetch())
     {
      switch($data['name'])
       {
        case 'ips':
         $template->assign('banned_ips',htmlspecialchars(stripslashes($data['list'])));
         break;
        case 'user_agents':
         $template->assign('banned_user_agents',htmlspecialchars(stripslashes($data['list'])));
         break;
        case 'words':
         $template->assign('not_accepted_words',htmlspecialchars(stripslashes($data['list'])));
         break;
       }
     }
    $template->assign('akismet_key',htmlspecialchars(stripslashes($settings['akismet_key'])));
    $template->assign('akismet_entry_check',intval($settings['akismet_entry_check']));
    $template->assign('akismet_mail_check',intval($settings['akismet_mail_check']));
   }
  if(isset($_GET['saved']))
   {
    $template->assign('saved',true);
   }
  $template->assign('subtitle',Localization::$lang['spam_protection']);
  $template->assign('subtemplate','spam_protection.inc.tpl');
 }


text:
from pyasn1.type import univ, char, namedtype, namedval, tag, constraint, useful

# To make this module work, had to:
# 1. Define the INTEGER MAX value.
# https://www.obj-sys.com/docs/acv58/CCppUsersGuide/CCppUsersGuidea12.html
MAX = 2**32-1

class OctetString(univ.OctetString):
    pass

OctetString.subtypeSpec = constraint.ValueSizeConstraint(1, 1024)

class BitString(univ.BitString):
    pass

BitString.subtypeSpec=constraint.ValueSizeConstraint(1, 1024)

class BinaryData(univ.Choice):
    pass

BinaryData.componentType = namedtype.NamedTypes(
    namedtype.NamedType('bitString', BitString().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
    namedtype.NamedType('octetString', OctetString().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
)

class Token(univ.Integer):
    pass

class Tokens(univ.SequenceOf):
    pass

Tokens.componentType = Token()
Tokens.subtypeSpec=constraint.ValueSizeConstraint(1, 128)

class Positive(univ.Integer):
    pass

Positive.subtypeSpec = constraint.ValueRangeConstraint(1, MAX)

class Length(Positive):
    pass

class UTCDateTime(Positive):
    pass

class TokensAndTimestamp(univ.Sequence):
    pass

TokensAndTimestamp.componentType = namedtype.NamedTypes(
    namedtype.NamedType('numberOfTokens', Length().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
    namedtype.NamedType('tokens', Tokens().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
    namedtype.NamedType('timestamp', UTCDateTime().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
)

class SignatureMethod(univ.Enumerated):
    pass

SignatureMethod.namedValues = namedval.NamedValues(
    ('rsassa-pss', 0),
    ('ed25519', 1)
)

class Keyid(BinaryData):
    pass

class HashFunction(univ.Enumerated):
    pass

HashFunction.namedValues = namedval.NamedValues(
    ('sha224', 0),
    ('sha256', 1),
    ('sha384', 2),
    ('sha512', 3),
    ('sha512-224', 4),
    ('sha512-256', 5)
)

class Hash(univ.Sequence):
    pass

Hash.componentType = namedtype.NamedTypes(
    namedtype.NamedType('function', HashFunction().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
    namedtype.NamedType('digest', BinaryData().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1)))
)

class Signature(univ.Sequence):
    pass

Signature.componentType = namedtype.NamedTypes(
    namedtype.NamedType('keyid', Keyid().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
    namedtype.NamedType('method', SignatureMethod().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
    namedtype.NamedType('hash', Hash().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 2))),
    namedtype.NamedType('value', BinaryData().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 3)))
)

class Signatures(univ.SequenceOf):
    pass

Signatures.componentType = Signature()
Signatures.subtypeSpec=constraint.ValueSizeConstraint(1, 8)

class CurrentTime(univ.Sequence):
    pass

CurrentTime.componentType = namedtype.NamedTypes(
    namedtype.NamedType('signed', TokensAndTimestamp().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
    namedtype.NamedType('numberOfSignatures', Length().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
    namedtype.NamedType('signatures', Signatures().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
)

class Filename(char.VisibleString):
    pass

Filename.subtypeSpec = constraint.ValueSizeConstraint(1, 32)

class Hashes(univ.SequenceOf):
    pass

Hashes.componentType = Hash()
Hashes.subtypeSpec=constraint.ValueSizeConstraint(1, 8)

class Identifier(char.VisibleString):
    pass

Identifier.subtypeSpec = constraint.ValueSizeConstraint(1, 32)

class Keyids(univ.SequenceOf):
    pass

Keyids.componentType = Keyid()
Keyids.subtypeSpec=constraint.ValueSizeConstraint(1, 8)

class Natural(univ.Integer):
    pass

Natural.subtypeSpec = constraint.ValueRangeConstraint(0, MAX)

class Path(char.VisibleString):
    pass

Path.subtypeSpec = constraint.ValueSizeConstraint(1, 32)

class Paths(univ.SequenceOf):
    pass

Paths.componentType = Path()
Paths.subtypeSpec=constraint.ValueSizeConstraint(1, 8)

class PublicKeyType(univ.Enumerated):
    pass

PublicKeyType.namedValues = namedval.NamedValues(
    ('rsa', 0),
    ('ed25519', 1)
)

class PublicKey(univ.Sequence):
    pass

PublicKey.componentType = namedtype.NamedTypes(
    namedtype.NamedType('publicKeyid', Keyid().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
    namedtype.NamedType('publicKeyType', PublicKeyType().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
    namedtype.NamedType('publicKeyValue', BinaryData().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 2)))
)

class PublicKeys(univ.SequenceOf):
    pass

PublicKeys.componentType = PublicKey()
PublicKeys.subtypeSpec=constraint.ValueSizeConstraint(1, 8)

class RoleType(univ.Enumerated):
    pass

RoleType.namedValues = namedval.NamedValues(
    ('root', 0),
    ('targets', 1),
    ('snapshot', 2),
    ('timestamp', 3)
)

class SequenceOfTokens(univ.Sequence):
    pass

SequenceOfTokens.componentType = namedtype.NamedTypes(
    namedtype.NamedType('numberOfTokens', Length().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
    namedtype.NamedType('tokens', Tokens().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
)

class StrictFilename(char.VisibleString):
    pass

StrictFilename.subtypeSpec = constraint.ValueSizeConstraint(1, 32)

class Threshold(Positive):
    pass

class URL(char.VisibleString):
    pass

URL.subtypeSpec = constraint.ValueSizeConstraint(1, 1024)

class URLs(univ.SequenceOf):
    pass

URLs.componentType = URL()
URLs.subtypeSpec=constraint.ValueSizeConstraint(0, 8)

class Version(Positive):
    pass


text:
@interface XWOneBoxDelegate : NSObject

@end


text:
require 'devise/strategies/authenticatable'

module Devise
  module Strategies
    # Remember the user through the remember token. This strategy is responsible
    # to verify whether there is a cookie with the remember token, and to
    # recreate the user from this cookie if it exists. Must be called *before*
    # authenticatable.
    class Rememberable < Authenticatable
      # A valid strategy for rememberable needs a remember token in the cookies.
      def valid?
        @remember_cookie = nil
        remember_cookie.present?
      end

      # To authenticate a user we deserialize the cookie and attempt finding
      # the record in the database. If the attempt fails, we pass to another
      # strategy handle the authentication.
      def authenticate!
        resource = mapping.to.serialize_from_cookie(*remember_cookie)

        unless resource
          cookies.delete(remember_key)
          return pass
        end

        if validate(resource)
          remember_me(resource) if extend_remember_me?(resource)
          resource.after_remembered
          success!(resource)
        end
      end

      # No need to clean up the CSRF when using rememberable.
      # In fact, cleaning it up here would be a bug because
      # rememberable is triggered on GET requests which means
      # we would render a page on first access with all csrf
      # tokens expired.
      def clean_up_csrf?
        false
      end

    private

      def extend_remember_me?(resource)
        resource.respond_to?(:extend_remember_period) && resource.extend_remember_period
      end

      def remember_me?
        true
      end

      def remember_key
        mapping.to.rememberable_options.fetch(:key, "remember_#{scope}_token")
      end

      def remember_cookie
        @remember_cookie ||= cookies.signed[remember_key]
      end

    end
  end
end

Warden::Strategies.add(:rememberable, Devise::Strategies::Rememberable)


text:
package ru.igorjan.codeforces.dao.implementations;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import ru.igorjan.codeforces.dao.interfaces.UserDAO;
import ru.igorjan.codeforces.model.Blog;
import ru.igorjan.codeforces.model.Comment;
import ru.igorjan.codeforces.model.User;

import java.util.List;

/**
 * Created by igorjan on 15.02.16.
 * Banana
 */

@Repository
@Transactional
public class UserDAOImpl extends GenericDAOImpl<User> implements UserDAO {

    public void addBlog(Blog blog) {
        Blog indb = entityManager.find(Blog.class, blog.id);
        User user = getByUsername(blog.username);
        if (indb != null)
            user.sumOfBlogs -= indb.rating;
        else
            user.countOfBlogs++;
        user.sumOfBlogs += blog.rating;
        entityManager.merge(blog);
        entityManager.merge(user);
    }

    public void addComment(Comment comment) {
        Comment indb = entityManager.find(Comment.class, comment.id);
        User user = getByUsername(comment.username);
        if (indb != null) {
            user.sumOfComments -= indb.rating;
            user.sumOfComments += comment.rating;
        }
        if (Math.abs(comment.rating) > 50)
            entityManager.merge(comment);
        entityManager.merge(user);
    }

    public User getByUsername(String username) {
        List<User> users = entityManager.createQuery("select u from User u where u.username = :username", User.class).setParameter("username", username).getResultList();
        return users.size() == 0 ? new User(username) : users.get(0);
    }
}


text:
import unittest
from ...compatibility import StringIO
from ..helperfunctions import _xml_to_list
from ...worksheet import Worksheet
from ...sharedstrings import SharedStringTable

class TestAssembleWorksheet(unittest.TestCase):
    """
    Test assembling a complete Worksheet file.

    """
    def test_assemble_xml_file(self):
        """Test writing a worksheet with strings in cells."""
        self.maxDiff = None

        fh = StringIO()
        worksheet = Worksheet()
        worksheet._set_filehandle(fh)
        worksheet.str_table = SharedStringTable()

        worksheet.select()

        # Write some strings.
        worksheet.write_string(0, 0, 'Foo')
        worksheet.write_string(2, 0, 'Bar')
        worksheet.write_string(2, 3, 'Baz')

        worksheet._assemble_xml_file()

        exp = _xml_to_list("""
                <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
                <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
                  <dimension ref="A1:D3"/>
                  <sheetViews>
                    <sheetView tabSelected="1" workbookViewId="0"/>
                  </sheetViews>
                  <sheetFormatPr defaultRowHeight="15"/>
                  <sheetData>
                    <row r="1" spans="1:4">
                      <c r="A1" t="s">
                        <v>0</v>
                      </c>
                    </row>
                    <row r="3" spans="1:4">
                      <c r="A3" t="s">
                        <v>1</v>
                      </c>
                      <c r="D3" t="s">
                        <v>2</v>
                      </c>
                    </row>
                  </sheetData>
                  <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>
                </worksheet>
                """)

        got = _xml_to_list(fh.getvalue())

        self.assertEqual(got, exp)


text: rake build_releases


text:
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;

namespace ShpToSql.SqlConnectionControl
{
    public class SqlConnectionString : INotifyPropertyChanged
    {
        private readonly System.Data.SqlClient.SqlConnectionStringBuilder _builder = new System.Data.SqlClient.SqlConnectionStringBuilder
                                                                   {
                                                                       Pooling = false,
                                                                       IntegratedSecurity = true,
                                                                       TypeSystemVersion = "Sql Server 2012"
                                                                   };

        private ObservableCollection<String> _typeSystemVersions = new ObservableCollection<string> { "Sql Server 2008", "Sql Server 2012" };

        public SqlConnectionString()
        { }

        public SqlConnectionString(string connectionString)
        {
            _builder.ConnectionString = connectionString;
        }

        public static implicit operator string(SqlConnectionString connectionString)
        {
            return connectionString.ToString();
        }

        public override string ToString()
        {
            if (Server.EndsWith(".sdf"))
                if (string.IsNullOrEmpty(Password))
                    return new System.Data.SqlClient.SqlConnectionStringBuilder {DataSource = Server}.ConnectionString;
                else
                    return new System.Data.SqlClient.SqlConnectionStringBuilder {DataSource = Server, Password = Password}.
                        ConnectionString;

            return _builder.ConnectionString;
        }

        /// <summary>
        /// Creates a copy of this connection string with the specified database instead of the current
        /// </summary>
        /// <param name="databaseName">Name of the database.</param>
        /// <returns></returns>
        public SqlConnectionString WithDatabase(string databaseName)
        {
            return new SqlConnectionString
                       {
                           Server = Server,
                           Database = databaseName,
                           IntegratedSecurity = IntegratedSecurity,
                           UserName = UserName,
                           Password = Password,
                           Pooling = Pooling
                       };
        }

        public ObservableCollection<string> TypeSystemVersions
        {
            get
            {
                return _typeSystemVersions;
            }
            private set
            {
                if (_typeSystemVersions != value)
                {
                    _typeSystemVersions = value;
                    OnPropertyChanged("TypeSystemVersions");
                }
            }
        }

        public string Server
        {
            get
            {
                return _builder.DataSource;
            }
            set
            {
                if (_builder.DataSource == value) return;
                _builder.DataSource = value;
                OnPropertyChanged("Server");
                OnPropertyChanged("IsValid");
            }
        }

        public string Database
        {
            get
            {
                return _builder.InitialCatalog;
            }
            set
            {
                if (_builder.InitialCatalog == value) return;
                _builder.InitialCatalog = value;
                OnPropertyChanged("Database");
                OnPropertyChanged("IsValid");
            }
        }

        public string TypeSystemVersion
        {
            get
            {
                return _builder.TypeSystemVersion;
            }
            set
            {
                if (_builder.TypeSystemVersion == value) return;
                _builder.TypeSystemVersion = value;
            }
        }

        public string UserName
        {
            get
            {
                return _builder.UserID;
            }
            set
            {
                if (_builder.UserID == value) return;
                _builder.UserID = value;
                OnPropertyChanged("UserName");
                OnPropertyChanged("IsValid");
            }
        }

        public bool Pooling
        {
            get
            {
                return _builder.Pooling;
            }
            set
            {
                if (_builder.Pooling == value) return;
                _builder.Pooling = value;
                OnPropertyChanged("Pooling");
                OnPropertyChanged("IsValid");
            }
        }

        public int ConnectionTimeout
        {
            get
            {
                return _builder.ConnectTimeout;
            }
            set
            {
                if (_builder.ConnectTimeout == value) return;
                _builder.ConnectTimeout = value;
                OnPropertyChanged("ConnectionTimeout");
                OnPropertyChanged("IsValid");
            }
        }

        public string Password
        {
            get
            {
                return _builder.Password;
            }
            set
            {
                if (_builder.Password == value) return;
                _builder.Password = value;
                OnPropertyChanged("Password");
                OnPropertyChanged("IsValid");
            }
        }

        public bool IntegratedSecurity
        {
            get
            {
                return _builder.IntegratedSecurity;
            }
            set
            {
                if (_builder.IntegratedSecurity == value) return;
                _builder.IntegratedSecurity = value;
                OnPropertyChanged("IntegratedSecurity");
                OnPropertyChanged("IsValid");
            }
        }

        public bool IsValid()
        {
            return
                (!string.IsNullOrEmpty(Server) && Server.EndsWith(".sdf")) ||
                (!string.IsNullOrEmpty(Server) &&
                 !string.IsNullOrEmpty(Database) &&
                 (IntegratedSecurity || (!string.IsNullOrEmpty(UserName) && !string.IsNullOrEmpty(Password))));
        }

        private void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged == null) return;

            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}


text:
<?php

class RouterTest extends TestCase
{

    protected $routeNameWithoutParameter = 'Localize::routes.good_morning';
    protected $dePathWithoutParameter = 'guten-morgen';
    protected $enPathWithoutParameter = 'good-morning';

    protected $routeNameWithParameter = 'Localize::routes.hello_user';
    protected $dePathWithParameter = 'hallo/{username}';
    protected $enPathWithParameter = 'hello/{username}';
    protected $dePathWithParameter1 = 'hallo/samplename';
    protected $enPathWithParameter1 = 'hello/samplename';
    protected $routeParameters = ['username' => 'samplename'];

    protected function getPackageProviders($app)
    {
        return [
            'LaurentEsc\Localization\LocalizationServiceProvider'
        ];
    }

    protected function getPackageAliases($app)
    {
        return [
            'Localize' => 'LaurentEsc\Localization\Facades\Localize',
            'Router' => 'LaurentEsc\Localization\Facades\Router',
        ];
    }

    /**
     * It translates routes
     *
     * @test
     */
    public function it_reaches_translated_routes()
    {
        $this->sendRequest('GET', $this->dePathWithoutParameter, 'de');
        $this->assertResponseOk();

        $this->sendRequest('GET', $this->enPathWithoutParameter, 'en');
        $this->assertResponseOk();
    }

    /**
     * It returns a redirect URL
     *
     * @test
     */
    public function it_returns_a_redirect_url()
    {
        $this->setRequestContext('GET', $this->dePathWithoutParameter, null, [], ['locale' => 'de']);
        $this->assertEquals($this->getUri($this->dePathWithoutParameter, 'de'),
            app('localization.router')->getRedirectURL());

        $this->setRequestContext('GET', $this->enPathWithoutParameter, null, [], ['locale' => 'en']);
        $this->assertEquals($this->getUri($this->enPathWithoutParameter, 'en'),
            app('localization.router')->getRedirectURL());
    }

    /**
     * It translates the current route
     *
     * @test
     */
    public function it_translates_the_current_route()
    {
        $this->sendRequest('GET', $this->dePathWithoutParameter, 'de');
        $this->assertEquals($this->getUri($this->enPathWithoutParameter, 'en'),
            app('localization.router')->current('en'));

        $this->refresh();

        $this->sendRequest('GET', $this->enPathWithParameter1, 'en');
        $this->assertEquals($this->getUri($this->dePathWithParameter1, 'de'),
            app('localization.router')->current('de'));
    }

    /**
     * It returns translated versions of the current route for all available locales
     *
     * @test
     */
    public function it_returns_translated_versions_of_the_current_route_for_available_locales()
    {
        $this->sendRequest('GET', $this->dePathWithoutParameter, 'de');
        $this->assertEquals([
            'en' => $this->getUri($this->enPathWithoutParameter, 'en')
        ], app('localization.router')->getCurrentVersions());

        $this->refresh();

        $this->sendRequest('GET', $this->enPathWithParameter1, 'en');
        $this->assertEquals([
            'en' => $this->getUri($this->enPathWithParameter1, 'en'),
            'de' => $this->getUri($this->dePathWithParameter1, 'de')
        ], app('localization.router')->getCurrentVersions(false));
    }

    /**
     * It resolves a translated route path
     *
     * @test
     */
    public function it_resolves_a_translated_route_path()
    {
        $this->setRequestContext('GET', '', 'de');
        $this->assertEquals($this->dePathWithoutParameter,
            app('localization.router')->resolve($this->routeNameWithoutParameter));

        $this->setRequestContext('GET', '', 'en');
        $this->assertEquals($this->enPathWithParameter,
            app('localization.router')->resolve($this->routeNameWithParameter));
    }

    /**
     * It translates a route into an url
     *
     * @test
     */
    public function it_translates_a_route_into_an_url()
    {

        $this->setRequestContext('GET', '');

        $this->assertEquals(
            $this->getUri($this->dePathWithoutParameter, 'de'),
            app('localization.router')->url($this->routeNameWithoutParameter, null, 'de')
        );

        $this->assertEquals(
            $this->getUri($this->enPathWithParameter1, 'en'),
            app('localization.router')->url($this->routeNameWithParameter, $this->routeParameters, 'en')
        );

        $this->setRequestContext('GET', '', 'de');

        $this->assertEquals(
            $this->getUri($this->dePathWithParameter1, 'de'),
            app('localization.router')->url($this->routeNameWithParameter, $this->routeParameters)
        );

        $this->setRequestContext('GET', '', 'en');

        $this->assertEquals(
            $this->getUri($this->enPathWithParameter1, 'en'),
            app('localization.router')->url($this->routeNameWithParameter, $this->routeParameters)
        );
    }

}


text:
//
// Copyright 2004-present Facebook. All Rights Reserved.
//
// 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.
//

#import <QuartzCore/QuartzCore.h>

#import "OCUnitTestRunner.h"
#import "OCUnitTestRunnerInternal.h"
#import "ReportStatus.h"
#import "TestRunState.h"
#import "XcodeBuildSettings.h"
#import "XCTestConfiguration.h"
#import "XCToolUtil.h"

static NSString * const kEnvVarPassThroughPrefix = @"XCTOOL_TEST_ENV_";

@interface OCUnitTestRunner ()
@property (nonatomic, copy) NSDictionary *buildSettings;
@property (nonatomic, copy) SimulatorInfo *simulatorInfo;
@property (nonatomic, copy) NSArray *focusedTestCases;
@property (nonatomic, copy) NSArray *allTestCases;
@property (nonatomic, copy) NSArray *arguments;
@property (nonatomic, copy) NSDictionary *environment;
@property (nonatomic, assign) BOOL garbageCollection;
@property (nonatomic, assign) BOOL freshSimulator;
@property (nonatomic, assign) BOOL resetSimulator;
@property (nonatomic, assign) BOOL noResetSimulatorOnFailure;
@property (nonatomic, assign) BOOL freshInstall;
@property (nonatomic, copy, readwrite) NSArray *reporters;
@property (nonatomic, copy) NSDictionary *framework;
@property (nonatomic, copy) NSDictionary *processEnvironment;
@end

@implementation OCUnitTestRunner

/**
 * Helper to check if the string is a prefix wildcard string,
 * which is a string ending with a star character "*".
 * If this is the case, a string with the star character is returned, otherwise 'nil'
 *
 * @param specifier The string to check
 */
+ (NSString *)wildcardPrefixFrom:(NSString *)specifier {
  NSString *resultPrefix = nil;
  if ([specifier length] > 0 &&
      [specifier characterAtIndex:specifier.length-1] == '*') {
    resultPrefix = [specifier substringToIndex:specifier.length-1];
  }
  return resultPrefix;
}

+ (NSArray *)filterTestCases:(NSArray *)testCases
             withSenTestList:(NSString *)senTestList
          senTestInvertScope:(BOOL)senTestInvertScope
                       error:(NSString **)error
{
  NSSet *originalSet = [NSSet setWithArray:testCases];

  // Come up with a set of test cases that match the senTestList pattern.
  NSMutableSet *matchingSet = [NSMutableSet set];
  NSMutableArray *notMatchedSpecifiers = [NSMutableArray array];

  if ([senTestList isEqualToString:@"All"]) {
    [matchingSet addObjectsFromArray:testCases];
  } else if ([senTestList isEqualToString:@"None"]) {
    // None, we don't add anything to the set.
  } else {
    for (NSString *specifier in [senTestList componentsSeparatedByString:@","]) {
      BOOL matched = NO;

      // If we have a slash, assume it's in the form of "SomeClass/testMethod"
      BOOL hasClassAndMethod = [specifier rangeOfString:@"/"].length > 0;
      NSString *matchingPrefix = [self wildcardPrefixFrom:specifier];

      if (hasClassAndMethod && !matchingPrefix) {
        // "SomeClass/testMethod"
        // Use the set for a fast strict matching for this one test
        if ([originalSet containsObject:specifier]) {
          [matchingSet addObject:specifier];
          matched = YES;
        }
      } else {
        // "SomeClass", or "SomeClassPrefix*", or "SomeClass/testPrefix*"
        if (!matchingPrefix) {
          // Regular case - strict matching, append "/" to limit results to all tests for this one class
          matchingPrefix = [specifier stringByAppendingString:@"/"];
        }

        for (NSString *testCase in testCases) {
          if ([testCase hasPrefix:matchingPrefix]) {
            [matchingSet addObject:testCase];
            matched = YES;
          }
        }
      }

      if (!matched) {
        [notMatchedSpecifiers addObject:specifier];
      }
    }
  }

  if ([notMatchedSpecifiers count] && senTestInvertScope == NO) {
    *error = [NSString stringWithFormat:@"Test cases for the following test specifiers weren't found: %@.", [notMatchedSpecifiers componentsJoinedByString:@", "]];
    return nil;
  }

  NSMutableArray *result = [NSMutableArray array];

  if (!senTestInvertScope) {
    [result addObjectsFromArray:[matchingSet allObjects]];
  } else {
    NSMutableSet *invertedSet = [originalSet mutableCopy];
    [invertedSet minusSet:matchingSet];
    [result addObjectsFromArray:[invertedSet allObjects]];
  }

  [result sortUsingSelector:@selector(compare:)];
  return result;
}

- (instancetype)initWithBuildSettings:(NSDictionary *)buildSettings
                        simulatorInfo:(SimulatorInfo *)simulatorInfo
                     focusedTestCases:(NSArray *)focusedTestCases
                         allTestCases:(NSArray *)allTestCases
                            arguments:(NSArray *)arguments
                          environment:(NSDictionary *)environment
                       freshSimulator:(BOOL)freshSimulator
                       resetSimulator:(BOOL)resetSimulator
            noResetSimulatorOnFailure:(BOOL)noResetSimulatorOnFailure
                         freshInstall:(BOOL)freshInstall
                          testTimeout:(NSInteger)testTimeout
                            reporters:(NSArray *)reporters
                   processEnvironment:(NSDictionary *)processEnvironment
{
  if (self = [super init]) {
    _buildSettings = [buildSettings copy];
    _simulatorInfo = [simulatorInfo copy];
    _simulatorInfo.buildSettings = buildSettings;
    _focusedTestCases = [focusedTestCases copy];
    _allTestCases = [allTestCases copy];
    _arguments = [arguments copy];
    _environment = [environment copy];
    _freshSimulator = freshSimulator;
    _resetSimulator = resetSimulator;
    _noResetSimulatorOnFailure = noResetSimulatorOnFailure;
    _freshInstall = freshInstall;
    _testTimeout = testTimeout;
    _reporters = [reporters copy];
    _framework = FrameworkInfoForTestBundleAtPath([_simulatorInfo productBundlePath]);
    _processEnvironment = [processEnvironment copy];
  }
  return self;
}

- (void)runTestsAndFeedOutputTo:(FdOutputLineFeedBlock)outputLineBlock
                   startupError:(NSString **)startupError
                    otherErrors:(NSString **)otherErrors
{
  // Subclasses will override this method.
}

- (BOOL)runTests
{
  BOOL allTestsPassed = YES;
  OCTestSuiteEventState *testSuiteState = nil;

  while (!testSuiteState || [[testSuiteState unstartedTests] count]) {
    TestRunState *testRunState;
    if (!testSuiteState) {
      testRunState = [[TestRunState alloc] initWithTests:_focusedTestCases reporters:_reporters];
      testSuiteState = testRunState.testSuiteState;
    } else {
      testRunState = [[TestRunState alloc] initWithTestSuiteEventState:testSuiteState];
    }

    FdOutputLineFeedBlock feedOutputToBlock = ^(int fd, NSString *line) {
      [testRunState parseAndHandleEvent:line];
    };

    NSString *runTestsError = nil;
    NSString *otherErrors = nil;

    [testRunState prepareToRun];

    [self runTestsAndFeedOutputTo:feedOutputToBlock
                     startupError:&runTestsError
                      otherErrors:&otherErrors];

    [testRunState didFinishRunWithStartupError:runTestsError otherErrors:otherErrors];

    allTestsPassed &= [testRunState allTestsPassed];

    // update focused test cases
    OCTestSuiteEventState *suiteState = [testRunState testSuiteState];
    NSArray *unstartedTests = [suiteState unstartedTests];
    NSMutableArray *unstartedTestCases = [[NSMutableArray alloc] initWithCapacity:[unstartedTests count]];
    [unstartedTests enumerateObjectsUsingBlock:^(OCTestEventState *obj, NSUInteger idx, BOOL *stop) {
      [unstartedTestCases addObject:[NSString stringWithFormat:@"%@/%@", obj.className, obj.methodName]];
    }];

    _focusedTestCases = unstartedTestCases;
  }

  return allTestsPassed;
}

- (NSMutableArray *)commonTestArguments
{
  // Add any argments that might have been specifed in the scheme.
  NSMutableArray *args = [_arguments ?: @[] mutableCopy];
  [args addObjectsFromArray:@[
    // Not sure exactly what this does...
    @"-NSTreatUnknownArgumentsAsOpen", @"NO",
    // Not sure exactly what this does...
    @"-ApplePersistenceIgnoreState", @"YES",
  ]];
  return args;
}

- (NSArray *)testCasesToSkip
{
  NSSet *focusedSet = [NSSet setWithArray:_focusedTestCases];
  NSSet *allSet = [NSSet setWithArray:_allTestCases];

  if ((TestableSettingsIndicatesApplicationTest(_buildSettings)) && [focusedSet isEqualToSet:allSet]) {
    return nil;
  } else {
    // When running a specific subset of tests, Xcode.app will always pass the
    // the list of excluded tests and enable the InvertScope option.
    //
    // There are two ways to make SenTestingKit or XCTest run a specific test.
    // Suppose you have a test bundle with 2 tests: 'Cls1/testA', 'Cls2/testB'.
    //
    // If you only wanted to run 'Cls1/testA', you could express that in 2 ways:
    //
    //   1) otest ... -SenTest Cls1/testA -SenTestInvertScope NO
    //   2) otest ... -SenTest Cls1/testB -SenTestInvertScope YES
    //
    // Xcode itself always uses #2.  And, for some reason, when using the Kiwi
    // testing framework, option #2 is the _ONLY_ way to run specific tests.
    //
    NSMutableSet *invertedSet = [NSMutableSet setWithSet:allSet];
    [invertedSet minusSet:focusedSet];

    return [[invertedSet allObjects] sortedArrayUsingSelector:@selector(compare:)];
  }
}

- (NSArray *)testArgumentsWithSpecifiedTestsToRun
{
  NSArray *testCasesToSkip = [self testCasesToSkip];
  BOOL invertScope = testCasesToSkip ? YES : NO;
  NSMutableArray *args = [self commonTestArguments];

  // Optionally inverts whatever SenTest / XCTest would normally select.
  [args addObjectsFromArray:@[
    [@"-" stringByAppendingString:_framework[kTestingFrameworkInvertScopeKey]],
    invertScope ? @"YES" : @"NO",
  ]];

  if ([testCasesToSkip count] == 0) {
    // SenTest / XCTest is one of Self, All, None,
    // or TestClassName[/testCaseName][,TestClassName2]
    [args addObject:[@"-" stringByAppendingString:_framework[kTestingFrameworkFilterTestArgsKey]]];
    // Xcode.app will always pass 'All' when running all tests in an
    // application test bundle.
    [args addObject:testCasesToSkip ? @"" : @"All"];
  } else {
    NSString *testScope = [testCasesToSkip componentsJoinedByString:@","];
    NSString *testListFilePath = MakeTempFileWithPrefix([NSString stringWithFormat:@"otest_test_list_%@", HashForString(testScope)]);
    NSError *writeError = nil;
    BOOL writeResult;
    /*
     * Since number of test cases to skip or run is unlimited we need to pass them through a file
     * because length of a command line string is limited.
     *
     * In XCTest framework there is a built-in feature that allows us to do that:
     *   test configuration could be saved into a file in plist format path to which should be
     *   passed in arguments with `-XCTestScopeFile` option.
     *
     * In SenTesting framework there is no such built-in feature. Since we are injecting otest-shim
     *   library we could swizzle `+[SenTestProbe testScope]` method and return list of test cases
     *   to skip or run there. In that case we could read list of test cases from a file and that is
     *   what we are doing below using `-OTEST_TESTLIST_FILE` option.
     */
    if ([_framework[kTestingFrameworkFilterTestArgsKey] isEqual:@"XCTest"]) {
      testListFilePath = [testListFilePath stringByAppendingPathExtension:@"plist"];
      NSData *data = [NSPropertyListSerialization dataWithPropertyList:@{@"XCTestScope": @[testScope],
                                                                         @"XCTestInvertScope": @(invertScope),}
                                                                format:NSPropertyListXMLFormat_v1_0
                                                               options:0
                                                                 error:&writeError];
      NSAssert(data, @"Couldn't convert to property list format: %@, error: %@", testScope, writeError);
      writeResult = [data writeToFile:testListFilePath atomically:YES];
      NSAssert(writeResult, @"Couldn't save list of tests to run to a file at path %@", testListFilePath);
      [args addObjectsFromArray:@[
        @"-XCTestScopeFile", testListFilePath,
      ]];
    } else {
      writeResult = [testScope writeToFile:testListFilePath atomically:YES encoding:NSUTF8StringEncoding error:&writeError];
      NSAssert(writeResult, @"Couldn't save list of tests to run to a file at path %@; error: %@", testListFilePath, writeError);
      [args addObjectsFromArray:@[
        // in otest-shim we are swizzling `+[SenTestProbe testScope]` and
        // returning list of tests saved in the file specified below
        @"-OTEST_TESTLIST_FILE", testListFilePath,
        @"-OTEST_FILTER_TEST_ARGS_KEY", _framework[kTestingFrameworkFilterTestArgsKey],
        // it looks like `simctl` polute `NSUserDefaults` of SenTesting framework during
        // test querying and set `SenTest` value to `None`. That tells SenTesting
        // framework to skip test running and as a result swizzled in `otest-shim` method
        // isn't called. To force the framework to call it we are passing fake value
        // of `SenTest` and then returning real list of tests to run from that method.
        [@"-" stringByAppendingString:_framework[kTestingFrameworkFilterTestArgsKey]],
        @"XCTOOL_FAKE_LIST_OF_TESTS",
      ]];
    }
  }

  return args;
}

- (NSDictionary *)testEnvironmentWithSpecifiedTestConfiguration
{
  NSArray *testCasesToSkip = [self testCasesToSkip];

  Class XCTestConfigurationClass = NSClassFromString(@"XCTestConfiguration");
  NSAssert(XCTestConfigurationClass, @"XCTestConfiguration isn't available");

  XCTestConfiguration *configuration = [[XCTestConfigurationClass alloc] init];
  [configuration setProductModuleName:_buildSettings[Xcode_PRODUCT_MODULE_NAME]];
  [configuration setTestBundleURL:[NSURL fileURLWithPath:[_simulatorInfo productBundlePath]]];
  [configuration setTestsToSkip:[NSSet setWithArray:testCasesToSkip]];
  [configuration setReportResultsToIDE:NO];

  NSString *XCTestConfigurationFilename = [NSString stringWithFormat:@"%@-%@", _buildSettings[Xcode_PRODUCT_NAME], [configuration.sessionIdentifier UUIDString]];
  NSString *XCTestConfigurationFilePath = [MakeTempFileWithPrefix(XCTestConfigurationFilename) stringByAppendingPathExtension:@"xctestconfiguration"];
  if ([[NSFileManager defaultManager] fileExistsAtPath:XCTestConfigurationFilePath]) {
    [[NSFileManager defaultManager] removeItemAtPath:XCTestConfigurationFilePath error:nil];
  }
  if (![NSKeyedArchiver archiveRootObject:configuration toFile:XCTestConfigurationFilePath]) {
    NSAssert(NO, @"Couldn't archive XCTestConfiguration to file at path %@", XCTestConfigurationFilePath);
  }

  return @{
    @"XCTestConfigurationFilePath": XCTestConfigurationFilePath,
  };
}

- (NSDictionary *)_filteredProcessEnvironment
{
  NSMutableDictionary *filteredProcessEnv = [NSMutableDictionary dictionary];
  BOOL isMacOSX = [[_simulatorInfo simulatedSdkName] hasPrefix:@"macosx"];
  for (NSString *envVarName in _processEnvironment) {
    NSString *value = [_processEnvironment objectForKey:envVarName];
    if ([envVarName hasPrefix:kEnvVarPassThroughPrefix]) {
      // Pass through any environment variables with a special prefix, after
      // stripping the prefix from the name.
      [filteredProcessEnv setObject:value
                             forKey:[envVarName substringFromIndex:[kEnvVarPassThroughPrefix length]]];
    } else if (isMacOSX) {
      // OS X tests get the entire calling environment.
      [filteredProcessEnv setObject:value forKey:envVarName];
    }
  }
  return filteredProcessEnv;
}

- (NSMutableDictionary *)otestEnvironmentWithOverrides:(NSDictionary *)overrides
{
  NSMutableDictionary *env = [NSMutableDictionary dictionary];

  NSMutableDictionary *internalEnvironment = [NSMutableDictionary dictionary];
  if (_testTimeout > 0) {
    internalEnvironment[@"OTEST_SHIM_TEST_TIMEOUT"] = [@(_testTimeout) stringValue];
  }

  NSArray *layers = @[
    [self _filteredProcessEnvironment],
    // Any special environment vars set in the scheme.
    _environment ?: @{},
    // Internal environment that should be passed to xctool libs
    internalEnvironment,
    // Whatever values we need to make the test run at all for
    // ios/mac or logic/application tests.
    overrides,
  ];
  for (NSDictionary *layer in layers) {
    [layer enumerateKeysAndObjectsUsingBlock:^(id key, id val, BOOL *stop){
      if ([key isEqualToString:@"DYLD_INSERT_LIBRARIES"] ||
          [key isEqualToString:@"DYLD_FALLBACK_FRAMEWORK_PATH"]) {
        // It's possible that the scheme (or regular host environment) has its
        // own value for DYLD_INSERT_LIBRARIES.  In that case, we don't want to
        // stomp on it when insert otest-shim.
        NSString *existingVal = env[key];
        if (existingVal) {
          env[key] = [existingVal stringByAppendingFormat:@":%@", val];
        } else {
          env[key] = val;
        }
      } else {
        env[key] = val;
      }
    }];
  }

  return env;
}

@end


text:
class ptroop : packet
{
public:
	ptroop(Server * server, request & req, amf3object & o);
	~ptroop();
	void process();
};


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>Caroline Huot</mi:preparedBy>
    <mi:datePrepared>2010-12-23</mi:datePrepared>
    <mi:reportType>UPDATE</mi:reportType>
    <mi:previousLog>flin_20090513.log</mi:previousLog>
    <mi:modifiedSections>3.8, 3.9, 4.4, 4.5</mi:modifiedSections>
  </formInformation>
  <siteIdentification>
    <mi:siteName>FLIN CACS-GSD</mi:siteName>
    <mi:fourCharacterID>FLIN</mi:fourCharacterID>
    <mi:monumentInscription>965000</mi:monumentInscription>
    <mi:iersDOMESNumber>40135M001</mi:iersDOMESNumber>
    <mi:cdpNumber></mi:cdpNumber>
    <mi:monumentDescription>CONCRETE PIER, 50.8cm DIAMETER</mi:monumentDescription>
    <mi:heightOfTheMonument>1.50</mi:heightOfTheMonument>
    <mi:monumentFoundation>INVAR and STEEL RODS</mi:monumentFoundation>
    <mi:foundationDepth>3.00</mi:foundationDepth>
    <mi:markerDescription>UNAVCO type antenna spike mount on Invar Rod</mi:markerDescription>
    <mi:dateInstalled>1996-06-05T00</mi:dateInstalled>
    <mi:geologicCharacteristic>BEDROCK</mi:geologicCharacteristic>
    <mi:bedrockType>IGNEOUS/METAMORPHIC</mi:bedrockType>
    <mi:bedrockCondition>WEATHERED</mi:bedrockCondition>
    <mi:fractureSpacing>50-200 cm</mi:fractureSpacing>
    <mi:faultZonesNearby></mi:faultZonesNearby>
    <mi:distance-Activity></mi:distance-Activity>
    <mi:notes>The bottom 1m of the invar rod is grouted in bedrock at a depth of 2-3m. The rod passes through a foam sleeve inside a 3.8cm ABS pipe to the top of the concrete pier. The top of the invar rod is laterally stabilized by a bronze plate at the top of the concrete pier. A UNAVCO type antenna spike mount is used to level and orient the antenna. Polypropelene fibres are used instead of steel reinforcement rods; a special superplasiticized fly ash concrete mix has been used.  The pier construction was designed to minimize effects of temperature on monument stability, especially in the vertical. ** file audited as of 2008-06-26</mi:notes>
  </siteIdentification>
  <siteLocation>
    <mi:city>CFS FLIN FLON</mi:city>
    <mi:state>SK</mi:state>
    <mi:country>CANADA</mi:country>
    <mi:tectonicPlate>North American</mi:tectonicPlate>
    <approximatePositionITRF>
      <mi:xCoordinateInMeters>-766174.46</mi:xCoordinateInMeters>
      <mi:yCoordinateInMeters>-3611375.32</mi:yCoordinateInMeters>
      <mi:zCoordinateInMeters>5184056.22</mi:zCoordinateInMeters>
      <mi:latitude-North>+544332.16</mi:latitude-North>
      <mi:longitude-East>-1015840.80</mi:longitude-East>
      <mi:elevation-m_ellips.>320.00</mi:elevation-m_ellips.>
    </approximatePositionITRF>
    <mi:notes>FLIN is a continuously tracking GNSS site of the CACS network.  It is located in the vicinity of Flin Flon, Manitoba.  The GNSS station has been in operation since June 1996. From Jun 1996 to Dec 2010, Flin was operated by the Geological Survey of Canada as part of the Western Canada Deformation Array (WCDA) for monitoring crustal deformation on the West Coast. The Geodetic Survey of Canada now operates the site.</mi:notes>
  </siteLocation>
  <gnssReceiver>
    <equip:receiverType>ROGUE SNR-8000</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>381</equip:serialNumber>
    <equip:firmwareVersion>3.2.32.1 LK 95/06/29</equip:firmwareVersion>
    <equip:elevationCutoffSetting></equip:elevationCutoffSetting>
    <equip:dateInstalled>1996-06-05T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1997-01-07T20:03Z</equip:dateRemoved>
    <equip:temperatureStabilization></equip:temperatureStabilization>
    <equip:notes></equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ROGUE SNR-8000</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>194 UNAVCO NO. 8870</equip:serialNumber>
    <equip:firmwareVersion>3.2 LK 95/03/09</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>1997-01-07T20:03Z</equip:dateInstalled>
    <equip:dateRemoved>1997-12-09T22:20Z</equip:dateRemoved>
    <equip:temperatureStabilization></equip:temperatureStabilization>
    <equip:notes></equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ROGUE SNR-8000</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>386 UNAVCO 9549</equip:serialNumber>
    <equip:firmwareVersion>3.2 LK 95/03/09</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>1997-12-09T22:20Z</equip:dateInstalled>
    <equip:dateRemoved>1998-09-23T15:12Z</equip:dateRemoved>
    <equip:temperatureStabilization></equip:temperatureStabilization>
    <equip:notes>receiver failed</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ROGUE SNR-8000</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>292</equip:serialNumber>
    <equip:firmwareVersion>3.2 LK 95/03/09</equip:firmwareVersion>
    <equip:elevationCutoffSetting></equip:elevationCutoffSetting>
    <equip:dateInstalled>1998-09-23T15:12Z</equip:dateInstalled>
    <equip:dateRemoved>1998-12-10T22:48Z</equip:dateRemoved>
    <equip:temperatureStabilization></equip:temperatureStabilization>
    <equip:notes>receiver exchanged</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ROGUE SNR-8000</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>386 UNAVCO 9549</equip:serialNumber>
    <equip:firmwareVersion>3.2 LK 95/03/09</equip:firmwareVersion>
    <equip:elevationCutoffSetting></equip:elevationCutoffSetting>
    <equip:dateInstalled>1998-12-10T23:01Z</equip:dateInstalled>
    <equip:dateRemoved>1999-05-26T21:15Z</equip:dateRemoved>
    <equip:temperatureStabilization></equip:temperatureStabilization>
    <equip:notes>new receiver installed</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>ROGUE SNR-8000</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>386 UNAVCO 9549</equip:serialNumber>
    <equip:firmwareVersion>3.2.32.8 LK 98/12/28</equip:firmwareVersion>
    <equip:elevationCutoffSetting></equip:elevationCutoffSetting>
    <equip:dateInstalled>1999-05-26T21:15Z</equip:dateInstalled>
    <equip:dateRemoved>2001-01-13T18:20Z</equip:dateRemoved>
    <equip:temperatureStabilization></equip:temperatureStabilization>
    <equip:notes>new firmware installed</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>AOA BENCHMARK ACT</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>1115</equip:serialNumber>
    <equip:firmwareVersion>3.3.32.4 LK 00/06/02</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>2001-01-13T18:20Z</equip:dateInstalled>
    <equip:dateRemoved>2009-05-13T11:47Z</equip:dateRemoved>
    <equip:temperatureStabilization></equip:temperatureStabilization>
    <equip:notes>new receiver/firmware installed</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>LEICA GRX1200PRO</equip:receiverType>
    <equip:satelliteSystem>GPS</equip:satelliteSystem>
    <equip:serialNumber>460414</equip:serialNumber>
    <equip:firmwareVersion>7.5</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>2009-05-13T14:14Z</equip:dateInstalled>
    <equip:dateRemoved>2010-12-21T12:59Z</equip:dateRemoved>
    <equip:temperatureStabilization></equip:temperatureStabilization>
    <equip:notes>new receiver/firmware installed</equip:notes>
  </gnssReceiver>
  <gnssReceiver>
    <equip:receiverType>TPS NETG3</equip:receiverType>
    <equip:satelliteSystem>GPS+GLO</equip:satelliteSystem>
    <equip:serialNumber>401-01951</equip:serialNumber>
    <equip:firmwareVersion>3.4p1</equip:firmwareVersion>
    <equip:elevationCutoffSetting>5</equip:elevationCutoffSetting>
    <equip:dateInstalled>2010-12-21T13:00Z</equip:dateInstalled>
    <equip:dateRemoved></equip:dateRemoved>
    <equip:temperatureStabilization></equip:temperatureStabilization>
    <equip:notes></equip:notes>
  </gnssReceiver>
  <gnssAntenna>
    <equip:antennaType>AOAD/M_T        NONE</equip:antennaType>
    <equip:serialNumber>96277</equip:serialNumber>
    <equip:antennaReferencePoint>BPA</equip:antennaReferencePoint>
    <equip:marker-arpUpEcc.>000.1500</equip:marker-arpUpEcc.>
    <equip:marker-arpNorthEcc.>000.0000</equip:marker-arpNorthEcc.>
    <equip:marker-arpEastEcc.>000.0000</equip:marker-arpEastEcc.>
    <equip:alignmentFromTrueNorth>0.0</equip:alignmentFromTrueNorth>
    <equip:antennaRadomeType>NONE</equip:antennaRadomeType>
    <equip:radomeSerialNumber></equip:radomeSerialNumber>
    <equip:antennaCableType>ANDREWS FSJ4-50B</equip:antennaCableType>
    <equip:antennaCableLength>80.00</equip:antennaCableLength>
    <equip:dateInstalled>1996-06-05T00:00Z</equip:dateInstalled>
    <equip:dateRemoved>1997-01-07T20:03Z</equip:dateRemoved>
    <equip:notes>Modified UNAVCO mount. RF skirt placed around base of antenna s.t. top of pier covered. ref. Antenna Diagram "A" below degrees offset from North refers to "True North" Antenna p/n 7490582-B</equip:notes>
  </gnssAntenna>
  <gnssAntenna>
    <equip:antennaType>AOAD/M_T        EMRA</equip:antennaType>
    <equip:serialNumber>231</equip:serialNumber>
    <equip:antennaReferencePoint>BPA</equip:antennaReferencePoint>
    <equip:marker-arpUpEcc.>000.1500</equip:marker-arpUpEcc.>
    <equip:marker-arpNorthEcc.>000.0000</equip:marker-arpNorthEcc.>
    <equip:marker-arpEastEcc.>000.0000</equip:marker-arpEastEcc.>
    <equip:alignmentFromTrueNorth>180.0</equip:alignmentFromTrueNorth>
    <equip:antennaRadomeType>EMRA</equip:antennaRadomeType>
    <equip:radomeSerialNumber></equip:radomeSerialNumber>
    <equip:antennaCableType>ANDREWS FSJ4-50B</equip:antennaCableType>
    <equip:antennaCableLength>80.00</equip:antennaCableLength>
    <equip:dateInstalled>1997-01-07T20:03Z</equip:dateInstalled>
    <equip:dateRemoved>1999-09-21T19:10Z</equip:dateRemoved>
    <equip:notes>Acrylic dome placed over top of antenna / choke ring; ref. Antenna Diagram "B" below degrees offset from North refers to "True North" Antenna p/n 7490400-2</equip:notes>
  </gnssAntenna>
  <gnssAntenna>
    <equip:antennaType>AOAD/M_T        SCIS</equip:antennaType>
    <equip:serialNumber>231</equip:serialNumber>
    <equip:antennaReferencePoint>BPA</equip:antennaReferencePoint>
    <equip:marker-arpUpEcc.>000.1500</equip:marker-arpUpEcc.>
    <equip:marker-arpNorthEcc.>000.0000</equip:marker-arpNorthEcc.>
    <equip:marker-arpEastEcc.>000.0000</equip:marker-arpEastEcc.>
    <equip:alignmentFromTrueNorth>180.0</equip:alignmentFromTrueNorth>
    <equip:antennaRadomeType>SCIS</equip:antennaRadomeType>
    <equip:radomeSerialNumber>25</equip:radomeSerialNumber>
    <equip:antennaCableType>ANDREWS FSJ4-50B</equip:antennaCableType>
    <equip:antennaCableLength>80.00</equip:antennaCableLength>
    <equip:dateInstalled>1999-09-21T20:53Z</equip:dateInstalled>
    <equip:dateRemoved>2009-05-13T11:47Z</equip:dateRemoved>
    <equip:notes>Acrylic dome placed over top of antenna / choke ring; ref. Antenna Diagram "B" below degrees offset from North refers to "True North" Antenna p/n 7490400-2</equip:notes>
  </gnssAntenna>
  <gnssAntenna>
    <equip:antennaType>AOAD/M_T        SCIS</equip:antennaType>
    <equip:serialNumber>231</equip:serialNumber>
    <equip:antennaReferencePoint>BPA</equip:antennaReferencePoint>
    <equip:marker-arpUpEcc.>000.1500</equip:marker-arpUpEcc.>
    <equip:marker-arpNorthEcc.>000.0000</equip:marker-arpNorthEcc.>
    <equip:marker-arpEastEcc.>000.0000</equip:marker-arpEastEcc.>
    <equip:alignmentFromTrueNorth>180.0</equip:alignmentFromTrueNorth>
    <equip:antennaRadomeType>SCIS</equip:antennaRadomeType>
    <equip:radomeSerialNumber>25</equip:radomeSerialNumber>
    <equip:antennaCableType>ANDREWS FSJ4-50B</equip:antennaCableType>
    <equip:antennaCableLength>80.00</equip:antennaCableLength>
    <equip:dateInstalled>2009-05-13T14:14Z</equip:dateInstalled>
    <equip:dateRemoved>2010-12-21T12:59Z</equip:dateRemoved>
    <equip:notes>antenna splitter installed - p/n LDCBS1X2 (GPS Networking); - s/n 3540; ref. Antenna Diagram "C" below degrees offset from North refers to "True North" Antenna p/n 7490400-2</equip:notes>
  </gnssAntenna>
  <gnssAntenna>
    <equip:antennaType>NOV750.R4       NONE</equip:antennaType>
    <equip:serialNumber>9470003</equip:serialNumber>
    <equip:antennaReferencePoint>BPA</equip:antennaReferencePoint>
    <equip:marker-arpUpEcc.>000.1500</equip:marker-arpUpEcc.>
    <equip:marker-arpNorthEcc.>000.0000</equip:marker-arpNorthEcc.>
    <equip:marker-arpEastEcc.>000.0000</equip:marker-arpEastEcc.>
    <equip:alignmentFromTrueNorth>180.0</equip:alignmentFromTrueNorth>
    <equip:antennaRadomeType>NONE</equip:antennaRadomeType>
    <equip:radomeSerialNumber>25</equip:radomeSerialNumber>
    <equip:antennaCableType>ANDREWS FSJ4-50B</equip:antennaCableType>
    <equip:antennaCableLength>80.00</equip:antennaCableLength>
    <equip:dateInstalled>2010-12-21T13:00Z</equip:dateInstalled>
    <equip:dateRemoved></equip:dateRemoved>
    <equip:notes>RF skirt and radome removed. Installed a radio frequency absorbing ecosorb foam model ANW-77 on top of contrete pier and seperated from it by a 5cm thick styrofoam.</equip:notes>
  </gnssAntenna>
  <frequencyStandard>
    <equip:standardType>INTERNAL</equip:standardType>
    <equip:inputFrequency></equip:inputFrequency>
    <equip:effectiveDates>1996-06-05</equip:effectiveDates>
    <equip:notes></equip:notes>
  </frequencyStandard>
  <collocationInformation>
    <equip:instrumentType>ABSOLUTE GRAVITY</equip:instrumentType>
    <equip:status>MOBILE</equip:status>
    <equip:effectiveDates>1995-10-01</equip:effectiveDates>
    <equip:notes> Contact GSC for more information</equip:notes>
  </collocationInformation>
  <contactAgency>
    <contact:agency>NRCan/GEODETIC SURVEY OF CANADA</contact:agency>
    <contact:preferredAbbreviation>NRCan</contact:preferredAbbreviation>
    <contact:mailingAddress>615 Booth Street, Ottawa,Ontario</contact:mailingAddress>
    <contact:primaryContact>
      <contact:name>Mark Caissy</contact:name>
      <contact:telephonePrimary>613-995-4024</contact:telephonePrimary>
      <contact:telephoneSecondary>250-363-6500</contact:telephoneSecondary>
      <contact:fax>613-995-3215</contact:fax>
      <contact:e-mail>caissy@nrcan.gc.ca</contact:e-mail>
    </contact:primaryContact>
    <contact:secondaryContact>
      <contact:name>Peter Taylor</contact:name>
      <contact:telephonePrimary>613-992-2106</contact:telephonePrimary>
      <contact:telephoneSecondary></contact:telephoneSecondary>
      <contact:fax>613-995-3215</contact:fax>
      <contact:e-mail>ptaylor@nrcan.gc.ca</contact:e-mail>
    </contact:secondaryContact>
    <contact:notes>Canada, K1A 0E9 </contact:notes>
  </contactAgency>
  <responsibleAgency>
    <contact:agency>NRCan/GEODETIC SURVEY OF CANADA</contact:agency>
    <contact:preferredAbbreviation>NRCan</contact:preferredAbbreviation>
    <contact:mailingAddress></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></contact:name>
      <contact:telephonePrimary></contact:telephonePrimary>
      <contact:telephoneSecondary></contact:telephoneSecondary>
      <contact:fax></contact:fax>
      <contact:e-mail></contact:e-mail>
    </contact:secondaryContact>
    <contact:notes></contact:notes>
  </responsibleAgency>
  <moreInformation>
    <mi:primaryDataCenter></mi:primaryDataCenter>
    <mi:secondaryDataCenter></mi:secondaryDataCenter>
    <mi:urlForMoreInformation></mi:urlForMoreInformation>
    <mi:hardCopyOnFile/>
    <mi:siteMap></mi:siteMap>
    <mi:siteDiagram></mi:siteDiagram>
    <mi:horizonMask></mi:horizonMask>
    <mi:monumentDescription></mi:monumentDescription>
    <mi:sitePictures></mi:sitePictures>
    <mi:notes></mi:notes>
    <mi:antennaGraphicsWithDimensions/>
    <mi:insertTextGraphicFromAntenna/>
  </moreInformation>
</igsSiteLog>


text:
/**
    * @ngdoc service
    * @name umbraco.resources.memberTypeResource
    * @description Loads in data for member types
    **/
function memberTypeResource($q, $http, umbRequestHelper) {

    return {

        //return all member types
        getTypes: function () {

            return umbRequestHelper.resourcePromise(
               $http.get(
                   umbRequestHelper.getApiUrl(
                       "memberTypeApiBaseUrl",
                       "GetAllTypes")),
               'Failed to retrieve data for member types id');
        }

    };
}
angular.module('umbraco.resources').factory('memberTypeResource', memberTypeResource);


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Device Connect SDK for iOS: クラスメンバ</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Device Connect SDK for iOS
    1.0

詳解ありクラスメンバの一覧です。各クラスメンバ詳解へのリンクがあります。

- c -

checkParameterOfEvent:
: DConnectBaseCacheController

code
: DConnectResponseMessage

colorFromRequest:
: DConnectLightProfile

combineScopes:
: DConnectUtil

config
: DConnectService

containsObject:
: DConnectArray

controllerWithClass:
: DConnectDBCacheController
, DConnectFileCacheController

controllerWithClass:autoFlush:
: DConnectFileCacheController

controllerWithKey:
: DConnectDBCacheController
, DConnectFileCacheController

controllerWithKey:autoFlush:
: DConnectFileCacheController

convertToJSONObject
: DConnectMessage

convertToJSONString
: DConnectMessage

count
: DConnectArray

createDate
: DConnectEvent

createEventMessageWithEvent:
: DConnectEventManager

createFileForPath:contents:
: DConnectFileManager

<address class="footer">
2020年07月06日(月) 12時59分50秒作成 - Device Connect SDK for iOS / 構成:

 1.8.13
</address>


text:
package com.karuslabs.commons.util.concurrent;

import java.util.Optional;
import java.util.concurrent.TimeUnit;

import org.junit.jupiter.api.*;

import static org.junit.jupiter.api.Assertions.*;

class MaybeTest {

    Maybe<String> maybe = new Maybe<>(() -> "expected");
    Maybe<String> exceptional = new Maybe<>(() -> { throw new IllegalArgumentException(); }, null);

    @BeforeEach
    void before() {
        maybe.run();
        exceptional.run();
    }

    @Test
    void value_constructor() {
        var maybe = Maybe.value("a");
        assertEquals("a", maybe.value());
    }

    @Test
    void some() {
        assertEquals("expected", maybe.some().orElseThrow());
    }

    @Test
    void some_throws_exception() {
        assertEquals(Optional.empty(), exceptional.some());
    }

    @Test
    void some_timeout() {
        assertEquals("expected", maybe.some(1, TimeUnit.MINUTES).orElseThrow());
    }

    @Test
    void some_timeout_throws_exception() {
        assertEquals(Optional.empty(), exceptional.some(0, TimeUnit.MINUTES));
    }

    @Test
    void value() {
        assertEquals("expected", maybe.value());
    }

    @Test
    void value_throws_exception() {
        assertNull(exceptional.value());
    }

    @Test
    void value_timeout() {
        assertEquals("expected", maybe.value(1, TimeUnit.MINUTES));
    }

    @Test
    void value_timeout_throws_exception() {
        assertNull(exceptional.value(0, TimeUnit.MINUTES));
    }

}


text:
#ifndef __ETHERNETIF_H__
#define __ETHERNETIF_H__

#include "lwip/err.h"
#include "lwip/netif.h"
#include "cmsis_os.h"

/* Exported types ------------------------------------------------------------*/
/* Structure that include link thread parameters */
struct link_str {
  struct netif *netif;
  osSemaphoreId semaphore;
};

/* Within 'USER CODE' section, code will be kept by default at each generation */
/* USER CODE BEGIN 0 */

/* USER CODE END 0 */

/* Exported functions ------------------------------------------------------- */
err_t ethernetif_init(struct netif *netif);

void ethernetif_input( void const * argument );

void ethernetif_set_link(void const *argument);
void ethernetif_update_config(struct netif *netif);
void ethernetif_notify_conn_changed(struct netif *netif);

/* USER CODE BEGIN 1 */

/* USER CODE END 1 */
#endif

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/


text:
package com.googlecode.objectify.impl.translate;

import com.google.cloud.datastore.StringValue;
import com.google.cloud.datastore.Value;
import com.google.cloud.datastore.ValueType;

import java.util.TimeZone;

/**
 * Converts java.util.TimeZone
 *
 * @author Jeff Schnitzer <jeff@infohazard.org>
 */
public class TimeZoneTranslatorFactory extends SimpleTranslatorFactory<TimeZone, String>
{
	public TimeZoneTranslatorFactory() {
		super(TimeZone.class, ValueType.STRING);
	}

	@Override
	protected TimeZone toPojo(final Value<String> value) {
		return TimeZone.getTimeZone(value.get());
	}

	@Override
	protected Value<String> toDatastore(final TimeZone value) {
		return StringValue.of(value.getID());
	}
}


text:
from sqlobject import *
from sqlobject.tests.dbtest import *

class TestSOList(SQLObject):
    pass

def test_list_databases():
    connection = getConnection()
    if connection.dbName != "postgres":
        return
    assert connection.db in connection.listDatabases()

def test_list_tables():
    connection = getConnection()
    if connection.dbName != "postgres":
        return
    setupClass(TestSOList)
    assert TestSOList.sqlmeta.table in connection.listTables()


text:
<?xml version="1.0" encoding="utf-8"?>
<wizard package="com.ctrip.xpipe.redis.console">
   <jdbc package="com.ctrip.xpipe.redis.console.dal" name="fxxpipe">
      <datasource>
         <driver>com.mysql.jdbc.Driver</driver>
         <url>jdbc:mysql://localhost:3306/fxxpipedb</url>
         <user>root</user>
         <password>12345678</password>
         <properties>useUnicode=true&characterEncoding=UTF-8&autoReconnect=true</properties>
      </datasource>
      <group name="meta" package="com.ctrip.xpipe.redis.console.model">

      </group>
   </jdbc>
</wizard>


text:
package de.invation.code.toval.constraint;

import de.invation.code.toval.validate.ParameterException;
import de.invation.code.toval.validate.Validate;
import de.invation.code.toval.validate.ParameterException.ErrorCode;

public enum StringOperator implements Operator<String> {

	EQUAL(OperatorFormats.EQUAL, String.format(OperatorFormats.COMPARISON_FORMAT, OperatorFormats.EQUAL)),
	NOT_EQUAL(OperatorFormats.NOT_EQUAL, String.format(OperatorFormats.COMPARISON_FORMAT, OperatorFormats.NOT_EQUAL));

	private String[] argumentNames = new String[] {"Attribute", "Comparator"};
	private String sign = null;
	private String toStringFormat = null;

	private StringOperator(String sign, String toStringFormat){
		this.sign = sign;
		this.toStringFormat = toStringFormat;
	}

	private StringOperator(String[] arguments, String sign, String toStringFormat){
		this(sign, toStringFormat);
		this.argumentNames = arguments;
	}

	@Override
	public int getRequiredArguments(){
		return argumentNames.length;
	}

	@Override
	public String[] getArgumentNames(){
		return argumentNames;
	}

	protected void validateValueType(Object value) throws ParameterException{
		if(!String.class.isAssignableFrom(value.getClass()))
			throw new ParameterException(ErrorCode.TYPE, "Wrong type of validation value, expected type: " + String.class);
	}

	@Override
	public boolean validate(Object value, String... parameters) throws ParameterException {
		Validate.notNull(value);
		validateValueType(value);
		Validate.notNull(parameters);
		Validate.noNullElements(parameters);
		Validate.isFalse(parameters.length + 1 != getRequiredArguments());

		switch(this){
		case EQUAL:			return value.equals(parameters[0]);
		case NOT_EQUAL:		return !value.equals(parameters[0]);
		default: return false;
		}
	}

	@Override
	public String getStringFormat(){
		return toStringFormat;
	}

	@Override
	public String toString(){
		return sign;
	}

	public static StringOperator parse(String operatorString){
		if(operatorString.equals("=="))
			return StringOperator.EQUAL;
		if(operatorString.equals("!="))
			return StringOperator.NOT_EQUAL;
		return null;
	}

}


text:
ls src/civetweb.c
if [ "$?" = "0" ]; then
	echo "Building files for coverity check ..."
else
	echo "Run this script from the root directory of project!" 1>&2
	echo "username@hostname:/somewhere/civetweb$ ./resources/coverity_check.sh" 1>&2
	exit 1
fi

# remove last build
rm -rf cov_build/

# copy files to build folder
mkdir cov_build
mkdir cov_build/src
mkdir cov_build/include
mkdir cov_build/resources

cp Makefile cov_build/
cp src/*.c cov_build/src/
cp src/*.inl cov_build/src/
cp include/civetweb.h cov_build/include/
cp resources/Makefile.in-os cov_build/resources/

cd cov_build

# new scan build
../../cov-analysis-linux64-8.7.0/bin/cov-build  --dir cov-int make WITH_IPV6=1 WITH_WEBSOCKET=1

# pack build results for upload
tar czvf civetweb_coverity_check.tgz cov-int

cd ..

# check if the build was successful
echo
ls -la cov_build/civetweb_coverity_check.tgz

if [ "$?" = "0" ]; then
	echo "... done"
        echo
else
	echo "No civetweb_coverity_check.tgz file" 1>&2
        echo
	exit 1
fi

# return "ok"
exit 0