text:
var SpecDisplay = function (options, displayProcessors) {
  this.indent = '  ';
  this.currentIndent = '';
  this.suiteHierarchy = [];
  this.suiteHierarchyDisplayed = [];
  this.successfulSpecs = [];
  this.failedSpecs = [];
  this.pendingSpecs = [];
  this.lastWasNewLine = false;
  this.displaySuccessesSummary = options.displaySuccessesSummary || false;
  this.displayFailuresSummary = options.displayFailuresSummary !== false;
  this.displayPendingSummary = options.displayPendingSummary !== false;
  this.displaySuccessfulSpec = options.displaySuccessfulSpec !== false;
  this.displayFailedSpec = options.displayFailedSpec !== false;
  this.displayPendingSpec = options.displayPendingSpec || false;
  this.displayWithoutColors = options.colors === false;
  this.hasCustomDisplaySpecStarted = options.hasCustomDisplaySpecStarted;
  this.displayProcessors = displayProcessors;

  var displayStacktrace = options.displayStacktrace || 'none';
  this.displaySpecsWithStacktrace = displayStacktrace === 'all' || displayStacktrace === 'specs';
  this.displaySummaryWithStacktrace = displayStacktrace === 'all' || displayStacktrace === 'summary';
};

SpecDisplay.prototype = {
  jasmineStarted: function (runner) {
    var log = null;
    this.displayProcessors.forEach(function (displayProcessor) {
      log = displayProcessor.displayJasmineStarted(runner, log);
    });
    this.log(log);
  },

  summary: function (metrics) {
    var execution = 'Executed ' + metrics.executedSpecs + ' of ' + metrics.totalSpecsDefined + (metrics.totalSpecsDefined === 1 ? ' spec ' : ' specs ');
    var successful = (metrics.failedSpecs === 0) ? 'SUCCESS ' : '';
    var failed = (metrics.failedSpecs > 0) ? '(' + metrics.failedSpecs + ' FAILED) ' : '';
    var pending = (metrics.pendingSpecs > 0) ? '(' + metrics.pendingSpecs + ' PENDING) ' : '';
    var skipped = (metrics.skippedSpecs > 0) ? '(' + metrics.skippedSpecs + ' SKIPPED) ' : '';
    var duration = 'in ' + metrics.duration + '.';

    this.resetIndent();
    this.newLine();
    if (this.displaySuccessesSummary && metrics.successfulSpecs > 0) {
      this.successesSummary();
    }
    if (this.displayFailuresSummary && metrics.failedSpecs > 0) {
      this.failuresSummary();
    }
    if (this.displayPendingSummary && metrics.pendingSpecs > 0) {
      this.pendingsSummary();
    }
    this.log(execution + successful.success + failed.failure + pending.pending + skipped + duration);

    if (metrics.random) {
      this.log('Randomized with seed ' + metrics.seed + '.');
    }
  },

  successesSummary: function () {
    this.log("**************************************************");
    this.log("*                   Successes                    *");
    this.log("**************************************************");
    this.newLine();
    for (var i = 0 ; i < this.successfulSpecs.length ; i++) {
      this.successfulSummary(this.successfulSpecs[i], i + 1);
      this.newLine();
    }
    this.newLine();
    this.resetIndent();
  },

  successfulSummary: function (spec, index) {
    this.log(index + ') ' + spec.fullName);
  },

  failuresSummary: function () {
    this.log("**************************************************");
    this.log("*                    Failures                    *");
    this.log("**************************************************");
    this.newLine();
    for (var i = 0 ; i < this.failedSpecs.length ; i++) {
      this.failedSummary(this.failedSpecs[i], i + 1);
      this.newLine();
    }
    this.newLine();
    this.resetIndent();
  },

  failedSummary: function (spec, index) {
    this.log(index + ') ' + spec.fullName);
    this.displayErrorMessages(spec, this.displaySummaryWithStacktrace);
  },

  pendingsSummary: function () {
    this.log("**************************************************");
    this.log("*                    Pending                     *");
    this.log("**************************************************");
    this.newLine();
    for (var i = 0 ; i < this.pendingSpecs.length ; i++) {
      this.pendingSummary(this.pendingSpecs[i], i + 1);
      this.newLine();
    }
    this.newLine();
    this.resetIndent();
  },

  pendingSummary: function (spec, index) {
    this.log(index + ') ' + spec.fullName);
    this.increaseIndent();
    var pendingReason = spec.pendingReason ? spec.pendingReason : 'No reason given';
    this.log(pendingReason.pending);
    this.resetIndent();
  },

  specStarted: function (spec) {
    if (this.hasCustomDisplaySpecStarted) {
      this.ensureSuiteDisplayed();
      var log = null;
      this.displayProcessors.forEach(function (displayProcessor) {
        log = displayProcessor.displaySpecStarted(spec, log);
      });
      this.log(log);
    }
  },

  successful: function (spec) {
    this.successfulSpecs.push(spec);
    if (this.displaySuccessfulSpec) {
      this.ensureSuiteDisplayed();
      var log = null;
      this.displayProcessors.forEach(function (displayProcessor) {
        log = displayProcessor.displaySuccessfulSpec(spec, log);
      });
      this.log(log);
    }
  },

  failed: function (spec) {
    this.failedSpecs.push(spec);
    if (this.displayFailedSpec) {
      this.ensureSuiteDisplayed();
      var log = null;
      this.displayProcessors.forEach(function (displayProcessor) {
        log = displayProcessor.displayFailedSpec(spec, log);
      });
      this.log(log);
      this.displayErrorMessages(spec, this.displaySpecsWithStacktrace);
    }
  },

  pending: function (spec) {
    this.pendingSpecs.push(spec);
    if (this.displayPendingSpec) {
      this.ensureSuiteDisplayed();
      var log = null;
      this.displayProcessors.forEach(function (displayProcessor) {
        log = displayProcessor.displayPendingSpec(spec, log);
      });
      this.log(log);
    }
  },

  displayErrorMessages: function (spec, withStacktrace) {
    this.increaseIndent();
    for (var i = 0; i < spec.failedExpectations.length; i++) {
      this.log('- '.failure + spec.failedExpectations[i].message.failure);
      if (withStacktrace && spec.failedExpectations[i].stack) {
        this.log(this.filterStackTraces(spec.failedExpectations[i].stack));
      }
    }
    this.decreaseIndent();
  },

  filterStackTraces: function (traces) {
    var lines = traces.split('\n');
    var filtered = [];
    for (var i = 1 ; i < lines.length ; i++) {
      if (!/(jasmine[^\/]*\.js|Timer\.listOnTimeout)/.test(lines[i])) {
        filtered.push(lines[i]);
      }
    }
    return filtered.join('\n' + this.currentIndent);
  },

  suiteStarted: function (suite) {
    this.suiteHierarchy.push(suite);
  },

  suiteDone: function () {
    var suite = this.suiteHierarchy.pop();
    if (this.suiteHierarchyDisplayed[this.suiteHierarchyDisplayed.length - 1] === suite) {
      this.suiteHierarchyDisplayed.pop();
    }
    this.newLine();
    this.decreaseIndent();
  },

  ensureSuiteDisplayed: function () {
    if (this.suiteHierarchy.length !== 0) {
      for (var i = this.suiteHierarchyDisplayed.length ; i < this.suiteHierarchy.length; i++) {
        this.suiteHierarchyDisplayed.push(this.suiteHierarchy[i]);
        this.displaySuite(this.suiteHierarchy[i]);
      }
    } else {
      var topLevelSuite = { description: 'Top level suite' };
      this.suiteHierarchy.push(topLevelSuite);
      this.suiteHierarchyDisplayed.push(topLevelSuite);
      this.displaySuite(topLevelSuite);
    }
  },

  displaySuite: function (suite) {
    this.newLine();
    this.computeSuiteIndent(suite);
    var log = null;
    this.displayProcessors.forEach(function (displayProcessor) {
      log = displayProcessor.displaySuite(suite, log);
    });
    this.log(log);
    this.increaseIndent();
  },

  computeSuiteIndent: function () {
    this.resetIndent();
    for (var i = 0 ; i < this.suiteHierarchyDisplayed.length ; i++) {
      this.increaseIndent();
    }
  },

  log: function (stuff) {
    if (stuff !== null) {
      if (this.displayWithoutColors) {
        stuff = stuff.stripColors;
      }
      console.log(this.currentIndent + stuff);
      this.lastWasNewLine = false;
    }
  },

  newLine: function () {
    if (!this.lastWasNewLine) {
      console.log('');
      this.lastWasNewLine = true;
    }
  },

  resetIndent: function () {
    this.currentIndent = '';
  },

  increaseIndent: function () {
    this.currentIndent += this.indent;
  },

  decreaseIndent: function () {
    this.currentIndent = this.currentIndent.substr(0, this.currentIndent.length - this.indent.length);
  }
};

module.exports = SpecDisplay;


text:
#ifndef __SMC_H__
#define __SMC_H__
#endif

#define VERSION "0.01"

#define KERNEL_INDEX_SMC 2

#define SMC_CMD_READ_BYTES 5
#define SMC_CMD_WRITE_BYTES 6
#define SMC_CMD_READ_INDEX 8
#define SMC_CMD_READ_KEYINFO 9
#define SMC_CMD_READ_PLIMIT 11
#define SMC_CMD_READ_VERS 12

#define DATATYPE_FPE2 "fpe2"
#define DATATYPE_UINT8 "ui8 "
#define DATATYPE_UINT16 "ui16"
#define DATATYPE_UINT32 "ui32"
#define DATATYPE_SP78 "sp78"

// key values
#define SMC_KEY_CPU_TEMP "TC0P"
#define SMC_KEY_FAN_NUMBER "FNum"
#define SMC_PKEY_FAN_RPM "F%dAc"

typedef struct
{
  char major;
  char minor;
  char build;
  char reserved[1];
  UInt16 release;
} SMCKeyData_vers_t;

