text:
TEST            ?=$$(go list ./... | grep -v vendor)
VETARGS         ?=-all
GOFMT_FILES     ?=$$(find . -name '*.go' | grep -v vendor)
AUTHOR          ?="The Libsacloud Authors"
COPYRIGHT_YEAR  ?="2016-2020"
COPYRIGHT_FILES ?=$$(find . -name "*.go" -print | grep -v "/vendor/")
export GO111MODULE=on

default: test vet

run:
	go run $(CURDIR)/main.go --disable-healthcheck $(ARGS)

test:
	go test ./sacloud $(TESTARGS) -v -timeout=120m -parallel=4 ;

test-api:
	go test ./api $(TESTARGS) -v -timeout=120m -parallel=4 ;

test-builder:
	go test ./builder $(TESTARGS) -v -timeout=120m -parallel=4 ;

test-utils:
	go test ./utils/* $(TESTARGS) -v -timeout=120m -parallel=4 ;

test-all: goimports vet test test-api test-builder test-utils

vet: golint
	go vet ./...

golint:
	test -z "$$(golint ./... | grep -v 'vendor/' | grep -v '_string.go' | tee /dev/stderr )"

goimports: fmt
	goimports -l -w $(GOFMT_FILES)

fmt:
	gofmt -s -l -w $(GOFMT_FILES)

godoc:
	docker-compose up godoc

.PHONY: default test vet fmt golint test-api test-builder test-all run goimports

.PHONY: tools
tools:
	GO111MODULE=off go get golang.org/x/tools/cmd/goimports
	GO111MODULE=off go get golang.org/x/lint/golint
	GO111MODULE=off go get github.com/motemen/gobump
	GO111MODULE=off go get github.com/sacloud/addlicense

.PHONY: bump-patch bump-minor bump-major version
bump-patch:
	gobump patch -w

bump-minor:
	gobump minor -w

bump-major:
	gobump major -w

version:
	gobump show

git-tag:
	git tag v`gobump show -r`

set-license:
	addlicense -c $(AUTHOR) -y $(COPYRIGHT_YEAR) $(COPYRIGHT_FILES)


text:
//
//  CHADItem.h
//  模仿百思
//
//  Created by nick on 16/4/15.
//  Copyright © 2016年 nick. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CHADItem : NSObject
/** url*/
@property (nonatomic, strong) NSString *w_picurl;
/** 跳转url*/
@property (nonatomic, strong) NSString *ori_curl;
/** H*/
@property (nonatomic, assign) CGFloat h;
/** W*/
@property (nonatomic, assign) CGFloat w;

@end

redpajama_set_name: RedPajamaGithub


text:
  Given a string

   S

  , find the longest palindromic substring in

   S

  . You may assume that the maximum length of

   S

  is 1000, and there exists one unique longest palindromic substring.

## Source:
[Leetcode](https://leetcode.com/problems/longest-palindromic-substring/)


text:
'use strict';

const AbstractMessageHandler = require('./abstract_message_handler');

class MessageHandlerModal extends AbstractMessageHandler {

  get MESSAGE_EVENT() {
    return 'modal';
  }

  handleMessage(message) {
    if (message.data.src.match(/^\/{1}[^\/]+/)) {
      message.data.src = '//' + this.window.location.host + message.data.src;
      message.data.src = message.data.src.replace('{session_id}', this.window.Emarsys.config.session_id);
    }

    this.window.Emarsys.integration.dialog.modal(message);
  }

}

module.exports = MessageHandlerModal;


text:
<?php

/* /components/views/TuhesSlides.twig */
class __TwigTemplate_df01e9db7e3d62f2eb2315db7438d9594f6ee9524b031a1f798326fd05acaf69 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "
\t\t
\t\t\t ";
        // line 3
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["items"]) ? $context["items"] : null));
        foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
            // line 4
            echo "\t\t\t

\t\t\t\tgetAttribute((isset($context["item"]) ? $context["item"] : null), "file");
            echo "\" height=\"297\" width=\"957\" alt=\"\" />\t
\t\t\t

\t\t
\t\t\t ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 9
        echo "
";
    }

    public function getTemplateName()
    {
        return "/components/views/TuhesSlides.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  40 => 9,  30 => 5,  27 => 4,  23 => 3,  19 => 1,);
    }
}


text:
Health monitoring of your APIs by sending requests to an `health` endpoint on each API.

The API backend should perform the necessary checks by providing some probes and return an indication of its status.

You can hide or show APIs which do not have any health-check configuration.

You can click the `View detail` link on a card to navigate to the health-check page of a specific API.


text:
package io.github.ramidzkh.crypt.symmetrical.aes;

import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;

import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;

import io.github.ramidzkh.crypt.digest.sha.SHA224;
import io.github.ramidzkh.crypt.util.ArrayUtil;

public class AES192 extends AES {

	public Cipher cipher;

	public AES192(String padding, String algorMode, String provider, SecretKey key, int mode, IvParameterSpec iv) throws
			NoSuchAlgorithmException,
			NoSuchPaddingException,
			NoSuchProviderException,
			InvalidKeyException,
			InvalidAlgorithmParameterException {
		super("AES_192", padding, algorMode, provider);

		cipher = super.cipher;

		init(key, mode, iv);
	}

	public AES192(SecretKey key, int mode, IvParameterSpec iv) throws
			NoSuchAlgorithmException,
			NoSuchPaddingException,
			NoSuchProviderException,
			InvalidKeyException,
			InvalidAlgorithmParameterException {
		super();

		cipher = super.cipher;

		init(key, mode, iv);
	}

	public AES192(String padding, String mode, String provider)
			throws NoSuchAlgorithmException, NoSuchPaddingException, NoSuchProviderException {
		super("AES_192", padding, mode, provider);

		cipher = super.cipher;
	}

	public AES192()
			throws NoSuchAlgorithmException, NoSuchPaddingException, NoSuchProviderException {
		super();

		cipher = super.cipher;
	}

	@Override
	public void init(SecretKey key, int mode, IvParameterSpec iv) throws InvalidKeyException, InvalidAlgorithmParameterException {
		cipher.init(mode, key, iv);
	}

	public byte[] doFinal() throws IllegalBlockSizeException, BadPaddingException {
		return cipher.doFinal();
	}

	public byte[] update(byte[] bytes) {
		return update(bytes, 0, bytes.length);
	}

	public byte[] update(byte[] bytes, int offset, int len) {
		return cipher.update(bytes, offset, len);
	}

	public static SecretKey genSecretKey(byte[] data) {
		SecretKey key = new SecretKeySpec(digest(data), "AES");
		return key;
	}

	private static byte[] digest(byte[] dataToHash) {
		SHA224 sha = new SHA224();
		byte[] dataToResize = sha.getMessageDigest().digest(dataToHash);
		byte[] data = new byte[24];

		ArrayUtil.cutCopy(dataToResize, data, 2, 26);

		return data;
	}
}


text:
import {generateModelsFile, generateTypesFile, generateQueryFile, readModels} from "./files";
import {IModel} from "./models/interfaces";
import {generateCreationFile} from "./files/generateCreationFile";
import {generateMutationFile} from "./files/generateMutationFile";

const main = async () => {
    const models: [IModel] = await readModels(".", "models.json");
    generateModelsFile(models);
    generateTypesFile(models);
    generateQueryFile(models);
    generateCreationFile(models);
    generateMutationFile(models);
};

main();


text:
Welcome to LLILC
================

Build Status
------------

