text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="google-site-verification" content="RLMlgVNb35x1XM8Xpz8WxiUgDbHE6Zq3zHt2y0nrFTQ" />
    <title>Acadent - dental clinic in Novaliches Proper (bayan), Quezon city</title>
    <meta name="description" content="Get the best deals on dental treatments from Acadent Care Clinic located in Novaliches Proper (bayan), Novaliches Quezon City.">

    <link href="css/bootstrap.min.css" rel="stylesheet">

    <link href="css/stylish-portfolio.css" rel="stylesheet">

    <link href="font-awesome-4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">

                Acadent

                Home

                About

                Services

                Clinic

                Contact

Dental Care Clinic

            Explore site

Dental care clinic in Novaliches, Quezon City

We're committed to providing exceptional dental health care for you.
 Because at Acadent Dental care clinic, when you smile, we smile

Our Services

                                    {{ service.name }}

                                    {{ service.description }}

<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
  View all services
</button>

        <button type="button" class="close" data-dismiss="modal">×Close</button>

Acadent Dental Services

Dental Braces

Dentures

Dental Cleaning/Oral Prophylaxis

Dental Bridges

Dental Crowns

Root Canal Treatment

Teeth Whitening

Invisalign®

Tooth Extraction

Tooth Color Restoration

Dental Xrays

Inquire about our services now. Call or Text: 09174398033 / (02) 501-8732

        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>

Got Dental Problems?

Talk to us: 09174398033 / (02) 501-8732

The Clinic

We would love to connect with you. Like and Follow us!

                    Facebook
                    Twitter

Acadent Dental Care Clinic

237 Gen Luis St., Corner Mendoza Compound
 Novaliches Proper (bayan), Novaliches, Quezon City

 09174398033 / (02) 501-8732

  acadentph@gmail.com

Copyright © acadentdentalclinic.com 2014


text:
CacheStorage::CacheStorage(QObject *parent) :
    QObject(parent)
{
}

redpajama_set_name: RedPajamaGithub


text:
use std::{fmt, io, mem};
use std::collections::HashSet;
use std::iter::FromIterator;
use std::net::SocketAddr;
use std::ops::Range;

use futures::{Future, Poll};
use tokio_core::net::UdpSocket;
use tokio_core::reactor::{Core, Handle};
use transient_hashmap::TransientHashMap;

use super::{Server, State, new_buf};
use super::configuration::ServerConfiguration;
use common::error::*;
use crypto::Crypto;
use transport::network::{IPV4_HEADER_LEN, IPv4Header};
use tun::os::tokio::Device;

type ClientId = u32;
type ClientToken = u64;
type ClientMetadata = (ClientToken, SocketAddr);

#[derive(Debug)]
pub struct AkarinServer<'a> {
    tun: Device,
    udp: UdpSocket,

    crypto: &'a Crypto,

    clients: ClientStorage,

    tun_buf: Vec<u8>,
    udp_buf: Vec<u8>,

    state: State,
}

pub struct ClientStorage {
    id_set: HashSet<ClientId>,
    storage: TransientHashMap<ClientId, ClientMetadata>,
}

impl ClientStorage {
    pub fn new(id_range: Range<ClientId>, lifetime: u32) -> Self {
        ClientStorage {
            id_set: HashSet::from_iter(id_range.into_iter()),
            storage: TransientHashMap::new(lifetime),
        }
    }

    pub fn available_ids(&self) -> Vec<ClientId> {
        self.id_set.iter().map(|i| *i).collect()
    }

    pub unsafe fn reserve_id(&mut self, id: ClientId) -> Result<ClientId> {
        if !self.id_set.remove(&id) {
            return Err(ErrorKind::ReserveClientIDFailed.into());
        }
        Ok(id)
    }

    fn next_id(&self) -> Option<&ClientId> {
        self.id_set.iter().nth(0)
    }

    pub fn insert_client(&mut self, meta: &ClientMetadata) -> Result<ClientId> {
        let id = {
            match self.next_id() {
                Some(id) => id.clone(),
                None => return Err(ErrorKind::MaxClientExceed.into()),
            }
        };
        self.id_set.remove(&id);
        self.storage.insert(id, *meta);

        Ok(id)
    }

    pub fn refresh_client(&mut self, id: ClientId, meta: &ClientMetadata) -> Result<()> {
        if !self.compare_client(id, meta) {
            return Err(ErrorKind::NoSuchClientID.into());
        }

        self.storage.insert(id, *meta);
        Ok(())
    }

    pub fn get(&mut self, id: ClientId) -> Option<&ClientMetadata> {
        self.storage.get(&id)
    }

    pub fn compare_client(&mut self, id: ClientId, meta: &ClientMetadata) -> bool {
        if self.id_set.contains(&id) {
            return false;
        }

        if let Some(ref stored) = self.storage.get(&id) {
            if stored == &meta {
                return true;
            }
        }
        false
    }

    pub fn remove_client(&mut self, id: ClientId) {
        self.id_set.insert(id);
        self.storage.remove(&id);
    }

    pub fn prune(&mut self) {
        for id in self.storage.prune().iter() {
            self.id_set.insert(*id);
        }
    }
}

impl fmt::Debug for ClientStorage {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        f.debug_map().entries(self.storage.iter()).finish()
    }
}

impl<'a> AkarinServer<'a> {
    fn new<'b>(tun: Device, crypto: &'a Crypto, udp: UdpSocket, configuration: &'b ServerConfiguration) -> Self {
        AkarinServer {
            tun,
            crypto,
            udp,

            clients: ClientStorage::new(0..255, configuration.client_timeout.unwrap_or(60)),

            tun_buf: new_buf(configuration.mtu.unwrap_or(1432) as usize),
            udp_buf: new_buf(configuration.mtu.unwrap_or(1432) as usize),

            state: State::Down,
        }
    }
}

impl<'a> Future for AkarinServer<'a> {
    type Item = ();
    type Error = io::Error;

    fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
        loop {
            if try_nb!(self.tun.read(&mut self.tun_buf)) < *IPV4_HEADER_LEN {
                return Err(io::ErrorKind::UnexpectedEof.into());
            };

            let header = {
                let mut header_bytes = [0u8; 20];
                header_bytes.copy_from_slice(&self.tun_buf[..*IPV4_HEADER_LEN]);
                IPv4Header::from(header_bytes)
            };

            let client_id = header.destination_address;
            if let Some(&(token, sockaddr)) = self.clients.get(client_id) {}
        }
    }
}

impl<'a> Server for AkarinServer<'a> {
    fn serve(mut self, mut core: Core, handle: Handle) -> Result<()> {
        core.run(self);
        Ok(())
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use std::str::FromStr;

    #[test]
    fn test_client_storage() {
        let reserved = 2..10;
        let ref mut us = ClientStorage::new(0..255, 60);
        for r in reserved {
            unsafe {
                us.reserve_id(r).unwrap();
            }
        }

        let available_ids = us.available_ids();
        for id in available_ids {
            assert!(id < 2 || id >= 10);
        }

        let client = (123u64, SocketAddr::from_str("192.168.1.1:80").unwrap());
        let cid = us.insert_client(&client).unwrap();
        us.refresh_client(cid, &client).unwrap();
        assert!(us.refresh_client(cid + 1, &client).is_err());
        assert!(us.compare_client(cid, &client));
        assert_eq!(us.get(cid).unwrap(), &client);
        assert!(us.get(cid + 1).is_none());
    }
}


text:
package org.aksw.openqa.component.object;

import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;

public abstract class AbstractObject implements IObject {

	private Map<String, Object> params = new HashMap<String, Object>();

	public boolean contains(String propertyId) {
		return params.containsKey(propertyId);
	}

	public boolean contains(String propertyId, Class<?> clazz) {
		return ((params.containsKey(propertyId)) && (getParam(propertyId, clazz) != null));
	}

	public Object getParam(String propertyId) {
		return params.get(propertyId);
	}

	public <T> T getParam(String propertyId, Class<T> clazz) {
		Object property = params.get(propertyId);
		if(property != null && clazz.isAssignableFrom(property.getClass())) {
			@SuppressWarnings("unchecked")
			T tProperty = (T) property;
			return tProperty;
		}
		return null;
	}

	public void setParam(String propertyId, Object o) {
		params.put(propertyId, o);
	}

	public void setProperties(Map<String, Object> entries) {
		if(entries != null) {
			for(Entry<String, Object> entry : entries.entrySet()) {
				params.put(entry.getKey(), entry.getValue());
			}
		}
	}

	public Map<String, Object> getParameters() {
		return params;
	}
}


text:
==================
Heat Transfer (ht)
==================

.. image:: http://img.shields.io/pypi/v/ht.svg?style=flat
   :target: https://pypi.python.org/pypi/ht
   :alt: Version_status
.. image:: http://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat
   :target: https://ht.readthedocs.io/en/latest/
   :alt: Documentation
.. image:: https://github.com/CalebBell/ht/workflows/Build/badge.svg
   :target: https://github.com/CalebBell/ht/actions
   :alt: Build_status
.. image:: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
   :target: https://github.com/CalebBell/ht/blob/release/LICENSE.txt
   :alt: license
.. image:: https://img.shields.io/pypi/pyversions/ht.svg?
   :target: https://pypi.python.org/pypi/ht
   :alt: Supported_versions
.. image:: http://img.shields.io/appveyor/ci/calebbell/ht.svg?
   :target: https://ci.appveyor.com/project/calebbell/ht/branch/release
   :alt: Build_status
.. image:: https://zenodo.org/badge/48963057.svg?
   :alt: Zendo
   :target: https://zenodo.org/badge/latestdoi/48963057

.. contents::

What is ht?
-----------

ht is open-source software for engineers and technicians working in the
fields of chemical or mechanical engineering. It includes modules
for various heat transfer functions.

Among the tasks this library can be used for are:

* Sizing a Shell & Tube heat exchanger using any of the Zukauskas, ESDU 73031, or Bell methods
* Calculating pressure drop in a Hairpin heat exchanger
* Calculating heat loss of objects, including insulated objects
* Calculating heat loss from buried pipe
* Performing radiative heat transfer calculations
* Conderser and Reboiler rating
* Detailed heat exchanger evaluation; finding fouling factors
* Heat transfer in packed beds
* Sizing a Plate and Frame heat exchanger
* Modeling an Air Cooler
* Supercritical CO2 or water heat transfer

The ht library depends on the SciPy library to provide numerical constants,
interpolation, integration, and numerical solving functionality. ht runs on
all operating systems which support Python, is quick to install, and is free
of charge. ht is designed to be easy to use while still providing powerful
functionality. If you need to perform some heat transfer calculations, give
ht a try.

Installation
------------

Get the latest version of ht from
https://pypi.python.org/pypi/ht/

If you have an installation of Python with pip, simple install it with:

    $ pip install ht

Alternatively, if you are using `conda <https://conda.io/en/latest/>`_ as your package management, you can simply
install ht in your environment from `conda-forge <https://conda-forge.org/>`_ channel with:

