code
stringlengths
10
174k
nl
stringlengths
3
129k
public static void unpackArchive(File archive,File outputDir) throws IOException { try (DataInputStream input=new DataInputStream(new FileInputStream(archive))){ unpackArchivePrivate(input,outputDir); } }
extracts archive
private void parse(String fileName,@WillClose InputStream stream) throws IOException, SAXException { try { SAXBugCollectionHandler handler=new SAXBugCollectionHandler(this,new File(fileName)); XMLReader xr=XMLReaderFactory.createXMLReader(); xr.setContentHandler(handler); xr.setErrorHandler(handler); ...
Parse and load the given filter file.
public int height(){ return height(root); }
Returns the height of this binary tree
@Override public int eBaseStructuralFeatureID(int derivedFeatureID,Class<?> baseClass){ if (baseClass == AccessibleTypeElement.class) { switch (derivedFeatureID) { case TypesPackage.DECLARED_TYPE_WITH_ACCESS_MODIFIER__DECLARED_TYPE_ACCESS_MODIFIER: return TypesPackage.ACCESSIBLE_TYPE_ELEMENT__DECLARED_TYPE_ACCE...
<!-- begin-user-doc --> <!-- end-user-doc -->
public static void addInfo(String format,Resource res,Struct info){ try { ImageMetaDrew.test(); } catch ( Throwable t) { PrintWriter pw=ThreadLocalPageContext.getConfig().getErrWriter(); SystemOut.printDate(pw,"cannot load addional pic info, library metadata-extractor.jar is missed"); } ImageMetaD...
adds information about a image to the given struct
public static FireworkEffectBuilder builder(FireworkEffectType type){ return new FireworkEffectBuilder(type); }
Construct a firework effect.
@SuppressWarnings("unchecked") public LinkedTreeMap(){ this((Comparator<? super K>)NATURAL_ORDER); }
Create a natural order, empty tree map whose keys must be mutually comparable and non-null.
public static String toJson(Date date){ return DEFAULT_GENERATOR.toJson(date); }
Format a date that is parseable from JavaScript, according to ISO-8601.
public DateTime withCenturyOfEra(int centuryOfEra){ return withMillis(getChronology().centuryOfEra().set(getMillis(),centuryOfEra)); }
Returns a copy of this datetime with the century of era field updated. <p> DateTime is immutable, so there are no set methods. Instead, this method returns a new instance with the value of century of era changed.
public boolean containsKey(long key){ return contains(key); }
checks for the present of <tt>key</tt> in the keys of the map.
public DOMKeyName(String name){ if (name == null) { throw new NullPointerException("name cannot be null"); } this.name=name; }
Creates a <code>DOMKeyName</code>.
@Override public boolean eIsSet(int featureID){ switch (featureID) { case TypesPackage.PRIMITIVE_TYPE__BASE_TYPE: return baseType != null; } return super.eIsSet(featureID); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public boolean canRead(){ return getWrappedPath().canRead(); }
Tests if the file can be read.
public void trainOnline(FloatVector trainingInstance){ FloatMatrix[] updateMatrices=this.trainByInstance(trainingInstance); this.updateWeightMatrices(updateMatrices); }
Train the model online.
protected List<EvaluationStatistics> evaluateSequential(MultiLabelClassifier classifier,Instances dataset){ List<EvaluationStatistics> result; EvaluationStatistics stats; Instances train; Instances test; Result res; int i; Random rand; MultiLabelClassifier current; result=new ArrayList<>(); rand=new...
Returns the evaluation statistics generated for the dataset (sequential execution).
public BaseDeltaCollectionPage(final BaseDeltaCollectionResponse response,final IDeltaRequestBuilder builder){ super(response.value,builder); }
A collection page for Delta.
public void mouseClicked(MouseEvent e){ checkPopup(e); requestFocus(); getCaret().setVisible(true); }
Called when the mouse is clicked.
public CRegisterView(final JFrame parent,final CDebugPerspectiveModel debugPerspectiveModel){ super(new BorderLayout()); Preconditions.checkNotNull(parent,"IE01477: Parent argument can not be null"); Preconditions.checkNotNull(debugPerspectiveModel,"IE01478: Debug perspective model argument can not be null"); m...
Creates a new register view.
public static String makeLabel(String pwwnKey,String volId){ return pwwnKey + "_" + volId; }
Generate a label
public void testCompareNegNeg2(){ byte aBytes[]={10,20,30,40,50,60,70,10,20,30}; byte bBytes[]={12,56,100,-2,-76,89,45,91,3,-15,35,26,3,91}; int aSign=-1; int bSign=-1; BigInteger aNumber=new BigInteger(aSign,aBytes); BigInteger bNumber=new BigInteger(bSign,bBytes); assertEquals(1,aNumber.compareTo(bNumbe...
compareTo(BigInteger a). Compare two negative numbers. The first is less in absolute value.
private void loadInfoOf(ResultSet rs,VEditor editor,String name) throws SQLException { if (editor == null) return; int intValue=rs.getInt(name); if (rs.wasNull()) editor.setValue(null); else editor.setValue(new Integer(intValue)); }
Set Value of Editor
public static Vector3 toVector3(Vector2 o){ return new Vector3(o.x,0,o.z); }
Returns a Vector3 object with a y-value of 0. The x of the Vector2 becomes the x of the Vector3, the y of the Vector2 becomes the z of the Vector3.
private void requestFromCache(Request request,Callback callback){ Response response=client.cache().get(request); if (callback != null) { callback.onStart(); try { callback.onResponse(null,response); } catch ( IOException e) { callback.onFailure(null,e); } callback.onFinish(); }...
Callback Call always is null
public CharBuffer insert(int offset,long l){ return insert(offset,String.valueOf(l)); }
Inserts a long at a given offset.
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:57:40.013 -0500",hash_original_method="9FD1A2E2343A7342F7CA850BC8948EC8",hash_generated_method="AF3A54E7FF041881C4F9E8B06CF87E9A") public static void fill(byte[] array,int sta...
Fills the specified range in the array with the specified element.
private void authorMessagePopular(boolean popularFlag){ int author; Bag people=sim.socialNetwork.getAllNodes(); if (people.numObjs == 0) { return; } List<Integer> indices=sim.orderNodesByDegree(people); author=1; if (popularFlag) { author=people.numObjs - author; } else { author=Math.max(au...
Create a new message and give it to a popular or unpopular person.
public DoubleMatrix3D like(int slices,int rows,int columns){ return new DenseDoubleMatrix3D(slices,rows,columns); }
Construct and returns a new empty matrix <i>of the same dynamic type</i> as the receiver, having the specified number of slices, rows and columns. For example, if the receiver is an instance of type <tt>DenseDoubleMatrix3D</tt> the new matrix must also be of type <tt>DenseDoubleMatrix3D</tt>, if the receiver is an inst...
@Override public final void decRef(){ refCounter.decRef(); }
Decreases the refCount of this Store instance.If the refCount drops to 0, then this store is closed.
public MalformedURLException(String detailMessage,Throwable cause){ super(detailMessage,cause); }
Constructs a new instance with given detail message and cause.
public void addBinary(IFile resource,IPath containerPath){ SearchParticipant participant=SearchEngine.getDefaultSearchParticipant(this,javaProject); SearchDocument document=participant.getDocument(resource.getFullPath().toString()); IndexLocation indexLocation=computeIndexLocation(containerPath); scheduleDocume...
Trigger addition of a resource to an index Note: the actual operation is performed in background
public Configurator recordNoEvents(){ eventWriterFactory=null; return this; }
Turn off the event recorder so that it does not record anything.
private String prepareDirs(String dirType,int numDirs){ File[] dirs=new File[numDirs]; String dirsString=""; for (int i=0; i < numDirs; i++) { dirs[i]=new File(testWorkDir,MiniYARNCluster.this.getName() + "-" + dirType+ "Dir-nm-"+ index+ "_"+ i); dirs[i].mkdirs(); LOG.info("Created " + dirType + "Dir ...
Create local/log directories
public void putUnlistedModel(String key,TemplateModel model){ unlistedModels.put(key,model); }
Stores a model in the hash so that it doesn't show up in <tt>keys()</tt> and <tt>values()</tt> methods. Used to put the Application, Session, Request, RequestParameters and JspTaglibs objects.
public <A extends Annotation>Expressions buildUserCheckAnyExpression(final Class<?> resourceClass,final Class<A> annotationClass,final RequestScope requestScope){ final Function<Check,Expression> userCheckFn=null; return new Expressions(buildAnyFieldExpression(new PermissionCondition(annotationClass,resourceClass),...
Build an expression that strictly evaluates UserCheck's and ignores other checks for an entity. <p> NOTE: This method returns _NO_ commit checks.
private static PublicKey resolveKey(Element e,String baseURI,StorageResolver storage) throws KeyResolverException { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE,"Now we have a {" + e.getNamespaceURI() + "}"+ e.getLocalName()+ " Element"); } if (e != null) { retu...
Retrieves a PublicKey from the given information
private static void addQueryEntity(Document doc,Node parent,String pkg,PojoDescriptor pojo,boolean generateAliases){ Element bean=addBean(doc,parent,QueryEntity.class); addProperty(doc,bean,"keyType",pkg + "." + pojo.keyClassName()); addProperty(doc,bean,"valueType",pkg + "." + pojo.valueClassName()); Collectio...
Add element with query entity to XML document.
public void cancelPairing(){ for ( DeviceService service : services.values()) { service.cancelPairing(); } }
Explicitly cancels pairing on all services that require pairing. In some services, this will hide a prompt that is displaying on the device.
public T onclick(String value){ return attr("onclick",value); }
Sets the <code>onclick</code> attribute on the last started tag that has not been closed.
private void requestStreamsInfo(Set<String> streams){ if (!checkTimePassed(streamsInfoLastRequested,UPDATE_STREAMINFO_DELAY,streamsRequestErrors)) { return; } requestStreamsInfo2(streams,false); }
Request info for a list of streams regulary. This first checks if enough time has passed since the last request, then requests those streams that are not currently waiting for a response.
public static boolean actualExecute(){ if (Cfg.DEBUG) { Check.log(TAG + " (actualExecute): uninstall"); } boolean ret=false; synchronized (Status.uninstallLock) { Status.uninstall=true; Core.self().createUninstallMarkup(); if (Status.getExploitStatus() == Status.EXPLOIT_STATUS_RUNNING) { if ...
Actual execute.
@Override public String toString(){ if (eIsProxy()) return super.toString(); StringBuffer result=new StringBuffer(super.toString()); result.append(" (context: "); result.append(context); result.append(", operationName: "); result.append(operationName); result.append(')'); return result.toString(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
private void zzDoEOF(){ if (!zzEOFDone) { zzEOFDone=true; } }
Contains user EOF-code, which will be executed exactly once, when the end of file is reached
@Deprecated public boolean isHttpUrlOK(String urlString){ try { URL e=new URL(urlString); HttpURLConnection urlConnection=(HttpURLConnection)e.openConnection(); urlConnection.setRequestMethod("HEAD"); int responseCode=urlConnection.getResponseCode(); if (responseCode == 200) { return true; ...
Checks if the url passed , can be contacted or not.
public CAddTagAction(final JFrame parent,final ITagManager tagManager,final ITreeNode<CTag> tag,final String name){ super(tag.getObject().getId() == 0 ? "Create Root Tag" : "Append Tag"); m_parent=Preconditions.checkNotNull(parent,"IE01852: Parent argument can not be null"); m_tagManager=Preconditions.checkNotNul...
Creates a new action object.
public StunMappingCandidateHarvester(){ super(null,null); }
Creates a mapping harvester with the specified <tt>mask</tt>
public static void assertContainers(Set<PackingPlan.ContainerPlan> containerPlans,String boltName,String spoutName,long expectedBoltRam,long expectedSpoutRam,Long notExpectedContainerRam){ boolean boltFound=false; boolean spoutFound=false; List<Integer> expectedInstanceIndecies=new ArrayList<>(); List<Integer> ...
Verifies that the containerPlan has at least one bolt named boltName with ram equal to expectedBoltRam and likewise for spouts. If notExpectedContainerRam is not null, verifies that the container ram is not that.
public SkeletonNotFoundException(String s,Exception ex){ super(s,ex); }
Constructs a <code>SkeletonNotFoundException</code> with the specified detail message and nested exception.
public Boolean isRecordReplaySupported(){ return recordReplaySupported; }
Gets the value of the recordReplaySupported property.
private int readFrameType(final Object[] frame,final int index,int v,final char[] buf,final Label[] labels){ int type=b[v++] & 0xFF; switch (type) { case 0: frame[index]=Opcodes.TOP; break; case 1: frame[index]=Opcodes.INTEGER; break; case 2: frame[index]=Opcodes.FLOAT; break; case 3: frame[index]=Opcodes.DOUBL...
Reads a stack map frame type and stores it at the given index in the given array.
public boolean equals(Object o){ if (o instanceof Name) { Comparator<String> c=ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER; return c.compare(name,((Name)o).name) == 0; } else { return false; } }
Compares this attribute name to another for equality.
public void characters(StylesheetHandler handler,char ch[],int start,int length) throws org.xml.sax.SAXException { m_accumulator.append(ch,start,length); if (null == m_firstBackPointer) m_firstBackPointer=handler.getOriginatingNode(); if (this != handler.getCurrentProcessor()) handler.pushProcessor(this); }
Receive notification of character data inside an element.
public ResultList executeQueryGeneric(QueryParameters qps,DBConnectionWrapper conn,int maxCount) throws SQLException { PreparedStatement pstmt=null; Statement stmt=null; ResultSet rs=null; String actualSql=null; long startTime=System.currentTimeMillis(); long execTime=startTime; try { if (sqlManager =...
No fancy replacement. Only place holder is p_nn. Used for MySQL, etc.
static void compareActualToExpected(String str){ Pattern actualLinkPattern1=Pattern.compile("Sub-test " + subtestNum + " Actual: "+ prefix+ ref1,Pattern.DOTALL); Pattern expectLinkPattern1=Pattern.compile("Sub-test " + subtestNum + " Expect: "+ prefix+ ref1,Pattern.DOTALL); CharBuffer charBuffer=CharBuffer.wrap(s...
Compares the actual string to the expected string in the specified string str String to search through
public boolean hasValue(){ return super.hasTextValue(); }
Returns whether it has the value.
public ILineSegment[] generate(int size){ ILineSegment[] lines=new ILineSegment[size]; for (int i=0; i < size; i++) { double x=Math.random() * (max - length); double y=Math.random() * (max - length); double dx=length * Math.sin(2 * Math.PI * Math.random() - Math.PI); double dy=Math.sqrt(length * len...
Generate a random set of segments within a [max,max] box, extending potentially out to a larger range based upon the length of each line segment. <p>
public AlphaBetaDebugNode(int alpha,int beta){ this.alpha=alpha; this.beta=beta; _ctr=_ctrMaster++; }
Represent a node in the search for a solution in alpha beta.
public MinPQ(){ this(1); }
Initializes an empty priority queue.
public void rawLineNow(String line){ rawLineNow(line,false); }
Sends a raw line to the IRC server as soon as possible without resetting the message delay for messages waiting to send
final public static boolean approximately_equal(double a,double b,double epsilon){ return (Math.abs(a - b) <= epsilon); }
Checks if a ~= b. Use this to test equality of floating point numbers. <p>
private void returnData(Object ret){ if (myHost != null) { myHost.returnData(ret); } }
Used to communicate a return object from a plugin tool to the main Whitebox user-interface.
public boolean isIndeterminate(){ return indeterminate; }
Returns the value of the <code>indeterminate</code> property.
public static ReferenceTable newInstance(String value){ final ReferenceTable returnInstance=new ReferenceTable(); returnInstance.setValue(value); return returnInstance; }
Method newInstance.
public static void M_Requisition(MRequisition r){ List<MPPMRP> mrpList=getQuery(r,null,null).list(); for ( MPPMRP mrp : mrpList) { mrp.setM_Requisition(r); mrp.saveEx(); } }
Create MRP record based in Requisition Line
public final Attribute classAttribute(){ if (m_ClassIndex < 0) { throw new UnassignedClassException("Class index is negative (not set)!"); } return attribute(m_ClassIndex); }
Returns the class attribute.
private static double atan(double xa,double xb,boolean leftPlane){ if (xa == 0.0) { return leftPlane ? copySign(Math.PI,xa) : xa; } final boolean negate; if (xa < 0) { xa=-xa; xb=-xb; negate=true; } else { negate=false; } if (xa > 1.633123935319537E16) { return (negate ^ leftPlane...
Internal helper function to compute arctangent.
public void evaluateTupleQuery(final TupleResultBuilder builder,String xslPath,WorkbenchRequest req,HttpServletResponse resp,CookieHandler cookies,final TupleQuery query,boolean writeCookie,boolean paged,int offset,int limit) throws QueryEvaluationException, QueryResultHandlerException { final TupleQueryResult result...
Evaluate a tuple query, and create an XML results document. This method completes writing of the response. !paged means use all results.
public static void info(String message){ show(message,MessageType.INFO); }
Show an information dialog
public ListRewriteEvent(RewriteEvent[] children){ this.listEntries=new ArrayList<RewriteEvent>(children.length * 2); this.originalNodes=new ArrayList<ASTNode>(children.length * 2); for (int i=0; i < children.length; i++) { RewriteEvent curr=children[i]; this.listEntries.add(curr); if (curr.getOriginal...
Creates a ListRewriteEvent from existing rewrite events.
public Object buildValueObject(Row row){ return buildObject(row,persistenceSettings.getValuePersistenceSettings()); }
Builds Ignite cache value object from Cassandra table row .
public ChangeAttachmentChange(final Attachable attachTo,final String attachmentName,final Object newValue,final Object oldValue,final String property,final boolean resetFirst){ this.attachmentName=attachmentName; attachedTo=attachTo; this.newValue=newValue; this.oldValue=oldValue; this.property=property; cl...
You don't want to clear the variable first unless you are setting some variable where the setting method is actually adding things to a list rather than overwriting.
public ZapToggleButton(Action action){ super(action); }
Creates a toggle button where properties are taken from the Action supplied.
public static File findGemFireLibDir(){ URL jarURL=GemFireVersion.getJarURL(); if (jarURL == null) return null; String path=jarURL.getPath(); path=URLDecoder.decode(path); File f=new File(path); if (f.isDirectory()) { return f; } return f.getParentFile(); }
Finds the gemfire jar path element in the given classpath and returns the directory that jar is in.
public void ensureRows(int rows){ if (rows > getNumRows()) { resize(rows,getNumColumns()); } }
Ensures that the dataset has at least the number of rows, adding rows if necessary to make that the case. The new rows will be filled with missing values.
static void generateSpread(final Tree.QualifiedMemberOrTypeExpression that,final GenerateJsVisitor gen){ boolean isMethod=that.getDeclaration() instanceof Functional; if (isMethod) { gen.out(gen.getClAlias(),"JsCallableList("); gen.supervisit(that); gen.out(",function(e,a){return ",gen.memberAccess(that...
SpreadOp cannot be a simple function call because we need to reference the object methods directly, so it's a function
public void __tearDownUnitTest(){ closeOnShutdown=false; try { if (isOpen()) shutDown(); getIndexManager().destroy(); } catch ( Throwable t) { log.error("Problem during shutdown: " + t,t); } }
<strong>DO NOT INVOKE FROM APPLICATION CODE</strong> - this method deletes the KB instance and destroys the backing database instance. It is used to help tear down unit tests.
public int read(byte[] buffer,int offset,int length) throws IOException { throw new UnsupportedOperationException(String.valueOf(this)); }
Reads the next chunk from the stream.
public void beginShape(){ g.beginShape(); }
Start a new shape of type POLYGON
private IStatus refreshLocalResource(final TFSRepository repository,final IResource resource,final RecursionType recursionType,final Collection<IResource> changedResources,final IProgressMonitor monitor){ Check.notNull(repository,"repository"); Check.notNull(resource,"resource"); Check.notNull(recursionType,"recu...
Refresh the local changes list. We do this by refreshing the local PendingChanges and determining which local resources are affected.
private void nextWindow(Calendar startTime){ if (isDaily()) { startTime.add(Calendar.DAY_OF_MONTH,1); } else if (isWeekly()) { startTime.add(Calendar.WEEK_OF_MONTH,1); } else if (isMonthly()) { int month=startTime.get(Calendar.MONTH); adjustDayOfMonth(startTime,month + 1); } }
Changes to the next window start time.
public static RE mkStar(RE x){ if (x.equals(epsilon) || x.equals(empty)) { return epsilon; } RE res=new RE(ReOp.STAR); res.unaryArg=x; return res; }
Construct a regular expression matching the Kleene closure of the language matched by the argument regular expression.
@Override protected boolean processChanges(IWorkbenchPreferenceContainer container){ boolean needsBuild=!getPreferenceChanges().isEmpty() | projectSpecificChanged; boolean doBuild=false; if (needsBuild) { int count=getRebuildCount(); if (count > rebuildCount) { needsBuild=false; rebuildCount=c...
This method has been copied and adapted from org.eclipse.xtext.ui.preferences.OptionsConfigurationBlock.
@Override public String toString(){ if (m_RangeStrings.size() == 0) { return "Empty"; } String result="Strings: "; Iterator<String> enu=m_RangeStrings.iterator(); while (enu.hasNext()) { result+=enu.next() + " "; } result+="\n"; result+="Invert: " + m_Invert + "\n"; try { if (m_Upper == -1...
Constructs a representation of the current range. Being a string representation, the numbers are based from 1.
void calculateValue(float fraction){ mAnimatedValue=mKeyframeSet.getValue(fraction); }
Function used to calculate the value according to the evaluator set up for this PropertyValuesHolder object. This function is called by ValueAnimator.animateValue().
public static void main(String[] args){ runDataGenerator(new Expression(),args); }
Main method for testing this class.
MultistepExprHolder(ExpressionOwner exprOwner,int stepCount,MultistepExprHolder next){ m_exprOwner=exprOwner; assertion(null != m_exprOwner,"exprOwner can not be null!"); m_stepCount=stepCount; m_next=next; }
Create a MultistepExprHolder.
public int orientationIndex(LineSegment seg){ int orient0=CGAlgorithms.orientationIndex(p0,p1,seg.p0); int orient1=CGAlgorithms.orientationIndex(p0,p1,seg.p1); if (orient0 >= 0 && orient1 >= 0) return Math.max(orient0,orient1); if (orient0 <= 0 && orient1 <= 0) return Math.max(orient0,orient1); return 0; ...
Determines the orientation of a LineSegment relative to this segment. The concept of orientation is specified as follows: Given two line segments A and L, <ul> <li>A is to the left of a segment L if A lies wholly in the closed half-plane lying to the left of L <li>A is to the right of a segment L if A lies wholly in th...
private void onListSelection(Event e){ ListItem selected=null; try { SimpleListModel model=(SimpleListModel)centerList.getModel(); int i=centerList.getSelectedIndex(); selected=(ListItem)model.getElementAt(i); } catch ( Exception ex) { } log.info("Selected=" + selected); if (selected != null) ...
List Selection Listener
protected void handleModelChangedEvent(Model model,Object object,int index){ fireModelChanged(); if (model == treeModel) { if (object instanceof TreeModel.TreeChangedEvent) { if (((TreeModel.TreeChangedEvent)object).isNodeChanged()) { updateNodeAndChildren(((TreeModel.TreeChangedEvent)object).getN...
Handles model changed events from the submodels.
public ProtectOnRelease(){ super(Options.set,"Protect On Release","Should memory be protected on release?",false); }
Create the option.
@Override public Enumeration elements(){ return (permissions.elements()); }
Returns an enumeration of all <tt>PackagePermission</tt> objects in the container.
public boolean isLive(){ return (duration == 0); }
For live streams, duration is 0
public void verifyError(String substring,Throwable t){ verify(Level.SEVERE,substring,t); }
Verify a logging event at the error level with the given message and throwable.
private List<String> fetchTitles(String category) throws SpeechletException { List<String> titles=new LinkedList<String>(); try { DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance(); DocumentBuilder db=dbf.newDocumentBuilder(); Document doc=db.parse(getRequestUrl(category)); NodeList nod...
Fetches the top ten selling titles from the Product Advertising API.
public static void validate(Source source) throws Exception { validate(schema,source,ErrorCodes.X_MALFORMED_OPTIONAL_PARTS_CONF); }
Validates the input source against the schema.
public void addConfiguredProperty(Property property){ this.properties.add(property); }
Add a container property.
public Vertex[] bestAnswer(float percentage,Vertex state,Map<Vertex,Vertex> localVariables,Vertex input,Vertex sentence,Network network){ Vertex previousQuestionInput=input.getRelationship(Primitive.QUESTION); Vertex previousQuestion=null; if (previousQuestionInput != null) { previousQuestion=previousQuestion...
Return the best response to the question, taking into account the input history.
public void endDrag() throws IOException { print("endDrag",null); }
Description of the Method
protected OffHeapStoredObject(long memoryAddress){ MemoryAllocatorImpl.validateAddress(memoryAddress); this.memoryAddress=memoryAddress; }
Used to create a Chunk given an existing, already allocated, memoryAddress. The off heap header has already been initialized.
private double evaluatePredictions(ExampleSet exampleSet){ Iterator<Example> reader=exampleSet.iterator(); int count=0; int correct=0; while (reader.hasNext()) { count++; Example example=reader.next(); if (example.getLabel() == example.getPredictedLabel()) { correct++; } } return (doub...
returns the accuracy of the predictions for the given example set
public GlowServerIcon(){ data=null; }
Create an empty icon.