text:
import os

from celery.schedules import crontab

# from datetime import timedelta

def bool_env(val):
    """Replaces string based environment values with Python booleans"""
    return True if os.environ.get(val, False) == "True" else False

TIMEZONE = os.getenv("TIMEZONE", "US/Central")

#######
# Flask
#
FLASK_SECRET_KEY = os.getenv("FLASK_SECRET_KEY")
FLASK_DEBUG = os.getenv("FLASK_DEBUG", 0)
WTF_CSRF_ENABLED = False
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO")

########
# Celery
#

# default is 4am and 4pm:
BATCH_HOURS = os.getenv("BATCH_HOURS", "4, 16")
CELERY_TIMEZONE = TIMEZONE
CELERY_BROKER_URL = os.getenv("CELERY_BROKER_URL")
CELERY_RESULT_BACKEND = os.getenv("CELERY_RESULT_BACKEND")
CELERY_ALWAYS_EAGER = bool_env("CELERY_ALWAYS_EAGER")
# deprecated:
CELERYBEAT_SCHEDULE = {
    "every-day": {
        "task": "batch.charge_cards",
        "schedule": crontab(minute="0", hour=BATCH_HOURS),
    }
}
REDIS_URL = os.getenv("REDIS_URL")
REDIS_BACKEND_HEALTH_CHECK_INTERVAL = 5

######
# SMTP
#
MAIL_SERVER = os.getenv("MAIL_SERVER", "localhost")
MAIL_USERNAME = os.getenv("MAIL_USERNAME", "user")
MAIL_PASSWORD = os.getenv("MAIL_PASSWORD", "pass")
MAIL_PORT = os.getenv("MAIL_PORT", "2525")
MAIL_USE_TLS = bool_env("MAIL_USE_TLS")
DEFAULT_MAIL_SENDER = os.getenv("DEFAULT_MAIL_SENDER", "me@myplace.org")
MULTIPLE_ACCOUNT_WARNING_MAIL_RECIPIENT = os.getenv(
    "MULTIPLE_ACCOUNT_WARNING_MAIL_RECIPIENT", ""
)
ACCOUNTING_MAIL_RECIPIENT = os.getenv("ACCOUNTING_MAIL_RECIPIENT", "")
BUSINESS_MEMBER_RECIPIENT = os.getenv("BUSINESS_MEMBER_RECIPIENT", "")

########
# Stripe
#
STRIPE_KEYS = {
    "secret_key": os.getenv("SECRET_KEY"),
    "publishable_key": os.getenv("PUBLISHABLE_KEY"),
}
STRIPE_WEBHOOK_SECRET = os.getenv("STRIPE_WEBHOOK_SECRET", "")

#######
# Slack
#
ENABLE_SLACK = bool_env("ENABLE_SLACK")
SLACK_CHANNEL = os.getenv("SLACK_CHANNEL", "#stripe")
SLACK_API_KEY = os.getenv("SLACK_API_KEY")

########
# Sentry
#
ENABLE_SENTRY = bool_env("ENABLE_SENTRY")
SENTRY_DSN = os.getenv("SENTRY_DSN")
SENTRY_ENVIRONMENT = os.getenv("SENTRY_ENVIRONMENT", "unknown")
REPORT_URI = os.getenv("REPORT_URI")

########
# Recaptcha
#
RECAPTCHA_KEYS = {
    "secret_key": os.getenv("RECAPTCHA_SECRET_KEY"),
    "site_key": os.getenv("RECAPTCHA_SITE_KEY"),
}

#######
# Portal
#
ENABLE_PORTAL = bool_env("ENABLE_PORTAL")

########
# Amazon
#
MWS_ACCESS_KEY = os.getenv("MWS_ACCESS_KEY", "")
MWS_SECRET_KEY = os.getenv("MWS_SECRET_KEY", "")
AMAZON_MERCHANT_ID = os.getenv("AMAZON_MERCHANT_ID", "")
AMAZON_SANDBOX = bool_env("AMAZON_SANDBOX")
AMAZON_CAMPAIGN_ID = os.getenv("AMAZON_CAMPAIGN_ID", "")
#######
# Tasks
#
# this is User.username
CIRCLE_FAILURE_RECIPIENT = os.getenv("CIRCLE_FAILURE_RECIPIENT")

CELERYD_LOG_FORMAT = "%(levelname)s %(name)s/%(module)s:%(lineno)d - %(message)s"
CELERYD_TASK_LOG_FORMAT = "%(levelname)s %(name)s/%(module)s:%(lineno)d - %(message)s"

########
# Auth0
#
AUTH0_DOMAIN = os.getenv("AUTH0_DOMAIN", "auth.texastribune.org")
AUTH0_PORTAL_M2M_CLIENT_ID = os.getenv("AUTH0_PORTAL_M2M_CLIENT_ID", None)
AUTH0_PORTAL_M2M_CLIENT_SECRET = os.getenv("AUTH0_PORTAL_M2M_CLIENT_SECRET", None)
AUTH0_PORTAL_AUDIENCE = os.getenv(
    "AUTH0_PORTAL_AUDIENCE", "https://texastribune.org/portal"
)
########
# Bad Actor
#
BAD_ACTOR_API_URL = os.getenv("BAD_ACTOR_API_URL", None)
BAD_ACTOR_NOTIFICATION_URL = os.getenv("BAD_ACTOR_NOTIFICATION_URL", None)


text:
	width: 100px
}

#hspace,#vspace {
	width: 50px
}

#flash_quality,#flash_align,#flash_scale,#flash_salign,#flash_wmode {
	width: 100px
}

#flash_base,#flash_flashvars,#html5_altsource1,#html5_altsource2,#html5_poster
	{
	width: 240px
}

#width,#height {
	width: 40px
}

#src,#media_type {
	width: 250px
}

#class {
	width: 120px
}

#prev {
	margin: 0;
	border: 1px solid black;
	width: 380px;
	height: 260px;
	overflow: auto
}

.panel_wrapper div.current {
	height: 420px;
	overflow: auto
}

#flash_options,#shockwave_options,#qt_options,#wmp_options,#rmp_options
	{
	display: none
}

.mceAddSelectValue {
	background-color: #DDDDDD
}

#qt_starttime,#qt_endtime,#qt_fov,#qt_href,#qt_moveid,#qt_moviename,#qt_node,#qt_pan,#qt_qtsrc,#qt_qtsrcchokespeed,#qt_target,#qt_tilt,#qt_urlsubstituten,#qt_volume
	{
	width: 70px
}

#wmp_balance,#wmp_baseurl,#wmp_captioningid,#wmp_currentmarker,#wmp_currentposition,#wmp_defaultframe,#wmp_playcount,#wmp_rate,#wmp_uimode,#wmp_volume
	{
	width: 70px
}

#rmp_console,#rmp_numloop,#rmp_controls,#rmp_scriptcallbacks {
	width: 70px
}

#shockwave_swvolume,#shockwave_swframe,#shockwave_swurl,#shockwave_swstretchvalign,#shockwave_swstretchhalign,#shockwave_swstretchstyle
	{
	width: 90px
}

#qt_qtsrc {
	width: 200px
}

iframe {
	border: 1px solid gray
}

redpajama_set_name: RedPajamaGithub


text:
from scrapy.loader import ItemLoader
from scrapy.loader.processors import TakeFirst, MapCompose

def make_integer(value):
    """Returns a number in a string format like "10,000" as an integer."""
    return int(value.replace(",", ""))

def make_float(value):
    """Returns a number in a string format as a float."""
    return float(value)

class CandidateLoader(ItemLoader):

    """Input and output processors for the candidates.items.Candidate class."""

    default_output_processor = TakeFirst()
    votes_in = MapCompose(make_integer)
    share_in = MapCompose(make_float)
    swing_in = MapCompose(make_float)


text:
/******************************************************************************
 * @file     distance_functions_f16.h
 * @brief    Public header file for CMSIS DSP Library
 * @version  V1.10.0
 * @date     08 July 2021
 * Target Processor: Cortex-M and Cortex-A cores
 ******************************************************************************/
/*
 * Copyright (c) 2010-2020 Arm Limited or its affiliates. All rights reserved.
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the License); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef _DISTANCE_FUNCTIONS_F16_H_
#define _DISTANCE_FUNCTIONS_F16_H_

#include "arm_math_types_f16.h"
#include "arm_math_memory.h"

#include "dsp/none.h"
#include "dsp/utils.h"

/* 6.14 bug */
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6100100) && (__ARMCC_VERSION < 6150001)
/* Defined in minkowski_f32 */
__attribute__((weak)) float __powisf2(float a, int b);
#endif

#include "dsp/statistics_functions_f16.h"
#include "dsp/basic_math_functions_f16.h"

#include "dsp/fast_math_functions_f16.h"