    $ conda install -c conda-forge ht

To get the git version, run:

    $ git clone git://github.com/CalebBell/ht.git

Documentation
-------------

ht's documentation is available on the web:

    https://ht.readthedocs.io/en/latest/index.html

Latest source code
------------------

The latest development version of ht's sources can be obtained at

    https://github.com/CalebBell/ht

Bug reports
-----------

To report bugs, please use the ht's Bug Tracker at:

    https://github.com/CalebBell/ht/issues

License information
-------------------

ht is MIT licensed. See ``LICENSE.txt`` for information on the terms &
conditions for usage of this software, and a DISCLAIMER OF ALL WARRANTIES.

Although not required by the ht license, if it is convenient for you,
please cite ht if used in your work. Please also consider contributing
any changes you make back, such that they may be incorporated into the
main library and all of us will benefit from them.

Citation
--------

To cite ht in publications use::

    Caleb Bell (2016-2021). ht: Heat transfer component of Chemical Engineering Design Library (ChEDL)
    https://github.com/CalebBell/ht.


text:
<?php

namespace Web\BackBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class LessonType extends AbstractType
{
    /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('subject')
            ->add('description')
        ;

        $builder->add('save' , 'submit');
    }

    /**
     * @param OptionsResolverInterface $resolver
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Web\BackBundle\Entity\Lesson'
        ));
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'web_backbundle_lesson';
    }
}


text:
/**
 *
JSON Web Encryption ladder key exchange.

 *
 *
The key ladder consists of a symmetric wrapping key used to protect the
 * session keys. The wrapping key is only permitted to wrap and unwrap data. It
 * cannot be used for encrypt/decrypt or sign/verify operations.

 *
 *
The wrapping key is protected by wrapping it with a known common key
 * (e.g. preshared keys), a provided public key (e.g. client-generated RSA key
 * pair), or the previously used wrapping key. The previous wrapping key must
 * be provided by the requesting entity in the form found in the response
 * data.

 *
 *
The wrapping key is always an AES-128 key for AES key wrap/unwrap.

 *
 *
This key exchange scheme does not provide perfect forward secrecy and
 * should only be used if necessary to satisfy other security requirements.

 *
 * @author Wesley Miaw <wmiaw@netflix.com>
 */
(function(require, module) {
	"use strict";

	var KeyRequestData = require('../keyx/KeyRequestData.js');
	var KeyResponseData = require('../keyx/KeyResponseData.js');
	var KeyExchangeScheme = require('../keyx/KeyExchangeScheme.js');
	var MslInternalException = require('../MslInternalException.js');
	var AsyncExecutor = require('../util/AsyncExecutor.js');
	var Arrays = require('../util/Arrays.js');
	var Base64 = require('../util/Base64.js');
	var MslKeyExchangeException = require('../MslKeyExchangeException.js');
	var MslError = require('../MslError.js');
	var MslEncoderException = require('../io/MslEncoderException.js');
	var MslEncodingException = require('../MslEncodingException.js');
	var MslMasterTokenException = require('../MslMasterTokenException.js');
	var PresharedAuthenticationData = require('../entityauth/PresharedAuthenticationData.js');
	var EntityAuthenticationScheme = require('../entityauth/EntityAuthenticationScheme.js');
	var JsonWebEncryptionCryptoContext = require('../crypto/JsonWebEncryptionCryptoContext.js');
	var WebCryptoAlgorithm = require('../crypto/WebCryptoAlgorithm.js');
	var KeyExchangeFactory = require('../keyx/KeyExchangeFactory.js');
	var MasterToken = require('../tokens/MasterToken.js');
	var WebCryptoUsage = require('../crypto/WebCryptoUsage.js');
	var MslException = require('../MslException.js');
	var MslCryptoException = require('../MslCryptoException.js');
	var SessionCryptoContext = require('../crypto/SessionCryptoContext.js');
	var SecretKey = require('../crypto/SecretKey.js');

    /**
     * Wrapping key wrap mechanism.
     * @enum {string}
     */
    var Mechanism = {
        /** Wrapping key wrapped by PSK (AES-128 key wrap). */
        PSK: "PSK",
        /** Wrapping key wrapped by previous wrapping key (AES-128 key wrap). */
        WRAP: "WRAP",
    };

    /**
     * Key wrap key wrapping mechanism.
     * @const
     * @type {string}
     */
    var KEY_MECHANISM = "mechanism";
    /**
     * Key wrap data.
     * @const
     * @type {string}
     */
    var KEY_WRAPDATA = "wrapdata";
    /**
     * Key wrapping key.
     * @const
     * @type {string}
     */
    var KEY_WRAP_KEY = "wrapkey";
    /**
     * Key encrypted encryption key.
     * @const
     * @type {string}
     */
    var KEY_ENCRYPTION_KEY = "encryptionkey";
    /**
     * Key encrypted HMAC key.
     * @const
     * @type {string}
     */
    var KEY_HMAC_KEY = "hmackey";

    /**
     *
JSON Web Encryption ladder key request data.

     *
     *

     * {@code {
     *   "#mandatory" : [ "mechanism" ],
     *   "mechanism" : "enum(PSK|MGK|WRAP)",
     *   "wrapdata" : "binary",
     * }} where:
     *

     *
{@code mechanism} identifies the mechanism for wrapping and unwrapping the wrapping key

     *
{@code wrapdata} the wrapping data for the previous wrapping key

     *

     */
    var RequestData = KeyRequestData.extend({
        /**
         *
Create a new JSON Web Encryption ladder key request data instance
         * with the specified mechanism and wrapping key data.

         *
         *
Arguments not applicable to the specified mechanism are
         * ignored.

         *
         * @param {Mechanism} mechanism the wrap key wrapping mechanism.
         * @param {?Uint8Array} wrapdata the wrap data for reconstructing the previous
         *        wrapping key. May be null if the mechanism does not use the
         *        previous wrapping key.
         * @throws MslInternalException if the mechanism requires wrap data and
         *         the required argument is null.
         */
        init: function init(mechanism, wrapdata) {
            init.base.call(this, KeyExchangeScheme.JWE_LADDER);

            switch (mechanism) {
                case Mechanism.WRAP:
                    if (!wrapdata)
                        throw new MslInternalException("Previous wrapping key based key exchange requires the previous wrapping key data and ID.");
                    break;
                default:
                    wrapdata = null;
                    break;
            }

            // The properties.
            var props = {
                mechanism: { value: mechanism, writable: false, configurable: false },
                wrapdata: { value: wrapdata, writable: false, configurable: false },
            };
            Object.defineProperties(this, props);
        },

        /** @inheritDoc */
        getKeydata: function getKeydata(encoder, format, callback) {
            AsyncExecutor(callback, function() {
                var mo = encoder.createObject();
                mo.put(KEY_MECHANISM, this.mechanism);
                if (this.wrapdata) mo.put(KEY_WRAPDATA, this.wrapdata);
                return mo;
            }, this);
        },

        /** @inheritDoc */
        equals: function equals(that) {
            if (that === this) return true;
            if (!(that instanceof RequestData)) return false;
            return equals.base.call(this, that) &&
                this.mechanism == that.mechanism &&
                Arrays.equal(this.wrapdata, that.wrapdata);
        },

        /** @inheritDoc */
        uniqueKey: function uniqueKey() {
            var key = uniqueKey.base.call(this) + ':' + this.mechanism;
            if (this.wrapdata)
                key += ':' + Arrays.hashCode(this.wrapdata);
            return key;
        },
    });

    /**
     * Create a new JSON Web Encryption ladder key request data instance
     * from the provided MSL object.
     *
     * @param {MslObject} keyRequestMo the MSL object.
     * @throws MslEncodingException if there is an error parsing the data.
     * @throws MslCryptoException the wrapped key data cannot be verified
     *         or decrypted, or the specified mechanism is not supported.
     * @throws MslKeyExchangeException if the specified mechanism is not
     *         recognized.
     */
    var RequestData$parse = function RequestData$parse(keyRequestMo) {
        var mechanism;
        try {
            mechanism = keyRequestMo.getString(KEY_MECHANISM);
            if (!Mechanism[mechanism])
                throw new MslKeyExchangeException(MslError.UNIDENTIFIED_KEYX_MECHANISM, mechanism);
        } catch (e) {
            if (e instanceof MslEncoderException)
                throw new MslEncodingException(MslError.MSL_PARSE_ERROR, "keydata " + keyRequestMo, e);
            throw e;
        }

        var wrapdata;
        try {
            switch (mechanism) {
                case Mechanism.PSK:
                {
                    wrapdata = null;
                    break;
                }
                case Mechanism.WRAP:
                {
                    wrapdata = keyRequestMo.getBytes(KEY_WRAPDATA);
                    if (wrapdata.length == 0)
                        throw new MslKeyExchangeException(MslError.KEYX_WRAPPING_KEY_MISSING, "keydata " + keyRequestMo);
                    break;
                }
                default:
                    throw new MslCryptoException(MslError.UNSUPPORTED_KEYX_MECHANISM, mechanism);
            }
        } catch (e) {
            if (e instanceof MslEncoderException)
                throw new MslEncodingException(MslError.MSL_PARSE_ERROR, "keydata " + keyRequestMo, e);
            throw e;
        }

        return new RequestData(mechanism, wrapdata);
    };

    /**
     *
JSON Web Encryption ladder key response data.

     *
     *

     * {@code {
     *   "#mandatory" : [ "wrapkey", "wrapdata", "encryptionkey", "hmackey" ],
     *   "wrapkey" : "binary",
     *   "wrapdata" : "binary",
     *   "encryptionkey" : "binary",
     *   "hmackey" : "binary",
     * }} where:
     *

     *
{@code wrapkey} the new wrapping key in JWE format, wrapped by the wrapping key

     *
{@code wrapdata} the wrapping key data for use in subsequent key request data

     *
{@code encryptionkey} the session encryption key in JWE format, wrapped with the new wrapping key

     *
{@code hmackey} the session HMAC key in JWE format, wrapped with the new wrapping key

     *

     */
    var ResponseData = KeyResponseData.extend({
        /**
         * Create a new JSON Web Encryption ladder key response data instance
         * with the provided master token and wrapped keys.
         *
         * @param {MasterToken} masterToken the master token.
         * @param {Uint8Array} wrapKey the wrapped wrap key.
         * @param {Uint8Array} wrapdata the wrap data for reconstructing the wrap key.
         * @param {Uint8Array} encryptionKey the wrap key wrapped encryption key.
         * @param {Uint8Array} hmacKey the wrap key wrapped HMAC key.
         */
        init: function init(masterToken, wrapKey, wrapdata, encryptionKey, hmacKey) {
            init.base.call(this, masterToken, KeyExchangeScheme.JWE_LADDER);

            // The properties.
            var props = {
                wrapKey: { value: wrapKey, writable: false, configurable: false },
                wrapdata: { value: wrapdata, writable: false, configurable: false },
                encryptionKey: { value: encryptionKey, writable: false, configurable: false },
                hmacKey: { value: hmacKey, writable: false, configurable: false },
            };
            Object.defineProperties(this, props);
        },

        /** @inheritDoc */
        getKeydata: function getKeydata(encoder, format, callback) {
            AsyncExecutor(callback, function() {
                var mo = encoder.createObject();
                mo.put(KEY_WRAP_KEY, this.wrapKey);
                mo.put(KEY_WRAPDATA, this.wrapdata);
                mo.put(KEY_ENCRYPTION_KEY, this.encryptionKey);
                mo.put(KEY_HMAC_KEY, this.hmacKey);
                return mo;
            }, this);
        },

        /** @inheritDoc */
        equals: function equals(that) {
            if (this === that) return true;
            if (!(that instanceof ResponseData)) return false;
            return equals.base.call(this, that) &&
                Arrays.equal(this.wrapKey, that.wrapKey) &&
                Arrays.equal(this.wrapdata, that.wrapdata) &&
                Arrays.equal(this.encryptionKey, that.encryptionKey) &&
                Arrays.equal(this.hmacKey, that.hmacKey);
        },

        /** @inheritDoc */
        uniqueKey: function uniqueKey() {
            var key = uniqueKey.base.call(this) +
                ':' + Arrays.hashCode(this.wrapKey) +
                ':' + Arrays.hashCode(this.wrapdata) +
                ':' + Arrays.hashCode(this.encryptionKey) +
                ':' + Arrays.hashCode(this.hmacKey);
            return key;
        }
    });

    /**
     * Create a new JSON Web Encryption ladder key response data instance
     * with the provided master token from the provided MSL object.
     *
     * @param {MasterToken} masterToken the master token.
     * @param {object} keyDataMo the MSL object.
     * @throws MslEncodingException if there is an error parsing the data.
     * @throws MslKeyExchangeException if the mechanism is not recognized.
     */
    var ResponseData$parse = function ResponseData$parse(masterToken, keyDataMo) {
        try {
            var wrapKey = keyDataMo.getBytes(KEY_WRAP_KEY);
            var wrapdata = keyDataMo.getBytes(KEY_WRAPDATA);
            var encryptionKey = keyDataMo.getBytes(KEY_ENCRYPTION_KEY);
            var hmacKey = keyDataMo.getBytes(KEY_HMAC_KEY);
            return new ResponseData(masterToken, wrapKey, wrapdata, encryptionKey, hmacKey);
        } catch (e) {
            if (e instanceof MslEncoderException)
                throw new MslEncodingException(MslError.MSL_PARSE_ERROR, "keydata " + keyDataMo, e);
            throw e;
        }
    };

    /**
     * Create the crypto context identified by the mechanism.
     *
     * @param {MslContext} ctx MSL context.
     * @param {KeySetStore} store key set store.
     * @param {Mechanism} mechanism the wrap key wrapping mechanism.
     * @param {Uint8Array} wrapdata the wrap key previous wrapping key data. May be null.
     * @param {string} identity the entity identity.
     * @param {result: function(ICryptoContext), error: function(Error)}
     *        callback the callback that will receive the crypto context or any
     *        thrown exceptions.
     * @throws MslCryptoException if the crypto context cannot be created.
     * @throws MslKeyExchangeException if the mechanism is unsupported.
     * @throws MslEntityAuthException if there is a problem with the entity
     *         identity.
     */
    function createCryptoContext(ctx, store, mechanism, wrapdata, identity, callback) {
        AsyncExecutor(callback, function() {
            switch (mechanism) {
                // FIXME: For PSK/MGK we need some way to get a JsonWebEncryptionCryptoContext
                // that might run remotely. In other words, some other CryptoContext. Maybe
                // the WrapCryptoContextRepository can be used for that.
                case Mechanism.PSK:
                {
                    var keys = store.getKeys(identity);
                    if (!keys)
                        throw new MslKeyExchangeException(MslError.KEYX_IDENTITY_NOT_FOUND, "jwkle " + identity);
                    var kxe = keys.encryptionKey;
                    return new JsonWebEncryptionCryptoContext(ctx, JsonWebEncryptionCryptoContext.Algorithm.A128KW, JsonWebEncryptionCryptoContext.Encryption.A128GCM, kxe);
                }
                case Mechanism.WRAP:
                {
                    var cryptoContext = ctx.getMslCryptoContext();
                    var encoder = ctx.getMslEncoderFactory();
                    cryptoContext.unwrap(wrapdata, WebCryptoAlgorithm.A128KW, WebCryptoAlgorithm.WRAP_UNWRAP, encoder, {
                        result: function(wrapKey) {
                            AsyncExecutor(callback, function() {
                                return new JsonWebEncryptionCryptoContext(ctx, JsonWebEncryptionCryptoContext.Algorithm.A128KW, JsonWebEncryptionCryptoContext.Encryption.A128GCM, wrapKey);
                            });
                        },
                        error: callback.error,
                    });
                    return;
                }
                default:
                    throw new MslKeyExchangeException(MslError.UNSUPPORTED_KEYX_MECHANISM, mechanism);
            }
        });
    }

    var JsonWebEncryptionLadderExchange = module.exports = KeyExchangeFactory.extend({
        /**
         * Create a new JSON Web Encryption ladder key exchange factory.
         *
         * @param {KeySetStore} store key set store.
         * @param {WrapCryptoContextRepository} repository the wrapping key crypto context repository.
         * @param {AuthenticationUtils} authentication utilities.
         */
        init: function init(store, repository, authutils) {
            init.base.call(this, KeyExchangeScheme.JWE_LADDER);

            // The properties.
            var props = {
                store: { value: store, writable: false, enumerable: false, configurable: false },
                repository: { value: repository, writable: false, enumerable: false, configurable: false },
                authutils: { value: authutils, writable: false, enumerable: false, configurable: false },
            };
            Object.defineProperties(this, props);
        },

        /** @inheritDoc */
        createRequestData: function createRequestData(ctx, keyRequestMo, callback) {
            AsyncExecutor(callback, function() {
                return RequestData$parse(keyRequestMo);
            });
        },

        /** @inheritDoc */
        createResponseData: function createResponseData(ctx, masterToken, keyDataMo, callback) {
            AsyncExecutor(callback, function() {
                return ResponseData$parse(masterToken, keyDataMo);
            });
        },

        /** @inheritDoc */
        generateResponse: function generateResponse(ctx, format, keyRequestData, entityToken, callback) {
            var self = this;

            AsyncExecutor(callback, function() {
                if (!(keyRequestData instanceof RequestData))
                    throw new MslInternalException("Key request data " + keyRequestData + " was not created by this factory.");

                var masterToken, entityAuthData, identity;
                if (entityToken instanceof MasterToken) {
                    // If the master token was not issued by the local entity then we
                    // should not be generating a key response for it.
                    masterToken = entityToken;
                    if (!masterToken.isVerified())
                        throw new MslMasterTokenException(MslError.MASTERTOKEN_UNTRUSTED, entityToken);
                    identity = masterToken.identity;

                    // Verify the scheme is permitted.
                    if (!this.authutils.isSchemePermitted(identity, this.scheme))
                        throw new MslKeyExchangeException(MslError.KEYX_INCORRECT_DATA, "Authentication scheme for entity not permitted " + identity + ": " + this.scheme.name).setMasterToken(entityToken);
                } else {
                    entityAuthData = entityToken;
                    identity = entityAuthData.getIdentity();

                    // Verify the scheme is permitted.
                    if (!this.authutils.isSchemePermitted(identity, this.scheme))
                        throw new MslKeyExchangeException(MslError.KEYX_INCORRECT_DATA, "Authentication scheme for entity not permitted " + identity + ": " + this.scheme.name).setEntityAuthenticationData(entityToken);
                }

                // Create random AES-128 wrapping key.
                var wrapBytes = new Uint8Array(16);
                ctx.getRandom().nextBytes(wrapBytes);
                SecretKey.import(wrapBytes, WebCryptoAlgorithm.A128KW, WebCryptoUsage.WRAP_UNWRAP, {
                    result: function(wrapKey) {
                        AsyncExecutor(callback, function() {
                            var mslCryptoContext = ctx.getMslCryptoContext();
                            var encoder = ctx.getMslEncoderFactory();
                            mslCryptoContext.wrap(wrapKey, encoder, format, {
                                result: function(wrapdata) {
                                    createSessionKeys(masterToken, entityAuthData, identity, wrapKey, wrapdata);
                                },
                                error: function(e) {
                                    AsyncExecutor(callback, function() {
                                        if (e instanceof MslException) {
                                            e.setMasterToken(masterToken);
                                            e.setEntityAuthenticationData(entityAuthData);
                                        }
                                        throw e;
                                    }, self);
                                }
                            });
                        }, self);
                    },
                    error: function(e) {
                        AsyncExecutor(callback, function() {
                            throw new MslCryptoException(MslError.WRAP_KEY_CREATION_FAILURE, null, e).setMasterToken(entityToken);
                        }, self);
                    }
                });
            }, self);

            function createSessionKeys(masterToken, entityAuthData, identity, wrapKey, wrapdata) {
                self.generateSessionKeys(ctx, {
                    result: function(sessionKeys) {
                        AsyncExecutor(callback, function() {
                            var encryptionKey = sessionKeys.encryptionKey;
                            var hmacKey = sessionKeys.hmacKey;
                            wrapWrappingKey(masterToken, entityAuthData, identity, wrapKey, wrapdata, encryptionKey, hmacKey);
                        }, self);
                    },
                    error: function(e) {
                        AsyncExecutor(callback, function() {
                            if (e instanceof MslException) {
                                e.setMasterToken(masterToken);
                                e.setEntityAuthenticationData(entityAuthData);
                            }
                            throw e;
                        });
                    }
                });
            }

            function wrapWrappingKey(masterToken, entityAuthData, identity, wrapKey, wrapdata, encryptionKey, hmacKey) {
                AsyncExecutor(callback, function() {
                    var request = keyRequestData;

                    // Grab the request data.
                    var mechanism = request.mechanism;
                    var prevWrapdata = request.wrapdata;

                    // Wrap wrapping key using specified wrapping key.
                    var encoder = ctx.getMslEncoderFactory();
                    createCryptoContext(ctx, this.store, mechanism, prevWrapdata, identity, {
                        result: function (wrapKeyCryptoContext) {
                            wrapKeyCryptoContext.wrap(wrapKey, encoder, format, {
                                result: function(wrappedWrapJwk) {
                                    wrapSessionKeys(masterToken, entityAuthData, wrapKey, wrapdata, encryptionKey, hmacKey, wrappedWrapJwk);
                                },
                                error: function(e) {
                                    AsyncExecutor(callback, function() {
                                        if (e instanceof MslException) {
                                            e.setMasterToken(masterToken);
                                            e.setEntityAuthenticationData(entityAuthData);
                                        }
                                        throw e;
                                    });
                                }
                            });
                        },
                        error: function(e) {
                            AsyncExecutor(callback, function() {
                                if (e instanceof MslException) {
                                    e.setMasterToken(masterToken);
                                    e.setEntityAuthenticationData(entityAuthData);
                                }
                                throw e;
                            });
                        }
                    });
                }, self);
            }

            function wrapSessionKeys(masterToken, entityAuthData, wrapKey, wrapdata, encryptionKey, hmacKey, wrappedWrapJwk) {
                AsyncExecutor(callback, function() {
                    var wrapCryptoContext = new JsonWebEncryptionCryptoContext(ctx, JsonWebEncryptionCryptoContext.Algorithm.A128KW, JsonWebEncryptionCryptoContext.Encryption.A128GCM, wrapKey);
                    var encoder = ctx.getMslEncoderFactory();
                    wrapCryptoContext.wrap(encryptionKey, encoder, format, {
                        result: function(wrappedEncryptionJwk) {
                            wrapCryptoContext.wrap(hmacKey, encoder, format, {
                                result: function(wrappedHmacJwk) {
                                    createMasterToken(masterToken, entityAuthData, wrapdata, wrappedWrapJwk, encryptionKey, wrappedEncryptionJwk, hmacKey, wrappedHmacJwk);
                                },
                                error: function(e) {
                                    AsyncExecutor(callback, function() {
                                        if (e instanceof MslException) {
                                            e.setMasterToken(masterToken);
                                            e.setEntityAuthenticationData(entityAuthData);
                                        }
                                        throw e;
                                    });
                                }
                            });
                        },
                        error: function(e) {
                            AsyncExecutor(callback, function() {
                                if (e instanceof MslException) {
                                    e.setMasterToken(masterToken);
                                    e.setEntityAuthenticationData(entityAuthData);
                                }
                                throw e;
                            });
                        }
                    });
                }, self);
            }

            function createMasterToken(masterToken, entityAuthData, wrapdata, wrappedWrapJwk, encryptionKey, wrappedEncryptionJwk, hmacKey, wrappedHmacJwk) {
                AsyncExecutor(callback, function() {
                    // Create the master token.
                    var tokenFactory = ctx.getTokenFactory();
                    if (entityToken instanceof MasterToken) {
                        tokenFactory.renewMasterToken(ctx, entityToken, encryptionKey, hmacKey, null, {
                            result: function(masterToken) {
                                AsyncExecutor(callback, function() {
                                    // Create session crypto context.
                                    var cryptoContext = new SessionCryptoContext(ctx, masterToken);

                                    // Return the key exchange data.
                                    var keyResponseData = new ResponseData(masterToken, wrappedWrapJwk, wrapdata, wrappedEncryptionJwk, wrappedHmacJwk);
                                    return new KeyExchangeFactory.KeyExchangeData(keyResponseData, cryptoContext, callback);
                                }, self);
                            },
                            error: function(e) {
                                AsyncExecutor(callback, function() {
                                    if (e instanceof MslException) {
                                        e.setMasterToken(masterToken);
                                        e.setEntityAuthenticationData(entityAuthData);
                                    }
                                    throw e;
                                });
                            }
                        });
                    } else {
                        tokenFactory.createMasterToken(ctx, entityToken, encryptionKey, hmacKey, null, {
                            result: function(masterToken) {
                                AsyncExecutor(callback, function() {
                                    // Create session crypto context.
                                    var cryptoContext = new SessionCryptoContext(ctx, masterToken);

                                    // Return the key exchange data.
                                    var keyResponseData = new ResponseData(masterToken, wrappedWrapJwk, wrapdata, wrappedEncryptionJwk, wrappedHmacJwk);
                                    return new KeyExchangeFactory.KeyExchangeData(keyResponseData, cryptoContext, callback);
                                }, self);
                            },
                            error: function(e) {
                                AsyncExecutor(callback, function() {
                                    if (e instanceof MslException) {
                                        e.setMasterToken(masterToken);
                                        e.setEntityAuthenticationData(entityAuthData);
                                    }
                                    throw e;
                                });
                            }
                        });
                    }
                }, self);
            }
        },

        /** @inheritDoc */
        getCryptoContext: function getCryptoContext(ctx, keyRequestData, keyResponseData, masterToken, callback) {
            var self = this;

            AsyncExecutor(callback, function() {
                if (!(keyRequestData instanceof RequestData))
                    throw new MslInternalException("Key request data " + keyRequestData + " was not created by this factory.");
                var request = keyRequestData;
                if (!(keyResponseData instanceof ResponseData))
                    throw new MslInternalException("Key response data " + keyResponseData + " was not created by this factory.");
                var response = keyResponseData;

                // Unwrap new wrapping key.
                var mechanism = request.mechanism;
                var requestWrapdata = request.wrapdata;
                ctx.getEntityAuthenticationData(null, {
                    result: function(entityAuthData) {
                        AsyncExecutor(callback, function() {
                            var identity = entityAuthData.getIdentity();
                            var wrapKeyCryptoContext;
                            switch (mechanism) {
                                case Mechanism.PSK:
                                {
                                    var keys = this.store.getKeys(identity);
                                    if (!keys)
                                        throw new MslKeyExchangeException(MslError.KEYX_IDENTITY_NOT_FOUND, "jwkle " + identity).setEntity(entityAuthData);
                                    var kxe = keys.encryptionKey;
                                    wrapKeyCryptoContext = new JsonWebEncryptionCryptoContext(ctx, JsonWebEncryptionCryptoContext.Algorithm.A128KW, JsonWebEncryptionCryptoContext.Encryption.A128GCM, kxe);
                                    break;
                                }
                                case Mechanism.WRAP:
                                {
                                    wrapKeyCryptoContext = this.repository.getCryptoContext(requestWrapdata);
                                    if (!wrapKeyCryptoContext)
                                        throw new MslKeyExchangeException(MslError.KEYX_WRAPPING_KEY_MISSING, Base64.encode(requestWrapdata)).setEntityAuthenticationData(entityAuthData);
                                    break;
                                }
                                default:
                                    throw new MslKeyExchangeException(MslError.UNSUPPORTED_KEYX_MECHANISM, mechanism).setEntityAuthenticationData(entityAuthData);
                            }

                            // Unwrap wrapping key.
                            var encoder = ctx.getMslEncoderFactory();
                            wrapKeyCryptoContext.unwrap(response.wrapKey, WebCryptoAlgorithm.A128KW, WebCryptoAlgorithm.WRAP_UNWRAP, encoder, {
                                result: function(wrapKey) {
                                    unwrapSessionKeys(entityAuthData, response, requestWrapdata, identity, wrapKey);
                                },
                                error: function(e) {
                                    AsyncExecutor(callback, function() {
                                        if (e instanceof MslException)
                                            e.setEntityAuthenticationData(entityAuthData);
                                        throw e;
                                    });
                                }
                            });
                        }, self);
                    },
                    error: callback.error
                });
            }, self);

            function unwrapSessionKeys(entityAuthData, response, requestWrapdata, identity, wrapKey) {
                AsyncExecutor(callback, function() {
                    var unwrapCryptoContext = new JsonWebEncryptionCryptoContext(ctx, JsonWebEncryptionCryptoContext.Algorithm.A128KW, JsonWebEncryptionCryptoContext.Encryption.A128GCM, wrapKey);
                    var encoder = ctx.getMslEncoderFactory();
                    unwrapCryptoContext.unwrap(response.encryptionKey, WebCryptoAlgorithm.AES_CBC, WebCryptoAlgorithm.ENCRYPT_DECRYPT, encoder, {
                        result: function(encryptionKey) {
                            unwrapCryptoContext.unwrap(response.hmacKey, WebCryptoAlgorithm.HMAC_SHA256, WebCryptoAlgorithm.SIGN_VERIFY, encoder, {
                                result: function(hmacKey) {
                                    AsyncExecutor(callback, function() {
                                        // Deliver wrap data to wrap key repository.
                                        var wrapdata = response.wrapdata;
                                        this.repository.addCryptoContext(wrapdata, unwrapCryptoContext);
                                        this.repository.removeCryptoContext(requestWrapdata);

                                        // Create crypto context.
                                        var responseMasterToken = response.masterToken;
                                        return new SessionCryptoContext(ctx, responseMasterToken, identity, encryptionKey, hmacKey);
                                    }, self);
                                },
                                error: function(e) {
                                    AsyncExecutor(callback, function() {
                                        if (e instanceof MslException)
                                            e.setEntityAuthenticationData(entityAuthData);
                                        throw e;
                                    });
                                }
                            });
                        },
                        error: function(e) {
                            AsyncExecutor(callback, function() {
                                if (e instanceof MslException)
                                    e.setEntityAuthenticationData(entityAuthData);
                                throw e;
                            });
                        }
                    });
                }, self);
            }
        }
    });

    // Exports.
    module.exports.Mechanism = Mechanism;
    module.exports.RequestData = RequestData;
    module.exports.RequestData.parse = RequestData$parse;
    module.exports.ResponseData = ResponseData;
    module.exports.ResponseData.parse = ResponseData$parse;
})(require, (typeof module !== 'undefined') ? module : mkmodule('JsonWebEncryptionLadderExchange'));


text: {% include "django/forms/widgets/textarea.html" %}


text:
package org.apache.storm.starter;

import java.util.concurrent.TimeUnit;

import org.apache.storm.Config;
import org.apache.storm.StormSubmitter;
import org.apache.storm.bolt.JoinBolt;
import org.apache.storm.starter.bolt.PrinterBolt;
import org.apache.storm.testing.FeederSpout;
import org.apache.storm.topology.TopologyBuilder;
import org.apache.storm.topology.base.BaseWindowedBolt;
import org.apache.storm.tuple.Fields;
import org.apache.storm.tuple.Values;
import org.apache.storm.utils.NimbusClient;

public class JoinBoltExample {
    public static void main(String[] args) throws Exception {
        if (!NimbusClient.isLocalOverride()) {
            throw new IllegalStateException("This example only works in local mode.  "
                    + "Run with storm local not storm jar");
        }
        FeederSpout genderSpout = new FeederSpout(new Fields("id", "gender"));
        FeederSpout ageSpout = new FeederSpout(new Fields("id", "age"));

        TopologyBuilder builder = new TopologyBuilder();
        builder.setSpout("genderSpout", genderSpout);
        builder.setSpout("ageSpout", ageSpout);

        // inner join of 'age' and 'gender' records on 'id' field
        JoinBolt joiner = new JoinBolt("genderSpout", "id")
                                 .join("ageSpout",    "id", "genderSpout")
                                 .select ("genderSpout:id,ageSpout:id,gender,age")
                .withTumblingWindow( new BaseWindowedBolt.Duration(10, TimeUnit.SECONDS) );

        builder.setBolt("joiner", joiner)
                .fieldsGrouping("genderSpout", new Fields("id"))
                .fieldsGrouping("ageSpout", new Fields("id"))         ;

        builder.setBolt("printer", new PrinterBolt() ).shuffleGrouping("joiner");

        Config conf = new Config();
        StormSubmitter.submitTopologyWithProgressBar("join-example", conf, builder.createTopology());

        generateGenderData(genderSpout);

        generateAgeData(ageSpout);
    }

