text:
#include <wangle/channel/broadcast/test/Mocks.h>
#include <wangle/channel/test/MockHandler.h>
#include <wangle/codec/MessageToByteEncoder.h>

using namespace wangle;
using namespace folly;
using namespace testing;

class ObservingHandlerTest : public Test {
 public:
  class MockIntToByteEncoder : public MessageToByteEncoder<int> {
   public:
    std::unique_ptr<IOBuf> encode(int& data) override {
      return IOBuf::copyBuffer(folly::to<std::string>(data));
    }
  };

  void SetUp() override {
    prevHandler = new StrictMock<MockBytesToBytesHandler>();
    observingHandler = new StrictMock<MockObservingHandler>(&pool);
    broadcastHandler = make_unique<StrictMock<MockBroadcastHandler>>();

    pipeline = ObservingPipeline<int>::create();
    pipeline->addBack(
        std::shared_ptr<StrictMock<MockBytesToBytesHandler>>(prevHandler));
    pipeline->addBack(MockIntToByteEncoder());
    pipeline->addBack(
        std::shared_ptr<StrictMock<MockObservingHandler>>(observingHandler));
    pipeline->finalize();
  }

  void TearDown() override {
    Mock::VerifyAndClear(broadcastHandler.get());

    broadcastHandler.reset();
    pipeline.reset();
  }

 protected:
  ObservingPipeline<int>::Ptr pipeline;

  StrictMock<MockBytesToBytesHandler>* prevHandler{nullptr};
  StrictMock<MockObservingHandler>* observingHandler{nullptr};
  std::unique_ptr<StrictMock<MockBroadcastHandler>> broadcastHandler;

  StrictMock<MockBroadcastPool> pool;
};

TEST_F(ObservingHandlerTest, Success) {
  InSequence dummy;

  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));
  // Verify that ingress is paused
  EXPECT_CALL(*prevHandler, transportInactive(_)).WillOnce(Return());
  EXPECT_CALL(pool, mockGetHandler(_))
      .WillOnce(Return(MoveWrapper<Future<BroadcastHandler<int, std::string>*>>(
          broadcastHandler.get())));
  EXPECT_CALL(*broadcastHandler, subscribe(_)).Times(1);
  // Verify that ingress is resumed
  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));

  // Initialize the pipeline
  pipeline->transportActive();

  EXPECT_CALL(*observingHandler, mockWrite(_, 1))
      .WillOnce(Return(makeMoveWrapper(makeFuture())));
  EXPECT_CALL(*observingHandler, mockWrite(_, 2))
      .WillOnce(Return(makeMoveWrapper(makeFuture())));

  // Broadcast some data
  observingHandler->onNext(1);
  observingHandler->onNext(2);

  EXPECT_CALL(*observingHandler, mockClose(_))
      .WillOnce(Return(makeMoveWrapper(makeFuture())));

  // Finish the broadcast
  observingHandler->onCompleted();
}

TEST_F(ObservingHandlerTest, ConnectError) {
  // Test when an error occurs while fetching the broadcast handler
  InSequence dummy;

  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));
  // Verify that ingress is paused
  EXPECT_CALL(*prevHandler, transportInactive(_)).WillOnce(Return());
  // Inject error
  EXPECT_CALL(pool, mockGetHandler(_))
      .WillOnce(Return(MoveWrapper<Future<BroadcastHandler<int, std::string>*>>(
          make_exception_wrapper<std::exception>())));
  EXPECT_CALL(*observingHandler, mockClose(_))
      .WillOnce(Return(makeMoveWrapper(makeFuture())));

  // Initialize the pipeline
  pipeline->transportActive();
}

TEST_F(ObservingHandlerTest, ConnectHandlerDeletion) {
  // Test when the handler goes away before the broadcast handler
  // is obtained
  InSequence dummy;

  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));
  // Verify that ingress is paused
  EXPECT_CALL(*prevHandler, transportInactive(_)).WillOnce(Return());
  Promise<BroadcastHandler<int, std::string>*> promise;
  EXPECT_CALL(pool, mockGetHandler(_))
      .WillOnce(Return(makeMoveWrapper(promise.getFuture())));

  // Initialize the pipeline
  pipeline->transportActive();

  // Delete the handler and then fulfil the promise
  EXPECT_CALL(*broadcastHandler, subscribe(_)).Times(0);
  pipeline.reset();
  promise.setValue(broadcastHandler.get());
}

TEST_F(ObservingHandlerTest, ConnectErrorHandlerDeletion) {
  // Test when an error occurs while fetching the broadcast handler
  // after the handler is deleted
  InSequence dummy;

  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));
  // Verify that ingress is paused
  EXPECT_CALL(*prevHandler, transportInactive(_)).WillOnce(Return());
  Promise<BroadcastHandler<int, std::string>*> promise;
  EXPECT_CALL(pool, mockGetHandler(_))
      .WillOnce(Return(makeMoveWrapper(promise.getFuture())));

  // Initialize the pipeline
  pipeline->transportActive();

  // Delete the handler and then inject an error
  pipeline.reset();
  promise.setException(std::exception());
}

TEST_F(ObservingHandlerTest, BroadcastError) {
  InSequence dummy;

  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));
  // Verify that ingress is paused
  EXPECT_CALL(*prevHandler, transportInactive(_)).WillOnce(Return());
  EXPECT_CALL(pool, mockGetHandler(_))
      .WillOnce(Return(MoveWrapper<Future<BroadcastHandler<int, std::string>*>>(
          broadcastHandler.get())));
  EXPECT_CALL(*broadcastHandler, subscribe(_)).Times(1);
  // Verify that ingress is resumed
  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));

  // Initialize the pipeline
  pipeline->transportActive();

  EXPECT_CALL(*observingHandler, mockWrite(_, _))
      .WillOnce(Return(makeMoveWrapper(makeFuture())));

  // Broadcast some data
  observingHandler->onNext(1);

  EXPECT_CALL(*observingHandler, mockClose(_))
      .WillOnce(Return(makeMoveWrapper(makeFuture())));

  // Inject broadcast error
  observingHandler->onError(make_exception_wrapper<std::exception>());
}