#ifdef   __cplusplus
extern "C"
{
#endif

#if defined(ARM_FLOAT16_SUPPORTED)

/**
 * @brief        Euclidean distance between two vectors
 * @param[in]    pA         First vector
 * @param[in]    pB         Second vector
 * @param[in]    blockSize  vector length
 * @return distance
 *
 */

float16_t arm_euclidean_distance_f16(const float16_t *pA,const float16_t *pB, uint32_t blockSize);

/**
 * @brief        Bray-Curtis distance between two vectors
 * @param[in]    pA         First vector
 * @param[in]    pB         Second vector
 * @param[in]    blockSize  vector length
 * @return distance
 *
 */
float16_t arm_braycurtis_distance_f16(const float16_t *pA,const float16_t *pB, uint32_t blockSize);

/**
 * @brief        Canberra distance between two vectors
 *
 * This function may divide by zero when samples pA[i] and pB[i] are both zero.
 * The result of the computation will be correct. So the division per zero may be
 * ignored.
 *
 * @param[in]    pA         First vector
 * @param[in]    pB         Second vector
 * @param[in]    blockSize  vector length
 * @return distance
 *
 */
float16_t arm_canberra_distance_f16(const float16_t *pA,const float16_t *pB, uint32_t blockSize);

/**
 * @brief        Chebyshev distance between two vectors
 * @param[in]    pA         First vector
 * @param[in]    pB         Second vector
 * @param[in]    blockSize  vector length
 * @return distance
 *
 */
float16_t arm_chebyshev_distance_f16(const float16_t *pA,const float16_t *pB, uint32_t blockSize);

/**
 * @brief        Cityblock (Manhattan) distance between two vectors
 * @param[in]    pA         First vector
 * @param[in]    pB         Second vector
 * @param[in]    blockSize  vector length
 * @return distance
 *
 */
float16_t arm_cityblock_distance_f16(const float16_t *pA,const float16_t *pB, uint32_t blockSize);

/**
 * @brief        Correlation distance between two vectors
 *
 * The input vectors are modified in place !
 *
 * @param[in]    pA         First vector
 * @param[in]    pB         Second vector
 * @param[in]    blockSize  vector length
 * @return distance
 *
 */
float16_t arm_correlation_distance_f16(float16_t *pA,float16_t *pB, uint32_t blockSize);

/**
 * @brief        Cosine distance between two vectors
 *
 * @param[in]    pA         First vector
 * @param[in]    pB         Second vector
 * @param[in]    blockSize  vector length
 * @return distance
 *
 */

float16_t arm_cosine_distance_f16(const float16_t *pA,const float16_t *pB, uint32_t blockSize);

/**
 * @brief        Jensen-Shannon distance between two vectors
 *
 * This function is assuming that elements of second vector are > 0
 * and 0 only when the corresponding element of first vector is 0.
 * Otherwise the result of the computation does not make sense
 * and for speed reasons, the cases returning NaN or Infinity are not
 * managed.
 *
 * When the function is computing x log (x / y) with x 0 and y 0,
 * it will compute the right value (0) but a division per zero will occur
 * and shoudl be ignored in client code.
 *
 * @param[in]    pA         First vector
 * @param[in]    pB         Second vector
 * @param[in]    blockSize  vector length
 * @return distance
 *
 */

float16_t arm_jensenshannon_distance_f16(const float16_t *pA,const float16_t *pB,uint32_t blockSize);

/**
 * @brief        Minkowski distance between two vectors
 *
 * @param[in]    pA         First vector
 * @param[in]    pB         Second vector
 * @param[in]    n          Norm order (>= 2)
 * @param[in]    blockSize  vector length
 * @return distance
 *
 */

float16_t arm_minkowski_distance_f16(const float16_t *pA,const float16_t *pB, int32_t order, uint32_t blockSize);

#endif /*defined(ARM_FLOAT16_SUPPORTED)*/
#ifdef   __cplusplus
}
#endif

#endif /* ifndef _DISTANCE_FUNCTIONS_F16_H_ */


text:
@interface eLongJModifyCard : NSObject {
	NSMutableDictionary *contents;
	NSMutableDictionary *creditCardDictinoary;
	NSMutableDictionary *creditCardType;
}
-(void)clearBuildData;
-(NSString *)requesString:(BOOL)iscompress;

-(void)setHolderName:(NSString *)string;
-(void)setCreditCardTypeName:(NSString *)string;
-(void)setCreditCardTypeID:(NSString *)string;
-(void)setCreditCardNumber:(NSString *)string;
-(void)setExpireYear:(int)year;
-(void)setExpireMonth:(int)Month;
-(void)setCertificateType:(NSNumber *)type;
-(void)setCertificateNumber:(NSString *)string;
-(void)setVerifyCode:(NSString *)string;
-(NSMutableDictionary *)getCard;
@end


text:
/**
 * @module common
 */
/** End Typedoc Module Declaration */
export * from './entityRegistry';
export * from './decorators';


text:
class Sender:
    def __init__(self, id: int, links: dict, mention_name: str, name: str, version: str):
        self.id = id
        self.links = links
        self.mention_name = mention_name
        self.name = name
        self.version = version

class Room:
    def __init__(self, id: int, is_archived: bool, links: dict, name: str, privacy: str, version: str):
        self.id = id
        self.is_archived = is_archived
        self.links = links
        self.name = name
        self.privacy = privacy
        self.version = version

class Message:
    def __init__(self, date: str, id: str, message: str, type: str, **kwargs):
        self.date = date
        self.id = id
        self.content = message
        self.type = type
        self.sender = Sender(**kwargs['from'])

class Item:
    def __init__(self, message: dict, room: dict):
        self.message = Message(**message)
        self.room = Room(**room)

class Notification:
    def __init__(self, event: str, item: dict, oauth_client_id: str, webhook_id: int):
        self.event = event
        self.item = Item(**item)
        self.oauth_client_id = oauth_client_id
        self.web_hook = webhook_id


text:
<title>Chapter 2 - Hibernate Search in Action</title>

Chapter 2 - Hibernate Search in Action

This chapter is an introduction to Hibernate Search. It describes how to configure it and how to use the most basic APIs

Project structure

src

Contains the example codes. The package model contains the domain model and demonstrate the use of mapping annotations. The package action contains examples of the Hibernate Search API usage. Also contains the configuration files.

Example 2.3: Shows typical configurations mechanism. See /hibernate.cfg.xml and META-INF/persistemce.xml

Example 2.5: Shows a configuration of Hibernate Search without Hibernate Annotations. Event listeners must be registered. See /hibernate-no-annotation.cfg.xml

Example 2.6: describes annotation based mappings. See model/Item.java

Example 2.7: shows how Hibernate Search and hbm.xml files can be used together. See model/Item.hbm.xml

Example 2.8: shows how to access the main Hibernate Search API FullTextSession or FullTextEntityManager. See action/Indexer.java

Example 2.9: shows how to manually index entities.

Example 2.10: string based Lucene query. See action/Searcher#search()

Example 2.11: string based Lucene query using the MultiFieldQueryParser. See action/Searcher#searchMultipleFields()

Example 2.12: Building an Hibernate Search query. See action/Searcher#searchMultipleFields()

Example 2.13: Execute an Hibernate Search query. See action/Searcher#searchMultipleFields()

test

Contains the test framework. Several tests are making sure the examples runs. The test framework uses TestNG.

Dependencies

You can find the libraries necessary to compile and run the tests in ../common/lib


text:
'use strict';

var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

Object.defineProperty(exports, '__esModule', {
  value: true
});

var _I18N = require('./i18n');

var TValueConverter = (function () {
  function TValueConverter(i18n) {
    _classCallCheck(this, TValueConverter);

    this.service = i18n;
  }

  _createClass(TValueConverter, [{
    key: 'toView',
    value: function toView(value, options) {
      return this.service.tr(value, options);
    }
  }], [{
    key: 'inject',
    value: function inject() {
      return [_I18N.I18N];
    }
  }]);

  return TValueConverter;
})();

exports.TValueConverter = TValueConverter;


text:
namespace GooglePlayGames.BasicApi
{
    using System;
    using UnityEngine.SocialPlatforms;

