text:
import React from 'react';
import InputBinder from '../components/InputBinder';

class InputPage extends React.Component {
  constructor() {
    super();
    this.state = {
      boundTitle: 'Edit Me'
    };
  }
  changeTitle(val) {
    this.setState({boundTitle: val});
  }
  render() {
    const {boundTitle} = this.state;
    return (

{this.state.boundTitle}

        <InputBinder changeTitle={this.changeTitle.bind(this)} title={boundTitle}></InputBinder>

    );
  }
}

export default InputPage;


text:
<!DOCTYPE html>

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

  <title>Commit</title>
  <meta name="description" content="Asynchronous native Node bindings to libgit2">

  <link rel="stylesheet" href="/css/main.css">
  <link rel="canonical" href="http://nodegit.org/api/commit/">
  <link rel="alternate" type="application/atom+xml" title="NodeGit" href="http://nodegit.org/feed.xml" />

          Latest release: 0.11.2

Latest release: 0.11.2

HEAD

0.11.1

0.11.0

0.10.0

0.9.0

0.8.0

0.7.0

0.6.3

0.6.2

0.6.1

0.6.0

0.5.0

0.4.1

0.4.0

0.3.3

0.2.7

Getting Started

Guides

API Documentation

Source

Commit

Version 0.11.2

API Documentation Index

create

createV

lookup

lookupPrefix

#amend

#author

#committer

#date

#free

#getDiff

#getDiffWithOptions

#getEntry

#getParents

#getTree

#headerField

#history

#id

#message

#messageEncoding

#messageRaw

#nthGenAncestor

#owner

#parent

#parentId

#parentcount

#parents

#rawHeader

#sha

#summary

#time

#timeMs

#timeOffset

#toString

#tree

#treeId

Commit.create Sync

var oid = Commit.create(repo, update_ref, author, committer, message_encoding, message, tree, parent_count, parents);

Parameters
Type

repo
Repository
Repository where to store the commit

update_ref
String
If not NULL, name of the reference that will be updated to point to this commit. If the reference is not direct, it will be resolved to a direct reference. Use "HEAD" to update the HEAD of the current branch and make it point to this commit. If the reference doesn't exist yet, it will be created. If it does exist, the first parent must be the tip of this branch.

author
Signature
Signature with author and author time of commit

committer
Signature
Signature with committer and * commit time of commit

message_encoding
String
The encoding for the message in the commit, represented with a standard encoding name. E.g. "UTF-8". If NULL, no encoding header is written and UTF-8 is assumed.

message
String
Full message for this commit

tree
Tree
An instance of a git_tree object that will be used as the tree for the commit. This tree object must also be owned by the given repo.

parent_count
Number
Number of parents for this commit

parents
Array
Array of parent_count pointers to git_commit objects that will be used as the parents for this commit. This array may be NULL if parent_count is 0 (root commit). All the given commits must be owned by the repo.

Returns

Oid

Commit.createV Sync

var result = Commit.createV(id, repo, update_ref, author, committer, message_encoding, message, tree, parent_count);

Parameters
Type

id
Oid

repo
Repository

update_ref
String

author
Signature

committer
Signature

message_encoding
String

message
String

tree
Tree

parent_count
Number

Returns

Number

Commit.lookup Async

Commit.lookup(repo, id).then(function(commit) {
  // Use commit
});

Retrieves the commit pointed to by the oid

Parameters
Type

repo
Repository
The repo that the commit lives in

id
String, Oid, Commit
The commit to lookup

Returns

Commit

Commit.lookupPrefix Async

Commit.lookupPrefix(repo, id, len).then(function(commit) {
  // Use commit
});

Parameters
Type

repo
Repository
the repo to use when locating the commit.

id
Oid
identity of the commit to locate. If the object is an annotated tag it will be peeled back to the commit.

len
Number
the length of the short identifier

Returns

Commit

Commit#amend Sync

var oid = commit.amend(update_ref, author, committer, message_encoding, message, tree);

Parameters
Type

update_ref
String

author
Signature

committer
Signature

message_encoding
String

message
String

tree
Tree

Returns

Oid

Commit#author Sync

var signature = commit.author();

Returns

Signature
the author of a commit

Commit#committer Sync

var signature = commit.committer();

Returns

Signature
the committer of a commit

Commit#date Sync

var date = commit.date();

Retrieve the commit time as a Date object.

Returns

Date

Commit#free Sync

commit.free();

Commit#getDiff Async

commit.getDiff(callback).then(function(arrayDiff) {
  // Use arrayDiff
});

Generate an array of diff trees showing changes between this commit
and its parent(s).

Parameters
Type

callback
Function

Returns

Array<Diff>
an array of diffs

Commit#getDiffWithOptions Async

commit.getDiffWithOptions(options, callback).then(function(arrayDiff) {
  // Use arrayDiff
});

Generate an array of diff trees showing changes between this commit
and its parent(s).

Parameters
Type

options
Object

callback
Function

Returns

Array<Diff>
an array of diffs

Commit#getEntry Async

commit.getEntry(path).then(function(treeEntry) {
  // Use treeEntry
});

Retrieve the entry represented by path for this commit.
Path must be relative to repository root.

Parameters
Type

path
String

Returns

TreeEntry

Commit#getParents Async

commit.getParents(limit, callback).then(function(arrayCommit) {
  // Use arrayCommit
});

Retrieve the commit's parents as commit objects.

Parameters
Type

limit
number

callback
Function

Returns

Array<Commit>
array of commits

Commit#getTree Async

commit.getTree().then(function(tree) {
  // Use tree
});

Get the tree associated with this commit.

Returns

Tree

Commit#headerField Async

commit.headerField(field).then(function(buf) {
  // Use buf
});

Parameters
Type

field
String

Returns

Buf
the buffer to fill

Commit#history Sync

var eventEmitter = commit.history();

eventEmitter.on('commit', function(commit) {
  // Use commit
});

eventEmitter.on('end', function(commits) {
  // Use commits
});

eventEmitter.on('error', function(error) {
  // Use error
});

eventEmitter.start()

Walk the history from this commit backwards.

An EventEmitter is returned that will emit a "commit" event for each
commit in the history, and one "end" event when the walk is completed.
Don't forget to call start() on the returned event.

Fires
Sends

commit
Commit

end
Array<Commit>

error
Error

Returns

EventEmitter

Commit#id Sync

var oid = commit.id();

Returns

Oid
object identity for the commit.

Commit#message Sync

var string = commit.message();

Returns

String
the message of a commit

Commit#messageEncoding Sync

var string = commit.messageEncoding();

Returns

String
NULL, or the encoding

Commit#messageRaw Sync

var string = commit.messageRaw();

Returns

String
the raw message of a commit

Commit#nthGenAncestor Async

commit.nthGenAncestor(n).then(function(commit) {
  // Use commit
});

Parameters
Type

n
Number

Returns

Commit
the ancestor commit

Commit#owner Sync

var repository = commit.owner();

Returns

Repository
Repository that contains this commit.

Commit#parent Async

commit.parent(n).then(function(commit) {
  // Use commit
});

Parameters
Type

n
Number

Returns

Commit
the parent commit

Commit#parentId Sync

var oid = commit.parentId(n);

Parameters
Type

n
Number

Returns

Oid
the id of the parent, NULL on error.

Commit#parentcount Sync

var result = commit.parentcount();

Returns

Number
integer of count of parents

Commit#parents Sync

var arrayOid = commit.parents(callback);

Retrieve the commit"s parent shas.

Parameters
Type

callback
Function

Returns

Array<Oid>
array of oids

Commit#rawHeader Sync

var string = commit.rawHeader();

Returns

String
the header text of the commit

Commit#sha Sync

var string = commit.sha();

Retrieve the SHA.

Returns

String

Commit#summary Sync

var string = commit.summary();

Returns

String
the summary of a commit or NULL on error

Commit#time Sync

var result = commit.time();

Returns

Number
the time of a commit

Commit#timeMs Sync

var number = commit.timeMs();

Retrieve the commit time as a unix timestamp.

Returns

Number

Commit#timeOffset Sync

var result = commit.timeOffset();

Returns

Number
positive or negative timezone offset, in minutes from UTC

Commit#toString Sync

var string = commit.toString();

The sha of this commit

Returns

String

Commit#tree Sync

var result = commit.tree(tree_out);

Parameters
Type

tree_out
Tree

Returns

Number
0 or an error code

Commit#treeId Sync

var oid = commit.treeId();

Returns

Oid
the id of tree pointed to by commit.

      NodeGit, along with
      this website,
      is open source. It's brought to you by a core team,
      and a marvelous group of contributors.

      Follow us on Twitter: @NodeGit

Licenced under MIT.

redpajama_set_name: RedPajamaGithub


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

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Uses of Class org.openid4java.message.Message (OpenID4Java no dependencies 0.9.7-SNAPSHOT API)
</TITLE>

<META NAME="date" CONTENT="2011-05-25">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Class
org.openid4java.message.Message

Packages that use Message

org.openid4java.consumer
Provides functionality for OpenID-enabling Consumer (Relying Party) sites.

org.openid4java.infocard
Provides support for

OpenID-InforCards.

org.openid4java.message

org.openid4java.server
Offers support for implementing an OpenID Provider server.

Uses of Message in org.openid4java.consumer

Methods in org.openid4java.consumer that return Message

 Message
VerificationResult.getAuthResponse()

          Gets the authentication response message received from the server.

Methods in org.openid4java.consumer with parameters of type Message

 void
VerificationResult.setAuthResponse(Message authResponse)

          Sets the authentication response message received from the server.

Uses of Message in org.openid4java.infocard

Methods in org.openid4java.infocard that return Message

 Message
OpenIDToken.getOpenIDMessage()

          Gets the OpenID message contained in the OpenID token.

Methods in org.openid4java.infocard with parameters of type Message

 void
OpenIDToken.setOpenIDMessage(Message openidMessage)

          Sets the OpenID Message to encapsulate into the token.

Constructors in org.openid4java.infocard with parameters of type Message

OpenIDToken(Message openidMessage)

          Constructs an OpenID token encapsulating the provided OpenID Message.

Uses of Message in org.openid4java.message

Subclasses of Message in org.openid4java.message

 class
AssociationError

 class
AssociationRequest

          The OpenID Association Request message.

 class
AssociationResponse

          The OpenID Association Response message.

 class
AuthFailure

 class
AuthImmediateFailure

 class
AuthRequest

 class
AuthSuccess

 class
DirectError

 class
IndirectError

 class
VerifyRequest

          VerifyRequest is a AuthSuccess with the openid.mode
 switched to check_authentication.

 class
VerifyResponse

Methods in org.openid4java.message that return Message

static Message
Message.createMessage()

static Message
Message.createMessage(ParameterList params)

Uses of Message in org.openid4java.server

Methods in org.openid4java.server that return Message

 Message
ServerManager.associationResponse(ParameterList requestParams)

          Processes a Association Request and returns a Association Response
 message, according to the request parameters and the preferences
 configured for the OpenID Provider

 Message
ServerManager.authResponse(AuthRequest authReq,
             String userSelId,
             String userSelClaimed,
             boolean authenticatedAndApproved)

          Processes a Authentication Request received from a consumer site.

 Message
