text: package flash

redpajama_set_name: RedPajamaGithub


text:
import { SuiteModuleBuilder } from '../suite';
import { get } from 'ember-metal';

const suite = SuiteModuleBuilder.create();

suite.module('addObject');

suite.test('should return receiver', function(assert) {
  let before = this.newFixture(3);
  let obj = this.newObject(before);

  assert.equal(obj.addObject(before[1]), obj, 'should return receiver');
});

suite.test('[A,B].addObject(C) => [A,B,C] + notify', function(assert) {
  let before = this.newFixture(2);
  let item = this.newFixture(1)[0];
  let after = [before[0], before[1], item];
  let obj = this.newObject(before);
  let observer = this.newObserver(obj, '[]', 'length', 'firstObject', 'lastObject');

  get(obj, 'firstObject');
  get(obj, 'lastObject');

  obj.addObject(item);

  assert.deepEqual(this.toArray(obj), after, 'post item results');
  assert.equal(get(obj, 'length'), after.length, 'length');

  if (observer.isEnabled) {
    assert.equal(observer.timesCalled('[]'), 1, 'should have notified [] once');
    assert.equal(observer.timesCalled('length'), 1, 'should have notified length once');
    assert.equal(observer.timesCalled('lastObject'), 1, 'should have notified lastObject once');
    // This gets called since MutableEnumerable is naive about changes
    assert.equal(observer.timesCalled('firstObject'), 1, 'should have notified firstObject once');
  }
});

suite.test('[A,B,C].addObject(A) => [A,B,C] + NO notify', function(assert) {
  let before = this.newFixture(3);
  let after = before;
  let item = before[0];
  let obj = this.newObject(before);
  let observer = this.newObserver(obj, '[]', 'length', 'firstObject', 'lastObject');

  obj.addObject(item); // note: item in set

  assert.deepEqual(this.toArray(obj), after, 'post item results');
  assert.equal(get(obj, 'length'), after.length, 'length');

  if (observer.isEnabled) {
    assert.equal(observer.validate('[]'), false, 'should NOT have notified []');
    assert.equal(observer.validate('length'), false, 'should NOT have notified length');
    assert.equal(observer.validate('firstObject'), false, 'should NOT have notified firstObject');
    assert.equal(observer.validate('lastObject'), false, 'should NOT have notified lastObject');
  }
});

suite.test('Adding object should notify enumerable observer', function(assert) {
  let obj = this.newObject(this.newFixture(3));
  let observer = this.newObserver(obj).observeEnumerable(obj);
  let item = this.newFixture(1)[0];

  obj.addObject(item);

  assert.deepEqual(observer._before, [obj, null, [item]]);
  assert.deepEqual(observer._after, [obj, null, [item]]);
});

export default suite;


text:
<?xml version="1.0" encoding="utf-8"?>
<StorageList
  xmlns:android="http://schemas.android.com/apk/res/android">
    <storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_internal" android:primary="true" android:emulated="true" android:mtpReserve="100" />
    <storage android:mountPoint="/storage/usbotg" android:storageDescription="@string/storage_usb" android:removable="true" android:emulated="false" />
</StorageList>


text:
'use strict';
import React from 'react';
import { PropTypes as T } from 'prop-types';

import { environment } from '../config';

export const RANGE_MATRIX = {
  xsmall: [0, 543],
  small: [544, 767],
  medium: [768, 991],
  large: [992, 1199],
  xlarge: [1200, Infinity],
};

class Breakpoint extends React.Component {
  constructor(props) {
    super(props);
    this.state = this.getBreakpoints();

    this.resizeListener = this.resizeListener.bind(this);
  }

  getBreakpoints() {
    const width = document.body.offsetWidth;
    let ranges = {};
    for (const name in RANGE_MATRIX) {
      const [min, max] = RANGE_MATRIX[name];
      ranges[`${name}Down`] = width <= max;
      ranges[`${name}Only`] = width >= min && width <= max;
      ranges[`${name}Up`] = width >= min;
    }
    return ranges;
  }

  resizeListener() {
    this.setState(this.getBreakpoints());
  }

  componentDidMount() {
    window.addEventListener('resize', this.resizeListener);
  }

  componentWillUnmount() {
    window.removeEventListener('resize', this.onWindowResize);
  }

  render() {
    return this.props.children(this.state);
  }
}

if (environment !== 'production') {
  Breakpoint.propTypes = {
    children: T.func.isRequired,
  };
}

export default Breakpoint;


text:
@interface ManageAutoLoadSubcriptionViewController (){

    NSMutableArray *autoSubArrayArray;
    UIButton *lowerButton;
    UIButton *higherButton;
    UITextField *textField1;
    UITextField *textField2;
    UITextField *textField3;
    UITextField *textField4;
    BOOL isDeactivateSub;
}

@end

@implementation ManageAutoLoadSubcriptionViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.indicatorView.hidden = TRUE;
    autoSubArrayArray = [[NSMutableArray alloc]init];
    [self getSubs];
    // Do any additional setup after loading the view.

    isDeactivateSub = NO;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)getSubs{
    self.indicatorView.hidden = FALSE;
    [self.indicatorView startAnimating];
    CTSPaymentLayer *paymentlayer = [CitrusPaymentSDK fetchSharedPaymentLayer];

    [paymentlayer requestGetActiveAutoLoadSubscription:^(CTSAutoLoadSubResp *autoloadResponse, NSError *error) {

        dispatch_async(dispatch_get_main_queue(), ^{
            [self.indicatorView stopAnimating];
            self.indicatorView.hidden = TRUE;

        });
        if (error) {
            if (isDeactivateSub == NO) {
                [UIUtility toastMessageOnScreen:[error localizedDescription]];
            }
        }
        else{
            autoSubArrayArray = [NSMutableArray arrayWithObject:autoloadResponse];
            dispatch_async(dispatch_get_main_queue(), ^{
                [self.autoLoadSubcriptionTableView reloadData];
                if (autoSubArrayArray.count==0) {
                    if (isDeactivateSub == NO) {
                        [UIUtility toastMessageOnScreen:@"No card is subscribed"];
                    }
                }

            });
        }

    }];

}