    ///
    /// Defines an abstract interface for a Play Games Client.
    ///
    /// <remarks>Concrete implementations
    /// might be, for example, the client for Android or for iOS. One fundamental concept
    /// that implementors of this class must adhere to is stable authentication state.
    /// This means that once Authenticate() returns true through its callback, the user is
    /// considered to be forever after authenticated while the app is running. The implementation
    /// must make sure that this is the case -- for example, it must try to silently
    /// re-authenticate the user if authentication is lost or wait for the authentication
    /// process to get fixed if it is temporarily in a bad state (such as when the
    /// Activity in Android has just been brought to the foreground and the connection to
    /// the Games services hasn't yet been established). To the user of this
    /// interface, once the user is authenticated, they're forever authenticated.
    /// Unless, of course, there is an unusual permanent failure such as the underlying
    /// service dying, in which it's acceptable that API method calls will fail.
    ///
    /// <para>All methods can be called from the game thread. The user of this interface
    /// DOES NOT NEED to call them from the UI thread of the game. Transferring to the UI
    /// thread when necessary is a responsibility of the implementors of this interface.</para>
    ///
    /// <para>CALLBACKS: all callbacks must be invoked in Unity's main thread.
    /// Implementors of this interface must guarantee that (suggestion: use
    /// <see cref="PlayGamesHelperObject.RunOnGameThread(System.Action)"/>).</para>
    /// </remarks>
    public interface IPlayGamesClient
    {
        event Action OnAuthenticatedProxy;

        ///
        /// Starts the authentication process.
        ///
        /// <remarks>If silent == true, no UIs will be shown
        /// (if UIs are needed, it will fail rather than show them). If silent == false,
        /// this may show UIs, consent dialogs, etc.
        /// At the end of the process, callback will be invoked to notify of the result.
        /// Once the callback returns true, the user is considered to be authenticated
        /// forever after.
        /// </remarks>
        /// <param name="silent">If set to <c>true</c> silent.</param>
        /// <param name="callback">Callback</param>
        void Authenticate(bool silent, Action<SignInStatus> callback);

        ///
        /// Returns whether or not user is authenticated.
        ///
        /// <returns><c>true</c> if the user is authenticated; otherwise, <c>false</c>.</returns>
        bool IsAuthenticated();

        ///
        /// Signs the user out.
        ///
        void SignOut();

        ///
        /// Returns the authenticated user's ID. Note that this value may change if a user signs
        /// on and signs in with a different account.
        ///
        /// <returns>The user's ID, null if the user is not logged in.</returns>
        string GetUserId();

        ///
        /// Loads friends of the authenticated user. This loads the entire list of friends.
        ///
        /// <param name="callback">Callback invoked when complete.  bool argument
        /// indicates success.</param>
        void LoadFriends(Action<bool> callback);

        ///
        /// Returns a human readable name for the user, if they are logged in.
        ///
        /// <returns>The user's human-readable name. null if they are not logged
        /// in</returns>
        string GetUserDisplayName();

        ///
        /// Returns an id token, which can be verified server side, if they are logged in.
        ///
        string GetIdToken();

        ///
        /// The server auth code for this client.
        ///
        /// <remarks>
        /// Note: This function is currently only implemented for Android.
        /// </remarks>
        string GetServerAuthCode();

        ///
        /// Gets another server auth code.
        ///
        /// <remarks>This method should be called after authenticating, and exchanging
        /// the initial server auth code for a token.  This is implemented by signing in
        /// silently, which if successful returns almost immediately and with a new
        /// server auth code.
        /// </remarks>
        /// <param name="reAuthenticateIfNeeded">Calls Authenticate if needed when
        /// retrieving another auth code. </param>
        /// <param name="callback">Callback returning the auth code, or null if there
        /// was a problem.  NOTE: This callback can be called immediately.</param>
        void GetAnotherServerAuthCode(bool reAuthenticateIfNeeded,
            Action<string> callback);

        ///
        /// Gets the user's email.
        ///
        /// <remarks>The email address returned is selected by the user from the accounts present
        /// on the device.  There is no guarantee this uniquely identifies the player.
        /// For unique identification use the id property of the local player.
        /// The user can also choose to not select any email address, meaning it is not
        /// available.
        /// </remarks>
        /// <returns>The user email or null if not authenticated or the permission is
        /// not available.</returns>
        string GetUserEmail();

        ///
        /// Returns the user's avatar url, if they are logged in and have an avatar.
        ///
        /// <returns>The URL to load the avatar image. null if they are not logged
        /// in</returns>
        string GetUserImageUrl();

        /// Gets the player stats.
        /// <param name="callback">Callback for response.</param>
        void GetPlayerStats(Action<CommonStatusCodes, PlayerStats> callback);

        ///
        /// Loads the users specified.  This is mainly used by the leaderboard
        /// APIs to get the information of a high scorer.
        ///
        /// <param name="userIds">User identifiers.</param>
        /// <param name="callback">Callback.</param>
        void LoadUsers(string[] userIds, Action<IUserProfile[]> callback);

        ///
        /// Loads the achievements for the current signed in user and invokes
        /// the callback.
        ///
        void LoadAchievements(Action<Achievement[]> callback);

        ///
        /// Unlocks the achievement with the passed identifier.
        ///
        /// <remarks>If the operation succeeds, the callback
        /// will be invoked on the game thread with true. If the operation fails, the
        /// callback will be invoked with false. This operation will immediately fail if
        /// the user is not authenticated (i.e. the callback will immediately be invoked with
        /// false). If the achievement is already unlocked, this call will
        /// succeed immediately.
        /// </remarks>
        /// <param name="achievementId">The ID of the achievement to unlock.</param>
        /// <param name="successOrFailureCalllback">Callback used to indicate whether the operation
        /// succeeded or failed.</param>
        void UnlockAchievement(string achievementId, Action<bool> successOrFailureCalllback);

        ///
        /// Reveals the achievement with the passed identifier.
        ///
        /// <remarks>If the operation succeeds, the callback
        /// will be invoked on the game thread with true. If the operation fails, the
        /// callback will be invoked with false. This operation will immediately fail if
        /// the user is not authenticated (i.e. the callback will immediately be invoked with
        /// false). If the achievement is already in a revealed state, this call will
        /// succeed immediately.
        /// </remarks>
        /// <param name="achievementId">The ID of the achievement to reveal.</param>
        /// <param name="successOrFailureCalllback">Callback used to indicate whether the operation
        /// succeeded or failed.</param>
        void RevealAchievement(string achievementId, Action<bool> successOrFailureCalllback);

        ///
        /// Increments the achievement with the passed identifier.
        ///
        /// <remarks>If the operation succeeds, the
        /// callback will be invoked on the game thread with true. If the operation fails,
        /// the  callback will be invoked with false. This operation will immediately fail
        /// if the user is not authenticated (i.e. the callback will immediately be invoked with
        /// false).
        /// </remarks>
        /// <param name="achievementId">The ID of the achievement to increment.</param>
        /// <param name="steps">The number of steps to increment by.</param>
        /// <param name="successOrFailureCalllback">Callback used to indicate whether the operation
        /// succeeded or failed.</param>
        void IncrementAchievement(string achievementId, int steps,
            Action<bool> successOrFailureCalllback);

        ///
        /// Set an achievement to have at least the given number of steps completed.
        ///
        /// <remarks>
        /// Calling this method while the achievement already has more steps than
        /// the provided value is a no-op. Once the achievement reaches the
        /// maximum number of steps, the achievement is automatically unlocked,
        /// and any further mutation operations are ignored.
        /// </remarks>
        /// <param name="achId">Ach identifier.</param>
        /// <param name="steps">Steps.</param>
        /// <param name="callback">Callback.</param>
        void SetStepsAtLeast(string achId, int steps, Action<bool> callback);

        ///
        /// Shows the appropriate platform-specific achievements UI.
        /// <param name="callback">The callback to invoke when complete.  If null,
        /// no callback is called. </param>
        ///
        void ShowAchievementsUI(Action<UIStatus> callback);

        ///
        /// Shows the appropriate platform-specific friends sharing UI.
        /// <param name="callback">The callback to invoke when complete. If null,
        /// no callback is called. </param>
        ///
        void AskForLoadFriendsResolution(Action<UIStatus> callback);

        ///
        /// Returns the latest LoadFriendsStatus obtained from loading friends.
        ///
        LoadFriendsStatus GetLastLoadFriendsStatus();

        ///
        /// Shows the Play Games Player Profile UI for a specific user identifier.
        ///
        /// <param name="otherUserId">User Identifier.</param>
        /// <param name="otherPlayerInGameName">
        /// The game's own display name of the player referred to by userId.
        /// </param>
        /// <param name="currentPlayerInGameName">
        /// The game's own display name of the current player.
        /// </param>
        /// <param name="callback">Callback invoked upon completion.</param>
        void ShowCompareProfileWithAlternativeNameHintsUI(
            string otherUserId, string otherPlayerInGameName, string currentPlayerInGameName,
            Action<UIStatus> callback);

        ///
        /// Returns if the user has allowed permission for the game to access the friends list.
        ///
        /// <param name="forceReload">If true, this call will clear any locally cached data and
        /// attempt to fetch the latest data from the server. Normally, this should be set to {@code
        /// false} to gain advantages of data caching.</param> <param name="callback">Callback
        /// invoked upon completion.</param>
        void GetFriendsListVisibility(bool forceReload,
                                      Action<FriendsListVisibilityStatus> callback);