ServerManager.authResponse(AuthRequest authReq,
             String userSelId,
             String userSelClaimed,
             boolean authenticatedAndApproved,
             boolean signNow)

          Processes a Authentication Request received from a consumer site.

 Message
ServerManager.authResponse(AuthRequest auhtReq,
             String userSelId,
             String userSelClaimed,
             boolean authenticatedAndApproved,
             String opEndpoint)

          Processes a Authentication Request received from a consumer site.

 Message
ServerManager.authResponse(AuthRequest authReq,
             String userSelId,
             String userSelClaimed,
             boolean authenticatedAndApproved,
             String opEndpoint,
             boolean signNow)

          Processes a Authentication Request received from a consumer site.

 Message
ServerManager.authResponse(ParameterList requestParams,
             String userSelId,
             String userSelClaimed,
             boolean authenticatedAndApproved)

          Processes a Authentication Request received from a consumer site.

 Message
ServerManager.authResponse(ParameterList requestParams,
             String userSelId,
             String userSelClaimed,
             boolean authenticatedAndApproved,
             boolean signNow)

          Processes a Authentication Request received from a consumer site.

 Message
ServerManager.authResponse(ParameterList requestParams,
             String userSelId,
             String userSelClaimed,
             boolean authenticatedAndApproved,
             String opEndpoint)

          Processes a Authentication Request received from a consumer site.

 Message
ServerManager.authResponse(ParameterList requestParams,
             String userSelId,
             String userSelClaimed,
             boolean authenticatedAndApproved,
             String opEndpoint,
             boolean signNow)

          Processes a Authentication Request received from a consumer site,
 after parsing the request parameters into a valid AuthRequest.

 Message
ServerManager.verify(ParameterList requestParams)

          Responds to a verification request from the consumer.

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Copyright © 2011 Sxip. All Rights Reserved.


text:
' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System.Collections.Immutable
Imports Microsoft.CodeAnalysis.CodeStyle
imports Microsoft.CodeAnalysis.Options

Namespace Microsoft.CodeAnalysis.VisualBasic.CodeStyle
    Friend NotInheritable Class VisualBasicCodeStyleOptions
        Private Shared ReadOnly s_allOptionsBuilder As ImmutableArray(Of IOption).Builder = ImmutableArray.CreateBuilder(Of IOption)

        Shared Sub New()
            AllOptions = s_allOptionsBuilder.ToImmutable()
        End Sub

        Private Shared Function CreateOption(Of T)(group As OptionGroup, name As String, defaultValue As T, ParamArray storageLocations As OptionStorageLocation()) As [Option](Of T)
            Return CodeStyleHelpers.CreateOption(group, NameOf(VisualBasicCodeStyleOptions), name, defaultValue, s_allOptionsBuilder, storageLocations)
        End Function

        Public Shared ReadOnly Property AllOptions As ImmutableArray(Of IOption)

        Public Shared ReadOnly PreferredModifierOrderDefault As ImmutableArray(Of SyntaxKind) =
            ImmutableArray.Create(
                SyntaxKind.PartialKeyword, SyntaxKind.DefaultKeyword, SyntaxKind.PrivateKeyword, SyntaxKind.ProtectedKeyword,
                SyntaxKind.PublicKeyword, SyntaxKind.FriendKeyword, SyntaxKind.NotOverridableKeyword, SyntaxKind.OverridableKeyword,
                SyntaxKind.MustOverrideKeyword, SyntaxKind.OverloadsKeyword, SyntaxKind.OverridesKeyword, SyntaxKind.MustInheritKeyword,
                SyntaxKind.NotInheritableKeyword, SyntaxKind.StaticKeyword, SyntaxKind.SharedKeyword, SyntaxKind.ShadowsKeyword,
                SyntaxKind.ReadOnlyKeyword, SyntaxKind.WriteOnlyKeyword, SyntaxKind.DimKeyword, SyntaxKind.ConstKeyword,
                SyntaxKind.WithEventsKeyword, SyntaxKind.WideningKeyword, SyntaxKind.NarrowingKeyword, SyntaxKind.CustomKeyword,
                SyntaxKind.AsyncKeyword, SyntaxKind.IteratorKeyword)

        Public Shared ReadOnly PreferredModifierOrder As [Option](Of CodeStyleOption(Of String)) = CreateOption(
            VisualBasicCodeStyleOptionGroups.Modifier, NameOf(PreferredModifierOrder),
            defaultValue:=New CodeStyleOption(Of String)(String.Join(",", PreferredModifierOrderDefault.Select(AddressOf SyntaxFacts.GetText)), NotificationOption.Silent),
            EditorConfigStorageLocation.ForStringCodeStyleOption("visual_basic_preferred_modifier_order"),
            New RoamingProfileStorageLocation($"TextEditor.%LANGUAGE%.Specific.{NameOf(PreferredModifierOrder)}"))

        Public Shared ReadOnly UnusedValueExpressionStatement As [Option](Of CodeStyleOption(Of UnusedValuePreference)) =
            CodeStyleHelpers.CreateUnusedExpressionAssignmentOption(
                group:=VisualBasicCodeStyleOptionGroups.ExpressionLevelPreferences,
                feature:=NameOf(VisualBasicCodeStyleOptions),
                name:=NameOf(UnusedValueExpressionStatement),
                editorConfigName:="visual_basic_style_unused_value_expression_statement_preference",
                defaultValue:=New CodeStyleOption(Of UnusedValuePreference)(UnusedValuePreference.UnusedLocalVariable, NotificationOption.Silent),
                optionsBuilder:=s_allOptionsBuilder)

        Public Shared ReadOnly UnusedValueAssignment As [Option](Of CodeStyleOption(Of UnusedValuePreference)) =
            CodeStyleHelpers.CreateUnusedExpressionAssignmentOption(
                group:=VisualBasicCodeStyleOptionGroups.ExpressionLevelPreferences,
                feature:=NameOf(VisualBasicCodeStyleOptions),
                name:=NameOf(UnusedValueAssignment),
                editorConfigName:="visual_basic_style_unused_value_assignment_preference",
                defaultValue:=New CodeStyleOption(Of UnusedValuePreference)(UnusedValuePreference.UnusedLocalVariable, NotificationOption.Suggestion),
                optionsBuilder:=s_allOptionsBuilder)
    End Class

    Friend NotInheritable Class VisualBasicCodeStyleOptionGroups
        Public Shared ReadOnly Modifier As New OptionGroup(WorkspacesResources.Modifier_preferences, priority:=1)
        Public Shared ReadOnly ExpressionLevelPreferences As New OptionGroup(WorkspacesResources.Expression_level_preferences, priority:=2)
    End Class
End Namespace


text:
namespace tracing {

// Provides trace log metrics collected using BackgroundTracingManager to UMA
// proto. Background tracing uploads metrics of larger size compared to UMA
// histograms and it is better to upload them as independent metrics rather
// than part of UMA histograms log. Uploading as independent logs is useful to
// track upload sizes, and also to make sure the UMA metrics are not discarded
// from saving to disk due to large size of the logs. The background tracing
// manager will make sure traces are only uploaded on WiFi, or the traces are
// small when uploading over data, to make sure weekly upload quota for UMA
// metrics is not affected on Android.
class BackgroundTracingMetricsProvider : public metrics::MetricsProvider {
 public:
  BackgroundTracingMetricsProvider();
  ~BackgroundTracingMetricsProvider() override;

  // metrics::MetricsProvider:
  void Init() override;
  bool HasIndependentMetrics() override;
  void ProvideIndependentMetrics(
      base::OnceCallback<void(bool)> done_callback,
      metrics::ChromeUserMetricsExtension* uma_proto,
      base::HistogramSnapshotManager* snapshot_manager) override;

 private:
  DISALLOW_COPY_AND_ASSIGN(BackgroundTracingMetricsProvider);
};

}  // namespace tracing

#endif  // CHROME_BROWSER_TRACING_BACKGROUND_TRACING_METRICS_PROVIDER_H_


text:
<?php

namespace Kunstmaan\MediaBundle\Tests\Entity;

use DateTime;
use Kunstmaan\MediaBundle\Entity\Folder;
use Kunstmaan\MediaBundle\Entity\Media;
use PHPUnit\Framework\TestCase;

class MediaTest extends TestCase
{
    /**
     * @var Media
     */
    protected $object;

    protected function setUp(): void
    {
        $this->object = new Media();
    }

    public function testSetFileSize()
    {
        $this->object->setFileSize(45);
        $this->assertEquals('45b', $this->object->getFileSize());
        $this->object->setFileSize(64 * 1024);
        $this->assertEquals('64kb', $this->object->getFileSize());
        $this->object->setFileSize(64 * 1024 * 1024);
        $this->assertEquals('64mb', $this->object->getFileSize());
    }

    public function testGetSetUuid()
    {
        $this->object->setUuid('abc');
        $this->assertEquals('abc', $this->object->getUuid());
    }

    public function testGetSetName()
    {
        $this->object->setName('name.jpg');
        $this->assertEquals('name.jpg', $this->object->getName());
    }

    public function testGetSetLocation()
    {
        $this->object->setLocation('local');
        $this->assertEquals('local', $this->object->getLocation());
    }

    public function testGetSetContentType()
    {
        $this->object->setContentType('image/jpeg');
        $this->assertEquals('image/jpeg', $this->object->getContentType());
        $this->assertEquals('jpeg', $this->object->getContentTypeShort());
    }

    public function testGetSetCreatedAt()
    {
        $date = new \DateTime();
        $this->object->setCreatedAt($date);
        $this->assertEquals($date, $this->object->getCreatedAt());
    }

    public function testGetSetUpdatedAt()
    {
        $date = new \DateTime();
        $this->object->setUpdatedAt($date);
        $this->assertEquals($date, $this->object->getUpdatedAt());
    }

    public function testGetContent()
    {
        $this->object->setContent('content');
        $this->assertEquals('content', $this->object->getContent());
    }

    public function testGetSetFolder()
    {
        $folder = new Folder();
        $folder->setId(45);
        $this->object->setFolder($folder);
        $this->assertEquals(45, $this->object->getFolder()->getId());
    }

    public function testGetSetDeleted()
    {
        $this->assertFalse($this->object->isDeleted());

        $this->object->setDeleted(true);
        $this->assertTrue($this->object->isDeleted());
    }

    public function testGetSetMetaDataAndValues()
    {
        $this->object->setTranslatableLocale('en');
        $meta = ['original_width' => 320, 'original_height' => 200];
        $this->object->setMetadata($meta);
        $this->assertEquals($meta, $this->object->getMetadata());
        $this->assertEquals(320, $this->object->getMetadataValue('original_width'));
        $this->assertEquals(200, $this->object->getMetadataValue('original_height'));
        $this->object->setMetadataValue('original_width', 640);
        $this->assertEquals(640, $this->object->getMetadataValue('original_width'));
    }

    public function testGetSetUrl()
    {
        $this->object->setUrl('http://domain.tld/path/name.ext');
        $this->assertEquals('http://domain.tld/path/name.ext', $this->object->getUrl());
    }

    public function testGetSetOriginalFilename()
    {
        $this->object->setOriginalFilename('name.ext');
        $this->assertEquals('name.ext', $this->object->getOriginalFilename());
    }