    private static void generateAgeData(FeederSpout ageSpout) {
        for (int i = 9; i >= 0; i--) {
            ageSpout.feed(new Values(i, i + 20));
        }
    }

    private static void generateGenderData(FeederSpout genderSpout) {
        for (int i = 0; i < 10; i++) {
            String gender;
            if (i % 2 == 0) {
                gender = "male";
            }
            else {
                gender = "female";
            }
            genderSpout.feed(new Values(i, gender));
        }
    }
}


text:
<?php
use yii\helpers\Html;
?>

	Exception Modul merupakan modul pengambilan ijin yang digunakan oleh karyawan.

	Exception List Fungsi :

		1. Exception List, Adalah Tab menu master data ijin/exception.

		2. Add Exception, Adalah pengambilan ijin yang di gunakan karyawan.

		3. Refresh, Adalah menampilkan semua list master data ijin/exception.

		4. Export, Adalah master data ijin/exception ke Excel .

		5. Tombol Action View, Adalah tombol untuk menampilkan dan editor .

	<?php echo Html::img('@web/upload/help/exception/hd1.png',  ['class' => 'pnjg', 'style'=>'width:800px;height:350px;']); ?>

	Tombol Function :

		a. Add Exception, Adalah tombol untuk melakukan penambahan  list master data ijin/exception .

