text:
bool rtl88eu_phy_mac_config(struct adapter *adapt);
bool rtl88eu_phy_rf_config(struct adapter *adapt);
bool rtl88eu_phy_bb_config(struct adapter *adapt);

u32 phy_query_bb_reg(struct adapter *adapt, u32 regaddr, u32 bitmask);
void phy_set_bb_reg(struct adapter *adapt, u32 regaddr, u32 bitmask, u32 data);
u32 phy_query_rf_reg(struct adapter *adapt, enum rf_radio_path rf_path,
		     u32 reg_addr, u32 bit_mask);
void phy_set_rf_reg(struct adapter *adapt, enum rf_radio_path rf_path,
		    u32 reg_addr, u32 bit_mask, u32 data);

void phy_set_tx_power_level(struct adapter *adapt, u8 channel);

void phy_set_bw_mode(struct adapter *adapt, enum ht_channel_width bandwidth,
		     unsigned char offset);
void phy_sw_chnl(struct adapter *adapt, u8 channel);

void rtl88eu_dm_txpower_track_adjust(struct odm_dm_struct *dm_odm,
				     u8 type, u8 *dir, u32 *out_write);

void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt);
void rtl88eu_phy_iq_calibrate(struct adapter *adapter, bool recovery);
void rtl88eu_phy_lc_calibrate(struct adapter *adapter);


text:
using System;
using System.Linq;
using Xamarin.Forms;

namespace Xamarin.CommunityToolkit.Sample.Pages.Behaviors
{
	public partial class ImpliedOrderGridBehaviorPage
	{
		public ImpliedOrderGridBehaviorPage() => InitializeComponent();

		void ButtonAddRow_OnClicked(object? sender, EventArgs e) => TestGrid.RowDefinitions.Add(new RowDefinition());

		void ButtonAddColumn_OnClicked(object? sender, EventArgs e) => TestGrid.ColumnDefinitions.Add(new ColumnDefinition());

		void ButtonRemoveRow_OnClicked(object? sender, EventArgs e)
		{
			var lastRow = TestGrid.RowDefinitions.Last();
			TestGrid.RowDefinitions.Remove(lastRow);
		}

		void ButtonRemoveColumn_OnClicked(object? sender, EventArgs e)
		{
			var lastColumn = TestGrid.ColumnDefinitions.Last();
			TestGrid.ColumnDefinitions.Remove(lastColumn);
		}
	}
}

redpajama_set_name: RedPajamaGithub


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('profiles', '0028_auto_20170113_2133'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='profile',
            name='address1',
        ),
        migrations.RemoveField(
            model_name='profile',
            name='address2',
        ),
        migrations.RemoveField(
            model_name='profile',
            name='address3',
        ),
        migrations.AddField(
            model_name='profile',
            name='address',
            field=models.CharField(blank=True, max_length=100, null=True),
        ),
    ]


text:
package com.shekhargulati.reactivex.rxokhttp;

public class ServiceException extends RuntimeException {

    private int code;
    private String httpMessage;

    public ServiceException(final String errorMessage, final int code, final String httpMessage) {
        super(errorMessage);
        this.code = code;
        this.httpMessage = httpMessage;
    }

    public ServiceException(Exception e) {
        super(e);
    }

    public int getCode() {
        return code;
    }

    public String getHttpMessage() {
        return httpMessage;
    }
}


text:
#ifndef GRPCPP_IMPL_CODEGEN_SERVICE_TYPE_H
#define GRPCPP_IMPL_CODEGEN_SERVICE_TYPE_H

#include <grpcpp/impl/codegen/config.h>
#include <grpcpp/impl/codegen/core_codegen_interface.h>
#include <grpcpp/impl/codegen/rpc_service_method.h>
#include <grpcpp/impl/codegen/serialization_traits.h>
#include <grpcpp/impl/codegen/server_interface.h>
#include <grpcpp/impl/codegen/status.h>

namespace grpc {

class CompletionQueue;
class Server;
class ServerInterface;
class ServerCompletionQueue;
class ServerContext;

namespace internal {
class Call;
class ServerAsyncStreamingInterface {
 public:
  virtual ~ServerAsyncStreamingInterface() {}

  /// Request notification of the sending of initial metadata to the client.
  /// Completion will be notified by \a tag on the associated completion
  /// queue. This call is optional, but if it is used, it cannot be used
  /// concurrently with or after the \a Finish method.
  ///
  /// \param[in] tag Tag identifying this request.
  virtual void SendInitialMetadata(void* tag) = 0;

 private:
  friend class ::grpc::ServerInterface;
  virtual void BindCall(Call* call) = 0;
};
}  // namespace internal

/// Desriptor of an RPC service and its various RPC methods
class Service {
 public:
  Service() : server_(nullptr) {}
  virtual ~Service() {}

  bool has_async_methods() const {
    for (auto it = methods_.begin(); it != methods_.end(); ++it) {
      if (*it && (*it)->handler() == nullptr) {
        return true;
      }
    }
    return false;
  }

  bool has_synchronous_methods() const {
    for (auto it = methods_.begin(); it != methods_.end(); ++it) {
      if (*it && (*it)->handler() != nullptr) {
        return true;
      }
    }
    return false;
  }

  bool has_generic_methods() const {
    for (auto it = methods_.begin(); it != methods_.end(); ++it) {
      if (it->get() == nullptr) {
        return true;
      }
    }
    return false;
  }

 protected:
  template <class Message>
  void RequestAsyncUnary(int index, ServerContext* context, Message* request,
                         internal::ServerAsyncStreamingInterface* stream,
                         CompletionQueue* call_cq,
                         ServerCompletionQueue* notification_cq, void* tag) {
    server_->RequestAsyncCall(methods_[index].get(), context, stream, call_cq,
                              notification_cq, tag, request);
  }
  void RequestAsyncClientStreaming(
      int index, ServerContext* context,
      internal::ServerAsyncStreamingInterface* stream, CompletionQueue* call_cq,
      ServerCompletionQueue* notification_cq, void* tag) {
    server_->RequestAsyncCall(methods_[index].get(), context, stream, call_cq,
                              notification_cq, tag);
  }
  template <class Message>
  void RequestAsyncServerStreaming(
      int index, ServerContext* context, Message* request,
      internal::ServerAsyncStreamingInterface* stream, CompletionQueue* call_cq,
      ServerCompletionQueue* notification_cq, void* tag) {
    server_->RequestAsyncCall(methods_[index].get(), context, stream, call_cq,
                              notification_cq, tag, request);
  }
  void RequestAsyncBidiStreaming(
      int index, ServerContext* context,
      internal::ServerAsyncStreamingInterface* stream, CompletionQueue* call_cq,
      ServerCompletionQueue* notification_cq, void* tag) {
    server_->RequestAsyncCall(methods_[index].get(), context, stream, call_cq,
                              notification_cq, tag);
  }

  void AddMethod(internal::RpcServiceMethod* method) {
    methods_.emplace_back(method);
  }

  void MarkMethodAsync(int index) {
    // This does not have to be a hard error, however no one has approached us
    // with a use case yet. Please file an issue if you believe you have one.
    GPR_CODEGEN_ASSERT(
        methods_[index].get() != nullptr &&
        "Cannot mark the method as 'async' because it has already been "
        "marked as 'generic'.");
    methods_[index]->SetServerAsyncType(
        internal::RpcServiceMethod::AsyncType::ASYNC);
  }

  void MarkMethodRaw(int index) {
    // This does not have to be a hard error, however no one has approached us
    // with a use case yet. Please file an issue if you believe you have one.
    GPR_CODEGEN_ASSERT(methods_[index].get() != nullptr &&
                       "Cannot mark the method as 'raw' because it has already "
                       "been marked as 'generic'.");
    methods_[index]->SetServerAsyncType(
        internal::RpcServiceMethod::AsyncType::RAW);
  }

  void MarkMethodGeneric(int index) {
    // This does not have to be a hard error, however no one has approached us
    // with a use case yet. Please file an issue if you believe you have one.
    GPR_CODEGEN_ASSERT(
        methods_[index]->handler() != nullptr &&
        "Cannot mark the method as 'generic' because it has already been "
        "marked as 'async' or 'raw'.");
    methods_[index].reset();
  }

  void MarkMethodStreamed(int index, internal::MethodHandler* streamed_method) {
    // This does not have to be a hard error, however no one has approached us
    // with a use case yet. Please file an issue if you believe you have one.
    GPR_CODEGEN_ASSERT(methods_[index] && methods_[index]->handler() &&
                       "Cannot mark an async or generic method Streamed");
    methods_[index]->SetHandler(streamed_method);

    // From the server's point of view, streamed unary is a special
    // case of BIDI_STREAMING that has 1 read and 1 write, in that order,
    // and split server-side streaming is BIDI_STREAMING with 1 read and
    // any number of writes, in that order.
    methods_[index]->SetMethodType(internal::RpcMethod::BIDI_STREAMING);
  }

 private:
  friend class Server;
  friend class ServerInterface;
  ServerInterface* server_;
  std::vector<std::unique_ptr<internal::RpcServiceMethod>> methods_;
};

}  // namespace grpc

#endif  // GRPCPP_IMPL_CODEGEN_SERVICE_TYPE_H


text:
<?php

namespace spectrum\core\plugins\basePlugins;
use spectrum\core\Config;
use spectrum\core\plugins\Exception;

/**
 * Use this plugin to output current owner spec data (or get spec data in correct output encoding). Do not use plugin
 * from one spec instance to output another spec instance data.
 */
class Output extends \spectrum\core\plugins\Plugin
{
	protected $inputEncoding;
	protected $outputEncoding;

	static protected $defaultInputEncoding = 'utf-8';
	static protected $defaultOutputEncoding = 'utf-8';

	/**
	 * For more performance
	 * @var bool
	 */
	static protected $isEncodingChanged = false;

/**/

	public function setInputEncoding($encoding)
	{
		if (!Config::getAllowInputEncodingModify())
			throw new Exception('Input encoding modify deny in Config');

		$this->inputEncoding = $encoding;
		static::$isEncodingChanged = true;
	}

	public function getInputEncoding()
	{
		return $this->inputEncoding;
	}

	public function getInputEncodingCascade()
	{
		if (static::$isEncodingChanged)
			return $this->callCascadeThroughRunningContexts('getInputEncoding', array(), static::$defaultInputEncoding);
		else
			return static::$defaultInputEncoding;
	}

/**/

	public function setOutputEncoding($encoding)
	{
		if (!Config::getAllowOutputEncodingModify())
			throw new Exception('Output encoding modify deny in Config');

		$this->outputEncoding = $encoding;
		static::$isEncodingChanged = true;
	}

	public function getOutputEncoding()
	{
		return $this->outputEncoding;
	}

	public function getOutputEncodingCascade()
	{
		if (static::$isEncodingChanged)
			return $this->callCascadeThroughRunningContexts('getOutputEncoding', array(), static::$defaultOutputEncoding);
		else
			return static::$defaultOutputEncoding;
	}

/**/

	public function put($string)
	{
		print $this->convertToOutputEncoding($string);
	}

	public function convertToOutputEncoding($string)
	{
		$inputEncoding = $this->getInputEncodingCascade();
		$outputEncoding = $this->getOutputEncodingCascade();

		if (mb_strtolower($inputEncoding) == mb_strtolower($outputEncoding))
			return $string;
		else
			return iconv($inputEncoding, $outputEncoding, $string);
	}
}


text:
<?php

namespace Dock\Plugins\ExtraHostname;

use Dock\Docker\Compose\Project;
use Symfony\Component\PropertyAccess\PropertyAccess;