TEST_F(ObservingHandlerTest, ReadEOF) {
  InSequence dummy;

  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));
  // Verify that ingress is paused
  EXPECT_CALL(*prevHandler, transportInactive(_)).WillOnce(Return());
  EXPECT_CALL(pool, mockGetHandler(_))
      .WillOnce(Return(MoveWrapper<Future<BroadcastHandler<int, std::string>*>>(
          broadcastHandler.get())));
  EXPECT_CALL(*broadcastHandler, subscribe(_)).Times(1);
  // Verify that ingress is resumed
  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));

  // Initialize the pipeline
  pipeline->transportActive();

  EXPECT_CALL(*observingHandler, mockWrite(_, _))
      .WillOnce(Return(makeMoveWrapper(makeFuture())));

  // Broadcast some data
  observingHandler->onNext(1);

  EXPECT_CALL(*observingHandler, mockClose(_))
      .WillOnce(InvokeWithoutArgs([&] {
        // Delete the pipeline
        pipeline.reset();
        return makeMoveWrapper(makeFuture());
      }));
  EXPECT_CALL(*broadcastHandler, unsubscribe(_)).Times(1);

  // Client closes connection
  observingHandler->readEOF(nullptr);
}

TEST_F(ObservingHandlerTest, ReadError) {
  InSequence dummy;

  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));
  // Verify that ingress is paused
  EXPECT_CALL(*prevHandler, transportInactive(_)).WillOnce(Return());
  EXPECT_CALL(pool, mockGetHandler(_))
      .WillOnce(Return(MoveWrapper<Future<BroadcastHandler<int, std::string>*>>(
          broadcastHandler.get())));
  EXPECT_CALL(*broadcastHandler, subscribe(_)).Times(1);
  // Verify that ingress is resumed
  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));

  // Initialize the pipeline
  pipeline->transportActive();

  EXPECT_CALL(*observingHandler, mockWrite(_, _))
      .WillOnce(Return(makeMoveWrapper(makeFuture())));

  // Broadcast some data
  observingHandler->onNext(1);

  EXPECT_CALL(*observingHandler, mockClose(_))
      .WillOnce(InvokeWithoutArgs([&] {
        // Delete the pipeline
        pipeline.reset();
        return makeMoveWrapper(makeFuture());
      }));
  EXPECT_CALL(*broadcastHandler, unsubscribe(_)).Times(1);

  // Inject read error
  observingHandler->readException(nullptr,
                                  make_exception_wrapper<std::exception>());
}

TEST_F(ObservingHandlerTest, WriteError) {
  InSequence dummy;

  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));
  // Verify that ingress is paused
  EXPECT_CALL(*prevHandler, transportInactive(_)).WillOnce(Return());
  EXPECT_CALL(pool, mockGetHandler(_))
      .WillOnce(Return(MoveWrapper<Future<BroadcastHandler<int, std::string>*>>(
          broadcastHandler.get())));
  EXPECT_CALL(*broadcastHandler, subscribe(_)).Times(1);
  // Verify that ingress is resumed
  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));

  // Initialize the pipeline
  pipeline->transportActive();

  // Inject write error
  EXPECT_CALL(*observingHandler, mockWrite(_, _))
      .WillOnce(Return(
          MoveWrapper<Future<Unit>>(make_exception_wrapper<std::exception>())));
  EXPECT_CALL(*observingHandler, mockClose(_))
      .WillOnce(InvokeWithoutArgs([&] {
        // Delete the pipeline
        pipeline.reset();
        return makeMoveWrapper(makeFuture());
      }));
  EXPECT_CALL(*broadcastHandler, unsubscribe(_)).Times(1);

  // Broadcast some data
  observingHandler->onNext(1);
}

TEST_F(ObservingHandlerTest, WriteErrorHandlerDeletion) {
  // Test when write error occurs asynchronously after the handler
  // has been deleted.
  InSequence dummy;

  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));
  // Verify that ingress is paused
  EXPECT_CALL(*prevHandler, transportInactive(_)).WillOnce(Return());
  EXPECT_CALL(pool, mockGetHandler(_))
      .WillOnce(Return(MoveWrapper<Future<BroadcastHandler<int, std::string>*>>(
          broadcastHandler.get())));
  EXPECT_CALL(*broadcastHandler, subscribe(_)).Times(1);
  // Verify that ingress is resumed
  EXPECT_CALL(*prevHandler, transportActive(_))
      .WillOnce(Invoke([&](MockBytesToBytesHandler::Context* ctx) {
        ctx->fireTransportActive();
      }));

  // Initialize the pipeline
  pipeline->transportActive();

  Promise<Unit> promise;
  EXPECT_CALL(*observingHandler, mockWrite(_, _))
      .WillOnce(Return(makeMoveWrapper(promise.getFuture())));

  // Broadcast some data
  observingHandler->onNext(1);

  // Delete the pipeline and then fail the write
  EXPECT_CALL(*broadcastHandler, unsubscribe(_)).Times(1);
  pipeline.reset();
  promise.setException(std::exception());
}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

<TITLE>Manpage of SET ROLE</TITLE>
<meta charset="utf-8">
<link rel="stylesheet" href="/css/main.css" type="text/css">

linux manpages

{"type":"documentation"}

SET ROLE

Section: SQL Commands (7)
Updated: 2012-08-14
Index
Return to Main Contents

NAME

SET ROLE - set the current user identifier of the current session

SYNOPSIS

SET [ SESSION | LOCAL ] ROLE rolename
SET [ SESSION | LOCAL ] ROLE NONE
RESET ROLE