    public function testGetSetCopyright()
    {
        $this->object->setCopyright('(c) 2014 Kunstmaan All rights reserved');
        $this->assertEquals('(c) 2014 Kunstmaan All rights reserved', $this->object->getCopyright());
    }

    public function testGetSetDescription()
    {
        $this->object->setDescription('Description of this picture');
        $this->assertEquals('Description of this picture', $this->object->getDescription());
    }

    public function testGetSetRemoved()
    {
        $this->object->setRemovedFromFileSystem(true);
        $this->assertTrue($this->object->isRemovedFromFileSystem());
    }

    public function testGetSetFilesize()
    {
        $this->object->setFileSize(null);
        $this->assertEmpty($this->object->getFileSize());
        $this->object->setFileSize(123);
        $this->assertEquals(123, $this->object->getFileSizeBytes());
    }

    public function testPreUpdate()
    {
        $this->object->preUpdate();
        $this->assertInstanceOf(DateTime::class, $this->object->getUpdatedAt());
    }

    public function testPrePersist()
    {
        $this->object->setOriginalFilename('spongebob.jpg');
        $this->object->prePersist();
        $this->assertEquals('spongebob.jpg', $this->object->getName());
    }
}


text:
// Copyright 2011, University of Freiburg,
// Chair of Algorithms and Data Structures.
// Author: Björn Buchhold (buchhold@informatik.uni-freiburg.de)

#pragma once

#include <sys/timeb.h>
#include <time.h>
#include <iomanip>
#include <iostream>
#include <locale>
#include <sstream>
#include <string>

#include "./StringUtils.h"

#ifndef LOGLEVEL
#define LOGLEVEL 3
#endif

#define LOG(x)      \
  if (x > LOGLEVEL) \
    ;               \
  else              \
    ad_utility::Log::getLog<x>()  // NOLINT
#define AD_POS_IN_CODE                                                     \
  '[' << ad_utility::getLastPartOfString(__FILE__, '/') << ':' << __LINE__ \
      << "] "  // NOLINT

#define TRACE 5
#define DEBUG 4
#define INFO 3
#define WARN 2
#define ERROR 1
#define FATAL 0

namespace ad_utility {
/* A singleton (According to Scott Meyer's pattern that holds
 * a pointer to a single std::ostream. This enables us to globally
 * redirect the LOG(LEVEL) Makros to another location.
 */
struct LogstreamChoice {
  std::ostream& getStream() { return *_stream; }
  void setStream(std::ostream* stream) { _stream = stream; }

  static LogstreamChoice& get() {
    static LogstreamChoice s;
    return s;
  }  // instance
  LogstreamChoice(const LogstreamChoice&) = delete;
  LogstreamChoice& operator=(const LogstreamChoice&) = delete;

 private:
  LogstreamChoice() {}
  ~LogstreamChoice() {}

  // default to cout since it was the default before
  std::ostream* _stream = &std::cout;

};  // struct LogstreamChoice

/** @brief Redirect every LOG(LEVEL) macro that is called afterwards
 *         to the stream that the argument points to.
 *         Typically called in the main function of an executable.
 */
inline void setGlobalLogginStream(std::ostream* streamPtr) {
  LogstreamChoice::get().setStream(streamPtr);
}

using std::string;
//! Helper class to get thousandth separators in a locale
class CommaNumPunct : public std::numpunct<char> {
 protected:
  virtual char do_thousands_sep() const { return ','; }

  virtual std::string do_grouping() const { return "\03"; }
};

const static std::locale commaLocale(std::locale(), new CommaNumPunct());

//! String representation of a double with precision and thousandth separators
inline string to_string(double in, size_t precision) {
  std::ostringstream buffer;
  buffer.imbue(commaLocale);
  buffer << std::setprecision(precision) << std::fixed << in;
  return buffer.str();
}

//! String representation of a long with thousandth separators
inline string to_string(long in) {
  std::ostringstream buffer;
  buffer.imbue(commaLocale);
  buffer << in;
  return buffer.str();
}

//! Log
class Log {
 public:
  template <unsigned char LEVEL>
  static std::ostream& getLog() {
    // use the singleton logging stream as target.
    return LogstreamChoice::get().getStream()
           << ad_utility::Log::getTimeStamp() << "\t- "
           << ad_utility::Log::getLevel<LEVEL>();
  }

  static void imbue(const std::locale& locale) { std::cout.imbue(locale); }

  static string getTimeStamp() {
    struct timeb timebuffer;
    char timeline[26];

    ftime(&timebuffer);
    ctime_r(&timebuffer.time, timeline);
    timeline[19] = '.';
    timeline[20] = 0;

    std::ostringstream os;
    os << timeline;
    os.fill('0');
    os.width(3);
    os << timebuffer.millitm;
    return os.str();
  }

  template <unsigned char LEVEL>
  static string getLevel() {
    if (LEVEL == TRACE) {
      return "TRACE: ";
    }
    if (LEVEL == DEBUG) {
      return "DEBUG: ";
    }
    if (LEVEL == INFO) {
      return "INFO:  ";
    }
    if (LEVEL == WARN) {
      return "WARN:  ";
    }
    if (LEVEL == ERROR) {
      return "ERROR: ";
    }
    if (LEVEL == FATAL) {
      return "FATAL: ";
    }
  }
};
}  // namespace ad_utility


text:
#ifndef B1_H
#define B1_H

#ifdef WIN32
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT
#endif

class DLLEXPORT B1{
   public:
      const char* print();
};

#endif


text:
from twisted.internet import reactor, defer
import time
from datetime import datetime
import Queue
import signal
import DB_Mysql
import lib.settings as settings
import lib.logger

log = lib.logger.get_logger('DBInterface')

class DBInterface():
	def __init__(self):
		# Initialize the MySQL database driver and put it in self.DATABASE
		log.debug('DB_Mysql INIT')
		self.DATABASE = DB_Mysql.DB_Mysql()

	def init_main(self):
		self.DATABASE.check_tables()

		self.QUEUE = Queue.Queue()
		self.QUEUE_OVERLOADED = False
		self.OVERLOADED_QUEUE_BATCH_SIZE = settings.DB_LOADER_REC_MAX
		self.queueclock = None

		self.usercache = {}
		self.clearusercache()

		self.statsclock = None
		self.nextStatsUpdate = 0

		self.scheduleImport()
		self.scheduleStats()

		self.next_force_import_time = time.time() + settings.DB_LOADER_FORCE_TIME

		self.CURRENT_NUMBEROF_IMPORT_THREADS = 0

		signal.signal(signal.SIGINT, self.signal_handler)

	def signal_handler(self, signal, frame):
		log.warning("SIGINT Detected, shutting down")
		log.info("Flushing shares into database")
		self.do_import(self.DATABASE, True)
		reactor.stop()

	def set_bitcoinrpc(self, bitcoinrpc):
		self.bitcoinrpc = bitcoinrpc

	def clearusercache(self):
		log.debug("DBInterface.clearusercache called")
		self.usercache = {}
		self.usercacheclock = reactor.callLater(settings.DB_USERCACHE_TIME , self.clearusercache)

	def scheduleImport(self):
		log.debug("Scheduling next queue run check %s seconds from now." % settings.DB_LOADER_CHECKTIME)
		self.queueclock = reactor.callLater(settings.DB_LOADER_CHECKTIME , self.run_import_thread)

	def scheduleStats(self):
		self.statsclock = reactor.callLater(settings.DB_STATS_AVG_TIME , self.stats_thread)

	def run_import_thread(self):
		log.debug("Share queue has %d item(s)", self.QUEUE.qsize())

		# Don't incur thread overhead if we're not going to run
		# 1. Queue must not be empty
		# 2. If queue is not empty, then at least one of these two conditions are met
		# 	a. Queue has at least DB_LOADER_REC_MIN number of items
		# 	b. It's time to force an import
		if self.QUEUE.qsize() > 0 and (self.QUEUE.qsize() >= settings.DB_LOADER_REC_MIN or time.time() >= self.next_force_import_time):
			# Import thread will run, next runtime will be scheduled from within the import_thread function
			log.debug("Shares queue: import will run at this time.")
			reactor.callInThread(self.import_thread)
			log.debug("Shares queue: import process has been requested.")
		else:
			# Import thread will not run, we should schedule next runtime
			log.debug("Shares queue: import not nessecary at this time.")
			self.scheduleImport()

	def import_thread(self, onetime = False):
		# Update number of running threads
		self.CURRENT_NUMBEROF_IMPORT_THREADS = self.CURRENT_NUMBEROF_IMPORT_THREADS + 1

		log.info("Shares import thread has started running...")
		# Create a new database connection for use in this thread
		# Since this is called Asyncronosly
		try:
			database = DB_Mysql.DB_Mysql()
		except Exception as e:
			log.error("Import thread failed: %s" % e.args[0])
			return

		# Do the deed
		self.do_import(database, False)
		database.close()

		# Update number of running threads, never drops below 0
		self.CURRENT_NUMBEROF_IMPORT_THREADS = max(self.CURRENT_NUMBEROF_IMPORT_THREADS -1, 0)

		# Schedule next runtime unless this was requested as a single run time
		if not onetime:
			self.scheduleImport()

	# Statistics are no longer handled by the startum service.  Now done by Backoffice.
	def stats_thread(self):
		log.info("Stats thread has started running...")
		# Do the deed
		self.update_stats()

		# Schedule next runtime
		self.scheduleStats()

	# Statistics are no longer handled by the startum service.  Now done by Backoffice.
	def update_stats(self):
		if time.time() > self.nextStatsUpdate:
			self.nextStatsUpdate = time.time() + settings.DB_STATS_AVG_TIME
			try:
				log.info("Stats update running")
			except:
				log.error("Stats update failed: %s", e.args[0])

	def do_import(self, dbi, force):
		log.debug("DBInterface.do_import called. force: %s, queue size: %s", 'yes' if force == True else 'no', self.QUEUE.qsize())

		# Flush the whole queue on force
		forcesize = 0
		if force == True:
			forcesize = self.QUEUE.qsize()

		# To help us determine how long it takes to import a batch of shares
		start_time = None
		avg_batch_processing_time_seconds = 0
		queue_processing_time_seconds = 0
		total_runs = 0

		# Only run if we have data
		while self.QUEUE.empty() == False and (force == True or self.QUEUE.qsize() >= settings.DB_LOADER_REC_MIN or time.time() >= self.next_force_import_time or forcesize > 0):
			log.debug("Share queue size is %i" % self.QUEUE.qsize())
			self.next_force_import_time = time.time() + settings.DB_LOADER_FORCE_TIME

			# Time this import run has started
			start_time = time.time()

			force = False
			# Put together the data we want to import
			sqldata = []
			datacnt = 0

			if self.QUEUE_OVERLOADED:
				# Increased batch size
				batch_size = self.OVERLOADED_QUEUE_BATCH_SIZE
			else:
				# Normal size batches
				batch_size = settings.DB_LOADER_REC_MAX

			log.debug("Loading Share Records from queue")
			while self.QUEUE.empty() == False and datacnt < batch_size:
				datacnt += 1
				try:
					data = self.QUEUE.get(timeout=1)
					sqldata.append(data)
					self.QUEUE.task_done()
				except Queue.Empty:
					log.warning("Share Records Queue is empty!")

			log.info("%i share records loaded, %i share records remain in queue." % (datacnt, self.QUEUE.qsize()))
			forcesize -= datacnt

			# try to do the import, if we fail, log the error and put the data back in the queue
			try:
				log.debug("Inserting %i Share Records", datacnt)
				dbi.import_shares(sqldata)
			except Exception as e:
				log.error("Insert Share Records Failed.  Error: %s", e.args[0])
				for k, v in enumerate(sqldata):
					self.QUEUE.put(v)
				break  # Allows us to sleep a little

			# Total time in seconds it took to import a batch of shares in the current run
			batch_processing_time_seconds = max(time.time() - start_time, 0)

			# Lets keep track of how long the whole thing could take
			queue_processing_time_seconds = queue_processing_time_seconds + batch_processing_time_seconds
			# Keep a running average
			total_runs = total_runs + 1
			avg_batch_processing_time_seconds = queue_processing_time_seconds / total_runs
			log.debug("Took %i seconds(s) to import %i shares, AVG: %s." % (batch_processing_time_seconds, datacnt, avg_batch_processing_time_seconds))

			# Lets get an estimate of how long it will take this thread to finsh importing the queue based on it's
			# current size (self.QUEUE.qsize()), the batch size (DB_LOADER_REC_MAX),
			# and the wait time (DB_LOADER_FORCE_TIME).

			# Lets take a snapshot of the current size of the queue
			current_queue_size = self.QUEUE.qsize()

			# Number of batches that need to be processed
			number_of_batches = (current_queue_size + (batch_size - 1)) // batch_size
			log.debug("Aproximatly %i batche(s) remain." % number_of_batches)

			# Total seconds needed to process all batches
			# 1 batch is done every 'avg_batch_processing_time_seconds'
			total_time_seconds = (avg_batch_processing_time_seconds * number_of_batches) / max(self.CURRENT_NUMBEROF_IMPORT_THREADS, 1)
			log.debug("Aproximatly %i seconds(s) needed to process entire queue." % total_time_seconds)

			# Remove overload if the queue time is less than 20 minutes
			if self.QUEUE_OVERLOADED and total_time_seconds <= 1200:
				self.QUEUE_OVERLOADED = False

			# Issue a warning if the time is more that 30 minutes
			if total_time_seconds >= 1800:
				log.warning("Large share queue detected (%s items), aproximatly %s hours(s) needed to process entire queue." % (current_queue_size, (total_time_seconds / 60 / 60)))

			# Take some action if it's more than 1 hour, increase the batch size to 15% of the number of batches plus current batch size
			if total_time_seconds >= 3600:
				self.QUEUE_OVERLOADED = True
				self.OVERLOADED_QUEUE_BATCH_SIZE = abs((0.15 * number_of_batches) + batch_size)
				log.warning("Temporaroly increased batch size to: %i" % self.OVERLOADED_QUEUE_BATCH_SIZE)

			# Start another thread if the overload coninues beyond 3 hours estimate
			if (total_time_seconds) >= 10800 and self.CURRENT_NUMBEROF_IMPORT_THREADS < settings.DB_MAX_IMPORT_THREADS:
				# Start anew one time thread (True means it's single use, won't get rescheduled)
				reactor.callInThread(self.import_thread, True)
				log.warning("Spawned new import thread")

		log.debug("Import took %i seconds(s)" % (queue_processing_time_seconds))

	def queue_share(self, data):
		if settings.SAVE_SHARES:
			self.QUEUE.put(data)
		else:
			log.info("Doing somthing else with shares")

	def found_block(self, data):
		try:
			if settings.SAVE_SHARES:
				log.info("Updating Found Block Share Record")
				# We can't Update if the record is not there.
				# Forcable make the database import waiting shares
				self.do_import(self.DATABASE, True)
				self.DATABASE.found_block(data)
			else:
				log.info("Inserting found block")
				# There is no cncept of 'shares' stored in the database, we insert the information as new

		except Exception as e:
			log.error("Update Found Block Share Record Failed: %s", e.args[0])

	def check_password(self, username, password):
		if username == "":
			log.info("Rejected worker for blank username")
			return False

		# Force username and password to be strings
		username = str(username)
		password = str(password)
		wid = username + ":-:" + password

		if wid in self.usercache:
			return True
		elif not settings.USERS_CHECK_PASSWORD and self.user_exists(username):
			self.usercache[wid] = 1
			return True
		elif self.DATABASE.check_password(username, password):
			self.usercache[wid] = 1
			return True
		elif settings.USERS_AUTOADD == True:
			self.insert_user(username, password)
			self.usercache[wid] = 1
			return True

		log.info("Authentication for %s failed" % username)
		return False

	def list_users(self):
		return self.DATABASE.list_users()

	def get_user(self, id):
		return self.DATABASE.get_user(id)

	def get_user_settings(self, id):
		return self.DATABASE.get_user_settings(id)

	def user_exists(self, username):
		user = self.DATABASE.get_user(username)
		return user is not None

	def insert_user(self, username, password):
		return self.DATABASE.insert_user(username, password)

	def delete_user(self, username):
		self.usercache = {}
		return self.DATABASE.delete_user(username)

	def update_user(self, username, password):
		self.usercache = {}
		return self.DATABASE.update_user(username, password)

	def update_worker_diff(self, username, diff):
		return self.DATABASE.update_worker_diff(username, diff)

	def get_worker_diff(self,username):
	  return self.DATABASE.get_worker_diff(username)

	def clear_worker_diff(self):
		return self.DATABASE.clear_worker_diff()


