text:
@class ZRGoodsFrame, ZRGoodsCarCell;

@protocol ZRGoodsCarCellDelegate <NSObject>

- (void)goodsCarCellGoodsCountAddOne:(ZRGoodsCarCell *)cell;
- (void)goodsCarCellGoodsCountSubOne:(ZRGoodsCarCell *)cell;
//- (void)goodsCarCell:(ZRGoodsCarCell *)cell selectStateDidChanged:(BOOL)selected;
- (void)goodsCarCellDidDelete:(ZRGoodsCarCell *)cell;
@end

@interface ZRGoodsCarCell : UITableViewCell

//商品数量
@property (nonatomic, assign) NSInteger number;
@property (nonatomic, assign) BOOL didselected;
@property (nonatomic, strong) ZRGoodsFrame *goodsFrame;
@property (nonatomic, weak) id<ZRGoodsCarCellDelegate> delegate;

+ (instancetype)cellWithTableView:(UITableView *)tableView;

@end


text:
title: We're back from How to Web
date: 2014-11-24 14:37 UTC
tags: status
authors: Viktor Benei|viktorbenei@bitrise.io
---

Last week we visited the [How to Web](http://2014.howtoweb.co/){:target="_blank"} conference.
We were one of the 32 lucky startups who participated in the
Startup Spotlight startup competition.

It was an amazing event, we could meet with developers, investors, PR specialists
and other mentors - in fact we could connect with as many helpful people during
this few days as we could otherwise in months!

*The event itself was organized in a very professional way,
if you can make it next year we would definitely advise you to do so.*

We'll process the tremendous amount of feedback we got in the upcoming
weeks and in the meantime **we'll finally start to roll out the
new site design** and other user experience revisions
to make it easier to get started and to work with Bitrise.

> We already have a huge list of feature requests in our development backlog
> but if you have anything you miss you
> can [contact and chat with us](https://www.bitrise.io/contact){:target="_blank"},
> we're always open to discuss about Bitrise and about mobile
> development automation in general.

redpajama_set_name: RedPajamaGithub


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

        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <TITLE>
            Uses of Class org.encog.ml.bayesian.training.BayesianInit (Encog Core 3.2.0-SNAPSHOT API)
        </TITLE>

        <META NAME="date" CONTENT="2013-04-17">

        <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

                            Overview
                            Package
                            Class
                          Use
                            Tree
                            Deprecated
                            Index
                            Help

                     PREV
                     NEXT

                    FRAMES
                     NO FRAMES

                        All Classes

            Uses of Class
org.encog.ml.bayesian.training.BayesianInit

                    Packages that use BayesianInit

            org.encog.ml.bayesian.training

                    Uses of BayesianInit in org.encog.ml.bayesian.training

            Methods in org.encog.ml.bayesian.training that return BayesianInit

                     BayesianInit
            TrainBayesian.getInitNetwork()

                    static BayesianInit
            BayesianInit.valueOf(String name)

                          Returns the enum constant of this type with the specified name.

                    static BayesianInit[]
            BayesianInit.values()

                          Returns an array containing the constants of this enum type, in
                the order they are declared.

            Methods in org.encog.ml.bayesian.training with parameters of type BayesianInit

                     void
            TrainBayesian.setInitNetwork(BayesianInit initNetwork)

                          Set the network init method.

            Constructors in org.encog.ml.bayesian.training with parameters of type BayesianInit

            TrainBayesian(BayesianNetwork theNetwork,
                    MLDataSet theData,
                    int theMaximumParents,
                    BayesianInit theInit,
                    BayesSearch theSearch,
                    BayesEstimator theEstimator)

                          Construct a Bayesian trainer.

                            Overview
                            Package
                            Class
                          Use
                            Tree
                            Deprecated
                            Index
                            Help

                     PREV
                     NEXT

                    FRAMES
                     NO FRAMES

                        All Classes

    Copyright © 2013. All Rights Reserved.


text:
<?php echo <<<'EOD'
<?php

use \Kifs\Controller\Router\Route;

$conf = array();
//$conf[] = new Route('/uri/:foo', 'ControllerName', array('foo' => 'int'));

return $conf;
EOD;


text:
var bar = 'bar';

function createClosure() {
    var foo = 'foo';

    return function createSecondClosure() {
        console.log(foo + bar);
    }
}

bar = 'bar1';
var closure2 = createClosure();
closure2();


text:
'use strict';

// Setup node app for clustering with Throng - https://github.com/hunterloftis/throng
var throng = require('throng');

var WORKERS = process.env.WEB_CONCURRENCY || 1;
var serverPort = process.env.PORT || 8080;

throng(start, {
  workers: WORKERS,
  lifetime: Infinity
});

function start() {

  var app = require('connect')();
  var http = require('http');
  var swaggerTools = require('swagger-tools');
  var jsyaml = require('js-yaml');
  var fs = require('fs');

  // swaggerRouter configuration
  var options = {
    swaggerUi: '/swagger.json',
    controllers: './controllers',
    useStubs: process.env.NODE_ENV === 'development' ? true : false // Conditionally turn on stubs (mock mode)
  };

  // The Swagger document (require it, build it programmatically, fetch it from a URL, ...)
  var spec = fs.readFileSync('./api/swagger.yaml', 'utf8');
  var swaggerDoc = jsyaml.safeLoad(spec);
  // Initialize the Swagger middleware
  swaggerTools.initializeMiddleware(swaggerDoc, function (middleware) {
    // Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain
    app.use(middleware.swaggerMetadata());
    // Validate Swagger requests
    app.use(middleware.swaggerValidator());
    // Route validated requests to appropriate controller
    app.use(middleware.swaggerRouter(options));
    // Serve the Swagger documents and Swagger UI
    app.use(middleware.swaggerUi());
    // Start the server
    http.createServer(app).listen(serverPort, function () {
      console.log('Your server is listening on port %d (http://localhost:%d)', serverPort, serverPort);
      console.log('Swagger-ui is available on http://localhost:%d/docs', serverPort);
    });
  });

}


text:
package org.expedientframework.workflowlite.core.utils;

import java.io.Closeable;

/**
 * Wrapper to use the thread local variable setting and removal using try-with-resource syntax.
 *
 */
public class ThreadLocalSentry<T> implements Closeable
{
  public ThreadLocalSentry(final T initialValue)
  {
    this.threadLocal = new ThreadLocal<>();
    this.threadLocal.set(initialValue);
  }

  public ThreadLocalSentry<T> set(final T value)
  {
    this.threadLocal.set(value);
    return this;
  }

  public T get()
  {
    return this.threadLocal.get();
  }

  @Override
  public void close()
  {
    this.threadLocal.remove();
  }

  // Private
  private ThreadLocal<T> threadLocal;
}


text:
import App from "../app";
import {gql, withFilter} from "apollo-server-express";
import {pubsub} from "../helpers/subscriptionManager";
const mutationHelper = require("../helpers/mutationHelper").default;
// We define a schema that encompasses all of the types
// necessary for the functionality in this file.
const schema = gql`
  type Shield implements SystemInterface {
    id: ID
    simulatorId: ID
    type: String
    name: String
    displayName: String
    upgradeName: String
    upgraded: Boolean
    stealthFactor: Float
    heat: Float
    coolant: Float
    position: Int
    power: Power
    frequency: Float
    state: Boolean
    integrity: Float
    damage: Damage
    locations: [Room]
  }

  extend type Query {
    shields(simulatorId: ID): [Shield]
  }
  extend type Mutation {
    shieldRaised(id: ID!): String
    shieldLowered(id: ID!): String
    shieldIntegritySet(id: ID!, integrity: Float): String
    shieldFrequencySet(id: ID!, frequency: Float): String
    """
    Macro: Shields: Set all shield frequencies
    Requires:
     - Cards:ShieldControl
     - Systems:Shield
    """
    shieldFrequencySetAll(simulatorId: ID!, frequency: Float!): String
    """
    Macro: Shields: Hit all shields
    Requires:
     - Cards:ShieldControl
     - Systems:Shield
    """
    hitShields(id: ID, simulatorId: ID): String
    restoreShields(simulatorId: ID): String
  }
  extend type Subscription {
    shieldsUpdate(simulatorId: ID): [Shield]
  }
`;

const resolver = {
  Shield: {
    locations(rootValue) {
      return rootValue.locations.map(r =>
        App.rooms.find(room => room.id === r),
      );
    },
  },
  Query: {
    shields(root, {simulatorId}) {
      return App.systems.filter(system => {
        return system.type === "Shield" && system.simulatorId === simulatorId;
      });
    },
  },
  Mutation: mutationHelper(schema),
  Subscription: {
    shieldsUpdate: {
      resolve(rootValue, {simulatorId}) {
        if (simulatorId)
          return rootValue.filter(s => s.simulatorId === simulatorId);
        return rootValue;
      },
      subscribe: withFilter(
        () => pubsub.asyncIterator("shieldsUpdate"),
        rootValue => !!(rootValue && rootValue.length),
      ),
    },
  },
};

export default {schema, resolver};


text:
package gwt.react.client.events;

import jsinterop.annotations.JsFunction;

@JsFunction
public interface MouseEventHandler {
    void onMouseEvent(MouseEvent event);
}


text:
#include <string.h>

#include "boards/board.h"
#include "asf/sam0/drivers/port/port.h"
#include "common-hal/microcontroller/Pin.h"
#include "shared-bindings/digitalio/DigitalInOut.h"
#include "shared-bindings/neopixel_write/__init__.h"
#include "samd21_pins.h"

void board_init(void)
{
}

// Check the status of the two buttons on CircuitPlayground Express. If both are
// pressed, then boot into user safe mode.
bool board_requests_safe_mode(void) {
    struct port_config pin_conf;
    port_get_config_defaults(&pin_conf);
    pin_conf.direction  = PORT_PIN_DIR_INPUT;
    pin_conf.input_pull = PORT_PIN_PULL_DOWN;
    port_pin_set_config(PIN_PA14, &pin_conf);
    port_pin_set_config(PIN_PA28, &pin_conf);
    bool safe_mode = port_pin_get_input_level(PIN_PA14) &&
        port_pin_get_input_level(PIN_PA28);
    reset_pin(PIN_PA14);
    reset_pin(PIN_PA28);
    return safe_mode;
}

void reset_board(void) {
    uint8_t empty[30];
    memset(empty, 0, 30);
    digitalio_digitalinout_obj_t neopixel_pin;
    common_hal_digitalio_digitalinout_construct(&neopixel_pin, &pin_PB23);
    common_hal_digitalio_digitalinout_switch_to_output(&neopixel_pin, false,
        DRIVE_MODE_PUSH_PULL);
    common_hal_neopixel_write(&neopixel_pin, empty, 30);
    common_hal_digitalio_digitalinout_deinit(&neopixel_pin);
}


text:
import os
import urllib2
from time import sleep

url="http://pause.games/pulse"

def internet_on():
    try:
        # print "trying connecting to: ", url
        urllib2.urlopen(url, timeout=5)
        # print "success"
        return True
    except urllib2.URLError as err:
        # print "failed"
        return False

while True:
    sleep(1)
    if internet_on():
        if os.path.isfile("/tmp/signal1"):
            os.remove("/tmp/signal1")
            print "network connection restored."
    else:
        if not os.path.isfile("/tmp/signal1"):
            open("/tmp/signal1", 'a').close()
            print "network connection lost."


text:
package com.example.spring.vault.demo;

import com.example.spring.vault.demo.common.KeyNames;
import com.example.spring.vault.demo.jpa.Person;
import com.example.spring.vault.demo.service.PersonService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Service;
import org.springframework.vault.core.VaultOperations;

import java.util.stream.Stream;

@Service
public class DataInitializer implements CommandLineRunner {

    private final PersonService personService;

    private final VaultOperations vaultOperations;

    public DataInitializer(PersonService personService, VaultOperations vaultOperations) {
        this.personService = personService;
        this.vaultOperations = vaultOperations;
    }

    @Override
    public void run(String... args) throws Exception {
        if (vaultOperations.opsForTransit().getKey(KeyNames.KEY_SSN) == null) {
            vaultOperations.opsForTransit().createKey(KeyNames.KEY_SSN);
        }
        if (vaultOperations.opsForTransit().getKey(KeyNames.KEY_CREDIT_CARD) == null) {
            vaultOperations.opsForTransit().createKey(KeyNames.KEY_CREDIT_CARD);
        }
        Stream.of(
            new Person("Donald", "Duck",
                    "111111", "1111-1111-1111-11"),
                new Person("Mickey", "Mouse",
                        "222222", "2222-2222-2222-22")
        ).forEach(personService::save);
    }
}


text:
/*
* The Computer Language Benchmarks Game
* http://shootout.alioth.debian.org/

* contributed by Premysl Hruby
*/

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <string.h>
#include <limits.h>

// PTHREAD_STACK_MIN undeclared on mingw
#ifndef PTHREAD_STACK_MIN
#define PTHREAD_STACK_MIN 65535
#endif

#define THREADS (503)

struct stack {
   char x[PTHREAD_STACK_MIN];
};

/* staticaly initialize mutex[0] mutex */
static pthread_mutex_t mutex[THREADS];
static int data[THREADS];
static struct stack stacks[THREADS];
/* stacks must be defined staticaly, or my i386 box run of virtual memory for this
 * process while creating thread +- #400 */

static void* thread(void *num)
{
   int l = (int)(uintptr_t)num;
   int r = (l+1) % THREADS;
   int token;

   while(1) {
      pthread_mutex_lock(mutex + l);
      token = data[l];
      if (token) {
         data[r] = token - 1;
         pthread_mutex_unlock(mutex + r);
      }
      else {
         printf("%i\n", l+1);
         exit(0);
      }
   }
}

int main(int argc, char **argv)
{
   int i;
   pthread_t cthread;
   pthread_attr_t stack_attr;

   if (argc != 2)
      exit(255);
   data[0] = atoi(argv[1]);

   pthread_attr_init(&stack_attr);

   for (i = 0; i < THREADS; i++) {
      pthread_mutex_init(mutex + i, NULL);
      pthread_mutex_lock(mutex + i);

#if defined(__MINGW32__) || defined(__MINGW64__)
      pthread_attr_setstackaddr(&stack_attr, &stacks[i]);
      pthread_attr_setstacksize(&stack_attr, sizeof(struct stack));
#else
      pthread_attr_setstack(&stack_attr, &stacks[i], sizeof(struct stack));
#endif

      pthread_create(&cthread, &stack_attr, thread, (void*)(uintptr_t)i);
   }

   pthread_mutex_unlock(mutex + 0);
   pthread_join(cthread, NULL);
}


text:
//
//  UIApplication-KIFAdditions.h
//  KIF
//
//  Created by Eric Firestone on 5/20/11.
//  Licensed to Square, Inc. under one or more contributor license agreements.
//  See the LICENSE file distributed with this work for the terms under
//  which Square, Inc. licenses this file to you.

#import <UIKit/UIKit.h>

#define UIApplicationCurrentRunMode ([[UIApplication sharedApplication] currentRunLoopMode])

/*!
 @abstract When mocking @c -openURL:, this notification is posted.
 */
UIKIT_EXTERN NSString *const UIApplicationDidMockOpenURLNotification;

/*!
 @abstract When mocking @c -canOpenURL:, this notification is posted.
 */
UIKIT_EXTERN NSString *const UIApplicationDidMockCanOpenURLNotification;

/*!
 @abstract The key for the opened URL in the @c UIApplicationDidMockOpenURLNotification notification.
 */
UIKIT_EXTERN NSString *const UIApplicationOpenedURLKey;

@interface UIApplication (KIFAdditions)

/*!
 @abstract Finds an accessibility element with a matching label, value, and traits across all windows in the application starting at the frontmost window.
 @param label The accessibility label of the element to search for.
 @param value The accessibility value of the element to search for.  If @c nil, all values will be accepted.
 @param traits The accessibility traits of the element to search for. Elements that do not include at least these traits are ignored.
 @return The found accessibility element or @c nil if the element could not be found.
 */
- (UIAccessibilityElement *)accessibilityElementWithLabel:(NSString *)label accessibilityValue:(NSString *)value traits:(UIAccessibilityTraits)traits;

/*!
 @abstract Finds an accessibility element where @c matchBlock returns @c YES, across all windows in the application starting at the fronmost window.
 @discussion This method should be used if @c accessibilityElementWithLabel:accessibilityValue:traits: does not meet your requirements.  For example, if you are searching for an element that begins with a pattern or if of a certain view type.
 @param matchBlock  A block to be performed on each element to see if it passes.
 */
- (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessibilityElement *))matchBlock;

/*!
 @returns The window containing the keyboard or @c nil if the keyboard is not visible.
 */
- (UIWindow *)keyboardWindow;

/*!
 @returns The topmost window containing a @c UIDatePicker.
 */
- (UIWindow *)datePickerWindow;

/*!
 @returns The topmost window containing a @c UIPickerView.
 */
- (UIWindow *)pickerViewWindow;

/*!
 @returns The topmost window containing a @c UIDimmingView.
 */
- (UIWindow *)dimmingViewWindow;

/*!
 @returns All windows in the application, including the key window even if it does not appear in @c -windows.
 */
- (NSArray *)windowsWithKeyWindow;

/*!
 @abstract Writes a screenshot to disk.
 @discussion This method only works if the @c KIF_SCREENSHOTS environment variable is set.
 @param lineNumber The line number in the code at which the screenshot was taken.
 @param filename The name of the file in which the screenshot was taken.
 @param description An optional description of the scene being captured.
 @param error If the method returns @c YES, this optional parameter provides additional information as to why it failed.
 @returns @c YES if the screenshot was written to disk, otherwise @c NO.
 */
- (BOOL)writeScreenshotForLine:(NSUInteger)lineNumber inFile:(NSString *)filename description:(NSString *)description error:(NSError **)error;

/*!
 @returns The current run loop mode.
 */
- (CFStringRef)currentRunLoopMode;

/*!
 @abstract Swizzles the run loop modes so KIF can better switch between them.
 */
+ (void)swizzleRunLoop;

/*!
 @abstract Starts mocking requests to @c -openURL:, announcing all requests with a notification.
 @discussion After calling this method, whenever @c -openURL: is called a notification named @c UIApplicationDidMockOpenURLNotification with the URL in the @c UIApplicationOpenedURL will be raised and the normal behavior will be cancelled.
 @param returnValue The value to return when @c -openURL: is called.
 */
+ (void)startMockingOpenURLWithReturnValue:(BOOL)returnValue;

/*!
 @abstract Stops the application from mocking requests to @c -openURL:.
 */
+ (void)stopMockingOpenURL;

@end

@interface UIApplication (Private)
- (UIWindow *)statusBarWindow;
@property(getter=isStatusBarHidden) BOOL statusBarHidden;
@end


text:
// This file was generated by NxParameterized/scripts/GenParameterized.pl
// Created: 2015.06.02 04:12:11

#include "DestructibleModuleParameters_0p0.h"
#include <string.h>
#include <stdlib.h>

using namespace NxParameterized;

namespace physx
{
namespace apex
{

using namespace DestructibleModuleParameters_0p0NS;

const char* const DestructibleModuleParameters_0p0Factory::vptr =
    NxParameterized::getVptr<DestructibleModuleParameters_0p0, DestructibleModuleParameters_0p0::ClassAlignment>();

const physx::PxU32 NumParamDefs = 17;
static NxParameterized::DefinitionImpl* ParamDefTable; // now allocated in buildTree [NumParamDefs];

static const size_t ParamLookupChildrenTable[] =
{
	1, 11, 12, 13, 14, 15, 16, 2, 3, 4, 5, 6, 7, 8, 9, 10,
};

#define TENUM(type) physx::##type
#define CHILDREN(index) &ParamLookupChildrenTable[index]
static const NxParameterized::ParamLookupNode ParamLookupTable[NumParamDefs] =
{
	{ TYPE_STRUCT, false, 0, CHILDREN(0), 7 },
	{ TYPE_STRUCT, false, (size_t)(&((ParametersStruct*)0)->gpuRigidBodySettings), CHILDREN(7), 9 }, // gpuRigidBodySettings
	{ TYPE_I32, false, (size_t)(&((GRBSettings_Type*)0)->gpuDeviceOrdinal), NULL, 0 }, // gpuRigidBodySettings.gpuDeviceOrdinal
	{ TYPE_F32, false, (size_t)(&((GRBSettings_Type*)0)->meshCellSize), NULL, 0 }, // gpuRigidBodySettings.meshCellSize
	{ TYPE_F32, false, (size_t)(&((GRBSettings_Type*)0)->skinWidth), NULL, 0 }, // gpuRigidBodySettings.skinWidth
	{ TYPE_U32, false, (size_t)(&((GRBSettings_Type*)0)->nonPenSolverPosIterCount), NULL, 0 }, // gpuRigidBodySettings.nonPenSolverPosIterCount
	{ TYPE_U32, false, (size_t)(&((GRBSettings_Type*)0)->frictionSolverPosIterCount), NULL, 0 }, // gpuRigidBodySettings.frictionSolverPosIterCount
	{ TYPE_U32, false, (size_t)(&((GRBSettings_Type*)0)->frictionSolverVelIterCount), NULL, 0 }, // gpuRigidBodySettings.frictionSolverVelIterCount
	{ TYPE_F32, false, (size_t)(&((GRBSettings_Type*)0)->maxLinAcceleration), NULL, 0 }, // gpuRigidBodySettings.maxLinAcceleration
	{ TYPE_U32, false, (size_t)(&((GRBSettings_Type*)0)->gpuMemSceneSize), NULL, 0 }, // gpuRigidBodySettings.gpuMemSceneSize
	{ TYPE_U32, false, (size_t)(&((GRBSettings_Type*)0)->gpuMemTempDataSize), NULL, 0 }, // gpuRigidBodySettings.gpuMemTempDataSize
	{ TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxDynamicChunkIslandCount), NULL, 0 }, // maxDynamicChunkIslandCount
	{ TYPE_BOOL, false, (size_t)(&((ParametersStruct*)0)->sortFIFOByBenefit), NULL, 0 }, // sortFIFOByBenefit
	{ TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->validBoundsPadding), NULL, 0 }, // validBoundsPadding
	{ TYPE_F32, false, (size_t)(&((ParametersStruct*)0)->maxChunkSeparationLOD), NULL, 0 }, // maxChunkSeparationLOD
	{ TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxActorCreatesPerFrame), NULL, 0 }, // maxActorCreatesPerFrame
	{ TYPE_U32, false, (size_t)(&((ParametersStruct*)0)->maxChunkDepthOffset), NULL, 0 }, // maxChunkDepthOffset
};