        ///
        /// Loads the first page of the user's friends
        ///
        /// <param name="pageSize">
        /// The number of entries to request for this initial page. Note that if cached
        /// data already exists, the returned buffer may contain more than this size, but it is
        /// guaranteed to contain at least this many if the collection contains enough records.
        /// </param>
        /// <param name="forceReload">
        /// If true, this call will clear any locally cached data and attempt to
        /// fetch the latest data from the server. This would commonly be used for something like a
        /// user-initiated refresh. Normally, this should be set to {@code false} to gain advantages
        /// of data caching.</param>
        /// <param name="callback">Callback invoked upon completion.</param>
        void LoadFriends(int pageSize, bool forceReload, Action<LoadFriendsStatus> callback);

        ///
        /// Loads the friends list page
        ///
        /// <param name="pageSize">
        /// The number of entries to request for this page. Note that if cached data already
        /// exists, the returned buffer may contain more than this size, but it is guaranteed
        /// to contain at least this many if the collection contains enough records.
        /// </param>
        /// <param name="callback"></param>
        void LoadMoreFriends(int pageSize, Action<LoadFriendsStatus> callback);

        ///
        /// Shows the leaderboard UI for a specific leaderboard.
        ///
        /// <remarks>If the passed ID is null, all leaderboards are displayed.
        /// </remarks>
        /// <param name="leaderboardId">The leaderboard to display. null to display
        /// all.</param>
        /// <param name="span">Timespan to display for the leaderboard</param>
        /// <param name="callback">If non-null, the callback to invoke when the
        /// leaderboard is dismissed.
        /// </param>
        void ShowLeaderboardUI(string leaderboardId,
            LeaderboardTimeSpan span,
            Action<UIStatus> callback);

        ///
        /// Loads the score data for the given leaderboard.
        ///
        /// <param name="leaderboardId">Leaderboard identifier.</param>
        /// <param name="start">Start indicating the top scores or player centric</param>
        /// <param name="rowCount">max number of scores to return. non-positive indicates
        /// no rows should be returned.  This causes only the summary info to
        /// be loaded. This can be limited
        /// by the SDK.</param>
        /// <param name="collection">leaderboard collection: public or social</param>
        /// <param name="timeSpan">leaderboard timespan</param>
        /// <param name="callback">callback with the scores, and a page token.
        ///   The token can be used to load next/prev pages.</param>
        void LoadScores(string leaderboardId, LeaderboardStart start,
            int rowCount, LeaderboardCollection collection,
            LeaderboardTimeSpan timeSpan,
            Action<LeaderboardScoreData> callback);

        ///
        /// Loads the more scores for the leaderboard.
        ///
        /// <remarks>The token is accessed
        /// by calling LoadScores() with a positive row count.
        /// </remarks>
        /// <param name="token">Token for tracking the score loading.</param>
        /// <param name="rowCount">max number of scores to return.
        ///    This can be limited by the SDK.</param>
        /// <param name="callback">Callback.</param>
        void LoadMoreScores(ScorePageToken token, int rowCount,
            Action<LeaderboardScoreData> callback);

        ///
        /// Returns the max number of scores returned per call.
        ///
        /// <returns>The max results.</returns>
        int LeaderboardMaxResults();

        ///
        /// Submits the passed score to the passed leaderboard.
        ///
        /// <remarks>This operation will immediately fail
        /// if the user is not authenticated (i.e. the callback will immediately be invoked with
        /// false).
        /// </remarks>
        /// <param name="leaderboardId">Leaderboard identifier.</param>
        /// <param name="score">Score.</param>
        /// <param name="successOrFailureCalllback">Callback used to indicate whether the operation
        /// succeeded or failed.</param>
        void SubmitScore(string leaderboardId, long score,
            Action<bool> successOrFailureCalllback);

        ///
        /// Submits the score for the currently signed-in player.
        ///
        /// <param name="score">Score.</param>
        /// <param name="leaderboardId">leaderboard id.</param>
        /// <param name="metadata">metadata about the score.</param>
        /// <param name="successOrFailureCalllback">Callback upon completion.</param>
        void SubmitScore(string leaderboardId, long score, string metadata,
            Action<bool> successOrFailureCalllback);

        ///
        /// Asks user to give permissions for the given scopes.
        ///
        /// <param name="scopes">list of scopes to ask permission for</param>
        /// <param name="callback">Callback used to indicate the outcome of the operation.</param>
        void RequestPermissions(string[] scopes, Action<SignInStatus> callback);

        ///
        /// Returns whether or not user has given permissions for given scopes
        ///
        /// <seealso cref="GooglePlayGames.BasicApi.IPlayGamesClient.HasPermissions"/>
        /// <param name="scopes">list of scopes</param>
        /// <returns><c>true</c>, if given, <c>false</c> otherwise.</returns>
        bool HasPermissions(string[] scopes);

        ///
        /// Gets the saved game client.
        ///
        /// <returns>The saved game client.</returns>
        SavedGame.ISavedGameClient GetSavedGameClient();

        ///
        /// Gets the events client.
        ///
        /// <returns>The events client.</returns>
        Events.IEventsClient GetEventsClient();

        ///
        /// Gets the video client.
        ///
        /// <returns>The video client.</returns>
        Video.IVideoClient GetVideoClient();

        IUserProfile[] GetFriends();

        ///
        /// Sets the gravity for popups (Android only).
        ///
        /// <remarks>This can only be called after authentication.  It affects
        /// popups for achievements and other game services elements.</remarks>
        /// <param name="gravity">Gravity for the popup.</param>
        void SetGravityForPopups(Gravity gravity);
    }
}
#endif


text:
package v1beta1

import (
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/kubernetes/pkg/api/v1"
)

// GroupName is the group name use in this package
const GroupName = "extensions"

// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}

// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
	return SchemeGroupVersion.WithResource(resource).GroupResource()
}

var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs, addConversionFuncs)
	AddToScheme   = SchemeBuilder.AddToScheme
)

// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
	scheme.AddKnownTypes(SchemeGroupVersion,
		&Deployment{},
		&DeploymentList{},
		&DeploymentRollback{},
		&HorizontalPodAutoscaler{},
		&HorizontalPodAutoscalerList{},
		&ReplicationControllerDummy{},
		&Scale{},
		&ThirdPartyResource{},
		&ThirdPartyResourceList{},
		&DaemonSetList{},
		&DaemonSet{},
		&ThirdPartyResourceData{},
		&ThirdPartyResourceDataList{},
		&Ingress{},
		&IngressList{},
		&v1.ListOptions{},
		&v1.DeleteOptions{},
		&metav1.ExportOptions{},
		&metav1.GetOptions{},
		&ReplicaSet{},
		&ReplicaSetList{},
		&PodSecurityPolicy{},
		&PodSecurityPolicyList{},
		&NetworkPolicy{},
		&NetworkPolicyList{},
	)
	// Add the watch version that applies
	metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
	return nil
}


text:
package backtype.storm.metric.api;

import backtype.storm.metric.api.IReducer;

class MeanReducerState {
	public int count = 0;
	public double sum = 0.0;
}

public class MeanReducer implements IReducer<MeanReducerState> {
	public MeanReducerState init() {
		return new MeanReducerState();
	}

	public MeanReducerState reduce(MeanReducerState acc, Object input) {
		acc.count++;
		if (input instanceof Double) {
			acc.sum += (Double) input;
		} else if (input instanceof Long) {
			acc.sum += ((Long) input).doubleValue();
		} else if (input instanceof Integer) {
			acc.sum += ((Integer) input).doubleValue();
		} else {
			throw new RuntimeException(
					"MeanReducer::reduce called with unsupported input type `"
							+ input.getClass()
							+ "`. Supported types are Double, Long, Integer.");
		}
		return acc;
	}

	public Object extractResult(MeanReducerState acc) {
		if (acc.count > 0) {
			return new Double(acc.sum / (double) acc.count);
		} else {
			return null;
		}
	}
}


text:
This package is for markdown parsing and rendering. It is based on the [marked][] project
which focuses on speed.

[marked]: https://github.com/chjj/marked

## Basic Usage

```elm
content : Element
content = Markdown.toElement """

# Apple Pie Recipe

  1. Invent the universe.
  2. Bake an apple pie.

"""
```

**Warning:** Calling the `Markdown.toElement` function actually parses the
whole block, so try not to call it for no reason. In the `content` example
above we only have to parse the text once, but if we put it in a function we
may be doing a lot of unnecessary parsing.

## Code Blocks