DESCRIPTION

This command sets the current user
identifier of the current SQL session to be rolename. The role name can be
written as either an identifier or a string literal.
After SET ROLE, permissions checking for SQL commands
is carried out as though the named role were the one that had logged
in originally.

The specified rolename
must be a role that the current session user is a member of.
(If the session user is a superuser, any role can be selected.)

The SESSION and LOCAL modifiers act the same
as for the regular SET [set(7)]
command.

The NONE and RESET forms reset the current
user identifier to be the current session user identifier.
These forms can be executed by any user.

NOTES

Using this command, it is possible to either add privileges or restrict
one's privileges. If the session user role has the INHERITS
attribute, then it automatically has all the privileges of every role that
it could SET ROLE to; in this case SET ROLE
effectively drops all the privileges assigned directly to the session user
and to the other roles it is a member of, leaving only the privileges
available to the named role. On the other hand, if the session user role
has the NOINHERITS attribute, SET ROLE drops the
privileges assigned directly to the session user and instead acquires the
privileges available to the named role.

In particular, when a superuser chooses to SET ROLE to a
non-superuser role, she loses her superuser privileges.

SET ROLE has effects comparable to
SET SESSION AUTHORIZATION [set_session_authorization(7)], but the privilege
checks involved are quite different. Also,
SET SESSION AUTHORIZATION determines which roles are
allowable for later SET ROLE commands, whereas changing
roles with SET ROLE does not change the set of roles
allowed to a later SET ROLE.

SET ROLE does not process session variables as specified by
the role's ALTER ROLE [alter_role(7)] settings; this only happens during
login.

SET ROLE cannot be used within a
SECURITY DEFINER function.

EXAMPLES

SELECT SESSION_USER, CURRENT_USER;

 session_user | current_user
--------------+--------------
 peter        | peter

SET ROLE 'paul';

SELECT SESSION_USER, CURRENT_USER;

 session_user | current_user
--------------+--------------
 peter        | paul

COMPATIBILITY

PostgreSQL
allows identifier syntax ("rolename"), while
the SQL standard requires the role name to be written as a string
literal. SQL does not allow this command during a transaction;
PostgreSQL does not make this
restriction because there is no reason to.
The SESSION and LOCAL modifiers are a
PostgreSQL extension, as is the
RESET syntax.

SEE ALSO

SET SESSION AUTHORIZATION [set_session_authorization(7)]

Index

NAME

SYNOPSIS

DESCRIPTION

NOTES

EXAMPLES

COMPATIBILITY

SEE ALSO

This document was created by
man2html,
using the manual pages.

Time: 05:34:16 GMT, December 24, 2015


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="bottom" >

    <RelativeLayout
        android:id="@+id/rebound_listview_header_content"
        android:layout_width="fill_parent"
        android:layout_height="100dp"
        android:layout_margin="10dp" >

        <LinearLayout
            android:id="@+id/rebound_listview_header_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:gravity="center"
            android:orientation="vertical" >

            <ImageView
                android:id="@+id/rebound_listview_header_iv_icon"
                android:layout_width="35dp"
                android:layout_height="35dp"
                android:layout_marginBottom="10dp"
                android:scaleType="fitCenter"
                android:src="@drawable/progressbar_small" />

            <TextView
                android:id="@+id/rebound_listview_header_hint_textview"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="5dp"
                android:text="@string/init_data"
                android:visibility="gone" />
        </LinearLayout>

        <ProgressBar
            android:id="@+id/rebound_listview_header_progressbar"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_alignLeft="@id/rebound_listview_header_text"
            android:layout_centerVertical="true"
            android:layout_marginLeft="-40dp"
            android:visibility="invisible" />
    </RelativeLayout>

</LinearLayout>


text:
package org.keycloak.models.sessions.infinispan.stream;

import org.keycloak.models.sessions.infinispan.changes.SessionEntityWrapper;
import org.keycloak.models.sessions.infinispan.entities.AuthenticatedClientSessionEntity;
import org.keycloak.models.sessions.infinispan.entities.LoginFailureEntity;
import org.keycloak.models.sessions.infinispan.entities.LoginFailureKey;
import org.keycloak.models.sessions.infinispan.entities.SessionEntity;
import org.keycloak.models.sessions.infinispan.entities.UserSessionEntity;

import java.io.Serializable;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.function.Function;
import java.util.stream.Stream;

/**
 * @author Stian Thorgersen
 */
public class Mappers {

    public static Function<Map.Entry<String, SessionEntityWrapper>, Map.Entry<String, SessionEntity>> unwrap() {
        return new SessionUnwrap();
    }

    public static Function<Map.Entry<String, SessionEntityWrapper<UserSessionEntity>>, String> sessionId() {
        return new SessionIdMapper();
    }

    public static Function<Map.Entry<String, SessionEntityWrapper>, SessionEntity> sessionEntity() {
        return new SessionEntityMapper();
    }

    public static Function<Map.Entry<String, SessionEntityWrapper<UserSessionEntity>>, UserSessionEntity> userSessionEntity() {
        return new UserSessionEntityMapper();
    }

    public static Function<Map.Entry<UUID, SessionEntityWrapper<AuthenticatedClientSessionEntity>>, AuthenticatedClientSessionEntity> clientSessionEntity() {
        return new AuthenticatedClientSessionEntityMapper();
    }

    public static Function<Map.Entry<LoginFailureKey, SessionEntityWrapper<LoginFailureEntity>>, LoginFailureKey> loginFailureId() {
        return new LoginFailureIdMapper();
    }

    private static class SessionUnwrap implements Function<Map.Entry<String, SessionEntityWrapper>, Map.Entry<String, SessionEntity>>, Serializable {