bool DestructibleModuleParameters_0p0::mBuiltFlag = false;
NxParameterized::MutexType DestructibleModuleParameters_0p0::mBuiltFlagMutex;

DestructibleModuleParameters_0p0::DestructibleModuleParameters_0p0(NxParameterized::Traits* traits, void* buf, PxI32* refCount) :
	NxParameters(traits, buf, refCount)
{
	//mParameterizedTraits->registerFactory(className(), &DestructibleModuleParameters_0p0FactoryInst);

	if (!buf) //Do not init data if it is inplace-deserialized
	{
		initDynamicArrays();
		initStrings();
		initReferences();
		initDefaults();
	}
}

DestructibleModuleParameters_0p0::~DestructibleModuleParameters_0p0()
{
	freeStrings();
	freeReferences();
	freeDynamicArrays();
}

void DestructibleModuleParameters_0p0::destroy()
{
	// We cache these fields here to avoid overwrite in destructor
	bool doDeallocateSelf = mDoDeallocateSelf;
	NxParameterized::Traits* traits = mParameterizedTraits;
	physx::PxI32* refCount = mRefCount;
	void* buf = mBuffer;

	this->~DestructibleModuleParameters_0p0();

	NxParameters::destroy(this, traits, doDeallocateSelf, refCount, buf);
}