typedef struct
{
  UInt16 version;
  UInt16 length;
  UInt32 cpuPLimit;
  UInt32 gpuPLimit;
  UInt32 memPLimit;
} SMCKeyData_pLimitData_t;

typedef struct
{
  UInt32 dataSize;
  UInt32 dataType;
  char dataAttributes;
} SMCKeyData_keyInfo_t;

typedef char SMCBytes_t[32];

typedef struct
{
  UInt32 key;
  SMCKeyData_vers_t vers;
  SMCKeyData_pLimitData_t pLimitData;
  SMCKeyData_keyInfo_t keyInfo;
  char result;
  char status;
  char data8;
  UInt32 data32;
  SMCBytes_t bytes;
} SMCKeyData_t;

typedef char UInt32Char_t[5];

typedef struct
{
  UInt32Char_t key;
  UInt32 dataSize;
  UInt32Char_t dataType;
  SMCBytes_t bytes;
} SMCVal_t;

// prototypes
double SMCGetTemperature(char *key);
kern_return_t SMCSetFanRpm(char *key, int rpm);
int SMCGetFanRpm(char *key);

redpajama_set_name: RedPajamaGithub


text:
package com.epam.reportportal.auth.config.saml;

import com.epam.reportportal.auth.integration.AuthIntegrationType;
import com.epam.reportportal.auth.integration.converter.SamlConverter;
import com.epam.reportportal.auth.util.CertificationUtil;
import com.epam.reportportal.auth.util.RequestUtil;
import com.epam.ta.reportportal.dao.IntegrationRepository;
import com.epam.ta.reportportal.dao.IntegrationTypeRepository;
import com.epam.ta.reportportal.entity.integration.Integration;
import com.epam.ta.reportportal.entity.integration.IntegrationType;
import com.google.common.collect.Lists;
import org.opensaml.saml.saml2.core.NameID;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.saml.key.SimpleKey;
import org.springframework.security.saml.provider.SamlServerConfiguration;
import org.springframework.security.saml.provider.config.NetworkConfiguration;
import org.springframework.security.saml.provider.config.RotatingKeys;
import org.springframework.security.saml.provider.service.config.ExternalIdentityProviderConfiguration;
import org.springframework.security.saml.provider.service.config.LocalServiceProviderConfiguration;
import org.springframework.util.CollectionUtils;

import javax.inject.Provider;
import javax.servlet.http.HttpServletRequest;
import java.security.PrivateKey;
import java.security.cert.CertificateEncodingException;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.CopyOnWriteArrayList;

import static com.epam.reportportal.auth.integration.parameter.SamlParameter.BASE_PATH;
import static java.util.Base64.getEncoder;
import static java.util.Optional.ofNullable;

/**
 * SAML service provider configuration based on application settings
 *
 * @author Yevgeniy Svalukhin
 */
@Configuration
public class SamlServiceProviderConfiguration {

	@Value("${rp.auth.saml.base-path}")
	private String basePath;

	@Value("${rp.auth.saml.entity-id}")
	private String entityId;

	@Value("${rp.auth.saml.key-alias}")
	private String keyAlias;

	@Value("${rp.auth.saml.key-password}")
	private String keyPassword;

	@Value("${rp.auth.saml.key-store}")
	private String keyStore;

	@Value("${rp.auth.saml.key-store-password}")
	private String keyStorePassword;

	@Value("${rp.auth.saml.active-key-name}")
	private String activeKeyName;

	@Value("${rp.auth.saml.network-connection-timeout}")
	private Integer networkConnectTimeout;

	@Value("${rp.auth.saml.network-read-timeout}")
	private Integer networkReadTimeout;

	@Value("${rp.auth.saml.signed-requests}")
	private Boolean signedRequests;

	@Value("${rp.auth.saml.prefix}")
	private String prefix;

	@Autowired
	private Provider<HttpServletRequest> requestProvider;

	private IntegrationTypeRepository integrationTypeRepository;

	private IntegrationRepository integrationRepository;

	public SamlServiceProviderConfiguration(IntegrationTypeRepository integrationTypeRepository,
			IntegrationRepository integrationRepository) {
		this.integrationTypeRepository = integrationTypeRepository;
		this.integrationRepository = integrationRepository;
	}

	@Bean(name = "spConfiguration")
	public SamlServerConfiguration samlServerConfiguration() {
		return new SamlServerConfiguration().setServiceProvider(serviceProviderConfiguration()).setNetwork(networkConfiguration());
	}

	private NetworkConfiguration networkConfiguration() {
		return new NetworkConfiguration().setConnectTimeout(networkConnectTimeout).setReadTimeout(networkReadTimeout);

	}

	private LocalServiceProviderConfiguration serviceProviderConfiguration() {
		LocalServiceProviderConfiguration serviceProviderConfiguration = new LocalServiceProviderConfigurationDelegate(
				integrationTypeRepository);
		serviceProviderConfiguration.setSignRequests(signedRequests)
				.setWantAssertionsSigned(signedRequests)
				.setEntityId(entityId)
				.setAlias(keyAlias)
				.setSignMetadata(signedRequests)
				.setSingleLogoutEnabled(true)
				.setNameIds(Arrays.asList(NameID.EMAIL, NameID.PERSISTENT, NameID.UNSPECIFIED))
				.setKeys(rotatingKeys())
				.setProviders(providers())
				.setPrefix(prefix)
				.setBasePath(basePath);
		return serviceProviderConfiguration;
	}

	private List<ExternalIdentityProviderConfiguration> providers() {
		Optional<IntegrationType> saml = integrationTypeRepository.findByName(AuthIntegrationType.SAML.getName());
		List<Integration> providers = Lists.newArrayList();
		if (saml.isPresent()) {
			providers = integrationRepository.findAllGlobalByType(saml.get());
		}

		if (CollectionUtils.isEmpty(providers)) {
			return new CopyOnWriteArrayList<>();
		}

		return new CopyOnWriteArrayList<>(SamlConverter.TO_EXTERNAL_PROVIDER_CONFIG.apply(providers));
	}

	private RotatingKeys rotatingKeys() {
		return new RotatingKeys().setActive(activeKey()).setStandBy(standbyKeys());
	}

	private List<SimpleKey> standbyKeys() {
		return Collections.emptyList();
	}

	private SimpleKey activeKey() {

		if (signedRequests) {
			X509Certificate certificate = CertificationUtil.getCertificateByName(keyAlias, keyStore, keyStorePassword);
			PrivateKey privateKey = CertificationUtil.getPrivateKey(keyAlias, keyPassword, keyStore, keyStorePassword);

			try {
				return new SimpleKey().setCertificate(getEncoder().encodeToString(certificate.getEncoded()))
						.setPassphrase(keyPassword)
						.setPrivateKey(getEncoder().encodeToString(privateKey.getEncoded()))
						.setName(activeKeyName);
			} catch (CertificateEncodingException e) {
				e.printStackTrace();
			}
		}
		return new SimpleKey();
	}

	public class LocalServiceProviderConfigurationDelegate extends LocalServiceProviderConfiguration {

		private final IntegrationTypeRepository integrationTypeRepository;

		public LocalServiceProviderConfigurationDelegate(IntegrationTypeRepository integrationTypeRepository) {
			this.integrationTypeRepository = integrationTypeRepository;
		}

		@Override
		public String getBasePath() {
			return integrationTypeRepository.findByName(AuthIntegrationType.SAML.getName())
					.flatMap(it -> Optional.ofNullable(it.getDetails()))
					.flatMap(d -> Optional.ofNullable(d.getDetails()))
					.flatMap(BASE_PATH::getParameter)
					.orElseGet(() -> ofNullable(basePath).orElseGet(() -> ofNullable(requestProvider.get()).map(RequestUtil::getRequestBasePath)
							.orElse("/")));
		}
	}

}


text:
/**
 * Autogenerated by Thrift for thrift/compiler/test/fixtures/basic/src/module.thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated @nocommit
 */

#include "thrift/compiler/test/fixtures/basic/gen-cpp2/FooServiceAsyncClient.h"

#include <thrift/lib/cpp2/gen/client_cpp.h>

namespace test { namespace fixtures { namespace basic {
typedef apache::thrift::ThriftPresult<false> FooService_simple_rpc_pargs;
typedef apache::thrift::ThriftPresult<true> FooService_simple_rpc_presult;
}}} // test::fixtures::basic
template <typename Protocol_, typename RpcOptions>
void apache::thrift::Client<::test::fixtures::basic::FooService>::simple_rpcT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback) {

  ::test::fixtures::basic::FooService_simple_rpc_pargs args;
  auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); };
  auto writer = [&](Protocol_* p) { args.write(p); };

  static ::apache::thrift::MethodMetadata::Data* methodMetadata =
        new ::apache::thrift::MethodMetadata::Data(
                "simple_rpc",
                ::apache::thrift::FunctionQualifier::Unspecified,
                "test.dev/fixtures/basic/FooService");
  apache::thrift::clientSendT<apache::thrift::RpcKind::SINGLE_REQUEST_SINGLE_RESPONSE, Protocol_>(prot, std::forward<RpcOptions>(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer);
}

void apache::thrift::Client<::test::fixtures::basic::FooService>::simple_rpc(std::unique_ptr<apache::thrift::RequestCallback> callback) {
  ::apache::thrift::RpcOptions rpcOptions;
  simple_rpc(rpcOptions, std::move(callback));
}

void apache::thrift::Client<::test::fixtures::basic::FooService>::simple_rpc(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback) {
  auto [ctx, header] = simple_rpcCtx(&rpcOptions);
  apache::thrift::RequestCallback::Context callbackContext;
  callbackContext.protocolId =
      apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
  auto* contextStack = ctx.get();
  if (callback) {
    callbackContext.ctx = std::move(ctx);
  }
  auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext));
  simple_rpcImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback));
}