        @Override
        public Map.Entry<String, SessionEntity> apply(Map.Entry<String, SessionEntityWrapper> wrapperEntry) {
            return new Map.Entry<String, SessionEntity>() {

                @Override
                public String getKey() {
                    return wrapperEntry.getKey();
                }

                @Override
                public SessionEntity getValue() {
                    return wrapperEntry.getValue().getEntity();
                }

                @Override
                public SessionEntity setValue(SessionEntity value) {
                    throw new IllegalStateException("Unsupported operation");
                }

            };
        }

    }

    private static class SessionIdMapper implements Function<Map.Entry<String, SessionEntityWrapper<UserSessionEntity>>, String>, Serializable {
        @Override
        public String apply(Map.Entry<String, SessionEntityWrapper<UserSessionEntity>> entry) {
            return entry.getKey();
        }
    }

    private static class SessionEntityMapper implements Function<Map.Entry<String, SessionEntityWrapper>, SessionEntity>, Serializable {
        @Override
        public SessionEntity apply(Map.Entry<String, SessionEntityWrapper> entry) {
            return entry.getValue().getEntity();
        }
    }

    private static class UserSessionEntityMapper implements Function<Map.Entry<String, SessionEntityWrapper<UserSessionEntity>>, UserSessionEntity>, Serializable {

        @Override
        public UserSessionEntity apply(Map.Entry<String, SessionEntityWrapper<UserSessionEntity>> entry) {
            return entry.getValue().getEntity();
        }

    }

    private static class AuthenticatedClientSessionEntityMapper implements Function<Map.Entry<UUID, SessionEntityWrapper<AuthenticatedClientSessionEntity>>, AuthenticatedClientSessionEntity>, Serializable {

        @Override
        public AuthenticatedClientSessionEntity apply(Map.Entry<UUID, SessionEntityWrapper<AuthenticatedClientSessionEntity>> entry) {
            return entry.getValue().getEntity();
        }

    }

    private static class LoginFailureIdMapper implements Function<Map.Entry<LoginFailureKey, SessionEntityWrapper<LoginFailureEntity>>, LoginFailureKey>, Serializable {
        @Override
        public LoginFailureKey apply(Map.Entry<LoginFailureKey, SessionEntityWrapper<LoginFailureEntity>> entry) {
            return entry.getKey();
        }
    }

    private static class AuthClientSessionSetMapper implements Function<Map.Entry<String, SessionEntityWrapper<UserSessionEntity>>, Set<String>>, Serializable {

        @Override
        public Set<String> apply(Map.Entry<String, SessionEntityWrapper<UserSessionEntity>> entry) {
            UserSessionEntity entity = entry.getValue().getEntity();
            return entity.getAuthenticatedClientSessions().keySet();
        }
    }

    public static <T> Stream<T> toStream(Collection<T> collection) {
        return collection.stream();
    }

    public static Function<Map.Entry<String, SessionEntityWrapper<UserSessionEntity>>, Set<String>> authClientSessionSetMapper() {
        return new AuthClientSessionSetMapper();
    }

}


text:
#ifndef __GDI_BITMAP_H
#define __GDI_BITMAP_H

#include <freerdp/api.h>
#include <freerdp/gdi/gdi.h>

FREERDP_API GDI_COLOR gdi_GetPixel(HGDI_DC hdc, int nXPos, int nYPos);
FREERDP_API GDI_COLOR gdi_SetPixel(HGDI_DC hdc, int X, int Y, GDI_COLOR crColor);
FREERDP_API uint8 gdi_GetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y);
FREERDP_API uint16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y);
FREERDP_API uint32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y);
FREERDP_API uint8* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y);
FREERDP_API uint16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y);
FREERDP_API uint32* gdi_GetPointer_32bpp(HGDI_BITMAP hBmp, int X, int Y);
FREERDP_API void gdi_SetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y, uint8 pixel);
FREERDP_API void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, uint16 pixel);
FREERDP_API void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, uint32 pixel);
FREERDP_API HGDI_BITMAP gdi_CreateBitmap(int nWidth, int nHeight, int cBitsPerPixel, uint8* data);
FREERDP_API HGDI_BITMAP gdi_CreateCompatibleBitmap(HGDI_DC hdc, int nWidth, int nHeight);
FREERDP_API int gdi_BitBlt(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop);

typedef int (*p_BitBlt)(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop);

#endif /* __GDI_BITMAP_H */