#pragma mark - TableView Delegate Methods

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return autoSubArrayArray.count;

}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *simpleTableIdentifier = @"autoloadIdentifier";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];

    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];

    }
    [cell.contentView viewWithTag:1000].layer.cornerRadius = 5;
     UISwitch *switchView;
    if (autoSubArrayArray.count>0) {

        NSDictionary *tempDict = [autoSubArrayArray objectAtIndex:indexPath.row];
        ((UILabel *) [cell.contentView viewWithTag:1001]).text = [tempDict valueForKey:@"card"];
        ((UILabel *) [cell.contentView viewWithTag:1002]).text = [tempDict valueForKey:@"subscriptionId"];
        ((UILabel *) [cell.contentView viewWithTag:1003]).text = [tempDict valueForKey:@"holder"];
        ((UILabel *) [cell.contentView viewWithTag:1004]).text = [tempDict valueForKey:@"expiry"];
        NSString *tempThresholdString = [NSString stringWithFormat:@"Threshold Amt: %@",[tempDict valueForKey:@"thresholdAmount"]];
        ((UILabel *) [cell.contentView viewWithTag:1005]).text = tempThresholdString;
        NSString *tempAutoloadString = [NSString stringWithFormat:@"Autoload Amt: : %@",[tempDict valueForKey:@"loadAmount"]];
        ((UILabel *) [cell.contentView viewWithTag:1006]).text = tempAutoloadString;

        for (id view in [cell.contentView viewWithTag:1000].subviews){
            if ([view isKindOfClass:[UISwitch class]]) {
                switchView  = (UISwitch *) view;
                switchView.tag = indexPath.row;
            }
            else if ([view isKindOfClass:[UIButton class]]){
                if ([((UIButton *) view).titleLabel.text isEqualToString:@"Update to Higher"]) {
                    higherButton = (UIButton *)view;
                    higherButton.layer.cornerRadius = 3;
                    higherButton.tag = indexPath.row;
                }
                else if ([((UIButton *) view).titleLabel.text isEqualToString:@"Update to Lower"]) {
                    lowerButton = (UIButton *)view;
                    lowerButton.tag = indexPath.row;
                    lowerButton.layer.cornerRadius = 3;
                }
            }
        }

        if ([[tempDict valueForKey:@"status"] isEqualToString:@"Active"]) {
            switchView.hidden = FALSE;
            [switchView setOn:YES animated:YES];
            lowerButton.hidden = FALSE;
            higherButton.hidden = FALSE;
        }
        else{
            lowerButton.hidden = TRUE;
            higherButton.hidden = TRUE;
            switchView.hidden = TRUE;
        }

    }
    [lowerButton addTarget:self action:@selector(updateToLower:) forControlEvents:UIControlEventTouchUpInside];
    [higherButton addTarget:self action:@selector(updateToHigher:) forControlEvents:UIControlEventTouchUpInside];

    [switchView addTarget:self action:@selector(setToInactiveSuscription:)forControlEvents:UIControlEventValueChanged];

    return cell;
}

#pragma mark - Action Methods
- (void) setToInactiveSuscription :(UISwitch*)tempSwitch{

    NSDictionary *tempDict = [autoSubArrayArray objectAtIndex:tempSwitch.tag];
    [self markSubscriptionInactive:[tempDict valueForKey:@"subscriptionId"]];

}

- (void) updateToLower:(UIButton *)button{

    dispatch_async(dispatch_get_main_queue(), ^{

        UIAlertView *sendMoneyAlert = [[UIAlertView alloc] initWithTitle:@"" message:@"Subscription Update to Lower" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok" , nil];
        sendMoneyAlert.tag = 10001;
        sendMoneyAlert.alertViewStyle = UIAlertViewStyleLoginAndPasswordInput;
        UITextField * alertTextField1 = [sendMoneyAlert textFieldAtIndex:0];
        alertTextField1.keyboardType = UIKeyboardTypeDecimalPad;
        alertTextField1.placeholder = @"Enter Threshold Amount.";

        UITextField * alertTextField2 = [sendMoneyAlert textFieldAtIndex:1];
        alertTextField2.keyboardType = UIKeyboardTypeDecimalPad;
        alertTextField2.placeholder = @"Enter lower Autoload Amount.";
        [alertTextField2  setSecureTextEntry:FALSE];

        [sendMoneyAlert show];
    });

}

- (void) updateToHigher:(UIButton *)button{

    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 250, 110)];

    textField1 = [[UITextField alloc] initWithFrame:CGRectMake(10,0,252,25)];
    textField1.borderStyle = UITextBorderStyleBezel;
    textField1.placeholder = @"Enter Threshold Amount.";
    textField1.font = [UIFont fontWithName:@"Verdana" size:13];
    textField1.keyboardType = UIKeyboardTypeDecimalPad;
    textField1.backgroundColor = [UIColor whiteColor];
    textField1.delegate = self;
    [view addSubview:textField1];

    textField2 = [[UITextField alloc] initWithFrame:CGRectMake(10,25,252,25)];
    textField2.placeholder = @"Enter higher Autoload Amount.";
    textField2.borderStyle = UITextBorderStyleBezel;
    textField2.keyboardType = UIKeyboardTypeDecimalPad;
    textField2.font = [UIFont fontWithName:@"Verdana" size:13];
    textField2.backgroundColor = [UIColor whiteColor];
    textField2.delegate = self;
    [view addSubview:textField2];

    textField3 = [[UITextField alloc] initWithFrame:CGRectMake(10,50,252,25)];
    textField3.placeholder = @"Enter CVV";
    textField3.borderStyle = UITextBorderStyleBezel;
    textField3.keyboardType = UIKeyboardTypeNumberPad;
    textField3.backgroundColor = [UIColor whiteColor];
    textField3.font = [UIFont fontWithName:@"Verdana" size:13];
    textField3.delegate = self;
    [view addSubview:textField3];

    textField4 = [[UITextField alloc] initWithFrame:CGRectMake(10,75,252,25)];
    textField4.borderStyle = UITextBorderStyleBezel;
    textField4.placeholder = @"Enter credit card number.";
    textField4.font = [UIFont fontWithName:@"Verdana" size:13];
    textField4.keyboardType = UIKeyboardTypeNumberPad;
    textField4.backgroundColor = [UIColor whiteColor];
    textField4.delegate = self;
    [view addSubview:textField4];

     dispatch_async(dispatch_get_main_queue(), ^{
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"" message:@"Subscription Update to Higher" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil];
        [alertView setValue:view  forKey:@"accessoryView"];

        alertView.tag = 10002;
        [alertView show];
     });

}

-(void)markSubscriptionInactive:(NSString *)subscriptionId{
    self.indicatorView.hidden = FALSE;
    [self.indicatorView startAnimating];
    [[CTSPaymentLayer fetchSharedPaymentLayer] requestDeactivateAutoLoadSubId:subscriptionId completion:^(CTSAutoLoadSubResp *autoloadResponse, NSError *error) {
        dispatch_async(dispatch_get_main_queue(), ^{
            [self.indicatorView stopAnimating];
            self.indicatorView.hidden = TRUE;

        });
        isDeactivateSub = YES;
        if(error == nil){
            [self getSubs];
            [UIUtility toastMessageOnScreen:[NSString stringWithFormat:@"subscription %@\n updated to : %@",autoloadResponse.subscriptionId,autoloadResponse.status]];
        }
        else {
            [UIUtility toastMessageOnScreen:[error localizedDescription]];
        }
    }];
}

-(void)updateSubscriptionToLowerWithLowerAutoloadAmount:(NSString *)amount andWithThresholdAmount:(NSString *)thresholdAmount{

    NSDictionary *tempDict = [autoSubArrayArray objectAtIndex:lowerButton.tag];
    if (![self checkValueIsDecimal:amount]) {
        amount = [amount stringByAppendingString:@".00"];
    }
    if (![self checkValueIsDecimal:thresholdAmount]) {
        thresholdAmount = [thresholdAmount stringByAppendingString:@".00"];
    }
    if (([thresholdAmount doubleValue] >=500.00) && ([amount doubleValue] <= [[tempDict valueForKey:@"loadAmount"] doubleValue])){
        self.indicatorView.hidden = FALSE;
        [self.indicatorView startAnimating];

        [[CTSPaymentLayer fetchSharedPaymentLayer] requestUpdateAutoLoadSubId:[tempDict valueForKey:@"subscriptionId"] autoLoadAmount:amount thresholdAmount:thresholdAmount completion:^(CTSAutoLoadSubResp *autoloadResponse, NSError *error) {
            dispatch_async(dispatch_get_main_queue(), ^{
                [self.indicatorView stopAnimating];
                self.indicatorView.hidden = TRUE;

            });
            if (error) {
                [UIUtility toastMessageOnScreen:[error localizedDescription]];
            }
            else{
                [self getSubs];
                [UIUtility toastMessageOnScreen: [NSString stringWithFormat:@"sbscription updated %@",[self toReadableString:autoloadResponse]]];
            }
        }];
    }
    else{

        [UIUtility toastMessageOnScreen:@"Threshold amount should be greater than 500 and Autoload amount should be less than previous value"];
    }

}

