text:
package com.pardot.rhombus.util;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Maps;
import com.google.common.primitives.*;
import com.pardot.rhombus.cobject.CDefinition;
import com.pardot.rhombus.cobject.CField;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
/**
 * Pardot, a Salesforce company
 * User: Michael Frank
 * Date: 4/23/13
 */
public class JsonUtil {

	public static <T> T objectFromJsonResource(Class<T> objectClass, ClassLoader resourceClassLoader, String resourceLocation) throws IOException {
		ObjectMapper om = new ObjectMapper();
		InputStream inputStream = resourceClassLoader.getResourceAsStream(resourceLocation);
		T returnObject = om.readValue(inputStream, objectClass);
		inputStream.close();
		return returnObject;
	}

    public static <T> T objectFromJsonFile(Class<T> objectClass, ClassLoader resourceClassLoader, String filename) throws IOException {
        ObjectMapper om = new ObjectMapper();
        File f = new File(filename);
        T returnObject = om.readValue(f, objectClass);
        return returnObject;
    }

	public static List<Map<String, Object>> rhombusMapFromResource(ClassLoader resourceClassLoader, String resourceLocation) throws IOException {
		ObjectMapper om = new ObjectMapper();
		InputStream inputStream = resourceClassLoader.getResourceAsStream(resourceLocation);
		MapContainer mc = om.readValue(inputStream, MapContainer.class);
		inputStream.close();
		return mc.getValues();
	}

	public static SortedMap<String, Object> rhombusMapFromJsonMap(Map<String, Object> jsonMap, CDefinition definition) {
		SortedMap<String, Object> rhombusMap = Maps.newTreeMap();
		for(CField field : definition.getFields().values()) {
			if(jsonMap.containsKey(field.getName())) {
				rhombusMap.put(field.getName(), typedObjectFromValueAndField(jsonMap.get(field.getName()), field));
			}
		}

		// TTL is a pass-through.  Though all cassandra objects support the setting of a TTL,
		// not all business logic does.  Therefore, TTL is toggleable on an object-by-object basis.
		if(jsonMap.containsKey("_ttl")) {
			rhombusMap.put("_ttl", jsonMap.get("_ttl"));
		}

		if(jsonMap.containsKey("id") && (!definition.getFields().containsKey("id")) ){
			//we have a user supplied ID but not a custom key type
			rhombusMap.put("id", UUID.fromString(jsonMap.get("id").toString()));
		}
		return rhombusMap;
	}

	public static Object typedObjectFromValueAndField(Object jsonValue, CField field) throws IllegalArgumentException {
		try {
			return typedObjectFromValueAndFieldType(jsonValue, field.getType());
		} catch (IllegalArgumentException e) {
			throw new IllegalArgumentException("Field " + field.getName() + ": Unable to convert "+ jsonValue + " of type "+jsonValue.getClass()+" to C* type " + field.getType().toString());
		}
	}

	public static Object typedObjectFromValueAndFieldType(Object jsonValue, CField.CDataType fieldType) throws IllegalArgumentException {
		if(jsonValue == null) {
			return null;
		}
		switch(fieldType) {
			case ASCII:
			case VARCHAR:
			case TEXT:
				String parsedString = String.valueOf(jsonValue);
				if (parsedString == null) {
					throw new IllegalArgumentException();
				} else {
					return parsedString;
				}
			case BIGINT:
			case COUNTER:
				return longFromNumber(jsonValue);
			case BLOB:
				throw new IllegalArgumentException();
			case BOOLEAN:
				if (String.class.isAssignableFrom(jsonValue.getClass())) {
					//First try parse it as an int
					Integer parsedNumber = Ints.tryParse((String)jsonValue);
					if(parsedNumber == null) {
						return Boolean.valueOf((String)jsonValue);
					} else {
						jsonValue = parsedNumber;
					}
				}
				if(Integer.class.isAssignableFrom(jsonValue.getClass())){
					Integer intValue = (Integer)jsonValue;
					return (intValue > 0);
				} else if(Boolean.class.isAssignableFrom(jsonValue.getClass())){
					return jsonValue;
				}else {
					throw new IllegalArgumentException();
				}
			case DECIMAL:
				if (String.class.isAssignableFrom(jsonValue.getClass())) {
					return new BigDecimal((String)jsonValue);
				} else if(Integer.class.isAssignableFrom(jsonValue.getClass())){
					return BigDecimal.valueOf((Integer)jsonValue);
				} else if(Long.class.isAssignableFrom(jsonValue.getClass())){
					return BigDecimal.valueOf((Long)jsonValue);
				} else if(Float.class.isAssignableFrom(jsonValue.getClass())){
					return BigDecimal.valueOf((Float)jsonValue);
				} else if(Double.class.isAssignableFrom(jsonValue.getClass())) {
					return BigDecimal.valueOf((Double)jsonValue);
				}else {
					throw new IllegalArgumentException();
				}
			case DOUBLE:
				if (String.class.isAssignableFrom(jsonValue.getClass())) {
					Double parsedNumber = Doubles.tryParse((String) jsonValue);
					if (parsedNumber != null) {
						return parsedNumber;
					}
				} else if(Integer.class.isAssignableFrom(jsonValue.getClass())){
					return Double.valueOf((Integer)jsonValue);
				} else if(Long.class.isAssignableFrom(jsonValue.getClass())){
					return Double.valueOf((Long)jsonValue);
				} else if(Double.class.isAssignableFrom(jsonValue.getClass())){
					return jsonValue;
				}
				else if(Float.class.isAssignableFrom(jsonValue.getClass())){
					return Double.valueOf((Float)jsonValue);
				}
				throw new IllegalArgumentException();
			case FLOAT:
				if (String.class.isAssignableFrom(jsonValue.getClass())) {
					Float parsedNumber = Floats.tryParse((String) jsonValue);
					if (parsedNumber != null) {
						return parsedNumber;
					}
				} else if(Integer.class.isAssignableFrom(jsonValue.getClass())){
					return Float.valueOf((Integer)jsonValue);
				} else if(Long.class.isAssignableFrom(jsonValue.getClass())){
					return Float.valueOf((Long)jsonValue);
				} else if(Double.class.isAssignableFrom(jsonValue.getClass())){
					return ((Double)jsonValue).floatValue();
				}
				else if(Float.class.isAssignableFrom(jsonValue.getClass())){
					return jsonValue;
				}
				throw new IllegalArgumentException();
			case INT:
				return intFromNumber(jsonValue);
			case TIMESTAMP:
				if(Date.class.isAssignableFrom(jsonValue.getClass())) {
					return jsonValue;
				} else if(Integer.class.isAssignableFrom(jsonValue.getClass())){
					return new Date((Integer)jsonValue);
				} else if(Long.class.isAssignableFrom(jsonValue.getClass())) {
					return new Date((Long)jsonValue);
				} else {
					throw new IllegalArgumentException();
				}
			case UUID:
			case TIMEUUID:
				if(UUID.class.isAssignableFrom(jsonValue.getClass())) {
					return jsonValue;
				} else if(String.class.isAssignableFrom(jsonValue.getClass())){
					return UUID.fromString((String)jsonValue);
				} else {
					throw new IllegalArgumentException();
				}
			case VARINT:
				if(String.class.isAssignableFrom(jsonValue.getClass())) {
					return new BigInteger((String)jsonValue);
				}
				return BigInteger.valueOf(longFromNumber(jsonValue));
			default:
				return null;
		}
	}

	private static Long longFromNumber(Object number) {
		if(Boolean.class.isAssignableFrom(number.getClass())) {
			return ((Boolean)number ? 1L : 0L);
        } else if(String.class.isAssignableFrom(number.getClass())) {
            Long parsedNumber = Longs.tryParse((String) number);
            if (parsedNumber != null) {
                return parsedNumber;
            }
        } else if(Double.class.isAssignableFrom(number.getClass())) {
            return ((Double)number).longValue();
        } else if(Float.class.isAssignableFrom(number.getClass())) {
            return ((Float)number).longValue();
		} else if(Integer.class.isAssignableFrom(number.getClass())) {
			return ((Integer)number).longValue();
		} else if(Long.class.isAssignableFrom(number.getClass())) {
			return (Long)number;
        }
        throw new IllegalArgumentException();
	}

	private static Integer intFromNumber(Object number) {
		if(Boolean.class.isAssignableFrom(number.getClass())) {
			return ((Boolean)number ? 1 : 0);
        } else if(String.class.isAssignableFrom(number.getClass())) {
            Integer parsedNumber = Ints.tryParse((String) number);
            if (parsedNumber != null) {
                return parsedNumber;
            }
        } else if(Double.class.isAssignableFrom(number.getClass())) {
            return ((Double)number).intValue();
        } else if(Float.class.isAssignableFrom(number.getClass())) {
            return ((Float)number).intValue();
        } else if(Long.class.isAssignableFrom(number.getClass())) {
            return ((Long)number).intValue();
		} else if(Integer.class.isAssignableFrom(number.getClass())) {
			return (Integer)number;
        }
        throw new IllegalArgumentException();
	}

}