void apache::thrift::Client<::test::fixtures::basic::FooService>::simple_rpcImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions) {
  switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) {
    case apache::thrift::protocol::T_BINARY_PROTOCOL:
    {
      apache::thrift::BinaryProtocolWriter writer;
      if (stealRpcOptions) {
        simple_rpcT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback));
      } else {
        simple_rpcT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback));
      }
      break;
    }
    case apache::thrift::protocol::T_COMPACT_PROTOCOL:
    {
      apache::thrift::CompactProtocolWriter writer;
      if (stealRpcOptions) {
        simple_rpcT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback));
      } else {
        simple_rpcT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback));
      }
      break;
    }
    default:
    {
      apache::thrift::detail::ac::throw_app_exn("Could not find Protocol");
    }
  }
}

std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::test::fixtures::basic::FooService>::simple_rpcCtx(apache::thrift::RpcOptions* rpcOptions) {
  auto header = std::make_shared<apache::thrift::transport::THeader>(
      apache::thrift::transport::THeader::ALLOW_BIG_FRAMES);
  header->setProtocolId(channel_->getProtocolId());
  if (rpcOptions) {
    header->setHeaders(rpcOptions->releaseWriteHeaders());
  }

  auto ctx = apache::thrift::ContextStack::createWithClientContext(
      handlers_,
      getServiceName(),
      "FooService.simple_rpc",
      *header);

  return {std::move(ctx), std::move(header)};
}

void apache::thrift::Client<::test::fixtures::basic::FooService>::sync_simple_rpc() {
  ::apache::thrift::RpcOptions rpcOptions;
  sync_simple_rpc(rpcOptions);
}

void apache::thrift::Client<::test::fixtures::basic::FooService>::sync_simple_rpc(apache::thrift::RpcOptions& rpcOptions) {
  apache::thrift::ClientReceiveState returnState;
  apache::thrift::ClientSyncCallback<false> callback(&returnState);
  auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
  auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase();
  auto ctxAndHeader = simple_rpcCtx(&rpcOptions);
  auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback);
  callback.waitUntilDone(
    evb,
    [&] {
      simple_rpcImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback));
    });

  if (returnState.isException()) {
    returnState.exception().throw_exception();
  }
  returnState.resetProtocolId(protocolId);
  returnState.resetCtx(std::move(ctxAndHeader.first));
  SCOPE_EXIT {
    if (returnState.header() && !returnState.header()->getHeaders().empty()) {
      rpcOptions.setReadHeaders(returnState.header()->releaseHeaders());
    }
  };
  return folly::fibers::runInMainContext([&] {
      recv_simple_rpc(returnState);
  });
}

folly::Future<folly::Unit> apache::thrift::Client<::test::fixtures::basic::FooService>::future_simple_rpc() {
  ::apache::thrift::RpcOptions rpcOptions;
  return future_simple_rpc(rpcOptions);
}

folly::SemiFuture<folly::Unit> apache::thrift::Client<::test::fixtures::basic::FooService>::semifuture_simple_rpc() {
  ::apache::thrift::RpcOptions rpcOptions;
  return semifuture_simple_rpc(rpcOptions);
}

folly::Future<folly::Unit> apache::thrift::Client<::test::fixtures::basic::FooService>::future_simple_rpc(apache::thrift::RpcOptions& rpcOptions) {
  folly::Promise<folly::Unit> promise;
  auto future = promise.getFuture();
  auto callback = std::make_unique<apache::thrift::FutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_simple_rpc, channel_);
  simple_rpc(rpcOptions, std::move(callback));
  return future;
}

folly::SemiFuture<folly::Unit> apache::thrift::Client<::test::fixtures::basic::FooService>::semifuture_simple_rpc(apache::thrift::RpcOptions& rpcOptions) {
  auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_simple_rpc, channel_);
  auto callback = std::move(callbackAndFuture.first);
  simple_rpc(rpcOptions, std::move(callback));
  return std::move(callbackAndFuture.second);
}

folly::Future<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> apache::thrift::Client<::test::fixtures::basic::FooService>::header_future_simple_rpc(apache::thrift::RpcOptions& rpcOptions) {
  folly::Promise<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> promise;
  auto future = promise.getFuture();
  auto callback = std::make_unique<apache::thrift::HeaderFutureCallback<folly::Unit>>(std::move(promise), recv_wrapped_simple_rpc, channel_);
  simple_rpc(rpcOptions, std::move(callback));
  return future;
}

folly::SemiFuture<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> apache::thrift::Client<::test::fixtures::basic::FooService>::header_semifuture_simple_rpc(apache::thrift::RpcOptions& rpcOptions) {
  auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_simple_rpc, channel_);
  auto callback = std::move(callbackAndFuture.first);
  simple_rpc(rpcOptions, std::move(callback));
  return std::move(callbackAndFuture.second);
}

void apache::thrift::Client<::test::fixtures::basic::FooService>::simple_rpc(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback) {
  simple_rpc(std::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)));
}

#if FOLLY_HAS_COROUTINES
#endif // FOLLY_HAS_COROUTINES
folly::exception_wrapper apache::thrift::Client<::test::fixtures::basic::FooService>::recv_wrapped_simple_rpc(::apache::thrift::ClientReceiveState& state) {
  if (state.isException()) {
    return std::move(state.exception());
  }
  if (!state.hasResponseBuffer()) {
    return folly::make_exception_wrapper<apache::thrift::TApplicationException>("recv_ called without result");
  }

  using result = ::test::fixtures::basic::FooService_simple_rpc_presult;
  switch (state.protocolId()) {
    case apache::thrift::protocol::T_BINARY_PROTOCOL:
    {
      apache::thrift::BinaryProtocolReader reader;
      return apache::thrift::detail::ac::recv_wrapped<result>(
          &reader, state);
    }
    case apache::thrift::protocol::T_COMPACT_PROTOCOL:
    {
      apache::thrift::CompactProtocolReader reader;
      return apache::thrift::detail::ac::recv_wrapped<result>(
          &reader, state);
    }
    default:
    {
    }
  }
  return folly::make_exception_wrapper<apache::thrift::TApplicationException>("Could not find Protocol");
}

void apache::thrift::Client<::test::fixtures::basic::FooService>::recv_simple_rpc(::apache::thrift::ClientReceiveState& state) {
  auto ew = recv_wrapped_simple_rpc(state);
  if (ew) {
    ew.throw_exception();
  }
}

void apache::thrift::Client<::test::fixtures::basic::FooService>::recv_instance_simple_rpc(::apache::thrift::ClientReceiveState& state) {
  recv_simple_rpc(state);
}

folly::exception_wrapper apache::thrift::Client<::test::fixtures::basic::FooService>::recv_instance_wrapped_simple_rpc(::apache::thrift::ClientReceiveState& state) {
  return recv_wrapped_simple_rpc(state);
}


text:
package com.panzareon.spellcircles.spell.parts;

import com.panzareon.spellcircles.exception.MissingAuraException;
import com.panzareon.spellcircles.spell.SpellPart;
import com.panzareon.spellcircles.spell.SpellPartValue;
import com.panzareon.spellcircles.spell.SpellReturnTypes;
import net.minecraft.world.storage.WorldInfo;

public class SpellPartClearWeather extends SpellPart
{
    private final int AuraUse = 1100;

    @Override
    public String getSpellName()
    {
        return "FLFBNI";
    }

    @Override
    public String getSpellId()
    {
        return "clear_weather";
    }

    @Override
    public int getNrOfChildren()
    {
        return 0;
    }

    @Override
    public SpellReturnTypes[] getReturnValueTypes()
    {
        return new SpellReturnTypes[]{SpellReturnTypes.ACTION};
    }

    @Override
    protected SpellPartValue cast(SpellPartValue[] childValues) throws MissingAuraException
    {
        if(environ.useAura(AuraUse, environ.strength))
        {
            WorldInfo worldInfo = environ.getCaster().worldObj.getWorldInfo();
            worldInfo.setRaining(false);
            worldInfo.setThundering(false);
        }
        return new SpellPartValue();
    }
}


text:
package no.nordicsemi.android.support.v18.scanner;