- (void)updateSubscriptionToHigherWithHigherAutoloadAmount:(NSString *)amount withThresholdAmount:(NSString *)thresholdAmount withCvv:(NSString *)cvv andCardNumber:(NSString *)cardNumber{

    NSDictionary *tempDict = [autoSubArrayArray objectAtIndex:higherButton.tag];
    if (![self checkValueIsDecimal:amount]) {
        amount = [amount stringByAppendingString:@".00"];
    }
    if (![self checkValueIsDecimal:thresholdAmount]) {
        thresholdAmount = [thresholdAmount stringByAppendingString:@".00"];
    }
    if (([amount doubleValue] > [[tempDict valueForKey:@"loadAmount"] doubleValue])) {

        self.indicatorView.hidden = FALSE;
        [self.indicatorView startAnimating];

//        CTSPaymentDetailUpdate *creditCardInfo = [[CTSPaymentDetailUpdate alloc] init];
//        // Update card for card payment.
//        CTSElectronicCardUpdate *creditCard = [[CTSElectronicCardUpdate alloc] initCreditCard];
//        creditCard.number = cardNumber;
//        creditCard.expiryDate = [tempDict valueForKey:@"expiry"];
//        creditCard.scheme = [CTSUtility fetchCardSchemeForCardNumber:cardNumber];
//        creditCard.ownerName = [tempDict valueForKey:@"holder"];
//        creditCard.cvv = cvv;
//        [creditCardInfo addCard:creditCard];

        CTSPaymentOptions *creditCardInfo = [CTSPaymentOptions creditCardOption:cardNumber
                                                                  cardExpiryDate:[tempDict valueForKey:@"expiry"]
                                                                             cvv:cvv];

        CTSLoadMoney *loadMoney = [[CTSLoadMoney alloc ] init];
        loadMoney.paymentInfo = creditCardInfo;
        loadMoney.contactInfo = nil;
        loadMoney.userAddress = nil;
        loadMoney.amount = @"1";
        loadMoney.returnUrl = self.returnUrl;
        loadMoney.custParams = nil;
        loadMoney.controller = self;

        CTSAutoLoad *autoload = [[CTSAutoLoad alloc]init];
        autoload.autoLoadAmt = amount;
        autoload.thresholdAmount = thresholdAmount;

        [[CTSPaymentLayer fetchSharedPaymentLayer] requestLoadAndIncrementAutoloadSubId:[tempDict valueForKey:@"subscriptionId"] loadMoney:loadMoney autoLoad:autoload withCompletionHandler:^(CTSLoadAndPayRes *loadAndSubscribe, NSError *error) {
            dispatch_async(dispatch_get_main_queue(), ^{
                [self.indicatorView stopAnimating];
                self.indicatorView.hidden = TRUE;

            });
            if(error == nil){
                LogTrace(@"loadAndSubscribe %@",loadAndSubscribe.autoLoadResp);
                LogTrace(@"loadAndSubscribe %@",loadAndSubscribe.loadMoneyResponse);
                [self getSubs];
                [UIUtility toastMessageOnScreen:[NSString stringWithFormat:@"autoloadSubscriptions %@",[self toReadableString:loadAndSubscribe.autoLoadResp]]];
            }
            else {
                [UIUtility toastMessageOnScreen:[error localizedDescription]];
            }
        }];
    }
    else{

        [UIUtility toastMessageOnScreen:@"Autoload amount should be greater than previous values"];
    }
}

-(NSString *)toReadableString:(CTSAutoLoadSubResp *)load{
    NSString *string = [NSString stringWithFormat:@"subscriptionId: %@ \nthresholdAmount: %@ \nloadAmount: %@ \nstatus: %@ \nexpiry: %@\nholder: %@",load.subscriptionId,load.thresholdAmount,load.loadAmount,load.status,load.expiry,load.holder];
    return string;
}

#pragma mark - AlertView Delegate Methods
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{

    [self.view endEditing:YES];

    if (alertView.tag ==10001){
        if (buttonIndex==1) {

            [self updateSubscriptionToLowerWithLowerAutoloadAmount:[alertView textFieldAtIndex:1].text andWithThresholdAmount:[alertView textFieldAtIndex:0].text];

        }
    }
    else if (alertView.tag==10002) {
        if (buttonIndex==1) {

            [self updateSubscriptionToHigherWithHigherAutoloadAmount:textField2.text withThresholdAmount:textField1.text withCvv:textField3.text andCardNumber:textField4.text];

        }
    }

}

- (BOOL) checkValueIsDecimal:(NSString *)string{

    NSArray *array = [string componentsSeparatedByString:@"."];
    if (array.count==2) {
        return YES;
    }
    return NO;

}

@end


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 Interface gameshop.advance.interfaces.remote.utility.IRemoteObserver</title>
<meta name="date" content="2015-02-13">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Interface
gameshop.advance.interfaces.remote.utility.IRemoteObserver

Packages that use IRemoteObserver

Package
Description

gameshop.advance.interfaces.remote.factory

gameshop.advance.observer

Uses of IRemoteObserver in gameshop.advance.interfaces.remote.factory

Methods in gameshop.advance.interfaces.remote.factory with parameters of type IRemoteObserver

Modifier and Type
Method and Description

void
IFornitureControllerRemote.addDeleteListener(IRemoteObserver obs)

void
IFornitureControllerRemote.addListener(IRemoteObserver obs)

void
IPrenotaProdottoRemote.addListener(IRemoteObserver obs)

void
ICassaRemote.aggiungiListener(IRemoteObserver obs)

void
IInventarioControllerRemote.aggiungiListener(IRemoteObserver obs)

void
ICassaRemote.rimuoviListener(IRemoteObserver obs)

void
IInventarioControllerRemote.rimuoviListener(IRemoteObserver obs)

Uses of IRemoteObserver in gameshop.advance.observer

Classes in gameshop.advance.observer that implement IRemoteObserver

Modifier and Type
Class and Description

class
DescriptionsObserver

Osservatore delle descrizioni dei prodotti inseriti.

class
PartialObserver

Osservatore dell'acconto di una prenotazione.

class
RestObserver

Osservatore del resto di una transazione.

class
RestPartialObserver

Osservatore del resto dell'acconto di una prenotazione.

class
TotalObserver

Osservatore del totale da pagare di una transazione.

class
TransactionObserver

Observer della transazione.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
Test controls placement.

    <video controls></video>

    <video controls style="width: 320px;"></video>

    <video controls style="position: absolute; width: 320px;"></video>