const NxParameterized::DefinitionImpl* DestructibleModuleParameters_0p0::getParameterDefinitionTree(void)
{
	if (!mBuiltFlag) // Double-checked lock
	{
		NxParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex);
		if (!mBuiltFlag)
		{
			buildTree();
		}
	}

	return(&ParamDefTable[0]);
}

const NxParameterized::DefinitionImpl* DestructibleModuleParameters_0p0::getParameterDefinitionTree(void) const
{
	DestructibleModuleParameters_0p0* tmpParam = const_cast<DestructibleModuleParameters_0p0*>(this);

	if (!mBuiltFlag) // Double-checked lock
	{
		NxParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex);
		if (!mBuiltFlag)
		{
			tmpParam->buildTree();
		}
	}

	return(&ParamDefTable[0]);
}

NxParameterized::ErrorType DestructibleModuleParameters_0p0::getParameterHandle(const char* long_name, Handle& handle) const
{
	ErrorType Ret = NxParameters::getParameterHandle(long_name, handle);
	if (Ret != ERROR_NONE)
	{
		return(Ret);
	}

	size_t offset;
	void* ptr;

	getVarPtr(handle, ptr, offset);

	if (ptr == NULL)
	{
		return(ERROR_INDEX_OUT_OF_RANGE);
	}

	return(ERROR_NONE);
}