text:
class RollCameraTransformationStrategy :
	public CameraTransformationStrategy
{
public:
	static const int ROTATION_SPEED = 0.8f;

	RollCameraTransformationStrategy(Camera::GenericCamera* camera)
		: CameraTransformationStrategy(camera)
	{
	}

	~RollCameraTransformationStrategy()
	{
	}

	void transform(const glm::vec2& cursorTranslation)
	{
		float agressiveness = 0.8f;

		camera->roll(agressiveness * cursorTranslation.x);
	}
};


text:
package edu.hku.sdb.exec;

import java.util.List;

public class HashTableNode extends PlanNode<HashTableDesc> {

  /*
   * (non-Javadoc)
   *
   * @see edu.hku.sdb.exec.PlanNode#init()
   */
  @Override
  public void init() {
    // TODO Auto-generated method stub

  }

  /*
   * (non-Javadoc)
   *
   * @see edu.hku.sdb.exec.PlanNode#nextTuple()
   */
  @Override
  public List<Object> nextTuple() {
    // TODO Auto-generated method stub
    return null;
  }

  /*
   * (non-Javadoc)
   *
   * @see edu.hku.sdb.exec.PlanNode#close()
   */
  @Override
  public void close() {
    // TODO Auto-generated method stub

  }

}


text:
namespace Carnage.Core.Rules.Data.Visitors
{
    using System.Collections.Generic;
    using Microsoft.SqlServer.TransactSql.ScriptDom;

    internal class MergeStatmentVisitor : TSqlFragmentVisitor
    {
        public MergeStatmentVisitor()
        {
            this.MergeStatements = new List<MergeStatement>();
        }

        public IList<MergeStatement> MergeStatements { get; private set; }

        public override void ExplicitVisit(MergeStatement node)
        {
            this.MergeStatements.Add(node);
        }
    }
}


text:
'use strict';

import {createDecorator, ServiceIdentifier} from 'vs/platform/instantiation/common/instantiation';
import {TPromise} from 'vs/base/common/winjs.base';
import Severity from 'vs/base/common/severity';

export interface IPluginDescription {
	id: string;
	name: string;
	version: string;
	publisher: string;
	isBuiltin: boolean;
	extensionFolderPath: string;
	extensionDependencies?: string[];
	activationEvents?: string[];
	engines: {
		vscode: string;
	};
	main?: string;
	contributes?: { [point: string]: any; };
	isAMD: boolean;
}

export interface IActivationEventListener {
	(): void;
}

export interface IPointListener {
	(desc: IPluginDescription[]): void;
}

export const IPluginService = createDecorator<IPluginService>('pluginService');

export interface IMessage {
	type: Severity;
	message: string;
	source: string;
}

export interface IPluginStatus {
	messages: IMessage[];
}

export interface IPluginService {
	serviceId: ServiceIdentifier<any>;

	activateByEvent(activationEvent: string): TPromise<void>;
	activateAndGet(pluginId: string): TPromise<void>;
	isActivated(pluginId: string): boolean;

	/**
	 * This method should be called only on shutdown!
	 * More work is needed for this to be called any time!
	 */
	deactivate(pluginId: string): void;

	/**
	 * To be used only by the platform once on startup.
	 */
	registrationDone(errors?: IMessage[]): void;

	registerOneTimeActivationEventListener(activationEvent: string, listener: IActivationEventListener): void;

	/**
	 * Block on this signal any interactions with extensions.
	 */
	onReady(): TPromise<boolean>;
	getPluginsStatus(): { [id: string]: IPluginStatus };
}

export const INSTANCE: IPluginService = null;


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

import io.github.scrier.opus.common.Constants;

import java.io.IOException;

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

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

public class BaseMsgC implements IdentifiedDataSerializable {

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

	private long source;
	private long destination;
	private long sagaID;
	private int txID;
	private int factoryID;
	private int messageID;
	private SendIF sendIF;

	/**
	 * Constructor
	 * @param factoryID The factory id where the message class is defined.
	 * @param messageID The specified message id that is used from the class.
	 */
	public BaseMsgC(int factoryID, int messageID) {
		this(factoryID, messageID, null);
	}

	/**
	 * Constructor
	 * @param factoryID The factory id where the message class is defined.
	 * @param messageID The specified message id that is used from the class.
	 * @param sendIF The send interface to call when sending messages.
	 */
	public BaseMsgC(int factoryID, int messageID, SendIF sendIF) {
		log.trace("BaseMsgC(" + factoryID + ", " + messageID + ", " + sendIF + ")");
		this.source = Constants.HC_UNDEFINED;
		this.destination = Constants.HC_UNDEFINED;
		this.sagaID = -1;
		this.txID = -1;
		this.factoryID = factoryID;
		this.messageID = messageID;
		this.sendIF = sendIF;
	}