import android.Manifest;
import android.app.PendingIntent;
import android.content.Context;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * This class provides methods to perform scan related operations for Bluetooth LE devices. An
 * application can scan for a particular type of Bluetooth LE devices using {@link ScanFilter}. It
 * can also request different types of callbacks for delivering the result.
 *

 * Use {@link BluetoothLeScannerCompat#getScanner()} to get an instance of the scanner.
 *

 * Since version 1.3.0 of the Scanner Compar Library library,
 * {@link PendingIntentReceiver} and {@link ScannerService} will be added to AndroidManifest
 * whether the scanning with {@link PendingIntent} feature is used or not.
 * The {@link ScannerService} is used to emulate such scanning on platforms
 * before Oreo, while {@link PendingIntentReceiver} is used to translate from native
 * {@link android.bluetooth.le.ScanResult} to compat {@link ScanResult} and apply additional
 * filtering.
 *

 * Note: Most of the scan methods here require
 * {@link Manifest.permission#BLUETOOTH_ADMIN} permission.
 *
 * @see ScanFilter
 */
@SuppressWarnings({"WeakerAccess", "unused"})
public abstract class BluetoothLeScannerCompat {

	/**
	 * Extra containing a list of ScanResults. It can have one or more results if there was no
	 * error. In case of error, {@link #EXTRA_ERROR_CODE} will contain the error code and this
	 * extra will not be available.
	 */
	public static final String EXTRA_LIST_SCAN_RESULT =
			"android.bluetooth.le.extra.LIST_SCAN_RESULT";

	/**
	 * Optional extra indicating the error code, if any. The error code will be one of the
	 * SCAN_FAILED_* codes in {@link android.bluetooth.le.ScanCallback}.
	 */
	public static final String EXTRA_ERROR_CODE = "android.bluetooth.le.extra.ERROR_CODE";

	/**
	 * Optional extra indicating the callback type, which will be one of
	 * CALLBACK_TYPE_* constants in {@link android.bluetooth.le.ScanSettings}.
	 *
	 * @see android.bluetooth.le.ScanCallback#onScanResult(int, android.bluetooth.le.ScanResult)
	 */
	public static final String EXTRA_CALLBACK_TYPE = "android.bluetooth.le.extra.CALLBACK_TYPE";

	private static BluetoothLeScannerCompat instance;

	/**
	 * Returns the scanner compat object
	 * @return scanner implementation
	 */
	@NonNull
	public synchronized static BluetoothLeScannerCompat getScanner() {
		if (instance != null)
			return instance;
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
			return instance = new BluetoothLeScannerImplOreo();
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
			return instance = new BluetoothLeScannerImplMarshmallow();
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
			return instance = new BluetoothLeScannerImplLollipop();
		return instance = new BluetoothLeScannerImplJB();
	}

	/* package */ BluetoothLeScannerCompat() {}

	/**
	 * Start Bluetooth LE scan with default parameters and no filters. The scan results will be
	 * delivered through {@code callback}. For unfiltered scans, scanning is stopped on screen
	 * off to save power. Scanning is resumed when screen is turned on again. To avoid this, use
	 * {@link #startScan(List, ScanSettings, ScanCallback)} with desired {@link ScanFilter}.
	 *

	 * For apps targeting {@link Build.VERSION_CODES#R} or lower, this requires the
	 * {@link Manifest.permission#BLUETOOTH_ADMIN} permission which can be gained with a simple
	 * {@code <uses-permission>} manifest tag.
	 * For apps targeting {@link Build.VERSION_CODES#S} or or higher, this requires the
	 * {@link Manifest.permission#BLUETOOTH_SCAN} permission which can be gained with
	 * {@link android.app.Activity#requestPermissions(String[], int)}.
	 * In addition, this requires either the {@link Manifest.permission#ACCESS_FINE_LOCATION}
	 * permission or a strong assertion that you will never derive the physical location of the device.
	 * You can make this assertion by declaring {@code usesPermissionFlags="neverForLocation"}
	 * on the relevant {@code <uses-permission>} manifest tag, but it may restrict the types of
	 * Bluetooth devices you can interact with.
	 *
	 * @param callback Callback used to deliver scan results.
	 * @throws IllegalArgumentException If {@code callback} is null.
	 */
	public final void startScan(@NonNull final ScanCallback callback) {
		//noinspection ConstantConditions
		if (callback == null) {
			throw new IllegalArgumentException("callback is null");
		}
		final Handler handler = new Handler(Looper.getMainLooper());
		startScanInternal(Collections.emptyList(), new ScanSettings.Builder().build(),
				callback, handler);
	}

	/**
	 * Start Bluetooth LE scan. The scan results will be delivered through {@code callback}.
	 * For unfiltered scans, scanning is stopped on screen off to save power. Scanning is
	 * resumed when screen is turned on again. To avoid this, do filtered scanning by
	 * using proper {@link ScanFilter}.
	 *

	 * For apps targeting {@link Build.VERSION_CODES#R} or lower, this requires the
	 * {@link Manifest.permission#BLUETOOTH_ADMIN} permission which can be gained with a simple
	 * {@code <uses-permission>} manifest tag.
	 * For apps targeting {@link Build.VERSION_CODES#S} or or higher, this requires the
	 * {@link Manifest.permission#BLUETOOTH_SCAN} permission which can be gained with
	 * {@link android.app.Activity#requestPermissions(String[], int)}.
	 * In addition, this requires either the {@link Manifest.permission#ACCESS_FINE_LOCATION}
	 * permission or a strong assertion that you will never derive the physical location of the device.
	 * You can make this assertion by declaring {@code usesPermissionFlags="neverForLocation"}
	 * on the relevant {@code <uses-permission>} manifest tag, but it may restrict the types of
	 * Bluetooth devices you can interact with.
	 *
	 * @param filters {@link ScanFilter}s for finding exact BLE devices.
	 * @param settings Optional settings for the scan.
	 * @param callback Callback used to deliver scan results.
	 * @throws IllegalArgumentException If {@code settings} or {@code callback} is null.
	 */
	public final void startScan(@Nullable final List<ScanFilter> filters,
								@Nullable final ScanSettings settings,
								@NonNull  final ScanCallback callback) {
		//noinspection ConstantConditions
		if (callback == null) {
			throw new IllegalArgumentException("callback is null");
		}
		final Handler handler = new Handler(Looper.getMainLooper());
		startScanInternal(filters != null ? filters : Collections.emptyList(),
				settings != null ? settings : new ScanSettings.Builder().build(),
				callback, handler);
	}

	/**
	 * Start Bluetooth LE scan. The scan results will be delivered through {@code callback}.
	 * For unfiltered scans, scanning is stopped on screen off to save power. Scanning is
	 * resumed when screen is turned on again. To avoid this, do filtered scanning by
	 * using proper {@link ScanFilter}.
	 *

	 * For apps targeting {@link Build.VERSION_CODES#R} or lower, this requires the
	 * {@link Manifest.permission#BLUETOOTH_ADMIN} permission which can be gained with a simple
	 * {@code <uses-permission>} manifest tag.
	 * For apps targeting {@link Build.VERSION_CODES#S} or or higher, this requires the
	 * {@link Manifest.permission#BLUETOOTH_SCAN} permission which can be gained with
	 * {@link android.app.Activity#requestPermissions(String[], int)}.
	 * In addition, this requires either the {@link Manifest.permission#ACCESS_FINE_LOCATION}
	 * permission or a strong assertion that you will never derive the physical location of the device.
	 * You can make this assertion by declaring {@code usesPermissionFlags="neverForLocation"}
	 * on the relevant {@code <uses-permission>} manifest tag, but it may restrict the types of
	 * Bluetooth devices you can interact with.
	 *
	 * @param filters {@link ScanFilter}s for finding exact BLE devices.
	 * @param settings Optional settings for the scan.
	 * @param callback Callback used to deliver scan results.
	 * @param handler  Optional handler used to deliver results.
	 * @throws IllegalArgumentException If {@code settings} or {@code callback} is null.
	 */
	public final void startScan(@Nullable final List<ScanFilter> filters,
								@Nullable final ScanSettings settings,
								@NonNull  final ScanCallback callback,
								@Nullable final Handler handler) {
		//noinspection ConstantConditions
		if (callback == null) {
			throw new IllegalArgumentException("callback is null");
		}
		startScanInternal(filters != null ? filters : Collections.emptyList(),
				settings != null ? settings : new ScanSettings.Builder().build(),
				callback, handler != null ? handler : new Handler(Looper.getMainLooper()));
	}

	/**
	 * Stops an ongoing Bluetooth LE scan.
	 *

	 * For apps targeting {@link Build.VERSION_CODES#R} or lower, this requires the
	 * {@link Manifest.permission#BLUETOOTH_ADMIN} permission which can be gained with a simple
	 * {@code <uses-permission>} manifest tag.
	 * For apps targeting {@link Build.VERSION_CODES#S} or or higher, this requires the
	 * {@link Manifest.permission#BLUETOOTH_SCAN} permission which can be gained with
	 * {@link android.app.Activity#requestPermissions(String[], int)}.
	 *
	 * @param callback The callback used to start scanning.
	 */
	public final void stopScan(@NonNull final ScanCallback callback) {
		//noinspection ConstantConditions
		if (callback == null) {
			throw new IllegalArgumentException("callback is null");
		}
		stopScanInternal(callback);
	}

	/**
	 * Starts Bluetooth LE scan. Its implementation depends on the Android version.
	 *
	 * @param filters {@link ScanFilter}s for finding exact BLE devices.
	 * @param settings Settings for the scan.
	 * @param callback Callback used to deliver scan results.
	 * @param handler  Handler used to deliver results.
	 */
	/* package */ abstract void startScanInternal(@NonNull List<ScanFilter> filters,
												  @NonNull ScanSettings settings,
												  @NonNull ScanCallback callback,
												  @NonNull Handler handler);

	/**
	 * Stops an ongoing Bluetooth LE scan. Its implementation depends on the Android version.
	 *
	 * @param callback The callback used to start scanning.
	 */
	/* package */ abstract void stopScanInternal(@NonNull ScanCallback callback);

	/**
	 * Start Bluetooth LE scan using a {@link PendingIntent}. The scan results will be delivered
	 * via the PendingIntent. Use this method of scanning if your process is not always running
	 * and it should be started when scan results are available. On platforms before Oreo this
	 * will start {@link ScannerService} which will scan in background using given settings.
	 *

	 * Starting from Android Scanner Compat Library version 1.4.5, to start and stop a scan with
	 * Pending Intent a request code needs to he given. The code for stopping the scan must
	 * be the same as one used to start the scan. It can be the same request code that was
	 * used to create he Pending Intent.
	 *

	 * This method of scanning is intended to work in background. Long running scanning may
	 * consume a lot of battery, so it is recommended to use low power mode in settings,
	 * offloaded filtering and batching. However, the library may emulate batching, filtering or
	 * callback types {@link ScanSettings#CALLBACK_TYPE_FIRST_MATCH} and
	 * {@link ScanSettings#CALLBACK_TYPE_MATCH_LOST} if they are not supported.
	 *

	 * A {@link PendingIntentReceiver} and {@link ScannerService} will be added to AndroidManifest
	 * whether this feature is used or not.
	 *

	 * When the PendingIntent is delivered, the Intent passed to the receiver or activity will
	 * contain one or more of the extras {@link #EXTRA_CALLBACK_TYPE}, {@link #EXTRA_ERROR_CODE} and
	 * {@link #EXTRA_LIST_SCAN_RESULT} to indicate the result of the scan.
	 *

	 * For apps targeting {@link Build.VERSION_CODES#R} or lower, this requires the
	 * {@link Manifest.permission#BLUETOOTH_ADMIN} permission which can be gained with a simple
	 * {@code <uses-permission>} manifest tag.
	 * For apps targeting {@link Build.VERSION_CODES#S} or or higher, this requires the
	 * {@link Manifest.permission#BLUETOOTH_SCAN} permission which can be gained with
	 * {@link android.app.Activity#requestPermissions(String[], int)}.
	 * In addition, this requires either the {@link Manifest.permission#ACCESS_FINE_LOCATION}
	 * permission or a strong assertion that you will never derive the physical location of the device.
	 * You can make this assertion by declaring {@code usesPermissionFlags="neverForLocation"}
	 * on the relevant {@code <uses-permission>} manifest tag, but it may restrict the types of
	 * Bluetooth devices you can interact with.
	 *
	 * @param filters        {@link ScanFilter}s for finding exact BLE devices.
	 * @param settings       Optional settings for the scan.
	 * @param context        Context used to start {@link ScannerService}.
	 * @param callbackIntent The PendingIntent to deliver the result to.
	 * @param requestCode    The request code used to create the Pending Intent.
	 * @throws IllegalArgumentException If {@code settings} or {@code callback} is null.
	 * @since 1.4.5
	 */
	public final void startScan(@Nullable final List<ScanFilter> filters,
								@Nullable final ScanSettings settings,
								@NonNull  final Context context,
								@NonNull  final PendingIntent callbackIntent,
								final int requestCode) {
		//noinspection ConstantConditions
		if (callbackIntent == null) {
			throw new IllegalArgumentException("callbackIntent is null");
		}
		//noinspection ConstantConditions
		if (context == null) {
			throw new IllegalArgumentException("context is null");
		}
		startScanInternal(filters != null ? filters : Collections.emptyList(),
				settings != null ? settings : new ScanSettings.Builder().build(),
				context, callbackIntent, requestCode);
	}

	/**
	 * Start Bluetooth LE scan using a {@link PendingIntent}. The scan results will be delivered
	 * via the PendingIntent. Use this method of scanning if your process is not always running
	 * and it should be started when scan results are available. On platforms before Oreo this
	 * will start {@link ScannerService} which will scan in background using given settings.
	 *

	 * Starting from Android Scanner Compat Library version 1.4.5, to start and stop a scan with
	 * Pending Intent a request code needs to he given. The code for stopping the scan must
	 * be the same as one used to start the scan. It can be the same request code that was
	 * used to create he Pending Intent.
	 *

	 * This method of scanning is intended to work in background. Long running scanning may
	 * consume a lot of battery, so it is recommended to use low power mode in settings,
	 * offloaded filtering and batching. However, the library may emulate batching, filtering or
	 * callback types {@link ScanSettings#CALLBACK_TYPE_FIRST_MATCH} and
	 * {@link ScanSettings#CALLBACK_TYPE_MATCH_LOST} if they are not supported.
	 *

	 * A {@link PendingIntentReceiver} and {@link ScannerService} will be added to AndroidManifest
	 * whether this feature is used or not.
	 *

	 * When the PendingIntent is delivered, the Intent passed to the receiver or activity will
	 * contain one or more of the extras {@link #EXTRA_CALLBACK_TYPE}, {@link #EXTRA_ERROR_CODE} and
	 * {@link #EXTRA_LIST_SCAN_RESULT} to indicate the result of the scan.
	 *

	 * For apps targeting {@link Build.VERSION_CODES#R} or lower, this requires the
	 * {@link Manifest.permission#BLUETOOTH_ADMIN} permission which can be gained with a simple
	 * {@code <uses-permission>} manifest tag.
	 * For apps targeting {@link Build.VERSION_CODES#S} or or higher, this requires the
	 * {@link Manifest.permission#BLUETOOTH_SCAN} permission which can be gained with
	 * {@link android.app.Activity#requestPermissions(String[], int)}.
	 * In addition, this requires either the {@link Manifest.permission#ACCESS_FINE_LOCATION}
	 * permission or a strong assertion that you will never derive the physical location of the device.
	 * You can make this assertion by declaring {@code usesPermissionFlags="neverForLocation"}
	 * on the relevant {@code <uses-permission>} manifest tag, but it may restrict the types of
	 * Bluetooth devices you can interact with.
	 *
	 * @param filters        {@link ScanFilter}s for finding exact BLE devices.
	 * @param settings       Optional settings for the scan.
	 * @param context        Context used to start {@link ScannerService}.
	 * @param callbackIntent The PendingIntent to deliver the result to.
	 * @throws IllegalArgumentException If {@code settings} or {@code callback} is null.
	 * @see #startScan(List, ScanSettings, Context, PendingIntent, int)
	 */
	public final void startScan(@Nullable final List<ScanFilter> filters,
								@Nullable final ScanSettings settings,
								@NonNull  final Context context,
								@NonNull  final PendingIntent callbackIntent) {
		startScan(filters, settings, context, callbackIntent, 0);
	}

	/**
	 * Stops an ongoing Bluetooth LE scan.
	 *

	 * For apps targeting {@link Build.VERSION_CODES#R} or lower, this requires the
	 * {@link Manifest.permission#BLUETOOTH_ADMIN} permission which can be gained with a simple
	 * {@code <uses-permission>} manifest tag.
	 * For apps targeting {@link Build.VERSION_CODES#S} or or higher, this requires the
	 * {@link Manifest.permission#BLUETOOTH_SCAN} permission which can be gained with
	 * {@link android.app.Activity#requestPermissions(String[], int)}.
	 *
	 * @param context        Context used to stop {@link ScannerService}.
	 * @param callbackIntent The PendingIntent that was used to start the scan.
	 * @param requestCode    The request code used to create the Pending Intent. It must be the same
	 *                       as one used to start scan.
	 * @since 1.4.5
	 */
	public final void stopScan(@NonNull final Context context,
							   @NonNull final PendingIntent callbackIntent,
							   final int requestCode) {
		//noinspection ConstantConditions
		if (callbackIntent == null) {
			throw new IllegalArgumentException("callbackIntent is null");
		}
		//noinspection ConstantConditions
		if (context == null) {
			throw new IllegalArgumentException("context is null");
		}
		stopScanInternal(context, callbackIntent, requestCode);
	}

	/**
	 * Stops an ongoing Bluetooth LE scan. If the scan was started using
	 * {@link #startScan(List, ScanSettings, Context, PendingIntent, int)}, use
	 * {@link #stopScan(Context, PendingIntent, int)} instead.
	 *

	 * For apps targeting {@link Build.VERSION_CODES#R} or lower, this requires the
	 * {@link Manifest.permission#BLUETOOTH_ADMIN} permission which can be gained with a simple
	 * {@code <uses-permission>} manifest tag.
	 * For apps targeting {@link Build.VERSION_CODES#S} or or higher, this requires the
	 * {@link Manifest.permission#BLUETOOTH_SCAN} permission which can be gained with
	 * {@link android.app.Activity#requestPermissions(String[], int)}.
	 *
	 * @param context        Context used to stop {@link ScannerService}.
	 * @param callbackIntent The PendingIntent that was used to start the scan.
	 * @see #stopScan(Context, PendingIntent, int)
	 */
	public final void stopScan(@NonNull final Context context,
							   @NonNull final PendingIntent callbackIntent) {
		stopScanInternal(context, callbackIntent, 0);
	}

	/**
	 * Starts Bluetooth LE scan using {@link PendingIntent}.
	 * Its implementation depends on the Android version.
	 *
	 * @param filters        {@link ScanFilter}s for finding exact BLE devices.
	 * @param settings       Settings for the scan.
	 * @param context        Context used to start {@link ScannerService}.
	 * @param callbackIntent The PendingIntent to deliver the result to.
	 * @param requestCode    The PendingIntent request code.
	 */
	/* package */ abstract void startScanInternal(@NonNull List<ScanFilter> filters,
												  @NonNull ScanSettings settings,
												  @NonNull Context context,
												  @NonNull PendingIntent callbackIntent,
												  final int requestCode);

	/**
	 * Stops an ongoing Bluetooth LE scan.
	 *
	 * @param context        Context used to stop {@link ScannerService}.
	 * @param callbackIntent The PendingIntent that was used to start the scan.
	 * @param requestCode    The PendingIntent request code. It must be the same that used for
	 *                       starting scan.
	 */
	/* package */ abstract void stopScanInternal(@NonNull Context context,
												 @NonNull PendingIntent callbackIntent,
												 final int requestCode);

	/**
	 * Flush pending batch scan results stored in Bluetooth controller. This will return Bluetooth
	 * LE scan results batched on Bluetooth controller. Returns immediately, batch scan results data
	 * will be delivered through the {@code callback}.
	 *

	 * For apps targeting {@link Build.VERSION_CODES#R} or lower, this requires the
	 * {@link Manifest.permission#BLUETOOTH_ADMIN} permission which can be gained with a simple
	 * {@code <uses-permission>} manifest tag.
	 * For apps targeting {@link Build.VERSION_CODES#S} or or higher, this requires the
	 * {@link Manifest.permission#BLUETOOTH_SCAN} permission which can be gained with
	 * {@link android.app.Activity#requestPermissions(String[], int)}.
	 *
	 * @param callback Callback of the Bluetooth LE Scan, it has to be the same instance as the one
	 *            used to start scan.
	 */
	public abstract void flushPendingScanResults(@NonNull ScanCallback callback);

	/* package */ static class ScanCallbackWrapper {

		@NonNull private final Object LOCK = new Object();

		private final boolean emulateFiltering;
		private final boolean emulateBatching;
		private final boolean emulateFoundOrLostCallbackType;
		private boolean scanningStopped;

		@NonNull final List<ScanFilter> filters;
		@NonNull final ScanSettings scanSettings;
		@NonNull final ScanCallback scanCallback;
		@NonNull final Handler handler;

		@NonNull private final List<ScanResult> scanResults = new ArrayList<>();

		@NonNull private final Set<String> devicesInBatch = new HashSet<>();

		/** A collection of scan result of devices in range. */
		@NonNull private final Map<String, ScanResult> devicesInRange = new HashMap<>();

		/** A task, called periodically, that notifies about match lost. */
		@NonNull
		private final Runnable matchLostNotifierTask = new Runnable() {
			@Override
			public void run() {
				final long now = SystemClock.elapsedRealtimeNanos();

				synchronized (LOCK) {
					final Iterator<ScanResult> iterator = devicesInRange.values().iterator();
					while (iterator.hasNext()) {
						final ScanResult result = iterator.next();
						if (result.getTimestampNanos() < now - scanSettings.getMatchLostDeviceTimeout()) {
							iterator.remove();
							handler.post(() -> scanCallback.onScanResult(ScanSettings.CALLBACK_TYPE_MATCH_LOST, result));
						}
					}

					if (!devicesInRange.isEmpty()) {
						handler.postDelayed(this, scanSettings.getMatchLostTaskInterval());
					}
				}
			}
		};

		/* package */ ScanCallbackWrapper(final boolean offloadedBatchingSupported,
										  final boolean offloadedFilteringSupported,
										  @NonNull final List<ScanFilter> filters,
										  @NonNull final ScanSettings settings,
										  @NonNull final ScanCallback callback,
										  @NonNull final Handler handler) {
			this.filters = Collections.unmodifiableList(filters);
			this.scanSettings = settings;
			this.scanCallback = callback;
			this.handler = handler;
			this.scanningStopped = false;

			// Emulate other callback types
			final boolean callbackTypesSupported = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
			emulateFoundOrLostCallbackType = settings.getCallbackType() != ScanSettings.CALLBACK_TYPE_ALL_MATCHES
					&& (!callbackTypesSupported || !settings.getUseHardwareCallbackTypesIfSupported());

			// Emulate filtering
			emulateFiltering = !filters.isEmpty() && (!offloadedFilteringSupported || !settings.getUseHardwareFilteringIfSupported());

			// Emulate batching
			final long delay = settings.getReportDelayMillis();
			emulateBatching = delay > 0 && (!offloadedBatchingSupported || !settings.getUseHardwareBatchingIfSupported());
			if (emulateBatching) {
				final Runnable flushPendingScanResultsTask = new Runnable() {
					@Override
					public void run() {
						if (!scanningStopped) {
							flushPendingScanResults();
							handler.postDelayed(this, scanSettings.getReportDelayMillis());
						}
					}
				};
				handler.postDelayed(flushPendingScanResultsTask, delay);
			}
		}

		/* package */ void close() {
			scanningStopped = true;
			handler.removeCallbacksAndMessages(null);
			synchronized (LOCK) {
				devicesInRange.clear();
				devicesInBatch.clear();
				scanResults.clear();
			}
		}

		/* package */ void flushPendingScanResults() {
			if (emulateBatching && !scanningStopped) {
				synchronized (LOCK) {
					scanCallback.onBatchScanResults(new ArrayList<>(scanResults));
					scanResults.clear();
					devicesInBatch.clear();
				}
			}
		}

		/* package */ void handleScanResult(final int callbackType,
											@NonNull final ScanResult scanResult) {
			if (scanningStopped || !filters.isEmpty() && !matches(scanResult))
				return;

			final String deviceAddress = scanResult.getDevice().getAddress();

			// Notify if a new device was found and callback type is FIRST MATCH
			if (emulateFoundOrLostCallbackType) { // -> Callback type != ScanSettings.CALLBACK_TYPE_ALL_MATCHES
				ScanResult previousResult;
				boolean firstResult;
				synchronized (devicesInRange) {
					// The periodic task will be started only on the first result
					firstResult = devicesInRange.isEmpty();
					// Save the first result or update the old one with new data
					previousResult = devicesInRange.put(deviceAddress, scanResult);
				}

				if (previousResult == null) {
					if ((scanSettings.getCallbackType() & ScanSettings.CALLBACK_TYPE_FIRST_MATCH) > 0) {
						scanCallback.onScanResult(ScanSettings.CALLBACK_TYPE_FIRST_MATCH, scanResult);
					}
				}

				// In case user wants to be notified about match lost, we need to start a task that
				// will check the timestamp periodically
				if (firstResult) {
					if ((scanSettings.getCallbackType() & ScanSettings.CALLBACK_TYPE_MATCH_LOST) > 0) {
						handler.removeCallbacks(matchLostNotifierTask);
						handler.postDelayed(matchLostNotifierTask, scanSettings.getMatchLostTaskInterval());
					}
				}
			} else {
				// A callback type may not contain CALLBACK_TYPE_ALL_MATCHES and any other value.
				// If devicesInRange is empty, report delay > 0 means we are emulating hardware
				// batching. Otherwise handleScanResults(List) is called, not this method.
				if (emulateBatching) {
					synchronized (LOCK) {
						if (!devicesInBatch.contains(deviceAddress)) {  // add only the first record from the device, others will be skipped
							scanResults.add(scanResult);
							devicesInBatch.add(deviceAddress);
						}
					}
					return;
				}

				scanCallback.onScanResult(callbackType, scanResult);
			}
		}

		/* package */ void handleScanResults(@NonNull final List<ScanResult> results) {
			if (scanningStopped)
				return;

			List<ScanResult> filteredResults = results;

			if (emulateFiltering) {
				filteredResults = new ArrayList<>();
				for (final ScanResult result : results)
					if (matches(result))
						filteredResults.add(result);
			}

			scanCallback.onBatchScanResults(filteredResults);
		}

		/* package */ void handleScanError(final int errorCode) {
			scanCallback.onScanFailed(errorCode);
		}

		private boolean matches(@NonNull final ScanResult result) {
			for (final ScanFilter filter : filters) {
				if (filter.matches(result))
					return true;
			}
			return false;
		}
	}
}


text:
- [CHANGELOG-1.10.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.10.md)

## Current release:

- [CHANGELOG-1.9.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.9.md)

## Older releases:

- [CHANGELOG-1.8.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.8.md)
- [CHANGELOG-1.7.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.7.md)
- [CHANGELOG-1.6.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.6.md)
- [CHANGELOG-1.5.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.5.md)
- [CHANGELOG-1.4.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.4.md)
- [CHANGELOG-1.3.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.3.md)
- [CHANGELOG-1.2.md](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.2.md)

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/CHANGELOG.md?pixel)]()


