code
stringlengths
10
174k
nl
stringlengths
3
129k
public void delete(Name name,int type,String record) throws IOException { newUpdate(Record.fromString(name,type,DClass.NONE,0,record,origin)); }
Parses a record from the string, and indicates that the record should be deleted from the zone.
private Gearing chooseGearing(final IBindingSet[] bsets){ final IBindingSet bs=(bsets != null && bsets.length > 0) ? bsets[0] : EmptyBindingSet.INSTANCE; if (forwardGearing.inConst != null) { if (log.isDebugEnabled()) log.debug("forward gear"); return forwardGearing; } else if (forwardGearing.outCo...
Choose forward or reverse gear based on the scematics of the operator and the incoming binding sets.
protected POInfo initPO(Properties ctx){ POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName()); return poi; }
Load Meta Data
public Matrix4x3d rotateXYZ(Vector3d angles){ return rotateXYZ(angles.x,angles.y,angles.z); }
Apply rotation of <code>angles.x</code> radians about the X axis, followed by a rotation of <code>angles.y</code> radians about the Y axis and followed by a rotation of <code>angles.z</code> radians about the Z axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counte...
private BufferedImage readTriumphPicture(){ File f2=new File("/Users/johanwjoubert/Documents/Personal/Financing/Triumph/Pictures/S1.jpg"); BufferedImage bi=null; try { bi=ImageIO.read(f2); } catch ( IOException e) { e.printStackTrace(); } return bi; }
Just a dummy method to test the image reading capability of the <i>java.awt</i> package.
@DSSpec(DSCat.IO) @DSSource({DSSourceKind.IO}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-24 16:09:00.003 -0500",hash_original_method="32F97B2485E75E3ED9E853F934660C63",hash_generated_method="1CBDDE678B85257BFA5CC8ECFAB93B99") public int read(byte b[],int offset,int len) throws IOExc...
Attempts to read <code>len</code> bytes into the specified <code>b</code> array starting at <code>offset</code> from this InputStream.
protected Result decode(BinaryBitmap bitmap){ possibleResultPoints.clear(); try { if (reader instanceof MultiFormatReader) { return ((MultiFormatReader)reader).decodeWithState(bitmap); } else { return reader.decode(bitmap); } } catch ( Exception e) { return null; } finally { ...
Decode a binary bitmap.
public static NetworkRestRep toNetworkRestRep(Network network,DbClient dbClient){ NetworkRestRep networkRestRep=MapNetwork.getInstance().apply(network); List<EndpointAliasRestRep> endpoints=networkRestRep.getEndpointsDiscovered(); if (endpoints.isEmpty() || !network.getDiscovered() || !network.getTransportType()....
Map <code>Network</code> to <code>NetworkRestRep</code> object. Since <code>remote_port_alias</code> is not readily available, it must be read from corresponded <code>FCEndpoint</code>.
public void testMoveFileDestinationRootSourceMissing() throws Exception { create(igfsSecondary,paths(DIR,SUBDIR),paths(FILE)); create(igfs,null,null); igfs.rename(FILE,IgfsPath.ROOT); checkExist(igfs,DIR,SUBDIR); checkExist(igfs,igfsSecondary,new IgfsPath("/" + FILE.name())); checkNotExist(igfs,igfsSecondar...
Test file move when destination is the root and source is missing.
public void decrement(){ value--; }
Decrements the value.
public void removeVertex(Vertex vertex){ throwReadOnly(); }
Remove the vertex from the network. Note that the vertex must be no longer referenced by any other vertex in the network.
private TimSort(T[] a,Comparator<? super T> c){ this.a=a; this.c=c; int len=a.length; @SuppressWarnings({"unchecked","UnnecessaryLocalVariable"}) T[] newArray=(T[])new Object[len < 2 * INITIAL_TMP_STORAGE_LENGTH ? len >>> 1 : INITIAL_TMP_STORAGE_LENGTH]; tmp=newArray; int stackLen=(len < 120 ? 5 : len < 154...
Creates a TimSort instance to maintain the state of an ongoing sort.
public double weightedFalsePositiveRate(){ double[] classCounts=new double[m_NumClasses]; double classCountSum=0; for (int i=0; i < m_NumClasses; i++) { for (int j=0; j < m_NumClasses; j++) { classCounts[i]+=m_ConfusionMatrix[i][j]; } classCountSum+=classCounts[i]; } double falsePosTotal=0; ...
Calculates the weighted (by class size) false positive rate.
@Override public void AddToSuppressLLDPs(DatapathId sw,OFPort port){ NodePortTuple npt=new NodePortTuple(sw,port); this.suppressLinkDiscovery.add(npt); deleteLinksOnPort(npt,"LLDP suppressed."); }
Add a switch port to the suppressed LLDP list. Remove any known links on the switch port.
public R proceed(final T1 param1,final T2 param2){ return fn.apply(param1,param2); }
Proceed and execute wrapped BiFunction with it's input params as captured
public synchronized float[][] extract(int maxFeatureValue,int[] distanceSet,int[][] img){ long totalComplexity=0; final int W=img.length; final int H=img[0].length; final int MAX_D=distanceSet[distanceSet.length - 1]; final float[][] A=new float[maxFeatureValue][distanceSet.length]; final float[] Hi=new flo...
extract extracts an auto-correlogram from an Image Not thread safe, use one object per thread.
public static boolean testConds(int b){ short x=(short)b; int y=x & 0xffff; return y == 0xffff; }
Tests if the if does work properly on short stamp.
private static int unitIndex(int bitIndex){ return bitIndex >>> 6; }
Given a bit index return unit index containing it.
public static Calendar updated(Calendar self,Map<Object,Integer> updates){ Calendar result=(Calendar)self.clone(); set(result,updates); return result; }
Legacy alias for copyWith. Will be deprecated and removed in future versions of Groovy.
public static long sum(final int[] a){ long sum=0; for ( final int x : a) { sum+=x; } return sum; }
Sum an array of ints. Returns a long in order to minimise changes of overflow.
private void initStage(){ if (getMarketplaceBean().getMarketplaceId() != null) { try { stages=getBrandManagementService().getMarketplaceStageLocalization(getMarketplaceBean().getMarketplaceId()); } catch ( SaaSApplicationException e) { marketplaceBean.checkMarketplaceDropdownAndMenuVisibility(...
Initializes the marketplace id and the localized stages if not already done.
@Override public Type FLOAT(){ return floatType; }
the Cypher type FLOAT
private int measureLong(int measureSpec){ int result; int specMode=MeasureSpec.getMode(measureSpec); int specSize=MeasureSpec.getSize(measureSpec); if ((specMode == MeasureSpec.EXACTLY) || (mViewPager == null)) { result=specSize; } else { final int count=mViewPager.getAdapter().getCount(); result...
Determines the width of this view
@Override public void onUIRefreshBegin(PtrFrameLayout frame){ mDrawable.setAlpha(255); mDrawable.start(); }
perform refreshing UI
protected String createErrorMessage(String message){ return String.format(Locale.US,"Parsing error at line: %d column: %d. %s",locator.getLineNumber(),locator.getColumnNumber(),message); }
Creates an error message.
public final char yycharat(int pos){ return zzBuffer[zzStartRead + pos]; }
Returns the character at position <tt>pos</tt> from the matched text. It is equivalent to yytext().charAt(pos), but faster
void existsAction(NodeRepresentation nodeRep){ int idx=nodeRep.getParentIndex(); Vector<NodeRepresentation> parentVec=nodeRep.getParentVector(); Decomposition decomp=nodeRep.decomposition; state.hasChanged=true; if (decomp.definedOp != null) { if (parentVec == state.assumeReps) { state.assumpDefinit...
Executes an \E split of an assumption. If this is a top-level assumption, then the NEW variables may have to be changed to avoid a name clash with NEW variables or other bound variables of later assumptions or of the goal. Also, for a top-level assumption , if an AND-split has been performed, then this has to increment...
public OwlAxioms(){ super(); }
De-serialization ctor.
@VisibleForTesting static void makeCommand(StringBuilder rawBuilder,StringBuilder logBuilder,int sequenceNumber,String cmd,Object... args){ if (cmd.indexOf('\0') >= 0) { throw new IllegalArgumentException("Unexpected command: " + cmd); } if (cmd.indexOf(' ') >= 0) { throw new IllegalArgumentException("Arg...
Make command for daemon, escaping arguments as needed.
public SocketTimeoutException(Throwable cause){ super(null,cause); }
Constructs a new instance with given cause.
public void embed(Properties ctx,int windowNo,GridWindow gridWindow,int adTabId,int tabIndex,IADTabPanel tabPanel){ EmbeddedPanel ep=new EmbeddedPanel(); ep.tabPanel=tabPanel; ep.adTabId=adTabId; ep.tabIndex=tabIndex; ep.gridWindow=gridWindow; includedPanel.add(ep); Group group=includedTab.get(adTabId); ...
Embed detail tab
public int sizeMapArray(){ int x=0; for ( Segment<K,V> s : segments) { x+=s.entries.length; } return x; }
Get the length of the internal map array.
@Override public T defaultCase(EObject object){ return null; }
Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch, but this is the last case anyway. <!-- end-user-doc -->
public void writeSBits(int numBits,int value) throws IOException { long lval=value & 0x7FFFFFFF; if (value < 0) { lval|=1L << (numBits - 1); } writeUBits(numBits,lval); }
Write a signed value to the output stream in the given number of bits. The value must actually fit in that number of bits or it will be garbled
public CsvWriter put(String key,String value) throws CsvException { int index=names.get(key); return put(index,value); }
Writes value to key in current row.
public static double crossValidateModel(DensityBasedClusterer clusterer,Instances data,int numFolds,Random random) throws Exception { Instances train, test; double foldAv=0; ; data=new Instances(data); data.randomize(random); for (int i=0; i < numFolds; i++) { train=data.trainCV(numFolds,i,random); ...
Perform a cross-validation for DensityBasedClusterer on a set of instances.
public static int waitForCompletion(Future<?>[] futures,IntIntFunction aggr){ int size=futures.length; Integer[] results=new Integer[size]; int a=0; try { for (int j=0; j < size; j++) { results[j]=(Integer)futures[j].get(); } a=results[0]; for (int j=1; j < size; j++) { a=aggr.apply(...
Waits for all threads to complete computation and aggregates the result.
public static List<URI> refreshHDSConnections(final List<StorageProvider> hicommandProviderList,DbClient dbClient,HDSApiFactory hdsApiFactory){ List<URI> activeProviders=new ArrayList<URI>(); for ( StorageProvider storageProvider : hicommandProviderList) { try { HDSApiClient hdsApiClient=hdsApiFactory.ge...
makes simple rest call to device manager to validate the provider reachable state for passed hds providers
public void testCreationUnique(){ Instances data; ArrayList<Attribute> atts; String relName; relName="testCreationUnique"; atts=new ArrayList<Attribute>(); atts.add(new Attribute("att-numeric_1")); atts.add(new Attribute("att-numeric_2")); atts.add(new Attribute("att-data_1","yyyy-MM-dd HH:mm")); atts...
Tests the creation of a dataset (unique attribute names).
public double incrementThisActive(){ return activityStats.thisActive.incrementAndReturn(); }
done wheter activity tracking is on or off
public void service(Mail mail){ }
Do nothing.
public void testTooLarge() throws Exception { BigInteger tooLarge=BigInteger.ONE.shiftLeft(128); IllegalArgumentException expected=expectThrows(IllegalArgumentException.class,null); assertTrue(expected.getMessage().contains("requires more than 16 bytes storage")); }
Test if we add a too-large value
protected void sequence_Arguments_ParameterizedCallExpression_TypeArguments(ISerializationContext context,ParameterizedCallExpression semanticObject){ genericSequencer.createSequence(context,semanticObject); }
Contexts: PrimaryExpression<Yield> returns ParameterizedCallExpression PrimaryExpression returns ParameterizedCallExpression ParameterizedCallExpression<Yield> returns ParameterizedCallExpression ParameterizedCallExpression returns ParameterizedCallExpression MemberExpression.IndexedAccessExpression_2_1_0_0<Yield> retu...
public void sendQsiMessage(QsiMessage m,QsiListener reply){ log.debug("sendQsiMessage message: [{}]",m); lastSender=reply; notifyMessage(m,reply); int len=m.getNumDataElements(); int cr=0; int start=0; if (isSIIBootMode()) { cr=1; start=0; } else { cr=3; start=1; } byte msg[]=new by...
Forward a preformatted message to the actual interface.
@Benchmark public long test5_UsingKeySetAndIterator() throws IOException { long i=0; Iterator<Integer> itr2=map.keySet().iterator(); while (itr2.hasNext()) { Integer key=itr2.next(); i+=key + map.get(key); } return i; }
5. Using keySet and iterator
public TLinkedList(){ super(); }
Creates a new <code>TLinkedList</code> instance.
@Override public IGangliaMetadataMessage resolve(final IGangliaMetadataMessage decl){ return decl; }
Always returns the caller's argument.
@Override public boolean supportsDb(String type){ return true; }
No database tables used, so all supported
public static String parseTemplate(Map parameters,String input){ if (parameters == null) { return input; } StrSubstitutor substitutor=new StrSubstitutor(StrLookup.mapLookup(parameters)); return substitutor.replace(input); }
substitute parameters into template
public StandardTokenizerFactory(Map<String,String> args){ super(args); maxTokenLength=getInt(args,"maxTokenLength",StandardAnalyzer.DEFAULT_MAX_TOKEN_LENGTH); if (!args.isEmpty()) { throw new IllegalArgumentException("Unknown parameters: " + args); } }
Creates a new StandardTokenizerFactory
@Deprecated public static void assertNotEquals(Object item1,Object item2){ try { Verify.assertNotEquals("items",item1,item2); } catch ( AssertionError e) { Verify.throwMangledException(e); } }
Assert that two items are not the same. If one item is null, the the other must be non-null.
private static void clearSyncState(Context context){ MyTracksProviderUtils myTracksProviderUtils=MyTracksProviderUtils.Factory.get(context); Cursor cursor=null; try { cursor=myTracksProviderUtils.getTrackCursor(SyncUtils.DRIVE_ID_TRACKS_QUERY,null,null); if (cursor != null && cursor.moveToFirst()) { ...
Clears the sync state. Assumes sync is turned off. Do not want clearing the sync state to cause sync activities.
public static _Fields findByThriftId(int fieldId){ switch (fieldId) { case 1: return MESSAGE_TYPE; case 2: return SW_PORT_TUPLE; case 3: return DATA; default : return null; } }
Find the _Fields constant that matches fieldId, or null if its not found.
private void init(){ m_columnName=this.getColumnName(); if (m_columnName.equals("C_BPartner_ID")) { popupMenu=new WEditorPopupMenu(true,true,true,true,true); getComponent().setButtonImage("/images/BPartner10.png"); } else if (m_columnName.equals("M_Product_ID")) { popupMenu=new WEditorPopupMenu(tru...
initialise editor
public static <T>BiFunction<T,CloseableHttpResponse,T> inputOn200(){ return inputOn(HttpStatus.SC_OK); }
Return the input tuple on OK. Function that returns null (no output) if the HTTP response is not OK (200), otherwise it returns the input tuple. The HTTP entity in the response is consumed and discarded.
@Override public synchronized void addHandshakeCompletedListener(HandshakeCompletedListener listener){ if (listener == null) { throw new IllegalArgumentException("listener is null"); } if (handshakeListeners == null) { handshakeListeners=new HashMap<HandshakeCompletedListener,AccessControlContext>(4); }...
Registers an event listener to receive notifications that an SSL handshake has completed on this connection.
private void correctErrors(byte[] codewordBytes,int numDataCodewords) throws ChecksumException { int numCodewords=codewordBytes.length; int[] codewordsInts=new int[numCodewords]; for (int i=0; i < numCodewords; i++) { codewordsInts[i]=codewordBytes[i] & 0xFF; } int numECCodewords=codewordBytes.length - nu...
<p>Given data and error-correction codewords received, possibly corrupted by errors, attempts to correct the errors in-place using Reed-Solomon error correction.</p>
@Override public void onAction(final ActionType at){ if (isReleased()) { return; } switch (at) { case HARVEST: at.send(at.fillTargetInfo(entity)); break; default : super.onAction(at); break; } }
Perform an action.
double dot(Vertex v){ return (p.x * v.getX() + p.y * v.getY()); }
Computes the inner or dot product
public void processAttributes(java.io.Writer writer,int nAttrs) throws IOException, SAXException { for (int i=0; i < nAttrs; i++) { processAttribute(writer,m_attributes.getQName(i),m_attributes.getValue(i),m_elemContext.m_elementDesc); } }
Process the attributes, which means to write out the currently collected attributes to the writer. The attributes are not cleared by this method
@Deprecated public SkeletonMismatchException(String s){ super(s); }
Constructs a new <code>SkeletonMismatchException</code> with a specified detail message.
public Element create(String prefix,Document doc){ return new SVGOMFlowRegionBreakElement(prefix,(AbstractDocument)doc); }
Creates an instance of the associated element type.
static File createSegmentFile(String name,File directory,long id,long version){ return new File(directory,String.format("%s-%d-%d.log",Assert.notNull(name,"name"),id,version)); }
Creates a segment file for the given directory, log name, segment ID, and segment version.
void drawString(Graphics g,String str,int x,int y){ }
Draw the given char array using the current font and color in the x,y coordinates
public void write(byte[] content) throws IOException { out.write(content); }
Writes the given bytes into the encoder's output stream.
public static final void show(Window owner){ PreferencesDialog dialog=new PreferencesDialog(owner); dialog.setLocationRelativeTo(owner); dialog.setVisible(true); if (!dialog.canceled) { dialog.pnlPreferences.setPreferences(); } }
Shows an edit preferences dialog and sets the properties if the user clicks apply.
private static void putLinks(final serverObjects prop,final String[] wordArray,Document document){ prop.put("viewMode",VIEW_MODE_AS_LINKLIST); boolean dark=true; int i=0; if (document.getEmaillinks() != null) { Iterator<AnchorURL> emailit=document.getEmaillinks().iterator(); while (emailit.hasNext()) { ...
Fill prop object with document links.
@Override public void onCreate(){ super.onCreate(); sAppInstance=this; PackageInfo pInfo; try { pInfo=getPackageManager().getPackageInfo(getPackageName(),0); sIsMavenBuild=pInfo.versionCode > 0 && !pInfo.versionName.equals("dev"); sAppVersionCode=pInfo.versionCode; sAppVersionName=pInfo.versionN...
Init app core constants, init debug logging and 3rd librarieds like Crittercism, Google Analytics, etc.
public static CCAnimation animation(String name,float delay,ArrayList<CCSpriteFrame> frames){ return new CCAnimation(name,delay,frames); }
Creates a CCAnimation with a name, delay and an array of CCSpriteFrames.
public void onShowNotification(NotificationView view,View contentView,NotificationEntry entry,int layoutId){ if (DBG) Log.v(TAG,"onShowNotification - " + entry.ID); final Drawable icon=entry.iconDrawable; final CharSequence title=entry.title; final CharSequence text=entry.text; final CharSequence when=entry...
Called when a notification is being displayed. This is the place to update the user interface of child-views for the new notification.
public long timestamp(){ return Long.valueOf(file.getName().substring(file.getName().lastIndexOf(PART_SEPARATOR) + 1,file.getName().lastIndexOf(EXTENSION_SEPARATOR))); }
Returns the snapshot timestamp.
public void putInt(String key,int value){ map.put(key,value); }
Inserts an int value into the mapping of this Bundle, replacing any existing value for the given key.
@LargeTest public void testMediaImageItemRenderingModes() throws Exception { final String imageItemFileName=INPUT_FILE_PATH + "IMG_1600x1200.jpg"; final int imageItemRenderingMode=MediaItem.RENDERING_MODE_BLACK_BORDER; boolean flagForException=false; final MediaImageItem mediaImageItem1=mVideoEditorHelper.creat...
To Test the Media Image API : Get and Set rendering Mode
void keepOnlyPositiveCounts(){ int firstProbe=states.length - 1; while (states[firstProbe] > 0) { firstProbe--; } for (int probe=firstProbe; probe-- > 0; ) { if (states[probe] > 0 && values[probe] <= 0) { hashDelete(probe); numActive--; } } for (int probe=states.length; probe-- > fir...
Processes the map arrays and retains only keys with positive counts.
public Heap(E[] objects){ for (int i=0; i < objects.length; i++) add(objects[i]); }
Create a heap from an array of objects
public static boolean isNotEmpty(boolean[] array){ return (array != null && array.length != 0); }
<p>Checks if an array of primitive booleans is not empty or not <code>null</code>.</p>
private static Object matchOrReplace(Context cx,Scriptable scope,Scriptable thisObj,Object[] args,RegExpImpl reImpl,GlobData data,boolean forceFlat){ NativeRegExp re; String str=ScriptRuntime.toString(thisObj); data.str=str; Scriptable topScope=ScriptableObject.getTopLevelScope(scope); if (args.length == 0) {...
Analog of C match_or_replace.
@Override public void run(){ amIActive=true; String inputHeader=null; String outputHeader=null; int row, col; int progress=0; double z, z2, lowestNeighbour; int i; int[] dX={1,1,1,0,-1,-1,-1,0}; int[] dY={-1,0,1,1,1,0,-1,-1}; boolean isPit; double aSmallValue; if (args.length <= 0) { showFee...
Used to execute this plugin tool.
public void error(SAXParseException e) throws SAXException { }
Receive notification of a recoverable parser error. <p>The default implementation does nothing. Application writers may override this method in a subclass to take specific actions for each error, such as inserting the message in a log file or printing it to the console.</p>
private void initCrawlConfigUtils(){ HeritrixParameterValueModifier urlModifier=new HeritrixParameterValueModifier(); urlModifier.setAttributeName("key"); urlModifier.setAttributeValue("seeds.textSource.value"); urlModifier.setIdBeanParent("longerOverrides"); urlModifier.setElementName("prop"); ccu.setUrlMo...
Set up the CrawlConfigUtils instance with modifiers
@Override protected EClass eStaticClass(){ return MappingPackage.Literals.DATA_TYPE_MAPPING_MODEL; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public ColorTintFilter(Color mixColor,float mixValue){ if (mixColor == null) { throw new IllegalArgumentException("mixColor cannot be null"); } this.mixColor=mixColor; if (mixValue < 0.0f) { mixValue=0.0f; } else if (mixValue > 1.0f) { mixValue=1.0f; } this.mixValue=mixValue; int mix_r=(i...
<p>Creates a new color mixer filter. The specified color will be used to tint the source image, with a mixing strength defined by <code>mixValue</code>.</p>
@Override public String toString(){ return "(output)"; }
Returns "(output)".
public ServiceInvocationTest(String name){ super(name); }
Constructs a new Service Invocation test case with the given name. <!-- begin-user-doc --> <!-- end-user-doc -->
public Context(Object context){ super(context); }
Wraps <tt>org.apache.catalina.Context</tt> object.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:37.721 -0500",hash_original_method="DB86B1A78C8282F0076D098AB19F02D7",hash_generated_method="6476808AA0B23A874519A7923EE0CE15") private static CookieOrigin adjustEffectiveHost(final CookieOrigin origin){ String host=origin.getHost...
Set 'effective host name' as defined in RFC 2965. <p> If a host name contains no dots, the effective host name is that name with the string .local appended to it. Otherwise the effective host name is the same as the host name. Note that all effective host names contain at least one dot.
@GET @Path("{guid}/outputs/graph") @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public Response outputsGraph(@PathParam("guid") String guid){ LOG.info("Fetching lineage outputs graph for entity guid={}",guid); AtlasPerfTracer perf=null; try { if (AtlasPerfTracer.isPerfTraceEnabled(P...
Returns the outputs graph for a given entity id.
public void fill(final double[][] data,final int startRow,final int startCol){ final int rows=data.length; final int cols=data[0].length; verifyTrue(startRow < rows && startRow < getRowCount(),"illegal startRow: %s",startRow); verifyTrue(startCol < cols && startCol < getColumnCount(),"illegal startCol: %s",star...
Populate matrix with given data.
public boolean isAllowPartials(){ return allowPartials; }
Find out whether the spaces off the map are counted as clear and available. If they are, then objects can appear partially on the map.
private synchronized void updateSpriteFrame(){ if (mDrawingNum != mFrequency) { mDrawingNum++; return; } mDrawingNum=Constant.DEFAULT_DRAWING_NUM; mSpriteSheet.updateFrame(); }
Move frame of SpriteSheet
public byte canTeleport(){ if (!hasFrame()) { return 2; } if (getClosest() == null) { return 3; } List<Entity> entitiesInPortal=getToTeleport(); Coord4D closestCoords=getClosest(); int electricityNeeded=0; for ( Entity entity : entitiesInPortal) { electricityNeeded+=calculateEnergyCost(enti...
1: yes 2: no frame 3: no link found 4: not enough electricity
public static File showOpenFile(FileDataStoreFactorySpi format,Shell parent){ return showOpenFile(format,null,parent); }
Show a file open dialog that filters for files that match a given file data store format
public String prepareIt(){ log.info(toString()); m_processMsg=ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; MDocType dt=MDocType.get(getCtx(),getC_DocType_ID()); if (!MPeriod.isOpen(getCtx(),getMovementDate(...
Prepare Document
public int postWebPages(String[] args,int startIndexInArgs,OutputStream out){ reset(); LinkedHashSet<URL> s=new LinkedHashSet<>(); for (int j=startIndexInArgs; j < args.length; j++) { try { URL u=new URL(normalizeUrlEnding(args[j])); s.add(u); } catch ( MalformedURLException e) { war...
This method takes as input a list of start URL strings for crawling, adds each one to a backlog and then starts crawling
public void findAndUndo(Object obj){ }
Part of the interface where the EditorLayer can provide components that are available via the MapHandler/BeanContext. The object is something that has been removed from the MapHandler.
protected static void indexExistingRows(Connection conn,String schema,String table) throws SQLException { FullTextLucene2.FullTextTrigger existing=new FullTextLucene2.FullTextTrigger(); existing.init(conn,schema,null,table,false,Trigger.INSERT); String sql="SELECT * FROM " + StringUtils.quoteIdentifier(schema) + ...
Add the existing data to the index.
public static void testSentence(){ System.out.println(Utils.getWords("Hello what is 1 + (2*3) http://www.foo/bluee? 123 hey")); System.out.println(Utils.getWords("Hello what is 1 + (2*3) http://www.foo/bluee? f")); System.out.println(Utils.getWords("Hello what is 1 + (2*3) http://www.foo/bluee?")); String a=new...
Test sentence processing.
public Y between(X from,X to){ return add(" BETWEEN ? AND ?",from,to); }
SQL: <code>BETWEEN ? AND ?</code>
public Dimension preferredLayoutSize(Container parent){ Dimension cpd, mbd, tpd; int cpWidth=0; int cpHeight=0; int mbWidth=0; int mbHeight=0; int tpWidth=0; int tpHeight=0; Insets i=parent.getInsets(); JRootPane root=(JRootPane)parent; if (root.getContentPane() != null) { cpd=root.getContentPan...
Returns the amount of space the layout would like to have.
public void hideData(int index){ tagData.setElementAt(null,index); }
Internal method. Not for typical use. <p> Remove the data value from the report. This operation is irreversible.