	/**
	 * Copy Constructor
	 * @param obj2copy BaseMsgC to copy.
	 */
	public BaseMsgC(BaseMsgC obj2copy) {
		log.trace("BaseMsgC(" + obj2copy + ")");
		this.source = obj2copy.source;
		this.destination = obj2copy.destination;
		this.sagaID = obj2copy.sagaID;
		this.txID = obj2copy.txID;
		this.factoryID = obj2copy.factoryID;
		this.messageID = obj2copy.messageID;
		this.sendIF = obj2copy.sendIF;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public void readData(ObjectDataInput in) throws IOException {
		this.source = in.readLong();
		this.destination = in.readLong();
		this.sagaID = in.readLong();
		this.txID = in.readInt();
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public void writeData(ObjectDataOutput out) throws IOException {
		out.writeLong(this.source);
		out.writeLong(this.destination);
		out.writeLong(this.sagaID);
		out.writeInt(this.txID);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public int getFactoryId() {
		return factoryID;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public int getId() {
		return messageID;
	}

	/**
	 * @return the source
	 */
	public long getSource() {
		return source;
	}

	/**
	 * @param source the source to set
	 */
	public void setSource(long source) {
		this.source = source;
	}

	/**
	 * @return the destination
	 */
	public long getDestination() {
		return destination;
	}

	/**
	 * @param destination the destination to set
	 */
	public void setDestination(long destination) {
		this.destination = destination;
	}

	/**
	 * @return the sagaID
	 */
	public long getSagaID() {
		return sagaID;
	}

	/**
	 * @param sagaID the sagaID to set
	 */
	public void setSagaID(long sagaID) {
		this.sagaID = sagaID;
	}

	/**
	 * @return the txID
	 */
	public int getTxID() {
		return txID;
	}

	/**
	 * @param txID the txID to set
	 */
	public void setTxID(int txID) {
		this.txID = txID;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public String toString()
	{
		String retValue = "BaseMsgC(";
		retValue += "source=" + source;
		retValue += ",destination=" + destination;
		retValue += ",sagaID=" + sagaID;
		retValue += ",txID=" + txID;
		retValue += ",factoryID=" + factoryID;
		retValue += ",messageID=" + messageID;
		retValue += ")";
		return retValue;
	}

	/**
	 * Method to send the message to the destination.
	 * @throws NullPointerException Thrown if no send interface is present.
	 */
	public void send() throws NullPointerException {
		log.trace("send()");
		if( null == this.sendIF ) {
			throw new NullPointerException("No sendif provided for message with factoryID " + getFactoryId() + " and message id " + getId() + ".");
		}
		this.sendIF.publishMessage(this);
	}

}


text:
namespace ash {

class ScreenAshTest : public test::AshTestBase {
 public:
  ScreenAshTest() {}
  ~ScreenAshTest() override {}

 private:
  DISALLOW_COPY_AND_ASSIGN(ScreenAshTest);
};

// Tests that ScreenAsh::GetWindowAtScreenPoint() returns the correct window on
// the correct display.
TEST_F(ScreenAshTest, TestGetWindowAtScreenPoint) {
  if (!SupportsMultipleDisplays())
    return;

  UpdateDisplay("200x200,400x400");

  aura::test::TestWindowDelegate delegate;
  std::unique_ptr<aura::Window> win1(CreateTestWindowInShellWithDelegate(
      &delegate, 0, gfx::Rect(0, 0, 200, 200)));

  std::unique_ptr<aura::Window> win2(CreateTestWindowInShellWithDelegate(
      &delegate, 1, gfx::Rect(200, 200, 100, 100)));

  ASSERT_NE(win1->GetRootWindow(), win2->GetRootWindow());

  EXPECT_EQ(win1.get(), gfx::Screen::GetScreen()->GetWindowAtScreenPoint(
                            gfx::Point(50, 60)));
  EXPECT_EQ(win2.get(), gfx::Screen::GetScreen()->GetWindowAtScreenPoint(
                            gfx::Point(250, 260)));
}

}  // namespace ash


text:
typedef class CMyDriver *PCMyDriver;
typedef class CMyDevice *PCMyDevice;

//
DEFINE_GUID(SmartCardReaderGuid, 0x50DD5230, 0xBA8A, 0x11D1, 0xBF,0x5D,0x00,0x00,0xF8,0x05,0xF5,0x30);
//
// Include the type specific headers.
//

class funcTrace {
public:
	wchar_t funcN[500];
	funcTrace (char *func) {
		wchar_t funcName[500];
		wsprintf(funcN,L"%S",func);
		wsprintf(funcName,L"[BixVReader]IN -> %s",funcN);
		OutputDebugString(funcName);
	}
	~funcTrace () {
		wchar_t funcName[500];
		wsprintf(funcName,L"[BixVReader]OUT -> %s",funcN);
		OutputDebugString(funcName);
	}
};

//#define inFunc funcTrace _ftrace(__FUNCTION__);
#define inFunc


text:
import * as Nodes from './nodes'
export { Nodes }
import * as Managers from './managers'
export { Managers }
export * as Collectors from './collectors'
export * as Visitors from './visitors'
export * from './relation'
export * from './not_supported_error'

export const star = new Nodes.SqlLiteral('*')
export const bind = new Nodes.BindParam()


text:
require 'spec_helper'

describe Wowwee::Mip::Protocol::NotifQueue do

  before(:each) do
    @device= double(:device)
  end
  context "Initialization" do
    it "Should subscribe_to_notifications and start_queue_manager" do
      receive_data_srv= double('receive_data_service')
      expect(receive_data_srv).to receive(:on_notification)
      Wowwee::Mip::Protocol::NotifQueue.new(@device, receive_data_srv)
    end
  end

  class DummyReceiveDataService
    attr_reader :callback
    def on_notification(&proc)
      @callback= proc
    end
  end
  def build_queue
    @receive_data_srv= DummyReceiveDataService.new
    @queue= Wowwee::Mip::Protocol::NotifQueue.new(@device, @receive_data_srv)
  end

  context "Registration" do
    it "Should be able to register on events for a given cmd" do
      build_queue
      observer= double(:observer)
      rs= @queue.register_observer(observer, :software_version)
      software_version_cmd_code= 20
      expect(rs).to eq [software_version_cmd_code]
    end
    it "Should return the registered observer when unregistering from a cmd" do
      build_queue
      observer= double(:observer)
      @queue.register_observer(observer, :software_version)
      rs= @queue.unregister_observer(observer, :software_version)
      expect(rs).to be observer
    end
    it "Should not fail when unregistering a non registered observer" do
      build_queue
      rs= @queue.unregister_observer(double(:observer), :software_version)
      expect(rs).to be nil
    end
  end

  context "On cmd received" do
    SOFTWARE_VERSION_RS= "14133A24"
    it "Should notify all listeners registered to the given event" do
      build_queue
      o1= double(:observer)
      cmd= Wowwee::Mip::Protocol.find_cmd_by_name(:software_version)
      expect(o1).to receive(:observe).with(cmd, [19, 58, 36])
      @queue.register_observer(o1, :software_version)
      o2= double(:observer)
      expect(o2).to receive(:observe).with(cmd, [19, 58, 36])
      @queue.register_observer(o2, :software_version)

      @receive_data_srv.callback.call(SOFTWARE_VERSION_RS)
    end
    it "Should NOT notify listeners registered to other events" do
      build_queue
      o1= double(:observer)
      expect(o1).to receive(:observe)
      @queue.register_observer(o1, :software_version)
      o2= double(:observer)
      expect(o2).to_not receive(:observe)
      @queue.register_observer(o2, :hardware_version)

      @receive_data_srv.callback.call(SOFTWARE_VERSION_RS)
    end
  end

end


text:
#include "VoxelModule.h"

#include "VoxelMessages.h"
#include "VoxelTests.h"
#include "VoxelThreadPool.h"
#include "VoxelStartupPopup.h"
#include "VoxelDebug/VoxelDebugManager.h"
#include "VoxelUtilities/VoxelSystemUtilities.h"

#include "ShaderCore.h"
#include "Misc/PackageName.h"
#include "Misc/MessageDialog.h"
#include "Misc/ConfigCacheIni.h"
#include "Modules/ModuleManager.h"

void FVoxelModule::StartupModule()
{
	LOG_VOXEL(Log, TEXT("VOXEL_DEBUG=%d"), VOXEL_DEBUG);

	if (VOXEL_DEBUG || !UE_BUILD_SHIPPING)
	{
		FVoxelTests::Test();
	}

	check(!GVoxelThreadPool);
	GVoxelThreadPool = new FVoxelThreadPool();

	check(!GVoxelDebugManager);
	GVoxelDebugManager = new FVoxelGlobalDebugManager();

	FVoxelStartupPopup::OnModuleStartup();

	ApplyCVarSettingsFromIni(TEXT("/Script/Voxel.VoxelSettings"), *GEngineIni, ECVF_SetByProjectSetting);

	IPlugin& Plugin = FVoxelSystemUtilities::GetPlugin();

	// This is needed to correctly share content across Pro and Free
	FPackageName::UnRegisterMountPoint(TEXT("/") VOXEL_PLUGIN_NAME TEXT("/"), Plugin.GetContentDir());
	FPackageName::RegisterMountPoint("/Voxel/", Plugin.GetContentDir());

	const FString PluginBaseDir = FPaths::ConvertRelativePathToFull(Plugin.GetBaseDir());

	const FString PluginShaderDir = FPaths::Combine(PluginBaseDir, TEXT("Shaders"));
	AddShaderSourceDirectoryMapping(TEXT("/Plugin/Voxel"), PluginShaderDir);
}

void FVoxelModule::ShutdownModule()
{
	check(GVoxelThreadPool);
	delete GVoxelThreadPool;
	GVoxelThreadPool = nullptr;

	check(GVoxelDebugManager);
	delete GVoxelDebugManager;
	GVoxelDebugManager = nullptr;
}

IMPLEMENT_MODULE(FVoxelModule, Voxel)


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:custom="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#019b79"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <include
        android:id="@+id/topbar"
        layout="@layout/topbar"></include>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:paddingLeft="12dp"
        android:paddingRight="12dp"
        android:layout_marginTop="120dp">'

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <ImageView
                android:id="@+id/img11"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_alignParentLeft="true"
                android:src="@drawable/lj_zc_001" />

            <ImageView
                android:id="@+id/img12"
                android:layout_width="wrap_content"
                android:layout_height="30dp"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/img11"
                android:background="@drawable/zc_10" />

            <com.hangon.common.CleanableEditText
                android:id="@+id/rUserName"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/img12"
                android:hint="请输入您要注册的手机号"
                android:maxLength="11"
                android:digits="0123456789"
                android:numeric="integer"
                android:shadowColor="#ffffff"
                android:textColor="#ffffff"
                android:textColorHint="#ffffff"
                android:drawableRight="@drawable/zc_13"
                android:textSize="14sp" />
        </RelativeLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="45dp">

            <ImageView
                android:id="@+id/img21"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_alignParentLeft="true"
                android:background="@drawable/lj_zc_002" />

            <ImageView
                android:id="@+id/img22"
                android:layout_width="wrap_content"
                android:layout_height="30dp"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/img21"
                android:background="@drawable/zc_10" />

            <com.hangon.common.CleanableEditText
                android:id="@+id/rUserPass"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/img22"
                android:drawableRight="@drawable/zc_13"
                android:hint="请设置6-12位账户密码"
                android:maxLength="12"
                android:password="true"
                android:textColor="#ffffff"
                android:textColorHint="#ffffff"
                android:textSize="14sp" />
        </RelativeLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="45dp">

            <ImageView
                android:id="@+id/img31"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_alignParentLeft="true"
                android:background="@drawable/lj_zc_003" />

            <ImageView
                android:id="@+id/img32"
                android:layout_width="wrap_content"
                android:layout_height="30dp"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/img31"
                android:src="@drawable/zc_10" />

            <EditText
                android:digits="123045678988x"
                android:id="@+id/cord"
                android:layout_width="180dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/img32"
                android:hint="请输入收到的验证码"
                android:maxLength="4"
                android:numeric="integer"
                android:phoneNumber="true"
                android:textColor="#ffffff"
                android:textColorHint="#ffffff"
                android:textSize="14sp" />

            <TextView
                android:id="@+id/now"
                android:textColor="#ffffff"
                android:layout_width="match_parent"
                android:layout_height="35dp"
                android:layout_marginLeft="10dp"
                android:layout_toRightOf="@+id/cord"
                android:gravity="center"
                android:textSize="8sp"
                android:visibility="gone" />

            <Button
                android:id="@+id/getCord"
                android:layout_width="match_parent"
                android:layout_height="35dp"
                android:layout_marginLeft="10dp"
                android:layout_toRightOf="@+id/now"
                android:background="@drawable/lj_zc_004"
                android:text="获取验证码"
                android:textColor="#009a71"
                android:textSize="12sp"
                />
        </RelativeLayout>

        <RelativeLayout
            android:id="@+id/saveCord"
            android:layout_marginTop="60dp"
            android:layout_width="match_parent"
            android:layout_height="40dp">
            <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@drawable/lj_zc_005"/>

            <TextView
                android:layout_centerInParent="true"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#009a71"
                android:text="注    册"
                android:textSize="18sp"/>

        </RelativeLayout>

    </LinearLayout>

</LinearLayout>


text:
        Home

Options

        There are several option flags that you can use along with additional commands when running the project.
        This section will discusss those as well as production and deployment workflows.

Changing Examples & Boilerplate

        In the index.html file you'll notice several System.import declarations.
        These declarations can be commented or uncommented to expose different modules or apps. By default the base
        example which includes the documentation is the /js/example/app.ng.js file. This file
        uses standard router (ngRoute) from Angular. You can also run the example using
        ui-router from the angular-ui
        project. Finally you can use a boilerplate module to help you get a real project going. Simply uncomment
        System.import('js/app');

        The markup below is what you'll see in index.html it's here for convenience along with some
        additional commenting.

        <!-- START SCRIPTS -->

        <!-- Required to expose System module loading. -->

        <script src="jspm_packages/system.js"></script>

        <!-- Required when dev or not runing sfx bundle. -->

        <script src="config.js"></script>

        <!--

        Uncomment to use boilerplate sfx bundled app

        <script src="js/app.js"></script>

        -->

        <script>

          // NG ROUTE EXAMPLE (Default)

          // displays docs/example using ngRoute.

          System.import('js/example/app.ng');

          // UI ROUTER EXAMPLE

          // uncomment to display docs/example using & ui.router.

          // System.import('js/example/app.ui');

          // PLACEHOLDER EXAMPLE (uses ngRoute)

          // uncomment to display app boilerplate.

          // System.import('js/app');

        </script>

        <!-- END SCRIPTS -->

Linting Your Project

        The project uses gulp-jshint as its code quality tool.
        You can run the linting tool directly or add it as a flag to another task.

        Running linting directly.

        $ gulp lint

Production Server

        The most common server is probably Express. It has excellent support
        and examples can be found rather easily. You may also want to take a look at
        KOA it was written by the same developer that contributed
        to Express mentioned above. It has gained ground of late and makes great use of generators.

Express - hello world example.

KOA - hello world example.

Production Bundling

        Bundling your project for production and deployment is made easy with systemjs-builder which is
        packaged within jspm. The output will EXCLUDE any example directories as it assumes
        you are preparring to deploy in a production environment.Running the follow from your terminal
        or console will clean your dist directory and bundle the project which would be equivalent
        to commands you might use directly with the jspm cli.

        Standard non self executing bundle.

        $ gulp bundle

        Bundling with lint.

        $ gulp bundle -l

        Bundling then serving to test bundle.

        $ gulp serve -b

        Bundling self executing module equivalent to jspm bundle-sfx js/app bundle.js. Building in
        this manner can produce a bundle which can run independently of your config.jsand
        system.js if the runtime:true option is set in package.json
        builder.options object.

        $ gulp bundle -s (or --sfx)

Advanced Bundling Options

        The gulp task that bundles your project can be further configured via the package.json
        file. The project resolve the base url from the package.json jspm.directories.baseURL configuration
        property of jspm itself. Likewise the builder loads its config file from the jspm.configFile if exists
        or assumes it is named config.js and is located in the baseURL directory.
        This ensures less configuration on your part as its using jspm's package.json configuration object itself.
        There is also a custom key called builder which is used by the project to further configure
        workflow tasks within gulp.

        "builder": {

        "expression": "js/app",         // your main module entry point.

        "outFile": "./dist/js/app.js",  // the directory to output your bundle.

        "options": {

          "runtime": false,   // whether to include runtime.

          "minify": true,     // whether to minify the output.

          "sourceMaps":true   // whether to include sourcemaps.

          "config": {}        // options to pass to sourcemaps/minify config.

         }

        }

        You can view systemjs-builder options at Github.
        You can add whatever options you wish withing the builder.options property.

        Take note also of the builder.options.config property. In this property you can pass along
        source map options.


text:
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Save extends Model
{
    public $timestamps = false;
    protected $table = 'saves';
    public function admin_id(){
        return $this->belongsTo('App\User');
    }
    protected $fillable = [
        'uri', 'user_id','wireframe'
    ];
}


text:
package io.fundrequest.core.request.claim.domain;

public enum ClaimRequestStatus {
    PENDING,
    APPROVED,
    TRANSACTION_FAILED,
    DECLINED,
    PROCESSED
}


text:
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rspec'
require 'annotate-sequel'
require 'sequel'

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}

RSpec.configure do |config|

end


text:
<?
global $DB, $MESS, $APPLICATION;

//define('WS_SP_SERVICE_PATH', '/_vti_bin/lists.asmx');
//define('WS_SP_SERVICE_NS', 'http://schemas.microsoft.com/sharepoint/soap/');

/*$GLOBALS["xsd_simple_type"] = array(
	"string"=>"string", "bool"=>"boolean", "boolean"=>"boolean",
	"int"=>"integer", "integer"=>"integer", "double"=>"double", "float"=>"float", "number"=>"float",
	"base64"=>"base64Binary", "base64Binary"=>"base64Binary",
	"any"=>"any",
);*/

CModule::AddAutoloadClasses(
	"Trusted.Sign",
	array(
		//"File_X509" => "classes/general/File/X509.php",

	/*	"CSOAPHeader" => "classes/general/soap/soapbase.php",
		"CSOAPBody" => "classes/general/soap/soapbase.php",
		"CSOAPEnvelope" => "classes/general/soap/soapbase.php",
		"CSOAPParameter" => "classes/general/soap/soapbase.php",
		"CSOAPFault" => "classes/general/soap/soapbase.php",

		"CSOAPCodec" => "classes/general/soap/soapcodec.php",
		"CSOAPRequest" => "classes/general/soap/soaprequest.php",
		"CSOAPResponse" => "classes/general/soap/soapresponse.php",
		"CSOAPClient" => "classes/general/soap/soapclient.php",

		"CSOAPServerResponser" => "classes/general/soap/soapserver.php",
		"CWSSOAPResponser" => "classes/general/soap/soapserver.php",
		"CSOAPServer" => "classes/general/soap/soapserver.php",

		"CWSDLCreator" => "classes/general/wsdl/wsdlcreator.php",

		"CWebServiceDesc" => "classes/general/webservice.php",
		"IWebService" => "classes/general/webservice.php",
		"CWebService" => "classes/general/webservice.php",

		"CSPListsClient" => "classes/general/sharepoint/client.php",*/
	)
);

//require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/classes/general/xml.php");

//require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/webservice/classes/general/webservice.wsdl.phpt");
//require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/webservice/classes/general/msoffice.research.phpt");
IncludeModuleLangFile(__FILE__);

?>


text:
<?php

namespace Application\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

class IndexController extends AbstractActionController
{

    protected $usuarioTable;

    public function __construct(){

    }

    public function indexAction()
    {
        return new ViewModel();
    }

    public function loginAction()
    {
    	return new ViewModel();
    }

    public function authentifhAction()
    {
        try{
            if(!$this->usuarioTable){
                $sm = $this->getServiceLocator();
                $this->usuarioTable = $sm->get('Application\Model\UsuarioTable');
            }
            /*Coletando valores*/
            $email = (string) $_POST['email'];
            $senha = (string) $_POST['senha'];

            $this->ususario = $this->usuarioTable->findUserByEmailAndPass($email, $senha);

            if(!$this->ususario){
                return $this->redirect()->toRoute('login', array(
                    'login' => $this->params()->fromRoute('login')
                ));
            }

            /*Caso tenha encontrado o usuario crias as sessoes*/
            //header("location:http://www.google.com");
            return $this->redirect()->toRoute('home', array(
                'home' => $this->params()->fromRoute('home')
            ));
            /*retireciona para pagina interna do sistema*/

        } catch (Exception $e) {
            echo "Exceção pega: ",  $e->getMessage(), "\n";
        }

    }
}


text:
<!DOCTYPE html>

    <title>OSLogRecorder Struct Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>

CleanroomLogger Docs (100% documented)

View on GitHub

        CleanroomLogger Reference

        OSLogRecorder Struct Reference

            Classes

                BasicLogConfiguration

                ConcatenatingLogFormatter

                ConsoleLogConfiguration

                – StandardStreamsMode

                FieldBasedLogFormatter

                – Field

                FileLogRecorder

                LogReceptacle

                LogRecorderBase

                OutputStreamLogRecorder

                ParsableLogFormatter

                ReadableLogFormatter

                RotatingLogFileConfiguration

                RotatingLogFileRecorder

                StandardErrorLogRecorder

                StandardLogFormatter

                StandardOutputLogRecorder

                StandardStreamsLogRecorder

                XcodeLogConfiguration

                XcodeLogFormatter

                XcodeTraceLogFormatter

            Enums

                CallingThreadStyle

                DelimiterStyle

                LogSeverity

                OSLogTypeTranslator

                SeverityStyle

                – TextRepresentation

                TimestampStyle

            Protocols

                LogConfiguration

                LogFilter

                LogFormatter

                LogRecorder

            Structs

                CallSiteLogFormatter

                CallingThreadLogFormatter

                DelimiterLogFormatter

                LiteralLogFormatter

                Log

                LogChannel

                LogEntry

                – Payload

                LogSeverityFilter

                OSLogRecorder

                PayloadLogFormatter

                PayloadMessageLogFormatter

                PayloadTraceLogFormatter

                PayloadValueLogFormatter

                ProcessIDLogFormatter

                ProcessNameLogFormatter

                SeverityLogFormatter

                StackFrameLogFormatter

                TimestampLogFormatter

OSLogRecorder

public struct OSLogRecorder: LogRecorder

The OSLogRecorder is an implemention of the LogRecorder protocol that
records log entries using the new unified logging system available
as of iOS 10.0, macOS 10.12, tvOS 10.0, and watchOS 3.0.

Unless a LogTypeTranslator is specified during construction, the
OSLogRecorder will record log messages with an OSLogType of .default.
This is consistent with the behavior of NSLog().

                    isAvailable

true if the os_log() function is available at runtime.

Declaration

Swift

public static let isAvailable: Bool =

                    formatters

The LogFormatters to be used in conjunction with the receiver.

Declaration

Swift

public let formatters: [LogFormatter]

                    logTypeTranslator

Governs how OSLogType values are generated from LogEntry values.

Declaration

Swift

public let logTypeTranslator: OSLogTypeTranslator

                    log

The OSLog used to perform logging.

Declaration

Swift

public let log: OSLog

                    queue

The GCD queue used by the receiver to record messages.

Declaration

Swift

public let queue: DispatchQueue

                    init(formatters:subsystem:logTypeTranslator:queue:)

Initialize an OSLogRecorder instance, which will record log entries
using the os_log() function.

Important

os_log() is only supported as of iOS 10.0, macOS 10.12,
tvOS 10.0, and watchOS 3.0. On incompatible systems, this initializer
will fail.

Declaration

Swift

public init?(formatters: [LogFormatter], subsystem: String = "", logTypeTranslator: OSLogTypeTranslator = .default, queue: DispatchQueue? = nil)

Parameters

                                formatters

An array of LogFormatters to use for formatting log entries to be recorded by the receiver. Each formatter is consulted in sequence, and the formatted string returned by the first formatter to yield a non-nil value will be recorded (and subsequent formatters, if any, are skipped). The log entry is silently ignored and not recorded if every formatter returns nil.

                                subsystem

The name of the subsystem performing the logging. Defaults to the empty string ("") if not specified.

                                logTypeTranslator

An OSLogTypeTranslator value that governs how OSLogType values are determined for log entries.

                                queue

The DispatchQueue to use for the recorder. If nil, a new queue will be created.

                    record(message:for:currentQueue:synchronousMode:)

Called to record the specified using the os_log() function.

Note

This function is only called if one of the formatters associated
with the receiver returned a non-nil string for the given LogEntry.

Declaration

Swift

public func record(message: String, for entry: LogEntry, currentQueue: DispatchQueue, synchronousMode: Bool)

Parameters

                                message

The message to record.

                                entry

The LogEntry for which message was created.

                                currentQueue

The GCD queue on which the function is being executed.

                                synchronousMode

If true, the receiver should record the log entry synchronously and flush any buffers before returning.

© 2015-2017 Gilt Groupe

Generated by jazzy ♪♫ v0.7.2, a Realm project.


text:
define(['Ti/_/declare', 'Ti/_/Evented'], function(declare, Evented) {
	var obj = declare(Evented, {

		constructor: function(args, nativeObj) {
			// nativeObj is a native Tizen object; simply wrap it (take ownership of it)
			this._obj = nativeObj;
		},

		constants: {
			id: {
				get: function() {
					return this._obj.id;
				}
			},
			name: {
				get: function() {
					return this._obj.name;
				}
			},
			iconPath: {
				get: function() {
					return this._obj.iconPath;
				}
			},
			version: {
				get: function() {
					return this._obj.version;
				}
			},
			totalSize: {
				get: function() {
					return this._obj.totalSize;
				}
			},
			dataSize: {
				get: function() {
					return this._obj.dataSize;
				}
			},
			lastModified: {
				get: function() {
					return this._obj.lastModified;
				}
			},
			author: {
				get: function() {
					return this._obj.author;
				}
			},
			description: {
				get: function() {
					return this._obj.description;
				}
			},
			appIds: {
				get: function() {
					return this._obj.appIds;
				}
			},
		},

	});

	// Initialize declaredClass, so that toString() works properly on such objects.
	// Correct operation of toString() is required for proper wrapping and automated testing.
	obj.prototype.declaredClass = 'Tizen.Package.PackageInformation';
	return obj;
});


text:
require_relative 'base_claim_test'

class AdvocateInterimClaimTest < BaseClaimTest
  def agfs_schema?
    true
  end

  def scheme_10_date
    @scheme_10_date ||= scheme_date_for('scheme 10')
  end

  def test_creation!
    puts 'starting'

    # create a claim
    response = client.post_to_endpoint('claims/advocates/interim', claim_data)
    return if client.failure

    self.claim_uuid = id_from_json(response)

    # add a defendant
    response = client.post_to_endpoint('defendants', defendant_data)

    # add representation order
    defendant_id = id_from_json(response)
    client.post_to_endpoint('representation_orders', representation_order_data(defendant_id))

    # CREATE warrant fee
    client.post_to_endpoint('fees', warrant_fee_data)

    # CREATE miscellaneous fee
    response = client.post_to_endpoint('fees', misc_fee_data)

    # add date attended to miscellaneous fee
    attended_item_id = id_from_json(response)
    client.post_to_endpoint('dates_attended', date_attended_data(attended_item_id, 'fee'))

    # add expense
    client.post_to_endpoint('expenses', expense_data(role: 'agfs'))
  ensure
    clean_up
  end

  def claim_data
    advocate_category = json_value_at_index(client.get_dropdown_endpoint(ADVOCATE_CATEGORY_ENDPOINT, api_key, role: 'agfs_scheme_10'))
    offence_id = json_value_at_index(client.get_dropdown_endpoint(OFFENCE_ENDPOINT, api_key, rep_order_date: scheme_10_date), 'id')
    court_id = json_value_at_index(client.get_dropdown_endpoint(COURT_ENDPOINT, api_key), 'id')

    {
      api_key: api_key,
      creator_email: 'advocateadmin@example.com',
      advocate_email: 'advocate@example.com',
      case_number: 'S20161234',
      providers_ref: SecureRandom.uuid[3..15].upcase,
      advocate_category: advocate_category,
      offence_id: offence_id,
      court_id: court_id,
      cms_number: '12345678',
      additional_information: 'string',
      apply_vat: true
    }
  end

  def representation_order_data(defendant_uuid)
    {
      api_key: api_key,
      defendant_id: defendant_uuid,
      maat_reference: '4546963',
      representation_order_date: scheme_10_date
    }
  end

  def warrant_fee_data
    fee_type_id = json_value_at_index(client.get_dropdown_endpoint(FEE_TYPE_ENDPOINT, api_key, category: 'warrant', role: 'agfs_scheme_10'), 'id')

    {
      api_key: api_key,
      claim_id: claim_uuid,
      fee_type_id: fee_type_id,
      warrant_issued_date: scheme_10_date,
      amount: 255.50
    }
  end

  def misc_fee_data
    fee_type_id = json_value_at_index(client.get_dropdown_endpoint(FEE_TYPE_ENDPOINT, api_key, category: 'misc', role: 'agfs_scheme_10'), 'id')

    {
      api_key: api_key,
      claim_id: claim_uuid,
      fee_type_id: fee_type_id,
      quantity: 2,
      rate: 1.55
    }
  end

  def date_attended_data(attended_item_uuid, attended_item_type)
    {
      api_key: api_key,
      attended_item_id: attended_item_uuid,
      attended_item_type: attended_item_type,
      date: scheme_10_date,
      date_to: scheme_10_date
    }
  end

  def expense_data(role:)
    expense_type_id = json_value_at_index(client.get_dropdown_endpoint(EXPENSE_TYPE_ENDPOINT, api_key, role: role), 'id')

    {
      api_key: api_key,
      claim_id: claim_uuid,
      expense_type_id: expense_type_id,
      amount: 500.15,
      location: 'London',
      reason_id: 5,
      reason_text: 'Foo',
      date: scheme_10_date,
      distance: 100.58,
      mileage_rate_id: 1
    }
  end
end


text:
<?php
namespace Vipa\SiteBundle\Twig;

use Doctrine\ORM\EntityManagerInterface;
use Liip\ImagineBundle\Imagine\Filter\FilterManager;
use Vipa\UserBundle\Entity\User;

class CommonExtension extends \Twig_Extension
{

    /**
     * @var EntityManagerInterface
     */
    private $em;

    /**
     * @var FilterManager
     */
    private $filterManager;

    /**
     * @param EntityManagerInterface $entityManager
     * @param FilterManager          $filterManager
     */
    public function __construct(
        EntityManagerInterface $entityManager,
        FilterManager $filterManager
    ) {
        $this->em = $entityManager;
        $this->filterManager = $filterManager;
    }

    /**
     * @return array
     */
    public function getFilters()
    {
        return [
            new \Twig_SimpleFilter('user', [$this, 'getUserByIdOrUsername']),

        ];
    }

    /**
     * @param $id
     * @param  bool        $object
     * @return User|string
     */
    public function getUserByIdOrUsername($id, $object = false)
    {
        if (empty($id)) {
            return '';
        }

        if (is_numeric($id)) {
            /** @var User $user */
            $user = $this->em->getRepository('VipaUserBundle:User')->find($id);
        } else {
            /** @var User $user */
            $user = $this->em->getRepository('VipaUserBundle:User')->findOneBy(array('username' => $id));
        }

        if (!$user) {
            return '';
        }
        if ($object) {
            return $user;
        }

        return "{$user->getUsername()} ~ {$user->getEmail()} - {$user->getFirstName()} {$user->getLastName()}";
    }

    public function getName()
    {
        return 'common_extension';
    }
}


text:
namespace Nine.Formatting
{
    using System;
    using System.Runtime.Serialization;

    [DataContract]
    public class BasicTypes
    {
        [DataMember(Order = 1)]
        public short Short = short.MinValue;
        [DataMember(Order = 2)]
        public ushort Ushort = ushort.MaxValue;
        [DataMember(Order = 3)]
        public int Int = int.MaxValue;
        [DataMember(Order = 4)]
        public long Long = long.MinValue;
        //[DataMember(Order = 5)] NotSupported by bson
        //public ulong Ulong = ulong.MaxValue;
        [DataMember(Order = 6)]
        public string String = "THis afowejfksflskdjflskdf中饿鬼送我饥饿感ijifwjeifaaas";
        [DataMember(Order = 7)]
        public StringComparison Enum = StringComparison.OrdinalIgnoreCase;
        //[DataMember(Order = 8)] Not supported by protobuf
        //public StringComparison EnumOverflow = (StringComparison)int.MaxValue;
        [DataMember(Order = 9)]
        public DateTime DateTime = DateTime.UtcNow;
        [DataMember(Order = 10)]
        public DateTime MinDateTime = DateTime.SpecifyKind(DateTime.MinValue.AddDays(1), DateTimeKind.Utc);
        [DataMember(Order = 11)]
        public DateTime MaxDateTime = DateTime.SpecifyKind(DateTime.MaxValue.AddDays(-1), DateTimeKind.Utc);
        [DataMember(Order = 12)]
        public TimeSpan TimeSpan = TimeSpan.MaxValue;
        [DataMember(Order = 13)]
        public int? Nullable;
        [DataMember(Order = 14)]
        public int? NullableWithValue = int.MaxValue;
        //[DataMember(Order = 15)] Not supported by Jil
        //public Type Type = typeof(BasicTypes);
        //[DataMember(Order = 16)]
        //public Type NullType;

#pragma warning disable CS0414
        private string notSerialized = "notSerialized";
#pragma warning restore
    }
}


text:
import requests
import bs4

# Get number of pages 7286/50 = 145.72
total_pages = 146
# Generate USA University URL list
root_url = 'http://univ.cc/search.php?dom=edu&key=&start='
url_list = [root_url + "1"]
j = 50
for i in range(1, 42):
    url_list.append(root_url + str(j + 1))
    j += 50

names = []
for link in url_list:
    response = requests.get(link)
    soup = bs4.BeautifulSoup(response.text, 'html.parser')
    new_names = [a.get_text() for a in soup.select('li a')]
    names.extend(new_names)

with open('usa_univ_names.txt', 'w') as f:
    for s in names:
        f.write((s.encode('unicode-escape') + u'\n'))


text:
package redis.clients.jedis.commands;

import redis.clients.jedis.*;

import redis.clients.jedis.params.geo.GeoRadiusParam;
import redis.clients.jedis.params.sortedset.ZAddParams;
import redis.clients.jedis.params.sortedset.ZIncrByParams;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface BinaryRedisPipeline {
  Response<Long> append(byte[] key, byte[] value);

  Response<List<byte[]>> blpop(byte[] arg);

  Response<List<byte[]>> brpop(byte[] arg);

  Response<Long> decr(byte[] key);

  Response<Long> decrBy(byte[] key, long integer);

  Response<Long> del(byte[] keys);

  Response<byte[]> echo(byte[] string);

  Response<Boolean> exists(byte[] key);

  Response<Long> expire(byte[] key, int seconds);

  Response<Long> pexpire(byte[] key, long milliseconds);

  Response<Long> expireAt(byte[] key, long unixTime);

  Response<Long> pexpireAt(byte[] key, long millisecondsTimestamp);

  Response<byte[]> get(byte[] key);

  Response<Boolean> getbit(byte[] key, long offset);

  Response<byte[]> getSet(byte[] key, byte[] value);

  Response<byte[]> getrange(byte[] key, long startOffset, long endOffset);

  Response<Long> hdel(byte[] key, byte[]... field);

  Response<Boolean> hexists(byte[] key, byte[] field);

  Response<byte[]> hget(byte[] key, byte[] field);

  Response<Map<byte[], byte[]>> hgetAll(byte[] key);

  Response<Long> hincrBy(byte[] key, byte[] field, long value);

  Response<Set<byte[]>> hkeys(byte[] key);

  Response<Long> hlen(byte[] key);

  Response<List<byte[]>> hmget(byte[] key, byte[]... fields);

  Response<String> hmset(byte[] key, Map<byte[], byte[]> hash);

  Response<Long> hset(byte[] key, byte[] field, byte[] value);

  Response<Long> hsetnx(byte[] key, byte[] field, byte[] value);

  Response<List<byte[]>> hvals(byte[] key);

  Response<Long> incr(byte[] key);

  Response<Long> incrBy(byte[] key, long integer);

  Response<byte[]> lindex(byte[] key, long index);

  Response<Long> linsert(byte[] key, BinaryClient.LIST_POSITION where, byte[] pivot, byte[] value);

  Response<Long> llen(byte[] key);

  Response<byte[]> lpop(byte[] key);

  Response<Long> lpush(byte[] key, byte[]... string);

  Response<Long> lpushx(byte[] key, byte[]... bytes);

  Response<List<byte[]>> lrange(byte[] key, long start, long end);

  Response<Long> lrem(byte[] key, long count, byte[] value);

  Response<String> lset(byte[] key, long index, byte[] value);

  Response<String> ltrim(byte[] key, long start, long end);

  Response<Long> move(byte[] key, int dbIndex);

  Response<Long> persist(byte[] key);

  Response<byte[]> rpop(byte[] key);

  Response<Long> rpush(byte[] key, byte[]... string);

  Response<Long> rpushx(byte[] key, byte[]... string);

  Response<Long> sadd(byte[] key, byte[]... member);

  Response<Long> scard(byte[] key);

  Response<String> set(byte[] key, byte[] value);

  Response<Boolean> setbit(byte[] key, long offset, byte[] value);

  Response<Long> setrange(byte[] key, long offset, byte[] value);

  Response<String> setex(byte[] key, int seconds, byte[] value);

  Response<Long> setnx(byte[] key, byte[] value);

  Response<Long> setrange(String key, long offset, String value);

  Response<Set<byte[]>> smembers(byte[] key);

  Response<Boolean> sismember(byte[] key, byte[] member);

  Response<List<byte[]>> sort(byte[] key);

  Response<List<byte[]>> sort(byte[] key, SortingParams sortingParameters);

  Response<byte[]> spop(byte[] key);

  Response<Set<byte[]>> spop(byte[] key, long count);

  Response<byte[]> srandmember(byte[] key);

  Response<Long> srem(byte[] key, byte[]... member);

  Response<Long> strlen(byte[] key);

  Response<String> substr(byte[] key, int start, int end);

  Response<Long> ttl(byte[] key);

  Response<String> type(byte[] key);

  Response<Long> zadd(byte[] key, double score, byte[] member);

  Response<Long> zadd(byte[] key, double score, byte[] member, ZAddParams params);

  Response<Long> zadd(byte[] key, Map<byte[], Double> scoreMembers);

  Response<Long> zadd(byte[] key, Map<byte[], Double> scoreMembers, ZAddParams params);

  Response<Long> zcard(byte[] key);

  Response<Long> zcount(byte[] key, double min, double max);

  Response<Double> zincrby(byte[] key, double score, byte[] member);

  Response<Double> zincrby(byte[] key, double score, byte[] member, ZIncrByParams params);

  Response<Set<byte[]>> zrange(byte[] key, long start, long end);

  Response<Set<byte[]>> zrangeByScore(byte[] key, double min, double max);

  Response<Set<byte[]>> zrangeByScore(byte[] key, byte[] min, byte[] max);

  Response<Set<byte[]>> zrangeByScore(byte[] key, double min, double max, int offset, int count);

  Response<Set<byte[]>> zrangeByScore(byte[] key, byte[] min, byte[] max, int offset, int count);

  Response<Set<Tuple>> zrangeByScoreWithScores(byte[] key, double min, double max);

  Response<Set<Tuple>> zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max);

  Response<Set<Tuple>> zrangeByScoreWithScores(byte[] key, double min, double max, int offset,
      int count);

  Response<Set<Tuple>> zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max, int offset,
      int count);

  Response<Set<byte[]>> zrevrangeByScore(byte[] key, double max, double min);

  Response<Set<byte[]>> zrevrangeByScore(byte[] key, byte[] max, byte[] min);

  Response<Set<byte[]>> zrevrangeByScore(byte[] key, double max, double min, int offset, int count);

  Response<Set<byte[]>> zrevrangeByScore(byte[] key, byte[] max, byte[] min, int offset, int count);

  Response<Set<Tuple>> zrevrangeByScoreWithScores(byte[] key, double max, double min);

  Response<Set<Tuple>> zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min);

  Response<Set<Tuple>> zrevrangeByScoreWithScores(byte[] key, double max, double min, int offset,
      int count);

  Response<Set<Tuple>> zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min, int offset,
      int count);