text:
import argparse
import sys
import os
from apiclient import sample_tools
from oauth2client import client

TRACK = 'alpha'  # Can be 'alpha', beta', 'production' or 'rollout'

# Declare command-line flags.
argparser = argparse.ArgumentParser(add_help=False)
argparser.add_argument('package_name',
                        nargs='?',
                        default='net.testaholic.brewery',
                       help='The package name. Example: com.android.sample')
argparser.add_argument('apk_file',
                       nargs='?',
                       default='./app/build/outputs/apk/app-release.apk',
                       help='The path to the APK file to upload.')

def main(argv):
  # Authenticate and construct service.
  service, flags = sample_tools.init(
      argv,
      'androidpublisher',
      'v2',
      __doc__,
      os.environ['CLIENT_SECRETS'], parents=[argparser],
      scope='https://www.googleapis.com/auth/androidpublisher')

  # Process flags and read their values.
  package_name = flags.package_name
  apk_file = flags.apk_file

  try:
    edit_request = service.edits().insert(body={}, packageName=package_name)
    result = edit_request.execute()
    edit_id = result['id']

    apk_response = service.edits().apks().upload(
        editId=edit_id,
        packageName=package_name,
        media_body=apk_file).execute()

    print 'Version code %d has been uploaded' % apk_response['versionCode']

    track_response = service.edits().tracks().update(
        editId=edit_id,
        track=TRACK,
        packageName=package_name,
        body={u'versionCodes': [apk_response['versionCode']]}).execute()

    print 'Track %s is set for version code(s) %s' % (
        track_response['track'], str(track_response['versionCodes']))

    commit_request = service.edits().commit(
        editId=edit_id, packageName=package_name).execute()

    print 'Edit "%s" has been committed' % (commit_request['id'])

  except client.AccessTokenRefreshError:
    print ('The credentials have been revoked or expired, please re-run the '
           'application to re-authorize')