For highlighting any code blocks, the package relies on the
[highlight.js](https://highlightjs.org/) project. So if you want to
see highlighting of code blocks in the rendering result, you need to
make sure that your page/app binds a version of that library
(supporting the languages you want to handle) to `window.hljs` in
Javascript. [This is how package.elm-lang.org does
that.](https://github.com/elm-lang/package.elm-lang.org/blob/e0b7aa4282038475612722ff7a57195866f8645b/backend/ServeFile.hs#L54)


text:
require 'json'

file_first = File.read(ARGV[0].to_s)
file_second = File.read(ARGV[1].to_s)

puts JSON.parse(file_first) == JSON.parse(file_second) ? 1 : 0


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

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Roslyn.Utilities;

namespace Microsoft.VisualStudio.LanguageServices.Implementation.TableDataSource
{
    internal class TableItem<T>
    {
        private readonly Func<T, int> _keyGenerator;

        private int? _deduplicationKey;
        private SharedInfoCache _cache;

        public readonly T Primary;

        public TableItem(T item, Func<T, int> keyGenerator)
        {
            _deduplicationKey = null;
            _keyGenerator = keyGenerator;

            _cache = null;
            Primary = item;
        }

        public TableItem(IEnumerable<TableItem<T>> items)
        {
#if DEBUG
            // If code reached here,
            // There must be at least 1 item in the list
            Contract.ThrowIfFalse(items.Count() > 0);

            // There must be document id
            Contract.ThrowIfTrue(items.Any(i => i.PrimaryDocumentId == null));
#endif

            var first = true;
            var collectionHash = 1;
            var count = 0;

            // Make things to be deterministic.
            var ordereditems = items.OrderBy(i => i.PrimaryDocumentId.Id);
            foreach (var item in ordereditems)
            {
                count++;

                if (first)
                {
                    Primary = item.Primary;

                    _deduplicationKey = item.DeduplicationKey;
                    _keyGenerator = null;

                    first = false;
                }

                collectionHash = Hash.Combine(item.PrimaryDocumentId.Id.GetHashCode(), collectionHash);
            }

            if (count == 1)
            {
                _cache = null;
                return;
            }

            // order of item is important. make sure we maintain it.
            _cache = SharedInfoCache.GetOrAdd(collectionHash, ordereditems, c => new SharedInfoCache(c.Select(i => i.PrimaryDocumentId).ToImmutableArray()));
        }

        public DocumentId PrimaryDocumentId
        {
            get
            {
                return Extensions.GetDocumentId(Primary);
            }
        }

        private Workspace Workspace
        {
            get
            {
                return Extensions.GetWorkspace(Primary);
            }
        }

        public string ProjectName
        {
            get
            {
                if (_cache == null)
                {
                    // return single project name
                    return Workspace.GetProjectName(PrimaryDocumentId.ProjectId);
                }

                // return joined project names
                return _cache.GetProjectName(Workspace);
            }
        }

        public string[] ProjectNames
        {
            get
            {
                if (_cache == null)
                {
                    // if this is not aggregated element, there is no projectnames.
                    return Array.Empty<string>();
                }

                return _cache.GetProjectNames(Workspace);
            }
        }

        public Guid ProjectGuid
        {
            get
            {
                if (_cache == null)
                {
                    return Workspace.GetProjectGuid(PrimaryDocumentId.ProjectId);
                }

                // if this is aggregated element, there is no projectguid
                return Guid.Empty;
            }
        }

        public Guid[] ProjectGuids
        {
            get
            {
                if (_cache == null)
                {
                    // if it is not aggregated element, there is no projectguids
                    return Array.Empty<Guid>();
                }

                return _cache.GetProjectGuids(Workspace);
            }
        }

        public int DeduplicationKey
        {
            get
            {
                if (_deduplicationKey == null)
                {
                    _deduplicationKey = _keyGenerator(Primary);
                }

                return _deduplicationKey.Value;
            }
        }
    }
}


text:
class AppDistributionProvider;
class BrandedImageProvider;
class OmahaServiceProvider;
class SpotlightProvider;
class UserFeedbackProvider;
class VoiceSearchProvider;

namespace web {
class WebState;
}

@protocol AppRatingPrompt;
@protocol LogoVendor;
@protocol TextFieldStyling;
@protocol NativeAppWhitelistManager;
@class Tab;
@class TabModel;
@class UITextField;
@class UIView;
@protocol UrlLoader;

namespace ios {

class ChromeBrowserProvider;
class ChromeBrowserState;
class ChromeIdentityService;
class GeolocationUpdaterProvider;
class SigninErrorProvider;
class SigninResourcesProvider;

// Setter and getter for the provider. The provider should be set early, before
// any browser code is called.
void SetChromeBrowserProvider(ChromeBrowserProvider* provider);
ChromeBrowserProvider* GetChromeBrowserProvider();

// Factory function for the embedder specific provider. This function must be
// implemented by the embedder and will be selected via linking (i.e. by the
// build system). Should only be used in the application startup code, not by
// the tests (as they may use a different provider).
std::unique_ptr<ChromeBrowserProvider> CreateChromeBrowserProvider();

// A class that allows embedding iOS-specific functionality in the
// ios_chrome_browser target.
class ChromeBrowserProvider {
 public:
  // The constructor is called before web startup.
  ChromeBrowserProvider();
  virtual ~ChromeBrowserProvider();

  // This is called after web startup.
  virtual void Initialize() const;

  // Returns an instance of a signing error provider.
  virtual SigninErrorProvider* GetSigninErrorProvider();
  // Returns an instance of a signin resources provider.
  virtual SigninResourcesProvider* GetSigninResourcesProvider();
  // Sets the current instance of Chrome identity service. Used for testing.
  virtual void SetChromeIdentityServiceForTesting(
      std::unique_ptr<ChromeIdentityService> service);
  // Returns an instance of a Chrome identity service.
  virtual ChromeIdentityService* GetChromeIdentityService();
  // Returns an instance of a GeolocationUpdaterProvider.
  virtual GeolocationUpdaterProvider* GetGeolocationUpdaterProvider();
  // Returns risk data used in Wallet requests.
  virtual std::string GetRiskData();
  // Creates and returns a new styled text field with the given |frame|.
  virtual UITextField<TextFieldStyling>* CreateStyledTextField(
      CGRect frame) const NS_RETURNS_RETAINED;
  // Creates and returns an app ratings prompt object.  Can return nil if app
  // ratings prompts are not supported by the provider.
  virtual id<AppRatingPrompt> CreateAppRatingPrompt() const NS_RETURNS_RETAINED;

  // Initializes the cast service.  Should be called soon after the given
  // |main_tab_model| is created.
  virtual void InitializeCastService(TabModel* main_tab_model) const;

  // Attaches any embedder-specific tab helpers to the given |web_state|.  The
  // owning |tab| is included for helpers that need access to information that
  // is not yet available through web::WebState.
  virtual void AttachTabHelpers(web::WebState* web_state, Tab* tab) const;

  // Returns an instance of the voice search provider, if one exists.
  virtual VoiceSearchProvider* GetVoiceSearchProvider() const;

  // Returns an instance of the app distribution provider.
  virtual AppDistributionProvider* GetAppDistributionProvider() const;

  // Creates and returns an object that can fetch and vend search engine logos.
  // The caller assumes ownership of the returned object.
  virtual id<LogoVendor> CreateLogoVendor(
      ios::ChromeBrowserState* browser_state,
      id<UrlLoader> loader) const NS_RETURNS_RETAINED;

  // Returns an instance of the omaha service provider.
  virtual OmahaServiceProvider* GetOmahaServiceProvider() const;

  // Returns an instance of the user feedback provider.
  virtual UserFeedbackProvider* GetUserFeedbackProvider() const;

  // Returns an instance of the branded image provider.
  virtual BrandedImageProvider* GetBrandedImageProvider() const;

  // Returns the NativeAppWhitelistManager implementation.
  virtual id<NativeAppWhitelistManager> GetNativeAppWhitelistManager() const;

  // Hides immediately the modals related to this provider.
  virtual void HideModalViewStack() const;

  // Logs if any modals created by this provider are still presented. It does
  // not dismiss them.
  virtual void LogIfModalViewsArePresented() const;

  // Returns an instance of the spotlight provider.
  virtual SpotlightProvider* GetSpotlightProvider() const;
};

}  // namespace ios

#endif  // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_CHROME_BROWSER_PROVIDER_H_


text:
@interface ZWEdgeInsetsLabel : UILabel

@property(nonatomic, assign) UIEdgeInsets edgeInsets;

@end


text:
Bridge.merge(new System.Globalization.CultureInfo("om", true), {
    englishName: "Oromo",
    nativeName: "Oromoo",

    numberFormat: Bridge.merge(new System.Globalization.NumberFormatInfo(), {
        nanSymbol: "NaN",
        negativeSign: "-",
        positiveSign: "+",
        negativeInfinitySymbol: "-∞",
        positiveInfinitySymbol: "∞",
        percentSymbol: "%",
        percentGroupSizes: [3],
        percentDecimalDigits: 2,
        percentDecimalSeparator: ".",
        percentGroupSeparator: ",",
        percentPositivePattern: 1,
        percentNegativePattern: 1,
        currencySymbol: "Br",
        currencyGroupSizes: [3],
        currencyDecimalDigits: 2,
        currencyDecimalSeparator: ".",
        currencyGroupSeparator: ",",
        currencyNegativePattern: 1,
        currencyPositivePattern: 0,
        numberGroupSizes: [3],
        numberDecimalDigits: 2,
        numberDecimalSeparator: ".",
        numberGroupSeparator: ",",
        numberNegativePattern: 1
    }),

    dateTimeFormat: Bridge.merge(new System.Globalization.DateTimeFormatInfo(), {
        abbreviatedDayNames: ["Dil","Wix","Qib","Rob","Kam","Jim","San"],
        abbreviatedMonthGenitiveNames: ["Ama","Gur","Bit","Elb","Cam","Wax","Ado","Hag","Ful","Onk","Sad","Mud",""],
        abbreviatedMonthNames: ["Ama","Gur","Bit","Elb","Cam","Wax","Ado","Hag","Ful","Onk","Sad","Mud",""],
        amDesignator: "WD",
        dateSeparator: "/",
        dayNames: ["Dilbata","Wiixata","Qibxata","Roobii","Kamiisa","Jimaata","Sanbata"],
        firstDayOfWeek: 0,
        fullDateTimePattern: "dddd, MMMM d, yyyy h:mm:ss tt",
        longDatePattern: "dddd, MMMM d, yyyy",
        longTimePattern: "h:mm:ss tt",
        monthDayPattern: "MMMM d",
        monthGenitiveNames: ["Amajjii","Guraandhala","Bitooteessa","Elba","Caamsa","Waxabajjii","Adooleessa","Hagayya","Fuulbana","Onkololeessa","Sadaasa","Muddee",""],
        monthNames: ["Amajjii","Guraandhala","Bitooteessa","Elba","Caamsa","Waxabajjii","Adooleessa","Hagayya","Fuulbana","Onkololeessa","Sadaasa","Muddee",""],
        pmDesignator: "WB",
        rfc1123: "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",
        shortDatePattern: "dd/MM/yyyy",
        shortestDayNames: ["Dil","Wix","Qib","Rob","Kam","Jim","San"],
        shortTimePattern: "h:mm tt",
        sortableDateTimePattern: "yyyy'-'MM'-'dd'T'HH':'mm':'ss",
        sortableDateTimePattern1: "yyyy'-'MM'-'dd",
        timeSeparator: ":",
        universalSortableDateTimePattern: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
        yearMonthPattern: "MMMM yyyy",
        roundtripFormat: "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffzzz"
    }),

    TextInfo: Bridge.merge(new System.Globalization.TextInfo(), {
        ANSICodePage: 0,
        CultureName: "om-ET",
        EBCDICCodePage: 500,
        IsRightToLeft: false,
        LCID: 1138,
        listSeparator: ";",
        MacCodePage: 2,
        OEMCodePage: 1,
        IsReadOnly: true
    })
});


text:
<?php
/**
* Initial class for mondira
*
* @since version 1.0
* @last modified 28 Feb, 2015
* @author Jewel Ahmed<tojibon@gmail.com>
* @author url http://www.codeatomic.com
*/
if(!class_exists('Mondira')){
    class Mondira {
	    public $theme_config = array();

	    function init($options) {

		    $this->constants($options);

		    $this->setup();

		    $this->loadCore();

		    $this->functions();

            $this->admin();
	    }

        function constants($options) {
            //Checking if the theme is for settings available if not then set it as false by default
            if(empty($options['settings_available'])){
                $options['settings_available'] = false;
            }

            //Checking if the theme is for documentation available if not then set it as false by default
            if(empty($options['documentation_available'])){
                $options['documentation_available'] = false;
            }
            $this->theme_config = $options;

            define('THEME_NAME', $options['theme_name']);
            define('THEME_SLUG', $options['theme_slug']);
            define('THEME_DIR', get_template_directory());
            define('THEME_URI', get_template_directory_uri());
            define('THEME_FRAMEWORK', THEME_DIR . '/functions/core');
            define('THEME_FRAMEWORK_URI', THEME_URI . '/functions/core');

            require_once( THEME_FRAMEWORK . '/constants.php' );
        }

        function setup(){
            add_action('after_setup_theme', array(&$this, 'mondira_add_theme_supports'));
        }

	    function loadCore(){
            require_once( FRAMEWORK_ADMIN_GENERAL_CORE . '/MondiraThemeHelper.php' );
            require_once( FRAMEWORK_ADMIN_HELPERS . '/MondiraThemeHtmlHelper.php' );
            require_once( FRAMEWORK_ADMIN_HELPERS . '/MondiraThemeMetabox.php' );
        }

	    function mondira_add_theme_supports() {
		    if (function_exists('add_theme_support')) {
                if(!empty($_REQUEST['post'])){
                    $mondira_post_type = get_post_type($_REQUEST['post']);
                    if (!empty($mondira_post_type)){
                        add_theme_support('post-thumbnails', array('post', 'page', $mondira_post_type));
                    } else {
                        add_theme_support('post-thumbnails', array('post', 'page'));
                    }
                } else if(!empty($_REQUEST['post_type'])) {
                    $mondira_post_type = $_REQUEST['post_type'];
                    add_theme_support('post-thumbnails', array('post', 'page', $mondira_post_type));
                } else {
                    add_theme_support('post-thumbnails', array('post', 'page'));
                }

                $post_formats = array( 'aside', 'audio', 'gallery', 'image', 'link', 'quote', 'video' );
                if ( !empty( $_REQUEST['post'] ) ) {
                    $post_type = get_post_type($_REQUEST['post']);
                    $post_formats = apply_filters( 'mondira_post_formats_'.$post_type, $post_formats );
                } else if ( !empty( $_REQUEST['post_type'] ) ) {
                    $post_type = $_REQUEST['post_type'];
                    $post_formats = apply_filters( 'mondira_post_formats_'.$post_type, $post_formats );
                }
				add_theme_support( 'post-formats', $post_formats );

                add_theme_support('menus');
                add_theme_support('automatic-feed-links');
		    }
	    }

	    function functions() {
            if(file_exists(FRAMEWORK_GENERAL_FUNCTIONS . '/general.php')) {
                require_once( FRAMEWORK_GENERAL_FUNCTIONS . '/general.php' );
            }
            if(file_exists(FRAMEWORK_GENERAL_FUNCTIONS . '/templates.php')){
                require_once( FRAMEWORK_GENERAL_FUNCTIONS . '/templates.php' );
            }
            if(file_exists(FRAMEWORK_GENERAL_FUNCTIONS . '/pagination.php')){
                require_once( FRAMEWORK_GENERAL_FUNCTIONS . '/pagination.php' );
            }
            if(file_exists(FRAMEWORK_GENERAL_FUNCTIONS . '/aqua-resizer.php')){
                require_once( FRAMEWORK_GENERAL_FUNCTIONS . '/aqua-resizer.php' );
            }
            if(file_exists(FRAMEWORK_GENERAL_FUNCTIONS . '/aqua-resizer-ratio-check.php')) {
                require_once( FRAMEWORK_GENERAL_FUNCTIONS . '/aqua-resizer-ratio-check.php' );
            }
            if(file_exists(FRAMEWORK_GENERAL_FUNCTIONS . '/framework-support.php')) {
                require_once( FRAMEWORK_GENERAL_FUNCTIONS . '/framework-support.php' );
            }
            $this->options();
	    }

	    function options() {
		    global $mondira_options, $mondira_theme_settings;
            $mondira_options = array();
			if(file_exists(THEME_OPTIONS . '/mondira-settings.php')){
                $page = include_once(THEME_OPTIONS . '/mondira-settings.php');
                $page = $mondira_theme_settings;
                if(!empty($page) && is_array($page) && !empty($page['list']) && is_array($page['list'])){
                    foreach($page['list'] as $option) {
                        $opt_array = (array) get_option(THEME_SLUG . '_' . $option['section']);
                        if(!empty($mondira_options[$option['section']]))
                        $opt_index_array = (array) $mondira_options[$option['section']];
                        else
                        $opt_index_array = array();
                        $mondira_options[$option['section']] = array_merge($opt_index_array, $opt_array);
                    }
                }
            }
	    }

        function admin() {
		    if (is_admin()) {
                if(file_exists(FRAMEWORK_ADMIN . '/mondira_admin.php')){
                    include_once( FRAMEWORK_ADMIN . '/mondira_admin.php' );
			        $admin = new Mondira_admin();
			        $admin->init( $this->theme_config['theme_name'], $this->theme_config['theme_slug'], $this->theme_config, $this->theme_config['settings_available'], $this->theme_config['documentation_available'] );
                }
		    }
	    }
    }
}


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

package com.google.devtools.build.lib.skylarkbuildapi.platform;

import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.skylarkbuildapi.StructApi;
import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;

/**
 * Info object representing a value for a constraint setting that can be used to define a platform.
 */
@SkylarkModule(
    name = "ConstraintValueInfo",
    doc =
        "A value for a constraint setting that can be used to define a platform. "
            + PlatformInfoApi.EXPERIMENTAL_WARNING,
    category = SkylarkModuleCategory.PROVIDER)
public interface ConstraintValueInfoApi extends StructApi {

  @SkylarkCallable(
      name = "constraint",
      doc =
          "The ConstraintSettingInfo this value can be "
              + "applied to.",
      structField = true,
      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_PLATFORM_API)
  ConstraintSettingInfoApi constraint();

  @SkylarkCallable(
      name = "label",
      doc = "The label of the target that created this constraint value.",
      structField = true,
      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_PLATFORM_API)
  Label label();
}


text:
<component name="ProjectDictionaryState">
  <dictionary name="ogi" />
</component>


text:
	<title>Geraldine Doogue's panel show appearances</title>

	<link rel="stylesheet" media="all" href="../style.css" type="text/css"/>

Geraldine Doogue's panel show appearances

Geraldine Doogue (born 1952-04-29[ref]) has appeared in 5 episodes between 2017-2018.  Geraldine Doogue on Wikipedia.

2017

2018

2018-07-26 / The Drum

2018-03-22 / The Drum

2017-11-06 / The Drum

2017-09-25 / The Drum

2017-08-25 / The Drum


text:
package mil.nga.mapcache.io.network;

import java.util.Map;

/**
 * Stores cookies for specific servers.
 */
public interface CookieJar {

    /**
     * Stores the cookies for the specified host.
     *
     * @param host    The host to store cookies for.
     * @param cookies The cookies to store.
     */
    public void storeCookies(String host, Map<String, String> cookies);

    /**
     * Gets the cookies for the specified host.
     *
     * @param host The host to get the cookies for.
     * @return The cookies for the host, or null if there aren't any.
     */
    public Map<String, String> getCookies(String host);
}


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

// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const {SpecReporter} = require('jasmine-spec-reporter');

/**
 * Schema can be found here: https://github.com/angular/protractor/blob/master/docs/referenceConf.js
 * @return {!Object}
 */
function createConfig() {
  const config = {
    allScriptsTimeout: 10000,
    specs: ['../src/test/e2e/**/*.e2e-spec.ts'],
    baseUrl: 'http://localhost:8080/',
    framework: 'jasmine',
    jasmineNodeOpts: {showColors: true, defaultTimeoutInterval: 30000, print: function() {}},
    onPrepare() {
      require('ts-node').register({project: 'aio/tsconfig.e2e.json'});
      jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}}));
    }
  };

  // Use custom browser configuration when running on Travis CI and master/tag is being build.
  if (!!process.env.TRAVIS && !process.env.TRAVIS_PULL_REQUEST) {
    let name = `Integration tests ${process.env.TRAVIS_REPO_SLUG}, build ` +
        `${process.env.TRAVIS_BUILD_NUMBER}, job ${process.env.TRAVIS_JOB_NUMBER}`;
    if (process.env.TRAVIS_PULL_REQUEST !== 'false') {
      name += `, PR: https://github.com/${process.env.TRAVIS_REPO_SLUG}/pull/` +
          `${process.env.TRAVIS_PULL_REQUEST}, job ${process.env.TRAVIS_JOB_NUMBER}`;
    }

    config.sauceUser = process.env.SAUCE_USERNAME;
    config.sauceKey = process.env.SAUCE_ACCESS_KEY;
    config.capabilities =  {
      'browserName': 'chrome',
      'chromeOptions': {'args': ['--headless', '--disable-gpu', '--window-size=800,600']},
      'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
      'name': name,
    };

    // Limit concurrency to not exhaust saucelabs resources for the CI user.
    config.maxSessions = 1;

  } else {
    config.capabilities = {
      'browserName': 'chrome',
      'chromeOptions': {'args': ['--headless', '--disable-gpu', '--no-sandbox', '--window-size=800,600']},
    };
  }

  return config;
}