text:
package Layers;

import UI.Dot;
import UI.Main;
import UI.Point2i;
import UI.UIValues;
import javafx.scene.control.Alert;
import javafx.scene.control.ButtonType;
import javafx.scene.input.KeyCode;
import javafx.scene.input.ScrollEvent;
import javafx.scene.paint.Color;

import java.util.Optional;

import static UI.Main.CurrentLayerData;
import static UI.Main.x;
import static UI.Main.y;

/**
 * Created by Akihiro on 2017/03/01.
 */
public class FrontDotLayer extends Layer {
    private boolean selecting;
    private Dot last;

    public FrontDotLayer(double width, double height){
        super(width, height);
        selecting = false;
        last = null;
    }

    public boolean isSelecting() {
        return this.selecting;
    }

    public void Selecting(boolean status){
        this.selecting = status;
    }

    public void setLast(Dot dot){
        last = dot;
    }

    public Dot getLast() {
        return last;
    }

    public boolean isLastEmpty(){
        return last == null;
    }

    @Override
    public void scroll_handler(ScrollEvent event)
    {
        if(Main.keyTable.isPressed(KeyCode.Z)) {
            clear();
            Main.main_view.getSystemLayers().getLines().clear();
            GridLayer grid_layer = Main.main_view.getSystemLayers().getGrid();
            grid_layer.editInterval(event.getDeltaY() > 0 ? UIValues.EXPANSION_PER_ONE_SCROLL : -UIValues.EXPANSION_PER_ONE_SCROLL);
            grid_layer.redrawGrid();
            CurrentLayerData.AllDraw4PR(this, Main.main_view.getSystemLayers().getLines());
        }else{
            Main.main_view.scroll((int)event.getDeltaX() / 4, (int)event.getDeltaY() / 10);
            Main.main_view.lookAt();
        }
    }

    /*
    * ドット配置を行うメソッド
     */
    public void putDot(GridLayer gridLayer){

        //nullチェック
        if(CurrentLayerData == null)
            return;

        Point2i begin_point = Main.main_view.getMainViewBegin();
        System.out.println((begin_point.getX() + (x / gridLayer.getInterval())) + ":" + (begin_point.getY() + (y / gridLayer.getInterval())));

        for(final Dot p : CurrentLayerData.getDotSet()){
            if(Math.abs(p.getX() - x) == 0){
                if(Math.abs(p.getY() - y) == 0){
                    Alert alert = new Alert(Alert.AlertType.CONFIRMATION, "ドットを配置しますか?", ButtonType.NO, ButtonType.YES);
                    alert.setHeaderText("付近にドットがあります");
                    Optional<ButtonType> result = alert.showAndWait();
                    if(!result.isPresent() || result.get() == ButtonType.NO){
                        return;
                    }
                    break;
                }
            }
        }

        //グリッド補正の判定
        //Dot dot = gridLayer.isEnableComplete() ? new Dot(x, y, gridLayer.getInterval()) : new Dot(x, y);
        Dot dot = new Dot(begin_point.getX() + (x / gridLayer.getInterval()), begin_point.getY() + (y / gridLayer.getInterval()));

        dot.drawOffset(this, Color.BLACK, gridLayer.getInterval(), Main.main_view.getMainViewBegin());
        CurrentLayerData.AddDot(dot);

        System.out.println("came");

        setLast(dot);
    }