if __name__ == '__main__':
  main(sys.argv)


text:
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_TEXT_HYPHENATION_HYPHENATOR_AOSP_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_TEXT_HYPHENATION_HYPHENATOR_AOSP_H_

/**
 * An implementation of Liang's hyphenation algorithm.
 */

#include <memory>
#include "third_party/blink/renderer/platform/wtf/vector.h"

namespace android {

// hyb file header; implementation details are in the .cpp file
struct Header;

class Hyphenator {
 public:
  // Note: this will also require a locale, for proper case folding behavior
  static Hyphenator* load(const uint16_t* patternData, size_t size);

  // Compute the hyphenation of a word, storing the hyphenation in result
  // vector. Each entry in the vector is a "hyphen edit" to be applied at the
  // corresponding code unit offset in the word. Currently 0 means no hyphen and
  // 1 means insert hyphen and break, but this will be expanded to other edits
  // for nonstandard hyphenation.  Example: word is "hyphen", result is [0 0 1 0
  // 0 0], corresponding to "hy-phen".
  void hyphenate(Vector<uint8_t>* result, const uint16_t* word, size_t len);

  // pattern data is in binary format, as described in doc/hyb_file_format.md.
  // Note: the caller is responsible for ensuring that the lifetime of the
  // pattern data is at least as long as the Hyphenator object.

  // Note: nullptr is valid input, in which case the hyphenator only processes
  // soft hyphens
  static Hyphenator* loadBinary(const uint8_t* patternData);

 private:
  // apply soft hyphens only, ignoring patterns
  void hyphenateSoft(uint8_t* result, const uint16_t* word, size_t len);

  // Try looking up word in alphabet table, return false if any code units fail
  // to map.  Note that this methor writes len+2 entries into alpha_codes
  // (including start and stop).
  bool alphabetLookup(uint16_t* alpha_codes, const uint16_t* word, size_t len);

  // calculate hyphenation from patterns, assuming alphabet lookup has already
  // been done
  void hyphenateFromCodes(uint8_t* result, const uint16_t* codes, size_t len);

  // TODO: these should become parameters, as they might vary by locale, screen
  // size, and possibly explicit user control.
  static const int MIN_PREFIX = 2;
  static const int MIN_SUFFIX = 3;

  // See also LONGEST_HYPHENATED_WORD in LineBreaker.cpp. Here the constant is
  // used so that temporary buffers can be stack-allocated without waste, which
  // is a slightly different use case. It measures UTF-16 code units.
  static const size_t MAX_HYPHENATED_SIZE = 64;