text:
var _init_a, _init_b;
const dec = () => {};
var _a = /*#__PURE__*/new WeakMap();
var _b = /*#__PURE__*/new WeakMap();
class Foo {
  constructor() {
    babelHelpers.classPrivateFieldInitSpec(this, _a, {
      writable: true,
      value: _init_a(this)
    });
    babelHelpers.classPrivateFieldInitSpec(this, _b, {
      writable: true,
      value: _init_b(this, 123)
    });
  }
}
[_init_a, _init_b] = babelHelpers.applyDecs(Foo, [[dec, 0, "a", function () {
  return babelHelpers.classPrivateFieldGet(this, _a);
}, function (value) {
  babelHelpers.classPrivateFieldSet(this, _a, value);
}], [dec, 0, "b", function () {
  return babelHelpers.classPrivateFieldGet(this, _b);
}, function (value) {
  babelHelpers.classPrivateFieldSet(this, _b, value);
}]], []);


text:
package com.gopivotal.cloudfoundry.test.support.operations;

import org.junit.Test;

import java.util.Arrays;

import static org.mockito.Mockito.mock;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;

public final class AbstractTestOperationsTest {

    private final AbstractTestOperations testOperations = mock(AbstractTestOperations.class);

    public AbstractTestOperationsTest() {
        mockTestOperations(this.testOperations);
    }

    private static void mockTestOperations(TestOperations testOperations) {
        when(testOperations.classPath()).thenReturn(Arrays.asList("/directory/alpha.jar", "/directory/bravo.jar"));
    }

    @Test
    public void isJarOnClassPathTrue() throws Exception {
        assertTrue(this.testOperations.isJarOnClassPath("bravo"));
    }

    @Test
    public void isJarOnClassPathFalse() throws Exception {
        assertFalse(this.testOperations.isJarOnClassPath("charlie"));
    }
}


text:
package com.proofpoint.platform.sample;

import com.google.common.collect.ImmutableMap;
import com.google.inject.Injector;
import com.proofpoint.bootstrap.LifeCycleManager;
import com.proofpoint.http.client.HttpClient;
import com.proofpoint.http.client.StatusResponseHandler.StatusResponse;
import com.proofpoint.http.client.StringResponseHandler.StringResponse;
import com.proofpoint.http.client.jetty.JettyHttpClient;
import com.proofpoint.http.server.testing.TestingHttpServer;
import com.proofpoint.http.server.testing.TestingHttpServerModule;
import com.proofpoint.jaxrs.JaxrsModule;
import com.proofpoint.json.JsonCodec;
import com.proofpoint.json.JsonModule;
import com.proofpoint.node.testing.TestingNodeModule;
import com.proofpoint.reporting.ReportingModule;
import com.proofpoint.testing.Closeables;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.weakref.jmx.testing.TestingMBeanModule;

import java.net.URI;
import java.util.Map;

import static com.proofpoint.bootstrap.Bootstrap.bootstrapTest;
import static com.proofpoint.http.client.JsonBodyGenerator.jsonBodyGenerator;
import static com.proofpoint.http.client.JsonResponseHandler.createJsonResponseHandler;
import static com.proofpoint.http.client.Request.Builder.prepareDelete;
import static com.proofpoint.http.client.Request.Builder.prepareGet;
import static com.proofpoint.http.client.Request.Builder.preparePost;
import static com.proofpoint.http.client.Request.Builder.preparePut;
import static com.proofpoint.http.client.StatusResponseHandler.createStatusResponseHandler;
import static com.proofpoint.http.client.StringResponseHandler.createStringResponseHandler;
import static com.proofpoint.json.JsonCodec.mapJsonCodec;
import static com.proofpoint.platform.sample.Person.createPerson;
import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE;
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
import static javax.ws.rs.core.Response.Status.CREATED;
import static javax.ws.rs.core.Response.Status.NOT_FOUND;
import static javax.ws.rs.core.Response.Status.NO_CONTENT;
import static javax.ws.rs.core.Response.Status.OK;
import static org.assertj.core.api.Assertions.assertThat;

public class TestServer
{
    private static final int NOT_ALLOWED = 405;

    private final Map<String, Object> personJsonStructure = ImmutableMap.of(
            "name", "Mr Foo",
            "email", "foo@example.com"
    );
    private final JsonCodec<Map<String, Object>> mapCodec = mapJsonCodec(String.class, Object.class);
    private final HttpClient client = new JettyHttpClient();

    private LifeCycleManager lifeCycleManager;
    private TestingHttpServer server;
    private PersonStore store;

    @BeforeMethod
    public void setup()
            throws Exception
    {
        Injector injector = bootstrapTest()
                .withModules(
                        new TestingNodeModule(),
                        new TestingHttpServerModule(),
                        new JsonModule(),
                        new JaxrsModule(),
                        new ReportingModule(),
                        new TestingMBeanModule(),
                        new MainModule()
                )
                .initialize();

        lifeCycleManager = injector.getInstance(LifeCycleManager.class);
        server = injector.getInstance(TestingHttpServer.class);
        store = injector.getInstance(PersonStore.class);
    }

    @AfterMethod(alwaysRun = true)
    public void teardown()
            throws Exception
    {
        if (lifeCycleManager != null) {
            lifeCycleManager.stop();
        }
    }

    @AfterClass(alwaysRun = true)
    public void teardownClass()
    {
        Closeables.closeQuietly(client);
    }

    @Test
    public void testEmpty()
    {
        Map<String, Object> response = client.execute(
                prepareGet().setUri(uriFor("/v1/person")).build(),
                createJsonResponseHandler(mapCodec, OK.getStatusCode()));

        assertThat(response).isEmpty();
    }

    @Test
    public void testGetAll()
    {
        store.put("bar", createPerson("bar@example.com", "Mr Bar"));
        store.put("foo", createPerson("foo@example.com", "Mr Foo"));

        Object expected = ImmutableMap.of(
                "foo", ImmutableMap.of("name", "Mr Foo", "email", "foo@example.com"),
                "bar", ImmutableMap.of("name", "Mr Bar", "email", "bar@example.com")
        );

        Object actual = client.execute(
                prepareGet().setUri(uriFor("/v1/person")).build(),
                createJsonResponseHandler(mapCodec, OK.getStatusCode()));
        assertThat(actual).isEqualTo(expected);
    }

    @Test
    public void testGetNotFound()
    {
        URI requestUri = uriFor("/v1/person/foo");

        StatusResponse response = client.execute(
                prepareGet().setUri(requestUri).build(),
                createStatusResponseHandler());

        assertThat(response.getStatusCode()).isEqualTo(NOT_FOUND.getStatusCode());
    }

    @Test
    public void testGetSingle()
    {
        store.put("foo", createPerson("foo@example.com", "Mr Foo"));

        URI requestUri = uriFor("/v1/person/foo");

        Map<String, String> expected = ImmutableMap.of("name", "Mr Foo", "email", "foo@example.com");

        Map<String, Object> actual = client.execute(
                prepareGet().setUri(requestUri).build(),
                createJsonResponseHandler(mapCodec, OK.getStatusCode()));

        assertThat(actual).isEqualTo(expected);
    }