    public void putOneDot(Dot dot){

        dot.drawOffset(this, Color.BLACK, Main.main_view.getSystemLayers().getGrid().getInterval(), Main.main_view.getMainViewBegin());
        CurrentLayerData.AddDot(dot);

        setLast(dot);
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php setlocale(LC_TIME, 'ita', 'it_IT');?>

        <a href="<?php echo base_url();?>index.php/site/members_area">

<?php echo strftime("%a %d %B %Y"); ?>

            Bentornato, <?php echo $this->session->userdata('nome'); ?>

<?php echo anchor('site/members_area', 'Home'); ?>

<?php echo anchor('gestioneutenti/mostra_profilo', 'Il tuo profilo'); ?>

<?php echo anchor('site/istruzioni', 'Istruzioni per l\'uso'); ?>

<?php echo anchor('login/logout', 'Logout'); ?>


text:
using ExpenseManager.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ExpenseManager.Persistence;

namespace ExpenseManager.ViewModel
{
    /// <summary>
    /// The controller class to the expense type functions
    /// </summary>
    public class ExpenseTypeController
    {
        /// <summary>
        /// The method that will share data between ui, model and persistance
        /// </summary>
        /// <param name="key">the key of expense type</param>
        /// <param name="description">the description of expense type</param>
        public void RegisterExpenseType(string key, string description)
        {
            ExpenseType expType = new ExpenseType(key, description);

            PersistenceFactory.GetFactory().GetRepository().GetExpenseTypeRepository().Save(expType);
        }

        /// <summary>
        /// The method that will return the list with all expense types.
        /// </summary>
        /// <returns>a list with all expense types</returns>
        public List<ExpenseType> GetAllExpenseTypes()
        {
            return PersistenceFactory.GetFactory().GetRepository().GetExpenseTypeRepository().All();
        }
    }
}


text:
package com.amazonaws.services.braket.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SearchDevicesResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {

    /**
     *

     * An array of DeviceSummary objects for devices that match the specified filter values.
     *

     */
    private java.util.List<DeviceSummary> devices;
    /**
     *

     * A token used for pagination of results, or null if there are no additional results. Use the token value in a
     * subsequent request to continue results where the previous request ended.
     *

     */
    private String nextToken;

    /**
     *

     * An array of DeviceSummary objects for devices that match the specified filter values.
     *

     *
     * @return An array of DeviceSummary objects for devices that match the specified filter values.
     */

    public java.util.List<DeviceSummary> getDevices() {
        return devices;
    }

    /**
     *

     * An array of DeviceSummary objects for devices that match the specified filter values.
     *

     *
     * @param devices
     *        An array of DeviceSummary objects for devices that match the specified filter values.
     */

    public void setDevices(java.util.Collection<DeviceSummary> devices) {
        if (devices == null) {
            this.devices = null;
            return;
        }

        this.devices = new java.util.ArrayList<DeviceSummary>(devices);
    }

    /**
     *

     * An array of DeviceSummary objects for devices that match the specified filter values.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setDevices(java.util.Collection)} or {@link #withDevices(java.util.Collection)} if you want to override
     * the existing values.
     *

     *
     * @param devices
     *        An array of DeviceSummary objects for devices that match the specified filter values.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SearchDevicesResult withDevices(DeviceSummary... devices) {
        if (this.devices == null) {
            setDevices(new java.util.ArrayList<DeviceSummary>(devices.length));
        }
        for (DeviceSummary ele : devices) {
            this.devices.add(ele);
        }
        return this;
    }

    /**
     *

     * An array of DeviceSummary objects for devices that match the specified filter values.
     *

     *
     * @param devices
     *        An array of DeviceSummary objects for devices that match the specified filter values.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SearchDevicesResult withDevices(java.util.Collection<DeviceSummary> devices) {
        setDevices(devices);
        return this;
    }

    /**
     *

     * A token used for pagination of results, or null if there are no additional results. Use the token value in a
     * subsequent request to continue results where the previous request ended.
     *

     *
     * @param nextToken
     *        A token used for pagination of results, or null if there are no additional results. Use the token value in
     *        a subsequent request to continue results where the previous request ended.
     */

    public void setNextToken(String nextToken) {
        this.nextToken = nextToken;
    }

    /**
     *

     * A token used for pagination of results, or null if there are no additional results. Use the token value in a
     * subsequent request to continue results where the previous request ended.
     *

     *
     * @return A token used for pagination of results, or null if there are no additional results. Use the token value
     *         in a subsequent request to continue results where the previous request ended.
     */

    public String getNextToken() {
        return this.nextToken;
    }

    /**
     *

     * A token used for pagination of results, or null if there are no additional results. Use the token value in a
     * subsequent request to continue results where the previous request ended.
     *

     *
     * @param nextToken
     *        A token used for pagination of results, or null if there are no additional results. Use the token value in
     *        a subsequent request to continue results where the previous request ended.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SearchDevicesResult withNextToken(String nextToken) {
        setNextToken(nextToken);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getDevices() != null)
            sb.append("Devices: ").append(getDevices()).append(",");
        if (getNextToken() != null)
            sb.append("NextToken: ").append(getNextToken());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof SearchDevicesResult == false)
            return false;
        SearchDevicesResult other = (SearchDevicesResult) obj;
        if (other.getDevices() == null ^ this.getDevices() == null)
            return false;
        if (other.getDevices() != null && other.getDevices().equals(this.getDevices()) == false)
            return false;
        if (other.getNextToken() == null ^ this.getNextToken() == null)
            return false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getDevices() == null) ? 0 : getDevices().hashCode());
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
        return hashCode;
    }

    @Override
    public SearchDevicesResult clone() {
        try {
            return (SearchDevicesResult) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

}


text: oooooooooooooooooooooooooooooo


text:
[instagram-private-api](../../README.md) / [responses](../../modules/responses.md) / ReelsTrayFeedResponseBroadcast_owner

# Interface: ReelsTrayFeedResponseBroadcast\_owner

[responses](../../modules/responses.md).ReelsTrayFeedResponseBroadcast_owner

## Table of contents

### Properties

- [friendship\_status](ReelsTrayFeedResponseBroadcast_owner.md#friendship_status)
- [full\_name](ReelsTrayFeedResponseBroadcast_owner.md#full_name)
- [is\_private](ReelsTrayFeedResponseBroadcast_owner.md#is_private)
- [is\_verified](ReelsTrayFeedResponseBroadcast_owner.md#is_verified)
- [live\_subscription\_status](ReelsTrayFeedResponseBroadcast_owner.md#live_subscription_status)
- [pk](ReelsTrayFeedResponseBroadcast_owner.md#pk)
- [profile\_pic\_id](ReelsTrayFeedResponseBroadcast_owner.md#profile_pic_id)
- [profile\_pic\_url](ReelsTrayFeedResponseBroadcast_owner.md#profile_pic_url)
- [username](ReelsTrayFeedResponseBroadcast_owner.md#username)

## Properties

### friendship\_status

• **friendship\_status**: [`ReelsTrayFeedResponseFriendship_status`](ReelsTrayFeedResponseFriendship_status.md)

#### Defined in

[src/responses/reels-tray.feed.response.ts:259](https://github.com/Nerixyz/instagram-private-api/blob/b3351b9/src/responses/reels-tray.feed.response.ts#L259)

___

### full\_name

• **full\_name**: `string`

#### Defined in

[src/responses/reels-tray.feed.response.ts:255](https://github.com/Nerixyz/instagram-private-api/blob/b3351b9/src/responses/reels-tray.feed.response.ts#L255)

___

### is\_private

• **is\_private**: `boolean`

#### Defined in

[src/responses/reels-tray.feed.response.ts:256](https://github.com/Nerixyz/instagram-private-api/blob/b3351b9/src/responses/reels-tray.feed.response.ts#L256)

___

### is\_verified

• **is\_verified**: `boolean`

#### Defined in

[src/responses/reels-tray.feed.response.ts:260](https://github.com/Nerixyz/instagram-private-api/blob/b3351b9/src/responses/reels-tray.feed.response.ts#L260)

___

### live\_subscription\_status

• **live\_subscription\_status**: `string`

#### Defined in

[src/responses/reels-tray.feed.response.ts:261](https://github.com/Nerixyz/instagram-private-api/blob/b3351b9/src/responses/reels-tray.feed.response.ts#L261)

___

### pk

• **pk**: `number`

#### Defined in

[src/responses/reels-tray.feed.response.ts:253](https://github.com/Nerixyz/instagram-private-api/blob/b3351b9/src/responses/reels-tray.feed.response.ts#L253)

___

### profile\_pic\_id

• **profile\_pic\_id**: `string`

#### Defined in

[src/responses/reels-tray.feed.response.ts:258](https://github.com/Nerixyz/instagram-private-api/blob/b3351b9/src/responses/reels-tray.feed.response.ts#L258)

___

### profile\_pic\_url

• **profile\_pic\_url**: `string`

#### Defined in

[src/responses/reels-tray.feed.response.ts:257](https://github.com/Nerixyz/instagram-private-api/blob/b3351b9/src/responses/reels-tray.feed.response.ts#L257)

___

### username

• **username**: `string`

#### Defined in

[src/responses/reels-tray.feed.response.ts:254](https://github.com/Nerixyz/instagram-private-api/blob/b3351b9/src/responses/reels-tray.feed.response.ts#L254)


text:
window.addEventListener(
   "load",
   function() {
      var revealers = document.querySelectorAll(
         "footer.toolbar > menu > li[aria-controls]"
      );
      for (var i=0, max=revealers.length; i < max; ++i) {
         revealers[i].addEventListener(
            "click",
            function() { revealPage(this.getAttribute("aria-controls")); }
         );
      }
   }
);
function showToolbar(barId) {
   var menus = document.querySelectorAll("footer.toolbar > menu");
   var container = menus[0].parentNode;
   container.style.display = "none";
   for (max=menus.length, i=0; i < max; ++i) {
      var menu = menus[i];
      if (menu.id === barId) {
         container.style.display = "";
         menu.setAttribute("aria-expanded", "true");
      }else {
         menu.setAttribute("aria-expanded", "false");
      }
   }
}


text:
import numpy as np
import pytest

import mbuild as mb
from mbuild.tests.base_test import BaseTest
from mbuild.utils.io import has_foyer

class TestHoomdXML(BaseTest):

    def test_save(self, ethane):
        ethane.save(filename='ethane.hoomdxml')

    @pytest.mark.skipif(not has_foyer, reason="Foyer is not installed")
    def test_save_forcefield(self, ethane):
        ethane.save(filename='ethane-opls.hoomdxml', forcefield_name='oplsaa')

    @pytest.mark.skipif(not has_foyer, reason="Foyer is not installed")
    def test_save_box(self, ethane):
        box = mb.Box(lengths=np.array([2.0, 2.0, 2.0]))
        ethane.save(filename='ethane-box.hoomdxml', forcefield_name='oplsaa', box=box)

    @pytest.mark.skipif(not has_foyer, reason="Foyer is not installed")
    def test_rigid(self, ethane):
        box = mb.Box(lengths=np.array([2.0, 2.0, 2.0]))
        rigid = np.zeros(ethane.n_particles)
        ethane.save(filename='ethane-box.hoomdxml',
                    forcefield_name='oplsaa',
                    box=box,
                    rigid_bodies=rigid)


text:
div {
  filter: progid:DXImageTransform.Microsoft.Alpha(enabled=false);
  opacity: 1; }

div {
  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=20);
  opacity: 0.2; }


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mycotaxon 28(2): 532 (1987)

#### Original name
Nigrohydnum nigrum Ryvarden, 1987

### Remarks
null


text:
namespace Poco {
namespace Net {

SocketNotification::SocketNotification(SocketReactor* pReactor):
	_pReactor(pReactor)
{
}

SocketNotification::~SocketNotification()
{
}

void SocketNotification::setSocket(const Socket& socket)
{
	_socket = socket;
}

ReadableNotification::ReadableNotification(SocketReactor* pReactor):
	SocketNotification(pReactor)
{
}

ReadableNotification::~ReadableNotification()
{
}

WritableNotification::WritableNotification(SocketReactor* pReactor):
	SocketNotification(pReactor)
{
}

WritableNotification::~WritableNotification()
{
}

ErrorNotification::ErrorNotification(SocketReactor* pReactor):
	SocketNotification(pReactor)
{
}

ErrorNotification::~ErrorNotification()
{
}

TimeoutNotification::TimeoutNotification(SocketReactor* pReactor):
	SocketNotification(pReactor)
{
}

TimeoutNotification::~TimeoutNotification()
{
}

IdleNotification::IdleNotification(SocketReactor* pReactor):
	SocketNotification(pReactor)
{
}

IdleNotification::~IdleNotification()
{
}

ShutdownNotification::ShutdownNotification(SocketReactor* pReactor):
	SocketNotification(pReactor)
{
}

ShutdownNotification::~ShutdownNotification()
{
}

} } // namespace Poco::Net


text:
/*
 * NegativeNumberQueriesJUnitTest.java
 *
 * Created on October 5, 2005, 2:44 PM
 */

package com.gemstone.gemfire.cache.query.functional;

import java.util.Properties;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.cache.query.CacheUtils;
import com.gemstone.gemfire.cache.query.Index;
import com.gemstone.gemfire.cache.query.IndexType;
import com.gemstone.gemfire.cache.query.Query;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.query.SelectResults;
import com.gemstone.gemfire.cache.query.data.Numbers;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;

// TODO:TEST clean this up and add assertions
/**
 * @author prafulla
 */
@Category(IntegrationTest.class)
public class NegativeNumberQueriesJUnitTest {

  private Cache cache;
  private Region region;
  private Index index;
  private DistributedSystem ds;
  private QueryService qs;

  private int cnt = 1;

  @Before
  public void setUp() throws Exception {
    Properties props = new Properties();
    props.setProperty("mcast-port", "0");
    ds = DistributedSystem.connect(props);
    cache = CacheFactory.create(ds);
    /* create region with to contain Portfolio objects */

    AttributesFactory factory = new AttributesFactory();
    factory.setScope(Scope.DISTRIBUTED_ACK);
    factory.setValueConstraint(Numbers.class);
    factory.setIndexMaintenanceSynchronous(true);
    region = cache.createRegion("numbers", factory.create());
  }

  @After
  public void tearDown() throws Exception {
    if (ds != null) {
      ds.disconnect();
    }
  }

  @Test
  public void testBug33474() throws Exception {

    populateRegionsWithNumbers();
    // createIndexOnNumbers();

    QueryService qs;
    qs = cache.getQueryService();
    String queryStr = "SELECT DISTINCT * FROM /numbers num WHERE num.id1 >= -200";
    Query q = qs.newQuery(queryStr);
    SelectResults rs = (SelectResults) q.execute();
    CacheUtils
        .log("--------------------- Size of Result Set is: -------------------------"
            + rs.size());

  }// end of testGetQueryTimes

  private void populateRegionsWithNumbers() throws Exception {
    CacheUtils
        .log("--------------------- Populating Data -------------------------");
    for (int i = 0; i < 100; i++) {
      region.put(String.valueOf(i), new Numbers(i));
    }
    for (int i = -100; i > -200; i--) {
      region.put(String.valueOf(i), new Numbers(i));
    }
    CacheUtils
        .log("--------------------- Data Populatio done -------------------------");
  }// end of populateRegions

  private void createIndexOnNumbers() throws Exception {
    CacheUtils
        .log("--------------------- Creating Indices -------------------------");
    QueryService qs;
    qs = cache.getQueryService();
    qs.createIndex("id", IndexType.FUNCTIONAL, "num.id", "/numbers num");
    qs.createIndex("id1", IndexType.FUNCTIONAL, "num.id1", "/numbers num");
    qs.createIndex("avg", IndexType.FUNCTIONAL, "num.max1", "/numbers num");
    qs.createIndex("l", IndexType.FUNCTIONAL, "num.l", "/numbers num");
    CacheUtils
        .log("--------------------- Index Creation Done -------------------------");
  }// end of createIndex

}// end of NegativeNumberQueriesJUnitTest


text:
layout: post
title: !binary |-
  U2VhcmNoIHNjcmlwdA==
joomla_id: 25
joomla_url: !binary |-
  c2VhcmNoLXNjcmlwdA==
date: 2007-02-06 00:00:00.000000000 +02:00
tags: [php, search, script]
---
Today I've uploaded on oprod.tk a database search script, and a script for entering keywords.
And I didn't forgot about messenger4LAN. It will be launched soon.


text:
RailsAdmin.config do |config|
  config.main_app_name = ['NVST', 'Admin']
  config.parent_controller = '::RailsAdminController'
  # config.main_app_name = ->(controller) { [Rails.application.engine_name.titleize, controller.params['action'].titleize] }

  # RailsAdmin may need a way to know who the current user is]
  config.current_user_method { current_admin }
  config.authenticate_with   { authenticate_admin! }

  config.audit_with :history, 'Admin'
  # config.audit_with :paper_trail, 'User'

  # Display empty fields in show views:
  # config.compact_show_view = false

  # Number of default rows per-page:
  # config.default_items_per_page = 20

  config.included_models = %w[Admin User Investment Contribution Transfer Trade Event Expense]

  # Label methods for model instances:
  config.label_methods = [:title, :name]

  config.navigation_static_links = {
    'Portfolio'    => '/admin/portfolio',
    'Transactions' => '/admin/portfolio/transactions',
    'Tax Docs'     => '/admin/tax_docs',
    'Summaries'    => '/admin/summaries',
  }

  config.models_pool.each do |model|
    config.model "#{model}" do
      list do
        exclude_fields :created_at, :updated_at
      end
    end
  end
end


text:
extern alias WithExceptions;
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WithExceptions::TestFoundations.IntegrationTests.Shared;
using Xunit;

namespace CodeContracts.Fody.IntegrationTests.WithExceptions
{
    public class InterfaceWithContractClassTests
    {
        [Fact]
        public void MethodWithContractClassTest()
        {
            ContractAssert.With<InterfaceWithContractClassImplementation>()
                .Success(sut => sut.FieldWithContractClassReturnValue = sut)
                .Success(sut => sut.MethodWithContractClass());

            ContractAssert.With<InterfaceWithContractClassImplementation>()
                .Success(sut => sut.FieldWithContractClassReturnValue = new InterfaceWithContractClassImplementation())
                .Fail(sut => sut.MethodWithContractClass());
        }

        [Fact]
        public void MethodWithContractAttributeTest()
        {
            ContractAssert.With<InterfaceWithContractClassImplementation>()
                .Success(sut => sut.FieldWithContractAttributeReturnValue = sut)
                .Success(sut => sut.MethodWithContractAttribute());

            ContractAssert.With<InterfaceWithContractClassImplementation>()
                .Success(sut => sut.FieldWithContractAttributeReturnValue = new InterfaceWithContractClassImplementation())
                .Fail(sut => sut.MethodWithContractAttribute());
        }
    }
}


text:
In this example we are going to see the **Organism.Footer** properties.

A *footer* only can be insert in an **Organism.Article**, **Organism.Aside** or in an **Organism.Dialog**.

In turn, in a *footer* only can be insert an **Atom.Progress**, **Molecule.Div** or a **Molecule.Navigation**.

For insert a *footer*, we have to declare it in the yaml with an array where we declare its children:

```
- Organism.Footer:
   children: []

```

In this example we insert a *Molecule.Navigation* that it has three *Atom.Button* child.

```
children:
  - Molecule.Navigation:
    children:
      - Atom.Button:
          icon: add-user
          path: main/add
          events:
            - touch
      - Atom.Button:
          icon: like2
          count: "14"
          path: main/like
          events:
            - touch
      - Atom.Button:
          icon: refresh
          events:
            - touch
```

As can be seen, both the first and second button has been added **path** attribute whose function is show indicated section.

For example, in the first case, we have an attribute path with *main/add* value. This means that show the **Organims.Section** with *add* ID which is in **Organism.Article** with *main* ID.


text:
<?php
use app\assets\FullpageAsset;
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use yii\helpers\Url;
use kartik\select2\Select2;
use yii\bootstrap\Modal;

function mkFieldTemplate($icon) {
    return str_replace('{icon}', $icon, '
        {label}

          {input}

        {error}{hint}');
}
FullpageAsset::register($this);
$lang = Yii::$app->language;
?>
<?= $this->render('_emoticon_defs') ?>

    <?= Html::a(Yii::t('app', 'Get out'), ['site/index'], ['class' => 'btn-link']) ?>
    <?= Html::a(Yii::t('app', 'Restart'), '#step-0', ['class' => 'btn-link']) ?>

  Hotel Riosol

  <?php $form = ActiveForm::begin([
      'validationUrl' => ['survey/guest-validate'],
      'id' => 'guest-form'
  ]); ?>

            <?php $langs_configs = [[
                  'lang' => 'es',
                  'label' => 'Español',
                  'classes' => 'col-xs-2 col-sm-1 col-sm-offset-0 col-xs-offset-1 language-wrapper'
              ], [
                  'lang' => 'en',
                  'label' => 'English',
                  'classes' => 'col-xs-2 col-sm-1 col-xs-offset-2 col-sm-offset-1 language-wrapper'
              ], [
                  'lang' => 'de',
                  'label' => 'Deutsch',
              ], [
                  'lang' => 'sv',
                  'label' => 'Svenska',
                  'classes' => 'col-xs-2 col-sm-1 col-xs-offset-1 col-sm-offset-1 language-wrapper'
              ], [
                  'lang' => 'da',
                  'label' => 'Dansk',
                  'classes' => 'col-xs-2 col-sm-1 col-xs-offset-2 col-sm-offset-1 language-wrapper'
              ], [
                  'lang' => 'no',
                  'label' => 'Norsk',
              ]];
              foreach ($langs_configs as $lang_config) {
                  if (isset($lang_config['classes'])) $classes = $lang_config['classes'];
                  if ($lang === $lang_config['lang']) echo Html::beginTag('div', ['class' => "{$classes} active"]);
                  else echo Html::beginTag('a', ['href' => Url::to(['site/change-language', 'lang' => $lang_config['lang']]), 'class' => $classes]);
                  echo Html::img('@web/img/languages.png', ['class' => "language language-{$lang_config['lang']}"]);
                  echo $lang_config['label'];
                  if ($lang === $lang_config['lang']) echo Html::endTag('div');
                  else echo Html::endTag('a');
              } ?>

<?= Yii::t('app', 'Quality survey') ?>

<?= Yii::t('app', 'Dear guest') ?>,

<?= Yii::t('app', 'your opinion and suggestions, even your complaints, are the best tool to improve our facilities and services, so we sincerely thank you to take a few minutes of your holiday to complete this questionnaire before leaving the hotel') ?>.

<?= Yii::t('app', 'We assure you that all your contributions will be taken into account.')?>

<?= Yii::t('app', 'The direction') ?>

          <?= Yii::t('app', 'Start') ?>

  <?php
    $previous = $next = null;
    $current = 1;
    foreach ($model->answers as $department => $answers) {
      echo Html::beginTag('div', ['class' => 'section', 'data-anchor' => "step-{$current}"]);
        echo Html::beginTag('div', ['class' => 'container panel']);
          echo Html::tag('h1', $department, ['class' => 'page-header']);
          echo Html::beginTag('div', ['class' => 'row']);
            echo $this->render('_emoticon_cols');
            foreach ($answers as $answer) {
              echo $form->field($answer, "[{$answer->question_id}]score", [
                'template' => "
{$answer->question->title}
\n{input}\n{hint}\n{error}",
              ])->radioList([
                  3 => null,
                  2 => null,
                  1 => null,
                  0 => null
              ], ['itemOptions' => ['labelOptions' => ['class' => 'col-xs-1']]]);
            }
          echo Html::endTag('div');
          echo Html::tag('hr');
          echo Html::beginTag('div', ['class' => 'row']);
            $previous = $current - 1;
            echo Html::tag('div', Html::tag('a', Yii::t('app', 'Previous'), [
                'href' => "#step-{$previous}",
                'class' => 'btn btn-xl btn-block btn-primary'
            ]), [
                'class' => 'col-md-3 col-xs-6'
            ]);
            $next = $current + 1;
            echo Html::tag('div', Html::tag('a', Yii::t('app', 'Next'), [
                'href' => "#step-{$next}",
                'class' => 'btn btn-xl btn-block btn-primary'
            ]), [
                'class' => 'col-md-3 col-md-offset-6 col-xs-6'
            ]);
          echo Html::endTag('div');
        echo Html::endTag('div');
      echo Html::endTag('div');
      $current++;
    }
  ?>
  <div class="section" data-anchor="step-<?= $current ?>">

      <?= $form->field($model->survey, 'source_title', ['template' => mkFieldTemplate('magnet')])->dropDownList($sources, ['prompt' => '', 'class' => 'input-lg form-control']) ?>
      <?= $form->field($model->survey, 'touroperator_name', ['template' => mkFieldTemplate('briefcase')])->textInput(['maxlength' => true, 'class' => 'input-lg form-control']) ?>
      <?= $form->field($model->survey, 'guest_country_id')->widget(Select2::classname(), [
          'size' => 'lg',
          'options' => [
              'prompt' => '',
          ], 'addon' => [
              'prepend' => [
                  'content' => ''
              ]
          ], 'data' => $countries
      ]) ?>

      <?php
        $previous = $current - 1;
        echo Html::tag('div', Html::tag('a', Yii::t('app', 'Previous'), [
            'href' => "#step-{$previous}",
            'class' => 'btn btn-xl btn-block btn-primary'
        ]), [
            'class' => 'col-md-3 col-xs-6'
        ]);
        $next = $current + 1;
        echo Html::tag('div', Html::tag('a', Yii::t('app', 'Next'), [
            'href' => "#step-{$next}",
            'class' => 'btn btn-xl btn-block btn-primary'
        ]), [
            'class' => 'col-md-3 col-md-offset-6 col-xs-6'
        ]);
        $current++;
      ?>

  <div class="section" data-anchor="step-<?= $current ?>">

      <?= $form->field($model->survey, 'met_expectation_title', ['template' => mkFieldTemplate('apple')])->dropDownList($met_expectations, ['prompt' => '', 'class' => 'input-lg form-control']) ?>
      <?= $form->field($model->survey, 'evolution_title', ['template' => mkFieldTemplate('signal')])->dropDownList($evolutions, ['prompt' => '', 'class' => 'input-lg form-control']) ?>
      <?= $form->field($model->survey, 'global_score', ['template' => mkFieldTemplate('certificate')])->dropDownList(range(0,10), ['prompt' => '', 'class' => 'input-lg form-control']) ?>

      <?php
        $previous = $current - 1;
        echo Html::tag('div', Html::tag('a', Yii::t('app', 'Previous'), [
            'href' => "#step-{$previous}",
            'class' => 'btn btn-xl btn-block btn-primary'
        ]), [
            'class' => 'col-md-3 col-xs-6'
        ]);
        $next = $current + 1;
        echo Html::tag('div', Html::tag('a', Yii::t('app', 'Next'), [
            'href' => "#step-{$next}",
            'class' => 'btn btn-xl btn-block btn-primary'
        ]), [
            'class' => 'col-md-3 col-md-offset-6 col-xs-6'
        ]);
        $current++;
      ?>

  <div class="section" data-anchor="step-<?= $current ?>">

      <?= $form->field($model->survey, 'good_things', ['template' => mkFieldTemplate('thumbs-up')])->textArea(['maxlength' => true, 'class' => 'input-lg form-control', 'rows' => 2]) ?>
      <?= $form->field($model->survey, 'bad_things', ['template' => mkFieldTemplate('thumbs-down')])->textArea(['maxlength' => true, 'class' => 'input-lg form-control', 'rows' => 2]) ?>
      <?= $form->field($model->survey, 'suggestions', ['template' => mkFieldTemplate('bullhorn')])->textarea(['class' => 'input-lg form-control', 'rows' => 3]) ?>

      <?php
        $previous = $current - 1;
        echo Html::tag('div', Html::tag('a', Yii::t('app', 'Previous'), [
            'href' => "#step-{$previous}",
            'class' => 'btn btn-xl btn-block btn-primary'
        ]), [
            'class' => 'col-md-3 col-xs-6'
        ]);
        $next = $current + 1;
        echo Html::tag('div', Html::tag('a', Yii::t('app', 'Next'), [
            'href' => "#step-{$next}",
            'class' => 'btn btn-xl btn-block btn-primary'
        ]), [
            'class' => 'col-md-3 col-md-offset-6 col-xs-6'
        ]);
        $current++;
      ?>

  <div class="section" data-anchor="step-<?= $current ?>">

      <?= $form->field($model->survey, 'guest_name', ['template' => mkFieldTemplate('user')])->textInput(['maxlength' => true, 'class' => 'input-lg form-control'])?>
      <?= $form->field($model->survey, 'guest_email', ['template' => mkFieldTemplate('envelope')])->textInput(['maxlength' => true, 'type' => 'email', 'class' => 'input-lg form-control']) ?>
      <?= $form->field($model->survey, 'guest_address', ['template' => mkFieldTemplate('home')])->textArea(['maxlength' => true, 'class' => 'input-lg form-control']) ?>

      <?php
        $previous = $current - 1;
        echo Html::tag('div', Html::tag('a', Yii::t('app', 'Previous'), [
            'href' => "#step-{$previous}",
            'class' => 'btn btn-xl btn-block btn-primary'
        ]), [
            'class' => 'col-md-3 col-xs-6'
        ]);
        $next = $current + 1;
        echo Html::tag('div', Html::tag('a', Yii::t('app', 'Next'), [
            'href' => "#step-{$next}",
            'class' => 'btn btn-xl btn-block btn-primary'
        ]), [
            'class' => 'col-md-3 col-md-offset-6 col-xs-6'
        ]);
        $current++;
      ?>

  <div class="section" data-anchor="step-<?= $current ?>">

      <?= $form->field($model->survey, 'apartment', ['template' => mkFieldTemplate('tag')])->textInput(['maxlength' => true, 'class' => 'input-lg form-control']) ?>
      <?= $form->field($model->survey, 'best_employee_name', ['template' => mkFieldTemplate('heart')])->textInput(['maxlength' => true, 'class' => 'input-lg form-control']) ?>
      <?= $form->field($model->survey, 'best_employee_group_name', ['template' => mkFieldTemplate('heart-empty')])->dropDownList($groups, ['prompt' => '', 'class' => 'input-lg form-control']) ?>

      <?php
        $previous = $current - 1;
        echo Html::tag('div', Html::tag('a', Yii::t('app', 'Previous'), [
            'href' => "#step-{$previous}",
            'class' => 'btn btn-xl btn-block btn-primary'
        ]), [
            'class' => 'col-md-3 col-xs-6'
        ]);
        $next = $current + 1;
        echo Html::tag('div', Html::tag('a', Yii::t('app', 'Finish'), [
            'href' => "#step-{$next}",
            'class' => 'btn btn-xl btn-block btn-danger btn-submit'
        ]), [
            'class' => 'col-md-3 col-md-offset-6 col-xs-6'
        ]);
        $current++;
      ?>

<?= Yii::t('app', 'Thank you!') ?>

<?= Yii::t('app', 'We have received your feedback.') ?>

<?= Yii::t('app', 'We are sending your feedback') ?>…

<?= Yii::t('app', 'Please, wait a few moments') ?>

<?php ActiveForm::end(); ?>

  <?php Modal::begin([
      'header' => '
' . Yii::t('app', 'Oops! You need a security token') . '
',
      'clientOptions' => ['backdrop' => 'static'],
      'size' => Modal::SIZE_SMALL,
      'closeButton' => false,
  ]); ?>
    <?= $form->field($model, 'token_code', ['enableAjaxValidation' => true])->textInput(['form' => $form->id]) ?>

      <button class="btn btn-warning btn-validate"><?= Yii::t('app', 'Validate') ?></button>

<?= Yii::t('app', 'You can ask for a token in reception. Thank you.') ?>

  <?php Modal::end(); ?>
<?php
$tokenValidationUrl = Url::to(['survey/guest-validate']);
$script = <<< JS
var tokenValidationUrl = '$tokenValidationUrl';
$(document).ready(function() {
  $('.fullpage').fullpage({fitToSection: false});
  $.fn.fullpage.setAutoScrolling(false);
  $.fn.fullpage.setAllowScrolling(false);
  var \$finishPanel = $('#finish-panel');
  var \$waitPanel = $('#wait-panel');
  var \$successPanel = $('#success-panel');
  var \$form = $('form');
  \$form.on('beforeSubmit', function(e, msgs, attrs) {
      return false;
  });
  \$form.on('afterValidate', function(e, msgs, attrs) {
      if (attrs.length != 0) return false;
      progress = 0;
      \$finishPanel.addClass('hidden');
      \$waitPanel.removeClass('hidden');
      progressInteval = setInterval(function() {
          progress += (100 - progress) / 100.;
          \$progressBar.css('width', (progress) + '%');
      }, 200);
      $.ajax({
          type: 'POST',
          url: \$form.attr('action'),
          data: \$form.serialize(),
          error: function(jqXHR, textStatus, errorThrown) {
              \$finishPanel.removeClass('hidden');
              \$waitPanel.removeClass('hidden');
          }, success: function(data, textStatus, jqXHR) {
              \$waitPanel.addClass('hidden');
              \$successPanel.removeClass('hidden');
          }, complete: function() {
              clearInterval(progressInterval);
          }
      });
      return false;
  });
  var \$progressBar = $('#wait-panel .progress-bar');
  var progressInterval;
  var progress;
  $('.btn-submit').on('click', function() {
      \$form.submit();
      return false;
  });
  $('input[type="radio"]').click(function() {
      var \$radio = $(this);
      if (\$radio.data('waschecked') == true) {
          \$radio.prop('checked', false);
          \$radio.data('waschecked', false);
      } else
          \$radio.data('waschecked', true);
  });
  $('input, select').on('keyup', function(e) {
      if(e.keyCode == 13) {
          $(this).blur();
          return false;
      }
  });
  if (!$('#token_code').val()) {
      $('#w0').modal('show');
  }
  \$tokenCode = $('input[name="token_code"]');
  $('.btn-validate').on('click', function() {
      \$tokenCode.closest('.form-group').removeClass('has-error');
      \$tokenCode.closest('.form-group').removeClass('has-success');
      \$tokenCode.siblings('.help-block').html('');
      $.ajax({
          url: tokenValidationUrl,
          data: $('#token_code').serialize(),
          dataType: 'json',
          method: 'post',
          success: function(data) {
              if (!data.token_code) {
                  \$tokenCode.closest('.form-group').addClass('has-success');
                  $('#w0').modal('hide');
              } else {
                  \$tokenCode.closest('.form-group').addClass('has-error');
                  \$tokenCode.siblings('.help-block').html(data.token_code);
              }
          }
      });
  });
});
JS;
$this->registerJs($script);


text:
export class BreadcrumbItem {
    label: string;
    link: string = '';
}


text:
cd jsqlbox-actframework
call mvn clean
call mvn eclipse:eclipse
cd..

cd jsqlbox-atomikos
call mvn clean
call mvn eclipse:eclipse
cd..

cd jsqlbox-beetl
call mvn clean
call mvn eclipse:eclipse
cd..

cd jsqlbox-jbooox
call mvn clean
call mvn eclipse:eclipse
cd..

cd jsqlbox-jfinal
call mvn clean
call mvn eclipse:eclipse
cd..

cd jsqlbox-mybatis
call mvn clean
call mvn eclipse:eclipse
cd..

cd jsqlbox-qclass
call mvn clean
call mvn eclipse:eclipse
cd..

cd jsqlbox-spring
call mvn clean
call mvn eclipse:eclipse
cd..

cd jsqlbox-springboot
call mvn clean
call mvn eclipse:eclipse
cd..


text:
![Build Status](https://travis-ci.org/ssowonny/strong-params.svg?branch=master) [![NPM version](https://badge.fury.io/js/strong-params.svg)](http://badge.fury.io/js/strong-params)

Rails-style implementation of strong parameters. It supports [Express](http://expressjs.com/), [Koa](https://github.com/koajs/koa) and also can be used as standalone. The middleware adds the `parameters` object to the [Express request](http://expressjs.com/4x/api.html#req) (or `this.params` for [Koa context](http://koajs.com/#context)) which returns an object, built from `query string`, `request body` and `route params` data. The returned object has some useful methods allows for data `requiring` and `filtering`.

## Notice

The implementation of strong parameters was previously forked from [koa-strong-params](https://github.com/xpepermint/koa-strong-params) but now has it's own implementation. Along with this change `only`, `except` and `merge` methods have been dropped from the API as they do not exist in Rails Strong Parameters API.

## Installation

Install the [npm](https://www.npmjs.org/package/strong-params) package.

```
npm install strong-params --save
```

#### Attach the middleware.

##### Express

```js
var express = require('express')
var params = require('strong-params')
app.use(params.expressMiddleware())
```

##### Koa

```js
var koa = require('koa')
var params = require('strong-params')
var app = koa()
app.use(params.koaMiddleware())
```

## Usage

### Get strong parameters

##### Express

```js
app.use(function (req, res, next) {
  var params = req.parameters
})
```

##### Koa

```js
app.use(function *() {
  var params = this.params
})
```

##### Standalone

```js
var Parameters = require('strong-params').Parameters
var params = Parameters({
  id: '13',
  name: 'Bob',
  age: '13',
  hobbies: ['skydiving', 'football', 'photographing'],
  address: {
    country: 'US',
    street: '261 West'
  },
  contacts: [
    {
      type: 'e-mail',
      value: 'bob@random.rnd'
    }, {
      type: 'mobile',
      value: '+123987456'
    }
  ]
})
```

### Methods

```js
// All available params
params.all()
// -> { id: '13', name: 'Bob', age: '13', hobbies: ['skydiving', 'football', 'photographing'], address: { country: 'US', street: '261 West' }, contacts: [{ type: 'e-mail', value: 'bob@random.rnd' }, { type: 'mobile', value: '+123987456' }] }

// Only selected params
params.permit('name', 'age').value()
// -> { name: 'Bob', age: '13' }

params.permit('id', 'name', {hobbies: []}).value()
// -> { id: '13', name: 'Bob', hobbies: ['skydiving', 'football', 'photographing'] }

params.permit('id', 'name', {contacts: []}).value()
// -> { id: '13', name: 'Bob', contacts: [] }

params.permit('id', 'name', {contacts: ['type', 'value']}).value()
// -> { id: '13', name: 'Bob', contacts: [{ type: 'e-mail', value: 'bob@random.rnd' }, { type: 'mobile', value: '+123987456' }] }

// All params of a sub-object
params.require('address').all()
// -> { country: 'US', street: '261 West' }

// All params of a sub-object
params.require('contacts').permit('type', 'value').value()
// -> [{ type: 'e-mail', value: 'bob@random.rnd' }, { type: 'mobile', value: '+123987456' }]
```

Look [Rails Strong Parameters specification](http://edgeguides.rubyonrails.org/action_controller_overview.html#strong-parameters) for more information.

## Contributing

Please follow [Contributing](./CONTRIBUTING.md)


text:
<!DOCTYPE html>

        <meta charset="UTF-8">

        <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css" />
        <link rel="stylesheet" type="text/css" href="../css/font-awesome.min.css" />
        <link rel="stylesheet" type="text/css" href="../css/general.css" />

                Digital House GT

                        Ayuda

Reporte - Vendedor

                            #
                            Cliente
                            Venta
                            Comisión

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

Ayuda

Para regresar a la pagina principal presiona donde dice "Digital House GT" a la izquierda.

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

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

Reporte - Vendedor

                        <input type="file" class="filestyle" id="archivo-vendedor" data-buttonBefore="true" data-buttonText="Archivo Sunhive..." accept=".csv">

                        <button class="btn btn-primary" onclick="generarReporteVendedor()" data-dismiss="modal">Generar Reporte</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>


text:
"use strict";

var mongoose        = require("mongoose"),
    errors          = require("../../errors.js").ERRORS;

var User = mongoose.model("User");

var passportAuth    = require("./passport")();
// Authentication middlewares

// Ensures a user is logged in and saves their User object into req.user
// Should be called in all API requests
module.exports.authenticate = function authenticate(req, res, next) {
    if (req.method === "OPTIONS") {
        return next();
    }
    passportAuth.authenticate(req, res, next);
};

// Makes sure the user has one of the required roles
module.exports.roleGuard = function authenticate(roles) {
    return function (req, res, next) {
      const found = roles.some((r) => req.authClaims.scopes.indexOf(r) >= 0);
      if (found) {
        return next();
      } else {
        return next(errors.UNAUTHORIZED);
      }
    };
};

// find patient from patient ID, and ensure they have the access level
// specified. note: this should **not** be used to authorize users for resources
// involving medications as those have extended access permissions
// note that if a user has any access to a patient they must have
// read access so we can use that as a "base" access level to search from
module.exports.authorize = function (access) {
    return function (req, res, next) {
        // find patient
        mongoose.model("Patient").findByIdForUser(req.params.patientid, req.user, access, function (err, patient) {
            if (err) {
                // specifically catch cast errors caused by an invalid patient ID
                if (err.name === "CastError" && err.path === "_id") return next(errors.INVALID_PATIENT_ID);
                return next(err);
            }

            // save patient and handle request as normal
            req.patient = patient;
            next();
        });
    };
};


text:
import React from 'react';
import { generateHash, objToArray } from '../utils.js';
import { dataFrom } from '../database.js';
import css from '../styles/QAList.styl';
import QANav from './QANav.js';
import QAListItem from './QAListItem.js';

export default class QAList extends React.Component {
  constructor(props) {
    super(props);

    this.ids = [];
    this.logPrefix = '[ QAList ]';
  }

  componentDidMount(){
    dataFrom('results', function(data){
      console.log(this.logPrefix, 'Results updated');
      this.props.dataSuccess(data);
    }.bind(this));
  }

  render(){
    const { query, results } = this.props;
    let resultsMessage = {
      __html: 'Loading Results'
    };
    let resultsMarkup = '';
    let createMarkup = '';

    switch(this.props.resultsStatus){
      case 'error' :
        console.error("Couldn't load results");
        break;

      case 'done' :
      case 'processing' :
      case 'success' :
        this.ids = [];
        for(let i in results){
          this.ids.push(i);
        }

        if( this.props.createItem ){
          const hash = generateHash('__Creating__');

          createMarkup = (
            <QAListItem
              key={hash}
              id={hash}
              ids={this.ids}
              title=""
              body=""
              isNew={true}
              date={Date.now()}
              {...this.props}
            />
          );
        }

        // sort the results by newest
        let sortedResults = objToArray(results, true).slice(0);
        sortedResults = sortedResults.sort(function(a, b){
          return +b.date - +a.date;
        }, this);

        resultsMarkup = (

            {createMarkup}
            {sortedResults.map(this.renderResult, this)}

        );
        break;
    }

    return (

        <QANav pos="top" {...this.props} />
        {resultsMarkup}
        {/* <QANav pos="btm" {...this.props} /> */}

    );
  }

  renderResult({title, body, _id, date}, ndx){
    return (
      <QAListItem
        key={_id}
        id={_id}
        ids={this.ids}
        title={title}
        body={body}
        date={date}
        {...this.props}
      />
    );
  }
}


text:
Param
(
    [Parameter(Mandatory=$true)]
    [string]$Path,

    [Parameter(Mandatory=$true)]
    [Microsoft.SharePoint.SPWeb]$Web
)
Process
{
	Function Get-WebPartReplacedContent()
	{
		Param
		(
			[Parameter(Mandatory=$true)]
			[string]$Content,

            [Parameter(Mandatory=$true)]
            [Microsoft.SharePoint.SPWeb]$Web
		)
		Process
		{
            $sspApp = Get-DefaultEnterpriseSearchServiceApplication -Site $Web.Site

	        $fedManager = New-Object Microsoft.Office.Server.Search.Administration.Query.FederationManager($sspApp)
	        $searchOwner = New-Object Microsoft.Office.Server.Search.Administration.SearchObjectOwner([Microsoft.Office.Server.Search.Administration.SearchObjectLevel]::SPWeb, $Web)

            $allMatches = $Content | Select-String "{{{\w*:(?<rs>[\w\s]*)}}}" -AllMatches
            if ($allMatches.Count -gt 0)
            {
                $replacements = @{}
                $allMatches.Matches | % {
                    $value = $_.Value
                    $resultSourceName = $value.TrimStart("{").TrimEnd("}").Split(":")[1]

                    if (-not $replacements.ContainsKey($value))
                    {
                        $resultSource = $fedManager.GetSourceByName($resultSourceName, $searchOwner)
                        $replacements.Add($value, $resultSource.Id)
                    }
                }

                $replacements.GetEnumerator() | % {
                    $Content = $Content.Replace($_.Key, $_.Value)
                }
            }

			return $Content
		}
	}

    $snapin = Get-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue
    if ($snapin -eq $null) { Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue }

    $currentPath = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition
    Import-Module "$currentPath\EnmarchaFunctions.psm1" -PassThru -Force -DisableNameChecking | Out-Null

    Write-Host -ForegroundColor Cyan "Iniciando la función New-Page en $Path"

    [xml]$manifest = Get-Content "$Path\manifest.xml"

    [Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | Out-Null
    [Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.PowerShell") | Out-Null
    [Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Publishing") | Out-Null

    $pageUrl = $manifest.PublishingPage.Url

    Write-Host ""
    Write-Host -ForegroundColor blue "Creando la página $pageUrl"

    $pubWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($Web)
    $pubSite = New-Object Microsoft.SharePoint.Publishing.PublishingSite($Web.Site)

    $pageLayout = $pubSite.GetPageLayouts($false) | Where { $_.Name -eq $manifest.PublishingPage.PageLayout }
    $pagesListName = $pubWeb.PagesListName

    [Microsoft.SharePoint.Publishing.PublishingPage]$page = $null
    $file = $Web.GetFile("$pagesListName/$pageUrl")
    if ($file.Exists)
    {
        Write-Host -ForegroundColor Yellow "Ya existe la página $($file.ServerRelativeUrl)"
        Write-Host -ForegroundColor Green "Obteniendo la página $($file.ServerRelativeUrl)"
        $item = $file.Item
        $page = [Microsoft.SharePoint.Publishing.PublishingPage]::GetPublishingPage($item)
        if ($page.ListItem.File.CheckOutStatus -eq [Microsoft.SharePoint.SPFile+SPCheckOutStatus]::None)
        {
            $page.CheckOut()
        }
    }
    else
    {
        Write-Host -ForegroundColor Green "Creando la página $($file.ServerRelativeUrl)..." -NoNewline
        $page = $pubWeb.AddPublishingPage($pageUrl, $pageLayout)
    }

    Write-Host -ForegroundColor Green "Obteniendo el webpart manager..." -NoNewline
    $wpManager = $Web.GetLimitedWebPartManager($page.Url, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
    Write-Host -ForegroundColor Green "Eliminando webparts existentes..." -NoNewline
    $wps = @()
    $wpManager.WebParts | % { $wps += $_ }
    $wps | % { $wpManager.DeleteWebPart($_) }

    if($manifest.PublishingPage.Webparts.Webpart.Count -eq 0)
    {
        Write-Host -ForegroundColor Yellow "El manifiesto de página no contiene webparts..."
    }
    else
    {
        Write-Host -ForegroundColor Green "Añadiendo nuevos webparts..."
		$manifest.PublishingPage.WebParts.WebPart | % {
            Write-Host -ForegroundColor Green "Añadiendo webpart $($_.File)" -NoNewline
            [string]$webPartContent = [System.IO.File]::ReadAllText("$Path\$($_.File)")
            [string]$webPartContentReplaced = Get-WebPartReplacedContent -Content $webPartContent -Web $Web
		    [System.Xml.XmlTextReader]$xmlTextReader = New-Object System.Xml.XmlTextReader(New-Object System.IO.StringReader($webPartContentReplaced))
            $error = $null
            $wp = $wpManager.ImportWebPart($xmlTextReader, [ref] $error)
            $wpManager.AddWebPart($wp, $_.WebPartZoneID, $_.WebPartOrder)
        }

    }

    Write-Host -ForegroundColor Green "Actualizando el tipo de contenido y diseño de página..." -NoNewline
    $listItem = $page.ListItem
    $listItem["ContentTypeId"] = (Get-SPContentTypeByName -Web $Web -LCID $manifest.PublishingPage.ContentType.LCID -Name $manifest.PublishingPage.ContentType.Name).Id
    $listItem["PublishingPageLayout"] = "$($pageLayout.ServerRelativeUrl), $($pageLayout.Title)"

    Write-Host -ForegroundColor Green "Actualizando campos de la página..." -NoNewline
    $manifest.PublishingPage.Fields.Field | % {
        Write-Host -ForegroundColor Yellow "{" $_.Name "} " -NoNewline
        Set-ListItemFieldValue -ListItem $listItem -FieldName $_.Name -Item $_ -UpdateListItem:$false
    }

    Write-Host -ForegroundColor Green "Actualizando el elemento..." -NoNewline
    $listItem.Update()

    Write-Host -ForegroundColor Green "Protegiendo el elemento..." -NoNewline
	if ($page.ListItem.File.CheckOutStatus -ne [Microsoft.SharePoint.SPFile+SPCheckOutStatus]::None)
	{
		$page.CheckIn("A través de ENMARCHA")
	}

    $file = $page.ListItem.File

    if ($pubWeb.PagesList.EnableVersioning -and $pubWeb.PagesList.EnableMinorVersions)
    {
        Write-Host -ForegroundColor Green "Publicando el elemento..." -NoNewline
        $file.Publish("a través de ENMARCHA")
    }

    if ($pubWeb.PagesList.EnableModeration)
    {
        Write-Host -ForegroundColor Green "Aprobando el elemento..." -NoNewline
        $file.Approve("A través de ENMARCHA")
    }

	if ($manifest.PublishingPage.IsDefault -eq "true")
	{
		Write-Host -ForegroundColor Green "Estableciendo como página de inicio del site..." -NoNewline
		$pubWeb.DefaultPage = $file
		$pubWeb.Update()
	}

    return $page
}


text:
//// [typeGuardOfFormThisMember.ts]
// There's a 'File' class in the stdlib, wrap with a namespace to avoid collision
namespace Test {
	export class FileSystemObject {
		isFSO: this is FileSystemObject;
		get isFile(): this is File {
			return this instanceof File;
		}
		set isFile(param) {
			// noop
		}
		get isDirectory(): this is Directory {
			return this instanceof Directory;
		}
		isNetworked: this is (Networked & this);
		constructor(public path: string) {}
	}

	export class File extends FileSystemObject {
		constructor(path: string, public content: string) { super(path); }
	}
	export class Directory extends FileSystemObject {
		children: FileSystemObject[];
	}
	export interface Networked {
		host: string;
	}

	let file: FileSystemObject = new File("foo/bar.txt", "foo");
	file.isNetworked = false;
	file.isFSO = file.isFile;
	file.isFile = true;
	let x = file.isFile;
	if (file.isFile) {
		file.content;
		if (file.isNetworked) {
			file.host;
			file.content;
		}
	}
	else if (file.isDirectory) {
		file.children;
	}
	else if (file.isNetworked) {
		file.host;
	}

	interface GenericLeadGuard<T> extends GenericGuard<T> {
		lead(): void;
	}

	interface GenericFollowerGuard<T> extends GenericGuard<T> {
		follow(): void;
	}

	interface GenericGuard<T> {
		target: T;
		isLeader: this is (GenericLeadGuard<T>);
		isFollower: this is GenericFollowerGuard<T>;
	}

	let guard: GenericGuard<File>;
	if (guard.isLeader) {
		guard.lead();
	}
	else if (guard.isFollower) {
		guard.follow();
	}

	interface SpecificGuard {
		isMoreSpecific: this is MoreSpecificGuard;
	}

	interface MoreSpecificGuard extends SpecificGuard {
		do(): void;
	}

	let general: SpecificGuard;
	if (general.isMoreSpecific) {
		general.do();
	}
}

//// [typeGuardOfFormThisMember.js]
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
// There's a 'File' class in the stdlib, wrap with a namespace to avoid collision
var Test;
(function (Test) {
    var FileSystemObject = /** @class */ (function () {
        function FileSystemObject(path) {
            this.path = path;
        }
        Object.defineProperty(FileSystemObject.prototype, "isFile", {
            get: function () {
                return this instanceof File;
            },
            set: function (param) {
                // noop
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(FileSystemObject.prototype, "isDirectory", {
            get: function () {
                return this instanceof Directory;
            },
            enumerable: true,
            configurable: true
        });
        return FileSystemObject;
    }());
    Test.FileSystemObject = FileSystemObject;
    var File = /** @class */ (function (_super) {
        __extends(File, _super);
        function File(path, content) {
            var _this = _super.call(this, path) || this;
            _this.content = content;
            return _this;
        }
        return File;
    }(FileSystemObject));
    Test.File = File;
    var Directory = /** @class */ (function (_super) {
        __extends(Directory, _super);
        function Directory() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        return Directory;
    }(FileSystemObject));
    Test.Directory = Directory;
    var file = new File("foo/bar.txt", "foo");
    file.isNetworked = false;
    file.isFSO = file.isFile;
    file.isFile = true;
    var x = file.isFile;
    if (file.isFile) {
        file.content;
        if (file.isNetworked) {
            file.host;
            file.content;
        }
    }
    else if (file.isDirectory) {
        file.children;
    }
    else if (file.isNetworked) {
        file.host;
    }
    var guard;
    if (guard.isLeader) {
        guard.lead();
    }
    else if (guard.isFollower) {
        guard.follow();
    }
    var general;
    if (general.isMoreSpecific) {
        general.do();
    }
})(Test || (Test = {}));

//// [typeGuardOfFormThisMember.d.ts]
declare namespace Test {
    class FileSystemObject {
        path: string;
        isFSO: this is FileSystemObject;
        isFile: this is File;
        readonly isDirectory: this is Directory;
        isNetworked: this is (Networked & this);
        constructor(path: string);
    }
    class File extends FileSystemObject {
        content: string;
        constructor(path: string, content: string);
    }
    class Directory extends FileSystemObject {
        children: FileSystemObject[];
    }
    interface Networked {
        host: string;
    }
}


text:
To start using this module, you will need to do some setup first.

## Add Stripe Keys

Once setup, you will need to make the module aware of your Stripe
API keys.

First log into your Stripe account and find your API page (as below)

![Get your API keys](_images/stripe-api-keys.png)

Now add these to your module config. You can do this in two possible ways:

### Silverstripe Configuration

You can add your api keys using the default [Silverstripe Configuration](https://docs.silverstripe.org/en/3/developer_guides/configuration/configuration/)

If you do this, the config variables are:

````
StripeForms.test_publish_key
StripeForms.live_publish_key
StripeForms.test_secret_key
StripeForms.live_secret_key
````

### Enviromental Config

You can alternativley set the keys up in your [_ss_environment.php](https://docs.silverstripe.org/en/3.2/getting_started/environment_management/)
file.

If you use environmental config, you will need to add the following to your `_ss_environment.php`:

````
<?php
...

// Stripe Keys for Stripe Forms module
define("STRIPE_TEST_SK", "Test Secret Key");
define("STRIPE_TEST_PK", "Test Publishable Key");
define("STRIPE_LIVE_SK", "Live Secret Key");
define("STRIPE_LIVE_PK", "Live Publishable Key");

````

### Test VS Live

While the site is in [dev mode](https://docs.silverstripe.org/en/3/developer_guides/debugging/environment_types/)
the test key's will be used.

As soon as you switch the site to stage or live, the live key will be used instead.

## Webhooks

There is a dedicated page of docs for integrating with [Stripe webhooks](webhooks.md)


text:
class EmailController {
    constructor($state, $auth, User) {
        'ngInject';
        this.name = 'Email';
        Object.assign(this, { $state, $auth, User });
        this.user = this.$auth.getUser();
        this.error = false;
        this.success = false;
    }

    updateEmail() {
        console.log(this.user.email);
        if (this.user.email) {
            this.error = false;
            this.success = false;
            this.User.update({ email: this.user.email })
                .then(resp => {
                    console.log("update resp", resp);
                    this.success = "Email updated";
                })
        } else {
            this.error = "Enter correct email";
        }
    }
}

export default EmailController;


text:
import { Templating } from "brisket";

const TemplateStringAdapter = Templating.TemplateAdapter.extend({

    templateToHTML: function(template, data) {
        if (typeof template !== "function") {
            return template;
        }

        return template(data);
    }

});

export default TemplateStringAdapter;