  Response<Set<Tuple>> zrangeWithScores(byte[] key, long start, long end);

  Response<Long> zrank(byte[] key, byte[] member);

  Response<Long> zrem(byte[] key, byte[]... member);

  Response<Long> zremrangeByRank(byte[] key, long start, long end);

  Response<Long> zremrangeByScore(byte[] key, double start, double end);

  Response<Long> zremrangeByScore(byte[] key, byte[] start, byte[] end);

  Response<Set<byte[]>> zrevrange(byte[] key, long start, long end);

  Response<Set<Tuple>> zrevrangeWithScores(byte[] key, long start, long end);

  Response<Long> zrevrank(byte[] key, byte[] member);

  Response<Double> zscore(byte[] key, byte[] member);

  Response<Long> zlexcount(final byte[] key, final byte[] min, final byte[] max);

  Response<Set<byte[]>> zrangeByLex(final byte[] key, final byte[] min, final byte[] max);

  Response<Set<byte[]>> zrangeByLex(final byte[] key, final byte[] min, final byte[] max,
      int offset, int count);

  Response<Set<byte[]>> zrevrangeByLex(final byte[] key, final byte[] max, final byte[] min);

  Response<Set<byte[]>> zrevrangeByLex(final byte[] key, final byte[] max, final byte[] min,
      int offset, int count);

