code
stringlengths
4
1.01M
language
stringclasses
2 values
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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. */ #pragma once #include <aws/dms/DatabaseMigrationService_EXPORTS.h> #include <aws/dms/DatabaseMigrationServiceRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/dms/model/Tag.h> namespace Aws { namespace DatabaseMigrationService { namespace Model { /** * <p/> */ class AWS_DATABASEMIGRATIONSERVICE_API CreateReplicationSubnetGroupRequest : public DatabaseMigrationServiceRequest { public: CreateReplicationSubnetGroupRequest(); Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline const Aws::String& GetReplicationSubnetGroupIdentifier() const{ return m_replicationSubnetGroupIdentifier; } /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline void SetReplicationSubnetGroupIdentifier(const Aws::String& value) { m_replicationSubnetGroupIdentifierHasBeenSet = true; m_replicationSubnetGroupIdentifier = value; } /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline void SetReplicationSubnetGroupIdentifier(Aws::String&& value) { m_replicationSubnetGroupIdentifierHasBeenSet = true; m_replicationSubnetGroupIdentifier = value; } /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline void SetReplicationSubnetGroupIdentifier(const char* value) { m_replicationSubnetGroupIdentifierHasBeenSet = true; m_replicationSubnetGroupIdentifier.assign(value); } /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline CreateReplicationSubnetGroupRequest& WithReplicationSubnetGroupIdentifier(const Aws::String& value) { SetReplicationSubnetGroupIdentifier(value); return *this;} /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline CreateReplicationSubnetGroupRequest& WithReplicationSubnetGroupIdentifier(Aws::String&& value) { SetReplicationSubnetGroupIdentifier(value); return *this;} /** * <p>The name for the replication subnet group. This value is stored as a * lowercase string.</p> <p>Constraints: Must contain no more than 255 alphanumeric * characters, periods, spaces, underscores, or hyphens. Must not be "default".</p> * <p>Example: <code>mySubnetgroup</code> </p> */ inline CreateReplicationSubnetGroupRequest& WithReplicationSubnetGroupIdentifier(const char* value) { SetReplicationSubnetGroupIdentifier(value); return *this;} /** * <p>The description for the subnet group.</p> */ inline const Aws::String& GetReplicationSubnetGroupDescription() const{ return m_replicationSubnetGroupDescription; } /** * <p>The description for the subnet group.</p> */ inline void SetReplicationSubnetGroupDescription(const Aws::String& value) { m_replicationSubnetGroupDescriptionHasBeenSet = true; m_replicationSubnetGroupDescription = value; } /** * <p>The description for the subnet group.</p> */ inline void SetReplicationSubnetGroupDescription(Aws::String&& value) { m_replicationSubnetGroupDescriptionHasBeenSet = true; m_replicationSubnetGroupDescription = value; } /** * <p>The description for the subnet group.</p> */ inline void SetReplicationSubnetGroupDescription(const char* value) { m_replicationSubnetGroupDescriptionHasBeenSet = true; m_replicationSubnetGroupDescription.assign(value); } /** * <p>The description for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithReplicationSubnetGroupDescription(const Aws::String& value) { SetReplicationSubnetGroupDescription(value); return *this;} /** * <p>The description for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithReplicationSubnetGroupDescription(Aws::String&& value) { SetReplicationSubnetGroupDescription(value); return *this;} /** * <p>The description for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithReplicationSubnetGroupDescription(const char* value) { SetReplicationSubnetGroupDescription(value); return *this;} /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline const Aws::Vector<Aws::String>& GetSubnetIds() const{ return m_subnetIds; } /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline void SetSubnetIds(const Aws::Vector<Aws::String>& value) { m_subnetIdsHasBeenSet = true; m_subnetIds = value; } /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline void SetSubnetIds(Aws::Vector<Aws::String>&& value) { m_subnetIdsHasBeenSet = true; m_subnetIds = value; } /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithSubnetIds(const Aws::Vector<Aws::String>& value) { SetSubnetIds(value); return *this;} /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithSubnetIds(Aws::Vector<Aws::String>&& value) { SetSubnetIds(value); return *this;} /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& AddSubnetIds(const Aws::String& value) { m_subnetIdsHasBeenSet = true; m_subnetIds.push_back(value); return *this; } /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& AddSubnetIds(Aws::String&& value) { m_subnetIdsHasBeenSet = true; m_subnetIds.push_back(value); return *this; } /** * <p>The EC2 subnet IDs for the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& AddSubnetIds(const char* value) { m_subnetIdsHasBeenSet = true; m_subnetIds.push_back(value); return *this; } /** * <p>The tag to be assigned to the subnet group.</p> */ inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; } /** * <p>The tag to be assigned to the subnet group.</p> */ inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; } /** * <p>The tag to be assigned to the subnet group.</p> */ inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = value; } /** * <p>The tag to be assigned to the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;} /** * <p>The tag to be assigned to the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(value); return *this;} /** * <p>The tag to be assigned to the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** * <p>The tag to be assigned to the subnet group.</p> */ inline CreateReplicationSubnetGroupRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } private: Aws::String m_replicationSubnetGroupIdentifier; bool m_replicationSubnetGroupIdentifierHasBeenSet; Aws::String m_replicationSubnetGroupDescription; bool m_replicationSubnetGroupDescriptionHasBeenSet; Aws::Vector<Aws::String> m_subnetIds; bool m_subnetIdsHasBeenSet; Aws::Vector<Tag> m_tags; bool m_tagsHasBeenSet; }; } // namespace Model } // namespace DatabaseMigrationService } // namespace Aws
Java
<template name="ListStudent"> {{#IfLoggedIn}} <div class="row" style="background-image: url('/images/textbookheader.png'); background-size: cover;"> <div class="col-md-10"> <div class="bumper"> <table class="table table-hover" style="background-color: white; border-top: 5px solid #00AFDD;"> <thead> <tr> <th>First</th> <th>Last</th> <th>Email</th> <th></th> </tr> </thead> <tbody> {{#each studentList}} <tr> <td>{{first}}</td> <td>{{last}}</td> <td>{{email}}</td> <td><a class="deletestudent button1" style="font-size: 10px" href="#">BAN</a></td> </tr> {{/each}} </tbody> </table> </div> </div> <div class="col-md-2" style="background-color: rgba(250,250,250,0.7);"> <div class="bumper"> <div class="matchbox"> <h1 style="text-align: center; padding-bottom: 10px;">BANNED STUDENTS</h1> </div> <table class="table table-hover" style="background-color: white; border-top: 5px solid #00AFDD;"> <thead> <tr> <th>Email</th> <th></th> </tr> </thead> <tbody> {{#each banList}} <tr> <td>{{email}}</td> <td><a class="unban button1" style="font-size: 10px" href="#">UNBAN</a></td> </tr> {{/each}} </tbody> </table> </div> </div> </div> {{/IfLoggedIn}} </template>
Java
<?php // autoload_namespaces.php @generated by Composer $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( 'Twig_' => array($vendorDir . '/twig/twig/lib'), 'Symfony\\Component\\Icu\\' => array($vendorDir . '/symfony/icu'), 'Symfony\\Bundle\\SwiftmailerBundle' => array($vendorDir . '/symfony/swiftmailer-bundle'), 'Symfony\\Bundle\\MonologBundle' => array($vendorDir . '/symfony/monolog-bundle'), 'Symfony\\Bundle\\AsseticBundle' => array($vendorDir . '/symfony/assetic-bundle'), 'Symfony\\' => array($vendorDir . '/symfony/symfony/src'), 'Sensio\\Bundle\\GeneratorBundle' => array($vendorDir . '/sensio/generator-bundle'), 'Sensio\\Bundle\\FrameworkExtraBundle' => array($vendorDir . '/sensio/framework-extra-bundle'), 'Sensio\\Bundle\\DistributionBundle' => array($vendorDir . '/sensio/distribution-bundle'), 'Psr\\Log\\' => array($vendorDir . '/psr/log'), 'PHPExcel' => array($vendorDir . '/phpoffice/phpexcel/Classes'), 'Gregwar\\CaptchaBundle' => array($vendorDir . '/gregwar/captcha-bundle'), 'Gregwar\\Captcha' => array($vendorDir . '/gregwar/captcha'), 'Doctrine\\ORM\\' => array($vendorDir . '/doctrine/orm/lib'), 'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/lib'), 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'), 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'), 'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/lib'), 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib'), 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib'), 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/common/lib'), 'Doctrine\\Bundle\\DoctrineBundle' => array($vendorDir . '/doctrine/doctrine-bundle'), 'Assetic' => array($vendorDir . '/kriswallsmith/assetic/src'), array($baseDir . '/src') );
Java
/* * Copyright 2019 Stephane Nicolas * Copyright 2019 Daniel Molinero Reguera * * 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 toothpick.getInstance; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.CoreMatchers.sameInstance; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; import org.junit.After; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import toothpick.Scope; import toothpick.ScopeImpl; import toothpick.Toothpick; import toothpick.config.Module; import toothpick.configuration.Configuration; import toothpick.configuration.CyclicDependencyException; import toothpick.data.CyclicFoo; import toothpick.data.CyclicNamedFoo; import toothpick.data.IFoo; import toothpick.locators.NoFactoryFoundException; /* * Creates a instance in the simplest possible way * without any module. */ public class CycleCheckTest { @BeforeClass public static void setUp() { Toothpick.setConfiguration(Configuration.forDevelopment()); } @AfterClass public static void staticTearDown() { Toothpick.setConfiguration(Configuration.forProduction()); } @After public void tearDown() { Toothpick.reset(); } @Test(expected = CyclicDependencyException.class) public void testSimpleCycleDetection() { // GIVEN Scope scope = new ScopeImpl(""); // WHEN scope.getInstance(CyclicFoo.class); // THEN fail("Should throw an exception as a cycle is detected"); } @Test public void testCycleDetection_whenSameClass_and_differentName_shouldNotCrash() { // GIVEN final CyclicNamedFoo instance1 = new CyclicNamedFoo(); Scope scope = new ScopeImpl(""); scope.installModules( new Module() { { bind(CyclicNamedFoo.class).withName("foo").toInstance(instance1); } }); // WHEN CyclicNamedFoo instance2 = scope.getInstance(CyclicNamedFoo.class); // THEN // Should not crashed assertThat(instance2, notNullValue()); assertThat(instance2.cyclicFoo, sameInstance(instance1)); } @Test(expected = NoFactoryFoundException.class) public void testCycleDetection_whenGetInstanceFails_shouldCloseCycle() { // GIVEN Scope scope = new ScopeImpl(""); // WHEN try { scope.getInstance(IFoo.class); } catch (NoFactoryFoundException nfe) { nfe.printStackTrace(); } scope.getInstance(IFoo.class); // THEN fail( "Should throw NoFactoryFoundException as IFoo does not have any implementation bound." + "But It should not throw CyclicDependencyException as it was removed from the stack."); } }
Java
<?php function geoip($dbipcsv, $ip){ $csvData = file_get_contents("/lib/".$dbipcsv); $lines = explode(PHP_EOL, $csvData); $rangeArray = array(); foreach ($lines as $line) { $rangeArray[] = str_getcsv($line); } $input = $ip; $array_input = explode(".", $input); foreach($rangeArray as $current) { $array_start = explode(".", $current['0']); $array_stop = explode(".", $current['1']); if((int)$array_input[0] >= (int)$array_start[0]){ if((int)$array_input[0] <= (int)$array_stop[0]){ if((int)$array_input[1] >= (int)$array_start[1]){ if((int)$array_input[1] <= (int)$array_stop[1]){ if((int)$array_input[2] >= (int)$array_start[2]){ if((int)$array_input[2] <= (int)$array_stop[2]){ if((int)$array_input[3] >= (int)$array_start[3]){ if((int)$array_input[3] <= (int)$array_stop[3]){ $data = $current[2]; } } } } } } } } } return $data; } ?>
Java
# Contributing to SlicerITKUltrasound Contributions are welcome and encouraged. To contribute, create a pull request on the [project's GitHub repository](https://github.com/KitwareMedical/SlicerITKUltrasound). Respectful and collaborative discourse is appreciated and expected. Please patiently address all automated builds and review comments. For more information how to use the Git version control system, see the excellent [ProGit book](https://git-scm.com/book/en/v2/Getting-Started-Git-Basics). This repository uses common GitHub practices, sometimes referred to as the [GitHub flow](https://help.github.com/articles/github-flow/).
Java
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>ttt</title> <link rel="stylesheet" href="style.css"> </head> <body> <div> <form method="post" action="/shop/register"> </form> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script type="text/javascript" src="assets/js/jquery.jcarousellite.js"></script> <script type="text/javascript" src="assets/js/jquery.cookie.min.js"></script> <script type="text/javascript" src="assets/js/jquery.validate.js"></script> <script type="text/javascript" src="assets/js/jquery.form.js"></script> <script type="text/javascript" src="assets/js/script.js"></script> <script type="text/javascript" src="assets/js/reg.js"></script> </body> </html>
Java
#!/usr/bin/env python """ This pretty much just tests creating a user, a universe, a planet, a building type name, a building type, and a building. """ import os import sys import sqlalchemy sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import legendary_waffle # Database setup db_engine = sqlalchemy.create_engine("sqlite://") legendary_waffle.models.MODELBASE.metadata.create_all(db_engine) legendary_waffle.models.MODELBASE.metadata.bind = db_engine db_session = sqlalchemy.orm.sessionmaker(bind=db_engine) db = db_session() # Create the user legendary_waffle.model_create(db, legendary_waffle.models.User, name='sk4ly') print "Users: {}".format(legendary_waffle.model_read(db, legendary_waffle.models.User)) # Create the universe universe_config = { "name": 'poopiverse', "map_size": 1000, "max_planets": 1000, "max_players": 10 } legendary_waffle.model_create(db, legendary_waffle.models.Universe, **universe_config) print "Universe: {}".format(legendary_waffle.model_read(db, legendary_waffle.models.Universe)) # Create the planet planet_config = { "universe": 1, # The pkid of the universe 'poopiverse' "coordinate_x": 1, "coordinate_y": 1, "name": 'bloth', "habitable": True, "player_control": 1, # The pkid of user 'sk4ly' "default_condition": 1000, "default_resources": 1000, "current_condition": 1000, "current_resources": 1000 } legendary_waffle.model_create(db, legendary_waffle.models.Planet, **planet_config) print "Planet: {}".format(legendary_waffle.model_read(db, legendary_waffle.models.Planet)) # Create building type name legendary_waffle.model_create(db, legendary_waffle.models.BuildingTypeName, name="Control Center") print "Building Type Name: {}".format(legendary_waffle.model_read(db, legendary_waffle.models.BuildingTypeName)) # Create building type building_type_config = { "typename": 1, # The pkid of the building type name 'Control Center' "description": "This is the control center", "default_condition": 100, "default_firepower": 0, "default_storage": 100, "rhr_passive": 0, "rhr_active": 0, "rhr_destructive": 0, "build_resource_reqs": 500, } legendary_waffle.model_create(db, legendary_waffle.models.BuildingType, **building_type_config) print "Building Type: {}".format(legendary_waffle.model_read(db, legendary_waffle.models.BuildingType)) # Now create our new building building_config = { "building_type": 1, # The pkid of the building type with the name 'Control Center' "universe": 1, # The pkid of the universe 'poopiverse' "planet": 1, # The pkid of the planet 'bloth' "player_control": 1, # The pkid of the user 'sk4ly' } legendary_waffle.model_create(db, legendary_waffle.models.Building, **building_config) print "Building: {}".format(legendary_waffle.model_read(db, legendary_waffle.models.Building))
Java
package io.taric.domains import concurrent.Future import io.taric.services.FlatFileRecord /** * File created: 2013-01-13 18:46 * * Copyright Solvies AB 2013 * For licensing information see LICENSE file */ object LocatingTaricFiles { private[this] def fNum( f: String ): Int = f.take( 4 ).toInt def latestFileVersion( fileNameList: List[String] ): Int = { def highestNum = ( i: Int, f: String ) ⇒ if ( i > fNum( f ) ) i else fNum( f ) fileNameList.foldLeft( 0 )( highestNum ) } def filterFileType( pattern: String, fileName: String ): Boolean = pattern.r.findFirstMatchIn( fileName ).isDefined def filesIncluding( ver: Int, fileNameList: List[String] ): List[String] = fileNameList.filter( fNum( _ ) == ver ) def filesLaterThan( ver: Int, fileNameList: List[String] ): List[String] = fileNameList.filter( fNum( _ ) > ver ) def encapsulateWithRecords( records: Stream[String] ): Stream[FlatFileRecord] = records.map( FlatFileRecord( _ ) ) } trait FetchRemoteResources { def fetchFileListing( url: String ): Future[List[String]] def fetchFilePlainTextLines( url: String, fileName: String ): Future[Stream[String]] }
Java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.intel.ssg.dcst.panthera.parse.sql.transformer.fb; import java.util.ArrayList; import java.util.List; import org.antlr.runtime.tree.CommonTree; import com.intel.ssg.dcst.panthera.parse.sql.PantheraExpParser; import com.intel.ssg.dcst.panthera.parse.sql.SqlXlateException; import com.intel.ssg.dcst.panthera.parse.sql.SqlXlateUtil; import com.intel.ssg.dcst.panthera.parse.sql.TranslateContext; import br.com.porcelli.parser.plsql.PantheraParser_PLSQLParser; /** * transform AND to JOIN(by rebuilding left select).<br> * AndFilterBlock. * */ public class AndFilterBlock extends LogicFilterBlock { /** * this must have two children. * * @throws SqlXlateException */ @Override public void process(FilterBlockContext fbContext, TranslateContext context) throws SqlXlateException { FilterBlock leftFB = this.getChildren().get(0); leftFB.process(fbContext, context); fbContext.getQueryStack().peek().setQueryForTransfer(leftFB.getTransformedNode()); fbContext.getQueryStack().peek().setRebuildQueryForTransfer(); FilterBlock rightFB = this.getChildren().get(1); CommonTree condition = rightFB.getASTNode(); TypeFilterBlock type = fbContext.getTypeStack().peek(); if (rightFB instanceof UnCorrelatedFilterBlock) { // simple condition if (type instanceof WhereFilterBlock) { rebuildWhereCondition(leftFB, condition); } if (type instanceof HavingFilterBlock) { rebuildHavingCondition(leftFB, condition); } this.setTransformedNode(leftFB.getTransformedNode()); } else { rightFB.process(fbContext, context); this.setTransformedNode(rightFB.getTransformedNode()); } } private void rebuildWhereCondition(FilterBlock leftFB, CommonTree condition) { CommonTree transformedSelect = leftFB.getTransformedNode(); rebuildWhereCond(transformedSelect, condition); } private void rebuildWhereCond(CommonTree transformedSelect, CommonTree condition) { if (transformedSelect.getType() == PantheraParser_PLSQLParser.SUBQUERY) { for (int i = 0; i < transformedSelect.getChildCount(); i++) { rebuildWhereCond((CommonTree) transformedSelect.getChild(i), condition); } } else if (transformedSelect.getType() == PantheraParser_PLSQLParser.SQL92_RESERVED_SELECT) { rebuildWhereCondition(transformedSelect, condition); } else if (transformedSelect.getType() == PantheraParser_PLSQLParser.SQL92_RESERVED_UNION) { // UNION node rebuildWhereCond((CommonTree) transformedSelect.getChild(0), condition); } } private void rebuildWhereCondition(CommonTree transformedSelect, CommonTree condition) { CommonTree tableRefElement = (CommonTree) transformedSelect.getChild(0).getChild(0).getChild(0); CommonTree subQuery = (CommonTree) tableRefElement.getChild(tableRefElement.getChildCount() - 1).getChild(0) .getChild(0).getChild(0); List<List<CommonTree>> selects = new ArrayList<List<CommonTree>>(); for (int i = 0; i < subQuery.getChildCount(); i++) { List<CommonTree> selectLists = new ArrayList<CommonTree>(); FilterBlockUtil.findNode((CommonTree) subQuery.getChild(i), PantheraExpParser.SELECT_LIST, selectLists); assert(selectLists != null); List<CommonTree> oneSelects = new ArrayList<CommonTree>(); for (CommonTree sl:selectLists) { oneSelects.add((CommonTree) sl.getParent()); } selects.add(oneSelects); } for (List<CommonTree> sels:selects) { CommonTree sel = sels.get(0); for (int j = 0; j < sels.size(); j++) { sel = sels.get(j); if(sel.getCharPositionInLine() == condition.getAncestor(PantheraParser_PLSQLParser.SQL92_RESERVED_SELECT).getCharPositionInLine()) { break; } } CommonTree where = (CommonTree) sel .getFirstChildWithType(PantheraExpParser.SQL92_RESERVED_WHERE); if (where == null) { where = FilterBlockUtil.createSqlASTNode(condition, PantheraExpParser.SQL92_RESERVED_WHERE, "where"); CommonTree group = (CommonTree) sel .getFirstChildWithType(PantheraExpParser.SQL92_RESERVED_GROUP); if (group != null) { int groupIndex = group.getChildIndex(); SqlXlateUtil.addCommonTreeChild(sel, groupIndex, where); } else { sel.addChild(where); } CommonTree logicExpr = FilterBlockUtil.createSqlASTNode(condition, PantheraExpParser.LOGIC_EXPR, "LOGIC_EXPR"); where.addChild(logicExpr); logicExpr.addChild(condition); } else { CommonTree logicExpr = (CommonTree) where.getChild(0); FilterBlockUtil.addConditionToLogicExpr(logicExpr, condition); } } } private void rebuildHavingCondition(FilterBlock leftFB, CommonTree condition) { CommonTree transformedSelect = leftFB.getTransformedNode(); rebuildHavingCond(transformedSelect, condition); } private void rebuildHavingCond(CommonTree transformedSelect, CommonTree condition) { if (transformedSelect.getType() == PantheraParser_PLSQLParser.SUBQUERY) { for (int i = 0; i < transformedSelect.getChildCount(); i++) { rebuildHavingCond((CommonTree) transformedSelect.getChild(i), condition); } } else if (transformedSelect.getType() == PantheraParser_PLSQLParser.SQL92_RESERVED_SELECT) { rebuildHavingCondition(transformedSelect, condition); } else if (transformedSelect.getType() == PantheraParser_PLSQLParser.SQL92_RESERVED_UNION) { // UNION node rebuildHavingCond((CommonTree) transformedSelect.getChild(0), condition); } } private void rebuildHavingCondition(CommonTree transformedSelect, CommonTree condition) { CommonTree tableRefElement = (CommonTree) transformedSelect.getChild(0).getChild(0).getChild(0); CommonTree subQuery = (CommonTree) tableRefElement.getChild(tableRefElement.getChildCount() - 1).getChild(0) .getChild(0).getChild(0); List<List<CommonTree>> groups = new ArrayList<List<CommonTree>>(); for(int i = 0; i < subQuery.getChildCount(); i++){ List<CommonTree> oneGroups = new ArrayList<CommonTree>(); FilterBlockUtil.findNode((CommonTree) subQuery.getChild(i), PantheraExpParser.SQL92_RESERVED_GROUP, oneGroups); assert(oneGroups != null); groups.add(oneGroups); } for(List<CommonTree> grps:groups) { CommonTree group = grps.get(0); for (int j = 0; j < grps.size(); j++) { group = grps.get(j); if(group.getCharPositionInLine() == condition.getAncestor(PantheraParser_PLSQLParser.SQL92_RESERVED_GROUP).getCharPositionInLine()) { break; } } CommonTree having = (CommonTree) group .getFirstChildWithType(PantheraExpParser.SQL92_RESERVED_HAVING); if (having == null) { having = FilterBlockUtil.createSqlASTNode(condition, PantheraExpParser.SQL92_RESERVED_HAVING, "having"); group.addChild(having); CommonTree logicExpr = FilterBlockUtil.createSqlASTNode(condition, PantheraExpParser.LOGIC_EXPR, "LOGIC_EXPR"); having.addChild(logicExpr); logicExpr.addChild(condition); } else { CommonTree logicExpr = (CommonTree) having.getChild(0); FilterBlockUtil.addConditionToLogicExpr(logicExpr, condition); } } } }
Java
<pr-stack-widget options="widget.options" params="widget.params" filters="filters"></pr-stack-widget>
Java
body { font-size: 1rem; font-weight: 300; background-color: #292B36; color: #d0d0d0; font-family: "Roboto", "sans-serif"; width: 100%; } header, main, footer { margin: 3rem; } pre { margin-top: 1.75rem; } pre, code { font-family: "Hack", "monospace"; font-size: .75rem; } a { color: #00aba5; text-decoration: none; } a:hover, a:active { color: #8485CE; } p { margin: 1rem 0; } h3 { font-weight: 300; }
Java
package io.swagger.client.api; import com.sun.jersey.api.client.GenericType; import io.swagger.client.ApiException; import io.swagger.client.ApiClient; import io.swagger.client.Configuration; import io.swagger.client.Pair; import io.swagger.client.model.CodeSnippet; import io.swagger.client.model.CodeSnippetList; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-11T02:09:38.462Z") public class DefaultApi { private ApiClient apiClient; public DefaultApi() { this(Configuration.getDefaultApiClient()); } public DefaultApi(ApiClient apiClient) { this.apiClient = apiClient; } public ApiClient getApiClient() { return apiClient; } public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } /** * Creates a code snippet. * Creates a code snippet in the specified language. * @param codeSnippetBody Code snippet object. * @throws ApiException if fails to make API call */ public void snipPost(CodeSnippet codeSnippetBody) throws ApiException { Object localVarPostBody = codeSnippetBody; // create path and map variables String localVarPath = "/snip".replaceAll("\\{format\\}","json"); // query params List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Retrieves the specified code snippet. * Retrieves the specified code snippet. * @param codeSnippetUuid Code snippet unique identifier. * @return CodeSnippet * @throws ApiException if fails to make API call */ public CodeSnippet snipCodeSnippetUuidGet(String codeSnippetUuid) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'codeSnippetUuid' is set if (codeSnippetUuid == null) { throw new ApiException(400, "Missing the required parameter 'codeSnippetUuid' when calling snipCodeSnippetUuidGet"); } // create path and map variables String localVarPath = "/snip/{code_snippet_uuid}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "code_snippet_uuid" + "\\}", apiClient.escapeString(codeSnippetUuid.toString())); // query params List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType<CodeSnippet> localVarReturnType = new GenericType<CodeSnippet>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Updates a code snippet. * Updates a code snippet changes. * @param codeSnippetUuid Code snippet unique identifier. * @param codeSnippetBody Code snippet object. * @throws ApiException if fails to make API call */ public void snipCodeSnippetUuidPut(String codeSnippetUuid, CodeSnippet codeSnippetBody) throws ApiException { Object localVarPostBody = codeSnippetBody; // verify the required parameter 'codeSnippetUuid' is set if (codeSnippetUuid == null) { throw new ApiException(400, "Missing the required parameter 'codeSnippetUuid' when calling snipCodeSnippetUuidPut"); } // create path and map variables String localVarPath = "/snip/{code_snippet_uuid}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "code_snippet_uuid" + "\\}", apiClient.escapeString(codeSnippetUuid.toString())); // query params List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Deletes the specified code snippet. * Deletes the specified code snippet. * @param codeSnippetUuid Code snippet unique identifier. * @throws ApiException if fails to make API call */ public void snipCodeSnippetUuidDelete(String codeSnippetUuid) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'codeSnippetUuid' is set if (codeSnippetUuid == null) { throw new ApiException(400, "Missing the required parameter 'codeSnippetUuid' when calling snipCodeSnippetUuidDelete"); } // create path and map variables String localVarPath = "/snip/{code_snippet_uuid}".replaceAll("\\{format\\}","json") .replaceAll("\\{" + "code_snippet_uuid" + "\\}", apiClient.escapeString(codeSnippetUuid.toString())); // query params List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** * Retrieves all code snippets. * * @return CodeSnippetList * @throws ApiException if fails to make API call */ public CodeSnippetList snipsGet() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/snips".replaceAll("\\{format\\}","json"); // query params List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType<CodeSnippetList> localVarReturnType = new GenericType<CodeSnippetList>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } }
Java
# Epipactis leptochila subsp. naousaensis SUBSPECIES #### Status ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name Epipactis naousaensis Robatsch ### Remarks null
Java
# Hartighsea alliaria Arn. ex Wight & Arn. SPECIES #### Status ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
Java
// Copyright 2016-2022 The Libsacloud Authors // // 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 icon import ( "github.com/sacloud/libsacloud/v2/helper/service" "github.com/sacloud/libsacloud/v2/helper/validate" "github.com/sacloud/libsacloud/v2/sacloud" "github.com/sacloud/libsacloud/v2/sacloud/types" ) type UpdateRequest struct { ID types.ID `request:"-" validate:"required"` Name *string `request:",omitempty" validate:"omitempty,min=1"` Tags *types.Tags `request:",omitempty"` } func (req *UpdateRequest) Validate() error { return validate.Struct(req) } func (req *UpdateRequest) ToRequestParameter(current *sacloud.Icon) (*sacloud.IconUpdateRequest, error) { r := &sacloud.IconUpdateRequest{} if err := service.RequestConvertTo(current, r); err != nil { return nil, err } if err := service.RequestConvertTo(req, r); err != nil { return nil, err } return r, nil }
Java
/** * CommonFramework * * Copyright (C) 2017 Black Duck Software, Inc. * http://www.blackducksoftware.com/ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.blackducksoftware.tools.commonframework.standard.protex.report.template; // TODO: Auto-generated Javadoc /** * Pojo representing the second sheet of our test template . * * @author akamen */ public class TestPojoPageTwo extends TestPojo { /** The value1page2. */ public String value1page2; /** The value2page2. */ public String value2page2; /** * Gets the value2 page2. * * @return the value2 page2 */ public String getValue2Page2() { return value2page2; } /** * Sets the value2page2. * * @param value2page2 * the new value2page2 */ public void setValue2page2(String value2page2) { this.value2page2 = value2page2; } /** * Gets the value1 page2. * * @return the value1 page2 */ public String getValue1Page2() { return value1page2; } /** * Sets the value1page2. * * @param value1page2 * the new value1page2 */ public void setValue1page2(String value1page2) { this.value1page2 = value1page2; } }
Java
package org.test; import org.test.act.MainGame; import loon.LSetting; import loon.LSystem; import loon.LazyLoading; import loon.Screen; import loon.javase.Loon; public class JavaSEMain { public static void main(String[]args){ LSetting setting = new LSetting(); setting.isFPS = true; setting.isLogo = false; setting.logoPath = "loon_logo.png"; // 原始大小 setting.width = 800; setting.height = 480; setting.fps = 60; setting.fontName = "黑体"; setting.appName = "动作游戏"; LSystem.NOT_MOVE = true; Loon.register(setting, new LazyLoading.Data() { @Override public Screen onScreen() { //此Screen位于sample文件夹下,引入资源即可加载 return new MainGame(); } }); } }
Java
// Diamond-in-the-Rough // Code Wars program written in JavaScript for the RingoJS environment // // The MIT License (MIT) // // Copyright (c) 2015 Lee Jenkins // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. var stdin = require("system").stdin; var stdout = require("system").stdout; "use strict"; (function SpiralTriangles() { function run() { var inputData = readDiamondInfo(); while( inputData.size > 0 ) { printDiamonds( inputData ); inputData = readDiamondInfo(); } }; function printDiamonds( inputData ) { var midSize = inputData.size / 2; for( var gridRow=0; gridRow<inputData.rows; ++gridRow ) { for( var diamondRow=0; diamondRow<inputData.size; ++diamondRow ) { var line = ""; for( var gridCol=0; gridCol<inputData.cols; ++gridCol ) { for( var diamondCol=0; diamondCol<inputData.size; ++diamondCol ) { var c = "#"; if( diamondRow < midSize ) { // top half if( diamondCol >= (midSize-(diamondRow+1)) && diamondCol < midSize ) { c = "/"; } else if( diamondCol >= midSize && diamondCol <= (midSize+diamondRow) ) { c = "\\"; } } else { // bottom half if( diamondCol >= (diamondRow-midSize) && diamondCol < midSize ) { c = "\\"; } else if( diamondCol >= midSize && diamondCol < (inputData.size+midSize-diamondRow) ) { c = "/"; } } line += c; } } print( line ); } } }; function readDiamondInfo() { var tokens = stdin.readLine().split(/\s+/); return { size: parseInt( tokens[0] ), rows: parseInt( tokens[1] ), cols: parseInt( tokens[2] ) }; }; run(); }) ();
Java
package apple.uikit; import java.io.*; import java.nio.*; import java.util.*; import com.google.j2objc.annotations.*; import com.google.j2objc.runtime.*; import com.google.j2objc.runtime.block.*; import apple.audiotoolbox.*; import apple.corefoundation.*; import apple.coregraphics.*; import apple.coreservices.*; import apple.foundation.*; import apple.coreanimation.*; import apple.coredata.*; import apple.coreimage.*; import apple.coretext.*; import apple.corelocation.*; @Library("UIKit/UIKit.h") @Mapping("UIMenuControllerArrowDirection") public final class UIMenuControllerArrowDirection extends ObjCEnum { @GlobalConstant("UIMenuControllerArrowDefault") public static final long Default = 0L; @GlobalConstant("UIMenuControllerArrowUp") public static final long Up = 1L; @GlobalConstant("UIMenuControllerArrowDown") public static final long Down = 2L; @GlobalConstant("UIMenuControllerArrowLeft") public static final long Left = 3L; @GlobalConstant("UIMenuControllerArrowRight") public static final long Right = 4L; }
Java
/** * @private * @providesModule CustomTabsAndroid * @flow */ 'use strict'; import { NativeModules } from 'react-native'; import type { TabOption } from './TabOption'; const CustomTabsManager = NativeModules.CustomTabsManager; /** * To open the URL of the http or https in Chrome Custom Tabs. * If Chrome is not installed, opens the URL in other browser. */ export default class CustomTabsAndroid { /** * Opens the URL on a Custom Tab. * * @param url the Uri to be opened. * @param option the Option to customize Custom Tabs of look & feel. */ static openURL(url: string, option: TabOption = {}): Promise<boolean> { return CustomTabsManager.openURL(url, option) } }
Java
package com.swifts.frame.modules.wx.fastweixin.company.message.req; /** * 微信企业号异步任务类型 * ==================================================================== * * -------------------------------------------------------------------- * @author Nottyjay * @version 1.0.beta * @since 1.3.6 * ==================================================================== */ public final class QYBatchJobType { private String SYNCUSER = "sync_user";// 增量更新成员 private String REPLACEUSER = "replace_user";// 全量覆盖成员 private String INVITEUSER = "invite_user";// 邀请成员关注 private String REPLACEPARTY = "replace_party";// 全量覆盖部门 private QYBatchJobType() { } }
Java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.io.erasurecode.coder; import org.apache.hadoop.io.erasurecode.ECBlock; import org.apache.hadoop.io.erasurecode.ECBlockGroup; import org.apache.hadoop.io.erasurecode.ECChunk; import org.apache.hadoop.io.erasurecode.TestCoderBase; import java.lang.reflect.Constructor; /** * Erasure coder test base with utilities. */ public abstract class TestErasureCoderBase extends TestCoderBase { protected Class<? extends ErasureCoder> encoderClass; protected Class<? extends ErasureCoder> decoderClass; private ErasureCoder encoder; private ErasureCoder decoder; protected int numChunksInBlock = 16; /** * It's just a block for this test purpose. We don't use HDFS block here * at all for simple. */ protected static class TestBlock extends ECBlock { private ECChunk[] chunks; // For simple, just assume the block have the chunks already ready. // In practice we need to read/write chunks from/to the block via file IO. public TestBlock(ECChunk[] chunks) { this.chunks = chunks; } } /** * Generating source data, encoding, recovering and then verifying. * RawErasureCoder mainly uses ECChunk to pass input and output data buffers, * it supports two kinds of ByteBuffers, one is array backed, the other is * direct ByteBuffer. Have usingDirectBuffer to indicate which case to test. * @param usingDirectBuffer */ protected void testCoding(boolean usingDirectBuffer) { this.usingDirectBuffer = usingDirectBuffer; prepareCoders(); /** * The following runs will use 3 different chunkSize for inputs and outputs, * to verify the same encoder/decoder can process variable width of data. */ performTestCoding(baseChunkSize, true); performTestCoding(baseChunkSize - 17, false); performTestCoding(baseChunkSize + 16, true); } private void performTestCoding(int chunkSize, boolean usingSlicedBuffer) { setChunkSize(chunkSize); prepareBufferAllocator(usingSlicedBuffer); // Generate data and encode ECBlockGroup blockGroup = prepareBlockGroupForEncoding(); // Backup all the source chunks for later recovering because some coders // may affect the source data. TestBlock[] clonedDataBlocks = cloneBlocksWithData((TestBlock[]) blockGroup.getDataBlocks()); TestBlock[] parityBlocks = (TestBlock[]) blockGroup.getParityBlocks(); ErasureCodingStep codingStep; codingStep = encoder.calculateCoding(blockGroup); performCodingStep(codingStep); // Erase specified sources but return copies of them for later comparing TestBlock[] backupBlocks = backupAndEraseBlocks(clonedDataBlocks, parityBlocks); // Decode blockGroup = new ECBlockGroup(clonedDataBlocks, blockGroup.getParityBlocks()); codingStep = decoder.calculateCoding(blockGroup); performCodingStep(codingStep); // Compare compareAndVerify(backupBlocks, codingStep.getOutputBlocks()); } /** * This is typically how a coding step should be performed. * @param codingStep */ private void performCodingStep(ErasureCodingStep codingStep) { // Pretend that we're opening these input blocks and output blocks. ECBlock[] inputBlocks = codingStep.getInputBlocks(); ECBlock[] outputBlocks = codingStep.getOutputBlocks(); // We allocate input and output chunks accordingly. ECChunk[] inputChunks = new ECChunk[inputBlocks.length]; ECChunk[] outputChunks = new ECChunk[outputBlocks.length]; for (int i = 0; i < numChunksInBlock; ++i) { // Pretend that we're reading input chunks from input blocks. for (int j = 0; j < inputBlocks.length; ++j) { inputChunks[j] = ((TestBlock) inputBlocks[j]).chunks[i]; } // Pretend that we allocate and will write output results to the blocks. for (int j = 0; j < outputBlocks.length; ++j) { outputChunks[j] = allocateOutputChunk(); ((TestBlock) outputBlocks[j]).chunks[i] = outputChunks[j]; } // Given the input chunks and output chunk buffers, just call it ! codingStep.performCoding(inputChunks, outputChunks); } codingStep.finish(); } /** * Compare and verify if recovered blocks data are the same with the erased * blocks data. * @param erasedBlocks * @param recoveredBlocks */ protected void compareAndVerify(ECBlock[] erasedBlocks, ECBlock[] recoveredBlocks) { for (int i = 0; i < erasedBlocks.length; ++i) { compareAndVerify(((TestBlock) erasedBlocks[i]).chunks, ((TestBlock) recoveredBlocks[i]).chunks); } } private void prepareCoders() { if (encoder == null) { encoder = createEncoder(); } if (decoder == null) { decoder = createDecoder(); } } /** * Create the raw erasure encoder to test * @return */ protected ErasureCoder createEncoder() { ErasureCoder encoder; try { Constructor<? extends ErasureCoder> constructor = (Constructor<? extends ErasureCoder>) encoderClass.getConstructor(int.class, int.class); encoder = constructor.newInstance(numDataUnits, numParityUnits); } catch (Exception e) { throw new RuntimeException("Failed to create encoder", e); } encoder.setConf(getConf()); return encoder; } /** * create the raw erasure decoder to test * @return */ protected ErasureCoder createDecoder() { ErasureCoder decoder; try { Constructor<? extends ErasureCoder> constructor = (Constructor<? extends ErasureCoder>) decoderClass.getConstructor(int.class, int.class); decoder = constructor.newInstance(numDataUnits, numParityUnits); } catch (Exception e) { throw new RuntimeException("Failed to create decoder", e); } decoder.setConf(getConf()); return decoder; } /** * Prepare a block group for encoding. * @return */ protected ECBlockGroup prepareBlockGroupForEncoding() { ECBlock[] dataBlocks = new TestBlock[numDataUnits]; ECBlock[] parityBlocks = new TestBlock[numParityUnits]; for (int i = 0; i < numDataUnits; i++) { dataBlocks[i] = generateDataBlock(); } for (int i = 0; i < numParityUnits; i++) { parityBlocks[i] = allocateOutputBlock(); } return new ECBlockGroup(dataBlocks, parityBlocks); } /** * Generate random data and return a data block. * @return */ protected ECBlock generateDataBlock() { ECChunk[] chunks = new ECChunk[numChunksInBlock]; for (int i = 0; i < numChunksInBlock; ++i) { chunks[i] = generateDataChunk(); } return new TestBlock(chunks); } /** * Erase blocks to test the recovering of them. Before erasure clone them * first so could return themselves. * @param dataBlocks * @return clone of erased dataBlocks */ protected TestBlock[] backupAndEraseBlocks(TestBlock[] dataBlocks, TestBlock[] parityBlocks) { TestBlock[] toEraseBlocks = new TestBlock[erasedDataIndexes.length + erasedParityIndexes.length]; int idx = 0; TestBlock block; for (int i = 0; i < erasedParityIndexes.length; i++) { block = parityBlocks[erasedParityIndexes[i]]; toEraseBlocks[idx ++] = cloneBlockWithData(block); eraseDataFromBlock(block); } for (int i = 0; i < erasedDataIndexes.length; i++) { block = dataBlocks[erasedDataIndexes[i]]; toEraseBlocks[idx ++] = cloneBlockWithData(block); eraseDataFromBlock(block); } return toEraseBlocks; } /** * Allocate an output block. Note the chunk buffer will be allocated by the * up caller when performing the coding step. * @return */ protected TestBlock allocateOutputBlock() { ECChunk[] chunks = new ECChunk[numChunksInBlock]; return new TestBlock(chunks); } /** * Clone blocks with data copied along with, avoiding affecting the original * blocks. * @param blocks * @return */ protected TestBlock[] cloneBlocksWithData(TestBlock[] blocks) { TestBlock[] results = new TestBlock[blocks.length]; for (int i = 0; i < blocks.length; ++i) { results[i] = cloneBlockWithData(blocks[i]); } return results; } /** * Clone exactly a block, avoiding affecting the original block. * @param block * @return a new block */ protected TestBlock cloneBlockWithData(TestBlock block) { ECChunk[] newChunks = cloneChunksWithData(block.chunks); return new TestBlock(newChunks); } /** * Erase data from a block. */ protected void eraseDataFromBlock(TestBlock theBlock) { eraseDataFromChunks(theBlock.chunks); theBlock.setErased(true); } }
Java
/* * Copyright (c) 2010-2017 Evolveum * * 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 com.evolveum.midpoint.model.intest.rbac; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext.ClassMode; import org.springframework.test.context.ContextConfiguration; import java.io.File; /** * @author semancik * */ @ContextConfiguration(locations = {"classpath:ctx-model-intest-test-main.xml"}) @DirtiesContext(classMode = ClassMode.AFTER_CLASS) public class TestRbacDeprecated extends TestRbac { protected static final File ROLE_GOVERNOR_DEPRECATED_FILE = new File(TEST_DIR, "role-governor-deprecated.xml"); protected static final File ROLE_CANNIBAL_DEPRECATED_FILE = new File(TEST_DIR, "role-cannibal-deprecated.xml"); @Override protected File getRoleGovernorFile() { return ROLE_GOVERNOR_DEPRECATED_FILE; } @Override protected File getRoleCannibalFile() { return ROLE_CANNIBAL_DEPRECATED_FILE; } @Override protected boolean testMultiplicityConstraintsForNonDefaultRelations() { return false; } }
Java
package com.koch.ambeth.util; import org.junit.Assert; import org.junit.Test; import com.koch.ambeth.ioc.util.ImmutableTypeSet; public class ImmutableTypeSetTest { public interface MyType { // intended blank } public class MyClass implements MyType { // intended blank } @Test public void test() { ImmutableTypeSet immutableTypeSet = new ImmutableTypeSet(); Assert.assertFalse(immutableTypeSet.isImmutableType(MyClass.class)); immutableTypeSet.registerImmutableType(MyType.class); Assert.assertTrue(immutableTypeSet.isImmutableType(MyType.class)); Assert.assertTrue(immutableTypeSet.isImmutableType(MyClass.class)); } }
Java
/* * Copyright 2010-2020 Alfresco Software, Ltd. * * 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.activiti.bpmn.model; public class EventGateway extends Gateway { public EventGateway clone() { EventGateway clone = new EventGateway(); clone.setValues(this); return clone; } public void setValues(EventGateway otherElement) { super.setValues(otherElement); } }
Java
// Originally submitted to OSEHRA 2/21/2017 by DSS, Inc. // Authored by DSS, Inc. 2014-2017 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace VA.Gov.Artemis.Vista.Broker { internal enum RpcMessageStatus { Uknown, Ready, Error } }
Java
/* * Copyright 2017-present Facebook, Inc. * * 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 com.facebook.buck.skylark.io.impl; import com.facebook.buck.skylark.io.Globber; import com.facebook.buck.util.MoreCollectors; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.UnixGlob; import java.io.IOException; import java.util.Collection; import java.util.Set; /** * A simple implementation of globbing functionality that allows resolving file paths based on * include patterns (file patterns that should be returned) minus exclude patterns (file patterns * that should be excluded from the resulting set). * * <p>Since this is a simple implementation it does not support caching and other smarts. */ public class SimpleGlobber implements Globber { /** Path used as a root when resolving patterns. */ private final Path basePath; private SimpleGlobber(Path basePath) { this.basePath = basePath; } /** * @param include File patterns that should be included in the resulting set. * @param exclude File patterns that should be excluded from the resulting set. * @param excludeDirectories Whether directories should be excluded from the resulting set. * @return The set of paths resolved using include patterns minus paths excluded by exclude * patterns. */ @Override public Set<String> run( Collection<String> include, Collection<String> exclude, Boolean excludeDirectories) throws IOException { ImmutableSet<String> includePaths = resolvePathsMatchingGlobPatterns(include, basePath, excludeDirectories); ImmutableSet<String> excludePaths = resolvePathsMatchingGlobPatterns(exclude, basePath, excludeDirectories); return Sets.difference(includePaths, excludePaths); } /** * Resolves provided list of glob patterns into a set of paths. * * @param patterns The glob patterns to resolve. * @param basePath The base path used when resolving glob patterns. * @param excludeDirectories Flag indicating whether directories should be excluded from result. * @return The set of paths corresponding to requested patterns. */ private static ImmutableSet<String> resolvePathsMatchingGlobPatterns( Collection<String> patterns, Path basePath, Boolean excludeDirectories) throws IOException { UnixGlob.Builder includeGlobBuilder = UnixGlob.forPath(basePath).addPatterns(patterns); if (excludeDirectories != null) { includeGlobBuilder.setExcludeDirectories(excludeDirectories); } return includeGlobBuilder .glob() .stream() .map(includePath -> includePath.relativeTo(basePath).getPathString()) .collect(MoreCollectors.toImmutableSet()); } /** * Factory method for creating {@link SimpleGlobber} instances. * * @param basePath The base path relative to which paths matching glob patterns will be resolved. */ public static Globber create(Path basePath) { return new SimpleGlobber(basePath); } }
Java
package android_testsuite; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android_testsuite.mytest.application_search.AppSearchActivity; import android_testsuite.mytest.application_search.UidActivity; import android_testsuite.mytest.camera.CameraActivity; import android_testsuite.mytest.camera.CameraIntentTestActivity; import android_testsuite.mytest.custom_loading.CustomLoadingActivity; import android_testsuite.mytest.media.MediaPlayerTestActivity; import android_testsuite.mytest.network_test.HttpActivity; import android_testsuite.mytest.network_test.SocketActivity; import android_testsuite.mytest.rsa.RsaActivity; import android_testsuite.mytest.seekbar.SeekBarActivity; /** * @author Ren Hui * @since 1.0.1.058 */ public class GuideActivity extends Activity { private Button mBtSelHttp; private Button mBtSelSocket; private Button mBtSearchApp; private Button mBtRSa; private Button mBtUid; private Button mBtMedia; private Button mCameraBt; private Button mCustomLoadingBt; private Button mCameraNewBtn; private Button mSeekBarBtn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_guide); this.mBtSelHttp = (Button) findViewById(R.id.bt_selHttp); mBtSelHttp.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, HttpActivity.class); GuideActivity.this.startActivity(intent); } }); this.mBtSelSocket = (Button) findViewById(R.id.bt_selSocket); mBtSelSocket.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, SocketActivity.class); GuideActivity.this.startActivity(intent); } }); this.mBtSearchApp = (Button) findViewById(R.id.bt_searchApp); mBtSearchApp.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, AppSearchActivity.class); GuideActivity.this.startActivity(intent); } }); this.mBtRSa = (Button) findViewById(R.id.RSA); mBtRSa.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, RsaActivity.class); GuideActivity.this.startActivity(intent); } }); this.mBtUid = (Button) findViewById(R.id.uid); mBtUid.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, UidActivity.class); GuideActivity.this.startActivity(intent); } }); this.mBtMedia = (Button) findViewById(R.id.media); mBtMedia.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, MediaPlayerTestActivity.class); GuideActivity.this.startActivity(intent); } }); this.mCameraBt = (Button) findViewById(R.id.camera_intent); mCameraBt.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setClass(GuideActivity.this, CameraIntentTestActivity.class); GuideActivity.this.startActivity(intent); } }); this.mCustomLoadingBt = (Button) findViewById(R.id.custom_loading); mCustomLoadingBt.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(GuideActivity.this, CustomLoadingActivity.class)); } }); mCameraNewBtn = (Button) findViewById(R.id.camera); mCameraNewBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(GuideActivity.this, CameraActivity.class)); } }); mSeekBarBtn = (Button) findViewById(R.id.seek_bar); mSeekBarBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(GuideActivity.this, SeekBarActivity.class)); } }); } }
Java
using System; using Microsoft.SPOT; namespace WeatherStation.WebServer { /// <summary> /// Base class for HTTP object (request/response) /// </summary> public class HttpBase { #region Constants ... // const string separator protected const char CR = '\r'; protected const char LF = '\n'; // request line separator protected const char REQUEST_LINE_SEPARATOR = ' '; // starting of query string protected const char QUERY_STRING_SEPARATOR = '?'; // query string parameters separator protected const char QUERY_STRING_PARAMS_SEPARATOR = '&'; // query string value separator protected const char QUERY_STRING_VALUE_SEPARATOR = '='; // header-value separator protected const char HEADER_VALUE_SEPARATOR = ':'; // form parameters separator protected const char FORM_PARAMS_SEPARATOR = '&'; // form value separator protected const char FORM_VALUE_SEPARATOR = '='; #endregion #region Properties ... /// <summary> /// Headers of the HTTP request/response /// </summary> public NameValueCollection Headers { get; protected set; } /// <summary> /// Body of HTTP request/response /// </summary> public string Body { get; set; } #endregion /// <summary> /// Constructor /// </summary> public HttpBase() { this.Headers = new NameValueCollection(); } } }
Java
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package org.apache.cloudstack.api.command.user.loadbalancer; import javax.inject.Inject; import org.apache.log4j.Logger; import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.SslCertResponse; import org.apache.cloudstack.context.CallContext; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.NetworkRuleConflictException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; import org.apache.cloudstack.network.tls.CertService; @APICommand(name = "uploadSslCert", description = "Upload a certificate to CloudStack", responseObject = SslCertResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UploadSslCertCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(UploadSslCertCmd.class.getName()); private static final String s_name = "uploadsslcertresponse"; @Inject CertService _certService; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.CERTIFICATE, type = CommandType.STRING, required = true, description = "SSL certificate", length = 16384) private String cert; @Parameter(name = ApiConstants.PRIVATE_KEY, type = CommandType.STRING, required = true, description = "Private key", length = 16384) private String key; @Parameter(name = ApiConstants.CERTIFICATE_CHAIN, type = CommandType.STRING, description = "Certificate chain of trust", length = 2097152) private String chain; @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, description = "Password for the private key") private String password; @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "account that will own the SSL certificate") private String accountName; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the SSL certificate") private Long projectId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning the SSL certificate") private Long domainId; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// public String getCert() { return cert; } public String getKey() { return key; } public String getChain() { return chain; } public String getPassword() { return password; } public String getAccountName() { return accountName; } public Long getDomainId() { return domainId; } public Long getProjectId() { return projectId; } ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { try { SslCertResponse response = _certService.uploadSslCert(this); setResponseObject(response); response.setResponseName(getCommandName()); } catch (Exception e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } } @Override public String getCommandName() { return s_name; } @Override public long getEntityOwnerId() { return CallContext.current().getCallingAccount().getId(); } }
Java
package info.cyanac.plugin.bukkit; import java.util.ArrayList; import java.util.List; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.TabCompleter; public class CyanACTabCompleter implements TabCompleter { @Override public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { if(command.getName().equalsIgnoreCase("cyanac")){ List<String> tabCompletionList = new ArrayList(); tabCompletionList.add("help"); tabCompletionList.add("resync"); tabCompletionList.add("license"); return tabCompletionList; } return null; } }
Java
<?php /** * This file is part of the SevenShores/NetSuite library * AND originally from the NetSuite PHP Toolkit. * * New content: * @package ryanwinchester/netsuite-php * @copyright Copyright (c) Ryan Winchester * @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0 * @link https://github.com/ryanwinchester/netsuite-php * * Original content: * @copyright Copyright (c) NetSuite Inc. * @license https://raw.githubusercontent.com/ryanwinchester/netsuite-php/master/original/NetSuite%20Application%20Developer%20License%20Agreement.txt * @link http://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml * * generated: 2020-04-10 09:56:55 PM UTC */ namespace NetSuite\Classes; class FolderFolderType { static $paramtypesmap = array( ); const _appPackages = "_appPackages"; const _attachmentsReceived = "_attachmentsReceived"; const _attachmentsSent = "_attachmentsSent"; const _certificates = "_certificates"; const _documentsAndFiles = "_documentsAndFiles"; const _emailTemplates = "_emailTemplates"; const _faxTemplates = "_faxTemplates"; const _images = "_images"; const _letterTemplates = "_letterTemplates"; const _mailMerge = "_mailMerge"; const _marketingTemplates = "_marketingTemplates"; const _pdfTemplates = "_pdfTemplates"; const _suitebundles = "_suitebundles"; const _suitecommerceAdvancedSiteTemplates = "_suitecommerceAdvancedSiteTemplates"; const _suitescripts = "_suitescripts"; const _templates = "_templates"; const _webSiteHostingFiles = "_webSiteHostingFiles"; }
Java
<?php /** * Menu Module * * @author Bálint Horváth <balint@snett.net> */ namespace Franklin\Component; class Menu extends \Franklin\System\Object{ public $Id; public $Name; public $Status; public $CleanURL; public function __construct($Parent) { parent::__construct($Parent); $this->Status = new Status($this); } }
Java
package pe.com.ccpl.siconc.web.service; import pe.com.ccpl.siconc.web.model.Role; public interface RoleService { public Role getRole(int id); }
Java
BrowseEverythingController.before_filter do if params[:context] collection = Admin::Collection.find(params[:context]) browser.providers['file_system'].config[:home] = collection.dropbox_absolute_path end end
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Hello Wooorld</title> <!-- Bootstrap --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> <link href="styles.css" rel="stylesheet"> </head> <body> <div class="container"> <h1>Welcome.</h1> <div id="nameInput" class="input-group-lg center-block helloInput"> <p class="lead">What is your name?</p> <input id="user_name" type="text" class="form-control" placeholder="name" aria-describedby="sizing-addon1" value="" /> </div> <p id="response" class="lead text-center"></p> <p id="databaseNames" class="lead text-center"></p> </div> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script src="antixss.js" type="text/javascript"></script> <script> //Submit data when enter key is pressed $('#user_name').keydown(function(e) { var name = $('#user_name').val(); if (e.which == 13 && name.length > 0) { //catch Enter key //POST request to API to create a new visitor entry in the database $.ajax({ method: "POST", url: "./api/visitors", contentType: "application/json", data: JSON.stringify({name: name }) }) .done(function(data) { $('#response').html(AntiXSS.sanitizeInput(data)); $('#nameInput').hide(); getNames(); }); } }); //Retreive all the visitors from the database function getNames(){ $.get("./api/visitors") .done(function(data) { if(data.length > 0) { data.forEach(function(element, index) { data[index] = AntiXSS.sanitizeInput(element) }); $('#databaseNames').html("Database contents: " + JSON.stringify(data)); } }); } //Call getNames on page load. getNames(); </script> </body> </html>
Java
<html> <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <span class='rank5 5.23758013687111'>?NEW</span> <span class='rank5 5.092407184714711'>YORK</span> <span class='rank4 4.3452095742978045'>BOTANICAL</span> <span class='rank5 4.836230413135688'>GARDEN</span> </br> <span class='rank24 23.68441486703646'>CULTIVATED</span> <span class='rank4 3.9555862618421074'>PLANTS</span> <span class='rank6 6.171300748459634'>OF</span> <span class='rank10 9.986050120726519'>GRAN</span> <span class='rank0 0.0'>D</span> <span class='rank2 2.156557235213036'>C/EfMAN</span> <span class='rank12 12.081526498619874'>EWI</span> </br> <span class='rank11 10.714595530729639'>VoI^SUZlJ</span> </br> <span class='rank12 12.270670438212889'>ÇÕÔivd'ta</span> <span class='rank6 6.37332945951861'>sp.</span> <span class='rank6 5.703960236633383'>L.</span> </br> <span class='rank5 5.131137911966853'>Shrub;</span> <span class='rank8 7.54588394801948'>Leaves</span> <span class='rank0 0.3947714162252218'>green</span> <span class='rank-17 -16.585643118145434'>containing</span> <span class='rank3 3.162206211046385'>white</span> <span class='rank11 11.18572446377565'>margins;</span> <span class='rank10 10.249410291448903'>full</span> <span class='rank17 17.287585110585724'>sunlight;</span> <span class='rank3 3.360632617274767'>rocky</span> <span class='rank2 2.416899481030569'>soil;</span> <span class='rank9 9.328301169609748'>1,5</span> <span class='rank8 7.947303845497636'>meters;</span> <span class='rank-12 -11.551466452746979'>abandoned</span> <span class='rank-3 -2.7004070387897556'>honesite,</span> <span class='rank2 2.2670777674599414'>South</span> <span class='rank12 12.082006686030129'>£cund</span> <span class='rank16 15.899761973947854'>Rd.,</span> <span class='rank17 16.53645291085764'>outside</span> <span class='rank6 6.129628052059067'>of</span> <span class='rank-13 -13.008372207453675'>Georgetown.</span> </br> <span class='rank2 1.9684131869572745'>goll</span> <span class='rank8 7.536541700381693'>N.</span> <span class='rank-13 -13.184994579363924'>Chevalier_</span> <span class='rank0 0.0'>1S1</span> <span class='rank3 2.8711404739185156'>August</span> <span class='rank7 7.181168483165266'>24,</span> <span class='rank4 3.8650293934949715'>1971</span> <span class='rank3 3.017868087179137'>det</span> </br> <span class='rank-3 -2.810734468887766'>00198996</span> </br> </br></br> <strong>Legend - </strong> Level of confidence that token is an accurately-transcribed word</br> <span class='rank-13'>&nbsp;&nbsp;&nbsp;</span> extremely low <span class='rank-7'>&nbsp;&nbsp;&nbsp;</span> very low <span class='rank-1'>&nbsp;&nbsp;&nbsp;</span> low <span class='rank0'>&nbsp;&nbsp;&nbsp;</span> undetermined <span class='rank1'>&nbsp;&nbsp;&nbsp;</span> medium <span class='rank6'>&nbsp;&nbsp;&nbsp;</span> high <span class='rank16'>&nbsp;&nbsp;&nbsp;</span> very high</br> </body> </html>
Java
/* * Copyright (c) 2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * 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.wso2.developerstudio.eclipse.artifact.proxyservice.validators; import org.apache.axiom.om.OMElement; import org.apache.commons.lang.StringUtils; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.wso2.developerstudio.eclipse.artifact.proxyservice.model.ProxyServiceModel; import org.wso2.developerstudio.eclipse.artifact.proxyservice.model.ProxyServiceModel.TargetEPType; import org.wso2.developerstudio.eclipse.artifact.proxyservice.utils.PsArtifactConstants; import org.wso2.developerstudio.eclipse.esb.project.artifact.ESBArtifact; import org.wso2.developerstudio.eclipse.esb.project.artifact.ESBProjectArtifact; import org.wso2.developerstudio.eclipse.platform.core.exception.FieldValidationException; import org.wso2.developerstudio.eclipse.platform.core.model.AbstractFieldController; import org.wso2.developerstudio.eclipse.platform.core.project.model.ProjectDataModel; import org.wso2.developerstudio.eclipse.project.extensions.templates.ArtifactTemplate; import org.wso2.developerstudio.eclipse.platform.ui.validator.CommonFieldValidator; import java.util.List; public class ProxyServiceProjectFieldController extends AbstractFieldController { public void validate(String modelProperty, Object value, ProjectDataModel model) throws FieldValidationException { boolean optWsdlbasedProxy = false; boolean optCustomProxy = false; ArtifactTemplate selectedTemplate = (ArtifactTemplate)model.getModelPropertyValue("ps.type"); if(selectedTemplate!=null){ optWsdlbasedProxy = selectedTemplate.getId().equalsIgnoreCase(PsArtifactConstants.WSDL_BASED_PROXY_TEMPL_ID); optCustomProxy = (selectedTemplate.isCustom() || selectedTemplate.getId() .equalsIgnoreCase(PsArtifactConstants.CUSTOM_PROXY_TEMPL_ID)); } if (modelProperty.equals("ps.name")) { CommonFieldValidator.validateArtifactName(value); if (value != null) { String resource = value.toString(); ProxyServiceModel proxyModel = (ProxyServiceModel) model; if (proxyModel != null) { IContainer resLocation = proxyModel.getProxyServiceSaveLocation(); if (resLocation != null) { IProject project = resLocation.getProject(); ESBProjectArtifact esbProjectArtifact = new ESBProjectArtifact(); try { esbProjectArtifact.fromFile(project.getFile("artifact.xml").getLocation().toFile()); List<ESBArtifact> allArtifacts = esbProjectArtifact.getAllESBArtifacts(); for (ESBArtifact artifact : allArtifacts) { if (resource.equals(artifact.getName())) { throw new FieldValidationException(""); } } } catch (Exception e) { throw new FieldValidationException("Specified proxy service name already exsits."); } } } } } else if (modelProperty.equals("import.file")) { CommonFieldValidator.validateImportFile(value); } else if (modelProperty.equals("proxy.target.ep.type")) { /** //TODO: if((((ProxyServiceModel)model).getTargetEPType()==TargetEPType.URL) && !(optWsdlbasedProxy||optCustomProxy)){ throw new FieldValidationException("Specified Target Endpoint"); }**/ } else if (modelProperty.equals("templ.common.ps.epurl")) { if (((ProxyServiceModel)model).getTargetEPType() == TargetEPType.URL && !(optWsdlbasedProxy||optCustomProxy)) { if (value == null || value.toString().equals("")) { throw new FieldValidationException("Target Endpoint URL cannot be empty. Please specify a valid Endpoint URL."); } else { CommonFieldValidator.isValidUrl(value.toString().trim(), "Endpoint URL"); } } } else if (modelProperty.equals("templ.common.ps.epkey")) { if ((((ProxyServiceModel)model).getTargetEPType() == TargetEPType.REGISTRY) && (value == null || value.toString().equals("")) && !(optWsdlbasedProxy||optCustomProxy)) { throw new FieldValidationException("Target Registry Endpoint key is invalid or empty. Please specify a valid Endpoint Key."); } } else if (modelProperty.equals("templ.secure.ps.secpolicy")) { } else if (modelProperty.equals("templ.wsdl.ps.wsdlurl")) { if (optWsdlbasedProxy) { if (value == null || value.toString().equals("")) { throw new FieldValidationException("Target WSDL URL cannot be empty. Please specify a valid WSDL URI."); } else { CommonFieldValidator.isValidUrl(value.toString().trim(), "WSDL URL"); } } } else if (modelProperty.equals("templ.wsdl.ps.wsdlservice")) { if (optWsdlbasedProxy && (value == null || value.toString().equals(""))) { throw new FieldValidationException("Target WSDL service is invalid or empty. Please specify a valid WSDL Service."); } } else if (modelProperty.equals("templ.wsdl.ps.wsdlport")) { if (optWsdlbasedProxy && (value == null || value.toString().equals(""))) { throw new FieldValidationException("Target WSDL port is invalid or empty. Please specify a valid WSDL Port."); } } else if (modelProperty.equals("templ.wsdl.ps.publishsame")) { } else if (modelProperty.equals("templ.logging.ps.reqloglevel")) { } else if (modelProperty.equals("templ.logging.ps.resloglevel")) { } else if (modelProperty.equals("templ.transformer.ps.xslt")) { if (selectedTemplate.getId().equalsIgnoreCase(PsArtifactConstants.TRANSFORMER_PROXY_TEMPL_ID)) { if (value == null || StringUtils.isBlank(value.toString())) { throw new FieldValidationException("Request XSLT key cannot be empty. Please specify a valid XSLT key."); } } } else if (modelProperty.equals("templ.common.ps.eplist")) { if ((((ProxyServiceModel)model).getTargetEPType()==TargetEPType.PREDEFINED) && (value==null || value.toString().equals(""))) { throw new FieldValidationException("Target Predefined Endpoint key cannot be empty. Please specify a valid Predefined Endpoint."); } } else if (modelProperty.equals("save.file")) { IResource resource = (IResource)value; if (resource == null || !resource.exists()) { throw new FieldValidationException("Please specify a valid ESB Project to Save the proxy service."); } } else if (modelProperty.equals("templ.transformer.ps.transformresponses")) { if (selectedTemplate.getId().equalsIgnoreCase(PsArtifactConstants.TRANSFORMER_PROXY_TEMPL_ID)) { if ((Boolean)value && ((ProxyServiceModel)model).getResponseXSLT().equals("")) { throw new FieldValidationException("Response XSLT key cannot be empty. Please specify a valid XSLT key."); } } } } public boolean isEnableField(String modelProperty, ProjectDataModel model) { boolean enableField = super.isEnableField(modelProperty, model); if (modelProperty.equals("import.file")) { enableField = true; } return enableField; } public List<String> getUpdateFields(String modelProperty, ProjectDataModel model) { List<String> updateFields = super.getUpdateFields(modelProperty, model); if (modelProperty.equals("import.file")) { updateFields.add("available.ps"); } else if (modelProperty.equals("create.esb.prj")) { updateFields.add("save.file"); } else if (modelProperty.equals("ps.type")) { updateFields.add("proxy.AdvancedConfig"); } return updateFields; } public boolean isVisibleField(String modelProperty, ProjectDataModel model) { boolean visibleField = super.isVisibleField(modelProperty, model); if (modelProperty.equals("available.ps")) { List<OMElement> availableEPList = ((ProxyServiceModel) model).getAvailablePSList(); visibleField = (availableEPList != null && availableEPList.size() > 0); } return visibleField; } public boolean isReadOnlyField(String modelProperty, ProjectDataModel model) { boolean readOnlyField = super.isReadOnlyField(modelProperty, model); if (modelProperty.equals("save.file")) { readOnlyField = true; } return readOnlyField; } }
Java
#import "RLDTableViewModelProtocol.h" #pragma mark - RLDTableViewGenericEventHandler protocol @protocol RLDTableViewGenericEventHandler <NSObject> // Suitability checking + (BOOL)canHandleTableView:(UITableView *)tableView viewModel:(id<RLDTableViewReusableViewModel>)viewModel view:(UIView *)view; // Collaborators - (void)setTableView:(UITableView *)tableView; - (void)setViewModel:(id<RLDTableViewReusableViewModel>)viewModel; - (void)setView:(UIView *)view; @optional // Display customization - (void)willReuseView; - (void)willDisplayView; - (void)didEndDisplayingView; @end #pragma mark - RLDTableViewCellEventHandler protocol @protocol RLDTableViewCellEventHandler <RLDTableViewGenericEventHandler> @optional // Accessories (disclosures) - (void)accessoryButtonTapped; // Selection - (BOOL)shouldHighlightView; - (void)didHighlightView; - (void)didUnhighlightView; - (void)willSelectView; - (void)willDeselectView; - (void)didSelectView; - (void)didDeselectView; // Editing - (void)willBeginEditing; - (void)didEndEditing; - (NSArray *)editActions; // Copy and Paste - (BOOL)canPerformAction:(SEL)action withSender:(id)sender; - (void)performAction:(SEL)action withSender:(id)sender; @end #pragma mark - RLDTableViewSectionAccessoryViewEventHandler protocol @protocol RLDTableViewSectionAccessoryViewEventHandler <RLDTableViewGenericEventHandler> @end #pragma mark - RLDTableViewEventHandlerProvider protocol @protocol RLDTableViewEventHandlerProvider <NSObject> - (id<RLDTableViewGenericEventHandler>)eventHandlerWithTableView:(UITableView *)tableView viewModel:(id<RLDTableViewReusableViewModel>)viewModel view:(UIView *)view; @end
Java
--- title: Contributing Misc and CLA --- ### Miscellaneous #### Contributor license agreement (CLA) *When you contribute code, you affirm that the contribution is your original work and that you license the work to the project under the project’s open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project’s open source license and warrant that you have the legal authority to do so.* Please make sure you have signed our Contributor License Agreement (either [Individual Contributor License Agreement v1.0](https://docs.google.com/forms/d/e/1FAIpQLSdA-aWKQ15yBzp8wKcFPpuxIyGwohGU1Hx-6Pa4hfaEbbb3fg/viewform?usp=sf_link) or [Software Grant and Corporate Contributor License Agreement (“Agreement”) v1.0)](https://docs.google.com/forms/d/e/1FAIpQLSf3RZ_ZRWOdymT8OnTxRh5FeIadfANLWUrhaSHadg_E20zBAQ/viewform?usp=sf_link). We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once. ### Release checklist GE core team members use this checklist to ship releases. 1. If this is a major release (incrementing either the first or second version number) the manual acceptance testing must be completed. * This [private Google Doc](https://docs.google.com/document/d/16QJPSCawEkwuEjShZeHa01TlQm9nbUwS6GwmFewJ3EY) outlines the procedure. (Note this will be made public eventually) 2. Merge all approved PRs into `develop`. 3. Make a new branch from `develop` called something like `release-prep-2021-06-01`. 4. In this branch, update the version number in the `great_expectations/deployment_version` file. 5. Update the `changelog.md` move all things under the `Develop` heading under a new heading with the new release number. NOTE: You should remove the `Develop` heading for the released version, it will be replaced in step #12. * Verify that any changes to requirements are specifically identified in the changelog * Double check the grouping / order of changes matches [FEATURE], [BUGFIX], [DOCS], [MAINTENANCE] and that all changes since the last release are mentioned or summarized in a bullet. * Make sure to shout out community contributions in the changelog! E.g. after the change title add `(thanks @<contributor_id>)` 6. Submit this as a PR against `develop` 7. After successful checks, get it approved and merged. 8. Update your local branches and switch to main: `git fetch --all; git checkout main; git pull`. 9. Merge the now-updated `develop` branch into `main` and trigger the release: `git merge origin/develop; git push` 10. Wait for all the builds to complete. The builds should include several test jobs and a deploy job, which handles the actual publishing of code to pypi. You can watch the progress of these builds on Azure. 11. Check [PyPI](https://pypi.org/project/great-expectations/#history) for the new release 12. Create an annotated Git tag: * Run `git tag -a $VERSION -m $VERSION` with the correct new version. * Push the tag up by running `git push origin $VERSION` with the correct new version. * Merge main into develop so that the tagged commit becomes part of the history for develop: `git checkout develop; git pull; git merge main` * On develop, add a new “Develop” section header to changelog.md, and push the updated file with message “Update changelog for develop” 13. [Create the release on GitHub](https://github.com/great-expectations/great_expectations/releases) with the version number. Copy the changelog notes into the release notes, and update any rst-specific links to use GitHub issue numbers. * The deploy step will automatically create a draft for the release. * Generally, we use the name of the tag (Ex: “0.13.2”) as the release title. 14. Notify kyle@superconductive.com about any community-contributed PRs that should be celebrated. 15. Socialize the release on GE slack by copying the changelog with an optional nice personal message (thank people if you can) 16. Review and merge the automatically-generated PR for [conda-forge/great-expectations-feedstock](https://github.com/conda-forge/great-expectations-feedstock/pulls), updating requirements as necessary and verifying the build status. * To list requirements changed since a previous version of GE, you can run `git diff <<old_tag_e.g._0.12.6>>..<<new_tag_e.g._0.12.7>> -- requirements.txt`. If there are differences, update the requirements section of `recipe/meta.yaml`. This is an important step as this is not done automatically when the PR is generated. * In most cases, the PR will change the SHA and version number. Check the commits for other changes, they may be maintenance changes from the Conda dev team which are OK to merge. * Review all items on the conda-forge CI system and PR checklist. The active conda-forge community frequently updates build processes and testing, and may help discover issues not observed in our pypi deployment process. * If you need to re-run a failing build and don’t have appropriate permissions or you don’t have permissions to merge please refer to the Account Permissions Overview on the superconductive internal [wiki[(https://superconductive.atlassian.net/wiki/spaces/SUP/pages) for who to ask. Other conda-forge community partners are extremely responsive and may be able to help resolve issues quickly. 17. Check for open issues in the [GE conda-forge repository](https://github.com/conda-forge/great-expectations-feedstock/issues). If there are open issues that do not have a corresponding issue in the main GE repo, please create an issue in the GE repo with a link to the corresponding conda issue (e.g. issue [#2021](https://github.com/great-expectations/great_expectations/issues/2021) ). This allows us to internally triage and track the issue. 18 Celebrate! You have successfully released a new version of Great Expectations!! #### Beta Release Notes * To ship a beta release, follow the above checklist, but use the branch name `v0.13.x` as the equivalent of `main` and `v0.11.x-develop` as the equivalent of `develop` * Ship the release using beta version numbers when updating the `great_expectations/deployment_version` and when creating the annotated tag (e.g. **0.13.0b0**) ### Issue Tags We use `stalebot` to automatically tag issues without activity as `stale`, and close them if no response is received in one week. Adding the `stalebot-exempt` tag will prevent the bot from trying to close the issue. Additionally, we try to add tags to indicate the status of key discussion elements: * `help wanted` covers issues where we have not prioritized the request, but believe the feature is useful and so we would welcome community contributors to help accelerate development. * `enhacement` and `expectation-request` indicate discussion of potential new features for Great Expectations * `good first issue` indicates a small-ish task that would be a good way to begin making contributions to Great Expectations
Java
/* * Copyright (C) 2008 ZXing authors * * 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 com.xys.libzxing.zxing.activity; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Rect; import android.os.Bundle; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.Window; import android.view.WindowManager; import android.view.animation.Animation; import android.view.animation.TranslateAnimation; import android.widget.ImageView; import android.widget.RelativeLayout; import com.google.zxing.Result; import com.xys.libzxing.R; import com.xys.libzxing.zxing.camera.CameraManager; import com.xys.libzxing.zxing.decode.DecodeThread; import com.xys.libzxing.zxing.utils.BeepManager; import com.xys.libzxing.zxing.utils.CaptureActivityHandler; import com.xys.libzxing.zxing.utils.InactivityTimer; import java.io.IOException; import java.lang.reflect.Field; /** * This activity opens the camera and does the actual scanning on a background * thread. It draws a viewfinder to help the user place the barcode correctly, * shows feedback as the image processing is happening, and then overlays the * results when a scan is successful. * * @author dswitkin@google.com (Daniel Switkin) * @author Sean Owen */ public final class CaptureActivity extends AppCompatActivity implements SurfaceHolder.Callback { private static final String TAG = CaptureActivity.class.getSimpleName(); private CameraManager cameraManager; private CaptureActivityHandler handler; private InactivityTimer inactivityTimer; private BeepManager beepManager; private SurfaceView scanPreview = null; private RelativeLayout scanContainer; private RelativeLayout scanCropView; private ImageView scanLine; private Rect mCropRect = null; private boolean isHasSurface = false; public Handler getHandler() { return handler; } public CameraManager getCameraManager() { return cameraManager; } @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); Window window = getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); setContentView(R.layout.activity_capture); scanPreview = (SurfaceView) findViewById(R.id.capture_preview); scanContainer = (RelativeLayout) findViewById(R.id.capture_container); scanCropView = (RelativeLayout) findViewById(R.id.capture_crop_view); scanLine = (ImageView) findViewById(R.id.capture_scan_line); inactivityTimer = new InactivityTimer(this); beepManager = new BeepManager(this); TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.0f, Animation .RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.9f); animation.setDuration(4500); animation.setRepeatCount(-1); animation.setRepeatMode(Animation.RESTART); scanLine.startAnimation(animation); } @Override protected void onResume() { super.onResume(); // CameraManager must be initialized here, not in onCreate(). This is // necessary because we don't // want to open the camera driver and measure the screen size if we're // going to show the help on // first launch. That led to bugs where the scanning rectangle was the // wrong size and partially // off screen. cameraManager = new CameraManager(getApplication()); handler = null; if (isHasSurface) { // The activity was paused but not stopped, so the surface still // exists. Therefore // surfaceCreated() won't be called, so init the camera here. initCamera(scanPreview.getHolder()); } else { // Install the callback and wait for surfaceCreated() to init the // camera. scanPreview.getHolder().addCallback(this); } inactivityTimer.onResume(); } @Override protected void onPause() { if (handler != null) { handler.quitSynchronously(); handler = null; } inactivityTimer.onPause(); beepManager.close(); cameraManager.closeDriver(); if (!isHasSurface) { scanPreview.getHolder().removeCallback(this); } super.onPause(); } @Override protected void onDestroy() { inactivityTimer.shutdown(); super.onDestroy(); } @Override public void surfaceCreated(SurfaceHolder holder) { if (holder == null) { Log.e(TAG, "*** WARNING *** surfaceCreated() gave us a null surface!"); } if (!isHasSurface) { isHasSurface = true; initCamera(holder); } } @Override public void surfaceDestroyed(SurfaceHolder holder) { isHasSurface = false; } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { } /** * A valid barcode has been found, so give an indication of success and show * the results. * * @param rawResult The contents of the barcode. * @param bundle The extras */ public void handleDecode(Result rawResult, Bundle bundle) { inactivityTimer.onActivity(); beepManager.playBeepSoundAndVibrate(); Intent resultIntent = new Intent(); bundle.putInt("width", mCropRect.width()); bundle.putInt("height", mCropRect.height()); bundle.putString("result", rawResult.getText()); resultIntent.putExtras(bundle); this.setResult(RESULT_OK, resultIntent); CaptureActivity.this.finish(); } private void initCamera(SurfaceHolder surfaceHolder) { if (surfaceHolder == null) { throw new IllegalStateException("No SurfaceHolder provided"); } if (cameraManager.isOpen()) { Log.w(TAG, "initCamera() while already open -- late SurfaceView callback?"); return; } try { cameraManager.openDriver(surfaceHolder); // Creating the handler starts the preview, which can also throw a // RuntimeException. if (handler == null) { handler = new CaptureActivityHandler(this, cameraManager, DecodeThread.ALL_MODE); } initCrop(); } catch (IOException ioe) { Log.w(TAG, ioe); displayFrameworkBugMessageAndExit(); } catch (RuntimeException e) { // Barcode Scanner has seen crashes in the wild of this variety: // java.?lang.?RuntimeException: Fail to connect to camera service Log.w(TAG, "Unexpected error initializing camera", e); displayFrameworkBugMessageAndExit(); } } private void displayFrameworkBugMessageAndExit() { // camera error AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(getString(R.string.zxing_bar_name)); builder.setMessage("Camera error"); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { finish(); } }); builder.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { finish(); } }); builder.show(); } public void restartPreviewAfterDelay(long delayMS) { if (handler != null) { handler.sendEmptyMessageDelayed(R.id.restart_preview, delayMS); } } public Rect getCropRect() { return mCropRect; } /** * 初始化截取的矩形区域 */ private void initCrop() { int cameraWidth = cameraManager.getCameraResolution().y; int cameraHeight = cameraManager.getCameraResolution().x; /** 获取布局中扫描框的位置信息 */ int[] location = new int[2]; scanCropView.getLocationInWindow(location); int cropLeft = location[0]; int cropTop = location[1] - getStatusBarHeight(); int cropWidth = scanCropView.getWidth(); int cropHeight = scanCropView.getHeight(); /** 获取布局容器的宽高 */ int containerWidth = scanContainer.getWidth(); int containerHeight = scanContainer.getHeight(); /** 计算最终截取的矩形的左上角顶点x坐标 */ int x = cropLeft * cameraWidth / containerWidth; /** 计算最终截取的矩形的左上角顶点y坐标 */ int y = cropTop * cameraHeight / containerHeight; /** 计算最终截取的矩形的宽度 */ int width = cropWidth * cameraWidth / containerWidth; /** 计算最终截取的矩形的高度 */ int height = cropHeight * cameraHeight / containerHeight; /** 生成最终的截取的矩形 */ mCropRect = new Rect(x, y, width + x, height + y); } private int getStatusBarHeight() { try { Class<?> c = Class.forName("com.android.internal.R$dimen"); Object obj = c.newInstance(); Field field = c.getField("status_bar_height"); int x = Integer.parseInt(field.get(obj).toString()); return getResources().getDimensionPixelSize(x); } catch (Exception e) { e.printStackTrace(); } return 0; } }
Java
/** \file parse_options.cpp \author michael.zohner@ec-spride.de \copyright ABY - A Framework for Efficient Mixed-protocol Secure Two-party Computation Copyright (C) 2015 Engineering Cryptographic Protocols Group, TU Darmstadt This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. \brief Parse Options Implementation */ #include "parse_options.h" /** * takes a string in the Format "c i i i ..." * (1 char followed by potentially many integers) and returns a vector of all i * @param str the string to tokenize * @param tokens the result vector of wire id */ void tokenize_verilog(const std::string& str, std::vector<uint32_t>& tokens, const std::string& delimiters) { tokens.clear(); // Skip delimiters at beginning. Skip first two characters (1 Char + 1 Space) std::string::size_type lastPos = str.find_first_not_of(delimiters, 2); // Find first "non-delimiter". std::string::size_type pos = str.find_first_of(delimiters, lastPos); while (std::string::npos != pos || std::string::npos != lastPos) { // Found a token, add it to the vector. tokens.push_back(atoi(str.substr(lastPos, pos - lastPos).c_str())); // Skip delimiters. Note the "not_of" lastPos = str.find_first_not_of(delimiters, pos); // Find next "non-delimiter" pos = str.find_first_of(delimiters, lastPos); } } /** * takes a string in the Format "i|i|i|..." * (integers separated by '|') and returns a vector of all integers * @param str the string to tokenize * @param tokens the result vector of wire id */ void tokenize(const std::string& str, std::vector<uint32_t>& tokens, const std::string& delimiters) { tokens.clear(); // Skip delimiters at beginning std::string::size_type lastPos = str.find_first_not_of(delimiters, 0); // Find first "non-delimiter". std::string::size_type pos = str.find_first_of(delimiters, lastPos); while (std::string::npos != pos || std::string::npos != lastPos) { // Found a token, add it to the vector. tokens.push_back(atoi(str.substr(lastPos, pos - lastPos).c_str())); // Skip delimiters. Note the "not_of" lastPos = str.find_first_not_of(delimiters, pos); // Find next "non-delimiter" pos = str.find_first_of(delimiters, lastPos); } } int32_t parse_options(int32_t* argcp, char*** argvp, parsing_ctx* options, uint32_t nops) { int result = 0; bool skip; uint32_t i; if(*argcp < 2) return 0; while ((*argcp) > 1) { if ((*argvp)[1][0] != '-' || (*argvp)[1][1] == '\0' || (*argvp)[1][2] != '\0') return result; for (i = 0, skip = false; i < nops && !skip; i++) { if (((*argvp)[1][1]) == options[i].opt_name) { switch (options[i].type) { case T_NUM: if (isdigit((*argvp)[2][0])) { ++*argvp; --*argcp; *((uint32_t*) options[i].val) = atoi((*argvp)[1]); } break; case T_DOUBLE: ++*argvp; --*argcp; *((double*) options[i].val) = atof((*argvp)[1]); break; case T_STR: ++*argvp; --*argcp; *((std::string*) options[i].val) = (*argvp)[1]; break; case T_FLAG: *((bool*) options[i].val) = true; break; } ++result; ++*argvp; --*argcp; options[i].set = true; skip = true; } } } for (i = 0; i < nops; i++) { if (options[i].required && !options[i].set) return 0; } return 1; } void print_usage(std::string progname, parsing_ctx* options, uint32_t nops) { uint32_t i; std::cout << "Usage: " << progname << std::endl; for (i = 0; i < nops; i++) { std::cout << " -" << options[i].opt_name << " [" << options[i].help_str << (options[i].required ? ", required" : ", optional") << "]" << std::endl; } std::cout << std::endl << "Program exiting" << std::endl; }
Java
--- copyright: years: 2015, 2016 --- # Gradle을 사용하여 클라이언트 푸시 SDK 설치 {: #android_install} 이 섹션에서는 클라이언트 푸시 SDK를 설치하고 이를 사용하여 추가적으로 Android 애플리케이션을 개발하는 방법에 대해 설명합니다. Gradle을 사용하여 Bluemix® 모바일 서비스 푸시 SDK를 추가할 수 있습니다. Gradle은 저장소에서 아티팩트를 자동으로 다운로드하여 Android 애플리케이션에 제공합니다. Android Studio 및 Android Studio SDK를 올바로 설정해야 합니다. 시스템 설정 방법에 대한 자세한 정보는 [Android Studio 개요](https://developer.android.com/tools/studio/index.html)를 참조하십시오. Gradle에 대한 자세한 정보는 [Gradle 빌드 구성](http://developer.android.com/tools/building/configuring-gradle.html)을 참조하십시오. 1. Android Studio에서 모바일 애플리케이션을 작성하고 연 다음에 애플리케이션 **build.gradle** 파일을 여십시오. 다음 종속 항목을 모바일 애플리케이션에 추가하십시오. 이러한 import 문은 코드 스니펫에 필요합니다. ``` import com.ibm.mobilefirstplatform.clientsdk.android.core.api.BMSClient; import com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPush; import com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushException; import com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushResponseListener; import com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushNotificationListener; import com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPSimplePushNotification; ``` 1. 다음 종속 항목을 모바일 애플리케이션에 추가하십시오. 다음 행이 Bluemix™ Mobile Services Push 클라이언트 SDK 및 Google 플레이 서비스 SDK를 사용자의 컴파일 범위 종속 항목에 추가합니다. ``` dependencies { compile 'com.ibm.mobilefirstplatform.clientsdk.android:push:1.+' compile 'com.google.android.gms:play-services:7.8.0' } ``` 1. **AndroidManifest.xml** 파일에서 다음 권한을 추가하십시오. 샘플 Manifest를 보려면 [Android helloPush 샘플 애플리케이션](https://github.com/ibm-bluemix-mobile-services/bms-samples-android-hellopush/blob/master/helloPush/app/src/main/AndroidManifest.xml)을 참조하십시오. 샘플 Gradle 파일을 보려면 [샘플 빌드 Gradle 파일](https://github.com/ibm-bluemix-mobile-services/bms-samples-android-hellopush/blob/master/helloPush/app/build.gradle)을 참조하십시오. ``` <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="com.ibm.clientsdk.android.app.permission.C2D_MESSAGE" /> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> ``` 여기서 [Android 권한](http://developer.android.com/guide/topics/security/permissions.html)에 대한 정보를 볼 수 있습니다. 1. 활동에 대한 알림 의도 설정을 추가하십시오. 사용자가 알림 영역에서 수신한 알림을 클릭할 경우 이 설정을 통해 애플리케이션이 시작됩니다. ``` <intent-filter> <action android:name="<Your_Android_Package_Name.IBMPushNotification"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> ``` **참고**: 위의 조치에서 *Your_Android_Package_Name*을 사용자 애플리케이션에서 사용되는 애플리케이션 패키지 이름으로 대체하십시오. 1. GCM(Google Cloud Messaging) 의도 서비스 및 RECEIVE 이벤트 알림에 대한 의도 필터를 추가하십시오. ``` service android:name="com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushIntentService" /> <receiver android:name="com.ibm.mobilefirstplatform.clientsdk.android.push.internal.MFPPushBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND"> <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <category android:name="com.ibm.mobilefirstplatform.clientsdk.android.app" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <category android:name="com.ibm.mobilefirstplatform.clientsdk.android.app" /> </intent-filter> </receiver> ``` # Android 앱을 위한 푸시 SDK 초기화 {: #android_initialize} 초기화 코드를 배치하는 공통 위치는 Android 애플리케이션에서 기본 활동의 onCreate 메소드입니다. Bluemix 애플리케이션 대시보드의 **모바일 옵션** 링크를 클릭하여 애플리케이션 라우트와 애플리케이션 GUID를 확보하십시오. 라우트 및 앱 GUID에 이러한 값을 사용하십시오. Bluemix 앱 appRoute 및 appGUID 매개변수를 사용하려면 코드 스니펫을 수정하십시오. ##Core SDK 초기화 ``` // Initialize the SDK for Java (Android) with IBM Bluemix AppGUID and route BMSClient.getInstance().initialize(getApplicationContext(), "applicationRoute","applicationGUID", bluemixRegion:"Location where your app Hosted"); ``` **appRoute** Bluemix에서 생성한 서버 애플리케이션에 지정된 라우트를 지정합니다. **AppGUID** Bluemix에서 생성한 애플리케이션에 지정된 고유 키를 지정합니다. 이 값은 대소문자를 구분합니다. **bluemixRegionSuffix** 앱이 호스트된 위치를 지정합니다. 다음 값 중 하나를 사용할 수 있습니다. - BMSClient.REGION_US_SOUTH - BMSClient.REGION_UK - BMSClient.REGION_SYDNEY ##클라이언트 푸시 SDK 초기화 ``` //Initialize client Push SDK for Java MFPPush push = MFPPush.getInstance(); push.initialize(getApplicationContext()); ``` # Android 디바이스 등록 {: #android_register} `IMFPush.register()` API를 사용하여 디바이스를 Push Notification 서비스에 등록할 수 있습니다. Android 디바이스의 등록인 경우, 우선 Bluemix 푸시 서비스 구성 대시보드에서 GCM(Google Cloud Messaging) 정보를 추가하십시오. 자세한 정보는 [GCM(Google Cloud Messaging)의 신임 정보 구성](t_push_provider_android.html)을 참조하십시오. 다음 코드 스니펫을 복사하여 Android 모바일 애플리케이션에 붙여넣으십시오. ``` //Register Android devices push.register(new MFPPushResponseListener<String>() { @Override public void onSuccess(String deviceId) { //handle success here } @Override public void onFailure(MFPPushException ex) { //handle failure here } }); ``` ``` //Handles the notification when it arrives MFPPushNotificationListener notificationListener = new MFPPushNotificationListener() { @Override public void onReceive (final MFPSimplePushNotification message){ // Handle Push Notification } }; ``` # Android 디바이스에서 푸시 알림 수신 {: #android_receive} notificationListener 오브젝트를 푸시에 등록하려면 **MFPPush.listen()** 메소드를 호출하십시오. 푸시 알림을 처리하는 활동의 **onResume()** 메소드에서 일반적으로 이 메소드가 호출됩니다. 1. notificationListener 오브젝트를 푸시에 등록하려면 **listen()** 메소드를 호출하십시오. 푸시 알림을 처리하는 활동의 **onResume()** 메소드에서 일반적으로 이 메소드가 호출됩니다. ``` @Override protected void onResume(){ super.onResume(); if(push != null) { push.listen(notificationListener); } } ``` 2. 프로젝트를 빌드하고 디바이스 또는 에뮬레이터에서 이를 실행하십시오. register() 메소드의 응답 리스너에 대해 onSuccess() 메소드가 호출되면 디바이스가 Push Notification 서비스에 정상적으로 푸시에 등록된 것입니다. 이 때 기본 푸시 알림 전송에 설명된 대로 메시지를 보낼 수 있습니다. 3. 디바이스가 알림을 수신했는지 확인하십시오. 애플리케이션이 포그라운드에 있는 경우 **MFPPushNotificationListener**에 의해 알림이 처리됩니다. 애플리케이션이 백그라운드에 있는 경우 알림 막대에 메시지가 표시됩니다. # 기본 푸시 알림 전송 {: #push-send-notifications} 애플리케이션이 개발된 후에는 (태그, 배지, 추가 페이로드 또는 사운드 파일을 사용하지 않아도) 기본 푸시 알림을 전송할 수 있습니다. 기본 푸시 알림을 전송하십시오. 1. **청취자 선택**에서 다음 청취자 중 하나를 선택하십시오. **모든 디바이스** 또는 플랫폼 기준으로 **iOS 디바이스만** 또는 **Anroid 디바이스만**. **참고**: **모든 디바이스** 옵션을 선택하는 경우 푸시 알림에 등록된 모든 디바이스는 알림을 수신합니다. ![알림 화면](images/tag_notification.jpg) 2. **알림 작성**에서 메시지를 입력한 후 **전송**을 클릭하십시오. 3. 디바이스가 알림을 수신했는지 확인하십시오. 다음 스크린샷은 Android 및 iOS 디바이스의 포그라운드에서 푸시 알림을 처리하는 경보 상자를 표시합니다. ![Android의 포그라운드 푸시 알림](images/Android_Screenshot.jpg) ![iOS의 포그라운드 푸시 알림](images/iOS_Screenshot.jpg) 다음 스크린샷은 Android의 백그라운드에 있는 푸시 알림을 보여줍니다.![Android의 백그라운드 푸시 알림](images/background.jpg) # 다음 단계 {: #next_steps_tags} 정상적으로 기본 알림을 설정한 후 태그 기반 알림 및 고급 옵션을 구성할 수 있습니다. 다음의 Push Notifications 서비스 기능을 사용자의 앱에 추가하십시오. 태그 기반 알림을 사용하려면 [태그 기반 알림](c_tag_basednotifications.html)을 참조하십시오. 고급 알림 옵션을 사용하려면 [고급 푸시 알림](t_advance_notifications.html)을 참조하십시오.
Java
"""heroku_blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import include, url from django.contrib import admin from blog.views import index, signup, login, logout urlpatterns = [ url(r'^$', index, name='index'), url(r'^signup', signup, name='signup'), url(r'^login', login, name='login'), url(r'^logout', logout, name='logout'), url(r'^admin/', include(admin.site.urls)), ]
Java
/** * Copyright (c) 2005-2012 https://github.com/zhangkaitao Licensed under the Apache License, Version 2.0 (the * "License"); */ package com.yang.spinach.common.utils.spring; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import net.sf.ehcache.Ehcache; import org.apache.shiro.cache.Cache; import org.apache.shiro.cache.CacheException; import org.apache.shiro.cache.CacheManager; import org.apache.shiro.util.CollectionUtils; import org.springframework.cache.support.SimpleValueWrapper; /** * 包装Spring cache抽象 */ public class SpringCacheManagerWrapper implements CacheManager { private org.springframework.cache.CacheManager cacheManager; /** * 设置spring cache manager * * @param cacheManager */ public void setCacheManager( org.springframework.cache.CacheManager cacheManager) { this.cacheManager = cacheManager; } @Override public <K, V> Cache<K, V> getCache(String name) throws CacheException { org.springframework.cache.Cache springCache = cacheManager .getCache(name); return new SpringCacheWrapper(springCache); } static class SpringCacheWrapper implements Cache { private final org.springframework.cache.Cache springCache; SpringCacheWrapper(org.springframework.cache.Cache springCache) { this.springCache = springCache; } @Override public Object get(Object key) throws CacheException { Object value = springCache.get(key); if (value instanceof SimpleValueWrapper) { return ((SimpleValueWrapper) value).get(); } return value; } @Override public Object put(Object key, Object value) throws CacheException { springCache.put(key, value); return value; } @Override public Object remove(Object key) throws CacheException { springCache.evict(key); return null; } @Override public void clear() throws CacheException { springCache.clear(); } @Override public int size() { if (springCache.getNativeCache() instanceof Ehcache) { Ehcache ehcache = (Ehcache) springCache.getNativeCache(); return ehcache.getSize(); } throw new UnsupportedOperationException( "invoke spring cache abstract size method not supported"); } @Override public Set keys() { if (springCache.getNativeCache() instanceof Ehcache) { Ehcache ehcache = (Ehcache) springCache.getNativeCache(); return new HashSet(ehcache.getKeys()); } throw new UnsupportedOperationException( "invoke spring cache abstract keys method not supported"); } @Override public Collection values() { if (springCache.getNativeCache() instanceof Ehcache) { Ehcache ehcache = (Ehcache) springCache.getNativeCache(); System.out.println("cache savePath:" + ehcache.getCacheManager().getDiskStorePath() + "--------------"); List keys = ehcache.getKeys(); if (!CollectionUtils.isEmpty(keys)) { List values = new ArrayList(keys.size()); for (Object key : keys) { Object value = get(key); if (value != null) { values.add(value); } } return Collections.unmodifiableList(values); } else { return Collections.emptyList(); } } throw new UnsupportedOperationException( "invoke spring cache abstract values method not supported"); } } }
Java
package org.javacore.io.zip; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.util.Enumeration; import java.util.zip.Adler32; import java.util.zip.CheckedInputStream; import java.util.zip.CheckedOutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; /* * Copyright [2015] [Jeff Lee] * * 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. */ /** * @author admin * @since 2015-10-17 14:58:59 * 利用Zip进行多文件保存 */ public class ZipCompress { private static String filePath = "src" + File.separator + "org" + File.separator + "javacore" + File.separator + "io" + File.separator; private static String[] fileNames= new String[] { filePath + "BufferedInputFileT.java", filePath + "ChangeSystemOut.java" }; public static void main(String[] args) throws IOException { zipFiles(fileNames); } private static void zipFiles(String[] fileNames) throws IOException { // 获取zip文件输出流 FileOutputStream f = new FileOutputStream("test.zip"); // 从文件输出流中获取数据校验和输出流,并设置Adler32 CheckedOutputStream csum = new CheckedOutputStream(f,new Adler32()); // 从数据校验和输出流中获取Zip输出流 ZipOutputStream zos = new ZipOutputStream(csum); // 从Zip输出流中获取缓冲输出流 BufferedOutputStream out = new BufferedOutputStream(zos); // 设置Zip文件注释 zos.setComment("测试 java zip stream"); for (String file : fileNames) { System.out.println("写入文件: " + file); // 获取文件输入字符流 BufferedReader in = new BufferedReader(new FileReader(file)); // 想Zip处理写入新的文件条目,并流定位到数据开始处 zos.putNextEntry(new ZipEntry(file)); int c; while ((c = in.read()) > 0) out.write(c); in.close(); // 刷新Zip输出流,将缓冲的流写入该流 out.flush(); } // 文件全部写入Zip输出流后,关闭 out.close(); // 输出数据校验和 System.out.println("数据校验和: " + csum.getChecksum().getValue()); System.out.println("读取zip文件"); // 读取test.zip文件输入流 FileInputStream fi = new FileInputStream("test.zip"); // 从文件输入流中获取数据校验和流 CheckedInputStream csumi = new CheckedInputStream(fi,new Adler32()); // 从数据校验和流中获取Zip解压流 ZipInputStream in2 = new ZipInputStream(csumi); // 从Zip解压流中获取缓冲输入流 BufferedInputStream bis = new BufferedInputStream(in2); // 创建文件条目 ZipEntry zipEntry; while ((zipEntry = in2.getNextEntry()) != null) { System.out.println("读取文件: " + zipEntry); int x; while ((x = bis.read()) > 0) System.out.write(x); } if (fileNames.length == 1) System.out.println("数据校验和: " + csumi.getChecksum().getValue()); bis.close(); // 获取Zip文件 ZipFile zf = new ZipFile("test.zip"); // 获取文件条目枚举 Enumeration e = zf.entries(); while (e.hasMoreElements()) { // 从Zip文件的枚举中获取文件条目 ZipEntry ze2 = (ZipEntry) e.nextElement(); System.out.println("文件: " + ze2); } } }
Java
package Zoe::Runtime::Database; use Mojo::Base 'Zoe::Runtime'; sub new { my $class = shift; my %arg = @_; my $self = { type => undef, #database type (mysql | sqlite| perl DBD driver name]) dbfile => undef, #path to database # required if type is sqlite dbname => undef, #database name port => undef, #database port host => undef, #databse host dbuser => undef, #database user name dbpassword => undef, #database user password is_verbose => undef, #verbose logging (1| 0) mandatory_fields => [ 'type'], #mandatory fields %arg }; return bless $self, $class; } sub check_valid { #if type is sqlite ->dbfile is required #else all other params are required my $self = shift; my $type = $self->{type}; my @not_valids = (); push(@not_valids, 'type') unless (defined($self->{type})); if ($type =~ /sqlite/imx){ push(@not_valids, 'type'); }else { my @list = ('dbname', 'port', 'host', 'dbuser', 'dbpassword'); foreach my $field (@list) { push(@not_valids, $field) unless ( defined($self->{$field}) ); } } return @not_valids; } 1; __DATA__ =head1 NAME ZOE::Runtime::Database =head1 Description Stores the runtime Database details; Database parameters are stored in the runtime.yml file or passed as key values to the Zoe::Runtime::Database constructer keys and description below type database type (mysql | sqlite| perl DBD driver name]) dbfile path to database required if type is sqlite dbname database name port database port host databse host dbuser database user name dbpassword database user password is_verbose verbose logging (1| 0) mandatory_fields => [ 'type'], #mandatory fields #if type is sqlite ->dbfile is required #else all other params are required =head1 YML Examples Sqlite example: database: type: sqlite dbfile: /var/apps/myapp/app.db is_verbose: 1 All other DB example: database: type: mysql dbname: mydatabase port: 3306 host: dbhost dbuser: dbuser dbpassword: butt3rSk0tcH! is_verbose: 1 =head1 Author dinnibartholomew@gmail.com =cut
Java
/** * * Copyright 2014-2017 Florian Schmaus * * 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 eu.geekplace.javapinning.pin; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateEncodingException; import java.security.cert.X509Certificate; import java.util.logging.Level; import java.util.logging.Logger; import eu.geekplace.javapinning.util.HexUtilities; public abstract class Pin { private static final Logger LOGGER = Logger.getLogger(Sha256Pin.class.getName()); protected static final MessageDigest sha256md; static { MessageDigest sha256mdtemp = null; try { sha256mdtemp = MessageDigest.getInstance("SHA-256"); } catch (NoSuchAlgorithmException e) { LOGGER.log(Level.WARNING, "SHA-256 MessageDigest not available", e); } sha256md = sha256mdtemp; } protected final byte[] pinBytes; protected Pin(byte[] pinBytes) { this.pinBytes = pinBytes; } protected Pin(String pinHexString) { pinBytes = HexUtilities.decodeFromHex(pinHexString); } public abstract boolean pinsCertificate(X509Certificate x509certificate) throws CertificateEncodingException; protected abstract boolean pinsCertificate(byte[] pubkey); /** * Create a new {@link Pin} from the given String. * <p> * The Pin String must be in the format <tt>[type]:[hex-string]</tt>, where * <tt>type</tt> denotes the type of the Pin and <tt>hex-string</tt> is the * binary value of the Pin encoded in hex. Currently supported types are * <ul> * <li>PLAIN</li> * <li>SHA256</li> * <li>CERTPLAIN</li> * <li>CERTSHA256</li> * </ul> * The hex-string must contain only of whitespace characters, colons (':'), * numbers [0-9] and ASCII letters [a-fA-F]. It must be a valid hex-encoded * binary representation. First the string is lower-cased, then all * whitespace characters and colons are removed before the string is decoded * to bytes. * </p> * * @param string * the Pin String. * @return the Pin for the given Pin String. * @throws IllegalArgumentException * if the given String is not a valid Pin String */ public static Pin fromString(String string) { // The Pin's string may have multiple colons (':'), assume that // everything before the first colon is the Pin type and everything // after the colon is the Pin's byte encoded in hex. String[] pin = string.split(":", 2); if (pin.length != 2) { throw new IllegalArgumentException("Invalid pin string, expected: 'format-specifier:hex-string'."); } String type = pin[0]; String pinHex = pin[1]; switch (type) { case "SHA256": return new Sha256Pin(pinHex); case "PLAIN": return new PlainPin(pinHex); case "CERTSHA256": return new CertSha256Pin(pinHex); case "CERTPLAIN": return new CertPlainPin(pinHex); default: throw new IllegalArgumentException(); } } /** * Returns a clone of the bytes that represent this Pin. * <p> * This method is meant for unit testing only and therefore not public. * </p> * * @return a clone of the bytes that represent this Pin. */ byte[] getPinBytes() { return pinBytes.clone(); } }
Java
body { margin:0px; background-image:none; position:relative; left:-0px; width:1074px; margin-left:auto; margin-right:auto; text-align:left; } #base { position:absolute; z-index:0; } #u6641 { position:absolute; left:0px; top:63px; width:128px; height:320px; } #u6641_menu { position:absolute; left:-3px; top:-3px; width:134px; height:326px; } #u6642 { position:absolute; left:0px; top:0px; width:133px; height:325px; } #u6643_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6643 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6644 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6645_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6645 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6646 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6647_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6647 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6648 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6649_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6649 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6650 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6651_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6651 { position:absolute; left:0px; top:128px; width:128px; height:32px; } #u6652 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6653_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6653 { position:absolute; left:0px; top:160px; width:128px; height:32px; } #u6654 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6655_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6655 { position:absolute; left:0px; top:192px; width:128px; height:32px; } #u6656 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6657_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6657 { position:absolute; left:0px; top:224px; width:128px; height:32px; } #u6658 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6659_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6659 { position:absolute; left:0px; top:256px; width:128px; height:32px; } #u6660 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6661_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6661 { position:absolute; left:0px; top:288px; width:128px; height:32px; } #u6662 { position:absolute; left:2px; top:8px; width:124px; visibility:hidden; word-wrap:break-word; } #u6663 { position:absolute; left:128px; top:0px; width:128px; height:192px; visibility:hidden; } #u6663_menu { position:absolute; left:-3px; top:-3px; width:134px; height:198px; } #u6664 { position:absolute; left:0px; top:0px; width:133px; height:197px; } #u6665_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6665 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6666 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6667_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6667 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6668 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6669_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6669 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6670 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6671_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6671 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6672 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6673_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6673 { position:absolute; left:0px; top:128px; width:128px; height:32px; } #u6674 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6675_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6675 { position:absolute; left:0px; top:160px; width:128px; height:32px; } #u6676 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6677 { position:absolute; left:128px; top:32px; width:128px; height:128px; visibility:hidden; } #u6677_menu { position:absolute; left:-3px; top:-3px; width:134px; height:134px; } #u6678 { position:absolute; left:0px; top:0px; width:133px; height:133px; } #u6679_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6679 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6680 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6681_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6681 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6682 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6683_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6683 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6684 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6685_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6685 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6686 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6687 { position:absolute; left:128px; top:64px; width:128px; height:224px; visibility:hidden; } #u6687_menu { position:absolute; left:-3px; top:-3px; width:134px; height:230px; } #u6688 { position:absolute; left:0px; top:0px; width:133px; height:229px; } #u6689_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6689 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6690 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6691_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6691 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6692 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6693_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6693 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6694 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6695_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6695 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6696 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6697_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6697 { position:absolute; left:0px; top:128px; width:128px; height:32px; } #u6698 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6699_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6699 { position:absolute; left:0px; top:160px; width:128px; height:32px; } #u6700 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6701_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6701 { position:absolute; left:0px; top:192px; width:128px; height:32px; } #u6702 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6703 { position:absolute; left:128px; top:96px; width:128px; height:128px; visibility:hidden; } #u6703_menu { position:absolute; left:-3px; top:-3px; width:134px; height:134px; } #u6704 { position:absolute; left:0px; top:0px; width:133px; height:133px; } #u6705_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6705 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6706 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6707_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6707 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6708 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6709_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6709 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6710 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6711_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6711 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6712 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6713 { position:absolute; left:128px; top:128px; width:128px; height:128px; visibility:hidden; } #u6713_menu { position:absolute; left:-3px; top:-3px; width:134px; height:134px; } #u6714 { position:absolute; left:0px; top:0px; width:133px; height:133px; } #u6715_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6715 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6716 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6717_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6717 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6718 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6719_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6719 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6720 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6721_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6721 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6722 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6723 { position:absolute; left:128px; top:160px; width:128px; height:64px; visibility:hidden; } #u6723_menu { position:absolute; left:-3px; top:-3px; width:134px; height:70px; } #u6724 { position:absolute; left:0px; top:0px; width:133px; height:69px; } #u6725_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6725 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6726 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6727_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6727 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6728 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6729 { position:absolute; left:128px; top:192px; width:128px; height:32px; visibility:hidden; } #u6729_menu { position:absolute; left:-3px; top:-3px; width:134px; height:38px; } #u6730 { position:absolute; left:0px; top:0px; width:133px; height:37px; } #u6731_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6731 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6732 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6733 { position:absolute; left:128px; top:224px; width:128px; height:224px; visibility:hidden; } #u6733_menu { position:absolute; left:-3px; top:-3px; width:134px; height:230px; } #u6734 { position:absolute; left:0px; top:0px; width:133px; height:229px; } #u6735_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6735 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6736 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6737_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6737 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6738 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6739_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6739 { position:absolute; left:0px; top:64px; width:128px; height:32px; } #u6740 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6741_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6741 { position:absolute; left:0px; top:96px; width:128px; height:32px; } #u6742 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6743_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6743 { position:absolute; left:0px; top:128px; width:128px; height:32px; } #u6744 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6745_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6745 { position:absolute; left:0px; top:160px; width:128px; height:32px; } #u6746 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6747_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6747 { position:absolute; left:0px; top:192px; width:128px; height:32px; } #u6748 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6749 { position:absolute; left:128px; top:256px; width:128px; height:64px; visibility:hidden; } #u6749_menu { position:absolute; left:-3px; top:-3px; width:134px; height:70px; } #u6750 { position:absolute; left:0px; top:0px; width:133px; height:69px; } #u6751_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6751 { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6752 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6753_img { position:absolute; left:0px; top:0px; width:128px; height:32px; } #u6753 { position:absolute; left:0px; top:32px; width:128px; height:32px; } #u6754 { position:absolute; left:2px; top:8px; width:124px; word-wrap:break-word; } #u6756_div { position:absolute; left:0px; top:0px; width:1024px; height:64px; background:inherit; background-color:rgba(215, 215, 215, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6756 { position:absolute; left:0px; top:0px; width:1024px; height:64px; } #u6757 { position:absolute; left:2px; top:24px; width:1020px; visibility:hidden; word-wrap:break-word; } #u6759_img { position:absolute; left:0px; top:0px; width:85px; height:29px; } #u6759 { position:absolute; left:22px; top:18px; width:85px; height:29px; font-family:'华文琥珀 Regular', '华文琥珀'; font-weight:400; font-style:normal; font-size:28px; } #u6760 { position:absolute; left:2px; top:6px; width:81px; visibility:hidden; word-wrap:break-word; } #u6761_img { position:absolute; left:0px; top:0px; width:64px; height:64px; } #u6761 { position:absolute; left:960px; top:0px; width:64px; height:64px; } #u6762 { position:absolute; left:2px; top:24px; width:60px; visibility:hidden; word-wrap:break-word; } #u6763_div { position:absolute; left:0px; top:0px; width:85px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#666666; } #u6763 { position:absolute; left:858px; top:11px; width:85px; height:16px; color:#666666; } #u6764 { position:absolute; left:0px; top:0px; width:85px; white-space:nowrap; } #u6765_div { position:absolute; left:0px; top:0px; width:29px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#666666; } #u6765 { position:absolute; left:914px; top:37px; width:29px; height:16px; color:#666666; } #u6766 { position:absolute; left:0px; top:0px; width:29px; white-space:nowrap; } #u6767_div { position:absolute; left:0px; top:0px; width:57px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6767 { position:absolute; left:138px; top:74px; width:57px; height:16px; } #u6768 { position:absolute; left:0px; top:0px; width:57px; white-space:nowrap; } #u6769_div { position:absolute; left:0px; top:0px; width:5px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6769 { position:absolute; left:205px; top:74px; width:5px; height:16px; } #u6770 { position:absolute; left:0px; top:0px; width:5px; white-space:nowrap; } #u6771_div { position:absolute; left:0px; top:0px; width:57px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6771 { position:absolute; left:219px; top:74px; width:57px; height:16px; } #u6772 { position:absolute; left:0px; top:0px; width:57px; white-space:nowrap; } #u6773_img { position:absolute; left:0px; top:0px; width:887px; height:2px; } #u6773 { position:absolute; left:138px; top:96px; width:886px; height:1px; } #u6774 { position:absolute; left:2px; top:-8px; width:882px; visibility:hidden; word-wrap:break-word; } #u6775_div { position:absolute; left:0px; top:0px; width:886px; height:149px; background:inherit; background-color:rgba(204, 204, 204, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(204, 204, 204, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6775 { position:absolute; left:138px; top:107px; width:886px; height:149px; } #u6776 { position:absolute; left:2px; top:66px; width:882px; visibility:hidden; word-wrap:break-word; } #u6777_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6777 { position:absolute; left:911px; top:192px; width:96px; height:36px; font-size:14px; color:#666666; } #u6778 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6779_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6779 { position:absolute; left:911px; top:128px; width:96px; height:36px; font-size:14px; color:#666666; } #u6780 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6781_div { position:absolute; left:0px; top:0px; width:886px; height:171px; background:inherit; background-color:rgba(255, 255, 255, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(204, 204, 204, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6781 { position:absolute; left:138px; top:320px; width:886px; height:171px; } #u6782 { position:absolute; left:2px; top:78px; width:882px; visibility:hidden; word-wrap:break-word; } #u6783_div { position:absolute; left:0px; top:0px; width:9px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6783 { position:absolute; left:219px; top:341px; width:9px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6784 { position:absolute; left:0px; top:0px; width:9px; white-space:nowrap; } #u6785_div { position:absolute; left:0px; top:0px; width:72px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6785 { position:absolute; left:291px; top:341px; width:72px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6786 { position:absolute; left:0px; top:0px; width:72px; word-wrap:break-word; } #u6787_img { position:absolute; left:-1px; top:-1px; width:858px; height:5px; } #u6787 { position:absolute; left:152px; top:367px; width:855px; height:2px; } #u6788 { position:absolute; left:2px; top:-7px; width:851px; visibility:hidden; word-wrap:break-word; } #u6789_div { position:absolute; left:0px; top:0px; width:9px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6789 { position:absolute; left:219px; top:383px; width:9px; height:16px; } #u6790 { position:absolute; left:0px; top:0px; width:9px; white-space:nowrap; } #u6791_div { position:absolute; left:0px; top:0px; width:9px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6791 { position:absolute; left:219px; top:420px; width:9px; height:16px; } #u6792 { position:absolute; left:0px; top:0px; width:9px; white-space:nowrap; } #u6793_div { position:absolute; left:0px; top:0px; width:9px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6793 { position:absolute; left:219px; top:458px; width:9px; height:16px; } #u6794 { position:absolute; left:0px; top:0px; width:9px; white-space:nowrap; } #u6795_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6795 { position:absolute; left:505px; top:383px; width:71px; height:16px; } #u6796 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6797_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6797 { position:absolute; left:505px; top:420px; width:71px; height:16px; } #u6798 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6799_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6799 { position:absolute; left:505px; top:458px; width:71px; height:16px; } #u6800 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6801_img { position:absolute; left:0px; top:0px; width:856px; height:2px; } #u6801 { position:absolute; left:152px; top:410px; width:855px; height:1px; } #u6802 { position:absolute; left:2px; top:-8px; width:851px; visibility:hidden; word-wrap:break-word; } #u6803_img { position:absolute; left:0px; top:0px; width:856px; height:2px; } #u6803 { position:absolute; left:152px; top:447px; width:855px; height:1px; } #u6804 { position:absolute; left:2px; top:-8px; width:851px; visibility:hidden; word-wrap:break-word; } #u6805 { position:absolute; left:154px; top:341px; width:52px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6806 { position:absolute; left:16px; top:0px; width:34px; word-wrap:break-word; } #u6805_input { position:absolute; left:-3px; top:-2px; } #u6807 { position:absolute; left:154px; top:383px; width:39px; height:16px; } #u6808 { position:absolute; left:16px; top:0px; width:21px; visibility:hidden; word-wrap:break-word; } #u6807_input { position:absolute; left:-3px; top:-2px; } #u6809 { position:absolute; left:154px; top:420px; width:39px; height:16px; } #u6810 { position:absolute; left:16px; top:0px; width:21px; visibility:hidden; word-wrap:break-word; } #u6809_input { position:absolute; left:-3px; top:-2px; } #u6811 { position:absolute; left:154px; top:458px; width:39px; height:16px; } #u6812 { position:absolute; left:16px; top:0px; width:21px; visibility:hidden; word-wrap:break-word; } #u6811_input { position:absolute; left:-3px; top:-2px; } #u6813 { position:absolute; left:0px; top:0px; width:0px; height:0px; } #u6814_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); border-right:0px; border-radius:5px; border-top-right-radius:0px; border-bottom-right-radius:0px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6814 { position:absolute; left:491px; top:669px; width:40px; height:36px; } #u6815 { position:absolute; left:2px; top:10px; width:36px; visibility:hidden; word-wrap:break-word; } #u6816_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6816 { position:absolute; left:649px; top:669px; width:40px; height:36px; } #u6817 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6818_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); border-left:0px; border-radius:5px; border-top-left-radius:0px; border-bottom-left-radius:0px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6818 { position:absolute; left:920px; top:669px; width:40px; height:36px; } #u6819 { position:absolute; left:2px; top:10px; width:36px; visibility:hidden; word-wrap:break-word; } #u6820_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6820 { position:absolute; left:571px; top:669px; width:40px; height:36px; } #u6821 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6822_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6822 { position:absolute; left:610px; top:669px; width:40px; height:36px; } #u6823 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6824_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6824 { position:absolute; left:688px; top:669px; width:40px; height:36px; } #u6825 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6826_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6826 { position:absolute; left:724px; top:669px; width:40px; height:36px; } #u6827 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6828_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6828 { position:absolute; left:763px; top:669px; width:40px; height:36px; } #u6829 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6830_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6830 { position:absolute; left:802px; top:669px; width:40px; height:36px; } #u6831 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6832_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6832 { position:absolute; left:841px; top:669px; width:40px; height:36px; } #u6833 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6834_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6834 { position:absolute; left:532px; top:669px; width:40px; height:36px; } #u6835 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6836_div { position:absolute; left:0px; top:0px; width:40px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(121, 121, 121, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6836 { position:absolute; left:880px; top:669px; width:40px; height:36px; } #u6837 { position:absolute; left:2px; top:10px; width:36px; word-wrap:break-word; } #u6838_img { position:absolute; left:0px; top:0px; width:30px; height:30px; } #u6838 { position:absolute; left:925px; top:672px; width:30px; height:30px; font-family:'IOS8-Icons Regular', 'IOS8-Icons'; font-weight:400; font-style:normal; font-size:28px; } #u6839 { position:absolute; left:0px; top:7px; width:30px; visibility:hidden; word-wrap:break-word; } #u6840_img { position:absolute; left:0px; top:0px; width:30px; height:30px; } #u6840 { position:absolute; left:496px; top:672px; width:30px; height:30px; font-family:'IOS8-Icons Regular', 'IOS8-Icons'; font-weight:400; font-style:normal; font-size:28px; } #u6841 { position:absolute; left:0px; top:7px; width:30px; visibility:hidden; word-wrap:break-word; } #u6843_div { position:absolute; left:0px; top:0px; width:1024px; height:64px; background:inherit; background-color:rgba(215, 215, 215, 1); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#FFFFFF; } #u6843 { position:absolute; left:0px; top:741px; width:1024px; height:64px; color:#FFFFFF; } #u6844 { position:absolute; left:2px; top:24px; width:1020px; word-wrap:break-word; } #u6845_div { position:absolute; left:0px; top:0px; width:60px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6845 { position:absolute; left:506px; top:341px; width:60px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6846 { position:absolute; left:0px; top:0px; width:60px; word-wrap:break-word; } #u6847_div { position:absolute; left:0px; top:0px; width:63px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6847 { position:absolute; left:638px; top:341px; width:63px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6848 { position:absolute; left:0px; top:0px; width:63px; word-wrap:break-word; } #u6849_div { position:absolute; left:0px; top:0px; width:36px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6849 { position:absolute; left:916px; top:341px; width:36px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6850 { position:absolute; left:0px; top:0px; width:36px; word-wrap:break-word; } #u6851_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6851 { position:absolute; left:146px; top:266px; width:96px; height:36px; font-size:14px; color:#666666; } #u6852 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6853_div { position:absolute; left:0px; top:0px; width:174px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6853 { position:absolute; left:591px; top:383px; width:174px; height:16px; } #u6854 { position:absolute; left:0px; top:0px; width:174px; word-wrap:break-word; } #u6855_div { position:absolute; left:0px; top:0px; width:72px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#0099FF; } #u6855 { position:absolute; left:898px; top:383px; width:72px; height:16px; color:#0099FF; } #u6856 { position:absolute; left:0px; top:0px; width:72px; word-wrap:break-word; } #u6857_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6857 { position:absolute; left:269px; top:266px; width:96px; height:36px; font-size:14px; color:#666666; } #u6858 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6859_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6859 { position:absolute; left:394px; top:266px; width:96px; height:36px; font-size:14px; color:#666666; } #u6860 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6861_div { position:absolute; left:0px; top:0px; width:115px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6861 { position:absolute; left:281px; top:383px; width:115px; height:16px; } #u6862 { position:absolute; left:0px; top:0px; width:115px; word-wrap:break-word; } #u6863_div { position:absolute; left:0px; top:0px; width:115px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6863 { position:absolute; left:281px; top:420px; width:115px; height:16px; } #u6864 { position:absolute; left:0px; top:0px; width:115px; word-wrap:break-word; } #u6865_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6865 { position:absolute; left:281px; top:458px; width:71px; height:16px; } #u6866 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6867_div { position:absolute; left:0px; top:0px; width:36px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6867 { position:absolute; left:791px; top:341px; width:36px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6868 { position:absolute; left:0px; top:0px; width:36px; word-wrap:break-word; } #u6869_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6869 { position:absolute; left:784px; top:383px; width:71px; height:16px; } #u6870 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6871_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6871 { position:absolute; left:784px; top:420px; width:71px; height:16px; } #u6872 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6873_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6873 { position:absolute; left:784px; top:458px; width:71px; height:16px; } #u6874 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6875_div { position:absolute; left:0px; top:0px; width:174px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6875 { position:absolute; left:591px; top:420px; width:174px; height:16px; } #u6876 { position:absolute; left:0px; top:0px; width:174px; word-wrap:break-word; } #u6877_div { position:absolute; left:0px; top:0px; width:174px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6877 { position:absolute; left:591px; top:458px; width:174px; height:16px; } #u6878 { position:absolute; left:0px; top:0px; width:174px; word-wrap:break-word; } #u6879_div { position:absolute; left:0px; top:0px; width:72px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#0099FF; } #u6879 { position:absolute; left:898px; top:420px; width:72px; height:16px; color:#0099FF; } #u6880 { position:absolute; left:0px; top:0px; width:72px; word-wrap:break-word; } #u6881_div { position:absolute; left:0px; top:0px; width:72px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#0099FF; } #u6881 { position:absolute; left:898px; top:458px; width:72px; height:16px; color:#0099FF; } #u6882 { position:absolute; left:0px; top:0px; width:72px; word-wrap:break-word; } #u6883_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6883 { position:absolute; left:411px; top:383px; width:71px; height:16px; } #u6884 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6885_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6885 { position:absolute; left:411px; top:420px; width:71px; height:16px; } #u6886 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6887_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6887 { position:absolute; left:411px; top:458px; width:71px; height:16px; } #u6888 { position:absolute; left:0px; top:0px; width:71px; word-wrap:break-word; } #u6889_div { position:absolute; left:0px; top:0px; width:42px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6889 { position:absolute; left:412px; top:341px; width:42px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6890 { position:absolute; left:0px; top:0px; width:42px; word-wrap:break-word; } #u6891_img { position:absolute; left:0px; top:0px; width:24px; height:30px; } #u6891 { position:absolute; left:1050px; top:324px; width:24px; height:30px; font-size:16px; color:#FFFFFF; } #u6892 { position:absolute; left:2px; top:2px; width:20px; word-wrap:break-word; } #u6893_img { position:absolute; left:0px; top:0px; width:24px; height:24px; } #u6893 { position:absolute; left:20px; top:856px; width:24px; height:24px; font-size:16px; color:#FFFFFF; } #u6894 { position:absolute; left:2px; top:2px; width:20px; word-wrap:break-word; } #u6895_div { position:absolute; left:0px; top:0px; width:239px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#FF00FF; } #u6895 { position:absolute; left:54px; top:860px; width:239px; height:16px; color:#FF00FF; } #u6896 { position:absolute; left:0px; top:0px; width:239px; white-space:nowrap; } #u6897_div { position:absolute; left:0px; top:0px; width:180px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(188, 188, 188, 1); border-radius:3px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6897 { position:absolute; left:211px; top:192px; width:180px; height:36px; } #u6898 { position:absolute; left:2px; top:10px; width:176px; visibility:hidden; word-wrap:break-word; } #u6899 { position:absolute; left:212px; top:193px; width:178px; height:34px; } #u6899_input { position:absolute; left:0px; top:0px; width:178px; height:34px; font-family:'Arial Normal', 'Arial'; font-weight:400; font-style:normal; font-size:13px; text-decoration:none; color:#000000; text-align:left; border-color:transparent; outline-style:none; } #u6900_img { position:absolute; left:0px; top:0px; width:12px; height:8px; } #u6900 { position:absolute; left:370px; top:206px; width:12px; height:8px; -webkit-transform:rotate(180deg); -moz-transform:rotate(180deg); -ms-transform:rotate(180deg); transform:rotate(180deg); color:#000000; } #u6901 { position:absolute; left:2px; top:-4px; width:8px; visibility:hidden; word-wrap:break-word; } #u6902_div { position:absolute; left:0px; top:0px; width:29px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6902 { position:absolute; left:146px; top:202px; width:29px; height:16px; } #u6903 { position:absolute; left:0px; top:0px; width:29px; white-space:nowrap; } #u6904_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6904 { position:absolute; left:518px; top:266px; width:96px; height:36px; font-size:14px; color:#666666; } #u6905 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6906_div { position:absolute; left:0px; top:0px; width:96px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6906 { position:absolute; left:638px; top:266px; width:96px; height:36px; font-size:14px; color:#666666; } #u6907 { position:absolute; left:2px; top:10px; width:92px; word-wrap:break-word; } #u6908_img { position:absolute; left:0px; top:0px; width:24px; height:30px; } #u6908 { position:absolute; left:1050px; top:167px; width:24px; height:30px; font-size:16px; color:#FFFFFF; } #u6909 { position:absolute; left:2px; top:2px; width:20px; word-wrap:break-word; } #u6910_img { position:absolute; left:0px; top:0px; width:24px; height:30px; } #u6910 { position:absolute; left:1050px; top:269px; width:24px; height:30px; font-size:16px; color:#FFFFFF; } #u6911 { position:absolute; left:2px; top:2px; width:20px; word-wrap:break-word; } #u6912_img { position:absolute; left:0px; top:0px; width:24px; height:24px; } #u6912 { position:absolute; left:20px; top:953px; width:24px; height:24px; font-size:16px; color:#FFFFFF; } #u6913 { position:absolute; left:2px; top:2px; width:20px; word-wrap:break-word; } #u6914_div { position:absolute; left:0px; top:0px; width:57px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#FF00FF; } #u6914 { position:absolute; left:54px; top:957px; width:57px; height:16px; color:#FF00FF; } #u6915 { position:absolute; left:0px; top:0px; width:57px; white-space:nowrap; } #u6916_img { position:absolute; left:0px; top:0px; width:24px; height:24px; } #u6916 { position:absolute; left:20px; top:1333px; width:24px; height:24px; font-size:16px; color:#FFFFFF; } #u6917 { position:absolute; left:2px; top:2px; width:20px; word-wrap:break-word; } #u6918_div { position:absolute; left:0px; top:0px; width:281px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#FF00FF; } #u6918 { position:absolute; left:54px; top:1337px; width:281px; height:16px; color:#FF00FF; } #u6919 { position:absolute; left:0px; top:0px; width:281px; white-space:nowrap; } #u6920_div { position:absolute; left:0px; top:0px; width:600px; height:240px; background:inherit; background-color:rgba(153, 153, 153, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(204, 204, 204, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6920 { position:absolute; left:54px; top:997px; width:600px; height:240px; } #u6921 { position:absolute; left:2px; top:112px; width:596px; visibility:hidden; word-wrap:break-word; } #u6922_img { position:absolute; left:0px; top:0px; width:601px; height:2px; } #u6922 { position:absolute; left:54px; top:1050px; width:600px; height:1px; } #u6923 { position:absolute; left:2px; top:-8px; width:596px; visibility:hidden; word-wrap:break-word; } #u6924_div { position:absolute; left:0px; top:0px; width:29px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6924 { position:absolute; left:72px; top:1016px; width:29px; height:16px; font-family:'Arial Negreta', 'Arial'; font-weight:700; font-style:normal; } #u6925 { position:absolute; left:0px; top:0px; width:29px; white-space:nowrap; } #u6926_div { position:absolute; left:0px; top:0px; width:71px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6926 { position:absolute; left:72px; top:1070px; width:71px; height:16px; } #u6927 { position:absolute; left:0px; top:0px; width:71px; white-space:nowrap; } #u6928_img { position:absolute; left:0px; top:0px; width:601px; height:2px; } #u6928 { position:absolute; left:54px; top:1186px; width:600px; height:1px; } #u6929 { position:absolute; left:2px; top:-8px; width:596px; visibility:hidden; word-wrap:break-word; } #u6930_div { position:absolute; left:0px; top:0px; width:120px; height:36px; background:inherit; background-color:rgba(0, 157, 217, 1); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#FFFFFF; } #u6930 { position:absolute; left:509px; top:1193px; width:120px; height:36px; font-size:14px; color:#FFFFFF; } #u6931 { position:absolute; left:2px; top:10px; width:116px; word-wrap:break-word; } #u6932_div { position:absolute; left:0px; top:0px; width:80px; height:36px; background:inherit; background-color:rgba(70, 140, 200, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(201, 201, 201, 1); border-radius:5px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; font-size:14px; color:#666666; } #u6932 { position:absolute; left:405px; top:1193px; width:80px; height:36px; font-size:14px; color:#666666; } #u6933 { position:absolute; left:2px; top:10px; width:76px; word-wrap:break-word; } #u6934_div { position:absolute; left:0px; top:0px; width:9px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6934 { position:absolute; left:629px; top:1006px; width:9px; height:16px; } #u6935 { position:absolute; left:0px; top:0px; width:9px; white-space:nowrap; } #u6936_div { position:absolute; left:0px; top:0px; width:337px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#FF00FF; } #u6936 { position:absolute; left:54px; top:1271px; width:337px; height:16px; color:#FF00FF; } #u6937 { position:absolute; left:0px; top:0px; width:337px; white-space:nowrap; } #u6938_div { position:absolute; left:0px; top:0px; width:180px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(188, 188, 188, 1); border-radius:3px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6938 { position:absolute; left:210px; top:129px; width:180px; height:36px; } #u6939 { position:absolute; left:2px; top:10px; width:176px; visibility:hidden; word-wrap:break-word; } #u6940 { position:absolute; left:211px; top:130px; width:177px; height:34px; } #u6940_input { position:absolute; left:0px; top:0px; width:177px; height:34px; font-family:'Arial Normal', 'Arial'; font-weight:400; font-style:normal; font-size:13px; text-decoration:none; color:#000000; text-align:center; border-color:transparent; outline-style:none; } #u6941_img { position:absolute; left:0px; top:0px; width:12px; height:8px; } #u6941 { position:absolute; left:369px; top:143px; width:12px; height:8px; -webkit-transform:rotate(180deg); -moz-transform:rotate(180deg); -ms-transform:rotate(180deg); transform:rotate(180deg); color:#000000; } #u6942 { position:absolute; left:2px; top:-4px; width:8px; visibility:hidden; word-wrap:break-word; } #u6943_div { position:absolute; left:0px; top:0px; width:57px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6943 { position:absolute; left:146px; top:139px; width:57px; height:16px; } #u6944 { position:absolute; left:0px; top:0px; width:57px; white-space:nowrap; } #u6945_div { position:absolute; left:0px; top:0px; width:180px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(188, 188, 188, 1); border-radius:3px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6945 { position:absolute; left:483px; top:129px; width:180px; height:36px; } #u6946 { position:absolute; left:2px; top:10px; width:176px; visibility:hidden; word-wrap:break-word; } #u6947 { position:absolute; left:484px; top:130px; width:177px; height:34px; } #u6947_input { position:absolute; left:0px; top:0px; width:177px; height:34px; font-family:'Arial Normal', 'Arial'; font-weight:400; font-style:normal; font-size:13px; text-decoration:none; color:#000000; text-align:center; border-color:transparent; outline-style:none; } #u6948_img { position:absolute; left:0px; top:0px; width:15px; height:18px; } #u6948 { position:absolute; left:411px; top:138px; width:15px; height:18px; font-family:'FontAwesome Regular', 'FontAwesome'; font-weight:400; font-style:normal; font-size:18px; text-align:left; } #u6949 { position:absolute; left:0px; top:0px; width:15px; visibility:hidden; word-wrap:break-word; } #u6950_div { position:absolute; left:0px; top:0px; width:197px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; color:#FF00FF; } #u6950 { position:absolute; left:54px; top:894px; width:197px; height:16px; color:#FF00FF; } #u6951 { position:absolute; left:0px; top:0px; width:197px; white-space:nowrap; } #u6952_div { position:absolute; left:0px; top:0px; width:57px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6952 { position:absolute; left:408px; top:202px; width:57px; height:16px; } #u6953 { position:absolute; left:0px; top:0px; width:57px; white-space:nowrap; } #u6954_div { position:absolute; left:0px; top:0px; width:182px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(188, 188, 188, 1); border-radius:3px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6954 { position:absolute; left:482px; top:192px; width:182px; height:36px; } #u6955 { position:absolute; left:2px; top:10px; width:178px; visibility:hidden; word-wrap:break-word; } #u6956 { position:absolute; left:484px; top:193px; width:178px; height:34px; } #u6956_input { position:absolute; left:0px; top:0px; width:178px; height:34px; font-family:'Arial Normal', 'Arial'; font-weight:400; font-style:normal; font-size:13px; text-decoration:none; color:#000000; text-align:center; border-color:transparent; outline-style:none; } #u6957_div { position:absolute; left:0px; top:0px; width:15px; height:16px; background:inherit; background-color:rgba(255, 255, 255, 0); -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6957 { position:absolute; left:675px; top:202px; width:15px; height:16px; } #u6958 { position:absolute; left:0px; top:0px; width:15px; white-space:nowrap; } #u6959_div { position:absolute; left:0px; top:0px; width:182px; height:36px; background:inherit; background-color:rgba(255, 255, 255, 0); box-sizing:border-box; border-width:1px; border-style:solid; border-color:rgba(188, 188, 188, 1); border-radius:3px; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } #u6959 { position:absolute; left:701px; top:192px; width:182px; height:36px; } #u6960 { position:absolute; left:2px; top:10px; width:178px; visibility:hidden; word-wrap:break-word; } #u6961 { position:absolute; left:703px; top:193px; width:178px; height:34px; } #u6961_input { position:absolute; left:0px; top:0px; width:178px; height:34px; font-family:'Arial Normal', 'Arial'; font-weight:400; font-style:normal; font-size:13px; text-decoration:none; color:#000000; text-align:center; border-color:transparent; outline-style:none; }
Java
# Lactarius peckii var. peckii VARIETY #### Status ACCEPTED #### According to Index Fungorum #### Published in Mem. Torrey bot. Club 14: 76 (1908) #### Original name Lactarius peckii var. peckii ### Remarks null
Java
/* * Copyright 2014 Richard Thurston. * * 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 com.northernwall.hadrian.handlers.service.dao; import com.northernwall.hadrian.domain.Audit; import java.util.LinkedList; import java.util.List; public class GetAuditData { public List<Audit> audits = new LinkedList<>(); }
Java
@import url('../../../assets/css/app.css'); @font-face { font-family: 'Muli'; font-style: normal; font-weight: 400; src: local('Muli'), url(../fonts/Muli.woff) format('woff'); } body { background-color: #e7a279; color: #434343; font-family: 'Muli', sans-serif; font-size: 14px; max-width: 800px; padding-bottom: 20px; } q,blockquote { font-family: 'Muli', sans-serif; } a { color: #cf7c4b; text-decoration: underline; } a:hover { color: #cf7c4b; text-decoration: none; } a:visited { color: #cf7c4b; text-decoration: line-through; } h1, h2, h3 { color: #9b6d51; margin: 0; } h3 { margin-top: 5px; margin-bottom: 5px; } header { margin: 0; padding-top: 10px; padding-bottom: 10px; border-left: 1px solid #9b6d51; border-right: 1px solid #9b6d51; border-bottom: 1px solid #9b6d51; background: #434343; } .logo { color: #CCC; } a.logo { margin-left: 8px; } a.logo:hover { color: #000; } header li a { color: #CCC; text-decoration: none; padding-top: 3px; padding-left: 9px; padding-right: 9px; padding-bottom: 3px; } header li a:hover { color: #cf7c4b; text-decoration: underline; } header li { padding-left: 0; } nav .active a { border: 1px solid #9b6d51; -moz-border-radius: 8px; border-radius: 8px; background-color: #e7a279; margin-left: 6px; margin-right: 6px; font-weight: normal; } section.page { background-color: #FFF; border-left: 1px solid #CCC; border-right: 1px solid #CCC; border-bottom: 1px solid #CCC; border-radius: 0px 0px 8px 8px; padding-bottom: 5px; padding-top: 15px; } .page-header { margin-bottom: 15px; } .page-header ul { margin-right: 5px; } .page-header li { margin: 0; padding: 0; padding-right: 5px; } .page-header h2, .page-section h2 { border-bottom: 1px dotted #CCC; font-family: 'Muli', sans-serif; font-size: 20px; font-weight: normal; margin: 0; padding: 6px 10px; } .items article { border: none; border-bottom: 1px dotted #CCC; background-color: inherit; margin-bottom: 0; padding-bottom: 10px; } .items #current-item { border: #9b6d51; } .items article:last-child { border-bottom: none; padding-bottom: 0; } .items a:hover { color: #cf7c4b; } #items-paging { margin-top: 10px; font-size: 100%; } .items .preview { font-family: 'Muli', sans-serif; } form { border: none; padding-left: 10px; } .form-actions { margin-top: 20px; } input[type='email'], input[type='tel'], input[type='password'], input[type='text'], textarea, select { -webkit-border-radius: 4px; border-radius: 4px; border: 1px solid #CCC; margin-top: 3px; padding: 5px; font-family: 'Muli', sans-serif; font-size: 15px; } input[type='email']:focus, input[type='tel']:focus, input[type='password']:focus, input[type='text']:focus, textarea:focus { border: 1px solid #cf7c4b; box-shadow: none; } /* alerts */ .alert { padding: 8px 35px 8px 14px; margin-left: 10px; margin-right: 10px; margin-bottom: 10px; color: #cf7c4b; background-color: #434343; border: 1px solid #cf7c4b; border-radius: 4px; } .alert-success { color: #cf7c4b; background-color: #434343; border-color: #cf7c4b; } .alert-error { color: #cf7c4b; background-color: #434343; border-color: #cf7c4b; } .alert-info { color: #cf7c4b; background-color: #434343; border-color: #cf7c4b; } .alert-normal { color: #cf7c4b; background-color: #434343; border-color: #cf7c4b; } /* buttons */ .btn { -webkit-appearance: none; appearance: none; display: inline-block; color: #cf7c4b; border: 1px solid #cf7c4b; background: #434343; padding: 5px; padding-left: 15px; padding-right: 15px; font-size: 90%; cursor: pointer; border-radius: 2px; } a.btn { text-decoration: none; font-weight: bold; } .btn-red { border-color: #cf7c4b; background: #434343; color: #cf7c4b; } a.btn-red:hover, .btn-red:hover, .btn-red:focus { color: #cf7c4b; background: #e7a279; } .btn-blue { border-color: #cf7c4b; background: #434343; color: #cf7c4b; } .btn-blue:hover, .btn-blue:focus { border-color: #cf7c4b; background: #e7a279; } .item { padding-bottom: 0; font-family: 'Muli', sans-serif; } .item nav span, .item nav a, .item nav a:visited { color: #cf7c4b; } .item nav.top { margin-bottom: 20px; } #login { border-radius: 8px; } @media only screen and (max-width: 480px) { body { border-left: 1px solid #CCC; border-right: 1px solid #CCC; padding-bottom: 0; } #login-page { border: none; } header { padding: 0; border: none; } header li { background-color: #FFF; } section.page { border: none; border-radius: 0; } .item { padding-bottom: 0; font-family: 'Muli', sans-serif; } }
Java
<?php /** * NewExten listener, will capture extensions as channels step by them. * * PHP Version 5 * * @category AsterTrace * @package EventHandlers * @author Marcelo Gornstein <marcelog@gmail.com> * @license http://marcelog.github.com/ Apache License 2.0 * @version SVN: $Id$ * @link http://marcelog.github.com/ * * Copyright 2011 Marcelo Gornstein <marcelog@gmail.com> * * 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. * */ namespace AsterTrace\EventHandlers; class NewExtenListener extends PDOListener { public function onNewexten($event) { $this->executeStatement($this->insertStatement, array( 'uniqueid' => $event->getUniqueId(), 'channel' => $event->getChannel(), 'app' => $event->getApplication(), 'data' => $event->getApplicationData(), 'context' => $event->getContext(), 'priority' => $event->getPriority(), 'exten' => $event->getExtension() )); } }
Java
/** * ActivateRateCardCustomizations.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.dfp.axis.v201306; /** * The action used to activate {@link RateCardCustomization} objects. */ public class ActivateRateCardCustomizations extends com.google.api.ads.dfp.axis.v201306.RateCardCustomizationAction implements java.io.Serializable { public ActivateRateCardCustomizations() { } public ActivateRateCardCustomizations( java.lang.String rateCardCustomizationActionType) { super( rateCardCustomizationActionType); } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ActivateRateCardCustomizations)) return false; ActivateRateCardCustomizations other = (ActivateRateCardCustomizations) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = super.equals(obj); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = super.hashCode(); __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(ActivateRateCardCustomizations.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201306", "ActivateRateCardCustomizations")); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
Java
<?php namespace Elastica\Filter; use Elastica\Exception\InvalidException; /** * Geo distance filter * * @category Xodoa * @package Elastica * @author Nicolas Ruflin <spam@ruflin.com> * @link http://www.elasticsearch.org/guide/reference/query-dsl/geo-distance-filter.html */ abstract class AbstractGeoDistance extends AbstractFilter { const LOCATION_TYPE_GEOHASH = 'geohash'; const LOCATION_TYPE_LATLON = 'latlon'; /** * Location type * * Decides if this filter uses latitude/longitude or geohash for the location. * Values are "latlon" or "geohash". * * @var string */ protected $_locationType = null; /** * Key * * @var string */ protected $_key = null; /** * Latitude * * @var float */ protected $_latitude = null; /** * Longitude * * @var float */ protected $_longitude = null; /** * Geohash * * @var string */ protected $_geohash = null; /** * Create GeoDistance object * * @param string $key Key * @param array|string $location Location as array or geohash: array('lat' => 48.86, 'lon' => 2.35) OR 'drm3btev3e86' * @internal param string $distance Distance */ public function __construct($key, $location) { // Key $this->setKey($key); $this->setLocation($location); } /** * @param string $key * @return \Elastica\Filter\AbstractGeoDistance current filter */ public function setKey($key) { $this->_key = $key; return $this; } /** * @param array|string $location * @return \Elastica\Filter\AbstractGeoDistance * @throws \Elastica\Exception\InvalidException */ public function setLocation($location) { // Location if (is_array($location)) { // Latitude/Longitude // Latitude if (isset($location['lat'])) { $this->setLatitude($location['lat']); } else { throw new InvalidException('$location[\'lat\'] has to be set'); } // Longitude if (isset($location['lon'])) { $this->setLongitude($location['lon']); } else { throw new InvalidException('$location[\'lon\'] has to be set'); } } elseif (is_string($location)) { // Geohash $this->setGeohash($location); } else { // Invalid location throw new InvalidException('$location has to be an array (latitude/longitude) or a string (geohash)'); } return $this; } /** * @param float $latitude * @return \Elastica\Filter\AbstractGeoDistance current filter */ public function setLatitude($latitude) { $this->_latitude = (float) $latitude; $this->_locationType = self::LOCATION_TYPE_LATLON; return $this; } /** * @param float $longitude * @return \Elastica\Filter\AbstractGeoDistance current filter */ public function setLongitude($longitude) { $this->_longitude = (float) $longitude; $this->_locationType = self::LOCATION_TYPE_LATLON; return $this; } /** * @param string $geohash * @return \Elastica\Filter\AbstractGeoDistance current filter */ public function setGeohash($geohash) { $this->_geohash = $geohash; $this->_locationType = self::LOCATION_TYPE_GEOHASH; return $this; } /** * @return array|string * @throws \Elastica\Exception\InvalidException */ protected function _getLocationData() { if ($this->_locationType === self::LOCATION_TYPE_LATLON) { // Latitude/longitude $location = array(); if (isset($this->_latitude)) { // Latitude $location['lat'] = $this->_latitude; } else { throw new InvalidException('Latitude has to be set'); } if (isset($this->_longitude)) { // Geohash $location['lon'] = $this->_longitude; } else { throw new InvalidException('Longitude has to be set'); } } elseif ($this->_locationType === self::LOCATION_TYPE_GEOHASH) { // Geohash $location = $this->_geohash; } else { // Invalid location type throw new InvalidException('Invalid location type'); } return $location; } /** * @see \Elastica\Param::toArray() * @throws \Elastica\Exception\InvalidException */ public function toArray() { $this->setParam($this->_key, $this->_getLocationData()); return parent::toArray(); } }
Java
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_26) on Mon May 07 13:00:01 PDT 2012 --> <TITLE> Uses of Class org.apache.hadoop.mapred.TaskTracker (Hadoop 0.20.2-cdh3u4 API) </TITLE> <META NAME="date" CONTENT="2012-05-07"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.hadoop.mapred.TaskTracker (Hadoop 0.20.2-cdh3u4 API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/apache/hadoop/mapred/TaskTracker.html" title="class in org.apache.hadoop.mapred"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/hadoop/mapred//class-useTaskTracker.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="TaskTracker.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> <B>Uses of Class<br>org.apache.hadoop.mapred.TaskTracker</B></H2> </CENTER> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Packages that use <A HREF="../../../../../org/apache/hadoop/mapred/TaskTracker.html" title="class in org.apache.hadoop.mapred">TaskTracker</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#org.apache.hadoop.mapred"><B>org.apache.hadoop.mapred</B></A></TD> <TD>A software framework for easily writing applications which process vast amounts of data (multi-terabyte data-sets) parallelly on large clusters (thousands of nodes) built of commodity hardware in a reliable, fault-tolerant manner.&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="org.apache.hadoop.mapred"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../org/apache/hadoop/mapred/TaskTracker.html" title="class in org.apache.hadoop.mapred">TaskTracker</A> in <A HREF="../../../../../org/apache/hadoop/mapred/package-summary.html">org.apache.hadoop.mapred</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/apache/hadoop/mapred/package-summary.html">org.apache.hadoop.mapred</A> with parameters of type <A HREF="../../../../../org/apache/hadoop/mapred/TaskTracker.html" title="class in org.apache.hadoop.mapred">TaskTracker</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>abstract &nbsp;org.apache.hadoop.mapred.TaskRunner</CODE></FONT></TD> <TD><CODE><B>Task.</B><B><A HREF="../../../../../org/apache/hadoop/mapred/Task.html#createRunner(org.apache.hadoop.mapred.TaskTracker, org.apache.hadoop.mapred.TaskTracker.TaskInProgress, org.apache.hadoop.mapred.TaskTracker.RunningJob)">createRunner</A></B>(<A HREF="../../../../../org/apache/hadoop/mapred/TaskTracker.html" title="class in org.apache.hadoop.mapred">TaskTracker</A>&nbsp;tracker, org.apache.hadoop.mapred.TaskTracker.TaskInProgress&nbsp;tip, org.apache.hadoop.mapred.TaskTracker.RunningJob&nbsp;rjob)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return an approprate thread runner for this task.</TD> </TR> </TABLE> &nbsp; <P> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/apache/hadoop/mapred/TaskTracker.html" title="class in org.apache.hadoop.mapred"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/hadoop/mapred//class-useTaskTracker.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="TaskTracker.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright &copy; 2009 The Apache Software Foundation </BODY> </HTML>
Java
/** * Copyright (C) 2015 Red Hat, Inc. * * 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 io.fabric8.kubernetes.client.dsl.internal; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; import java.nio.charset.StandardCharsets; import java.util.Map; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.api.model.ListOptions; import io.fabric8.kubernetes.client.Watcher; import io.fabric8.kubernetes.client.http.HttpClient; import io.fabric8.kubernetes.client.http.HttpRequest; import io.fabric8.kubernetes.client.http.HttpResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class WatchHTTPManager<T extends HasMetadata, L extends KubernetesResourceList<T>> extends AbstractWatchManager<T> { private static final Logger logger = LoggerFactory.getLogger(WatchHTTPManager.class); private CompletableFuture<HttpResponse<InputStream>> call; public WatchHTTPManager(final HttpClient client, final BaseOperation<T, L, ?> baseOperation, final ListOptions listOptions, final Watcher<T> watcher, final int reconnectInterval, final int reconnectLimit) throws MalformedURLException { // Default max 32x slowdown from base interval this(client, baseOperation, listOptions, watcher, reconnectInterval, reconnectLimit, 5); } public WatchHTTPManager(final HttpClient client, final BaseOperation<T, L, ?> baseOperation, final ListOptions listOptions, final Watcher<T> watcher, final int reconnectInterval, final int reconnectLimit, int maxIntervalExponent) throws MalformedURLException { super( watcher, baseOperation, listOptions, reconnectLimit, reconnectInterval, maxIntervalExponent, () -> client.newBuilder() .readTimeout(0, TimeUnit.MILLISECONDS) .forStreaming() .build()); } @Override protected synchronized void run(URL url, Map<String, String> headers) { HttpRequest.Builder builder = client.newHttpRequestBuilder().url(url); headers.forEach(builder::header); call = client.sendAsync(builder.build(), InputStream.class); call.whenComplete((response, t) -> { if (!call.isCancelled() && t != null) { logger.info("Watch connection failed. reason: {}", t.getMessage()); } if (response != null) { try (InputStream body = response.body()){ if (!response.isSuccessful()) { if (onStatus(OperationSupport.createStatus(response.code(), response.message()))) { return; // terminal state } } else { resetReconnectAttempts(); BufferedReader source = new BufferedReader(new InputStreamReader(body, StandardCharsets.UTF_8)); String message = null; while ((message = source.readLine()) != null) { onMessage(message); } } } catch (Exception e) { logger.info("Watch terminated unexpectedly. reason: {}", e.getMessage()); } } if (!call.isCancelled()) { scheduleReconnect(); } }); } @Override protected synchronized void closeRequest() { if (call != null) { call.cancel(true); call = null; } } }
Java
<?php declare(strict_types=1); /** * DO NOT EDIT THIS FILE as it will be overwritten by the Pbj compiler. * @link https://github.com/gdbots/pbjc-php * * Returns an array of curies using mixin "triniti:curator:mixin:has-related-teasers:v1" * @link http://schemas.triniti.io/json-schema/triniti/curator/mixin/has-related-teasers/1-0-0.json# */ return [ ];
Java
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_151) on Tue Dec 12 12:37:08 MST 2017 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>HTTPAcceptorSupplier (BOM: * : All 2012.12.0 API)</title> <meta name="date" content="2017-12-12"> <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="HTTPAcceptorSupplier (BOM: * : All 2012.12.0 API)"; } } catch(err) { } //--> var methods = {"i0":6}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/HTTPAcceptorSupplier.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">WildFly Swarm API, 2012.12.0</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/HTTPAcceptorConsumer.html" title="interface in org.wildfly.swarm.config.messaging.activemq.server"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/HTTPConnector.html" title="class in org.wildfly.swarm.config.messaging.activemq.server"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../../../index.html?org/wildfly/swarm/config/messaging/activemq/server/HTTPAcceptorSupplier.html" target="_top">Frames</a></li> <li><a href="HTTPAcceptorSupplier.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">org.wildfly.swarm.config.messaging.activemq.server</div> <h2 title="Interface HTTPAcceptorSupplier" class="title">Interface HTTPAcceptorSupplier&lt;T extends <a href="../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/HTTPAcceptor.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">HTTPAcceptor</a>&gt;</h2> </div> <div class="contentContainer"> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>Functional Interface:</dt> <dd>This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.</dd> </dl> <hr> <br> <pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/FunctionalInterface.html?is-external=true" title="class or interface in java.lang">@FunctionalInterface</a> public interface <span class="typeNameLabel">HTTPAcceptorSupplier&lt;T extends <a href="../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/HTTPAcceptor.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">HTTPAcceptor</a>&gt;</span></pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code><a href="../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/HTTPAcceptor.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">HTTPAcceptor</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/HTTPAcceptorSupplier.html#get--">get</a></span>()</code> <div class="block">Constructed instance of HTTPAcceptor resource</div> </td> </tr> </table> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="get--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>get</h4> <pre><a href="../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/HTTPAcceptor.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">HTTPAcceptor</a>&nbsp;get()</pre> <div class="block">Constructed instance of HTTPAcceptor resource</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>The instance</dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/HTTPAcceptorSupplier.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">WildFly Swarm API, 2012.12.0</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/HTTPAcceptorConsumer.html" title="interface in org.wildfly.swarm.config.messaging.activemq.server"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/HTTPConnector.html" title="class in org.wildfly.swarm.config.messaging.activemq.server"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../../../index.html?org/wildfly/swarm/config/messaging/activemq/server/HTTPAcceptorSupplier.html" target="_top">Frames</a></li> <li><a href="HTTPAcceptorSupplier.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2017 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p> </body> </html>
Java
/** * Copyright 2019, Google LLC * * 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. */ const functions = require('firebase-functions'); const { google } = require('googleapis'); const { firestore } = require('../admin'); /** * Return a Promise to obtain the device from Cloud IoT Core */ function getDevice(client, deviceId) { return new Promise((resolve, reject) => { const projectId = process.env.GCLOUD_PROJECT; const parentName = `projects/${projectId}/locations/${functions.config().cloudiot.region}`; const registryName = `${parentName}/registries/${functions.config().cloudiot.registry}`; const request = { name: `${registryName}/devices/${deviceId}` }; client.projects.locations.registries.devices.get(request, (err, resp) => { if (err) { return reject(err); } else { resolve(resp.data); } }); }); } /** * Validate that the public key provided by the pending device matches * the key currently stored in IoT Core for that device id. * * Method throws an error if the keys do not match. */ function verifyDeviceKey(pendingDevice, deviceKey) { // Convert the pending key into PEM format const chunks = pendingDevice.public_key.match(/(.{1,64})/g); chunks.unshift('-----BEGIN PUBLIC KEY-----'); chunks.push('-----END PUBLIC KEY-----'); const pendingKey = chunks.join('\n'); if (deviceKey !== pendingKey) throw new Error(`Public Key Mismatch:\nExpected: ${deviceKey}\nReceived: ${pendingKey}`); } /** * Cloud Function: Verify IoT device and add to user */ module.exports = functions.firestore.document('pending/{device}').onWrite(async (change, context) => { const deviceId = context.params.device; // Verify this is either a create or update if (!change.after.exists) { console.log(`Pending device removed for ${deviceId}`); return; } console.log(`Pending device created for ${deviceId}`); const pending = change.after.data(); // Create a new Cloud IoT client const auth = await google.auth.getClient({ scopes: ['https://www.googleapis.com/auth/cloud-platform'] }); const client = google.cloudiot({ version: 'v1', auth: auth }); try { // Verify device does NOT already exist in Firestore const deviceRef = firestore.doc(`devices/${deviceId}`); const deviceDoc = await deviceRef.get(); if (deviceDoc.exists) throw new Error(`${deviceId} is already registered to another user`); // Verify device exists in IoT Core const result = await getDevice(client, deviceId); // Verify the device public key verifyDeviceKey(pending, result.credentials[0].publicKey.key.trim()); // Verify the device type let configValue = null; switch (pending.type) { case 'light': configValue = require('./default-light.json'); break; case 'thermostat': configValue = require('./default-thermostat.json'); break; default: throw new Error(`Invalid device type found in ${deviceId}: ${pending.type}`); } // Commit the following changes together const batch = firestore.batch(); // Insert valid device for the requested owner const device = { name: pending.serial_number, owner: pending.owner, type: pending.type, online: false }; batch.set(deviceRef, device); // Generate a default configuration const configRef = firestore.doc(`device-configs/${deviceId}`); const config = { owner: pending.owner, value: configValue }; batch.set(configRef, config); // Remove the pending device entry batch.delete(change.after.ref); await batch.commit(); console.log(`Added device ${deviceId} for user ${pending.owner}`); } catch (error) { // Device does not exist in IoT Core or key doesn't match console.error('Unable to register new device', error); } });
Java
package com.google.api.ads.adwords.jaxws.v201406.cm; import java.util.List; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; /** * * Service used to manage campaign feed links, and matching functions. * * * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.4-b01 * Generated source version: 2.1 * */ @WebService(name = "CampaignFeedServiceInterface", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406") @XmlSeeAlso({ ObjectFactory.class }) public interface CampaignFeedServiceInterface { /** * * Returns a list of CampaignFeeds that meet the selector criteria. * * @param selector Determines which CampaignFeeds to return. If empty all * Campaign feeds are returned. * @return The list of CampaignFeeds. * @throws ApiException Indicates a problem with the request. * * * @param selector * @return * returns com.google.api.ads.adwords.jaxws.v201406.cm.CampaignFeedPage * @throws ApiException_Exception */ @WebMethod @WebResult(name = "rval", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406") @RequestWrapper(localName = "get", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406", className = "com.google.api.ads.adwords.jaxws.v201406.cm.CampaignFeedServiceInterfaceget") @ResponseWrapper(localName = "getResponse", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406", className = "com.google.api.ads.adwords.jaxws.v201406.cm.CampaignFeedServiceInterfacegetResponse") public CampaignFeedPage get( @WebParam(name = "selector", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406") Selector selector) throws ApiException_Exception ; /** * * Adds, sets or removes CampaignFeeds. * * @param operations The operations to apply. * @return The resulting Feeds. * @throws ApiException Indicates a problem with the request. * * * @param operations * @return * returns com.google.api.ads.adwords.jaxws.v201406.cm.CampaignFeedReturnValue * @throws ApiException_Exception */ @WebMethod @WebResult(name = "rval", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406") @RequestWrapper(localName = "mutate", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406", className = "com.google.api.ads.adwords.jaxws.v201406.cm.CampaignFeedServiceInterfacemutate") @ResponseWrapper(localName = "mutateResponse", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406", className = "com.google.api.ads.adwords.jaxws.v201406.cm.CampaignFeedServiceInterfacemutateResponse") public CampaignFeedReturnValue mutate( @WebParam(name = "operations", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406") List<CampaignFeedOperation> operations) throws ApiException_Exception ; /** * * Returns a list of {@link CampaignFeed}s inside a {@link CampaignFeedPage} that matches * the query. * * @param query The SQL-like AWQL query string. * @throws ApiException when there are one or more errors with the request. * * * @param query * @return * returns com.google.api.ads.adwords.jaxws.v201406.cm.CampaignFeedPage * @throws ApiException_Exception */ @WebMethod @WebResult(name = "rval", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406") @RequestWrapper(localName = "query", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406", className = "com.google.api.ads.adwords.jaxws.v201406.cm.CampaignFeedServiceInterfacequery") @ResponseWrapper(localName = "queryResponse", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406", className = "com.google.api.ads.adwords.jaxws.v201406.cm.CampaignFeedServiceInterfacequeryResponse") public CampaignFeedPage query( @WebParam(name = "query", targetNamespace = "https://adwords.google.com/api/adwords/cm/v201406") String query) throws ApiException_Exception ; }
Java
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Test lasp_SUITE:enforce_once_test result</title> <meta http-equiv="cache-control" content="no-cache"></meta> <meta http-equiv="content-type" content="text/html; charset=utf-8"></meta> <link rel="stylesheet" href="../../ct_default.css" type="text/css"></link> <script type="text/javascript" src="../../jquery-latest.js"></script> <script type="text/javascript" src="../../jquery.tablesorter.min.js"></script> </head> <body> <a name="top"></a><pre> === Test case: <a href="lasp_suite.src.html#enforce_once_test-1">lasp_SUITE:enforce_once_test/1</a> (click for source code) === Config value: [{watchdog,&lt;0.501.0&gt;}, {tc_logfile,"/Users/anne-francevanswieten/lasp/_build/test/logs/ct_run.nonode@nohost.2017-05-05_21.47.49/lib.lasp.lasp_SUITE.logs/run.2017-05-05_21.47.49/lasp_suite.enforce_once_test.html"}, {tc_group_properties,[]}, {tc_group_path,[]}, {data_dir,"/Users/anne-francevanswieten/lasp/_build/test/lib/lasp/test/lasp_SUITE_data/"}, {priv_dir,"/Users/anne-francevanswieten/lasp/_build/test/logs/ct_run.nonode@nohost.2017-05-05_21.47.49/lib.lasp.lasp_SUITE.logs/run.2017-05-05_21.47.49/log_private/"}] === Current directory is "/Users/anne-francevanswieten/lasp/_build/test/logs/ct_run.nonode@nohost.2017-05-05_21.47.49" === Started at 2017-05-05 21:53:12 <br /> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.275 ***</b> Beginning case: enforce_once_test </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.291 ***</b> 21:53:12.291 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'runner@MacBook-Pro-de-Anne-France' </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.334 ***</b> 21:53:12.334 [info] Application partisan started on node 'runner@MacBook-Pro-de-Anne-France' </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.334 ***</b> 21:53:12.334 [info] Setting jitter: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.337 ***</b> 21:53:12.337 [info] Setting tutorial: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.340 ***</b> 21:53:12.339 [info] Setting event interval: 0 </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.342 ***</b> 21:53:12.342 [info] Setting max events: 1000 </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.345 ***</b> 21:53:12.345 [info] Setting extended logging: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.349 ***</b> 21:53:12.349 [info] Setting mailbox logging: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.352 ***</b> 21:53:12.352 [info] Setting operation mode: state_based </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.355 ***</b> 21:53:12.355 [info] Setting set type: orset </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.360 ***</b> 21:53:12.360 [info] Setting broadcast: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.403 ***</b> 21:53:12.403 [info] Membership: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.406 ***</b> 21:53:12.406 [info] Workflow: true </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.417 ***</b> 21:53:12.417 [info] AdClientEnabled: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.422 ***</b> 21:53:12.422 [info] AdServerEnabled: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.425 ***</b> 21:53:12.425 [info] TournClientEnabled: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.428 ***</b> 21:53:12.427 [info] TournServerEnabled: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.430 ***</b> 21:53:12.430 [info] ThroughputType: gset </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.433 ***</b> 21:53:12.433 [info] ThroughputClientEnabled: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.435 ***</b> 21:53:12.435 [info] ThroughputServerEnabled: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.438 ***</b> 21:53:12.438 [info] DivergenceType: gcounter </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.441 ***</b> 21:53:12.440 [info] DivergenceClientEnabled: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.443 ***</b> 21:53:12.443 [info] DivergenceServerEnabled: false </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:12.456 ***</b> 21:53:12.456 [info] Application lasp started on node 'runner@MacBook-Pro-de-Anne-France' </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:13.717 ***</b> 21:53:13.716 [info] Enabling membership... </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:13.718 ***</b> 21:53:13.718 [info] Disabling blocking sync... </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:13.723 ***</b> 21:53:13.722 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'node-1@MacBook-Pro-de-Anne-France' </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:15.261 ***</b> 21:53:15.261 [info] Enabling membership... </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:15.263 ***</b> 21:53:15.263 [info] Disabling blocking sync... </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:15.268 ***</b> 21:53:15.268 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'node-2@MacBook-Pro-de-Anne-France' </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:16.774 ***</b> 21:53:16.774 [info] Enabling membership... </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:16.776 ***</b> 21:53:16.776 [info] Disabling blocking sync... </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:16.781 ***</b> 21:53:16.781 [info] Configured peer_service_manager partisan_default_peer_service_manager on node 'node-3@MacBook-Pro-de-Anne-France' </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:17.029 ***</b> Joining node: 'node-3@MacBook-Pro-de-Anne-France' to 'runner@MacBook-Pro-de-Anne-France' at port 52183 </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:17.030 ***</b> Joining issued: 'node-3@MacBook-Pro-de-Anne-France' to 'runner@MacBook-Pro-de-Anne-France' at port 52183 </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:17.031 ***</b> Joining node: 'node-2@MacBook-Pro-de-Anne-France' to 'runner@MacBook-Pro-de-Anne-France' at port 52166 </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:17.032 ***</b> Joining issued: 'node-2@MacBook-Pro-de-Anne-France' to 'runner@MacBook-Pro-de-Anne-France' at port 52166 </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:17.032 ***</b> Joining node: 'node-1@MacBook-Pro-de-Anne-France' to 'runner@MacBook-Pro-de-Anne-France' at port 52154 </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:17.033 ***</b> Joining issued: 'node-1@MacBook-Pro-de-Anne-France' to 'runner@MacBook-Pro-de-Anne-France' at port 52154 </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:17.094 ***</b> Waiting for join to complete with manager: partisan_default_peer_service_manager </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:17.096 ***</b> Finished. </pre></div> <pre> </pre> <div class="ct_internal"><pre><b>*** CT 2017-05-05 21:53:17.096 *** COVER INFO</b> Adding nodes to cover test: ['runner@MacBook-Pro-de-Anne-France'] </pre></div> <pre> </pre> <div class="ct_internal"><pre><b>*** CT 2017-05-05 21:53:17.105 *** COVER INFO</b> Successfully added nodes to cover test: [] </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:17.105 ***</b> 21:53:17.105 [info] Manager: partisan_default_peer_service_manager </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:17.105 ***</b> 21:53:17.105 [info] Nodes: ['runner@MacBook-Pro-de-Anne-France','node-3@MacBook-Pro-de-Anne-France','node-2@MacBook-Pro-de-Anne-France','node-1@MacBook-Pro-de-Anne-France'] </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:17.105 ***</b> 21:53:17.105 [info] Waiting for cluster to stabilize. </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:27.112 ***</b> 21:53:27.112 [info] Adding invariant on node: 'node-1@MacBook-Pro-de-Anne-France'! </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:27.113 ***</b> 21:53:27.113 [info] Invariant configured! </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:27.142 ***</b> 21:53:27.142 [info] Waiting for response... </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:27.142 ***</b> 21:53:27.142 [info] Finished enforce_once test. </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:27.142 ***</b> Case finished: enforce_once_test </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:34.190 ***</b> 21:53:34.190 [info] Application lasp exited with reason: stopped </pre></div> <pre> </pre> <div class="default"><pre><b>*** User 2017-05-05 21:53:34.192 ***</b> 21:53:34.192 [info] Application partisan exited with reason: stopped </pre></div> <pre> <a name="end"></a> === Ended at 2017-05-05 21:53:34 === successfully completed test case === Returned value: ok </pre> <center> <br /><hr /><p> <a href="../../../all_runs.html">Test run history </a> | <a href="../../../index.html">Top level test index </a> </p> <div class="copyright">Copyright &copy; 2017 <a href="http://www.erlang.org">Open Telecom Platform</a><br /> Updated: <!--date-->Fri May 05 2017 21:53:12<!--/date--><br /> </div> </center> </body> </html>
Java
/* * Licensed to Metamarkets Group Inc. (Metamarkets) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Metamarkets licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package io.druid.query.extraction; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.metamx.common.StringUtils; import java.nio.ByteBuffer; import java.util.regex.Matcher; import java.util.regex.Pattern; /** */ public class MatchingDimExtractionFn extends DimExtractionFn { private final String expr; private final Pattern pattern; @JsonCreator public MatchingDimExtractionFn( @JsonProperty("expr") String expr ) { Preconditions.checkNotNull(expr, "expr must not be null"); this.expr = expr; this.pattern = Pattern.compile(expr); } @Override public byte[] getCacheKey() { byte[] exprBytes = StringUtils.toUtf8(expr); return ByteBuffer.allocate(1 + exprBytes.length) .put(ExtractionCacheHelper.CACHE_TYPE_ID_MATCHING_DIM) .put(exprBytes) .array(); } @Override public String apply(String dimValue) { Matcher matcher = pattern.matcher(Strings.nullToEmpty(dimValue)); return matcher.find() ? Strings.emptyToNull(dimValue) : null; } @JsonProperty("expr") public String getExpr() { return expr; } @Override public boolean preservesOrdering() { return false; } @Override public ExtractionType getExtractionType() { return ExtractionType.MANY_TO_ONE; } @Override public String toString() { return String.format("regex_matches(%s)", expr); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } MatchingDimExtractionFn that = (MatchingDimExtractionFn) o; if (!expr.equals(that.expr)) { return false; } return true; } @Override public int hashCode() { return expr.hashCode(); } }
Java
/* * Copyright 2009-2020 Aarhus University * * 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 dk.brics.tajs.analysis.dom.event; import dk.brics.tajs.analysis.InitialStateBuilder; import dk.brics.tajs.analysis.PropVarOperations; import dk.brics.tajs.analysis.Solver; import dk.brics.tajs.analysis.dom.DOMObjects; import dk.brics.tajs.analysis.dom.DOMWindow; import dk.brics.tajs.lattice.ObjectLabel; import dk.brics.tajs.lattice.State; import dk.brics.tajs.lattice.Value; import static dk.brics.tajs.analysis.dom.DOMFunctions.createDOMProperty; public class EventException { public static ObjectLabel CONSTRUCTOR; public static ObjectLabel PROTOTYPE; public static ObjectLabel INSTANCES; public static void build(Solver.SolverInterface c) { State s = c.getState(); PropVarOperations pv = c.getAnalysis().getPropVarOperations(); CONSTRUCTOR = ObjectLabel.make(DOMObjects.EVENT_EXCEPTION_CONSTRUCTOR, ObjectLabel.Kind.FUNCTION); PROTOTYPE = ObjectLabel.make(DOMObjects.EVENT_EXCEPTION_PROTOTYPE, ObjectLabel.Kind.OBJECT); INSTANCES = ObjectLabel.make(DOMObjects.EVENT_EXCEPTION_INSTANCES, ObjectLabel.Kind.OBJECT); // Constructor Object s.newObject(CONSTRUCTOR); pv.writePropertyWithAttributes(CONSTRUCTOR, "length", Value.makeNum(0).setAttributes(true, true, true)); pv.writePropertyWithAttributes(CONSTRUCTOR, "prototype", Value.makeObject(PROTOTYPE).setAttributes(true, true, true)); s.writeInternalPrototype(CONSTRUCTOR, Value.makeObject(InitialStateBuilder.OBJECT_PROTOTYPE)); pv.writeProperty(DOMWindow.WINDOW, "EventException", Value.makeObject(CONSTRUCTOR)); // Prototype object. s.newObject(PROTOTYPE); s.writeInternalPrototype(PROTOTYPE, Value.makeObject(InitialStateBuilder.OBJECT_PROTOTYPE)); // Multiplied object. s.newObject(INSTANCES); s.writeInternalPrototype(INSTANCES, Value.makeObject(PROTOTYPE)); /* * Properties. */ createDOMProperty(INSTANCES, "code", Value.makeAnyNumUInt(), c); s.multiplyObject(INSTANCES); INSTANCES = INSTANCES.makeSingleton().makeSummary(); /* * Constants. */ createDOMProperty(PROTOTYPE, "UNSPECIFIED_EVENT_TYPE_ERR", Value.makeNum(0), c); /* * Functions. */ } }
Java
package com.svcet.cashportal.service; import com.svcet.cashportal.web.beans.UserRequest; import com.svcet.cashportal.web.beans.UserRolesScreenRequest; import com.svcet.cashportal.web.beans.UserRolesScreenResponse; public interface UserRoleService { UserRolesScreenResponse editUserRoles(UserRequest userRequest); void updateUserRoles(UserRolesScreenRequest userRolesScreenRequest); }
Java
# New-VSRoboMakerRobot ## SYNOPSIS Adds an AWS::RoboMaker::Robot resource to the template. The AWS::RoboMaker::RobotApplication resource creates an AWS RoboMaker robot. ## SYNTAX ``` New-VSRoboMakerRobot [-LogicalId] <String> [-Fleet <Object>] -Architecture <Object> -GreengrassGroupId <Object> [-Tags <Object>] [-Name <Object>] [-DeletionPolicy <String>] [-UpdateReplacePolicy <String>] [-DependsOn <String[]>] [-Metadata <Object>] [-UpdatePolicy <Object>] [-Condition <Object>] [<CommonParameters>] ``` ## DESCRIPTION Adds an AWS::RoboMaker::Robot resource to the template. The AWS::RoboMaker::RobotApplication resource creates an AWS RoboMaker robot. ## PARAMETERS ### -LogicalId The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance. ```yaml Type: String Parameter Sets: (All) Aliases: Required: True Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Fleet The Amazon Resource Name ARN of the fleet to which the robot will be registered. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-robomaker-robot.html#cfn-robomaker-robot-fleet PrimitiveType: String UpdateType: Immutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Architecture The architecture of the robot. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-robomaker-robot.html#cfn-robomaker-robot-architecture PrimitiveType: String UpdateType: Immutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -GreengrassGroupId The Greengrass group associated with the robot. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-robomaker-robot.html#cfn-robomaker-robot-greengrassgroupid PrimitiveType: String UpdateType: Immutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Tags A map that contains tag keys and tag values that are attached to the robot. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-robomaker-robot.html#cfn-robomaker-robot-tags PrimitiveType: Json UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Name The name of the robot. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-robomaker-robot.html#cfn-robomaker-robot-name PrimitiveType: String UpdateType: Immutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -DeletionPolicy With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default. To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks. You must use one of the following options: "Delete","Retain","Snapshot" ```yaml Type: String Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -UpdateReplacePolicy Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation. When you initiate a stack update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template and parameters. If you update a resource property that requires that the resource be replaced, AWS CloudFormation recreates the resource during the update. Recreating the resource generates a new physical ID. AWS CloudFormation creates the replacement resource first, and then changes references from other dependent resources to point to the replacement resource. By default, AWS CloudFormation then deletes the old resource. Using the UpdateReplacePolicy, you can specify that AWS CloudFormation retain or (in some cases) create a snapshot of the old resource. For resources that support snapshots, such as AWS::EC2::Volume, specify Snapshot to have AWS CloudFormation create a snapshot before deleting the old resource instance. You can apply the UpdateReplacePolicy attribute to any resource. UpdateReplacePolicy is only executed if you update a resource property whose update behavior is specified as Replacement, thereby causing AWS CloudFormation to replace the old resource with a new one with a new physical ID. For example, if you update the Engine property of an AWS::RDS::DBInstance resource type, AWS CloudFormation creates a new resource and replaces the current DB instance resource with the new one. The UpdateReplacePolicy attribute would then dictate whether AWS CloudFormation deleted, retained, or created a snapshot of the old DB instance. The update behavior for each property of a resource is specified in the reference topic for that resource in the AWS Resource and Property Types Reference. For more information on resource update behavior, see Update Behaviors of Stack Resources. The UpdateReplacePolicy attribute applies to stack updates you perform directly, as well as stack updates performed using change sets. Note Resources that are retained continue to exist and continue to incur applicable charges until you delete those resources. Snapshots that are created with this policy continue to exist and continue to incur applicable charges until you delete those snapshots. UpdateReplacePolicy retains the old physical resource or snapshot, but removes it from AWS CloudFormation's scope. UpdateReplacePolicy differs from the DeletionPolicy attribute in that it only applies to resources replaced during stack updates. Use DeletionPolicy for resources deleted when a stack is deleted, or when the resource definition itself is deleted from the template as part of a stack update. You must use one of the following options: "Delete","Retain","Snapshot" ```yaml Type: String Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -DependsOn With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute. This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created. ```yaml Type: String[] Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Metadata The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values. You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI. ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -UpdatePolicy Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group. You must use the "Add-UpdatePolicy" function here. ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Condition Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned. ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### Vaporshell.Resource.RoboMaker.Robot ## NOTES ## RELATED LINKS [http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-robomaker-robot.html](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-robomaker-robot.html)
Java
package com.igoldin.qa.school.appmanager; import com.igoldin.qa.school.model.ContactData; import com.igoldin.qa.school.model.Contacts; import com.igoldin.qa.school.model.GroupData; import com.igoldin.qa.school.model.Groups; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.boot.MetadataSources; import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import java.util.List; public class DbHelper { private final SessionFactory sessionFactory; public DbHelper() { // A SessionFactory is set up once for an application! final StandardServiceRegistry registry = new StandardServiceRegistryBuilder() .configure() // configures settings from hibernate.cfg.xml .build(); sessionFactory = new MetadataSources( registry ).buildMetadata().buildSessionFactory(); } public Groups groups() { Session session = sessionFactory.openSession(); session.beginTransaction(); List<GroupData> result = session.createQuery("from GroupData" ).list(); session.getTransaction().commit(); session.close(); return new Groups(result); } public Contacts contacts() { Session session = sessionFactory.openSession(); session.beginTransaction(); List<ContactData> result = session.createQuery("from ContactData where deprecated = '0000-00-00 00:00:00'" ).list(); session.getTransaction().commit(); session.close(); return new Contacts(result); } }
Java
# All Rights Reserved. # # 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. """Tests for nova websocketproxy.""" import mock from nova.console import websocketproxy from nova import exception from nova import test class NovaProxyRequestHandlerBaseTestCase(test.TestCase): def setUp(self): super(NovaProxyRequestHandlerBaseTestCase, self).setUp() self.wh = websocketproxy.NovaProxyRequestHandlerBase() self.wh.socket = mock.MagicMock() self.wh.msg = mock.MagicMock() self.wh.do_proxy = mock.MagicMock() self.wh.headers = mock.MagicMock() @mock.patch('nova.consoleauth.rpcapi.ConsoleAuthAPI.check_token') def test_new_websocket_client(self, check_token): check_token.return_value = { 'host': 'node1', 'port': '10000' } self.wh.socket.return_value = '<socket>' self.wh.path = "ws://127.0.0.1/?token=123-456-789" self.wh.new_websocket_client() check_token.assert_called_with(mock.ANY, token="123-456-789") self.wh.socket.assert_called_with('node1', 10000, connect=True) self.wh.do_proxy.assert_called_with('<socket>') @mock.patch('nova.consoleauth.rpcapi.ConsoleAuthAPI.check_token') def test_new_websocket_client_token_invalid(self, check_token): check_token.return_value = False self.wh.path = "ws://127.0.0.1/?token=XXX" self.assertRaises(exception.InvalidToken, self.wh.new_websocket_client) check_token.assert_called_with(mock.ANY, token="XXX") @mock.patch('nova.consoleauth.rpcapi.ConsoleAuthAPI.check_token') def test_new_websocket_client_novnc(self, check_token): check_token.return_value = { 'host': 'node1', 'port': '10000' } self.wh.socket.return_value = '<socket>' self.wh.path = "http://127.0.0.1/" self.wh.headers.getheader.return_value = "token=123-456-789" self.wh.new_websocket_client() check_token.assert_called_with(mock.ANY, token="123-456-789") self.wh.socket.assert_called_with('node1', 10000, connect=True) self.wh.do_proxy.assert_called_with('<socket>') @mock.patch('nova.consoleauth.rpcapi.ConsoleAuthAPI.check_token') def test_new_websocket_client_novnc_token_invalid(self, check_token): check_token.return_value = False self.wh.path = "http://127.0.0.1/" self.wh.headers.getheader.return_value = "token=XXX" self.assertRaises(exception.InvalidToken, self.wh.new_websocket_client) check_token.assert_called_with(mock.ANY, token="XXX") @mock.patch('nova.consoleauth.rpcapi.ConsoleAuthAPI.check_token') def test_new_websocket_client_internal_access_path(self, check_token): check_token.return_value = { 'host': 'node1', 'port': '10000', 'internal_access_path': 'vmid' } tsock = mock.MagicMock() tsock.recv.return_value = "HTTP/1.1 200 OK\r\n\r\n" self.wh.socket.return_value = tsock self.wh.path = "ws://127.0.0.1/?token=123-456-789" self.wh.new_websocket_client() check_token.assert_called_with(mock.ANY, token="123-456-789") self.wh.socket.assert_called_with('node1', 10000, connect=True) self.wh.do_proxy.assert_called_with(tsock) @mock.patch('nova.consoleauth.rpcapi.ConsoleAuthAPI.check_token') def test_new_websocket_client_internal_access_path_err(self, check_token): check_token.return_value = { 'host': 'node1', 'port': '10000', 'internal_access_path': 'xxx' } tsock = mock.MagicMock() tsock.recv.return_value = "HTTP/1.1 500 Internal Server Error\r\n\r\n" self.wh.socket.return_value = tsock self.wh.path = "ws://127.0.0.1/?token=123-456-789" self.assertRaises(Exception, self.wh.new_websocket_client) # noqa check_token.assert_called_with(mock.ANY, token="123-456-789")
Java
<?php /** * User: shenzhe * Date: 13-6-17 * */ namespace ZPHP\Rank; use ZPHP\Core\Factory as CFactory; use ZPHP\Core\Config as ZConfig; class Factory { public static function getInstance($adapter = 'Redis', $config = null) { if (empty($config)) { $config = ZConfig::get('rank'); if (!empty($config['adapter'])) { $adapter = $config['adapter']; } } $className = __NAMESPACE__ . "\\Adapter\\{$adapter}"; return CFactory::getInstance($className, $config); } }
Java
package org.netbeans.modules.manifestsupport.dataobject; import org.openide.loaders.DataNode; import org.openide.nodes.Children; public class ManifestDataNode extends DataNode { private static final String IMAGE_ICON_BASE = "SET/PATH/TO/ICON/HERE"; public ManifestDataNode(ManifestDataObject obj) { super(obj, Children.LEAF); // setIconBaseWithExtension(IMAGE_ICON_BASE); } // /** Creates a property sheet. */ // protected Sheet createSheet() { // Sheet s = super.createSheet(); // Sheet.Set ss = s.get(Sheet.PROPERTIES); // if (ss == null) { // ss = Sheet.createPropertiesSet(); // s.put(ss); // } // // TODO add some relevant properties: ss.put(...) // return s; // } }
Java
<?php session_start(); if(isset($_SESSION['id'])) { $zoubouboubou=$_SESSION['mail']; $id_etudiant=$_SESSION['id']; require_once("includes/connexion.php"); $sql="SELECT id, mail FROM compte_etudiant WHERE id='$id_etudiant'"; $req=mysql_query($sql); $ligne=mysql_fetch_assoc($req); if($id_etudiant==$ligne['id']) { if (isset($_GET['section'])) { $sql="DELETE FROM compte_etudiant WHERE mail='$zoubouboubou'"; mysql_query($sql); mysql_close($db); header('location:index.php'); exit; } elseif (isset($_GET['numeri'])) { $sql="DELETE FROM commande_new WHERE id_etudiant='$id_etudiant'"; mysql_query($sql); mysql_close($db); header('location:accueilUtilisateur.php'); exit; } else { header('location:connexion.php'); exit; } } } else { header('location:index.php'); exit; }
Java
using Aggregator.Core.Monitoring; namespace Aggregator.Core.Configuration { using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Xml; using System.Xml.Linq; using System.Xml.Schema; #pragma warning disable S101 // Types should be named in camel case /// <summary> /// This class represents Core settings as properties /// </summary> /// <remarks>Marked partial to apply nested trick</remarks> public partial class TFSAggregatorSettings #pragma warning restore S101 // Types should be named in camel case { private static readonly char[] ListSeparators = new char[] { ',', ';' }; /// <summary> /// Load configuration from file. Main scenario. /// </summary> /// <param name="settingsPath">Path to policies file</param> /// <param name="logger">Logging object</param> /// <returns>An instance of <see cref="TFSAggregatorSettings"/> or null</returns> public static TFSAggregatorSettings LoadFromFile(string settingsPath, ILogEvents logger) { DateTime lastWriteTime = System.IO.File.GetLastWriteTimeUtc(settingsPath); var parser = new AggregatorSettingsXmlParser(logger); return parser.Parse(lastWriteTime, (xmlLoadOptions) => XDocument.Load(settingsPath, xmlLoadOptions)); } /// <summary> /// Load configuration from string. Used by automated tests. /// </summary> /// <param name="content">Configuration data to parse</param> /// <param name="logger">Logging object</param> /// <returns>An instance of <see cref="TFSAggregatorSettings"/> or null</returns> public static TFSAggregatorSettings LoadXml(string content, ILogEvents logger) { // conventional point in time reference DateTime staticTimestamp = new DateTime(0, DateTimeKind.Utc); var parser = new AggregatorSettingsXmlParser(logger); return parser.Parse(staticTimestamp, (xmlLoadOptions) => XDocument.Parse(content, xmlLoadOptions)); } public LogLevel LogLevel { get; private set; } public string ScriptLanguage { get; private set; } public bool AutoImpersonate { get; private set; } public Uri ServerBaseUrl { get; private set; } public string PersonalToken { get; private set; } public string BasicPassword { get; private set; } public string BasicUsername { get; private set; } public string Hash { get; private set; } public IEnumerable<Snippet> Snippets { get; private set; } public IEnumerable<Function> Functions { get; private set; } public IEnumerable<Rule> Rules { get; private set; } public IEnumerable<Policy> Policies { get; private set; } public bool Debug { get; set; } public RateLimit RateLimit { get; set; } public bool WhatIf { get; set; } public bool IgnoreSslErrors { get; set; } } }
Java
# Add-VSEMRClusterKerberosAttributes ## SYNOPSIS Adds an AWS::EMR::Cluster.KerberosAttributes resource property to the template. KerberosAttributes is a property of the AWS::EMR::Cluster resource. KerberosAttributes define the cluster-specific Kerberos configuration when Kerberos authentication is enabled using a security configuration. The cluster-specific configuration must be compatible with the security configuration. For more information see Use Kerberos Authentication: https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html in the *EMR Management Guide*. ## SYNTAX ``` Add-VSEMRClusterKerberosAttributes [[-ADDomainJoinPassword] <Object>] [[-ADDomainJoinUser] <Object>] [[-CrossRealmTrustPrincipalPassword] <Object>] [-KdcAdminPassword] <Object> [-Realm] <Object> [<CommonParameters>] ``` ## DESCRIPTION Adds an AWS::EMR::Cluster.KerberosAttributes resource property to the template. KerberosAttributes is a property of the AWS::EMR::Cluster resource. KerberosAttributes define the cluster-specific Kerberos configuration when Kerberos authentication is enabled using a security configuration. The cluster-specific configuration must be compatible with the security configuration. For more information see Use Kerberos Authentication: https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html in the *EMR Management Guide*. ## PARAMETERS ### -ADDomainJoinPassword The Active Directory password for ADDomainJoinUser. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-kerberosattributes.html#cfn-elasticmapreduce-cluster-kerberosattributes-addomainjoinpassword PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -ADDomainJoinUser Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-kerberosattributes.html#cfn-elasticmapreduce-cluster-kerberosattributes-addomainjoinuser PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -CrossRealmTrustPrincipalPassword Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-kerberosattributes.html#cfn-elasticmapreduce-cluster-kerberosattributes-crossrealmtrustprincipalpassword PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -KdcAdminPassword The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-kerberosattributes.html#cfn-elasticmapreduce-cluster-kerberosattributes-kdcadminpassword PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: True Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Realm The name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-kerberosattributes.html#cfn-elasticmapreduce-cluster-kerberosattributes-realm PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: True Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### Vaporshell.Resource.EMR.Cluster.KerberosAttributes ## NOTES ## RELATED LINKS [http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-kerberosattributes.html](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-kerberosattributes.html)
Java
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0-google-v3) on Fri May 13 11:40:11 CDT 2011 --> <TITLE> com.google.appengine.api.blobstore.dev </TITLE> <META NAME="date" CONTENT="2011-05-13"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../dev_javadoc.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <FONT size="+1" CLASS="FrameTitleFont"> <A HREF="../../../../../../com/google/appengine/api/blobstore/dev/package-summary.html" target="classFrame">com.google.appengine.api.blobstore.dev</A></FONT> <TABLE BORDER="0" WIDTH="100%" SUMMARY=""> <TR> <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont"> Interfaces</FONT>&nbsp; <FONT CLASS="FrameItemFont"> <BR> <A HREF="BlobStorage.html" title="interface in com.google.appengine.api.blobstore.dev" target="classFrame"><I>BlobStorage</I></A></FONT></TD> </TR> </TABLE> <TABLE BORDER="0" WIDTH="100%" SUMMARY=""> <TR> <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont"> Classes</FONT>&nbsp; <FONT CLASS="FrameItemFont"> <BR> <A HREF="BlobInfoStorage.html" title="class in com.google.appengine.api.blobstore.dev" target="classFrame">BlobInfoStorage</A> <BR> <A HREF="BlobStorageFactory.html" title="class in com.google.appengine.api.blobstore.dev" target="classFrame">BlobStorageFactory</A> <BR> <A HREF="BlobUploadSessionStorage.html" title="class in com.google.appengine.api.blobstore.dev" target="classFrame">BlobUploadSessionStorage</A> <BR> <A HREF="LocalBlobstoreService.html" title="class in com.google.appengine.api.blobstore.dev" target="classFrame">LocalBlobstoreService</A> <BR> <A HREF="ServeBlobFilter.html" title="class in com.google.appengine.api.blobstore.dev" target="classFrame">ServeBlobFilter</A> <BR> <A HREF="ServeBlobFilter.ResponseWrapper.html" title="class in com.google.appengine.api.blobstore.dev" target="classFrame">ServeBlobFilter.ResponseWrapper</A> <BR> <A HREF="UploadBlobServlet.html" title="class in com.google.appengine.api.blobstore.dev" target="classFrame">UploadBlobServlet</A></FONT></TD> </TR> </TABLE> </BODY> </HTML>
Java
<!DOCTYPE html> <html> <head> <title>PoseNet - Camera Feed Demo</title> <style>.footer { position: fixed; left: 0; bottom: 0; width: 100%; color: black; } .footer-text { max-width: 600px; text-align: center; margin: auto; } @media only screen and (max-width: 600px) { .footer-text, .dg { display: none; } } /* * The following loading spinner CSS is from SpinKit project * https://github.com/tobiasahlin/SpinKit */ .sk-spinner-pulse { width: 20px; height: 20px; margin: auto 10px; float: left; background-color: #333; border-radius: 100%; -webkit-animation: sk-pulseScaleOut 1s infinite ease-in-out; animation: sk-pulseScaleOut 1s infinite ease-in-out; } @-webkit-keyframes sk-pulseScaleOut { 0% { -webkit-transform: scale(0); transform: scale(0); } 100% { -webkit-transform: scale(1.0); transform: scale(1.0); opacity: 0; } } @keyframes sk-pulseScaleOut { 0% { -webkit-transform: scale(0); transform: scale(0); } 100% { -webkit-transform: scale(1.0); transform: scale(1.0); opacity: 0; } } .spinner-text { float: left; }</style> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="info" style="display:none"> </div> <div id="loading" style="display:flex"> <div class="spinner-text"> Loading PoseNet model... </div> <div class="sk-spinner sk-spinner-pulse"></div> </div> <br><br><br> <div id="contentContainer"> <div id="leftContainer"> <div id="objectListContainer"> <span class="paragraphTitle">Object List</span> <button id="newImage">Add New Image</button> </div> <div id="objectPropertyContainer"> <span class="paragraphTitle">Property Editor</span> <div id="properties"> <div id="inputHandler"> <button id="inputButton"> <label for="inputImg"> Choose File </label> </button><input id="inputImg" type="file" accept="image/*" style="display:none"> <label id="currentInput"></label> </div> <div class="property"> Size <input id="sizeMultiplier" type="text" value="1.00"><br> </div> <div class="property"> Rotation <input id="rotationInput" type="text" value="0.00"><br> </div> <div class="property"> Horizontal offset <input id="horizontalTranslation" type="text" value="0.0"><br> </div> <div class="property"> Vertical offset <input id="verticalTranslation" type="text" value="0.0"><br> </div> <div class="property"> <select id="model" style="display: none;"> <option value="posenet">PoseNet</option> </select> </div> <div class="property"> Anchor Point <select id="imageKeypointAttachIndexSelect"> </select> </div> <div class="property"> Tolerance <input id="marginOfError" type="text" value="0"><br> (For background removal) <div class="useClear"></div> </div> <div class="property"> Remove White Background <input id="removeBg" type="checkbox" class="checkbox"><br> </div> </div> </div> </div> <div id="cameraOutputContainer"> <div id="main" style="display:none"> <video id="video" playsinline="" style="display: none;"> </video> <canvas id="output"> </canvas></div> </div> </div> <script src="camera.js"></script> </body> </html>
Java
/** * Copyright [2009-2010] [dennis zhuang(killme2008@gmail.com)] 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 */ /** * Copyright [2009-2010] [dennis zhuang(killme2008@gmail.com)] 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 net.rubyeye.xmemcached.command.text; import java.util.Collection; import java.util.concurrent.CountDownLatch; import net.rubyeye.xmemcached.command.Command; import net.rubyeye.xmemcached.command.CommandType; import net.rubyeye.xmemcached.transcoders.CachedData; /** * Get command for text protocol * * @author dennis * */ public class TextGetOneCommand extends TextGetCommand { public TextGetOneCommand(String key, byte[] keyBytes, CommandType cmdType, CountDownLatch latch) { super(key, keyBytes, cmdType, latch); } @Override public void dispatch() { if (this.mergeCount < 0) { // single get if (this.returnValues.get(this.getKey()) == null) { if (!this.wasFirst) { decodeError(); } else { this.countDownLatch(); } } else { CachedData data = this.returnValues.get(this.getKey()); setResult(data); this.countDownLatch(); } } else { // merge get // Collection<Command> mergeCommands = mergeCommands.values(); getIoBuffer().free(); for (Command nextCommand : mergeCommands.values()) { TextGetCommand textGetCommand = (TextGetCommand) nextCommand; textGetCommand.countDownLatch(); if (textGetCommand.assocCommands != null) { for (Command assocCommand : textGetCommand.assocCommands) { assocCommand.countDownLatch(); } } } } } }
Java
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. using System.Reflection; namespace System.Web.OData.Builder { /// <summary> /// Represents the configuration for a complex property of a structural type (an entity type or a complex type). /// </summary> public class ComplexPropertyConfiguration : StructuralPropertyConfiguration { /// <summary> /// Instantiates a new instance of the <see cref="ComplexPropertyConfiguration"/> class. /// </summary> /// <param name="property">The property of the configuration.</param> /// <param name="declaringType">The declaring type of the property.</param> public ComplexPropertyConfiguration(PropertyInfo property, StructuralTypeConfiguration declaringType) : base(property, declaringType) { } /// <inheritdoc /> public override PropertyKind Kind { get { return PropertyKind.Complex; } } /// <inheritdoc /> public override Type RelatedClrType { get { return PropertyInfo.PropertyType; } } /// <summary> /// Marks the current complex property as optional. /// </summary> /// <returns>Returns itself so that multiple calls can be chained.</returns> public ComplexPropertyConfiguration IsOptional() { OptionalProperty = true; return this; } /// <summary> /// Marks the current complex property as required. /// </summary> /// <returns>Returns itself so that multiple calls can be chained.</returns> public ComplexPropertyConfiguration IsRequired() { OptionalProperty = false; return this; } } }
Java
--- copyright: years: 2015, 2016 --- {:shortdesc: .shortdesc} {:new_window: target="_blank"} {:codeblock: .codeblock} {:screen: .screen} #Protezione delle applicazioni {: #securingapps} *Ultimo aggiornamento: 9 maggio 2016* {: .last-updated} Puoi proteggere le tue applicazioni caricando dei certificati SSL e limitando l'accesso alle applicazioni. {:shortdesc} ##Creazione di richieste di firma del certificato {: #ssl_csr} Prima di poter caricare i certificati SSL a cui hai diritto con {{site.data.keyword.Bluemix}}, devi creare una richiesta di firma del certificato, o CSR, sul tuo server. Un CSR è un messaggio che viene inviato a un'autorità di certificazione per richiedere la firma di una chiave pubblica e le informazioni associate. Più comunemente, i CSR sono in formato PKCS #10. Il CSR include una chiave pubblica, così come un nome comune, organizzazione, città, stato, paese ed e-mail. Le richieste di certificati SSL vengono accettate solo con una lunghezza di chiave CSR pari a 2048 bit. Affinché il CSR sia valido, durante la sua creazione è necessario immettere le seguenti informazioni: **Nome paese** Un codice a due cifre che rappresenta il paese o la regione. Ad esempio, "US" rappresenta gli Stati Uniti. Per gli altri paesi o regioni, consulta l'[elenco di codici paese ISO](https://www.iso.org/obp/ui/#search){:new_window} prima di creare il CSR. **Stato o provincia** Il nome completo senza abbreviazioni dello stato o provincia. **Località** Il nome completo della città. **Organizzazione** Il nome completo dell'azienda o società, come legalmente registrata nella tua località, o il nome personale. Per le società, assicurati di includere il suffisso di registrazione, ad esempio Ltd., Inc. o NV. **Unità organizzativa** Il nome della sezione della tua società che ordina il certificato, ad esempio Accounting o Marketing. **Nome comune** Il nome di dominio completo (FQDN) per il quale stai richiedendo il certificato SSL. I metodi per creare un CSR variano a seconda del tuo sistema operativo. Il seguente esempio mostra come creare un CSR utilizzando [lo strumento riga di comando OpenSSL](http://www.openssl.org/){:new_window}: ``` openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privatekey.key ``` **Nota:** l'implementazione OpenSSL SHA-512 dipende dal supporto del compilatore per il tipo intero a 64 bit. Puoi utilizzare l'opzione SHA-1 per le applicazioni che presentano problemi di compatibilità con il certificato SHA-256. Un certificato viene emesso da un'autorità di certificazione e viene firmato in maniera digitale da tale autorità. Dopo aver creato il CSR, puoi generare il tuo certificato SSL su un'autorità di certificazione pubblica. ##Caricamento di certificati SSL {: #ssl_certificate} Puoi applicare un protocollo di sicurezza per garantire la riservatezza delle comunicazioni della tua applicazione in modo da prevenire l'intercettazione delle comunicazioni, la manomissione e la falsificazione dei messaggi. Per ogni organizzazione in {{site.data.keyword.Bluemix_notm}} con un proprietario di account che dispone di un piano di pagamento a consumo o di abbonamento, hai diritto al caricamento di quattro certificati gratuiti. Per ogni organizzazione con un proprietario di account che dispone di un account di prova gratuita, hai diritto al caricamento di un certificato gratuito. Prima di poter caricare i certificati, devi creare una richiesta di firma del certificato. Vedi [Creazione di richieste di firma del certificato](#ssl_csr). Quando utilizzi un dominio personalizzato, per servire il certificato SSL, utilizza i seguenti endpoint della regione per fornire la rotta URL assegnata alla tua organizzazione in Bluemix. * Stati Uniti Sud: secure.us-south.bluemix.net * EUROPA-REGNO UNITO: secure.eu-gb.bluemix.net * AUSTRALIA-SYDNEY: secure.au-syd.bluemix.net Per caricare un certificato per la tua applicazione: 1. Crea una rotta oppure modificane una esistente selezionando **Modifica rotta e accesso all'applicazione** dal menu dell'applicazione. 2. Nella finestra di dialogo Modifica rotte e accesso all'applicazione, fai clic su **Gestisci domini**. 3. Per il tuo dominio personalizzato, fai clic su **Carica certificato**. 4. Sfoglia per caricare un certificato, una chiave privata e, facoltativamente, un certificato intermedio. Puoi anche selezionare la casella di spunta per abilitare le richieste di un certificato client. Se abiliti l'opzione di richiesta di un certificato client, devi caricare un file truststore certificato client che definisce l'accesso utente consentito al tuo dominio personalizzato. **Certificato** Un documento digitale che esegue il bind di una chiave pubblica all'identità del proprietario del certificato, consentendo così al proprietario del certificato di essere autenticato. Un certificato viene emesso da un'autorità di certificazione e viene firmato in maniera digitale da tale autorità. Un certificato viene in genere emesso e firmato da un'autorità di certificazione. Tuttavia, per scopi di test e di sviluppo, puoi utilizzare un certificato autofirmato. In {{site.data.keyword.Bluemix_notm}} sono supportati i seguenti tipi di certificati: * PEM (pem, .crt, .cer e .cert) * DER (.der o .cer ) * PKCS #7 (p7b, p7r, spc) **Chiave privata** Un modello algoritmico utilizzato per crittografare messaggi che possono essere decrittografati solo mediante la chiave pubblica corrispondente. Inoltre, la chiave privata viene utilizzata per decrittografare i messaggi crittografati con la chiave pubblica corrispondente. La chiave privata è conservata sul sistema dell'utente e protetta da password. In {{site.data.keyword.Bluemix_notm}} sono supportati i seguenti tipi di chiavi private: * PEM (pem, .key) * PKCS #8 (p8, pk8) **Limitazione:** non è possibile caricare le chiavi private protette da una passphrase. **Certificato intermedio** Un certificato subordinato emesso dall'autorità di certificazione (CA) radice attendibile specificamente per emettere certificati server per l'entità finale. Il risultato è una catena di certificati che inizia dalla CA radice attendibile, passa per il certificato intermedio e termina con il certificato SSL emesso per l'organizzazione. Devi utilizzare un certificato intermedio per verificare l'autenticità del certificato principale. I certificati intermedi vengono generalmente ottenuti da una terza parte attendibile. Potresti non aver bisogno di un certificato intermedio durante il test della tua applicazione, prima della sua distribuzione nella produzione. **Abilita richiesta di certificato client** Se abiliti questa opzione, a un utente che prova ad accedere a un dominio protetto da SSL viene richiesto di fornire un certificato lato client. Ad esempio, in un browser web, quando un utente prova ad accedere a un dominio protetto da SSL, il browser web gli richiede di fornire un certificato client per il dominio. Utilizza l'opzione di caricamento file **Truststore certificato client** per definire i certificati lato client a cui consenti di accedere al tuo dominio personalizzato. **Nota:** la funzione relativa al certificato personalizzato nella gestione del dominio di {{site.data.keyword.Bluemix_notm}} dipende dall'estensione Server Name Indication (SNI) del protocollo TLS (Transport Layer Security). Pertanto, il codice client che accede alle applicazioni {{site.data.keyword.Bluemix_notm}} protette da certificati personalizzati deve supportare l'estensione SNI nell'implementazione TLS. Per ulteriori informazioni, vedi la [sezione 7.4.2 del RFC 4346](http://tools.ietf.org/html/rfc4346#section-7.4.2){:new_window}. **Truststore certificato client** Il truststore certificato client è un file che contiene i certificati client per gli utenti per cui desideri consentire l'accesso alla tua applicazione. Se abiliti l'opzione di richiesta di un certificato client, carica un file truststore certificato client. In {{site.data.keyword.Bluemix_notm}} sono supportati i seguenti tipi di certificati: * PEM (pem, .crt, .cer e .cert) * DER (.der o .cer ) * PKCS #7 (p7b, p7r, spc) Per eliminare un certificato oppure sostituirne uno esistente con uno nuovo, vai in **Gestisci organizzazioni** > **Domini** > **Visualizza certificato** per gestire i tuoi certificati.
Java
/* * Copyright (c) 2018 <Carlos Chacón> * All rights reserved * * 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. */ #pragma once #ifndef _GAME_OBJECT_DEBUG_DEFS_H #define _GAME_OBJECT_DEBUG_DEFS_H /********************** * System Includes * ***********************/ /************************* * 3rd Party Includes * **************************/ /*************************** * Game Engine Includes * ****************************/ /************** * Defines * ***************/ /// <summary> /// Name for Basic Colro Material in Visualizer /// </summary> #define AE_GOD_V_BASIC_COLOR_MAT_NAME "AE GOD V Basic Color Material" /// <summary> /// Name for Basic Line Material in Visualizer /// </summary> #define AE_GOD_V_BASIC_LINE_MAT_NAME "AE GOD V Basic Line Material" /// <summary> /// Name for Diffuse Texture Basic Material in Visualizer /// </summary> #define AE_GOD_V_DIFFUSE_TEXTURE_BASIC_MAT_NAME "AE GOD V Diffuse Texture Basic Material" /// <summary> /// Name for Directional Light Icon Texture /// </summary> #define AE_GOD_DIRECTIONAL_LIGHT_ICON_TEXTURE_NAME "AE Directional Light Icon" /// <summary> /// Name for Omni Light Icon Texture /// </summary> #define AE_GOD_OMNI_LIGHT_ICON_TEXTURE_NAME "AE Omni Light Icon" /// <summary> /// Name for Spot Light Icon Texture /// </summary> #define AE_GOD_SPOT_LIGHT_ICON_TEXTURE_NAME "AE Spot Light Icon" /// <summary> /// Name for Camera Icon Texture /// </summary> #define AE_GOD_CAMERA_ICON_TEXTURE_NAME "AE Camera Icon" /// <summary> /// File path for Directional Light Icon Texture /// </summary> #define AE_GOD_DIRECTIONAL_LIGHT_ICON_PATH AE_Base_FS_PATH "Data\\Textures\\DirLightIcon.dds" /// <summary> /// File path for Omni Light Icon Texture /// </summary> #define AE_GOD_OMNI_LIGHT_ICON_PATH AE_Base_FS_PATH "Data\\Textures\\OmniLightIcon.dds" /// <summary> /// File path for Spot Light Icon Texture /// </summary> #define AE_GOD_SPOT_LIGHT_ICON_PATH AE_Base_FS_PATH "Data\\Textures\\SpotLightIcon.dds" /// <summary> /// File path for Camera Icon Texture /// </summary> #define AE_GOD_CAMERA_ICON_PATH AE_Base_FS_PATH "Data\\Textures\\VideoCameraIcon.dds" /// <summary> /// Scale Amount for Light Icons /// </summary> #define AE_LIGHT_ICONS_DEFAULT_SCALE_AMOUNT 0.5f /// <summary> /// Scale Amount for Directional Light Shape /// </summary> #define AE_LIGHT_SHAPE_DIR_DEFAULT_SCALE_AMOUNT 2.0f /************ * Using * *************/ /******************** * Forward Decls * *********************/ /**************** * Constants * *****************/ /****************** * Struct Decl * *******************/ struct GameObjectsDebugVisualizerConfig sealed : AEObject { bool m_CameraIconDrawEnabled = true; bool m_LightIconDrawEnabled = true; bool m_GameObjectDebugRenderEnabled = true; float m_LightIconScale = AE_LIGHT_ICONS_DEFAULT_SCALE_AMOUNT; float m_DirectionalLightShapeScale = AE_LIGHT_SHAPE_DIR_DEFAULT_SCALE_AMOUNT; GameObjectsDebugVisualizerConfig() { } }; #endif
Java
#!/bin/sh $SPARK_HOME/bin/spark-submit \ --master "local[*]" \ --deploy-mode client \ --class com.godatadriven.twitter_classifier.HdfsToKafka \ target/scala-2.10/twitter-to-neo4j-assembly-1.0.jar
Java
package com.gbaldera.yts.fragments; import android.content.Loader; import com.gbaldera.yts.loaders.PopularMoviesLoader; import com.jakewharton.trakt.entities.Movie; import java.util.List; public class PopularMoviesFragment extends BaseMovieFragment { @Override protected int getLoaderId() { return BaseMovieFragment.POPULAR_MOVIES_LOADER_ID; } @Override protected Loader<List<Movie>> getLoader() { return new PopularMoviesLoader(getActivity()); } }
Java
using System.Collections.Generic; using System.Windows.Forms; using System.Xml; using System.Xml.XPath; namespace PlaylistEditor { class HTMLHandler { public static string XPathHTML(HtmlElement elem) { string elemXPath = ""; string children = ""; List<string> ParentTagsList = new List<string>(); List<string> TagsList = new List<string>(); while (elem.Parent != null) { //from actual node go to parent HtmlElement prnt = elem.Parent; ParentTagsList.Add(prnt.TagName); children += "|" + prnt.TagName; //loop through all the children foreach (HtmlElement chld in prnt.Children) { //=> this code is retrieving all the paths to the root. //=>I will create an array with it instead of looping trough all the childern of the parent TagsList.Add(chld.TagName); } elem = elem.Parent; TagsList.Add(elem.TagName); } string prevtag = ""; //holds the previous tag to create the duplicate tag index int tagcount = 1; //holds the duplicate tag index foreach (string tag in TagsList) { if (tag == prevtag) { //if (tagcount == 1) //{ // tagcount++; // int prvtaglength = ("/" + tag + "/").Length; // if (prvtaglength > elemXPath.Length - prvtaglength) // { // elemXPath = "/" + tag + "[" + tagcount + "]"; // } // else // { // elemXPath = elemXPath.Substring(prvtaglength, elemXPath.Length - prvtaglength); // elemXPath = "/" + tag + "[" + tagcount + "]/" + elemXPath; // } //} //else //{ int prvtaglength = ("/" + tag + "[" + tagcount + "]/").Length; if (prvtaglength > elemXPath.Length - prvtaglength) { elemXPath = "/" + tag + "[" + tagcount + "]"; } else { elemXPath = elemXPath.Substring(prvtaglength, elemXPath.Length - prvtaglength); tagcount++; elemXPath = "/" + tag + "[" + tagcount + "]/" + elemXPath; } //} } else { tagcount = 1; elemXPath = "/" + tag + "[" + tagcount + "]" + elemXPath; } prevtag = tag; } //this.txtExtracted.Text = children + Environment.NewLine + elemXPath.ToLower(); return elemXPath.ToLower(); } public static string XPathHTMLSimple(HtmlElement elem) { HtmlElement selelem = elem; string elemXPath = ""; string prntXPath = ""; string children = ""; List<string> ParentTagsList = new List<string>(); List<string> TagsList = new List<string>(); //loop through the parents until reaching root while (elem.Parent != null) { //from actual node go to parent HtmlElement prnt = elem.Parent; ParentTagsList.Add(prnt.TagName); prntXPath = getParentLocation(prnt) + prntXPath; elem = elem.Parent; } //Add selected element to path; elemXPath = getParentLocation(selelem); //Join the selected path with the route to root elemXPath = prntXPath + elemXPath; ////br[1]/div[1]/ul[8]/li[1]/a //TODO: The XPath should be shorten to the nearest unique value and use // (from root XPath indicator) //this.txtExtracted.Text = children + Environment.NewLine + elemXPath.ToLower(); return elemXPath.ToLower(); } public static string XPathHTMLtoXMLBackwards(HtmlElement elem) { string prntXPath = ""; List<string> ParentTagsList = new List<string>(); string XMLelem = ""; XPathNavigator xpathNav = null; //Convert selected element to XML XMLelem = XMLHandler.HTMLtoXMLString(elem.OuterHtml); //TODO!! ==V //The search has to be done after the complete document is in xml not using parent and intermediate conversions //the result is not the same XmlDocument prntXDoc = null; //loop through the parents until reaching root while (elem.Parent != null) { //(Using HTMLElement) //from actual node go to parent //HtmlElement prnt = elem.Parent; //ParentTagsList.Add(prnt.TagName); //prntXPath = getParentLocation(prnt) + prntXPath; //(Using HTMLDocument) prntXDoc = XMLHandler.HTMLtoXML(elem.Parent.OuterHtml); string Xelem = XMLHandler.HTMLtoXMLString(elem.OuterHtml); ParentTagsList.Add(prntXDoc.DocumentElement.Name); prntXPath = XMLHandler.getParentXPath(prntXDoc.FirstChild.ChildNodes, Xelem, elem.TagName.ToLower()) + prntXPath; elem = elem.Parent; } if (prntXDoc != null) { prntXPath = "/" + prntXDoc.FirstChild.Name + "[1]" + prntXPath; } ////br[1]/div[1]/ul[8]/li[1]/a ///html[1]/body[1]/br[1]/p[1]/hr[1]/center[1]/hr[1]/p[1]/p[1] //TODO: The XPath should be shorten to the nearest unique value and use // (from root XPath indicator) //this.txtExtracted.Text = prntXPath; return prntXPath.ToLower(); } public static string XPathHTMLtoXML(string html, string elem, string tagname) { string prntXPath = ""; List<string> ParentTagsList = new List<string>(); string XMLelem = ""; //Convert selected element to XML XMLelem = XMLHandler.HTMLtoXMLString(elem); //TODO!! ==V //The search has to be done after the complete document is in xml not using parent and intermediate conversions //the result is not the same XmlDocument prntXDoc = null; prntXDoc = XMLHandler.HTMLtoXML(html); prntXPath = XMLHandler.getChildrenXPath(prntXDoc.FirstChild.ChildNodes, XMLelem) + prntXPath; if (prntXDoc != null) { prntXPath = "//" + prntXDoc.FirstChild.Name + "[1]" + prntXPath; } ////br[1]/div[1]/ul[8]/li[1]/a ///html[1]/body[1]/br[1]/p[1]/hr[1]/center[1]/hr[1]/p[1]/p[1] //TODO: The XPath should be shorten to the nearest unique value and use // (from root XPath indicator) //this.txtExtracted.Text = prntXPath; return prntXPath.ToLower(); } public static string getParentLocation(HtmlElement selelem) { string elemXPath = ""; string prevtag = ""; //holds the previous tag to create the duplicate tag index int tagcount = 0; //holds the duplicate tag index if (selelem.Parent != null && selelem.Parent.Children != null) { foreach (HtmlElement chld in selelem.Parent.Children) { string tag = chld.TagName; if (tag == selelem.TagName)//Only write to XPath if the tag is the same not if it is a sibling. 7-13-2015 { //if (tag == prevtag) //{ tagcount++; int prvtaglength = ("/" + tag + "[" + tagcount + "]/").Length; if (prvtaglength > elemXPath.Length - prvtaglength) { elemXPath = "/" + tag + "[" + tagcount + "]"; } else { elemXPath = elemXPath.Substring(prvtaglength, elemXPath.Length - prvtaglength); tagcount++; elemXPath = elemXPath + "/" + tag + "[" + tagcount + "]"; } //} //else //{ // tagcount = 1; // elemXPath = elemXPath + "/" + tag + "[" + tagcount + "]"; //} } prevtag = tag; if (chld.InnerHtml == selelem.InnerHtml) { break; } } } return elemXPath; } } }
Java
/* * Copyright 2003-2019 Dave Griffith, Bas Leijdekkers * * 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 com.siyeh.ig.javadoc; import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.text.StringUtil; import com.intellij.pom.Navigatable; import com.intellij.psi.*; import com.intellij.psi.javadoc.PsiDocComment; import com.intellij.psi.javadoc.PsiDocTag; import com.intellij.psi.javadoc.PsiDocTagValue; import com.intellij.psi.javadoc.PsiDocToken; import com.intellij.psi.util.PsiUtil; import com.siyeh.InspectionGadgetsBundle; import com.siyeh.ig.BaseInspection; import com.siyeh.ig.BaseInspectionVisitor; import com.siyeh.ig.InspectionGadgetsFix; import com.siyeh.ig.psiutils.MethodUtils; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; import javax.swing.*; final class MissingDeprecatedAnnotationInspection extends BaseInspection { @SuppressWarnings("PublicField") public boolean warnOnMissingJavadoc = false; @Override @NotNull protected String buildErrorString(Object... infos) { final boolean annotationWarning = ((Boolean)infos[0]).booleanValue(); return annotationWarning ? InspectionGadgetsBundle.message("missing.deprecated.annotation.problem.descriptor") : InspectionGadgetsBundle.message("missing.deprecated.tag.problem.descriptor"); } @NotNull @Override public JComponent createOptionsPanel() { return new SingleCheckboxOptionsPanel(InspectionGadgetsBundle.message("missing.deprecated.tag.option"), this, "warnOnMissingJavadoc"); } @Override public boolean runForWholeFile() { return true; } @Override protected InspectionGadgetsFix buildFix(Object... infos) { final boolean annotationWarning = ((Boolean)infos[0]).booleanValue(); return annotationWarning ? new MissingDeprecatedAnnotationFix() : new MissingDeprecatedTagFix(); } private static class MissingDeprecatedAnnotationFix extends InspectionGadgetsFix { @Override @NotNull public String getFamilyName() { return InspectionGadgetsBundle.message("missing.deprecated.annotation.add.quickfix"); } @Override public void doFix(Project project, ProblemDescriptor descriptor) { final PsiElement identifier = descriptor.getPsiElement(); final PsiModifierListOwner parent = (PsiModifierListOwner)identifier.getParent(); if (parent == null) { return; } final PsiElementFactory factory = JavaPsiFacade.getElementFactory(project); final PsiAnnotation annotation = factory.createAnnotationFromText("@java.lang.Deprecated", parent); final PsiModifierList modifierList = parent.getModifierList(); if (modifierList == null) { return; } modifierList.addAfter(annotation, null); } } private static class MissingDeprecatedTagFix extends InspectionGadgetsFix { private static final String DEPRECATED_TAG_NAME = "deprecated"; @Nls(capitalization = Nls.Capitalization.Sentence) @NotNull @Override public String getFamilyName() { return InspectionGadgetsBundle.message("missing.add.deprecated.javadoc.tag.quickfix"); } @Override protected void doFix(Project project, ProblemDescriptor descriptor) { PsiElement parent = descriptor.getPsiElement().getParent(); if (!(parent instanceof PsiJavaDocumentedElement)) { return; } PsiJavaDocumentedElement documentedElement = (PsiJavaDocumentedElement)parent; PsiDocComment docComment = documentedElement.getDocComment(); if (docComment != null) { PsiDocTag existingTag = docComment.findTagByName(DEPRECATED_TAG_NAME); if (existingTag != null) { moveCaretAfter(existingTag); return; } PsiDocTag deprecatedTag = JavaPsiFacade.getElementFactory(project).createDocTagFromText("@" + DEPRECATED_TAG_NAME + " TODO: explain"); PsiElement addedTag = docComment.add(deprecatedTag); moveCaretAfter(addedTag); } else { PsiDocComment newDocComment = JavaPsiFacade.getElementFactory(project).createDocCommentFromText( StringUtil.join("/**\n", " * ", "@" + DEPRECATED_TAG_NAME + " TODO: explain", "\n */") ); PsiElement addedComment = documentedElement.addBefore(newDocComment, documentedElement.getFirstChild()); if (addedComment instanceof PsiDocComment) { PsiDocTag addedTag = ((PsiDocComment)addedComment).findTagByName(DEPRECATED_TAG_NAME); if (addedTag != null) { moveCaretAfter(addedTag); } } } } private static void moveCaretAfter(PsiElement newCaretPosition) { PsiElement sibling = newCaretPosition.getNextSibling(); if (sibling instanceof Navigatable) { ((Navigatable)sibling).navigate(true); } } } @Override public boolean shouldInspect(PsiFile file) { return PsiUtil.isLanguageLevel5OrHigher(file); } @Override public BaseInspectionVisitor buildVisitor() { return new MissingDeprecatedAnnotationVisitor(); } private class MissingDeprecatedAnnotationVisitor extends BaseInspectionVisitor { @Override public void visitModule(@NotNull PsiJavaModule module) { super.visitModule(module); if (hasDeprecatedAnnotation(module)) { if (warnOnMissingJavadoc && !hasDeprecatedComment(module, true)) { registerModuleError(module, Boolean.FALSE); } } else if (hasDeprecatedComment(module, false)) { registerModuleError(module, Boolean.TRUE); } } @Override public void visitClass(@NotNull PsiClass aClass) { super.visitClass(aClass); if (hasDeprecatedAnnotation(aClass)) { if (warnOnMissingJavadoc && !hasDeprecatedComment(aClass, true)) { registerClassError(aClass, Boolean.FALSE); } } else if (hasDeprecatedComment(aClass, false)) { registerClassError(aClass, Boolean.TRUE); } } @Override public void visitMethod(@NotNull PsiMethod method) { if (method.getNameIdentifier() == null) { return; } if (hasDeprecatedAnnotation(method)) { if (warnOnMissingJavadoc) { PsiMethod m = method; while (m != null) { if (hasDeprecatedComment(m, true)) { return; } m = MethodUtils.getSuper(m); } registerMethodError(method, Boolean.FALSE); } } else if (hasDeprecatedComment(method, false)) { registerMethodError(method, Boolean.TRUE); } } @Override public void visitField(@NotNull PsiField field) { if (hasDeprecatedAnnotation(field)) { if (warnOnMissingJavadoc && !hasDeprecatedComment(field, true)) { registerFieldError(field, Boolean.FALSE); } } else if (hasDeprecatedComment(field, false)) { registerFieldError(field, Boolean.TRUE); } } private boolean hasDeprecatedAnnotation(PsiModifierListOwner element) { final PsiModifierList modifierList = element.getModifierList(); return modifierList != null && modifierList.hasAnnotation(CommonClassNames.JAVA_LANG_DEPRECATED); } private boolean hasDeprecatedComment(PsiJavaDocumentedElement documentedElement, boolean checkContent) { final PsiDocComment comment = documentedElement.getDocComment(); if (comment == null) { return false; } final PsiDocTag deprecatedTag = comment.findTagByName("deprecated"); if (deprecatedTag == null) { return false; } if (!checkContent) { return true; } for (PsiElement element : deprecatedTag.getDataElements()) { if (element instanceof PsiDocTagValue || element instanceof PsiDocToken && ((PsiDocToken)element).getTokenType() == JavaDocTokenType.DOC_COMMENT_DATA) { return true; } } return false; } } }
Java
/*************************************************************** * * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, * University of Wisconsin-Madison, WI. * * 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. * ***************************************************************/ #ifndef MY_HOSTNAME_H #define MY_HOSTNAME_H #include "stream.h" #include <string> #include <set> class CondorError; bool init_network_interfaces( CondorError * errorStack ); /* Find local addresses that match a given NETWORK_INTERFACE * * Prefers public addresses. Strongly prefers "up" addresses. * * interface_param_name - Optional, but recommended, exclusively used * in log messages. Probably "NETWORK_INTERFACE" or "PRIVATE_NETWORK_INTERFACE" * interface_pattern - Required. The value of the param. Something like * "*" or "192.168.0.23" * ipv4 - best ipv4 address found. May be empty if no ipv4 addresses are found * that match the interface pattern. * ipv6 - best ipv6 address found. May be empty if no ipv6 addresses are found * that match the interface pattern. * ipbest - If you absolutely need a single result, this is our best bet. * But really, just don't do that. Should be one of ipv4 or ipv6. */ bool network_interface_to_ip( char const *interface_param_name, char const *interface_pattern, std::string & ipv4, std::string & ipv6, std::string & ipbest); #endif /* MY_HOSTNAME_H */
Java
#!/usr/bin/env ruby # Encoding: utf-8 # # Author:: api.davidtorres@gmail.com (David Torres) # # Copyright:: Copyright 2013, Google Inc. All Rights Reserved. # # License:: 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. # # This example gets uninvited contacts. To create contacts, run # create_contacts.rb. # # Tags: ContactService.getContactsByStatement. require 'dfp_api' API_VERSION = :v201405 PAGE_SIZE = 500 def get_uninvited_contacts() # Get DfpApi instance and load configuration from ~/dfp_api.yml. dfp = DfpApi::Api.new # To enable logging of SOAP requests, set the log_level value to 'DEBUG' in # the configuration file or provide your own logger: # dfp.logger = Logger.new('dfp_xml.log') # Get the ContactService. contact_service = dfp.service(:ContactService, API_VERSION) # Define initial values. offset = 0 page = {} query_base = 'WHERE status = :status ORDER BY id LIMIT %d OFFSET %d' # Create statement. statement = { :values => [ {:key => 'status', :value => {:value => 'UNINVITED', :xsi_type => 'TextValue'}} ] } begin # Update statement for one page with current offset. statement[:query] = query_base % [PAGE_SIZE, offset] # Get contacts by statement. page = contact_service.get_contacts_by_statement(statement) if page[:results] # Increase query offset by page size. offset += PAGE_SIZE # Get the start index for printout. start_index = page[:start_index] # Print details about each content object in results page. page[:results].each_with_index do |contact, index| puts "%d) Contact ID: %d, name: %s." % [index + start_index, contact[:id], contact[:name]] end end end while offset < page[:total_result_set_size] # Print a footer if page.include?(:total_result_set_size) puts "Total number of results: %d" % page[:total_result_set_size] end end if __FILE__ == $0 begin get_uninvited_contacts() # HTTP errors. rescue AdsCommon::Errors::HttpError => e puts "HTTP Error: %s" % e # API errors. rescue DfpApi::Errors::ApiException => e puts "Message: %s" % e.message puts 'Errors:' e.errors.each_with_index do |error, index| puts "\tError [%d]:" % (index + 1) error.each do |field, value| puts "\t\t%s: %s" % [field, value] end end end end
Java
package com.google.api.ads.adwords.jaxws.v201406.video; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import com.google.api.ads.adwords.jaxws.v201406.cm.Money; /** * * Class representing the various summary budgets for a campaign page. * * * <p>Java class for SummaryBudgets complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="SummaryBudgets"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="totalVideoBudget" type="{https://adwords.google.com/api/adwords/video/v201406}VideoBudget" minOccurs="0"/> * &lt;element name="nonVideoBudget" type="{https://adwords.google.com/api/adwords/cm/v201406}Money" minOccurs="0"/> * &lt;element name="combinedBudget" type="{https://adwords.google.com/api/adwords/cm/v201406}Money" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SummaryBudgets", propOrder = { "totalVideoBudget", "nonVideoBudget", "combinedBudget" }) public class SummaryBudgets { protected VideoBudget totalVideoBudget; protected Money nonVideoBudget; protected Money combinedBudget; /** * Gets the value of the totalVideoBudget property. * * @return * possible object is * {@link VideoBudget } * */ public VideoBudget getTotalVideoBudget() { return totalVideoBudget; } /** * Sets the value of the totalVideoBudget property. * * @param value * allowed object is * {@link VideoBudget } * */ public void setTotalVideoBudget(VideoBudget value) { this.totalVideoBudget = value; } /** * Gets the value of the nonVideoBudget property. * * @return * possible object is * {@link Money } * */ public Money getNonVideoBudget() { return nonVideoBudget; } /** * Sets the value of the nonVideoBudget property. * * @param value * allowed object is * {@link Money } * */ public void setNonVideoBudget(Money value) { this.nonVideoBudget = value; } /** * Gets the value of the combinedBudget property. * * @return * possible object is * {@link Money } * */ public Money getCombinedBudget() { return combinedBudget; } /** * Sets the value of the combinedBudget property. * * @param value * allowed object is * {@link Money } * */ public void setCombinedBudget(Money value) { this.combinedBudget = value; } }
Java
var assert = require("assert"), expect = require('expect.js'), cda = require("../utils/xml.js").cda, DOMParser = require('xmldom').DOMParser, XmlSerializer = require('xmldom').XMLSerializer, xmlUtils = require("../utils/xml.js").xml, FunctionalStatusSectionCreator = require("../Model/FunctionalStatusSection.js"), FunctionalStatusEntryCreator = require("../Model/FunctionalStatusEntry.js"), FunctionalStatusPainScaleEntryCreator = require("../Model/FunctionalStatusPainScaleEntry.js"), Σ = xmlUtils.CreateNode, A = xmlUtils.CreateAttributeWithNameAndValue, adapter = require("../CDA/ModeltoCDA.js").cda; var createMockEntry = function(num) { var entry = FunctionalStatusEntryCreator.create(); entry.Name = "Name " + num; entry.Value = "Value " + num; entry.EffectiveTime = new Date().toString(); return entry; }; var createMockPainScaleEntry = function (num) { var entry = FunctionalStatusPainScaleEntryCreator.create(); entry.id = num; entry.PainScore = 1; entry.PainScoreEffectiveTime = '2/1/2013'; return entry; }; describe("Build Functional Status Section.", function() { it("Should be able to generate an entry for each type.", function() { var e = new adapter.FunctionalStatusSection(); var document = new DOMParser().parseFromString("<?xml version='1.0' standalone='yes'?><ClinicalDocument xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='urn:hl7-org:v3 CDA/infrastructure/cda/CDA_SDTC.xsd' xmlns='urn:hl7-org:v3' xmlns:cda='urn:hl7-org:v3' xmlns:sdtc='urn:hl7-org:sdtc'></ClinicalDocument>", "text/xml"); var section = FunctionalStatusSectionCreator.create(); section.Capabilities.push(createMockEntry(1)); section.Cognitions.push(createMockEntry(1)); section.DailyLivings.push(createMockEntry(1)); section.PainScales.push(createMockPainScaleEntry(1)); var cdaAdapter = new adapter.FunctionalStatusSection(); var node = cdaAdapter.BuildAll(section, document); assert.equal(node.getElementsByTagName("title")[0].childNodes[0].nodeValue, "FUNCTIONAL STATUS"); assert.equal(node.getElementsByTagName("templateId")[0].getAttributeNode("root").value, "2.16.840.1.113883.10.20.22.2.14"); assert.equal(node.getElementsByTagName("code")[0].getAttributeNode("code").value, "47420-5"); //var output = new XmlSerializer().serializeToString(node); //console.log(output); }); });
Java
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013,2014,2018 Contributor # # 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. """Contains the logic for `aq add rack --bunker`.""" from aquilon.worker.broker import BrokerCommand # pylint: disable=W0611 from aquilon.worker.commands.add_rack import CommandAddRack class CommandAddRackBunker(CommandAddRack): required_parameters = ["bunker", "row", "column"]
Java
# New-VSPinpointAPNSChannel ## SYNOPSIS Adds an AWS::Pinpoint::APNSChannel resource to the template. A *channel* is a type of platform that you can deliver messages to. You can use the APNs channel to send push notification messages to the Apple Push Notification service (APNs. Before you can use Amazon Pinpoint to send notifications to APNs, you have to enable the APNs channel for an Amazon Pinpoint application. ## SYNTAX ``` New-VSPinpointAPNSChannel [-LogicalId] <String> [-BundleId <Object>] [-PrivateKey <Object>] [-Enabled <Object>] [-DefaultAuthenticationMethod <Object>] [-TokenKey <Object>] -ApplicationId <Object> [-TeamId <Object>] [-Certificate <Object>] [-TokenKeyId <Object>] [-DeletionPolicy <String>] [-UpdateReplacePolicy <String>] [-DependsOn <String[]>] [-Metadata <Object>] [-UpdatePolicy <Object>] [-Condition <Object>] [<CommonParameters>] ``` ## DESCRIPTION Adds an AWS::Pinpoint::APNSChannel resource to the template. A *channel* is a type of platform that you can deliver messages to. You can use the APNs channel to send push notification messages to the Apple Push Notification service (APNs. Before you can use Amazon Pinpoint to send notifications to APNs, you have to enable the APNs channel for an Amazon Pinpoint application. The AWS::Pinpoint::APNSChannel resource defines the status and authentication settings of the APNs channel for an application. ## PARAMETERS ### -LogicalId The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance. ```yaml Type: String Parameter Sets: (All) Aliases: Required: True Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -BundleId The bundle identifier that's assigned to your iOS app. This identifier is used for APNs tokens. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-bundleid PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -PrivateKey The private key for the APNs client certificate that you want Amazon Pinpoint to use to communicate with APNs. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-privatekey PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Enabled Specifies whether to enable the APNs channel for the application. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-enabled PrimitiveType: Boolean UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -DefaultAuthenticationMethod The default authentication method that you want Amazon Pinpoint to use when authenticating with APNs, key or certificate. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-defaultauthenticationmethod PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -TokenKey The authentication key to use for APNs tokens. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-tokenkey PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -ApplicationId The unique identifier for the application that the APNs channel applies to. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-applicationid PrimitiveType: String UpdateType: Immutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -TeamId The identifier that's assigned to your Apple developer account team. This identifier is used for APNs tokens. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-teamid PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Certificate The APNs client certificate that you received from Apple, if you want Amazon Pinpoint to communicate with APNs by using an APNs certificate. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-certificate PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -TokenKeyId The key identifier that's assigned to your APNs signing key, if you want Amazon Pinpoint to communicate with APNs by using APNs tokens. Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-tokenkeyid PrimitiveType: String UpdateType: Mutable ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -DeletionPolicy With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default. To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks. You must use one of the following options: "Delete","Retain","Snapshot" ```yaml Type: String Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -UpdateReplacePolicy Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation. When you initiate a stack update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template and parameters. If you update a resource property that requires that the resource be replaced, AWS CloudFormation recreates the resource during the update. Recreating the resource generates a new physical ID. AWS CloudFormation creates the replacement resource first, and then changes references from other dependent resources to point to the replacement resource. By default, AWS CloudFormation then deletes the old resource. Using the UpdateReplacePolicy, you can specify that AWS CloudFormation retain or (in some cases) create a snapshot of the old resource. For resources that support snapshots, such as AWS::EC2::Volume, specify Snapshot to have AWS CloudFormation create a snapshot before deleting the old resource instance. You can apply the UpdateReplacePolicy attribute to any resource. UpdateReplacePolicy is only executed if you update a resource property whose update behavior is specified as Replacement, thereby causing AWS CloudFormation to replace the old resource with a new one with a new physical ID. For example, if you update the Engine property of an AWS::RDS::DBInstance resource type, AWS CloudFormation creates a new resource and replaces the current DB instance resource with the new one. The UpdateReplacePolicy attribute would then dictate whether AWS CloudFormation deleted, retained, or created a snapshot of the old DB instance. The update behavior for each property of a resource is specified in the reference topic for that resource in the AWS Resource and Property Types Reference. For more information on resource update behavior, see Update Behaviors of Stack Resources. The UpdateReplacePolicy attribute applies to stack updates you perform directly, as well as stack updates performed using change sets. Note Resources that are retained continue to exist and continue to incur applicable charges until you delete those resources. Snapshots that are created with this policy continue to exist and continue to incur applicable charges until you delete those snapshots. UpdateReplacePolicy retains the old physical resource or snapshot, but removes it from AWS CloudFormation's scope. UpdateReplacePolicy differs from the DeletionPolicy attribute in that it only applies to resources replaced during stack updates. Use DeletionPolicy for resources deleted when a stack is deleted, or when the resource definition itself is deleted from the template as part of a stack update. You must use one of the following options: "Delete","Retain","Snapshot" ```yaml Type: String Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -DependsOn With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute. This parameter takes a string or list of strings representing Logical IDs of resources that must be created prior to this resource being created. ```yaml Type: String[] Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Metadata The Metadata attribute enables you to associate structured data with a resource. By adding a Metadata attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as GetAtt and Ref), parameters, and pseudo parameters within the Metadata attribute to add those interpreted values. You must use a PSCustomObject containing key/value pairs here. This will be returned when describing the resource using AWS CLI. ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -UpdatePolicy Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group. You must use the "Add-UpdatePolicy" function here. ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Condition Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned. ```yaml Type: Object Parameter Sets: (All) Aliases: Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### Vaporshell.Resource.Pinpoint.APNSChannel ## NOTES ## RELATED LINKS [http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html)
Java
package com.rodbate.httpserver.nioserver.old; public interface WriterChannel { }
Java
package com.glaf.base.modules.sys.model; import java.io.Serializable; import java.util.Date; public class Dictory implements Serializable { private static final long serialVersionUID = 2756737871937885934L; private long id; private long typeId; private String code; private String name; private int sort; private String desc; private int blocked; private String ext1; private String ext2; private String ext3; private String ext4; private Date ext5; private Date ext6; public int getBlocked() { return blocked; } public String getCode() { return code; } public String getDesc() { return desc; } public String getExt1() { return ext1; } public String getExt2() { return ext2; } public String getExt3() { return ext3; } public String getExt4() { return ext4; } public Date getExt5() { return ext5; } public Date getExt6() { return ext6; } public long getId() { return id; } public String getName() { return name; } public int getSort() { return sort; } public long getTypeId() { return typeId; } public void setBlocked(int blocked) { this.blocked = blocked; } public void setCode(String code) { this.code = code; } public void setDesc(String desc) { this.desc = desc; } public void setExt1(String ext1) { this.ext1 = ext1; } public void setExt2(String ext2) { this.ext2 = ext2; } public void setExt3(String ext3) { this.ext3 = ext3; } public void setExt4(String ext4) { this.ext4 = ext4; } public void setExt5(Date ext5) { this.ext5 = ext5; } public void setExt6(Date ext6) { this.ext6 = ext6; } public void setId(long id) { this.id = id; } public void setName(String name) { this.name = name; } public void setSort(int sort) { this.sort = sort; } public void setTypeId(long typeId) { this.typeId = typeId; } }
Java
/** * AudienceSegmentAudienceSegmentType.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.dfp.axis.v201311; public class AudienceSegmentAudienceSegmentType implements java.io.Serializable { private java.lang.String _value_; private static java.util.HashMap _table_ = new java.util.HashMap(); // Constructor protected AudienceSegmentAudienceSegmentType(java.lang.String value) { _value_ = value; _table_.put(_value_,this); } public static final java.lang.String _FIRST_PARTY = "FIRST_PARTY"; public static final java.lang.String _SHARED = "SHARED"; public static final java.lang.String _THIRD_PARTY = "THIRD_PARTY"; public static final java.lang.String _UNKNOWN = "UNKNOWN"; public static final AudienceSegmentAudienceSegmentType FIRST_PARTY = new AudienceSegmentAudienceSegmentType(_FIRST_PARTY); public static final AudienceSegmentAudienceSegmentType SHARED = new AudienceSegmentAudienceSegmentType(_SHARED); public static final AudienceSegmentAudienceSegmentType THIRD_PARTY = new AudienceSegmentAudienceSegmentType(_THIRD_PARTY); public static final AudienceSegmentAudienceSegmentType UNKNOWN = new AudienceSegmentAudienceSegmentType(_UNKNOWN); public java.lang.String getValue() { return _value_;} public static AudienceSegmentAudienceSegmentType fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { AudienceSegmentAudienceSegmentType enumeration = (AudienceSegmentAudienceSegmentType) _table_.get(value); if (enumeration==null) throw new java.lang.IllegalArgumentException(); return enumeration; } public static AudienceSegmentAudienceSegmentType fromString(java.lang.String value) throws java.lang.IllegalArgumentException { return fromValue(value); } public boolean equals(java.lang.Object obj) {return (obj == this);} public int hashCode() { return toString().hashCode();} public java.lang.String toString() { return _value_;} public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);} public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.EnumSerializer( _javaType, _xmlType); } public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.EnumDeserializer( _javaType, _xmlType); } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(AudienceSegmentAudienceSegmentType.class); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "AudienceSegment.AudienceSegmentType")); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } }
Java
# Copyright 2018 Red Hat, Inc. # # 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. import netaddr from rally.common import logging from rally.common.utils import RandomNameGeneratorMixin from rally_ovs.plugins.ovs import ovsclients from rally_ovs.plugins.ovs import utils LOG = logging.getLogger(__name__) class OvnClientMixin(ovsclients.ClientsMixin, RandomNameGeneratorMixin): def _get_ovn_controller(self, install_method="sandbox"): ovn_nbctl = self.controller_client("ovn-nbctl") ovn_nbctl.set_sandbox("controller-sandbox", install_method, self.context['controller']['host_container']) ovn_nbctl.set_daemon_socket(self.context.get("daemon_socket", None)) return ovn_nbctl def _start_daemon(self): ovn_nbctl = self._get_ovn_controller(self.install_method) return ovn_nbctl.start_daemon() def _stop_daemon(self): ovn_nbctl = self._get_ovn_controller(self.install_method) ovn_nbctl.stop_daemon() def _restart_daemon(self): self._stop_daemon() return self._start_daemon() def _create_lswitches(self, lswitch_create_args, num_switches=-1): self.RESOURCE_NAME_FORMAT = "lswitch_XXXXXX_XXXXXX" if (num_switches == -1): num_switches = lswitch_create_args.get("amount", 1) batch = lswitch_create_args.get("batch", num_switches) start_cidr = lswitch_create_args.get("start_cidr", "") if start_cidr: start_cidr = netaddr.IPNetwork(start_cidr) mcast_snoop = lswitch_create_args.get("mcast_snoop", "true") mcast_idle = lswitch_create_args.get("mcast_idle_timeout", 300) mcast_table_size = lswitch_create_args.get("mcast_table_size", 2048) LOG.info("Create lswitches method: %s" % self.install_method) ovn_nbctl = self._get_ovn_controller(self.install_method) ovn_nbctl.enable_batch_mode() flush_count = batch lswitches = [] for i in range(num_switches): name = self.generate_random_name() if start_cidr: cidr = start_cidr.next(i) name = "lswitch_%s" % cidr else: name = self.generate_random_name() other_cfg = { 'mcast_snoop': mcast_snoop, 'mcast_idle_timeout': mcast_idle, 'mcast_table_size': mcast_table_size } lswitch = ovn_nbctl.lswitch_add(name, other_cfg) if start_cidr: lswitch["cidr"] = cidr LOG.info("create %(name)s %(cidr)s" % \ {"name": name, "cidr": lswitch.get("cidr", "")}) lswitches.append(lswitch) flush_count -= 1 if flush_count < 1: ovn_nbctl.flush() flush_count = batch ovn_nbctl.flush() # ensure all commands be run ovn_nbctl.enable_batch_mode(False) return lswitches def _create_routers(self, router_create_args): self.RESOURCE_NAME_FORMAT = "lrouter_XXXXXX_XXXXXX" amount = router_create_args.get("amount", 1) batch = router_create_args.get("batch", 1) ovn_nbctl = self._get_ovn_controller(self.install_method) ovn_nbctl.enable_batch_mode() flush_count = batch lrouters = [] for i in range(amount): name = self.generate_random_name() lrouter = ovn_nbctl.lrouter_add(name) lrouters.append(lrouter) flush_count -= 1 if flush_count < 1: ovn_nbctl.flush() flush_count = batch ovn_nbctl.flush() # ensure all commands be run ovn_nbctl.enable_batch_mode(False) return lrouters def _connect_network_to_router(self, router, network): LOG.info("Connect network %s to router %s" % (network["name"], router["name"])) ovn_nbctl = self.controller_client("ovn-nbctl") ovn_nbctl.set_sandbox("controller-sandbox", self.install_method, self.context['controller']['host_container']) ovn_nbctl.enable_batch_mode(False) base_mac = [i[:2] for i in self.task["uuid"].split('-')] base_mac[0] = str(hex(int(base_mac[0], 16) & 254)) base_mac[3:] = ['00']*3 mac = utils.get_random_mac(base_mac) lrouter_port = ovn_nbctl.lrouter_port_add(router["name"], network["name"], mac, str(network["cidr"])) ovn_nbctl.flush() switch_router_port = "rp-" + network["name"] lport = ovn_nbctl.lswitch_port_add(network["name"], switch_router_port) ovn_nbctl.db_set('Logical_Switch_Port', switch_router_port, ('options', {"router-port":network["name"]}), ('type', 'router'), ('address', 'router')) ovn_nbctl.flush() def _connect_networks_to_routers(self, lnetworks, lrouters, networks_per_router): for lrouter in lrouters: LOG.info("Connect %s networks to router %s" % (networks_per_router, lrouter["name"])) for lnetwork in lnetworks[:networks_per_router]: LOG.info("connect networks %s cidr %s" % (lnetwork["name"], lnetwork["cidr"])) self._connect_network_to_router(lrouter, lnetwork) lnetworks = lnetworks[networks_per_router:]
Java
## COMISS - Compare Scalar Ordered Single-Precision Floating-Point Values and Set EFLAGS > Operation ``` slim RESULT <- OrderedCompare(SRC1[31:0] <> SRC2[31:0]) { (\* Set EFLAGS \*) CASE (RESULT) OF``` ### UNORDERED ### GREATER_THAN ### LESS_THAN ### EQUAL ESAC; OF,AF,SF <- 0; } > Intel C/C++ Compiler Intrinsic Equivalents ``` slim int _mm_comieq_ss (__m128 a, __m128 b) int _mm_comilt_ss (__m128 a, __m128 b) int _mm_comile_ss (__m128 a, __m128 b) int _mm_comigt_ss (__m128 a, __m128 b) int _mm_comige_ss (__m128 a, __m128 b) int _mm_comineq_ss (__m128 a, __m128 b) ``` Opcode/Instruction | Op/En| 64/32-bit Mode| CPUID Feature Flag| Description --- | --- | --- | --- | --- 0F 2F /r COMISS xmm1, xmm2/m32 | RM | V/V | SSE | Compare low single-precision floating-point | | | | values in xmm1 and xmm2/mem32 and set | | | | the EFLAGS flags accordingly. VEX.LIG.0F.WIG 2F /r VCOMISS xmm1, xmm2/m32| RM | V/V | AVX | Compare low single precision floating-point | | | | values in xmm1 and xmm2/mem32 and set | | | | the EFLAGS flags accordingly. ### Instruction Operand Encoding Op/En| Operand 1 | Operand 2 | Operand 3| Operand 4 --- | --- | --- | --- | --- RM | ModRM:reg (r)| ModRM:r/m (r)| NA | NA ### Description Compares the single-precision floating-point values in the low doublewords of operand 1 (first operand) and operand 2 (second operand), and sets the ZF, PF, and CF flags in the EFLAGS register according to the result (unordered, greater than, less than, or equal). The OF, SF, and AF flags in the EFLAGS register are set to 0. The unordered result is returned if either source operand is a NaN (QNaN or SNaN). The sign of zero is ignored for comparisons, so that -0.0 is equal to +0.0. Operand 1 is an XMM register; Operand 2 can be an XMM register or a 32 bit memory location. The COMISS instruction differs from the UCOMISS instruction in that it signals a SIMD floating-point invalid operation exception (**``#I)``** when a source operand is either a QNaN or SNaN. The UCOMISS instruction signals an invalid numeric exception only if a source operand is an SNaN. The EFLAGS register is not updated if an unmasked SIMD floating-point exception is generated. In 64-bit mode, use of the REX.R prefix permits this instruction to access additional registers (XMM8-XMM15). Note: In VEX-encoded versions, VEX.vvvv is reserved and must be 1111b, otherwise instructions will **``#UD.``** ### SIMD Floating-Point Exceptions Invalid (if SNaN or QNaN operands), Denormal. ### Other Exceptions See Exceptions Type 3; additionally | | ---- | ----- **``#UD``**| If VEX.vvvv != 1111B.
Java
<?php namespace OpenOrchestra\ModelBundle\Repository; use OpenOrchestra\ModelInterface\Repository\RedirectionRepositoryInterface; use OpenOrchestra\Repository\AbstractAggregateRepository; use OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration; use Solution\MongoAggregation\Pipeline\Stage; /** * Class RedirectionRepository */ class RedirectionRepository extends AbstractAggregateRepository implements RedirectionRepositoryInterface { /** * @param string $nodeId * @param string $locale * @param string $siteId * * @return array */ public function findByNode($nodeId, $locale, $siteId){ $qa = $this->createAggregationQuery(); $qa->match(array( 'nodeId' => $nodeId, 'locale' => $locale, 'siteId' => $siteId, )); return $this->hydrateAggregateQuery($qa); } /** * @param string $siteId * * @return array */ public function findBySiteId($siteId){ $qa = $this->createAggregationQuery(); $qa->match(array( 'siteId' => $siteId, )); return $this->hydrateAggregateQuery($qa); } /** * @param PaginateFinderConfiguration $configuration * * @return array */ public function findForPaginate(PaginateFinderConfiguration $configuration) { $qa = $this->createAggregationQuery(); $this->filterSearch($configuration, $qa); $order = $configuration->getOrder(); if (!empty($order)) { $qa->sort($order); } $qa->skip($configuration->getSkip()); $qa->limit($configuration->getLimit()); return $this->hydrateAggregateQuery($qa); } /** * @return int */ public function count() { $qa = $this->createAggregationQuery(); return $this->countDocumentAggregateQuery($qa); } /** * @param string $pattern * @param string $redirectionId * * @return int */ public function countByPattern($pattern, $redirectionId) { $qa = $this->createAggregationQuery(); $qa->match(array( 'routePattern' => $pattern, '_id' => array('$ne' => new \MongoId($redirectionId)) )); return $this->countDocumentAggregateQuery($qa); } /** * @param PaginateFinderConfiguration $configuration * * @return int */ public function countWithFilter(PaginateFinderConfiguration $configuration) { $qa = $this->createAggregationQuery(); $this->filterSearch($configuration, $qa); return $this->countDocumentAggregateQuery($qa); } /** * @param PaginateFinderConfiguration $configuration * @param Stage $qa * * @return array */ protected function filterSearch(PaginateFinderConfiguration $configuration, Stage $qa) { $siteName = $configuration->getSearchIndex('site_name'); if (null !== $siteName && '' !== $siteName) { $qa->match(array('siteName' => new \MongoRegex('/.*' . $siteName . '.*/i'))); } $locale = $configuration->getSearchIndex('locale'); if (null !== $locale && '' !== $locale) { $qa->match(array('locale' => new \MongoRegex('/.*' . $locale . '.*/i'))); } $routePattern = $configuration->getSearchIndex('route_pattern'); if (null !== $routePattern && '' !== $routePattern) { $qa->match(array('routePattern' => new \MongoRegex('/.*' . $routePattern . '.*/i'))); } $redirection = $configuration->getSearchIndex('redirection'); if (null !== $redirection && '' !== $redirection) { $qa->match(array('$or' => array( array('url' => new \MongoRegex('/.*' . $redirection . '.*/i')), array('nodeId' => new \MongoRegex('/.*' . $redirection . '.*/i')) ))); } $permanent = $configuration->getSearchIndex('permanent'); if (null !== $redirection && '' !== $permanent) { if ('true' == $permanent) { $qa->match(array('permanent' => true)); } if ('false' == $permanent) { $qa->match(array('permanent' => false)); } } return $qa; } /** * @param array $redirectionIds * * @throws \Exception */ public function removeRedirections(array $redirectionIds) { $redirectionMongoIds = array(); foreach ($redirectionIds as $redirectionId) { $redirectionMongoIds[] = new \MongoId($redirectionId); } $qb = $this->createQueryBuilder(); $qb->remove() ->field('id')->in($redirectionMongoIds) ->getQuery() ->execute(); } }
Java
<?php // Check for empty fields if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['phone']) || empty($_POST['message']) || !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL)) { echo "No arguments Provided!"; return false; } $name = $_POST['name']; $email_address = $_POST['email']; $phone = $_POST['phone']; $message = $_POST['message']; // Create the email and send the message $to = 'development@sharay.com'; // Add your email address inbetween the '' replacing yourname@yourdomain.com - This is where the form will send a message to. $email_subject = "Website Contact Form: $name"; $email_body = "You have received a new message from your website contact form.\n\n"."Here are the details:\n\nName: $name\n\nEmail: $email_address\n\nPhone: $phone\n\nMessage:\n$message"; $headers = "From: noreply@yourdomain.com\n"; // This is the email address the generated message will be from. We recommend using something like noreply@yourdomain.com. $headers .= "Reply-To: $email_address"; mail($to,$email_subject,$email_body,$headers); return true; ?>
Java
--- code: true type: page title: mCreateOrReplace description: Creates or replaces documents in kuzzle --- # MCreateOrReplace Creates or replaces multiple documents. Returns a partial error (error code 206) if one or more document creations/replacements fail. ## Arguments ```go MCreateOrReplace( index string, collection string, documents json.RawMessage, options types.QueryOptions) (json.RawMessage, error) ``` <br/> | Argument | Type | Description | | ------------ | ----------------------------- | --------------------------------- | | `index` | <pre>string</pre> | Index name | | `collection` | <pre>string</pre> | Collection name | | `documents` | <pre>json.RawMessage</pre> | JSON array of documents to create | | `options` | <pre>types.QueryOptions</pre> | A struct containing query options | ### options Additional query options | Option | Type<br/>(default) | Description | | ---------- | ----------------------------- | ---------------------------------------------------------------------------------- | | `Queuable` | <pre>bool</pre> <br/>(`true`) | If true, queues the request during downtime, until connected to Kuzzle again | | `Refresh` | <pre>string</pre><br/>(`""`) | If set to `wait_for`, waits for the change to be reflected for `search` (up to 1s) | ## Return Returns a json.RawMessage containing two arrays, successes and errors. Each created or replaced document is an object of the `successes` array with the following properties: | Name | Type | Description | | ---------- | -------------------------- | ------------------------------------------------------ | | `_id` | <pre>string</pre> | Document ID | | `_version` | <pre>int</pre> | Version of the document in the persistent data storage | | `_source` | <pre>json.RawMessage</pre> | Document content | | `created` | <pre>bool</pre> | True if the document was created | Each errored document is an object of the `errors` array with the following properties: | Name | Type | Description | | ---------- | -------------------------- | ----------------------------- | | `document` | <pre>json.RawMessage</pre> | Document that caused the error | | `status` | <pre>int</pre> | HTTP error status | | `reason` | <pre>string</pre> | Human readable reason | ## Usage <<< ./snippets/m-create-or-replace.go
Java
<!-- About Section --> <section id="about" class="container content-section text-center"> <div class="row"> <div class="col-lg-8 col-lg-offset-2"> <h2>About Me</h2> <p>I am a Computer Science Undergrad from <span>National Institute of Technology, Silchar.</span></p> <p>Love to spend my time coding and hanging out with friends.If you like to create and kill 'BUGS', Party Hard or Dream Big you will feel right at home with me. </p> <p>I am more of a laid-back ambitious coder, and like to know about stuffs. My interests include Competitive Programming, Machine Learning, Contributing to Open source. I like to share what I know and if you feel I can help you in any way drop me a mail at <a href="mailto:sagarkar10@gmail.com">sagarkar10@gmail.com</a> </p> </div> </div> </section>
Java
/** * DeleteCustomTargetingValues.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.dfp.axis.v201308; /** * Represents the delete action that can be performed on * {@link CustomTargetingValue} objects. */ public class DeleteCustomTargetingValues extends com.google.api.ads.dfp.axis.v201308.CustomTargetingValueAction implements java.io.Serializable { public DeleteCustomTargetingValues() { } public DeleteCustomTargetingValues( java.lang.String customTargetingValueActionType) { super( customTargetingValueActionType); } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof DeleteCustomTargetingValues)) return false; DeleteCustomTargetingValues other = (DeleteCustomTargetingValues) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = super.equals(obj); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = super.hashCode(); __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(DeleteCustomTargetingValues.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201308", "DeleteCustomTargetingValues")); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
Java