text:
<?php
namespace frontend\widgets;

use Yii;
use yii\helpers\ArrayHelper;

class ShareLinks extends \yii\base\Widget
{
	/**
	 * Constants representing each social net
	 */
	const SOCIAL_TWITTER = 1;
	const SOCIAL_FACEBOOK = 2;
	const SOCIAL_VKONTAKTE = 3;
	const SOCIAL_GPLUS = 4;
	const SOCIAL_LINKEDIN = 5;
	const SOCIAL_KINDLE = 6;
	const SOCIAL_MAILRU = 7;
	const SOCIAL_ODNOKLASSNIKI = 8;

	/**
	 * Path to view file that will contain markup for the whole soc net buttons block
	 *
	 * @var string
	 */
	public $viewName = 'shareLinks';
	/**
	 * Url to share
	 *
	 * @var string
	 */
	public $url;
	/**
	 * jQuery selector for sharing links (to bind popup on click there)
	 *
	 * @var string
	 */
	public $linkSelector = '.share-social a';
	/**
	 * Sharing url template for each network
	 *
	 * @var array
	 */
	public $shareUrlMap = [
		self::SOCIAL_TWITTER => 'https://twitter.com/intent/tweet?url={url}',
		self::SOCIAL_FACEBOOK => 'https://www.facebook.com/sharer/sharer.php?u={url}',
		self::SOCIAL_VKONTAKTE => 'http://vk.com/share.php?url={url}',
		self::SOCIAL_GPLUS => 'https://plus.google.com/share?url={url}',
		self::SOCIAL_LINKEDIN => 'http://www.linkedin.com/shareArticle?url={url}',
		self::SOCIAL_KINDLE => 'http://fivefilters.org/kindle-it/send.php?url={url}',
		self::SOCIAL_MAILRU => 'http://connect.mail.ru/share?url={url}',
		self::SOCIAL_ODNOKLASSNIKI => 'http://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl={url}',
	];

	public function init()
	{
		$this->url = (empty($this->url)) ? Yii::$app->getRequest()->getAbsoluteUrl() : $this->url;
		ShareLinksAssets::register($this->view);
	}

	public function run()
	{
		$js = '$("' . $this->linkSelector . '").yiiShareLinks();';
		$this->view->registerJs($js);
		echo $this->render($this->viewName);
	}

	public function shareUrl($networkId)
	{
		return str_replace('{url}', urlencode($this->url), ArrayHelper::getValue($this->shareUrlMap, $networkId));
	}

}


text:
#import <Betable/BetableWebViewController.h>
#import <Betable/BetableHandlers.h>
#import <Betable/BetableBatchRequest.h>

@interface NSDictionary (BetableJSON)
- (NSData*)JSONData;
@end

@interface NSString (BetableJSON)
- (NSObject*)objectFromJSONString;
@end

@class BetableWebViewController;

@interface Betable : NSObject

- (Betable*)initWithClientID:(NSString*)clientID clientSecret:(NSString*)clientSecret redirectURI:(NSString*)redirectURI;

// This method is called when no access token exists for the current user. It
// will initiate the OAuth flow. It will bounce the user to the Safari app that
// is native on the device. After the person accept betable will redirect them
// to your redirect URI which can be registered here:
//
//     http://developers.betable.com
//
// NOTE: The redirect id should have a protocol that opens your app. See this
// Reference for more info:
//
//     http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW50
//
// It is suggested that your redirect protocol be "betable+<GAME_ID>"
//
// From your UIApplicationDelegate method application:handleOpenURL: you can
// handle the response.
- (void)authorizeInViewController:(UIViewController*)viewController onAuthorizationComplete:(BetableAccessTokenHandler)onComplete onFailure:(BetableFailureHandler)onFailure onCancel:(BetableCancelHandler)onCancel;

// Once you have your access code from the application:handleOpenURL: of your
// UIApplicationDelegate after betable redirects to your app uri you can pass
// the uri into this method with your handlers for successfully or unsuccessfully
// recieving an access token.
//
// NOTE: This is the final step of oauth.  In the onComplete handler you will
// recieve your access token for the user associated with this Betable object.
// You will want to store this with the user so you can make future calls on
// be half of said user.
- (void)handleAuthorizeURL:(NSURL*)url;

// You can create an auth token for an unbacked bet (virtual currency).  Rather,
// than calling authorize first and receiving a token back in
// application:handleOpenURL: you will receive an unbacked-bet access token in
// the onComplete callback.
- (void)unbackedToken:(NSString*)clientUserID
            onComplete:(BetableAccessTokenHandler)onComplete
            onFailure:(BetableFailureHandler)onFailure;

// This method is used to place a bet for the user associated with this Betable
// object.
//
//      |gameID|: This is your gameID which is registered and can be checked at
//          http://developers.betable.com
//      |data|: This is a dictionary that will converted to JSON and added
//          request as the body. It contains all the important information about
//          the bet being made. For documentation on the format of this
//          dictionary see https://developers.betable.com/docs/api/reference/
//      |onComplete|: This is a block that will be called if the server returns
//          the request with a successful response code. It will be passed a
//          dictionary that contains all of the JSON data returned from the
//          betable server.
//      |onFailure|: This is a block that will be called if the server returns
//          with an error. It gets passed the NSURLResponse object, the string
//          reresentation of the body, and the NSError that was raised.
//          betable server.
- (void)betForGame:(NSString*)gameID
          withData:(NSDictionary*)data
        onComplete:(BetableCompletionHandler)onComplete
         onFailure:(BetableFailureHandler)onFailure;

// This method is used to place a bet for the user associated with this Betable
// object.
//
//      |gameID|: This is your gameID which is registered and can be checked at
//          http://developers.betable.com
//      |creditGameID|: This is the ID of the game that is being played with
//          the credits.
//      |data|: This is a dictionary that will converted to JSON and added
//          request as the body. It contains all the important information about
//          the bet being made. For documentation on the format of this
//          dictionary see https://developers.betable.com/docs/api/reference/
//      |onComplete|: This is a block that will be called if the server returns
//          the request with a successful response code. It will be passed a
//          dictionary that contains all of the JSON data returned from the
//          betable server.
//      |onFailure|: This is a block that will be called if the server returns
//          with an error. It gets passed the NSURLResponse object, the string
//          reresentation of the body, and the NSError that was raised.
//          betable server.
- (void)creditBetForGame:(NSString*)gameID
              creditGame:(NSString*)creditGameID
                withData:(NSDictionary*)data
              onComplete:(BetableCompletionHandler)onComplete
               onFailure:(BetableFailureHandler)onFailure;

// This method is used to retrieve information about the account of the user
// associated with this betable object.
//
//      |onComplete|: This is a block that will be called if the server returns
//          the request with a successful response code. It will be passed a
//          dictionary that contains all of the JSON data returned from the
//          betable server.
//      |onFailure|: This is a block that will be called if the server returns
//          with an error. It gets passed the NSURLResponse object, the string
//          reresentation of the body, and the NSError that was raised.
//          betable server.
- (void)userAccountOnComplete:(BetableCompletionHandler)onComplete
                    onFailure:(BetableFailureHandler)onFailure;

// This method is used to retrieve information about the wallet of the user
// associated with this betable object.
//
//      |onComplete|: This is a block that will be called if the server returns
//          the request with a successful response code. It will be passed a
//          dictionary that contains all of the JSON data returned from the
//          betable server.
//      |onFailure|: This is a block that will be called if the server returns
//          with an error. It gets passed the NSURLResponse object, the string
//          reresentation of the body, and the NSError that was raised.
//          betable server.
- (void)userWalletOnComplete:(BetableCompletionHandler)onComplete
                   onFailure:(BetableFailureHandler)onFailure;

// This method is used to place an unbacked-bet for the user associated with this Betable
// object.
//
//      |gameID|: This is your gameID which is registered and can be checked at
//          http://developers.betable.com
//      |data|: This is a dictionary that will converted to JSON and added
//          request as the body. It contains all the important information about
//          the bet being made. For documentation on the format of this
//          dictionary see https://developers.betable.com/docs/api/reference/
//      |onComplete|: This is a block that will be called if the server returns
//          the request with a successful response code. It will be passed a
//          dictionary that contains all of the JSON data returned from the
//          betable server.
//      |onFailure|: This is a block that will be called if the server returns
//          with an error. It gets passed the NSURLResponse object, the string
//          reresentation of the body, and the NSError that was raised.
//          betable server.
- (void)unbackedBetForGame:(NSString*)gameID
                  withData:(NSDictionary*)data
                onComplete:(BetableCompletionHandler)onComplete
                 onFailure:(BetableFailureHandler)onFailure;

// This method is used to place an unbacked-bet for the user associated with this Betable
// object.
//
//      |gameID|: This is your gameID which is registered and can be checked at
//          http://developers.betable.com
//      |creditGameID|: This is the ID of the game that is being played with
//          the credits.
//      |data|: This is a dictionary that will converted to JSON and added
//          request as the body. It contains all the important information about
//          the bet being made. For documentation on the format of this
//          dictionary see https://developers.betable.com/docs/api/reference/
//      |onComplete|: This is a block that will be called if the server returns
//          the request with a successful response code. It will be passed a
//          dictionary that contains all of the JSON data returned from the
//          betable server.
//      |onFailure|: This is a block that will be called if the server returns
//          with an error. It gets passed the NSURLResponse object, the string
//          reresentation of the body, and the NSError that was raised.
//          betable server.
- (void)unbackedCreditBetForGame:(NSString*)gameID
                      creditGame:(NSString*)creditGameID
                        withData:(NSDictionary*)data
                      onComplete:(BetableCompletionHandler)onComplete
                       onFailure:(BetableFailureHandler)onFailure;

// raises "User is not authroized" exception if there doesn't exist an access token
- (void)checkAccessToken;

// This method is used to clear a user out as the authroized user on a Betable Object. It
// also manages the state of the betable object and it's web views.
- (void)logout;