		<?php echo Html::img('@web/upload/help/exception/hd2.png',  ['class' => 'pnjg', 'style'=>'width:500px;height:250px;']); ?>

		b. View, Adalah menampilkan.

		<?php echo Html::img('@web/upload/help/exception/hd3.png',  ['class' => 'pnjg', 'style'=>'width:500px;height:250px;']); ?>

		b1. Tombol Edting, Tekan tombol Editing untuk update data master.

		c. View Editor, Adalah update list master data ijin/exception.

		<?php echo Html::img('@web/upload/help/exception/hd4.png',  ['class' => 'pnjg', 'style'=>'width:500px;height:250px;']); ?>

		c1. Tombol View, Tekan menampilkan kembali list master data ijin/exception jika mengagalkan update data.

		c2. Tombol Save, menyimpan data update dati list master data ijin/exception yang sudah di edit.

		c3. Input Data, Masukan Nama Exception/ijin yang akan di update.

		c4. input Description, Masukan catatan dari Exception/ijin yang akan di update.


text:
'use strict';

var async = require('async');
var chai = require('chai');
var expect = chai.expect;
chai.should();

var parse = require('../../parse');

describe('parse', function() {
  describe('with valid input', function() {
    var validExpressions = [
      {
        expression: '1+2=',
        first: 1,
        operator: '+',
        second: 2
      }, {
        expression: '-3/43=',
        first: -3,
        operator: '/',
        second: 43
      }, {
        expression: '123456--12=',
        first: 123456,
        operator: '-',
        second: -12
      }
    ];

    it('should parse expressions', function(done) {

      var testParse = function(data, callback) {
        parse(data.expression, function(err, first, type, second) {
          expect(err).to.equal(null);
          first.should.be.a('number').and.equal(data.first);
          second.should.be.a('number').and.equal(data.second);
          type.should.equal(data.operator);
          return callback();
        });
      };

      async.each(validExpressions, testParse, function(err) {
        expect(err).to.equal(null);
        done();
      });
    });
  });

  describe('with invalid input', function() {
    it('should check for undefined expressions', function(done) {
      parse(undefined, function(err) {
        err.should.be.a('string');
        done();
      });
    });

    it('should check for empty strings', function(done) {
      parse('', function(err) {
        err.should.be.a('string');
        done();
      });
    });

    it('should check for invalid expressions', function(done) {
      parse('34asdf', function(err) {
        err.should.be.a('string');
        done();
      });
    });
  });
});


text:
#include "include/core/SkRefCnt.h"
#include "include/gpu/gl/GrGLTypes.h"

#ifndef GrGLTypesPriv_DEFINED
#define GrGLTypesPriv_DEFINED

static constexpr int kGrGLFormatCount = static_cast<int>(GrGLFormat::kLast) + 1;

class GrGLTextureParameters : public SkNVRefCnt<GrGLTextureParameters> {
public:
    // We currently consider texture parameters invalid on all textures
    // GrContext::resetContext(). We use this type to track whether instances of
    // GrGLTextureParameters were updated before or after the most recent resetContext(). At 10
    // resets / frame and 60fps a 64bit timestamp will overflow in about a billion years.
    // TODO: Require clients to use GrBackendTexture::glTextureParametersModified() to invalidate
    // texture parameters and get rid of timestamp checking.
    using ResetTimestamp = uint64_t;