/**
 * Exported protractor config required by the framework.
 */
exports.config = createConfig();


text:
mvn install:install-file -Dfile=ojdbc7.jar  -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0.1 -Dpackaging=jar

mvn install:install-file -Dfile=jodconverter-2.2.2.jar  -DgroupId=com.artofsolving -DartifactId=jodconverter-2.2.2 -Dversion=2.2.2 -Dpackaging=jar

1) Library: jodconverter-2.2.2.jar
You can find it in the project dir: lib/jodconverter-2.2.2.jar
The jar has to be copied to the local maven repository ..\.m2\repository\com\artofsolving\jodconverter\2.2.2\

2) Library: ojdbc7-12.1.0.1.jar
You can find it in the project dir: lib/ojdbc7-12.1.0.1.jar
The jar has to be copied to the local maven repository ..\.m2\repository\com\oracle\ojdbc7\12.1.0.1\ojdbc7-12.1.0.1.jar

3) OpenOfficePortable must be located there: C:\\OpenOfficePortable\\App\\openoffice\\program\\
You are allowed to install OpenOffice where you want. But remember to modify command
(property: "open.office.run.headless.mode.command") to run soffice.exe
in the project dir: src/main/resources/application.properties file.

4) The pom.xml file uses profiles configured in settings.xml that is located in .m2 folder.
```xml
<profiles>
    <profile>
        <id>visoft.prod</id>
        <properties>
            <db.url>url</db.url>
            <db.username>username</db.username>
            <db.password>password</db.password>
            <google.drive.default.folder.id>folder_id</google.drive.default.folder.id>
            <google.drive.service.account.user>service_account_user</google.drive.service.account.user>
            <google.api.client.id>client_id</google.api.client.id>
            <google.api.secret>secret</google.api.secret>
            <google.api.callback.uri>http://localhost:8050/visoftsystem/googleAuth/OAuth2v1/</google.api.callback.uri>
        </properties>
    </profile>
    <profile>
        <id>visoft.dev</id>
        <properties>
                <db.url>url</db.url>
                <db.username>username</db.username>
                <db.password>password</db.password>
                <google.drive.default.folder.id>folder_id</google.drive.default.folder.id>
                <google.drive.service.account.user>service_account_user</google.drive.service.account.user>
                <google.api.client.id>client_id</google.api.client.id>
                <google.api.secret>secret</google.api.secret>
                <google.api.callback.uri>http://localhost:8050/googleAuth/OAuth2v1/</google.api.callback.uri>
            </properties>
    </profile>
</profiles>
```