  const uint8_t* patternData;

  // accessors for binary data
  const Header* getHeader() const {
    return reinterpret_cast<const Header*>(patternData);
  }
};

}  // namespace android

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_TEXT_HYPHENATION_HYPHENATOR_AOSP_H_


text:
<?php
/**
 * Glome Show QR Widget
 */
class glome_show_qr_widget extends WP_Widget
{
  /**
   * Constructor
   */
  public function __construct()
  {
    parent::WP_Widget('glome_show_qr_widget', 'Glome QR For Pairing', array(
      'description' => __('Show a QR code for pairing.', 'glome_plugin')
    ));
  }

  /**
   *  Display the widget
   */
  public function widget($args, $instance)
  {
    if (! is_user_logged_in()) return;

    // check api access
    if (glome_check_app() == false)
    {
      return;
    }

    //Before Widget
    echo $args ['before_widget'];

    //Title
    if (! empty ($instance ['widget_title']))
    {
      echo $args ['before_title'] . apply_filters ('widget_title', $instance ['widget_title']) . $args ['after_title'];
    }

    //Content
    echo render_show_qr('widget', $instance);

    //After Widget
    echo $args ['after_widget'];
  }

  /**
   * Show Widget Settings
   */
  public function form($instance)
  {
    //Default settings
    $default_settings = array(
      'widget_title' => __('Show QR Widget Title', 'glome_plugin'),
      'widget_hide_for_logged_in_users' => '0'
    );

    $instance = wp_parse_args((array) $instance, $default_settings);
    ?>

        <label for="<?php echo $this->get_field_id('widget_title'); ?>"><?php _e('Show QR Widget Title', 'glome_plugin'); ?>:
        <input class="widefat" id="<?php echo $this->get_field_id('widget_title'); ?>" name="<?php echo $this->get_field_name('widget_title'); ?>" type="text" value="<?php echo $instance ['widget_title']; ?>" />

        <input type="checkbox" id="<?php echo $this->get_field_id('widget_hide_for_logged_in_users', 'glome_qr_for_pairing_widget'); ?>" name="<?php echo $this->get_field_name('widget_hide_for_logged_in_users'); ?>" type="text" value="1" <?php echo (!empty ($instance ['widget_hide_for_logged_in_users']) ? 'checked="checked"' : ''); ?> />
        <label for="<?php echo $this->get_field_id('widget_hide_for_logged_in_users'); ?>"><?php _e('Tick to hide the widget for logged-in users', 'glome_plugin'); ?>

    <?php
  }

  /**
   * Update Widget Settings
   */
  public function update($new_instance, $old_instance)
  {
    $instance = $old_instance;
    $instance['widget_title'] = trim(strip_tags($new_instance['widget_title']));
    $instance['widget_hide_for_logged_in_users'] = (empty($new_instance['widget_hide_for_logged_in_users']) ? 0 : 1);
    return $instance;
  }
}
add_action ('widgets_init', create_function('', 'return register_widget("glome_show_qr_widget");'));


text:
layout: page
permalink: /about/index.html
title: Hossain Mohd Faysal
tags: [Hossain, Mohd, Faysal, hmfaysal]
imagefeature: fourseasons.jpg
chart: true
---

About : todo


text:
#pragma once

#include "common/IInterface.h"

class IDataSocket;
class IListenSocket;

//! Socket factory
/*!
This interface defines the methods common to all factories used to
create sockets.
*/
class ISocketFactory : public IInterface {
public:
	//! @name accessors
	//@{

	//! Create data socket
	virtual IDataSocket*	create(bool secure) const = 0;

	//! Create listen socket
	virtual IListenSocket*	createListen(bool secure) const = 0;

	//@}
};


text:
Date: 2015-05-16

Full coverage of available Workable API.


text:
<?php
/**
 *  Autoloader function generated by crodas/Autoloader
 *
 *  https://github.com/crodas/Autoloader
 *
 *  This is a generated file, do not modify it.
 */

spl_autoload_register(function ($class) {
    /*
        This array has a map of (class => file)
    */

    // classes {{{
    static $classes = array (
  'languagedetector\\abstractformat' => '/AbstractFormat.php',
  'languagedetector\\config' => '/Config.php',
  'languagedetector\\detect' => '/Detect.php',
  'languagedetector\\distance\\outofplace' => '/Distance/OutOfPlace.php',
  'languagedetector\\distanceinterface' => '/DistanceInterface.php',
  'languagedetector\\format\\abstractfileformat' => '/Format/AbstractFileFormat.php',
  'languagedetector\\format\\json' => '/Format/JSON.php',
  'languagedetector\\format\\php' => '/Format/PHP.php',
  'languagedetector\\format\\ses' => '/Format/SES.php',
  'languagedetector\\learn' => '/Learn.php',
  'languagedetector\\ngramparser' => '/NGramParser.php',
  'languagedetector\\sort\\pagerank' => '/Sort/PageRank.php',
  'languagedetector\\sort\\sortinterface' => '/Sort/SortInterface.php',
  'languagedetector\\sort\\sum' => '/Sort/Sum.php',
);
    // }}}

    // deps {{{
    static $deps    = array (
  'languagedetector\\distance\\outofplace' =>
  array (
    0 => 'languagedetector\\distanceinterface',
  ),
  'languagedetector\\format\\abstractfileformat' =>
  array (
    0 => 'languagedetector\\abstractformat',
  ),
  'languagedetector\\format\\json' =>
  array (
    0 => 'languagedetector\\abstractformat',
    1 => 'languagedetector\\format\\abstractfileformat',
  ),
  'languagedetector\\format\\php' =>
  array (
    0 => 'languagedetector\\abstractformat',
    1 => 'languagedetector\\format\\abstractfileformat',
  ),
  'languagedetector\\format\\ses' =>
  array (
    0 => 'languagedetector\\abstractformat',
    1 => 'languagedetector\\format\\abstractfileformat',
  ),
  'languagedetector\\sort\\pagerank' =>
  array (
    0 => 'languagedetector\\sort\\sortinterface',
  ),
  'languagedetector\\sort\\sum' =>
  array (
    0 => 'languagedetector\\sort\\sortinterface',
  ),
);
    // }}}

    $class = strtolower($class);
    if (isset($classes[$class])) {
        if (!empty($deps[$class])) {
            foreach ($deps[$class] as $zclass) {
                if (!class_exists($zclass, false) && !interface_exists($zclass, false)) {
                    require __DIR__  . $classes[$zclass];
                }
            }
        }

        if (!class_exists($class, false) && !interface_exists($class, false)) {

            require __DIR__  . $classes[$class];

        }
        return true;
    }

    /**
     * Autoloader that implements the PSR-0 spec for interoperability between
     * PHP software.
     *
     * kudos to @alganet for this autoloader script.
     * borrowed from https://github.com/Respect/Validation/blob/develop/tests/bootstrap.php
     */
    $fileParts = explode('\\', ltrim($class, '\\'));
    if (false !== strpos(end($fileParts), '_')) {
        array_splice($fileParts, -1, 1, explode('_', current($fileParts)));
    }
    $file = stream_resolve_include_path(implode(DIRECTORY_SEPARATOR, $fileParts) . '.php');
    if ($file) {
        return require $file;
    }
    return false;
});


text:
/*
	File:		matrixlib.h

	Contains:	ALAC mixing/matrixing routines to/from 32-bit predictor buffers.

	Copyright:	Copyright (C) 2004 to 2011 Apple, Inc.
*/

#ifndef __MATRIXLIB_H
#define __MATRIXLIB_H

#pragma once

#ifdef _MSC_VER
#include <msstdint.h>
#else
#include <stdint.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

// 16-bit routines
void	mix16( int16_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, int32_t mixbits, int32_t mixres );
void	unmix16( int32_t * u, int32_t * v, int16_t * out, uint32_t stride, int32_t numSamples, int32_t mixbits, int32_t mixres );

// 20-bit routines
void	mix20( uint8_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples, int32_t mixbits, int32_t mixres );
void	unmix20( int32_t * u, int32_t * v, uint8_t * out, uint32_t stride, int32_t numSamples, int32_t mixbits, int32_t mixres );

// 24-bit routines
// - 24-bit data sometimes compresses better by shifting off the bottom byte so these routines deal with
//	 the specified "unused lower bytes" in the combined "shift" buffer
void	mix24( uint8_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples,
				int32_t mixbits, int32_t mixres, uint16_t * shiftUV, int32_t bytesShifted );
void	unmix24( int32_t * u, int32_t * v, uint8_t * out, uint32_t stride, int32_t numSamples,
				 int32_t mixbits, int32_t mixres, uint16_t * shiftUV, int32_t bytesShifted );

// 32-bit routines
// - note that these really expect the internal data width to be < 32-bit but the arrays are 32-bit
// - otherwise, the calculations might overflow into the 33rd bit and be lost
// - therefore, these routines deal with the specified "unused lower" bytes in the combined "shift" buffer
void	mix32( int32_t * in, uint32_t stride, int32_t * u, int32_t * v, int32_t numSamples,
				int32_t mixbits, int32_t mixres, uint16_t * shiftUV, int32_t bytesShifted );
void	unmix32( int32_t * u, int32_t * v, int32_t * out, uint32_t stride, int32_t numSamples,
				 int32_t mixbits, int32_t mixres, uint16_t * shiftUV, int32_t bytesShifted );

// 20/24/32-bit <-> 32-bit helper routines (not really matrixing but convenient to put here)
void	copy20ToPredictor( uint8_t * in, uint32_t stride, int32_t * out, int32_t numSamples );
void	copy24ToPredictor( uint8_t * in, uint32_t stride, int32_t * out, int32_t numSamples );

void	copyPredictorTo24( int32_t * in, uint8_t * out, uint32_t stride, int32_t numSamples );
void	copyPredictorTo24Shift( int32_t * in, uint16_t * shift, uint8_t * out, uint32_t stride, int32_t numSamples, int32_t bytesShifted );
void	copyPredictorTo20( int32_t * in, uint8_t * out, uint32_t stride, int32_t numSamples );