  Response<Long> zremrangeByLex(final byte[] key, final byte[] min, final byte[] max);

  Response<Long> bitcount(byte[] key);

  Response<Long> bitcount(byte[] key, long start, long end);

  Response<Long> pfadd(final byte[] key, final byte[]... elements);

  Response<Long> pfcount(final byte[] key);

  // Geo Commands

  Response<Long> geoadd(byte[] key, double longitude, double latitude, byte[] member);

  Response<Long> geoadd(byte[] key, Map<byte[], GeoCoordinate> memberCoordinateMap);

  Response<Double> geodist(byte[] key, byte[] member1, byte[] member2);

  Response<Double> geodist(byte[] key, byte[] member1, byte[] member2, GeoUnit unit);

  Response<List<byte[]>> geohash(byte[] key, byte[]... members);

  Response<List<GeoCoordinate>> geopos(byte[] key, byte[]... members);

  Response<List<GeoRadiusResponse>> georadius(byte[] key, double longitude, double latitude,
      double radius, GeoUnit unit);

  Response<List<GeoRadiusResponse>> georadius(byte[] key, double longitude, double latitude,
      double radius, GeoUnit unit, GeoRadiusParam param);

  Response<List<GeoRadiusResponse>> georadiusByMember(byte[] key, byte[] member, double radius,
      GeoUnit unit);