NxParameterized::ErrorType DestructibleModuleParameters_0p0::getParameterHandle(const char* long_name, Handle& handle)
{
	ErrorType Ret = NxParameters::getParameterHandle(long_name, handle);
	if (Ret != ERROR_NONE)
	{
		return(Ret);
	}

	size_t offset;
	void* ptr;

	getVarPtr(handle, ptr, offset);

	if (ptr == NULL)
	{
		return(ERROR_INDEX_OUT_OF_RANGE);
	}

	return(ERROR_NONE);
}

void DestructibleModuleParameters_0p0::getVarPtr(const Handle& handle, void*& ptr, size_t& offset) const
{
	ptr = getVarPtrHelper(&ParamLookupTable[0], const_cast<DestructibleModuleParameters_0p0::ParametersStruct*>(&parameters()), handle, offset);
}

/* Dynamic Handle Indices */

void DestructibleModuleParameters_0p0::freeParameterDefinitionTable(NxParameterized::Traits* traits)
{
	if (!traits)
	{
		return;
	}

	if (!mBuiltFlag) // Double-checked lock
	{
		return;
	}

	NxParameterized::MutexType::ScopedLock lock(mBuiltFlagMutex);

	if (!mBuiltFlag)
	{
		return;
	}

	for (physx::PxU32 i = 0; i < NumParamDefs; ++i)
	{
		ParamDefTable[i].~DefinitionImpl();
	}

	traits->free(ParamDefTable);

	mBuiltFlag = false;
}