// All of the betable server endpoint urls.
+ (NSString*)getTokenURL;
+ (NSString*)getBetURL:(NSString*)gameID;
+ (NSString*)getWalletURL;
+ (NSString*)getAccountURL;
+ (NSString*)getUnbackedBetURL:(NSString*)gameID;
+ (NSString*) getBetPath:(NSString*)gameID;
+ (NSString*) getUnbackedBetPath:(NSString*)gameID;

@property (strong, nonatomic) NSString *accessToken;
@property (strong, nonatomic) NSString *clientSecret;
@property (strong, nonatomic) NSString *clientID;
@property (strong, nonatomic) NSString *redirectURI;
@property (strong, nonatomic) NSOperationQueue *queue;
@property (strong, nonatomic) BetableWebViewController *currentWebView;
@property (strong, nonatomic) BetableAccessTokenHandler onAuthorize;
@property (strong, nonatomic) BetableFailureHandler onFailure;

@end

redpajama_set_name: RedPajamaGithub


text:
#pragma once
#include <aws/iotwireless/IoTWireless_EXPORTS.h>
#include <aws/iotwireless/model/LogLevel.h>
#include <utility>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Json
{
  class JsonValue;
} // namespace Json
} // namespace Utils
namespace IoTWireless
{
namespace Model
{
  class AWS_IOTWIRELESS_API GetResourceLogLevelResult
  {
  public:
    GetResourceLogLevelResult();
    GetResourceLogLevelResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
    GetResourceLogLevelResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);

    inline const LogLevel& GetLogLevel() const{ return m_logLevel; }

    inline void SetLogLevel(const LogLevel& value) { m_logLevel = value; }

    inline void SetLogLevel(LogLevel&& value) { m_logLevel = std::move(value); }

    inline GetResourceLogLevelResult& WithLogLevel(const LogLevel& value) { SetLogLevel(value); return *this;}

    inline GetResourceLogLevelResult& WithLogLevel(LogLevel&& value) { SetLogLevel(std::move(value)); return *this;}

  private:

    LogLevel m_logLevel;
  };

} // namespace Model
} // namespace IoTWireless
} // namespace Aws


text:
<?php

namespace AppBundle\Security;

use Symfony\Component\Security\Guard\AbstractGuardAuthenticator;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
use Doctrine\ORM\EntityManagerInterface;
use BackendBundle\Entity\User;

class FacebookAuthenticator extends AbstractGuardAuthenticator {

	private $container;

	public function __construct(ContainerInterface $container) {
		$this->container = $container;
	}

	public function getCredentials(Request $request) {

		if ($request->getPathInfo() != '/connect/facebook-check') {
			// skip authentication unless we're on this URL!

			return null;
		}

		if ($code = $request->query->get('code')) {

			return $code;
		}
		// no code! Something went wrong. Quite probably the user denied our app access
		// you could read the error, error_code, error_description, error_reason query params
		// http://localhost:8000/connect/facebook-check?error=access_denied&error_code=200&error_description=Permissions+error&error_reason=user_denied&state=S2fKgHJSZSJM0Qs2fhKL6USZP50KSBHc#_=_
		throw CustomAuthenticationException::createWithSafeMessage(
				'There was an error getting access from Facebook. Please try again.'
		);
	}

	public function getUser($authorizationCode, UserProviderInterface $userProvider) {

		$facebookProvider = $this->container->get('app.facebook_provider');

		try {
			// the credentials are really the access token
			$accessToken = $facebookProvider->getAccessToken(
					'authorization_code', ['code' => $authorizationCode]
			);
		} catch (IdentityProviderException $e) {
			// probably the authorization code has been used already
			$response = $e->getResponseBody();
			$errorCode = $response['error']['code'];
			$message = $response['error']['message'];

			throw CustomAuthenticationException::createWithSafeMessage(
					'There was an error logging you into Facebook - code ' . $errorCode
			);
		}

		$facebookUser = $facebookProvider->getResourceOwner($accessToken);

		//var_dump($facebookUser);
		//die();

		$email = $facebookUser->getEmail();

		$em = $this->container->get('doctrine')->getManager();

		// 1) have they logged in with Facebook before? Easy!
		$existingUser = $em->getRepository('BackendBundle:User')
				->findOneBy(array('facebookId' => $facebookUser->getId()));
		if ($existingUser) {
			return $existingUser;
		}

		// 2) do we have a matching user by email?
		$user = $em->getRepository('BackendBundle:User')
				->findOneBy(array('email' => $email));

		// 3) no user? Perhaps you just want to create one
		//      or maybe you want to redirect to a registration (in that case, keep reading_
		if (!$user) {
			$user = new User();
			$user->setName($facebookUser->getFirstName());
			$user->setPlastname($facebookUser->getLastName());
			$user->setAge($facebookUser->getMinAge());
			$user->setEmail($email);
			// set an un-encoded password, which basically makes it *not* possible
			// to login with any password
			$user->setPassword('Sesión creada con Facebook');
			$user->setImage($facebookUser->getPictureUrl());
			$user->setRole('ROLE_USER');
			$user->setAnonimo('No');
		}

		// make sure the Facebook user is set
		$user->setFacebookId($facebookUser->getId());

		$em->persist($user);
		$em->flush();
		return $user;
	}

	public function checkCredentials($credentials, UserInterface $user) {

		$password = $user->getPassword();

		if ($password == null) {
			// returning anything NOT true will cause an authentication failure
			return;
			// or, you can still throw an AuthenticationException if you want to
			// throw new AuthenticationException();
		}

		// return true to make authentication successful
		return true;
	}

	public function onAuthenticationFailure(Request $request, AuthenticationException $exception) {
		echo "fallo";
		die();
	}

	public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey) {

		return new RedirectResponse($this->container->get('router')
						->generate('app_homepage'));
	}

	public function supportsRememberMe() {
		// todo
	}

	public function start(Request $request, AuthenticationException $authException = null) {
		// todo
	}

}


text: from shapely.geometry import Point, LineString, Polygon


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.

Imports Roslyn.Test.Utilities

