text:
static NSString *const kGTMSrcRootPath = @"$(SRCROOT)/";

@implementation GTMXcodeMenuItem

GTM_METHOD_CHECK(NSEnumerator, gtm_filteredEnumeratorByMakingEachObjectPerformSelector:withObject:);
GTM_METHOD_CHECK(NSEnumerator, gtm_enumeratorByMakingEachObjectPerformSelector:withObject:);

- (NSString*)keyEquivalent {
  return @"";
}

- (NSMenu*)insertionMenu {
  NSMenu *rootMenu = [NSApp mainMenu];
  NSInteger googleIndex = [rootMenu indexOfItemWithTitle:@"Google Scripts"];
  NSMenuItem *googleMenuItem = [rootMenu itemAtIndex:googleIndex];
  return [googleMenuItem submenu];
}

- (SEL)actionSelector {
  return @selector(action:);
}

- (void)action:(id)sender {
  NSBeep();
}

- (int)insertionIndex {
  return 0;
}

- (NSString*)title {
  return @"Unnamed";
}

- (int)depth {
  return 1;
}

- (NSComparisonResult)compareDepth:(id<GTMXcodeMenuItemProtocol>)item {
  int itemDepth = [item depth];
  int selfDepth = [self depth];

  if (selfDepth > itemDepth) {
    return NSOrderedDescending;
  } else if (selfDepth == itemDepth) {
    int itemInsertionIndex = [item insertionIndex];
    int selfInsertionIndex = [self insertionIndex];
    if (selfInsertionIndex > itemInsertionIndex) {
      return NSOrderedDescending;
    } else if (selfInsertionIndex == itemInsertionIndex) {
      return NSOrderedSame;
    } else {
      return NSOrderedAscending;
    }
  } else {
    return NSOrderedAscending;
  }
}

- (NSArray*)selectedPaths {
  NSArray *paths = nil;
  PBXWindowController *controller = [[NSApp mainWindow] windowController];
  if (controller) {
    PBXModule *activeModule = [controller activeModule];
    if ([activeModule conformsToProtocol:@protocol(XCSelectionSource)]) {
      XCProjectBasedSelection *selection
        = (XCProjectBasedSelection *)[activeModule xcSelection];
      if ([selection isKindOfClass:[XCProjectBasedSelection class]]) {
        NSArray* selectionItems = [selection items];
        if (selectionItems) {
          NSEnumerator *pathEnum = [selectionItems objectEnumerator];
          pathEnum
            = [pathEnum gtm_filteredEnumeratorByMakingEachObjectPerformSelector:@selector(isMemberOfClass:)
                                                                     withObject:NSClassFromString(@"PBXFileReference")];
          pathEnum
            = [pathEnum gtm_enumeratorByMakingEachObjectPerformSelector:@selector(resolvedAbsolutePath)
                                                             withObject:nil];
          paths = [pathEnum allObjects];
        }
      }
    }
  }
  return paths;
}

- (void)wasInserted:(NSMenuItem*)item {
}

- (BOOL)allowGDTMenuIcon {
  return YES;
}

// Expand |path| based on |target| and |configuration|.
// If newPath is not absolute, expand kSrcRootPath and prepend it to newPath.
- (NSString *)pathByExpandingString:(NSString *)path
              forBuildConfiguration:(NSString *)configuration
                           ofTarget:(PBXTarget *)target {
  NSString *newPath = [target stringByExpandingString:path
                           forBuildConfigurationNamed:configuration];
  if (![newPath hasPrefix:@"/"]) {
    NSString *srcRoot = [target stringByExpandingString:kGTMSrcRootPath
                             forBuildConfigurationNamed:configuration];
    if (srcRoot) {
      newPath = [srcRoot stringByAppendingString:newPath];
    }
  }
  return newPath;
}

@end


text:
// **********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you 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.
//
// @@@ END COPYRIGHT @@@
// **********************************************************************
#ifndef CMPPROCESS_H
#define CMPPROCESS_H

#include "CmpCommon.h"
#include "ComCextdecs.h"

/************************************************************************
class CmpProcess

Used to get information about this compiler
process through Guardian procedure calls

************************************************************************/
class CmpProcess
{
public:
  CmpProcess();

  // getters
  inline short getNodeNum() { return nodeNum_; }
  inline short getPin() { return pin_; }
  inline Int32 getSegmentNum() { return segmentNum_; }
  inline Int64 getProcessStartTime() { return processStartTime_; }

  Int64 getProcessDuration();
  Lng32 getCurrentSystemHeapSize();

  // generate the compiler id out of cpu#, pin, node#, and process start timestamp
  void getCompilerId( char *id, int len);

private:
  short       nodeNum_;  // cpu num
  short       pin_;
  Int32         segmentNum_;
  //
  // timestamp for when this CmpProcess was created
  Int64   processStartTime_;
};
/************************************************************************
helper functions for timestamps

************************************************************************/
static
void
getTimestampAsBuffer(Int64 juliantimestamp, char *datetime)
{
  short timestamp[8];

  CMPASSERT(NULL!=datetime);

  INTERPRETTIMESTAMP(juliantimestamp, timestamp);
  str_sprintf(datetime, "%04d/%02d/%02d %02d:%02d:%02d.%03u%03u",
			timestamp[0], // year
                        timestamp[1], // month
                        timestamp[2], // day
			timestamp[3], // hour
                        timestamp[4], // minute
                        timestamp[5], // second
			timestamp[6], // fraction
                        timestamp[7]);// fraction
}
static
Int64
getCurrentTimestamp()
{
  // return timestamp in local civil time
  //return CONVERTTIMESTAMP(JULIANTIMESTAMP(0,0,0,-1),0,-1,0);
  return JULIANTIMESTAMP(0,0,0,-1);
}

static Int64 getCurrentTimestampUEpoch()
{
   // return local timestamp in unix epoch (since January 1, 1970). This is what
   // is expected by the repository UNC
   time_t utcTimeStamp = time(0);
   tm localTime;
   localtime_r (&utcTimeStamp, &localTime);
   time_t lctTimeStamp = timegm(&localTime);

   Int64 usLctTimestamp = 1000000 * (Int64) lctTimeStamp;
   return usLctTimestamp;
}

#endif // CMPPROCESS_H

redpajama_set_name: RedPajamaGithub


text:
@interface MKWebScriptEngine ()

@property (strong, nonatomic) UIWebView *webView;

@end

@implementation MKWebScriptEngine

- (id)initWithWebView:(UIWebView *)webView
{
    self = [super init];
    if (self) {
        self.webView = webView;
    }
    return self;
}

- (id)evaluateWebScript:(NSString *)script {
    static NSUInteger objectNumber = 0;

    if ([script hasPrefix:@"new "]) {
        NSString *varName = [NSString stringWithFormat:@"object%d", objectNumber++];
        NSString *newScript = [NSString stringWithFormat:@"var %@ = %@", varName, script];
//        NSLog(@"%@", newScript);
        [self.webView stringByEvaluatingJavaScriptFromString:newScript];
        MKWebScriptObject *scriptObject = [[MKWebScriptObject alloc] initWithScriptEngine:self script:varName];
        return scriptObject;
    } else {
        return [self.webView stringByEvaluatingJavaScriptFromString:script];
    }
}

- (id)callWebScriptMethod:(NSString *)name withArguments:(NSArray *)args {
    NSMutableString *script = [NSMutableString stringWithString:name];
    [script appendString:@"("];
    for (NSInteger i = 0; i < args.count; i++) {
        id arg = args[i];
        if ([arg isKindOfClass:[MKWebScriptObject class]]) {
            MKWebScriptObject *scriptObject = (MKWebScriptObject *)arg;
            [script appendFormat:@"%@", scriptObject.scriptObject];
        } else if ([arg isKindOfClass:[NSNumber class]]) {
            [script appendFormat:@"%@", arg];
        } else if ([arg isKindOfClass:[NSArray class]]) {
            [script appendFormat:@"[%@]", [arg componentsJoinedByString:@","]];
        } else {
            [script appendFormat:@"'%@'", arg];
        }
        if (i < args.count - 1) {
            [script appendString:@", "];
        }
    }
    [script appendString:@");"];
//    NSLog(@"%@", script);
    [self.webView stringByEvaluatingJavaScriptFromString:script];
    return self;
}

@end


text:
using System.Text.Json;
using Azure.Core;

namespace Azure.ResourceManager.Workloads.Models
{
    public partial class VirtualMachineConfiguration : IUtf8JsonSerializable
    {
        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
        {
            writer.WriteStartObject();
            writer.WritePropertyName("vmSize");
            writer.WriteStringValue(VmSize);
            writer.WritePropertyName("imageReference");
            writer.WriteObjectValue(ImageReference);
            writer.WritePropertyName("osProfile");
            writer.WriteObjectValue(OSProfile);
            writer.WriteEndObject();
        }

        internal static VirtualMachineConfiguration DeserializeVirtualMachineConfiguration(JsonElement element)
        {
            string vmSize = default;
            ImageReference imageReference = default;
            OSProfile osProfile = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("vmSize"))
                {
                    vmSize = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("imageReference"))
                {
                    imageReference = ImageReference.DeserializeImageReference(property.Value);
                    continue;
                }
                if (property.NameEquals("osProfile"))
                {
                    osProfile = OSProfile.DeserializeOSProfile(property.Value);
                    continue;
                }
            }
            return new VirtualMachineConfiguration(vmSize, imageReference, osProfile);
        }
    }
}


text:
require 'presto/transformation/validator'

module Presto
	class Transformation
		extend Forwardable

		def_delegators :validator, :validate!, :valid?

		attr_reader :w, :h, :fit, :fm, :bg, :q

		def initialize args={}
			defaults = {:fit => 'clip', :bg => 'ffffff00'}
			params = defaults.merge(args)

			@bg = "##{params[:bg]}" if params.key?(:bg)
			@fit = params[:fit]
			@fm = params[:fm]
			@h = params[:h].to_i if params.key?(:h)
			@w = params[:w].to_i if params.key?(:w)
			@q = params[:q].to_i if params.key?(:q)
		end

		def [] val
			send(val)
		end

		private

		def validator
			::Presto::Transformation::Validator.new(self)
		end
	end
end


text:
namespace sf1r
{
namespace Recommend
{

static std::string uuid = "PinyinTable";
PinyinTable::PinyinTable(const std::string& workdir)
    : workdir_(workdir)
{
    std::string path = workdir_;
    path += "/";
    path += uuid;

    if(!boost::filesystem::exists(path))
        return;
    std::ifstream in;
    in.open(path.c_str(), std::ifstream::in);
    pinyinTable_.clear();
    in>>*this;
    //std::cout<<"PinyinTable::"<<pinyinTable_.size()<<"\n";
}

PinyinTable::~PinyinTable()
{
}

void PinyinTable::insert(const std::string& userQuery, const std::string& pinyin, uint32_t freq)
{
    UserQuery uq(userQuery, freq);
    boost::unordered_map<std::string, UserQueryList>::iterator it = pinyinTable_.find(pinyin);
    if (pinyinTable_.end() != it)
    {
        UserQueryList::iterator uq_it =it->second.begin();
        for (; uq_it != it->second.end(); uq_it++)
        {
            if (uq_it->userQuery() == uq.userQuery())
                break;
        }
        if (uq_it != it->second.end())
            uq_it->setFreq(uq_it->freq() + freq);
        else
            it->second.push_back(uq);
        return;
    }
    UserQueryList uqList;
    uqList.push_back(uq);
    pinyinTable_.insert(make_pair(pinyin, uqList));

}

void PinyinTable::search(const std::string& pinyin, UserQueryList& uqlist) const
{
    boost::unordered_map<std::string, UserQueryList>::const_iterator it = pinyinTable_.find(pinyin);
    if (pinyinTable_.end() != it)
        uqlist = it->second;
}

void PinyinTable::clear()
{
    pinyinTable_.clear();
}

void PinyinTable::flush() const
{
    std::string path = workdir_;
    path += "/";
    path += uuid;

    std::ofstream out;
    out.open(path.c_str(), std::ofstream::out | std::ofstream::trunc);
    out<<*this;
    //std::cout<<"PinyinTable::"<<pinyinTable_.size()<<"\n";
}

std::ostream& operator<<(std::ostream& out, const PinyinTable& table)
{
    boost::unordered_map<std::string, UserQueryList>::const_iterator it = table.pinyinTable_.begin();
    for (; it != table.pinyinTable_.end(); it++)
    {
        out<<it->first<<"::";
        UserQueryList::const_iterator uq_it = it->second.begin();
        for (; uq_it != it->second.end(); uq_it++)
        {
            out<<uq_it->userQuery()<<":"<<uq_it->freq()<<";";
        }
        out<<"\n";
    }
    return out;
}

std::istream& operator>>(std::istream& in,  PinyinTable& table)
{
    int maxLine = 102400;
    char cLine[maxLine];
    memset(cLine, 0, maxLine);

    while(in.getline(cLine, maxLine))
    {
        std::string sLine(cLine);
        memset(cLine, 0, maxLine);

        std::size_t pos = sLine.find("::");
        if (std::string::npos == pos)
            continue;

        std::string pinyin = sLine.substr(0, pos);
        pos += 2;
        UserQueryList uqList;
        while (true)
        {
            std::size_t found = sLine.find(";", pos);
            if (std::string::npos == found)
                break;

            std::string pair = sLine.substr(pos, found - pos);
            pos = found + 1;

            std::size_t seq = pair.find(":");
            if (std::string::npos == seq)
                continue;
            uqList.push_back(UserQuery(pair.substr(0, seq), atoi(pair.substr(seq+1).c_str())));
        }
        table.pinyinTable_.insert(std::make_pair(pinyin, uqList));
    }
    return in;
}

}
}