    @Test
    public void testPutAdd()
    {
        StringResponse response = client.execute(
                preparePut()
                        .setUri(uriFor("/v1/person/foo"))
                        .addHeader(CONTENT_TYPE, APPLICATION_JSON)
                        .setBodySource(jsonBodyGenerator(mapCodec, personJsonStructure))
                        .build(),
                createStringResponseHandler());

        assertThat(response.getStatusCode()).isEqualTo(CREATED.getStatusCode());
        assertThat(response.getHeader(CONTENT_TYPE)).isNull();
        assertThat(response.getBody()).isEmpty();

        assertThat(store.get("foo")).isEqualTo(createPerson("foo@example.com", "Mr Foo"));
    }
    @Test
    public void testPutReplace()
    {
        store.put("foo", createPerson("foo@example.com", "Mr Foo"));

        StringResponse response = client.execute(
                preparePut()
                        .setUri(uriFor("/v1/person/foo"))
                        .addHeader(CONTENT_TYPE, APPLICATION_JSON)
                        .setBodySource(jsonBodyGenerator(mapCodec, personJsonStructure))
                        .build(),
                createStringResponseHandler());

        assertThat(response.getStatusCode()).isEqualTo(NO_CONTENT.getStatusCode());
        assertThat(response.getHeader(CONTENT_TYPE)).isNull();
        assertThat(response.getBody()).isEmpty();

        assertThat(store.get("foo")).isEqualTo(createPerson("foo@example.com", "Mr Foo"));
    }

    @Test
    public void testDelete()
    {
        store.put("foo", createPerson("foo@example.com", "Mr Foo"));

        StringResponse response = client.execute(
                prepareDelete()
                        .setUri(uriFor("/v1/person/foo"))
                        .addHeader(CONTENT_TYPE, APPLICATION_JSON)
                        .build(),
                createStringResponseHandler());

        assertThat(response.getStatusCode()).isEqualTo(NO_CONTENT.getStatusCode());
        assertThat(response.getHeader(CONTENT_TYPE)).isNull();
        assertThat(response.getBody()).isEmpty();

        assertThat(store.get("foo")).isNull();
    }

    @Test
    public void testDeleteMissing()
    {
        StringResponse response = client.execute(
                prepareDelete()
                        .setUri(uriFor("/v1/person/foo"))
                        .addHeader(CONTENT_TYPE, APPLICATION_JSON)
                        .build(),
                createStringResponseHandler());

        assertThat(response.getStatusCode()).isEqualTo(NOT_FOUND.getStatusCode());
    }

    @Test
    public void testPostNotAllowed()
    {
        StatusResponse response = client.execute(
                preparePost()
                        .setUri(uriFor("/v1/person/foo"))
                        .addHeader(CONTENT_TYPE, APPLICATION_JSON)
                        .setBodySource(jsonBodyGenerator(mapCodec, personJsonStructure))
                        .build(),
                createStatusResponseHandler());

        assertThat(response.getStatusCode()).isEqualTo(NOT_ALLOWED);

        assertThat(store.get("foo")).isNull();
    }

    private URI uriFor(String path)
    {
        return server.getBaseUrl().resolve(path);
    }
}


text:
namespace game
{
    partial class NoComplate
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.Body = new GhostTheme();
            this.CloseWindow = new GhostButton();
            this.OK = new System.Windows.Forms.Button();
            this.Panel = new GhostGroupBox();
            this.LabelNameLevel = new System.Windows.Forms.Label();
            this.LabelBalance = new System.Windows.Forms.Label();
            this.Time = new System.Windows.Forms.TextBox();
            this.Balance = new System.Windows.Forms.TextBox();
            this.NameLevel = new System.Windows.Forms.TextBox();
            this.close = new GhostButton();
            this.Body.SuspendLayout();
            this.Panel.SuspendLayout();
            this.SuspendLayout();
            //
            // Body
            //
            this.Body.BorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Body.Colors = new Bloom[0];
            this.Body.Controls.Add(this.CloseWindow);
            this.Body.Controls.Add(this.OK);
            this.Body.Controls.Add(this.Panel);
            this.Body.Customization = "";
            this.Body.Dock = System.Windows.Forms.DockStyle.Fill;
            this.Body.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.Body.Image = null;
            this.Body.Location = new System.Drawing.Point(0, 0);
            this.Body.Movable = true;
            this.Body.Name = "Body";
            this.Body.NoRounding = false;
            this.Body.ShowIcon = false;
            this.Body.Sizable = true;
            this.Body.Size = new System.Drawing.Size(328, 194);
            this.Body.SmartBounds = true;
            this.Body.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Body.TabIndex = 0;
            this.Body.Text = "Уровень не пройден... :(";
            this.Body.TransparencyKey = System.Drawing.Color.Fuchsia;
            this.Body.Transparent = false;
            //
            // CloseWindow
            //
            this.CloseWindow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.CloseWindow.Color = System.Drawing.Color.Empty;
            this.CloseWindow.Colors = new Bloom[0];
            this.CloseWindow.Cursor = System.Windows.Forms.Cursors.Hand;
            this.CloseWindow.Customization = "";
            this.CloseWindow.EnableGlass = true;
            this.CloseWindow.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.CloseWindow.Image = null;
            this.CloseWindow.Location = new System.Drawing.Point(298, 2);
            this.CloseWindow.Name = "CloseWindow";
            this.CloseWindow.NoRounding = false;
            this.CloseWindow.Size = new System.Drawing.Size(21, 21);
            this.CloseWindow.TabIndex = 17;
            this.CloseWindow.Text = "x";
            this.CloseWindow.Transparent = false;
            this.CloseWindow.Click += new System.EventHandler(this.CloseWindow_Click);
            //
            // OK
            //
            this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.OK.BackColor = System.Drawing.SystemColors.InfoText;
            this.OK.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.OK.FlatAppearance.BorderColor = System.Drawing.Color.Gray;
            this.OK.FlatAppearance.BorderSize = 2;
            this.OK.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            this.OK.FlatAppearance.MouseOverBackColor = System.Drawing.Color.DimGray;
            this.OK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.OK.ForeColor = System.Drawing.Color.LightGray;
            this.OK.Location = new System.Drawing.Point(12, 140);
            this.OK.Name = "OK";
            this.OK.Size = new System.Drawing.Size(304, 42);
            this.OK.TabIndex = 16;
            this.OK.Text = "Попробовать снова?";
            this.OK.UseVisualStyleBackColor = false;
            //
            // Panel
            //
            this.Panel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.Panel.Colors = new Bloom[0];
            this.Panel.Controls.Add(this.LabelNameLevel);
            this.Panel.Controls.Add(this.LabelBalance);
            this.Panel.Controls.Add(this.Time);
            this.Panel.Controls.Add(this.Balance);
            this.Panel.Controls.Add(this.NameLevel);
            this.Panel.Customization = "";
            this.Panel.Font = new System.Drawing.Font("Verdana", 8F);
            this.Panel.Image = null;
            this.Panel.Location = new System.Drawing.Point(12, 30);
            this.Panel.Name = "Panel";
            this.Panel.NoRounding = false;
            this.Panel.Size = new System.Drawing.Size(304, 104);
            this.Panel.TabIndex = 15;
            this.Panel.Text = "       Информация по пройденному уровню:";
            this.Panel.Transparent = false;
            //
            // LabelNameLevel
            //
            this.LabelNameLevel.AutoSize = true;
            this.LabelNameLevel.BackColor = System.Drawing.Color.Black;
            this.LabelNameLevel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
            this.LabelNameLevel.Location = new System.Drawing.Point(11, 32);
            this.LabelNameLevel.Name = "LabelNameLevel";
            this.LabelNameLevel.Size = new System.Drawing.Size(62, 13);
            this.LabelNameLevel.TabIndex = 5;
            this.LabelNameLevel.Text = "Уровень:";
            //
            // LabelBalance
            //
            this.LabelBalance.AutoSize = true;
            this.LabelBalance.BackColor = System.Drawing.Color.Black;
            this.LabelBalance.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
            this.LabelBalance.Location = new System.Drawing.Point(11, 56);
            this.LabelBalance.Name = "LabelBalance";
            this.LabelBalance.Size = new System.Drawing.Size(101, 13);
            this.LabelBalance.TabIndex = 3;
            this.LabelBalance.Text = "Набрано очков:";
            //
            // Time
            //
            this.Time.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.Time.BackColor = System.Drawing.SystemColors.InfoText;
            this.Time.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.Time.Cursor = System.Windows.Forms.Cursors.Arrow;
            this.Time.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.Time.ForeColor = System.Drawing.Color.Red;
            this.Time.Location = new System.Drawing.Point(6, 75);
            this.Time.Name = "Time";
            this.Time.ReadOnly = true;
            this.Time.Size = new System.Drawing.Size(292, 23);
            this.Time.TabIndex = 2;
            this.Time.Text = "У Вас закончилось время. ";
            this.Time.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            //
            // Balance
            //
            this.Balance.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.Balance.BackColor = System.Drawing.SystemColors.InfoText;
            this.Balance.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.Balance.Cursor = System.Windows.Forms.Cursors.Arrow;
            this.Balance.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.Balance.ForeColor = System.Drawing.Color.White;
            this.Balance.Location = new System.Drawing.Point(6, 51);
            this.Balance.Name = "Balance";
            this.Balance.ReadOnly = true;
            this.Balance.Size = new System.Drawing.Size(292, 23);
            this.Balance.TabIndex = 1;
            this.Balance.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            //
            // NameLevel
            //
            this.NameLevel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.NameLevel.BackColor = System.Drawing.SystemColors.InfoText;
            this.NameLevel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.NameLevel.Cursor = System.Windows.Forms.Cursors.Arrow;
            this.NameLevel.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.NameLevel.ForeColor = System.Drawing.Color.White;
            this.NameLevel.Location = new System.Drawing.Point(6, 27);
            this.NameLevel.Name = "NameLevel";
            this.NameLevel.ReadOnly = true;
            this.NameLevel.Size = new System.Drawing.Size(292, 23);
            this.NameLevel.TabIndex = 0;
            this.NameLevel.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            //
            // close
            //
            this.close.Color = System.Drawing.Color.Empty;
            this.close.Colors = new Bloom[0];
            this.close.Customization = "";
            this.close.EnableGlass = true;
            this.close.Font = new System.Drawing.Font("Verdana", 8F);
            this.close.Image = null;
            this.close.Location = new System.Drawing.Point(0, 0);
            this.close.Name = "close";
            this.close.NoRounding = false;
            this.close.Size = new System.Drawing.Size(0, 0);
            this.close.TabIndex = 0;
            this.close.Transparent = false;
            //
            // NoComplate
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(328, 194);
            this.Controls.Add(this.Body);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Name = "NoComplate";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Уровень пройден! :)";
            this.TransparencyKey = System.Drawing.Color.Fuchsia;
            this.Body.ResumeLayout(false);
            this.Panel.ResumeLayout(false);
            this.Panel.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private GhostTheme Body;
        private GhostGroupBox Panel;
        private System.Windows.Forms.TextBox Time;
        private System.Windows.Forms.TextBox Balance;
        private System.Windows.Forms.TextBox NameLevel;
        private System.Windows.Forms.Label LabelNameLevel;
        private System.Windows.Forms.Label LabelBalance;
        private System.Windows.Forms.Button OK;
        private GhostButton close;
        private GhostButton CloseWindow;

    }
}