#define PDEF_PTR(index) (&ParamDefTable[index])

void DestructibleModuleParameters_0p0::buildTree(void)
{

	physx::PxU32 allocSize = sizeof(NxParameterized::DefinitionImpl) * NumParamDefs;
	ParamDefTable = (NxParameterized::DefinitionImpl*)(mParameterizedTraits->alloc(allocSize));
	memset(static_cast<void*>(ParamDefTable), 0, allocSize);

	for (physx::PxU32 i = 0; i < NumParamDefs; ++i)
	{
		NX_PARAM_PLACEMENT_NEW(ParamDefTable + i, NxParameterized::DefinitionImpl)(*mParameterizedTraits);
	}

	// Initialize DefinitionImpl node: nodeIndex=0, longName=""
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[0];
		ParamDef->init("", TYPE_STRUCT, "STRUCT", true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "This class is used for initializing the NxModuleDestructible.", true);
		ParamDefTable[0].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=1, longName="gpuRigidBodySettings"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[1];
		ParamDef->init("gpuRigidBodySettings", TYPE_STRUCT, "GRBSettings", true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "See the GRBParameters struct.  The user can enable/disable GPU rigid bodies, and set various parameters for them.", true);
		ParamDefTable[1].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=2, longName="gpuRigidBodySettings.gpuDeviceOrdinal"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[2];
		ParamDef->init("gpuDeviceOrdinal", TYPE_I32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[2];
		static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], };
		HintTable[0].init("longDescription", "Leaving this field at its default value (-1) will disable GRB entirely.  Setting this field to -2 will allow GRB to use the default PhysX GPU as defined by the NVIDIA control panel.  Any other value will explicitly specify the GPU ordinal to use for all GRB scenes.", true);
		HintTable[1].init("shortDescription", "override automatic GPU detection and selection", true);
		ParamDefTable[2].setHints((const NxParameterized::Hint**)HintPtrTable, 2);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=3, longName="gpuRigidBodySettings.meshCellSize"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[3];
		ParamDef->init("meshCellSize", TYPE_F32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "Size of grid cells used in mesh collision.", true);
		ParamDefTable[3].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=4, longName="gpuRigidBodySettings.skinWidth"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[4];
		ParamDef->init("skinWidth", TYPE_F32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "Collision skin width, as in PhysX.", true);
		ParamDefTable[4].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=5, longName="gpuRigidBodySettings.nonPenSolverPosIterCount"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[5];
		ParamDef->init("nonPenSolverPosIterCount", TYPE_U32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "Number of non-penetration solver iterations.", true);
		ParamDefTable[5].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=6, longName="gpuRigidBodySettings.frictionSolverPosIterCount"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[6];
		ParamDef->init("frictionSolverPosIterCount", TYPE_U32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "Number of friction solver position iterations.", true);
		ParamDefTable[6].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=7, longName="gpuRigidBodySettings.frictionSolverVelIterCount"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[7];
		ParamDef->init("frictionSolverVelIterCount", TYPE_U32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "Number of friction solver velocity iterations.", true);
		ParamDefTable[7].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=8, longName="gpuRigidBodySettings.maxLinAcceleration"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[8];
		ParamDef->init("maxLinAcceleration", TYPE_F32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "Maximum linear acceleration", true);
		ParamDefTable[8].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=9, longName="gpuRigidBodySettings.gpuMemSceneSize"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[9];
		ParamDef->init("gpuMemSceneSize", TYPE_U32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "Amount (in MB) of GPU memory to allocate for GRB scene data (shapes, actors etc)", true);
		ParamDefTable[9].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=10, longName="gpuRigidBodySettings.gpuMemTempDataSize"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[10];
		ParamDef->init("gpuMemTempDataSize", TYPE_U32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "Amount (in MB) of GPU memory to allocate for GRB temporary data (broadphase pairs, contacts etc)", true);
		ParamDefTable[10].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=11, longName="maxDynamicChunkIslandCount"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[11];
		ParamDef->init("maxDynamicChunkIslandCount", TYPE_U32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "The maximum number of dynamic NxActors that will be allowed to be active per NxApexScene. A value of 0 (the default) is interpreted as no limit.", true);
		ParamDefTable[11].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=12, longName="sortFIFOByBenefit"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[12];
		ParamDef->init("sortFIFOByBenefit", TYPE_BOOL, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "Instead of keeping the maxCount youngest, use maxCount largest benefit if this is true.", true);
		ParamDefTable[12].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=13, longName="validBoundsPadding"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[13];
		ParamDef->init("validBoundsPadding", TYPE_F32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "The padding applied to the combined scene valid bounds and NxDestructible actor bounds.  The final combined and passed bounds is used to cull NxActors and GrbActors", true);
		ParamDefTable[13].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=14, longName="maxChunkSeparationLOD"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[14];
		ParamDef->init("maxChunkSeparationLOD", TYPE_F32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

		static HintImpl HintTable[2];
		static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], };
		HintTable[0].init("max", physx::PxU64(1), true);
		HintTable[1].init("min", physx::PxU64(0), true);
		ParamDefTable[14].setHints((const NxParameterized::Hint**)HintPtrTable, 2);