    // This initializes the params to have an expired timestamp. They'll be considered invalid the
    // first time the texture is used unless set() is called.
    GrGLTextureParameters() = default;

    // This is texture parameter state that is overridden when a non-zero sampler object is bound.
    struct SamplerOverriddenState {
        SamplerOverriddenState();
        void invalidate();

        GrGLenum fMinFilter;
        GrGLenum fMagFilter;
        GrGLenum fWrapS;
        GrGLenum fWrapT;
        GrGLfloat fMinLOD;
        GrGLfloat fMaxLOD;
        // We always want the border color to be transparent black, so no need to store 4 floats.
        // Just track if it's been invalidated and no longer the default
        bool fBorderColorInvalid;
    };

    // Texture parameter state that is not overridden by a bound sampler object.
    struct NonsamplerState {
        NonsamplerState();
        void invalidate();

        GrGLint fBaseMipMapLevel;
        GrGLint fMaxMipmapLevel;
        bool    fSwizzleIsRGBA;
    };

    void invalidate();

    ResetTimestamp resetTimestamp() const { return fResetTimestamp; }
    const SamplerOverriddenState& samplerOverriddenState() const { return fSamplerOverriddenState; }
    const NonsamplerState& nonsamplerState() const { return fNonsamplerState; }

    // SamplerOverriddenState is optional because we don't track it when we're using sampler
    // objects.
    void set(const SamplerOverriddenState* samplerState,
             const NonsamplerState& nonsamplerState,
             ResetTimestamp currTimestamp);

private:
    static constexpr ResetTimestamp kExpiredTimestamp = 0;

    SamplerOverriddenState fSamplerOverriddenState;
    NonsamplerState fNonsamplerState;
    ResetTimestamp fResetTimestamp = kExpiredTimestamp;
};

class GrGLBackendTextureInfo {
public:
    GrGLBackendTextureInfo(const GrGLTextureInfo& info, GrGLTextureParameters* params)
            : fInfo(info), fParams(params) {}
    GrGLBackendTextureInfo(const GrGLBackendTextureInfo&) = delete;
    GrGLBackendTextureInfo& operator=(const GrGLBackendTextureInfo&) = delete;
    const GrGLTextureInfo& info() const { return fInfo; }
    GrGLTextureParameters* parameters() const { return fParams; }
    sk_sp<GrGLTextureParameters> refParameters() const { return sk_ref_sp(fParams); }

    void cleanup();
    void assign(const GrGLBackendTextureInfo&, bool thisIsValid);

private:
    GrGLTextureInfo fInfo;
    GrGLTextureParameters* fParams;
};

#endif


text:
namespace NewsSite.Web.Areas.Administration.InputModels.Advertisments
{
    using System.ComponentModel.DataAnnotations;
    using System.Web;

    using AutoMapper;

    using NewsSite.Data.Models;
    using NewsSite.Web.Infrastructure.Mapping;

    public class AdvertismentInputModel : IMapFrom<Advertisment>, IHaveCustomMappings
    {
        public long Id { get; set; }

        [Display(Name = "Снимка/Анимация")]
        [Required(ErrorMessage = "Снимката/Анимацията е задължително поле!")]
        public HttpPostedFileBase CoverPhoto { get; set; }

        [Display(Name = "Линк за рекламата")]
        [Required(ErrorMessage = "Задължително поле е линк към страницата за рекламата!")]
        public string Link { get; set; }

        [Display(Name = "Име на фирма")]
        [Required(ErrorMessage = "Задължително поле е името на фирма за рекламата!")]
        public string Firm { get; set; }

        [Display(Name = "Активност")]
        public bool IsActive { get; set; }

        public AdvertismentType Type { get; set; }

        public void CreateMappings(IConfiguration configuration)
        {
            configuration.CreateMap<Advertisment, AdvertismentInputModel>().ReverseMap();
        }
    }
}


text:
package io.cloudslang.content.hashicorp.terraform.services;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jayway.jsonpath.JsonPath;
import io.cloudslang.content.hashicorp.terraform.entities.TerraformCommonInputs;
import io.cloudslang.content.hashicorp.terraform.entities.TerraformWorkspaceVariableInputs;
import io.cloudslang.content.hashicorp.terraform.services.models.workspace.CreateWorkspaceVariableRequestBody;
import io.cloudslang.content.hashicorp.terraform.services.models.workspace.UpdateWorkspaceVariableRequestBody;
import io.cloudslang.content.httpclient.entities.HttpClientInputs;
import io.cloudslang.content.httpclient.services.HttpClientService;
import io.cloudslang.content.utils.StringUtilities;
import net.minidev.json.JSONArray;
import net.minidev.json.JSONObject;
import net.minidev.json.parser.JSONParser;
import org.apache.http.client.utils.URIBuilder;
import org.jetbrains.annotations.NotNull;

import java.util.HashMap;
import java.util.Map;

import static io.cloudslang.content.constants.OutputNames.RETURN_CODE;
import static io.cloudslang.content.hashicorp.terraform.services.HttpCommons.setCommonHttpInputs;
import static io.cloudslang.content.hashicorp.terraform.utils.Constants.Common.*;
import static io.cloudslang.content.hashicorp.terraform.utils.Constants.CreateWorkspaceVariableConstants.WORKSPACE_VARIABLE_PATH;
import static io.cloudslang.content.hashicorp.terraform.utils.Constants.CreateWorkspaceVariableConstants.WORKSPACE_VARIABLE_TYPE;
import static io.cloudslang.content.hashicorp.terraform.utils.Constants.CreateWorkspaceConstants.WORKSPACE_PATH;
import static io.cloudslang.content.hashicorp.terraform.utils.HttpUtils.getAuthHeaders;
import static io.cloudslang.content.hashicorp.terraform.utils.HttpUtils.getUriBuilder;
import static io.cloudslang.content.utils.OutputUtilities.getFailureResultsMap;
import static org.apache.commons.lang3.StringUtils.EMPTY;

public class WorkspaceVariableImpl {