## Information
The spring boot application is configured to the port 8050 (src/main/resources/application.properties)

#### Production mode
Build project with maven and deploy war archive to Tomcat server (C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps).

#### Development mode
Run spring-boot:run maven plugin.

#### Available endpoints
http://localhost:8050/                  (GET)  -- to check is the application running.

    Example: http://localhost:8050/

http://localhost:8050/convertBlobToPdf  (POST) -- gets blob (EXCEL file) converts it to the PDF and returns attachement.

    Example: http://localhost:8050/convertBlobToPdf
        params: file=Excel.xlsx (attachement)
                mimeType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
                filePath=C:\\Temp\\Excel.xlsx

http://localhost:8050/convertExcelToPdf (POST) -- gets fileName, mimeType, filePath, converts it to the PDF and saves PDF.

    Example: http://localhost:8050/convertExcelToPdf
        params: fileName=Excel.xlsx
                mimeType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
                filePath=C:\\Temp\\Excel.xlsx

    The PDF file will be saved there C:\\Temp\\Excel.pdf

http://localhost:8050/convertExcelToPdf (POST) -- gets JSON with needed data to convert Excel to PDF and saves PDF.

    Example: http://localhost:8050/convertExcelToPdf
        {"fileName":"excel.xlsx", "mimeType":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","filePath":"C:\\FILES_DIR\\"}

    The PDF file will be saved there C:\\Temp\\Excel.pdf

http://localhost:8050/processExcel/changeFile/fitToOnePage (POST) -- gets JSON, modifies excel file.

    Example: http://localhost:8050/processExcelFitToOnePage
            {"fileName":"excel.xlsx", "mimeType":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","filePath":"C:\\FILES_DIR\\"}

    The modified file will be saved there C:\\FILES_DIR\\excel.xlsx

http://localhost:8050/processExcel/changeFile/addLogo (POST) -- gets JSON, modifies excel file by adding image in the cell.

    Example: http://localhost:8050/processExcelAddLogo
         body: {"excelFilePath":"C:\\FILES_DIR\\excel.xlsx","logoPath":"C:\\LOGO3EXCEL\\logo.png","logoRow":"1","logoCell":"8","logoRow2":"2","logoCell2":"9"}';

    The modified file will be saved there C:\\FILES_DIR\\excel.xlsx
    It will insert logo image in the whole excel cell (I2).

http://localhost:8050/processExcel/changeFile/changeDirectionRightToLeft (POST) -- gets JSON, modifies excel file by changing view direction right to left.

    Example: http://localhost:8050/processExcelChangeDirectionRightToLeft
            {"fileName":"excel.xlsx", "mimeType":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","filePath":"C:\\FILES_DIR\\"}

    The modified file will be saved there C:\\FILES_DIR\\excel.xlsx

http://localhost:8050/processExcel/uploadFile/fitToOnePage (POST) -- gets JSON and binary file, modifies excel file by fitting data to one page.

    Example: http://localhost:8050/processExcel/uploadFile/fitToOnePage
            {"fileName":"excel.xlsx", "mimeType":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","filePath":""}
            binary file: BLOB
    The app returns a modified file in a http response.

http://localhost:8050/processExcel/uploadFile/addLogo (POST) -- gets JSON and binary file, modifies excel file by adding image in the cell.

    Example: http://localhost:8050/processExcel/uploadFile/addLogo
         {"excelFilePath":"C:\\FILES_DIR\\excel.xlsx","logoPath":"C:\\LOGO3EXCEL\\logo.png","logoRow":"1","logoCell":"8","logoRow2":"2","logoCell2":"9"}';
            binary file: BLOB
    The app returns a modified file in a http response.

http://localhost:8050/processExcel/uploadFile/changeDirectionRightToLeft (POST) -- gets JSON and binary file, modifies excel file by changing view direction right to left.

    Example: http://localhost:8050/processExcel/uploadFile/changeDirectionRightToLeft
            {"fileName":"excel.xlsx", "mimeType":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","filePath":""}
            binary file: BLOB
    The app returns a modified file in a http response.

### Google API

To work with Google API is necessary to have prepared settings in Google APIs console.
The visoftsystem web application uses OAuth2 authentication and requires getting following properties:
   - google.drive.default.folder.id - internal google folder id
   - google.drive.service.account.user - google service account
   - google.api.client.id -  OAuth 2.0 client id
   - google.api.secret - OAuth 2.0 secret
   - google.api.callback.uri - call back url (do not change this property)

#### How to configure visoftsystem web application Google API to use particular Google Account and work with its Drive

1) Open: http://localhost:8050/googleAuth/getUrlToAuth
2) Click on button 'Login with Google'
3) Chose or login with appropriate Google Account
4) Allow access to manage Google Drive
5) You will be redirected to (google.api.callback.uri) http://localhost:8050/googleAuth/OAuth2v1/ to get authenticated user info


