answer
stringlengths
15
1.25M
package com.project.quiz.adapters; import android.content.Context; import android.database.Cursor; import android.support.annotation.NonNull; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.SimpleCursorAdapter; import android.widget.TextView; import com.project.quiz.R; import com.project.quiz.customviews.TextViewRegularFont; import com.project.quiz.database.StudentRecords; import java.util.ArrayList; import java.util.HashMap; import butterknife.Bind; import butterknife.ButterKnife; public class <API key> extends SimpleCursorAdapter { public Context context; private int layout; public <API key>(Context context, int layout, Cursor c, String[] from, int[] to, int flags) { super(context, layout, c, from, to, flags); this.context = context; this.layout = layout; } @Override public void bindView(View view, Context context, @NonNull final Cursor cursor) { boolean selected; ViewHolder holder; if(view.getTag() == null){ holder = new ViewHolder(view); view.setTag(holder); } holder = (ViewHolder)view.getTag(); holder.studentName.setText(cursor.getString(cursor.getColumnIndex(StudentRecords.STUDENT_NAME))); holder.studentPosition.setText(String.valueOf(cursor.getPosition()+1)); holder.studentScore.setText(cursor.getString(cursor.getColumnIndex(StudentRecords.STUDENT_SCORE))); } @Override public View newView(Context context, Cursor cursor, ViewGroup parent) { View v = LayoutInflater.from(context).inflate(layout, parent, false); ViewHolder holder = new ViewHolder(v); v.setTag(holder); return v; } public static class ViewHolder { @Bind(R.id.<API key>) TextViewRegularFont studentPosition; @Bind(R.id.student_name_field) TextViewRegularFont studentName; @Bind(R.id.student_score_field) TextViewRegularFont studentScore; public ViewHolder(View v) { ButterKnife.bind(this, v); } } }
package org.eclipse.jnosql.artemis.column.query; import jakarta.nosql.Condition; import jakarta.nosql.Sort; import jakarta.nosql.column.Column; import jakarta.nosql.column.ColumnCondition; import jakarta.nosql.column.ColumnQuery; import jakarta.nosql.mapping.Converters; import jakarta.nosql.mapping.Pagination; import jakarta.nosql.mapping.Repository; import jakarta.nosql.mapping.Sorts; import jakarta.nosql.mapping.column.ColumnTemplate; import jakarta.nosql.mapping.reflection.ClassMappings; import jakarta.nosql.tck.entities.Person; import jakarta.nosql.tck.test.CDIExtension; import org.hamcrest.Matchers; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; import javax.inject.Inject; import java.lang.reflect.Proxy; import java.time.Duration; import java.util.List; import java.util.Optional; import java.util.stream.Stream; import static jakarta.nosql.Condition.AND; import static jakarta.nosql.Condition.EQUALS; import static java.util.concurrent.ThreadLocalRandom.current; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @CDIExtension public class <API key> { private ColumnTemplate template; @Inject private ClassMappings classMappings; @Inject private Converters converters; private PersonRepository personRepository; @BeforeEach public void setUp() { this.template = Mockito.mock(ColumnTemplate.class); <API key> personHandler = new <API key>(template, classMappings, PersonRepository.class, converters); when(template.insert(any(Person.class))).thenReturn(Person.builder().build()); when(template.insert(any(Person.class), any(Duration.class))).thenReturn(Person.builder().build()); when(template.update(any(Person.class))).thenReturn(Person.builder().build()); personRepository = (PersonRepository) Proxy.newProxyInstance(PersonRepository.class.getClassLoader(), new Class[]{PersonRepository.class}, personHandler); } @Test public void shouldFindAll() { when(template.select(any(ColumnQuery.class))).thenReturn(Stream.of(Person.builder().build())); Pagination pagination = getPagination(); personRepository.findAll(pagination, Sorts.sorts().asc("name")); ArgumentCaptor<ColumnQuery> captor = ArgumentCaptor.forClass(ColumnQuery.class); verify(template).select(captor.capture()); ColumnQuery query = captor.getValue(); assertEquals("Person", query.getColumnFamily()); assertEquals(pagination.getSkip(), query.getSkip()); assertEquals(pagination.getLimit(), query.getLimit()); assertThat(query.getSorts(), Matchers.contains(Sort.asc("name"))); } @Test public void shouldFindByName() { when(template.singleResult(any(ColumnQuery.class))).thenReturn(Optional .of(Person.builder().build())); Pagination pagination = getPagination(); personRepository.findByName("name", pagination, Sort.desc("name")); ArgumentCaptor<ColumnQuery> captor = ArgumentCaptor.forClass(ColumnQuery.class); verify(template).singleResult(captor.capture()); ColumnQuery query = captor.getValue(); ColumnCondition condition = query.getCondition().get(); assertEquals("Person", query.getColumnFamily()); assertEquals(Condition.EQUALS, condition.getCondition()); assertEquals(pagination.getSkip(), query.getSkip()); assertEquals(pagination.getLimit(), query.getLimit()); assertThat(query.getSorts(), Matchers.contains(Sort.desc("name"))); assertEquals(Column.of("name", "name"), condition.getColumn()); assertNotNull(personRepository.findByName("name", pagination, Sort.asc("name"))); when(template.singleResult(any(ColumnQuery.class))).thenReturn(Optional .empty()); assertNull(personRepository.findByName("name", pagination, Sort.asc("name"))); } @Test public void shouldFindByAge() { when(template.select(any(ColumnQuery.class))) .thenReturn(Stream.of(Person.builder().build())); personRepository.findByAge(10, Sort.desc("name")); ArgumentCaptor<ColumnQuery> captor = ArgumentCaptor.forClass(ColumnQuery.class); verify(template).select(captor.capture()); ColumnQuery query = captor.getValue(); ColumnCondition condition = query.getCondition().get(); assertEquals("Person", query.getColumnFamily()); assertEquals(Condition.EQUALS, condition.getCondition()); assertEquals(0, query.getSkip()); assertEquals(0, query.getLimit()); assertThat(query.getSorts(), Matchers.contains(Sort.desc("name"))); assertEquals(Column.of("age", 10), condition.getColumn()); when(template.select(any(ColumnQuery.class))) .thenReturn(Stream.of(Person.builder().build())); assertNotNull(personRepository.findByAge(10, Sort.asc("name"))); when(template.singleResult(any(ColumnQuery.class))).thenReturn(Optional .empty()); } @Test public void <API key>() { when(template.select(any(ColumnQuery.class))) .thenReturn(Stream.of(Person.builder().build())); personRepository.findByNameAndAge("name", 10, Sorts.sorts().desc("name")); ArgumentCaptor<ColumnQuery> captor = ArgumentCaptor.forClass(ColumnQuery.class); verify(template).select(captor.capture()); ColumnQuery query = captor.getValue(); ColumnCondition condition = query.getCondition().get(); assertEquals("Person", query.getColumnFamily()); assertEquals(AND, condition.getCondition()); assertEquals(0, query.getSkip()); assertEquals(0, query.getLimit()); assertThat(query.getSorts(), Matchers.contains(Sort.desc("name"))); } @Test public void <API key>() { when(template.select(any(ColumnQuery.class))) .thenReturn(Stream.of((Person.builder().build()))); Pagination pagination = getPagination(); personRepository.<API key>("name", pagination, Sort.desc("age")); ArgumentCaptor<ColumnQuery> captor = ArgumentCaptor.forClass(ColumnQuery.class); verify(template).select(captor.capture()); ColumnQuery query = captor.getValue(); ColumnCondition condition = query.getCondition().get(); assertEquals("Person", query.getColumnFamily()); assertEquals(EQUALS, condition.getCondition()); assertEquals(Column.of("name", "name"), condition.getColumn()); assertEquals(pagination.getSkip(), query.getSkip()); assertEquals(pagination.getLimit(), query.getLimit()); assertThat(query.getSorts(), Matchers.contains(Sort.asc("name"), Sort.desc("age"))); } @Test public void <API key>() { when(template.select(any(ColumnQuery.class))) .thenReturn(Stream.of((Person.builder().build()))); Pagination pagination = getPagination(); personRepository.<API key>("name", pagination, Sorts.sorts().desc("age").asc("phone")); ArgumentCaptor<ColumnQuery> captor = ArgumentCaptor.forClass(ColumnQuery.class); verify(template).select(captor.capture()); ColumnQuery query = captor.getValue(); ColumnCondition condition = query.getCondition().get(); assertEquals("Person", query.getColumnFamily()); assertEquals(EQUALS, condition.getCondition()); assertEquals(Column.of("name", "name"), condition.getColumn()); assertEquals(pagination.getSkip(), query.getSkip()); assertEquals(pagination.getLimit(), query.getLimit()); assertThat(query.getSorts(), Matchers.contains(Sort.asc("name"), Sort.desc("age"), Sort.asc("phone"))); } private Pagination getPagination() { return Pagination.page(current().nextLong(1, 10)).size(current().nextLong(1, 10)); } interface PersonRepository extends Repository<Person, Long> { List<Person> findAll(Pagination pagination, Sorts sorts); Person findByName(String name, Pagination pagination, Sort sort); List<Person> findByAge(Integer age, Sort sort); List<Person> findByNameAndAge(String name, Integer age, Sorts sorts); List<Person> <API key>(String name, Pagination pagination, Sort sort); List<Person> <API key>(String name, Pagination pagination, Sorts sorts); } }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_151) on Fri Apr 06 09:47:13 MST 2018 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>DeploymentProcessor (BOM: * : All 2018.4.2 API)</title> <meta name="date" content="2018-04-06"> <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="DeploymentProcessor (BOM: * : All 2018.4.2 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> <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/DeploymentProcessor.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, 2018.4.2</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../org/wildfly/swarm/spi/api/<API key>.html" title="interface in org.wildfly.swarm.spi.api"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../../org/wildfly/swarm/spi/api/Environment.html" title="class in org.wildfly.swarm.spi.api"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/wildfly/swarm/spi/api/DeploymentProcessor.html" target="_top">Frames</a></li> <li><a href="DeploymentProcessor.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); 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> <div class="header"> <div class="subTitle">org.wildfly.swarm.spi.api</div> <h2 title="Interface DeploymentProcessor" class="title">Interface DeploymentProcessor</h2> </div> <div class="contentContainer"> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public interface <span class="typeNameLabel">DeploymentProcessor</span></pre> <div class="block">Created by bob on 5/17/17.</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <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>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/wildfly/swarm/spi/api/DeploymentProcessor.html#process--">process</a></span>()</code>&nbsp;</td> </tr> </table> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="method.detail"> </a> <h3>Method Detail</h3> <a name="process </a> <ul class="blockListLast"> <li class="blockList"> <h4>process</h4> <pre>void&nbsp;process() throws <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <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/DeploymentProcessor.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, 2018.4.2</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../org/wildfly/swarm/spi/api/<API key>.html" title="interface in org.wildfly.swarm.spi.api"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../../org/wildfly/swarm/spi/api/Environment.html" title="class in org.wildfly.swarm.spi.api"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/wildfly/swarm/spi/api/DeploymentProcessor.html" target="_top">Frames</a></li> <li><a href="DeploymentProcessor.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); 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> <p class="legalCopy"><small>Copyright & </body> </html>
class BaseSvc { constructor(http){ this.http=http; } call_sp(spName, params){ return this.http.post('api/sp/call',{sp_name:spName, sp_params:params||null}); } where(tableName, where, fieldName='id', order='DESC' ){ return this.http.post('api/sp/where',{tableName:tableName, where:where, fieldName:fieldName, order:order}); } get_all(tableName, fieldName='id', order='DESC' ){ return this.http.post('api/sp/get_all',{tableName:tableName, fieldName:fieldName, order:order}); } find(tableName, id ,primaryKeyName='id'){ return this.http.post('api/sp/find',{tableName:tableName, id:id, pk:primaryKeyName}); } remove(tableName, id ,primaryKeyName='id'){ return this.http.post('api/sp/remove',{tableName:tableName, id:id, pk:primaryKeyName}); } create(tableName, obj ){ obj.tableName=tableName; return this.http.post('api/sp/create',obj); } update(tableName, id, obj, primaryKeyName='id'){ obj.tableName=tableName; obj.id=id; obj.pk=primaryKeyName; return this.http.post('api/sp/update',obj); } exportExcel(spName, spParams, fileName){ if(!angular.isArray(spParams)){ spParams= angular.toJson(this.getParams(spParams)); } window.location='Repository/ExportExcel/?spName='+spName+'&spParams='+spParams+'&fileName='+fileName; } getParams(obj){ var paramList=[]; for(var key in obj){ paramList.push({name:key, value:obj[key]}); } return paramList; } } export default BaseSvc;
package com.coolweather.healthfod; public class Food { private String tv1; private String tv2; private int ivId; public Food(int ivId,String tv1,String tv2){ this.ivId=ivId; this.tv1=tv1; this.tv2=tv2; } public String getTv1() { return tv1; } public String getTv2() { return tv2; } public int getIvId() { return ivId; } }
package org.locationtech.geomesa.lambda.stream.kafka import org.locationtech.geomesa.index.planning.InMemoryQueryRunner import org.locationtech.geomesa.index.stats.GeoMesaStats import org.locationtech.geomesa.lambda.stream.kafka.KafkaFeatureCache.<API key> import org.locationtech.geomesa.security.<API key> import org.locationtech.geomesa.utils.collection.CloseableIterator import org.opengis.feature.simple.{SimpleFeature, SimpleFeatureType} import org.opengis.filter.{Filter, Id} class KafkaQueryRunner(features: <API key>, stats: GeoMesaStats, authProvider: Option[<API key>]) extends InMemoryQueryRunner(stats, authProvider) { override protected val name: String = "Kafka lambda" override protected def features(sft: SimpleFeatureType, filter: Option[Filter]): CloseableIterator[SimpleFeature] = { import scala.collection.JavaConversions._ val iter = filter match { case Some(f: Id) => f.getIDs.iterator.map(i => features.get(i.toString)).filter(_ != null) case Some(f) => features.all().filter(f.evaluate) case None => features.all() } CloseableIterator(iter) } }
<?php session_start(); session_destroy(); // Destroying All Sessions include ($_SERVER['DOCUMENT_ROOT']."/checkit/database/connect.php"); if (isset($_POST['submit'])) { $username = $_POST['user']; $query = mysql_query("select * from Users where LoginName='$username'"); $rows = mysql_num_rows($query); if ($rows > 0) { $error = "There is already a LoginName"; } else if ($_POST['pass'] != $_POST['cPass']) { $error = "Passwords must be the same"; } else if ($_POST['accountType'] == 'null'){ $error = "Account type mustn't be blanked"; } else { // Define $username and $password $fname=$_POST['Firstname']; $lname=$_POST['Lastname']; $phone=$_POST['phone']; $mail=$_POST['mail']; $desc = $_POST['description']; $gender = $_POST['gender']; $username=$_POST['user']; $password=$_POST['pass']; $cpassword=$_POST['cPass']; $fullname=$fname .' ' .$lname; $account = $_POST['accountType']; $address =$_POST['address']; $prepAddr = str_replace(' ','+',$address); $geocode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$prepAddr.'&sensor=false'); $output= json_decode($geocode); $latitude = $output->results[0]->geometry->location->lat; $longitude = $output->results[0]->geometry->location->lng; // die($address); $typeQuery = "select id from AccountType where state = 1 and name = '$account' ORDER BY id DESC LIMIT 1"; $result = mysql_query($typeQuery); //die(mysql_result($result, 0)); $accountId = mysql_result($result, 0); /* $accountId = null; if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; } if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { $accountId = $row["id"]; } } */ $query = "insert into Users(State,FullName,FirstName,LastName,PhoneNum,EmailAddress,Gender,Description,LoginName,Password,LatCoordinate,LongCoordinate,Address,refTypeAccountId) values (1,'$fullname','$fname','$lname','$phone','$mail','$gender','$desc','$username','$password','$latitude','$longitude','$address','$accountId')"; mysql_query($query); session_start(); // Starting Session $_SESSION['login_user']=$username; // Initializing Session $_SESSION['accountTypeName'] = $account; if($account == 'Regular'){ header("location: ../profile.php"); } if($account == 'Business'){ header("location: ../business/businessmap.php"); } } // header("location: https://mail.google.com/mail/u/0/?tab=wm#trash"); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <!-- This file has been downloaded from Bootsnipp.com. Enjoy! --> <title>User Form for registration - Bootsnipp.com</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="../css/bootstrap.min.css" rel="stylesheet"> <link href="../css/signup.css" rel="stylesheet" type="text/css"> <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="../js/bootstrap.js"></script> <script src="../js/bootbox.js"></script> <script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> </head> <body> <br><br> <div class="M1" > <div class="container-fluid" ><br><br> <div class="col-xs-1 col-md-1" style=" padding-left:10px"> <br> <div style="text-align: left; "> <div class="container"> <div class="btn-group btn-group-vertical"> <! <div class="btn-group"> <button type="button" class="btn btn-nav"> <span class="glyphicon glyphicon-user"></span> <p>Profile</p> </button> </div> <div class="btn-group"> <button type="button" class="btn btn-nav"> <span class="glyphicon glyphicon-calendar"></span> <p>Calendar</p> </button> </div> <div class="btn-group"> <button type="button" class="btn btn-nav"> <span class="glyphicon glyphicon-globe"></span> <p>Network</p> </button> </div> <div class="btn-group"> <button type="button" class="btn btn-nav"> <span class="glyphicon glyphicon-picture"></span> <p>Upload </p> </button> </div> <div class="btn-group"> <button type="button" class="btn btn-nav"> <span class="glyphicon glyphicon-time"></span> <p>Statistics</p> </button> </div> <div class="btn-group"> <button type="button" class="btn btn-nav"> <span class="glyphicon glyphicon-bell"></span> <p>Events</p> </button> </div> <div class="btn-group"> <button type="button" class="btn btn-nav"> <span class="glyphicon glyphicon-th"></span> <p>ALL</p> </button> </div> </div> </div> </div> </div> <div class="col-xs-4 col-md-6"> <! <form role="form" class="form-inline col-md-9 go-right" style="color: Green;background-color:#FAFAFF;border-radius:0px 22px 22px 22px;"> <form action="" method="post" class="form-inline col-md-9 go-right" style="color: Green;background-color:#FAFAFF;border-radius:0px 22px 22px 22px;" id="myForm"> <h2>Profile</h2> <p>Please update your profile for more security.</p> <div class="form-group"> <input id="Firstname" name="Firstname" value="<?=( isset( $_POST['Firstname'] ) ? $_POST['Firstname'] : '' )?>" type="text" class="form-control" required> <label for="Firstname">First Name <span class="glyphicon glyphicon-user"> </span></label> </div> <div class="form-group"> <input id="Lastname" name="Lastname" value="<?=( isset( $_POST['Lastname'] ) ? $_POST['Lastname'] : '' )?>" type="text" class="form-control" required> <label for="Lastname">Last Name <span class="glyphicon glyphicon-user"> </label> </div> <div class="form-group"> <input id="phone" name="phone" value="<?=( isset( $_POST['phone'] ) ? $_POST['phone'] : '' )?>" type="tel" class="form-control" required> <label for="fphone">Phone Number <span class="glyphicon glyphicon-phone"></label> </div> <! <div class="form-group"> <input id="Middlename" name="Middlename" type="text" class="form-control" placeholder="Middle Name"> <label for="Middlename">Middle Name <span class="glyphicon glyphicon-user"> </label> </div> <br> <br> <div class="form-group"> <input id="login" name="user" value="<?=( isset( $_POST['user'] ) ? $_POST['user'] : '' )?>" type="text" class="form-control" required> <label for="login"> Login Name <span class="glyphicon glyphicon-user"></label> </div> <div class="form-group"> <input id="password" name="pass" value="<?=( isset( $_POST['pass'] ) ? $_POST['pass'] : '' )?>" type="password" class="form-control" required> <label for="sphone">Password <span class="glyphicon glyphicon-eye-open"></label> </div> <div class="form-group"> <input id="cPass" name="cPass" value="<?=( isset( $_POST['cPass'] ) ? $_POST['cPass'] : '' )?>" type="password" class="form-control" required> <label for="sphone">Confirm Password <span class="glyphicon glyphicon-eye-close"></label> </div> <br><br> <div class="form-group"> <select class="form-control" id="gender" name="gender" > <option id="Male" Value="M" style="color:red" selected>Male</option> <option id="FeMale" Value="FM" style="color:green">Female</option> <option id="NotInterested" Value="NI" style="color:blue">Not interested</option> </select> </div> <div class="form-group"> <input id="date" name="date" value="<?=( isset( $_POST['date'] ) ? $_POST['date'] : '' )?>" type="date" class="form-control"> <label for="date">DOB<span class="glyphicon glyphicon-calendar"></label> </div> <br><br> <div class="form-group"> <textarea id="message" name="description" class="form-control" style="width:400px;height:100px" > <?=( isset( $_POST['description'] ) ? $_POST['description'] : '' )?> </textarea> <label for="message"><span class="glyphicon <API key>"></label> </div> <br><br> <div class="form-group"> <input id="Email1" name="mail" value="<?=( isset( $_POST['mail'] ) ? $_POST['mail'] : '' )?>" class="form-control" style="width:400px;" placeholder="Registered email" ></textarea> <label for="Email1">Registered email <span class="glyphicon <API key>"></label> </div> <br><br> <! <div class="form-group"> <input id="Email2" name="phone" class="form-control" style="width:400px;" placeholder="Alternate email" ></textarea> <label for="Email2">Alternate email <span class="glyphicon <API key>"></label> </div> <br><br> <div class="form-group"> <input id="Vweb" name="phone" class="form-control" style="width:400px;" placeholder="Website" ></textarea> <label for="Vweb">WebSite <span class="glyphicon <API key>"></label> </div> <br> <br> <p1>Address</p1> <br> <div class="form-group"> <input id="Address" name="address" value="<?=( isset( $_POST['address'] ) ? $_POST['address'] : '' )?>" type="tel" class="form-control" style="width:400px"; required> <label for="Address">Flat NO/House No</label> </div> <br><br> <p1>Account Type</p1> <br> <div class="form-group"> <select class="form-control" id="accountType" name="accountType" > <option id="" Value="null" style="color:gray" checked >Select Type</option> <option id="" Value="Regular" style="color:#000000">Regular Account</option> <option id="" Value="Business" style="color:black">Business Account</option> </select> </div> <!--<span class="clearfix"></span> <div class="form-group"> <input id="LandMark" name="LandMark" type="text" class="form-control" placeHolder="Land Mark"> <label for="LandMark">Land Mark</label> </div> <br><br> <p3>(Enter Pincode/Area to pick your nearest location)<span class="glyphicon <API key>"></p3> <br><br> <div class="form-group" style="width: 600px" > <input input id="autocomplete" name="LocationPicker" type="text" onFocus="geolocate()" style=" moz-border-radius: 22px;border-radius: 7px;" > <label for="LocationPicker">Location Picker</label> </div> <br><br> <div class="form-group"> <input id="route" name="route" type="tel" class="form-control" required disabled="true"> <label for="route">Route/Locality</label> </div> <div class="form-group"> <input id="locality" name="locality" type="tel" class="form-control" required disabled="true"> <label for="locality">City/Town</label> </div> <br> <div class="form-group"> <input id="<API key>" name="<API key>" type="tel" class="form-control" required disabled="true"> <label for="<API key>">District</label> </div> <div class="form-group"> <input id="<API key>" name="<API key>" type="tel" class="form-control" required disabled="true"> <label for="<API key>">State</label> </div> <br> <div class="form-group"> <input id="country" name="country" type="text" class="form-control" required disabled="true"> <label for="country">Country</label> </div> <div class="form-group"> <input id="postal_code" name="postal_code" type="tel" class="form-control" required disabled="true"> <label for="postal_code">Pin Code</label> </div> <br><br> <input class="btn btn-lg btn-success btn-block" name="submit" type="submit" value=" signup "> <span><?php echo $error; ?></span> <!-- <button> Save </button> <br> <br> </form> </div> <div class="col-xs-1 col-md-1" id="Customer feed"> </div> </div></div> <script type="text/javascript"> document.getElementById('gender').value = "<?php if ($_POST['gender']) echo $_POST['gender']; else echo NI ?>"; </script> <script src="../js/signup.js"></script> </body> </html>
package com.evolveum.midpoint.task.quartzimpl; import com.evolveum.midpoint.prism.Objectable; import com.evolveum.midpoint.prism.PrismContext; import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.repo.api.RepositoryService; import com.evolveum.midpoint.repo.sql.type.<API key>; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.util.logging.Trace; import com.evolveum.midpoint.util.logging.TraceManager; import com.evolveum.midpoint.xml.ns._public.common.common_3.CleanupPolicyType; import com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.<API key>; import org.springframework.test.context.testng.<API key>; import org.testng.AssertJUnit; import org.testng.annotations.Test; import javax.xml.datatype.DatatypeFactory; import javax.xml.datatype.Duration; import javax.xml.datatype.<API key>; import java.io.File; import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.TimeZone; import static com.evolveum.midpoint.test.<API key>.display; /** * @author lazyman */ @<API key>(locations = {"classpath:ctx-task-test.xml"}) @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) public class CleanupTest extends <API key> { private static final Trace LOGGER = TraceManager.getTrace(CleanupTest.class); public static final File FOLDER_BASIC = new File("./src/test/resources/basic"); @Autowired private <API key> taskManager; @Autowired private RepositoryService repositoryService; @Autowired private PrismContext prismContext; @Test public void testTasksCleanup() throws Exception { // GIVEN final File file = new File(FOLDER_BASIC, "tasks-for-cleanup.xml"); List<PrismObject<? extends Objectable>> elements = prismContext.parserFor(file).parseObjects(); OperationResult result = new OperationResult("tasks cleanup"); for (PrismObject<? extends Objectable> object : elements) { String oid = repositoryService.addObject((PrismObject) object, null, result); AssertJUnit.assertTrue(StringUtils.isNotEmpty(oid)); } // WHEN // because now we can't move system time (we're not using DI for it) we create policy // which should always point to 2013-05-07T12:00:00.000+02:00 final long NOW = System.currentTimeMillis(); Calendar when = <API key>(); CleanupPolicyType policy = createPolicy(when, NOW); taskManager.cleanupTasks(policy, taskManager.<API key>(taskManager.createTaskInstance()), result); // THEN List<PrismObject<TaskType>> tasks = repositoryService.searchObjects(TaskType.class, null, null, result); AssertJUnit.assertNotNull(tasks); display("tasks", tasks); AssertJUnit.assertEquals(1, tasks.size()); PrismObject<TaskType> task = tasks.get(0); <API key> timestamp = task.<API key>(TaskType.<API key>, <API key>.class); Date finished = <API key>.asDate(timestamp); Date mark = new Date(NOW); Duration duration = policy.getMaxAge(); duration.addTo(mark); AssertJUnit.assertTrue("finished: " + finished + ", mark: " + mark, finished.after(mark)); } private Calendar <API key>() { Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+2")); calendar.set(Calendar.YEAR, 2013); calendar.set(Calendar.MONTH, Calendar.MAY); calendar.set(Calendar.DAY_OF_MONTH, 7); calendar.set(Calendar.HOUR_OF_DAY, 12); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar; } private Duration createDuration(Calendar when, long now) throws Exception { long seconds = (now - when.getTimeInMillis()) / 1000; return DatatypeFactory.newInstance().newDuration("PT" + seconds + "S").negate(); } private CleanupPolicyType createPolicy(Calendar when, long now) throws Exception { CleanupPolicyType policy = new CleanupPolicyType(); Duration duration = createDuration(when, now); policy.setMaxAge(duration); return policy; } }
package cn.howardliu.gear.monitor.core.memory; import org.junit.Assert; import org.junit.Test; import javax.management.ObjectName; import java.lang.management.BufferPoolMXBean; import java.lang.management.ManagementFactory; import java.util.HashSet; import java.util.List; import java.util.Set; /** * <br>created at 17-5-3 * * @author liuxh * @version 1.0.0 * @since 1.0.0 */ public class BufferPoolTester { @Test public void test() throws Exception { Set<String> objectNameSet = new HashSet<>(); Set<ObjectName> nioBufferPools = ManagementFactory.<API key>() .queryNames(new ObjectName("java.nio:type=BufferPool,*"), null); for (ObjectName objectName : nioBufferPools) { objectNameSet.add(objectName.toString()); } List<BufferPoolMXBean> bufferPools = ManagementFactory.getPlatformMXBeans(BufferPoolMXBean.class); for (BufferPoolMXBean bufferPool : bufferPools) { objectNameSet.remove(bufferPool.getObjectName().toString()); } Assert.assertTrue(objectNameSet.isEmpty()); } }
package org.streamingpool.ext.tensorics; import org.streamingpool.ext.tensorics.testing.SerializableHasUid; public class <API key> extends SerializableHasUid { public <API key>() { super(PackageReference.packageName()); } }
package org.xbib.content.util.geo; import java.util.ArrayList; import java.util.Collection; public class GeoHashUtils { public static final int PRECISION = 12; private static final char[] BASE_32 = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; private static final int[] BITS = {16, 8, 4, 2, 1}; private GeoHashUtils() { } public static String encode(double latitude, double longitude) { return encode(latitude, longitude, PRECISION); } /** * Encodes the given latitude and longitude into a geohash. * * @param latitude Latitude to encode * @param longitude Longitude to encode * @param precision precision * @return Geohash encoding of the longitude and latitude */ public static String encode(double latitude, double longitude, int precision) { double latInterval0 = -90.0; double latInterval1 = 90.0; double lngInterval0 = -180.0; double lngInterval1 = 180.0; final StringBuilder geohash = new StringBuilder(); boolean isEven = true; int bit = 0; int ch = 0; while (geohash.length() < precision) { double mid; if (isEven) { mid = (lngInterval0 + lngInterval1) / 2D; if (longitude > mid) { ch |= BITS[bit]; lngInterval0 = mid; } else { lngInterval1 = mid; } } else { mid = (latInterval0 + latInterval1) / 2D; if (latitude > mid) { ch |= BITS[bit]; latInterval0 = mid; } else { latInterval1 = mid; } } isEven = !isEven; if (bit < 4) { bit++; } else { geohash.append(BASE_32[ch]); bit = 0; ch = 0; } } return geohash.toString(); } private static char encode(int x, int y) { return BASE_32[((x & 1) + ((y & 1) * 2) + ((x & 2) * 2) + ((y & 2) * 4) + ((x & 4) * 4)) % 32]; } /** * Calculate all neighbors of a given geohash cell. * * @param geohash Geohash of the defined cell * @return geohashes of all neighbor cells */ public static Collection<CharSequence> neighbors(String geohash) { return addNeighbors(geohash, geohash.length(), new ArrayList<CharSequence>(8)); } /** * Create an {@link Iterable} which allows to iterate over the cells that * contain a given geohash. * * @param geohash Geohash of a cell * @return {@link Iterable} of path */ public static Iterable<String> path(final String geohash) { return () -> new GeohashPathIterator(geohash); } /** * Calculate the geohash of a neighbor of a geohash. * * @param geohash the geohash of a cell * @param level non-negative level of the geohash * @param dx delta of the first grid coordinate (must be -1, 0 or +1) * @param dy delta of the second grid coordinate (must be -1, 0 or +1) * @return geohash of the defined cell */ private static String neighbor(String geohash, int level, int dx, int dy) { int cell = decode(geohash.charAt(level - 1)); // Decoding the Geohash bit pattern to determine grid coordinates int x0 = cell & 1; // first bit of x int y0 = cell & 2; // first bit of y int x1 = cell & 4; // second bit of x int y1 = cell & 8; // second bit of y int x2 = cell & 16; // third bit of x // combine the bitpattern to grid coordinates. // note that the semantics of x and y are swapping // on each level int x = x0 + (x1 / 2) + (x2 / 4); int y = (y0 / 2) + (y1 / 4); if (level == 1) { // Root cells at north (namely "bcfguvyz") or at // south (namely "0145hjnp") do not have neighbors // in north/south direction if ((dy < 0 && y == 0) || (dy > 0 && y == 3)) { return null; } else { return Character.toString(encode(x + dx, y + dy)); } } else if (level > 1) { boolean odd = (level % 2) != 0; // define grid coordinates for next level final int nx = odd ? (x + dx) : (x + dy); final int ny = odd ? (y + dy) : (y + dx); boolean even = (level % 2) == 0; // define grid limits for current level final int xLimit = even ? 7 : 3; final int yLimit = even ? 3 : 7; // if the defined neighbor has the same parent a the current cell // encode the cell directly. Otherwise find the cell next to this // cell recursively. Since encoding wraps around within a cell // it can be encoded here. if (nx >= 0 && nx <= xLimit && ny >= 0 && ny < yLimit) { return geohash.substring(0, level - 1) + encode(nx, ny); } else { String neighbor = neighbor(geohash, level - 1, dx, dy); if (neighbor != null) { return neighbor + encode(nx, ny); } else { return null; } } } return null; } /** * Add all geohashes of the cells next to a given geohash to a list. * * @param geohash Geohash of a specified cell * @param neighbors list to add the neighbors to * @param <E> the neighbor type * @return the given list */ public static <E extends Collection<? super String>> E addNeighbors(String geohash, E neighbors) { return addNeighbors(geohash, geohash.length(), neighbors); } /** * Add all geohashes of the cells next to a given geohash to a list. * * @param geohash Geohash of a specified cell * @param length level of the given geohash * @param neighbors list to add the neighbors to * @param <E> the neighbor type * @return the given list */ public static <E extends Collection<? super String>> E addNeighbors(String geohash, int length, E neighbors) { String south = neighbor(geohash, length, 0, -1); String north = neighbor(geohash, length, 0, +1); if (north != null) { neighbors.add(neighbor(north, length, -1, 0)); neighbors.add(north); neighbors.add(neighbor(north, length, +1, 0)); } neighbors.add(neighbor(geohash, length, -1, 0)); neighbors.add(neighbor(geohash, length, +1, 0)); if (south != null) { neighbors.add(neighbor(south, length, -1, 0)); neighbors.add(south); neighbors.add(neighbor(south, length, +1, 0)); } return neighbors; } private static int decode(char geo) { switch (geo) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; case 'b': return 10; case 'c': return 11; case 'd': return 12; case 'e': return 13; case 'f': return 14; case 'g': return 15; case 'h': return 16; case 'j': return 17; case 'k': return 18; case 'm': return 19; case 'n': return 20; case 'p': return 21; case 'q': return 22; case 'r': return 23; case 's': return 24; case 't': return 25; case 'u': return 26; case 'v': return 27; case 'w': return 28; case 'x': return 29; case 'y': return 30; case 'z': return 31; default: throw new <API key>("the character '" + geo + "' is not a valid geohash character"); } } /** * Decodes the given geohash. * * @param geohash Geohash to decocde * @return {@link GeoPoint} at the center of cell, given by the geohash */ public static GeoPoint decode(String geohash) { return decode(geohash, new GeoPoint()); } /** * Decodes the given geohash into a latitude and longitude. * * @param geohash Geohash to decocde * @param ret the ret geo point * @return the given {@link GeoPoint} reseted to the center of * cell, given by the geohash */ public static GeoPoint decode(String geohash, GeoPoint ret) { double[] interval = decodeCell(geohash); return ret.reset((interval[0] + interval[1]) / 2D, (interval[2] + interval[3]) / 2D); } /** * Decodes the given geohash into a geohash cell defined by the points nothWest and southEast. * * @param geohash Geohash to deocde * @param northWest the point north/west of the cell * @param southEast the point south/east of the cell */ public static void decodeCell(String geohash, GeoPoint northWest, GeoPoint southEast) { double[] interval = decodeCell(geohash); northWest.reset(interval[1], interval[2]); southEast.reset(interval[0], interval[3]); } private static double[] decodeCell(String geohash) { double[] interval = {-90.0, 90.0, -180.0, 180.0}; boolean isEven = true; for (int i = 0; i < geohash.length(); i++) { final int cd = decode(geohash.charAt(i)); for (int mask : BITS) { if (isEven) { if ((cd & mask) != 0) { interval[2] = (interval[2] + interval[3]) / 2D; } else { interval[3] = (interval[2] + interval[3]) / 2D; } } else { if ((cd & mask) != 0) { interval[0] = (interval[0] + interval[1]) / 2D; } else { interval[1] = (interval[0] + interval[1]) / 2D; } } isEven = !isEven; } } return interval; } /** * Encodes latitude and longitude information into a single long with variable precision. * Up to 12 levels of precision are supported which should offer sub-metre resolution. * * @param latitude latitude * @param longitude longitude * @param precision The required precision between 1 and 12 * @return A single long where 4 bits are used for holding the precision and the remaining * 60 bits are reserved for 5 bit cell identifiers giving up to 12 layers. */ public static long encodeAsLong(double latitude, double longitude, int precision) { if ((precision > 12) || (precision < 1)) { throw new <API key>("Illegal precision length of " + precision + ". Long-based geohashes only support precisions between 1 and 12"); } double latInterval0 = -90.0; double latInterval1 = 90.0; double lngInterval0 = -180.0; double lngInterval1 = 180.0; long geohash = 0L; boolean isEven = true; int bit = 0; int ch = 0; int geohashLength = 0; while (geohashLength < precision) { double mid; if (isEven) { mid = (lngInterval0 + lngInterval1) / 2D; if (longitude > mid) { ch |= BITS[bit]; lngInterval0 = mid; } else { lngInterval1 = mid; } } else { mid = (latInterval0 + latInterval1) / 2D; if (latitude > mid) { ch |= BITS[bit]; latInterval0 = mid; } else { latInterval1 = mid; } } isEven = !isEven; if (bit < 4) { bit++; } else { geohashLength++; geohash |= ch; if (geohashLength < precision) { geohash <<= 5; } bit = 0; ch = 0; } } geohash <<= 4; geohash |= precision; return geohash; } /** * Formats a geohash held as a long as a more conventional * String-based geohash. * * @param geohashAsLong a geohash encoded as a long * @return A traditional base32-based String representation of a geohash */ public static String toString(long geohashAsLong) { int precision = (int) (geohashAsLong & 15); char[] chars = new char[precision]; long l = geohashAsLong; l >>= 4; for (int i = precision - 1; i >= 0; i chars[i] = BASE_32[(int) (l & 31)]; l >>= 5; } return new String(chars); } public static GeoPoint decode(long geohash) { GeoPoint point = new GeoPoint(); decode(geohash, point); return point; } /** * Decodes the given long-format geohash into a latitude and longitude. * * @param geohash long format Geohash to decode * @param ret The Geopoint into which the latitude and longitude will be stored */ public static void decode(long geohash, GeoPoint ret) { double[] interval = decodeCell(geohash); ret.reset((interval[0] + interval[1]) / 2D, (interval[2] + interval[3]) / 2D); } private static double[] decodeCell(long geohash) { double[] interval = {-90.0, 90.0, -180.0, 180.0}; boolean isEven = true; int precision = (int) (geohash & 15); long l = geohash; l >>= 4; int[] cds = new int[precision]; for (int i = precision - 1; i >= 0; i cds[i] = (int) (l & 31); l >>= 5; } for (final int cd : cds) { for (int mask : BITS) { if (isEven) { if ((cd & mask) != 0) { interval[2] = (interval[2] + interval[3]) / 2D; } else { interval[3] = (interval[2] + interval[3]) / 2D; } } else { if ((cd & mask) != 0) { interval[0] = (interval[0] + interval[1]) / 2D; } else { interval[1] = (interval[0] + interval[1]) / 2D; } } isEven = !isEven; } } return interval; } }
from flyingpigeon.nc_utils import get_values, get_coordinates, get_index_lat, get_variable from os.path import basename, join from datetime import datetime as dt from shutil import copyfile from netCDF4 import Dataset import numpy as np import logging LOGGER = logging.getLogger("PYWPS") def fieldmean(resource): """ calculating of a weighted field mean :param resource: str or list of str containing the netCDF files paths :return list: timeseries of the averaged values per timestep """ from numpy import radians, average, cos, sqrt, array data = get_values(resource) # np.squeeze(ds.variables[variable][:]) # dim = data.shape LOGGER.debug(data.shape) if len(data.shape) == 3: # TODO if data.shape == 2 , 4 ... lats, lons = get_coordinates(resource, unrotate=False) lats = array(lats) if len(lats.shape) == 2: lats = lats[:, 0] else: LOGGER.debug('Latitudes not reduced to 1D') # TODO: calculat weighed average with 2D lats (rotated pole coordinates) # lats, lons = get_coordinates(resource, unrotate=False) # if len(lats.shape) == 2: # lats, lons = get_coordinates(resource) lat_index = get_index_lat(resource) LOGGER.debug('lats dimension %s ' % len(lats.shape)) LOGGER.debug('lats index %s' % lat_index) lat_w = sqrt(cos(lats * radians(1))) meanLon = average(data, axis=lat_index, weights=lat_w) meanTimeserie = average(meanLon, axis=1) LOGGER.debug('fieldmean calculated') else: LOGGER.error('not 3D shaped data. Average can not be calculated') return meanTimeserie def <API key>(variable_mean, standard_deviation=None, variable=None, dir_output=None): """ Claculating the Climate Change signal based on the output of robustness_stats. :param variable_mean: list of two 2D spatial netCDF files in the order of [refenence, projection] :param standard_deviation: according to variable_mean files 2D netCDF files of the standard deviation :return netCDF files: cc_signal.nc, mean_std.nc """ from os.path import join basename_ref = basename(variable_mean[0]).split('_') basename_proj = basename(variable_mean[1]).split('_') # <API key>.nc' if variable is None: variable = get_variable(variable_mean[0]) ds = Dataset(variable_mean[0]) vals_ref = np.squeeze(ds[variable][:]) ds.close() ds = Dataset(variable_mean[1]) vals_proj = np.squeeze(ds[variable][:]) ds.close() if standard_deviation is not None: ds = Dataset(standard_deviation[0]) std_ref = np.squeeze(ds[variable][:]) ds.close() ds = Dataset(standard_deviation[1]) std_proj = np.squeeze(ds[variable][:]) ds.close() bn_mean_std = 'mean-std_{}_{}_{}'.format(basename_ref[1], basename_ref[-2], basename_proj[-1]) out_mean_std = copyfile(standard_deviation[0], join(dir_output, bn_mean_std)) ds_median_std = Dataset(out_mean_std, mode='a') ds_median_std[variable][:] = (std_ref + std_proj) / 2 ds_median_std.close() else: out_mean_std = None bn_cc_signal = 'cc-signal_{}_{}_{}'.format(basename_ref[1], basename_ref[-2], basename_proj[-1]) out_cc_signal = copyfile(variable_mean[0], join(dir_output, bn_cc_signal)) ds_cc = Dataset(out_cc_signal, mode='a') ds_cc[variable][:] = np.squeeze(vals_proj - vals_ref) ds_cc.close() return out_cc_signal, out_mean_std def robustness_stats(resources, time_range=[None, None], dir_output=None, variable=None): """ calculating the spatial mean and corresponding standard deviation for an ensemble of consistent datasets containing one variableself. If a time range is given the statistical values are calculated only in the disired timeperiod. :param resources: str or list of str containing the netCDF files paths :param time_range: sequence of two datetime.datetime objects to mark start and end point :param dir_output: path to folder to store ouput files (default= curdir) :param variable: variable name containing in netCDF file. If not set, variable name gets detected :return netCDF files: out_ensmean.nc, out_ensstd.nc """ from ocgis import OcgOperations, RequestDataset, env env.OVERWRITE = True if variable is None: variable = get_variable(resources[0]) out_means = [] for resource in resources: rd = RequestDataset(resource, variable) prefix = basename(resource).replace('.nc', '') LOGGER.debug('processing mean of {}'.format(prefix)) calc = [{'func': 'median', 'name': variable}] # {'func': 'median', 'name': 'monthly_median'} ops = OcgOperations(dataset=rd, calc=calc, calc_grouping=['all'], output_format='nc', prefix='median_'+prefix, time_range=time_range, dir_output=dir_output) out_means.append(ops.execute()) # nc_out = call(resource=resources, calc=[{'func': 'mean', 'name': 'ens_mean'}], # calc_grouping='all', # time_region=time_region, # dir_output=dir_output, output_format='nc') # read in numpy array for i, out_mean in enumerate(out_means): if i == 0: ds = Dataset(out_mean) var = ds[variable][:] dims = [len(out_means), var[:].shape[-2], var[:].shape[-1]] vals = np.empty(dims) vals[i, :, :] = np.squeeze(var[:]) ds.close() else: ds = Dataset(out_mean) vals[i, :, :] = np.squeeze(ds[variable][:]) ds.close() # calc median, std val_median = np.nanmedian(vals, axis=0) val_std = np.nanstd(vals, axis=0) # prepare files by copying ... ensmean_file = 'ensmean_{}_{}_{}.nc'.format(variable, dt.strftime(time_range[0], '%Y-%m-%d'), dt.strftime(time_range[1], '%Y-%m-%d')) out_ensmean = copyfile(out_means[0], join(dir_output, ensmean_file)) ensstd_file = 'ensstd_{}_{}_{}.nc'.format(variable, dt.strftime(time_range[0], '%Y-%m-%d'), dt.strftime(time_range[1], '%Y-%m-%d')) out_ensstd = copyfile(out_means[0], join(dir_output, ensstd_file)) # write values to files ds_median = Dataset(out_ensmean, mode='a') ds_median[variable][:] = val_median ds_median.close() ds_std = Dataset(out_ensstd, mode='a') ds_std[variable][:] = val_std ds_std.close() LOGGER.info('processing the overall ensemble statistical mean ') # prefix = 'ensmean_tg-mean_{}-{}'.format(dt.strftime(time_range[0], '%Y-%m-%d'), # dt.strftime(time_range[1], '%Y-%m-%d')) # rd = RequestDataset(out_means, var) # calc = [{'func': 'mean', 'name': 'mean'}] # {'func': 'median', 'name': 'monthly_median'} # ops = OcgOperations(dataset=rd, calc=calc, calc_grouping=['all'], # output_format=output_format, prefix='mean_'+prefix, time_range=time_range) # ensmean = ops.execute() return out_ensmean, out_ensstd # call(resource=[], variable=None, dimension_map=None, agg_selection=True, # calc=None, calc_grouping=None, conform_units_to=None, crs=None, # memory_limit=None, prefix=None, # regrid_destination=None, regrid_options='bil', level_range=None, # cdover='python', # geom=None, <API key>=None, search_radius_mult=2., # select_nearest=False, select_ugid=None, spatial_wrapping=None, # t_calendar=None, time_region=None, # time_range=None, dir_output=None, output_format='nc'): # CDO is disabled ... # def remove_mean_trend(fana, varname): # """ # Removing the smooth trend from 3D netcdf file # """ # from cdo import Cdo # from netCDF4 import Dataset # import uuid # from scipy.interpolate import UnivariateSpline # from os import system # if type(fana) == list: # fana = fana[0] # backup_ana = 'orig_mod_' + path.basename(fana) # cdo = Cdo() # # create backup of input file # # Again, an issue with cdo versioning. # # TODO: Fix CDO versioning workaround... # try: # cdo_cp = getattr(cdo, 'copy') # cdo_cp(input=fana, output=backup_ana) # except Exception: # if(path.isfile(backup_ana) is False): # com = 'copy' # comcdo = 'cdo -O %s %s %s' % (com, fana, backup_ana) # system(comcdo) # else: # backup_ana = 'None' # # create fmana - mean field # fmana = '%s.nc' % uuid.uuid1() # cdo_op = getattr(cdo, 'fldmean') # cdo_op(input=fana, output=fmana) # mean_arc_dataset = Dataset(fmana) # mean_arcvar = mean_arc_dataset.variables[varname][:] # data = mean_arcvar[:, 0, 0] # mean_arc_dataset.close() # x = np.linspace(0, len(data) - 1, len(data)) # y = data # # Very slow method. # # TODO: sub by fast one # # (there is one in R, but doesn't want to add R to analogs...) # spl = UnivariateSpline(x, y) # smf = (len(y)) * np.var(y) # spl.<API key>(smf) # trend = np.zeros(len(y), dtype=np.float) # trend[:] = spl(x) # # orig_arc_dataset = Dataset(fana,'r+') # orig_arc_dataset = Dataset(fana, 'a') # orig_arcvar = orig_arc_dataset.variables.pop(varname) # orig_data = orig_arcvar[:] # det = np.zeros(np.shape(orig_data), dtype=np.float) # det = (orig_data.T - trend).T # orig_arcvar[:] = det # # at = {k: orig_arcvar.getncattr(k) for k in orig_arcvar.ncattrs()} # maxat = np.max(det) # minat = np.min(det) # act = np.zeros((2), dtype=np.float32) # valid = np.zeros((2), dtype=np.float32) # act[0] = minat # act[1] = maxat # valid[0] = minat - abs(0.2 * minat) # valid[1] = maxat + abs(0.2 * maxat) # act_attr = {} # val_attr = {} # act_attr['actual_range'] = act # val_attr['valid_range'] = valid # orig_arcvar.setncatts(act_attr) # orig_arcvar.setncatts(val_attr) # orig_arc_dataset.close() # return backup_ana
from __future__ import unicode_literals import uuid from random import randint, random from moto.core import BaseBackend from moto.ec2 import ec2_backends from copy import copy class BaseObject(object): def camelCase(self, key): words = [] for i, word in enumerate(key.split('_')): if i > 0: words.append(word.title()) else: words.append(word) return ''.join(words) def gen_response_object(self): response_object = copy(self.__dict__) for key, value in response_object.items(): if '_' in key: response_object[self.camelCase(key)] = value del response_object[key] return response_object @property def response_object(self): return self.gen_response_object() class Cluster(BaseObject): def __init__(self, cluster_name): self.<API key> = 0 self.arn = 'arn:aws:ecs:us-east-1:012345678910:cluster/{0}'.format(cluster_name) self.name = cluster_name self.pending_tasks_count = 0 self.<API key> = 0 self.running_tasks_count = 0 self.status = 'ACTIVE' @property def <API key>(self): return self.name @property def response_object(self): response_object = self.gen_response_object() response_object['clusterArn'] = self.arn response_object['clusterName'] = self.name del response_object['arn'], response_object['name'] return response_object @classmethod def <API key>(cls, resource_name, cloudformation_json, region_name): properties = cloudformation_json['Properties'] ecs_backend = ecs_backends[region_name] return ecs_backend.create_cluster( # ClusterName is optional in CloudFormation, thus create a random name if necessary cluster_name=properties.get('ClusterName', 'ecscluster{0}'.format(int(random() * 10 ** 6))), ) @classmethod def <API key>(cls, original_resource, new_resource_name, cloudformation_json, region_name): properties = cloudformation_json['Properties'] if original_resource.name != properties['ClusterName']: ecs_backend = ecs_backends[region_name] ecs_backend.delete_cluster(original_resource.arn) return ecs_backend.create_cluster( # ClusterName is optional in CloudFormation, thus create a random name if necessary cluster_name=properties.get('ClusterName', 'ecscluster{0}'.format(int(random() * 10 ** 6))), ) else: # no-op when nothing changed between old and new resources return original_resource class TaskDefinition(BaseObject): def __init__(self, family, revision, <API key>, volumes=None): self.family = family self.arn = 'arn:aws:ecs:us-east-1:012345678910:task-definition/{0}:{1}'.format(family, revision) self.<API key> = <API key> if volumes is None: self.volumes = [] else: self.volumes = volumes @property def response_object(self): response_object = self.gen_response_object() response_object['taskDefinitionArn'] = response_object['arn'] del response_object['arn'] return response_object @classmethod def <API key>(cls, resource_name, cloudformation_json, region_name): properties = cloudformation_json['Properties'] family = properties.get('Family', 'task-definition-{0}'.format(int(random() * 10 ** 6))) <API key> = properties['<API key>'] volumes = properties['Volumes'] ecs_backend = ecs_backends[region_name] return ecs_backend.<API key>( family=family, <API key>=<API key>, volumes=volumes) @classmethod def <API key>(cls, original_resource, new_resource_name, cloudformation_json, region_name): properties = cloudformation_json['Properties'] family = properties.get('Family', 'task-definition-{0}'.format(int(random() * 10 ** 6))) <API key> = properties['<API key>'] volumes = properties['Volumes'] if (original_resource.family != family or original_resource.<API key> != <API key> or original_resource.volumes != volumes # currently TaskRoleArn isn't stored at TaskDefinition instances ): ecs_backend = ecs_backends[region_name] ecs_backend.<API key>(original_resource.arn) return ecs_backend.<API key>( family=family, <API key>=<API key>, volumes=volumes) else: # no-op when nothing changed between old and new resources return original_resource class Task(BaseObject): def __init__(self, cluster, task_definition, <API key>, overrides={}, started_by=''): self.cluster_arn = cluster.arn self.task_arn = 'arn:aws:ecs:us-east-1:012345678910:task/{0}'.format(str(uuid.uuid1())) self.<API key> = <API key> self.last_status = 'RUNNING' self.desired_status = 'RUNNING' self.task_definition_arn = task_definition.arn self.overrides = overrides self.containers = [] self.started_by = started_by self.stopped_reason = '' @property def response_object(self): response_object = self.gen_response_object() return response_object class Service(BaseObject): def __init__(self, cluster, service_name, task_definition, desired_count): self.cluster_arn = cluster.arn self.arn = 'arn:aws:ecs:us-east-1:012345678910:service/{0}'.format(service_name) self.name = service_name self.status = 'ACTIVE' self.running_count = 0 self.task_definition = task_definition.arn self.desired_count = desired_count self.events = [] self.load_balancers = [] self.pending_count = 0 @property def <API key>(self): return self.arn @property def response_object(self): response_object = self.gen_response_object() del response_object['name'], response_object['arn'] response_object['serviceName'] = self.name response_object['serviceArn'] = self.arn return response_object @classmethod def <API key>(cls, resource_name, cloudformation_json, region_name): properties = cloudformation_json['Properties'] if isinstance(properties['Cluster'], Cluster): cluster = properties['Cluster'].name else: cluster = properties['Cluster'] if isinstance(properties['TaskDefinition'], TaskDefinition): task_definition = properties['TaskDefinition'].family else: task_definition = properties['TaskDefinition'] service_name = '{0}Service{1}'.format(cluster, int(random() * 10 ** 6)) desired_count = properties['DesiredCount'] # TODO: LoadBalancers # TODO: Role ecs_backend = ecs_backends[region_name] return ecs_backend.create_service( cluster, service_name, task_definition, desired_count) @classmethod def <API key>(cls, original_resource, new_resource_name, cloudformation_json, region_name): properties = cloudformation_json['Properties'] if isinstance(properties['Cluster'], Cluster): cluster_name = properties['Cluster'].name else: cluster_name = properties['Cluster'] if isinstance(properties['TaskDefinition'], TaskDefinition): task_definition = properties['TaskDefinition'].family else: task_definition = properties['TaskDefinition'] desired_count = properties['DesiredCount'] ecs_backend = ecs_backends[region_name] service_name = original_resource.name if original_resource.cluster_arn != Cluster(cluster_name).arn: # TODO: LoadBalancers # TODO: Role ecs_backend.delete_service(cluster_name, service_name) new_service_name = '{0}Service{1}'.format(cluster_name, int(random() * 10 ** 6)) return ecs_backend.create_service( cluster_name, new_service_name, task_definition, desired_count) else: return ecs_backend.update_service(cluster_name, service_name, task_definition, desired_count) class ContainerInstance(BaseObject): def __init__(self, ec2_instance_id): self.ec2_instance_id = ec2_instance_id self.status = 'ACTIVE' self.registeredResources = [] self.agentConnected = True self.<API key> = "arn:aws:ecs:us-east-1:012345678910:container-instance/{0}".format(str(uuid.uuid1())) self.pendingTaskCount = 0 self.remainingResources = [] self.runningTaskCount = 0 self.versionInfo = { 'agentVersion': "1.0.0", 'agentHash': '4023248', 'dockerVersion': 'DockerVersion: 1.5.0' } @property def response_object(self): response_object = self.gen_response_object() del response_object['name'], response_object['arn'] return response_object class <API key>(BaseObject): def __init__(self, reason, <API key>): self.reason = reason self.arn = "arn:aws:ecs:us-east-1:012345678910:container-instance/{0}".format(<API key>) @property def response_object(self): response_object = self.gen_response_object() response_object['reason'] = self.reason response_object['arn'] = self.arn return response_object class <API key>(BaseBackend): def __init__(self): self.clusters = {} self.task_definitions = {} self.tasks = {} self.services = {} self.container_instances = {} def <API key>(self, task_definition_str): <API key> = task_definition_str.split(':') if len(<API key>) == 2: family, revision = <API key> revision = int(revision) else: family = <API key>[0] revision = -1 if family in self.task_definitions and 0 < revision <= len(self.task_definitions[family]): return self.task_definitions[family][revision - 1] elif family in self.task_definitions and revision == -1: return self.task_definitions[family][revision] else: raise Exception("{0} is not a task_definition".format(task_definition_str)) def create_cluster(self, cluster_name): cluster = Cluster(cluster_name) self.clusters[cluster_name] = cluster return cluster def list_clusters(self): """ maxSize and pagination not implemented """ return [cluster.arn for cluster in self.clusters.values()] def describe_clusters(self, list_clusters_name=None): list_clusters = [] if list_clusters_name is None: if 'default' in self.clusters: list_clusters.append(self.clusters['default'].response_object) else: for cluster in list_clusters_name: cluster_name = cluster.split('/')[-1] if cluster_name in self.clusters: list_clusters.append(self.clusters[cluster_name].response_object) else: raise Exception("{0} is not a cluster".format(cluster_name)) return list_clusters def delete_cluster(self, cluster_str): cluster_name = cluster_str.split('/')[-1] if cluster_name in self.clusters: return self.clusters.pop(cluster_name) else: raise Exception("{0} is not a cluster".format(cluster_name)) def <API key>(self, family, <API key>, volumes): if family in self.task_definitions: revision = len(self.task_definitions[family]) + 1 else: self.task_definitions[family] = [] revision = 1 task_definition = TaskDefinition(family, revision, <API key>, volumes) self.task_definitions[family].append(task_definition) return task_definition def <API key>(self): """ Filtering not implemented """ task_arns = [] for <API key> in self.task_definitions.values(): task_arns.extend([task_definition.arn for task_definition in <API key>]) return task_arns def <API key>(self, task_definition_str): <API key> = task_definition_str.split('/')[-1] if ':' in <API key>: family, revision = <API key>.split(':') revision = int(revision) else: family = <API key> revision = len(self.task_definitions.get(family, [])) if family in self.task_definitions and 0 < revision <= len(self.task_definitions[family]): return self.task_definitions[family][revision-1] else: raise Exception("{0} is not a task_definition".format(<API key>)) def <API key>(self, task_definition_str): <API key> = task_definition_str.split('/')[-1] family, revision = <API key>.split(':') revision = int(revision) if family in self.task_definitions and 0 < revision <= len(self.task_definitions[family]): return self.task_definitions[family].pop(revision - 1) else: raise Exception("{0} is not a task_definition".format(<API key>)) def run_task(self, cluster_str, task_definition_str, count, overrides, started_by): cluster_name = cluster_str.split('/')[-1] if cluster_name in self.clusters: cluster = self.clusters[cluster_name] else: raise Exception("{0} is not a cluster".format(cluster_name)) task_definition = self.<API key>(task_definition_str) if cluster_name not in self.tasks: self.tasks[cluster_name] = {} tasks = [] container_instances = list(self.container_instances.get(cluster_name, {}).keys()) if not container_instances: raise Exception("No instances found in cluster {}".format(cluster_name)) for _ in range(count or 1): <API key> = self.container_instances[cluster_name][ container_instances[randint(0, len(container_instances) - 1)] ].<API key> task = Task(cluster, task_definition, <API key>, overrides or {}, started_by or '') tasks.append(task) self.tasks[cluster_name][task.task_arn] = task return tasks def start_task(self, cluster_str, task_definition_str, container_instances, overrides, started_by): cluster_name = cluster_str.split('/')[-1] if cluster_name in self.clusters: cluster = self.clusters[cluster_name] else: raise Exception("{0} is not a cluster".format(cluster_name)) task_definition = self.<API key>(task_definition_str) if cluster_name not in self.tasks: self.tasks[cluster_name] = {} tasks = [] if not container_instances: raise Exception("No container instance list provided") <API key> = [x.split('/')[-1] for x in container_instances] for <API key> in <API key>: <API key> = self.container_instances[cluster_name][ <API key> ].<API key> task = Task(cluster, task_definition, <API key>, overrides or {}, started_by or '') tasks.append(task) self.tasks[cluster_name][task.task_arn] = task return tasks def describe_tasks(self, cluster_str, tasks): cluster_name = cluster_str.split('/')[-1] if cluster_name in self.clusters: cluster = self.clusters[cluster_name] else: raise Exception("{0} is not a cluster".format(cluster_name)) if not tasks: raise Exception("tasks cannot be empty") response = [] for cluster, cluster_tasks in self.tasks.items(): for task_id, task in cluster_tasks.items(): if task_id in tasks or task.task_arn in tasks: response.append(task) return response def list_tasks(self, cluster_str, container_instance, family, started_by, service_name, desiredStatus): filtered_tasks = [] for cluster, tasks in self.tasks.items(): for arn, task in tasks.items(): filtered_tasks.append(task) if cluster_str: cluster_name = cluster_str.split('/')[-1] if cluster_name in self.clusters: cluster = self.clusters[cluster_name] else: raise Exception("{0} is not a cluster".format(cluster_name)) filtered_tasks = list(filter(lambda t: cluster_name in t.cluster_arn, filtered_tasks)) if container_instance: filtered_tasks = list(filter(lambda t: container_instance in t.<API key>, filtered_tasks)) if started_by: filtered_tasks = list(filter(lambda t: started_by == t.started_by, filtered_tasks)) return [t.task_arn for t in filtered_tasks] def stop_task(self, cluster_str, task_str, reason): cluster_name = cluster_str.split('/')[-1] if cluster_name not in self.clusters: raise Exception("{0} is not a cluster".format(cluster_name)) if not task_str: raise Exception("A task ID or ARN is required") task_id = task_str.split('/')[-1] tasks = self.tasks.get(cluster_name, None) if not tasks: raise Exception("Cluster {} has no registered tasks".format(cluster_name)) for task in tasks.keys(): if task.endswith(task_id): tasks[task].last_status = 'STOPPED' tasks[task].desired_status = 'STOPPED' tasks[task].stopped_reason = reason return tasks[task] raise Exception("Could not find task {} on cluster {}".format(task_str, cluster_name)) def create_service(self, cluster_str, service_name, task_definition_str, desired_count): cluster_name = cluster_str.split('/')[-1] if cluster_name in self.clusters: cluster = self.clusters[cluster_name] else: raise Exception("{0} is not a cluster".format(cluster_name)) task_definition = self.<API key>(task_definition_str) desired_count = desired_count if desired_count is not None else 0 service = Service(cluster, service_name, task_definition, desired_count) <API key> = '{0}:{1}'.format(cluster_name, service_name) self.services[<API key>] = service return service def list_services(self, cluster_str): cluster_name = cluster_str.split('/')[-1] service_arns = [] for key, value in self.services.items(): if cluster_name + ':' in key: service_arns.append(self.services[key].arn) return sorted(service_arns) def describe_services(self, cluster_str, <API key>): cluster_name = cluster_str.split('/')[-1] result = [] for <API key>, <API key> in sorted(self.services.items()): for <API key> in <API key>: <API key> = '{0}:{1}'.format(cluster_name, <API key>) if <API key> == <API key> or <API key>.arn == <API key>: result.append(<API key>) return result def update_service(self, cluster_str, service_name, task_definition_str, desired_count): cluster_name = cluster_str.split('/')[-1] <API key> = '{0}:{1}'.format(cluster_name, service_name) if <API key> in self.services: if task_definition_str is not None: task_definition = self.<API key>(task_definition_str) self.services[<API key>].task_definition = task_definition_str if desired_count is not None: self.services[<API key>].desired_count = desired_count return self.services[<API key>] else: raise Exception("cluster {0} or service {1} does not exist".format(cluster_name, service_name)) def delete_service(self, cluster_name, service_name): <API key> = '{0}:{1}'.format(cluster_name, service_name) if <API key> in self.services: service = self.services[<API key>] if service.desired_count > 0: raise Exception("Service must have desiredCount=0") else: return self.services.pop(<API key>) else: raise Exception("cluster {0} or service {1} does not exist".format(cluster_name, service_name)) def <API key>(self, cluster_str, ec2_instance_id): cluster_name = cluster_str.split('/')[-1] if cluster_name not in self.clusters: raise Exception("{0} is not a cluster".format(cluster_name)) container_instance = ContainerInstance(ec2_instance_id) if not self.container_instances.get(cluster_name): self.container_instances[cluster_name] = {} <API key> = container_instance.<API key>.split('/')[-1] self.container_instances[cluster_name][<API key>] = container_instance return container_instance def <API key>(self, cluster_str): cluster_name = cluster_str.split('/')[-1] <API key> = self.container_instances.get(cluster_name, {}).values() container_instances = [ci.<API key> for ci in <API key>] return sorted(container_instances) def <API key>(self, cluster_str, <API key>): cluster_name = cluster_str.split('/')[-1] if cluster_name not in self.clusters: raise Exception("{0} is not a cluster".format(cluster_name)) failures = [] <API key> = [] for <API key> in <API key>: container_instance = self.container_instances[cluster_name].get(<API key>, None) if container_instance is not None: <API key>.append(container_instance) else: failures.append(<API key>('MISSING', <API key>)) return <API key>, failures def <API key>(self, cluster_str, <API key>): pass ecs_backends = {} for region, ec2_backend in ec2_backends.items(): ecs_backends[region] = <API key>()
package org.springside.examples.showcase.demos.web; import static org.junit.Assert.*; import java.io.IOException; import javax.servlet.ServletException; import org.junit.Test; import org.springframework.mock.web.MockFilterChain; import org.springframework.mock.web.MockFilterConfig; import org.springframework.mock.web.<API key>; import org.springframework.mock.web.<API key>; import org.springside.examples.showcase.demos.web.<API key>; public class <API key> { @Test public void test() throws IOException, ServletException { MockFilterConfig config = new MockFilterConfig(); MockFilterChain chain = new MockFilterChain(); <API key> request = new <API key>(); <API key> response = new <API key>(); config.addInitParameter("expiresSeconds", "123"); <API key> filter = new <API key>(); filter.init(config); filter.doFilter(request, response, chain); assertEquals("private, max-age=123", response.getHeader("Cache-Control")); } }
# -*- coding: utf-8 -*- def command(): return "stop-all-instance" def init_argument(parser): parser.add_argument("--farm-no", required=True) def execute(requester, args): farm_no = args.farm_no parameters = {} parameters["FarmNo"] = farm_no return requester.execute("/StopAllInstance", parameters)
package co.juliansuarez.joggingtracker; import android.app.Application; import android.content.Context; import android.content.SharedPreferences; import com.parse.Parse; public class JoggingTrackerApp extends Application { public static JoggingTrackerApp APP; @Override public void onCreate() { super.onCreate(); APP = this; Parse.initialize(this, "<API key>", "<API key>"); } private SharedPreferences <API key>() { SharedPreferences prefs = <API key>(JoggingTrackerApp.class.getName(), Context.MODE_PRIVATE); return prefs; } public void saveString(String key, String value) { SharedPreferences prefs = <API key>(); final SharedPreferences.Editor edit = prefs.edit(); edit.putString(key, value); edit.commit(); } public String getString(String key, String defValue) { SharedPreferences prefs = <API key>(); return prefs.getString(key, defValue); } }
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> body {font-family:'',dotum,Helvetica,sans-serif;text-align:center;} .category {margin:25px 0 25px 0;} .category span {margin:0 16px 0 16px;} .content {clear:both;margin:0 auto;width:1002px;} .product {margin:0 15px 50px 15px;float:left;width:300px;} .product_title {float:left;margin:0 0 10px 0;font-weight: bolder;font-size: large;} .product_desc {clear:both;text-align:left;margin:0 0 10px 0;} .product_option {clear:both;text-align:left;margin:0 0 5px 0;} .category_paging {clear:both;padding:30px 0 30px 0;} .title {text-align:left;height:130px;margin: 20px 0 0 0;} .star-rating { width:250px; } .star-rating,.star-rating span { display:inline-block; overflow:hidden; height:10px; background:url(/roothaus/resource/image/common/grade.png)no-repeat; } .star-rating span{ background-position:left bottom; line-height:0; vertical-align:top;float:left; } </style> </head> <body> <div class="top"> <img alt="" src="/roothaus/resource/image/common/top_01.jpg" /> </div> <div style="margin-top: 30px;"> <img alt="" src="/roothaus/resource/image/common/line_001.gif" /> </div> <div class="category"> <div> <span></span> | <span></span> | <span></span> | <span></span> | <span></span> | <span></span> | <span></span> | <span></span> | <span></span> | <span></span> | <span></span> </div> <img alt="" src="/roothaus/resource/image/common/line_002.gif" /> <div> <span></span> | <span></span> | <span></span> | <span></span> | <span></span> | <span></span> | <span></span> | <span></span> | <span></span> | <span></span> | <span></span> </div> <img alt="" src="/roothaus/resource/image/common/line_003.gif" /> </div> <div> <img alt="" src="/roothaus/resource/image/common/line_002.gif" /> </div> <div class="content"> <div class="title"> <span style="margin: 30px 0 0 20px;"> (8)</span> <img style="float:left;" alt="" src="/roothaus/resource/image/common/bar_002.gif" /> <img style="float: right;" alt="" src="/roothaus/resource/image/common/line_100.gif" /> </div> <div class="product_list"> <div class="product"> <hr style="border: 3px solid;"> <img alt="" src="http: <hr> <div class="product_title"></div> <div class="product_desc"></div> <div class="product_option"> <span class="star-rating"> <span style="width:50%;"></span> </span> </div> <div class="product_option"> <span class="star-rating"> <span style="width:80%;"></span> </span> </div> </div> <div class="product"> <hr style="border: 3px solid;"> <img alt="" src="http: <hr> <div class="product_title"></div> <div class="product_desc"></div> <div class="product_option"> <span class="star-rating"> <span style="width:50%;"></span> </span> </div> <div class="product_option"> <span class="star-rating"> <span style="width:80%;"></span> </span> </div> </div> <div class="product"> <hr style="border: 3px solid;"> <img alt="" src="http: <hr> <div class="product_title"></div> <div class="product_desc"></div> <div class="product_option"> <span class="star-rating"> <span style="width:50%;"></span> </span> </div> <div class="product_option"> <span class="star-rating"> <span style="width:80%;"></span> </span> </div> </div> <div class="product"> <hr style="border: 3px solid;"> <img alt="" src="http: <hr> <div class="product_title"></div> <div class="product_desc"></div> <div class="product_option"> <span class="star-rating"> <span style="width:50%;"></span> </span> </div> <div class="product_option"> <span class="star-rating"> <span style="width:80%;"></span> </span> </div> </div> <div class="product"> <hr style="border: 3px solid;"> <img alt="" src="http: <hr> <div class="product_title"></div> <div class="product_desc"></div> <div class="product_option"> <span class="star-rating"> <span style="width:50%;"></span> </span> </div> <div class="product_option"> <span class="star-rating"> <span style="width:80%;"></span> </span> </div> </div> <div class="product"> <hr style="border: 3px solid;"> <img alt="" src="http: <hr> <div class="product_title"></div> <div class="product_desc"></div> <div class="product_option"> <span class="star-rating"> <span style="width:50%;"></span> </span> </div> <div class="product_option"> <span class="star-rating"> <span style="width:80%;"></span> </span> </div> </div> </div> </div> <div class="category_paging"> <img alt="" src="/roothaus/resource/image/common/prev.jpg" /> <img alt="" src="/roothaus/resource/image/common/bar_001.gif" /> <img alt="" src="/roothaus/resource/image/common/next.jpg" /> </div> <div class="bottom"> <img alt="" src="/roothaus/resource/image/common/bot_01.jpg" /> </div> </body> </html>
package njuse.ec.dao.impl; import java.util.ArrayList; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import njuse.ec.dao.UserDao; import njuse.ec.model.User; /** * userDao. * @author * */ @Repository public class UserDaoImpl implements UserDao { /** * database session factory. */ @Autowired private SessionFactory sessionFactory; @Override public final User find(final int userId) { try { Session session = sessionFactory.getCurrentSession(); return (User) session.get(User.class, userId); } catch (Exception e) { e.printStackTrace(); return null; } } @Override public final User find(final String account) { Session session = sessionFactory.getCurrentSession(); Transaction tx = session.beginTransaction(); try { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("FROM "); stringBuilder.append(User.class.getName()); stringBuilder.append(" AS u WHERE u."); stringBuilder.append("account"); stringBuilder.append(" = ?"); String hql = stringBuilder.toString(); Query query = session.createQuery(hql); query.setString(0, account); List<User> user = new ArrayList<User>(); for (Object o : query.list()) { user.add((User) o); } tx.commit(); if ((user.size()) == 0) { return null; } else { return user.get(0); } } catch (Exception e) { e.printStackTrace(); tx.rollback(); return null; } finally { session.close(); } } }
Grafana JSON dashboard will be stored in this directory to implement dashboards-as code. **NOTE**: With the current version of Grafana (4.6.3), you cannot use unmodified JSON from the export feature of Grafana, as this JSON is intented to be consumed directly by the import feature. You have three options: * Download the JSON using the export feature, and then manually change all instances of `${DS_PROMETHEUS}` to `Prometheus`. * View the JSON in the Grafana interface, then cut-and-paste it into a file. * Use some 3rd party Grafana API client (e.g. grafcli) to download the JSON.
var Constants = require("../../apps/constants"), Helpers; Helpers = module.exports = function (environment) { var self = this, isPrivatePortal = environment.getIsPrivatePortal(); self.isPrivate = function (req, res, next) { if (isPrivatePortal) { if (req.session[Constants.<API key>]) { return next(); } return res.redirect("/login"); } else { return next(); } }; self.isLoggedIn = function (req, res, next) { if (req.session[Constants.<API key>]) { return next(); } // if they aren't redirect them to the home page // really should issue an error message if (isPrivatePortal) { return res.redirect("/login"); } return res.redirect("/"); }; self.isAdmin = function (req, res, next) { var theUser = req.session[Constants.THE_USER]; console.log("ADMINUSER "+theUser); if (theUser) { //roles are an array var roles = theUser.uRole; console.log("ATMINTEST "+roles.length); var where = roles.indexOf(Constants.ADMIN_CREDENTIALS); console.log("ADMINROLES "+roles+" "+where); if (where > -1) { return next(); } else { return res.redirect("/"); } } else { return res.redirect("/"); } }; self.getUser = function (req) { var result = req.session[Constants.THE_USER]; if (!result) { result = {}; result.id = Constants.GUEST_USER; } return result; }; self.getUserId = function(req) { var u = self.getUser(req); if (u) { return u.uId; } return null; }; self.checkTranscludes = function(req, data) { var transclusion = req.session.transclude, evidence = req.session.tevidence; if (transclusion !== null && transclusion !== "") { data.transcludelocator = transclusion; } else if (evidence !== null && evidence !== "") { data.<API key> = evidence; } }; /** * Populate <code>data</code> with context found in <code>req</code> * @param req * @param data */ self.checkContext = function(req, data) { var contextLocator = req.query.contextLocator, q = req.params.id; data.locator = q; if (contextLocator && contextLocator !== "") { data.context = contextLocator; } else { data.context = q; // we are talking about responding to this blog } }; /** * validates numbers for paging */ self.validateNumber = function(number) { if (!number || number === "Nan") { return 0; // default } return number; }; // TODO validateCount limits the number of hits to MAX_HIT_COUNT // which will be problematic until pagination is wired self.validateCount = function(number) { if (!number || number === "Nan") { return Constants.MAX_HIT_COUNT; // default } return number; }; };
package com.goldendance.client.bean; import java.io.Serializable; public class StoreBean implements Serializable { String storeid; String nickname; boolean isSelected; public boolean isSelected() { return isSelected; } public void setSelected(boolean selected) { isSelected = selected; } public String getStoreid() { return storeid; } public void setStoreid(String storeid) { this.storeid = storeid; } public String getNickname() { return nickname; } public void setNickname(String nickname) { this.nickname = nickname; } }
package urm.Controllers; public interface <API key> { void setView(Controller view); void <API key>(); //tab bae //code editor //buttons bar void <API key>(); void playButtonPressed(); void stepButtonPressed(); void stopButtonPressed(); void resetButtonPressed(); //registers void registersDidScroll(); }
package com.ibm.crshnburn.zosconnect.interceptor; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; public class Activator implements BundleActivator { /* * (non-Javadoc) * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) */ public void start(BundleContext context) throws Exception { System.out.println("BundleActivator start"); } /* * (non-Javadoc) * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { System.out.println("BundleActivator stop"); } }
.heading-small{ font-weight:600; } .<API key>{ margin: 30px 0; } .input-find-services{ width: 30%; margin-bottom:20px; } .<API key>:not(:last-child) { border-bottom: 1px solid #dbdbdb; } .button-get-started { background-image: url(icon-button-next.svg); background-position: 95% 60%; }
package DataBase; public class Task_Item { private int id; private String name; private String responser; private String time; private String project; private int state; public Task_Item() { } public Task_Item(int id, String name, String responser, String time, String project, int state) { this.id = id; this.name = name; this.responser = responser; this.time = time; this.project = project; this.state = state; } public int getId() { return this.id; } public String getName() { return name; } public String getResponser() { return responser; } public String getTime() { return time; } public String getProject_Belong() { return project; } public int getState() { return state; } public void setId(int id) { this.id = id; } public void setName(String name) { this.name = name; } public void setResponser(String responser) { this.responser = responser; } public void setTime(String time) { this.time = time; } public void setProject_Belong(String project) { this.project = project; } public void setState(int state) { this.state = state; } }
package org.anystub; @FunctionalInterface public interface Supplier<T extends Object, E extends Throwable> { T get() throws E; }
define([ 'jquery', 'underscore', 'backbone', 'marionette', 'text!templates/widgets/viewers/file-tree/file-tree.tpl', ], function($, _, Backbone, Marionette, Template) { return Backbone.Marionette.ItemView.extend({ // rendering methods template: function(data) { return _.template(Template, _.extend(data, { 'model': this.model })); } }); });
package com.android.aft.AFAppSettings.exception; /** * Common exception for NFSettings module */ @SuppressWarnings("serial") public class <API key> extends Exception { public <API key>(String msg) { super(msg); } }
package com.wsn.chapter13string; import org.junit.Test; import static org.junit.Assert.*; public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
package com.smp.rxplayround.sample.subject; import com.smp.rxplayround.BasePlayground; import org.junit.Test; import lombok.extern.slf4j.Slf4j; import rx.Observer; @Slf4j public class UsingAsyncSubject extends BasePlayground { @Test public void play() throws Exception { rx.subjects.AsyncSubject<String> asyncSubject = rx.subjects.AsyncSubject.create(); asyncSubject.onNext("test1"); asyncSubject.onNext("test2"); asyncSubject.subscribe(new Observer<String>() { @Override public void onCompleted() { log.debug("onCompleted"); } @Override public void onError(Throwable e) { log.debug("onError : {}", e.getMessage()); } @Override public void onNext(String s) { log.debug("onNext : {}", s); } }); asyncSubject.onNext("test3"); asyncSubject.onNext("test4"); asyncSubject.onCompleted(); } }
title: <API key> page_title: <API key> - WinForms GridView Control description: WinForms <API key> displays and allows editing of text data. slug: winforms/gridview/columns/column-types/<API key> tags: <API key> published: True position: 14 previous_url: <API key> # <API key> <API key> displays and allows editing of text data. Each cell in <API key> column displays the text of cell __Value__ property according to the settings of the __TextAlignment__ (default is __ContentAlignment.MiddleLeft__) and __WrapText__(default is *false*) properties. The displayed text is formatted according to the value of the __FormatString__ property. When a user begins editing a cell, a textbox editor is provided to handle the user’s input. The length of the text the user can enter is restricted to the value of __MaxLength__ property. ![<API key> 001](images/<API key>.png) # Add <API key> to the grid. {{source=..\SamplesCS\GridView\Columns\<API key>.cs region=addTextBoxColumn}} {{source=..\SamplesVB\GridView\Columns\<API key>.vb region=addTextBoxColumn}} `C <API key> textBoxColumn = new <API key>(); textBoxColumn.Name = "TextBoxColumn"; textBoxColumn.HeaderText = "Product Name"; textBoxColumn.FieldName = "ProductName"; textBoxColumn.MaxLength = 50; textBoxColumn.TextAlignment = ContentAlignment.BottomRight; radGridView1.MasterTemplate.Columns.Add(textBoxColumn); ` `VB.NET Dim textBoxColumn As New <API key>() textBoxColumn.Name = "TextBoxColumn" textBoxColumn.HeaderText = "Product Name" textBoxColumn.FieldName = "ProductName" textBoxColumn.MaxLength = 50 textBoxColumn.TextAlignment = ContentAlignment.BottomRight RadGridView1.MasterTemplate.Columns.Add(textBoxColumn) ` {{endregion}} ## Character casing <API key> editor - *RadTextBoxEditor* - supports character casing. To enable this functionality you need to set <API key> property of the desired <API key> column: {{source=..\SamplesCS\GridView\Columns\<API key>.cs region=characterCasting}} {{source=..\SamplesVB\GridView\Columns\<API key>.vb region=characterCasting}} `C ((<API key>)this.radGridView1.Columns[0]).<API key> = CharacterCasing.Upper; ` `VB.NET DirectCast(Me.RadGridView1.Columns(0), <API key>).<API key> = CharacterCasing.Upper ` {{endregion}} >note <API key> property affects only the editor and does not change the values in your data base. For instance, if your data base contains text which is lower case or partially lower case, and you set the **<API key>** to upper case, the data will not be change. However, if the user starts editing a cell, the editor will only allow upper case symbols and all lower case symbols will be converted to upper case ones. > # See Also * [<API key>]({%slug winforms/gridview/columns/column-types/<API key>%}) * [<API key>]({%slug winforms/gridview/columns/column-types/<API key>%}) * [<API key>]({%slug winforms/gridview/columns/column-types/<API key>%}) * [GridViewColorColumn]({%slug winforms/gridview/columns/column-types/gridviewcolorcolumn%}) * [<API key>]({%slug winforms/gridview/columns/column-types/<API key>%}) * [<API key>]({%slug winforms/gridview/columns/column-types/<API key>%}) * [<API key>]({%slug winforms/gridview/columns/column-types/<API key>%}) * [<API key>]({%slug winforms/gridview/columns/column-types/<API key>%}) * [<API key>]({%slug <API key>%})
'use strict'; var currentlyLogging = false; var requests = []; function updateButtonLook() { var img = document.getElementById("harimage"); var message = document.getElementById("harmessage"); if (currentlyLogging) { img.src = "images/record-red.png"; message.innerHTML = "Click here to stop the logs generation and download the result"; } else { img.src = "images/record-grey.png"; message.innerHTML = "Click here to start generating network logs"; } } function addRequestToList(request) { request.startedDateTime = request.startedDateTime.toISOString(); requests.push(request); } function <API key>() { if (currentlyLogging) { chrome.devtools.network.onRequestFinished.addListener(addRequestToList); } else { chrome.devtools.network.onRequestFinished.removeListener(addRequestToList); } } function generateHAR() { //TODO return pages return { log: { version: "1.2", creator: { name: "Easy Har Extractor by David Hatanian", version: "1.0" }, pages: [], entries: requests } }; } function returnHarFileToUser(harData) { simulateDownload(harData); } document.getElementById("harbutton").onclick = function () { currentlyLogging = !currentlyLogging; if (currentlyLogging) { requests = []; } updateButtonLook(); <API key>(); if (!currentlyLogging) { var harObject = generateHAR(); returnHarFileToUser(harObject); notifyDone(); } else { notifyListening(); } } updateButtonLook();
<!DOCTYPE HTML PUBLIC "- <!--NewPage <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_20) on Wed Feb 16 05:11:24 PST 2011 --> <TITLE> Uses of Class org.apache.pig.builtin.InvokeForLong (Pig 0.8.0-CDH3B4-SNAPSHOT API) </TITLE> <META NAME="date" CONTENT="2011-02-16"> <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.pig.builtin.InvokeForLong (Pig 0.8.0-CDH3B4-SNAPSHOT API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <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/pig/builtin/InvokeForLong.html" title="class in org.apache.pig.builtin"><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/pig/builtin//<API key>.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="InvokeForLong.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> <HR> <CENTER> <H2> <B>Uses of Class<br>org.apache.pig.builtin.InvokeForLong</B></H2> </CENTER> No usage of org.apache.pig.builtin.InvokeForLong <P> <HR> <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="<API key>"></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/pig/builtin/InvokeForLong.html" title="class in org.apache.pig.builtin"><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/pig/builtin//<API key>.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="InvokeForLong.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> <HR> Copyright &copy; ${year} The Apache Software Foundation </BODY> </HTML>
using System; using System.Collections; using System.Collections.Generic; using System.Reflection; using Couchbase.Core.IO.Serializers; using Couchbase.Linq.Serialization.Converters; using Newtonsoft.Json; using Newtonsoft.Json.Converters; namespace Couchbase.Linq.Serialization { <summary> Registry of <see cref="JsonConverter"/> types and their corresponding <see cref="<API key>"/> implementations. </summary> public class <API key> : <API key>, IEnumerable<KeyValuePair<Type, Type>> { private readonly Dictionary<Type, Type> _registry = new Dictionary<Type, Type>(); <summary> Create a new registry loaded with all built in <see cref="<API key>"/> implementations. </summary> <returns></returns> public static <API key> <API key>() => new <API key> { { typeof(<API key>), typeof(<API key>) }, { typeof(StringEnumConverter), typeof(<API key><>)} }; <summary> Add an <see cref="<API key>"/> implementation. </summary> <param name="jsonConverterType">Type of the <see cref="JsonConverter"/>.</param> <param name="<API key>">Type of the <see cref="<API key>"/> implementation.</param> public void Add(Type jsonConverterType, Type <API key>) { if (jsonConverterType == null) { throw new <API key>(nameof(jsonConverterType)); } if (<API key> == null) { throw new <API key>(nameof(<API key>)); } _registry.Add(jsonConverterType, <API key>); } <summary> Remove an <see cref="<API key>"/> implementation. </summary> <param name="jsonConverterType">Type of the <see cref="JsonConverter"/>.</param> public void Remove(Type jsonConverterType) { if (jsonConverterType == null) { throw new <API key>(nameof(jsonConverterType)); } _registry.Remove(jsonConverterType); } <inheritdoc/> public <API key>? <API key>(JsonConverter jsonConverter, MemberInfo member) { if (jsonConverter == null) { throw new <API key>(nameof(jsonConverter)); } if (_registry.TryGetValue(jsonConverter.GetType(), out var <API key>)) { return CreateConverter(<API key>, jsonConverter, member); } return null; } private <API key> CreateConverter(Type converterType, JsonConverter jsonConverter, MemberInfo member) { if (converterType.GetTypeInfo().<API key>) { var memberType = GetMemberType(member); if (memberType == null) { throw new <API key>( "Generic <API key> Applied To A Member Other Than Field Or Property"); } if (memberType.GetTypeInfo().IsGenericType && memberType.<API key>() == typeof(Nullable<>)) { // Extract the inner type if the type is nullable memberType = memberType.<API key>[0]; } converterType = converterType.MakeGenericType(memberType); } var constructor = converterType.GetConstructor(new[] {typeof(JsonConverter), typeof(MemberInfo)}); if (constructor != null) { return (<API key>) constructor.Invoke(new object[] {jsonConverter, member}); } return (<API key>) Activator.CreateInstance(converterType); } <inheritdoc/> public IEnumerator<KeyValuePair<Type, Type>> GetEnumerator() { return _registry.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } private static Type? GetMemberType(MemberInfo member) { switch (member) { case FieldInfo field: return field.FieldType; case PropertyInfo property: return property.PropertyType; default: return null; } } } }
import unittest import numpy as np from pypvcell.<API key> import TMLayers class TMCase(unittest.TestCase): def test_something(self): layers = ['Air', 'SiO2_2', 'TiO2_2', 'GaAs_2'] thicknesses = [0, 170, 135, 300] tm_layer = TMLayers(layers, thicknesses, wl_range=np.arange(400, 1099, 1)) R, T = tm_layer.get_RT() if __name__ == '__main__': unittest.main()
require "rails_helper" describe "users/show" do it "shows the correct user" do user = FactoryGirl.create(:user_with_avatar, name: "George Testman") assign(:user, user) render expect(rendered).to match /George Testman/ expect(rendered).to have_css "img[src='#{user.avatar.url(:thumb)}']" end end
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_80) on Thu Oct 15 19:27:47 UTC 2015 --> <title>GetDataSourceResult (AWS SDK for Java - 1.10.27)</title> <meta name="date" content="2015-10-15"> <link rel="stylesheet" type="text/css" href="../../../../../JavaDoc.css" title="Style"> </head> <body> <script type="text/javascript"><! if (location.href.indexOf('is-external=true') == -1) { parent.document.title="GetDataSourceResult (AWS SDK for Java - 1.10.27)"; } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar_top"> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><em> <!-- Scripts for Syntax Highlighter START--> <script id="<API key>" type="text/javascript" src = "http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/resources/syntaxhighlight/scripts/shCore.js"> </script> <script id="<API key>" type="text/javascript" src = "http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/resources/syntaxhighlight/scripts/shBrushJava.js"> </script> <link id="<API key>" rel="stylesheet" type="text/css" href = "http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/resources/syntaxhighlight/styles/shCoreDefault.css"/> <link id="<API key>" rel="stylesheet" type="text/css" href = "http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/resources/syntaxhighlight/styles/shThemeDefault.css"/> <!-- Scripts for Syntax Highlighter END--> <div> <!-- BEGIN-SECTION --> <div id="divsearch" style="float:left;"> <span id="lblsearch" for="searchQuery"> <label>Search</label> </span> <form id="nav-search-form" target="_parent" method="get" action="http://docs.aws.amazon.com/search/doc-search.html#facet_doc_guide=API+Reference&facet_doc_product=AWS+SDK+for+Java"> <div id="<API key>" class="nav-sprite"> <div class="<API key> nav-sprite"> <div id="<API key>"> <input id="nav-searchfield" name="searchQuery"> </div> </div> </div> <div id="nav-search-button" class="nav-sprite"> <input alt="" id="<API key>" type="image"> </div> <input name="searchPath" type="hidden" value="documentation-guide" /> <input name="this_doc_product" type="hidden" value="AWS SDK for Java" /> <input name="this_doc_guide" type="hidden" value="API Reference" /> <input name="doc_locale" type="hidden" value="en_us" /> </form> </div> <!-- END-SECTION --> <!-- <API key> --> <div id="feedback-section"> <h3>Did this page help you?</h3> <div id="<API key>"> <a id="feedback_yes" target="_blank" style="display:inline;">Yes</a>&nbsp;&nbsp; <a id="feedback_no" target="_blank" style="display:inline;">No</a>&nbsp;&nbsp; <a id="go_cti" target="_blank" style="display:inline;">Tell us about it...</a> </div> </div> <script type="text/javascript"> window.onload = function(){ /* Dynamically add feedback links */ var javadoc_root_name = "/javadoc/"; var javadoc_path = location.href.substring(0, location.href.lastIndexOf(javadoc_root_name) + javadoc_root_name.length); var file_path = location.href.substring(location.href.lastIndexOf(javadoc_root_name) + javadoc_root_name.length); var feedback_yes_url = javadoc_path + "javadoc-resources/feedbackyes.html?topic_id="; var feedback_no_url = javadoc_path + "javadoc-resources/feedbackno.html?topic_id="; var <API key> = "https://aws-portal.amazon.com/gp/aws/<API key>/documentation/aws_doc_feedback_04?service_name=Java-Ref&file_name="; if(file_path != "overview-frame.html") { var file_name = file_path.replace(/[/.]/g, '_'); document.getElementById("feedback_yes").setAttribute("href", feedback_yes_url + file_name); document.getElementById("feedback_no").setAttribute("href", feedback_no_url + file_name); document.getElementById("go_cti").setAttribute("href", <API key> + file_name); } else { // hide the search box and the feeback links in overview-frame page, // show "AWS SDK for Java" instead. document.getElementById("feedback-section").outerHTML = "AWS SDK for Java"; document.getElementById("divsearch").outerHTML = ""; } }; </script> <!-- <API key> --> </div> </em></div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../com/amazonaws/services/machinelearning/model/<API key>.html" title="class in com.amazonaws.services.machinelearning.model"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../../com/amazonaws/services/machinelearning/model/<API key>.html" title="class in com.amazonaws.services.machinelearning.model"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" target="_top">Frames</a></li> <li><a href="GetDataSourceResult.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); 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><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> </a></div> <div class="header"> <div class="subTitle">com.amazonaws.services.machinelearning.model</div> <h2 title="Class GetDataSourceResult" class="title">Class GetDataSourceResult</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>com.amazonaws.services.machinelearning.model.GetDataSourceResult</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd>java.io.Serializable, java.lang.Cloneable</dd> </dl> <hr> <br> <pre>public class <span class="strong">GetDataSourceResult</span> extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable</pre> <div class="block"><p> Represents the output of a <a>GetDataSource</a> operation and describes a <code>DataSource</code>. </p></div> <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#com.amazonaws.services.machinelearning.model.GetDataSourceResult">Serialized Form</a></dd></dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> </a> <h3>Constructor Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#GetDataSourceResult()">GetDataSourceResult</a></strong>()</code>&nbsp;</td> </tr> </table> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method_summary"> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#clone()">clone</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#equals(java.lang.Object)">equals</a></strong>(java.lang.Object&nbsp;obj)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.Boolean</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#<API key>()"><API key></a></strong>()</code> <div class="block"> The parameter is <code>true</code> if statistics need to be generated from the observation data.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.util.Date</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getCreatedAt()">getCreatedAt</a></strong>()</code> <div class="block"> The time that the <code>DataSource</code> was created.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getCreatedByIamUser()">getCreatedByIamUser</a></strong>()</code> <div class="block"> The AWS user account from which the <code>DataSource</code> was created.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getDataLocationS3()">getDataLocationS3</a></strong>()</code> <div class="block"> The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#<API key>()"><API key></a></strong>()</code> <div class="block"> A JSON string that captures the splitting rearrangement requirement of the <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.Long</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getDataSizeInBytes()">getDataSizeInBytes</a></strong>()</code> <div class="block"> The total size of observations in the data files.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getDataSourceId()">getDataSourceId</a></strong>()</code> <div class="block"> The ID assigned to the <code>DataSource</code> at creation.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getDataSourceSchema()">getDataSourceSchema</a></strong>()</code> <div class="block"> The schema used by all of the data files of this <code>DataSource</code>.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.util.Date</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getLastUpdatedAt()">getLastUpdatedAt</a></strong>()</code> <div class="block"> The time of the most recent edit to the <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getLogUri()">getLogUri</a></strong>()</code> <div class="block"> A link to the file containining logs of either create <code>DataSource</code> operation.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getMessage()">getMessage</a></strong>()</code> <div class="block"> The description of the most recent details about creating the <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getName()">getName</a></strong>()</code> <div class="block"> A user-supplied name or description of the <code>DataSource</code>.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.Long</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getNumberOfFiles()">getNumberOfFiles</a></strong>()</code> <div class="block"> The number of data files referenced by the <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/RDSMetadata.html" title="class in com.amazonaws.services.machinelearning.model">RDSMetadata</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getRDSMetadata()">getRDSMetadata</a></strong>()</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/RedshiftMetadata.html" title="class in com.amazonaws.services.machinelearning.model">RedshiftMetadata</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getRedshiftMetadata()">getRedshiftMetadata</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getRoleARN()">getRoleARN</a></strong>()</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#getStatus()">getStatus</a></strong>()</code> <div class="block"> The current status of the <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#hashCode()">hashCode</a></strong>()</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.Boolean</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#isComputeStatistics()">isComputeStatistics</a></strong>()</code> <div class="block"> The parameter is <code>true</code> if statistics need to be generated from the observation data.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#<API key>(java.lang.Boolean)"><API key></a></strong>(java.lang.Boolean&nbsp;computeStatistics)</code> <div class="block"> The parameter is <code>true</code> if statistics need to be generated from the observation data.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setCreatedAt(java.util.Date)">setCreatedAt</a></strong>(java.util.Date&nbsp;createdAt)</code> <div class="block"> The time that the <code>DataSource</code> was created.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setCreatedByIamUser(java.lang.String)">setCreatedByIamUser</a></strong>(java.lang.String&nbsp;createdByIamUser)</code> <div class="block"> The AWS user account from which the <code>DataSource</code> was created.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setDataLocationS3(java.lang.String)">setDataLocationS3</a></strong>(java.lang.String&nbsp;dataLocationS3)</code> <div class="block"> The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#<API key>(java.lang.String)"><API key></a></strong>(java.lang.String&nbsp;dataRearrangement)</code> <div class="block"> A JSON string that captures the splitting rearrangement requirement of the <code>DataSource</code>.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setDataSizeInBytes(java.lang.Long)">setDataSizeInBytes</a></strong>(java.lang.Long&nbsp;dataSizeInBytes)</code> <div class="block"> The total size of observations in the data files.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setDataSourceId(java.lang.String)">setDataSourceId</a></strong>(java.lang.String&nbsp;dataSourceId)</code> <div class="block"> The ID assigned to the <code>DataSource</code> at creation.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setDataSourceSchema(java.lang.String)">setDataSourceSchema</a></strong>(java.lang.String&nbsp;dataSourceSchema)</code> <div class="block"> The schema used by all of the data files of this <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setLastUpdatedAt(java.util.Date)">setLastUpdatedAt</a></strong>(java.util.Date&nbsp;lastUpdatedAt)</code> <div class="block"> The time of the most recent edit to the <code>DataSource</code>.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setLogUri(java.lang.String)">setLogUri</a></strong>(java.lang.String&nbsp;logUri)</code> <div class="block"> A link to the file containining logs of either create <code>DataSource</code> operation.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setMessage(java.lang.String)">setMessage</a></strong>(java.lang.String&nbsp;message)</code> <div class="block"> The description of the most recent details about creating the <code>DataSource</code>.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setName(java.lang.String)">setName</a></strong>(java.lang.String&nbsp;name)</code> <div class="block"> A user-supplied name or description of the <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setNumberOfFiles(java.lang.Long)">setNumberOfFiles</a></strong>(java.lang.Long&nbsp;numberOfFiles)</code> <div class="block"> The number of data files referenced by the <code>DataSource</code>.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setRDSMetadata(com.amazonaws.services.machinelearning.model.RDSMetadata)">setRDSMetadata</a></strong>(<a href="../../../../../com/amazonaws/services/machinelearning/model/RDSMetadata.html" title="class in com.amazonaws.services.machinelearning.model">RDSMetadata</a>&nbsp;rDSMetadata)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setRedshiftMetadata(com.amazonaws.services.machinelearning.model.RedshiftMetadata)">setRedshiftMetadata</a></strong>(<a href="../../../../../com/amazonaws/services/machinelearning/model/RedshiftMetadata.html" title="class in com.amazonaws.services.machinelearning.model">RedshiftMetadata</a>&nbsp;redshiftMetadata)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setRoleARN(java.lang.String)">setRoleARN</a></strong>(java.lang.String&nbsp;roleARN)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setStatus(com.amazonaws.services.machinelearning.model.EntityStatus)">setStatus</a></strong>(<a href="../../../../../com/amazonaws/services/machinelearning/model/EntityStatus.html" title="enum in com.amazonaws.services.machinelearning.model">EntityStatus</a>&nbsp;status)</code> <div class="block"> The current status of the <code>DataSource</code>.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#setStatus(java.lang.String)">setStatus</a></strong>(java.lang.String&nbsp;status)</code> <div class="block"> The current status of the <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#toString()">toString</a></strong>()</code> <div class="block">Returns a string representation of this object; useful for testing and debugging.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#<API key>(java.lang.Boolean)"><API key></a></strong>(java.lang.Boolean&nbsp;computeStatistics)</code> <div class="block"> The parameter is <code>true</code> if statistics need to be generated from the observation data.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withCreatedAt(java.util.Date)">withCreatedAt</a></strong>(java.util.Date&nbsp;createdAt)</code> <div class="block"> The time that the <code>DataSource</code> was created.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#<API key>(java.lang.String)"><API key></a></strong>(java.lang.String&nbsp;createdByIamUser)</code> <div class="block"> The AWS user account from which the <code>DataSource</code> was created.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withDataLocationS3(java.lang.String)">withDataLocationS3</a></strong>(java.lang.String&nbsp;dataLocationS3)</code> <div class="block"> The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#<API key>(java.lang.String)"><API key></a></strong>(java.lang.String&nbsp;dataRearrangement)</code> <div class="block"> A JSON string that captures the splitting rearrangement requirement of the <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withDataSizeInBytes(java.lang.Long)">withDataSizeInBytes</a></strong>(java.lang.Long&nbsp;dataSizeInBytes)</code> <div class="block"> The total size of observations in the data files.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withDataSourceId(java.lang.String)">withDataSourceId</a></strong>(java.lang.String&nbsp;dataSourceId)</code> <div class="block"> The ID assigned to the <code>DataSource</code> at creation.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#<API key>(java.lang.String)"><API key></a></strong>(java.lang.String&nbsp;dataSourceSchema)</code> <div class="block"> The schema used by all of the data files of this <code>DataSource</code>.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withLastUpdatedAt(java.util.Date)">withLastUpdatedAt</a></strong>(java.util.Date&nbsp;lastUpdatedAt)</code> <div class="block"> The time of the most recent edit to the <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withLogUri(java.lang.String)">withLogUri</a></strong>(java.lang.String&nbsp;logUri)</code> <div class="block"> A link to the file containining logs of either create <code>DataSource</code> operation.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withMessage(java.lang.String)">withMessage</a></strong>(java.lang.String&nbsp;message)</code> <div class="block"> The description of the most recent details about creating the <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withName(java.lang.String)">withName</a></strong>(java.lang.String&nbsp;name)</code> <div class="block"> A user-supplied name or description of the <code>DataSource</code>.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withNumberOfFiles(java.lang.Long)">withNumberOfFiles</a></strong>(java.lang.Long&nbsp;numberOfFiles)</code> <div class="block"> The number of data files referenced by the <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withRDSMetadata(com.amazonaws.services.machinelearning.model.RDSMetadata)">withRDSMetadata</a></strong>(<a href="../../../../../com/amazonaws/services/machinelearning/model/RDSMetadata.html" title="class in com.amazonaws.services.machinelearning.model">RDSMetadata</a>&nbsp;rDSMetadata)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#<API key>(com.amazonaws.services.machinelearning.model.RedshiftMetadata)"><API key></a></strong>(<a href="../../../../../com/amazonaws/services/machinelearning/model/RedshiftMetadata.html" title="class in com.amazonaws.services.machinelearning.model">RedshiftMetadata</a>&nbsp;redshiftMetadata)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withRoleARN(java.lang.String)">withRoleARN</a></strong>(java.lang.String&nbsp;roleARN)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withStatus(com.amazonaws.services.machinelearning.model.EntityStatus)">withStatus</a></strong>(<a href="../../../../../com/amazonaws/services/machinelearning/model/EntityStatus.html" title="enum in com.amazonaws.services.machinelearning.model">EntityStatus</a>&nbsp;status)</code> <div class="block"> The current status of the <code>DataSource</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a></code></td> <td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html#withStatus(java.lang.String)">withStatus</a></strong>(java.lang.String&nbsp;status)</code> <div class="block"> The current status of the <code>DataSource</code>.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="<API key>.lang.Object"> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>getClass, notify, notifyAll, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> </a> <h3>Constructor Detail</h3> <a name="GetDataSourceResult()"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>GetDataSourceResult</h4> <pre>public&nbsp;GetDataSourceResult()</pre> </li> </ul> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method_detail"> </a> <h3>Method Detail</h3> <a name="setDataSourceId(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setDataSourceId</h4> <pre>public&nbsp;void&nbsp;setDataSourceId(java.lang.String&nbsp;dataSourceId)</pre> <div class="block"><p> The ID assigned to the <code>DataSource</code> at creation. This value should be identical to the value of the <code>DataSourceId</code> in the request. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataSourceId</code> - The ID assigned to the <code>DataSource</code> at creation. This value should be identical to the value of the <code>DataSourceId</code> in the request.</dd></dl> </li> </ul> <a name="getDataSourceId()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getDataSourceId</h4> <pre>public&nbsp;java.lang.String&nbsp;getDataSourceId()</pre> <div class="block"><p> The ID assigned to the <code>DataSource</code> at creation. This value should be identical to the value of the <code>DataSourceId</code> in the request. </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>The ID assigned to the <code>DataSource</code> at creation. This value should be identical to the value of the <code>DataSourceId</code> in the request.</dd></dl> </li> </ul> <a name="withDataSourceId(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withDataSourceId</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withDataSourceId(java.lang.String&nbsp;dataSourceId)</pre> <div class="block"><p> The ID assigned to the <code>DataSource</code> at creation. This value should be identical to the value of the <code>DataSourceId</code> in the request. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataSourceId</code> - The ID assigned to the <code>DataSource</code> at creation. This value should be identical to the value of the <code>DataSourceId</code> in the request.</dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="setDataLocationS3(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setDataLocationS3</h4> <pre>public&nbsp;void&nbsp;setDataLocationS3(java.lang.String&nbsp;dataLocationS3)</pre> <div class="block"><p> The location of the data file or directory in Amazon Simple Storage Service (Amazon S3). </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataLocationS3</code> - The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).</dd></dl> </li> </ul> <a name="getDataLocationS3()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getDataLocationS3</h4> <pre>public&nbsp;java.lang.String&nbsp;getDataLocationS3()</pre> <div class="block"><p> The location of the data file or directory in Amazon Simple Storage Service (Amazon S3). </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).</dd></dl> </li> </ul> <a name="withDataLocationS3(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withDataLocationS3</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withDataLocationS3(java.lang.String&nbsp;dataLocationS3)</pre> <div class="block"><p> The location of the data file or directory in Amazon Simple Storage Service (Amazon S3). </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataLocationS3</code> - The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).</dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="<API key>(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public&nbsp;void&nbsp;<API key>(java.lang.String&nbsp;dataRearrangement)</pre> <div class="block"><p> A JSON string that captures the splitting rearrangement requirement of the <code>DataSource</code>. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataRearrangement</code> - A JSON string that captures the splitting rearrangement requirement of the <code>DataSource</code>.</dd></dl> </li> </ul> <a name="<API key>()"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public&nbsp;java.lang.String&nbsp;<API key>()</pre> <div class="block"><p> A JSON string that captures the splitting rearrangement requirement of the <code>DataSource</code>. </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>A JSON string that captures the splitting rearrangement requirement of the <code>DataSource</code>.</dd></dl> </li> </ul> <a name="<API key>(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;<API key>(java.lang.String&nbsp;dataRearrangement)</pre> <div class="block"><p> A JSON string that captures the splitting rearrangement requirement of the <code>DataSource</code>. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataRearrangement</code> - A JSON string that captures the splitting rearrangement requirement of the <code>DataSource</code>.</dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="setCreatedByIamUser(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setCreatedByIamUser</h4> <pre>public&nbsp;void&nbsp;setCreatedByIamUser(java.lang.String&nbsp;createdByIamUser)</pre> <div class="block"><p> The AWS user account from which the <code>DataSource</code> was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>createdByIamUser</code> - The AWS user account from which the <code>DataSource</code> was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.</dd></dl> </li> </ul> <a name="getCreatedByIamUser()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getCreatedByIamUser</h4> <pre>public&nbsp;java.lang.String&nbsp;getCreatedByIamUser()</pre> <div class="block"><p> The AWS user account from which the <code>DataSource</code> was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account. </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>The AWS user account from which the <code>DataSource</code> was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.</dd></dl> </li> </ul> <a name="<API key>(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;<API key>(java.lang.String&nbsp;createdByIamUser)</pre> <div class="block"><p> The AWS user account from which the <code>DataSource</code> was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>createdByIamUser</code> - The AWS user account from which the <code>DataSource</code> was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.</dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="setCreatedAt(java.util.Date)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setCreatedAt</h4> <pre>public&nbsp;void&nbsp;setCreatedAt(java.util.Date&nbsp;createdAt)</pre> <div class="block"><p> The time that the <code>DataSource</code> was created. The time is expressed in epoch time. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>createdAt</code> - The time that the <code>DataSource</code> was created. The time is expressed in epoch time.</dd></dl> </li> </ul> <a name="getCreatedAt()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getCreatedAt</h4> <pre>public&nbsp;java.util.Date&nbsp;getCreatedAt()</pre> <div class="block"><p> The time that the <code>DataSource</code> was created. The time is expressed in epoch time. </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>The time that the <code>DataSource</code> was created. The time is expressed in epoch time.</dd></dl> </li> </ul> <a name="withCreatedAt(java.util.Date)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withCreatedAt</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withCreatedAt(java.util.Date&nbsp;createdAt)</pre> <div class="block"><p> The time that the <code>DataSource</code> was created. The time is expressed in epoch time. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>createdAt</code> - The time that the <code>DataSource</code> was created. The time is expressed in epoch time.</dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="setLastUpdatedAt(java.util.Date)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setLastUpdatedAt</h4> <pre>public&nbsp;void&nbsp;setLastUpdatedAt(java.util.Date&nbsp;lastUpdatedAt)</pre> <div class="block"><p> The time of the most recent edit to the <code>DataSource</code>. The time is expressed in epoch time. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>lastUpdatedAt</code> - The time of the most recent edit to the <code>DataSource</code>. The time is expressed in epoch time.</dd></dl> </li> </ul> <a name="getLastUpdatedAt()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getLastUpdatedAt</h4> <pre>public&nbsp;java.util.Date&nbsp;getLastUpdatedAt()</pre> <div class="block"><p> The time of the most recent edit to the <code>DataSource</code>. The time is expressed in epoch time. </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>The time of the most recent edit to the <code>DataSource</code>. The time is expressed in epoch time.</dd></dl> </li> </ul> <a name="withLastUpdatedAt(java.util.Date)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withLastUpdatedAt</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withLastUpdatedAt(java.util.Date&nbsp;lastUpdatedAt)</pre> <div class="block"><p> The time of the most recent edit to the <code>DataSource</code>. The time is expressed in epoch time. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>lastUpdatedAt</code> - The time of the most recent edit to the <code>DataSource</code>. The time is expressed in epoch time.</dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="setDataSizeInBytes(java.lang.Long)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setDataSizeInBytes</h4> <pre>public&nbsp;void&nbsp;setDataSizeInBytes(java.lang.Long&nbsp;dataSizeInBytes)</pre> <div class="block"><p> The total size of observations in the data files. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataSizeInBytes</code> - The total size of observations in the data files.</dd></dl> </li> </ul> <a name="getDataSizeInBytes()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getDataSizeInBytes</h4> <pre>public&nbsp;java.lang.Long&nbsp;getDataSizeInBytes()</pre> <div class="block"><p> The total size of observations in the data files. </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>The total size of observations in the data files.</dd></dl> </li> </ul> <a name="withDataSizeInBytes(java.lang.Long)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withDataSizeInBytes</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withDataSizeInBytes(java.lang.Long&nbsp;dataSizeInBytes)</pre> <div class="block"><p> The total size of observations in the data files. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataSizeInBytes</code> - The total size of observations in the data files.</dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="setNumberOfFiles(java.lang.Long)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setNumberOfFiles</h4> <pre>public&nbsp;void&nbsp;setNumberOfFiles(java.lang.Long&nbsp;numberOfFiles)</pre> <div class="block"><p> The number of data files referenced by the <code>DataSource</code>. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>numberOfFiles</code> - The number of data files referenced by the <code>DataSource</code> .</dd></dl> </li> </ul> <a name="getNumberOfFiles()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getNumberOfFiles</h4> <pre>public&nbsp;java.lang.Long&nbsp;getNumberOfFiles()</pre> <div class="block"><p> The number of data files referenced by the <code>DataSource</code>. </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>The number of data files referenced by the <code>DataSource</code>.</dd></dl> </li> </ul> <a name="withNumberOfFiles(java.lang.Long)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withNumberOfFiles</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withNumberOfFiles(java.lang.Long&nbsp;numberOfFiles)</pre> <div class="block"><p> The number of data files referenced by the <code>DataSource</code>. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>numberOfFiles</code> - The number of data files referenced by the <code>DataSource</code> .</dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="setName(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setName</h4> <pre>public&nbsp;void&nbsp;setName(java.lang.String&nbsp;name)</pre> <div class="block"><p> A user-supplied name or description of the <code>DataSource</code>. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - A user-supplied name or description of the <code>DataSource</code> .</dd></dl> </li> </ul> <a name="getName()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getName</h4> <pre>public&nbsp;java.lang.String&nbsp;getName()</pre> <div class="block"><p> A user-supplied name or description of the <code>DataSource</code>. </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>A user-supplied name or description of the <code>DataSource</code>.</dd></dl> </li> </ul> <a name="withName(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withName</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withName(java.lang.String&nbsp;name)</pre> <div class="block"><p> A user-supplied name or description of the <code>DataSource</code>. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - A user-supplied name or description of the <code>DataSource</code> .</dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="setStatus(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setStatus</h4> <pre>public&nbsp;void&nbsp;setStatus(java.lang.String&nbsp;status)</pre> <div class="block"><p> The current status of the <code>DataSource</code>. This element can have one of the following values: </p> <ul> <li> <code>PENDING</code> - Amazon Machine Language (Amazon ML) submitted a request to create a <code>DataSource</code>.</li> <li> <code>INPROGRESS</code> - The creation process is underway.</li> <li> <code>FAILED</code> - The request to create a <code>DataSource</code> did not run to completion. It is not usable.</li> <li> <code>COMPLETED</code> - The creation process completed successfully. </li> <li> <code>DELETED</code> - The <code>DataSource</code> is marked as deleted. It is not usable.</li> </ul></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>status</code> - The current status of the <code>DataSource</code>. This element can have one of the following values:</p> <ul> <li> <code>PENDING</code> - Amazon Machine Language (Amazon ML) submitted a request to create a <code>DataSource</code>.</li> <li> <code>INPROGRESS</code> - The creation process is underway.</li> <li> <code>FAILED</code> - The request to create a <code>DataSource</code> did not run to completion. It is not usable.</li> <li> <code>COMPLETED</code> - The creation process completed successfully.</li> <li> <code>DELETED</code> - The <code>DataSource</code> is marked as deleted. It is not usable.</li></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../com/amazonaws/services/machinelearning/model/EntityStatus.html" title="enum in com.amazonaws.services.machinelearning.model"><code>EntityStatus</code></a></dd></dl> </li> </ul> <a name="getStatus()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getStatus</h4> <pre>public&nbsp;java.lang.String&nbsp;getStatus()</pre> <div class="block"><p> The current status of the <code>DataSource</code>. This element can have one of the following values: </p> <ul> <li> <code>PENDING</code> - Amazon Machine Language (Amazon ML) submitted a request to create a <code>DataSource</code>.</li> <li> <code>INPROGRESS</code> - The creation process is underway.</li> <li> <code>FAILED</code> - The request to create a <code>DataSource</code> did not run to completion. It is not usable.</li> <li> <code>COMPLETED</code> - The creation process completed successfully. </li> <li> <code>DELETED</code> - The <code>DataSource</code> is marked as deleted. It is not usable.</li> </ul></div> <dl><dt><span class="strong">Returns:</span></dt><dd>The current status of the <code>DataSource</code>. This element can have one of the following values:</p> <ul> <li> <code>PENDING</code> - Amazon Machine Language (Amazon ML) submitted a request to create a <code>DataSource</code>.</li> <li> <code>INPROGRESS</code> - The creation process is underway.</li> <li> <code>FAILED</code> - The request to create a <code>DataSource</code> did not run to completion. It is not usable.</li> <li> <code>COMPLETED</code> - The creation process completed successfully.</li> <li> <code>DELETED</code> - The <code>DataSource</code> is marked as deleted. It is not usable.</li></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../com/amazonaws/services/machinelearning/model/EntityStatus.html" title="enum in com.amazonaws.services.machinelearning.model"><code>EntityStatus</code></a></dd></dl> </li> </ul> <a name="withStatus(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withStatus</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withStatus(java.lang.String&nbsp;status)</pre> <div class="block"><p> The current status of the <code>DataSource</code>. This element can have one of the following values: </p> <ul> <li> <code>PENDING</code> - Amazon Machine Language (Amazon ML) submitted a request to create a <code>DataSource</code>.</li> <li> <code>INPROGRESS</code> - The creation process is underway.</li> <li> <code>FAILED</code> - The request to create a <code>DataSource</code> did not run to completion. It is not usable.</li> <li> <code>COMPLETED</code> - The creation process completed successfully. </li> <li> <code>DELETED</code> - The <code>DataSource</code> is marked as deleted. It is not usable.</li> </ul></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>status</code> - The current status of the <code>DataSource</code>. This element can have one of the following values:</p> <ul> <li> <code>PENDING</code> - Amazon Machine Language (Amazon ML) submitted a request to create a <code>DataSource</code>.</li> <li> <code>INPROGRESS</code> - The creation process is underway.</li> <li> <code>FAILED</code> - The request to create a <code>DataSource</code> did not run to completion. It is not usable.</li> <li> <code>COMPLETED</code> - The creation process completed successfully.</li> <li> <code>DELETED</code> - The <code>DataSource</code> is marked as deleted. It is not usable.</li></dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../com/amazonaws/services/machinelearning/model/EntityStatus.html" title="enum in com.amazonaws.services.machinelearning.model"><code>EntityStatus</code></a></dd></dl> </li> </ul> <a name="setStatus(com.amazonaws.services.machinelearning.model.EntityStatus)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setStatus</h4> <pre>public&nbsp;void&nbsp;setStatus(<a href="../../../../../com/amazonaws/services/machinelearning/model/EntityStatus.html" title="enum in com.amazonaws.services.machinelearning.model">EntityStatus</a>&nbsp;status)</pre> <div class="block"><p> The current status of the <code>DataSource</code>. This element can have one of the following values: </p> <ul> <li> <code>PENDING</code> - Amazon Machine Language (Amazon ML) submitted a request to create a <code>DataSource</code>.</li> <li> <code>INPROGRESS</code> - The creation process is underway.</li> <li> <code>FAILED</code> - The request to create a <code>DataSource</code> did not run to completion. It is not usable.</li> <li> <code>COMPLETED</code> - The creation process completed successfully. </li> <li> <code>DELETED</code> - The <code>DataSource</code> is marked as deleted. It is not usable.</li> </ul></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>status</code> - The current status of the <code>DataSource</code>. This element can have one of the following values:</p> <ul> <li> <code>PENDING</code> - Amazon Machine Language (Amazon ML) submitted a request to create a <code>DataSource</code>.</li> <li> <code>INPROGRESS</code> - The creation process is underway.</li> <li> <code>FAILED</code> - The request to create a <code>DataSource</code> did not run to completion. It is not usable.</li> <li> <code>COMPLETED</code> - The creation process completed successfully.</li> <li> <code>DELETED</code> - The <code>DataSource</code> is marked as deleted. It is not usable.</li></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../com/amazonaws/services/machinelearning/model/EntityStatus.html" title="enum in com.amazonaws.services.machinelearning.model"><code>EntityStatus</code></a></dd></dl> </li> </ul> <a name="withStatus(com.amazonaws.services.machinelearning.model.EntityStatus)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withStatus</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withStatus(<a href="../../../../../com/amazonaws/services/machinelearning/model/EntityStatus.html" title="enum in com.amazonaws.services.machinelearning.model">EntityStatus</a>&nbsp;status)</pre> <div class="block"><p> The current status of the <code>DataSource</code>. This element can have one of the following values: </p> <ul> <li> <code>PENDING</code> - Amazon Machine Language (Amazon ML) submitted a request to create a <code>DataSource</code>.</li> <li> <code>INPROGRESS</code> - The creation process is underway.</li> <li> <code>FAILED</code> - The request to create a <code>DataSource</code> did not run to completion. It is not usable.</li> <li> <code>COMPLETED</code> - The creation process completed successfully. </li> <li> <code>DELETED</code> - The <code>DataSource</code> is marked as deleted. It is not usable.</li> </ul></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>status</code> - The current status of the <code>DataSource</code>. This element can have one of the following values:</p> <ul> <li> <code>PENDING</code> - Amazon Machine Language (Amazon ML) submitted a request to create a <code>DataSource</code>.</li> <li> <code>INPROGRESS</code> - The creation process is underway.</li> <li> <code>FAILED</code> - The request to create a <code>DataSource</code> did not run to completion. It is not usable.</li> <li> <code>COMPLETED</code> - The creation process completed successfully.</li> <li> <code>DELETED</code> - The <code>DataSource</code> is marked as deleted. It is not usable.</li></dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../com/amazonaws/services/machinelearning/model/EntityStatus.html" title="enum in com.amazonaws.services.machinelearning.model"><code>EntityStatus</code></a></dd></dl> </li> </ul> <a name="setLogUri(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setLogUri</h4> <pre>public&nbsp;void&nbsp;setLogUri(java.lang.String&nbsp;logUri)</pre> <div class="block"><p> A link to the file containining logs of either create <code>DataSource</code> operation. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>logUri</code> - A link to the file containining logs of either create <code>DataSource</code> operation.</dd></dl> </li> </ul> <a name="getLogUri()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getLogUri</h4> <pre>public&nbsp;java.lang.String&nbsp;getLogUri()</pre> <div class="block"><p> A link to the file containining logs of either create <code>DataSource</code> operation. </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>A link to the file containining logs of either create <code>DataSource</code> operation.</dd></dl> </li> </ul> <a name="withLogUri(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withLogUri</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withLogUri(java.lang.String&nbsp;logUri)</pre> <div class="block"><p> A link to the file containining logs of either create <code>DataSource</code> operation. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>logUri</code> - A link to the file containining logs of either create <code>DataSource</code> operation.</dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="setMessage(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setMessage</h4> <pre>public&nbsp;void&nbsp;setMessage(java.lang.String&nbsp;message)</pre> <div class="block"><p> The description of the most recent details about creating the <code>DataSource</code>. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>message</code> - The description of the most recent details about creating the <code>DataSource</code>.</dd></dl> </li> </ul> <a name="getMessage()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getMessage</h4> <pre>public&nbsp;java.lang.String&nbsp;getMessage()</pre> <div class="block"><p> The description of the most recent details about creating the <code>DataSource</code>. </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>The description of the most recent details about creating the <code>DataSource</code>.</dd></dl> </li> </ul> <a name="withMessage(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withMessage</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withMessage(java.lang.String&nbsp;message)</pre> <div class="block"><p> The description of the most recent details about creating the <code>DataSource</code>. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>message</code> - The description of the most recent details about creating the <code>DataSource</code>.</dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="setRedshiftMetadata(com.amazonaws.services.machinelearning.model.RedshiftMetadata)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setRedshiftMetadata</h4> <pre>public&nbsp;void&nbsp;setRedshiftMetadata(<a href="../../../../../com/amazonaws/services/machinelearning/model/RedshiftMetadata.html" title="class in com.amazonaws.services.machinelearning.model">RedshiftMetadata</a>&nbsp;redshiftMetadata)</pre> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>redshiftMetadata</code> - </dd></dl> </li> </ul> <a name="getRedshiftMetadata()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getRedshiftMetadata</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/RedshiftMetadata.html" title="class in com.amazonaws.services.machinelearning.model">RedshiftMetadata</a>&nbsp;getRedshiftMetadata()</pre> <dl><dt><span class="strong">Returns:</span></dt><dd></dd></dl> </li> </ul> <a name="<API key>(com.amazonaws.services.machinelearning.model.RedshiftMetadata)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;<API key>(<a href="../../../../../com/amazonaws/services/machinelearning/model/RedshiftMetadata.html" title="class in com.amazonaws.services.machinelearning.model">RedshiftMetadata</a>&nbsp;redshiftMetadata)</pre> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>redshiftMetadata</code> - </dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="setRDSMetadata(com.amazonaws.services.machinelearning.model.RDSMetadata)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setRDSMetadata</h4> <pre>public&nbsp;void&nbsp;setRDSMetadata(<a href="../../../../../com/amazonaws/services/machinelearning/model/RDSMetadata.html" title="class in com.amazonaws.services.machinelearning.model">RDSMetadata</a>&nbsp;rDSMetadata)</pre> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>rDSMetadata</code> - </dd></dl> </li> </ul> <a name="getRDSMetadata()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getRDSMetadata</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/RDSMetadata.html" title="class in com.amazonaws.services.machinelearning.model">RDSMetadata</a>&nbsp;getRDSMetadata()</pre> <dl><dt><span class="strong">Returns:</span></dt><dd></dd></dl> </li> </ul> <a name="withRDSMetadata(com.amazonaws.services.machinelearning.model.RDSMetadata)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withRDSMetadata</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withRDSMetadata(<a href="../../../../../com/amazonaws/services/machinelearning/model/RDSMetadata.html" title="class in com.amazonaws.services.machinelearning.model">RDSMetadata</a>&nbsp;rDSMetadata)</pre> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>rDSMetadata</code> - </dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="setRoleARN(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setRoleARN</h4> <pre>public&nbsp;void&nbsp;setRoleARN(java.lang.String&nbsp;roleARN)</pre> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>roleARN</code> - </dd></dl> </li> </ul> <a name="getRoleARN()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getRoleARN</h4> <pre>public&nbsp;java.lang.String&nbsp;getRoleARN()</pre> <dl><dt><span class="strong">Returns:</span></dt><dd></dd></dl> </li> </ul> <a name="withRoleARN(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>withRoleARN</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;withRoleARN(java.lang.String&nbsp;roleARN)</pre> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>roleARN</code> - </dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="<API key>(java.lang.Boolean)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public&nbsp;void&nbsp;<API key>(java.lang.Boolean&nbsp;computeStatistics)</pre> <div class="block"><p> The parameter is <code>true</code> if statistics need to be generated from the observation data. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>computeStatistics</code> - The parameter is <code>true</code> if statistics need to be generated from the observation data.</dd></dl> </li> </ul> <a name="<API key>()"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public&nbsp;java.lang.Boolean&nbsp;<API key>()</pre> <div class="block"><p> The parameter is <code>true</code> if statistics need to be generated from the observation data. </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>The parameter is <code>true</code> if statistics need to be generated from the observation data.</dd></dl> </li> </ul> <a name="<API key>(java.lang.Boolean)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;<API key>(java.lang.Boolean&nbsp;computeStatistics)</pre> <div class="block"><p> The parameter is <code>true</code> if statistics need to be generated from the observation data. </p></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>computeStatistics</code> - The parameter is <code>true</code> if statistics need to be generated from the observation data.</dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="isComputeStatistics()"> </a> <ul class="blockList"> <li class="blockList"> <h4>isComputeStatistics</h4> <pre>public&nbsp;java.lang.Boolean&nbsp;isComputeStatistics()</pre> <div class="block"><p> The parameter is <code>true</code> if statistics need to be generated from the observation data. </p></div> <dl><dt><span class="strong">Returns:</span></dt><dd>The parameter is <code>true</code> if statistics need to be generated from the observation data.</dd></dl> </li> </ul> <a name="setDataSourceSchema(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4>setDataSourceSchema</h4> <pre>public&nbsp;void&nbsp;setDataSourceSchema(java.lang.String&nbsp;dataSourceSchema)</pre> <div class="block"><p> The schema used by all of the data files of this <code>DataSource</code>. </p> <note><title>Note</title> <p> This parameter is provided as part of the verbose format. </p> </note></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataSourceSchema</code> - The schema used by all of the data files of this <code>DataSource</code>.</p> <note><title>Note</title> <p> This parameter is provided as part of the verbose format. </p></dd></dl> </li> </ul> <a name="getDataSourceSchema()"> </a> <ul class="blockList"> <li class="blockList"> <h4>getDataSourceSchema</h4> <pre>public&nbsp;java.lang.String&nbsp;getDataSourceSchema()</pre> <div class="block"><p> The schema used by all of the data files of this <code>DataSource</code>. </p> <note><title>Note</title> <p> This parameter is provided as part of the verbose format. </p> </note></div> <dl><dt><span class="strong">Returns:</span></dt><dd>The schema used by all of the data files of this <code>DataSource</code>.</p> <note><title>Note</title> <p> This parameter is provided as part of the verbose format. </p></dd></dl> </li> </ul> <a name="<API key>(java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;<API key>(java.lang.String&nbsp;dataSourceSchema)</pre> <div class="block"><p> The schema used by all of the data files of this <code>DataSource</code>. </p> <note><title>Note</title> <p> This parameter is provided as part of the verbose format. </p> </note></div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataSourceSchema</code> - The schema used by all of the data files of this <code>DataSource</code>.</p> <note><title>Note</title> <p> This parameter is provided as part of the verbose format. </p></dd> <dt><span class="strong">Returns:</span></dt><dd>Returns a reference to this object so that method calls can be chained together.</dd></dl> </li> </ul> <a name="toString()"> </a> <ul class="blockList"> <li class="blockList"> <h4>toString</h4> <pre>public&nbsp;java.lang.String&nbsp;toString()</pre> <div class="block">Returns a string representation of this object; useful for testing and debugging.</div> <dl> <dt><strong>Overrides:</strong></dt> <dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd> <dt><span class="strong">Returns:</span></dt><dd>A string representation of this object.</dd><dt><span class="strong">See Also:</span></dt><dd><code>Object.toString()</code></dd></dl> </li> </ul> <a name="equals(java.lang.Object)"> </a> <ul class="blockList"> <li class="blockList"> <h4>equals</h4> <pre>public&nbsp;boolean&nbsp;equals(java.lang.Object&nbsp;obj)</pre> <dl> <dt><strong>Overrides:</strong></dt> <dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd> </dl> </li> </ul> <a name="hashCode()"> </a> <ul class="blockList"> <li class="blockList"> <h4>hashCode</h4> <pre>public&nbsp;int&nbsp;hashCode()</pre> <dl> <dt><strong>Overrides:</strong></dt> <dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd> </dl> </li> </ul> <a name="clone()"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>clone</h4> <pre>public&nbsp;<a href="../../../../../com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" title="class in com.amazonaws.services.machinelearning.model">GetDataSourceResult</a>&nbsp;clone()</pre> <dl> <dt><strong>Overrides:</strong></dt> <dd><code>clone</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <div class="bottomNav"><a name="navbar_bottom"> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>"> </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="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><em> <div> <!-- Script for Syntax Highlighter START --> <script type="text/javascript"> SyntaxHighlighter.all() </script> <!-- Script for Syntax Highlighter END --> </div> <script src="http://a0.awsstatic.com/chrome/js/1.0.46/jquery.1.9.js" type="text/javascript"></script> <script>jQuery.noConflict();</script> <script> jQuery(function ($) { $("div.header").prepend('<!--<API key>-->'); }); </script> <!-- <API key> --> <script src="http://l0.awsstatic.com/js/urchin.js" type="text/javascript"></script> <script type="text/javascript">urchinTracker();</script> <!-- END-URCHIN-TRACKER --> <! More info available at http: <script language="JavaScript" type="text/javascript" src="https: <script language="JavaScript" type="text/javascript"> <! // Documentation Service Name s.prop66='AWS SDK for Java'; s.eVar66='D=c66'; // Documentation Guide Name s.prop65='API Reference'; s.eVar65='D=c65'; var s_code=s.t();if(s_code)document.write(s_code) </script> <script language="JavaScript" type="text/javascript"> <!--if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-') </script> <noscript> <img src="http://amazonwebservices.d2.sc.omtrdc.net/b/ss/awsamazondev/1/H.25.2--NS/0" height="1" width="1" border="0" alt="" /> </noscript> <!--/DO NOT REMOVE/--> </em></div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../com/amazonaws/services/machinelearning/model/<API key>.html" title="class in com.amazonaws.services.machinelearning.model"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../../com/amazonaws/services/machinelearning/model/<API key>.html" title="class in com.amazonaws.services.machinelearning.model"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?com/amazonaws/services/machinelearning/model/GetDataSourceResult.html" target="_top">Frames</a></li> <li><a href="GetDataSourceResult.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); 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><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> </a></div> <p class="legalCopy"><small> Copyright & </small></p> </body> </html>
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="zh"> <head> <!-- Generated by javadoc (version 1.7.0_07) on Tue Jun 04 15:59:38 CST 2019 --> <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> <title>JwDataCubeAPI</title> <meta name="date" content="2019-06-04"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><! if (location.href.indexOf('is-external=true') == -1) { parent.document.title="JwDataCubeAPI"; } </script> <noscript> <div> JavaScript</div> </noscript> <div class="topNav"><a name="navbar_top"> </a><a href="#skip-navbar_top" title=""></a><a name="navbar_top_firstrow"> </a> <ul class="navList" title=""> <li><a href="../../../../../overview-summary.html"></a></li> <li><a href="package-summary.html"></a></li> <li class="navBarCell1Rev"></li> <li><a href="class-use/JwDataCubeAPI.html"></a></li> <li><a href="package-tree.html"></a></li> <li><a href="../../../../../deprecated-list.html"></a></li> <li><a href="../../../../../index-files/index-1.html"></a></li> <li><a href="../../../../../help-doc.html"></a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li></li> <li></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/jeewx/api/report/datacube/JwDataCubeAPI.html" target="_top"></a></li> <li><a href="JwDataCubeAPI.html" target="_top"></a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html"></a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>:&nbsp;</li> <li>&nbsp;|&nbsp;</li> <li>&nbsp;|&nbsp;</li> <li><a href="#constructor_summary"></a>&nbsp;|&nbsp;</li> <li><a href="#method_summary"></a></li> </ul> <ul class="subNavList"> <li>:&nbsp;</li> <li>&nbsp;|&nbsp;</li> <li><a href="#constructor_detail"></a>&nbsp;|&nbsp;</li> <li><a href="#method_detail"></a></li> </ul> </div> <a name="skip-navbar_top"> </a></div> <div class="header"> <div class="subTitle">org.jeewx.api.report.datacube</div> <h2 title=" JwDataCubeAPI" class="title"> JwDataCubeAPI</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>org.jeewx.api.report.datacube.JwDataCubeAPI</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="strong">JwDataCubeAPI</span> extends java.lang.Object</pre> <div class="block">service</div> <dl><dt><span class="strong">:</span></dt> <dd>luweichao 2015127</dd></dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> </a> <h3></h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary=", "> <caption><span></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col"></th> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../../../org/jeewx/api/report/datacube/JwDataCubeAPI.html#JwDataCubeAPI()">JwDataCubeAPI</a></strong>()</code>&nbsp;</td> </tr> </table> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method_summary"> </a> <h3></h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary=", "> <caption><span></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col"></th> <th class="colLast" scope="col"></th> </tr> <tr class="altColor"> <td class="colFirst"><code>static java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../org/jeewx/api/report/datacube/JwDataCubeAPI.html#<API key>(java.lang.String, java.lang.String, java.lang.String)"><API key></a></strong>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate)</code> <div class="block"></div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../org/jeewx/api/report/datacube/JwDataCubeAPI.html#<API key>(java.lang.String, java.lang.String, java.lang.String)"><API key></a></strong>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate)</code> <div class="block"></div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../org/jeewx/api/report/datacube/JwDataCubeAPI.html#<API key>(java.lang.String, java.lang.String, java.lang.String)"><API key></a></strong>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate)</code> <div class="block"></div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../org/jeewx/api/report/datacube/JwDataCubeAPI.html#<API key>(java.lang.String, java.lang.String, java.lang.String)"><API key></a></strong>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate)</code> <div class="block"></div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../org/jeewx/api/report/datacube/JwDataCubeAPI.html#<API key>(java.lang.String, java.lang.String, java.lang.String)"><API key></a></strong>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate)</code> <div class="block"></div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../org/jeewx/api/report/datacube/JwDataCubeAPI.html#<API key>(java.lang.String, java.lang.String, java.lang.String)"><API key></a></strong>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate)</code> <div class="block"></div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../org/jeewx/api/report/datacube/JwDataCubeAPI.html#<API key>(java.lang.String, java.lang.String, java.lang.String)"><API key></a></strong>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate)</code> <div class="block"></div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><strong><a href="../../../../../org/jeewx/api/report/datacube/JwDataCubeAPI.html#main(java.lang.String[])">main</a></strong>(java.lang.String[]&nbsp;args)</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="<API key>.lang.Object"> </a> <h3>&nbsp;java.lang.Object</h3> <code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> </a> <h3></h3> <a name="JwDataCubeAPI()"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>JwDataCubeAPI</h4> <pre>public&nbsp;JwDataCubeAPI()</pre> </li> </ul> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method_detail"> </a> <h3></h3> <a name="<API key>(java.lang.String, java.lang.String, java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public static&nbsp;java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;&nbsp;<API key>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate) throws <a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></pre> <div class="block"></div> <dl><dt><span class="strong">:</span></dt><dd><code>bDate</code> - </dd><dd><code>eDate</code> - </dd> <dt><span class="strong">:</span></dt><dd></dd> <dt><span class="strong">:</span></dt> <dd><code><a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></code></dd></dl> </li> </ul> <a name="<API key>(java.lang.String, java.lang.String, java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public static&nbsp;java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;&nbsp;<API key>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate) throws <a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></pre> <div class="block"></div> <dl><dt><span class="strong">:</span></dt><dd><code>bDate</code> - </dd><dd><code>eDate</code> - </dd> <dt><span class="strong">:</span></dt><dd></dd> <dt><span class="strong">:</span></dt> <dd><code><a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></code></dd></dl> </li> </ul> <a name="<API key>(java.lang.String, java.lang.String, java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public static&nbsp;java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;&nbsp;<API key>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate) throws <a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></pre> <div class="block"></div> <dl><dt><span class="strong">:</span></dt><dd><code>bDate</code> - </dd><dd><code>eDate</code> - </dd> <dt><span class="strong">:</span></dt><dd></dd> <dt><span class="strong">:</span></dt> <dd><code><a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></code></dd></dl> </li> </ul> <a name="<API key>(java.lang.String, java.lang.String, java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public static&nbsp;java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;&nbsp;<API key>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate) throws <a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></pre> <div class="block"></div> <dl><dt><span class="strong">:</span></dt><dd><code>bDate</code> - </dd><dd><code>eDate</code> - </dd> <dt><span class="strong">:</span></dt><dd></dd> <dt><span class="strong">:</span></dt> <dd><code><a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></code></dd></dl> </li> </ul> <a name="<API key>(java.lang.String, java.lang.String, java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public static&nbsp;java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;&nbsp;<API key>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate) throws <a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></pre> <div class="block"></div> <dl><dt><span class="strong">:</span></dt><dd><code>bDate</code> - </dd><dd><code>eDate</code> - </dd> <dt><span class="strong">:</span></dt><dd></dd> <dt><span class="strong">:</span></dt> <dd><code><a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></code></dd></dl> </li> </ul> <a name="<API key>(java.lang.String, java.lang.String, java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public static&nbsp;java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;&nbsp;<API key>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate) throws <a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></pre> <div class="block"></div> <dl><dt><span class="strong">:</span></dt><dd><code>bDate</code> - </dd><dd><code>eDate</code> - </dd> <dt><span class="strong">:</span></dt><dd></dd> <dt><span class="strong">:</span></dt> <dd><code><a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></code></dd></dl> </li> </ul> <a name="<API key>(java.lang.String, java.lang.String, java.lang.String)"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public static&nbsp;java.util.List&lt;<a href="../../../../../org/jeewx/api/report/datacube/model/<API key>.html" title="org.jeewx.api.report.datacube.model"><API key></a>&gt;&nbsp;<API key>(java.lang.String&nbsp;accesstoken, java.lang.String&nbsp;bDate, java.lang.String&nbsp;eDate) throws <a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></pre> <div class="block"></div> <dl><dt><span class="strong">:</span></dt><dd><code>bDate</code> - </dd><dd><code>eDate</code> - </dd> <dt><span class="strong">:</span></dt><dd></dd> <dt><span class="strong">:</span></dt> <dd><code><a href="../../../../../org/jeewx/api/core/exception/WexinReqException.html" title="org.jeewx.api.core.exception">WexinReqException</a></code></dd></dl> </li> </ul> <a name="main(java.lang.String[])"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>main</h4> <pre>public static&nbsp;void&nbsp;main(java.lang.String[]&nbsp;args)</pre> </li> </ul> </li> </ul> </li> </ul> </div> </div> <div class="bottomNav"><a name="navbar_bottom"> </a><a href="#skip-navbar_bottom" title=""></a><a name="<API key>"> </a> <ul class="navList" title=""> <li><a href="../../../../../overview-summary.html"></a></li> <li><a href="package-summary.html"></a></li> <li class="navBarCell1Rev"></li> <li><a href="class-use/JwDataCubeAPI.html"></a></li> <li><a href="package-tree.html"></a></li> <li><a href="../../../../../deprecated-list.html"></a></li> <li><a href="../../../../../index-files/index-1.html"></a></li> <li><a href="../../../../../help-doc.html"></a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li></li> <li></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/jeewx/api/report/datacube/JwDataCubeAPI.html" target="_top"></a></li> <li><a href="JwDataCubeAPI.html" target="_top"></a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html"></a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>:&nbsp;</li> <li>&nbsp;|&nbsp;</li> <li>&nbsp;|&nbsp;</li> <li><a href="#constructor_summary"></a>&nbsp;|&nbsp;</li> <li><a href="#method_summary"></a></li> </ul> <ul class="subNavList"> <li>:&nbsp;</li> <li>&nbsp;|&nbsp;</li> <li><a href="#constructor_detail"></a>&nbsp;|&nbsp;</li> <li><a href="#method_detail"></a></li> </ul> </div> <a name="skip-navbar_bottom"> </a></div> </body> </html>
package org.hoteia.qalingo.app.business.job.email; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.OutputStreamWriter; import java.io.Writer; import java.sql.Blob; import org.apache.commons.lang.StringUtils; import org.hoteia.qalingo.core.Constants; import org.hoteia.qalingo.core.batch.<API key>; import org.hoteia.qalingo.core.domain.Email; import org.hoteia.qalingo.core.service.EmailService; import org.hoteia.qalingo.core.util.impl.<API key>; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.batch.item.ItemProcessor; import org.springframework.beans.factory.InitializingBean; import org.springframework.mail.javamail.JavaMailSender; import org.springframework.util.Assert; public abstract class <API key><T> implements ItemProcessor<<API key><Long, Email>, Email>, InitializingBean { private final Logger logger = LoggerFactory.getLogger(getClass()); private JavaMailSender mailSender; protected EmailService emailService; public final void afterPropertiesSet() throws Exception { Assert.notNull(mailSender, "You must provide a JavaMailSender."); Assert.notNull(emailService, "You must provide an EmailService."); } public Email process(<API key><Long, Email> wrapper) throws Exception { Email email = wrapper.getItem(); Blob emailcontent = email.getEmailContent(); InputStream is = emailcontent.getBinaryStream(); ObjectInputStream oip = new ObjectInputStream(is); Object object = oip.readObject(); <API key> <API key> = (<API key>) object; oip.close(); is.close(); try { // SANITY CHECK if(email.getStatus().equals(Email.<API key>)){ if (<API key>.<API key>()) { String filePathToSave = <API key>.<API key>(); File file = new File(filePathToSave); // SANITY CHECK : create folders String absoluteFolderPath = file.getParent(); File absolutePathFile = new File(absoluteFolderPath); if(!absolutePathFile.exists()){ absolutePathFile.mkdirs(); } if(!file.exists()){ FileOutputStream fileOutputStream = new FileOutputStream(file); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream, Constants.UTF8); Writer out = new BufferedWriter(outputStreamWriter); if(StringUtils.isNotEmpty(<API key>.getHtmlContent())) { out.write(<API key>.getHtmlContent()); } else { out.write(<API key>.getPlainTextContent()); } try { if (out != null){ out.close(); } } catch (IOException e) { logger.debug("Cannot close the file", e); } } else { logger.debug("File already exists : " + filePathToSave); } } mailSender.send(<API key>); email.setStatus(Email.EMAIl_STATUS_SENDED); } else { logger.warn("Batch try to send email was already sended!"); } } catch (Exception e) { logger.error("Fail to send email! Exception is save in database, id:" + email.getId()); email.setStatus(Email.EMAIl_STATUS_ERROR); emailService.<API key>(email, e); } return email; } public void setMailSender(JavaMailSender mailSender) { this.mailSender = mailSender; } public void setEmailService(EmailService emailService) { this.emailService = emailService; } }
package com.wallace.spark.sparkmllibdemo import java.io._ import com.wallace.common.LogSupport import org.apache.spark.ml.feature.{HashingTF, IDF, IDFModel, Tokenizer} import org.apache.spark.sql.{DataFrame, SparkSession} object MLLibDemo extends App with LogSupport { val warehouseLocation = System.getProperty("user.dir") + "/" + "spark-warehouse" val spark = SparkSession .builder() .master("local[*]") .appName("<API key>") .config("spark.sql.warehouse.dir", warehouseLocation) .enableHiveSupport() .getOrCreate() val sc = spark.sparkContext import spark.implicits._ //TODO DEMO 1 val sentenceData = spark.createDataFrame(Seq( (0, "Hi I heard about Spark"), (0, "I wish Java could use case classes"), (1, "Logistic regression models are neat") )).toDF("label", "sentence") val tokenizer: Tokenizer = new Tokenizer().setInputCol("sentence").setOutputCol("words") val wordsData: DataFrame = tokenizer.transform(sentenceData) val hashingTF: HashingTF = new HashingTF().setInputCol("words").setOutputCol("rawFeatures").setNumFeatures(20) val featurizedDataV1: DataFrame = hashingTF.transform(wordsData) val idfV1: IDF = new IDF().setInputCol("rawFeatures").setOutputCol("features") val idfModelV1: IDFModel = idfV1.fit(featurizedDataV1) val rescaledDataV1: DataFrame = idfModelV1.transform(featurizedDataV1) rescaledDataV1.select("features", "label").take(3).foreach(x => log.info(s"$x")) //TODO DEMO 2 TF-IDF val df = sc.parallelize(Seq( (0, Array("a", "b", "c", "a")), (1, Array("c", "b", "b", "c", "a")), (2, Array("a", "a", "c", "d")), (3, Array("c", "a", "b", "a", "a")), (4, Array("", "", "", "", "", "")), (5, Array("", "", "")), (6, Array("", "", "", "", "")) )).map(x => (x._1, x._2)).toDF("id", "words") df.show(false) val hashModel = new HashingTF() .setInputCol("words") .setOutputCol("rawFeatures") .setNumFeatures(Math.pow(2, 20).toInt) val featurizedData = hashModel.transform(df) featurizedData.show(false) val df3: DataFrame = sc.parallelize(Seq( (0, Array("a", "a", "c", "d")), (1, Array("c", "a", "b", "a", "a")) )).map(x => (x._1, x._2)).toDF("id", "words") hashModel.transform(df3).show(false) val idf = new IDF().setInputCol("rawFeatures").setOutputCol("features") val idfModel = idf.fit(featurizedData) val rescaledData: DataFrame = idfModel.transform(featurizedData) rescaledData.select("words", "features").show(false) try { val fileOut: FileOutputStream = new FileOutputStream("idf.jserialized") val out: ObjectOutputStream = new ObjectOutputStream(fileOut) out.writeObject(idfModel) out.close() fileOut.close() System.out.println("\nSerialization Successful... Checkout your specified output file..\n") } catch { case foe: <API key> => foe.printStackTrace() case ioe: IOException => ioe.printStackTrace() } val fos = new FileOutputStream("model.obj") val oos = new ObjectOutputStream(fos) oos.writeObject(idfModel) oos.close() val fis = new FileInputStream("model.obj") val ois = new ObjectInputStream(fis) val newModel = ois.readObject().asInstanceOf[IDFModel] val df2 = sc.parallelize(Seq( (0, Array("a", "b", "c", "a")), (1, Array("c", "b", "b", "c", "a")), (2, Array("", "", "", "", "", "")), (3, Array("", "", "")), (4, Array("", "", "", "", "")) )).map(x => (x._1, x._2)).toDF("id", "words") val hashModel2 = new HashingTF() .setInputCol("words") .setOutputCol("rawFeatures") .setNumFeatures(Math.pow(2, 20).toInt) val featurizedData2 = hashModel2.transform(df2) val rescaledData2 = newModel.transform(featurizedData2) rescaledData2.select("words", "features").show(false) spark.stop() }
<div class="container-fluid hdb_footer text-center bggrey"> {$Think.config.WEB_COPYRIGHT} </div> <!-- jQuerybootstrap.min.js --> <script src="__PUBLIC__/common/lib/jquery/jquery.min.js"></script> <!-- Bootstrap JavaScript --> <script src="__PUBLIC__/common/lib/bootstrap/bootstrap/js/bootstrap.min.js"></script>
namespace XF.Common { using System; using System.Collections.Generic; using System.ServiceModel; [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)] public class EventService : IEventService { public static string URI = "net.pipe://localhost/pipe/foobar"; public Action<EventTypeOption, List<TypedItem>> HandleEvent { get; set; } void IEventService.Write(EventTypeOption option, List<TypedItem> items) { if (HandleEvent != null) { HandleEvent(option, items); } } } }
/* $NetBSD: errarg.h,v 1.1.1.3 2006/02/06 18:13:50 wiz Exp $ */ class errarg { enum { EMPTY, STRING, CHAR, INTEGER, UNSIGNED_INTEGER, DOUBLE } type; union { const char *s; int n; unsigned int u; char c; double d; }; public: errarg(); errarg(const char *); errarg(char); errarg(unsigned char); errarg(int); errarg(unsigned int); errarg(double); int empty() const; void print() const; }; extern errarg empty_errarg; extern void errprint(const char *, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg);
#datepicker { font-size: 10pt; color: white; background: transparent; border: none; width: 70px; margin-right: 5px; margin-left: 5px; opacity: .75 } .slider { width: 150px; margin-left: 15px; } #layerPopupFront { position: fixed; top: 96px; left: 8px; width: 350px; height: 400px; z-index: 5; padding: 10px; color: black; font-size: 8pt; } #layerPopupBack { position: fixed; top: 96px; left: 8px; width: 350px; z-index: 4; background-color: black; opacity: 0.80; } #layerPopupFront h1 { border-bottom: 1px solid white; font-size: 12pt; font-weight: bold; color: white; width: 90%; margin-bottom: 10px; } #layerPopupFront table { margin-bottom: 20px; }
<!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"> <meta name="description" content=""> <meta name="author" content=""> <title>Kapsel Fingerprint Unlock</title> <!-- Bootstrap Core CSS --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- Custom CSS --> <link href="css/index.css" rel="stylesheet"> <!--jQuery <script src="js/jquery.js"></script> <!-- Custom Fonts --> <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="font-mfizz/font-mfizz.css"> <link href='https://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'> <!--logo--> <link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'> </head> <body id="page-top" class="index"> <div class="portfolio-modal " id="portfolioModal1"> <div class="modal-content"> <div class="container"> <div class="row"> <div class="col-lg-10 col-lg-offset-1"> <div class="modal-body"> <!-- Project Details Go Here --> <h2>Kapsel Fingerprint Unlock</h2> <img class="img-responsive" src="img/Under_Construction.png" alt="" border=0 width="25%"> <!-- <p class="item-intro text-muted">.</p> <ul class="list-inline"> <li>Date: July 2013</li> <li>Client: Red Carpet Real World Realty</li> <li>Category: Java Software Development</li> <li>Tools: Java, Eclipse IDE, Swing Library, Selenium, Chrome Driver, Launch4j</li> </ul> <p>I independently developed Java software for a client that automatically fills property information into the HTML form of an advertising website.</p> <div class="row"> <div class="col-lg-8"> <img class="img-responsive" src="img/portfolio/transpost/data.jpg" alt="" border=1> </div> <div class="col-lg-4"> </p>The software extracts data from a .htm file such as this.</p> </div> </div> <div class="row"> <div class="col-lg-4"> <p>The user can open the file, specifying whether or not they want it to also list the properties they'd already posted.</p> </div> <div class="col-lg-8"> <img class="img-responsive" src="img/portfolio/transpost/start.jpg" alt="" border=1> </div> </div> <div class="row"> <div class="col-lg-8"> <img class="img-responsive" src="img/portfolio/transpost/table.jpg" alt="" border=1> </div> <div class="col-lg-4"> <p>To post a property, the user can click the button beside it.</p> </div> </div> <div class="row"> <div class="col-lg-4"> <p>The web page of the advertising website opens with a chrome driver, automatically logging the user in. The forms are automatically filled in. The user just has to fill in the Capcha and click submit.</p> </div> <div class="col-lg-8"> <img class="img-responsive" src="img/portfolio/transpost/chrome.jpg" alt="" border=1> </div> </div> </div> </div> </div> </div> </div> </div> <!-- Bootstrap Core JavaScript --> <script src="js/bootstrap.min.js"></script> <!-- Plugin JavaScript --> <script src="js/jquery.easing.min.js"></script> <script src="js/classie.js"></script> <script src="js/cbpAnimatedHeader.js"></script> <!-- Custom Theme JavaScript --> <script src="js/index.js"></script> </body> </html>
package dynaml import ( "fmt" ) type ModuloExpr struct { A Expression B Expression } func (e ModuloExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool) { resolved := true aint, info, ok := <API key>(&e.A, &resolved, nil, binding, false) if !ok { return nil, info, false } bint, info, ok := <API key>(&e.B, &resolved, &info, binding, false) if !ok { return nil, info, false } if !resolved { return e, info, true } if bint == 0 { return info.Error("division by zero") } return aint % bint, info, true } func (e ModuloExpr) String() string { return fmt.Sprintf("%s %% %s", e.A, e.B) }
package com.polymathiccoder.avempace.persistence.domain.value; import java.nio.ByteBuffer; import java.util.Collection; import java.util.HashSet; import java.util.Set; import org.apache.commons.lang3.ClassUtils; import org.pojomatic.Pojomatic; import org.pojomatic.annotations.AutoProperty; @AutoProperty public class BinarySetValue extends SetValue<BinaryValue, ByteBuffer, ByteBuffer> { // Life cycle public BinarySetValue(Set<ByteBuffer> <API key>) { super(<API key>, ByteBuffer.class, BinaryValue.class); } // Static behavior public static PersistentValue <API key>(final com.amazonaws.services.dynamodbv2.model.AttributeValue <API key>) { return BinarySetValue.<API key>(new HashSet<>(<API key>.getBS())); } private static BinarySetValue <API key>(final Set<ByteBuffer> <API key>) { Set<ByteBuffer> intrinsicValues = new HashSet<>(); for (final ByteBuffer <API key> : <API key>) { intrinsicValues.add(BinaryValue.<API key>(<API key>)); } return new BinarySetValue(intrinsicValues); } @SuppressWarnings("unchecked") public static PersistentValue <API key>(final Object entityPropertyValue) { if (ClassUtils.isAssignable(entityPropertyValue.getClass(), Collection.class)) { return new BinarySetValue(new HashSet<ByteBuffer>((Collection<ByteBuffer>) entityPropertyValue)); } else { throw new <API key>(); } } // Behavior @Override public com.amazonaws.services.dynamodbv2.model.AttributeValue <API key>() { return new com.amazonaws.services.dynamodbv2.model.AttributeValue().withBS(<API key>()); } // Common methods @Override public boolean equals(final Object other) { return Pojomatic.equals(this, other); } @Override public int hashCode() { return Pojomatic.hashCode(this); } @Override public String toString() { return Pojomatic.toString(this); } }
package com.battlelancer.seriesguide.modules; import com.battlelancer.seriesguide.loaders.MovieCreditsLoader; import com.battlelancer.seriesguide.loaders.MovieTrailersLoader; import com.battlelancer.seriesguide.loaders.PersonLoader; import com.battlelancer.seriesguide.loaders.ShowCreditsLoader; import com.battlelancer.seriesguide.loaders.TmdbMoviesLoader; import com.battlelancer.seriesguide.loaders.TraktAddLoader; import com.battlelancer.seriesguide.loaders.TraktCommentsLoader; import com.battlelancer.seriesguide.loaders.<API key>; import com.battlelancer.seriesguide.loaders.<API key>; import com.battlelancer.seriesguide.loaders.<API key>; import com.battlelancer.seriesguide.loaders.<API key>; import com.battlelancer.seriesguide.loaders.TvdbAddLoader; import com.battlelancer.seriesguide.sync.SgSyncAdapter; import com.battlelancer.seriesguide.thetvdbapi.<API key>; import com.battlelancer.seriesguide.thetvdbapi.TvdbTools; import com.battlelancer.seriesguide.traktapi.SgTraktInterceptor; import com.battlelancer.seriesguide.traktapi.TraktAuthActivity; import com.battlelancer.seriesguide.ui.dialogs.<API key>; import com.battlelancer.seriesguide.util.AddShowTask; import com.battlelancer.seriesguide.util.<API key>; import com.battlelancer.seriesguide.util.ConnectTraktTask; import com.battlelancer.seriesguide.util.EpisodeTools; import com.battlelancer.seriesguide.util.MovieTools; import com.battlelancer.seriesguide.util.TraktRatingsTask; import com.battlelancer.seriesguide.util.TraktTask; import com.battlelancer.seriesguide.util.TraktTools; import com.battlelancer.seriesguide.util.tasks.BaseMovieActionTask; import com.battlelancer.seriesguide.util.tasks.BaseRateItemTask; import com.battlelancer.seriesguide.util.tasks.BaseShowActionTask; import dagger.Component; import javax.inject.Singleton; @Singleton @Component(modules = { AppModule.class, HttpClientModule.class, TmdbModule.class, TraktModule.class, TvdbModule.class }) public interface ServicesComponent { void inject(AddShowTask addShowTask); void inject(<API key> <API key>); void inject(BaseMovieActionTask baseMovieActionTask); void inject(BaseRateItemTask baseRateItemTask); void inject(BaseShowActionTask baseShowActionTask); void inject(ConnectTraktTask connectTraktTask); void inject(EpisodeTools.EpisodeFlagTask episodeFlagTask); void inject(MovieCreditsLoader movieCreditsLoader); void inject(MovieTrailersLoader movieTrailersLoader); void inject(MovieTools movieTools); void inject(PersonLoader personLoader); void inject(SgSyncAdapter sgSyncAdapter); void inject(<API key> <API key>); void inject(SgTraktInterceptor sgTraktInterceptor); void inject(ShowCreditsLoader showCreditsLoader); void inject(TmdbMoviesLoader tmdbMoviesLoader); void inject(TraktAddLoader traktAddLoader); void inject(TraktAuthActivity traktAuthActivity); void inject(<API key> <API key>); void inject(TraktCommentsLoader traktCommentsLoader); void inject(<API key> <API key>); void inject(<API key> <API key>); void inject(<API key> <API key>); void inject(TraktRatingsTask traktRatingsTask); void inject(<API key> <API key>); void inject(TraktTask traktTask); void inject(TraktTools traktTools); void inject(TvdbAddLoader tvdbAddLoader); void inject(TvdbTools tvdbTools); }
FROM joynr-cpp-base:latest # install boost WORKDIR /opt # Use the same boost version which is provided by the fedora-24 repository RUN curl -L http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.gz > boost.tar.gz \ && mkdir -p /opt/boost \ && tar -zxf boost.tar.gz -C /opt/boost --strip-components=1 \ && rm boost.tar.gz \ && cd /opt/boost \ && ./bootstrap.sh --with-toolset=clang --prefix=/usr/local \ && ./b2 variant=release -s NO_BZIP2=1 --without-wave --without-python --without-mpi --<API key> -j"$(nproc)" install \ && rm -rf /opt/boost # install rapidjson RUN cd /opt \ && git clone https://github.com/miloyip/rapidjson.git rapidjson \ && cd rapidjson \ && git checkout v1.1.0 \ && mkdir build \ && cd build \ && cmake -<API key>=OFF \ -<API key>=OFF \ -<API key>=OFF \ -<API key>=OFF .. \ && make install -j"$(nproc)" \ && cd /opt \ && rm -rf rapidjson # install muesli RUN cd /opt \ && git clone https://github.com/bmwcarit/muesli.git \ && cd muesli \ && git checkout 0.3.1 \ && mkdir build \ && cd build \ && cmake -DBUILD_MUESLI_TESTS=Off -<API key>=On .. \ && make install -j"$(nproc)" \ && cd /opt \ && rm -rf muesli # install googletest & googlemock RUN cd /opt \ && git clone https://github.com/google/googletest.git \ && cd googletest \ && git checkout ddb8012e \ && mkdir build \ && cd build \ && cmake -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ .. \ && make install -j"$(nproc)" \ && cd /opt/ \ && rm -rf googletest # install smrf RUN export SMRF_VERSION=0.2.1 \ && cd /opt \ && git clone https://github.com/bmwcarit/smrf.git \ && cd smrf \ && git checkout $SMRF_VERSION \ && mkdir build \ && cd build \ && cmake -DBUILD_TESTS=Off .. \ && make install -j"$(nproc)" \ && cd /opt \ && rm -rf smrf
#!/bin/sh echo `date` echo ' stock_china_front.sh start' /usr/bin/php /home/data/wwwroot/test/scripts/job.php -bdc -tworkflow -<API key> -<API key> >/dev/null 2>&1 /usr/bin/php /home/data/wwwroot/test/scripts/job.php -bdc -tworkflow -<API key> -<API key> >/dev/null 2>&1 /usr/bin/php /home/data/wwwroot/test/scripts/job.php -bdc -tworkflow -<API key> -asave_finance_news >/dev/null 2>&1 echo `date` echo ' stock_china_front.sh completed'
<?php namespace emilkm\tests\efxphp\Amf; use emilkm\tests\util\SendToJamfTrait; use emilkm\tests\util\InvokeMethodTrait; use emilkm\efxphp\Amf\Constants; use emilkm\efxphp\Amf\OutputExt; use emilkm\efxphp\Amf\Types\Date; use emilkm\efxphp\Amf\Types\ByteArray; use emilkm\efxphp\Amf\Types\Vector; use emilkm\efxphp\Amf\Types\Xml; use emilkm\efxphp\Amf\Types\XmlDocument; use stdClass; use DateTime; use DateTimeZone; /** * @author Emil Malinov * @package efxphp * @subpackage tests */ class OutputExtTest extends \<API key> { use SendToJamfTrait; use InvokeMethodTrait; protected $out; protected function setUp() { $this->out = new OutputExt(); } public function testwriteAmf0Number() { $this->out->setAvmPlus(false); $obj = new stdClass(); $obj->value = 31.57; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/number.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/number.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = new stdClass(); $obj->value = true; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/boolean.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/boolean.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = new stdClass(); $obj->value = new Date(1422995025123); //2015-02-04 09:23:45.123 $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/date.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/date.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = new stdClass(); $datestr = date('Y-m-d H:i:s.', 1422995025) . 123; //2015-02-04 09:23:45.123 $obj->value = new DateTime($datestr); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/date.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/date.amf0')); $this->assertEquals($data, $this->out->data); } public function testwriteAmf0String() { $this->out->setAvmPlus(false); $obj = new stdClass(); $obj->value = 'abc'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/string.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/string.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = new stdClass(); $obj->value = ''; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/string-blank.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/string-blank.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = new stdClass(); $obj->value = 'витоша'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/string-unicode.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/string-unicode.amf0')); $this->assertEquals($data, $this->out->data); } public function testwriteAmf0Null() { $this->out->setAvmPlus(false); $obj = new stdClass(); $obj->value = null; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/null.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/null.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = array(); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/array-empty.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/array-empty.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = array(); $obj[0] = 'a'; $obj[1] = 'b'; $obj[2] = 'c'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/array-dense.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/array-dense.amf0')); $this->assertEquals($data, $this->out->data); } /** * Undefined entries in the sparse regions between indices are serialized as undefined. * Undefined entries in the sparse regions between indices are skipped when deserialized. */ public function <API key>() { $this->out->setAvmPlus(false); $obj = array(); $obj[0] = 'a'; $obj[2] = 'b'; $obj[4] = 'c'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/array-sparse.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/array-sparse.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = array(); $obj['a'] = 1; $obj['b'] = 2; $obj['c'] = 3; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/array-string.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/array-string.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = array(); $obj[0] = 'a'; $obj['b'] = 2; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/array-mixed.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/array-mixed.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = array(); $obj[-1] = 'a'; $obj[0] = 'b'; $obj[1] = 'c'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/array-negative.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/array-negative.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = array(); $obj['items'] = array(); $obj['items'][0] = 'a'; $obj['items'][1] = 'b'; $obj['items'][2] = 'c'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/array-nested.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/array-nested.amf0')); $this->assertEquals($data, $this->out->data); } /** * The pure anonymous case. */ public function <API key>() { $this->out->setAvmPlus(false); $obj = new stdClass(); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/object-anonymous.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/object-anonymous.amf0')); $this->assertEquals($data, $this->out->data); } /** * Anonymous object with blank _explicitType field, do not write the _explicitType field. */ public function <API key>() { $this->out->setAvmPlus(false); $obj = new stdClass(); $remoteClassField = Constants::REMOTE_CLASS_FIELD; $obj->$remoteClassField = ''; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/object-anonymous.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/object-anonymous.amf0')); $this->assertEquals($data, $this->out->data); } /** * Typed object with blank _explicitType field, do not write the _explicitType field. * There is a conflict between the object type and the _explicitType. Since _explicitType takes precedence, * output an anonymous object. */ public function <API key>() { $this->out->setAvmPlus(false); $obj = new \emilkm\tests\asset\value\VoExplicitTypeBlank(); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/object-anonymous.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/object-anonymous.amf0')); $this->assertEquals($data, $this->out->data); } /** * When the type cannot be resolved, simply write stdClass and set the _explicitType field. * Do not write an anonymous object, because the remote client may be able to resolve it. */ public function <API key>() { $this->out->setAvmPlus(false); $obj = new stdClass(); $remoteClassField = Constants::REMOTE_CLASS_FIELD; $obj->$remoteClassField = 'SomeClass'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = new \emilkm\tests\asset\value\<API key>(); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf0')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(false); $obj = new \emilkm\tests\asset\value\<API key>(); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf0')); $this->assertEquals($data, $this->out->data); } /*public function <API key>() { $this->out->setAvmPlus(false); $obj = new stdClass(); $obj->value = new Xml('<x><string>abc</string><number>123</number></x>'); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/xml.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/xml.amf0')); $this->assertEquals($data, $this->out->data); }*/ /*public function <API key>() { $this->out->setAvmPlus(false); $obj = new stdClass(); $obj->value = <API key>('<x><string>abc</string><number>123</number></x>'); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/xmlelement.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/xmlelement.amf0')); $this->assertEquals($data, $this->out->data); }*/ /*public function <API key>() { $this->out->setAvmPlus(false); $obj = new stdClass(); $obj->value = <API key>(<API key>('<x><string>abc</string><number>123</number></x>')); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/domelement.amf0', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/domelement.amf0')); $this->assertEquals($data, $this->out->data); }*/ // // AMF3 // /** * TODO: */ public function <API key>() { } public function testwriteAmf3Null() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = null; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/null.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/null.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = true; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/boolean-true.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/boolean-true.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = false; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/boolean-false.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/boolean-false.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = 123; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/integer.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/integer.amf3')); $this->assertEquals($data, $this->out->data); } public function testwriteAmf3Double() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = 31.57; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/double.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/double.amf3')); $this->assertEquals($data, $this->out->data); } public function testwriteAmf3String() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = 'abc'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/string.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/string.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = ''; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/string-blank.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/string-blank.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = 'витоша'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/string-unicode.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/string-unicode.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = new Date(1422995025123); //2015-02-04 09:23:45.123 $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/date.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/date.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $datestr = date('Y-m-d H:i:s.', 1422995025) . 123; //2015-02-04 09:23:45.123 $obj->value = new DateTime($datestr); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/date.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/date.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $adate = new Date(1422995025123); //2015-02-04 09:23:45.123 $obj->value1 = $adate; $obj->value2 = $adate; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/date-and-reference.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/date-and-reference.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $datestr = date('Y-m-d H:i:s.', 1422995025) . 123; //2015-02-04 09:23:45.123 $adate = new DateTime($datestr); $obj->value1 = $adate; $obj->value2 = $adate; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/date-and-reference.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/date-and-reference.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = array(); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/array-empty.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/array-empty.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = array(); $obj[0] = 'a'; $obj[1] = 'b'; $obj[2] = 'c'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/array-dense.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/array-dense.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $this->out-><API key>(true); $obj = array(); $obj[0] = 'a'; $obj[2] = 'b'; $obj[4] = 'c'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $this->out-><API key>(false); $obj = array(); $obj[0] = 'a'; $obj[2] = 'b'; $obj[4] = 'c'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $this->out-><API key>(true); $obj = array(); $obj['a'] = 1; $obj['b'] = 2; $obj['c'] = 3; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $this->out-><API key>(false); $obj = array(); $obj['a'] = 1; $obj['b'] = 2; $obj['c'] = 3; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $this->out-><API key>(true); $obj = array(); $obj[0] = 'a'; $obj['b'] = 2; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $this->out-><API key>(false); $obj = array(); $obj[0] = 'a'; $obj['b'] = 2; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $this->out-><API key>(true); $obj = array(); $obj[-1] = 'a'; $obj[0] = 'b'; $obj[1] = 'c'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $this->out-><API key>(false); $obj = array(); $obj[-1] = 'a'; $obj[0] = 'b'; $obj[1] = 'c'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $this->out-><API key>(true); $obj = array(); $obj['items'] = array(); $obj['items'][0] = 'a'; $obj['items'][1] = 'b'; $obj['items'][2] = 'c'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $this->out-><API key>(false); $obj = array(); $obj['items'] = array(); $obj['items'][0] = 'a'; $obj['items'][1] = 'b'; $obj['items'][2] = 'c'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } /** * The pure anonymous case. */ public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/object-anonymous.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/object-anonymous.amf3')); $this->assertEquals($data, $this->out->data); } /** * Anonymous object with blank _explicitType field, do not write the _explicitType field. */ public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $remoteClassField = Constants::REMOTE_CLASS_FIELD; $obj->$remoteClassField = ''; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/object-anonymous.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/object-anonymous.amf3')); $this->assertEquals($data, $this->out->data); } /** * Typed object with blank _explicitType field, do not write the _explicitType field. * There is a conflict between the object type and the _explicitType. Since _explicitType takes precedence, * output an anonymous object. */ public function <API key>() { $this->out->setAvmPlus(true); $obj = new \emilkm\tests\asset\value\VoExplicitTypeBlank(); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/object-anonymous.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/object-anonymous.amf3')); $this->assertEquals($data, $this->out->data); } /** * When the type cannot be resolved, simply write stdClass and set the _explicitType field. * Do not write an anonymous object, because the remote client may be able to resolve it. */ public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $remoteClassField = Constants::REMOTE_CLASS_FIELD; $obj->$remoteClassField = 'SomeClass'; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } /** * Type comes from the namespace. Do not write _explicitType, it is not needed. */ public function <API key>() { $this->out->setAvmPlus(true); $obj = new \emilkm\tests\asset\value\<API key>(); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new \emilkm\tests\asset\value\<API key>(); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $remoteClassField = Constants::REMOTE_CLASS_FIELD; $v1 = new stdClass(); $v1->$remoteClassField = 'LightClass'; $v1->id = 1; $v1->name = 'a'; $v2 = new stdClass(); $v2->$remoteClassField = 'LightClass'; $v2->id = 2; $v2->name = 'b'; $obj = new stdClass(); $obj->value = array($v1, $v2); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $remoteClassField = Constants::REMOTE_CLASS_FIELD; $v1 = new stdClass(); $v1->$remoteClassField = 'LightClass'; $v1->id = 1; $v1->name = 'a'; $v2 = new stdClass(); $v2->$remoteClassField = 'LightClass'; $v2->id = 2; //$v2->name = 'b'; //v2 is missing one of its properties $obj = new stdClass(); $obj->value = array($v1, $v2); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = new ByteArray('1a2b3c'); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/bytearray.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/bytearray.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $bytearr = new ByteArray('1a2b3c'); $obj->value1 = $bytearr; $obj->value2 = $bytearr; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } /*public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = new Xml('<x><string>abc</string><number>123</number></x>'); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/xml.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/xml.amf3')); $this->assertEquals($data, $this->out->data); }*/ /*public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = <API key>('<x><string>abc</string><number>123</number></x>'); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/xmlelement.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/xmlelement.amf3')); $this->assertEquals($data, $this->out->data); }*/ /*public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $xmlobj = new Xml('<x><string>abc</string><number>123</number></x>'); $obj->value1 = $xmlobj; $obj->value2 = $xmlobj; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/xml-and-reference.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/xml-and-reference.amf3')); $this->assertEquals($data, $this->out->data); }*/ /*public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $xmlobj = <API key>('<x><string>abc</string><number>123</number></x>'); $obj->value1 = $xmlobj; $obj->value2 = $xmlobj; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); }*/ /*public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = new XmlDocument('<x><string>abc</string><number>123</number></x>'); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/xmldocument.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/xmldocument.amf3')); $this->assertEquals($data, $this->out->data); }*/ /*public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $obj->value = <API key>(<API key>('<x><string>abc</string><number>123</number></x>')); $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/domelement.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/domelement.amf3')); $this->assertEquals($data, $this->out->data); }*/ /*public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $xmlobj = new XmlDocument('<x><string>abc</string><number>123</number></x>'); $obj->value1 = $xmlobj; $obj->value2 = $xmlobj; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); }*/ /*public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $xmlobj = <API key>(<API key>('<x><string>abc</string><number>123</number></x>')); $obj->value1 = $xmlobj; $obj->value2 = $xmlobj; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); }*/ public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $vector = new Vector(Constants::AMF3_VECTOR_INT, array(1, 2, 3)); $obj->value = $vector; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/vector-int.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/vector-int.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $vector = new Vector(Constants::AMF3_VECTOR_INT, array(-3, -2, -1)); $obj->value = $vector; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/vector-int-negative.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/vector-int-negative.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $vector = new Vector(Constants::AMF3_VECTOR_UINT, array(2147483647, 2147483648, 4294967295)); $obj->value = $vector; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/vector-uint.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/vector-uint.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $vector = new Vector(Constants::AMF3_VECTOR_DOUBLE, array(-31.57, 0, 31.57)); $obj->value = $vector; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/vector-double.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/vector-double.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $v1 = new stdClass(); $v1->value = 1; $v2 = new stdClass(); $v2->value = 2; $v3 = new stdClass(); $v3->value = 3; $obj = new stdClass(); $vector = new Vector(Constants::AMF3_VECTOR_OBJECT, array($v1, $v2, $v3)); $obj->value = $vector; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/vector-object.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/vector-object.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $v1 = new stdClass(); $v1->value = 1; $v2 = new stdClass(); $v2->value = 2; $v3 = new stdClass(); $v3->value = 3; $obj = new stdClass(); $vector = new Vector(Constants::AMF3_VECTOR_OBJECT, array($v1, $v2, $v3)); $obj->value1 = $vector; $obj->value2 = $vector; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } public function <API key>() { $this->out->setAvmPlus(true); $obj = new stdClass(); $arr = array(); $a = new stdClass(); $a->name = 'a'; $a->parent = null; $a->children = array(); $arr[] = $a; $a1 = new stdClass(); $a1->name = 'a1'; $a1->parent = $a; $a1->children = null; $a->children[] = $a1; $b = new stdClass(); $b->name = 'b'; $b->parent = null; $b->children = array(); $arr[] = $b; $b1 = new stdClass(); $b1->name = 'b1'; $b1->parent = $b; $b1->children = array(); $b->children[] = $b1; $bb1 = new stdClass(); $bb1->name = 'bb1'; $bb1->parent = $b1; $bb1->children = array(); $b1->children[] = $bb1; $obj->value = $arr; $this->out->writeObject($obj); //$this->sendToJamf($this->out->data); //file_put_contents(__DIR__ . '/../asset/value/<API key>.amf3', serialize($this->out->data)); $data = unserialize(file_get_contents(__DIR__ . '/../../asset/value/<API key>.amf3')); $this->assertEquals($data, $this->out->data); } }
<!DOCTYPE html> <html lang="en"> <head> <!-- Custom CSS --> <link rel="stylesheet" href="../css/missing.css" type="text/css"> <link rel="stylesheet" href="../css/bootstrap.min.css" type="text/css"> <style> img#blackwhite { -webkit-filter: grayscale(100%); /* Chrome, Safari, Opera */ filter: grayscale(100%); } </style> <title>Computer Science Individual Project Experiment</title> </head> <body> <h2><center>Please click on the image that was in the original set of images<center><h2> <div class="left1"> <img id="blackwhite" src="../img/third/images/desert.jpg" style="width:175px;height:175px;" onclick="correct()"> </div> <div class="left2"> <img src="../img/third/wrong1/card.jpg" style="width:175px;height:175px;" onclick="wrong()"> </div> <div class="left3"> <img id="blackwhite" src="../img/third/wrong1/hut.jpg" style="width:175px;height:175px;" onclick="wrong()"> </div> <div class="middle1"> <img src="../img/third/wrong1/wire.jpg" style="width:175px;height:175px;" onclick="wrong()"> </div> <div class="middle2"> <img src="../img/third/wrong1/disco.jpg" style="width:175px;height:175px;" onclick="wrong()"> </div> <div class="middle3"> <img id="blackwhite" src="../img/third/wrong1/spice.jpg" style="width:175px;height:175px;" onclick="wrong()"> </div> <div class="right1"> <img src="../img/third/wrong1/sock.jpg" style="width:175px;height:175px;" onclick="wrong()"> </div> <div class="right2"> <img id="blackwhite" src="../img/third/wrong1/phone.jpg" style="width:175px;height:175px;" onclick="wrong()"> </div> <div class="right3"> <img id="blackwhite" src="../img/third/wrong1/old.jpg" style="width:175px;height:175px;" onclick="wrong()"> </div> <script> function correct() { var number_correct = 0; number_correct = number_correct + 1; localStorage.setItem("correct3",number_correct); window.location.href = 'missingfifty2.html'; } </script> <script> function wrong() { var number_wrong = 0; number_wrong = number_wrong + 1; localStorage.setItem("wrong3",number_wrong); window.location.href = 'missingfifty2.html'; } </script> <script> var trial_type = "Fifty/fifty"; localStorage.setItem("trial3",trial_type); </script> </body>
from ruamel import yaml import logging import sys from pandaserver.workflow.workflow_utils import get_node_id_map, dump_nodes, <API key>, \ <API key> from pandaserver.workflow.pcwl_utils import parse_workflow_file, resolve_nodes logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', level=logging.DEBUG) with open(sys.argv[2]) as f: data = yaml.safe_load(f) nodes, root_in = parse_workflow_file(sys.argv[1], logging) s_id, t_nodes, nodes = resolve_nodes(nodes, root_in, data, 0, set(), sys.argv[3], logging) <API key>(nodes) id_map = get_node_id_map(nodes) # task template template = {"buildSpec": {"jobParameters": "-i ${IN} -o ${OUT} --sourceURL ${SURL} " "-r ./ --useAthenaPackages --useCMake --cmtConfig <API key> ", "archiveName": "sources.<API key>.tar.gz", "prodSourceLabel": "panda"}, "sourceURL": "https://aipanda047.cern.ch:25443", "cliParams": "prun --exec ls --useAthenaPackages --outDS user.tmaeno.<API key>", "site": None, "vo": "atlas", "respectSplitRule": True, "osInfo": "Linux-3.10.0-1160.36.2.el7.<API key>.9.2009-Core", "log": {"type": "template", "param_type": "log", "container": "user.tmaeno.<API key>.log/", "value": "user.tmaeno.<API key>.log.$JEDITASKID.${SN}.log.tgz", "dataset": "user.tmaeno.<API key>.log/"}, "transUses": "Atlas-21.0.6", "excludedSite": [], "nMaxFilesPerJob": 200, "uniqueTaskName": True, "taskName": "user.tmaeno.<API key>/", "transHome": "AnalysisTransforms", "includedSite": None, "jobParameters": [{"type": "constant", "value": "-j \"\" --sourceURL ${SURL}"}, {"type": "constant", "value": "-r ./"}, {"padding": False, "type": "constant", "value": "-p \""}, {"padding": False, "type": "constant", "value": "ls"}, {"type": "constant", "value": "\""}, {"type": "constant", "value": "-l ${LIB}"}, {"type": "constant", "value": "--useAthenaPackages " "--useCMake --cmtConfig <API key> "}], "prodSourceLabel": "user", "processingType": "panda-client-1.4.81-jedi-run", "architecture": "<API key>@centos7"} c_template = {"sourceURL": "https://aipanda048.cern.ch:25443", "cliParams": "prun --cwl test.cwl --yaml a.yaml " "--relayHost aipanda059.cern.ch --outDS " "user.tmaeno.<API key>", "site": None, "vo": "atlas", "respectSplitRule": True, "osInfo": "Linux-3.10.0-1160.36.2.el7.<API key>.9.2009-Core", "log": {"type": "template", "param_type": "log", "container": "user.tmaeno.<API key>.log/", "value": "user.tmaeno.<API key>.log.$JEDITASKID.${SN}.log.tgz", "dataset": "user.tmaeno.<API key>.log/"}, "transUses": "", "excludedSite": [], "nMaxFilesPerJob": 200, "uniqueTaskName": True, "taskName": "user.tmaeno.<API key>/", "transHome": None, "includedSite": None, "container_name": "__dummy_container__", "multiStepExec": {"preprocess": {"args": "--preprocess ${TRF_ARGS}", "command": "${TRF}"}, "containerOptions": {"containerImage": "__dummy_container__", "containerExec": "echo \"=== cat exec script ===\"; " "cat __run_main_exec.sh; echo; " "echo \"=== exec script ===\"; " "/bin/sh __run_main_exec.sh"}, "postprocess": {"args": "--postprocess ${TRF_ARGS}", "command": "${TRF}"}}, "jobParameters": [{"type": "constant", "value": "-j \"\" --sourceURL ${SURL}"}, {"type": "constant", "value": "-r ."}, {"padding": False, "type": "constant", "value": "-p \""}, {"padding": False, "type": "constant", "value": "__dummy_exec_str__"}, {"type": "constant", "value": "\""}, {"type": "constant", "value": "-a jobO.<API key>.tar.gz"}], "prodSourceLabel": "user", "processingType": "panda-client-1.4.81-jedi-run", "architecture": "" } task_template = {'athena': template, 'container': c_template} [node.resolve_params(task_template, id_map) for node in nodes] print(dump_nodes(nodes)) workflow, dump_str_list = <API key>(nodes) print(''.join(dump_str_list)) for node in nodes: s, o = node.verify() if not s: print('Verification error in ID:{} {}'.format(node.id, o))
layout: post title: "JQuery" date: 2017-11-17 author: 'arron' header-img: "img/post-bg-js-version.jpg" tags: - note > *EasyUI* *setTimeout* ** - step1 js var TimeFn = null; - step2 > js onClickRow: function (index, row) { clearTimeout(TimeFn); TimeFn = setTimeout(function () { //....Other Operation }, 300); } > js onDblClickRow: function (index, row) { clearTimeout(TimeFn); //....Other Operation } >
package com.twu.biblioteca; public class UserDetails implements MenuItem{ protected static final String OPTION_NAME = "My Details"; private UserAccountManager userAccountManager; public UserDetails(UserAccountManager userAccountManager){ this.userAccountManager = userAccountManager; } @Override public void execute() { userAccountManager.<API key>(); } @Override public String getOptionName() { return OPTION_NAME; } }
require 'test_helper' class RailsDbLocalizeTest < ActiveSupport::TestCase test "truth" do assert_kind_of Module, RailsDbLocalize end end
<!doctype html><html lang="en-US"> <head> <meta charset="utf-8"> <link href="layout.css" charset="utf-8" type="text/css" rel="stylesheet"></link> <title><API key></title> </head> <body> <script src="menu.js"></script> <div id="pagecontent"> <h1><API key></h1> <p>Use this function to destroy a haptic effect on the device. <h2>Syntax</h2> <div style="codearea"> <pre> void <API key>(SDL_Haptic* haptic, int effect) </pre></div> <h2>Function Parameters</h2> <table> <tr><td><strong>haptic</strong></td><td>the SDL_Haptic device to destroy the effect on</td></tr> <tr><td><strong>effect</strong></td><td>ID identifier of the haptic effect to destroy</td></tr> </table> <h2>Code Examples</h2> <h2>Remarks</h2> <p>This will stop the effect if it's running. Effects are automatically destroyed when the device is closed. <h2>Related Functions</h2> <ul style="list-style-type:none"><li><a href="SDL_HapticNewEffect.html">SDL_HapticNewEffect</a></li></ul> </div> </body> </html>
package com.hp.security.jauth.core.dao; import java.util.List; import com.hp.security.jauth.core.model.Group; /** * @author huangyiq * */ public interface GroupDao { List<Group> findAll(); Group findById(long groupId); void save(Group group); void update(Group group); void delete(long groupId); }
package com.ctrip.xpipe.netty; import com.ctrip.xpipe.api.codec.Codec; import java.nio.ByteBuffer; /** * @author wenchao.meng * * Aug 26, 2016 */ public class ByteBufferUtils { public static byte[] readToBytes(ByteBuffer byteBuffer) { int remain = byteBuffer.remaining(); byte[] data = new byte[remain]; byteBuffer.get(data); return data; } public static String readToString(ByteBuffer byteBuffer) { byte[] result = readToBytes(byteBuffer); return new String(result, Codec.defaultCharset); } }
<!DOCTYPE HTML PUBLIC "- <html lang="zh-CN"> <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>Bootstrap 101 Template</title> <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> <![endif] </head> <body> <h1>Hello bootstrap</h1> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="js/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="js/bootstrap.min.js"></script> </body> </html>
class UsersController < <API key> def new end def create user = User.new(user_params) if user.save session[:user_id] = user.id redirect_to '/', notice: 'Your account was successfully created.' else redirect_to '/signup' end end private def user_params params.permit(:name, :email, :password, :<API key>) end end
package jp.plen.plenconnect2.utils; import android.graphics.Rect; import android.support.annotation.NonNull; import android.view.View; import android.widget.AdapterView; import android.widget.GridView; /** * ListView. */ public final class GridViewUtil { private static final String TAG = GridViewUtil.class.getSimpleName(); private GridViewUtil() {} /** * View. * * @param gridView GridView * @param x x * @param y y * @return View ( {@link AdapterView#INVALID_POSITION} .) */ public static int getPositionAt(@NonNull GridView gridView, int x, int y) { int firstPosition = gridView.<API key>(); int lastPosition = gridView.<API key>(); for (int p = firstPosition; p <= lastPosition; p++) { View child = gridView.getChildAt(p - firstPosition); if (child == null) continue; Rect hitRect = new Rect(); child.getHitRect(hitRect); if (hitRect.contains(x, y)) return p; } return AdapterView.INVALID_POSITION; } }
using System; using Arch.CMessaging.Client.Net.Core.Session; using System.Collections.Generic; using Arch.CMessaging.Client.Transport.Command; using Arch.CMessaging.Client.MetaEntity.Entity; using Arch.CMessaging.Client.Core.Bo; namespace Arch.CMessaging.Client.Core.Message { public class <API key> : IConsumerMessage, <API key>, <API key> { public static DateTime EPOCH = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); public BaseConsumerMessage BaseConsumerMessage{ get; private set; } public bool AckWithForwardOnly { get; set; } public long MsgSeq{ get; set; } public int Partition{ get; set; } public bool Priority{ get; set; } public bool Resend { get; set; } public string GroupId{ get; set; } public long CorrelationId{ get; set; } public IoSession Channel{ get; set; } public int <API key>{ get; set; } public int ResendTimes { get { if (Resend) { return <API key> - BaseConsumerMessage.RemainingRetries + 1; } else { return 0; } } } public DateTime BornTimeUtc { get { return EPOCH.Add(new TimeSpan(BornTime * TimeSpan.TicksPerMillisecond)); } } public <API key>(BaseConsumerMessage baseMsg) { this.BaseConsumerMessage = baseMsg; } public void Nack() { if (BaseConsumerMessage.Nack()) { AckMessageCommandV2 cmd = CreateAckCommand(); cmd.Header.CorrelationId = CorrelationId; Tpp tpp = new Tpp(BaseConsumerMessage.Topic, Partition, Priority); cmd.addNackMsg(tpp, GroupId, Resend, MsgSeq, BaseConsumerMessage.RemainingRetries, BaseConsumerMessage.<API key>, BaseConsumerMessage.<API key>); Channel.Write(cmd); } } private AckMessageCommandV2 CreateAckCommand() { return AckWithForwardOnly ? new AckMessageCommandV2(AckMessageCommandV2.FORWARD_ONLY) : new AckMessageCommandV2(AckMessageCommandV2.NORMAL); } public string GetProperty(string name) { return BaseConsumerMessage.<API key>(name); } public IEnumerator<string> GetPropertyNames() { return BaseConsumerMessage.<API key>; } public long BornTime { get { return BaseConsumerMessage.BornTime; } } public string Topic { get{ return BaseConsumerMessage.Topic; } } public string RefKey { get { return BaseConsumerMessage.RefKey; } } public T GetBody<T>() { return (T)BaseConsumerMessage.Body; } public void Ack() { if (BaseConsumerMessage.Ack()) { AckMessageCommandV2 cmd = CreateAckCommand(); cmd.Header.CorrelationId = CorrelationId; Tpp tpp = new Tpp(BaseConsumerMessage.Topic, Partition, Priority); cmd.addAckMsg(tpp, GroupId, Resend, MsgSeq, BaseConsumerMessage.RemainingRetries, BaseConsumerMessage.<API key>, BaseConsumerMessage.<API key>); Channel.Write(cmd); } } public string Status { get{ return BaseConsumerMessage.Status; } } public int RemainingRetries { get{ return BaseConsumerMessage.RemainingRetries; } } public PropertiesHolder PropertiesHolder { get{ return BaseConsumerMessage.PropertiesHolder; } } public override string ToString() { return "<API key>{" + "m_baseMsg=" + BaseConsumerMessage + ", m_msgSeq=" + MsgSeq + ", m_partition=" + Partition + ", m_priority=" + Priority + ", m_resend=" + Resend + ", m_groupId='" + GroupId + '\'' + ", m_correlationId=" + CorrelationId + ", m_channel=" + Channel + '}'; } } }
<?php namespace Aws\Route53Domains; use Aws\AwsClient; /** * This client is used to interact with the **Amazon Route 53 Domains** service. * * @method \Aws\Result <API key>(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result deleteTagsForDomain(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result <API key>(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result <API key>(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result <API key>(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result <API key>(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result getDomainDetail(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result getOperationDetail(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result listDomains(array $args = []) * @method \GuzzleHttp\Promise\Promise listDomainsAsync(array $args = []) * @method \Aws\Result listOperations(array $args = []) * @method \GuzzleHttp\Promise\Promise listOperationsAsync(array $args = []) * @method \Aws\Result listTagsForDomain(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result registerDomain(array $args = []) * @method \GuzzleHttp\Promise\Promise registerDomainAsync(array $args = []) * @method \Aws\Result <API key>(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result transferDomain(array $args = []) * @method \GuzzleHttp\Promise\Promise transferDomainAsync(array $args = []) * @method \Aws\Result updateDomainContact(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result <API key>(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result <API key>(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) * @method \Aws\Result updateTagsForDomain(array $args = []) * @method \GuzzleHttp\Promise\Promise <API key>(array $args = []) */ class <API key> extends AwsClient {}
<?php namespace Swagger\Client; /** * ExportDataTest Class Doc Comment * * @category Class */ // * @description Data object class ExportDataTest extends \<API key> { /** * Setup before running any test case */ public static function setUpBeforeClass() { } /** * Setup before running each test case */ public function setUp() { } /** * Clean up after running each test case */ public function tearDown() { } /** * Clean up after running all test cases */ public static function tearDownAfterClass() { } /** * Test "ExportData" */ public function testExportData() { } /** * Test attribute "data" */ public function testPropertyData() { } /** * Test attribute "response" */ public function <API key>() { } }
package com.zhigu.model; import java.io.Serializable; import java.math.BigDecimal; public class OrderDetail implements Serializable { private int ID; private int orderID; private int goodsID; private String goodsName; private int skuID; // sku private String propertystrname; private BigDecimal unitPrice; private boolean isEvaluate; private int quantity; private String color; private String size; private String goodsPic; private String introduce; private Integer cartID; public int getID() { return ID; } public void setID(int iD) { ID = iD; } public String getPropertystrname() { return propertystrname; } public void setPropertystrname(String propertystrname) { this.propertystrname = propertystrname; } public int getOrderID() { return orderID; } public void setOrderID(int orderID) { this.orderID = orderID; } public BigDecimal getUnitPrice() { return unitPrice; } public void setUnitPrice(BigDecimal unitPrice) { this.unitPrice = unitPrice; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public String getSize() { return size; } public void setSize(String size) { this.size = size; } public String getIntroduce() { return introduce; } public void setIntroduce(String introduce) { this.introduce = introduce; } public Integer getCartID() { return cartID; } public void setCartID(Integer cartID) { this.cartID = cartID; } public int getGoodsID() { return goodsID; } public void setGoodsID(int goodsID) { this.goodsID = goodsID; } public String getGoodsName() { return goodsName; } public void setGoodsName(String goodsName) { this.goodsName = goodsName; } public int getSkuID() { return skuID; } public void setSkuID(int skuID) { this.skuID = skuID; } public String getGoodsPic() { return goodsPic; } public void setGoodsPic(String goodsPic) { this.goodsPic = goodsPic; } public boolean isEvaluate() { return isEvaluate; } public void setEvaluate(boolean isEvaluate) { this.isEvaluate = isEvaluate; } }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="ru"> <head> <title>Uses of Class org.apache.poi.xslf.usermodel.TextAutofit (POI API Documentation)</title> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><! if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.poi.xslf.usermodel.TextAutofit (POI API Documentation)"; } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar_top"> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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><a href="../../../../../../org/apache/poi/xslf/usermodel/TextAutofit.html" title="enum in org.apache.poi.xslf.usermodel">Class</a></li> <li class="navBarCell1Rev">Use</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> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/apache/poi/xslf/usermodel/class-use/TextAutofit.html" target="_top">Frames</a></li> <li><a href="TextAutofit.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip-navbar_top"> </a></div> <div class="header"> <h2 title="Uses of Class org.apache.poi.xslf.usermodel.TextAutofit" class="title">Uses of Class<br>org.apache.poi.xslf.usermodel.TextAutofit</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../org/apache/poi/xslf/usermodel/TextAutofit.html" title="enum in org.apache.poi.xslf.usermodel">TextAutofit</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.apache.poi.xslf.usermodel">org.apache.poi.xslf.usermodel</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.apache.poi.xslf.usermodel"> </a> <h3>Uses of <a href="../../../../../../org/apache/poi/xslf/usermodel/TextAutofit.html" title="enum in org.apache.poi.xslf.usermodel">TextAutofit</a> in <a href="../../../../../../org/apache/poi/xslf/usermodel/package-summary.html">org.apache.poi.xslf.usermodel</a></h3> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../org/apache/poi/xslf/usermodel/package-summary.html">org.apache.poi.xslf.usermodel</a> that return <a href="../../../../../../org/apache/poi/xslf/usermodel/TextAutofit.html" title="enum in org.apache.poi.xslf.usermodel">TextAutofit</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../org/apache/poi/xslf/usermodel/TextAutofit.html" title="enum in org.apache.poi.xslf.usermodel">TextAutofit</a></code></td> <td class="colLast"><span class="strong">XSLFTextShape.</span><code><strong><a href="../../../../../../org/apache/poi/xslf/usermodel/XSLFTextShape.html#getTextAutofit()">getTextAutofit</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static <a href="../../../../../../org/apache/poi/xslf/usermodel/TextAutofit.html" title="enum in org.apache.poi.xslf.usermodel">TextAutofit</a></code></td> <td class="colLast"><span class="strong">TextAutofit.</span><code><strong><a href="../../../../../../org/apache/poi/xslf/usermodel/TextAutofit.html#valueOf(java.lang.String)">valueOf</a></strong>(java.lang.String&nbsp;name)</code> <div class="block">Returns the enum constant of this type with the specified name.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static <a href="../../../../../../org/apache/poi/xslf/usermodel/TextAutofit.html" title="enum in org.apache.poi.xslf.usermodel">TextAutofit</a>[]</code></td> <td class="colLast"><span class="strong">TextAutofit.</span><code><strong><a href="../../../../../../org/apache/poi/xslf/usermodel/TextAutofit.html#values()">values</a></strong>()</code> <div class="block">Returns an array containing the constants of this enum type, in the order they are declared.</div> </td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../org/apache/poi/xslf/usermodel/package-summary.html">org.apache.poi.xslf.usermodel</a> with parameters of type <a href="../../../../../../org/apache/poi/xslf/usermodel/TextAutofit.html" title="enum in org.apache.poi.xslf.usermodel">TextAutofit</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="strong">XSLFTextShape.</span><code><strong><a href="../../../../../../org/apache/poi/xslf/usermodel/XSLFTextShape.html#setTextAutofit(org.apache.poi.xslf.usermodel.TextAutofit)">setTextAutofit</a></strong>(<a href="../../../../../../org/apache/poi/xslf/usermodel/TextAutofit.html" title="enum in org.apache.poi.xslf.usermodel">TextAutofit</a>&nbsp;value)</code> <div class="block">Specifies that a shape should be auto-fit to fully contain the text described within it.</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <div class="bottomNav"><a name="navbar_bottom"> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>"> </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><a href="../../../../../../org/apache/poi/xslf/usermodel/TextAutofit.html" title="enum in org.apache.poi.xslf.usermodel">Class</a></li> <li class="navBarCell1Rev">Use</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> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/apache/poi/xslf/usermodel/class-use/TextAutofit.html" target="_top">Frames</a></li> <li><a href="TextAutofit.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip-navbar_bottom"> </a></div> <p class="legalCopy"><small> <i>Copyright 2014 The Apache Software Foundation or its licensors, as applicable.</i> </small></p> </body> </html>
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="ru"> <head> <title>org.apache.poi.poifs.crypt.agile (POI API Documentation)</title> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><! if (location.href.indexOf('is-external=true') == -1) { parent.document.title="org.apache.poi.poifs.crypt.agile (POI API Documentation)"; } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar_top"> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li class="navBarCell1Rev">Package</li> <li>Class</li> <li><a href="package-use.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> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../org/apache/poi/poifs/crypt/package-summary.html">Prev Package</a></li> <li><a href="../../../../../../org/apache/poi/poifs/crypt/standard/package-summary.html">Next Package</a></li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/apache/poi/poifs/crypt/agile/package-summary.html" target="_top">Frames</a></li> <li><a href="package-summary.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip-navbar_top"> </a></div> <div class="header"> <h1 title="Package" class="title">Package&nbsp;org.apache.poi.poifs.crypt.agile</h1> </div> <div class="contentContainer"> <ul class="blockList"> <li class="blockList"> <table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> <caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Class</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="../../../../../../org/apache/poi/poifs/crypt/agile/AgileDecryptor.html" title="class in org.apache.poi.poifs.crypt.agile">AgileDecryptor</a></td> <td class="colLast"> <div class="block">Decryptor implementation for Agile Encryption</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="../../../../../../org/apache/poi/poifs/crypt/agile/<API key>.html" title="class in org.apache.poi.poifs.crypt.agile"><API key></a></td> <td class="colLast">&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><a href="../../../../../../org/apache/poi/poifs/crypt/agile/<API key>.html" title="class in org.apache.poi.poifs.crypt.agile"><API key></a></td> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="../../../../../../org/apache/poi/poifs/crypt/agile/<API key>.html" title="class in org.apache.poi.poifs.crypt.agile"><API key></a></td> <td class="colLast"> <div class="block">Used when checking if a key is valid for a document</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><a href="../../../../../../org/apache/poi/poifs/crypt/agile/<API key>.<API key>.html" title="class in org.apache.poi.poifs.crypt.agile"><API key>.<API key></a></td> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="../../../../../../org/apache/poi/poifs/crypt/agile/AgileEncryptor.html" title="class in org.apache.poi.poifs.crypt.agile">AgileEncryptor</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> </ul> </div> <div class="bottomNav"><a name="navbar_bottom"> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li class="navBarCell1Rev">Package</li> <li>Class</li> <li><a href="package-use.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> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../org/apache/poi/poifs/crypt/package-summary.html">Prev Package</a></li> <li><a href="../../../../../../org/apache/poi/poifs/crypt/standard/package-summary.html">Next Package</a></li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/apache/poi/poifs/crypt/agile/package-summary.html" target="_top">Frames</a></li> <li><a href="package-summary.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip-navbar_bottom"> </a></div> <p class="legalCopy"><small> <i>Copyright 2014 The Apache Software Foundation or its licensors, as applicable.</i> </small></p> </body> </html>
<!DOCTYPE HTML PUBLIC "- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Ext.Direct Generic Remoting</title> <link rel="stylesheet" type="text/css" href="shared/example.css" /> <style type="text/css"> #logger b { color:#555; } #logger pre { margin: 5px; } #logger p { margin:0; } </style> <script type="text/javascript" src="shared/include-ext.js"></script> <script type="text/javascript" src="shared/options-toolbar.js"></script> <script type="text/javascript" src="service/direct/src/app.js"></script> <script type="text/javascript" src="direct.js"></script> </head> <body> <h1>Ext.Direct Generic Remoting</h1> <p>The js is not minified so it is readable. See <a href="direct.js">direct.js</a>.</p> To make the multiply request show a failure, enter a non numeric value into the field. </body> </html>
<script src="libraries/frontend/deck.js/modernizr.custom.js"></script> <script src="libraries/frontend/deck.js/core/deck.core.js"></script> <script src="libraries/frontend/deck.js/extensions/menu/deck.menu.js"></script> <script src="libraries/frontend/deck.js/extensions/goto/deck.goto.js"></script> <script src="libraries/frontend/deck.js/extensions/status/deck.status.js"></script> <script src="libraries/frontend/deck.js/extensions/navigation/deck.navigation.js"></script> <script src="libraries/frontend/deck.js/extensions/hash/deck.hash.js"></script> <script src="static/js/view-spec/playq.js"></script> <script src="libraries/frontend/deck.js/extensions/scale/deck.scale.questions.js"></script> <script type="text/javascript" src="libraries/frontend/jquery-tmpl/jquery.tmpl.min.js"></script> <script src="static/js/questions.js"></script> <script src="static/js/view-spec/playq.js"></script> <!--<script src="static/js/scale.js"></script> <title><?php echo $test_title; ?></title> <!--</head>--> <script type="text/javascript"> var json_obj = <?php echo $test; ?>; </script> <?php if ($type=="exam") :?> <script> document.onblur = function () { alert("Sorry, I've lost your responses. Please, do not leave the test window."); window.location = "./?url=main/test&id=<?php echo $test_id;?>&type=<?php echo $type;?>&mode=<?php echo $mode;?>&limit=<?php echo $limit;?>"; } </script> <header class="page-header"> <span id="deck_title"><h1>Test for "<?php echo $test_title;?>" course </h1> </span> </header> <section class="deck-container deck-single"> <article name="quests-area" id="quests-area" test_sum="0" max_sum="0" attempt="<?php echo $attempt?>"> <?php $i = 0; foreach ($questions as $question) { $i++; ?> <div class="slide" name="question-<?php echo $question->id; ?>" id="question-<?php echo $question->id; ?>-<?php echo $question->module['id']; ?>"> <h3 class="module_name" name="<?php echo $question->module['name']; ?>">Module "<?php echo $question->module['name']; ?>"</h3> <form class="form-stacked"> <fieldset> <legend><h3>Question <?php echo $i;?> of <?php echo $count;?></h3></legend> <span id="question_text" name="question_text"><?php echo $question->question; ?></span> <input type="hidden" name="question_points" id="question_points" value="0"> <input type="hidden" name="question_points_mtf" id="question_points_mtf" value="0"> <input type="hidden" name="<API key>" id="<API key>" value="0"> <input type="hidden" name="<API key>" id="<API key>" value="0"> <input type="hidden" name="<API key>" id="<API key>" value="0"> <input type="hidden" name="question_diff" id="question_diff" value="<?php echo $question->difficulty?>"> <input type="hidden" name="is_counted" value="no"> <input type="hidden" name="was_viewed" value="no"> <div class="clearfix"> <div class="input"> <ul class="inputs-list"> <?php $sh_answers = $question->answers; shuffle($sh_answers); foreach ($sh_answers as $answer) { ?> <li> <div class="clearfix" id = "<?php echo $answer['id']?>" name="answer_div"> <label> <input type="checkbox" name="answer_points"> <span><?php echo $answer['answer']; ?></span> </label> </div> </li> <?php }?> </ul> </div> </div> </fieldset> </form> </div> <?php echo PHP_EOL; ?> <?php } ?> <div class="slide" name="question-last" id="question-last"> <a class="btn small primary" id="countTestButton" onclick="showResults(json_obj)">View the results</a> <?php if($user['is_authorized']) : ?> <a class="btn small primary" id="saveTestButton" style="display: none;" onclick="saveTest()">Save the results</a> <?php endif; ?> <div id="countModeButtons" style="display:none;"> <a class="btn small primary" id="wiki_app" onclick="showModel('wiki_app')">Guessing-based scoring</a> <a class="btn small primary" id="continious" onclick="showModel('dich')">Dichotomous scoring</a> <a class="btn small primary" id="old_model" onclick="showModel('morgan')">Morgan algorythm</a> <a class="btn small primary" id="moodle" onclick="showModel('mtf')">MTF scoring</a> <a class="btn small primary" id="moodle" onclick="showModel('ripkey')">Ripkey scoring</a> </div> <div id="results" style="display:none;"> </div> </div> </article> <footer> <nav> <a href="#" class="deck-prev-link" title="Previous">&#8592;</a> <a href="#" class="deck-next-link" title="Next">&#8594;</a> <form action="." method="get" class="goto-form"> <label for="goto-slide">Go to question:</label> <input type="number" name="slidenum" id="goto-slide"> <input type="submit" value="Go"> </form> </nav> </footer> </section> <?php else : ?> <header class="page-header"> <span id="deck_title"><h1>Test for "<?php echo $test_title;?>" course </h1> <?php if ($type!='list') :?> <h4><a href="./deck/<?php echo $test_id . '_' . $slug_title; ?>">Go to the presentation</a></h4> <?php endif; ?> </span> </header> <section class="deck-container deck-single"> <article name="quests-area" id="quests-area" test_sum="0" max_sum="0" attempt="<?php echo $attempt?>"> <?php $i = 0; foreach ($questions as $question) { $i++; ?> <div class="slide" name="question-<?php echo $question->id; ?>" id="question-<?php echo $question->id; ?>-<?php echo $question->module['id']; ?>"> <h3 class="module_name" name="<?php echo $question->module['name']; ?>">Module "<?php echo $question->module['name']; ?>"</h3> <form class="form-stacked"> <fieldset> <legend><h3>Question <?php echo $i;?> of <?php echo $count;?></h3></legend> <span id="question_text" name="question_text"><?php echo stripslashes($question->question); ?></span> <input type="hidden" name="question_points" id="question_points" value="0"> <input type="hidden" name="question_points_mtf" id="question_points_mtf" value="0"> <input type="hidden" name="<API key>" id="<API key>" value="0"> <input type="hidden" name="<API key>" id="<API key>" value="0"> <input type="hidden" name="<API key>" id="<API key>" value="0"> <input type="hidden" name="question_diff" id="question_diff" value="<?php echo $question->difficulty?>"> <input type="hidden" name="is_counted" value="no"> <input type="hidden" name="was_viewed" value="no"> <div class="clearfix"> <div class="input"> <ul class="inputs-list"> <?php $sh_answers = $question->answers; shuffle($sh_answers); foreach ($sh_answers as $answer) { ?> <li> <div class="clearfix" id = "<?php echo $answer['id']?>" name="answer_div"> <label> <input type="checkbox" name="answer_points"> <span><?php echo stripslashes($answer['answer']); ?></span> </label> </div> </li> <?php }?> </ul> </div> </div> </fieldset> <div class="actions"> <a class="btn small primary" name="showAnswersButton" onclick="showAnswers(<?php echo $question->id; ?>)">Show answers</a> <?php if($type=='auto') :?> <a class="btn small primary" name="showSlideButton" onclick="showAutoSlide(<?php echo $question->item_id?>,<?php echo $question->module['id'] ?>,<?php echo $question->id; ?>)">Show slide</a> <?php else : ?> <a class="btn small primary" name="showSlideButton" onclick="showListSlide(<?php echo $question->item_id?>,<?php echo $question->id; ?>)">Show slide</a> <?php endif; ?> </div> </form> </div> <?php echo PHP_EOL; ?> <?php } ?> <div class="slide" name="question-last" id="question-last"> <a class="btn small primary" id="countTestButton" onclick="showResults(json_obj)">View the results</a> <?php if($user['is_authorized']) : ?> <a class="btn small primary" id="saveTestButton" style="display: none;" onclick="saveTest()">Save the results</a> <?php endif; ?> <a class="btn small primary" id="tryAgainButton" onclick="tryAgain(<?php echo $test_id ?>,'<?php if ($type=='list'): echo 'user'; else: echo 'auto'; endif; ?>')">Try it again!</a> <div id="countModeButtons" style="display:none;"> <a class="btn small primary" id="wiki_app" onclick="showModel('wiki_app')">Guessing-based scoring</a> <a class="btn small primary" id="continious" onclick="showModel('dich')">Dichotomous scoring</a> <a class="btn small primary" id="old_model" onclick="showModel('morgan')">Morgan algorythm</a> <a class="btn small primary" id="moodle" onclick="showModel('mtf')">MTF scoring</a> <a class="btn small primary" id="moodle" onclick="showModel('ripkey')">Ripkey scoring</a> </div> <div id="results" style="display:none;"> </div> </div> </article> <footer> <nav> <a href="#" class="deck-prev-link" title="Previous">&#8592;</a> <a href="#" class="deck-next-link" title="Next">&#8594;</a> <form action="." method="get" class="goto-form"> <label for="goto-slide">Go to question:</label> <input type="number" name="slidenum" id="goto-slide"> <input type="submit" value="Go"> </form> </nav> </footer> </section> <?php endif;?> <div id="results"></div> <script id="module" type="text/x-jquery-tmpl"> <div class= 'resultsDiv' name = 'moduleDiv' wiki_app=0 dich=0 mtf=0 morgan=0 ripkey=0 wiki_app=0 maxForUser=${max_for_user} id=${item_id}> <div style="float:left; width: 50%"><h4>${title}</h4></div><div style="text-align:right;">[<a style="cursor: pointer" onclick="collapse(${item_id})">Collapse</a>] [<a style="cursor: pointer" onclick="expand(${item_id})">Expand</a>]</div> <table> <thead> <th>Question</th> <th>Difficulty</th> <th style='display:none'>Not displayed</th> <th>Points</th> </thead> <tbody> </tbody> </table> </div> </script> <script id="questions_script" type="text/x-jquery-tmpl"> {{each questions}} <tr name='${$value.id}_string' class="question_string"> <td> <a style="cursor:pointer;" onclick="gotoQuestion('#question-${id}-${$data.item_id}')">${question}</a> </td> <td name='diff'>${difficulty}</td> <td name='points' style='display:none'></td> <td class='points_ts'> <div name='points_ts' model='wiki_app' style='display:none'></div> <div name='points_ts' model='dich' style='display:none'></div> <div name='points_ts' model='morgan' style='display:none'></div> <div name='points_ts' model='ripkey' style='display:none'></div> <div name='points_ts' model='mtf' style='display:none'></div> </td> </tr> {{/each}} </script>
<?php // | ThinkPHP [ WE CAN DO IT JUST THINK ] // 1-, 0- const USER_STATUS_ACTIVE = 1; const <API key> = 0; // 1-, 2-, 3- const <API key> = 1; const MEMBER_TYPE_AGENT = 2; const MEMBER_TYPE_NORMAL = 3; // 1-, 2-() const MANAGER_TYPE_ADMIN = 1; const MANAGER_TYPE_AGENT = 2; // PHP if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !'); // false define('APP_DEBUG',false); define('ADD_CARD_SERVER_URL',"http://120.76.248.15:9100"); define('BIND_MODULE', 'Admin'); // Home define('APP_PATH','./Application/'); // ThinkPHP require './ThinkPHP/ThinkPHP.php';
// 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; using VA.Gov.Artemis.UI.Data.Models.Outcomes; using VA.Gov.Artemis.UI.Data.Models.Common; namespace VA.Gov.Artemis.UI.Data.Models.Track { public class CreateTrackingEntry { public string PageTitle { get; set; } public string PageMessage { get; set; } public TrackingEntry TrackingEntry { get; set; } public string ButtonText { get; set; } public List<string> Reasons { get; set; } public string OutcomeTableHeader { get; set; } public string OutcomeHeader { get; set; } public string DateHeader { get; set; } public string ReasonText { get; set; } public string ReasonDetail { get; set; } public BasePatient Patient { get; set; } public string ReturnUrl { get; set; } public OutcomeDetails Outcome { get; set; } public bool <API key> { get; set; } public CreateTrackingEntry() { this.Outcome = new OutcomeDetails(); } } }
package jeffaschenk.commons.standards.statecodes; import jeffaschenk.commons.standards.CountryCode; @SuppressWarnings("unused") public enum StateCodes_MM { /** * State Code Enumerator */ MM_07("Ayeyarwady", "MM-07", "division", "15608", CountryCode.MYANMAR), MM_02("Bago", "MM-02", "division", "15609", CountryCode.MYANMAR), MM_14("Chin", "MM-14", "state", "15617", CountryCode.MYANMAR), MM_11("Kachin", "MM-11", "state", "15610", CountryCode.MYANMAR), MM_12("Kayah", "MM-12", "state", "15618", CountryCode.MYANMAR), MM_13("Kayin", "MM-13", "state", "15611", CountryCode.MYANMAR), MM_03("Magway", "MM-03", "division", "15612", CountryCode.MYANMAR), MM_04("Mandalay", "MM-04", "division", "15620", CountryCode.MYANMAR), MM_15("Mon", "MM-15", "state", "15613", CountryCode.MYANMAR), MM_16("Rakhine", "MM-16", "state", "15619", CountryCode.MYANMAR), MM_01("Sagaing", "MM-01", "division", "15614", CountryCode.MYANMAR), MM_17("Shan", "MM-17", "state", "15615", CountryCode.MYANMAR), MM_05("Tanintharyi", "MM-05", "division", "15607", CountryCode.MYANMAR), MM_06("Yangon", "MM-06", "division", "15616", CountryCode.MYANMAR); // Common Enum Structure for all // States of the World private final String stateProvinceName; private final String stateCode; private final String stateProvinceType; private final String stateNumericCode; private final CountryCode countryCode; StateCodes_MM(String stateProvinceName, String stateCode, String stateProvinceType, String stateNumericCode, CountryCode countryCode) { this.stateProvinceName = stateProvinceName; this.stateCode = stateCode; this.stateProvinceType = stateProvinceType; this.stateNumericCode = stateNumericCode; this.countryCode = countryCode; } public String stateProvinceName() { return this.stateProvinceName; } public String stateCode() { return this.stateCode; } public String stateProvinceType() { return this.stateProvinceType; } public String stateNumericCode() { return this.stateNumericCode; } public CountryCode countryCode() { return this.countryCode; } }
#pragma once namespace vespalib { /** * This class defines the {@link Trace} levels used by the tracing code. */ class TraceLevel { private: TraceLevel(); // hide public: enum { // The trace level used for tracing whenever an Error is added to a // Reply. ERROR = 1, // The trace level used by messagebus when sending and receiving // messages and replies on network level. SEND_RECEIVE = 4, // The trace level used by messagebus when splitting messages and // merging replies. SPLIT_MERGE = 5, // The trace level used by messagebus to trace information about which // internal components are processing a routable. COMPONENT = 6 }; }; } // namespace vespalib
#pragma once #include <string> #include <vector> #include <memory> #include <mutex> namespace vespalib { class Barrier; #ifndef IAM_DOXYGEN /** * The master of testing. **/ class TestMaster { private: TestMaster(const TestMaster &); TestMaster &operator=(const TestMaster &); public: struct Progress { size_t passCnt; size_t failCnt; Progress(size_t pass, size_t fail) : passCnt(pass), failCnt(fail) {} }; struct Unwind {}; static TestMaster master; struct TraceItem { std::string file; uint32_t line; std::string msg; TraceItem(const std::string &file_in, uint32_t line_in, const std::string &msg_in) : file(file_in), line(line_in), msg(msg_in) {} ~TraceItem(); }; private: struct ThreadState { std::string name; bool unwind; size_t passCnt; size_t failCnt; bool ignore; size_t preIgnoreFailCnt; std::vector<TraceItem> traceStack; Barrier *barrier; ThreadState(const std::string &n) : name(n), unwind(false), passCnt(0), failCnt(0), ignore(false), preIgnoreFailCnt(0), traceStack(), barrier(0) {} }; static __thread ThreadState *_threadState; struct SharedState { size_t passCnt; size_t failCnt; FILE *lhsFile; FILE *rhsFile; SharedState() : passCnt(0), failCnt(0), lhsFile(0), rhsFile(0) {} }; private: std::mutex _lock; std::string _name; std::string _path_prefix; SharedState _state; std::vector<std::unique_ptr<ThreadState> > _threadStorage; using lock_guard = std::lock_guard<std::mutex>; private: ThreadState &threadState(const lock_guard &); ThreadState &threadState(); void checkFailed(const lock_guard &, const char *file, uint32_t line, const char *str); void printDiff(const lock_guard &, const std::string &text, const std::string &file, uint32_t line, const std::string &lhs, const std::string &rhs); void handleFailure(const lock_guard &, bool do_abort); void closeDebugFiles(const lock_guard &); void importThreads(const lock_guard &); bool reportConclusion(const lock_guard &); private: TestMaster(); public: void init(const char *name); std::string getName(); std::string get_path(const std::string &local_file); void setThreadName(const char *name); const char *getThreadName(); void setThreadUnwind(bool unwind); void setThreadIgnore(bool ignore); void setThreadBarrier(Barrier *barrier); void awaitThreadBarrier(const char *file, uint32_t line); std::vector<TraceItem> getThreadTraceStack(); void setThreadTraceStack(const std::vector<TraceItem> &traceStack); size_t getThreadFailCnt(); Progress getProgress(); void openDebugFiles(const std::string &lhsFile, const std::string &rhsFile); void pushState(const char *file, uint32_t line, const char *msg); void popState(); bool check(bool rc, const char *file, uint32_t line, const char *str, bool fatal); template<class A, class B, class OP> bool compare(const char *file, uint32_t line, const char *aName, const char *bName, const char *opText, const A &a, const B &b, const OP &op, bool fatal); void flush(const char *file, uint32_t line); void trace(const char *file, uint32_t line); bool discardFailedChecks(size_t failCnt); bool fini(); }; #endif } // namespace vespalib #include "test_master.hpp"
package com.willlee.leetcode.problems201_300; import java.util.HashSet; public class Leetcode219 { public boolean <API key>(int[] nums, int k) { HashSet<Integer> set = new HashSet<>(); for (int i = 0; i < nums.length; i++) { if (set.contains(nums[i])) { return true; } set.add(nums[i]); if (set.size() > k) { set.remove(nums[i - k]); } } return false; } }
'use strict'; /** * Requirements * @ignore */ const Filter = require('./Filter.js').Filter; /** * Current uniqueId * @type {Number} */ let uniqueId = 0; /** * @memberOf nunjucks.filter */ class UniqueFilter extends Filter { /** * @inheritDoc */ constructor() { super(); this._name = 'unique'; } /** * @inheritDoc */ static get className() { return 'nunjucks.filter/UniqueFilter'; } /** * @inheritDoc */ filter() { const scope = this; return function(value, separator) { const sep = typeof separator === 'undefined' ? '-' : separator; uniqueId = (uniqueId + 1) % Number.MAX_SAFE_INTEGER; return scope.applyCallbacks(String(value) + sep + uniqueId, arguments); }; } } /** * Exports * @ignore */ module.exports.UniqueFilter = UniqueFilter;
layout: default-carousel title: Index subtitle: This is an example <!-- Portfolio Section --> <div class="row"> <div class="col-lg-12"> <h2 class="page-header">OUR TARGETS</h2> </div> <!-- Feature One --> <div class="row"> <div class="col-md-7"> <a href="portfolio-item.html"> <img class="img-responsive img-hover" src="http://placehold.it/700x300" alt=""> </a> </div> <div class="col-md-5"> <h3>Automatic event detection</h3> <p>Current situation</p> </div> </div> <!-- /.row --> <hr> <!-- Feature Two --> <div class="row"> <div class="col-md-7"> <a href="portfolio-item.html"> <img class="img-responsive img-hover" src="http://placehold.it/700x300" alt=""> </a> </div> <div class="col-md-5"> <h3>Traffic light/signs Warning</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ut, odit velit cumque vero doloremque repellendus distinctio maiores rem expedita a nam vitae modi quidem similique ducimus! Velit, esse totam tempore.</p> </div> </div> <!-- /.row --> <hr> <!-- Feature Three --> <div class="row"> <div class="col-md-7"> <a href="portfolio-item.html"> <img class="img-responsive img-hover" src="http://placehold.it/700x300" alt=""> </a> </div> <div class="col-md-5"> <h3>Foreseeing dangers on road</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ut, odit velit cumque vero doloremque repellendus distinctio maiores rem expedita a nam vitae modi quidem similique ducimus! Velit, esse totam tempore.</p> </div> </div> <!-- /.row --> <hr> </div> <!-- /.row --> <!-- Marketing Icons Section --> <div class="row"> <div class="col-lg-12"> <h1 class="page-header"> Our Methodology </h1> </div> <div class="col-md-4"> <div class="panel panel-default"> <div class="panel-heading"> <h4><i class="fa fa-fw fa-check"></i> Video Recognition</h4> </div> <div class="panel-body"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Itaque, optio corporis quae nulla aspernatur in alias at numquam rerum ea excepturi expedita tenetur assumenda voluptatibus eveniet incidunt dicta nostrum quod?</p> <a href="#" class="btn btn-default">Learn More</a> </div> </div> </div> <div class="col-md-4"> <div class="panel panel-default"> <div class="panel-heading"> <h4><i class="fa fa-fw fa-gift"></i> AI deep learning backend</h4> </div> <div class="panel-body"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Itaque, optio corporis quae nulla aspernatur in alias at numquam rerum ea excepturi expedita tenetur assumenda voluptatibus eveniet incidunt dicta nostrum quod?</p> <a href="#" class="btn btn-default">Learn More</a> </div> </div> </div> <div class="col-md-4"> <div class="panel panel-default"> <div class="panel-heading"> <h4><i class="fa fa-fw fa-compass"></i> to be defined</h4> </div> <div class="panel-body"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Itaque, optio corporis quae nulla aspernatur in alias at numquam rerum ea excepturi expedita tenetur assumenda voluptatibus eveniet incidunt dicta nostrum quod?</p> <a href="#" class="btn btn-default">Learn More</a> </div> </div> </div> </div> <!-- /.row --> <!-- Features Section --> <div class="row"> <div class="col-lg-12"> <h2 class="page-header">Modern Business Features</h2> </div> <div class="col-md-6"> <p>The Modern Business template by Start Bootstrap includes:</p> <ul> <li><strong>Bootstrap v3.3.7</strong> </li> <li>jQuery v1.11.1</li> <li>Font Awesome v4.2.0</li> <li>Working PHP contact form with validation</li> <li>Unstyled page elements for easy customization</li> <li>17 HTML pages</li> </ul> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis, omnis doloremque non cum id reprehenderit, quisquam totam aspernatur tempora minima unde aliquid ea culpa sunt. Reiciendis quia dolorum ducimus unde.</p> </div> <div class="col-md-6"> <img class="img-responsive" src="http://placehold.it/700x450" alt=""> </div> </div> <!-- /.row --> <hr> <!-- Call to Action Section --> <! <div class="well"> <div class="row"> <div class="col-md-8"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestias, expedita, saepe, vero rerum deleniti beatae veniam harum neque nemo praesentium cum alias asperiores commodi.</p> </div> <div class="col-md-4"> <a class="btn btn-lg btn-default btn-block" href="#">Call to Action</a> </div> </div> </div> <hr> <!-- Script to Activate the Carousel --> <script> $('.carousel').carousel({ interval: 5000 //changes the speed }) </script>
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec perl -S $0 $argv:q' if 0; # $Id: run_test.pl 96572 2012-12-21 09:23:06Z johnnyw $ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; use PerlACE::TestTarget; $status = 0; $synchbase = "ready"; my $target1 = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; my $target2 = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; $synchfile = $target1->LocalFile ("$synchbase"); my $port = $target1->RandomPort (); my $host = $target1->HostName(); my $SV = $target1->CreateProcess("server", "-p $port -o $synchfile"); my $CL = $target2->CreateProcess ("client", " -h $host -p $port"); $target1->DeleteFile ($synchbase); $target2->DeleteFile ($synchbase); $server_status = $SV->Spawn (); if ($server_status != 0) { print STDERR "ERROR: server returned $server_status\n"; exit 1; } if ($target1->WaitForFileTimed ($synchbase, $target1-><API key>()) == -1) { print STDERR "ERROR: cannot find file <$synchfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } $target1->DeleteFile ($synchbase); $client = $CL->SpawnWaitKill ($target2-><API key>() + 285); if ($client != 0) { print STDERR "ERROR: client returned $client\n"; $status = 1; } $server = $SV->WaitKill ($target1-><API key>()); if ($server != 0) { print STDERR "ERROR: server returned $server\n"; $status = 1; } $target1->GetStderrLog(); $target2->GetStderrLog(); $target1->DeleteFile ($synchbase); $target2->DeleteFile ($synchbase); exit $status;
package com.twitter.app import org.scalatest.funsuite.AnyFunSuite object MyGlobalFlag extends GlobalFlag[String]("a test flag", "a global test flag") object <API key> extends GlobalFlag[Int]("a global test flag with no default") object MyGlobalBooleanFlag extends GlobalFlag[Boolean](false, "a boolean flag") class GlobalFlagTest extends AnyFunSuite { val flagSet = Set(MyGlobalFlag, MyGlobalBooleanFlag, <API key>) test("GlobalFlag.get") { assert(MyGlobalBooleanFlag.get.isEmpty) assert(<API key>.get.isEmpty) assert(MyGlobalFlag.get.isEmpty) val flag = new Flags("my", includeGlobal = true) try { flag.parseArgs(Array("-com.twitter.app.MyGlobalFlag", "supplied")) assert(MyGlobalFlag.get.contains("supplied")) } finally { MyGlobalFlag.reset() } } test("GlobalFlag.getWithDefault") { assert(MyGlobalBooleanFlag.getWithDefault.contains(false)) assert(<API key>.getWithDefault.isEmpty) assert(MyGlobalFlag.getWithDefault.contains("a test flag")) val flag = new Flags("my", includeGlobal = true) try { flag.parseArgs(Array("-com.twitter.app.MyGlobalFlag", "supplied")) assert(MyGlobalFlag.getWithDefault.contains("supplied")) } finally { MyGlobalFlag.reset() } } test("GlobalFlag: no default usage") { assert( <API key>.usageString == " -com.twitter.app.<API key>='Int': a global test flag with no default" ) } test("GlobalFlag: implicit value of true for booleans") { assert(!MyGlobalBooleanFlag()) val flag = new Flags("my", includeGlobal = true) flag.parseArgs(Array("-com.twitter.app.MyGlobalBooleanFlag")) assert(MyGlobalBooleanFlag()) MyGlobalBooleanFlag.reset() } test("GlobalFlag") { assert(MyGlobalFlag() == "a test flag") val flag = new Flags("my", includeGlobal = true) flag.parseArgs(Array("-com.twitter.app.MyGlobalFlag", "okay")) assert(MyGlobalFlag() == "okay") MyGlobalFlag.reset() assert(MyGlobalFlag() == "a test flag") MyGlobalFlag.let("not okay") { assert(MyGlobalFlag() == "not okay") } } test("GlobalFlag.getAll") { val mockClassLoader = new MockClassLoader(getClass.getClassLoader) val flags = GlobalFlag.getAll(mockClassLoader) assert(flags.toSet == flagSet) } private class MockClassLoader(realClassLoader: ClassLoader) extends ClassLoader(realClassLoader) { private val isValidClassName = (className: String) => flagSet .map(_.getClass.getName) .contains(className) override def loadClass(name: String): Class[_] = if (isValidClassName(name)) realClassLoader.loadClass(name) else null } }
package net.bytebuddy.description.field; import net.bytebuddy.ClassFileVersion; import net.bytebuddy.description.annotation.AnnotationList; import net.bytebuddy.description.type.TypeDefinition; import net.bytebuddy.description.type.TypeDescription; import net.bytebuddy.test.packaging.<API key>; import org.junit.Before; import org.junit.Test; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.List; import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; public abstract class <API key> { private Field first, second, genericField; protected abstract FieldDescription.InDefinedShape describe(Field field); @Before public void setUp() throws Exception { first = FirstSample.class.getDeclaredField("first"); second = SecondSample.class.getDeclaredField("second"); genericField = GenericField.class.getDeclaredField("foo"); } @Test public void testPrecondition() throws Exception { assertThat(describe(first), not(describe(second))); assertThat(describe(first), is(describe(first))); assertThat(describe(second), is(describe(second))); assertThat(describe(first), is((FieldDescription) new FieldDescription.ForLoadedField(first))); assertThat(describe(second), is((FieldDescription) new FieldDescription.ForLoadedField(second))); } @Test public void testFieldType() throws Exception { assertThat(describe(first).getType(), is((TypeDefinition) TypeDescription.ForLoadedType.of(first.getType()))); assertThat(describe(second).getType(), is((TypeDefinition) TypeDescription.ForLoadedType.of(second.getType()))); } @Test public void testFieldName() throws Exception { assertThat(describe(first).getName(), is(first.getName())); assertThat(describe(second).getName(), is(second.getName())); assertThat(describe(first).getInternalName(), is(first.getName())); assertThat(describe(second).getInternalName(), is(second.getName())); } @Test public void testDescriptor() throws Exception { assertThat(describe(first).getDescriptor(), is(Type.getDescriptor(first.getType()))); assertThat(describe(second).getDescriptor(), is(Type.getDescriptor(second.getType()))); } @Test public void testFieldModifier() throws Exception { assertThat(describe(first).getModifiers(), is(first.getModifiers())); assertThat(describe(second).getModifiers(), is(second.getModifiers())); } @Test @SuppressWarnings("cast") public void <API key>() throws Exception { assertThat(describe(first).getDeclaringType(), is((TypeDescription) TypeDescription.ForLoadedType.of(first.getDeclaringClass()))); assertThat(describe(second).getDeclaringType(), is((TypeDescription) TypeDescription.ForLoadedType.of(second.getDeclaringClass()))); } @Test public void testHashCode() throws Exception { assertThat(describe(first).hashCode(), is(TypeDescription.ForLoadedType.of(FirstSample.class).hashCode() + 31 * (17 + first.getName().hashCode()))); assertThat(describe(second).hashCode(), is(TypeDescription.ForLoadedType.of(SecondSample.class).hashCode() + 31 * (17 + second.getName().hashCode()))); assertThat(describe(first).hashCode(), is(describe(first).hashCode())); assertThat(describe(second).hashCode(), is(describe(second).hashCode())); assertThat(describe(first).hashCode(), not(describe(second).hashCode())); } @Test public void testEquals() throws Exception { FieldDescription identical = describe(first); assertThat(identical, is(identical)); FieldDescription equalFirst = mock(FieldDescription.class); when(equalFirst.getName()).thenReturn(first.getName()); when(equalFirst.getDeclaringType()).thenReturn(TypeDescription.ForLoadedType.of(FirstSample.class)); assertThat(describe(first), is(equalFirst)); FieldDescription equalSecond = mock(FieldDescription.class); when(equalSecond.getName()).thenReturn(second.getName()); when(equalSecond.getDeclaringType()).thenReturn(TypeDescription.ForLoadedType.of(SecondSample.class)); assertThat(describe(second), is(equalSecond)); FieldDescription equalFirstTypeOnly = mock(FieldDescription.class); when(equalFirstTypeOnly.getName()).thenReturn(second.getName()); when(equalFirstTypeOnly.getDeclaringType()).thenReturn(TypeDescription.ForLoadedType.of(FirstSample.class)); assertThat(describe(first), not(equalFirstTypeOnly)); FieldDescription equalFirstNameOnly = mock(FieldDescription.class); when(equalFirstNameOnly.getName()).thenReturn(first.getName()); when(equalFirstNameOnly.getDeclaringType()).thenReturn(TypeDescription.ForLoadedType.of(SecondSample.class)); assertThat(describe(first), not(equalFirstNameOnly)); assertThat(describe(first), not(equalSecond)); assertThat(describe(first), not(new Object())); assertThat(describe(first), not(equalTo(null))); } @Test public void testToString() throws Exception { assertThat(describe(first).toString(), is(first.toString())); assertThat(describe(second).toString(), is(second.toString())); } @Test public void testSynthetic() throws Exception { assertThat(describe(first).isSynthetic(), is(first.isSynthetic())); assertThat(describe(second).isSynthetic(), is(second.isSynthetic())); } @Test public void testTransient() throws Exception { assertThat(describe(first).isTransient(), is(Modifier.isTransient(first.getModifiers()))); assertThat(describe(TransientSample.class.getDeclaredField("foo")).isTransient(), is(Modifier.isTransient(TransientSample.class.getDeclaredField("foo").getModifiers()))); } @Test public void testIsVisibleTo() throws Exception { assertThat(describe(PublicType.class.getDeclaredField("publicField")) .isVisibleTo(TypeDescription.ForLoadedType.of(PublicType.class)), is(true)); assertThat(describe(PublicType.class.getDeclaredField("protectedField")) .isVisibleTo(TypeDescription.ForLoadedType.of(PublicType.class)), is(true)); assertThat(describe(PublicType.class.getDeclaredField("packagePrivateField")) .isVisibleTo(TypeDescription.ForLoadedType.of(PublicType.class)), is(true)); assertThat(describe(PublicType.class.getDeclaredField("privateField")) .isVisibleTo(TypeDescription.ForLoadedType.of(PublicType.class)), is(true)); assertThat(describe(PublicType.class.getDeclaredField("publicField")) .isVisibleTo(TypeDescription.ForLoadedType.of(FirstSample.class)), is(true)); assertThat(describe(PublicType.class.getDeclaredField("protectedField")) .isVisibleTo(TypeDescription.ForLoadedType.of(FirstSample.class)), is(true)); assertThat(describe(PublicType.class.getDeclaredField("packagePrivateField")) .isVisibleTo(TypeDescription.ForLoadedType.of(FirstSample.class)), is(true)); assertThat(describe(PublicType.class.getDeclaredField("privateField")) .isVisibleTo(TypeDescription.ForLoadedType.of(FirstSample.class)), is(ClassFileVersion.of(FirstSample.class).isAtLeast(ClassFileVersion.JAVA_V11))); assertThat(describe(PublicType.class.getDeclaredField("publicField")) .isVisibleTo(TypeDescription.OBJECT), is(true)); assertThat(describe(PublicType.class.getDeclaredField("protectedField")) .isVisibleTo(TypeDescription.OBJECT), is(false)); assertThat(describe(PublicType.class.getDeclaredField("packagePrivateField")) .isVisibleTo(TypeDescription.OBJECT), is(false)); assertThat(describe(PublicType.class.getDeclaredField("privateField")) .isVisibleTo(TypeDescription.OBJECT), is(false)); assertThat(describe(PublicType.class.getDeclaredField("publicField")) .isVisibleTo(TypeDescription.ForLoadedType.of(<API key>.class)), is(true)); assertThat(describe(PublicType.class.getDeclaredField("protectedField")) .isVisibleTo(TypeDescription.ForLoadedType.of(<API key>.class)), is(true)); assertThat(describe(PublicType.class.getDeclaredField("packagePrivateField")) .isVisibleTo(TypeDescription.ForLoadedType.of(<API key>.class)), is(false)); assertThat(describe(PublicType.class.getDeclaredField("privateField")) .isVisibleTo(TypeDescription.ForLoadedType.of(<API key>.class)), is(false)); assertThat(describe(PackagePrivateType.class.getDeclaredField("publicField")) .isVisibleTo(TypeDescription.OBJECT), is(false)); assertThat(describe(PackagePrivateType.class.getDeclaredField("protectedField")) .isVisibleTo(TypeDescription.OBJECT), is(false)); assertThat(describe(PackagePrivateType.class.getDeclaredField("packagePrivateField")) .isVisibleTo(TypeDescription.OBJECT), is(false)); assertThat(describe(PackagePrivateType.class.getDeclaredField("privateField")) .isVisibleTo(TypeDescription.OBJECT), is(false)); assertThat(describe(<API key>.class.getDeclaredField("packagePrivateType")) .isVisibleTo(TypeDescription.ForLoadedType.of(<API key>.class)), is(true)); assertThat(describe(<API key>.class.getDeclaredField("packagePrivateType")) .isVisibleTo(TypeDescription.OBJECT), is(true)); } @Test public void testAnnotations() throws Exception { assertThat(describe(first).<API key>(), is((AnnotationList) new AnnotationList.Empty())); assertThat(describe(second).<API key>(), is((AnnotationList) new AnnotationList.<API key>(second.<API key>()))); } @Test @SuppressWarnings("cast") public void testGenericTypes() throws Exception { assertThat(describe(genericField).getType(), is(TypeDefinition.Sort.describe(genericField.getGenericType()))); assertThat(describe(genericField).getType().asErasure(), is((TypeDescription) TypeDescription.ForLoadedType.of(genericField.getType()))); } @Test public void testToGenericString() throws Exception { assertThat(describe(genericField).toGenericString(), is(genericField.toGenericString())); } @Test public void <API key>() throws Exception { assertThat(describe(first).getActualModifiers(), is(first.getModifiers())); assertThat(describe(DeprecationSample.class.getDeclaredField("foo")).getActualModifiers(), is(Opcodes.ACC_DEPRECATED | Opcodes.ACC_PRIVATE)); } @Test public void testSyntheticField() throws Exception { assertThat(describe(SyntheticField.class.getDeclaredFields()[0]).getModifiers(), is(SyntheticField.class.getDeclaredFields()[0].getModifiers())); assertThat(describe(SyntheticField.class.getDeclaredFields()[0]).isSynthetic(), is(SyntheticField.class.getDeclaredFields()[0].isSynthetic())); } @Retention(RetentionPolicy.RUNTIME) private @interface SampleAnnotation { } @SuppressWarnings("unused") protected static class FirstSample { private Void first; } @SuppressWarnings("unused") protected static class SecondSample { @SampleAnnotation int second; } @SuppressWarnings("unused") public static class PublicType { public Void publicField; protected Void protectedField; Void packagePrivateField; private Void privateField; } @SuppressWarnings("unused") static class PackagePrivateType { public Void publicField; protected Void protectedField; Void packagePrivateField; private Void privateField; } @SuppressWarnings("unused") static class GenericField { List<String> foo; } public static class <API key> { public PackagePrivateType packagePrivateType; } private static class DeprecationSample { @Deprecated private Void foo; } private class SyntheticField { @SuppressWarnings("unused") Object m() { // Since Java 18, a reference to the outer class is required to retain the synthetic field. return <API key>.this; } } private static class TransientSample { public transient Void foo; } }
<?php namespace app\modules\rbac\models\search; use yii\base\Model; use yii\data\ActiveDataProvider; /** * Class AssignmentSearch * @package yii2mod\rbac\models\search */ class AssignmentSearch extends Model { /** * @var integer id */ public $id; /** * @var string username */ public $username; /** * Returns the validation rules for attributes. * * Validation rules are used by [[validate()]] to check if attribute values are valid. * Child classes may override this method to declare different validation rules. * @return array */ public function rules() { return [ [['id', 'username'], 'safe'], ]; } /** * Returns the attribute labels. * * Attribute labels are mainly used for display purpose. For example, given an attribute * `firstName`, we can declare a label `First Name` which is more user-friendly and can * be displayed to end users. * * @return array attribute labels (name => label) */ public function attributeLabels() { return [ 'id' => 'ID', 'username' => 'Username', ]; } /** * Search * @param array $params * @param \yii\db\ActiveRecord $class * @param string $usernameField * * @return \yii\data\ActiveDataProvider */ public function search($params, $class, $usernameField) { $query = $class::find(); $dataProvider = new ActiveDataProvider([ 'query' => $query, ]); if (!($this->load($params) && $this->validate())) { return $dataProvider; } $query->andFilterWhere(['id' => $this->id]); $query->andFilterWhere(['like', $usernameField, $this->username]); return $dataProvider; } }
layout: post title: Maven-Maven date: 2017-02-13 16:16:16 categories: [Maven] tags: [maven,plugin] baseline: - -Dmaven.test.skip=true - -f pom.xml Maven Lifecycle - clean target - validate - compile java - test - packaging jar war - verify test test - install - deploy # <API key> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId><API key></artifactId> <configuration> <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> <<API key>>true</<API key>> </configuration> </plugin> # <API key> https://maven.apache.org/plugins/<API key>/index.html <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId><API key></artifactId> <version>2.7</version> <executions> <execution> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> </execution> </executions> <configuration> <includeScope>system</includeScope> <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/lib</outputDirectory> </configuration> </plugin> # maven-war-plugin <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <<API key>>true</<API key>> <webResources> <resource> <directory>../lib</directory> <targetPath>WEB-INF/lib</targetPath> <includes> <include>**/*.jar</include> </includes> </resource> </webResources> </configuration> </plugin> # Maven Deploy <plugin> <groupId>com.github.wvengen</groupId> <artifactId><API key></artifactId> <version>2.0.7</version> <executions> <execution> <phase>package</phase> <goals> <goal>proguard</goal> </goals> </execution> </executions> <configuration> <attach>true</attach> <<API key>>pg</<API key>> <!-- attach install deploy pg --> <options> <!-- ProGuard --> <!--<option>-dontobfuscate</option>--> <option>-ignorewarnings</option> <option>-dontshrink</option> <!-- shrink --> <option>-dontoptimize</option> <!-- optimize --> <option>-<API key></option> <option>-<API key></option> <option>-repackageclasses org.noahx.proguard.example.project2.pg</option> <!-- Keepa,b,c --> <option>-keep class **.package-info</option> <option>-keepattributes Signature</option> <!--JAXB NEED JAXB JAXB <!-- Jaxb requires generics to be available to perform xml parsing and without this option ProGuard was not retaining that information after obfuscation. That was causing the exception above. --> <option>-keepattributes SourceFile,LineNumberTable,*Annotation*</option> <option>-keepclassmembers enum org.noahx.proguard.example.project2.** { *;}</option> <!-- valueOf --> <option>-keep class org.noahx.proguard.example.project2.bean.** { *;}</option> <!-- Bean Bean --> <option>-keep class org.noahx.proguard.example.project2.Project2 { public void init(); public void destroy(); } </option> </options> <outjar>${project.build.finalName}-pg</outjar> <libs> <lib>${java.home}/lib/rt.jar</lib> </libs> </configuration> </plugin> # <API key> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId><API key></artifactId> <version>1.3.2</version> <configuration> <configurationFile>src/main/resources/mybatis-generator.xml</configurationFile> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> <dependencies> <dependency> <groupId>org.mybatis.generator</groupId> <artifactId><API key></artifactId> <version>1.3.2</version> </dependency> </dependencies> </plugin> mvn mybatis-generator:generate -DskipTests -X > http://blog.csdn.net/woshixuye/article/details/8133050
var connect = require('connect'); connect.createServer( connect.static(__dirname + "/../docs") ).listen(8080).on('error', function(err){ console.error('Error starting http server for docs.\nMake sure the port is not in use.'); throw err; }) console.log("Server started at http://localhost:8080");
# Documentation ## Performance monitoring The Spark Cassandra Connector utilizes the Codahale metrics system to expose information on the latency and throughput of Cassandra operations. Internal Spark metrics Spark internal metrics are visible in Spark UI. The user is able to browse application stages and particular tasks along with the amount of data which was read, written and how long it took. Because of a limitation in the Spark metrics system the amount of data that has been read or written in a task will be marked as a Hadoop operation. Spark doesn't allow custom labels in their metric system and the Connector is not actually passing data through Hadoop. However, it doesn't really matter because it is just label. Codahale metrics The Connector metrics are also exposed through Spark's metric system in both the executor and the driver. To access these metrics add a new source called cassandra-connector in your `metrics.properties` file. Example: cassandra-connector.sink.csv.class=org.apache.spark.metrics.sink.CsvSink cassandra-connector.sink.csv.period=5 cassandra-connector.sink.csv.unit=seconds cassandra-connector.sink.csv.directory=/tmp/spark/sink Performance impact While there should be a minimal performance effect from collecting metrics, Metric collection can be disabled by setting the following options in the Spark configuration: - `spark.cassandra.input.metrics` - set to `false` to disable collection of input metrics - `spark.cassandra.output.metrics` - set to `false` to disable collection of output metrics Available metrics Metric name | Unit description write-byte-meter | Number of bytes written to Cassandra write-row-meter | Number of rows written to Cassandra write-batch-timer | Batch write time length <API key> | The length of time batches sit in the queue before being submitted to C* write-task-timer | Timer to measure time of writing a single partition <API key> | Number successfully written batches <API key> | Number of failed batches read-byte-meter | Number of bytes read from Cassandra read-row-meter | Number of rows read from Cassandra <API key> | The Time spent by the driver waiting for rows to be paged in from C* read-task-timer | Timer to measure time of reading a single partition [Next - Building And Artifacts](doc/<API key>.md)
FROM ubuntu MAINTAINER Stephen Liang "docker-maint@stephenliang.pw"
<!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 World</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? Are you Peter?</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> //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(data); $('#nameInput').hide(); getNames(); }); } }); //Retreive all the visitors from the database function getNames(){ $.get("./api/visitors") .done(function(data) { if(data.length > 0) { $('#databaseNames').html("Database contents: " + JSON.stringify(data)); } }); } //Call getNames on page load. getNames(); </script> </body> </html>
var searchData= [ ['objectidsegmenter',['ObjectIdSegmenter',['../classdroid_1_1_runtime_1_1_utilities_1_1_game_objects_1_1_neodroid_camera_1_1_segmentation_1_1_object_id_segmenter.html',1,'droid::Runtime::Utilities::GameObjects::NeodroidCamera::Segmentation']]], ['objectivefunction',['ObjectiveFunction',['../<API key>.html',1,'droid::Runtime::Prototyping::Evaluation']]], ['<API key>',['<API key>',['../classdroid_1_1_runtime_1_1_prototyping_1_1_configurables_1_1_object_spawner_configurable.html',1,'droid::Runtime::Prototyping::Configurables']]], ['obsoletesegmenter',['ObsoleteSegmenter',['../classdroid_1_1_runtime_1_1_utilities_1_1_game_objects_1_1_neodroid_camera_1_1_segmentation_1_1_obsolete_1_1_obsolete_segmenter.html',1,'droid::Runtime::Utilities::GameObjects::NeodroidCamera::Segmentation::Obsolete']]], ['obstruction',['Obstruction',['../<API key>.html',1,'droid::Runtime::Utilities::Misc::Extensions']]], ['occupancy3dsensor',['Occupancy3dSensor',['../classdroid_1_1_runtime_1_1_prototyping_1_1_sensors_1_1_occupancy_1_1_occupancy3d_sensor.html',1,'droid::Runtime::Prototyping::Sensors::Occupancy']]], ['outpose',['OutPose',['../<API key>.html',1,'droid::Runtime::Utilities::Structs']]] ];
import ovlib from ovlib.eventslib import event_waiter, EventsCode mac_pool = context.macpools.get("Default") try: dc = context.datacenters.get(host_name) except ovlib.OVLibErrorNotFound: dc = context.datacenters.add(data_center={'name': host_name, 'local': True, 'storage_format': 'V4', 'mac_pool': mac_pool}) dc_net_vlan = set() dc_nets_id = set() for net in dc.networks.list(): if net.vlan is not None: dc_net_vlan.add(net.vlan.id) if net.name == "ovirtmgmt" and net.mtu != 9000: net.update(network={'mtu': 9000}) dc_nets_id.add(net.id) try: cluster = context.clusters.get(host_name) except ovlib.OVLibErrorNotFound: cluster = context.clusters.add(cluster={'name': host_name, 'cpu': {'type': 'AMD Opteron G3'}, 'data_center': dc, 'mac_pool': mac_pool}) futurs = [] for (name, vlan) in (("VLAN1", 1), ("VLAN2", 2), ('VLAN3', 3)): if not vlan in dc_net_vlan: new_net = context.networks.add(network={'name': name, 'vlan': {'id': "%d" % vlan} , 'mtu': 9000, 'data_center': dc, 'usages': ['VM'], }, wait= False) futurs.append(new_net) for f in futurs: network = f.wait() dc_nets_id.add(network.id) cluster_nets_id = set() for net in cluster.networks.list(): cluster_nets_id.add(net.id) futurs = [] for missing in dc_nets_id - cluster_nets_id: futurs.append(cluster.networks.add(network={'id': missing, 'required': False}, wait=False)) try: host = context.hosts.get(host_name) except ovlib.OVLibErrorNotFound: events_returned = [] waiting_events = [EventsCode.VDS_DETECTED] with event_waiter(context, "host.name=%s" % host_name, events_returned, verbose=True, break_on=waiting_events): host = context.hosts.add(host={ 'name': host_name, 'address': host_name, 'cluster': cluster, 'override_iptables': False, 'ssh': {'<API key>: 'PUBLICKEY'}, 'power_management': { 'enabled': True, 'kdump_detection': False, 'pm_proxies': [{'type': 'CLUSTER'}, {'type': 'DC'}, {'type': 'OTHER_DC'}] } }, wait=True) host.refresh() storages = host.storage.list() if len(storages) == 1 and storages[0].type.name == 'FCP' and storages[0].type.name == 'FCP' and storages[0].logical_units[0].status.name == 'FREE': lu = {'id': storages[0].id} vg = {'logical_units': [lu]} storage = {'type': 'FCP', 'volume_group': vg} sd = {'name': host_name, 'type': 'DATA', 'data_center': dc, 'host': host, 'storage': storage} sd = context.storagedomains.add(storage_domain={'name': host_name, 'type': 'DATA', 'data_center': dc, 'host': host, 'storage': storage}) else: sd = context.storagedomains.get(host_name) events_returned = [] waiting_events = [EventsCode.VDS_DETECTED] if(host.status.name != 'UP'): with event_waiter(context, "host.name=%s" % host_name, events_returned, verbose=True, break_on=waiting_events): print(events_returned) if sd.status is not None and sd.status.value == 'unattached': futurs.append(dc.storage_domains.add(storage_domain=sd, wait=False)) if host.<API key>.product_name is not None and len(list(host.fence_agents.list())) == 0: fence_agent_type={'ProLiant DL185 G5': 'ipmilan'}[host.<API key>.product_name] futurs.append(host.fence_agents.add(agent={'address': host_name + "-ilo", 'username': 'admin', 'password': 'password', 'type': fence_agent_type, 'order': 1}, wait=False)) for f in futurs: pf.wait()
<html><head><title>dlib C++ Library - ranking.cpp</title></head><body bgcolor='white'><pre> <font color=' </font><font color=' </font><font color='#0000FF'>#include</font> <font color='#5555FF'>&lt;</font>dlib<font color='#5555FF'>/</font>svm.h<font color='#5555FF'>&gt;</font> <font color='#0000FF'>#include</font> <font color='#5555FF'>&lt;</font>dlib<font color='#5555FF'>/</font>rand.h<font color='#5555FF'>&gt;</font> <font color='#0000FF'>#include</font> <font color='#5555FF'>&lt;</font>sstream<font color='#5555FF'>&gt;</font> <font color='#0000FF'>#include</font> <font color='#5555FF'>&lt;</font>string<font color='#5555FF'>&gt;</font> <font color='#0000FF'>#include</font> <font color='#5555FF'>&lt;</font>cstdlib<font color='#5555FF'>&gt;</font> <font color='#0000FF'>#include</font> <font color='#5555FF'>&lt;</font>ctime<font color='#5555FF'>&gt;</font> <font color='#0000FF'>#include</font> <font color='#5555FF'>&lt;</font>map<font color='#5555FF'>&gt;</font> <font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='tester.h.html'>tester.h</a>" <font color='#0000FF'>namespace</font> <b>{</b> <font color='#0000FF'>using</font> <font color='#0000FF'>namespace</font> test; <font color='#0000FF'>using</font> <font color='#0000FF'>namespace</font> dlib; <font color='#0000FF'>using</font> <font color='#0000FF'>namespace</font> std; logger <b><a name='dlog'></a>dlog</b><font face='Lucida Console'>(</font>"<font color='#CC0000'>test.ranking</font>"<font face='Lucida Console'>)</font>; <font color=' </font> <font color='#0000FF'>template</font> <font color='#5555FF'>&lt;</font><font color='#0000FF'>typename</font> T<font color='#5555FF'>&gt;</font> <font color='#0000FF'><u>void</u></font> <b><a name='<API key>'></a><API key></b> <font face='Lucida Console'>(</font> <font color='#0000FF'>const</font> std::vector<font color='#5555FF'>&lt;</font>T<font color='#5555FF'>&gt;</font><font color='#5555FF'>&amp;</font> x, <font color='#0000FF'>const</font> std::vector<font color='#5555FF'>&lt;</font>T<font color='#5555FF'>&gt;</font><font color='#5555FF'>&amp;</font> y, std::vector<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font><font color='#5555FF'>&gt;</font><font color='#5555FF'>&amp;</font> x_count, std::vector<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font><font color='#5555FF'>&gt;</font><font color='#5555FF'>&amp;</font> y_count <font face='Lucida Console'>)</font> <b>{</b> x_count.<font color='#BB00BB'>assign</font><font face='Lucida Console'>(</font>x.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>,<font color='#979000'>0</font><font face='Lucida Console'>)</font>; y_count.<font color='#BB00BB'>assign</font><font face='Lucida Console'>(</font>y.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>,<font color='#979000'>0</font><font face='Lucida Console'>)</font>; <font color='#0000FF'>for</font> <font face='Lucida Console'>(</font><font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font> i <font color='#5555FF'>=</font> <font color='#979000'>0</font>; i <font color='#5555FF'>&lt;</font> x.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <font color='#5555FF'>+</font><font color='#5555FF'>+</font>i<font face='Lucida Console'>)</font> <b>{</b> <font color='#0000FF'>for</font> <font face='Lucida Console'>(</font><font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font> j <font color='#5555FF'>=</font> <font color='#979000'>0</font>; j <font color='#5555FF'>&lt;</font> y.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <font color='#5555FF'>+</font><font color='#5555FF'>+</font>j<font face='Lucida Console'>)</font> <b>{</b> <font color='#0000FF'>if</font> <font face='Lucida Console'>(</font>x[i] <font color='#5555FF'>&lt;</font><font color='#5555FF'>=</font> y[j]<font face='Lucida Console'>)</font> <b>{</b> x_count[i]<font color='#5555FF'>+</font><font color='#5555FF'>+</font>; y_count[j]<font color='#5555FF'>+</font><font color='#5555FF'>+</font>; <b>}</b> <b>}</b> <b>}</b> <b>}</b> <font color=' </font> <font color='#0000FF'><u>void</u></font> <b><a name='<API key>'></a><API key></b><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <b>{</b> <font color='#BB00BB'>print_spinner</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>in <API key>()</font>"; dlib::rand rnd; std::vector<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>int</u></font><font color='#5555FF'>&gt;</font> x, y; std::vector<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font><font color='#5555FF'>&gt;</font> x_count, y_count; std::vector<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font><font color='#5555FF'>&gt;</font> x_count2, y_count2; <font color='#0000FF'>for</font> <font face='Lucida Console'>(</font><font color='#0000FF'><u>int</u></font> iter <font color='#5555FF'>=</font> <font color='#979000'>0</font>; iter <font color='#5555FF'>&lt;</font> <font color='#979000'>5000</font>; <font color='#5555FF'>+</font><font color='#5555FF'>+</font>iter<font face='Lucida Console'>)</font> <b>{</b> x.<font color='#BB00BB'>resize</font><font face='Lucida Console'>(</font>rnd.<font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font><font color='#5555FF'>%</font><font color='#979000'>10</font><font face='Lucida Console'>)</font>; y.<font color='#BB00BB'>resize</font><font face='Lucida Console'>(</font>rnd.<font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font><font color='#5555FF'>%</font><font color='#979000'>10</font><font face='Lucida Console'>)</font>; <font color='#0000FF'>for</font> <font face='Lucida Console'>(</font><font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font> i <font color='#5555FF'>=</font> <font color='#979000'>0</font>; i <font color='#5555FF'>&lt;</font> x.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <font color='#5555FF'>+</font><font color='#5555FF'>+</font>i<font face='Lucida Console'>)</font> x[i] <font color='#5555FF'>=</font> <font face='Lucida Console'>(</font><font face='Lucida Console'>(</font><font color='#0000FF'><u>int</u></font><font face='Lucida Console'>)</font>rnd.<font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font><font color='#5555FF'>%</font><font color='#979000'>10</font><font face='Lucida Console'>)</font> <font color='#5555FF'>-</font> <font color='#979000'>5</font>; <font color='#0000FF'>for</font> <font face='Lucida Console'>(</font><font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font> i <font color='#5555FF'>=</font> <font color='#979000'>0</font>; i <font color='#5555FF'>&lt;</font> y.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <font color='#5555FF'>+</font><font color='#5555FF'>+</font>i<font face='Lucida Console'>)</font> y[i] <font color='#5555FF'>=</font> <font face='Lucida Console'>(</font><font face='Lucida Console'>(</font><font color='#0000FF'><u>int</u></font><font face='Lucida Console'>)</font>rnd.<font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font><font color='#5555FF'>%</font><font color='#979000'>10</font><font face='Lucida Console'>)</font> <font color='#5555FF'>-</font> <font color='#979000'>5</font>; <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>x, y, x_count, y_count<font face='Lucida Console'>)</font>; <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>x, y, x_count2, y_count2<font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>mat</font><font face='Lucida Console'>(</font>x_count<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#BB00BB'>mat</font><font face='Lucida Console'>(</font>x_count2<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>mat</font><font face='Lucida Console'>(</font>y_count<font face='Lucida Console'>)</font> <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#BB00BB'>mat</font><font face='Lucida Console'>(</font>y_count2<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; <b>}</b> <b>}</b> <font color=' </font> <font color='#0000FF'><u>void</u></font> <b><a name='run_prior_test'></a>run_prior_test</b><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <b>{</b> <font color='#BB00BB'>print_spinner</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <font color='#0000FF'>typedef</font> matrix<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>double</u></font>,<font color='#979000'>3</font>,<font color='#979000'>1</font><font color='#5555FF'>&gt;</font> sample_type; <font color='#0000FF'>typedef</font> linear_kernel<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> kernel_type; svm_rank_trainer<font color='#5555FF'>&lt;</font>kernel_type<font color='#5555FF'>&gt;</font> trainer; ranking_pair<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> data; sample_type samp; samp <font color='#5555FF'>=</font> <font color='#979000'>0</font>, <font color='#979000'>0</font>, <font color='#979000'>1</font>; data.relevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp <font color='#5555FF'>=</font> <font color='#979000'>0</font>, <font color='#979000'>1</font>, <font color='#979000'>0</font>; data.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'>set_c</font><font face='Lucida Console'>(</font><font color='#979000'>10</font><font face='Lucida Console'>)</font>; decision_function<font color='#5555FF'>&lt;</font>kernel_type<font color='#5555FF'>&gt;</font> df <font color='#5555FF'>=</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>data<font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'>set_prior</font><font face='Lucida Console'>(</font>df<font face='Lucida Console'>)</font>; data.relevant.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; data.nonrelevant.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; samp <font color='#5555FF'>=</font> <font color='#979000'>1</font>, <font color='#979000'>0</font>, <font color='#979000'>0</font>; data.relevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp <font color='#5555FF'>=</font> <font color='#979000'>0</font>, <font color='#979000'>1</font>, <font color='#979000'>0</font>; data.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; df <font color='#5555FF'>=</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>data<font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'>trans</font><font face='Lucida Console'>(</font>df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&gt;</font> <font color='#979000'>0</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>(</font><font color='#979000'>1</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&lt;</font> <font color='#979000'>0</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>(</font><font color='#979000'>2</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&gt;</font> <font color='#979000'>0</font><font face='Lucida Console'>)</font>; <b>}</b> <font color=' </font> <font color='#0000FF'><u>void</u></font> <b><a name='<API key>'></a><API key></b><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <b>{</b> <font color='#BB00BB'>print_spinner</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <font color='#0000FF'>typedef</font> std::map<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font>,<font color='#0000FF'><u>double</u></font><font color='#5555FF'>&gt;</font> sample_type; <font color='#0000FF'>typedef</font> <API key><font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> kernel_type; svm_rank_trainer<font color='#5555FF'>&lt;</font>kernel_type<font color='#5555FF'>&gt;</font> trainer; ranking_pair<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> data; sample_type samp; samp[<font color='#979000'>0</font>] <font color='#5555FF'>=</font> <font color='#979000'>1</font>; data.relevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; samp[<font color='#979000'>1</font>] <font color='#5555FF'>=</font> <font color='#979000'>1</font>; data.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'>set_c</font><font face='Lucida Console'>(</font><font color='#979000'>10</font><font face='Lucida Console'>)</font>; decision_function<font color='#5555FF'>&lt;</font>kernel_type<font color='#5555FF'>&gt;</font> df <font color='#5555FF'>=</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>data<font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'>set_prior</font><font face='Lucida Console'>(</font>df<font face='Lucida Console'>)</font>; data.relevant.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; data.nonrelevant.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; samp[<font color='#979000'>2</font>] <font color='#5555FF'>=</font> <font color='#979000'>1</font>; data.relevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; samp[<font color='#979000'>1</font>] <font color='#5555FF'>=</font> <font color='#979000'>1</font>; data.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; df <font color='#5555FF'>=</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>data<font face='Lucida Console'>)</font>; matrix<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>double</u></font>,<font color='#979000'>0</font>,<font color='#979000'>1</font><font color='#5555FF'>&gt;</font> w <font color='#5555FF'>=</font> <font color='#BB00BB'>sparse_to_dense</font><font face='Lucida Console'>(</font>df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'>trans</font><font face='Lucida Console'>(</font>w<font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>w</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&gt;</font> <font color='#979000'>0.1</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>w</font><font face='Lucida Console'>(</font><font color='#979000'>1</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&lt;</font> <font color='#5555FF'>-</font><font color='#979000'>0.1</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>w</font><font face='Lucida Console'>(</font><font color='#979000'>2</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&gt;</font> <font color='#979000'>0.1</font><font face='Lucida Console'>)</font>; <b>}</b> <font color=' </font> <font color='#0000FF'><u>void</u></font> <b><a name='dotest1'></a>dotest1</b><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <b>{</b> <font color='#BB00BB'>print_spinner</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>in dotest1()</font>"; <font color='#0000FF'>typedef</font> matrix<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>double</u></font>,<font color='#979000'>4</font>,<font color='#979000'>1</font><font color='#5555FF'>&gt;</font> sample_type; <font color='#0000FF'>typedef</font> linear_kernel<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> kernel_type; svm_rank_trainer<font color='#5555FF'>&lt;</font>kernel_type<font color='#5555FF'>&gt;</font> trainer; std::vector<font color='#5555FF'>&lt;</font>ranking_pair<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> <font color='#5555FF'>&gt;</font> samples; ranking_pair<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> p; sample_type samp; samp <font color='#5555FF'>=</font> <font color='#979000'>0</font>, <font color='#979000'>0</font>, <font color='#979000'>0</font>, <font color='#979000'>1</font>; p.relevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp <font color='#5555FF'>=</font> <font color='#979000'>1</font>, <font color='#979000'>0</font>, <font color='#979000'>0</font>, <font color='#979000'>0</font>; p.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>p<font face='Lucida Console'>)</font>; samp <font color='#5555FF'>=</font> <font color='#979000'>0</font>, <font color='#979000'>0</font>, <font color='#979000'>1</font>, <font color='#979000'>0</font>; p.relevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp <font color='#5555FF'>=</font> <font color='#979000'>1</font>, <font color='#979000'>0</font>, <font color='#979000'>0</font>, <font color='#979000'>0</font>; p.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp <font color='#5555FF'>=</font> <font color='#979000'>0</font>, <font color='#979000'>1</font>, <font color='#979000'>0</font>, <font color='#979000'>0</font>; p.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp <font color='#5555FF'>=</font> <font color='#979000'>0</font>, <font color='#979000'>1</font>, <font color='#979000'>0</font>, <font color='#979000'>0</font>; p.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>p<font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'>set_c</font><font face='Lucida Console'>(</font><font color='#979000'>10</font><font face='Lucida Console'>)</font>; decision_function<font color='#5555FF'>&lt;</font>kernel_type<font color='#5555FF'>&gt;</font> df <font color='#5555FF'>=</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>samples<font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>accuracy: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>; matrix<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>double</u></font>,<font color='#979000'>1</font>,<font color='#979000'>2</font><font color='#5555FF'>&gt;</font> res; res <font color='#5555FF'>=</font> <font color='#979000'>1</font>,<font color='#979000'>1</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>equal</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>, res<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>equal</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>samples[<font color='#979000'>1</font>]<font face='Lucida Console'>)</font>, samples<font face='Lucida Console'>)</font>, res<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'>set_epsilon</font><font face='Lucida Console'>(</font><font color='#979000'>1e</font><font color='#5555FF'>-</font><font color='#979000'>13</font><font face='Lucida Console'>)</font>; df <font color='#5555FF'>=</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>samples<font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font>; sample_type truew; truew <font color='#5555FF'>=</font> <font color='#5555FF'>-</font><font color='#979000'>0.5</font>, <font color='#5555FF'>-</font><font color='#979000'>0.5</font>, <font color='#979000'>0.5</font>, <font color='#979000'>0.5</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>length</font><font face='Lucida Console'>(</font>truew <font color='#5555FF'>-</font> df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&lt;</font> <font color='#979000'>1e</font><font color='#5555FF'>-</font><font color='#979000'>10</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>accuracy: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>equal</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>, res<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>cv-accuracy: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>trainer, samples,<font color='#979000'>2</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>std::<font color='#BB00BB'>abs</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>trainer, samples,<font color='#979000'>2</font><font face='Lucida Console'>)</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font> <font color='#5555FF'>-</font> <font color='#979000'>0.7777777778</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&lt;</font> <font color='#979000'>0.0001</font><font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font><font color='#979000'>true</font><font face='Lucida Console'>)</font>; df <font color='#5555FF'>=</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>samples<font face='Lucida Console'>)</font>; truew <font color='#5555FF'>=</font> <font color='#979000'>0</font>, <font color='#979000'>0</font>, <font color='#979000'>1.0</font>, <font color='#979000'>1.0</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>length</font><font face='Lucida Console'>(</font>truew <font color='#5555FF'>-</font> df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&lt;</font> <font color='#979000'>1e</font><font color='#5555FF'>-</font><font color='#979000'>10</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>accuracy: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>equal</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>, res<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>p<font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>p<font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>p<font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>p<font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>cv-accuracy: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>trainer, samples,<font color='#979000'>4</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>equal</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>trainer, samples,<font color='#979000'>4</font><font face='Lucida Console'>)</font> , res<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font> <font color='#5555FF'>=</font> <font color='#979000'>0</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>BAD RANKING:</font>" <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font><font face='Lucida Console'>(</font><font color='#979000'>1</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&lt;</font> <font color='#979000'>0.5</font><font face='Lucida Console'>)</font>; <b>}</b> <font color=' </font> <font color='#0000FF'><u>void</u></font> <b><a name='<API key>'></a><API key></b><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <b>{</b> <font color='#BB00BB'>print_spinner</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>in <API key>()</font>"; <font color='#0000FF'>typedef</font> std::map<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font>,<font color='#0000FF'><u>double</u></font><font color='#5555FF'>&gt;</font> sample_type; <font color='#0000FF'>typedef</font> <API key><font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> kernel_type; svm_rank_trainer<font color='#5555FF'>&lt;</font>kernel_type<font color='#5555FF'>&gt;</font> trainer; std::vector<font color='#5555FF'>&lt;</font>ranking_pair<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> <font color='#5555FF'>&gt;</font> samples; ranking_pair<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> p; sample_type samp; samp[<font color='#979000'>3</font>] <font color='#5555FF'>=</font> <font color='#979000'>1</font>; p.relevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; samp[<font color='#979000'>0</font>] <font color='#5555FF'>=</font> <font color='#979000'>1</font>; p.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>p<font face='Lucida Console'>)</font>; samp[<font color='#979000'>2</font>] <font color='#5555FF'>=</font> <font color='#979000'>1</font>; p.relevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; samp[<font color='#979000'>0</font>] <font color='#5555FF'>=</font> <font color='#979000'>1</font>; p.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; samp[<font color='#979000'>1</font>] <font color='#5555FF'>=</font> <font color='#979000'>1</font>; p.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; samp[<font color='#979000'>1</font>] <font color='#5555FF'>=</font> <font color='#979000'>1</font>; p.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>samp<font face='Lucida Console'>)</font>; samp.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>p<font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'>set_c</font><font face='Lucida Console'>(</font><font color='#979000'>10</font><font face='Lucida Console'>)</font>; decision_function<font color='#5555FF'>&lt;</font>kernel_type<font color='#5555FF'>&gt;</font> df <font color='#5555FF'>=</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>samples<font face='Lucida Console'>)</font>; matrix<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>double</u></font>,<font color='#979000'>1</font>,<font color='#979000'>2</font><font color='#5555FF'>&gt;</font> res; res <font color='#5555FF'>=</font> <font color='#979000'>1</font>,<font color='#979000'>1</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>accuracy: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>equal</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>, res<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>equal</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>samples[<font color='#979000'>1</font>]<font face='Lucida Console'>)</font>, samples<font face='Lucida Console'>)</font>, res<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'>set_epsilon</font><font face='Lucida Console'>(</font><font color='#979000'>1e</font><font color='#5555FF'>-</font><font color='#979000'>13</font><font face='Lucida Console'>)</font>; df <font color='#5555FF'>=</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>samples<font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'>sparse_to_dense</font><font face='Lucida Console'>(</font>df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; sample_type truew; truew[<font color='#979000'>0</font>] <font color='#5555FF'>=</font> <font color='#5555FF'>-</font><font color='#979000'>0.5</font>; truew[<font color='#979000'>1</font>] <font color='#5555FF'>=</font> <font color='#5555FF'>-</font><font color='#979000'>0.5</font>; truew[<font color='#979000'>2</font>] <font color='#5555FF'>=</font> <font color='#979000'>0.5</font>; truew[<font color='#979000'>3</font>] <font color='#5555FF'>=</font> <font color='#979000'>0.5</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>length</font><font face='Lucida Console'>(</font><font color='#BB00BB'>subtract</font><font face='Lucida Console'>(</font>truew , df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&lt;</font> <font color='#979000'>1e</font><font color='#5555FF'>-</font><font color='#979000'>10</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>accuracy: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>equal</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>, res<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>cv-accuracy: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>trainer, samples,<font color='#979000'>2</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>std::<font color='#BB00BB'>abs</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>trainer, samples,<font color='#979000'>2</font><font face='Lucida Console'>)</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font> <font color='#5555FF'>-</font> <font color='#979000'>0.7777777778</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&lt;</font> <font color='#979000'>0.0001</font><font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font><font color='#979000'>true</font><font face='Lucida Console'>)</font>; df <font color='#5555FF'>=</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>samples<font face='Lucida Console'>)</font>; truew[<font color='#979000'>0</font>] <font color='#5555FF'>=</font> <font color='#979000'>0.0</font>; truew[<font color='#979000'>1</font>] <font color='#5555FF'>=</font> <font color='#979000'>0.0</font>; truew[<font color='#979000'>2</font>] <font color='#5555FF'>=</font> <font color='#979000'>1.0</font>; truew[<font color='#979000'>3</font>] <font color='#5555FF'>=</font> <font color='#979000'>1.0</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'>sparse_to_dense</font><font face='Lucida Console'>(</font>df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>length</font><font face='Lucida Console'>(</font><font color='#BB00BB'>subtract</font><font face='Lucida Console'>(</font>truew , df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&lt;</font> <font color='#979000'>1e</font><font color='#5555FF'>-</font><font color='#979000'>10</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>accuracy: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>equal</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, samples<font face='Lucida Console'>)</font>, res<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>clear</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>p<font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>p<font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>p<font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>p<font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>cv-accuracy: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>trainer, samples,<font color='#979000'>4</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>equal</font><font face='Lucida Console'>(</font><font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>trainer, samples,<font color='#979000'>4</font><font face='Lucida Console'>)</font> , res<font face='Lucida Console'>)</font> <font face='Lucida Console'>)</font>; <b>}</b> <font color=' </font> <font color='#0000FF'>template</font> <font color='#5555FF'>&lt;</font><font color='#0000FF'>typename</font> K, <font color='#0000FF'><u>bool</u></font> use_dcd_trainer<font color='#5555FF'>&gt;</font> <font color='#0000FF'>class</font> <b><a name='simple_rank_trainer'></a>simple_rank_trainer</b> <b>{</b> <font color='#0000FF'>public</font>: <font color='#0000FF'>template</font> <font color='#5555FF'>&lt;</font><font color='#0000FF'>typename</font> T<font color='#5555FF'>&gt;</font> decision_function<font color='#5555FF'>&lt;</font>K<font color='#5555FF'>&gt;</font> <b><a name='train'></a>train</b> <font face='Lucida Console'>(</font> <font color='#0000FF'>const</font> ranking_pair<font color='#5555FF'>&lt;</font>T<font color='#5555FF'>&gt;</font><font color='#5555FF'>&amp;</font> pair <font face='Lucida Console'>)</font> <font color='#0000FF'>const</font> <b>{</b> <font color='#0000FF'>typedef</font> matrix<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>double</u></font>,<font color='#979000'>10</font>,<font color='#979000'>1</font><font color='#5555FF'>&gt;</font> sample_type; std::vector<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> relevant <font color='#5555FF'>=</font> pair.relevant; std::vector<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> nonrelevant <font color='#5555FF'>=</font> pair.nonrelevant; std::vector<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> samples; std::vector<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>double</u></font><font color='#5555FF'>&gt;</font> labels; <font color='#0000FF'>for</font> <font face='Lucida Console'>(</font><font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font> i <font color='#5555FF'>=</font> <font color='#979000'>0</font>; i <font color='#5555FF'>&lt;</font> relevant.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <font color='#5555FF'>+</font><font color='#5555FF'>+</font>i<font face='Lucida Console'>)</font> <b>{</b> <font color='#0000FF'>for</font> <font face='Lucida Console'>(</font><font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font> j <font color='#5555FF'>=</font> <font color='#979000'>0</font>; j <font color='#5555FF'>&lt;</font> nonrelevant.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <font color='#5555FF'>+</font><font color='#5555FF'>+</font>j<font face='Lucida Console'>)</font> <b>{</b> samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>relevant[i] <font color='#5555FF'>-</font> nonrelevant[j]<font face='Lucida Console'>)</font>; labels.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font><font color='#5555FF'>+</font><font color='#979000'>1</font><font face='Lucida Console'>)</font>; samples.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font>nonrelevant[i] <font color='#5555FF'>-</font> relevant[j]<font face='Lucida Console'>)</font>; labels.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font><font color='#5555FF'>-</font><font color='#979000'>1</font><font face='Lucida Console'>)</font>; <b>}</b> <b>}</b> <font color='#0000FF'>if</font> <font face='Lucida Console'>(</font>use_dcd_trainer<font face='Lucida Console'>)</font> <b>{</b> <API key><font color='#5555FF'>&lt;</font>K<font color='#5555FF'>&gt;</font> trainer; trainer.<font color='#BB00BB'>set_c</font><font face='Lucida Console'>(</font><font color='#979000'>1.0</font><font color='#5555FF'>/</font>samples.<font color='#BB00BB'>size</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'>set_epsilon</font><font face='Lucida Console'>(</font><font color='#979000'>1e</font><font color='#5555FF'>-</font><font color='#979000'>10</font><font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font><font color='#979000'>true</font><font face='Lucida Console'>)</font>; <font color='#009900'>//trainer.be_verbose(); </font> <font color='#0000FF'>return</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>samples, labels<font face='Lucida Console'>)</font>; <b>}</b> <font color='#0000FF'>else</font> <b>{</b> <API key><font color='#5555FF'>&lt;</font>K<font color='#5555FF'>&gt;</font> trainer; trainer.<font color='#BB00BB'>set_c</font><font face='Lucida Console'>(</font><font color='#979000'>1.0</font><font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'>set_epsilon</font><font face='Lucida Console'>(</font><font color='#979000'>1e</font><font color='#5555FF'>-</font><font color='#979000'>13</font><font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font><font color='#979000'>true</font><font face='Lucida Console'>)</font>; <font color='#009900'>//trainer.be_verbose(); </font> decision_function<font color='#5555FF'>&lt;</font>K<font color='#5555FF'>&gt;</font> df <font color='#5555FF'>=</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>samples, labels<font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST_MSG</font><font face='Lucida Console'>(</font>df.b <font color='#5555FF'>=</font><font color='#5555FF'>=</font> <font color='#979000'>0</font>, df.b<font face='Lucida Console'>)</font>; <font color='#0000FF'>return</font> df; <b>}</b> <b>}</b> <b>}</b>; <font color='#0000FF'>template</font> <font color='#5555FF'>&lt;</font><font color='#0000FF'><u>bool</u></font> use_dcd_trainer<font color='#5555FF'>&gt;</font> <font color='#0000FF'><u>void</u></font> <b><a name='<API key>'></a><API key></b><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font> <b>{</b> <font color='#BB00BB'>print_spinner</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>use_dcd_trainer: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> use_dcd_trainer; <font color='#0000FF'>typedef</font> matrix<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>double</u></font>,<font color='#979000'>10</font>,<font color='#979000'>1</font><font color='#5555FF'>&gt;</font> sample_type; <font color='#0000FF'>typedef</font> linear_kernel<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> kernel_type; ranking_pair<font color='#5555FF'>&lt;</font>sample_type<font color='#5555FF'>&gt;</font> pair; <font color='#0000FF'>for</font> <font face='Lucida Console'>(</font><font color='#0000FF'><u>int</u></font> i <font color='#5555FF'>=</font> <font color='#979000'>0</font>; i <font color='#5555FF'>&lt;</font> <font color='#979000'>20</font>; <font color='#5555FF'>+</font><font color='#5555FF'>+</font>i<font face='Lucida Console'>)</font> <b>{</b> pair.relevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font><font color='#BB00BB'>abs</font><font face='Lucida Console'>(</font><font color='#BB00BB'>gaussian_randm</font><font face='Lucida Console'>(</font><font color='#979000'>10</font>,<font color='#979000'>1</font>,i<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; <b>}</b> <font color='#0000FF'>for</font> <font face='Lucida Console'>(</font><font color='#0000FF'><u>int</u></font> i <font color='#5555FF'>=</font> <font color='#979000'>0</font>; i <font color='#5555FF'>&lt;</font> <font color='#979000'>20</font>; <font color='#5555FF'>+</font><font color='#5555FF'>+</font>i<font face='Lucida Console'>)</font> <b>{</b> pair.nonrelevant.<font color='#BB00BB'>push_back</font><font face='Lucida Console'>(</font><font color='#5555FF'>-</font><font color='#BB00BB'>abs</font><font face='Lucida Console'>(</font><font color='#BB00BB'>gaussian_randm</font><font face='Lucida Console'>(</font><font color='#979000'>10</font>,<font color='#979000'>1</font>,i<font color='#5555FF'>+</font><font color='#979000'>10000</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; pair.nonrelevant.<font color='#BB00BB'>back</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font><font face='Lucida Console'>(</font><font color='#979000'>9</font><font face='Lucida Console'>)</font> <font color='#5555FF'>+</font><font color='#5555FF'>=</font> <font color='#979000'>1</font>; <b>}</b> svm_rank_trainer<font color='#5555FF'>&lt;</font>kernel_type<font color='#5555FF'>&gt;</font> trainer; trainer.<font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font><font color='#979000'>true</font><font face='Lucida Console'>)</font>; trainer.<font color='#BB00BB'>set_epsilon</font><font face='Lucida Console'>(</font><font color='#979000'>1e</font><font color='#5555FF'>-</font><font color='#979000'>13</font><font face='Lucida Console'>)</font>; <font color='#009900'>//trainer.be_verbose(); </font> decision_function<font color='#5555FF'>&lt;</font>kernel_type<font color='#5555FF'>&gt;</font> df; df <font color='#5555FF'>=</font> trainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>pair<font face='Lucida Console'>)</font>; matrix<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>double</u></font>,<font color='#979000'>1</font>,<font color='#979000'>2</font><font color='#5555FF'>&gt;</font> res; res <font color='#5555FF'>=</font> <font color='#979000'>1</font>,<font color='#979000'>1</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>weights: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'>trans</font><font face='Lucida Console'>(</font>df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; <font color='#0000FF'>const</font> matrix<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>double</u></font>,<font color='#979000'>1</font>,<font color='#979000'>2</font><font color='#5555FF'>&gt;</font> acc1 <font color='#5555FF'>=</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df, pair<font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>ranking accuracy: </font>" <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> acc1; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>equal</font><font face='Lucida Console'>(</font>acc1,res<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; simple_rank_trainer<font color='#5555FF'>&lt;</font>kernel_type,use_dcd_trainer<font color='#5555FF'>&gt;</font> strainer; decision_function<font color='#5555FF'>&lt;</font>kernel_type<font color='#5555FF'>&gt;</font> df2; df2 <font color='#5555FF'>=</font> strainer.<font color='#BB00BB'>train</font><font face='Lucida Console'>(</font>pair<font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>weights: </font>"<font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'>trans</font><font face='Lucida Console'>(</font>df2.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; <font color='#0000FF'>const</font> matrix<font color='#5555FF'>&lt;</font><font color='#0000FF'><u>double</u></font>,<font color='#979000'>1</font>,<font color='#979000'>2</font><font color='#5555FF'>&gt;</font> acc2 <font color='#5555FF'>=</font> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font>df2, pair<font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>ranking accuracy: </font>" <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> acc2; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font><font color='#BB00BB'>equal</font><font face='Lucida Console'>(</font>acc2,res<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>w error: </font>" <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'>max</font><font face='Lucida Console'>(</font><font color='#BB00BB'>abs</font><font face='Lucida Console'>(</font>df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font> <font color='#5555FF'>-</font> df2.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font>; dlog <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> LINFO <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> "<font color='#CC0000'>b error: </font>" <font color='#5555FF'>&lt;</font><font color='#5555FF'>&lt;</font> <font color='#BB00BB'>abs</font><font face='Lucida Console'>(</font>df.b <font color='#5555FF'>-</font> df2.b<font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>std::<font color='#BB00BB'>abs</font><font face='Lucida Console'>(</font><font color='#BB00BB'>max</font><font face='Lucida Console'>(</font><font color='#BB00BB'>abs</font><font face='Lucida Console'>(</font>df.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font> <font color='#5555FF'>-</font> df2.<font color='#BB00BB'>basis_vectors</font><font face='Lucida Console'>(</font><font color='#979000'>0</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&lt;</font> <font color='#979000'>1e</font><font color='#5555FF'>-</font><font color='#979000'>8</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>DLIB_TEST</font><font face='Lucida Console'>(</font>std::<font color='#BB00BB'>abs</font><font face='Lucida Console'>(</font><font color='#BB00BB'>abs</font><font face='Lucida Console'>(</font>df.b <font color='#5555FF'>-</font> df2.b<font face='Lucida Console'>)</font><font face='Lucida Console'>)</font> <font color='#5555FF'>&lt;</font> <font color='#979000'>1e</font><font color='#5555FF'>-</font><font color='#979000'>8</font><font face='Lucida Console'>)</font>; <b>}</b> <font color=' </font><font color=' </font><font color=' </font> <font color='#0000FF'>class</font> <b><a name='test_ranking_tools'></a>test_ranking_tools</b> : <font color='#0000FF'>public</font> tester <b>{</b> <font color='#0000FF'>public</font>: <b><a name='test_ranking_tools'></a>test_ranking_tools</b> <font face='Lucida Console'>(</font> <font face='Lucida Console'>)</font> : tester <font face='Lucida Console'>(</font>"<font color='#CC0000'>test_ranking</font>", "<font color='#CC0000'>Runs tests on the ranking tools.</font>"<font face='Lucida Console'>)</font> <b>{</b><b>}</b> <font color='#0000FF'><u>void</u></font> <b><a name='perform_test'></a>perform_test</b> <font face='Lucida Console'>(</font> <font face='Lucida Console'>)</font> <b>{</b> <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>dotest1</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <API key><font color='#5555FF'>&lt;</font><font color='#979000'>true</font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <API key><font color='#5555FF'>&lt;</font><font color='#979000'>false</font><font color='#5555FF'>&gt;</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'>run_prior_test</font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <font color='#BB00BB'><API key></font><font face='Lucida Console'>(</font><font face='Lucida Console'>)</font>; <b>}</b> <b>}</b> a; <b>}</b> </pre></body></html>
/* eslint-disable react/prop-types, <API key> */ import { expect } from 'chai'; import { when } from 'mobx'; import MockAdapter from 'axios-mock-adapter'; import axios from 'axios'; import {ServiceGraphStore} from '../../../src/components/serviceGraph/stores/serviceGraphStore'; const stubFilter = {from: '1', to: '2'}; const stubGraph = [ { destination: { name: 'service-2' }, source: { name: 'service-1', tags: { DEPLOYMENT: 'aws' } }, stats: { count: 12, errorCount: 2.5 } }, { destination: { name: 'service-3' }, source: { name: 'service-2' }, stats: { count: 16, errorCount: 3.5 } } ]; describe('ServiceGraphStore', () => { let server = null; const store = new ServiceGraphStore(); beforeEach(() => { server = new MockAdapter(axios); }); afterEach(() => { server = null; }); it('fetches service graph from the api', (done) => { server.onGet('/api/serviceGraph?from=1&to=2').reply(200, stubGraph); store.fetchServiceGraph(stubFilter); when( () => store.graphs.length > 0, () => { expect(store.graphs).to.have.length(2); done(); }); }); });
package org.drools.rule.builder.dialect.java; import java.io.StringReader; import java.util.ArrayList; import java.util.List; import junit.framework.TestCase; import org.drools.RuleBase; import org.drools.RuleBaseFactory; import org.drools.WorkingMemory; import org.drools.base.<API key>; import org.drools.compiler.<API key>; import org.drools.compiler.PackageBuilder; import org.drools.compiler.<API key>; import org.drools.compiler.PackageRegistry; import org.drools.lang.descr.ActionDescr; import org.drools.lang.descr.ProcessDescr; import org.drools.rule.Package; import org.drools.rule.builder.ProcessBuildContext; import org.drools.spi.Action; import org.drools.spi.KnowledgeHelper; import org.drools.workflow.core.DroolsAction; import org.drools.workflow.core.impl.<API key>; import org.drools.workflow.core.impl.WorkflowProcessImpl; import org.drools.workflow.core.node.ActionNode; public class <API key> extends TestCase { public void setUp() { } public void testSimpleAction() throws Exception { final Package pkg = new Package( "pkg1" ); ActionDescr actionDescr = new ActionDescr(); actionDescr.setText( "list.add( \"hello world\" );" ); PackageBuilder pkgBuilder = new PackageBuilder( pkg ); final <API key> conf = pkgBuilder.<API key>(); <API key> dialectRegistry = pkgBuilder.getPackageRegistry( pkg.getName() ).<API key>(); JavaDialect javaDialect = ( JavaDialect ) dialectRegistry.getDialect( "java" ); ProcessDescr processDescr = new ProcessDescr(); processDescr.setClassName( "Process1" ); processDescr.setName( "Process1" ); WorkflowProcessImpl process = new WorkflowProcessImpl(); process.setName( "Process1" ); process.setPackageName( "pkg1" ); ProcessBuildContext context = new ProcessBuildContext(pkgBuilder, pkgBuilder.getPackage(), null, processDescr, dialectRegistry, javaDialect); context.init( pkgBuilder, pkg, null, dialectRegistry, javaDialect, null); pkgBuilder.addPackageFromDrl( new StringReader("package pkg1;\nglobal java.util.List list;\n") ); ActionNode actionNode = new ActionNode(); DroolsAction action = new <API key>("java", null); actionNode.setAction(action); javaDialect.getActionBuilder().build( context, action, actionDescr ); javaDialect.addProcess( context ); javaDialect.compileAll(); assertEquals( 0, javaDialect.getResults().size() ); final RuleBase ruleBase = RuleBaseFactory.newRuleBase(); ruleBase.addPackage( pkgBuilder.getPackage() ); final WorkingMemory wm = ruleBase.newStatefulSession(); List list = new ArrayList(); wm.setGlobal( "list", list ); KnowledgeHelper knowledgeHelper = new <API key>(); ((Action) actionNode.getAction().getMetaData("Action")).execute( knowledgeHelper, wm, null ); assertEquals("hello world", list.get(0) ); } }
import requests import json ip = '127.0.0.1' port = 80 payload = {'key1': 'value1', 'key2': {'key2_1': 'value2_1', 'key2_2': 'value2_2'}} req_url = 'http://' + str(ip) + ':' + str(port) + '/v1/recovery/start' headers = {'Content-type': 'application/json'} req = requests.post(req_url, data=json.dumps(payload), headers=headers) print req.text
package com.palmg.core; import org.junit.Assert; import org.junit.Before; import org.junit.Test; public class PalmgTest { private Palmg palmg; @Before public void before(){ palmg = Palmg.build(); } @Test public void budildPalmg(){ Assert.assertNotNull(palmg.getIoc()); } }
package com.softwaremill.bootzooka.user import com.softwaremill.bootzooka.common.Utils import com.softwaremill.bootzooka.user.domain.User // Run this locally to determine the desired number of iterations in PBKDF2 object <API key> extends App { def timeEncrypting(pass: String, salt: String, iterations: Int): Double = { val start = System.currentTimeMillis() for (i <- 1 to iterations) { User.encryptPassword(pass, salt) } val end = System.currentTimeMillis() (end - start).toDouble / iterations } def <API key>(pass: String, salt: String, iterations: Int) { val avg = timeEncrypting(pass, salt, iterations) println(s"$iterations iterations of encryption took on average ${avg}ms/encryption") } val pass = Utils.randomString(32) val salt = Utils.randomString(128) <API key>(pass, salt, 100) // warmup <API key>(pass, salt, 1000) <API key>(pass, salt, 1000) }
package com.tngtech.jgiven.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import com.tngtech.jgiven.impl.tag.<API key>; import com.tngtech.jgiven.impl.tag.<API key>; /** * Marks an annotation to be used as a tag in JGiven reports. * The name and a possible value will be stored. * A value can be an array in which case it is either translated into multiple tags, one for each array element, * or a comma-separated list of values. * <p> * <strong>Note that the annotation must have retention policy RUNTIME</strong> * <h2>Example</h2> * <pre> * {@literal @}IsTag * {@literal @}Retention( RetentionPolicy.RUNTIME ) * public {@literal @}interface Issue { * String[] value(); * } * </pre> */ @Retention( RetentionPolicy.RUNTIME ) @Target( ElementType.ANNOTATION_TYPE ) public @interface IsTag { /** * If the annotation has a value and the value is an array, whether or not to explode that array to multiple tags or not. * <h2>Example</h2> * Take the following tag annotation * <pre> * {@literal @}Issue( { "#23", "#12" } ) * </pre> * When {@code explodeArray} is set to {@code true} * Then in the report there will be two tags 'Issue-#23' and 'Issue-#12' * instead of one tag 'Issue-#23,#12' */ boolean explodeArray() default true; /** * Whether values should be ignored. * If true only a single tag is created for the annotation and the value does not appear in the report. * This is useful if the value is used as an internal comment * @see Pending */ boolean ignoreValue() default false; /** * An optional default value for the tag. */ String value() default ""; /** * An optional description of the tag that will appear in the generated report. */ String description() default ""; /** * An optional description generator that is used to dynamically generate * the description depending on the concrete value of an annotation. * <p> * The class that implements {@link <API key>} interface must * be a public non-abstract class that is not a non-static inner class and must have a public default constructor. * </p> * <p> * If this attribute is set, the {@link #description()} attribute is ignored. * </p> * * @since 0.7.0 */ Class<? extends <API key>> <API key>() default <API key>.class; /** * @deprecated use {@link #name()} instead */ @Deprecated String type() default ""; /** * An optional name that overrides the default which is the name of the annotation. * <p> * It is possible that multiple annotations have the same type name. However, in this case every * annotation must have a specified value that must be unique. * </p> * @since 0.7.4 */ String name() default ""; /** * Whether the type should be prepended to the tag if the tag has a value. */ boolean prependType() default false; /** * Sets a CSS class that should be used in the HTML report for this tag. * <p> * The default CSS class is {@code 'tag-<name>'} where {@code <name>} is the type of the tag * </p> * <p> * Non-HTML reports ignore this attribute * </p> * * @since 0.7.2 */ String cssClass() default ""; /** * A color that should be used in reports for this tag. * <p> * It depends on the type of the report whether and how this value is interpreted. * HTML reports take this value as the <b>background color</b> for the tag. * </p> * <p> * Example values for the HTML report are 'red', '#ff0000', 'rgba(100,0,0,0.5)' * </p> * <p> * This attribute is for simple use cases. * For advanced styling options use the {@link #cssClass()} or {@link #style()} attributes instead. * </p> * * @since 0.7.2 */ String color() default ""; /** * Defines an inline style that is used in the HTML report for this tag. * <p> * This is an alternative to the {@link #cssClass()} attribute. * </p> * For example, to given the tag a white color and a red background-color you could write: * <code>style = "background-color: red; color: white;"</code> * <p> * Non-HTML reports ignore this attribute * </p> * * @since 0.8.0 */ String style() default ""; /** * An optional href of the tag that will appear in the generated report. * * @since 0.9.5 */ String href() default ""; /** * An optional href generator that is used to dynamically generate * the href depending on the concrete value of an annotation. * <p> * The class that implements {@link TagHrefGenerator} interface must * be a public non-abstract class that is not a non-static inner class and must have a public default constructor. * </p> * <p> * If this attribute is set, the {@link #href()} attribute is ignored. * </p> * * @since 0.9.5 */ Class<? extends TagHrefGenerator> hrefGenerator() default <API key>.class; }
/* Sim_entity.java */ package eduni.simjava; import eduni.simanim.Anim_port; import eduni.simanim.Anim_entity; import eduni.simanim.Anim_param; import eduni.simanim.Sim_anim; import eduni.simjava.distributions.Generator; import java.util.List; import java.util.ArrayList; public class Sim_entity extends Thread implements Cloneable { // Private data members private String name; // The entitys name private int me; // The entitys id private Sim_event evbuf; // For incoming events private Sim_stat stat; // The entity's statistics gatherer private int state; // The entity's current state private Semaphore restart; // Used by Sim_system to schedule the entity private Semaphore reset; // Used by Sim_system to reset the simulation private List ports; // The entitys outgoing ports private Anim_entity aent; // Hacky Anim_entity pointer private List generators; // The list of sample generators the entity has defined /** * Creates a new entity. * @param name The name to be associated with this entity */ public Sim_entity(String name) { if (name.indexOf(" ") != -1) { throw new Sim_exception("Sim_entity: Entity names can't contain spaces."); } // check if an entity with the same name exist boolean exists = false; try { Sim_system.get_entity(name); exists = true; } catch (Sim_exception e) { } if (exists) throw new Sim_exception("Sim_entity: An entity with the name '" + name + "'already exists"); this.name = name; me = -1; state = RUNNABLE; restart = new Semaphore(0); reset = new Semaphore(0); ports = new ArrayList(); generators = new ArrayList(); aent = null; // Add this to Sim_system automatically Sim_system.add(this); } /** *The constructor for use with the <code>eduni.simanim</code> animation package. * @param name The name to be associated with this entity * @param image_name The name of the gif image file for this entity's * icon (without the .gif extension). * @param x The X co-ordinate at which the entity should be drawn * @param y The Y co-ordinate at which the entity should be drawn */ public Sim_entity(String name, String image_name, int x, int y) { if (name.indexOf(" ") != -1) { throw new Sim_exception("Sim_entity: Entity names can't contain spaces."); } this.name = name; me = -1; state = RUNNABLE; restart = new Semaphore(0); reset = new Semaphore(0); ports = new ArrayList(); generators = new ArrayList(); // Add this to Sim_system automatically Sim_system.add(this); // Now anim stuff aent = new Anim_entity(name, image_name); aent.set_position(x, y); ((Sim_anim)Sim_system.get_trcout()).add_entity(aent); } /** * Make entity icon invisible */ public void set_invisible(boolean b) { if (aent!=null) { aent.set_invisible(b); } } /** * Get the name of this entity * @return The entity's name */ public String get_name() { return name; } /** * Get the unique id number assigned to this entity * @return The id number */ public int get_id() { return me; } /** * Get the port through which an event arrived. * @param ev The event * @return The port which sent the event or <code>null</code> if * it could not be found */ public Sim_port get_port(Sim_event ev) { Sim_port curr; int size = ports.size(); for (int i=0; i < size; i++) { curr = (Sim_port)ports.get(i); if (ev.get_src() == curr.get_dest()) { return curr; } } return null; } /** * Get the port with a given name. * @param name The name of the port to search for * @return The port or <code>null</code> if it could not be found */ public Sim_port get_port(String name) { Sim_port curr; int size = ports.size(); for (int i=0; i < size; i++) { curr = (Sim_port)ports.get(i); if (name.compareTo(curr.get_pname()) == 0) { return curr; } } System.out.println("Sim_entity: could not find port "+name+ " on entity "+this.name); return null; } /** * Add a port to this entity. * @param port The port to add */ public void add_port(Sim_port port) { Anim_port aport; ports.add(port); port.set_src(this.me); if(((aport = port.get_aport()) != null) && (aent != null)) { aent.add_port(aport); } } /** * Add a parameter to this entity. * Used with the <code>eduni.simanim</code> package for animation. * @param param The parameter to add */ public void add_param(Anim_param param) { aent.add_param(param); } /** * Define a <code>Sim_stat</code> object for this entity. * @param param The <code>Sim_stat</code> object */ public void set_stat(Sim_stat stat) { this.stat = stat; stat.set_entity_info(me, name); } /** * Get the entity's <code>Sim_stat</code> object. * @return The <code>Sim_stat</code> object defined for this entity or <code>null</code> if none is defined. */ public Sim_stat get_stat() { return stat; } /** * The method which defines the behaviour of the entity. This method * should be overidden in subclasses of Sim_entity. */ public void body() { System.out.println("Entity "+name+" has no body()."); } /** * Write a trace message. * @param level The level at which the trace should be printed, used * with <code>Sim_system.set_trace_level()</code> to control * what traces are printed * @param msg The message to be printed */ public void sim_trace(int level, String msg) { if((level & Sim_system.get_trace_level()) != 0) { Sim_system.ent_trace(me, msg); } } /** * Signal that an event has completed service. * @param e The event that has completed service */ public void sim_completed(Sim_event e) { if (!Sim_system.running()) { return; } // Update statistics if (stat != null) { stat.update(Sim_stat.END_RESIDENCE, e.get_tag(), e.event_time(), Sim_system.sim_clock()); stat.update(Sim_stat.END_SERVICE, e.get_tag(), e.end_waiting_time(), Sim_system.sim_clock()); } // Notify Sim_system (used for run length determination) Sim_system.job_completed(me, e.get_tag()); } // The schedule functions /** * Send an event to another entity by id number, with data. Note that the tag <code>9999</code> is reserved. * @param dest The unique id number of the destination entity * @param delay How long from the current simulation time the event * should be sent * @param tag An user-defined number representing the type of event. * @param data The data to be sent with the event. */ public void sim_schedule(int dest, double delay, int tag, Object data) { if (!Sim_system.running()) { return; } Sim_system.send(me, dest, delay, tag, data); } /** * Send an event to another entity by id number and with <b>no</b> data. Note that the tag <code>9999</code> is reserved. * @param dest The unique id number of the destination entity * @param delay How long from the current simulation time the event * should be sent * @param tag An user-defined number representing the type of event. */ public void sim_schedule(int dest, double delay, int tag) { if (!Sim_system.running()) { return; } Sim_system.send(me, dest, delay, tag, null); } /** * Send an event to another entity through a port, with data. Note that the tag <code>9999</code> is reserved. * @param dest The port to send the event through * @param delay How long from the current simulation time the event * should be sent * @param tag An user-defined number representing the type of event. * @param data The data to be sent with the event. */ public void sim_schedule(Sim_port dest, double delay, int tag, Object data) { if (!Sim_system.running()) { return; } Sim_system.send(me, dest.get_dest(), delay, tag, data); } /** * Send an event to another entity through a port, with <b>no</b> data. Note that the tag <code>9999</code> is reserved. * @param dest The port to send the event through * @param delay How long from the current simulation time the event * should be sent * @param tag An user-defined number representing the type of event. */ public void sim_schedule(Sim_port dest, double delay, int tag) { if (!Sim_system.running()) { return; } Sim_system.send(me, dest.get_dest(), delay, tag, null); } /** * Send an event to another entity through a port with a given name, with data. Note that the tag <code>9999</code> is reserved. * @param dest The name of the port to send the event through * @param delay How long from the current simulation time the event * should be sent * @param tag An user-defined number representing the type of event. * @param data The data to be sent with the event. */ public void sim_schedule(String dest, double delay, int tag, Object data) { if (!Sim_system.running()) { return; } Sim_system.send(me, get_port(dest).get_dest(), delay, tag, data); } /** * Send an event to another entity through a port with a given name, with <b>no</b> data. * Note that the tag <code>9999</code> is reserved. * @param dest The name of the port to send the event through * @param delay How long from the current simulation time the event * should be sent * @param tag An user-defined number representing the type of event. */ public void sim_schedule(String dest, double delay, int tag) { if (!Sim_system.running()) { return; } Sim_system.send(me, get_port(dest).get_dest(), delay, tag, null); } /** * Count how many events matching a predicate are waiting in the entity's deferred queue. * @param p The event selection predicate * @return The count of matching events */ public int sim_waiting(Sim_predicate p) { return Sim_system.waiting(me, p); } /** * Count how many events are waiting in the entiy's deferred queue * @return The count of events */ public int sim_waiting() { return Sim_system.waiting(me, Sim_system.SIM_ANY); } /** * Extract the first event matching a predicate waiting in the entity's deferred queue. * @param p The event selection predicate * @param ev The event matched is copied into <body>ev</body> if it points to a blank event, * or discarded if <code>ev</code> is <code>null</code> */ public void sim_select(Sim_predicate p, Sim_event ev) { if (!Sim_system.running()) { return; } Sim_system.select(me, p); if((ev != null) && (evbuf != null)) { ev.copy(evbuf); if (stat != null) { stat.update(Sim_stat.END_WAITING, ev.get_tag(), ev.event_time(), Sim_system.sim_clock()); ev.<API key>(Sim_system.sim_clock()); } } evbuf = null; // ADA MSI } /** * Cancel the first event matching a predicate waiting in the entity's future queue. * @param p The event selection predicate * @param ev The event matched is copied into <code>ev</code> if it points to a blank event, or discarded if <code>ev</code> is <code>null</code> * @return The number of events cancelled (0 or 1) */ public int sim_cancel(Sim_predicate p, Sim_event ev) { if (!Sim_system.running()) { return 1; } Sim_system.cancel(me, p); if((ev != null) && (evbuf != null)) ev.copy(evbuf); if (evbuf != null) { return 1;} else { return 0; } } /** * Put an event back on the deferred queue. * @param ev The event to put back */ public void sim_putback(Sim_event ev) { if (!Sim_system.running()) { return; } Sim_system.putback((Sim_event)ev.clone()); } /** * Get the first event matching a predicate from the deferred queue, or if none match, * wait for a matching event to arrive. * @param p The predicate to match * @param ev The event matched is copied into <code>ev</code> if it points to a blank event, * or discarded if <code>ev</code> is <code>null</code> */ public void sim_get_next(Sim_predicate p, Sim_event ev) { if (!Sim_system.running()) { return; } if (sim_waiting(p) > 0) { sim_select(p, ev); } else { sim_wait_for(p,ev); } } /** * Get the first event waiting in the entity's deferred queue, or if there are none, wait * for an event to arrive. * @param ev The event matched is copied into <code>ev</code> if it points to a blank event, * or discarded if <code>ev</code> is <code>null</code> */ public void sim_get_next(Sim_event ev) { sim_get_next(Sim_system.SIM_ANY, ev); } /** * Get the id of the currently running entity * @return The currently running entity's id number */ public int sim_current() { return this.get_id(); } /** * Send on an event to an other entity through a port. * @param ev The event to send * @param p The port through which to send the event */ public void send_on(Sim_event ev, Sim_port p) { sim_schedule(p.get_dest(), 0.0, ev.type(), ev.get_data()); } // Package level methods // Package access methods int get_state() { return state; } Sim_event get_evbuf() { return evbuf; } // The entity states static final int RUNNABLE = 0; static final int WAITING = 1; static final int HOLDING = 2; static final int FINISHED = 3; // Package update methods void restart() { restart.v(); } void set_going() { restart.v(); } void set_state(int state) { this.state = state; } void set_id(int id) { me = id; } void set_evbuf(Sim_event e) { evbuf = e; } void poison() { // Not used anymore } // Statistics update methods // Used to update default measures after an ARRIVAL event has occured void update(int type, int tag, double time_occured) { if (stat != null) stat.update(type, tag, time_occured); } // Used to tidy up the statistics gatherer for this entity. void tidy_up_stat() { if (stat != null) stat.tidy_up(); } // Used to check if the entity is gathering statistics boolean has_stat() { return (stat != null); } /** * Get a clone of the entity. This is used when independent replications have been specified * as an output analysis method. Clones or backups of the entities are made in the beginning * of the simulation in order to reset the entities for each subsequent replication. This method * should not be called by the user. * @return A clone of the entity */ protected Object clone() throws <API key> { Sim_entity copy = (Sim_entity)super.clone(); copy.set_name(new String(name)); copy.set_evbuf(null); return copy; } // Used to set a cloned entity's name private void set_name(String new_name) { name = new_name; } // Resets the statistics gatherer of this entity void reset() { if (stat != null) { stat.reset(); } int size = generators.size(); for (int i=0; i < size; i++) { Generator generator = (Generator)generators.get(i); generator.set_seed(Sim_system.next_seed()); } } /** * Executes the entity's thread. This is an internal method and should not be overriden in * subclasses. */ public final void run() { Sim_system.paused(); // Tell the system we're up and running restart.p(); // Initially we pause 'till we get the go ahead from system body(); state = FINISHED; Sim_system.completed(); } /** * Add a sample generator to this entity. This method is used in order to allow <code>Sim_system</code> * to reseed the generator. This is performed when independent replications have been selected * as an output analysis method. If this method is not used for a generator then the seed used in the * subsequent replication will be the last one produced by the generator in the previous run. * @param generator The sample generator to be added to the entity */ public void add_generator(Generator generator) { generators.add(generator); } // Reseed the generators of this entity void reseed_generators() { int size = generators.size(); for (int i=0; i < size; i++) { Generator generator = (Generator)generators.get(i); generator.set_seed(Sim_system.next_seed()); } } // Get the generators defined for this entity List get_generators() { return generators; } // Process methods /** * Set the entity to be active for a given time period. * @param delay The time period for which the entity will be active */ public void sim_process(double delay) { if (delay < 0.0) { throw new Sim_exception("Sim_entity: Negative delay supplied."); } if (!Sim_system.running()) { return; } double start_time = Sim_system.sim_clock(); if (stat != null) { stat.set_busy(start_time); } Sim_system.hold(me,delay); Sim_system.paused(); restart.p(); if (!Sim_system.running()) return; if (stat != null) { stat.update(Sim_stat.END_HOLD, start_time, Sim_system.sim_clock()); } } /** * Set the entity to be active until it receives an event. Note that the entity * will be interrupted only by <b>future</b> events. * @param ev The event to which the arriving event will be copied to */ public void sim_process_until(Sim_event ev) { if (!Sim_system.running()) { return; } sim_process_until(Sim_system.SIM_ANY, ev); } /** * Set the entity to be active until it receives an event matching a specific predicate. * Note that the entity will be interrupted only by <b>future</b> events. * @param p The predicate to match * @param ev The event to which the arriving event will be copied to */ public void sim_process_until(Sim_predicate p, Sim_event ev) { if (!Sim_system.running()) { return; } double start_time = Sim_system.sim_clock(); if (stat != null) { stat.set_busy(start_time); } if (Sim_system.default_tracing()) { Sim_system.trace(me, "start holding"); } sim_wait_for(p, ev); if (!Sim_system.running()) return; if (stat != null) { stat.update(Sim_stat.END_HOLD, start_time, Sim_system.sim_clock()); } } /** * Set the entity to be active for a time period or until it is interrupted by the * arrival of an event. Note that the entity will be interrupted only by <b>future</b> * events. * @param delay The time period for which the entity will be active unless interrupted * @param ev The event to which the arriving event will be copied to * @return The time of the specified time period remaining after the arrival occured */ public double sim_process_for(double delay, Sim_event ev) { if (delay < 0.0) { throw new Sim_exception("Sim_entity: Negative delay supplied."); } if (!Sim_system.running()) { return 0.0; } else { return sim_process_for(Sim_system.SIM_ANY, delay, ev); } } /** * Set the entity to be active for a time period or until it is interrupted by the * arrival of an event matching a predicate. Note that the entity will be interrupted only * by <b>future</b> events. * @param p The predicate to match * @param delay The time period for which the entity will be active unless interrupted * @param ev The event to which the arriving event will be copied to * @return The time of the specified time period remaining after the arrival occured */ public double sim_process_for(Sim_predicate p, double delay, Sim_event ev) { if (delay < 0.0) { throw new Sim_exception("Sim_entity: Negative delay supplied."); } if (!Sim_system.running()) { return 0.0; } double start_time = Sim_system.sim_clock(); double time_left = 0.0; if (stat != null) { stat.set_busy(start_time); } if (Sim_system.default_tracing()) { Sim_system.trace(me, "start holding"); } sim_schedule(me, delay, 9999); // Send self 'hold done' msg sim_wait_for(p, ev); if (!Sim_system.running()) return 0.0; if (ev.get_tag() != 9999) { // interrupted Sim_type_p stp = new Sim_type_p(9999); time_left = delay - (ev.event_time() - start_time); int success = sim_cancel(stp,null); } if (stat != null) { stat.update(Sim_stat.END_HOLD, start_time, Sim_system.sim_clock()); } if (time_left <= 0.0) { return 0.0; } else { return time_left; } } // PAUSE METHODS /** * Set the entity to be inactive for a time period. * @param delay The time period for which the entity will be inactive */ public void sim_pause(double delay) { if (delay < 0.0) { throw new Sim_exception("Sim_entity: Negative delay supplied."); } if (!Sim_system.running()) { return; } Sim_system.pause(me, delay); Sim_system.paused(); restart.p(); } /** * Set the entity to be inactive until it receives an event. Note that the * entity will be interrupted only by <b>future</b> events. * @param ev The event to which the arriving event will be copied to */ public void sim_pause_until(Sim_event ev) { if (!Sim_system.running()) { return; } sim_pause_until(Sim_system.SIM_ANY, ev); } /** * Set the entity to eb inactive until it receives an event matching a specific predicate. * Note that the entity will be interrupted only by <b>future</b> events. * @param p The predicate to match * @param ev The event to which the arriving event will be copied to */ public void sim_pause_until(Sim_predicate p, Sim_event ev) { if (!Sim_system.running()) { return; } if (Sim_system.default_tracing()) { Sim_system.trace(me, "start pausing"); } sim_wait_for(p, ev); } /** * Set the entity to be inactive for a time period or until it is interrupted by the arrival of an event. * Note that the entity will be interrupted only by <b>future</b> events. * @param delay The time period for which the entity will be inactive unless interrupted * @param ev The event to which the arriving event will be copied to * @return The time of the specified time period remaining after the arrival occured */ public double sim_pause_for(double delay, Sim_event ev) { if (!Sim_system.running()) { return 0.0; } else { return sim_pause_for(Sim_system.SIM_ANY, delay, ev); } } /** * Set the entity to be inactive for a time period or until it is interrupted by the arrival of an event matching * a predicate. Note that the entity will be interrupted only by <b>future</b> events. * @param p The predicate to match * @param delay The time period for which the entity will be inactive unless interrupted * @param ev The event to which the arriving event will be copied to * @return The time of the specified time period remaining after the arrival occured */ public double sim_pause_for(Sim_predicate p, double delay, Sim_event ev) { if (delay < 0.0) { throw new Sim_exception("Sim_entity: Negative delay supplied."); } if (!Sim_system.running()) { return 0.0; } double start_time = Sim_system.sim_clock(); double time_left = 0.0; if (Sim_system.default_tracing()) { Sim_system.trace(me, "start pausing"); } sim_schedule(me, delay, 9999); // Send self 'hold done' msg sim_wait_for(p, ev); if (!Sim_system.running()) return 0.0; if (ev.get_tag() != 9999) { // interrupted Sim_type_p stp = new Sim_type_p(9999); time_left = delay - (ev.event_time() - start_time); int success = sim_cancel(stp,null); } if (time_left <= 0.0) { return 0.0; } else { return time_left; } } // WAIT METHODS /** * Wait for an event to arrive. Note that this method doesn't check the entity's deferred queue. * @param ev The event to which the arriving event will be copied to */ public void sim_wait(Sim_event ev) { if (!Sim_system.running()) { return; } do { Sim_system.wait(me, Sim_system.SIM_ANY); Sim_system.paused(); restart.p(); if (!Sim_system.running()) return; } while (evbuf==null); if ((ev != null) && (evbuf != null)) { ev.copy(evbuf); if (stat != null) { stat.update(Sim_stat.END_WAITING, ev.get_tag(), ev.event_time(), Sim_system.sim_clock()); ev.<API key>(Sim_system.sim_clock()); } } evbuf = null; } /** * Wait for an event matching a specific predicate. This method doesn't check the entity's deferred queue. * <p> * Since 2.0 <code>Sim_syztem</code> checks the predicate for the entity. This avoids unnecessary context * switches for non-matching events. * @param p The predicate to match * @param ev The event to which the arriving event will be copied to */ public void sim_wait_for(Sim_predicate p, Sim_event ev) { if (!Sim_system.running()) { return; } do { Sim_system.wait(me, p); Sim_system.paused(); restart.p(); if (!Sim_system.running()) return; } while (evbuf == null); if ((ev != null) && (evbuf != null)) { ev.copy(evbuf); } // There in no need to check the predicate since Sim_system has done this for us evbuf = null; if ((stat != null) && (ev.get_tag() != 9999)) { stat.update(Sim_stat.END_WAITING, ev.get_tag(), ev.event_time(), Sim_system.sim_clock()); ev.<API key>(Sim_system.sim_clock()); } } /** * Wait for an event to arrive or until a time period elapsed. This method doesn't check the entity's deferred queue. * @param delay The maximum time to wait * @param ev The event to which the arrving event will be copied to * @return The time remaining when the arrival occured */ public double sim_wait_for(double delay, Sim_event ev) { if (!Sim_system.running()) { return 0.0; } else { return sim_wait_for(Sim_system.SIM_ANY, delay, ev); } } /** * Wait for an event matching a specific predicate to arrive or until a time period elapses. * This method doesn't check the entity's deferred queue. * @param p The predicate to match * @param delay The maximum time period for which to wait * @param ev The event to which the arriving event will be copied to * @return The time remaining when the arrival occured */ public double sim_wait_for(Sim_predicate p, double delay, Sim_event ev) { if (delay < 0.0) { throw new Sim_exception("Sim_entity: Negative delay supplied."); } if (!Sim_system.running()) { return 0.0; } sim_schedule(me, delay, 9999); // Send self 'wait done' sim_wait_for(p, ev); double time_left = 0.0; if (!Sim_system.running()) return 0.0; if (ev.get_tag() != 9999) { // interrupted Sim_type_p stp = new Sim_type_p(9999); time_left = delay - (ev.event_time() - Sim_system.sim_clock()); int success = sim_cancel(stp, null); } if (time_left <= 0.0) { return 0.0; } else { return time_left; } } // HOLD METHODS - DEPRECATED /** * Hold for a time period * @param delay The time period for which to hold * @deprecated As of SimJava version 2.0, replaced by <code>sim_pause(double delay)</code>. * This method was deprecated because of the new statistical support present to entities. When an * entity holds it must now be specified if the hold corrssponds to the entity being active or * inactive. The original <code>sim_hold()</code> methods are equivalent to their respective * <code>sim_pause()</code> methods. */ public void sim_hold(double delay) { if (!Sim_system.running()) { return; } sim_pause(delay); } /** * Hold for a time period or until an event arrives. This method doesn't check the entity's deferred queue. * @param delay The maximum time period for which to hold * @param ev The event to which the arriving event will be copied to * @return The time remaining when the arrival occured * @deprecated As of SimJava version 2.0, replaced by <code>sim_pause_for(double delay, Sim_event ev)</code>. * This method was deprecated because of the new statistical support present to entities. When an * entity holds it must now be specified if the hold corrssponds to the entity being active or * inactive. The original <code>sim_hold()</code> methods are equivalent to their respective * <code>sim_pause()</code> methods. */ public double sim_hold_for(double delay, Sim_event ev) { if (!Sim_system.running()) { return 0.0; } else { return sim_pause_for(delay, ev); } } }
package com.xlythe.dao.sample; import android.os.Bundle; import android.text.TextUtils; import android.util.Log; import android.view.View; import android.widget.EditText; import android.widget.Toast; import com.xlythe.dao.sample.model.Folder; import com.xlythe.dao.sample.model.Note; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; public class DetailActivity extends AppCompatActivity { private static final String TAG = DetailActivity.class.getSimpleName(); public static final String EXTRA_NOTE = "note"; private Note mNote; private EditText mTitleView; private EditText mBodyView; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_detail); mTitleView = findViewById(R.id.title); mBodyView = findViewById(R.id.body); if (getIntent().hasExtra(EXTRA_NOTE)) { mNote = (Note) getIntent().<API key>(EXTRA_NOTE); mNote.setContext(this); mTitleView.setText(mNote.getTitle()); mBodyView.setText(mNote.getBody()); } } public void save(View view) { if (TextUtils.isEmpty(getNoteTitle())) { Log.w(TAG, "Ignoring attempt to set empty note title"); Toast.makeText(this, R.string.warning_set_title, Toast.LENGTH_SHORT).show(); return; } if (mNote != null) { mNote.setTitle(getNoteTitle()); mNote.setBody(getNoteBody()); mNote.save(); } else { new Note.Query(this) .title(getNoteTitle()) .body(getNoteBody()) .timestamp(System.currentTimeMillis()) .insert(); new Folder.Query(this).name(getNoteTitle()).insert(); } <API key>(); } private String getNoteTitle() { return mTitleView.getText().toString(); } private String getNoteBody() { return mBodyView.getText().toString(); } }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_151) on Tue Feb 06 09:38:17 MST 2018 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Interface org.wildfly.swarm.config.BatchJBeretConsumer (BOM: * : All 2017.10.2 API)</title> <meta name="date" content="2018-02-06"> <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="Uses of Interface org.wildfly.swarm.config.BatchJBeretConsumer (BOM: * : All 2017.10.2 API)"; } } catch(err) { } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <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><a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="interface in org.wildfly.swarm.config">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../overview-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, 2017.10.2</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/wildfly/swarm/config/class-use/BatchJBeretConsumer.html" target="_top">Frames</a></li> <li><a href="BatchJBeretConsumer.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <h2 title="Uses of Interface org.wildfly.swarm.config.BatchJBeretConsumer" class="title">Uses of Interface<br>org.wildfly.swarm.config.BatchJBeretConsumer</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="interface in org.wildfly.swarm.config">BatchJBeretConsumer</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.wildfly.swarm.config">org.wildfly.swarm.config</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.wildfly.swarm.config"> </a> <h3>Uses of <a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="interface in org.wildfly.swarm.config">BatchJBeretConsumer</a> in <a href="../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a> that return <a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="interface in org.wildfly.swarm.config">BatchJBeretConsumer</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>default <a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="interface in org.wildfly.swarm.config">BatchJBeretConsumer</a>&lt;<a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="type parameter in BatchJBeretConsumer">T</a>&gt;</code></td> <td class="colLast"><span class="typeNameLabel">BatchJBeretConsumer.</span><code><span class="memberNameLink"><a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html#andThen-org.wildfly.swarm.config.BatchJBeretConsumer-">andThen</a></span>(<a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="interface in org.wildfly.swarm.config">BatchJBeretConsumer</a>&lt;<a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="type parameter in BatchJBeretConsumer">T</a>&gt;&nbsp;after)</code>&nbsp;</td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a> with parameters of type <a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="interface in org.wildfly.swarm.config">BatchJBeretConsumer</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>default <a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="interface in org.wildfly.swarm.config">BatchJBeretConsumer</a>&lt;<a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="type parameter in BatchJBeretConsumer">T</a>&gt;</code></td> <td class="colLast"><span class="typeNameLabel">BatchJBeretConsumer.</span><code><span class="memberNameLink"><a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html#andThen-org.wildfly.swarm.config.BatchJBeretConsumer-">andThen</a></span>(<a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="interface in org.wildfly.swarm.config">BatchJBeretConsumer</a>&lt;<a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="type parameter in BatchJBeretConsumer">T</a>&gt;&nbsp;after)</code>&nbsp;</td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <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><a href="../../../../../org/wildfly/swarm/config/BatchJBeretConsumer.html" title="interface in org.wildfly.swarm.config">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../overview-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, 2017.10.2</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/wildfly/swarm/config/class-use/BatchJBeretConsumer.html" target="_top">Frames</a></li> <li><a href="BatchJBeretConsumer.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.bottom"> </a></div> <p class="legalCopy"><small>Copyright & </body> </html>
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_151) on Wed Sep 05 03:08:47 MST 2018 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Interface org.wildfly.swarm.config.elytron.<API key> (BOM: * : All 2.2.0.Final API)</title> <meta name="date" content="2018-09-05"> <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="Uses of Interface org.wildfly.swarm.config.elytron.<API key> (BOM: * : All 2.2.0.Final API)"; } } catch(err) { } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <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><a href="../../../../../../org/wildfly/swarm/config/elytron/<API key>.html" title="interface in org.wildfly.swarm.config.elytron">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../overview-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">Thorntail API, 2.2.0.Final</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/wildfly/swarm/config/elytron/class-use/<API key>.html" target="_top">Frames</a></li> <li><a href="<API key>.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <h2 title="Uses of Interface org.wildfly.swarm.config.elytron.<API key>" class="title">Uses of Interface<br>org.wildfly.swarm.config.elytron.<API key></h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../org/wildfly/swarm/config/elytron/<API key>.html" title="interface in org.wildfly.swarm.config.elytron"><API key></a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.wildfly.swarm.config">org.wildfly.swarm.config</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.wildfly.swarm.config"> </a> <h3>Uses of <a href="../../../../../../org/wildfly/swarm/config/elytron/<API key>.html" title="interface in org.wildfly.swarm.config.elytron"><API key></a> in <a href="../../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a> with parameters of type <a href="../../../../../../org/wildfly/swarm/config/elytron/<API key>.html" title="interface in org.wildfly.swarm.config.elytron"><API key></a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/config/Elytron.html" title="type parameter in Elytron">T</a></code></td> <td class="colLast"><span class="typeNameLabel">Elytron.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/Elytron.html#<API key>.wildfly.swarm.config.elytron.<API key>-"><API key></a></span>(<a href="../../../../../../org/wildfly/swarm/config/elytron/<API key>.html" title="interface in org.wildfly.swarm.config.elytron"><API key></a>&nbsp;supplier)</code> <div class="block">Install a supplied <API key> object to the list of subresources</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <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><a href="../../../../../../org/wildfly/swarm/config/elytron/<API key>.html" title="interface in org.wildfly.swarm.config.elytron">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../overview-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">Thorntail API, 2.2.0.Final</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/wildfly/swarm/config/elytron/class-use/<API key>.html" target="_top">Frames</a></li> <li><a href="<API key>.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.bottom"> </a></div> <p class="legalCopy"><small>Copyright & </body> </html>