    @NotNull
    public static Map<String, String> createWorkspaceVariable(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) throws Exception {
        final HttpClientInputs httpClientInputs = new HttpClientInputs();
        final TerraformCommonInputs commonInputs = terraformWorkspaceVariableInputs.getCommonInputs();
        httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs));
        setCommonHttpInputs(httpClientInputs, commonInputs);
        httpClientInputs.setAuthType(ANONYMOUS);
        httpClientInputs.setMethod(POST);
        httpClientInputs.setContentType(APPLICATION_VND_API_JSON);
        httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken()));

        if (commonInputs.getRequestBody().isEmpty() & terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody().isEmpty()) {
            httpClientInputs.setBody(createWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs));
        } else if (!terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody().isEmpty()) {
            httpClientInputs.setBody(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody());
            httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs));
        } else {
            httpClientInputs.setBody(commonInputs.getRequestBody());
        }
        httpClientInputs.setResponseCharacterSet(commonInputs.getResponseCharacterSet());

        return new HttpClientService().execute(httpClientInputs);
    }

    @NotNull
    public static Map<String, Map<String, String>> createWorkspaceVariables(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) throws Exception {
        String workspaceVariableName;
        String workspaceVariableValue;
        String hcl;
        String workspaceVariableCategory;
        Map<String, Map<String, String>> createWorkspaceVariableMap = new HashMap<>();
        JSONParser parser = new JSONParser();
        final HttpClientInputs httpClientInputs = new HttpClientInputs();
        final TerraformCommonInputs commonInputs = terraformWorkspaceVariableInputs.getCommonInputs();
        httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs));
        setCommonHttpInputs(httpClientInputs, commonInputs);
        httpClientInputs.setAuthType(ANONYMOUS);
        httpClientInputs.setMethod(POST);
        httpClientInputs.setContentType(APPLICATION_VND_API_JSON);
        httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken()));
        if (!terraformWorkspaceVariableInputs.getWorkspaceVariableJson().isEmpty() & !terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableJson().isEmpty()) {
            String sensitiveWorkspaceVariableValue;

            JSONArray createWorkspaceVariableJsonArray = (JSONArray) parser.parse(terraformWorkspaceVariableInputs.getWorkspaceVariableJson());
            JSONArray createSensitiveWorkspaceVariableJsonArray = (JSONArray) parser.parse(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableJson());
            JSONObject createWorkspaceVariableJson;
            JSONObject createSensitiveWorkspaceVariableJson;
            for (int i = 0; i < createWorkspaceVariableJsonArray.size(); i++) {
                createWorkspaceVariableJson = (JSONObject) createWorkspaceVariableJsonArray.get(i);
                workspaceVariableName = (String) createWorkspaceVariableJson.get("propertyName");
                workspaceVariableValue = (String) createWorkspaceVariableJson.get("propertyValue");
                hcl = Boolean.toString((boolean) createWorkspaceVariableJson.get("HCL"));
                workspaceVariableCategory = (String) createWorkspaceVariableJson.get("Category");

                terraformWorkspaceVariableInputs = terraformWorkspaceVariableInputs.builder()
                        .workspaceVariableName(workspaceVariableName)
                        .workspaceVariableValue(workspaceVariableValue)
                        .workspaceVariableCategory(workspaceVariableCategory)
                        .hcl(hcl)
                        .workspaceId(terraformWorkspaceVariableInputs.getWorkspaceId())
                        .sensitive("false").build();
                httpClientInputs.setBody(createWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs));

                createWorkspaceVariableMap.put(workspaceVariableName, new HttpClientService().execute(httpClientInputs));

            }
            for (int i = 0; i < createSensitiveWorkspaceVariableJsonArray.size(); i++) {
                createSensitiveWorkspaceVariableJson = (JSONObject) createSensitiveWorkspaceVariableJsonArray.get(i);
                workspaceVariableName = (String) createSensitiveWorkspaceVariableJson.get("propertyName");
                sensitiveWorkspaceVariableValue = (String) createSensitiveWorkspaceVariableJson.get("propertyValue");
                hcl = Boolean.toString((boolean) createSensitiveWorkspaceVariableJson.get("HCL"));
                workspaceVariableCategory = (String) createSensitiveWorkspaceVariableJson.get("Category");

                terraformWorkspaceVariableInputs = terraformWorkspaceVariableInputs.builder()
                        .workspaceVariableName(workspaceVariableName)
                        .sensitiveWorkspaceVariableValue(sensitiveWorkspaceVariableValue)
                        .workspaceVariableValue(EMPTY)
                        .workspaceVariableCategory(workspaceVariableCategory)
                        .hcl(hcl)
                        .workspaceId(terraformWorkspaceVariableInputs.getWorkspaceId())
                        .sensitive("true").build();
                httpClientInputs.setBody(createWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs));
                createWorkspaceVariableMap.put(workspaceVariableName, new HttpClientService().execute(httpClientInputs));

            }
            return createWorkspaceVariableMap;

        } else if (!terraformWorkspaceVariableInputs.getWorkspaceVariableJson().isEmpty()) {
            JSONArray createWorkspaceVariableJsonArray = (JSONArray) parser.parse(terraformWorkspaceVariableInputs.getWorkspaceVariableJson());
            JSONObject createWorkspaceVariableJson;
            for (int i = 0; i < createWorkspaceVariableJsonArray.size(); i++) {
                createWorkspaceVariableJson = (JSONObject) createWorkspaceVariableJsonArray.get(i);
                workspaceVariableName = (String) createWorkspaceVariableJson.get("propertyName");
                workspaceVariableValue = (String) createWorkspaceVariableJson.get("propertyValue");
                hcl = Boolean.toString((boolean) createWorkspaceVariableJson.get("HCL"));
                workspaceVariableCategory = (String) createWorkspaceVariableJson.get("Category");

                terraformWorkspaceVariableInputs = terraformWorkspaceVariableInputs.builder()
                        .workspaceVariableName(workspaceVariableName)
                        .workspaceVariableValue(workspaceVariableValue)
                        .workspaceVariableCategory(workspaceVariableCategory)
                        .hcl(hcl)
                        .workspaceId(terraformWorkspaceVariableInputs.getWorkspaceId())
                        .sensitive("false").build();
                httpClientInputs.setBody(createWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs));
                createWorkspaceVariableMap.put(workspaceVariableName, new HttpClientService().execute(httpClientInputs));

            }

            return createWorkspaceVariableMap;
        } else {
            JSONArray createSensitiveWorkspaceVariableJsonArray = (JSONArray) parser.parse(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableJson());
            JSONObject createSensitiveWorkspaceVariableJson;
            for (int i = 0; i < createSensitiveWorkspaceVariableJsonArray.size(); i++) {
                createSensitiveWorkspaceVariableJson = (JSONObject) createSensitiveWorkspaceVariableJsonArray.get(i);
                workspaceVariableName = (String) createSensitiveWorkspaceVariableJson.get("propertyName");
                workspaceVariableValue = (String) createSensitiveWorkspaceVariableJson.get("propertyValue");
                hcl = Boolean.toString((boolean) createSensitiveWorkspaceVariableJson.get("HCL"));
                workspaceVariableCategory = (String) createSensitiveWorkspaceVariableJson.get("Category");

                terraformWorkspaceVariableInputs = terraformWorkspaceVariableInputs.builder()

                        .workspaceVariableName(workspaceVariableName)
                        .sensitiveWorkspaceVariableValue(workspaceVariableValue)
                        .workspaceVariableValue(EMPTY)
                        .workspaceVariableCategory(workspaceVariableCategory)
                        .hcl(hcl)
                        .workspaceId(terraformWorkspaceVariableInputs.getWorkspaceId())
                        .sensitive("true").build();
                httpClientInputs.setBody(createWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs));
                createWorkspaceVariableMap.put(workspaceVariableName, new HttpClientService().execute(httpClientInputs));

            }

            return createWorkspaceVariableMap;
        }

    }

    @NotNull
    public static Map<String, Map<String, String>> updateWorkspaceVariables(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) throws Exception {
        String workspaceVariableName;
        String workspaceVariableValue;
        String sensitiveWorkspaceVariableValue;
        String workspaceVariableCategory;
        String workspaceVariableId;
        String hcl = null;
        String sensitive = null;
        Map<String, Map<String, String>> updateWorkspaceVariableMap = new HashMap<>();
        Map<String, String> listWorkspaceVariablesResult = listWorkspaceVariables(terraformWorkspaceVariableInputs);
        JSONParser parser = new JSONParser();
        final HttpClientInputs httpClientInputs = new HttpClientInputs();
        final TerraformCommonInputs commonInputs = terraformWorkspaceVariableInputs.getCommonInputs();
        httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs));
        setCommonHttpInputs(httpClientInputs, commonInputs);
        httpClientInputs.setAuthType(ANONYMOUS);
        httpClientInputs.setMethod(PATCH);
        httpClientInputs.setContentType(APPLICATION_VND_API_JSON);
        httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken()));
        if (!terraformWorkspaceVariableInputs.getWorkspaceVariableJson().isEmpty() & !terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableJson().isEmpty()) {

            JSONArray updateWorkspaceVariableJsonArray = (JSONArray) parser.parse(terraformWorkspaceVariableInputs.getWorkspaceVariableJson());
            JSONArray updateSensitiveWorkspaceVariableJsonArray = (JSONArray) parser.parse(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableJson());
            JSONObject updateWorkspaceVariableJson;
            JSONObject updateSensitiveWorkspaceVariableJson;
            for (int i = 0; i < updateWorkspaceVariableJsonArray.size(); i++) {
                updateWorkspaceVariableJson = (JSONObject) updateWorkspaceVariableJsonArray.get(i);
                workspaceVariableName = (String) updateWorkspaceVariableJson.get("propertyName");
                workspaceVariableValue = (String) updateWorkspaceVariableJson.get("propertyValue");
                workspaceVariableCategory = (String) updateWorkspaceVariableJson.get("Category");
                if (updateWorkspaceVariableJson.containsKey("HCL")) {
                    hcl = Boolean.toString((boolean) updateWorkspaceVariableJson.get("HCL"));
                }
                if (updateWorkspaceVariableJson.containsKey("sensitive")) {
                    sensitive = Boolean.toString((boolean) updateWorkspaceVariableJson.get("sensitive"));
                }
                JSONObject workspaceVariableJsonObj = (JSONObject) parser.parse(listWorkspaceVariablesResult.get("returnResult"));
                JSONArray workspaceVariableJsonArray = (JSONArray) workspaceVariableJsonObj.get("data");
                for (int j = 0; j < workspaceVariableJsonArray.size(); j++) {
                    final String workspaceVariableCatagory = JsonPath.read(workspaceVariableJsonArray.get(j), "attributes.category");
                    final String workspaceVariableKey = JsonPath.read(workspaceVariableJsonArray.get(j), "attributes.key");
                    if (workspaceVariableName.equals(workspaceVariableKey)&& workspaceVariableCategory.equals(workspaceVariableCatagory)) {
                        workspaceVariableId = JsonPath.read(workspaceVariableJsonArray.get(j), "id");
                        terraformWorkspaceVariableInputs = TerraformWorkspaceVariableInputs.builder()
                                .workspaceVariableName(workspaceVariableName)
                                .workspaceVariableValue(workspaceVariableValue)
                                .hcl(hcl)
                                .sensitive(sensitive)
                                .workspaceVariableCategory(workspaceVariableCategory)
                                .workspaceVariableId(workspaceVariableId)
                                .workspaceId(terraformWorkspaceVariableInputs.getWorkspaceId())
                                .build();
                        httpClientInputs.setBody(updateWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs));
                        httpClientInputs.setUrl(updateWorkspaceVariableUrl(terraformWorkspaceVariableInputs));
                        updateWorkspaceVariableMap.put(workspaceVariableName, new HttpClientService().execute(httpClientInputs));
                    }
                }
            }
            for (int i = 0; i < updateSensitiveWorkspaceVariableJsonArray.size(); i++) {
                updateSensitiveWorkspaceVariableJson = (JSONObject) updateSensitiveWorkspaceVariableJsonArray.get(i);
                workspaceVariableName = (String) updateSensitiveWorkspaceVariableJson.get("propertyName");
                sensitiveWorkspaceVariableValue = (String) updateSensitiveWorkspaceVariableJson.get("propertyValue");
                workspaceVariableCategory = (String) updateSensitiveWorkspaceVariableJson.get("Category");
                JSONObject sensitiveWorkspaceVariableJsonObj = (JSONObject) parser.parse(listWorkspaceVariablesResult.get("returnResult"));
                JSONArray sensitiveWorkspaceVariableJsonArray = (JSONArray) sensitiveWorkspaceVariableJsonObj.get("data");
                for (int j = 0; j < sensitiveWorkspaceVariableJsonArray.size(); j++) {
                    final String workspaceVariableCatagory = JsonPath.read(sensitiveWorkspaceVariableJsonArray.get(j), "attributes.category");
                    final String sensitiveWorkspaceVariableKey = JsonPath.read(sensitiveWorkspaceVariableJsonArray.get(j), "attributes.key");
                    if (workspaceVariableName.equals(sensitiveWorkspaceVariableKey)&&workspaceVariableCategory.equals(workspaceVariableCatagory)) {
                        workspaceVariableId = JsonPath.read(sensitiveWorkspaceVariableJsonArray.get(j), "id");
                        terraformWorkspaceVariableInputs = TerraformWorkspaceVariableInputs.builder()
                                .workspaceVariableName(workspaceVariableName)
                                .workspaceVariableValue(EMPTY)
                                .sensitiveWorkspaceVariableValue(sensitiveWorkspaceVariableValue)
                                .workspaceVariableCategory(workspaceVariableCategory)
                                .workspaceVariableId(workspaceVariableId)
                                .workspaceId(terraformWorkspaceVariableInputs.getWorkspaceId())
                                .build();
                        httpClientInputs.setBody(updateWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs));
                        httpClientInputs.setUrl(updateWorkspaceVariableUrl(terraformWorkspaceVariableInputs));
                        updateWorkspaceVariableMap.put(workspaceVariableName, new HttpClientService().execute(httpClientInputs));
                    }
                }
            }
            return updateWorkspaceVariableMap;
        } else if (!terraformWorkspaceVariableInputs.getWorkspaceVariableJson().isEmpty()) {
            JSONArray updateWorkspaceVariableJsonArray = (JSONArray) parser.parse(terraformWorkspaceVariableInputs.getWorkspaceVariableJson());
            JSONObject updateWorkspaceVariableJson;
            for (int i = 0; i < updateWorkspaceVariableJsonArray.size(); i++) {
                updateWorkspaceVariableJson = (JSONObject) updateWorkspaceVariableJsonArray.get(i);
                workspaceVariableName = (String) updateWorkspaceVariableJson.get("propertyName");
                workspaceVariableValue = (String) updateWorkspaceVariableJson.get("propertyValue");
                workspaceVariableCategory = (String) updateWorkspaceVariableJson.get("Category");
                if (updateWorkspaceVariableJson.containsKey("HCL")) {
                    hcl = Boolean.toString((boolean) updateWorkspaceVariableJson.get("HCL"));
                }
                if (updateWorkspaceVariableJson.containsKey("sensitive")) {
                    sensitive = Boolean.toString((boolean) updateWorkspaceVariableJson.get("sensitive"));
                }
                JSONObject workspaceVariableJsonObj = (JSONObject) parser.parse(listWorkspaceVariablesResult.get("returnResult"));
                JSONArray workspaceVariableJsonArray = (JSONArray) workspaceVariableJsonObj.get("data");
                for (int j = 0; j < workspaceVariableJsonArray.size(); j++) {
                    final String workspaceVariableCatagory = JsonPath.read(workspaceVariableJsonArray.get(j), "attributes.category");
                    final String workspaceVariableKey = JsonPath.read(workspaceVariableJsonArray.get(j), "attributes.key");
                    if (workspaceVariableName.equals(workspaceVariableKey)&& workspaceVariableCategory.equals(workspaceVariableCatagory)) {
                        workspaceVariableId = JsonPath.read(workspaceVariableJsonArray.get(j), "id");
                        terraformWorkspaceVariableInputs = TerraformWorkspaceVariableInputs.builder()
                                .workspaceVariableName(workspaceVariableName)
                                .workspaceVariableValue(workspaceVariableValue)
                                .hcl(hcl)
                                .sensitive(sensitive)
                                .workspaceVariableCategory(workspaceVariableCategory)
                                .workspaceVariableId(workspaceVariableId)
                                .workspaceId(terraformWorkspaceVariableInputs.getWorkspaceId())
                                .build();
                        httpClientInputs.setBody(updateWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs));
                        httpClientInputs.setUrl(updateWorkspaceVariableUrl(terraformWorkspaceVariableInputs));
                        updateWorkspaceVariableMap.put(workspaceVariableName, new HttpClientService().execute(httpClientInputs));
                    }
                }
            }
            return updateWorkspaceVariableMap;
        } else {
            JSONArray updateSensitiveWorkspaceVariableJsonArray = (JSONArray) parser.parse(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableJson());
            JSONObject updateSensitiveWorkspaceVariableJson;
            for (int i = 0; i < updateSensitiveWorkspaceVariableJsonArray.size(); i++) {
                updateSensitiveWorkspaceVariableJson = (JSONObject) updateSensitiveWorkspaceVariableJsonArray.get(i);
                workspaceVariableName = (String) updateSensitiveWorkspaceVariableJson.get("propertyName");
                sensitiveWorkspaceVariableValue = (String) updateSensitiveWorkspaceVariableJson.get("propertyValue");
                workspaceVariableCategory = (String) updateSensitiveWorkspaceVariableJson.get("Category");
                JSONObject sensitiveWorkspaceVariableJsonObj = (JSONObject) parser.parse(listWorkspaceVariablesResult.get("returnResult"));
                JSONArray sensitiveWorkspaceVariableJsonArray = (JSONArray) sensitiveWorkspaceVariableJsonObj.get("data");
                for (int j = 0; j < sensitiveWorkspaceVariableJsonArray.size(); j++) {
                    final String workspaceVariableCatagory = JsonPath.read(sensitiveWorkspaceVariableJsonArray.get(j), "attributes.category");
                    final String sensitiveWorkspaceVariableKey = JsonPath.read(sensitiveWorkspaceVariableJsonArray.get(j), "attributes.key");
                    if (workspaceVariableName.equals(sensitiveWorkspaceVariableKey)&&workspaceVariableCategory.equals(workspaceVariableCatagory)) {
                        workspaceVariableId = JsonPath.read(sensitiveWorkspaceVariableJsonArray.get(j), "id");
                        terraformWorkspaceVariableInputs = TerraformWorkspaceVariableInputs.builder()
                                .workspaceVariableName(workspaceVariableName)
                                .workspaceVariableValue(EMPTY)
                                .sensitiveWorkspaceVariableValue(sensitiveWorkspaceVariableValue)
                                .workspaceVariableCategory(workspaceVariableCategory)
                                .workspaceVariableId(workspaceVariableId)
                                .workspaceId(terraformWorkspaceVariableInputs.getWorkspaceId())
                                .build();
                        httpClientInputs.setBody(updateWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs));
                        httpClientInputs.setUrl(updateWorkspaceVariableUrl(terraformWorkspaceVariableInputs));
                        updateWorkspaceVariableMap.put(workspaceVariableName, new HttpClientService().execute(httpClientInputs));
                    }
                }
            }

            return updateWorkspaceVariableMap;
        }

    }

    @NotNull
    public static Map<String, String> getWorkspaceVariablesOperationOutput(String workspaceVariablesJson, String sensitiveWorkspaceVariablesJson, Map<String, Map<String, String>> result) {
        try {
            final Map<String, String> results = new HashMap<>();
            JSONParser parser = new JSONParser();
            if (!workspaceVariablesJson.isEmpty() & !sensitiveWorkspaceVariablesJson.isEmpty()) {
                JSONArray createWorkspaceVariableJsonArray = (JSONArray) parser.parse(workspaceVariablesJson);
                JSONArray createSensitiveWorkspaceVariableJsonArray = (JSONArray) parser.parse(sensitiveWorkspaceVariablesJson);
                JSONObject createWorkspaceVariableJson;
                JSONObject createSensitiveWorkspaceVariableJson;
                String workspaceVariableName = EMPTY;
                String sensitiveWorkspaceVariableName = EMPTY;

                for (int i = 0; i < createWorkspaceVariableJsonArray.size(); i++) {
                    createWorkspaceVariableJson = (JSONObject) createWorkspaceVariableJsonArray.get(i);
                    workspaceVariableName = (String) createWorkspaceVariableJson.get("propertyName");

                    for (String workspaceVariableResult : result.keySet()) {

                        if (workspaceVariableName.equals(workspaceVariableResult)) {

                            results.put(RETURN_CODE, result.get(workspaceVariableResult).get(RETURN_CODE));
                            results.put(workspaceVariableName, result.get(workspaceVariableResult).get("returnResult"));
                            results.put(STATUS_CODE, result.get(workspaceVariableResult).get(STATUS_CODE));
                        }
                    }
                }
                for (int i = 0; i < createSensitiveWorkspaceVariableJsonArray.size(); i++) {
                    createSensitiveWorkspaceVariableJson = (JSONObject) createSensitiveWorkspaceVariableJsonArray.get(i);
                    sensitiveWorkspaceVariableName = (String) createSensitiveWorkspaceVariableJson.get("propertyName");

                    for (String workspaceVariableResult : result.keySet()) {

                        if(sensitiveWorkspaceVariableName.equals(workspaceVariableResult)) {

                            results.put(RETURN_CODE, result.get(workspaceVariableResult).get(RETURN_CODE));
                            results.put(sensitiveWorkspaceVariableName, result.get(workspaceVariableResult).get("returnResult"));
                            results.put(STATUS_CODE, result.get(workspaceVariableResult).get(STATUS_CODE));
                        }
                    }
                }
                return results;

            } else if (!sensitiveWorkspaceVariablesJson.isEmpty()) {
                JSONArray createSensitiveWorkspaceVariableJsonArray = (JSONArray) parser.parse(sensitiveWorkspaceVariablesJson);
                JSONObject createSensitiveWorkspaceVariableJson;
                String sensitiveWorkspaceVariableName = EMPTY;
                for (int i = 0; i < createSensitiveWorkspaceVariableJsonArray.size(); i++) {
                    createSensitiveWorkspaceVariableJson = (JSONObject) createSensitiveWorkspaceVariableJsonArray.get(i);
                    sensitiveWorkspaceVariableName = (String) createSensitiveWorkspaceVariableJson.get("propertyName");

                    for (String workspaceVariableResult : result.keySet()) {

                        if(sensitiveWorkspaceVariableName.equals(workspaceVariableResult)) {

                            results.put(RETURN_CODE, result.get(workspaceVariableResult).get(RETURN_CODE));
                            results.put(sensitiveWorkspaceVariableName, result.get(workspaceVariableResult).get("returnResult"));
                            results.put(STATUS_CODE, result.get(workspaceVariableResult).get(STATUS_CODE));
                        }

                    }
                }
                return results;

            } else {
                JSONArray createWorkspaceVariableJsonArray = (JSONArray) parser.parse(workspaceVariablesJson);
                JSONObject createWorkspaceVariableJson;
                String workspaceVariableName = EMPTY;

                for (int i = 0; i < createWorkspaceVariableJsonArray.size(); i++) {
                    createWorkspaceVariableJson = (JSONObject) createWorkspaceVariableJsonArray.get(i);
                    workspaceVariableName = (String) createWorkspaceVariableJson.get("propertyName");

                    for (String workspaceVariableResult : result.keySet()) {

                        if(workspaceVariableName.equals(workspaceVariableResult)) {

                            results.put(RETURN_CODE, result.get(workspaceVariableResult).get(RETURN_CODE));
                            results.put(workspaceVariableName, result.get(workspaceVariableResult).get("returnResult"));
                            results.put(STATUS_CODE, result.get(workspaceVariableResult).get(STATUS_CODE));
                        }
                    }
                }
                return results;
            }

        } catch (Exception e) {
            return getFailureResultsMap(StringUtilities.join(e, NEW_LINE));

        }
    }

    @NotNull
    public static Map<String, String> listWorkspaceVariables(@NotNull final TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) throws Exception {
        final HttpClientInputs httpClientInputs = new HttpClientInputs();
        httpClientInputs.setUrl(listWorkspaceVariablesUrl(terraformWorkspaceVariableInputs));
        setCommonHttpInputs(httpClientInputs, terraformWorkspaceVariableInputs.getCommonInputs());
        httpClientInputs.setAuthType(ANONYMOUS);
        httpClientInputs.setMethod(GET);
        httpClientInputs.setContentType(APPLICATION_VND_API_JSON);
        httpClientInputs.setResponseCharacterSet(terraformWorkspaceVariableInputs.getCommonInputs().getResponseCharacterSet());
        httpClientInputs.setHeaders(getAuthHeaders(terraformWorkspaceVariableInputs.getCommonInputs().getAuthToken()));
        return new HttpClientService().execute(httpClientInputs);
    }

    @NotNull
    public static String listWorkspaceVariablesUrl(@NotNull final TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) throws Exception {

        final URIBuilder uriBuilder = getUriBuilder();
        StringBuilder pathString = new StringBuilder()
                .append(API)
                .append(API_VERSION)
                .append(WORKSPACE_PATH)
                .append(PATH_SEPARATOR)
                .append(terraformWorkspaceVariableInputs.getWorkspaceId())
                .append(WORKSPACE_VARIABLE_PATH);
        uriBuilder.setPath(pathString.toString());
        return uriBuilder.build().toURL().toString();
    }

    @NotNull
    private static String createWorkspaceVariableUrl(@NotNull final TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) throws Exception {
        final URIBuilder uriBuilder = getUriBuilder();
        uriBuilder.setPath(getWorkspaceVariablePath(terraformWorkspaceVariableInputs));
        return uriBuilder.build().toURL().toString();
    }

    @NotNull
    public static String getWorkspaceVariablePath(@NotNull final TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) {
        StringBuilder pathString = new StringBuilder()
                .append(API)
                .append(API_VERSION)
                .append(WORKSPACE_PATH)
                .append(PATH_SEPARATOR)
                .append(terraformWorkspaceVariableInputs.getWorkspaceId())
                .append(WORKSPACE_VARIABLE_PATH);
        return pathString.toString();
    }

    public static Map<String, String> updateWorkspaceVariable(@NotNull final TerraformWorkspaceVariableInputs updateWorkspaceVariableInputs)
            throws Exception {
        final HttpClientInputs httpClientInputs = new HttpClientInputs();
        final TerraformCommonInputs commonInputs = updateWorkspaceVariableInputs.getCommonInputs();
        httpClientInputs.setUrl(updateWorkspaceVariableUrl(updateWorkspaceVariableInputs));
        setCommonHttpInputs(httpClientInputs, commonInputs);
        httpClientInputs.setAuthType(ANONYMOUS);
        httpClientInputs.setMethod(PATCH);
        httpClientInputs.setContentType(APPLICATION_VND_API_JSON);
        httpClientInputs.setBody(commonInputs.getRequestBody());
        httpClientInputs.setResponseCharacterSet(commonInputs.getResponseCharacterSet());
        httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken()));
        return new HttpClientService().execute(httpClientInputs);
    }

    @NotNull
    public static Map<String, String> deleteWorkspaceVariable(@NotNull final TerraformWorkspaceVariableInputs deleteWorkspaceVariableInputs)
            throws Exception {
        final HttpClientInputs httpClientInputs = new HttpClientInputs();
        final TerraformCommonInputs commonInputs = deleteWorkspaceVariableInputs.getCommonInputs();
        httpClientInputs.setUrl(deleteWorkspaceVariableUrl(deleteWorkspaceVariableInputs));
        setCommonHttpInputs(httpClientInputs, commonInputs);
        httpClientInputs.setAuthType(ANONYMOUS);
        httpClientInputs.setMethod(DELETE);
        httpClientInputs.setContentType(APPLICATION_VND_API_JSON);
        httpClientInputs.setResponseCharacterSet(commonInputs.getResponseCharacterSet());
        httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken()));
        return new HttpClientService().execute(httpClientInputs);
    }

    @NotNull
    private static String updateWorkspaceVariableUrl(@NotNull final TerraformWorkspaceVariableInputs updateWorkspaceVariableInputs) throws Exception {
        final URIBuilder uriBuilder = getUriBuilder();
        uriBuilder.setPath(getWorkspaceVariablesPath(updateWorkspaceVariableInputs));
        return uriBuilder.build().toURL().toString();
    }

    @NotNull
    private static String deleteWorkspaceVariableUrl(@NotNull final TerraformWorkspaceVariableInputs deleteWorkspaceVariableInputs) throws Exception {
        final URIBuilder uriBuilder = getUriBuilder();
        uriBuilder.setPath(getWorkspaceVariablesPath(deleteWorkspaceVariableInputs));
        return uriBuilder.build().toURL().toString();
    }

    @NotNull
    public static String getWorkspaceVariablesPath(@NotNull final TerraformWorkspaceVariableInputs updateWorkspaceVariableInputs) {
        StringBuilder pathString = new StringBuilder()
                .append(API)
                .append(API_VERSION)
                .append(WORKSPACE_PATH)
                .append(PATH_SEPARATOR)
                .append(updateWorkspaceVariableInputs.getWorkspaceId())
                .append(WORKSPACE_VARIABLE_PATH)
                .append(PATH_SEPARATOR)
                .append(updateWorkspaceVariableInputs.getWorkspaceVariableId());
        return pathString.toString();
    }

    @NotNull
    public static String createWorkspaceVariableRequestBody(TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) {
        String requestBody = EMPTY;
        ObjectMapper createWorkspaceVariableMapper = new ObjectMapper();
        CreateWorkspaceVariableRequestBody createWorkspaceVariableRequestBody = new CreateWorkspaceVariableRequestBody();
        CreateWorkspaceVariableRequestBody.CreateWorkspaceVariableData createWorkspaceVariableData = createWorkspaceVariableRequestBody.new CreateWorkspaceVariableData();
        createWorkspaceVariableData.setType(WORKSPACE_VARIABLE_TYPE);

        CreateWorkspaceVariableRequestBody.Attributes attributes = createWorkspaceVariableRequestBody.new Attributes();
        attributes.setKey(terraformWorkspaceVariableInputs.getWorkspaceVariableName());
        if (terraformWorkspaceVariableInputs.getWorkspaceVariableValue().isEmpty()) {
            attributes.setValue(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableValue());
        } else {
            attributes.setValue(terraformWorkspaceVariableInputs.getWorkspaceVariableValue());
        }
        attributes.setCategory(terraformWorkspaceVariableInputs.getWorkspaceVariableCategory());
        attributes.setHcl(terraformWorkspaceVariableInputs.getHcl());
        attributes.setSensitive(terraformWorkspaceVariableInputs.getSensitive());
        createWorkspaceVariableData.setAttributes(attributes);
        createWorkspaceVariableRequestBody.setData(createWorkspaceVariableData);

        try {
            requestBody = createWorkspaceVariableMapper.writeValueAsString(createWorkspaceVariableRequestBody);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }

        return requestBody;

    }

    @NotNull
    public static String updateWorkspaceVariableRequestBody(TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) {
        String requestBody = EMPTY;
        ObjectMapper updateWorkspaceVariableMapper = new ObjectMapper();
        UpdateWorkspaceVariableRequestBody updateWorkspaceVariableRequestBody = new UpdateWorkspaceVariableRequestBody();
        UpdateWorkspaceVariableRequestBody.UpdateWorkspaceVariableData updateWorkspaceVariableData = updateWorkspaceVariableRequestBody.new UpdateWorkspaceVariableData();
        updateWorkspaceVariableData.setType(WORKSPACE_VARIABLE_TYPE);
        updateWorkspaceVariableData.setId(terraformWorkspaceVariableInputs.getWorkspaceVariableId());

        UpdateWorkspaceVariableRequestBody.Attributes attributes = updateWorkspaceVariableRequestBody.new Attributes();

        attributes.setKey(terraformWorkspaceVariableInputs.getWorkspaceVariableName());
        attributes.setHcl(terraformWorkspaceVariableInputs.getHcl());
        attributes.setSensitive(terraformWorkspaceVariableInputs.getSensitive());

        if (terraformWorkspaceVariableInputs.getWorkspaceVariableValue().isEmpty()) {
            attributes.setValue(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableValue());
        } else {
            attributes.setValue(terraformWorkspaceVariableInputs.getWorkspaceVariableValue());
        }
        updateWorkspaceVariableData.setAttributes(attributes);
        updateWorkspaceVariableRequestBody.setData(updateWorkspaceVariableData);

        try {
            requestBody = updateWorkspaceVariableMapper.writeValueAsString(updateWorkspaceVariableRequestBody);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }

        return requestBody;

    }
}


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

namespace ClosestTwoPoints
{
    class Point
    {
        public int x { get; set; }
        public int y { get; set; }
    }
}