Namespace Microsoft.CodeAnalysis.Scripting.VisualBasic
    ''' <summary>
    ''' Represents a runtime execution context for Visual Basic scripts.
    ''' </summary>
    Friend NotInheritable Class VisualBasicScriptEngine
        Inherits ScriptEngine

        Public Sub New(Optional metadataReferenceProvider As MetadataFileReferenceProvider = Nothing)
            MyBase.New(ScriptOptions.Default.WithReferences(TestBase.LatestVbReferences), metadataReferenceProvider)
        End Sub

        Friend Overrides Function Create(Of T)(code As String, options As ScriptOptions, globalsType As Type) As Script(Of T)
            Return VisualBasicScript.Create(Of T)(code, options).WithGlobalsType(globalsType).WithBuilder(Me.Builder)
        End Function
    End Class
End Namespace


text:
import {async, ComponentFixture, TestBed} from '@angular/core/testing';

import {ResetComponent} from './reset.component';
import {ResultSelectionStore} from '../../services/result-selection.store';
import {ResultSelectionService} from '../../services/result-selection.service';
import {SharedMocksModule} from '../../../../testing/shared-mocks.module';

describe('ResetComponent', () => {
  let component: ResetComponent;
  let fixture: ComponentFixture<ResetComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ResetComponent],
      imports: [SharedMocksModule],
      providers: [
        ResultSelectionStore,
        ResultSelectionService
      ]
    })
      .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(ResetComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});


text:
package com.hannesdorfmann.mosby.mvp.viewstate;

import android.os.Parcelable;
import com.hannesdorfmann.mosby.mvp.MvpView;

/**
 * A {@link RestoreableViewState} that is implements {@link Parcelable} interface so that it can be
 * put directly in a bundle (as parcelable)
 *
 * @author Hannes Dorfmann
 * @since 1.0.0
 */
public interface RestoreableParcelableViewState<V extends MvpView>
    extends RestoreableViewState<V>, Parcelable {
}


text:
I got tired of all these "welcome to my server, here's a thousand things to read" loading screens, so I created a minimal screen for my server.

This doesn't have all the bells and whistles of "you're on your way to \<host\>, playing \<map\>!" with music playing in the background. It's just a spinner and some text that changes. Very reminicent of GMod 10's default loading screen.

## Installation

1. Clone this repo onto your webserver somewhere
2. [Download jQuery 2.x][1]
3. Rename `jquery-2.x.x.min.js` to `jquery.js`
4. Place `jquery.js` in the `js/thirdparty` folder
5. Edit `phrases.json` to include all the phrases you'd like to display to your user
6. In you server's `server.cfg`, modify `sv_loadingurl` to point to this page.

## Reference

- [How to set up sv_loadingurl][2]
- Use [this page][3] to make sure your `phrases.json` file is formatted properly

[1]: https://jquery.com/download/#jquery-2-x
[2]: https://wiki.garrysmod.com/page/Loading_URL
[3]: http://jsonlint.com/


text:
var fs = require('fs'),
    path = require('path'),
    usage = 'Usage: Tonic2Cinema /path/to/Tonic/DataSet/directory';

// Make sure we have valid argument
if(process.argv.length !== 3) {
    console.log(usage);
    return;
}

// Load Tonic descriptor
var tonicDescriptor = require(process.argv[2] + '/index.json');

// Find the possible type mapping
if(tonicDescriptor.type.length === 1 && tonicDescriptor.type[0] === 'tonic-query-data-model') {
    // Spec A
    require('../javascript/tonic-cinema-spec-a').cinema(tonicDescriptor, process.argv[2]);
} else {
    console.log('The following Tonic dataset can not be converted into Cinema database.');
    console.log('=>', tonicDescriptor.type);
}


text:
/*global jQuery, Sizzle */

(function (exports) {
    'use strict';

    function createSelectorAlias() {
        if (window.Sizzle) {
            return window.Sizzle;
        } else if (window.jQuery && window.jQuery.find) {
            return window.jQuery.find;
        } else {
            return function (select, start) {
                if (typeof start === "object" && start.querySelectorAll) {
                    return start.querySelectorAll(select);
                } else if (typeof start === "string") {
                    return document.querySelectorAll(start + " " + select);
                } else {
                    return document.querySelectorAll(select);
                }
            };
        }
    }

    exports.Selector = {
        "$": function (id) {
            return document.getElementById(id);
        },

        "$$": createSelectorAlias(),

        _createSelectorAlias: createSelectorAlias
    };

})(this);


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>gbmath: warnings.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

gbmath
    v0.051

c++ math library

Main Page

Related Pages

Namespaces

Classes

Files

File List

File Members

warnings.h File Reference

warnings
More...

Go to the source code of this file.

Detailed Description

warnings

inline vec4 cross ( const vec4 & v) const - #pragma message ("KS777: MATH::VEC4 >> NEED CHECK CROSS METHOD !!!" FILE)

#pragma message ("KS777 MATH::MAT44  need check setViewDirLH" FILE )

#pragma message ("KS777 MATH::MAT44 warn  need check setViewDirRH" FILE )

#pragma message(" matrix_stack.h :: create self exception   " FILE )

#pragma message("KS777: matrix_stack::full() ПРВОЕРИТЬ МЕТОД  full()  " FILE )

 #pragma message(" transformdata_quat.h :: need  rename : " FILE )

 #pragma message (" transformdata_axang.h NEDD operators >> << to/from string " FILE )

 #pragma message(" vieaport.h (ViewportZ) DELETE THIS: to_d3d9Viewport   " FILE)

 #pragma message(" vieport.h (vieport_s) warning 4297 !!" FILE )

#pragma message(" aabb.h (aabb) NEED CHECK CODE AFTER REFRACT   " FILE )

 #pragma message("  aabb.h (aabb) rename aabb  " FILE )

#pragma message(" base_camera ::  delete this: CameraKeys" FILE )

#pragma message(" base_camera >> delete this: KEY_WAS_DOWN_MASK .....    " FILE )

#pragma message(" first_person_camera::framemove  ПРОВЕРИТЬ МЕТОД!  " FILE)

#pragma message("ks777:  float_context_type_e.h   gbmath::context  ПРОВЕРЯТЬ И ДОБАВЛЯТЬ ПО СЕМАНТИКАМ RENDER MONKEY  " FILE)

#pragma message(">> geometry_context::setWorldRotationQuaternion(const Quaternion *q) >> NEED CHECK IMPLEMENTATION" FILE )

#pragma message("  geometry_context::setWorldTransformData  NEED CHECK IMPLEMENTATION  " FILE )

 #pragma message("   geometry_context::getWorldTransformDataPtr()   NEED CHECK IMPLEMENTATION" FILE )

#pragma message ("  geometry_context::get_vector3_ViewSide  :: ПРОВЕРИТЬ ПОЛУЧЕНИЕ БОКОВОГО ВЕКТОРА ВИДА")

#pragma message ("   geometry_context::__checkViewVectors() :: ПРОВЕРИТЬ ПОЛУЧЕНИЕ ВЕКТОРОВ  ВИДА ИЗ ИНВЕРСНОЙ ВИДОВОЙ МАТРИЦЫ ")

#pragma message("  matrix4x4_context_type_e.h  попробовать переделат в класс энумератор  " FILE )

#pragma message ("  obj_contains_e.h    need rename  " FILE )

#pragma message( " perspective_projection_data.h  rename this  " FILE )

#pragma message(" plane.h need rename plane_s  " FILE )

#pragma message(" Quaternion::setRotationAxis >> NEED CHECK !!" FILE )

#pragma message(" quaternion.h    NEED RENAME QUAT  " FILE )

#pragma message("rect.h  #error  need rename class  (aabr or rect)" FILE )

#pragma message("rect.h  #error  need  set vec2 min  and vec2 max   " FILE )

#pragma message(" transformdata_axang.h   :: NEED operators   " FILE )

const eyedata *geometry_context::getViewParamsPtr()const

assert(false); #pragma message ( "geometry_context::getViewParamsPtr :: ПОГОНЯТЬ В ОТЛАДКЕ ЭТОТ МЕТОД  " FILE )

 void decomposeInverseView(const mat44& mInverseView) #pragma message(" eyedata::decomposeInverseView  need code . extract inverse view matrix")

 const eyedata *geometry_context::getViewParamsPtr()const NEED CHECK CODE

Quaternion geometry_context::getWorldRotationQuaternion() const get const to check calculate const TransformData *ptr = getWorldTransformDataPtr();

#pragma message("ks777   Quaternion geometry_context::getWorldRotationQuaternion() const  Need check code    " FILE ) assert(false && "  need a check ");

Definition in file warnings.h.

   Project page:  https://code.google.com/p/gbmath/

   Doc page:  http://www.it.ks777.ru/docs

Generated on Sat Jul 27 2013 08:09:04 for gbmath by

 1.8.4


text:
<!doctype html>

<meta charset="UTF-8">
<title>Hello World Endpoints</title>

My First Endpoints App

<input id="input_greet_generically" type="button" value="please wait"
  onclick="will_be_set_after_endpoints_apis_loaded">

What is your name?<input value ="Zebra" id="name_field">

What is your period?<input value ="Morning" id="period_field">

<input id="input_greet_by_name" type="button" value="please wait"
  onclick="will_be_set_after_endpoints_apis_loaded">

<input id="input_greet_by_period" type="button" value="please wait"
  onclick="will_be_set_after_endpoints_apis_loaded">

<input id="getCat" type="button" value="please wait"
  onclick="will_be_set_after_endpoints_apis_loaded">


text:
/**
 *
 * Test demo application @2015
 *
 */
#ifndef STATE_H
#define STATE_H

#include "postprocessing/postprocessing_blur_gaussian.h"
#include "scene/scene_light.h"

/** TODO */
PUBLIC void state_deinit();

/** TODO */
PUBLIC void state_get_current_frame_properties(scene*              out_current_scene,
                                               scene_camera*       out_current_scene_camera,
                                               ogl_scene_renderer* out_current_renderer,
                                               system_time*        out_current_frame_time);

/** TODO */
PUBLIC postprocessing_blur_gaussian_resolution state_get_color_shadow_map_blur_resolution();

/** TODO */
PUBLIC ogl_texture_internalformat state_get_color_shadow_map_internalformat();

/** TODO */
PUBLIC ogl_texture_internalformat state_get_depth_shadow_map_internalformat();

/** TODO */
PUBLIC scene_light_shadow_map_algorithm state_get_shadow_map_algorithm();

/** TODO */
PUBLIC scene_light_shadow_map_pointlight_algorithm state_get_shadow_map_pointlight_algorithm();

/** TODO */
PUBLIC unsigned int state_get_shadow_map_size();

/** TODO */
PUBLIC float state_get_shadow_map_vsm_blur_n_passes();

/** TODO */
PUBLIC unsigned int state_get_shadow_map_vsm_blur_taps();

/** TODO */
PUBLIC float state_get_shadow_map_vsm_cutoff();

/** TODO */
PUBLIC float state_get_shadow_map_vsm_max_variance();

/** TODO */
PUBLIC float state_get_shadow_map_vsm_min_variance();

/** TODO */
PUBLIC ogl_pipeline state_get_pipeline();

/** TODO */
PUBLIC uint32_t state_get_pipeline_stage_id();

/** TODO */
PUBLIC void state_init();

/** TODO */
PUBLIC void state_set_color_shadow_map_blur_resolution(postprocessing_blur_gaussian_resolution blur_resolution);

/** TODO */
PUBLIC void state_set_color_shadow_map_internalformat(ogl_texture_internalformat new_internalformat);

/** TODO */
PUBLIC void state_set_current_frame_time(system_time frame_time);

/** TODO */
PUBLIC void state_set_depth_shadow_map_internalformat(ogl_texture_internalformat new_internalformat);

/** TODO */
PUBLIC void state_set_shadow_map_algorithm(scene_light_shadow_map_algorithm sm_algo);

/** TODO */
PUBLIC void state_set_shadow_map_pointlight_algorithm(scene_light_shadow_map_pointlight_algorithm pl_algo);

/** TODO */
PUBLIC void state_set_shadow_map_size(unsigned int new_shadow_map_size);

/** TODO */
PUBLIC void state_set_shadow_map_vsm_blur_n_passes(float new_value);

/** TODO */
PUBLIC void state_set_shadow_map_vsm_blur_taps(unsigned int new_value);

/** TODO */
PUBLIC void state_set_shadow_map_vsm_cutoff(float new_value);

/** TODO */
PUBLIC void state_set_shadow_map_vsm_max_variance(float new_value);

/** TODO */
PUBLIC void state_set_shadow_map_vsm_min_variance(float new_value);

#endif /* STATE_H */


text:
class CreateProductAttributes < ActiveRecord::Migration
  def self.up
    create_table :product_attributes do |t|
      t.references :product
      t.string :name
      t.string :value

      t.timestamps
    end
  end

  def self.down
    drop_table :product_attributes
  end
end


text:
extern NSString * const LIBAS_SETTING_MODE_KEY;
extern NSString * const LIBAS_SETTING_MODE_REMOTE;
extern NSString * const LIBAS_SETTING_MODE_STANDALONE;
extern NSString * const LIBAS_SETTING_MODE_DEFAULT;

extern NSString * const LIBAS_SETTING_SERVER_ADDR_KEY;
extern NSString * const LIBAS_SETTING_SERVER_ADDR_DEFAULT;

extern NSString * const LIBAS_SETTING_SERVER_PORT_KEY;
extern NSString * const LIBAS_SETTING_SERVER_PORT_DEFAULT;

extern NSString * const LIBAS_SETTING_RECORDER_MIC_KEY;
extern NSString * const LIBAS_SETTING_RECORDER_MIC_BACK;
extern NSString * const LIBAS_SETTING_RECORDER_MIC_FRONT;
extern NSString * const LIBAS_SETTING_RECORDER_MIC_BOTTOM;
extern NSString * const LIBAS_SETTING_RECORDER_MIC_DEFAULT;

extern NSString * const LIBAS_SETTING_PLAY_SPEAKER_KEY;
extern NSString * const LIBAS_SETTING_PLAY_SPEAKER_TOP;
extern NSString * const LIBAS_SETTING_PLAY_SPEAKER_BOTTOM;
extern NSString * const LIBAS_SETTING_PLAY_SPEAKER_DEFAULT;

@interface AcousticSensingSetting : NSObject {
    id<AcousticSensingSettingEditorDelegate> caller;
}
- (id)initWithEditorDelegate: (id<AcousticSensingSettingEditorDelegate>) callerIn;

- (void)resetToDefaultSetting;

- (NSString *)getMode;
//- (void)editMode;
- (void)setMode: (NSString *)mode;

- (NSString *)getServerAddress;
- (void)editServerAddress;
- (void)setServerAddress: (NSString *)address;

- (NSString *)getServerPort;
- (void)editServerPort;
- (void)setServerPort: (NSString *)port;

- (NSString *)getRecorderMic;
- (void)setRecorderMic: (NSString *)mic;

- (NSString *)getPlaySpeaker;
- (void)setPlaySpeaker: (NSString *)speaker;

@end


text:
layout: default
title: A guide to your digital life
---

    {% for post in paginator.posts %}

 {{ post.title }}

{{ post.date | date_to_string }}

      {{ post.excerpt }}

    {% endfor %}


text:
<!DOCTYPE public PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

  <meta name="generator" content="ex2html.rb" />
  <meta http-equiv="Content-Type" content=
  "text/html; charset=us-ascii" />
  <link rel="stylesheet" type="text/css" href="css/popup.css" />

  <title>RMagick example: emboss.rb</title>

emboss.rb

#!/home/software/ruby-1.8.7/bin/ruby -w
require 'RMagick'

# Demonstrate the Image#edge method

img = Magick::Image.read('images/Flower_Hat.jpg').first

img = img.emboss

img.write('emboss.jpg')
exit

Close window


text:
$('document').ready(function() {
  var thermostat = new Thermostat;
  update();

  function checked() {
    return $('#power-saving').is(':checked');
  };

  function getInc() {
    return 10 * (thermostat.temp);
  };

  function getInc2() {
    return 255 - (31 * (thermostat.temp - 24));
  };

  function getTempPer() {
    return 100 - ((thermostat.temp - 10) * 3.90);
  };

  function getColour() {
    if (thermostat.temp < 25) return "rgba(" + getInc() + ", 255, 0, 1)";
    return "rgba(255, " + getInc2() + ", 0, 1)";
  };

  function update() {
    $('body').css('background-color', getColour());
    $('#temp-display').text(thermostat.temp);
    if(thermostat.temp === thermostat.MAX_HIGH){
      $('#black').hide(1000);
    } else {
      $('#black').show(1000);
      $('#black').css('height', getTempPer() + '%');
    };
  };

  $('#up-button').click(function() {
    thermostat.setMode(checked());
    thermostat.increaseTemp();
    update();
  });

  $('#down-button').click(function() {
    thermostat.decreaseTemp();
    update();
  });

  $('#reset-button').click(function() {
    thermostat.resetTemp();
    update();
  });

  $('#power-saving').click(function() {
    thermostat.resetTemp();
    update();
  });
});


text:
/* @flow */

import React from 'react';
import Helmet from 'react-helmet';

function Home() {
  return (
    <article>
      <Helmet title="Home" />

    </article>
  );
}

export default Home;


text:
<!DOCTYPE HTML>

  <meta charset="utf-8">
  <title id="network" i18n-content="titleText"></title>
  <link rel="stylesheet" href="chrome://network/network.css">

Event Log (Newest first):

    <button id="log-refresh" i18n-content="logRefreshText"></button>

    <input id="log-error" type="checkbox">

    <input id="log-user" type="checkbox">

    <input id="log-event" type="checkbox">

    <input id="log-debug" type="checkbox">

    <input id="log-fileinfo" type="checkbox">

    <input id="log-timedetail" type="checkbox">

Networks:

      Path
      GUID
      Name
      Type
      State
      Profile
      Connect
      Error
      IP Addr
      Security
      Technology
      Activation
      Roaming
      OOC
      Strength

Favorites:

      Path
      GUID
      Name
      Type
      Profile
      ONC Source


text:
''' GDFB.py - Geographic Data, For Breakfast????
geographic data serialization tools