text:
package com.remondis.remap.multimapping.replace;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import com.remondis.remap.Mapper;
import com.remondis.remap.Mapping;

public class MapperTest {

  private static final int EXPECTED_INT = Integer.MIN_VALUE;
  private static final int EXPECTED_NUMBER = Integer.MAX_VALUE;
  private static final String EXPECTED_STRING = "string";
  private static final String EXPECTED_A_STRING = "aString";

  @Test
  public void shouldAllowMultiMappings() {

    B b = new B(EXPECTED_STRING, EXPECTED_NUMBER, EXPECTED_INT);
    A a = new A(EXPECTED_A_STRING, b);

    Mapper<A, AResource> mapper = Mapping.from(A.class)
        .to(AResource.class)
        .replace(A::getB, AResource::getInteger)
        .with(B::getInteger)
        .replace(A::getB, AResource::getNumber)
        .with(B::getNumber)
        .replace(A::getB, AResource::getString)
        .with(B::getString)
        .mapper();

    AResource ar = mapper.map(a);

    assertEquals(EXPECTED_A_STRING, a.getAString());
    assertEquals(EXPECTED_A_STRING, ar.getAString());

    assertEquals(EXPECTED_INT, (int) a.getB()
        .getInteger());
    assertEquals(EXPECTED_INT, (int) ar.getInteger());

    assertEquals(EXPECTED_NUMBER, a.getB()
        .getNumber());
    assertEquals(EXPECTED_NUMBER, ar.getNumber());

    assertEquals(EXPECTED_STRING, a.getB()
        .getString());
    assertEquals(EXPECTED_STRING, ar.getString());
  }

}


text:
/*
 * Rule: You shouldn't use more than 10 floats. If you do, there's probably
 * room for some abstraction.
 */

CSSLint.addRule({

    // rule information
    id: "floats",
    name: "Disallow too many floats",
    desc: "This rule tests if the float property is used too many times",
    url: "https://github.com/CSSLint/csslint/wiki/Disallow-too-many-floats",
    browsers: "All",

    // initialization
    init: function(parser, reporter) {
        "use strict";
        var rule = this;
        var count = 0;

        // count how many times "float" is used
        parser.addListener("property", function(event) {
            if (event.property.text.toLowerCase() === "float" &&
                    event.value.text.toLowerCase() !== "none") {
                count++;
            }
        });

        // report the results
        parser.addListener("endstylesheet", function() {
            reporter.stat("floats", count);
            if (count >= 10) {
                reporter.rollupWarn("Too many floats (" + count + "), you're probably using them for layout. Consider using a grid system instead.", rule);
            }
        });
    }

});


text:
package nomad_project;

import java.util.List;
import java.util.Map;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import nomad_project.Client.HTTP_METHOD;
import nomad_project.Client.Response;
import job.Constraint;
import job.Group;
import job.Task;

public class Job {

	private String id;
	private Client client;

	public class Update {
		private Integer maxParallel;
		private String stagger;

		public Update setMaxParallel(int maxParallel) {
			this.maxParallel = new Integer(maxParallel);
			return this;
		}

		public Update setStagger(String value) {
			this.stagger = value;
			return this;
		}

		public JSONObject toJson() throws NomadClientException {
			JSONObject json = new JSONObject();

			try {
				if (maxParallel != null) {
					json.put("max_parallel", maxParallel);
				}
				if (stagger != null) {
					json.put("stagger", stagger);
				}
			} catch (JSONException e) {
				throw new NomadClientException(String.format("JSONException: %s", e.getMessage()));
			}

			return json;
		}
	}

	private String region;
	private List<String> datacenters;
	private Update update;
	private List<Constraint> constraints;
	private List<Group> groups;
	private Boolean allAtOnce;
	private Integer priority;
	private List<Task> tasks;
	private String type;
	private Map<String, String> meta;

	public Job(Client client, String id) {
		this.id = id;
		this.client = client;
	}

	public Object getID() {
		return id;
	}

	public Response getJob() throws NomadClientException {
		return client.request(HTTP_METHOD.get, String.format("/%s/node/%s", client.version, id), null);
	}

	public Job setAllAtOnce(boolean enable) {
		allAtOnce = new Boolean(enable);
		return this;
	}

	public Job addConstraint(Constraint c) {
		constraints.add(c);
		return this;
	}

	public Job addDataCenters(String dc) {
		datacenters.add(dc);
		return this;
	}

	public Job addGroup(Group g) {
		groups.add(g);
		return this;
	}

	public Job addMeta(String key, String value) {
		meta.put(key, value);
		return this;
	}

	public Job setPriority(int priority) {
		priority = new Integer(priority);
		return this;
	}

	public Job setRegion(String region) {
		this.region = region;
		return this;
	}

	public Job addTask(Task t) {
		tasks.add(t);
		return this;
	}

	public Job setType(String type) {
		this.type = type;
		return this;
	}

	public Job setUpate(Update u) {
		this.update = u;
		return this;
	}

	public String getBody() throws NomadClientException {
		JSONObject json = new JSONObject();

		try {
			if (allAtOnce) {
				json.put("all_at_once", allAtOnce);
			}
			if (constraints.size() > 0) {
				JSONArray array = new JSONArray();
				for (Constraint c : constraints) {
					array.put(c.toJson());
				}
				json.put("constraint", array);
			}
			if (groups.size() > 0) {
				JSONArray array = new JSONArray();
				for (Group g : groups) {
					array.put(g.toJson());
				}
				json.put("group", array);
			}
			if (meta.size() > 0) {
				JSONObject map = new JSONObject();
				for (Map.Entry<String, String> elt : meta.entrySet()) {
					map.put(elt.getKey(), elt.getValue());
				}
				json.put("meta", map);
			}
			if (tasks.size() > 0) {
				JSONArray array = new JSONArray();
				for (Task t : tasks) {
					array.put(t.toJson());
				}
				json.put("task", array);
			}
			if (datacenters.size() > 0) {
				json.put("datacenters", datacenters);
			}
			if (priority != null) {
				json.put("priority", priority);
			}
			if (region != null) {
				json.put("region", region);
			}
			if (type != null) {
				json.put("type", type);
			}
			if (update != null) {
				json.put("update", update);
			}

		} catch (JSONException e) {
			throw new NomadClientException(String.format("JSONException: %s", e.getMessage()));
		}

		return json.toString();
	}

}