#else

		static HintImpl HintTable[4];
		static Hint* HintPtrTable[4] = { &HintTable[0], &HintTable[1], &HintTable[2], &HintTable[3], };
		HintTable[0].init("longDescription", "Chunk islands are destroyed after this time or separation from their origins.  This parameter sets the lifetimes and max separations within their min-max ranges.  The valid range is [0,1].  Default is 0.5.", true);
		HintTable[1].init("max", physx::PxU64(1), true);
		HintTable[2].init("min", physx::PxU64(0), true);
		HintTable[3].init("shortDescription", "Every destructible asset defines a min and max lifetime, and maximum separation distance for its chunks.", true);
		ParamDefTable[14].setHints((const NxParameterized::Hint**)HintPtrTable, 4);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=15, longName="maxActorCreatesPerFrame"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[15];
		ParamDef->init("maxActorCreatesPerFrame", TYPE_U32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[1];
		static Hint* HintPtrTable[1] = { &HintTable[0], };
		HintTable[0].init("shortDescription", "Lets the user throttle the number of SDK actor creates per frame (per scene) due to destruction, as this can be quite costly. The default is 0xffffffff (unlimited).", true);
		ParamDefTable[15].setHints((const NxParameterized::Hint**)HintPtrTable, 1);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// Initialize DefinitionImpl node: nodeIndex=16, longName="maxChunkDepthOffset"
	{
		NxParameterized::DefinitionImpl* ParamDef = &ParamDefTable[16];
		ParamDef->init("maxChunkDepthOffset", TYPE_U32, NULL, true);

#ifdef NX_PARAMETERIZED_HIDE_DESCRIPTIONS

#else

		static HintImpl HintTable[2];
		static Hint* HintPtrTable[2] = { &HintTable[0], &HintTable[1], };
		HintTable[0].init("longDescription", "If maxChunkDepthOffset = 0, all chunks can be fractured.  If maxChunkDepthOffset = 1, the highest level (smallest) chunks are eliminated, etc.  This prevents too many chunks from being formed.  In other words, the higher maxChunkDepthOffset, the lower the LOD.", true);
		HintTable[1].init("shortDescription", "Effectively eliminates the higher level (smaller) chunks from NxDestructibleAssets (see NxDestructibleAsset).", true);
		ParamDefTable[16].setHints((const NxParameterized::Hint**)HintPtrTable, 2);

#endif /* NX_PARAMETERIZED_HIDE_DESCRIPTIONS */

	}

	// SetChildren for: nodeIndex=0, longName=""
	{
		static Definition* Children[7];
		Children[0] = PDEF_PTR(1);
		Children[1] = PDEF_PTR(11);
		Children[2] = PDEF_PTR(12);
		Children[3] = PDEF_PTR(13);
		Children[4] = PDEF_PTR(14);
		Children[5] = PDEF_PTR(15);
		Children[6] = PDEF_PTR(16);

		ParamDefTable[0].setChildren(Children, 7);
	}

	// SetChildren for: nodeIndex=1, longName="gpuRigidBodySettings"
	{
		static Definition* Children[9];
		Children[0] = PDEF_PTR(2);
		Children[1] = PDEF_PTR(3);
		Children[2] = PDEF_PTR(4);
		Children[3] = PDEF_PTR(5);
		Children[4] = PDEF_PTR(6);
		Children[5] = PDEF_PTR(7);
		Children[6] = PDEF_PTR(8);
		Children[7] = PDEF_PTR(9);
		Children[8] = PDEF_PTR(10);

		ParamDefTable[1].setChildren(Children, 9);
	}

	mBuiltFlag = true;

}
void DestructibleModuleParameters_0p0::initStrings(void)
{
}