|           |    Windows    |    Linux    |
|-----------|---------------|-------------|
| **Debug** |[![Build status](http://dotnet-ci.cloudapp.net/job/dotnet_llilc_debug_win64/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_llilc_debug_win64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_llilc_linux_debug/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_llilc_linux_debug/)|
|**Release**|[![Build status](http://dotnet-ci.cloudapp.net/job/dotnet_llilc_release_win64/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_llilc_release_win64/)|[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_llilc_linux_release/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_llilc_linux_release/)|

Introduction
-------------

LLILC is an **LL**VM based MS**IL** **C**ompiler - we pronounce it 'lilac' -
with a goal of producing a set of cross-platform .NET code generation tools.
Today LLILC is being developed against [dotnet/CoreCLR](https://github.com/dotnet/coreclr)
for use as a JIT, but an ahead of time (AOT) compiler is planned for the future.

See the [wiki](https://github.com/dotnet/llilc/wiki) for more information.
It has a more complete discussion of our background and goals as well as
"getting started" details and developer information.

Supported Platforms
-------------------

Our initial supported platform is [Windows](https://github.com/dotnet/llilc/wiki/Getting-Started-For-Windows),
but [Linux and Mac OS X](https://github.com/dotnet/llilc/wiki/Getting-Started-For-Linux-and-OS-X)
support are under development.

Contributions
-------------

LLILC is just starting up.  Only a few tests are working and there are lots
of places where we need help.  Please see our [issues](https://github.com/dotnet/llilc/issues)
or the [contributing page](https://github.com/dotnet/llilc/wiki/Areas-To-Contribute)
for how to pitch in.


text:
/////////////////////////////////////////////////////////////////////////////
// Name:        atomic.h
// Purpose:     interface of global functions
// Author:      wxWidgets team
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

// ============================================================================
// Global functions/macros
// ============================================================================

/** @addtogroup group_funcmacro_atomic */
//@{

/**
    This function increments @a value in an atomic manner.

    Whenever possible wxWidgets provides an efficient, CPU-specific,
    implementation of this function. If such implementation is available, the
    symbol wxHAS_ATOMIC_OPS is defined. Otherwise this function still exists
    but is implemented in a generic way using a critical section which can be
    prohibitively expensive for use in performance-sensitive code.

    @header{wx/atomic.h}
*/
void wxAtomicInc(wxAtomicInt& value);

/**
    This function decrements value in an atomic manner.

    Returns 0 if value is 0 after decrement or any non-zero value (not
    necessarily equal to the value of the variable) otherwise.

    @see wxAtomicInc

    @header{wx/atomic.h}
*/
wxInt32 wxAtomicDec(wxAtomicInt& value);

//@}


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

namespace Microsoft.CodeAnalysis.SymbolSearch
{
    internal partial class SymbolSearchUpdateEngine
    {
        private class PatchService : IPatchService
        {
            public byte[] ApplyPatch(byte[] databaseBytes, byte[] patchBytes)
            {
                return Patching.Delta.ApplyPatch(databaseBytes, patchBytes);
            }
        }
    }
}


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

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
com.dropbox.client2.exception
</TITLE>

<META NAME="date" CONTENT="2012-11-27">

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

      Overview
    Package
      Class
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

Package com.dropbox.client2.exception

Class Summary

DropboxServerException.Error

Exception Summary

DropboxException
A base for all exceptions from using the API.

DropboxFileSizeException
Thrown when trying to upload a file larger than the API can handle.

DropboxIOException
Encapsulates an IOExceptions when using the API, typically resulting from
 network-related issues.

DropboxLocalStorageFullException
Thrown when writing to local storage and there is no more room.

DropboxParseException
Indicates there was trouble parsing a response from Dropbox.

DropboxPartialFileException
Used when only part of a file was transferred to/from Dropbox when using the
 API.

DropboxServerException
Wraps any non-200 HTTP responses from an API call.

DropboxSSLException
Wraps any SSL-related exceptions thrown when using the API.

DropboxUnlinkedException
Thrown when the API can only be used when linked but it's not.

      Overview
    Package
      Class
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes


text:
// Copyright 2016 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.devtools.build.lib.concurrent;

import com.google.common.base.Preconditions;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.Multiset;
import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.util.Set;
import java.util.concurrent.Semaphore;

/**
 * A concurrency primitive for managing access to at most K unique things at once, for a fixed K.
 *
 *
You can think of this as a pair of a {@link Semaphore} with K total permits and a
 * {@link Multiset}, with permits being doled out and returned based on the current contents of the
 * {@link Multiset}.
 */
@ThreadSafe
public abstract class MultisetSemaphore<T> {
  /**
   * Blocks until permits are available for all the values in {@code valuesToAcquire}, and then
   * atomically acquires these permits.
   *
   *
{@code acquireAll(valuesToAcquire)} atomically does the following
   *

   *
Computes {@code m}, the number of values in {@code valuesToAcquire} that are not
   *   currently in the backing {@link Multiset}.
   *
Adds {@code valuesToAcquire} to the backing {@link Multiset}.
   *
Blocks until {@code m} permits are available from the backing {@link Semaphore}.
   *
Acquires these permits.
   *

   */
  public abstract void acquireAll(Set<T> valuesToAcquire) throws InterruptedException;

  /**
   * Atomically releases permits for all the values in {@code valuesToAcquire}.
   *
   *
{@code releaseAll(valuesToRelease)} atomically does the following
   *

   *
Computes {@code m}, the number of values in {@code valuesToRelease} that are currently in
   *   the backing {@link Multiset} with multiplicity 1.
   *
Removes {@code valuesToRelease} from the backing {@link Multiset}.
   *
Release {@code m} permits from the backing {@link Semaphore}.
   *

   *
   *
Assumes that this {@link MultisetSemaphore} has already given out permits for all the
   * values in {@code valuesToAcquire}.
   */
  public abstract void releaseAll(Set<T> valuesToRelease);

  public abstract int estimateCurrentNumUniqueValues();

  /**
   * Returns a {@link MultisetSemaphore} with a backing {@link Semaphore} that has an unbounded
   * number of permits; that is, {@link #acquireAll} will never block.
   */
  public static <T> MultisetSemaphore<T> unbounded() {
    return UnboundedMultisetSemaphore.instance();
  }

  /** Builder for {@link MultisetSemaphore} instances. */
  public static class Builder {
    private static final int UNSET_INT = -1;

    private int maxNumUniqueValues = UNSET_INT;

    private Builder() {
    }

    /**
     * Sets the maximum number of unique values for which permits can be held at once in the
     * to-be-constructed {@link MultisetSemaphore}.
     */
    @CanIgnoreReturnValue
    public Builder maxNumUniqueValues(int maxNumUniqueValues) {
      Preconditions.checkState(
          maxNumUniqueValues > 0,
          "maxNumUniqueValues must be positive (was %s)",
          maxNumUniqueValues);
      this.maxNumUniqueValues = maxNumUniqueValues;
      return this;
    }

    public <T> MultisetSemaphore<T> build() {
      Preconditions.checkState(
          maxNumUniqueValues != UNSET_INT,
          "maxNumUniqueValues(int) must be specified");
      return new NaiveMultisetSemaphore<>(maxNumUniqueValues);
    }
  }

  /** Returns a fresh {@link Builder}. */
  public static Builder newBuilder() {
    return new Builder();
  }

  private static class UnboundedMultisetSemaphore<T> extends MultisetSemaphore<T> {
    private static final UnboundedMultisetSemaphore<Object> INSTANCE =
        new UnboundedMultisetSemaphore<Object>();

    private UnboundedMultisetSemaphore() {
    }

    @SuppressWarnings("unchecked")
    private static <T> UnboundedMultisetSemaphore<T> instance() {
      return (UnboundedMultisetSemaphore<T>) INSTANCE;
    }

    @Override
    public void acquireAll(Set<T> valuesToAcquire) throws InterruptedException {
    }

    @Override
    public void releaseAll(Set<T> valuesToRelease) {
    }

    @Override
    public int estimateCurrentNumUniqueValues() {
      // We can't give a good estimate since we don't track values at all.
      return 0;
    }
  }

  private static class NaiveMultisetSemaphore<T> extends MultisetSemaphore<T> {
    private final int maxNumUniqueValues;
    private final Semaphore semaphore;
    private final Object lock = new Object();
    // Protected by 'lock'.
    private final HashMultiset<T> actualValues = HashMultiset.create();

    private NaiveMultisetSemaphore(int maxNumUniqueValues) {
      this.maxNumUniqueValues = maxNumUniqueValues;
      this.semaphore = new Semaphore(maxNumUniqueValues);
    }

    @Override
    public void acquireAll(Set<T> valuesToAcquire) throws InterruptedException {
      int oldNumNeededPermits;
      synchronized (lock) {
        oldNumNeededPermits = computeNumNeededPermitsLocked(valuesToAcquire);
      }
      while (true) {
        semaphore.acquire(oldNumNeededPermits);
        synchronized (lock) {
          int newNumNeededPermits = computeNumNeededPermitsLocked(valuesToAcquire);
          if (newNumNeededPermits != oldNumNeededPermits) {
            // While we were doing 'acquire' above, another thread won the race to acquire the first
            // usage of one of the values in 'valuesToAcquire' or release the last usage of one of
            // the values. This means we either acquired too many or too few permits, respectively,
            // above. Release the permits we did acquire, in order to restore the accuracy of the
            // semaphore's current count, and then try again.
            semaphore.release(oldNumNeededPermits);
            oldNumNeededPermits = newNumNeededPermits;
            continue;
          } else {
            // Our modification to the semaphore was correct, so it's sound to update the multiset.
            valuesToAcquire.forEach(actualValues::add);
            return;
          }
        }
      }
    }

    private int computeNumNeededPermitsLocked(Set<T> valuesToAcquire) {
      // We need a permit for each value that is not already in the multiset.
      return (int) valuesToAcquire.stream()
          .filter(v -> actualValues.count(v) == 0)
          .count();
    }

    @Override
    public void releaseAll(Set<T> valuesToRelease) {
      synchronized (lock) {
        // We need to release a permit for each value that currently has multiplicity 1.
        int numPermitsToRelease =
            valuesToRelease
                .stream()
                .mapToInt(v -> actualValues.remove(v, 1) == 1 ? 1 : 0)
                .sum();
        semaphore.release(numPermitsToRelease);
      }
    }

    @Override
    public int estimateCurrentNumUniqueValues() {
      return maxNumUniqueValues - semaphore.availablePermits();
    }
  }
}


text:
package org.apereo.cas;

import org.apereo.cas.util.spring.boot.AbstractCasBanner;

/**
 * This is {@link CasEurekaServerBanner}.
 *
 * @author Misagh Moayyed
 * @since 5.1.0
 */
public class CasEurekaServerBanner extends AbstractCasBanner {
    @Override
    protected String getTitle() {
        return "CAS Eureka Server";
    }
}


text:
<?php

namespace Symfony\Bundle\FrameworkBundle\Controller;

use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\HttpKernel\Controller\ContainerControllerResolver;

/**
 * ControllerResolver.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
class ControllerResolver extends ContainerControllerResolver
{
    protected $parser;

    /**
     * Constructor.
     *
     * @param ContainerInterface   $container A ContainerInterface instance
     * @param ControllerNameParser $parser    A ControllerNameParser instance
     * @param LoggerInterface      $logger    A LoggerInterface instance
     */
    public function __construct(ContainerInterface $container, ControllerNameParser $parser, LoggerInterface $logger = null)
    {
        $this->parser = $parser;

        parent::__construct($container, $logger);
    }

    /**
     * {@inheritdoc}
     */
    protected function createController($controller)
    {
        if (false === strpos($controller, '::') && 2 === substr_count($controller, ':')) {
            // controller in the a:b:c notation then
            $controller = $this->parser->parse($controller);
        }

        $resolvedController = parent::createController($controller);

        if (1 === substr_count($controller, ':') && is_array($resolvedController)) {
            if ($resolvedController[0] instanceof ContainerAwareInterface) {
                $resolvedController[0]->setContainer($this->container);
            }

            if ($resolvedController[0] instanceof AbstractController && null !== $previousContainer = $resolvedController[0]->setContainer($this->container)) {
                $resolvedController[0]->setContainer($previousContainer);
            }
        }

        return $resolvedController;
    }

    /**
     * {@inheritdoc}
     */
    protected function instantiateController($class)
    {
        $controller = parent::instantiateController($class);

        if ($controller instanceof ContainerAwareInterface) {
            $controller->setContainer($this->container);
        }
        if ($controller instanceof AbstractController && null !== $previousContainer = $controller->setContainer($this->container)) {
            $controller->setContainer($previousContainer);
        }

        return $controller;
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cSharpTestingMainProject
{
    class Program
    {
        static void Main(string[] args)
        {
        }
    }
}


text:
import express from 'express'

const router = express.Router()

const tpl = require('../../tpl.json')

router.get('/', (req, res) => res.send('[ API UP ]'))

router.get('/tpl', (req, res) => {
  res.status(200).send(tpl)
})

export default router


text:
<?php
/**
 * Configuration file generated by ZF Apigility Admin
 *
 * The previous config file has been stored in application.config.old
 */
return array(
    'modules' => array(
        'Application',
        'ZF\\DevelopmentMode',
        'ZF\\Apigility',
        'ZF\\Apigility\\Provider',
        'ZF\\Apigility\\Documentation',
        'AssetManager',
        'ZF\\ApiProblem',
        'ZF\\Configuration',
        'ZF\\MvcAuth',
        'ZF\\OAuth2',
        'ZF\\Hal',
        'ZF\\ContentNegotiation',
        'ZF\\ContentValidation',
        'ZF\\Rest',
        'ZF\\Rpc',
        'ZF\\Versioning',
        17 => 'StatusLib',
        'FreelanceForecaster'
    ),
    'module_listener_options' => array(
        'module_paths' => array(
            './module',
            './vendor'
        ),
        'config_glob_paths' => array(
            '/Users/mattsetter/Workspace/Homestead/apps/freelance-forecaster-api/config/autoload/{,*.}{global,local}.php'
        ),
        'config_cache_key' => 'application.config.cache',
        'config_cache_enabled' => true,
        'module_map_cache_key' => 'application.module.cache',
        'module_map_cache_enabled' => true,
        'cache_dir' => 'data/cache/'
    )
);


text:
This example shows an image pruning happening in an automated fashion using the
Kubernetes [CronJobs](https://docs.openshift.org/latest/dev_guide/cron_jobs.html).
In this example, we will create a CronJob that will run image pruning every 1 hour.

## Requirements

In order to execute the pruning commands successfully, it is necessary to create a
dedicated service account `image-pruner` with necessary privileges to perform pruning
against the entire cluster.  Make sure you run below commands with a user who has
the power to assign cluster roles.  Also double check the namespace you are invoking
them in, if it is the one you desire.

1. `oc create serviceaccount image-pruner`

    This command creates an `image-pruner` [service account](https://docs.openshift.org/latest/admin_guide/service_accounts.html).

2. `oc adm policy add-cluster-role-to-user system:image-pruner image-pruner`

    This command grants the `image-pruner` [role](https://docs.openshift.org/latest/admin_guide/manage_rbac.html) to that service account.

## Creating the CronJob

2. `oc create -f examples/pruner/cronjob.yaml -n default --kubeconfig=admin.kubeconfig`

    This command creates the CronJob resource that runs the pruning job every 1 hour.

Make sure, that you check the `oc adm prune --help` command and optionally tweak the
CronJob arguments by specifying how much tag revisions you want to preserve on a single
tag or other options that might suit your environment.  Full details about pruning images
can be found in the [official documentation](https://docs.openshift.org/latest/admin_guide/pruning_resources.html#pruning-images).


text:
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/acpi.h>
#include <linux/pci.h>
#include <linux/mfd/core.h>

#define SMBASE		0x40
#define SMBUS_IO_SIZE	64

#define GPIOBASE	0x44
#define GPIO_IO_SIZE	64

#define WDTBASE		0x84
#define WDT_IO_SIZE	64

static struct resource smbus_sch_resource = {
		.flags = IORESOURCE_IO,
};

static struct resource gpio_sch_resource = {
		.flags = IORESOURCE_IO,
};

static struct mfd_cell lpc_sch_cells[] = {
	{
		.name = "isch_smbus",
		.num_resources = 1,
		.resources = &smbus_sch_resource,
	},
	{
		.name = "sch_gpio",
		.num_resources = 1,
		.resources = &gpio_sch_resource,
	},
};

static struct resource wdt_sch_resource = {
		.flags = IORESOURCE_IO,
};

static struct mfd_cell tunnelcreek_cells[] = {
	{
		.name = "tunnelcreek_wdt",
		.num_resources = 1,
		.resources = &wdt_sch_resource,
	},
};

static DEFINE_PCI_DEVICE_TABLE(lpc_sch_ids) = {
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SCH_LPC) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ITC_LPC) },
	{ 0, }
};
MODULE_DEVICE_TABLE(pci, lpc_sch_ids);

static int __devinit lpc_sch_probe(struct pci_dev *dev,
				const struct pci_device_id *id)
{
	unsigned int base_addr_cfg;
	unsigned short base_addr;
	int i;
	int ret;

	pci_read_config_dword(dev, SMBASE, &base_addr_cfg);
	if (!(base_addr_cfg & (1 << 31))) {
		dev_err(&dev->dev, "Decode of the SMBus I/O range disabled\n");
		return -ENODEV;
	}
	base_addr = (unsigned short)base_addr_cfg;
	if (base_addr == 0) {
		dev_err(&dev->dev, "I/O space for SMBus uninitialized\n");
		return -ENODEV;
	}

	smbus_sch_resource.start = base_addr;
	smbus_sch_resource.end = base_addr + SMBUS_IO_SIZE - 1;

	pci_read_config_dword(dev, GPIOBASE, &base_addr_cfg);
	if (!(base_addr_cfg & (1 << 31))) {
		dev_err(&dev->dev, "Decode of the GPIO I/O range disabled\n");
		return -ENODEV;
	}
	base_addr = (unsigned short)base_addr_cfg;
	if (base_addr == 0) {
		dev_err(&dev->dev, "I/O space for GPIO uninitialized\n");
		return -ENODEV;
	}

	gpio_sch_resource.start = base_addr;
	gpio_sch_resource.end = base_addr + GPIO_IO_SIZE - 1;

	for (i=0; i < ARRAY_SIZE(lpc_sch_cells); i++)
		lpc_sch_cells[i].id = id->device;

	ret = mfd_add_devices(&dev->dev, 0,
			lpc_sch_cells, ARRAY_SIZE(lpc_sch_cells), NULL, 0);
	if (ret)
		goto out_dev;

	if (id->device == PCI_DEVICE_ID_INTEL_ITC_LPC) {
		pci_read_config_dword(dev, WDTBASE, &base_addr_cfg);
		if (!(base_addr_cfg & (1 << 31))) {
			dev_err(&dev->dev, "Decode of the WDT I/O range disabled\n");
			ret = -ENODEV;
			goto out_dev;
		}
		base_addr = (unsigned short)base_addr_cfg;
		if (base_addr == 0) {
			dev_err(&dev->dev, "I/O space for WDT uninitialized\n");
			ret = -ENODEV;
			goto out_dev;
		}

		wdt_sch_resource.start = base_addr;
		wdt_sch_resource.end = base_addr + WDT_IO_SIZE - 1;

		for (i = 0; i < ARRAY_SIZE(tunnelcreek_cells); i++)
			tunnelcreek_cells[i].id = id->device;

		ret = mfd_add_devices(&dev->dev, 0, tunnelcreek_cells,
			ARRAY_SIZE(tunnelcreek_cells), NULL, 0);
	}

	return ret;
out_dev:
	mfd_remove_devices(&dev->dev);
	return ret;
}

static void __devexit lpc_sch_remove(struct pci_dev *dev)
{
	mfd_remove_devices(&dev->dev);
}

static struct pci_driver lpc_sch_driver = {
	.name		= "lpc_sch",
	.id_table	= lpc_sch_ids,
	.probe		= lpc_sch_probe,
	.remove		= __devexit_p(lpc_sch_remove),
};

static int __init lpc_sch_init(void)
{
	return pci_register_driver(&lpc_sch_driver);
}

static void __exit lpc_sch_exit(void)
{
	pci_unregister_driver(&lpc_sch_driver);
}

module_init(lpc_sch_init);
module_exit(lpc_sch_exit);

MODULE_AUTHOR("Denis Turischev <denis@compulab.co.il>");
MODULE_DESCRIPTION("LPC interface for Intel Poulsbo SCH");
MODULE_LICENSE("GPL");


text:
Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted.

**Alias:** `emptydir()`

**Sync:** `emptyDirSync()`, `emptydirSync()`

## Example:

```js
var fs = require('fs-extra')

// assume this directory has a lot of files and folders
fs.emptyDir('/tmp/some/dir', function (err) {
  if (!err) console.log('success!')
})
```


text:
{% load staticfiles %}

    {% block brand_title %}

{{ shop_tagline }}{% endblock %}


text:
package tests.javax_servlet_http.Cookie;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.Cookie;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import java.io.IOException;
import java.io.PrintWriter;

/**
 *	A Test for setDomain method
 */

public class SetDomainTestServlet extends HttpServlet {

    public void service ( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {

        PrintWriter out = response.getWriter();
        Cookie testcookie = new Cookie( "BestLanguage", "Java" );

        String expectedResult = ".SFBAY.COM";
        testcookie.setDomain( expectedResult );
        String result = testcookie.getDomain();

        if ( result != null ) {
            if ( result.equalsIgnoreCase( expectedResult ) ) {
                out.println( "SetDomainTest test PASSED" );
            } else {
                out.println( "SetDomainTest test FAILED
 " );
                out.println( "     Cookie.setDomain(" + expectedResult + ") did not set the domain properly
" );
                out.println( "     Expected result = " + expectedResult + "
" );
                out.println( "     Actual result = |" + result + "|
" );
            }
        } else {
            out.println( "SetDomainTest test FAILED
" );
            out.println( "     Cookie.getDomain() returned a null result
" );
        }
    }
}


text:
require 'capistrano-scrip/utils'

Capistrano::Configuration.instance.load do
  namespace :tornado do
    _cset(:app_server) { "tornado" }
    _cset(:python) { "python" }
    _cset(:tornado_script_template) { "tornading.py.erb" }
    _cset(:tornado_script_path) { "/etc/init.d/#{application}.py" }

    task :start do
      run "#{python} #{tornado_script_path} start"
    end
    task :stop do
      run "#{python} #{tornado_script_path} stop"
    end
    task :restart do
      run "#{python} #{tornado_script_path} restart"
    end
    task :setup do
      generate_config(tornado_script_template, tornado_script_path)
    end

    desc "Parses config file and outputs it to STDOUT (internal task)"
    task :parse_script, :roles => :app , :except => { :no_release => true } do
      puts parse_template(tornado_script_template)
    end

    after 'deploy:setup' do
      tornado.setup if Capistrano::CLI.ui.agree("Create tornado run script? [y/n]")
    end
    after 'deploy:symlink', 'tornado:restart'
  end
end


text:
package shell

import "io"

// ProjectLocation represents a project location on a file system.
type ProjectLocation interface {
	RootPath() string
}

// Script represents a script to be executed.
type Script struct {
	Label      string
	ScriptPath string
}

// Function represents a function, whom will be sourced from Script file,
// and executed.
type Function struct {
	Script
	FunctionName string
}

// ExecutorConfig holds a executor configuration options.
type ExecutorConfig struct {
	ProjectLocation
	Streams
	Labels
	Environ []string
}

// StreamType represets either output or error stream.
type StreamType int

const (
	// StreamTypeOut represents process output stream.
	StreamTypeOut StreamType = iota
	// StreamTypeErr represents process error stream.
	StreamTypeErr
)

// PrefixFunc is used to build a prefix that will be added to each line of the
// script/function output or error stream.
type PrefixFunc func(st StreamType, label string, config ExecutorConfig) string

// Labels holds a labels to be used to prefix Out and Err streams of executed
// shells scripts/functions.
type Labels struct {
	LabelOut   string
	LabelErr   string
	SkipDate   bool
	DateFormat string
	PrefixFunc
}

// Streams holds a streams of a shell scripts/functions.
type Streams struct {
	Out io.Writer
	Err io.Writer
}

// Executor represents a executor that can execute shell scripts and call
// functions directly.
type Executor interface {
	RunScript(script Script, args ...string) error
	RunFunction(fn Function, args ...string) error
}


text:
<?php
namespace common\model\event;

use common\model\record\LogSaveErrorRecord;
use common\model\record\LogUserLoginRecord;
use yii\base\Event;
use yii\helpers\Json;

class AfterUserLoginEvent extends Event
{
    public function addLoginLog($event)
    {
        $log = new LogUserLoginRecord();
        $log->user_id = $event->identity->id ?? 0 ;
        $req = \Yii::$app->getRequest();
        $log->ipv4 = $req->getUserIP() ?? '';
        $log->user_agent = $req->getUserAgent() ?? '';
        try {
            $log->info = Json::encode([
                'user_host' => $req->getUserHost(),
                'host_info' => $req->getHostInfo(),
                'method' => $req->getMethod(),
                'referrer' => $req->getReferrer(),
                'get' => $_GET,
                'post' => $_POST,
                'files' => $_FILES,
                'raw_body' => $req->getRawBody(),
            ]);
        } catch (\Exception $e) {
            $log->info = 'Exception:' . $e->getMessage() . "\n"
                . $e->getTraceAsString();
        }
        if (!$log->save()) {
            LogSaveErrorRecord::addLog($log);
            return false;
        }
        return true;
    }

}


text:
package org.synyx.urlaubsverwaltung.user;

import org.synyx.urlaubsverwaltung.person.Person;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import java.util.Locale;
import java.util.Objects;

import static javax.persistence.EnumType.STRING;
import static javax.persistence.FetchType.LAZY;

@Entity
@Table(name = "user_settings")
class UserSettingsEntity {

    @Id
    @Column(name = "person_id")
    private Integer personId;

    @OneToOne(fetch = LAZY)
    @PrimaryKeyJoinColumn(name = "person_id", referencedColumnName = "id")
    private Person person;

    @NotNull
    @Enumerated(STRING)
    private Theme theme;

    private Locale locale;

    public Integer getPersonId() {
        return personId;
    }

    public void setPersonId(Integer personId) {
        this.personId = personId;
    }

    public Person getPerson() {
        return person;
    }

    public void setPerson(Person person) {
        this.person = person;
    }

    public Theme getTheme() {
        return theme;
    }

    public void setTheme(Theme theme) {
        this.theme = theme;
    }

    public Locale getLocale() {
        return locale;
    }

    public void setLocale(Locale locale) {
        this.locale = locale;
    }

    @Override
    public String toString() {
        return "UserSettingsEntity{" +
            "personId=" + personId +
            ", theme=" + theme +
            ", locale=" + locale +
            '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserSettingsEntity that = (UserSettingsEntity) o;
        return Objects.equals(personId, that.personId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(personId);
    }
}


text:
package main

import (
	"fmt"
	"strings"

	"github.com/codegangsta/cli"
	"github.com/shipyard/shipyard/client"
)

var stopCommand = cli.Command{
	Name:        "stop",
	Usage:       "stop a container",
	Description: "stop <id> [<id>]",
	Action:      stopAction,
}

func stopAction(c *cli.Context) {
	cfg, err := loadConfig()
	if err != nil {
		logger.Fatal(err)
	}
	m := client.NewManager(cfg)
	containers, err := m.Containers()
	if err != nil {
		logger.Fatalf("error getting container info: %s", err)
	}
	ids := c.Args()
	if len(ids) == 0 {
		logger.Fatalf("you must specify at least one id")
	}
	for _, cnt := range containers {
		// this can probably be more efficient
		for _, i := range ids {
			if strings.HasPrefix(cnt.ID, i) {
				if err := m.Stop(cnt); err != nil {
					logger.Fatalf("error stopping container: %s\n", err)
				}
				fmt.Printf("stopped %s\n", cnt.ID[:12])
			}
		}
	}
}


text:
package com.xeiam.xchange.btcchina.dto.trade.request;

import com.xeiam.xchange.btcchina.BTCChinaExchange;
import com.xeiam.xchange.btcchina.dto.BTCChinaRequest;

/**
 * @author David Yam
 */
public class BTCChinaCancelOrderRequest extends BTCChinaRequest {

  public BTCChinaCancelOrderRequest(String method, int id, String market) {

    this.method = method;
    this.params = String.format("[%1$d,\"%2$s\"]", id, market == null ? BTCChinaExchange.DEFAULT_MARKET : market);
  }

  /**
   * Constructor
   */
  public BTCChinaCancelOrderRequest(int id) {

    method = "cancelOrder";
    params = "[" + id + "]";
  }

  /**
   * @deprecated
   */
  @Deprecated
  public BTCChinaCancelOrderRequest(long id) {

    this((int) id);
  }

  @Override
  public String toString() {

    return String.format("BTCChinaCancelOrderRequest{id=%d, method=%s, params=%s}", id, method, params);
  }

}


text:
using namespace std;

const std::string getCurrentDateTime() {
    time_t     now = time(0);
    struct tm  tstruct;
    char       buf[80];
    tstruct = *localtime(&now);
    // Visit http://en.cppreference.com/w/cpp/chrono/c/strftime
    // for more information about date/time format
    strftime(buf, sizeof(buf), "[INFO] %Y-%m-%dT%X", &tstruct);

    return buf;
}

int main(int argc, char *argv[])
{

	opts *opt = new opts;
	Form fm(opt);
	if (fm.opt_parse(argc,argv,opt)!=1)
		exit(1);

	fprintf(stderr,"%s rHAT-indexer started\n",getCurrentDateTime().c_str());

	uint32_t len_genome = 0;

	read_file rdfl;
	char 	*genome = rdfl.read_ref(opt->refpath,&len_genome);

	Hash hashh;
	hashh.write_hashfile(opt->hashdir,genome,len_genome,opt->len_sed);

	if ( NULL != opt ) delete opt;
	fprintf(stderr,"%s rHAT-indexer ended\n",getCurrentDateTime().c_str());
	return 0;

}


text:
import tmrm = require('vsts-task-lib/mock-run');
import VersionInfoVersion from 'packaging-common/pe-parser/VersionInfoVersion'
import {VersionInfo} from 'packaging-common/pe-parser/VersionResource'

import * as pkgMock from 'packaging-common/Tests/MockHelper';

export class NugetMockHelper {
    private defaultNugetVersion = '3.3.0';
    private defaultNugetVersionInfo = [3,3,0,212];

    constructor(
        private tmr: tmrm.TaskMockRunner) {
        process.env['AGENT_HOMEDIRECTORY'] = "c:\\agent\\home\\directory";
        process.env['BUILD_SOURCESDIRECTORY'] = "c:\\agent\\home\\directory\\sources",
        process.env['ENDPOINT_AUTH_SYSTEMVSSCONNECTION'] = "{\"parameters\":{\"AccessToken\":\"token\"},\"scheme\":\"OAuth\"}";
        process.env['ENDPOINT_URL_SYSTEMVSSCONNECTION'] = "https://example.visualstudio.com/defaultcollection";
        process.env['SYSTEM_DEFAULTWORKINGDIRECTORY'] = "c:\\agent\\home\\directory";
        process.env['SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'] = "https://example.visualstudio.com/defaultcollection";

        pkgMock.registerLocationHelpersMock(tmr);
    }

    public setNugetVersionInputDefault() {
        this.tmr.setInput('versionSpec', this.defaultNugetVersion);
    }

    public registerDefaultNugetVersionMock() {
        this.registerNugetVersionMock(this.defaultNugetVersion, this.defaultNugetVersionInfo);
        this.registerNugetToolGetterMock();
    }

    public registerNugetToolGetterMock() {
        this.tmr.registerMock('packaging-common/nuget/NuGetToolGetter', {
            getNuGet: function(versionSpec) {
                return "c:\\from\\tool\\installer\\nuget.exe";
            },
        } )
    }

    public registerNugetVersionMock(productVersion: string, versionInfoVersion: number[]) {
        this.registerNugetVersionMockInternal(productVersion, versionInfoVersion);
        this.tmr.registerMock('../pe-parser', {
            getFileVersionInfoAsync: function(nuGetExePath) {
                let result: VersionInfo = { strings: {} };
                result.fileVersion = new VersionInfoVersion(versionInfoVersion[0], versionInfoVersion[1], versionInfoVersion[2], versionInfoVersion[3]);
                result.strings['ProductVersion'] = productVersion;
                return result;
            }
        })
    }

    private registerNugetVersionMockInternal(productVersion: string, versionInfoVersion: number[]) {
        this.tmr.registerMock('packaging-common/pe-parser/index', {
            getFileVersionInfoAsync: function(nuGetExePath) {
                let result: VersionInfo = { strings: {} };
                result.fileVersion = new VersionInfoVersion(versionInfoVersion[0], versionInfoVersion[1], versionInfoVersion[2], versionInfoVersion[3]);
                result.productVersion = new VersionInfoVersion(versionInfoVersion[0], versionInfoVersion[1], versionInfoVersion[2], versionInfoVersion[3]);
                result.strings['ProductVersion'] = productVersion;
                return result;
            }
        })
    }

    public registerNugetUtilityMock(projectFile: string[]) {
        this.tmr.registerMock('packaging-common/nuget/Utility', {
            resolveFilterSpec: function(filterSpec, basePath?, allowEmptyMatch?) {
                return projectFile;
            },
            stripLeadingAndTrailingQuotes: function(path) {
                return path;
            },
            locateCredentialProvider: function(path) {
                return 'c:\\agent\\home\\directory\\externals\\nuget\\CredentialProvider';
            },
            setConsoleCodePage: function() {
                var tlm = require('vsts-task-lib/mock-task');
                tlm.debug(`setting console code page`);
            },
            getNuGetFeedRegistryUrl: function(
                packagingCollectionUrl: string,
                feedId: string,
                nuGetVersion: VersionInfo,
                accessToken?: string) {
                    return packagingCollectionUrl + feedId;
            }
        } );

        this.tmr.registerMock('./Utility', {
            resolveToolPath: function(path) {
                return path;
            }
        });
    }

    public registerNugetConfigMock() {
        var nchm = require('./NuGetConfigHelper-mock');
        this.tmr.registerMock('packaging-common/nuget/NuGetConfigHelper', nchm);
    }

    public registerToolRunnerMock() {
        var mtt = require('vsts-task-lib/mock-toolrunner');
        this.tmr.registerMock('vsts-task-lib/toolrunner', mtt);
    }

    public RegisterLocationServiceMocks() {
        this.tmr.registerMock('vso-node-api/WebApi', {
            getBearerHandler: function(token){
                return {};
            },
            WebApi: function(url, handler){
                return {
                    getCoreApi: function() {
                        return {
                            vsoClient: {
                                getVersioningData: function (ApiVersion, PackagingAreaName, PackageAreaId, Obj) {
                                    return { requestUrl:"foobar" }
                                }
                            }
                        };
                    }
                };
            }
        })
    }

    public setAnswers(a) {
        a.osType["osType"] = "Windows_NT";
        a.exist["c:\\agent\\home\\directory\\externals\\nuget\\nuget.exe"] = true;
        a.exist["c:\\from\\tool\\installer\\nuget.exe"] = true;
        a.exist["c:\\agent\\home\\directory\\externals\\nuget\\CredentialProvider\\CredentialProvider.TeamBuild.exe"] = true;
        this.tmr.setAnswers(a);
    }
}


text:
@interface LFBPagingView ()<UITableViewDelegate,UITableViewDataSource,UIScrollViewDelegate>

@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, strong) UIView *titleView;

@end
@implementation LFBPagingView{
    UIView *_selectView;
    CGFloat _contentOffsetX;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self initSubviews];
        [self initLayout];
        [self setdividerLine];
    }
    return self;
}

- (void)initSubviews{

    [self addSubview:self.titleView];
    [self addSubview:self.scrollView];

}

- (void)initLayout{

   [_titleView mas_makeConstraints:^(MASConstraintMaker *make) {
       make.top.left.right.equalTo(self);
       make.height.equalTo(@44);
   }];

  [_scrollView mas_makeConstraints:^(MASConstraintMaker *make) {
      make.top.equalTo(self.mas_top).with.offset(44);
      make.left.right.bottom.equalTo(self);
  }];
}

#pragma mark - p setter
- (void)setTitleArray:(NSMutableArray *)titleArray{
    _titleArray = titleArray;
    if (_titleArray.count == 0) return;
    _scrollView.contentSize = CGSizeMake(ScreenWidth * _titleArray.count, self.bounds.size.height-44);
    //设置按钮的宽度和高度
    CGFloat buttonWidth = ScreenWidth/_titleArray.count;
    CGFloat buttonHeight = 42;
    for (int index = 0; index <_titleArray.count; ++index) {
        //遍历设置标题按钮的位置标题等信息
        UIButton *selectButton = [[UIButton alloc]init];
        selectButton.bounds = CGRectMake(0, 0,buttonWidth, buttonHeight);
        selectButton.center = CGPointMake((index + 0.5)*buttonWidth, 21);
        selectButton.tag = index + 100;
        [selectButton setTitle:_titleArray[index] forState:UIControlStateNormal];
        [selectButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        [selectButton setTitleColor:[UIColor redColor] forState:UIControlStateSelected];
        [selectButton addTarget:self action:@selector(respondsToSelectButton:) forControlEvents:UIControlEventTouchUpInside];
        [self.titleView addSubview:selectButton];

        //遍历添加tableView
        CGFloat offsetX = index * ScreenWidth;
        UITableView *tableView = [[UITableView alloc]initWithFrame:CGRectMake(offsetX, 0, ScreenWidth, self.bounds.size.height-44) style:UITableViewStylePlain];

        if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) {
            [tableView setSeparatorInset:UIEdgeInsetsZero];
        }
        if ([tableView respondsToSelector:@selector(setLayoutMargins:)]) {
            [tableView setLayoutMargins:UIEdgeInsetsZero];
        }
        tableView.delegate = self;
        tableView.dataSource= self;
        tableView.showsVerticalScrollIndicator = NO;
        tableView.showsHorizontalScrollIndicator = NO;
        tableView.bounces = NO;
        tableView.tag = index + 200;
        [_scrollView addSubview:tableView];
        [_tableArray addObject:tableView];
    }
    //设置选中下划线的位置
    _selectView = [UIView new];
    _selectView.backgroundColor = [UIColor redColor];
    _selectView.bounds = CGRectMake(0, 0, buttonWidth - 28, 3);
    _selectView.center = CGPointMake(buttonWidth/2, 42);
    _selectView.layer.cornerRadius = 1;
    _selectView.layer.masksToBounds = YES;
    [_titleView addSubview:_selectView];
}

#pragma mark - p button click methods
- (void)respondsToSelectButton:(UIButton *)sender{

    //返回当前选中的标题下标
    if (self.lfb_delegate && [self.lfb_delegate respondsToSelector:@selector(lfb_selectTableViewIndex:)]) {
        [self.lfb_delegate lfb_selectTableViewIndex:sender.tag - 100];
    }
    CGFloat buttonWidth = ScreenWidth/_titleArray.count;
    //再次遍历判断是哪个按钮被选中
    for (int index = 0; index<_titleArray.count; ++index) {
        //设置选中的按钮标题颜色以及下划线位置
        if (sender.tag == index + 100) {
            [sender setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
            [UIView animateWithDuration:0.5 animations:^{
                 _selectView.center = CGPointMake((index + 0.5) * buttonWidth, 42);
                _scrollView.contentOffset = CGPointMake(index *ScreenWidth, 0);
            }];
        }else{
            //设置没有被选中的按钮标题颜色
            UIButton *button = [self viewWithTag:index + 100];
            [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        }
    }
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{

    return [self.lfb_delegate lfb_numberOfSectionsInTableView:tableView];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{

    return [self.lfb_delegate lfb_tableView:tableView numberOfRowsInSection:section];
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{

    return [self.lfb_delegate lfb_tableView:tableView heightForRowAtIndexPath:indexPath];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

    return [self.lfb_delegate lfb_tableView:tableView cellForRowAtIndexPath:indexPath];
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

    return [self.lfb_delegate lfb_tableView:tableView didSelectRowAtIndexPath:indexPath];
}

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{

    if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
        [cell setSeparatorInset:UIEdgeInsetsZero];
    }
    if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
        [cell setLayoutMargins:UIEdgeInsetsZero];
    }
}

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{

    _contentOffsetX = scrollView.contentOffset.x;
}

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{

    int index = (scrollView.contentOffset.x/(ScreenWidth/2))/2;
    CGFloat buttonWidth = ScreenWidth/_titleArray.count;
    if (_contentOffsetX < scrollView.contentOffset.x && (((int)scrollView.contentOffset.x)/((int)ScreenWidth/2))>= 2*index - 1 && (((int)scrollView.contentOffset.x)/((int)ScreenWidth/2))<= 2*index) {

        if ((int)scrollView.contentOffset.x % (int)ScreenWidth == 0){
            index  = index - 1;
        }
        for (int i = 0; i< _titleArray.count; ++i) {
            if (index + 1 == i) {
                UIButton *button = [self viewWithTag:index + 101];
                [button setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
                [UIView animateWithDuration:0.5 animations:^{
                    _selectView.center = CGPointMake((index + 0.5 + 1) * buttonWidth, 42);
                }];
            }else{
                //设置没有被选中的按钮标题颜色
                UIButton *button = [self viewWithTag:i + 100];
                [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
            }
        }
    }else if (_contentOffsetX > scrollView.contentOffset.x && (((int)scrollView.contentOffset.x)/((int)ScreenWidth/2))>= 2*index && (((int)scrollView.contentOffset.x)/((int)ScreenWidth/2))<= 2*index + 1){
        for (int i = 0; i< _titleArray.count; ++i) {
            if (index == i) {
                UIButton *button = [self viewWithTag:index + 100];
                [button setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
                [UIView animateWithDuration:0.5 animations:^{
                    _selectView.center = CGPointMake((index + 0.5) * buttonWidth, 42);
                }];
            }else{
                //设置没有被选中的按钮标题颜色
                UIButton *button = [self viewWithTag:i + 100];
                [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
            }
        }
    }

}

- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{

           int index = (scrollView.contentOffset.x/(ScreenWidth/2))/2;
           CGFloat buttonWidth = ScreenWidth/_titleArray.count;
        if (_contentOffsetX < scrollView.contentOffset.x && (((int)scrollView.contentOffset.x)/((int)ScreenWidth/2))>= 2*(index+1)-1 && (((int)scrollView.contentOffset.x)/((int)ScreenWidth/2))<= 2*(index + 1)) {

            for (int i = 0; i< _titleArray.count; ++i) {
                if (index + 1 == i) {
                    if (self.lfb_delegate && [self.lfb_delegate respondsToSelector:@selector(lfb_selectTableViewIndex:)]) {
                        [self.lfb_delegate lfb_selectTableViewIndex:index+1];
                    }
                    UIButton *button = [self viewWithTag:index + 101];
                    [button setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
                    [UIView animateWithDuration:0.5 animations:^{
                        _selectView.center = CGPointMake((index + 0.5 + 1) * buttonWidth, 42);
                    }];
                }else{
                    //设置没有被选中的按钮标题颜色
                    UIButton *button = [self viewWithTag:i + 100];
                    [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
                }
            }
        }else if (_contentOffsetX > scrollView.contentOffset.x && (((int)scrollView.contentOffset.x)/((int)ScreenWidth/2))>= 2*index && (((int)scrollView.contentOffset.x)/((int)ScreenWidth/2))<= 2*index + 1){

            for (int i = 0; i< _titleArray.count; ++i) {
                if (index == i) {
                    if (self.lfb_delegate && [self.lfb_delegate respondsToSelector:@selector(lfb_selectTableViewIndex:)]) {
                        [self.lfb_delegate lfb_selectTableViewIndex:index];
                    }
                    UIButton *button = [self viewWithTag:index + 100];
                    [button setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
                    [UIView animateWithDuration:0.5 animations:^{
                        _selectView.center = CGPointMake((index + 0.5) * buttonWidth, 42);
                    }];
                }else{
                    //设置没有被选中的按钮标题颜色
                    UIButton *button = [self viewWithTag:i + 100];
                    [button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
                }
            }
        }
}

#pragma mark - p getter
- (UIScrollView *)scrollView{

    return _scrollView?:({
        _scrollView = [[UIScrollView alloc]init];
        _scrollView.showsVerticalScrollIndicator = NO;
        _scrollView.showsHorizontalScrollIndicator = YES;
        _scrollView.contentOffset = CGPointZero;
        _scrollView.pagingEnabled = YES;
        _scrollView.bounces = NO;
        _scrollView.delegate = self;
        _scrollView;
    });
}

- (UIView *)titleView{

    return _titleView?:({
        _titleView = [[UIView alloc]init];
        _titleView;
    });
}

- (void)setdividerLine{

    UIView *lineView = [UIView new];
    lineView.backgroundColor = [UIColor colorWithRed:216/255.0f green:216/255.0f blue:216/255.0f alpha:1];
    lineView.frame = CGRectMake(0, 43, ScreenWidth, 1);
    [self addSubview:lineView];
}

- (NSMutableArray *)tableArray{

    return _tableArray?:({
        _tableArray = [NSMutableArray array];
        _tableArray;
    });
}

@end


text:
LANG_NAME_SERVERS=Serwery DNS
LANG_SET_NS=Ustaw serwery DNS dla nowych Użytkowników


text:
val* abstract_collection__Collection__iterator(val* self);
extern const int COLOR_abstract_collection__Collection__length;
short int abstract_collection__Collection__is_empty(val* self);
extern const int COLOR_abstract_collection__Collection__iterator;
extern const int COLOR_abstract_collection__Iterator__is_ok;
extern const int COLOR_abstract_collection__Iterator__item;
extern const int COLOR_abstract_collection__Iterator__next;
long abstract_collection__Collection__length(val* self);
extern const int COLOR_abstract_collection__Collection_FT0;
extern const int COLOR_kernel__Object___61d_61d;
short int abstract_collection__Collection__has(val* self, val* p0);
extern const int COLOR_kernel__Object___33d_61d;
short int abstract_collection__Collection__has_only(val* self, val* p0);
long abstract_collection__Collection__count(val* self, val* p0);
extern const struct type type_kernel__Int;
val* abstract_collection__Collection__first(val* self);
extern const int COLOR_abstract_collection__Collectionabstract_collection__Collection_FT0;
extern const int COLOR_abstract_collection__Collection__has;
short int abstract_collection__Collection__has_all(val* self, val* p0);
val* abstract_collection__Iterator__item(val* self);
void abstract_collection__Iterator__next(val* self);
short int abstract_collection__Iterator__is_ok(val* self);
extern const int COLOR_abstract_collection__Container___item;
val* abstract_collection__Container__first(val* self);
short int abstract_collection__Container__is_empty(val* self);
long abstract_collection__Container__length(val* self);
short int abstract_collection__Container__has(val* self, val* p0);
short int abstract_collection__Container__has_only(val* self, val* p0);
long abstract_collection__Container__count(val* self, val* p0);
val* NEW_abstract_collection__ContainerIterator(const struct type* type);
extern const int COLOR_abstract_collection__ContainerIteratorabstract_collection__Container_FT0;
extern const int COLOR_abstract_collection__ContainerIterator__init;
void CHECK_NEW_abstract_collection__ContainerIterator(val*);
val* abstract_collection__Container__iterator(val* self);
extern const int COLOR_abstract_collection__Container_FT0;
void abstract_collection__Container__init(val* self, val* p0);
val* abstract_collection__Container__item(val* self);
void abstract_collection__Container__item_61d(val* self, val* p0);
extern const int COLOR_abstract_collection__ContainerIterator___container;
extern const int COLOR_abstract_collection__Container__item;
val* abstract_collection__ContainerIterator__item(val* self);
extern const int COLOR_abstract_collection__ContainerIterator___is_ok;
void abstract_collection__ContainerIterator__next(val* self);
extern const int COLOR_abstract_collection__Containerabstract_collection__ContainerIterator_FT0;
void abstract_collection__ContainerIterator__init(val* self, val* p0);
short int abstract_collection__ContainerIterator__is_ok(val* self);
void abstract_collection__RemovableCollection__clear(val* self);
extern const int COLOR_abstract_collection__RemovableCollection_FT0;
void abstract_collection__RemovableCollection__remove(val* self, val* p0);
extern const int COLOR_abstract_collection__RemovableCollection__remove;
void abstract_collection__RemovableCollection__remove_all(val* self, val* p0);
extern const int COLOR_abstract_collection__SimpleCollection_FT0;
void abstract_collection__SimpleCollection__add(val* self, val* p0);
extern const int COLOR_abstract_collection__Collectionabstract_collection__SimpleCollection_FT0;
extern const int COLOR_abstract_collection__SimpleCollection__add;
void abstract_collection__SimpleCollection__add_all(val* self, val* p0);
short int abstract_collection__Set__has_only(val* self, val* p0);
long abstract_collection__Set__count(val* self, val* p0);
void abstract_collection__Set__remove_all(val* self, val* p0);
extern const struct type type_abstract_collection__Setkernel__Object;
extern const int COLOR_abstract_collection__Collectionabstract_collection__Set_FT0;
extern const int COLOR_abstract_collection__Collection__has_all;
short int abstract_collection__Set___61d_61d(val* self, val* p0);
long kernel__Int__hash(long self);
long abstract_collection__Set__hash(val* self);
extern const int COLOR_abstract_collection__MapRead_FT0;
val* abstract_collection__MapRead___91d_93d(val* self, val* p0);
extern const int COLOR_abstract_collection__MapRead_FT1;
extern const int COLOR_abstract_collection__MapRead__has_key;
extern const int COLOR_abstract_collection__MapRead___91d_93d;
val* abstract_collection__MapRead__get_or_default(val* self, val* p0, val* p1);
extern const int COLOR_abstract_collection__MapRead__keys;
short int abstract_collection__MapRead__has_key(val* self, val* p0);
val* abstract_collection__MapRead__iterator(val* self);
val* abstract_collection__MapRead__values(val* self);
val* abstract_collection__MapRead__keys(val* self);
short int abstract_collection__MapRead__is_empty(val* self);
long abstract_collection__MapRead__length(val* self);
extern const int COLOR_abstract_collection__Map_FT0;
extern const int COLOR_abstract_collection__Map_FT1;
void abstract_collection__Map___91d_93d_61d(val* self, val* p0, val* p1);
extern const int COLOR_abstract_collection__Mapabstract_collection__Map_FT0abstract_collection__Map_FT1;
extern const int COLOR_abstract_collection__MapRead__iterator;
extern const int COLOR_abstract_collection__MapIterator__is_ok;
extern const int COLOR_abstract_collection__MapIterator__key;
extern const int COLOR_abstract_collection__MapIterator__item;
extern const int COLOR_abstract_collection__Map___91d_93d_61d;
extern const int COLOR_abstract_collection__MapIterator__next;
void abstract_collection__Map__recover_with(val* self, val* p0);
void abstract_collection__Map__clear(val* self);
val* abstract_collection__Map__values(val* self);
val* abstract_collection__Map__keys(val* self);
val* abstract_collection__MapIterator__item(val* self);
val* abstract_collection__MapIterator__key(val* self);
void abstract_collection__MapIterator__next(val* self);
short int abstract_collection__MapIterator__is_ok(val* self);
extern const int COLOR_abstract_collection__MapKeysIterator___64diterator;
val* abstract_collection__MapKeysIterator__iterator(val* self);
extern const int COLOR_abstract_collection__MapIteratorabstract_collection__MapKeysIterator_FT0abstract_collection__MapKeysIterator_FT1;
void abstract_collection__MapKeysIterator__iterator_61d(val* self, val* p0);
extern const int COLOR_abstract_collection__MapKeysIterator__iterator;
short int abstract_collection__MapKeysIterator__is_ok(val* self);
void abstract_collection__MapKeysIterator__next(val* self);
val* abstract_collection__MapKeysIterator__item(val* self);
void abstract_collection__MapKeysIterator__init(val* self, val* p0);
extern const int COLOR_abstract_collection__MapValuesIterator___64diterator;
val* abstract_collection__MapValuesIterator__iterator(val* self);
extern const int COLOR_abstract_collection__MapIteratorabstract_collection__MapValuesIterator_FT0abstract_collection__MapValuesIterator_FT1;
void abstract_collection__MapValuesIterator__iterator_61d(val* self, val* p0);
extern const int COLOR_abstract_collection__MapValuesIterator__iterator;
short int abstract_collection__MapValuesIterator__is_ok(val* self);
void abstract_collection__MapValuesIterator__next(val* self);
val* abstract_collection__MapValuesIterator__item(val* self);
void abstract_collection__MapValuesIterator__init(val* self, val* p0);
extern const int COLOR_abstract_collection__Collection__is_empty;
extern const int COLOR_abstract_collection__SequenceRead___91d_93d;
val* abstract_collection__SequenceRead__first(val* self);
val* abstract_collection__SequenceRead___91d_93d(val* self, long p0);
val* abstract_collection__SequenceRead__last(val* self);
extern const int COLOR_abstract_collection__SequenceRead_FT0;
extern const int COLOR_abstract_collection__IndexedIterator__index;
long abstract_collection__SequenceRead__index_of(val* self, val* p0);
val* abstract_collection__SequenceRead__iterator(val* self);
extern const struct type type_abstract_collection__SequenceReadnullable_kernel__Object;
short int abstract_collection__SequenceRead___61d_61d(val* self, val* p0);
long abstract_collection__SequenceRead__hash(val* self);
extern const int COLOR_abstract_collection__Sequence_FT0;
extern const int COLOR_abstract_collection__Sequence___91d_93d_61d;
void abstract_collection__Sequence__first_61d(val* self, val* p0);
void abstract_collection__Sequence__last_61d(val* self, val* p0);
extern const int COLOR_abstract_collection__Sequence__push;
void abstract_collection__Sequence__add(val* self, val* p0);
void abstract_collection__Sequence__push(val* self, val* p0);
extern const int COLOR_abstract_collection__Collectionabstract_collection__Sequence_FT0;
void abstract_collection__Sequence__append(val* self, val* p0);
val* abstract_collection__Sequence__pop(val* self);
void abstract_collection__Sequence__unshift(val* self, val* p0);
val* abstract_collection__Sequence__shift(val* self);
void abstract_collection__Sequence___91d_93d_61d(val* self, long p0, val* p1);
void abstract_collection__Sequence__remove_at(val* self, long p0);
long abstract_collection__IndexedIterator__index(val* self);
extern const int COLOR_abstract_collection__CoupleMap_FT0;
val* abstract_collection__CoupleMap__couple_at(val* self, val* p0);
extern const int COLOR_abstract_collection__CoupleMap__couple_at;
extern const int COLOR_abstract_collection__Couple__second;
val* abstract_collection__CoupleMap___91d_93d(val* self, val* p0);
extern const int COLOR_abstract_collection__CoupleMapIterator___iter;
val* abstract_collection__CoupleMapIterator__item(val* self);
extern const int COLOR_abstract_collection__Couple__first;
val* abstract_collection__CoupleMapIterator__key(val* self);
short int abstract_collection__CoupleMapIterator__is_ok(val* self);
void abstract_collection__CoupleMapIterator__next(val* self);
extern const int COLOR_abstract_collection__Iteratorabstract_collection__Coupleabstract_collection__CoupleMapIterator_FT0abstract_collection__CoupleMapIterator_FT1;
void abstract_collection__CoupleMapIterator__init(val* self, val* p0);
extern const int COLOR_abstract_collection__Couple___first;
val* abstract_collection__Couple__first(val* self);
extern const int COLOR_abstract_collection__Couple_FT0;
void abstract_collection__Couple__first_61d(val* self, val* p0);
extern const int COLOR_abstract_collection__Couple___second;
val* abstract_collection__Couple__second(val* self);
extern const int COLOR_abstract_collection__Couple_FT1;
void abstract_collection__Couple__second_61d(val* self, val* p0);
void abstract_collection__Couple__init(val* self, val* p0, val* p1);


text:
layout: page
title: Light Rider Systems Executive Retreat
date: 2016-05-24
author: Madison Ferrell
tags: weekly links, java
status: published
summary: Pellentesque sed risus ultricies, cursus ex nec.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 08/24/2018
  endDate: 08/26/2018
  ctyhocn: DUJPAHX
  groupCode: LRSER
published: true
---
Nam volutpat sem id blandit pharetra. Suspendisse vitae fringilla odio. Proin eu suscipit lacus. Aliquam dignissim erat quis egestas tempor. Aenean odio lorem, malesuada in tortor eget, lacinia ullamcorper risus. Sed lectus ipsum, interdum vel fermentum vitae, malesuada quis orci. Donec eget libero urna. Duis sit amet nulla ornare nunc venenatis imperdiet. Pellentesque nec cursus nisi, sollicitudin fermentum nulla.

* Fusce quis lectus a tellus fermentum volutpat ut accumsan quam
* Suspendisse vitae risus facilisis, suscipit eros ac, pellentesque turpis
* Fusce faucibus ex eget enim facilisis egestas
* Vestibulum blandit urna ut nisl aliquam, eu posuere arcu condimentum
* Aenean posuere purus a odio scelerisque tincidunt.

Fusce ipsum ex, imperdiet dignissim tellus ac, vestibulum semper enim. Donec dictum, orci vel mollis consequat, risus est imperdiet tortor, placerat laoreet tellus dui id tellus. Suspendisse potenti. Phasellus luctus sodales felis, quis aliquam leo scelerisque eu. Nulla fringilla eros in quam efficitur fringilla. Nam porttitor dui non massa vestibulum, nec convallis lectus pretium. Suspendisse placerat tortor tincidunt vehicula porttitor. Donec et posuere nisi. Sed ac ex quis purus vulputate sollicitudin.


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Fusion.Core;
using Fusion.Core.Mathematics;
using Fusion.Core.Configuration;
using Fusion.Engine.Common;
using Fusion.Drivers.Graphics;
using System.Runtime.InteropServices;

namespace Fusion.Engine.Graphics {
	public partial class LightRenderer : GameModule {

		const int	BlockSizeX		=	16;
		const int	BlockSizeY		=	16;

		const int	VoxelSize		=	64;
		const int	VoxelCount		=	VoxelSize * VoxelSize * VoxelSize;

		RenderSystem rs { get { return Game.RenderSystem; } }

		DepthStencil2D		spotDepth		;
		RenderTarget2D		spotColor		;

		CascadedShadowMap	cascadedShadowMap;

		OmniLightGPU[]		omniLightData;
		SpotLightGPU[]		spotLightData;
		EnvLightGPU[]		envLightData;
		StructuredBuffer	omniLightBuffer	;
		StructuredBuffer	spotLightBuffer	;
		StructuredBuffer	envLightBuffer	;

		internal RenderTarget2D	SpotColor { get { return spotColor; } }
		internal DepthStencil2D	SpotDepth { get { return spotDepth; } }

		internal CascadedShadowMap CascadedShadowMap { get { return cascadedShadowMap; } }

		enum LightingFlags {
			SOLIDLIGHTING	=	0x0001,
			PARTICLES		=	0x0002,
		}

		enum VoxelFlags {
			DEBUG_DRAW_VOXEL		=	0x0001,
			COPY_BUFFER_TO_VOXEL	=	0x0002,
			CLEAR_VOXEL				=	0x0004,
		}

		[StructLayout(LayoutKind.Explicit, Size=656)]
		struct LightingParams {
			[FieldOffset(  0)] public Matrix	View;
			[FieldOffset( 64)] public Matrix	Projection;
			[FieldOffset(128)] public Matrix	InverseViewProjection;
			[FieldOffset(192)] public Vector4	FrustumVectorTR;
			[FieldOffset(208)] public Vector4	FrustumVectorBR;
			[FieldOffset(224)] public Vector4	FrustumVectorBL;
			[FieldOffset(240)] public Vector4	FrustumVectorTL;
			[FieldOffset(256)] public Matrix	CSMViewProjection0;
			[FieldOffset(320)] public Matrix	CSMViewProjection1;
			[FieldOffset(384)] public Matrix	CSMViewProjection2;
			[FieldOffset(448)] public Matrix	CSMViewProjection3;
			[FieldOffset(512)] public Vector4	ViewPosition;
			[FieldOffset(528)] public Vector4	DirectLightDirection;
			[FieldOffset(544)] public Vector4	DirectLightIntensity;
			[FieldOffset(560)] public Vector4	ViewportSize;
			[FieldOffset(576)] public Vector4	CSMFilterRadius;
			[FieldOffset(592)] public Color4	AmbientColor;
			[FieldOffset(608)] public Vector4	Viewport;
			[FieldOffset(624)] public float		ShowCSLoadOmni;
			[FieldOffset(628)] public float		ShowCSLoadEnv;
			[FieldOffset(632)] public float		ShowCSLoadSpot;
			[FieldOffset(636)] public int		CascadeCount;
			[FieldOffset(640)] public float		CascadeScale;

		}

		struct OmniLightGPU {
			public Vector4	PositionRadius;
			public Vector4	Intensity;
			public Vector4	ExtentMin;	// x,y, depth
			public Vector4	ExtentMax;	// x,y, depth
		}

		struct EnvLightGPU {
			public Vector4	Position;
			public Vector4	Intensity;
			public Vector4	ExtentMin;	// x,y, depth
			public Vector4	ExtentMax;	// x,y, depth
			public Vector4	InnerOuterRadius;
		}

		struct SpotLightGPU {
			public Matrix	ViewProjection;
			public Vector4	PositionRadius;
			public Vector4	IntensityFar;
			public Vector4	ExtentMin;	// x,y, depth
			public Vector4	ExtentMax;	// x,y, depth
			public Vector4	MaskScaleOffset;
			public Vector4	ShadowScaleOffset;
		}

		Ubershader		lightingShader;
		Ubershader		voxelShader;
		StateFactory	voxelFactory;
		StateFactory	factory;
		ConstantBuffer	lightingCB;

		/// <summary>
		///
		/// </summary>
		/// <param name="game"></param>
		public LightRenderer( Game game ) : base(game)
		{
			SetDefaults();
		}

		/// <summary>
		///
		/// </summary>
		public override void Initialize ()
		{
			lightingCB			=	new ConstantBuffer( Game.GraphicsDevice, typeof(LightingParams) );
			omniLightBuffer		=	new StructuredBuffer( Game.GraphicsDevice, typeof(OmniLightGPU), RenderSystem.MaxOmniLights, StructuredBufferFlags.None );
			spotLightBuffer		=	new StructuredBuffer( Game.GraphicsDevice, typeof(SpotLightGPU), RenderSystem.MaxSpotLights, StructuredBufferFlags.None );
			envLightBuffer		=	new StructuredBuffer( Game.GraphicsDevice, typeof(EnvLightGPU),  RenderSystem.MaxEnvLights, StructuredBufferFlags.None );

			CreateShadowMaps();

			LoadContent();
			Game.Reloading += (s,e) => LoadContent();
		}

		/// <summary>
		///
		/// </summary>
		void LoadContent ()
		{
			lightingShader	=	Game.Content.Load<Ubershader>("lighting");
			factory			=	lightingShader.CreateFactory( typeof(LightingFlags), Primitive.TriangleList, VertexInputElement.Empty );
		}

		void EnumVoxel ( PipelineState ps, VoxelFlags flags )
		{
			ps.Primitive			=	Primitive.TriangleList;
			ps.RasterizerState		=	RasterizerState.CullNone;
			ps.BlendState			=	BlendState.Opaque;
			ps.DepthStencilState	=	DepthStencilState.None;

			//ps.VertexInputElements	=	VertexInputElement.Empty;

			if (flags==VoxelFlags.DEBUG_DRAW_VOXEL) {
				ps.RasterizerState		=	RasterizerState.CullCW;
				ps.DepthStencilState	=	DepthStencilState.Default;
				ps.BlendState			=	BlendState.Opaque;
				ps.Primitive			=	Primitive.PointList;
			}
		}

		/// <summary>
		///
		/// </summary>
		void CreateShadowMaps ()
		{
			SafeDispose( ref cascadedShadowMap );

			SafeDispose( ref spotColor );
			SafeDispose( ref spotDepth );

			cascadedShadowMap	=	new CascadedShadowMap( Game.GraphicsDevice, CSMCascadeSize, CSMCascadeCount );

			spotColor			=	new RenderTarget2D( Game.GraphicsDevice, ColorFormat.R32F,  SpotShadowSize * 4, SpotShadowSize * 4 );
			spotDepth			=	new DepthStencil2D( Game.GraphicsDevice, DepthFormat.D24S8, SpotShadowSize * 4, SpotShadowSize * 4 );

		}

		/// <summary>
		///
		/// </summary>
		/// <param name="disposing"></param>
		protected override void Dispose ( bool disposing )
		{
			if (disposing) {
				SafeDispose( ref spotDepth );
				SafeDispose( ref spotColor );

				SafeDispose( ref cascadedShadowMap );

				SafeDispose( ref lightingCB );

				SafeDispose( ref omniLightBuffer );
				SafeDispose( ref spotLightBuffer );
				SafeDispose( ref envLightBuffer );
			}

			base.Dispose( disposing );
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="view"></param>
		/// <param name="projection"></param>
		internal void RenderLighting ( StereoEye stereoEye, Camera camera, HdrFrame hdrFrame, RenderWorld viewLayer, RenderTargetCube envLight )
		{
			using ( new PixEvent("TiledLighting") ) {
				var view		=	camera.GetViewMatrix( stereoEye );
				var projection	=	camera.GetProjectionMatrix( stereoEye );

				var device = Game.GraphicsDevice;
				device.ResetStates();

				var width	=	hdrFrame.HdrBuffer.Width;
				var height	=	hdrFrame.HdrBuffer.Height;

				ICSMController csmCtrl	=	viewLayer.LightSet.DirectLight.CSMController ?? csmController;

				int activeCascadeCount	=	Math.Min( cascadedShadowMap.CascadeCount, csmCtrl.GetActiveCascadeCount() );

				//
				//	Setup compute shader parameters and states :
				//
				try {

					var cbData	=	new LightingParams();
					var invView	=	Matrix.Invert( view );
					var invVP	=	Matrix.Invert( view * projection );
					var viewPos	=	invView.TranslationVector;

					cbData.DirectLightDirection		=	new Vector4( viewLayer.LightSet.DirectLight.Direction, 0 );
					cbData.DirectLightIntensity		=	viewLayer.LightSet.DirectLight.Intensity.ToVector4();
					cbData.Projection				=	projection;

					cbData.CSMViewProjection0		=	csmCtrl.GetShadowViewMatrix(0) * csmCtrl.GetShadowProjectionMatrix(0);
					cbData.CSMViewProjection1		=	csmCtrl.GetShadowViewMatrix(1) * csmCtrl.GetShadowProjectionMatrix(1);
					cbData.CSMViewProjection2		=	csmCtrl.GetShadowViewMatrix(2) * csmCtrl.GetShadowProjectionMatrix(2);
					cbData.CSMViewProjection3		=	csmCtrl.GetShadowViewMatrix(3) * csmCtrl.GetShadowProjectionMatrix(3);

					cbData.View						=	view;
					cbData.ViewPosition				=	new Vector4(viewPos,1);
					cbData.InverseViewProjection	=	invVP;
					cbData.CSMFilterRadius			=	new Vector4( CSMFilterSize );

					cbData.AmbientColor				=	viewLayer.LightSet.AmbientLevel;
					cbData.Viewport					=	new Vector4( 0, 0, width, height );
					cbData.ShowCSLoadOmni			=	ShowOmniLightTileLoad ? 1 : 0;
					cbData.ShowCSLoadEnv			=	ShowEnvLightTileLoad  ? 1 : 0;
					cbData.ShowCSLoadSpot			=	ShowSpotLightTileLoad ? 1 : 0;

					cbData.CascadeCount				=	activeCascadeCount;
					cbData.CascadeScale				=	1.0f / (float)cascadedShadowMap.CascadeCount;

					ComputeOmniLightsTiles( view, projection, viewLayer.LightSet );
					ComputeSpotLightsTiles( view, projection, viewLayer.LightSet );
					ComputeEnvLightsTiles(  view, projection, viewLayer.LightSet );

					//
					//	set states :
					//
					device.SetTargets( null, hdrFrame.HdrBuffer.Surface );

					lightingCB.SetData( cbData );

					device.ComputeShaderSamplers[0]	=	SamplerState.PointClamp;
					device.ComputeShaderSamplers[1]	=	SamplerState.LinearClamp;
					device.ComputeShaderSamplers[2]	=	SamplerState.ShadowSampler;
					device.ComputeShaderSamplers[3]	=	SamplerState.LinearPointWrap;

					device.ComputeShaderResources[0]	=	hdrFrame.DiffuseBuffer;
					device.ComputeShaderResources[1]	=	hdrFrame.SpecularBuffer;
					device.ComputeShaderResources[2]	=	hdrFrame.NormalMapBuffer;
					device.ComputeShaderResources[3]	=	hdrFrame.ScatteringBuffer;
					device.ComputeShaderResources[4]	=	hdrFrame.DepthBuffer;
					device.ComputeShaderResources[5]	=	cascadedShadowMap.ColorBuffer;
					device.ComputeShaderResources[6]	=	spotColor;
					device.ComputeShaderResources[7]	=	viewLayer.LightSet.SpotAtlas==null ? rs.WhiteTexture.Srv : viewLayer.LightSet.SpotAtlas.Texture.Srv;
					device.ComputeShaderResources[8]	=	omniLightBuffer;
					device.ComputeShaderResources[9]	=	spotLightBuffer;
					device.ComputeShaderResources[10]	=	envLightBuffer;
					device.ComputeShaderResources[11]	=	rs.SsaoFilter.OcclusionMap;
					device.ComputeShaderResources[12]	=	viewLayer.RadianceCache;
					device.ComputeShaderResources[13]	=	viewLayer.ParticleSystem.SimulatedParticles;
					device.ComputeShaderResources[14]	=	cascadedShadowMap.ParticleShadow;

					device.ComputeShaderConstants[0]	=	lightingCB;

					device.SetCSRWTexture( 0, hdrFrame.LightAccumulator.Surface );
					device.SetCSRWTexture( 1, hdrFrame.SSSAccumulator.Surface );
					device.SetCSRWBuffer(  2, viewLayer.ParticleSystem.ParticleLighting );

					//
					//	Dispatch solids :
					//
					using (new PixEvent("Solid Lighting")) {
						device.PipelineState	=	factory[ (int)LightingFlags.SOLIDLIGHTING ];
						device.Dispatch( MathUtil.IntDivUp( width, BlockSizeX ), MathUtil.IntDivUp( height, BlockSizeY ), 1 );
					}

					//
					//	Dispatch particles :
					//
					using (new PixEvent("Particle Lighting")) {
						if (stereoEye!=StereoEye.Right) {
							int threadGroupCount	=	MathUtil.IntDivUp( ParticleSystem.MaxSimulatedParticles, ParticleSystem.BlockSize );
							device.PipelineState	=	factory[ (int)LightingFlags.PARTICLES ];
							device.Dispatch( threadGroupCount, 1, 1 );
						}
					}

				} catch ( UbershaderException e ) {
					Log.Warning("{0}", e.Message );
				}

				//
				//	Add accumulated light  :
				//
				rs.Filter.OverlayAdditive( hdrFrame.HdrBuffer.Surface, hdrFrame.LightAccumulator );

				//	Uncomment to enable SSS :
				#if false
				rs.Filter.GaussBlur( hdrFrame.SSSAccumulator, hdrFrame.LightAccumulator, 5, 0 );
				rs.Filter.OverlayAdditive( hdrFrame.HdrBuffer.Surface, hdrFrame.SSSAccumulator );
				#endif

				device.ResetStates();

				if (rs.ShowLightCounters) {
					var ls = viewLayer.LightSet;
					Log.Message("lights: {0,5} omni {1,5} spot {2,5} env", ls.OmniLights.Count, ls.SpotLights.Count, ls.EnvLights.Count );
				}
			}
		}
	}
}


text:
import React from 'react'
import styled from 'styled-components'
import { Text, pxToRem } from 'kitten'

import { KissKissBankBankLogo } from './kisskissbankbanklogo'
import { GoodeedLogo } from './goodeedlogo'
import { MaisonDeCrowdfundingLogo } from './mdc'
import { MaisonDeCrowdfundingLogoOnDark } from './mdc/on-dark'
import { MicrodonLogo } from './microdonlogo'
import { LendopolisLogo } from './lendopolis-logo'
import { LendopolisLogoOnDark } from './lendopolis-logo/on-dark'
import { LendopolisLogoVerticalOnDark } from './lendopolis-logo/vertical-on-dark'
import { KkbbCoLogo } from './kkbb-co'
import { YouMatterLogo } from './youmatter'
import { LaBanquePostaleLogo } from './la-banque-postale'

const Container = styled.div`
  padding: ${pxToRem(40)};
  background-color: lightgray;
`
const Group = styled(({ className, children, title }) => {
  return (
    <>

{title}

{children}

    </>
  )
})`
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(${pxToRem(140)}, 1fr));
  grid-gap: ${pxToRem(80)} ${pxToRem(40)};
  margin-bottom: ${pxToRem(50)};
`

const LogoContainer = styled(({ className, children, name }) => {
  return (

{children}

      <Text size="micro">{name}</Text>

  )
})`
  text-align: center;

  .svgWrapper {
    margin: auto;
    height: ${pxToRem(50)};
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: ${pxToRem(10)};
  }

  svg {
    width: auto;
    height: auto;
    width: ${pxToRem(150)};
    max-height: ${pxToRem(100)};
  }

  &.noMaxDimensions svg {
    max-height: ${pxToRem(50)};
    max-width: ${pxToRem(50)};
  }
`

export const AllLogos = () => {
  return (
    <Container>
      <Group title="KissKissBankBank">
        <LogoContainer children={<KissKissBankBankLogo />} />
        <LogoContainer
          className="noMaxDimensions"
          name="version small"
          children={<KissKissBankBankLogo small />}
        />
      </Group>

      <Group title="Lendopolis">
        <LogoContainer children={<LendopolisLogo />} />
        <LogoContainer children={<LendopolisLogoOnDark />} />
        <LogoContainer children={<LendopolisLogoVerticalOnDark />} />
        <LogoContainer
          className="noMaxDimensions"
          name="version small"
          children={<LendopolisLogo small />}
        />
      </Group>

      <Group title="KissKissBankBank&Co">
        <LogoContainer children={<KkbbCoLogo />} />
      </Group>

      <Group title="Maison de Crowdfunding">
        <LogoContainer children={<MaisonDeCrowdfundingLogo />} />
        <LogoContainer children={<MaisonDeCrowdfundingLogoOnDark />} />
      </Group>

      <Group title="Goodeed">
        <LogoContainer children={<GoodeedLogo />} />
      </Group>

      <Group title="MicroDon">
        <LogoContainer children={<MicrodonLogo />} />
      </Group>

      <Group title="YouMatter">
        <LogoContainer children={<YouMatterLogo />} />
      </Group>

      <Group title="La Banque Postale">
        <LogoContainer name="variant = on-light">
          <LaBanquePostaleLogo variant="on-light" />
        </LogoContainer>
        <LogoContainer name="variant = on-dark">
          <LaBanquePostaleLogo variant="on-dark" />
        </LogoContainer>
        <LogoContainer name="variant = mono-blue">
          <LaBanquePostaleLogo variant="mono-blue" />
        </LogoContainer>
        <LogoContainer name="variant = mono-black">
          <LaBanquePostaleLogo variant="mono-black" />
        </LogoContainer>
        <LogoContainer name="variant = mono-white">
          <LaBanquePostaleLogo variant="mono-white" />
        </LogoContainer>
      </Group>
    </Container>
  )
}

export default { title: 'Graphics/Logos' }


text:
package com.navercorp.pinpoint.profiler.monitor.collector.filedescriptor;

import com.navercorp.pinpoint.profiler.monitor.metric.filedescriptor.FileDescriptorMetric;
import com.navercorp.pinpoint.profiler.monitor.metric.filedescriptor.FileDescriptorMetricSnapshot;
import com.navercorp.pinpoint.thrift.dto.TFileDescriptor;

/**
 * @author Roy Kim
 */
public class DefaultFileDescriptorMetricCollector implements FileDescriptorMetricCollector {

    private final FileDescriptorMetric fileDescriptorMetric;

    public DefaultFileDescriptorMetricCollector(FileDescriptorMetric fileDescriptorMetric) {
        if (fileDescriptorMetric == null) {
            throw new NullPointerException("fileDescriptorMetric must not be null");
        }
        this.fileDescriptorMetric = fileDescriptorMetric;
    }

    @Override
    public TFileDescriptor collect() {
        TFileDescriptor tfileDescriptor = new TFileDescriptor();
        FileDescriptorMetricSnapshot snapshot = fileDescriptorMetric.getSnapshot();
        tfileDescriptor.setOpenFileDescriptorCount(snapshot.getOpenFileDescriptorCount());
        return tfileDescriptor;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("DefaultFileDescriptorMetricCollector{");
        sb.append("fileDescriptorMetric=").append(fileDescriptorMetric);
        sb.append('}');
        return sb.toString();
    }
}