class HostnameFromComposerResolver implements HostnameResolver
{
    /**
     * {@inheritdoc}
     */
    public function getExtraHostnameConfigurations(Project $project)
    {
        $composerFile = $this->getComposerJsonFilePath($project);
        if (!file_exists($composerFile)) {
            return [];
        }

        $contents = json_decode(file_get_contents($composerFile), true);
        $accessor = PropertyAccess::createPropertyAccessor();
        $componentsConfiguration = $accessor->getValue($contents, '[extra][dock-cli][extra-hostname]');
        if (!is_array($componentsConfiguration)) {
            return [];
        }

        $configurations = [];
        foreach ($componentsConfiguration as $componentName => $hostNames) {
            if (!is_array($hostNames)) {
                $hostNames = [$hostNames];
            }

            foreach ($hostNames as $hostname) {
                $configurations[] = new HostnameConfiguration($componentName, $hostname);
            }
        }

        return $configurations;
    }

    /**
     * @param Project $project
     *
     * @return string
     */
    private function getComposerJsonFilePath(Project $project)
    {
        return $project->getProjectBasePath().DIRECTORY_SEPARATOR.'composer.json';
    }
}


text:
<!DOCTYPE html>

	<meta charset="utf-8">

	<title>AWSCognitoRecordValue Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1333)">

				AWS Mobile SDK for iOS v2.4.1

				Amazon Web Services, Inc.

Index

Hierarchy

							On This Page

							<select id="jump-to">
	<option value="top">Jump To…</option>

	<option value="overview">Overview</option>

	<option value="tasks">Tasks</option>

	<optgroup label="Properties">

		<option value="//api/name/type">type</option>

	</optgroup>

	<optgroup label="Instance Methods">

		<option value="//api/name/initWithString:">- initWithString:</option>

		<option value="//api/name/string">- string</option>

	</optgroup>

</select>

AWSCognitoRecordValue Class Reference

	Inherits from
	NSObject

	Declared in
	AWSCognitoRecord.h
AWSCognitoRecord.m

Overview

An object that encapsulates the record value.

  type

The type of the record value.

@property (nonatomic, readonly) AWSCognitoRecordValueType type

Discussion

The record value datatypes.

AWSCognitoRecordValueTypeUnknown - Unknown type.

AWSCognitoRecordValueTypeString - The string value.

AWSCognitoRecordValueTypeDeleted - A deleted value.

Declared In

AWSCognitoRecord.h

– initWithString:

Initializes a AWSCognitoRecordValue with the given string value.
The type property is automatically set to AWSCognitoRecordValueTypeString.

- (instancetype)initWithString:(NSString *)value

Parameters

						value

The string value of the AWSCognitoRecordValue.

Return Value

The initialized instance

Declared In

AWSCognitoRecord.h

– string

Returns the string value.

- (NSString *)string

Return Value

The string value stored by the record value object.

Declared In

AWSCognitoRecord.h

Copyright © 2016 Amazon Web Services, Inc. All rights reserved. Updated: 2016-04-28

Generated by appledoc 2.2.1 (build 1333).


text:
layout: alias
usePathVersion: true
destination: "get-started/examples/"
sitemapIgnore: true
---


text:
<?php

namespace Model\Interfaces;

interface BeanInterface
{
	/**
	 *
	 * @return int
	 */
	// public function getIndex();

	/**
	 * Convert to array
	 * @return array
	*/
	// public function toArray();

	/**
	 * Convert to array
	 * @return array
	*/
	public function toArrayFor($fields);

}


text:
#import "CAAnimation+CompletionBlock.h"
#import <objc/runtime.h>

static char CAAnimationCompletionBlockKey;

/* ----------------------------------------------------------------------
 @implementation CAAnimation (CompletionBlock)
 ---------------------------------------------------------------------- */

@implementation CAAnimation (CompletionBlock)

- (void)animationDidStop:(CAAnimation *)animation finished:(BOOL)finished {
    if (self.completionBlock) {
        self.completionBlock(animation, finished);
    }
}

- (CAAnimationCompletionBlock)completionBlock {
    return objc_getAssociatedObject(self, &CAAnimationCompletionBlockKey);
}