void DestructibleModuleParameters_0p0::initDynamicArrays(void)
{
}

void DestructibleModuleParameters_0p0::initDefaults(void)
{

	freeStrings();
	freeReferences();
	freeDynamicArrays();
	gpuRigidBodySettings.gpuDeviceOrdinal = physx::PxI32(-1);
	gpuRigidBodySettings.meshCellSize = physx::PxF32(0.25);
	gpuRigidBodySettings.skinWidth = physx::PxF32(0.01);
	gpuRigidBodySettings.nonPenSolverPosIterCount = physx::PxU32(9);
	gpuRigidBodySettings.frictionSolverPosIterCount = physx::PxU32(3);
	gpuRigidBodySettings.frictionSolverVelIterCount = physx::PxU32(3);
	gpuRigidBodySettings.maxLinAcceleration = physx::PxF32(PX_MAX_F32);
	gpuRigidBodySettings.gpuMemSceneSize = physx::PxU32(64);
	gpuRigidBodySettings.gpuMemTempDataSize = physx::PxU32(192);
	maxDynamicChunkIslandCount = physx::PxU32(0);
	sortFIFOByBenefit = bool(false);
	validBoundsPadding = physx::PxF32(0);
	maxChunkSeparationLOD = physx::PxF32(0.5);
	maxActorCreatesPerFrame = physx::PxU32(PX_MAX_U32);
	maxChunkDepthOffset = physx::PxU32(0);

	initDynamicArrays();
	initStrings();
	initReferences();
}