text:
#include "xcam_utils.h"
#include "cl_biyuv_handler.h"

namespace XCam {

CLBiyuvImageKernel::CLBiyuvImageKernel (SmartPtr<CLContext> &context)
    : CLImageKernel (context, "kernel_biyuv")
    , _sigma_r (10.0)
    , _imw (1920)
    , _imh (1080)
{
}

XCamReturn
CLBiyuvImageKernel::prepare_arguments (
    SmartPtr<DrmBoBuffer> &input, SmartPtr<DrmBoBuffer> &output,
    CLArgument args[], uint32_t &arg_count,
    CLWorkSize &work_size)
{
    SmartPtr<CLContext> context = get_context ();
    const VideoBufferInfo & video_info = input->get_video_info ();

    _imw = video_info.width;
    _imh = video_info.height;
    //sigma_r = 0.1*100
    _sigma_r = 10.0;

    _image_in = new CLVaImage (context, input);
    _image_out = new CLVaImage (context, output);

    XCAM_ASSERT (_image_in->is_valid () && _image_out->is_valid ());
    XCAM_FAIL_RETURN (
        WARNING,
        _image_in->is_valid () && _image_out->is_valid (),
        XCAM_RETURN_ERROR_MEM,
        "cl image kernel(%s) in/out memory not available", get_kernel_name ());

    _vertical_offset = video_info.aligned_height;

    //set args;
    args[0].arg_adress = &_image_in->get_mem_id ();
    args[0].arg_size = sizeof (cl_mem);
    args[1].arg_adress = &_image_out->get_mem_id ();
    args[1].arg_size = sizeof (cl_mem);
    args[2].arg_adress = &_sigma_r;
    args[2].arg_size = sizeof (_sigma_r);
    args[3].arg_adress = &_imw;
    args[3].arg_size = sizeof (_imw);
    args[4].arg_adress = &_imh;
    args[4].arg_size = sizeof (_imh);

    args[5].arg_adress = &_vertical_offset;
    args[5].arg_size = sizeof (_vertical_offset);
    arg_count = 6;

    work_size.dim = XCAM_DEFAULT_IMAGE_DIM;
    work_size.global[0] = _imh;
    work_size.global[1] = _imw;
    work_size.local[0] = _imh / 72;
    work_size.local[1] = _imw / 120;

    return XCAM_RETURN_NO_ERROR;
}

CLBiyuvImageHandler::CLBiyuvImageHandler (const char *name)
    : CLImageHandler (name)
{
}

bool
CLBiyuvImageHandler::set_biyuv_kernel(SmartPtr<CLBiyuvImageKernel> &kernel)
{
    SmartPtr<CLImageKernel> image_kernel = kernel;
    add_kernel (image_kernel);
    _biyuv_kernel = kernel;
    return true;
}

SmartPtr<CLImageHandler>
create_cl_biyuv_image_handler (SmartPtr<CLContext> &context)
{
    SmartPtr<CLBiyuvImageHandler> biyuv_handler;
    SmartPtr<CLBiyuvImageKernel> biyuv_kernel;
    XCamReturn ret = XCAM_RETURN_NO_ERROR;

    biyuv_kernel = new CLBiyuvImageKernel (context);
    {
        XCAM_CL_KERNEL_FUNC_SOURCE_BEGIN(kernel_biyuv)
#include "kernel_biyuv.clx"
        XCAM_CL_KERNEL_FUNC_END;
        ret = biyuv_kernel->load_from_source (kernel_biyuv_body, strlen (kernel_biyuv_body));
        XCAM_FAIL_RETURN (
            WARNING,
            ret == XCAM_RETURN_NO_ERROR,
            NULL,
            "CL image handler(%s) load source failed", biyuv_kernel->get_kernel_name());
    }
    XCAM_ASSERT (biyuv_kernel->is_valid ());
    biyuv_handler = new CLBiyuvImageHandler ("cl_handler_biyuv");
    biyuv_handler->set_biyuv_kernel (biyuv_kernel);

    return biyuv_handler;
}

};