code by agrippa kellum : june 2013
'''
__all__ = ['GeoGrid']

import numpy as np

class GeoGrid(dict):
    ''' A geographical grid (or 2d histogram) of coordinates

    self.rect, a latitude/longitude rectangle, is broken up into a grid
    of self.gridsize dimensions.

    When a lat/lon coordinate in the rectangle is searched for, the

    coordinates of the grid tile which contains it is found.

    All points are stored as [lat, lon] which can be seen as [y, x]
    however, gridsize is stored as x, y... unsure if thats for the best
    '''

    def __init__(self, rect, gridsize, default=0.0):

        bottomleft = (min(rect[0][0], rect[1][0]), min(rect[0][1], rect[1][1]))
        topright = (max(rect[0][0], rect[1][0]), max(rect[0][1], rect[1][1]))
        self.rect = (bottomleft, topright)
        self.default = default
        self.gridsize = (gridsize[0], gridsize[-1])
        self.tilesize = tuple(abs(rect[0][d] - rect[1][d]) / self.gridsize[d-1]
                              for d in (0, 1))

    @classmethod
    def from_img(cls, rect, file, divisor=255, f=float):
        ''' Creates a GeoGrid from a heatmap image and a latlon rect.
        (Only reads red value in pixel.)

        By default, will divide the red in each pixel by 255.
        Can divide by different values by changing the "divisor" keyword.
        '''
        from PIL import Image

        img = Image.open(file)
        mapimg = img.load()
        geogrid = cls(rect, img.size)

        for x in range(img.size[0]):
            for y in range(img.size[1]):
                # a different y value for the map is created, because the vertical
                # coordinate of an image increases from top to bottom, where
                # latitude increases from bottom to top
                mapy = img.size[1] - (y+1)
                geogrid.set_from_grid((y, x), mapimg[x, mapy][0]/divisor)

        return geogrid

    def get_tile_of_coord(self, coord):
        ''' Returns the tile that a coordinate is within '''
        tile = tuple(coord[d] - coord[d] % self.tilesize[d] +
                     self.rect[0][d] % self.tilesize[d] for d in (0, 1))
        return tile

    def __setitem__(self, coord, value):
        ''' Places coordinate in a tile before calling super().__setitem__ '''
        if value != self.default:
            key = self.get_tile_of_coord(coord)
            super().__setitem__(key, value)

    def __getitem__(self, coord):
        ''' Places coordinate in a tile before calling super().__getitem__ '''
        key = self.get_tile_of_coord(coord)
        return super().__getitem__(key)

    def __missing__(self, coord):
        return self.default

    def __grid_operation(operation):
        ''' decorator for performing an operation on all values in a GeoGrid '''
        def method(self, other):
            from copy import copy
            if self.rect != other.rect:
                raise ValueError("incompatible rectangles")
            geogrid = copy(self)

            for coord in other:
                operation(self, other, coord, geogrid)
            return geogrid
        return method

    @__grid_operation
    def __truediv__(self, other, coord, geogrid): geogrid[coord] /= other[coord]
    @__grid_operation
    def __add__(self, other, coord, geogrid): geogrid[coord] += other[coord]
    @__grid_operation
    def __sub__(self, other, coord, geogrid): geogrid[coord] -= other[coord]
    @__grid_operation
    def __mul__(self, other, coord, geogrid): geogrid[coord] *= other[coord]
    @__grid_operation
    def __pow__(self, other, coord, geogrid): geogrid[coord] **= other[coord]

    def set_from_grid(self, tile, value):
        ''' Sets the value of a tile using the GeoGrid's internal grid rather
        than a lat/lon coordinate.
        '''
        key = tuple((tile[d] * self.tilesize[d]) + self.rect[0][d]
                    for d in (0, 1))
        self[key] = value

    def yield_grid(self):
        ''' Convert GeoGrid back into a normal grid of points.

        Note: I'm pretty sure this is somewhat broken. Good luck!
        '''
        for tile in self:
            pos = tuple(int((tile[d] - self.rect[0][d]) / self.tilesize[d])
                        for d in (0, 1))
            yield pos, self[tile]

    def yield_values(self, coords=None):
        ''' Yields values of each point for analysis

        Optional:
            coords: specify the coordinates for which values are returned
            (default is simply all coords in the GeoGrid in no particular order)

        Example:
            >>> # creates a regression equation from the data of two maps,
            >>> # using curve fitting
            >>> import numpy
            >>> y = numpy.array(my_geo_grid_y.yield_values())
            >>> x = numpy.array(my_geo_grid_x.yield_values(my_geo_grid_y.keys()))
            >>> z = numpy.polyfit(x, y, 1)
            >>> p = numpy.poly1d(z)

            >>> # alternatively, the arrays could be used to make a thiel slope
            >>> import scipy
            >>> medslope = scipy.stats.mstats.theilslopes(y, x)
        '''
        if coords == None: coords = self.keys()
        for coord in coords:
            yield self[coord]


text:
require File.expand_path(File.dirname(__FILE__) + "/../../test_helper")

class Admin::BlogPostsReadOnlyIntegrationTest <
      ActionController::IntegrationTest
  def setup
    User.destroy_all
    @user = User.create! :username => 'soren'
  end

  def test_index
    BlogPost.destroy_all
    @blog_post = BlogPost.create!(
      :title => "hi there", :user => @user, :textile => false
    )
    get "/admin/blog_posts_read_only"

    # should be successful
    assert_response :success

    # should not have a new link
    assert_no_match(%r|<a[^>]*>New blog post</a>|, response.body)

    # should not make the textile field an Ajax toggle
    assert_select(
      "div[id=?]", "blog_post_#{@blog_post.id}_textile", false
    )

    # should have a show link
    assert_select(
      "a[href=/admin/blog_posts_read_only/#{@blog_post.id}]", 'Show'
    )
  end

  def test_show_for_a_published_blog_post
    @blog_post = BlogPost.create!(
      :title => 'published', :user => @user, :published_at => Time.now.utc,
      :body => 'Today I ate a sandwich.'
    )
    get "/admin/blog_posts_read_only/#{@blog_post.id}"

    # should not show textile
    assert_no_match(/Textile/, response.body)

    # should use the block for the title
    assert_select(
      'h2', :text => "Published blog post #{@blog_post.id}"
    )

    # should not show an edit link
    assert_select(
      'a[href=?]', "/admin/blog_posts_read_only/edit/#{@blog_post.id}", false
    )

    # should use the custom partial to render the body
    assert_select('strong', :text => 'Today I ate a sandwich.')
  end

  def test_show_for_an_unpublished_blog_post
    @blog_post = BlogPost.create!(
      :title => 'unpublished', :user_id => @user.id, :published_at => nil
    )
    get "/admin/blog_posts_read_only/#{@blog_post.id}"

    # should use the block for the title
    assert_select(
      'h2', :text => "Unpublished blog post #{@blog_post.id}"
    )
  end
end


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You 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.
-->
<FilteredQuery>
  <Query>
    <BooleanQuery fieldName="contents">
      <Clause occurs="should">
        <TermQuery>merger</TermQuery>
      </Clause>
      <Clause occurs="mustnot">
        <TermQuery >sumitomo</TermQuery>
      </Clause>
      <Clause occurs="must">
        <TermQuery>bank</TermQuery>
      </Clause>
    </BooleanQuery>
  </Query>

  <Filter>
    <RangeFilter fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>
  </Filter>

</FilteredQuery>


text:
'use strict';
angular.module('VacationModule')
    .controller('EditVacationController', ['$scope', '$http', 'toastr', '$interval', '$state', 'Users', 'Vacations', 'moment', 'Schedules', 'Departments', '$stateParams', 'FileUploader', '$rootScope','calendarService',
        function ($scope, $http, toastr, $interval, $state, Users, Vacations, moment, Schedules, Departments, $stateParams, FileUploader, $rootScope,calendarService) {
            $scope.me = window.SAILS_LOCALS.me;
            if (!$scope.me.kadr && !$scope.me.admin) $state.go('home');
            //var t = moment().twix(new Date('2017-08-24T01:00:00'));
            //console.log('Это текущая дата?: ', t.isCurrent()); // false
            //console.log('Выбрано дней:', t.count('day')); //=> 1
            //console.log('Форматирование: ', t.format());  // 'Jan 25, 1982, 9:30 AM - 1:30 PM'
            //console.log('Простой парсинг времени из даты:', t.simpleFormat("H:mm")); // '9:30 - 1:30'
            //console.log('1',t.isSame("day"));               //=> true
            //console.log('2',t.humanizeLength());            //=> "4 hours"
            //console.log('3',t.count("days"));               //=> 1
            //console.log('4',t.isPast());                   //=> true
            //console.log('5',t.contains("2017-10-25T10:00"А)); //=> true
            //$scope.item = {};
            //$scope.item.furlough = {id: '599d87cbb88be82bf00a176f'};
            //
            //$scope.ownerId = window.location.pathname.split('/')[4];
            //console.log('$scope.ownerId0', $scope.ownerId);

            $scope.debug = true;
            /**
             * Выбор отображения года в календаре, при загрузке странице
             * Пользователям показывается текущий год
             * Админу и кадрам год установленный в интерфейсе
             */
            $scope.yearFrom = ($scope.me['kadr'] || $scope.me['admin'] ) ? (($scope.me.interfaces) ? $scope.me.interfaces[0].year : moment().year()) : moment().year();

            var info = {
                changed: 'Изменения сохранены!',
                error: 'Ошибка!',
                isSimilar: 'Есть похожий: ',
                ok: 'OK!',
                objectDelete: 'Объект удалён.',
                newUserOk: 'Успешно создан.',
                redirectSelf: 'home.admin.vacations',
                ru: 'ru',
                dateFormat: "d.m.Y",
                // minDate: "01-01-1950",
                //maxDate: function () {
                //
                //
                //
                //},
                maxTwoWeek: '14 дней максимальный период планирования для одного отпуска. Вы можете запланировать несколько отпусков последовательно. ВНИМАНИЕ! Если необходим отпуск более 14 дней рекомендуем согласовать период с руководителем и кадровой службой. ',
            };

            if (!$scope.me.admin && !$scope.me.kadr) $state.go(info.redirectSelf);
            $scope.close = 1;
            $scope.intersect = false;
            $scope.loginAdmin = false;
            $scope.flatpicker = {};
            $scope.selectAvatarUrl = $scope.me.avatarUrl;
            $scope.edit = $state.includes('home.admin.vacations.edit');
            $scope.comment = false;
            $scope.toogle = function () {
                $scope.comment = ($scope.comment) ? false : true;
            };

            $scope.showVacation = {
                loading: false
            };

            $scope.countsChar = function (message) {
                if (!message) return $scope.countCh = undefined;
                $scope.countCh = (900 - message.length);
                return $scope.countCh
            };

            /**
             * TODO Chat
             * Пока нет соединения с комнотой чата,
             * кнопка управления отправки сообщений не активна
             * @type {boolean}
             */
            $scope.hasJoinedRoom = false;
            /**
             * Получить идентификатор отпуска из текущего URL-адреса:
             * /admin/vacations/edit/5a2a6006a6daf7103082dbfb
             */
            $scope.vacationId = window.location.pathname.split('/')[4];
            /**
             * Отправьте запрос сокета, чтобы присоединиться к комнате чата.
             */
            io.socket.put('/vacation/' + $scope.vacationId + '/join', function (data, JWR) {
                // Если что-то пошло не так, обработайте ошибку.
                if (JWR.statusCode !== 200) {
                    if (angular.isString(JWR.body)) toastr.error(JWR.body, info.error);
                    return;
                }
                /**
                 *  Если сервер дал нам свое благословение и указал, что мы
                 *  можем успешно присоединиться к комнате, тогда мы установим это в
                 *  scope, чтобы пользователь мог начать отправлять чаты.
                 *  Обратите внимание, что на этом этапе мы также сможем запустить _receiving_ чаты.
                 *
                 */
                $scope.hasJoinedRoom = true;
                /**
                 * Поскольку io.socket.get () не является объектом angular, нам нужно вызвать
                 * $scope.$apply()
                 * в этом обратном вызове, чтобы наши изменения в scope действительно вступили в силу.
                 */
                $scope.$apply();
            });
            /**
             *  $scope.chats = (window.SAILS_LOCALS.chats) ? window.SAILS_LOCALS.chats : [];
             *  Слушатель события сокетов, который запускается при отправке нового события чата (.broadcast)
             */
            io.socket.on('vacation', function (e) {
                $scope.chats = (angular.isArray($scope.chats)) ? $scope.chats : [];
                // Добавим чат, который мы только что получили
                $scope.chats.push(e);
                /**
                 * Поскольку io.socket.on () не является angular объектом, нам нужно вызвать $scope. $Apply() в
                 * этот обработчик событий, чтобы наши изменения в scope действия действительно вступили в силу.
                 */
                $scope.$apply();
            });

            $scope.sendMessage = function () {
                $scope.vacationId = window.location.pathname.split('/')[4];
                /**
                 * Отправьте запрос сокета, чтобы присоединиться к комнате чата.
                 */
                io.socket.put('/vacation/' + $scope.vacationId + '/join', function (data, JWR) {
                    // Если что-то пошло не так, обработайте ошибку.
                    if (JWR.statusCode !== 200) {
                        console.error(JWR);

                        toastr.error(JWR.body, info.error);
                        // TODO
                        return;
                    }
                    /**
                     *  Если сервер дал нам свое благословение и указал, что мы
                     *  можем успешно присоединиться к комнате, тогда мы установим это в
                     *  scope, чтобы пользователь мог начать отправлять чаты.
                     *  Обратите внимание, что на этом этапе мы также сможем запустить _receiving_ чаты.
                     *
                     */
                    $scope.hasJoinedRoom = true;
                    /**
                     * Поскольку io.socket.get () не является объектом angular, нам нужно вызвать
                     * $scope.$apply()
                     * в этом обратном вызове, чтобы наши изменения в scope действительно вступили в силу.
                     */
                    $scope.$apply();
                });
                if (!$scope.vacationId) toastr.error('ID отпуска к сообщению не установлен', info.error);

                io.socket.post('/vacation/' + $scope.vacationId + '/chat', {
                    message: $scope.message,
                    name: $scope.item.name
                    //owner:'59f855fc58f4be1ccc2d7bf4'
                }, function (data, JWR) {
                    // Если что-то пошло не так, обработайте ошибку.
                    if (JWR.statusCode !== 200) {
                        console.error(JWR);
                        toastr.error(JWR.body, info.error);
                        return;
                    }
                    // Очистите поле сообщения чата. (но сначала сохраним его содержимое, чтобы мы могли добавить его)
                    var messageWeJustChatted = $scope.message;
                    $scope.message = '';

                    $scope.$apply();
                });
            };

            $scope.whenTyping = function (event) {
                io.socket.request({
                    url: '/vacation/' + $scope.vacationId + '/typing',
                    method: 'put'
                }, function (data, JWR) {
                    // Если что-то пошло не так, обработайте ошибку.
                    if (JWR.statusCode !== 200) {
                        console.error(JWR);
                        toastr.error(JWR.body, info.error);
                        return;
                    }
                });
            };

            $scope.whenNotTyping = function (event) {
                io.socket.request({
                    url: '/vacation/' + $scope.vacationId + '/stoppedTyping',
                    method: 'put'
                }, function (data, JWR) {
                    // Если что-то пошло не так, обработайте ошибку.
                    if (JWR.statusCode !== 200) {
                        console.error(JWR);
                        toastr.error(JWR.body, info.error);
                        return;
                    }
                });
            };

            let dayOff = calendarService.getDayOff(); //праздники и выходные
            let holiday = calendarService.getHoliday(); // праздник
            let celebration = calendarService.getCelebration(); // пораньше на час
            $scope.yearGet = ($scope.edit && $scope.item) ? $scope.item.from : $scope.me.interfaces[0].year;

            $scope.$watch('item.furlough.id', function (val) {
                //console.log(' CHANGE $scope.item.furlough.id',  val);
                //console.log(' CHANGE 99 $scope.item.owner.id',  $scope.item.owner.id);
                if(val) {
                    $scope.item.furlough.id = val;
                   if($scope.item.owner) $scope.getDaysYear($scope.item.owner.id, $scope.yearFrom);
                }
            });
            //$scope.$watch('remains', function (val) {
            //    console.log('REMAINS ', val);
            //    if (val <= 0) {
            //        console.log('FLAT: ', $scope.flatpicker);
            //        $scope.flatpicker.config._enable = [];
            //        $scope.flatpicker.set('disable', [{from: $scope.flatpicker.config._minDate, to: $scope.flatpicker.config._maxDate}]);
            //    }
            //});

            $scope.getDaysYear = function (ownerId, year) {
                $http.get('/vacation/get-days-to-years?owner=' + ownerId + '&year=' + year + '&furlough=' + $scope.item.furlough.id)
                    .then(function onSuccess(sailsResponse) {
                        $scope.remains = $scope.remainsDub = 28;
                        //console.log('DATTT config', $scope.flatpicker.config);
                        //$scope.flatpicker.set('enable',[ {from:$scope.flatpicker.config._minDate, to:$scope.flatpicker.config._maxDate}]);
                        if (sailsResponse.data.length > 0) {
                            if (sailsResponse.data[0].remains <= 0 && !$scope.edit) {
                                $scope.flatpicker.config._enable = [];
                                $scope.flatpicker.set('disable', [{from: $scope.flatpicker.config._minDate, to: $scope.flatpicker.config._maxDate}]);
                            }
                            $scope.remains = $scope.remainsDub = sailsResponse.data[0].remains;
                        } else {
                            $scope.flatpicker.set('enable', [{
                                from: $scope.flatpicker.config._minDate,
                                to: $scope.flatpicker.config._maxDate
                            }]);
                        }
                    })
                    .catch(function onError(sailsResponse) {
                        console.log(sailsResponse);
                    })
                    .finally(function eitherWay() {
                        $scope.userList.loading = false;
                    });
            };

            $scope.$watch('minDateConfig', function (val, old) {
                if (val) {
                    //$scope.getDaysYear(val, $scope.yearFrom);
                }
            });
            $scope.$watch('me.interfaces', function (val, old) {
                if (val) $scope.interFa = val[0].year;
            });

            //$scope.getCountSelectedHolidays = function () {
            //
            //    let qer = '/vacation/to-years?from=' + moment($scope.item.year,['YYYY']).format('YYYY-MM-DD') + '&to=' + moment($scope.item.year,['YYYY']).add(1,'year').format('YYYY-MM-DD');
            //    console.log('YEEEEEE', qer);
            //
            //    $http.get(qer).then(function (success) {
            //        console.log('DD', success.data);
            //        console.log('POPPP', success.data.filter((obj)=> {
            //            return (obj.numSelected > 0) ? obj.numSelected : '';
            //        }));
            //        $scope.countSelectedHolidays = success.data.filter((obj)=> {
            //            return (obj.numSelected > 0) ? obj.numSelected : '';
            //        }).length;
            //    });
            //};
            //
            $scope.allDaysYearHoliday =  calendarService.getAllWorkHolidayDays($scope.me.interfaces[0].year);
            $scope.getAllWorkDays = calendarService.getAllWorkDays($scope.me.interfaces[0].year);
            $scope.getHours40Year = calendarService.getHoursYear($scope.me.interfaces[0].year,40);
            $scope.getHours36Year = calendarService.getHoursYear($scope.me.interfaces[0].year,36);
            $scope.getHours24Year = calendarService.getHoursYear($scope.me.interfaces[0].year,24);

            $scope.dateOpts = {
                locale: info.ru, // язык
                mode: "range", // диапазон дат выбрать
                dateFormat: info.dateFormat, // формат даты
                // minDate: 'today', // минимальная дата
                allowInput: true, // ручной ввод даты
                inline: true, // календарь открыт
                //currentYear: $scope.me.interfaces[0].year,
                // Обработчик события на изменения даты
                //onChange: function(selectedDates, dateStr, instance) {
                //    console.log('selectedDates',selectedDates);
                //},
                // defaultDate : ['2018-01-01','2019-12-31'],
                onYearChange: function (selectedDates, dateStr, instance) {
                    console.log('onYearChange', instance.currentYear);
                    /**
                     * Функция сервиса Calendar
                     * Возвращает число праздничных и выходных дней в году всего
                     * 1 аргумент: номер года
                     * 2 аргумент: строка например "Кол-во праздников и выходных в"
                     * Если данных на запрашиваемый год нет ничего не вернёт.
                     */
                    $scope.getAllWorkDays = calendarService.getAllWorkDays(instance.currentYear);
                    $scope.allDaysYearHoliday = calendarService.getAllWorkHolidayDays(instance.currentYear);
                    $scope.getHours40Year = calendarService.getHoursYear(instance.currentYear,40);
                    $scope.getHours36Year = calendarService.getHoursYear(instance.currentYear,36);
                    $scope.getHours24Year = calendarService.getHoursYear(instance.currentYear,24);

                    if ($scope.item.owner && instance.currentYear) {
                        $scope.getDaysYear($scope.item.owner.id, instance.currentYear);

                    }
                    $scope.$apply();
                },

                // onReady запускается после того, как календарь находится в готовом состоянии
                onReady: [
                    //function (selectedDates, dateStr, instance){
                    //    let yr = $scope.me.interfaces[0].year;
                    //    console.log('INTERSEC', yr);
                    //    if (!$scope.edit) instance.setDate([2018, 2018], true, "Y");
                    //
                    //},

                    function (selectedDates, dateStr, instance) {
                        let yr = moment($scope.me.interfaces[0].year, ['YYYYY']).format('YYYY-MM-DD');
                        if (!$scope.edit) instance.setDate([yr, yr], true, "Y-m-d");

                        /**
                         *  Устанавливаем на календарь максимально доступный год,
                         *  который запланирован в Графике отпусков
                         */
                        $http.get('/schedule/max-year')
                            .then(function onSuccess(sailsResponse) {
                                // console.log('***************sailsResponse: ', sailsResponse.data.year);
                                instance.config.maxDate = moment(sailsResponse.data.year, ['YYYY']).endOf("year").format('DD-MM-YYYY');

                            })
                            .catch(function onError(sailsResponse) {
                                //console.log(sailsResponse);
                            })
                            .finally(function eitherWay() {
                                $scope.userList.loading = false;

                            });
                    },
                    function (selectedDates, dateStr, instance) {
                        /**
                         *  Устанавливаем на календарь минимально доступный год,
                         *  который запланирован в Графике отпусков
                         */
                        $http.get('/schedule/min-year')
                            .then(function onSuccess(sailsResponse) {

                                instance.config.minDate = $scope.minDateConfig = moment(sailsResponse.data.year, ['YYYY']).startOf("year").format('DD-MM-YYYY');

                                console.log('MIN DATE:', instance.config.minDate);
                            })
                            .catch(function onError(sailsResponse) {
                                //console.log(sailsResponse);
                            })
                            .finally(function eitherWay() {
                                $scope.userList.loading = false;
                            });
                    }
                ],
                onDayCreate: [
                    function (dObj, dStr, fp, dayElem) {
                        if (!$scope.sArr.length) return;
                        $scope.sArr.forEach(function (v, k, arr) {
                            if (moment(arr[k].from).isSame(dayElem.dateObj) || moment(arr[k].to).isSame(dayElem.dateObj) || moment(dayElem.dateObj).isBetween(arr[k].from, arr[k].to)) {
                                //dayElem.style.backgroundImage = '/images/whirlpool.png';
                                //dayElem.style.backgroundImage = "url('/images/45degreee_fabric_@2X.png')";
                                //dayElem.style.backgroundImage = "url('/images/whirlpool.png')";
                                dayElem.style.backgroundImage = "url('/images/leather_1_@2X.png')";
                                dayElem.style.color = "#393939";
                            }
                        });
                    },

                    function (dObj, dStr, fp, dayElem) {
                        dayOff.forEach(function (v, k, arr) {
                            if (moment(arr[k], 'DD.MM.YYYY').isSame(dayElem.dateObj)) {
                                dayElem.innerHTML += "<span   class='event busy'></span>";
                            }
                        });
                        celebration.forEach(function (v, k, arr) {
                            if (moment(arr[k], 'DD.MM.YYYY').isSame(dayElem.dateObj)) {
                                dayElem.innerHTML += "<span title='На час пораньше'  class='event celebration'>*</span>";
                            }
                        });
                        holiday.forEach(function (v, k, arr) {
                            if (moment(arr[k], 'DD.MM.YYYY').isSame(dayElem.dateObj)) {
                                dayElem.innerHTML += "<span title='Праздник'  class='event busy holiday'></span>";
                            }
                        });
                    }],

                onChange: function (dObj, dStr, fp, dayElem) {
                    //console.log('dObj', dObj);
                    let f = calendarService.getCountDay(dObj);
                    if (f && $scope.remains)  $scope.remains = ($scope.remainsDub - f);
                },
                //disable: [
                //    function(date) {
                //        // отключить каждый  8 ой
                //        return !(date.getDate() % 2);
                //    }
                //]

                //parseDate: function (str) {
                //    console.log('new Date(str)',new Date(str.selectedDates));
                //    return new Date(str.selectedDates);
                //}
                //maxDate: '31-12-2019'// максимальная дата
                //defaultDate: [moment().year($scope.me.interfaces[0].year)._d, moment().year($scope.me.interfaces[0].year)._d] // по умолчанию какая дата отображается
            };

            io.socket.on('interface', function (e) {
                $scope.yearFrom = e.interfaces[0].year;
                /**
                 * Устанавливаем год интерфейса для пересечений
                 */
                $scope.me.interfaces[0].year = e.interfaces[0].year;
                // $scope.refresh();
                $scope.$apply();
            });

            $scope.fixTwoWeek = function () {
                if (($scope.daysSelectHoliday > 14) && !$scope.item.maxTwoWeek) {
                    toastr.warning(info.maxTwoWeek);
                    return fpItem.clear();
                }
            };

            /**
             * Это функция срабатывает каждый раз после выбора даты
             * Принимает объект flatpicker c вновь выбранными датами или одной датой
             * по сути это обработчик события onChange в документации Flatpickr
             * https://chmln.github.io/flatpickr/options/#eventsAPI
             *
             * console.log('changeMonth', fpItem.changeMonth(1)) - изменяет текущий месяц на один вперед
             * console.log('changeMonth', fpItem.changeMonth(0, false)) - изменяет текущий месяц на январь, после каждого клика
             *
             * @param fpItem
             * @returns {*}
             */
            $scope.datePostSetup = function (fpItem) {
                $scope.flatpicker = fpItem;
                //console.log('SURI++++', moment('2019-02-10T13:30').twix('2019-02-25T13:30'));
                //console.log('SURI--2++++', fpItem.selectedDates);
                //console.log('SURI-fpItem.selectedDates:', moment(fpItem.selectedDates[0]).twix(new Date(fpItem.selectedDates[1])));
                /**
                 * Кол-во выбраных дней
                 */
                let countDayTwix = moment(fpItem.selectedDates[0]).twix(new Date(fpItem.selectedDates[1]));

                console.log('Значение countDayTwix:');
                console.log(countDayTwix);
                $scope.daysSelectHoliday = calendarService.getCountDay(fpItem.selectedDates,countDayTwix);
                if (($scope.daysSelectHoliday > 14) && !$scope.item.maxTwoWeek) {
                    toastr.warning(info.maxTwoWeek);
                }
                if ($scope.intersection) {
                    let x = [];
                    $scope.intersection.forEach(function (val, key, arr) {
                        if (fpItem.selectedDates[0]) {
                            (moment(fpItem.selectedDates[0]).isBetween(val.from, val.to)) ? val.inr = 1 : val.inr = 0;
                            //console.log('#1Проверяемое число c индексом ноль:', fpItem.selectedDates[0]);
                            //console.log('Входит ли в этот промежуток?:', 'c ' + val.from + ' по ' + val.to + ': ' + val.inr);

                            if (!val.inr) {
                                (moment(fpItem.selectedDates[0]).isSame(val.from) || moment(fpItem.selectedDates[0]).isSame(val.to)) ? val.inr = 1 : val.inr = 0;
                                //console.log('#2 Проверяемое число c индексом ноль:', fpItem.selectedDates[0]);
                                //console.log('Входит ли в этот промежуток?:', 'c ' + val.from + ' по ' + val.to + ': ' + val.inr);
                            }

                        }
                        if (fpItem.selectedDates[1] && !val.inr) {
                            (moment(fpItem.selectedDates[1]).isBetween(val.from, val.to)) ? val.inr = 1 : val.inr = 0;
                            //console.log('#1 Проверяемое число c индексом один:', fpItem.selectedDates[1]);
                            //console.log('Входит ли в этот промежуток?:', 'c ' + val.from + ' по ' + val.to + ': ' + val.inr);
                            if (!val.inr) {
                                (moment(fpItem.selectedDates[1]).isSame(val.from) || moment(fpItem.selectedDates[1]).isSame(val.to)) ? val.inr = 1 : val.inr = 0;
                                //console.log('#2 Проверяемое число c индексом один:', fpItem.selectedDates[1]);
                                //console.log('Входит ли в этот промежуток?:', 'c ' + val.from + ' по ' + val.to + ': ' + val.inr);
                            }
                        }

                        if (fpItem.selectedDates[0] && !val.inr && fpItem.selectedDates[1]) {
                            //console.log('******************************************************* // ************************************* ');
                            (moment(val.from).isBetween(fpItem.selectedDates[0], fpItem.selectedDates[1])) ? val.inr = 1 : val.inr = 0;
                            //console.log('Проверяем отпуск на предмет вхождение в промежуток чисел во вновь выбранном отуске.', val.from);
                            //console.log('Входит ли в этот промежуток?:', 'c ' + fpItem.selectedDates[0] + ' по ' + fpItem.selectedDates[1] + ': ' + val.inr);
                        }
                        //console.log('******************************************************* // ************************************* ');

                        x.push(val);
                    });
                    return $scope.intersection = x;
                }
            };

            /**
             * Очищает непосредственно объект Flatpicker в отличие
             * от revert() которая очищает всю форму
             */
            $scope.clear = function () {
                $scope.flatpicker.clear();
                $scope.intersection.forEach(function (val, key, arr) {
                    val.inr = 0;
                })
            };

            /**
             * Прошедшее время сообщений в чате
             */
            $scope.chatTime = function () {
                let y = [];
                $scope.tm.forEach(function (val, key, arr) {
                    val.time = moment(val.createdAt).fromNow();
                    y.push(val);
                });
                return y;
            };

            $scope.$watch('item.owner.id', function (value, old) {
                $scope.getIntersections(value);
                if (value) {

                    Users.get({id: value}, function (user) {

                        $scope.user = user;
                        console.log('USER', user);
                        if (!user.avatarUrl) {
                            $scope.selectAvatarUrl = 'http://via.placeholder.com/99x144';
                        }
                        $scope.selectAvatarUrl = user.avatarUrl;
                        $scope.getDaysYear(value, $scope.yearFrom);
                        //$scope.apply();
                    }, function (err) {
                        console.log('ERRd:', err);
                    });
                }
//
            });

            /**
             * Отпуска из списка пересечений
             */
            $scope.getIntersections = function (id) {
                let query = (id) ? '/vacation/get-intersections/' + id : '/vacation/get-intersections';
                $http.get(query).then(function (response) {
                    $scope.intersection = response.data;
                    $scope.datePostSetup($scope.flatpicker);
                }, function errorCallback(err) {
                    console.log('ERROR:', err);
                });
            };

            $scope.getIntersections();
            $scope.sArr = [];
            $scope.rex = function (arr) {

                if (!angular.isArray(arr)) return arr;
                //if ($scope.flatpicker) console.log('$scope.flatpicker', $scope.flatpicker);
                arr.forEach(function (v, k, ar) {
                    //console.log('v.from:',moment(v.from).year());
                    //console.log('v.from+++:',$scope.interFa);
                    if (moment(v.from).year() == $scope.interFa) {
                        //console.log(' NEEEEEEE111', v);
                        $scope.sArr.push(v);
                    }
                });
                return $scope.sArr;
            };

            $scope.$watch('intersection', function (val) {
                //console.log('$scope.intersection4444444:', val);
                if (val)  $scope.rex(val);
            });

            $scope.refresh = function () {
                let item = $scope.item = Vacations.get({id: $stateParams.vacationId}, function (vacations) {
                        console.log('VACATION ITEM:', vacations);
                        $scope.vacations = vacations;
                        $scope.tm = vacations.chats;
                        $scope.chats = $scope.chatTime();
                        $scope.flatpicker.setDate(vacations.name);

                        item.getBirthday();
                        item.getDateInWork();
                        item.getFiredDate();
                        item.getDecree();
                    }, function (err) {
                        // активируем по умолчанию создаваемую запись
                        item.action = true;
                        item.sc = function () {
                            return 'Отпуск';
                        };

                    }
                );
            };

            $scope.delete2 = function (item) {
                item.$delete({id: item.id}, function (success) {
                    toastr.success(info.objectDelete, info.ok);
                    $state.go(info.redirectSelf);
                    // $location.path("/table");
                    // $scope.$apply(function() { $location.path("/admin/vacations"); });
                    // $scope.refresh();
                }, function (err) {
                    toastr.error(err, info.error + ' 122! ');
                })
            };

            $scope.getArrIntersection = function (item) {
                return $scope.flatpicker;
            };

            $scope.saveEdit = function (item) {
                $scope.fixTwoWeek();
                if (!angular.isDefined(item)) return toastr.error('Нет объекта для сохранения.', 'Ошибка!');
                if (!angular.isDefined(item.name)) return toastr.error('Дата не может быть пустой.', 'Ошибка!');
                if (!angular.isDefined(item.furlough)) return toastr.error('Тип отпуска не может быть пустой.', 'Ошибка!');
                item.from = $scope.flatpicker.selectedDates[0];
                item.to = $scope.flatpicker.selectedDates[1];
                item.daysSelectHoliday = +$scope.daysSelectHoliday;
                if (item.daysSelectHoliday <= 0) return toastr.error('Не корректно выбраны даты отпуска. Возможно выбраны праздничные дни.', 'Ошибка!');
                if (angular.isDefined(item.id) && angular.isDefined(item.name)) {
                    item.$update(item, function (success) {
                            toastr.success(info.changed);
                            //$scope.refresh();
                            $state.go('home.admin.vacations');
                        },
                        function (err) {
                            toastr.error(err.data, info.error + ' 11445!');
                        }
                    );
                } else {
                    if (angular.isDefined(item)) {
                        item.daysSelectHoliday = $scope.daysSelectHoliday;
                        console.log('item:::', item);
                        console.log('furlough::', $scope.furlough);
                        item.$save(item, function (success) {
                                toastr.success(info.newUserOk);
                                //$location.path('/profile') ;
                                $state.go('home.admin.vacation', {vacationId: success.id});
                            },
                            function (err) {
                                //toastr.error(err, 'Ошибка 3990');
                                //console.log('err.data',err.data);
                                toastr.error(err.data, info.error + ' 890');
                            });
                    }
                }
            };

            $scope.addPosition = function () {
                if (angular.isArray($scope.item.positions)) {
                    $scope.item.positions.push({});
                } else {
                    $scope.item.positions = [{}];
                }
            };

            $scope.addFurlough = function () {
                console.log('$scope.item.furloughs', $scope.item.furloughs);
                if (angular.isArray($scope.item.furloughs)) {
                    $scope.item.furloughs.push({});
                } else {
                    $scope.item.furloughs = [{}];
                    //$scope.item.furloughs = [{id:'599d8813b88be82bf00a1771'}];
                }
            };

            $scope.removeFurlough = function (furlough) {
                $scope.item.furloughRemove = [];
                if (!furlough.id) $scope.item.furloughs = [];
                for (let i = 0, ii = $scope.item.furloughs.length; i < ii; i++) {
                    if ($scope.item.furloughs[i].id === furlough.id) {
                        $scope.item.furloughs.splice(i, 1);
                        $scope.item.furloughRemove.push(furlough.id);
                        return;
                    }
                }
            };

            $scope.isCancelDisabled = function () {
                return angular.equals(master, $scope.form);
            };

            $scope.isSaveDisabled = function () {
                return $scope.myForm.$invalid || angular.equals(item, $scope.form);
            };

            let original = angular.copy($scope.item);

            $scope.revert = function () {
                $scope.item = angular.copy(original);
            };

            $scope.canRevert = function () {
                return !angular.equals($scope.item, original);
            };

            $scope.dub = function (item) {
                //let item = angular.copy($scope.item);
                $http.get('/vacation/dub/' + item.owner.id + '/' + item.furlough.id)
                    .then(function onSuccess(sailsResponse) {

                        $scope.item2 = sailsResponse.data;
                        console.log('--------------RTTT: ', $scope.item2);

                    })
                    .catch(function onError(sailsResponse) {
                        console.log(sailsResponse);
                    })
                    .finally(function eitherWay() {
                        $scope.userList.loading = false;
                    });
                //$state.go('home.admin.vacations.create',item);
                $scope.$watch('item2', function (val, old) {
                    console.log('VVal', val);
                    console.log('VVal -old', old);
                    if (val) {
                        $scope.item.owner = $scope.item2.owner;
                        $scope.item.furlough = $scope.item2.furlough;

                    }
                });
                $state.go('home.admin.vacations.create', {ownerId: '59661ce496798b6c1ae0624a', furloughId: '599d87cbb88be82bf00a176f'});

            };
            $scope.refresh();

            //if(!edit){
            //
            //    $scope.ownerId = window.location.pathname.split('/')[4];
            //    $scope.furloughId = window.location.pathname.split('/')[5];
            //    $scope.item = {owner:{id:$scope.ownerId}, furlough:{id:$scope.furloughId}}
            //}
        }]);


text:
<?xml version="1.0" encoding="UTF-8"?>
<Form xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<WindowOpeningMode>LockOwnerWindow</WindowOpeningMode>
	<VerticalScroll>useIfNecessary</VerticalScroll>
	<UseForFoldersAndItems>Items</UseForFoldersAndItems>
	<AutoCommandBar name="ФормаКоманднаяПанель" id="-1"/>
	<Events>
		<Event name="AfterWriteAtServer">ПослеЗаписиНаСервере</Event>
		<Event name="OnCreateAtServer">ПриСозданииНаСервере</Event>
	</Events>
	<ChildItems>
		<UsualGroup name="ГруппаОрганизацияВалюта" id="15">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Группа организация валюта</v8:content>
				</v8:item>
			</Title>
			<ToolTip>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Группа организация валюта</v8:content>
				</v8:item>
			</ToolTip>
			<Group>Horizontal</Group>
			<Representation>None</Representation>
			<ShowTitle>false</ShowTitle>
			<ExtendedTooltip name="ГруппаОрганизацияВалютаExtendedTooltip" id="28"/>
			<ChildItems>
				<InputField name="Владелец" id="5">
					<DataPath>Объект.Owner</DataPath>
					<EditMode>EnterOnInput</EditMode>
					<ContextMenu name="ВладелецКонтекстноеМеню" id="6"/>
					<ExtendedTooltip name="ВладелецExtendedTooltip" id="29"/>
				</InputField>
				<InputField name="ВалютаДенежныхСредств" id="11">
					<DataPath>Объект.ВалютаДенежныхСредств</DataPath>
					<Title>
						<v8:item>
							<v8:lang>ru</v8:lang>
							<v8:content>Валюта</v8:content>
						</v8:item>
					</Title>
					<EditMode>EnterOnInput</EditMode>
					<ContextMenu name="ВалютаДенежныхСредствКонтекстноеМеню" id="12"/>
					<ExtendedTooltip name="ВалютаДенежныхСредствExtendedTooltip" id="30"/>
				</InputField>
			</ChildItems>
		</UsualGroup>
		<InputField name="ТипКассы" id="9">
			<DataPath>Объект.ТипКассы</DataPath>
			<EditMode>EnterOnInput</EditMode>
			<ChoiceButton>false</ChoiceButton>
			<ChoiceList>
				<xr:Item>
					<xr:Presentation/>
					<xr:CheckState>0</xr:CheckState>
					<xr:Value xsi:type="FormChoiceListDesTimeValue">
						<Presentation/>
						<Value xsi:type="xr:DesignTimeRef">Enum.ТипыКассККМ.EnumValue.ФискальныйРегистратор</Value>
					</xr:Value>
				</xr:Item>
				<xr:Item>
					<xr:Presentation/>
					<xr:CheckState>0</xr:CheckState>
					<xr:Value xsi:type="FormChoiceListDesTimeValue">
						<Presentation/>
						<Value xsi:type="xr:DesignTimeRef">Enum.ТипыКассККМ.EnumValue.АвтономнаяККМ</Value>
					</xr:Value>
				</xr:Item>
			</ChoiceList>
			<ChoiceListButton>true</ChoiceListButton>
			<ContextMenu name="ТипКассыКонтекстноеМеню" id="10"/>
			<ExtendedTooltip name="ТипКассыExtendedTooltip" id="31"/>
			<Events>
				<Event name="OnChange">ТипКассыПриИзменении</Event>
			</Events>
		</InputField>
		<CheckBoxField name="АвтоматическаяИнкассация" id="16">
			<DataPath>Объект.АвтоматическаяИнкассация</DataPath>
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Автоматическая инкассация при снятии Z-отчета на фискальном регистраторе</v8:content>
				</v8:item>
			</Title>
			<TitleLocation>Right</TitleLocation>
			<CheckBoxType>Auto</CheckBoxType>
			<ContextMenu name="АвтоматическаяИнкассацияКонтекстноеМеню" id="17"/>
			<ExtendedTooltip name="АвтоматическаяИнкассацияExtendedTooltip" id="32"/>
		</CheckBoxField>
		<InputField name="СкладПодключаемогоОборудования" id="20">
			<DataPath>СкладПодключаемогоОборудования</DataPath>
			<ReadOnly>true</ReadOnly>
			<ContextMenu name="СкладПодключаемогоОборудованияКонтекстноеМеню" id="21"/>
			<ExtendedTooltip name="СкладПодключаемогоОборудованияExtendedTooltip" id="33"/>
		</InputField>
		<InputField name="Склад" id="7">
			<DataPath>Объект.Склад</DataPath>
			<EditMode>EnterOnInput</EditMode>
			<ContextMenu name="СкладКонтекстноеМеню" id="8"/>
			<ExtendedTooltip name="СкладExtendedTooltip" id="34"/>
		</InputField>
		<CheckBoxField name="ИспользоватьБезПодключенияОборудования" id="18">
			<DataPath>Объект.ИспользоватьБезПодключенияОборудования</DataPath>
			<TitleLocation>Right</TitleLocation>
			<CheckBoxType>Auto</CheckBoxType>
			<ContextMenu name="ИспользоватьБезПодключенияОборудованияКонтекстноеМеню" id="19"/>
			<ExtendedTooltip name="ИспользоватьБезПодключенияОборудованияExtendedTooltip" id="35"/>
			<Events>
				<Event name="OnChange">ИспользоватьБезПодключенияОборудованияПриИзменении</Event>
			</Events>
		</CheckBoxField>
		<InputField name="ПодключаемоеОборудование" id="13">
			<DataPath>Объект.ПодключаемоеОборудование</DataPath>
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Оборудование</v8:content>
				</v8:item>
			</Title>
			<EditMode>EnterOnInput</EditMode>
			<ContextMenu name="ПодключаемоеОборудованиеКонтекстноеМеню" id="14"/>
			<ExtendedTooltip name="ПодключаемоеОборудованиеExtendedTooltip" id="36"/>
			<Events>
				<Event name="OnChange">ПодключаемоеОборудованиеПриИзменении</Event>
			</Events>
		</InputField>
		<InputField name="РегистрационныйНомер" id="22">
			<DataPath>Объект.РегистрационныйНомер</DataPath>
			<ContextMenu name="РегистрационныйНомерКонтекстноеМеню" id="23"/>
			<ExtendedTooltip name="РегистрационныйНомерExtendedTooltip" id="37"/>
		</InputField>
		<InputField name="СерийныйНомер" id="24">
			<DataPath>Объект.СерийныйНомер</DataPath>
			<ContextMenu name="СерийныйНомерКонтекстноеМеню" id="25"/>
			<ExtendedTooltip name="СерийныйНомерExtendedTooltip" id="38"/>
		</InputField>
		<InputField name="Подразделение" id="26">
			<DataPath>Объект.Подразделение</DataPath>
			<ContextMenu name="ПодразделениеКонтекстноеМеню" id="27"/>
			<ExtendedTooltip name="ПодразделениеExtendedTooltip" id="39"/>
		</InputField>
		<InputField name="Наименование" id="3">
			<DataPath>Объект.Description</DataPath>
			<EditMode>EnterOnInput</EditMode>
			<ChoiceListButton>true</ChoiceListButton>
			<ContextMenu name="НаименованиеКонтекстноеМеню" id="4"/>
			<ExtendedTooltip name="НаименованиеExtendedTooltip" id="40"/>
			<Events>
				<Event name="StartListChoice">НаименованиеНачалоВыбораИзСписка</Event>
			</Events>
		</InputField>
	</ChildItems>
	<Attributes>
		<Attribute name="Объект" id="1">
			<Type>
				<v8:Type>cfg:CatalogObject.КассыККМ</v8:Type>
			</Type>
			<MainAttribute>true</MainAttribute>
			<SavedData>true</SavedData>
		</Attribute>
		<Attribute name="СкладПодключаемогоОборудования" id="2">
			<Title>
				<v8:item>
					<v8:lang>ru</v8:lang>
					<v8:content>Склад</v8:content>
				</v8:item>
			</Title>
			<Type>
				<v8:Type>cfg:CatalogRef.Склады</v8:Type>
			</Type>
		</Attribute>
	</Attributes>
</Form>


text:
import { getNumber } from "./wasm.wat";

export function run() {
	return getNumber();
}