- (void)setCompletionBlock:(CAAnimationCompletionBlock)completionBlock {
    if (!completionBlock) {
        return;
    }

    self.delegate = self;

    return objc_setAssociatedObject(self, &CAAnimationCompletionBlockKey, completionBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
}

@end


text:
import Model, { attr } from '@ember-data/model';

export default Model.extend({
  name: attr('string'),
  value: attr()
});


text:
using namespace std;

namespace vr
{
//runtime_error
  VRException::VRException(const std::string& msg)
  : msg(msg)
  {

  }

  VRException::VRException(const std::string& msg, const char *file, int line)
  {
    stringstream ss;
    ss << file << ":" << line << " " << msg << endl;
    this->msg = msg;
  }

  const char* VRException::what() const noexcept
  {
    return msg.c_str();
  }

}


text:
<title>OGRE: OgreD3D9HardwareOcclusionQuery.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="doxygen.css">
<link type="text/css" rel="stylesheet" href="tabs.css">

Main Page

Related Pages

Modules

Namespaces

Classes

Files

Directories

File List

File Members

RenderSystems » Direct3D9 » include

OgreD3D9HardwareOcclusionQuery.h
Go to the documentation of this file.

00001
00028
00029 #ifndef _D3D9HARWAREOCCLUSIONQUERY_H__
00030 #define _D3D9HARWAREOCCLUSIONQUERY_H__
00031
00032 #include "OgreD3D9Prerequisites.h"
00033 #include "OgreHardwareOcclusionQuery.h"
00034 #include "OgreD3D9Resource.h"
00035
00036
00037 namespace Ogre {
00038
00039     // If you use multiple rendering passes you can test only the first pass and all other passes don't have to be rendered
00040     // if the first pass results has too few pixels visible.
00041
00042     // Be sure to render all occluder first and whats out so the RenderQue don't switch places on
00043     // the occluding objects and the tested objects because it thinks it's more effective..
00044
00054     class _OgreD3D9Export D3D9HardwareOcclusionQuery : public HardwareOcclusionQuery, public D3D9Resource
00055     {
00056         //----------------------------------------------------------------------
00057         // Public methods
00058         //--
00059     public:
00060
00065         D3D9HardwareOcclusionQuery();
00066
00070         ~D3D9HardwareOcclusionQuery();
00071
00072         //------------------------------------------------------------------
00073         // Occlusion query functions (see base class documentation for this)
00074         //--
00075
00076         void beginOcclusionQuery();
00077         void endOcclusionQuery();
00078         bool pullOcclusionQuery( unsigned int* NumOfFragments);
00079         unsigned int getLastQuerysPixelcount();
00080         bool isStillOutstanding(void);
00081
00082         // Called immediately after the Direct3D device has been created.
00083         virtual void notifyOnDeviceCreate(IDirect3DDevice9* d3d9Device);
00084
00085         // Called before the Direct3D device is going to be destroyed.
00086         virtual void notifyOnDeviceDestroy(IDirect3DDevice9* d3d9Device);
00087
00088         // Called immediately after the Direct3D device has entered a lost state.
00089         // This is the place to release non-managed resources.
00090         virtual void notifyOnDeviceLost(IDirect3DDevice9* d3d9Device);
00091
00092         // Called immediately after the Direct3D device has been reset.
00093         // This is the place to create non-managed resources.
00094         virtual void notifyOnDeviceReset(IDirect3DDevice9* d3d9Device);
00095
00096
00097     private:
00098         void createQuery(IDirect3DDevice9* d3d9Device);
00099         void releaseQuery(IDirect3DDevice9* d3d9Device);
00100
00101         //----------------------------------------------------------------------
00102         // private members
00103         //--
00104     private:
00105         typedef map<IDirect3DDevice9*, IDirect3DQuery9*>::type DeviceToQueryMap;
00106         typedef DeviceToQueryMap::iterator                     DeviceToQueryIterator;
00107
00108         DeviceToQueryMap                mMapDeviceToQuery;
00109     };
00110
00111
00112 }
00113
00114
00115 #endif

Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Last modified Sun Sep 2 08:16:05 2012


text:
/* eslint-disable */
import { SAVE_USER } from '../actions/user';
import { POPULATE } from '../actions/community';
import { List } from 'immutable';

export default (state = List(), action) => {
  switch (action.type) {

    case POPULATE:
      return List(action.users);

    case SAVE_USER:
      return state.map(user => {
        if (user.username === action.user.username) {
          return action.user;
        } else {
          return user;
        };
      });

    default: return state;
  }
}


text:
namespace Microsoft.Azure.Management.Cdn.Fluent.Models
{

    /// <summary>
    /// Defines values for SkuName.
    /// </summary>
    public static class SkuName
    {
        public const string StandardVerizon = "Standard_Verizon";
        public const string PremiumVerizon = "Premium_Verizon";
        public const string CustomVerizon = "Custom_Verizon";
        public const string StandardAkamai = "Standard_Akamai";
        public const string StandardChinaCdn = "Standard_ChinaCdn";
    }
}


text:
#pragma once

#include "Vector2.h"
#include <iostream>
#include "Graph.h"
#include "Solver.h"
#include "Grid.h"

#include "IAgent.h"
#include "sfwdraw.h"

/*
    Example dumb agent.

    State Description:

        Cannon:
            SCAN:
                Turns Right
                enemy in sight? -> Set Target, FIRE
            FIRE:
                Fire weapon
                -> SCAN

        Tank:
            Explore:
                If touching Target, set random Target
                Path to Target
*/

class AutoAgent : public IAgent
{
    // Cache current battle data on each update
    tankNet::TankBattleStateData current;

    // output data that we will return at end of update
    tankNet::TankBattleCommand tbc;

    // Could use this to keep track of the environment, check out the header.
    Grid map;

    //////////////////////
    // States for turret and tank
    enum TURRET { SCAN, AIM, FIRE } turretState = SCAN;
    enum TANK   { SEEK            } tankState   = SEEK;

    float randTimer = 0;

    // Active target location to pursue
    Vector2 target;

    ///////
    // Scanning
    void scan()
    {
        Vector2 tf = Vector2::fromXZ(current.cannonForward);  // current forward
        Vector2 cp = Vector2::fromXZ(current.position); // current position

        tbc.fireWish = false;
        // Arbitrarily look around for an enemy.
        tbc.cannonMove = tankNet::CannonMovementOptions::RIGHT;

        // Search through the possible enemy targets
        for (int aimTarget = 0; aimTarget < current.playerCount - 1; ++aimTarget)
            if (current.tacticoolData[aimTarget].inSight && current.canFire) // if in Sight and we can fire
            {
                target = Vector2::fromXZ(current.tacticoolData[aimTarget].lastKnownPosition);

                if(dot(tf, normal(target-cp)) > .87f)
                    turretState = FIRE;
                break;
            }
    }

    void fire()
    {
        // No special logic for now, just shoot.
        tbc.fireWish = current.canFire;
        turretState = SCAN;
    }

    std::list<Vector2> path;
    void seek()
    {
        Vector2 cp = Vector2::fromXZ(current.position); // current position
        Vector2 cf = Vector2::fromXZ(current.forward);  // current forward

        randTimer -= sfw::getDeltaTime();

        // If we're pretty close to the target, get a new target
        if (distance(target, cp) < 20 || randTimer < 0)
        {
            target = Vector2::random() * Vector2 { 50, 50 };
            randTimer = rand() % 4 + 2; // every 2-6 seconds randomly pick a new target
        }

        // determine the forward to the target (which is the next waypoint in the path)
        Vector2 tf = normal(target - cp);

        if (dot(cf, tf) > .87f) // if the dot product is close to lining up, move forward
            tbc.tankMove = tankNet::TankMovementOptions::FWRD;
        else // otherwise turn right until we line up!
            tbc.tankMove = tankNet::TankMovementOptions::RIGHT;
    }

public:
    tankNet::TankBattleCommand update(tankNet::TankBattleStateData *state)
    {
        current = *state;
        tbc.msg = tankNet::TankBattleMessage::GAME;

        switch (turretState)
        {
        case SCAN: scan(); break;
        case FIRE: fire(); break;
        }

        switch (tankState)
        {
        case SEEK: seek(); break;
        }

        return tbc;
    }
};


text:
<?php
/**
 * Message translations.
 *
 * This file is automatically generated by 'yii message' command.
 * It contains the localizable messages extracted from source code.
 * You may modify this file by translating the extracted messages.
 *
 * Each array element represents the translation (value) of a message (key).
 * If the value is empty, the message is considered as not translated.
 * Messages that no longer need translation will have their translations
 * enclosed between a pair of '@@' marks.
 *
 * Message string can be used with plural forms format. Check i18n section
 * of the guide for details.
 *
 * NOTE: this file must be saved in UTF-8 encoding.
 */
return [
    '30 days' => '',
    '7 days' => '',
    'Apply' => '',
    'Apr' => '',
    'Aug' => '',
    'Cancel' => '',
    'Current month' => '',
    'Current week' => '',
    'Custom range' => '',
    'Dec' => '',
    'FROM' => '',
    'Feb' => '',
    'Fr' => '',
    'Jan' => '',
    'Jul' => '',
    'Jun' => '',
    'Mar' => '',
    'May' => '',
    'Mo' => '',
    'Nov' => '',
    'Oct' => '',
    'Previous month' => '',
    'Previous week' => '',
    'Sa' => '',
    'Sep' => '',
    'Su' => '',
    'TO' => '',
    'Th' => '',
    'Today' => '',
    'Tu' => '',
    'We' => '',
    'Yesterday' => '',
];


text:
<!DOCTYPE html>

<title>ApplicationManager_removeAppInfoEventListener</title>
<meta charset="utf-8">


text:
package com.sagargv.kagegame;

public class GameWrapper {
    static {
        System.loadLibrary("kage");
    }

    public static native void setDataDir(String dataDir);

    public static native int gameInit(byte[] gameState);
    public static native void gameReset(byte[] gameState);
    public static native void gameLoop(byte[] gameState, int eventType, float x, float y);
}


text:
__all__ = [
    'Cache',
    'NULL_CACHE',
]

import collections
import contextlib
import dataclasses
import hashlib
import io
import logging
import os
import random
import shutil
import tempfile
import threading
from pathlib import Path

import g1.files
from g1.bases import collections as g1_collections
from g1.bases import functionals
from g1.bases import timers
from g1.bases.assertions import ASSERT

LOG = logging.getLogger(__name__)

# By default we keep 80% of entries post eviction.
POST_EVICTION_SIZE_RATIO = 0.8

class CacheInterface:

    @dataclasses.dataclass(frozen=True)
    class Stats:
        num_hits: int
        num_misses: int

    _SENTINEL = object()

    def get_stats(self):
        raise NotImplementedError

    def estimate_size(self):
        raise NotImplementedError

    def evict(self):
        raise NotImplementedError

    def get(self, key, default=None):
        raise NotImplementedError

    def get_file(self, key, default=None):
        raise NotImplementedError

    def getting_path(self, key, default=None):
        raise NotImplementedError

    def set(self, key, value):
        raise NotImplementedError

    def setting_file(self, key):
        raise NotImplementedError

    def setting_path(self, key):
        raise NotImplementedError

    def pop(self, key, default=_SENTINEL):
        raise NotImplementedError

class NullCache(CacheInterface):

    def __init__(self):
        self._num_misses = 0

    def get_stats(self):
        return self.Stats(
            num_hits=0,
            num_misses=self._num_misses,
        )

    def estimate_size(self):
        return 0

    def evict(self):
        return 0

    def get(self, key, default=None):
        del key  # Unused.
        self._num_misses += 1
        return default

    def get_file(self, key, default=None):
        del key  # Unused.
        self._num_misses += 1
        return default

    @contextlib.contextmanager
    def getting_path(self, key, default=None):
        del key  # Unused.
        self._num_misses += 1
        yield default

    def set(self, key, value):
        pass

    @contextlib.contextmanager
    def setting_file(self, key):
        yield io.BytesIO()

    @contextlib.contextmanager
    def setting_path(self, key):
        yield Path(os.devnull)

    def pop(self, key, default=CacheInterface._SENTINEL):
        if default is self._SENTINEL:
            raise KeyError(key)
        return default

NULL_CACHE = NullCache()

class Cache(CacheInterface):
    """File-based LRU cache.

    Cache keys and values are bytes objects.  A cache value is stored in
    its own file, whose path the MD5 hash of its key, with the first two
    hexadecimal digits as the directory name, and the rest as the file
    name.  This two-level structure should prevent any directory grown
    too big.
    """

    @staticmethod
    def _get_relpath(key):
        hasher = hashlib.md5()
        hasher.update(key)
        digest = hasher.hexdigest()
        return Path(digest[:2]) / digest[2:]

    def __init__(
        self,
        cache_dir_path,
        capacity,
        *,
        post_eviction_size=None,
        executor=None,  # Use this to evict in the background.
    ):
        self._lock = threading.Lock()

        self._cache_dir_path = ASSERT.predicate(cache_dir_path, Path.is_dir)

        self._capacity = ASSERT.greater(capacity, 0)
        self._post_eviction_size = (
            post_eviction_size if post_eviction_size is not None else
            int(self._capacity * POST_EVICTION_SIZE_RATIO)
        )
        ASSERT(
            0 <= self._post_eviction_size <= self._capacity,
            'expect 0 <= post_eviction_size <= {}, not {}',
            self._capacity,
            self._post_eviction_size,
        )

        self._executor = executor

        # By the way, if cache cold start is an issue, we could store
        # and load this table from a file.
        self._access_log = collections.OrderedDict()

        # getting_path may "lease" paths to the user, and we should not
        # evict these paths.
        self._active_paths = g1_collections.Multiset()

        self._num_hits = 0
        self._num_misses = 0

        # It's safe to call these methods after this point.
        self._eviction_countdown = self._estimate_eviction_countdown()
        self._maybe_evict()

    def get_stats(self):
        return self.Stats(
            num_hits=self._num_hits,
            num_misses=self._num_misses,
        )

    def _log_access(self, path):
        # Although this is a LRU cache, let's keep access counts, which
        # could be useful in understanding cache performance.
        self._access_log[path] = self._access_log.get(path, 0) + 1
        self._access_log.move_to_end(path, last=False)

    def _make_get_recency(self):
        recency_table = dict((p, r) for r, p in enumerate(self._access_log))
        least_recency = len(self._access_log)
        return lambda path: recency_table.get(path, least_recency)

    def estimate_size(self):
        dir_paths = list(_iter_dirs(self._cache_dir_path))
        if not dir_paths:
            return 0
        # Estimate the size of the cache by multiplying the two, given
        # that MD5 yields a uniform distribution.
        return len(dir_paths) * _count_files(random.choice(dir_paths))

    def _estimate_eviction_countdown(self):
        # Just a guess of how far away we are from the next eviction.
        return self._capacity - self.estimate_size()

    def _should_evict(self):
        return (
            len(self._access_log) > self._capacity
            or self._eviction_countdown < 0
        )

    def _maybe_evict(self):
        with self._lock:
            if self._should_evict():
                self._evict_require_lock_by_caller()

    def evict(self):
        with self._lock:
            return self._evict_require_lock_by_caller()

    def _evict_require_lock_by_caller(self):
        stopwatch = timers.Stopwatch()
        stopwatch.start()
        num_evicted = self._evict()
        stopwatch.stop()
        LOG.info(
            'evict %d entries in %f seconds: %s',
            num_evicted,
            stopwatch.get_duration(),
            self._cache_dir_path,
        )
        return num_evicted

    def _evict(self):
        # Estimate post-eviction size per directory, given that MD5
        # yields a uniform distribution of sizes.
        #
        # NOTE: It might "over-evict" when post_eviction_size is less
        # than 256, since in which case target_size_per_dir is likely 0.
        target_size_per_dir = int(
            self._post_eviction_size / _count_dirs(self._cache_dir_path)
        )
        get_recency = self._make_get_recency()
        num_evicted = 0
        for dir_path in _iter_dirs(self._cache_dir_path):
            num_evicted += self._evict_dir(
                dir_path, target_size_per_dir, get_recency
            )
        self._eviction_countdown = self._estimate_eviction_countdown()
        return num_evicted

    def _evict_dir(self, dir_path, target_size, get_recency):
        num_evicted = 0
        paths = list(_iter_files(dir_path))
        paths.sort(key=get_recency)
        for path in paths[target_size:]:
            if path in self._active_paths:
                continue
            path.unlink()
            count = self._access_log.pop(path, 0)
            LOG.debug('evict: %d %s', count, path)
            num_evicted += 1
        g1.files.remove_empty_dir(dir_path)
        return num_evicted

    def _get_path(self, key):
        return self._cache_dir_path / self._get_relpath(key)

    def get(self, key, default=None):
        with self._lock:
            return self._get_require_lock_by_caller(
                key, default, Path.read_bytes
            )

    def get_file(self, key, default=None):
        """Get cache entry as a pair of file object and it size.

        The caller has to close the file object.  Note that even if this
        cache entry is removed or evicted, the file will only removed by
        the file system when the file is closed.
        """
        with self._lock:
            return self._get_require_lock_by_caller(
                key,
                default,
                lambda path: (path.open('rb'), path.stat().st_size),
            )

    @contextlib.contextmanager
    def getting_path(self, key, default=None):
        with self._lock:
            path = self._get_require_lock_by_caller(
                key, default, functionals.identity
            )
            if path is not default:
                self._active_paths.add(path)
        try:
            yield path
        finally:
            with self._lock:
                if path is not default:
                    self._active_paths.remove(path)

    def _get_require_lock_by_caller(self, key, default, getter):
        path = self._get_path(key)
        if not path.exists():
            self._num_misses += 1
            return default
        value = getter(path)
        self._log_access(path)
        self._num_hits += 1
        return value

    def set(self, key, value):
        with self._lock:
            return self._set_require_lock_by_caller(
                key, lambda path: path.write_bytes(value)
            )

    @contextlib.contextmanager
    def setting_file(self, key):
        """Set a cache entry via a file-like object."""
        with self.setting_path(key) as p, p.open('wb') as f:
            yield f

    @contextlib.contextmanager
    def setting_path(self, key):
        """Set a cache entry via a temporary file path."""
        # We use mktemp (which is unsafe in general) because we want to
        # rename it on success, but NamedTemporaryFile's file closer
        # raises FileNotFoundError.  I think in our use case here,
        # mktemp is safe enough.
        value_tmp_path = Path(tempfile.mktemp())
        try:
            yield value_tmp_path
            with self._lock:
                # Use shutil.move because /tmp might be in another file
                # system than the cache directory.  (shutil.move detects
                # this and uses os.rename when they are in the same file
                # system.)
                self._set_require_lock_by_caller(
                    key,
                    lambda path: shutil.move(value_tmp_path, path),
                )
        finally:
            value_tmp_path.unlink(missing_ok=True)

    def _set_require_lock_by_caller(self, key, setter):
        path = self._get_path(key)
        if not path.exists():
            path.parent.mkdir(exist_ok=True)
            self._eviction_countdown -= 1
        setter(path)
        self._log_access(path)
        if self._should_evict():
            if self._executor:
                self._executor.submit(self._maybe_evict)
            else:
                self._evict_require_lock_by_caller()

    def pop(self, key, default=CacheInterface._SENTINEL):
        with self._lock:
            return self._pop_require_lock_by_caller(key, default)

    def _pop_require_lock_by_caller(self, key, default):
        path = self._get_path(key)
        if not path.exists():
            if default is self._SENTINEL:
                raise KeyError(key)
            return default
        value = path.read_bytes()
        path.unlink()
        g1.files.remove_empty_dir(path.parent)
        self._access_log.pop(path, None)
        self._eviction_countdown += 1
        return value

def _iter_dirs(dir_path):
    return filter(Path.is_dir, dir_path.iterdir())

def _iter_files(dir_path):
    return filter(Path.is_file, dir_path.iterdir())

def _count_dirs(dir_path):
    return sum(1 for _ in _iter_dirs(dir_path))

def _count_files(dir_path):
    return sum(1 for _ in _iter_files(dir_path))


text:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;

namespace TTengineTest
{
    /// <summary>Testing the linear motion of objects on screen</summary>
    class TestLinearMotion : Test
    {
        const float MOVE_SPEED_MULTIPLIER = 80f;

        public TestLinearMotion()
            : base()
        {
            BackgroundColor = Color.White;
        }

        public override void Create()
        {
            for (float x = 250f; x < 800f; x += 200f)
            {
                for (float y = 150f; y < 668f; y += 200f)
                {
                    var velo = new Vector2(-0.5f + x / 1024f, -0.5f + y / 768f);
                    velo *= MOVE_SPEED_MULTIPLIER;
                    Factory.CreateMovingBall(new Vector2(x, y), velo );
                }
            }
        }

    }
}


text:
package org.fcrepo.generator.dublincore;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * @author cabeer
 * @since 9/23/14
 */
public class DublinCoreGenerators extends ArrayList<DCGenerator> implements List<DCGenerator> {
    /**
     * Provides a list of generators
     * @param c
     */
    public DublinCoreGenerators(final Collection<? extends DCGenerator> c) {
        super(c);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="me.jaxbot.wear.leafstatus"
    android:versionCode="2"
    android:versionName="1.1.0" >

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MyActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <receiver
            android:name=".AlarmReceiver"
            android:enabled="true"
            android:exported="false" >
        </receiver>
        <receiver android:name=".StartAC" />
        <receiver
            android:name=".AlarmReceiverCamp"
            android:enabled="true"
            android:exported="false" >
        </receiver>

        <service
            android:name=".UpdateCarwingsService"
            android:enabled="true"
            android:exported="false" >
        </service>

        <receiver
            android:name=".BootReceiver"
            android:enabled="true"
            android:exported="true" >
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

        <activity
            android:name=".LoginActivity"
            android:label="@string/app_name" >
        </activity>
        <activity
            android:name=".Settings"
            android:label="@string/title_activity_settings" >
        </activity>

        <service
            android:name=".StartACService"
            android:enabled="true"
            android:exported="false" >
        </service>

        <activity
            android:name=".ExperimentsActivity"
            android:label="@string/title_activity_experiments" >
        </activity>
    </application>

</manifest>


text:
#region Apache Notice

#endregion

using System;
using System.Collections.Specialized;

namespace IBatisNet.Common.Logging
{
	/// <summary>
	/// Container used to hold configuration information from config file.
	/// </summary>
	internal class LogSetting
	{

		#region Fields

		private Type _factoryAdapterType= null;
		private NameValueCollection _properties = null;

		#endregion

		/// <summary>
		///
		/// </summary>
		/// <param name="factoryAdapterType">
		/// The <see cref="ILoggerFactoryAdapter" /> type
		/// that will be used for creating <see cref="ILog" />
		/// </param>
		/// <param name="properties">
		/// Additional user supplied properties that are passed to the
		/// <paramref name="factoryAdapterType" />'s constructor.
		/// </param>
		public LogSetting ( Type factoryAdapterType , NameValueCollection properties )
		{
			_factoryAdapterType = factoryAdapterType;
			_properties = properties;
		}

		/// <summary>
		/// The <see cref="ILoggerFactoryAdapter" /> type that will be used for creating <see cref="ILog" />
		/// instances.
		/// </summary>
		public Type FactoryAdapterType
		{
			get { return _factoryAdapterType; }
		}

		/// <summary>
		/// Additional user supplied properties that are passed to the <see cref="FactoryAdapterType" />'s constructor.
		/// </summary>
		public NameValueCollection Properties
		{
			get { return _properties; }
		}
	}
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <base data-ice="baseUrl" href="../../../../">
  <title data-ice="title">BaseAtom | API Document</title>
  <link type="text/css" rel="stylesheet" href="css/style.css">
  <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">

  Home
  Manual
  Reference
  Source
  Test
  Repository

    <input class="search-input">

Atoms
VatomErrors

Vatoms

Atoms/BaseAtoms
CBaseAtom

CBooleanAtom

CDecimalAtom

CDoubleAtom

CIntegerAtom

CJsonAtom

CStringAtom

CTextAtom

CTimestampAtom

Atoms/CustomAtoms
CEmailAtom

CPhoneAtom

CUrlAtom

Nuclide
Vnuclides

Nuclide/BaseNuclide
CBaseNuclide

import BaseAtom from 'AtomORM/lib/Atoms/BaseAtoms/BaseAtom.js'

  public
  class

  | source

BaseAtom

Direct Subclass:

BooleanAtom, DecimalAtom, DoubleAtom, IntegerAtom, JsonAtom, StringAtom, TextAtom

Indirect Subclass:

EmailAtom, PhoneAtom, TimestampAtom, UrlAtom

Constructor Summary

Public Constructor

      public

          constructor(value: any, options: Object)

Creates an instance of BaseAtom with given options.

Member Summary

Public Members

      public

      get

          value: any: *

Shortcut for getting atoms value

      public

      set

          value(newValue: any): *

Shortcut for setting Aatoms value

Method Summary

Public Methods

      public

          explain(): String

Explains whole atom object with settings and value
This is for development, testing and debugging only

      public

          explainSetValueError(): Array

Return array of error messages thrown during setting value of atom

      public

          getError(): Array | False

Returns error messages

      public

          getValue(): String | Number | Object

Returns current value of Atom

      public

          getWarning(): Array | False

Returns warning messages

      public

          hasChanged(): Boolean

Returns true if this atom needs to be included during update
If false atom will be skipped on update

      public

          setValue(value: any): Boolean

Set value for Atom

      public

          toString(): String

Returns String representation of value

Public Constructors

    public

    constructor(value: any, options: Object)

      source

Creates an instance of BaseAtom with given options.

Params:

Name	Type	Attribute	Description

      value
      any

optional

default: undefined

init value of atom

      options
      Object

optional

default: {
"name" : null,
"has_changed":false,
"type" : "STRING",
"database_type" : "STRING",
"required" : false,
"notnull" : false,
"unique" : false,
"is_primary_key":false,
"default" : null,
"autovalue" : false,
"min" : null,
"max" : null,
"additional_options" : null,
"setvalue_errors" : { errors:[],warnings:[]}
}

options set to this atom

Public Members

    public

    get

    value: any: *

      source

Shortcut for getting atoms value

Return:

          any

value of atom

Example:

var myatom = new BaseAtom({"value":"foo"});
console.log(myatom.value);
//outputs foo

    public

    set

    value(newValue: any): *

      source

Shortcut for setting Aatoms value

Example:

var myatom = new BaseAtom({"value":"bar"});
myatom.value = 'foo';
console.log(myatom.value);
//outputs foo

Public Methods

    public

    explain(): String

      source

Explains whole atom object with settings and value
This is for development, testing and debugging only

Return:

          String

prints a string representation of atom

    public

    explainSetValueError(): Array

      source

Return array of error messages thrown during setting value of atom

Return:

          Array

returns array of error messages

    public

    getError(): Array | False

      source

Returns error messages

Return:

          Array | False

array of error messages

    public

    getValue(): String | Number | Object

      source

Returns current value of Atom

Return:

          String | Number | Object

value of current Atom

    public

    getWarning(): Array | False

      source

Returns warning messages

Return:

          Array | False

array of warning messages

    public

    hasChanged(): Boolean

      source

Returns true if this atom needs to be included during update
If false atom will be skipped on update

Return:

          Boolean

true if value of atom was changed by setValue()

    public

    setValue(value: any): Boolean

      source

Set value for Atom

Params:

Name	Type	Attribute	Description

      value
      any

value to be set

Return:

          Boolean

true if newValue could be validated, else false

    public

    toString(): String

      source

Returns String representation of value

Return:

          String

value

  Generated by ESDoc(0.5.2)


text:
.. _bmm150:

BMM150 GeoMagnetic Sensor
#########################

Overview
********

This sample application periodically reads magnetometer (X, Y, Z) data from
the first available device that implements SENSOR_CHAN_MAGN_* (predefined array
of device names). This sample checks the sensor in polling mode (without
interrupt trigger).

Building and Running
********************

This sample application uses an BMM150 sensor connected to an Arduino 101 board via I2C.
Sensor has multiple pins so you need to connect according to connection diagram given in
`bmm150 datasheet`_ at page 41.
There are two processor cores (x86 and ARC) on the Arduino 101. You will need to
flash both this sample's code on the ARC core (using the ``arduino101_ss`` board target),
and stub code on the x86 core (using the ``arduino_101`` board target), as shown below.

.. code-block:: console

        $ cd $ZEPHYR_BASE/samples/sensor/bmm150
        $ make BOARD=arduino_101_sss flash

        $ cd $ZEPHYR_BASE/tests/booting/stub
        $ make BOARD=arduino_101 flash

Sample Output
=============
To check output of this sample , any serial console program can be used.
Here I am using picocom program to open output. Check which tty device it is.
In my case it is ttyUSB0

.. code-block:: console

        $ sudo picocom -D /dev/ttyUSB0

.. code-block:: console

        ( x y z ) = ( -0.390625  0.087500  -0.390625 )
        ( x y z ) = ( -0.275000  0.115625  -0.275000 )
        ( x y z ) = ( -0.281250  0.125000  -0.281250 )
        ( x y z ) = ( -0.287500  0.134375  -0.287500 )

.. _bmm150 datasheet: http://www.mouser.com/ds/2/783/BST-BMM150-DS001-01-786480.pdf


text:
/**
 * javascript library to embed
 * the pense widget in another
 * location
 *
 * @autor Iuri Andreazza
 */

var pw = pw || (function(){

	//Private vars
	var scriptName = "pense-widget.js"; //Scriptname
	var scriptTag; //reference to the html script tag
	var url = "http://localhost:82/workspace_java_rbs/widget-imoveis";
	var urlImoveis = "http://www.penseimoveis.com.br"

	/******** Get reference to self (scriptTag) *********/
    var allScripts = document.getElementsByTagName('script');
    var targetScripts = [];
    for (var i in allScripts) {
        var name = allScripts[i].src
        if(name && name.indexOf(scriptName) > 0)
            targetScripts.push(allScripts[i]);
    }

    scriptTag = targetScripts[targetScripts.length - 1];

	// ===============================
	// Loading scripts anychronously
	//
	// Usage: getScript('script.js', function() { /* callback */ });
	// ===============================
	var getScript = function(url,success){
	    var script = document.createElement('script');
	    script.src = url;
	    script.async = true;
	    var head = document.getElementsByTagName('head')[0], done=false;
	    script.onload = script.onreadystatechange = function(){
	        if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
	            done=true;
	            if(success)
	            	success();
	            script.onload = script.onreadystatechange = null;
	            head.removeChild(script);
	        }
	    };
	    head.appendChild(script);
	};

	// ===============================
	// Loading external css
	//
	// Usage: loadCss('style.css');
	// ===============================
	function loadCss(href) {
        var link_tag = document.createElement('link');
        link_tag.setAttribute("type", "text/css");
        link_tag.setAttribute("rel", "stylesheet");
        link_tag.setAttribute("href", href);
        (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(link_tag);
    }

	var each = function (arr, fnc) {
	    var data = [];
	    for (i = 0; i < arr.length; i++)
	        data.push(fnc(arr[i]));
	    return data;
	};

	// deparam
	//
	// Inverse of $.param()
	//
	// Taken from jquery-bbq by Ben Alman
	// https://github.com/cowboy/jquery-bbq/blob/master/jquery.ba-bbq.js

	var isArray = Array.isArray || function(obj) {
	  return Object.prototype.toString.call(obj) == '[object Array]';
	};

	var deparam = function( params, coerce ) {
	  var obj = {},
	  coerce_types = { 'true': !0, 'false': !1, 'null': null };

	  // Iterate over all name=value pairs.
	  each( params.replace( /\+/g, ' ' ).split( '&' ), function(v, j){
	    var param = v.split( '=' ),
	    key = decodeURIComponent( param[0] ),
	    val,
	    cur = obj,
	    i = 0,

	    // If key is more complex than 'foo', like 'a[]' or 'a[b][c]', split it
	    // into its component parts.
	    keys = key.split( '][' ),
	    keys_last = keys.length - 1;

	    // If the first keys part contains [ and the last ends with ], then []
	    // are correctly balanced.
	    if ( /\[/.test( keys[0] ) && /\]$/.test( keys[ keys_last ] ) ) {
	      // Remove the trailing ] from the last keys part.
	      keys[ keys_last ] = keys[ keys_last ].replace( /\]$/, '' );

	      // Split first keys part into two parts on the [ and add them back onto
	      // the beginning of the keys array.
	      keys = keys.shift().split('[').concat( keys );

	      keys_last = keys.length - 1;
	    } else {
	      // Basic 'foo' style key.
	      keys_last = 0;
	    }

	    // Are we dealing with a name=value pair, or just a name?
	    if ( param.length === 2 ) {
	      val = decodeURIComponent( param[1] );

	      // Coerce values.
	      if ( coerce ) {
	        val = val && !isNaN(val)            ? +val              // number
	        : val === 'undefined'             ? undefined         // undefined
	        : coerce_types[val] !== undefined ? coerce_types[val] // true, false, null
	        : val;                                                // string
	      }

	      if ( keys_last ) {
	        // Complex key, build deep object structure based on a few rules:
	        // * The 'cur' pointer starts at the object top-level.
	        // * [] = array push (n is set to array length), [n] = array if n is
	        //   numeric, otherwise object.
	        // * If at the last keys part, set the value.
	        // * For each keys part, if the current level is undefined create an
	        //   object or array based on the type of the next keys part.
	        // * Move the 'cur' pointer to the next level.
	        // * Rinse & repeat.
	        for ( ; i <= keys_last; i++ ) {
	          key = keys[i] === '' ? cur.length : keys[i];
	          cur = cur[key] = i < keys_last
	          ? cur[key] || ( keys[i+1] && isNaN( keys[i+1] ) ? {} : [] )
	          : val;
	        }

	      } else {
	        // Simple key, even simpler rules, since only scalars and shallow
	        // arrays are allowed.

	        if ( isArray( obj[key] ) ) {
	          // val is already an array, so push on the next value.
	          obj[key].push( val );

	        } else if ( obj[key] !== undefined ) {
	          // val isn't an array, but since a second value has been specified,
	          // convert val into an array.
	          obj[key] = [ obj[key], val ];

	        } else {
	          // val is a scalar.
	          obj[key] = val;
	        }
	      }

	    } else if ( key ) {
	      // No value was defined, so set something meaningful.
	      obj[key] = coerce
	      ? undefined
	      : '';
	    }
	  });

	  return obj;
	};

	// ===============================
	// Loading Query String
	//
	// Usage: parseQueryString('http://test.com?a=1&b=2');
	// ===============================
	var parseQueryString = function(url) {
		  var a = document.createElement('a');
		  a.href = url;
		  str = a.search.replace(/\?/, '');
		  return deparam(str, true /* coerce values, eg. 'false' into false */);
	};

	var info = parseQueryString(scriptTag.src);

	getScript(url+"/lib/handlebars-v1.3.0.js");
	getScript(url+"/lib/zepto.min.js", function(){ pw.init(); });
	loadCss(url+"/style.css");

	pwo = {

		debug : true,

		params : info,

		config : {
			cssClassPrefix 	: "",

			search_box 	: "search-box",
			list_box 	: "list",
			anuncio_box : "anuncio",
		},

		// ===============================
		// Initialize lib
		//
		// Usage: pw.init([configuration])
		// ===============================
		init : function(config){
			//Load Lib

			//Apply config
			if(config){
				this.applyConfig(config);
			}

			//Apenas inicializar se tiver o parametro type
			if(this.params.type){
				//Search box
				if(this.params.type == 'search')
					this.showSearchBox();
				//list from search
				if(this.params.type == 'list')
					this.showList();
				//Anuncio detail
				if(this.params.type == 'anuncio')
					this.showAnuncio();
			}

		},

		// ===============================
		// TODO
		// Apply Configuration to widget
		//
		// Usage: pw.appyConfig(configuration)
		// ===============================
		appyConfig : function(config){

		},

		// ===============================
		// TODO
		//
		// Usage: pw.showList()
		// ===============================
		showList : function(){},

		// ===============================
		// TODO
		//
		// Usage: pw.showAnuncio()
		// ===============================
		showAnuncio : function(){},

		// ===============================
		// Render the Search Box
		//
		// Usage: pw.showSearchBox()
		// ===============================
		showSearchBox : function(){
			var parentContainer = $(scriptTag).parent();
			if(this.params.element_id){
				parentContainer = $("#"+this.params.element_id);
			}
			if(parentContainer){
				$.ajax({
				      url: url+'/templates/search-box.html',
				      dataType: 'html',
				      cache: false,
				      context: this,
				      success: function(data, status, response) {
				        source = data;
				        var template    = Handlebars.compile(response.responseText);
				        var context = {
			        		urlpesquisa: urlImoveis+'/rs/lista/compra/rs/?Dormit%F3rios=2%3A2&Tipo+de+im%F3vel=Apartamento'
				        };
				        $(parentContainer).append($("
").html(template(context)));
				        this.loadData("search-box");
				      }
				});
			}
		},

		// ===============================
		// Render the Search Box
		//
		// Usage: pw.loadData(wtype)
		// ===============================
		loadData : function(wtype){

			//Inicia o load dos dados do widget que foi inicializado
			switch(wtype){
				case 'search-box':

					break;

				default:
					//Nada.... (por enquanto)
					break;
			}

		}
	};
	return pwo;

}());


text:
import { Platform } from 'react-native';
import BlockActionAndroid from './BlockActionAndroid';
import BlockActionIOS from './BlockActionIOS';

const BlockAction = Platform.select({
  ios: () => BlockActionIOS,
  android: () => BlockActionAndroid
})();

export default BlockAction;


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

<title>Uses of Class com.badlogic.gdx.utils.JsonValue (libgdx API)</title>
<meta name="date" content="2016-02-02">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

				libgdx API

Prev

Next

Frames

No Frames

All Classes

Uses of Class
com.badlogic.gdx.utils.JsonValue

Packages that use JsonValue

Package
Description

com.badlogic.gdx.graphics.g3d.particles

com.badlogic.gdx.graphics.g3d.particles.emitters

com.badlogic.gdx.graphics.g3d.particles.influencers

com.badlogic.gdx.graphics.g3d.particles.values

com.badlogic.gdx.utils

Uses of JsonValue in com.badlogic.gdx.graphics.g3d.particles

Methods in com.badlogic.gdx.graphics.g3d.particles with parameters of type JsonValue

Modifier and Type
Method and Description

void
ParticleController.read(Json json,
    JsonValue jsonMap)

void
ParticleControllerComponent.read(Json json,
    JsonValue jsonData)

void
ResourceData.read(Json json,
    JsonValue jsonData)

void
ResourceData.SaveData.read(Json json,
    JsonValue jsonData)

void
ResourceData.AssetData.read(Json json,
    JsonValue jsonData)

Uses of JsonValue in com.badlogic.gdx.graphics.g3d.particles.emitters

Methods in com.badlogic.gdx.graphics.g3d.particles.emitters with parameters of type JsonValue

Modifier and Type
Method and Description

void
Emitter.read(Json json,
    JsonValue jsonData)

void
RegularEmitter.read(Json json,
    JsonValue jsonData)

Uses of JsonValue in com.badlogic.gdx.graphics.g3d.particles.influencers

Methods in com.badlogic.gdx.graphics.g3d.particles.influencers with parameters of type JsonValue

Modifier and Type
Method and Description

void
ColorInfluencer.Single.read(Json json,
    JsonValue jsonData)

void
DynamicsInfluencer.read(Json json,
    JsonValue jsonData)

void
DynamicsModifier.read(Json json,
    JsonValue jsonData)

void
DynamicsModifier.Strength.read(Json json,
    JsonValue jsonData)

void
DynamicsModifier.Angular.read(Json json,
    JsonValue jsonData)

void
RegionInfluencer.read(Json json,
    JsonValue jsonData)

void
SimpleInfluencer.read(Json json,
    JsonValue jsonData)

void
SpawnInfluencer.read(Json json,
    JsonValue jsonData)

Uses of JsonValue in com.badlogic.gdx.graphics.g3d.particles.values

Methods in com.badlogic.gdx.graphics.g3d.particles.values with parameters of type JsonValue

Modifier and Type
Method and Description

void
EllipseSpawnShapeValue.read(Json json,
    JsonValue jsonData)

void
GradientColorValue.read(Json json,
    JsonValue jsonData)

void
NumericValue.read(Json json,
    JsonValue jsonData)

void
ParticleValue.read(Json json,
    JsonValue jsonData)

void
PrimitiveSpawnShapeValue.read(Json json,
    JsonValue jsonData)

void
RangedNumericValue.read(Json json,
    JsonValue jsonData)

void
ScaledNumericValue.read(Json json,
    JsonValue jsonData)

void
SpawnShapeValue.read(Json json,
    JsonValue jsonData)

Uses of JsonValue in com.badlogic.gdx.utils

Fields in com.badlogic.gdx.utils declared as JsonValue

Modifier and Type
Field and Description

JsonValue
JsonValue.child

May be null.

JsonValue
JsonValue.next

May be null.

JsonValue
JsonValue.parent

May be null.

JsonValue
JsonValue.prev

May be null.

Methods in com.badlogic.gdx.utils that return JsonValue

Modifier and Type
Method and Description

JsonValue
JsonValue.child()

Returns the first child for this object or array.

JsonValue
JsonValue.get(int index)

Returns the child at the specified index.

JsonValue
JsonValue.get(java.lang.String name)

Returns the child with the specified name.

JsonValue
JsonValue.getChild(java.lang.String name)

Finds the child with the specified name and returns its first child.

JsonValue
JsonValue.next()

Returns the next sibling of this value.

JsonValue
JsonValue.JsonIterator.next()

JsonValue
JsonValue.parent()

Returns the parent for this value.

JsonValue
JsonReader.parse(char[] data,
     int offset,
     int length)

JsonValue
UBJsonReader.parse(java.io.DataInputStream din)

protected JsonValue
UBJsonReader.parse(java.io.DataInputStream din,
     byte type)

JsonValue
BaseJsonReader.parse(FileHandle file)

JsonValue
JsonReader.parse(FileHandle file)

JsonValue
UBJsonReader.parse(FileHandle file)

JsonValue
BaseJsonReader.parse(java.io.InputStream input)

JsonValue
JsonReader.parse(java.io.InputStream input)

JsonValue
UBJsonReader.parse(java.io.InputStream input)

Parses the UBJSON from the given stream.

JsonValue
JsonReader.parse(java.io.Reader reader)

JsonValue
JsonReader.parse(java.lang.String json)

protected JsonValue
UBJsonReader.parseArray(java.io.DataInputStream din)

protected JsonValue
UBJsonReader.parseData(java.io.DataInputStream din,
         byte blockType)

protected JsonValue
UBJsonReader.parseObject(java.io.DataInputStream din)

JsonValue
JsonValue.prev()

Returns the previous sibling of this value.

JsonValue
JsonValue.remove(int index)

Removes the child with the specified index.

JsonValue
JsonValue.remove(java.lang.String name)

Removes the child with the specified name.

JsonValue
JsonValue.require(int index)

Returns the child at the specified index.

JsonValue
JsonValue.require(java.lang.String name)

Returns the child with the specified name.

Methods in com.badlogic.gdx.utils that return types with arguments of type JsonValue

Modifier and Type
Method and Description

java.util.Iterator<JsonValue>
JsonValue.JsonIterator.iterator()

Methods in com.badlogic.gdx.utils with parameters of type JsonValue

Modifier and Type
Method and Description

void
Json.Serializable.read(Json json,
    JsonValue jsonData)

T
Json.Serializer.read(Json json,
    JsonValue jsonData,
    java.lang.Class type)

abstract T
Json.ReadOnlySerializer.read(Json json,
    JsonValue jsonData,
    java.lang.Class type)

void
Json.readField(java.lang.Object object,
         Field field,
         java.lang.String jsonName,
         java.lang.Class elementType,
         JsonValue jsonMap)

void
Json.readField(java.lang.Object object,
         java.lang.String name,
         java.lang.Class elementType,
         JsonValue jsonData)

void
Json.readField(java.lang.Object object,
         java.lang.String name,
         JsonValue jsonData)

void
Json.readField(java.lang.Object object,
         java.lang.String fieldName,
         java.lang.String jsonName,
         java.lang.Class elementType,
         JsonValue jsonMap)

void
Json.readField(java.lang.Object object,
         java.lang.String fieldName,
         java.lang.String jsonName,
         JsonValue jsonData)

void
Json.readFields(java.lang.Object object,
          JsonValue jsonMap)

<T> T
Json.readValue(java.lang.Class<T> type,
         java.lang.Class elementType,
         JsonValue jsonData)

<T> T
Json.readValue(java.lang.Class<T> type,
         java.lang.Class elementType,
         T defaultValue,
         JsonValue jsonData)

<T> T
Json.readValue(java.lang.Class<T> type,
         JsonValue jsonData)

<T> T
Json.readValue(java.lang.String name,
         java.lang.Class<T> type,
         java.lang.Class elementType,
         JsonValue jsonMap)

<T> T
Json.readValue(java.lang.String name,
         java.lang.Class<T> type,
         java.lang.Class elementType,
         T defaultValue,
         JsonValue jsonMap)

<T> T
Json.readValue(java.lang.String name,
         java.lang.Class<T> type,
         JsonValue jsonMap)

<T> T
Json.readValue(java.lang.String name,
         java.lang.Class<T> type,
         T defaultValue,
         JsonValue jsonMap)

void
JsonValue.setNext(JsonValue next)

void
JsonValue.setPrev(JsonValue prev)

UBJsonWriter
UBJsonWriter.value(JsonValue value)

Appends the given JsonValue, including all its fields recursively, to the stream.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

libgdx API

Prev

Next

Frames

No Frames

All Classes

				Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)


text:
[![Build Status](https://travis-ci.org/redspread/localkube.svg?branch=master)](https://travis-ci.org/redspread/localkube)

`localkube` provides a Kubernetes cluster configured to run locally and optimized for rapid development.

The environment is intended to be used with Kubernetes development tool [spread](https://github.com/redspread/spread). It is similar to [monokube](https://github.com/polvi/monokube).

### Developing

This will compile localkube executable, build an image with it inside, and run a container with the build image.

The `docker` command should be setup for the Docker daemon you want the run the cluster with.

**Linux**
```bash
make run-image
```

**OS X/Windows**
```bash
make docker-build run-image
```

The apiserver will run on port 8080 of the Docker host.


text:
package com.hazelcast.client.impl.protocol.task.map;

import com.hazelcast.client.impl.protocol.ClientMessage;
import com.hazelcast.client.impl.protocol.codec.ContinuousQueryDestroyCacheCodec;
import com.hazelcast.client.impl.protocol.task.AbstractCallableMessageTask;
import com.hazelcast.instance.MemberImpl;
import com.hazelcast.instance.Node;
import com.hazelcast.internal.cluster.ClusterService;
import com.hazelcast.map.impl.querycache.subscriber.operation.DestroyQueryCacheOperation;
import com.hazelcast.nio.Address;
import com.hazelcast.nio.Connection;
import com.hazelcast.spi.InvocationBuilder;
import com.hazelcast.spi.impl.operationservice.InternalOperationService;
import com.hazelcast.util.FutureUtil;

import java.security.Permission;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

import static com.hazelcast.map.impl.MapService.SERVICE_NAME;

/**
 * Client Protocol Task for handling messages with type id:
 * {@link com.hazelcast.client.impl.protocol.codec.ContinuousQueryMessageType#CONTINUOUSQUERY_DESTROYCACHE}
 */
public class MapDestroyCacheMessageTask
        extends AbstractCallableMessageTask<ContinuousQueryDestroyCacheCodec.RequestParameters> {

    public MapDestroyCacheMessageTask(ClientMessage clientMessage, Node node, Connection connection) {
        super(clientMessage, node, connection);
    }

    @Override
    protected Object call() throws Exception {
        ClusterService clusterService = clientEngine.getClusterService();
        Collection<MemberImpl> members = clusterService.getMemberImpls();
        List<Future<Boolean>> futures = new ArrayList<Future<Boolean>>(members.size());
        createInvocations(members, futures);
        Collection<Boolean> results = FutureUtil.returnWithDeadline(futures, 1, TimeUnit.MINUTES);
        return reduce(results);
    }

    private boolean reduce(Collection<Boolean> results) {
        return !results.contains(Boolean.FALSE);
    }

    private void createInvocations(Collection<MemberImpl> members, List<Future<Boolean>> futures) {
        InternalOperationService operationService = nodeEngine.getOperationService();
        for (MemberImpl member : members) {
            DestroyQueryCacheOperation operation =
                    new DestroyQueryCacheOperation(parameters.mapName, parameters.cacheName);
            operation.setCallerUuid(endpoint.getUuid());
            Address address = member.getAddress();
            InvocationBuilder invocationBuilder = operationService.createInvocationBuilder(SERVICE_NAME, operation, address);
            Future future = invocationBuilder.invoke();
            futures.add(future);
        }
    }

    @Override
    protected ContinuousQueryDestroyCacheCodec.RequestParameters decodeClientMessage(ClientMessage clientMessage) {
        return ContinuousQueryDestroyCacheCodec.decodeRequest(clientMessage);
    }

    @Override
    protected ClientMessage encodeResponse(Object response) {
        return ContinuousQueryDestroyCacheCodec.encodeResponse((Boolean) response);
    }

    @Override
    public String getServiceName() {
        return null;
    }

    @Override
    public Permission getRequiredPermission() {
        return null;
    }

    @Override
    public String getDistributedObjectName() {
        return null;
    }

    @Override
    public String getMethodName() {
        return null;
    }

    @Override
    public Object[] getParameters() {
        return null;
    }
}


text:
package com.cameronstanley.javatetris.client.model;

import java.util.ArrayList;

public class Menu {

	private ArrayList<MenuItem> menuItems;
	private int selectedMenuItemIndex;

	public Menu() {
		menuItems = new ArrayList<MenuItem>();
		selectedMenuItemIndex = 0;
	}

	public void addMenuItem(MenuItem menuItem) {
		menuItems.add(menuItem);
	}

	public void selectNextMenuItem() {
		int startingIndex = selectedMenuItemIndex;
		while (true) {
			if (selectedMenuItemIndex == menuItems.size() - 1) {
				selectedMenuItemIndex = 0;
			} else {
				selectedMenuItemIndex++;
			}

			if (menuItems.get(selectedMenuItemIndex).isEnabled()) {
				break;
			}

			if (selectedMenuItemIndex == startingIndex) {
				break;
			}
		}
	}

	public void selectPreviousMenuItem() {
		int startingIndex = selectedMenuItemIndex;

		while (true) {
			if (selectedMenuItemIndex == 0) {
				selectedMenuItemIndex = menuItems.size() - 1;
			} else {
				selectedMenuItemIndex--;
			}

			if (menuItems.get(selectedMenuItemIndex).isEnabled()) {
				break;
			}

			if (selectedMenuItemIndex == startingIndex) {
				break;
			}
		}
	}

	public ArrayList<MenuItem> getMenuItems() {
		return menuItems;
	}

	public int getSelectedMenuItemIndex() {
		return selectedMenuItemIndex;
	}

}


text:
import React from 'react';
import { NavigationComponentProps } from 'react-native-navigation';
import Root from '../components/Root';
import Button from '../components/Button';
import Screens from './Screens';
import Navigation from './../services/Navigation';
import { stack, component } from './../commons/Layouts';
import testIDs from '../testIDs';

const {
  SIDE_MENU_INSIDE_BOTTOM_TABS_BTN,
  PUSH_BTN,
  PUSHED_BOTTOM_TABS,
  SIDE_MENU_TAB,
  FLAT_LIST_BTN,
  HIDE_TABS_PUSH_BTN,
  SECOND_TAB_BAR_BTN,
} = testIDs;

export default class SecondBottomTabScreen extends React.Component<NavigationComponentProps> {
  static options() {
    return {
      topBar: {
        title: {
          text: 'Second Tab',
        },
      },
      bottomTab: {
        icon: require('../../img/star.png'),
        text: 'Tab 2',
        testID: SECOND_TAB_BAR_BTN,
        dotIndicator: {
          visible: true,
          color: 'green',
        },
      },
    };
  }

  render() {
    return (
      <Root componentId={this.props.componentId}>
        <Button label="Push" onPress={this.push} />
        <Button label="Push BottomTabs" testID={PUSH_BTN} onPress={this.pushBottomTabs} />
        <Button label="Push ScrollView" onPress={this.pushScrollView} />
        <Button
          label="SideMenu inside BottomTabs"
          testID={SIDE_MENU_INSIDE_BOTTOM_TABS_BTN}
          onPress={this.sideMenuInsideBottomTabs}
        />
        <Button
          label="Hide Tabs on Push"
          testID={HIDE_TABS_PUSH_BTN}
          onPress={this.hideTabsOnPush}
        />
      </Root>
    );
  }

  hideTabsOnPush = () =>
    Navigation.push(
      this,
      component(Screens.Pushed, {
        bottomTabs: { visible: false },
      })
    );

  push = () => Navigation.push(this, Screens.Pushed);

  pushBottomTabs = () =>
    Navigation.push(this, {
      bottomTabs: {
        children: [
          component(Screens.Pushed, {
            bottomTab: {
              icon: require('../../img/whatshot.png'),
              text: 'Tab A',
              testID: PUSHED_BOTTOM_TABS,
            },
          }),
          component(Screens.Pushed, {
            bottomTab: {
              icon: require('../../img/star.png'),
              text: 'Tab B',
            },
          }),
        ],
      },
    });

  pushScrollView = () => Navigation.push(this, Screens.ScrollViewScreen);

  sideMenuInsideBottomTabs = () => {
    Navigation.showModal({
      bottomTabs: {
        children: [
          {
            sideMenu: {
              left: { ...component(Screens.SideMenuLeft) },
              center: stack(Screens.SideMenuCenter),
              options: {
                bottomTab: {
                  text: 'SideMenu',
                  icon: require('../../img/sideMenu.png'),
                  testID: SIDE_MENU_TAB,
                },
              },
            },
          },
          {
            sideMenu: {
              left: { ...component(Screens.SideMenuLeft) },
              center: stack(Screens.FlatListScreen),
              options: {
                bottomTab: {
                  text: 'FlatList',
                  icon: require('../../img/list.png'),
                  testID: FLAT_LIST_BTN,
                },
              },
            },
          },
        ],
      },
    });
  };
}


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

namespace Orleans.Activities.Helpers
{
    public static class TypeExtensions
    {
        public static string GetNongenericName(this Type type)
            => type.IsGenericType
                ? type.Name.Remove(type.Name.IndexOf('`'))
                : type.Name;

        public static string GetFriendlyName(this Type type)
            => type.IsGenericType
                ? type.Name.Remove(type.Name.IndexOf('`')) + "<" + string.Join(", ", type.GetGenericArguments().Select(x => x.GetFriendlyName())) + ">"
                : type.Name;

        public static bool IsGenericTypeOf(this Type type, Type genericTypeDefinition)
            => type.IsGenericType && type.GetGenericTypeDefinition() == genericTypeDefinition;
    }
}


text:
@charset "utf-8";
/* index.css @zhangxiaotong 20150604 */

html{overflow-x:hidden;}
html,body{-webkit-text-size-adjust:none;}
body{font-family:"MicroSoft YaHei";}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {padding:0;margin:0}
img {border:0}
ol,ul,li {list-style:none}
i,em{ font-style:normal;}

a{text-decoration:none;outline: none;}
a:hover{text-decoration:underline;-webkit-transition:color .3s ease-out;-moz-transition:color .3s ease-out;transition:color .3s ease-out;}
area{blr:expression(this.onFocus=this.blur());outline:none;}

button,input,select,textarea{font-size:100%;}
input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;outline:none;}

body,a:link,a:visited {text-decoration:none;}

.c{*zoom:1}
.c:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
.l{float:left;}
.r{float:right;}
.tac {text-align:center;}
.pr{position:relative}

.zxt_headerbox{height:60px;background:#121212;}
.zxt_header{width:980px;margin:auto; position:relative;}
.zxt_header a{display:block;}
.zxt_eightlogo{width:171px;height:59px;background:url(../images/zxt_8864logo.jpg) no-repeat;}
.zxt_linekong_logo{width:82px;height:28px;margin-top:18px;background:url(../images/zxt_linfekong_logo.png) no-repeat;}
.zxt_game{width:321px;height:60px;background:url(../images/zxt_sm_gg_2.jpg) no-repeat;}
.zxt_header .zxt_smhover{background:url(../images/zxt_smhover_gg_2.jpg) no-repeat}

.zxt_smhover_pic{width:980px;height:216px;position:absolute;top:60px;left:-254px;display:none;background:url(../images/zxt_big_gg_2.jpg) no-repeat;z-index:999999999999999999999;}
.zxt_smhover_pic a{width:980px;height:186px;position:absolute;left:0;top:0;}

.zxt_nav_box{ position:absolute; right:138px;}
.zxt_nav{width:268px;padding-top:20px;}
.zxt_nav a{float:right;padding:0 8px;background:url(../images/zxt_xian.jpg) no-repeat right top;color:#d4d4d4;font-size:14px;}
.zxt_nav a:hover{color:#ffc600}
.zxt_last{background:none;}
.zxt_sel_box{padding-top:18px; position:absolute; right:7px;}
.zxt_sel{width:125px;height:22px;line-height:22px;background:#424242;border:#232323 solid 1px;position:relative;font-size:14px;color:#e6e6e6;font-weight:bold;padding-left:4px;}
.zxt_sel i{display:block;width:12px;height:7px;background:url(../images/zxt_sj.jpg) no-repeat;position:absolute;top:9px;right:10px;}
.zxt_conbox{width:954px;height:347px;background:url(../images/zxt_bk.png) repeat;border:#505050 solid 1px;position:absolute;top:60px;right:0px;z-index:9999999;padding:12px;display:none}
.zxt_khdgame{width:202px;height:342px;border-right:#000 solid 1px;}
.zxt_khdgame h2{font-size:12px;color:#e6e6e6;position:relative;margin-bottom:25px;}
.zxt_khdgame h2 a{color:#8e8e8e;right:10px;position:absolute;top:0px;}
.zxt_khd_list li{height:25px;background:url(../images/zxt_icon.png) no-repeat;padding-left:32px;margin-bottom:4px;}
.pdt38{padding-top:38px;}
.zxt_khd_list .zxt_shenshou{background-position:left 4px;}
.zxt_khd_list .zxt_lm{background-position:left -24px;}
.zxt_khd_list .zxt_xy{background-position:left -54px;}
.zxt_khd_list .zxt_yt{background-position:left -84px;}
.zxt_khd_list .zxt_yb{background-position:left -114px;}
.zxt_khd_list .zxt_sg{background-position:left -144px;}

.zxt_khd_list li p{height:25px;line-height:25px;font-size:12px;color:#cfcfcf;}
.zxt_game_btnbox{display:none}
.zxt_game_btnbox a{width:74px;height:23px;text-align:center;line-height:23px;background:#1e1e1e;border:#858585 solid 1px;display:block;float:left;color:#858585;font-size:12px;border-radius:5px;margin-right:5px;}
.zxt_game_btnbox a:hover{background:#f5a100;border:#f5a100 solid 1px;color:white;}

.zxt_telgame{width:506px;height:342px;border-right:#000 solid 1px;}
.zxt_telgame h2{font-size:12px;color:#e6e6e6;position:relative;margin-bottom:25px;padding-left:13px;}
.zxt_telgame h2 a{color:#8e8e8e;right:10px;position:absolute;top:0px;}
.zxt_telgame_list{height:264px;float:left;}
.pdl12{padding-left:12px;}
.zxt_telgame_list li{width:220px;margin-bottom:4px;}
.zxt_odd{margin-right:33px;}
.zxt_telgame_list p{width:198px;height:25px;font-size:12px;color:#cfcfcf;line-height:25px;background:url(../images/zxt_icon.png) no-repeat;padding-left:29px;}
.zxt_telgame_list p i{float:left;display:block;position:relative;}
.zxt_telgame_list p.zxt_110{ background:url(../images/zxt_tel_zyj2.png) no-repeat 0 5px;}
.zxt_gamehot{width:15px;height:15px;display:inline-block;background:url(../images/zxt_hot.png) no-repeat;position:absolute;right:-18px;top:6px;}
.zxt_gamenew{width:15px;height:15px;display:inline-block;background:url(../images/zxt_new.png) no-repeat;position:absolute;right:-18px;top:6px;}
.zxt_telgame_list p em{color:#7b7b7b;float:right;display:block;}
.zxt_sw_box{display:none}
.zxt_telgame_list .zxt_sw{background-position:left -174px}
.zxt_telgame_list .zxt_xx{background-position:left -390px}
.zxt_telgame_list .zxt_dgr{background-position:left -354px}
.zxt_telgame_list .zxt_szr{background-position:left -294px}
.zxt_telgame_list .zxt_k{background-position:left -204px}
.zxt_telgame_list .zxt_k2{background-position:left -644px}
.zxt_telgame_list .zxt_y{background-position:left -234px}
.zxt_telgame_list .zxt_sgz{background-position:left -426px}
.zxt_telgame_list .zxt_z{background-position:left -264px}
.zxt_telgame_list .zxt_mj{background-position:left -324px}
.zxt_telgame_list .zxt_yh{background-position:left -462px;}
.zxt_telgame_list .zxt_nz{background-position:left -500px;}
.zxt_telgame_list .zxt_mi{background-position:left -536px;}
.zxt_telgame_list .zxt_ss{background-position:left -572px;}
.zxt_telgame_list .zxt_dh{background-position:left -608px;}
.zxt_telgame_list .zxt_w{background-position:left -644px}
.zxt_sw_box{width:215px;height:97px;background:#1e1e1e;border:#181818 solid 1px;border-radius:5px;padding:10px 0 0 10px;}
.zxt_telgame_list dl{width:200px;}
.zxt_telgame_pic{width:85px;height:83px;float:left;}
.zxt_telgame_list dt{width:108px;text-align:center;float:right;font-size:12px;color:#cfcfcf;}
.zxt_telgamebtnbox{float:right;}
.zxt_telgamebtnbox a{display:block;width:86px;height:25px;background:url(../images/zxt_telgamebtn_bk.jpg) no-repeat;margin-top:10px;}
.zxt_telgamebtnbox .zxt_telgame_enter{background-position:left 0;}
.zxt_telgamebtnbox .zxt_telgame_enter:hover{background-position:-86px 0;}
.zxt_telgamebtnbox .zxt_telgame_download{background-position:left -35px;}
.zxt_telgamebtnbox .zxt_telgame_download:hover{background-position:-86px -35px;}

.zxt_other{}
.zxt_other h2{font-size:12px;color:#e6e6e6;position:relative;margin-bottom:25px;padding-left:13px;}
.zxt_other ul{width:227px;}
.zxt_other ul li{width:103px;height:43px;float:left;margin-bottom:15px;}
.zxt_other ul a{display:block;width:103px;height:43px;background:url(../images/zxt_ot.png) no-repeat}
.zxt_other ul a:hover{background:url(../images/zxt_othover.png) no-repeat;}
.zxt_other .zxt_account{background-position:left 0;}
.zxt_other .zxt_account:hover{background-position:left 0;}
.zxt_other .zxt_onlinecard{background-position:-123px 0;}
.zxt_other .zxt_onlinecard:hover{background-position:-123px 0;}
.zxt_other .zxt_kf{background-position:left -58px;}
.zxt_other .zxt_kf:hover{background-position:left -58px;}
.zxt_other .zxt_linekongbbs{background-position:-123px -58px;}
.zxt_other .zxt_linekongbbs:hover{background-position:-123px -58px;}
.zxt_other .zxt_safe_security{background-position:left -116px;}
.zxt_other .zxt_safe_security:hover{background-position:left -116px;}
.zxt_other .zxt_Parental_Controls{background-position:-123px -116px;}
.zxt_other .zxt_Parental_Controls:hover{background-position:-123px -116px;}
.zxt_other .zxt_know_linekong{background-position:left -174px;}
.zxt_other .zxt_know_linekong:hover{background-position:left -174px;}
.zxt_other .zxt_business_cooperation{background-position:-123px -174px;}
.zxt_other .zxt_business_cooperation:hover{background-position:-123px -174px;}
.zxt_other .zxt_join_us{background-position:left -232px;}
.zxt_other .zxt_join_us:hover{background-position:left -232px;}
.zxt_other .zxt_taobao{background-position:-123px -232px;}
.zxt_other .zxt_taobao:hover{background-position:-123px -232px;}
.zxt_a_odd{margin-right:20px;}

.zxt_explain{width:194px;height:15px;position:absolute;right:0px;bottom:10px;}
.zxt_explain li{font-size:12px;color:#8e8e8e;float:left;height:15px;line-height:15px;padding-left:20px;}
.zxt_explain .zxt_hot{background:url(../images/zxt_hot.png) no-repeat;margin-right:29px;}
.zxt_explain .zxt_new{background:url(../images/zxt_new.png) no-repeat;}


text:
package com.consol.citrus.vertx.message;

import com.consol.citrus.context.TestContext;
import com.consol.citrus.message.*;
import com.consol.citrus.message.Message;
import com.consol.citrus.vertx.endpoint.VertxEndpointConfiguration;

/**
 * Message converter implementation converts inbound Vert.x messages to internal message representation. Outbound message conversion is not supported
 * as the Vert.x message transport encapsulates message conversion by default.
 *
 * @author Christoph Deppisch
 * @since 1.4.1
 */
public class VertxMessageConverter implements MessageConverter<io.vertx.core.eventbus.Message, VertxEndpointConfiguration> {

    @Override
    public Message convertInbound(io.vertx.core.eventbus.Message vertxMessage, VertxEndpointConfiguration endpointConfiguration, TestContext context) {
        if (vertxMessage == null) {
            return null;
        }

        Message message = new DefaultMessage(vertxMessage.body())
                .setHeader(CitrusVertxMessageHeaders.VERTX_ADDRESS, vertxMessage.address())
                .setHeader(CitrusVertxMessageHeaders.VERTX_REPLY_ADDRESS, vertxMessage.replyAddress());

        return message;
    }

    @Override
    public io.vertx.core.eventbus.Message convertOutbound(Message internalMessage, VertxEndpointConfiguration endpointConfiguration, TestContext context) {
        throw new UnsupportedOperationException("Unable to convert Vert.x outbound message");
    }

    @Override
    public void convertOutbound(io.vertx.core.eventbus.Message externalMessage, Message internalMessage, VertxEndpointConfiguration endpointConfiguration, TestContext context) {
        throw new UnsupportedOperationException("Unable to convert Vert.x outbound message");
    }
}


text:
<?php

declare(strict_types=1);

namespace Respect\Validation\Rules;

use ArrayAccess;
use Respect\Validation\Exceptions\ComponentException;

use function array_key_exists;
use function array_shift;
use function explode;
use function is_array;
use function is_null;
use function is_object;
use function is_scalar;
use function property_exists;
use function rtrim;
use function sprintf;

/**
 * @author Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
 * @author Emmerson Siqueira <emmersonsiqueira@gmail.com>
 * @author Henrique Moody <henriquemoody@gmail.com>
 * @author Ivan Zinovyev <vanyazin@gmail.com>
 */
final class KeyNested extends AbstractRelated
{
    /**
     * {@inheritDoc}
     */
    public function hasReference($input): bool
    {
        try {
            $this->getReferenceValue($input);
        } catch (ComponentException $cex) {
            return false;
        }

        return true;
    }

    /**
     * {@inheritDoc}
     */
    public function getReferenceValue($input)
    {
        if (is_scalar($input)) {
            $message = sprintf('Cannot select the %s in the given data', $this->getReference());
            throw new ComponentException($message);
        }

        $keys = $this->getReferencePieces();
        $value = $input;
        while (!is_null($key = array_shift($keys))) {
            $value = $this->getValue($value, $key);
        }

        return $value;
    }

    /**
     * @return string[]
     */
    private function getReferencePieces(): array
    {
        return explode('.', rtrim((string) $this->getReference(), '.'));
    }

    /**
     * @param mixed[] $array
     * @param mixed $key
     *
     * @return mixed
     */
    private function getValueFromArray(array $array, $key)
    {
        if (!array_key_exists($key, $array)) {
            $message = sprintf('Cannot select the key %s from the given array', $this->getReference());
            throw new ComponentException($message);
        }

        return $array[$key];
    }

    /**
     * @param mixed $key
     *
     * @return mixed
     */
    private function getValueFromArrayAccess(ArrayAccess $array, $key)
    {
        if (!$array->offsetExists($key)) {
            $message = sprintf('Cannot select the key %s from the given array', $this->getReference());
            throw new ComponentException($message);
        }

        return $array->offsetGet($key);
    }

    /**
     * @phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint
     *
     *
     * @return mixed
     */
    private function getValueFromObject(object $object, string $property)
    {
        if (empty($property) || !property_exists($object, $property)) {
            $message = sprintf('Cannot select the property %s from the given object', $this->getReference());
            throw new ComponentException($message);
        }

        return $object->{$property};
    }

    /**
     * @param mixed $value
     * @param mixed $key
     *
     * @return mixed
     */
    private function getValue($value, $key)
    {
        if (is_array($value)) {
            return $this->getValueFromArray($value, $key);
        }

        if ($value instanceof ArrayAccess) {
            return $this->getValueFromArrayAccess($value, $key);
        }

        if (is_object($value)) {
            return $this->getValueFromObject($value, $key);
        }

        $message = sprintf('Cannot select the property %s from the given data', $this->getReference());
        throw new ComponentException($message);
    }
}


text:
@class RACSignal;

/// Private class that adapts a RACSignal to the RACSequence interface.
@interface RACSignalSequence : RACSequence

/// Returns a sequence for enumerating over the given signal.
+ (RACSequence *)sequenceWithSignal:(RACSignal *)signal;

@end


text:
package com.peterphi.usermanager.ui.api;

import org.jboss.resteasy.annotations.cache.NoCache;

import javax.ws.rs.DefaultValue;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@Path("/")
public interface LoginUIService
{
	@GET
	@Path("/login")
	@Produces(MediaType.TEXT_HTML)
	String getLogin(@QueryParam("returnTo") @DefaultValue("/") String returnTo, @QueryParam("errorText") String errorText);

	@POST
	@Path("/login")
	@Produces(MediaType.TEXT_HTML)
	Response doLogin(@FormParam("token") String token,
	                 @FormParam("returnTo") @DefaultValue("/") String returnTo,
	                 @FormParam("email") String user,
	                 @FormParam("password") String password);

	@GET
	@NoCache
	@Path("/logout")
	@Produces(MediaType.TEXT_HTML)
	Response doLogout(@QueryParam("returnTo") @DefaultValue("") String returnTo);
}


text:
 package org.apache.ranger.view;

/**
 * List wrapper class for VXCredentialStore

 */

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import org.apache.ranger.common.view.VList;
import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonAutoDetect.Visibility;
import org.codehaus.jackson.map.annotate.JsonSerialize;

@JsonAutoDetect(getterVisibility=Visibility.NONE, setterVisibility=Visibility.NONE, fieldVisibility=Visibility.ANY)
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL )
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class VXCredentialStoreList extends VList {
	private static final long serialVersionUID = 1L;
    List<VXCredentialStore> vXCredentialStores = new ArrayList<VXCredentialStore>();

    public VXCredentialStoreList() {
	super();
    }

    public VXCredentialStoreList(List<VXCredentialStore> objList) {
	super(objList);
	this.vXCredentialStores = objList;
    }

    /**
     * @return the vXCredentialStores
     */
    public List<VXCredentialStore> getVXCredentialStores() {
	return vXCredentialStores;
    }

    /**
     * @param vXCredentialStores
     *            the vXCredentialStores to set
     */
    public void setVXCredentialStores(List<VXCredentialStore> vXCredentialStores) {
	this.vXCredentialStores = vXCredentialStores;
    }

    @Override
    public int getListSize() {
	if (vXCredentialStores != null) {
	    return vXCredentialStores.size();
	}
	return 0;
    }

    @Override
    public List<VXCredentialStore> getList() {
	return vXCredentialStores;
    }

}


text:
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/kdev_t.h>
#include <linux/string.h>
#include <linux/screen_info.h>
#include <linux/console.h>
#include <linux/timex.h>
#include <linux/sched.h>
#include <linux/root_dev.h>

#include <asm/io.h>
#include <asm/machvec.h>
#include <asm/system.h>

void __init
dig_setup (char **cmdline_p)
{
	unsigned int orig_x, orig_y, num_cols, num_rows, font_height;

	/*
	 * Default to /dev/sda2.  This assumes that the EFI partition
	 * is physical disk 1 partition 1 and the Linux root disk is
	 * physical disk 1 partition 2.
	 */
	ROOT_DEV = Root_SDA2;		/* default to second partition on first drive */

#ifdef CONFIG_SMP
	init_smp_config();
#endif

	memset(&screen_info, 0, sizeof(screen_info));

	if (!ia64_boot_param->console_info.num_rows
	    || !ia64_boot_param->console_info.num_cols)
	{
		printk(KERN_WARNING "dig_setup: warning: invalid screen-info, guessing 80x25\n");
		orig_x = 0;
		orig_y = 0;
		num_cols = 80;
		num_rows = 25;
		font_height = 16;
	} else {
		orig_x = ia64_boot_param->console_info.orig_x;
		orig_y = ia64_boot_param->console_info.orig_y;
		num_cols = ia64_boot_param->console_info.num_cols;
		num_rows = ia64_boot_param->console_info.num_rows;
		font_height = 400 / num_rows;
	}

	screen_info.orig_x = orig_x;
	screen_info.orig_y = orig_y;
	screen_info.orig_video_cols  = num_cols;
	screen_info.orig_video_lines = num_rows;
	screen_info.orig_video_points = font_height;
	screen_info.orig_video_mode = 3;	/* XXX fake */
	screen_info.orig_video_isVGA = 1;	/* XXX fake */
	screen_info.orig_video_ega_bx = 3;	/* XXX fake */
}


text:
<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
    	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    	<!-- SEO -->

        <title>__PAGE_TITLE__</title>
        <meta name="description" content="__PAGE_DESCRIPTION__">
        <meta name="keywords" content="__PAGE_KEYWORDS__">
        <meta name="author" content="__PAGE_AUTHOR__">

        <!-- Spiders must use meta description -->

        <meta name="robots" content="noodp, noydir">

        <!-- No Google Translate toolbar -->

        <meta name="google" content="notranslate">

        <!-- Viewport and mobile -->

    	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0, minimal-ui">
        <meta name="HandheldFriendly" content="true">
        <meta name="MobileOptimized" content="320">
        <meta http-equiv="cleartype" content="on">

        <!-- iOS web app -->
        <!-- Note: more options here: https://gist.github.com/tfausak/2222823 -->

        <!--
    	<meta name="apple-mobile-web-app-capable" content="yes">
    	<meta name="apple-mobile-web-app-title" content="__PAGE_TITLE__">
    	<meta name="apple-mobile-web-app-status-bar-style" content="black">
        -->

    	<!-- Icons -->
        <!-- Note: One touch icon works but is a tad heavier (http://mathiasbynens.be/notes/touch-icons) -->

        <!--
        <link rel="apple-touch-iconprecomposed" sizes="152x152" href="assets/images/icons/apple-touch-icon-152x152.png">
    	<link rel="icon" href="assets/images/icons/favicon.png">
        <meta name="msapplication-TileImage" content="assets/images/icons/wp-tile-icon-144x144.png">
        <meta name="msapplication-TileColor" content="#FFFFFF">
    	-->

        <!-- inject:css --><!-- endinject -->

        <!--[if lt IE 9]>-->
        <!--<script src="assets/js/ie-head.min.js"></script>
        <link rel="stylesheet" href="assets/css/ie.min.css">-->
        <!--<![endif]-->
	</head>
	<body>