text:
#include "paddle/fluid/operators/collective/send_v2_op.h"
#include "paddle/fluid/platform/collective_helper.h"
#include "paddle/fluid/platform/device/npu/hccl_helper.h"

namespace paddle {
namespace operators {

template <typename T>
class PartialSendOpASCENDKernel : public framework::OpKernel<T> {
 public:
  void Compute(const framework::ExecutionContext& ctx) const override {
#if defined(PADDLE_WITH_ASCEND_CL)
    auto x = ctx.Input<phi::DenseTensor>("X");
    int num = ctx.Attr<int>("num");
    int id = ctx.Attr<int>("id");
    int send_numel = x->numel() / num;
    int offset = send_numel * id;

    void* ptr = reinterpret_cast<void*>(const_cast<T*>(x->data<T>()) + offset);
    int numel = send_numel;
    HcclDataType dtype =
        platform::ToHCCLDataType(framework::TransToProtoVarType(x->dtype()));

    int ring_id = ctx.Attr<int>("ring_id");
    auto place = ctx.GetPlace();
    auto comm =
        paddle::platform::HCCLCommContext::Instance().Get(ring_id, place);

    aclrtStream stream = nullptr;
    auto dev_ctx = platform::DeviceContextPool::Instance().Get(place);
    if (ctx.Attr<bool>("use_calc_stream")) {
      stream = static_cast<platform::NPUDeviceContext*>(dev_ctx)->stream();
    } else {
      stream = comm->stream();
    }

    int nranks = comm->nranks();
    int rank = comm->rank();

    PADDLE_ENFORCE_EQ(nranks,
                      2,
                      platform::errors::InvalidArgument(
                          "The nranks must be 2, but (%d)", nranks));

    int root = rank;

    VLOG(3) << "begin hccl send, parameter is: "
            << "root " << root << ", comm: " << comm->comm()
            << ", stream: " << stream;

    PADDLE_ENFORCE_NPU_SUCCESS(platform::dynload::HcclBroadcast(
        ptr, numel, dtype, (uint32_t)root, comm->comm(), stream));

#else
    PADDLE_THROW(platform::errors::PreconditionNotMet(
        "PaddlePaddle should compile with NPU."));
#endif
  }
};

}  // namespace operators
}  // namespace paddle

namespace ops = paddle::operators;
namespace plat = paddle::platform;

REGISTER_OP_NPU_KERNEL(partial_send,
                       ops::PartialSendOpASCENDKernel<int>,
                       ops::PartialSendOpASCENDKernel<int8_t>,
                       ops::PartialSendOpASCENDKernel<float>,
                       ops::PartialSendOpASCENDKernel<plat::float16>);


text:
layout: post
status: publish
published: true
title: Elder Scrolls MMORPG Confirmed
author: Jeff
author_login: admin
author_email: jeff@allthingsdork.com
author_url: http://www.allthingsdork.com
wordpress_id: 177
wordpress_url: http://www.allthingsdork.com/?p=177
date: '2007-11-12 20:57:17 -0600'
date_gmt: '2007-11-13 00:57:17 -0600'
categories:
- Random
tags: []
comments: []
---

There's been a lot of buzz over the last few years surrounding what an Elder Scrolls MMORPG would be like. Well soon we'll wonder no longer. Bethesda has confirmed that an Elder Scrolls MMORPG is in fact in the works and ais already being touted around the blogosphere as a possible World of Warcraft killer. Not sure I'm ready to commit to that just yet, but I must say this could be a pretty hot game.

Link to Destructoid Article


text:
<?php
namespace misc;

// Left here for backward compatibilidty. Moved to hierarchy add-on.
class Form_Field_drilldown extends \hierarchy\Form_Field_drilldown {}


text:
/
/*
*  Redistribution and use in source and binary forms, with or without
*  modification, are permitted provided that the following conditions
*  are met:
*
*    Redistributions of source code must retain the above copyright
*    notice, this list of conditions and the following disclaimer.
*
*    Redistributions in binary form must reproduce the above copyright
*    notice, this list of conditions and the following disclaimer in the
*    documentation and/or other materials provided with the
*    distribution.
*
*    Neither the name of Texas Instruments Incorporated nor the names of
*    its contributors may be used to endorse or promote products derived
*    from this software without specific prior written permission.
*
*  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
*  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
*  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
*  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
*  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
*  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
*  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
*  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
*  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
*  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
*  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/

#ifndef __USB_STRUCTS_H__
#define __USB_STRUCTS_H__

/*****************************************************************************
*
*  External USB buffer pointer used by the composite main routine.
*
******************************************************************************/

extern const tUSBBuffer g_sTxBuffer;
extern const tUSBBuffer g_sRxBuffer;

/*****************************************************************************
*
*  External CDC serial definitions used by the composite main routine.
*
*******************************************************************************/

extern const tUSBDCDCDevice g_sCDCDevice;

/****************************************************************************
*
* Globals used by both classes.
*
****************************************************************************/

#define COMMAND_STATUS_UPDATE   0x00000002

#define DESCRIPTOR_DATA_SIZE    (COMPOSITE_DCDC_SIZE + COMPOSITE_DHID_SIZE)
/*  Input clock to LCD module */
#define LCD_CLK                  150000000
#define PALETTE_SIZE             32
#define LCD_WIDTH                800
#define LCD_HEIGHT               480
#define PALETTE_OFFSET           4
#define PIXEL_24_BPP_PACKED     (0x0)
#define PIXEL_24_BPP_UNPACKED   (0x1)
#define FRAME_BUFFER_0  0
#define FRAME_BUFFER_1  1
#define START_ADDR_DDR           (0x80000000)
#define START_ADDR_DEV           (0x44000000)
#define START_ADDR_OCMC          (0x40300000)
#define NUM_SECTIONS_DDR         (512)
#define NUM_SECTIONS_DEV         (960)
#define NUM_SECTIONS_OCMC        (1)
/* Used to set the mode of PMIC asread pressure mode */
#define MODE_PRESSURE            2
/* Numer of pressure reads that going to perform.  This is required to
   avoid the debouncing effect
*/
#define DEBOUNCE_READ            50

/*****************************************************************************
*
* The height of the mouse button bar at the bottom of the display and the
* number of buttons it contains.
*
*****************************************************************************/
#define BUTTON_HEIGHT              50
#define NUM_MOUSE_BUTTONS          3