void	copyPredictorTo32( int32_t * in, int32_t * out, uint32_t stride, int32_t numSamples );
void	copyPredictorTo32Shift( int32_t * in, uint16_t * shift, int32_t * out, uint32_t stride, int32_t numSamples, int32_t bytesShifted );

#ifdef __cplusplus
}
#endif

#endif	/* __MATRIXLIB_H */


text:
<?php

namespace PHPSemVerChecker\Operation;

use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\ClassMethod;
use PHPSemVerChecker\Node\Statement\ClassMethod as PClassMethod;

class ClassMethodImplementationChanged extends ClassMethodOperation {
	/**
	 * @var array
	 */
	protected $code = [
		'class' => ['V023', 'V024', 'V025'],
		'trait' => ['V052', 'V053', 'V054'],
	];
	/**
	 * @var string
	 */
	protected $reason = 'Method implementation changed.';
	/**
	 * @var string
	 */
	protected $fileBefore;
	/**
	 * @var Stmt
	 */
	protected $contextBefore;
	/**
	 * @var \PhpParser\Node\Stmt\ClassMethod
	 */
	protected $classMethodBefore;
	/**
	 * @var string
	 */
	protected $fileAfter;
	/**
	 * @var Stmt
	 */
	protected $contextAfter;
	/**
	 * @var \PhpParser\Node\Stmt\ClassMethod
	 */
	protected $classMethodAfter;

	/**
	 * @param string                           $context
	 * @param string                           $fileBefore
	 * @param \PhpParser\Node\Stmt             $contextBefore
	 * @param \PhpParser\Node\Stmt\ClassMethod $classMethodBefore
	 * @param string                           $fileAfter
	 * @param \PhpParser\Node\Stmt             $contextAfter
	 * @param \PhpParser\Node\Stmt\ClassMethod $classMethodAfter
	 */
	public function __construct($context,
								$fileBefore,
								Stmt $contextBefore,
								ClassMethod $classMethodBefore,
								$fileAfter,
								Stmt $contextAfter,
								ClassMethod $classMethodAfter)
	{
		$this->context = $context;
		$this->visibility = $this->getVisibility($classMethodAfter);
		$this->fileBefore = $fileBefore;
		$this->contextBefore = $contextBefore;
		$this->classMethodBefore = $classMethodBefore;
		$this->fileAfter = $fileAfter;
		$this->contextAfter = $contextAfter;
		$this->classMethodAfter = $classMethodAfter;
	}

	/**
	 * @return string
	 */
	public function getLocation()
	{
		return $this->fileAfter;
	}

	/**
	 * @return int
	 */
	public function getLine()
	{
		return $this->classMethodAfter->getLine();
	}

	/**
	 * @return string
	 */
	public function getTarget()
	{
		return PClassMethod::getFullyQualifiedName($this->contextAfter, $this->classMethodAfter);
	}
}


text:
namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
{
    using Microsoft.Azure;
    using Microsoft.Azure.Management;
    using Microsoft.Azure.Management.RecoveryServices;
    using Microsoft.Azure.Management.RecoveryServices.Backup;
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// Client script details for file / folder restore.
    /// </summary>
    public partial class ClientScriptForConnect
    {
        /// <summary>
        /// Initializes a new instance of the ClientScriptForConnect class.
        /// </summary>
        public ClientScriptForConnect()
        {
          CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the ClientScriptForConnect class.
        /// </summary>
        /// <param name="scriptContent">File content of the client script for
        /// file / folder restore.</param>
        /// <param name="scriptExtension">File extension of the client script
        /// for file / folder restore - .ps1 , .sh , etc.</param>
        /// <param name="osType">OS type - Windows, Linux etc. for which this
        /// file / folder restore client script works.</param>
        /// <param name="url">URL of Executable from where to source the
        /// content. If this is not null then ScriptContent should not be
        /// used</param>
        /// <param name="scriptNameSuffix">Mandator suffix that should be added
        /// to the name of script that is given for download to user.
        /// If its null or empty then , ignore it.</param>
        public ClientScriptForConnect(string scriptContent = default(string), string scriptExtension = default(string), string osType = default(string), string url = default(string), string scriptNameSuffix = default(string))
        {
            ScriptContent = scriptContent;
            ScriptExtension = scriptExtension;
            OsType = osType;
            Url = url;
            ScriptNameSuffix = scriptNameSuffix;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets file content of the client script for file / folder
        /// restore.
        /// </summary>
        [JsonProperty(PropertyName = "scriptContent")]
        public string ScriptContent { get; set; }

        /// <summary>
        /// Gets or sets file extension of the client script for file / folder
        /// restore - .ps1 , .sh , etc.
        /// </summary>
        [JsonProperty(PropertyName = "scriptExtension")]
        public string ScriptExtension { get; set; }

        /// <summary>
        /// Gets or sets OS type - Windows, Linux etc. for which this file /
        /// folder restore client script works.
        /// </summary>
        [JsonProperty(PropertyName = "osType")]
        public string OsType { get; set; }

        /// <summary>
        /// Gets or sets URL of Executable from where to source the content. If
        /// this is not null then ScriptContent should not be used
        /// </summary>
        [JsonProperty(PropertyName = "url")]
        public string Url { get; set; }

        /// <summary>
        /// Gets or sets mandator suffix that should be added to the name of
        /// script that is given for download to user.
        /// If its null or empty then , ignore it.
        /// </summary>
        [JsonProperty(PropertyName = "scriptNameSuffix")]
        public string ScriptNameSuffix { get; set; }

    }
}


text:
from django.db import models

from south.db import db
from south.v2 import SchemaMigration

class Migration(SchemaMigration):
    def forwards(self, orm):
        # Adding model 'Campaign'
        db.create_table(u'aldryn_mailchimp_campaign', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('cid', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('mc_title', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('subject', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('send_time', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
            ('content_text', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('content_html', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
            ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
            ('hidden', self.gf('django.db.models.fields.BooleanField')(default=False)),
        ))
        db.send_create_signal(u'aldryn_mailchimp', ['Campaign'])

        # Adding model 'SelectedCampaignsPlugin'
        db.create_table(u'aldryn_mailchimp_selectedcampaignsplugin', (
            (u'cmsplugin_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True,
                                                                      primary_key=True)),
        ))
        db.send_create_signal(u'aldryn_mailchimp', ['SelectedCampaignsPlugin'])

        # Adding M2M table for field campaigns on 'SelectedCampaignsPlugin'
        m2m_table_name = db.shorten_name(u'aldryn_mailchimp_selectedcampaignsplugin_campaigns')
        db.create_table(m2m_table_name, (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            (
                'selectedcampaignsplugin',
                models.ForeignKey(orm[u'aldryn_mailchimp.selectedcampaignsplugin'], null=False)),
            ('campaign', models.ForeignKey(orm[u'aldryn_mailchimp.campaign'], null=False))
        ))
        db.create_unique(m2m_table_name, ['selectedcampaignsplugin_id', 'campaign_id'])

        # Adding model 'CampaignArchivePlugin'
        db.create_table(u'aldryn_mailchimp_campaignarchiveplugin', (
            (u'cmsplugin_ptr',
             self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True,
                                                                      primary_key=True)),
            ('count', self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True)),
        ))
        db.send_create_signal(u'aldryn_mailchimp', ['CampaignArchivePlugin'])

    def backwards(self, orm):
        # Deleting model 'Campaign'
        db.delete_table(u'aldryn_mailchimp_campaign')

        # Deleting model 'SelectedCampaignsPlugin'
        db.delete_table(u'aldryn_mailchimp_selectedcampaignsplugin')

        # Removing M2M table for field campaigns on 'SelectedCampaignsPlugin'
        db.delete_table(db.shorten_name(u'aldryn_mailchimp_selectedcampaignsplugin_campaigns'))

        # Deleting model 'CampaignArchivePlugin'
        db.delete_table(u'aldryn_mailchimp_campaignarchiveplugin')

    models = {
        u'aldryn_mailchimp.campaign': {
            'Meta': {'ordering': "['-send_time']", 'object_name': 'Campaign'},
            'cid': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'content_html': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'content_text': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'hidden': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'mc_title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'send_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
            'subject': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        },
        u'aldryn_mailchimp.campaignarchiveplugin': {
            'Meta': {'object_name': 'CampaignArchivePlugin', '_ormbases': ['cms.CMSPlugin']},
            u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [],
                               {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
            'count': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'})
        },
        u'aldryn_mailchimp.selectedcampaignsplugin': {
            'Meta': {'object_name': 'SelectedCampaignsPlugin', '_ormbases': ['cms.CMSPlugin']},
            'campaigns': ('django.db.models.fields.related.ManyToManyField', [],
                          {'to': u"orm['aldryn_mailchimp.Campaign']", 'symmetrical': 'False'}),
            u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [],
                               {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'})
        },
        u'aldryn_mailchimp.subscriptionplugin': {
            'Meta': {'object_name': 'SubscriptionPlugin', '_ormbases': ['cms.CMSPlugin']},
            'assign_language': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [],
                               {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
            'list_id': ('django.db.models.fields.CharField', [], {'max_length': '20'})
        },
        'cms.cmsplugin': {
            'Meta': {'object_name': 'CMSPlugin'},
            'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
            'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
            'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
            'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
            'parent': ('django.db.models.fields.related.ForeignKey', [],
                       {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
            'placeholder': (
                'django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
            'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
            'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
            'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
        },
        'cms.placeholder': {
            'Meta': {'object_name': 'Placeholder'},
            'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
        }
    }

    complete_apps = ['aldryn_mailchimp']


text:
enum c_parse_states {BLOCK_COMMENT, LINE_COMMENT, SLASH, STAR, ESCAPE_CHAR, ESCAPE_STRING, CHAR, STRING, CODE};

int c_parse_next_state (int, int);
int * get_tablist (char *);

#endif