text:
package com.microrisc.simply.iqrf.dpa.v22x.types;

/**
 * Encapsulates addressing information of IQMesh Coordinator.
 *
 * @author Michal Konopa
 */
public final class AddressingInfo {
    /** Number of bonded network nodes. */
    private final int bondedNodesNum;

    /** Discovery ID of the network. */
    private final int did;

    /**
     * Creates new {@code AddressingInfo} object.
     * @param bondedNodesNum number of bonded network nodes
     * @param did discovery ID of the network
     */
    public AddressingInfo(int bondedNodesNum, int did) {
        this.bondedNodesNum = bondedNodesNum;
        this.did = did;
    }

    /**
     * @return number of bonded network devices
     */
    public int getBondedNodesNum() {
        return bondedNodesNum;
    }

    /**
     * @return discovery ID of the network
     */
    public int getDid() {
        return did;
    }

    @Override
    public String toString() {
        StringBuilder strBuilder = new StringBuilder();
        String NEW_LINE = System.getProperty("line.separator");

        strBuilder.append(this.getClass().getSimpleName() + " { " + NEW_LINE);
        strBuilder.append(" Number of bonded nodes: " + bondedNodesNum + NEW_LINE);
        strBuilder.append(" Discovery ID of the network: " + did + NEW_LINE);
        strBuilder.append("}");

        return strBuilder.toString();
    }
}


text:
Hi, this is a guide how multiple setTimeouts work

Open developers console to see results (press F12)

setTimeouts dependent on external variables can be tricky.