/****************************************************************************
*
* The size of the transmit and receive buffers used for the redirected UART.
* This number should be a power of 2 for best performance.  256 is chosen
* pretty much at random though the buffer should be at least twice the size
* of a maximum-sized USB packet.
*
****************************************************************************/
#define UART_BUFFER_SIZE         256

#define TEXT_FONT               &g_sFontCmss22b
#define TEXT_HEIGHT             (GrFontHeightGet(TEXT_FONT))
#define BUFFER_METER_HEIGHT     TEXT_HEIGHT
#define BUFFER_METER_WIDTH      150

#define    MAX_ROW_NUM          24
#define    CDC_STR_X_POSITION   8
#define    CDC_STR_Y_POSITION   80
#define    CDC_STR_Y_DIFF       25
#define    CDC_BUF_METER_Y_DIFF 75

#define    BUFFER_METER_X_POS   150
#define    BUFFER_METER_Y_POS   105

/****************************************************************************
*
* CDC amd mouse device callback function prototypes.
*
****************************************************************************/
extern unsigned int RxHandler(void *pvCBData, unsigned int ulEvent,
                        unsigned int ulMsgValue, void *pvMsgData);
extern unsigned int TxHandler(void *pvCBData, unsigned int ulEvent,
                        unsigned int ulMsgValue, void *pvMsgData);
extern unsigned int EventHandler(void *pvCBData, unsigned int ulEvent,
                             unsigned int ulMsgValue, void *pvMsgData);
extern unsigned int MouseHandler(void *pvCBData, unsigned int ulEvent,
                                  unsigned int ulMsgData, void *pvMsgData);
extern unsigned int SerialHandler(void *pvCBData, unsigned int ulEvent,
                                   unsigned int ulMsgValue, void *pvMsgData);
extern unsigned int ControlHandler(void *pvCBData, unsigned int ulEvent,
               unsigned int ulMsgValue, void *pvMsgData);
extern void USBUARTIntHandler(void);
extern void DrawBufferMeter(tContext *psContext, int lX, int lY);
extern void DisplayStatus(tContext *psContext, char *pcStatus);
extern void PeripheralsSetup(void);
extern void UpdateDisplay(unsigned char ucButtons, tBoolean bRedraw);
extern void MouseMain(void);

extern void SerialInit(void);
extern void SerialMain(void);

#endif


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

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

import org.flowable.common.engine.impl.persistence.entity.EntityManager;
import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.engine.impl.HistoricProcessInstanceQueryImpl;

/**
 * @author Joram Barrez
 */
public interface HistoricProcessInstanceEntityManager extends EntityManager<HistoricProcessInstanceEntity> {

    @Override
    HistoricProcessInstanceEntity create();

    HistoricProcessInstanceEntity create(ExecutionEntity processInstanceExecutionEntity);

    long findHistoricProcessInstanceCountByQueryCriteria(HistoricProcessInstanceQueryImpl historicProcessInstanceQuery);

    List<HistoricProcessInstance> findHistoricProcessInstancesByQueryCriteria(HistoricProcessInstanceQueryImpl historicProcessInstanceQuery);

    List<HistoricProcessInstance> findHistoricProcessInstancesAndVariablesByQueryCriteria(HistoricProcessInstanceQueryImpl historicProcessInstanceQuery);

    List<HistoricProcessInstance> findHistoricProcessInstancesByNativeQuery(Map<String, Object> parameterMap);

    List<HistoricProcessInstance> findHistoricProcessInstancesBySuperProcessInstanceId(String historicProcessInstanceId);

    List<String> findHistoricProcessInstanceIdsBySuperProcessInstanceIds(Collection<String> superProcessInstanceIds);

    List<String> findHistoricProcessInstanceIdsByProcessDefinitionId(String processDefinitionId);

    long findHistoricProcessInstanceCountByNativeQuery(Map<String, Object> parameterMap);

    void deleteHistoricProcessInstances(HistoricProcessInstanceQueryImpl historicProcessInstanceQuery);

    void bulkDeleteHistoricProcessInstances(Collection<String> processInstanceIds);
}


text:
package mcjty.rftools;

import mcjty.rftools.blocks.dimletconstruction.DimletConstructionSetup;
import mcjty.rftools.blocks.dimlets.DimletSetup;
import mcjty.rftools.blocks.endergen.EndergenicSetup;
import mcjty.rftools.blocks.screens.ScreenSetup;
import mcjty.rftools.blocks.teleporter.TeleporterSetup;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraftforge.common.AchievementPage;

import java.util.ArrayList;
import java.util.List;

public class Achievements {
    public static AchievementPage page;

    public static Achievement theFirstStep;
    public static Achievement researching;
    public static Achievement scrambled;
    public static Achievement smallBits;
    public static Achievement dimletMaster;
    public static Achievement firstDimension;
    public static Achievement firstTeleport;
    public static Achievement hardPower;
    public static Achievement clearVision;
    public static Achievement specialOres;

    public static void init() {
        List<Achievement> achievements = new ArrayList<Achievement>();

        theFirstStep = new Achievement("achievement.theFirstStep", "theFirstStep", 0, 0, new ItemStack(DimletSetup.unknownDimlet), null).registerStat();
        achievements.add(theFirstStep);

        researching = new Achievement("achievement.researching", "researching", 2, 2, new ItemStack(DimletSetup.dimletResearcherBlock), theFirstStep).registerStat();
        achievements.add(researching);

        smallBits = new Achievement("achievement.smallBits", "smallBits", 3, 3, new ItemStack(DimletConstructionSetup.dimletBaseItem), researching).registerStat();
        achievements.add(smallBits);

        dimletMaster = new Achievement("achievement.dimletMaster", "dimletMaster", 4, 3, new ItemStack(DimletConstructionSetup.dimletWorkbenchBlock), smallBits).registerStat();
        achievements.add(dimletMaster);

        scrambled = new Achievement("achievement.scrambled", "scrambled", 3, 1, new ItemStack(DimletSetup.dimensionEnscriberBlock), researching).registerStat();
        achievements.add(scrambled);

        firstDimension = new Achievement("achievement.firstDimension", "firstDimension", 0, 4, new ItemStack(DimletSetup.realizedDimensionTab), researching).registerStat();
        achievements.add(firstDimension);

        firstTeleport = new Achievement("achievement.firstTeleport", "firstTeleport", 0, -2, new ItemStack(TeleporterSetup.matterTransmitterBlock), null).registerStat();
        achievements.add(firstTeleport);

        hardPower = new Achievement("achievement.hardPower", "hardPower", 2, -2, new ItemStack(EndergenicSetup.endergenicBlock), null).registerStat();
        achievements.add(hardPower);

        clearVision = new Achievement("achievement.clearVision", "clearVision", 4, -2, new ItemStack(ScreenSetup.screenBlock), null).registerStat();
        achievements.add(clearVision);

        specialOres = new Achievement("achievement.specialOres", "specialOres", -2, 4, new ItemStack(DimletSetup.dimensionalShard), firstDimension).registerStat();
        achievements.add(specialOres);

        page = new AchievementPage("RfTools", achievements.toArray(new Achievement[achievements.size()]));
        AchievementPage.registerAchievementPage(page);
    }

    public static void trigger(EntityPlayer player, Achievement achievement) {
        if (achievement.parentAchievement != null) {
            trigger(player, achievement.parentAchievement);
        }
        player.triggerAchievement(achievement);
    }
}