void DestructibleModuleParameters_0p0::initReferences(void)
{
}

void DestructibleModuleParameters_0p0::freeDynamicArrays(void)
{
}

void DestructibleModuleParameters_0p0::freeStrings(void)
{
}

void DestructibleModuleParameters_0p0::freeReferences(void)
{
}

} // namespace apex
} // namespace physx


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>psidev.psi.mi.jami.enricher.util.diff (PSI :: JAMI - Java framework for molecular interactions 3.2.12 API)</title>
<meta name="date" content="2021-08-20">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">

psidev.psi.mi.jami.enricher.util.diff

Classes

Diff

diff_match_patch

diff_match_patch.Diff

diff_match_patch.Patch

DiffCalculator

Enums

diff_match_patch.Operation

Operation


text:
<!doctype html>

	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>WebcamJS Test Page</title>

Your captured image will appear here...

WebcamJS Test Page

Demonstrates 480x480 cropped capture & 240x240 small display

	<form>
		<input type=button value="Take Large Snapshot" onClick="take_snapshot()">
	</form>


text:
import pandas as pd

from pyxley import UILayout
from pyxley.filters import SliderInput
from pyxley.charts.datamaps import DatamapUSA

def make_datamaps_ui():
    # Make a UI
    ui = UILayout("PyxleyChart")

    datafile = "../examples/datamaps/project/Colorful_State.csv"
    df = pd.read_csv(datafile)
    df.month = df.month.astype('str')

    sldr = SliderInput("Month", 1, 13, "month", "1")
    ui.add_filter(sldr)

    dm = DatamapUSA("/data_map/", "mapid", df,
        "state", "color1", init_params={"month": "1"})
    ui.add_chart(dm)
    return ui