code
stringlengths
10
174k
nl
stringlengths
3
129k
public void testGetFilterNamesForClassWithMultipleFilters() throws Exception { String xml=WEBAPP_TEST_HEADER + " <filter>" + " <filter-name>f1</filter-name>"+ " <filter-class>f1class</filter-class>"+ " </filter>"+ " <filter>"+ " <filter-name>f2</filter-name>"+ " <filter-class>f2class</filter-class>"+ "...
Tests whether a retrieving the filter names by the name of the class implementing the filter works correctly for a descriptor with multiple filter definitions.
public static ApiException wrapUnknownException(Throwable cause){ return new ApiException(ResultStat.SERVER_INTERNAL_ERROR,cause); }
use this function when you need to return to user and do not know how to handle the exception this exception will be logged stack trace unified.
public void assertNotEqual(long expected,long actual,String errorMessage){ TestUtils.assertNotEqual(expected,actual,errorMessage); }
This method just invokes the test utils method, it is here for convenience
public Mood mood(){ return mood; }
Return the mood. The mood defines emotional states.
public int compareSwappedTo(DoubleDoublePair other){ int fdiff=Double.compare(this.second,other.second); if (fdiff != 0) { return fdiff; } return Double.compare(this.first,other.first); }
Implementation of comparableSwapped interface, sorting by second then first.
@DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:07.257 -0500",hash_original_method="43D5E8C96E4C1ED3ED5B8AD5C39C801C",hash_generated_method="B66E712B9FB43D7AC2C0E83502131686") public RetryAfterHeader createRetryAfterHeader(int ret...
Creates a new RetryAfterHeader based on the newly supplied retryAfter value.
public boolean threadSafeTimeout(long delayTime,TimeUnit unit,Action0 action){ boolean scheduled=true; Thread currentThread=Thread.currentThread(); if (currentThread.equals(dutyThread)) { timerWheel.newTimeout(delayTime,unit,null); } else { scheduled=actions.offer(null); } return scheduled; }
Schedules timeout on the TimerWheel in a thread-safe manner
protected boolean isWhitespace(char ch){ return ((ch == '\t') || Character.isSpaceChar(ch)); }
Checks whether a character is a whitespace character. RFC 2616, section 2.2 defines space and horizontal tab as whitespace. The optional preceeding line break is irrelevant, since header continuation is handled transparently when parsing messages.
CompositePrinterParser toPrinterParser(boolean optional){ return printerParser.withOptional(optional); }
Returns the formatter as a composite printer parser.
@Override public void trigger(DialogueState state,Collection<String> updatedVars){ if (skipNextTrigger) { skipNextTrigger=false; return; } else if (paused || system.getSettings().remoteConnections.isEmpty()) { return; } try { Document xmlDoc=XMLUtils.newXMLDocument(); Element root=xmlDoc....
Sends the updated variables through the socket connection.
public static void addPojoClass(final String name,final PojoClass pojoClass){ pojoClassCache.add(name,pojoClass); }
Add a PojoClass definition to the Cache.
static void checkActive(){ if (!running) { heart=new Thread(new Heartbeat()); heart.setName("Heartbeat"); heart.start(); } }
Check if the heartbeat is active, and start it if it is not.
public IntTable(){ table=new Entry[INITIAL_CAPACITY]; }
Creates a new table.
private int javac(String[] args) throws IOException { int result=-1; if (useTools) { result=javaCompilerTool(args); if (result < 0) { result=javaSunTools(args); } } if (result == 0) return result; result=javacCommand(args); if (result == 0) { useTools=false; } if (result >= 0) ...
Try and run any available compiler. Try embedded compilers before external commands. Only fail if all compilers have be attempted.
protected Z21Message pollMessage(){ return null; }
Invoked if it's appropriate to do low-priority polling of the command station, this should return the next message to send, or null if the TC should just sleep.
private DateMatcher isDate(int year,int month,int dom,int hour,int minute,int second){ return isDate(year,month,dom,hour,minute,second,0); }
Matches the given time.
public boolean isSpatial(){ return spatial; }
Is this a spatial index?
public boolean isLandscape(){ return m_landscape; }
Is Landscape
public int size(){ return getArray().length; }
Returns the number of elements in this list.
public void stopUpdates(){ updateManager.stopUpdates(); }
Calling this method will stop the updater from running and therefore no more events will be fired
private void updateProgress(String progressLabel,int progress){ if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) { myHost.updateProgress(progressLabel,progress); } previousProgress=progress; previousProgressLabel=progressLabel; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
public boolean hasCode(){ return getCode() != null; }
Returns whether it has the The 3166-1 alpha-2 country code.
protected void success(HttpServletRequest request,HttpServletResponse response,UseCaseConf useCaseConf) throws IOException, BookException, SessionException, ValidationException { Integer archiveId=getArchiveId(request); Integer folderId=getFolderId(request); Integer distId=getDistId(request); String caseSensiti...
Metodo invocado para redirigir a la web destion cuando el login se efectuo con exito en la jsp login.jsp
public static void addStaticAspectsToItem(ItemStack item,IItemStackMatcher matcher,AspectTier tier,AspectGroup type,float amountMultiplier,float amountVariation){ addStaticAspectsToItem(item,matcher,tier,type,amountMultiplier,amountVariation,1); }
Adds static aspects to the specified entry
public static String canonicalizeUrl(String url,String refer){ URL base; try { try { base=new URL(refer); } catch ( MalformedURLException e) { URL abs=new URL(refer); return abs.toExternalForm(); } if (url.startsWith("?")) url=base.getPath() + url; URL abs=new URL(base,...
canonicalizeUrl <p/> Borrowed from Jsoup.
@VisibleForTesting static TopologyAPI.Topology mergeTopology(TopologyAPI.Topology topology,Map<String,Integer> proposedComponentCounts){ TopologyAPI.Topology.Builder builder=TopologyAPI.Topology.newBuilder().mergeFrom(topology); for ( String componentName : proposedComponentCounts.keySet()) { Integer paralleli...
For each of the components with changed parallelism we need to update the Topology configs to represent the change.
public void startNalUnit(int nalUnitType){ if (nalUnitType == NAL_UNIT_TYPE_IFR) { reset(); isFilling=true; } }
Invoked to indicate that a NAL unit has started, and if it is an IFR then the buffer will start.
private void writeQNameAttribute(java.lang.String namespace,java.lang.String attName,javax.xml.namespace.QName qname,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String attributeNamespace=qname.getNamespaceURI(); java.lang.String attributePrefix=xmlWriter.getPre...
Util method to write an attribute without the ns prefix
public void invalidateExportMask(URI uri){ masks.remove(uri); maskExportGroupMap.remove(uri); Map<URI,Volume> leftoverMaskToVolumes=maskToVolumes.remove(uri); Map<URI,Volume> tentativelyUnplacedVolumes=(null != leftoverMaskToVolumes) ? leftoverMaskToVolumes : new HashMap<URI,Volume>(); for ( URI exportURI : ...
Remove references to the ExportMask in internal data structures
private static int modifierDescriptionToReflectedType(String name,String key,String value){ switch (key) { case MODIFIER_ABSTRACT: return value.equals("true") ? Modifier.ABSTRACT : 0; case MODIFIER_FINAL: return value.equals("true") ? Modifier.FINAL : 0; case MODIFIER_NATIVE: return value.equals("true") ? Modifie...
Convert string modifier to int modifier.
public synchronized void internalRemoveRelationship(Relationship relationship){ if (relationship == null) { return; } Map<Relationship,Relationship> relationships=getRelationships().get(relationship.getType()); if (relationships == null) { if (this.allRelationships != null && this.allRelationships.conta...
Remove the relationship.
private void showPopupMenu(final NaviNode node,final MouseEvent event,final Object clickedObject,final double y,final List<ICodeNodeExtension> extensions){ final boolean isActiveNode=m_model.getGraph().getEditMode().getLabelEventHandler().isActiveLabel(node.getRealizer().getNodeContent()); final JPopupMenu menu=ZyG...
Displays a popup menu for the given node.
public Builder(String folderPath){ this.folderPath=folderPath; }
Construct a builder.
public Intent putExtra(String name,Parcelable value){ if (mExtras == null) { mExtras=new Bundle(); } mExtras.putParcelable(name,value); return this; }
Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".
public T caseComment_(Comment_ object){ return null; }
Returns the result of interpreting the object as an instance of '<em>Comment </em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
private int largestPivot(int p){ double pivot=Math.abs(rows[p][p]); int answer=p; double x; for (int i=p + 1; i < rows.length; i++) { x=Math.abs(rows[i][p]); if (x > pivot) { answer=i; pivot=x; } } return answer; }
Finds the position of the largest pivot at step p.
@RequestMapping(value="/{jobId}/cancel",method={RequestMethod.PUT}) @ResponseBody public JobInstance cancel(@PathVariable String jobId){ try { final JobInstance jobInstance=jobService.getJobInstance(jobId); return jobService.cancelJob(jobInstance); } catch ( Exception e) { logger.error(e.getLocalizedM...
Cancel a job
public VolatileCallSite(MethodHandle target){ super(target); }
Creates a call site with a volatile binding to its target. The target is set to the given value.
public DiskWriter putDisk(String dsPath,String adapterType,long capacity) throws IOException { ByteBuffer dsPathBytes=stringToCString(dsPath); ByteBuffer msg=newNfcMsg(NFC_FILE_PUT); msg.putInt(NFC_DISK); int conversionFlags=CONV_DISK_VMFS | CONV_DISK_THIN | CONV_CREATE_OVERWRITE; if ("lsilogic".equalsIgnoreC...
Open a PUT_FILE session to upload a disk.
@Override public double classifyInstance(Instance instance) throws Exception { return m_root.classifyInstance(instance); }
Classifies an instance.
private void cleanupDiscovery(StorageSystem system){ try { system.setReachableStatus(false); _dbClient.persistObject(system); } catch ( DatabaseException e) { _logger.error("discoverStorage failed. Failed to update discovery status to ERROR.",e); } }
If discovery fails, then mark the system as unreachable. The discovery framework will remove the storage system from the database.
ParsingError(int column,int row,String originalValue,String message){ this.column=column; this.row=row; this.originalValue=originalValue; this.message=message; }
Creates a new parsing error with the given data.
public void saveContentModel(DataOutputStream out,ContentModel model) throws IOException { if (model == null) { out.writeByte(0); } else if (model.content instanceof ContentModel) { out.writeByte(1); out.writeByte(model.type); saveContentModel(out,(ContentModel)model.content); saveContentMode...
Save a content model to a stream. This does a recursive decent of the entire model.
private void sendHelloMessage() throws IOException { OFHello.Builder builder=factory.buildHello().setXid(handshakeTransactionIds--); OFHello m=builder.build(); channel.write(Collections.singletonList(m)); log.debug("Send hello: {}",m); }
Send a hello message to the switch using the handshake transactions ids.
public final void write(int c) throws IOException { if (bufferSize == 0) { writer.write(c); } else { if (nextChar >= bufferSize) if (autoFlush) flushBuffer(); else bufferOverflow(); cb[nextChar++]=(char)c; } }
Write a single character.
@SuppressWarnings("resource") private static String parseGwtRpcMethodName(InputStream stream,String charEncoding){ try { final Scanner scanner; if (charEncoding == null) { scanner=new Scanner(stream); } else { scanner=new Scanner(stream,charEncoding); } scanner.useDelimiter(GWT_RPC_SE...
Try to parse GWT-RPC method name from request body stream. Does not close the stream.
public void reset(){ numDirectNeighbors=0; numRightNodesReached=0; numRHSVisits=0; minVisitsPerRightNode=Integer.MAX_VALUE; maxVisitsPerRightNode=0; numRightNodesFiltered=0; }
Resets all internal state kept for stats to enable reuse.
@Override public <S,T>Convert<S,T> converter(Class<S> source,Class<T> target){ ConvertFrom<S> convertType=getOrCreate(source); return convertType.converter(target); }
Returns the converter for a given source type and target type.
public static double computePolygonArea2D(List<ReadOnlyVector3> points){ if (points.size() < 3) { return (0); } java.util.Iterator<ReadOnlyVector3> iter=points.iterator(); if (!iter.hasNext()) { return 0; } double area=0; ReadOnlyVector3 firstPoint=iter.next(); ReadOnlyVector3 point=firstPoint; ...
Returns the area enclosed by the specified (x, y) points on a plane (the z coordinates are ignored).
public void FeatureInit(int label,int cp){ this.label=label; this.cp=cp; strId=Integer.toString(label) + " " + Integer.toString(cp); }
Feature init.
public int updateFiredTrigger(Connection conn,OperableTrigger trigger,String state,JobDetail job) throws SQLException { PreparedStatement ps=null; try { ps=conn.prepareStatement(rtp(UPDATE_FIRED_TRIGGER)); ps.setString(1,instanceId); ps.setBigDecimal(2,new BigDecimal(String.valueOf(System.currentTimeMil...
<p> Update a fired trigger. </p>
public void showRecycler(){ hideProgress(); mRecycler.setVisibility(View.VISIBLE); }
Hide the progressbar and show the recycler
public void cancel(Account account,OCFile file){ if (account == null || file == null) { Log_OC.e(TAG,"Cannot cancel with NULL parameters"); return; } Pair<SynchronizeFolderOperation,String> removeResult=mPendingOperations.remove(account,file.getRemotePath()); SynchronizeFolderOperation synchronization=r...
Cancels a pending or current sync' operation.
public void resetTracking(){ totalTime=0; drawCycles=0; }
RESET PERFORMANCE TRACKING FIELDS
public boolean isParameterized(){ EList<TypeRef> _typeArgs=this.getTypeArgs(); boolean _isEmpty=_typeArgs.isEmpty(); return (!_isEmpty); }
<!-- begin-user-doc --> <!-- end-user-doc -->
@EnsuresQualifiers({@EnsuresQualifier(expression="f1",qualifier=Odd.class),@EnsuresQualifier(expression="f2",qualifier=Value.class)}) void oddValueF1(@Value String p1){ f1=null; f2=p1; }
many postcondition
public void combinationSum2(int[] num,int target,int index,List<Integer> comb,List<List<Integer>> result){ if (target == 0) { result.add(new ArrayList<Integer>(comb)); return; } for (int i=index; i < num.length; i++) { int newTarget=target - num[i]; if (newTarget >= 0) { comb.add(num[i]); ...
Skip duplicates after new target is generated
public static Paint newBackgroundPaint(Context context){ final Paint paint=new Paint(); paint.setColor(Color.parseColor(DEFAULT_BACKGROUND_COLOR_ID)); return paint; }
Creates the Paint object for drawing the translucent overlay outside the crop window.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:49.137 -0500",hash_original_method="A4218B7445EF8022439A8D7DC57F2FF7",hash_generated_method="39EA436AC2CA313C3173E04B950DFC15") public void unparsedEntityDecl(String name,String publicId,String systemId,String notationName) throws S...
Receive notification of an unparsed entity declaration. <p>By default, do nothing. Application writers may override this method in a subclass to keep track of the unparsed entities declared in a document.</p>
@Override protected EClass eStaticClass(){ return N4JSPackage.Literals.NEW_EXPRESSION; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public int index(){ return index; }
Returns current index of string array.
public int addNonProductItem(String itemType,String description,String categoryId,BigDecimal price,BigDecimal quantity,Map<String,Object> attributes,String prodCatalogId,String itemGroupNumber,LocalDispatcher dispatcher) throws CartItemModifyException { ShoppingCart.ShoppingCartItemGroup itemGroup=this.getItemGroupBy...
Add a non-product item to the shopping cart.
public boolean testPoint(float x,float y,float z){ return nxX * x + nxY * y + nxZ * z + nxW >= 0 && pxX * x + pxY * y + pxZ * z + pxW >= 0 && nyX * x + nyY * y + nyZ * z + nyW >= 0 && pyX * x + pyY * y + pyZ * z + pyW >= 0 && nzX * x + nzY * y + nzZ * z + nzW >= 0 && pzX * x + pzY * y + pzZ * z + pzW >= 0; }
Test whether the given point <tt>(x, y, z)</tt> is within the frustum defined by <code>this</code> frustum culler.
public static PagesFragment newInstance(String param1,String param2){ PagesFragment fragment=new PagesFragment(); Bundle args=new Bundle(); args.putString(ARG_PARAM1,param1); args.putString(ARG_PARAM2,param2); fragment.setArguments(args); return fragment; }
Use this factory method to create a new instance of this fragment using the provided parameters.
public SpecificX10Light(String systemName,SerialTrafficController tc){ super(systemName,tc); this.tc=tc; maxDimStep=22; }
Create a Light object, with only system name. <P> 'systemName' was previously validated in SerialLightManager
public Column findColumn(String name,boolean caseSensitive){ for (Iterator<Column> it=columns.iterator(); it.hasNext(); ) { Column column=(Column)it.next(); if (caseSensitive) { if (column.getName().equals(name)) { return column; } } else { if (column.getName().equalsIgnoreCase(...
Finds the column with the specified name, using case insensitive matching. Note that this method is not called getColumn(String) to avoid introspection problems.
public RegisterSpec withLocalItem(LocalItem local){ if ((this.local == local) || ((this.local != null) && this.local.equals(local))) { return this; } return makeLocalOptional(reg,type,local); }
Returns an instance that is identical to this one except that the local variable is as specified in the parameter.
public int size(Key lo,Key hi){ if (lo == null) throw new NullPointerException("first argument to size() is null"); if (hi == null) throw new NullPointerException("second argument to size() is null"); if (lo.compareTo(hi) > 0) return 0; if (contains(hi)) return rank(hi) - rank(lo) + 1; else return ra...
Returns the number of keys in this symbol table in the specified range.
public void testGetFamily(){ char expectedReturn=0x01; this.requestedAddressFamilyAttribute.setFamily(MsgFixture.REQUESTED_ADDRESS_FAMILY_ATTRIBUTE_V4); char actualReturn=this.requestedAddressFamilyAttribute.getFamily(); assertEquals("Family is not properly calculated",expectedReturn,actualReturn); expectedRe...
Tests that the address family is always 0x01 or 0x02.
public void renderRotationDisc(GL2 gl){ Vector2 c=this.mass.getCenter(); gl.glColor4fv(Preferences.getBodyRotationDiscColor(),0); double r=this.getRotationDiscRadius(); RenderUtilities.drawCircleFromCenter(gl,r,c.x,c.y,false,false); }
Renders the rotation disc.
public boolean process(ContentEvent event){ ResultContentEvent inEvent=(ResultContentEvent)event; double[] prediction=inEvent.getClassVotes(); int instanceIndex=(int)inEvent.getInstanceIndex(); addStatisticsForInstanceReceived(instanceIndex,inEvent.getClassifierIndex(),prediction,1); if (hasAllVotesArrivedIns...
On event.
private void updateProgress(int progress){ if (myHost != null && progress != previousProgress) { myHost.updateProgress(progress); } previousProgress=progress; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
public static int FNVhash32(int val){ int hashval=FNV_offset_basis_32; for (int i=0; i < 4; i++) { int octet=val & 0x00ff; val=val >> 8; hashval=hashval ^ octet; hashval=hashval * FNV_prime_32; } return Math.abs(hashval); }
32 bit FNV hash. Produces more "random" hashes than (say) String.hashCode().
private static void tryClose(Closeable obj){ if (obj != null) { try { obj.close(); } catch ( IOException e) { e.printStackTrace(); } } }
Release closeable object
private void verifyGroupSnapshotResults(){ List<URI> snapSessionURIs=_dbClient.queryByType(BlockSnapshotSession.class,true); Iterator<BlockSnapshotSession> snapSessionsIter=_dbClient.queryIterativeObjects(BlockSnapshotSession.class,snapSessionURIs,true); Assert.assertTrue("Did not find any snapshot sessions after...
Verifies group snapshot migration results.
public void testStopAfterResume(){ int firstBatch=3; int secondBatch=5; int thirdBatch=7; EndToEndTestUtils.checkNotRecording(); EndToEndTestUtils.startRecording(); EndToEndTestUtils.checkUnderRecording(); EndToEndTestUtils.sendGps(firstBatch); EndToEndTestUtils.pauseRecording(); EndToEndTestUtils.che...
Tests stop after a resume.
public LegacyMongo(){ }
New instance
private void decode1DRun(){ while (!EOS) { if (isTerminating) { isTerminating=false; isWhite=!isWhite; if (isEndOfLine) { isEndOfLine=false; isWhite=true; } } final boolean pixelIsWhite=isWhite; final int pixelCount=getCodeWord(); if (pixelCount > 0) { ...
work through a 1D block reading code words and creating uncompressed data
public static void main(final String[] args){ DOMTestCase.doMain(commentgetcomment.class,args); }
Runs this test from the command line.
public static ProductTimelineFragment newInstance(String gtin){ ProductTimelineFragment productTimelineFragment=new ProductTimelineFragment(); Bundle args=new Bundle(); args.putString(KEY_GTIN,gtin); productTimelineFragment.setArguments(args); return productTimelineFragment; }
Constructs a new instance with the specified parameters. The parameters passed this way survive recreation of the fragment due to orientation changes etc.
public void advance(){ moveToNextIndex(); }
Moves the iterator forward to the next entry in the underlying map.
public void elementAttributesProcessed(String name,Properties extraAttributes,String systemId,int lineNr){ Properties props=(Properties)this.currentElements.pop(); Enumeration enm=props.keys(); while (enm.hasMoreElements()) { String key=(String)enm.nextElement(); extraAttributes.put(key,props.get(key)); ...
This method is called when the attributes of an XML element have been processed. If there are attributes with a default value which have not been specified yet, they have to be put into <I>extraAttributes</I>.
private LogSource(){ }
Don't allow others to create instances
public static DefaultJobDefinition fixedDelayJobDefinition(final String jobType,final String jobName,final String description,final Duration fixedDelay,final int restarts,final Optional<Duration> maxAge){ return new DefaultJobDefinition(jobType,jobName,description,maxAge,Optional.of(fixedDelay),Optional.empty(),resta...
Create a JobDefinition that is using fixed delays specify, when and how often the job should be triggered.
public void service(Mail mail) throws MessagingException { MailAddress senderMailAddress=mail.getSender(); if (senderMailAddress == null) { return; } if (!getMailetContext().isLocalEmail(senderMailAddress)) { return; } Collection<MailAddress> recipients=mail.getRecipients(); if (recipients.size() ...
Services the mailet.
public static String[] splitNoCoalesce(String s,char delimiter){ return splitNoCoalesce(s,Character.toString(delimiter)); }
Exactly like splitNoCoalesce(s, Character.toString(delimiter))
private Class<?> findClassDalvik(String name) throws ClassNotFoundException { if (mDexFile == null) { synchronized (FancyLoader.class) { Constructor ctor; try { ctor=mDexClass.getConstructor(new Class[]{String.class}); } catch ( NoSuchMethodException nsme) { throw new ClassNotF...
Finds the class with the specified binary name, from a DEX file.
public static boolean isPackageInfo(ICompilationUnit cu){ return PACKAGE_INFO_JAVA.equals(cu.getElementName()); }
Tells whether the given CU is the package-info.java.
public static Mapping<Float> floatv(Constraint... constraints){ return new FieldMapping(InputMode.SINGLE,mkSimpleConverter(null),new MappingMeta("float",Float.class)).constraint(checking(null,"error.float",true)).constraint(constraints); }
(convert to Float) mapping
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-03-24 16:07:14.006 -0400",hash_original_method="C5A3BD94A9750CCBAE0B009F3C4F54AC",hash_generated_method="5CC9DDB97EABA13B9A08D78CA70828BE") public boolean isClosed(){ return native_isClosed(native_instance); }
Return true if the current contour is closed()
public boolean hasNext(){ if (nextItem != null) return true; noNext(); return false; }
For performance reasons, we would like not to acquire a lock in hasNext in the common case. To allow for this, we only access fields (i.e. nextItem) that are not modified by update operations triggered by queue modifications.
public static Set<String> subparts(String word){ return Utils.subparts(word,1,4); }
Returns a set with all n-grams; 1<n<4
public boolean isLightEnabled(){ return mLightEnabled; }
Checks whether lighting is enabled
public Info_Column(String colHeader,String colSQL,Class<?> colClass,String IDcolSQL){ super(colHeader,colSQL,colClass,true,false,IDcolSQL); }
Create Info Column (r/o and not color column)
public void abort() throws IOException { completeEdit(this,false); }
Aborts this edit. This releases the edit lock so another edit may be started on the same key.
public CastExpression newCastExpression(){ CastExpression result=new CastExpression(this); return result; }
Creates and returns a new unparented cast expression node owned by this AST. By default, the type and expression are unspecified (but legal).
public String computeSignature(Map<String,String> headers,Map<String,String> queryParameters,String bodyHash,String awsAccessKey,String awsSecretKey){ Date now=new Date(); String dateTimeStamp=dateTimeFormat.format(now); headers.put("x-amz-date",dateTimeStamp); String hostHeader=endpointUrl.getHost(); int por...
Computes an AWS4 signature for a request, ready for inclusion as an 'Authorization' header.
@Override public void start(){ _lifecycle.toActive(); _exitCode.set(null); if (!_isEmbedded) { _activeService.set(this); } if (!CurrentTime.isTest() && !_isEmbedded) { _failSafeHaltThread=new FailSafeHaltThread(); _failSafeHaltThread.start(); _failSafeMemoryFreeThread=new FailSafeMemoryFreeThr...
Starts the server.
@Override public void startCounting(ExampleSet exampleSet,boolean useExampleWeights) throws OperatorException { super.startCounting(exampleSet,useExampleWeights); Iterator<Example> reader=exampleSet.iterator(); this.margin=1.0d; Attribute labelAttr=exampleSet.getAttributes().getLabel(); while (reader.hasNext(...
Calculates the margin.
public boolean rewriteExif(ByteBuffer buf,Collection<ExifTag> tags) throws IOException { ExifModifier mod=null; try { mod=new ExifModifier(buf,this); for ( ExifTag t : tags) { mod.modifyTag(t); } return mod.commit(); } catch ( ExifInvalidFormatException e) { throw new IOException("I...
Attempts to do an in-place rewrite the exif metadata in a ByteBuffer for the given tags. If tags do not exist or do not have the same size as the existing exif tags, this method will fail.