  Response<List<GeoRadiusResponse>> georadiusByMember(byte[] key, byte[] member, double radius,
      GeoUnit unit, GeoRadiusParam param);

  Response<List<Long>> bitfield(final byte[] key, final byte[]... elements);

  Response<Long> hstrlen(final byte[] key, final byte[] field);
}


text:
package horizon

import (
	"encoding/json"
	"testing"

	. "github.com/smartystreets/goconvey/convey"
	"github.com/stellar/horizon/test"
)

func TestLedgerActions(t *testing.T) {
	test.LoadScenario("base")
	app := NewTestApp()
	defer app.Close()
	rh := NewRequestHelper(app)

	Convey("Ledger Actions:", t, func() {

		Convey("GET /ledgers/1", func() {
			w := rh.Get("/ledgers/1", test.RequestHelperNoop)

			So(w.Code, ShouldEqual, 200)

			var result LedgerResource
			err := json.Unmarshal(w.Body.Bytes(), &result)
			So(err, ShouldBeNil)
			So(result.Sequence, ShouldEqual, 1)
		})

		Convey("GET /ledgers/100", func() {
			w := rh.Get("/ledgers/100", test.RequestHelperNoop)

			So(w.Code, ShouldEqual, 404)
		})

		Convey("GET /ledgers", func() {

			Convey("With Default Params", func() {
				w := rh.Get("/ledgers", test.RequestHelperNoop)

				var result map[string]interface{}
				err := json.Unmarshal(w.Body.Bytes(), &result)
				So(err, ShouldBeNil)
				So(w.Code, ShouldEqual, 200)

				embedded := result["_embedded"].(map[string]interface{})
				records := embedded["records"].([]interface{})

				So(len(records), ShouldEqual, 3)

			})

			Convey("With A Limit", func() {
				w := rh.Get("/ledgers?limit=1", test.RequestHelperNoop)

				var result map[string]interface{}
				err := json.Unmarshal(w.Body.Bytes(), &result)
				So(err, ShouldBeNil)
				So(w.Code, ShouldEqual, 200)

				embedded := result["_embedded"].(map[string]interface{})
				records := embedded["records"].([]interface{})

				So(len(records), ShouldEqual, 1)

			})

		})
	})
}