text:
{-# LANGUAGE Trustworthy #-}

-- | @pipes@ utilities for interfacing with the @courier@ message-passing framework.
module Pipes.Courier
    ( -- * Endpoints
      -- $endpoints
      send
    , send'
    , broadcast
    , post
    , receive
    , receiveTimeout
    , receiveTimeout'
    , select
    , selectTimeout
    , selectTimeout'

      -- * Re-exports
      -- $reexports
    , module Network.Endpoints
    ) where

import Data.Function
import Network.Endpoints
import Pipes

{- $endpoints

    Pipes which operate on 'Endpoint's.
-}

{- | @send ep name@ sends the message supplied upstream through the given 'Endpoint' @ep@ to the
     'Name' @name@.

     Analogous to 'sendMessage_'.
-}
send :: MonadIO m => Endpoint -> Name -> Consumer' Message m r
send ep name = for cat $ \m -> liftIO (sendMessage_ ep name m)
{-# INLINABLE send #-}

{-# RULES
    "p >-> send" forall p ep name .
        p >-> send ep name = for p (\m -> liftIO (sendMessage_ ep name m))
  #-}

{- | @send' ep name@ is like @send@ except the pipe closes if an error occurs while finding a
     suitable 'Transport'.
-}
send' :: MonadIO m => Endpoint -> Name -> Consumer' Message m ()
send' ep name = for cat $ \m -> fix $ \f ->
    liftIO (sendMessage ep name m) >>= \x -> case x of { Left _ -> return (); _ -> f }
{-# INLINABLE send' #-}

{-# RULES
    "p >-> send'" forall p ep name .
        p >-> send' ep name = for p $ \m -> fix $ \f ->
            liftIO (sendMessage ep name m) >>= \x -> case x of { Left _ -> return (); _ -> f }
  #-}

{- | @broadcast ep names@ sends the message supplied upstream through the given 'Endpoint' @ep@ to
     the 'Name's specified in the list of @names@.

     Analogous to 'broadcastMessage_'.
-}
broadcast :: MonadIO m => Endpoint -> [Name] -> Consumer' Message m r
broadcast ep names = for cat $ \m -> liftIO (broadcastMessage_ ep names m)
{-# INLINABLE broadcast #-}

{-# RULES
    "p >-> broadcast" forall p ep names .
        p >-> broadcast ep names = for p (\m -> liftIO (broadcastMessage_ ep names m))
  #-}

{- | @post ep@ posts the message supplied by upstream to the given 'Endpoint' @ep@ without using a
     transport.

     Analogous to 'postMessage'.
-}
post :: MonadIO m => Endpoint -> Consumer' Message m r
post ep = for cat $ \m -> liftIO (postMessage ep m)
{-# INLINABLE post #-}

{-# RULES
    "p >-> post" forall p ep .
        p >-> post ep = for p (\m -> liftIO (postMessage ep m))
  #-}

{- | @receive ep@ forwards the next message available from the given 'Endpoint' @ep@ downstream.

     Analogous to 'receiveMessage'.
-}
receive :: MonadIO m => Endpoint -> Producer' Message m r
receive ep = liftIO (receiveMessage ep) >~ cat
{-# INLINABLE receive #-}

{-# RULES
    "receive ep >-> p" forall ep p .
        receive ep >-> p = liftIO (receiveMessage ep) >~ p
  #-}

{- | @receiveTimeout ep tout@ is like 'receive' except operates using a timeout. If a message becomes
     available before the given timeout then downstream will receive a 'Just', otherwise it will
     receive 'Nothing' (but the pipe will remain open).

     Analogous to 'receiveMessageTimeout'.
-}
receiveTimeout :: MonadIO m => Endpoint -> Int -> Producer' (Maybe Message) m r
receiveTimeout ep tout = liftIO (receiveMessageTimeout ep tout) >~ cat
{-# INLINABLE receiveTimeout #-}

{-# RULES
    "receiveTimeout ep tout >-> p" forall ep tout p .
        receiveTimeout ep tout >-> p = liftIO (receiveMessageTimeout ep tout) >~ p
  #-}

{- | @receiveTimeout' ep tout@ is like 'receiveTimeout' except the pipe closes if no messages are
     received within the timeout period.
-}
receiveTimeout' :: MonadIO m => Endpoint -> Int -> Producer' Message m ()
receiveTimeout' ep tout = go
  where
    go = do
        msg <- liftIO $ receiveMessageTimeout ep tout
        case msg of
            Just m  -> yield m >> go
            Nothing -> return ()
{-# INLINABLE receiveTimeout' #-}

{- | @select ep f@ takes all of the messages available from the given 'Endpoint' @ep@ and applies
     them to the function @f@. Messages will only be sent downstream if @f@ returns 'Just'.

     Analogous to 'selectMessage'.
-}
select :: MonadIO m => Endpoint -> (Message -> Maybe v) -> Producer' v m r
select ep f = liftIO (selectMessage ep f) >~ cat
{-# INLINABLE select #-}

{-# RULES
    "select ep f >-> p" forall ep f p .
        select ep f >-> p = liftIO (selectMessage ep f) >~ p
  #-}

{- | @selectTimeout ep tout f@ is like 'select' except operates using a timeout. If a message is
     selected before the given timeout then downstream will receive a 'Just', otherwise it will
     receive 'Nothing' (but the pipe will remain open).

     Analogous to 'selectMessageTimeout'.
-}
selectTimeout :: MonadIO m => Endpoint -> Int -> (Message -> Maybe v) -> Producer' (Maybe v) m r
selectTimeout ep tout f = liftIO (selectMessageTimeout ep tout f) >~ cat
{-# INLINABLE selectTimeout #-}

{-# RULES
    "selectTimeout ep tout f >-> p" forall ep tout f p .
        selectTimeout ep tout f >-> p = liftIO (selectMessageTimeout ep tout f) >~ p
  #-}

{- | @selectTimeout' ep tout f@ is like 'selectTimeout' except the pipe closes if no messages are
     received within the timeout period.
-}
selectTimeout' :: MonadIO m => Endpoint -> Int -> (Message -> Maybe v) -> Producer' v m ()
selectTimeout' ep tout f = go
  where
    go = do
        msg <- liftIO $ selectMessageTimeout ep tout f
        case msg of
            Just m  -> yield m >> go
            Nothing -> return ()
{-# INLINABLE selectTimeout' #-}

-- $reexports


text:
package sqlest.executor

import java.sql.ResultSet
import sqlest._

case class TestDatabase(resultSet: ResultSet) extends Database {
  def statementBuilder: StatementBuilder = sqlest.sql.H2StatementBuilder

  def getConnection = new AbstractConnection {
    override def close = {}
    override def commit = {}
    override def rollback = {}
    override def setAutoCommit(autoCommit: Boolean) = {}
    override def prepareStatement(sql: String) = new AbstractPreparedStatement {
      override def executeQuery() = resultSet
      override def executeUpdate() = 0
      override def executeBatch() = Array()
    }
  }
}


text:
/**
 * Select2 Catalan translation.
 *
 * Author: David Planella
 */
(function ($) {
    "use strict";

    $.fn.select2.locales['ca'] = {
        formatNoMatches: function () { return "No s'ha trobat cap coincidència"; },
        formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduïu " + n + " caràcter" + (n == 1 ? "" : "s") + " més"; },
        formatInputTooLong: function (input, max) { var n = input.length - max; return "Introduïu " + n + " caràcter" + (n == 1? "" : "s") + "menys"; },
        formatSelectionTooBig: function (limit) { return "Només podeu seleccionar " + limit + " element" + (limit == 1 ? "" : "s"); },
        formatLoadMore: function (pageNumber) { return "S'estan carregant més resultats…"; },
        formatSearching: function () { return "S'està cercant…"; }
    };

    $.extend($.fn.select2.defaults, $.fn.select2.locales['ca']);
})(jQuery);


text:
require 'group_delegator'
require 'open-uri'
require 'benchmark'
class Bing
  QueryString = "http://www.bing.com/search?q="
  def search(search_string)
    url = QueryString + URI.escape(search_string)
    open(url){|f| f.meta}
  end
end

class Google
  QueryString = "http://www.google.com/search?q="
  def search(search_string)
    url = QueryString + URI.escape(search_string)
    open(url){|f| f.meta}
  end
end

class Yahoo
  QueryString = "http://search.yahoo.com/search?p="
  def search(search_string)
    url = QueryString + URI.escape(search_string)
    open(url){|f| f.meta}
  end
end

#default is iterative searchclass IterativeSearch < SimpleDel
searchers = [Bing.new, Google.new, Yahoo.new]
search_iteratively = SimpleGroupDelegator.new(searchers)
search_threaded = SimpleGroupDelegator.new(searchers, :threaded)
search_first_response = SimpleGroupDelegator.new(searchers, :first_response)

iterative = Benchmark.realtime { search_iteratively.search('stuff') }
threaded = Benchmark.realtime { search_threaded.search('stuff') }
first_resp = Benchmark.realtime { search_first_response.search('stuff') }

puts "Iterative Search Time: #{iterative}"
puts "Threaded Search Time : #{threaded}"
puts "First Response Time  : #{first_resp}"


text:
#ifndef _KEYCHAIN_UTILITIES_H_
#define _KEYCHAIN_UTILITIES_H_ 1

#include <Security/SecKeychain.h>

#include <stdio.h>

#ifdef __cplusplus
extern "C" {
#endif

/* Open a given named keychain. */
extern SecKeychainRef keychain_open(const char *name);

/* Return either NULL if argc is 0, or a SecKeychainRef if argc is 1 or a CFArrayRef of SecKeychainRefs if argc is greater than 1. */
extern CFTypeRef keychain_create_array(int argc, char * const *argv);

extern int parse_fourcharcode(const char *name, UInt32 *code);

extern int print_keychain_name(FILE *stream, SecKeychainRef keychain);

extern int print_keychain_item_attributes(FILE *stream, SecKeychainItemRef item, Boolean show_data, Boolean show_raw_data, Boolean show_acl, Boolean interactive);

extern void print_buffer(FILE *stream, UInt32 length, const void *data);

extern void print_buffer_pem(FILE *stream, const char *headerString, UInt32 length, const void *data);

extern void print_uint32(FILE* stream, uint32 n);

extern unsigned char hexValue(char c);

extern void fromHex(const char *hexDigits, CSSM_DATA *data);

extern void safe_CFRelease(void *cfTypeRefPtr);

extern void check_obsolete_keychain(const char *kcName);

#ifdef __cplusplus
}
#endif

#endif /*  _KEYCHAIN_UTILITIES_H_ */


text:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="#xslt"?>
<!DOCTYPE xsl:stylesheet [<!ATTLIST xsl:stylesheet id ID #IMPLIED>]>
<xsl:stylesheet id="xslt" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xml:lang="en">
<xsl:template match="xsl:stylesheet">
<xsl:call-template name="result1"/>
</xsl:template>
<xsl:template name="result1">
<xsl:call-template name="result2"/>
</xsl:template>
<xsl:template name="result2">
<xsl:call-template name="result3"/>
</xsl:template>
<xsl:template name="result3">
<xsl:call-template name="result4"/>
</xsl:template>
<xsl:template name="result4">
<xsl:call-template name="result5"/>
</xsl:template>
<xsl:template name="result5">
<xsl:call-template name="result6"/>
</xsl:template>
<xsl:template name="result6">
<xsl:call-template name="result7"/>
</xsl:template>
<xsl:template name="result7">
<xsl:call-template name="result8"/>
</xsl:template>
<xsl:template name="result8">
<xsl:call-template name="result9"/>
</xsl:template>
<xsl:template name="result9">
<result><xsl:value-of select="'PASS'"/></result>
</xsl:template>
</xsl:stylesheet>


text:
<?php

namespace ScipBundle\Form;

use AppBundle\Form\FilterType;
use ScipBundle\Filter\ToegangsrechtFilter;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class ToegangsrechtFilterType extends AbstractType
{
    /**
     * {@inheritdoc}
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        if (in_array('medewerker', $options['enabled_filters'])) {
            $builder->add('medewerker', MedewerkerSelectType::class, [
                'required' => false,
                'placeholder' => '',
            ]);
        }

        if (in_array('project', $options['enabled_filters'])) {
            $builder->add('project', ProjectSelectType::class, [
                'required' => false,
            ]);
        }

        $builder->add('filter', SubmitType::class, ['label' => 'Filteren']);
    }

    /**
     * {@inheritdoc}
     */
    public function getParent()
    {
        return FilterType::class;
    }

    /**
     * {@inheritdoc}
     */
    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'data_class' => ToegangsrechtFilter::class,
            'enabled_filters' => [
                'medewerker',
                'project',
            ],
        ]);
    }
}


text:
'use strict';
/**
 * @ngdoc function
 * @name sbAdminApp.controller:MainCtrl
 * @description
 * # MainCtrl
 * Controller of the sbAdminApp
 */
angular.module('sbAdminApp')
    .controller('ManageCtrl', function($scope,$position,$state) {
	    console.log("manage controller")
        //var currentUserStr = $cookies.currentUser;
        //var currentUser = JSON.parse(currentUserStr);

        //if($cookies.get('currentUser') == undefined || $cookies.get('authority') == undefined){
        //    console.log($cookies.get('currentUser') == undefined || $cookies.get('authority') == undefined);
        //    $state.go('login');
        //}
        //else {
        //    var currentUserStr = $cookies.get('currentUser');
        //    var currentUser = JSON.parse(currentUserStr);
        //    $scope.username = currentUser.name;
        //}
    });


text:
import unfetch from 'isomorphic-unfetch';

export type ErrorInfo = {
  info: any;
  status: number;
};

export type ErrorBuilder = Error & Partial<ErrorInfo>;

/**
 * Helper for fetch which automatically returns the JSON and works both on server and client-side.
 *
 * @param input URL path or a `Request` object.
 * @param init Additional `fetch()` options
 */
export default async function fetch<TResponse = any>(
  input: RequestInfo,
  init?: RequestInit
): Promise<TResponse> {
  const res = await unfetch(input, init);

  // If the status code is not in the range 200-299, we still try to parse and throw it.
  if (!res.ok) {
    const error: ErrorBuilder = new Error('An error occured while fetching the data.');
    // Attach extra info into the error object.
    error.info = await res.json();
    error.status = res.status;
    throw error;
  }

  const data: Promise<TResponse> = await res.json();
  return data;
}


text:
\documentclass[a4paper, 12pt, finnish]{article}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{amsmath} %align
\usepackage[all]{nowidow}  % no widow/orphan lines

\usepackage{refcount}
\usepackage{lettrine}

% lettrine formatting
% https://www.lemald.org/blog/?p=108
\setlength{\DefaultNindent}{0em}
\setcounter{DefaultLines}{4}
\input Kramer.fd % AnnSton, Kramer  % Romantik.fd
\newcommand*\initfamily{\usefont{U}{Kramer}{xl}{n}}
\renewcommand{\LettrineFontHook}{\initfamily}

\newcommand{\reader}[1]{\emph{#1}}
\newcommand{\q}[1]{''#1''}

\def\mytitle{Hätätilanteessa muista sivu \pageref{intermission}}  % päivitä! pageref{intermission}

\title{\mytitle}
\author{Dresa}
\date{\today}

\def\beginning{Olet juuri alkamassa lukea Italo Calvinon uutta romaania
Jos kerran talviyönä matkamies. }

\begin{document}

\maketitle\label{titlekey}

\beginning

\reader{\q{Heh! Hetkinen, tämäpä yllätys! Mikäs tämän tarinan
nimi olikaan?} kummastelet. Tarkistat etusivulta
\pageref{titlekey}, että tarinan nimi on \mytitle,
kuten odotitkin. Aloitat lukemisen taas alusta.}

\beginning
Olet kuullut paljon tästä
kirjasta. Aina siitä lähtien, kun luit ystäväsi kehotuksesta
romaanin ensimmäisen virkkeen, olit vakuuttunut, että haluaisit
lukea loputkin.

\reader{\q{Kuulostaa hyvältä.}}

Tekstin alku pääsee yllättämään poikkeavalla näkökulmalla.
Päähenkilönä ei olekaan ihan kuka tahansa yhdentekevä
jästipää, vaan lukija itse. Jos kerran päähenkilö on valittu
näin tyylikkäästi, niin kyllähän tekstiltäkin sopii
odottaa jatkossa korkeaa tasoa.

\reader{\q{Aivan! Miksi pilata hyvää alkua?}}

Tyypilliseen malttamattomaan tapaasi selailet tekstiä eteenpäin.
Onkin melkoinen yllätys, kun sivut \pageref{emptypage1} ja \pageref{emptypage2} ovat tyhjiä!

\reader{Katsot itsekin, ja toteat, että näin on.}

Mieleesi tulee, että taitossa tai painossa on voinut käydä
jokin virhe. Joskus näille tyhjille sivuille merkitään
\q{This page [is] intentionally left blank} tai jotakin
muuta hölmöä, mutta ei tällä kertaa. Sivunumerot ovat
kuitenkin paikallaan, joten jätät asian sikseen.

Tyhjät sivut antavat sinulle aiheen selailla muitakin sivuja.
Jotkut niistä näyttävät sinusta muita houkuttelevammilta,
kuten sivu \pageref{aatelinen}. Päätät jatkaa lukemista
tuolta sivulta. Mikä ettei. Kaiken kaikkiaan lukemasi
teksti vaikuttaa
sellaiselta, että moisesta loikasta on tuskin haittaa.

\reader{Kursiivilla kirjoitettu teksti viittaa
sinuun suoremmin kuin muu teksti. Epäröit hetken,
mutta jatkat sitten lukemista sivulta \pageref{aatelinen},
kuten kehotettiin.}
\label{etusivu}

% Kaikki aiempi yhdelle ainoalle sivulle

\newpage
\mbox{}\label{weirdpage}

\dots  Vasta kolme vuotta sitten Anselmi nouti
nautansa kirkonkylältä. \dots

\dots  Eipä aikaakaan, kun Hilja juosta jolkotti Helunan
kanssa niitylle, vaikka perunavelli odotti vielä porstuassa. \dots

\dots  Pastori kehui: \q{Tällä suprajohteella saadaan
lypsyyn vauhtia.} \dots

\dots  Hiljalla oli edessään karu näky: lypsyosaston maitoprosessien laadunvarmistus oli pettänyt. Ideoiden hedelmäsato kehitysryhmän
kokouksesta oli auttamattomasti myöhässä. \dots

\dots  \q{Annetaan korkeavärähteisen elämänenergian virrata
ensin Helunan läpi, niin johan alkaa palkintosija häämöttää.} \dots

\dots  Kosminen turbulenssi ei kuitenkaan hellittänyt
Helunasta. \q{Tämä on minun syytäni},
soimi pahaa-aavistamaton lypsäjä itseään. \dots

\dots  Otsonipeite ei korjautuisi enää koskaan ennalleen.

\newpage
\mbox{}\label{intermission}
Olet vissiin niitä sivun \pageref{aatelinen} uhreja?
Harmi. Sillä sivulla on mennyt sanat vallan sekaisin
viime aikoina: lukijat eivät osaa enää suunnistaa
sieltä minnekään. Sääli.

Katsos, tarinankerronnassa kaikkien sivujen on pelattava
hyvin yhteen, jetsulleen, jotta homma pysyy kasassa. Sivulla
\pageref{aatelinen} on paha kyllä lähtenyt homma lapasesta,
eikä kokonaisuus enää toimi, kuten olet nähnyt.
Voipi olla, että samaa tapahtuu muillakin sivuilla.
Taidan olla jäävi puhumaan tästä.
Ennen oli asiat paremmin.  Valitan.

Luet eteenpäin ja odotat, että asia etenisi jollakin tavalla.

Aivan. Osaisinkohan auttaa jotenkin. Olen ollut sivun
\pageref{intermission} hätäpäivystäjänä jo hyvän aikaa,
ja sinä olet ensimmäinen lukija hyvin pitkään aikaan.
Tämä ei taida kuulua aivan suosituimpiin teksteihin, vai?
Miten edes päädyit lukemaan tätä\dots --- tai älä kerrokaan,
en halua tietää. Ristinsä kullakin.

Jos tarinan historia ja yksityiskohdat kiinnostavat,
niin sivulla \pageref{weirdpage} on lukukelvottomat
rippeet siitä, mistä tämä tarina alkujaan kertoi.
Omalla vastuulla. En osaa jeesiä tämän enempää, mutta jos
mielit kuulla enemmän,
niin Viimeisen Sivun Selitys voi valaista asiaa. Itse en
ole tajunnut siitä mitään. Filosofiaa.

\reader{\q{Hmm\dots tuo Viimeisen Sivun Selitys voisi kiinnostaa.}}

Niinkö? Sori --- kuulin tuon puolivahingossa. Mutta voin kyllä
kertoa, miten pääset Selityksen luokse. Ihan hyvyyttäni.

Jos sulla sattuu olemaan yhtään tarvetta tauolle,
niin nyt olisi sopiva hetki. Voit hyvin vetää luvallani
lonkkaa seuraavan kahden sivun \pageref{emptypage1} ja
\pageref{emptypage2} ajan, kunhan palaat takaisin sivuun
\pageref{intermissionreturn} mennessä, jossa Viimeisen
Sivun Selitys odottaa.
Kiskaise naamaasi pullakahvit, käy vessassa tai nuku kunnon
yöunet --- minulle on ihan sama. Pistä herätyskello soimaan,
ellei muuten onnistu.
Moro!

\newpage
\mbox{}\label{emptypage1}
% jätetään tyhjäksi

\newpage
\mbox{}\label{emptypage2}
% jätetään tyhjäksi

\newpage
\mbox{}\label{intermissionreturn}
Tervetuloa Viimeisen Sivun Selitykseen.
Harva pääsee tänne asti: lukulomasi ansiosta
olet nyt yhtä kokemusta rikkaampi.

Ehkä etsit vastausta siihen, miksi ja miten alkuperäinen
tarinamme on kehittynyt siihen muotoon, mitä nyt näet.
En ole aivan varma, ymmärränkö itsekään
sitä kaikkea, mutta se muutti tämän tarinan
peruuttamattomasti.

\reader{\q{Mitä tapahtui?} mietiskelin.}

Mitäkö tapahtui? Itse syytän Hegeliä. Hänen
teoriansa mukaan maailma ikään kuin keskustelee
itsensä kanssa ja kehittyy siinä sivussa.
Kehityksen huippukohta on se,
kun maailma ymmärtää oman kehityksensä mekanismit:
eräänlainen itsetietoisuus. Kun Hegel julkisti teoriansa,
maailma saavutti samalla lakipisteensä: maailma,
edustajanaan Hegel, kuvasi oman kehityksensä kulun.

Luulenpa, että tälle tekstille kävi samoin kuin Hegelin
maailmalle. Tekstistä tuli hieman liian nokkela
omaksi parhaakseen, ja lopulta kehityskulku päätyi
siihen mitä nyt luet: teksti on tietoinen itsestään
ja lukijastaan. Se on mukautuvainen kuin elävä olento.

Mikäli olen ymmärtänyt oikein, sinulla on vapaus lakata
lukemasta milloin haluat. Silloin palaat takaisin siihen
maailmaan, johon minulla ja kaltaisillani ei ole pääsyä.
Me olemme olemassa vain näillä sivuilla, ja näemme
maailmastasi vain välähdyksiä lukijan välityksellä.
Meidän todellisuutemme on näiden sivujen sisältö;
tarinamme ovat noita välähdyksiä lukijan maailmastasta.
Kiitos siitä, että luet.

\reader{\q{Miksi sivut \pageref{emptypage1} ja
\pageref{emptypage2} ovat tyhiä?} tuumailin.}

Ehkä huomasit, että tarinan jokaisella sivulla on
nykyisin oma identiteettinsä: nehän on numeroitukin
yksilöllisesti. En ole aivan varma, mitä
sivuilla \pageref{emptypage1} ja \pageref{emptypage2}
tapahtuu tätä nykyä. Tilanne muuttuu jatkuvasti,
enkä seuraa tilannetta jatkuvasti. Sinun termejäsi lainaten
voisin sanoa, että ne ovat nukkumassa. Tai jotain.

Mielenkiintoista. Huomasin vasta, että tämä sivuhan loppuu pian.
Tässähän on enää\ldots viisi riviä jäljellä! Mutta mitä
näiden rivien jälkeen löytyy? Osaatko kertoa?
Pystytkö kenties näkemään, jatkanko olemassaoloani
jollakin toisella sivulla tai peräti eri tarinassa?
Erikoista. Nyt kun aikani tällä
sivulla hupenee, mieleni valtaa outo tunne. Kuin en
haluaisi vielä mennä. Auttaisiko, jos lopettaisit
lukemisen ennen viimeistä riviä tai jatkaisit lukemista
loputtomasti --- onnistuisiko se?

\newpage
\mbox{}\label{aatelinen}
\lettrine{A}{stu} peremmälle, arvoisa sivun \pageref{etusivu} lukija.
Kuten mahdollisesti arvasit, tämän tarinan sivujen joukossa juuri
sivu \pageref{aatelinen} edustaa aatelia! Tuskin minkään muun sivun typografiaan on kiinnitetty vastaavaa huomiota. Vain tälle sivulle
on nimittäin suotu anfangi, mikä kohottaa tämän sivun muiden
yläpuolelle --- siksihän valitsit tämän sivun luettavaksi,
eikö vain?

\reader{\q{Anfangi?}}

Juuri niin, anfangi.

Tässä vaiheessa alat pitää tekstin rakennetta jokseenkin
outona. Vaikka tulen kieltämään sen sinulta myöhemmin,
saatat silti silmäillä esimerkiksi sivua \pageref{weirdpage}.
Sen sanat ovat tuttuja, mutta kokonaisuudesta on vaikea
saada otetta. No, se on sen sivun murhe.

Pohdit myös laajempaa kysymystä: mihin tämä vielä johtaa?
Tekstihän ei ole pitkä, kuten jo huomasit. Itse asiassa
se sisältää vain \pageref{lastpage} varsinaista tekstisivua.
Ensimmäisellä niistä oli tavallista vähemmän tekstiä, koska se
oli etusivu, ja kahdesta muusta sivusta jo totesit, että ne
ovat tyhjiä. Millaisen tarinan voi siis saada mahtumaan tälle
ja jäljellä oleville
\number\numexpr\getpagerefnumber{lastpage}-4\relax\
sivulle?

Kaikki odotukset, jotka asetit tälle tekstille etukäteen
tuntuvat nyt kovin turhilta, eikö totta? Et enää tiedä,
mitä odottaa. Samalla harkitset, kannattaisiko lopettaa
lukeminen: onhan luultavaa, että loppu ei poikkea siitä,
mitä alussa on tarjottu.

Tässä kappaleessa on kuitenkin lisää tekstiä, ja se houkuttelee
lukemaan itseään. Tähän on monta syytä: Nyt on sopiva
hetki lukemiselle --- luethan parhaillaankin. Toisaalta
olet jo valinnut tämän tekstin luettavaksesi, joten on
helpointa jatkaa valitulla tiellä, mitkä sitten alkuperäiset
hämärät syysi ovatkaan. Kolmanneksi, toivot salaa, että tähän
asti lukemiseen käyttämäsi aika palkitaan lopussa, jos vain
jaksat sinne asti. Neljänneksi, ja tämä on ehkä tärkein syy:
olet sivulla \pageref{aatelinen}, toisin sanoen aatelissivulla,
ja sellaiselta ei sovi poistua töykeästi kesken kaiken.

Mikä voisikaan olla suurempi kontrasti sivulle \pageref{aatelinen}
kuin sivu \pageref{weirdpage}. Tuskin haluat edes vilkaista tuolle
sivulle, sillä se edustaa tarinankerronnan rappiotilaa.
Usko pois, jo pelkkä ensivilkaisu riittäisi osoittamaan
karmivan totuuden: se on kaikkein heikoin sivu.
Tässä ei osoitella sormilla, mutta jos
jokin sivu on heikompaa ainesta, niin juuri tuo.
Kuuletkos, parempi olisi, jos jätät tuon sivun aivan
omaan arvoonsa ja jatkat ihan vain tavallisesti seuraavalle sivulle.

\reader{Huomaat, että tämä sivu on viimeinen, eikä seuraavaa löydy.
Puuttuuko tästä sittenkin sivuja? Taisit vilkaista
sivulle \pageref{weirdpage} vastoin neuvoa, mutta ei
vaikuta siltä, että sieltä löytyisi jatko-ohjeita.
Onkohan tämä se hätätilanne, josta otsikko
kertoo?
Eihän tässä ole vaihtoehtojakaan, joten seuraavaksi siis sivulle \pageref{intermission}.}
\label{lastpage}

\end{document}

Ideoita:
\begin{itemize}
\item etukäteisviittaus siansaksaa sisältävälle sivulle
\item etukäteisviittaus tyhjille sivuille
\item viittaukset sivunumeroilla
\item miten viitataan lorem ipsum -tekstiin? Tarvitaanko sitä edes?
\item jokaisella sivulla on oma tyylinsä
\item miten erotellaan lukijan ajatukset, kertoja ja sivun "hahmo"?
\end{itemize}


text:
<!DOCTYPE html>

    <meta  name="viewport" charset="UTF-8" content="width=device-width, initial-scale=1">
    <title>emotional tail</title>

    <link href="./index.css" type="text/css" rel="stylesheet" />
    <link href="https://fonts.googleapis.com/css?family=Abel|Signika+Negative:300" rel="stylesheet">

            Emotional Tail

            Tools:

                Photon, Servo Motor, Lilypad

            Teamwork:
 Xinyue Yang, Qianyu Zhu

            Technology:

            #IoT

            Challenge:

            Build a cloud connected prototype, taking 'respectful' as input and 'happy' as output.

            Our idea for the input 'respectful' is the action of 'bowing'. For the output 'happy', we thought about
            a dog, when it feels happy, it will wag its tail.
            The sensor for detecting 'bowing' is a lilypad, which will be sticked on my back. For 'wagging the tail' we used a servo motor.
            When I bow to the nature, the objects in the room will become alive and have a happy emotion because of the harmony
            between human being and nature.

        Lilypad on my back


text:
module FreshBooks
  class Expense < FreshBooks::Base
    define_schema do |s|
      s.fixnum :expense_id, :staff_id, :category_id, :project_id, :client_id
      s.float :amount, :tax1_amount, :tax1_percent, :tax2_amount, :tax2_percent
      s.date :date
      s.string :notes, :status, :tax1_name, :tax2_name
    end

    actions :list, :get, :create, :update, :delete
  end
end


text:
#pragma once

#include <deque>
#include <functional>
#include <map>
#include <memory>
#include <string>

namespace property
{
	class animate_base
	{
	public:
		animate_base() {}
		virtual ~animate_base() {}
		bool process(double t)
		{
			return handle_process(t);
		}
	private:
		virtual bool handle_process(double t) = 0;
	};
	typedef std::shared_ptr<animate_base> animate_ptr;

	template<typename T, typename D>
	class animate : public animate_base
	{
	public:
		typedef std::function<D(T t, T d)> easing_fn;
		typedef std::function<void(const D&)> mutate_fn;
		animate(easing_fn e, mutate_fn m, T duration)
			: fn_(e),
			  mutate_fn_(m),
			  duration_(duration),
			  acc_(0)
		{
		}
	private:
		bool handle_process(double t) override
		{
			acc_ += t;
			mutate_fn_(fn_(acc_, duration_));
			if(acc_ > duration_) {
				return false;
			}
			return true;
		}

		easing_fn fn_;
		mutate_fn mutate_fn_;
		T duration_;
		T acc_;
	};

	class manager
	{
	public:
		manager() {}
		void add(const std::string& qname, animate_ptr a)
		{
			queue_[qname].emplace_back(a);
		}
		void process(double t)
		{
			for(auto it = queue_.begin(); it != queue_.end(); ) {
				if(!it->second.empty()) {
					auto& a = it->second.front();
					if(!a->process(t)) {
						it->second.pop_front();
						if(it->second.empty()) {
							queue_.erase(it++);
						} else {
							++it;
						}
					} else {
						++it;
					}
				} else {
					queue_.erase(it++);
				}
			}
		}
	private:
		std::map<std::string, std::deque<animate_ptr>> queue_;
	};
}


text:
using System;
using OTA;
using OTA.Command;
using OTA.Logging;
using Terraria;

namespace TDSM.Core.Command.Commands
{
    public class SayCommand : CoreCommand
    {
        public override void Initialise()
        {
            AddCommand("say")
                .WithAccessLevel(AccessLevel.OP)
                .WithDescription("Say a message from the server")
                .WithHelpText("<message>")
                .WithPermissionNode("tdsm.say")
                .Calls(this.Say);
        }

        /// <summary>
        /// Sends a Server Message to all online Players.
        /// </summary>
        /// <param name="sender">Sending player</param>
        /// <param name="message">Message to send</param>
        public void Say(ISender sender, string message)
        {
            /*ProgramLog.Log("<" + sender.SenderName + "> " + message);
            if (sender is Player)
                NewNetMessage.SendData(25, -1, -1, "<" + sender.SenderName + "> " + message, 255, 255, 255, 255);
            else
                NewNetMessage.SendData(25, -1, -1, "<" + sender.SenderName + "> " + message, 255, 238, 180, 238);*/

            // 'Say' should be used for Server Messages, OP's only. This is used on many large servers to notify
            // Users for a quick restart (example), So the OP will most likely be in game, unless it's major.

            if (!String.IsNullOrEmpty(message))
            {
                ProgramLog.Log("<" + sender.SenderName + "> " + ((sender is ConsoleSender) ? String.Empty : "SERVER: ") + message);
                NetMessage.SendData(25, -1, -1, "SERVER: " + message, 255, 238, 130, 238);
            }
            else
            {
                sender.SendMessage("Expected message");
            }
        }
    }
}


text:
package com.onespatial.dwglib.objects;

import com.onespatial.dwglib.FileVersion;
import com.onespatial.dwglib.bitstreams.BitBuffer;
import com.onespatial.dwglib.bitstreams.CmColor;
import com.onespatial.dwglib.bitstreams.Handle;
import com.onespatial.dwglib.bitstreams.Point3D;

public class MText extends EntityObject {

    public Point3D insertionPoint;
    public Point3D extrusion;
    public Point3D xAxisDir;
    public double rectWidth;
    public double rectHeight;
    public double textHeight;
    public int attachment;
    public int drawingDir;
    public double extents;
    public double extentsWid;
    public String text;
    public int linespacingStyle;
    public double linespacingFactor;
    public boolean unknownBit;
    public double backgroundScaleFactor;
    public CmColor backgroundColor;
    public int backgroundTransparency;
    private Handle styleHandle;

    public MText(ObjectMap objectMap) {
        super(objectMap);
    }

    @Override
    public void readObjectTypeSpecificData(BitBuffer dataStream, BitBuffer stringStream, BitBuffer handleStream, FileVersion fileVersion) {
        // 19.4.44 MTEXT (44) page 146

        insertionPoint = dataStream.get3BD();
        extrusion = dataStream.get3BD();
        xAxisDir = dataStream.get3BD();
        rectWidth = dataStream.getBD();
        rectHeight = dataStream.getBD();
        textHeight = dataStream.getBD();
        attachment = dataStream.getBS();
        drawingDir = dataStream.getBS();
        extents = dataStream.getBD();
        extentsWid = dataStream.getBD();
        text = stringStream.getTU();
        linespacingStyle = dataStream.getBS();
        linespacingFactor = dataStream.getBD();
        unknownBit = dataStream.getB();
        int backgroundFlags = dataStream.getBL();

        if (backgroundFlags == 1) {
            backgroundScaleFactor = dataStream.getBD();
            backgroundColor = dataStream.getCMC();
            backgroundTransparency = dataStream.getBL();
        } else {
            backgroundScaleFactor = 1.5;
        }

        // The Handles

        styleHandle = handleStream.getHandle();

        handleStream.advanceToByteBoundary();

        dataStream.assertEndOfStream();
        stringStream.assertEndOfStream();
        handleStream.assertEndOfStream();
    }

    public String toString() {
        return "MTEXT";
    }

    public CadObject getStyle() {
        CadObject result = objectMap.parseObject(styleHandle);
        return (CadObject) result;
    }

}


text:
package net.tinyos.mcenter;

import net.tinyos.mcenter.treeTable.*;

import java.util.prefs.*;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;
import org.jdom.Document;

/**
 * Dialog to provide the functionality of saving the configuration of the applications
 * in the MessageCenter. It Creates a single XML file from the configurations selected
 * on dialog. The dialog is also capable to load a saved XML file completely or only
 * parts of it
 * @author  Andras Nadas
 */
public class DatabaseConfigDialog extends javax.swing.JDialog {

    protected static boolean standalone = false;

    private PreferenceModel localModel;
    private javax.swing.JTable localTable;

    private XmlPreferenceModel importModel = null;
    private javax.swing.JTable importTable;
    /** Creates new form DatabaseConfigDialog */
    public DatabaseConfigDialog(java.awt.Frame parent, boolean modal) {
        super(parent, "Database Configuration", modal);
        /*try{
            localModel = new PreferenceModel(Class.forName("isis.nest.messageCenter.CenterFrame"));
        }catch(java.lang.ClassNotFoundException cnfe){
            System.err.println("Class not Found");
            localModel = new PreferenceModel();
        }*/

        localModel = new PreferenceModel();

        localTable = new JTreeTable(localModel);
        localModel.setTreeTable((JTreeTable)localTable);
        initComponents();
        localTableScrollPane.setViewportView(localTable);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    private void initComponents() {//GEN-BEGIN:initComponents
        java.awt.GridBagConstraints gridBagConstraints;

        jTabbedPane1 = new javax.swing.JTabbedPane();
        localDataPanel = new javax.swing.JPanel();
        localTableScrollPane = new javax.swing.JScrollPane();
        localControlPanel = new javax.swing.JPanel();
        exportButton = new javax.swing.JButton();
        reloadButton = new javax.swing.JButton();
        importDataPanel = new javax.swing.JPanel();
        importTableScrollPane = new javax.swing.JScrollPane();
        importControlPanel = new javax.swing.JPanel();
        openButton = new javax.swing.JButton();
        importButton = new javax.swing.JButton();
        closeButton = new javax.swing.JButton();

        getContentPane().setLayout(new java.awt.GridBagLayout());

        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                closeDialog(evt);
            }
        });

        localDataPanel.setLayout(new java.awt.GridBagLayout());

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        localDataPanel.add(localTableScrollPane, gridBagConstraints);

        localControlPanel.setLayout(new java.awt.GridBagLayout());

        exportButton.setText("Export Selection ...");
        exportButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exportButtonActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 24);
        localControlPanel.add(exportButton, gridBagConstraints);

        reloadButton.setText("Reload DB");
        reloadButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                reloadButtonActionPerformed(evt);
            }
        });

        localControlPanel.add(reloadButton, new java.awt.GridBagConstraints());

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weighty = 0.1;
        localDataPanel.add(localControlPanel, gridBagConstraints);

        jTabbedPane1.addTab("Local Database", localDataPanel);

        importDataPanel.setLayout(new java.awt.GridBagLayout());

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        importDataPanel.add(importTableScrollPane, gridBagConstraints);

        importControlPanel.setLayout(new java.awt.GridBagLayout());

        openButton.setText("Open ...");
        openButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                openButtonActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 24);
        importControlPanel.add(openButton, gridBagConstraints);

        importButton.setText("Import Selection");
        importButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                importButtonActionPerformed(evt);
            }
        });

        importControlPanel.add(importButton, new java.awt.GridBagConstraints());

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 0.1;
        importDataPanel.add(importControlPanel, gridBagConstraints);

        jTabbedPane1.addTab("Import Database", importDataPanel);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        getContentPane().add(jTabbedPane1, gridBagConstraints);

        closeButton.setText("Close");
        closeButton.setAlignmentY(0.9F);
        closeButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closeButtonActionPerformed(evt);
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(6, 0, 6, 5);
        getContentPane().add(closeButton, gridBagConstraints);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-400)/2, (screenSize.height-300)/2, 400, 300);
    }//GEN-END:initComponents

    private void reloadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_reloadButtonActionPerformed
        /*try{
            localModel = new PreferenceModel(Class.forName("isis.nest.messageCenter.CenterFrame"));
        }catch(java.lang.ClassNotFoundException cnfe){
            System.err.println("Class not Found");
            localModel = new PreferenceModel();
        }*/
        localModel = new PreferenceModel();
        localTable = new JTreeTable(localModel);
        localModel.setTreeTable((JTreeTable)localTable);
        localTableScrollPane.setViewportView(localTable);
    }//GEN-LAST:event_reloadButtonActionPerformed

    private void importButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_importButtonActionPerformed
        //try{
            if(importModel != null)
                ((XmlPreferenceModel)importModel).importSelection( Preferences.userRoot());
        /*}catch(java.lang.ClassNotFoundException cnfe){
            System.err.println("Class not Found");
        }*/

    }//GEN-LAST:event_importButtonActionPerformed

    private void openButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openButtonActionPerformed
        javax.swing.JFileChooser chooser = new javax.swing.JFileChooser();
        chooser.setDialogTitle("Open..");
        javax.swing.filechooser.FileFilter filter = new javax.swing.filechooser.FileFilter(){
            public boolean accept(java.io.File f){
                if(f.isDirectory())
                    return true;
                String ext = getExtension(f);
                if(ext != null)
                    return ext.equalsIgnoreCase("xml");
                else
                    return false;
            }

            public String getDescription(){
                return ".XML files";
            }

        };

        chooser.setFileFilter(filter);
        java.io.File selectedFile = null;
        int returnVal = chooser.showOpenDialog(this);
        if(returnVal == javax.swing.JFileChooser.APPROVE_OPTION) {

            selectedFile = chooser.getSelectedFile();
            if (selectedFile ==null)
                return;

            if(!getExtension(selectedFile).equalsIgnoreCase("xml")){
                System.out.println("Cannot import choosen file: " +selectedFile.getName());
                return;
            }
            try{

                SAXBuilder builder = new SAXBuilder();
                Document doc = builder.build(selectedFile);
                // If there are no well-formedness errors,
                // then no exception is thrown
                importModel = new XmlPreferenceModel(doc);
                importTable = new JTreeTable(importModel);
                importModel.setTreeTable((JTreeTable)importTable);
                importTableScrollPane.setViewportView(importTable);

            }
            // indicates a well-formedness error
            catch (JDOMException e) {
                System.out.println(selectedFile + " is not well-formed.");
                System.out.println(e.getMessage());
            }catch( java.io.FileNotFoundException fnfe){
                System.err.println("Cannot open file: "+selectedFile.getAbsolutePath());

            }catch( java.io.IOException ioe){
                System.err.println("Cannot read file: "+selectedFile.getAbsolutePath());
                System.out.println("Could not check " + selectedFile+ " because " + ioe.getMessage());
            }

        }
    }//GEN-LAST:event_openButtonActionPerformed

    private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed
        closeDialog(null);
    }//GEN-LAST:event_closeButtonActionPerformed

    private void exportButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exportButtonActionPerformed
        javax.swing.JFileChooser chooser = new javax.swing.JFileChooser();
        chooser.setDialogTitle("Save to..");
        javax.swing.filechooser.FileFilter filter = new javax.swing.filechooser.FileFilter(){
            public boolean accept(java.io.File f){
                if(f.isDirectory())
                    return true;
                String ext = getExtension(f);
                if(ext != null)
                    return ext.equalsIgnoreCase("xml");
                else
                    return false;
            }

            public String getDescription(){
                return ".XML files";
            }

        };

        chooser.setFileFilter(filter);
        java.io.File selectedFile = null;
        int returnVal = chooser.showSaveDialog(this);
        if(returnVal == javax.swing.JFileChooser.APPROVE_OPTION) {

            selectedFile = chooser.getSelectedFile();
            if (selectedFile ==null)
                return;

            if(!getExtension(selectedFile).equalsIgnoreCase("xml"))
                selectedFile = new java.io.File(selectedFile.getParent(),selectedFile.getName()+".xml");

            System.out.println("You've choosen to save into this file: " +selectedFile.getName());

            try{
                localModel.exportSelection(new java.io.FileOutputStream(selectedFile));
            }catch( java.io.FileNotFoundException fnfe){
                System.err.println("Cannot open file: "+selectedFile.getAbsolutePath());

            }
        }
    }//GEN-LAST:event_exportButtonActionPerformed

    /** Closes the dialog */
    private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
        if(standalone){
            System.exit(1);
        }else{
            setVisible(false);
            dispose();
        }
    }//GEN-LAST:event_closeDialog

    /**
     * Main function for testing.
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        DatabaseConfigDialog dialog = new DatabaseConfigDialog(new javax.swing.JFrame(), true);
        dialog.show();
        DatabaseConfigDialog.standalone = true;
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton closeButton;
    private javax.swing.JButton exportButton;
    private javax.swing.JButton importButton;
    private javax.swing.JPanel importControlPanel;
    private javax.swing.JPanel importDataPanel;
    private javax.swing.JScrollPane importTableScrollPane;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JPanel localControlPanel;
    private javax.swing.JPanel localDataPanel;
    private javax.swing.JScrollPane localTableScrollPane;
    private javax.swing.JButton openButton;
    private javax.swing.JButton reloadButton;
    // End of variables declaration//GEN-END:variables

        /*
         * Get the extension of a file.
         */
    private static String getExtension(java.io.File f) {
        String ext = null;
        String s = f.getName();
        int i = s.lastIndexOf('.');

        if(i == -1)
            return "";

        if (i > 0 &&  i < s.length() - 1) {
            ext = s.substring(i+1).toLowerCase();
        }
        return ext;
    }

}


text:
package com.asayama.rps.simulator;

public interface Engine {

	int fight(Judge judge, Strategy... players);
}


text:
<?php
declare(strict_types = 1);

namespace BlockHorizons\BlockPets\pets\creatures;

use BlockHorizons\BlockPets\pets\HoveringPet;
use pocketmine\network\mcpe\protocol\types\entity\EntityIds;

class EnderDragonPet extends HoveringPet {

	const NETWORK_NAME = "ENDER_DRAGON_PET";
	const NETWORK_ORIG_ID = EntityIds::ENDER_DRAGON;

	protected string $name = "Ender Dragon Pet";

	protected float $width = 2.5;
	protected float $height = 3;
}


text:
<?php
require_once "vendor/autoload.php";

use Lorenum\ScriptCheck\ScriptCheck;
use Lorenum\ScriptCheck\Handlers\EmailHandler;

$sc = new ScriptCheck();
$sc->addHandler(new \Lorenum\ScriptCheck\Handlers\FileLoggerHandler("log.log"));
$sc->addHandler(new EmailHandler("myemail@provider.com", "your script got fucked!")); #the error will also be emailed to you
$sc->register();

throw new Exception("Test Exception");


text: > this is test, Polymer 1.0 based static portfolio app


text:
namespace FallbackLayer
{
    class BVHTraversalShaderBuilder : public ITraversalShaderBuilder
    {
    public:
        BVHTraversalShaderBuilder(DxilShaderPatcher &dxilShaderPatcher) : m_DxilShaderPatcher(dxilShaderPatcher) {}

        void Compile(_In_ bool IsAnyHitOrIntersectionUsed, _Out_ TraversalShader &traversalShader);

    private:
        DxilShaderPatcher &m_DxilShaderPatcher;
    };
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Hyménomyc. de France (Sceaux) 288 (1928)

#### Original name
Peniophora cretacea subsp. cretacea Romell ex Bourdot & Galzin

### Remarks
null


text:
package docker

import (
	"sort"

	"github.com/docker/docker/api/types/swarm"
)

//Allowed sort methods
const (
	NoSortService SortMode = iota
	SortByServiceName
	SortByServiceImage
)

type swarmServices []swarm.Service

func (s swarmServices) Len() int      { return len(s) }
func (s swarmServices) Swap(i, j int) { s[i], s[j] = s[j], s[i] }

type servicesByName struct{ swarmServices }

func (s servicesByName) Less(i, j int) bool {

	return s.swarmServices[i].Spec.Name < s.swarmServices[j].Spec.Name
}

type servicesByImage struct{ swarmServices }

func (s servicesByImage) Less(i, j int) bool {
	return s.swarmServices[i].Spec.TaskTemplate.ContainerSpec.Image < s.swarmServices[j].Spec.TaskTemplate.ContainerSpec.Image
}

//SortServices sorts the given service slice using the given mode
func SortServices(services []swarm.Service, mode SortMode) {
	switch mode {
	case SortByServiceName:
		sort.SliceStable(servicesByName{services}.swarmServices, servicesByName{services}.Less)
	case SortByServiceImage:
		sort.SliceStable(servicesByImage{services}.swarmServices, servicesByImage{services}.Less)

	}

}


text:
/*
 * $Id: UnicodeExample.java 3373 2008-05-12 16:21:24Z xlv $
 *
 * This code is part of the 'iText Tutorial'.
 * You can find the complete tutorial at the following address:
 * http://itextdocs.lowagie.com/tutorial/
 *
 * This code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * itext-questions@lists.sourceforge.net
 */
package com.lowagie.examples.fonts;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;

import com.example.pdftest.PdfTestRunner;
import com.example.pdftest.R;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Font;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.BaseFont;
import com.lowagie.text.pdf.PdfWriter;

/**
 * Embedding True Type fonts.
 */
public class UnicodeExample {

	/**
	 * Embedding True Type Fonts.
	 *
	 * @param args
	 *            no arguments needed
	 */
	public static void main(String[] args) {

		System.out.println("True Types (embedded)");

		// step 1: creation of a document-object
		Document document = new Document();

		try {

			// step 2: creation of the writer-object
			PdfWriter.getInstance(document, new FileOutputStream(android.os.Environment.getExternalStorageDirectory() + java.io.File.separator + "droidtext" + java.io.File.separator + "unicode.pdf"));

			// step 3: we open the document
			document.open();

			// step 4: we add content to the document
			//Don't use path read ttf into byte[] instead
//			BaseFont bfComic = BaseFont.createFont("c:\\windows\\fonts\\comic.ttf", BaseFont.IDENTITY_H,
//					BaseFont.EMBEDDED);
			InputStream inputStream = PdfTestRunner.getActivity().getResources().openRawResource(R.raw.freesans);
			byte[] buffer = new byte[inputStream.available()];
			inputStream.read(buffer);
			BaseFont bfComic = BaseFont.createFont("freeserif.ttf", BaseFont.IDENTITY_H, true, false, buffer, null);
			Font font = new Font(bfComic, 12);
			String text1 = "This is the quite popular True Type font 'Comic'.";
			String text2 = "Some greek characters: \u0393\u0394\u03b6";
			String text3 = "Some cyrillic characters: \u0418\u044f";
			document.add(new Paragraph(text1, font));
			document.add(new Paragraph(text2, font));
			document.add(new Paragraph(text3, font));
		} catch (DocumentException de) {
			System.err.println(de.getMessage());
		} catch (IOException ioe) {
			System.err.println(ioe.getMessage());
		}

		// step 5: we close the document
		document.close();
	}
}


text:
/*! \file type_traits.h
 *  \brief Temporarily define some type traits
 *         until nvcc can compile tr1::type_traits.
 */

#pragma once

#include <thrust/detail/config.h>

#if THRUST_CPP_DIALECT >= 2011
#  include <type_traits>
#endif

namespace thrust
{

// forward declaration of device_reference
template<typename T> class device_reference;

namespace detail
{
 /// helper classes [4.3].
 template<typename T, T v>
   struct integral_constant
   {
     THRUST_INLINE_INTEGRAL_MEMBER_CONSTANT T value = v;

     typedef T                       value_type;
     typedef integral_constant<T, v> type;

     // We don't want to switch to std::integral_constant, because we want access
     // to the C++14 operator(), but we'd like standard traits to interoperate
     // with our version when tag dispatching.
     #if THRUST_CPP_DIALECT >= 2011
     integral_constant() = default;

     integral_constant(integral_constant const&) = default;

     integral_constant& operator=(integral_constant const&) = default;

     constexpr __host__ __device__
     integral_constant(std::integral_constant<T, v>) noexcept {}
     #endif

     THRUST_CONSTEXPR __host__ __device__ operator value_type() const THRUST_NOEXCEPT { return value; }
     THRUST_CONSTEXPR __host__ __device__ value_type operator()() const THRUST_NOEXCEPT { return value; }
   };

 /// typedef for true_type
 typedef integral_constant<bool, true>  true_type;

 /// typedef for true_type
 typedef integral_constant<bool, false> false_type;

//template<typename T> struct is_integral : public std::tr1::is_integral<T> {};
template<typename T> struct is_integral                           : public false_type {};
template<>           struct is_integral<bool>                     : public true_type {};
template<>           struct is_integral<char>                     : public true_type {};
template<>           struct is_integral<signed char>              : public true_type {};
template<>           struct is_integral<unsigned char>            : public true_type {};
template<>           struct is_integral<short>                    : public true_type {};
template<>           struct is_integral<unsigned short>           : public true_type {};
template<>           struct is_integral<int>                      : public true_type {};
template<>           struct is_integral<unsigned int>             : public true_type {};
template<>           struct is_integral<long>                     : public true_type {};
template<>           struct is_integral<unsigned long>            : public true_type {};
template<>           struct is_integral<long long>                : public true_type {};
template<>           struct is_integral<unsigned long long>       : public true_type {};
template<>           struct is_integral<const bool>               : public true_type {};
template<>           struct is_integral<const char>               : public true_type {};
template<>           struct is_integral<const unsigned char>      : public true_type {};
template<>           struct is_integral<const short>              : public true_type {};
template<>           struct is_integral<const unsigned short>     : public true_type {};
template<>           struct is_integral<const int>                : public true_type {};
template<>           struct is_integral<const unsigned int>       : public true_type {};
template<>           struct is_integral<const long>               : public true_type {};
template<>           struct is_integral<const unsigned long>      : public true_type {};
template<>           struct is_integral<const long long>          : public true_type {};
template<>           struct is_integral<const unsigned long long> : public true_type {};

template<typename T> struct is_floating_point              : public false_type {};
template<>           struct is_floating_point<float>       : public true_type {};
template<>           struct is_floating_point<double>      : public true_type {};
template<>           struct is_floating_point<long double> : public true_type {};

template<typename T> struct is_arithmetic               : public is_integral<T> {};
template<>           struct is_arithmetic<float>        : public true_type {};
template<>           struct is_arithmetic<double>       : public true_type {};
template<>           struct is_arithmetic<const float>  : public true_type {};
template<>           struct is_arithmetic<const double> : public true_type {};

template<typename T> struct is_pointer      : public false_type {};
template<typename T> struct is_pointer<T *> : public true_type  {};

template<typename T> struct is_device_ptr  : public false_type {};

template<typename T> struct is_void             : public false_type {};
template<>           struct is_void<void>       : public true_type {};
template<>           struct is_void<const void> : public true_type {};

template<typename T> struct is_non_bool_integral       : public is_integral<T> {};
template<>           struct is_non_bool_integral<bool> : public false_type {};

template<typename T> struct is_non_bool_arithmetic       : public is_arithmetic<T> {};
template<>           struct is_non_bool_arithmetic<bool> : public false_type {};

template<typename T> struct is_pod
   : public integral_constant<
       bool,
       is_void<T>::value || is_pointer<T>::value || is_arithmetic<T>::value
#if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC || \
    THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG
// use intrinsic type traits
       || __is_pod(T)
#elif THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC
// only use the intrinsic for >= 4.3
#if (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
       || __is_pod(T)
#endif // GCC VERSION
#endif // THRUST_HOST_COMPILER
     >
 {};

template<typename T> struct has_trivial_constructor
  : public integral_constant<
      bool,
      is_pod<T>::value
#if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC || \
    THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG
      || __has_trivial_constructor(T)
#elif THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC
// only use the intrinsic for >= 4.3
#if (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
      || __has_trivial_constructor(T)
#endif // GCC VERSION
#endif // THRUST_HOST_COMPILER
      >
{};

template<typename T> struct has_trivial_copy_constructor
  : public integral_constant<
      bool,
      is_pod<T>::value
#if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC || \
    THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG
      || __has_trivial_copy(T)
#elif THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC
// only use the intrinsic for >= 4.3
#if (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
      || __has_trivial_copy(T)
#endif // GCC VERSION
#endif // THRUST_HOST_COMPILER
    >
{};

template<typename T> struct has_trivial_destructor : public is_pod<T> {};

template<typename T> struct is_const          : public false_type {};
template<typename T> struct is_const<const T> : public true_type {};

template<typename T> struct is_volatile             : public false_type {};
template<typename T> struct is_volatile<volatile T> : public true_type {};

template<typename T>
  struct add_const
{
  typedef T const type;
}; // end add_const

template<typename T>
  struct remove_const
{
  typedef T type;
}; // end remove_const

template<typename T>
  struct remove_const<const T>
{
  typedef T type;
}; // end remove_const

template<typename T>
  struct add_volatile
{
  typedef volatile T type;
}; // end add_volatile

template<typename T>
  struct remove_volatile
{
  typedef T type;
}; // end remove_volatile

template<typename T>
  struct remove_volatile<volatile T>
{
  typedef T type;
}; // end remove_volatile

template<typename T>
  struct add_cv
{
  typedef const volatile T type;
}; // end add_cv

template<typename T>
  struct remove_cv
{
  typedef typename remove_const<typename remove_volatile<T>::type>::type type;
}; // end remove_cv

template<typename T> struct is_reference     : public false_type {};
template<typename T> struct is_reference<T&> : public true_type {};

template<typename T> struct is_proxy_reference  : public false_type {};

template<typename T> struct is_device_reference                                : public false_type {};
template<typename T> struct is_device_reference< thrust::device_reference<T> > : public true_type {};

// NB: Careful with reference to void.
template<typename _Tp, bool = (is_void<_Tp>::value || is_reference<_Tp>::value)>
  struct __add_reference_helper
  { typedef _Tp&    type; };

template<typename _Tp>
  struct __add_reference_helper<_Tp, true>
  { typedef _Tp     type; };

template<typename _Tp>
  struct add_reference
    : public __add_reference_helper<_Tp>{};

template<typename T>
  struct remove_reference
{
  typedef T type;
}; // end remove_reference

template<typename T>
  struct remove_reference<T&>
{
  typedef T type;
}; // end remove_reference

template<typename T1, typename T2>
  struct is_same
    : public false_type
{
}; // end is_same

template<typename T>
  struct is_same<T,T>
    : public true_type
{
}; // end is_same

template<typename T1, typename T2>
  struct lazy_is_same
    : is_same<typename T1::type, typename T2::type>
{
}; // end lazy_is_same

template<typename T1, typename T2>
  struct is_different
    : public true_type
{
}; // end is_different

template<typename T>
  struct is_different<T,T>
    : public false_type
{
}; // end is_different

template<typename T1, typename T2>
  struct lazy_is_different
    : is_different<typename T1::type, typename T2::type>
{
}; // end lazy_is_different

#if THRUST_CPP_DIALECT >= 2011

using std::is_convertible;

#else

namespace tt_detail
{

template<typename T>
  struct is_int_or_cref
{
  typedef typename remove_reference<T>::type type_sans_ref;
  static const bool value = (is_integral<T>::value
                             || (is_integral<type_sans_ref>::value
                                 && is_const<type_sans_ref>::value
                                 && !is_volatile<type_sans_ref>::value));
}; // end is_int_or_cref

THRUST_DISABLE_MSVC_POSSIBLE_LOSS_OF_DATA_WARNING_BEGIN
THRUST_DISABLE_MSVC_FORCING_VALUE_TO_BOOL_WARNING_BEGIN

template<typename From, typename To>
  struct is_convertible_sfinae
{
  private:
    typedef char                          yes;
    typedef struct { char two_chars[2]; } no;

    static inline yes   test(To) { return yes(); }
    static inline no    test(...) { return no(); }
    static inline typename remove_reference<From>::type& from() { typename remove_reference<From>::type* ptr = 0; return *ptr; }

  public:
    static const bool value = sizeof(test(from())) == sizeof(yes);
}; // end is_convertible_sfinae

THRUST_DISABLE_MSVC_FORCING_VALUE_TO_BOOL_WARNING_END
THRUST_DISABLE_MSVC_POSSIBLE_LOSS_OF_DATA_WARNING_END

template<typename From, typename To>
  struct is_convertible_needs_simple_test
{
  static const bool from_is_void      = is_void<From>::value;
  static const bool to_is_void        = is_void<To>::value;
  static const bool from_is_float     = is_floating_point<typename remove_reference<From>::type>::value;
  static const bool to_is_int_or_cref = is_int_or_cref<To>::value;

  static const bool value = (from_is_void || to_is_void || (from_is_float && to_is_int_or_cref));
}; // end is_convertible_needs_simple_test

template<typename From, typename To,
         bool = is_convertible_needs_simple_test<From,To>::value>
  struct is_convertible
{
  static const bool value = (is_void<To>::value
                             || (is_int_or_cref<To>::value
                                 && !is_void<From>::value));
}; // end is_convertible

template<typename From, typename To>
  struct is_convertible<From, To, false>
{
  static const bool value = (is_convertible_sfinae<typename
                             add_reference<From>::type, To>::value);
}; // end is_convertible

} // end tt_detail

template<typename From, typename To>
  struct is_convertible
    : public integral_constant<bool, tt_detail::is_convertible<From, To>::value>
{
}; // end is_convertible

#endif

template<typename T1, typename T2>
  struct is_one_convertible_to_the_other
    : public integral_constant<
        bool,
        is_convertible<T1,T2>::value || is_convertible<T2,T1>::value
      >
{};

// mpl stuff

template <typename Condition1,               typename Condition2,              typename Condition3 = false_type,
          typename Condition4  = false_type, typename Condition5 = false_type, typename Condition6 = false_type,
          typename Condition7  = false_type, typename Condition8 = false_type, typename Condition9 = false_type,
          typename Condition10 = false_type>
  struct or_
    : public integral_constant<
        bool,
        Condition1::value || Condition2::value || Condition3::value || Condition4::value || Condition5::value || Condition6::value || Condition7::value || Condition8::value || Condition9::value || Condition10::value
      >
{
}; // end or_

template <typename Condition1, typename Condition2, typename Condition3 = true_type>
  struct and_
    : public integral_constant<bool, Condition1::value && Condition2::value && Condition3::value>
{
}; // end and_

template <typename Boolean>
  struct not_
    : public integral_constant<bool, !Boolean::value>
{
}; // end not_

template<bool B, class T, class F>
struct conditional { typedef T type; };

template<class T, class F>
struct conditional<false, T, F> { typedef F type; };

template <bool, typename Then, typename Else>
  struct eval_if
{
}; // end eval_if

template<typename Then, typename Else>
  struct eval_if<true, Then, Else>
{
  typedef typename Then::type type;
}; // end eval_if

template<typename Then, typename Else>
  struct eval_if<false, Then, Else>
{
  typedef typename Else::type type;
}; // end eval_if

template<typename T>
//  struct identity
//  XXX WAR nvcc's confusion with thrust::identity
  struct identity_
{
  typedef T type;
}; // end identity

template<bool, typename T = void> struct enable_if {};
template<typename T>              struct enable_if<true, T> {typedef T type;};

template<bool, typename T> struct lazy_enable_if {};
template<typename T>       struct lazy_enable_if<true, T> {typedef typename T::type type;};

template<bool condition, typename T = void> struct disable_if : enable_if<!condition, T> {};
template<bool condition, typename T>        struct lazy_disable_if : lazy_enable_if<!condition, T> {};

template<typename T1, typename T2, typename T = void>
  struct enable_if_convertible
    : enable_if< is_convertible<T1,T2>::value, T >
{};

template<typename T1, typename T2, typename T = void>
  struct disable_if_convertible
    : disable_if< is_convertible<T1,T2>::value, T >
{};

template<typename T1, typename T2, typename Result = void>
  struct enable_if_different
    : enable_if<is_different<T1,T2>::value, Result>
{};

template<typename T>
  struct is_numeric
    : and_<
        is_convertible<int,T>,
        is_convertible<T,int>
      >
{
}; // end is_numeric

template<typename> struct is_reference_to_const             : false_type {};
template<typename T> struct is_reference_to_const<const T&> : true_type {};

// make_unsigned follows

namespace tt_detail
{

template<typename T> struct make_unsigned_simple;

template<> struct make_unsigned_simple<char>                   { typedef unsigned char          type; };
template<> struct make_unsigned_simple<signed char>            { typedef unsigned char          type; };
template<> struct make_unsigned_simple<unsigned char>          { typedef unsigned char          type; };
template<> struct make_unsigned_simple<short>                  { typedef unsigned short         type; };
template<> struct make_unsigned_simple<unsigned short>         { typedef unsigned short         type; };
template<> struct make_unsigned_simple<int>                    { typedef unsigned int           type; };
template<> struct make_unsigned_simple<unsigned int>           { typedef unsigned int           type; };
template<> struct make_unsigned_simple<long int>               { typedef unsigned long int      type; };
template<> struct make_unsigned_simple<unsigned long int>      { typedef unsigned long int      type; };
template<> struct make_unsigned_simple<long long int>          { typedef unsigned long long int type; };
template<> struct make_unsigned_simple<unsigned long long int> { typedef unsigned long long int type; };

template<typename T>
  struct make_unsigned_base
{
  // remove cv
  typedef typename remove_cv<T>::type remove_cv_t;

  // get the simple unsigned type
  typedef typename make_unsigned_simple<remove_cv_t>::type unsigned_remove_cv_t;

  // add back const, volatile, both, or neither to the simple result
  typedef typename eval_if<
    is_const<T>::value && is_volatile<T>::value,
    // add cv back
    add_cv<unsigned_remove_cv_t>,
    // check const & volatile individually
    eval_if<
      is_const<T>::value,
      // add c back
      add_const<unsigned_remove_cv_t>,
      eval_if<
        is_volatile<T>::value,
        // add v back
        add_volatile<unsigned_remove_cv_t>,
        // original type was neither cv, return the simple unsigned result
        identity_<unsigned_remove_cv_t>
      >
    >
  >::type type;
};

} // end tt_detail

template<typename T>
  struct make_unsigned
    : tt_detail::make_unsigned_base<T>
{};

struct largest_available_float
{
#if defined(__CUDA_ARCH__)
#  if (__CUDA_ARCH__ < 130)
  typedef float type;
#  else
  typedef double type;
#  endif
#else
  typedef double type;
#endif
};

// T1 wins if they are both the same size
template<typename T1, typename T2>
  struct larger_type
    : thrust::detail::eval_if<
        (sizeof(T2) > sizeof(T1)),
        thrust::detail::identity_<T2>,
        thrust::detail::identity_<T1>
      >
{};

#if THRUST_CPP_DIALECT >= 2011

using std::is_base_of;

#else

namespace is_base_of_ns
{

typedef char                          yes;
typedef struct { char two_chars[2]; } no;

template<typename Base, typename Derived>
  struct host
{
  operator Base*() const;
  operator Derived*();
}; // end host

template<typename Base, typename Derived>
  struct impl
{
  template<typename T> static yes check(Derived *, T);
  static no check(Base*, int);

  static const bool value = sizeof(check(host<Base,Derived>(), int())) == sizeof(yes);
}; // end impl

} // end is_base_of_ns

template<typename Base, typename Derived>
  struct is_base_of
    : integral_constant<
        bool,
        is_base_of_ns::impl<Base,Derived>::value
      >
{};

#endif

template<typename Base, typename Derived, typename Result = void>
  struct enable_if_base_of
    : enable_if<
        is_base_of<Base,Derived>::value,
        Result
      >
{};

namespace is_assignable_ns
{

template<typename T1, typename T2>
  class is_assignable
{
  typedef char                      yes_type;
  typedef struct { char array[2]; } no_type;

  template<typename T> static typename add_reference<T>::type declval();

  template<unsigned int> struct helper { typedef void * type; };

  template<typename U1, typename U2> static yes_type test(typename helper<sizeof(declval<U1>() = declval<U2>())>::type);

  template<typename,typename> static no_type test(...);

  public:
    static const bool value = sizeof(test<T1,T2>(0)) == 1;
}; // end is_assignable

} // end is_assignable_ns

template<typename T1, typename T2>
  struct is_assignable
    : integral_constant<
        bool,
        is_assignable_ns::is_assignable<T1,T2>::value
      >
{};

template<typename T>
  struct is_copy_assignable
    : is_assignable<
        typename add_reference<T>::type,
        typename add_reference<typename add_const<T>::type>::type
      >
{};

template<typename T1, typename T2, typename Enable = void> struct promoted_numerical_type;

template<typename T1, typename T2>
  struct promoted_numerical_type<T1,T2,typename enable_if<and_
  <typename is_floating_point<T1>::type,typename is_floating_point<T2>::type>
  ::value>::type>
  {
  typedef typename larger_type<T1,T2>::type type;
  };

template<typename T1, typename T2>
  struct promoted_numerical_type<T1,T2,typename enable_if<and_
  <typename is_integral<T1>::type,typename is_floating_point<T2>::type>
  ::value>::type>
  {
  typedef T2 type;
  };

template<typename T1, typename T2>
  struct promoted_numerical_type<T1,T2,typename enable_if<and_
  <typename is_floating_point<T1>::type, typename is_integral<T2>::type>
  ::value>::type>
  {
  typedef T1 type;
  };

template<typename T>
  struct is_empty_helper : public T
  {
  };

struct is_empty_helper_base
{
};

template<typename T>
  struct is_empty : integral_constant<bool,
    sizeof(is_empty_helper_base) == sizeof(is_empty_helper<T>)
  >
  {
  };

} // end detail

using detail::integral_constant;
using detail::true_type;
using detail::false_type;

} // end thrust

#include <thrust/detail/type_traits/has_trivial_assign.h>


text:
//=================================================================================================

//=================================================================================================

//*************************************************************************************************
// Includes
//*************************************************************************************************

#include <cstdlib>
#include <iostream>
#include <blaze/math/CompressedVector.h>
#include <blaze/math/DynamicVector.h>
#include <blazetest/mathtest/Creator.h>
#include <blazetest/mathtest/dvecsveccross/OperationTest.h>
#include <blazetest/system/MathTest.h>

//=================================================================================================
//
//  MAIN FUNCTION
//
//=================================================================================================

//*************************************************************************************************
int main()
{
   std::cout << "   Running 'VDbVCb'..." << std::endl;

   using blazetest::mathtest::TypeB;

   try
   {
      // Vector type definitions
      typedef blaze::DynamicVector<TypeB>     VDb;
      typedef blaze::CompressedVector<TypeB>  VCb;

      // Creator type definitions
      typedef blazetest::Creator<VDb>  CVDb;
      typedef blazetest::Creator<VCb>  CVCb;

      // Running tests with small vectors
      for( size_t i=0UL; i<=3UL; ++i ) {
         RUN_DVECSVECCROSS_OPERATION_TEST( CVDb( 3UL ), CVCb( 3UL, i ) );
      }
   }
   catch( std::exception& ex ) {
      std::cerr << "\n\n ERROR DETECTED during dense vector/sparse vector cross product:\n"
                << ex.what() << "\n";
      return EXIT_FAILURE;
   }

   return EXIT_SUCCESS;
}
//*************************************************************************************************


text:
#import <UIKit/UIKit.h>

@interface TPLSettings : NSObject

+ (BOOL)isRTL;

+ (void)setIsRTLOverride:(BOOL)isRTLOverride;

+ (void)clearIsRTLOverride;

@end


text:
package com.epam.ta.reportportal.core.analyzer.auto.impl;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.collect.ImmutableMap;
import org.springframework.stereotype.Service;

import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

import static java.util.Optional.ofNullable;

/**
 * Contains caches for analyzing and indexing status
 *
 * @author Pavel Bortnik
 */
@Service
public class AnalyzerStatusCache {

	public static final String AUTO_ANALYZER_KEY = "autoAnalyzer";
	public static final String PATTERN_ANALYZER_KEY = "patternAnalyzer";
	public static final String CLUSTER_KEY = "cluster";

	private static final int CACHE_ITEM_LIVE = 10;
	private static final int MAXIMUM_SIZE = 50000;

	private static final int CLUSTER_ITEM_LIVE = 20;

	/**
	 * Contains cache of analyze running for concrete launch
	 * launchId - projectId
	 */
	private Map<String, Cache<Long, Long>> analyzeStatus;

	public AnalyzerStatusCache() {
		Cache<Long, Long> autoAnalysisStatusCache = CacheBuilder.newBuilder()
				.maximumSize(MAXIMUM_SIZE)
				.expireAfterWrite(CACHE_ITEM_LIVE, TimeUnit.MINUTES)
				.build();
		Cache<Long, Long> patternAnalysisCache = CacheBuilder.newBuilder()
				.maximumSize(MAXIMUM_SIZE)
				.expireAfterWrite(CACHE_ITEM_LIVE, TimeUnit.MINUTES)
				.build();
		Cache<Long, Long> clusterCache = CacheBuilder.newBuilder()
				.maximumSize(MAXIMUM_SIZE)
				.expireAfterWrite(CLUSTER_ITEM_LIVE, TimeUnit.MINUTES)
				.build();
		analyzeStatus = ImmutableMap.<String, Cache<Long, Long>>builder().put(AUTO_ANALYZER_KEY, autoAnalysisStatusCache)
				.put(PATTERN_ANALYZER_KEY, patternAnalysisCache)
				.put(CLUSTER_KEY, clusterCache)
				.build();
	}

	public AnalyzerStatusCache(Map<String, Cache<Long, Long>> analyzeStatus) {
		this.analyzeStatus = analyzeStatus;
	}

	public boolean analyzeStarted(String analyzerKey, Long launchId, Long projectId) {
		Cache<Long, Long> analysisCache = analyzeStatus.get(analyzerKey);
		if (analysisCache == null) {
			return false;
		}
		analysisCache.put(launchId, projectId);
		return true;
	}

	public boolean analyzeFinished(String analyzerKey, Long launchId) {
		Cache<Long, Long> analysisCache = analyzeStatus.get(analyzerKey);
		if (analysisCache == null) {
			return false;
		}
		analysisCache.invalidate(launchId);
		return true;
	}

	public Optional<Cache<Long, Long>> getAnalyzeStatus(String analyzerKey) {
		return ofNullable(analyzeStatus.get(analyzerKey));
	}

	public boolean containsLaunchId(String analyzerKey, Long launchId) {
		return ofNullable(analyzeStatus.get(analyzerKey)).map(cache -> cache.asMap().containsKey(launchId)).orElse(Boolean.FALSE);
	}

	public boolean containsProjectId(String analyzerKey, Long projectId) {
		return ofNullable(analyzeStatus.get(analyzerKey)).map(cache -> cache.asMap().containsValue(projectId)).orElse(Boolean.FALSE);
	}

	public Set<String> getStartedAnalyzers(Long launchId) {
		return analyzeStatus.entrySet()
				.stream()
				.filter(entry -> entry.getValue().asMap().containsKey(launchId))
				.map(Map.Entry::getKey)
				.collect(Collectors.toSet());
	}

	public Set<String> getAnalyzers() {
		return analyzeStatus.keySet();
	}
}


text:
package com.codepath.apps.ibisapp.utils;

/**
 * Created by ocarty on 10/29/2016.
 */

public class StringUtils {
    public static String addHashtagToString(String userName) {
        if (userName != null) {
            return "@" + userName;
        } else {
            return "";
        }
    }
}


text:
require 'spec_helper'

describe 'apache::mod::auth_kerb', :type => :class do
  let :pre_condition do
    'include apache'
  end
  context "on a Debian OS", :compile do
    let :facts do
      {
        :id                     => 'root',
        :kernel                 => 'Linux',
        :lsbdistcodename        => 'squeeze',
        :osfamily               => 'Debian',
        :operatingsystem        => 'Debian',
        :operatingsystemrelease => '6',
        :path                   => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
        :concat_basedir         => '/dne',
      }
    end
    it { should contain_class("apache::params") }
    it { should contain_apache__mod("auth_kerb") }
    it { should contain_package("libapache2-mod-auth-kerb") }
  end
  context "on a RedHat OS", :compile do
    let :facts do
      {
        :id                     => 'root',
        :kernel                 => 'Linux',
        :osfamily               => 'RedHat',
        :operatingsystem        => 'RedHat',
        :operatingsystemrelease => '6',
        :path                   => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
        :concat_basedir         => '/dne',
      }
    end
    it { should contain_class("apache::params") }
    it { should contain_apache__mod("auth_kerb") }
    it { should contain_package("mod_auth_kerb") }
  end
  context "on a FreeBSD OS", :compile do
    let :facts do
      {
        :id                     => 'root',
        :kernel                 => 'FreeBSD',
        :osfamily               => 'FreeBSD',
        :operatingsystem        => 'FreeBSD',
        :operatingsystemrelease => '9',
        :path                   => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
        :concat_basedir         => '/dne',
      }
    end
    it { should contain_class("apache::params") }
    it { should contain_apache__mod("auth_kerb") }
    it { should contain_package("www/mod_auth_kerb2") }
  end
end


text:
<!DOCTYPE html>
<!-- Just need an empty file here, as long as it's served over HTTP -->


text:
function FE(steps,xi,xf,yi)

close all
%------------------------------README-------------------------------
%
% Content Creator:  Aditya Dhumuntarao
% Date Created:     08/24/2014
% License:          MIT License
% Website:          http://www.public.asu.edu/~adhumunt/
% GITHUB:           https://github.com/Adhumunt/
%
%-------------------------------BASIC-------------------------------
%
% This MATLAB code solves the Initial Value Problem (IVP) using the
% Forward Euler Method given as
%           y(n+1) = y(n) + dt*f(x,y)
% Where f(x,y)=y(n).
%
% The exact solution is given as
%           y(n) = C*exp(a*x)
%
% Where C=1 for simplicity and a=-1 for the model IVP.
%
% Usage
%   steps:  # to specify the time step
%   xi:     # to specify the initial x
%   xf:     # to specify the final x
%   yi:     # to specify the initial y
% Example:  FE(10,0,1,1)
%
%------------------------------ANALYSIS-----------------------------
%
% The variable steps has to be relatively large compared to the
% difference of (xf-xi) or else the dt will create major instabilit-
% ies in the code. This is because forward euler is conditionally
% stable and at a high dt, forward euler breaks down. Specifically
% as dt >= 2/abs(a), I have provided an example of this behavior.
%
% I have also plotted the exact solution to better explain the
% dynamics.
% Example: FE(10,0,20,1)
%
%------------------------------SUMMARY------------------------------
%
% Method:       Explicit
% Accuracy:     1st Order
% Stability:    Conditionally with dt <= 2/abs(a)
%
%-------------------------------------------------------------------

a=-1;
dt = (xf-xi)/steps;
y = zeros(steps+1,1);
x = linspace(xi,xf,steps+1);
y(1) = yi;

for n = 1:steps
    y(n+1) = (1 + a*dt)*y(n);
end

% Function of error between method and actual.
z=exp(x)' - y;

figure
plot(x,y,'r-',x,exp(a*x),'b-');
xlim([xi xf]);
xlabel('x');
ylabel('y');
title('IVP: Forward Euler Method');
legend('FE','exact');

figure
plot(x,z);
xlim([xi xf]);
xlabel('x');
ylabel('z');
title('Error Between Exact and Approximate');
end