text:
* [Chris](https://chrisdown.name/tf2/) for starting it all
* [Comanglia](https://www.teamfortress.tv/25328/comanglias-config-fps-guide) for
  continuing what Chris started and helping a bit with my config
* [Rhapsody](https://rhapsodysl.github.io/perfconfig/) for updating Chris' config
* [Felik](https://www.teamfortress.tv/44076/se-config-framework-feliks-config-3)
  for providing an alternative to Chris-based configs
* [JarateKing](https://github.com/JarateKing) for all their amazing work on TF2 modding and configuration
* [Aar](https://www.youtube.com/user/Aarmastah) for making amazing videos about TF2 graphics customization and supporting this config
* The community for their continued support, advice and benchmarks. (Special
  Mentions to: amazoc, JackStanley, Setsul, Hopps, fagoatse, ZeRo5, stabby,
  Whisker, Vantavimeow, osvaldo, DarkNecrid, steph, Thole, gemm, sage, Malkraz,
  maximsmol, Fraklin, UnnoTed, Mothership, Mike, Skorp, Smoutebollen, Goatz,
  DapperTrapper, Tene, mambo, Perkzitos, Sakii, Leo40 and perhaps many others)
* The [Valve Developer community](https://developer.valvesoftware.com/wiki/Main_Page)
  for their documentation of Source Engine console variables and mechanics
* and to Valve, for making and updating (for over a decade!) the best class-based FPS to date with so
  much customizability on top


text:
"""
Media Test
"""
import logging

#从Python SDK导入BOS配置管理模块以及安全认证模块
from baidubce.bce_client_configuration import BceClientConfiguration
from baidubce.auth.bce_credentials import BceCredentials

#设置BosClient的Host,Access Key ID和Secret Access Key
bos_host = b"http://multimedia.bce-testinternal.baidu.com"
access_key_id = b""
secret_access_key = b""

#设置日志文件的句柄和日志级别
logger = logging.getLogger('baidubce.services.media.mediaclient')
fh = logging.FileHandler("sample.log")
fh.setLevel(logging.DEBUG)

#设置日志文件输出的顺序、结构和内容
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
fh.setFormatter(formatter)
logger.setLevel(logging.DEBUG)
logger.addHandler(fh)

#创建BceClientConfiguration
config = BceClientConfiguration(credentials=BceCredentials(access_key_id, secret_access_key),
                                endpoint = bos_host)


text:
package univDB;

/**
 * For CS351 Project 2
 *
 * @author Jennifer Clark and Collin Stenersen
 * Interface for the University Database
 */

import javax.swing.*;

public class UnivDB {
    public static void main(String args[]) throws Exception {
	SwingUtilities.invokeLater(new Runnable() {
	    public void run() {
		new MainMenu();
		}
	    });
	}
    }


text:
local importations = require(IMPORTATIONS)
local spriteSequenceNames = require(importations.SPRITE_SEQUENCE)
local images = require(importations.IMAGES)
local spriteUtil = require(importations.SPRITE_UTIL)
local spriteSize = require(importations.SPRITE_SIZE)

local spriteTime = 1000

local function _create(size)
    local sheetData
    local spriteSequence
    local imagePath

    if (size == spriteSize.LARGE) then

        imagePath = images.RSZ_BIRD_SPRITE

        local frames = {
            { x = 0, y = 0, width = 244, height = 328 },
            { width = 246 },
            { width = 236 },
            { width = 230 },
            { width = 244 },
            { x = 0, y = 328, width = 244, height = 254 },
            { width = 252 },
            { width = 224 },
            { width = 250 },
            { width = 230 },
            { x = 0, y = 582, width = 244, height = 340 },
            { width = 240 },
            { width = 248 },
            { width = 238 },
            { width = 230 },
            { x = 0, y = 922, width = 258, height = 332 },
            { width = 236 },
            { width = 236 },
            { width = 236 },
            { width = 234 }
        }

        local framesCount = spriteUtil.fillNeededFrameFields(frames)

        sheetData = {
            frames = frames,
            sheetContentWidth = 1200,
            sheetContentHeight = 1256
        }

        spriteSequence = {
            {
                name = spriteSequenceNames.RUNNING,
                start = 1,
                count = framesCount - 1,
                time = spriteTime,
                loopCount = 0
            }
        }

    else
        imagePath = images.BIRD_SPRITE

        local frames = {
            { x = 0, y = 0, width = 120, height = 164 },
            { width = 124 },
            { width = 118 },
            { width = 120 },
            { width = 119 },
            { x = 0, y = 164, width = 124, height = 128 },
            { width = 118 },
            { width = 126 },
            { width = 114 },
            { width = 118 },
            { x = 0, y = 292, width = 122, height = 172 },
            { width = 124 },
            { width = 116 },
            { width = 124 },
            { width = 114 },
            { x = 0, y = 464, width = 128, height = 162 },
            { width = 116 },
            { width = 116 },
            { width = 116 },
            { width = 118 }
        }

        local framesCount = spriteUtil.fillNeededFrameFields(frames)

        sheetData = {
            frames = frames,
            sheetContentWidth = 600,
            sheetContentHeight = 628
        }

        spriteSequence = {
            {
                name = spriteSequenceNames.RUNNING,
                start = 1,
                count = framesCount - 1,
                time = spriteTime,
                loopCount = 0
            }
        }
    end

    local healthSheet = graphics.newImageSheet(imagePath, sheetData)
    local sprite = display.newSprite(healthSheet, spriteSequence)

    sprite:setSequence(spriteSequenceNames.RUNNING)

    return sprite
end

return {
    create = _create
}


text:
<?php

namespace Wikidata\Tests;

use Wikidata\Entity;

class EntityTest extends TestCase
{
  protected $lang = 'es';

  protected $entity;

  public function setUp(): void
  {
    $this->entity = new Entity($this->dummy[0], $this->lang);
  }

  public function testGetEntityId()
  {
    $this->assertEquals($this->dummy[0]['id'], $this->entity->id);
  }

  public function testGetEntityLang()
  {
    $this->assertEquals($this->lang, $this->entity->lang);
  }

  public function testGetEntityLabel()
  {
    $this->assertEquals($this->dummy[0]['labels'][$this->lang]['value'], $this->entity->label);
  }

  public function testGetEntityDescription()
  {
    $this->assertEquals($this->dummy[0]['descriptions'][$this->lang]['value'], $this->entity->description);
  }

  public function testGetWikiUrl()
  {
    $this->assertEquals($this->dummy[0]['sitelinks'][$this->lang . 'wiki']['url'], $this->entity->wiki_url);
  }

  public function testGetEntityAliases()
  {
    $aliases = collect($this->dummy[0]['aliases'][$this->lang])->pluck('value')->toArray();

    $this->assertEquals($aliases, $this->entity->aliases);
  }

  public function testGetEntityWithoutAliases()
  {
    $entity = new Entity($this->dummy[1], 'en');

    $this->assertEquals([], $entity->aliases);
  }

  public function testGetEntityProperties()
  {
    $this->entity->parseProperties($this->dummyProperties);

    $properties = $this->entity->properties;

    $this->assertInstanceOf('Illuminate\Support\Collection', $properties);

    $this->assertInstanceOf('Wikidata\Property', $properties->first());
  }
}


text:
(function() {
    'use strict';

    angular.module('nb.common')
        .service('nb.common.nbCalculationTipSrvc', ['$document', '$compile', '$rootScope',
            function($document, $compile, $rootScope) { // , $timeout
                var me = this;
                var options = { title: '' };
                me.showCalculationTip = function(op) {
                    var scope = $rootScope.$new();
                    var newOp = _.extend({}, options, op);
                    var mask = '
' +
                        '' +
                        '' +
                        '' + newOp.title + '
' +
                        '
';
                    $('body').append($compile(mask)(scope));
                };

                me.closeCalculationTip = function() {
                    $('#CalculatingMask').remove();
                };
            }
        ]);
})(NetBrain);


text:
<?php

header("Content-type: application/json");

//common environment attributes including search paths. not specific to Learnosity
include_once '../../../env_config.php';

//common Learnosity config elements including API version control vars
include_once '../../../lrn_config.php';

use LearnositySdk\Request\Init;

$filters = [
    "domain" => [
        'filter' => FILTER_SANITIZE_FULL_SPECIAL_CHARS
    ],
    "request" => [
        "filter" => FILTER_UNSAFE_RAW,
        "flags" => FILTER_REQUIRE_ARRAY | FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_BACKTICK | FILTER_FLAG_ENCODE_AMP
    ]

];
$post_data = filter_input_array(INPUT_POST, $filters);

//domain must be whitelisted
$domain = $post_data['domain'];

//security object, with domain taking from requester
$security = [
    'user_id'      => $post_data['request']['user_id'],
    'domain'       => $domain,
    'consumer_key' => $consumer_key
];

//initialize Items API with provided request object
$init = new Init('items', $security, $consumer_secret, $post_data['request']);
echo $init->generate();


text:
class MyController < ApplicationController
  before_filter :require_login
  # let user change user's password when user has to
  skip_before_filter :check_password_change, :only => :password

  helper :issues
  helper :users
  helper :custom_fields

  BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues,
             'issuesreportedbyme' => :label_reported_issues,
             'issueswatched' => :label_watched_issues,
             'news' => :label_news_latest,
             'calendar' => :label_calendar,
             'documents' => :label_document_plural,
             'timelog' => :label_spent_time
           }.merge(Redmine::Views::MyPage::Block.additional_blocks).freeze

  DEFAULT_LAYOUT = {  'left' => ['issuesassignedtome'],
                      'right' => ['issuesreportedbyme']
                   }.freeze

  def index
    page
    render :action => 'page'
  end

  # Show user's page
  def page
    @user = User.current
    @blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT
  end

  # Edit user's account
  def account
    @user = User.current
    @pref = @user.pref
    if request.post?
      @user.safe_attributes = params[:user]
      @user.pref.attributes = params[:pref]
      if @user.save
        @user.pref.save
        set_language_if_valid @user.language
        flash[:notice] = l(:notice_account_updated)
        redirect_to my_account_path
        return
      end
    end
  end

  # Destroys user's account
  def destroy
    @user = User.current
    unless @user.own_account_deletable?
      redirect_to my_account_path
      return
    end

    if request.post? && params[:confirm]
      @user.destroy
      if @user.destroyed?
        logout_user
        flash[:notice] = l(:notice_account_deleted)
      end
      redirect_to home_path
    end
  end

  # Manage user's password
  def password
    @user = User.current
    unless @user.change_password_allowed?
      flash[:error] = l(:notice_can_t_change_password)
      redirect_to my_account_path
      return
    end
    if request.post?
      if !@user.check_password?(params[:password])
        flash.now[:error] = l(:notice_account_wrong_password)
      elsif params[:password] == params[:new_password]
        flash.now[:error] = l(:notice_new_password_must_be_different)
      else
        @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
        @user.must_change_passwd = false
        if @user.save
          flash[:notice] = l(:notice_account_password_updated)
          redirect_to my_account_path
        end
      end
    end
  end

  # Create a new feeds key
  def reset_rss_key
    if request.post?
      if User.current.rss_token
        User.current.rss_token.destroy
        User.current.reload
      end
      User.current.rss_key
      flash[:notice] = l(:notice_feeds_access_key_reseted)
    end
    redirect_to my_account_path
  end

  # Create a new API key
  def reset_api_key
    if request.post?
      if User.current.api_token
        User.current.api_token.destroy
        User.current.reload
      end
      User.current.api_key
      flash[:notice] = l(:notice_api_access_key_reseted)
    end
    redirect_to my_account_path
  end

  # User's page layout configuration
  def page_layout
    @user = User.current
    @blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT.dup
    @block_options = []
    BLOCKS.each do |k, v|
      unless @blocks.values.flatten.include?(k)
        @block_options << [l("my.blocks.#{v}", :default => [v, v.to_s.humanize]), k.dasherize]
      end
    end
  end

  # Add a block to user's page
  # The block is added on top of the page
  # params[:block] : id of the block to add
  def add_block
    block = params[:block].to_s.underscore
    if block.present? && BLOCKS.key?(block)
      @user = User.current
      layout = @user.pref[:my_page_layout] || {}
      # remove if already present in a group
      %w(top left right).each {|f| (layout[f] ||= []).delete block }
      # add it on top
      layout['top'].unshift block
      @user.pref[:my_page_layout] = layout
      @user.pref.save
    end
    redirect_to my_page_layout_path
  end

  # Remove a block to user's page
  # params[:block] : id of the block to remove
  def remove_block
    block = params[:block].to_s.underscore
    @user = User.current
    # remove block in all groups
    layout = @user.pref[:my_page_layout] || {}
    %w(top left right).each {|f| (layout[f] ||= []).delete block }
    @user.pref[:my_page_layout] = layout
    @user.pref.save
    redirect_to my_page_layout_path
  end

  # Change blocks order on user's page
  # params[:group] : group to order (top, left or right)
  # params[:list-(top|left|right)] : array of block ids of the group
  def order_blocks
    group = params[:group]
    @user = User.current
    if group.is_a?(String)
      group_items = (params["blocks"] || []).collect(&:underscore)
      group_items.each {|s| s.sub!(/^block_/, '')}
      if group_items and group_items.is_a? Array
        layout = @user.pref[:my_page_layout] || {}
        # remove group blocks if they are presents in other groups
        %w(top left right).each {|f|
          layout[f] = (layout[f] || []) - group_items
        }
        layout[group] = group_items
        @user.pref[:my_page_layout] = layout
        @user.pref.save
      end
    end
    render :nothing => true
  end
end


text:
<?php
/*
 * Codejudge

 * Scoreboard page
 */
	require_once('../functions.php');
	if(!loggedin())
		header("Location: login.php");
	else
		include('header1.php');
		connectdb();
		$event_id = $_GET['event_id'];
?>

Subject

<a href="index.php?event_id=<?php echo $event_id ?>">Problems

<a href="submissions.php?event_id=<?php echo $event_id ?>">Submissions

Scoreboard

Logout

    The current standings of all the participants, the number of problems they have attempted and solved.

        Name
        Solved
        Attempted

      <?php
				$event_id = $_GET['event_id'];
				echo $event_id ;
        $query = "SELECT username, status FROM users WHERE username!='admin'";
        $result = mysql_query($query);
       	while($row = mysql_fetch_array($result)) {
       		// displays the user, problems solved and attempted
       		$sql = "SELECT * FROM solve WHERE (status='2' AND username='".$row['username']."')";
       		$res = mysql_query($sql);
       		echo("
".$row['username']." ");
       		if($row['status'] == 0) echo(" Banned");
       		echo("	".mysql_num_rows($res));
       		$sql = "SELECT * FROM solve WHERE (status='1' AND username='".$row['username']."')";
       		$res = mysql_query($sql);
       		echo("	".mysql_num_rows($res)."
");
       	}
      ?>

<?php
	include('footer.php');
?>


text:
package org.apache.geode.cache;

import org.apache.geode.DataSerializable;
import org.apache.geode.DataSerializer;
import org.apache.geode.distributed.Role;
import org.apache.geode.distributed.internal.membership.InternalRole;
import org.apache.geode.internal.i18n.LocalizedStrings;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

/**
 * Configuration attributes for defining reliability requirements and behavior for a
 * Region.
 *
 *

 * MembershipAttributes provides options for configuring a Region to
 * require one or more membership roles to be present in the system for reliable access to the
 * Region. Each {@link Role} is a user defined string name, such as Producer or Backup
 * or FooProducer.
 *

 *
 *

 * The {@link LossAction} defines the behavior when one or more required roles are missing.
 *

 *
 *

 * The {@link ResumptionAction} specifies the action to be taken when reliability resumes.
 *

 *
 *

 * MembershipAttributes have no effect unless one or more required roles are specified.
 * These attributes are immutable after the Region has been created.
 *

 *
 * @deprecated this feature is scheduled to be removed
 */
public class MembershipAttributes implements DataSerializable, Externalizable {

  /**
   * Array of required role names by this process for reliable access to the region
   */
  private /* final */ Set<Role> requiredRoles;

  /**
   * The configuration defining how this process behaves when there are missing required roles
   */
  private /* final */ LossAction lossAction;

  /**
   * The action to take when missing required roles return to the system
   */
  private /* final */ ResumptionAction resumptionAction;

  /**
   * Creates a new MembershipAttributes with the default configuration of no required
   * roles.
   */
  public MembershipAttributes() {
    this.requiredRoles = Collections.emptySet();
    this.lossAction = LossAction.FULL_ACCESS;
    this.resumptionAction = ResumptionAction.NONE;
  }

  /**
   * Creates a new MembershipAttributes with the specified required role names.
   * Reliability policy will default to {@linkplain LossAction#NO_ACCESS NO_ACCESS}, and resumption
   * action will default to {@linkplain ResumptionAction#REINITIALIZE REINITIALIZE}.
   *
   * @param requiredRoles array of role names required by this process for reliable access to the
   *        region
   * @throws IllegalArgumentException if no requiredRoles are specified
   */
  public MembershipAttributes(String[] requiredRoles) {
    this(requiredRoles, LossAction.NO_ACCESS, ResumptionAction.REINITIALIZE);
  }

  /**
   * Creates a new MembershipAttributes with the specified required role names,
   * reliability policy, and resumption action.
   *
   * @param requiredRoles array of role names required by this process for reliable access to the
   *        region
   * @param lossAction the configuration defining how this process behaves when there are missing
   *        required roles
   * @param resumptionAction the action to take when missing required roles return to the system
   * @throws IllegalArgumentException if the resumptionAction is incompatible with the lossAction or
   *         if no requiredRoles are specified
   */
  public MembershipAttributes(String[] requiredRoles, LossAction lossAction,
      ResumptionAction resumptionAction) {
    this.requiredRoles = toRoleSet(requiredRoles);
    if (this.requiredRoles.isEmpty()) {
      throw new IllegalArgumentException(
          LocalizedStrings.MembershipAttributes_ONE_OR_MORE_REQUIRED_ROLES_MUST_BE_SPECIFIED
              .toLocalizedString());
    }
    this.lossAction = lossAction;
    this.resumptionAction = resumptionAction;
  }

  /**
   * Returns the set of {@linkplain org.apache.geode.distributed.Role Role}s that are required for
   * the reliability of this region.
   */
  public Set<Role> getRequiredRoles() {
    return Collections.unmodifiableSet(this.requiredRoles);
  }

  /**
   * Returns true if there are one or more required roles specified.
   */
  public boolean hasRequiredRoles() {
    return !this.requiredRoles.isEmpty();
  }

  /**
   * Returns the reliability policy that describes behavior if any required roles are missing.
   */
  public LossAction getLossAction() {
    return this.lossAction;
  }

  /**
   * Returns the resumption action that describes behavior when
   */
  public ResumptionAction getResumptionAction() {
    return this.resumptionAction;
  }

  private Set<Role> toRoleSet(String[] roleNames) {
    if (roleNames == null || roleNames.length == 0) {
      return Collections.emptySet();
    }
    Set<Role> roleSet = new HashSet<Role>();
    for (int i = 0; i < roleNames.length; i++) {
      roleSet.add(InternalRole.getRole(roleNames[i]));
    }
    return roleSet;
  }

  /**
   * Indicates whether some other object is "equal to" this one.
   *
   * @param other the reference object with which to compare.
   * @return true if this object is the same as the obj argument; false otherwise.
   */
  @Override
  public boolean equals(Object other) {
    if (other == this)
      return true;
    if (other == null)
      return false;
    if (!(other instanceof MembershipAttributes))
      return false;
    final MembershipAttributes that = (MembershipAttributes) other;

    if (this.requiredRoles != that.requiredRoles
        && !(this.requiredRoles != null && this.requiredRoles.equals(that.requiredRoles)))
      return false;
    if (this.lossAction != that.lossAction
        && !(this.lossAction != null && this.lossAction.equals(that.lossAction)))
      return false;
    if (this.resumptionAction != that.resumptionAction
        && !(this.resumptionAction != null && this.resumptionAction.equals(that.resumptionAction)))
      return false;

    return true;
  }

  /**
   * Returns a hash code for the object. This method is supported for the benefit of hashtables such
   * as those provided by java.util.Hashtable.
   *
   * @return the integer 0 if description is null; otherwise a unique integer.
   */
  @Override
  public int hashCode() {
    int result = 17;
    final int mult = 37;

    result = mult * result + (this.requiredRoles == null ? 0 : this.requiredRoles.hashCode());
    result = mult * result + (this.lossAction == null ? 0 : this.lossAction.hashCode());
    result = mult * result + (this.resumptionAction == null ? 0 : this.resumptionAction.hashCode());

    return result;
  }

  /**
   * Returns a string representation of the object.
   *
   * @return a string representation of the object
   */
  @Override
  public String toString() {
    if (!hasRequiredRoles()) {
      return "RequiredRoles(none)";
    } else {
      final StringBuffer sb = new StringBuffer();
      sb.append("RequiredRoles(");
      boolean comma = false;
      for (Iterator<Role> iter = this.requiredRoles.iterator(); iter.hasNext();) {
        if (comma)
          sb.append(",");
        Role role = iter.next();
        sb.append(role.getName());
        comma = true;
      }
      sb.append("); Policy:");
      sb.append(this.lossAction.toString());
      sb.append("; Action:");
      sb.append(this.resumptionAction.toString());
      return sb.toString();
    }
  }

  public void toData(DataOutput out) throws IOException {
    String[] names = new String[this.requiredRoles.size()];
    Iterator<Role> iter = this.requiredRoles.iterator();
    for (int i = 0; i < names.length; i++) {
      names[i] = iter.next().getName();
    }
    DataSerializer.writeStringArray(names, out);
    out.writeByte(this.lossAction.ordinal);
    out.writeByte(this.resumptionAction.ordinal);
  }

  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
    this.requiredRoles = toRoleSet(DataSerializer.readStringArray(in));
    this.lossAction = LossAction.fromOrdinal(in.readByte());
    this.resumptionAction = ResumptionAction.fromOrdinal(in.readByte());
  }

  public void writeExternal(ObjectOutput out) throws IOException {
    // added to fix bug 36619
    toData(out);
  }

  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    // added to fix bug 36619
    fromData(in);
  }
}


text:
namespace StateMachineSamples.Samples
{
    public class StateInheritance
    {
        private enum StateEnum { Common, A, End, B }
        private StateEnum state = StateEnum.A;
        public void M()
        {
            if (state == StateEnum.A)
            {
                state = StateEnum.End;
                return;
            }
            if (state == StateEnum.B)
            {
                state = StateEnum.End;
                return;
            }
        }
        public void P()
        {
            if (state == StateEnum.A)
            {
                state = StateEnum.B;
                return;
            }
            if (state == StateEnum.B)
            {
                state = StateEnum.A;
                return;
            }
        }
    }
}


text:
MachineName=Dante_Aylward
BuildType=Release
CTestCommand=/Applications/CMake.app/Contents/bin/ctest
DashboardDir=/Users/aylward/src/dashboards

echo "Running TubeTK Dashboard script"
if [ $# -eq 0 ] || [ "$1" != "NoUpdate" ]; then

  echo "Updating"
  rm -rf ${DashboardDir}/TubeTK-${BuildType}

  # Update Dashboard repository
  cd ${DashboardDir}/TubeTK-DashboardScripts
  git pull -f

  echo "Bootstrapping"
  # Get new nightly script
  cp -f ${MachineName}_TubeTK_Nightly.sh ..
  cd ..
  chmod +x ${MachineName}_TubeTK_Nightly.sh

  # Run new nightly script without updating again
  ./${MachineName}_TubeTK_Nightly.sh NoUpdate

else

# Run the nightly
echo "Running nightly ctest"
${CTestCommand} -D Nightly -D SITE_CTEST_MODE:STRING=Nightly -D SITE_BUILD_TYPE:STRING=${BuildType} -S TubeTK-DashboardScripts/${MachineName}_TubeTK.cmake -V -VV -O ${MachineName}_TubeTK_Nightly.log

echo "Running continuous ctest"
${CTestCommand} -D Continuous -D SITE_CTEST_MODE:STRING=Continuous -D SITE_BUILD_TYPE:STRING=${BuildType} -S TubeTK-DashboardScripts/${MachineName}_TubeTK.cmake -V -VV -O ${MachineName}_TubeTK_Continuous.log

fi

echo "Ending TubeTK dashboard script"