code
stringlengths
10
174k
nl
stringlengths
3
129k
public static double convertLatOrLongToDouble(Rational[] coordinate,String reference){ try { double degrees=coordinate[0].toDouble(); double minutes=coordinate[1].toDouble(); double seconds=coordinate[2].toDouble(); double result=degrees + minutes / 60.0 + seconds / 3600.0; if ((reference.equals("...
Gets the double representation of the GPS latitude or longitude coordinate.
public byte[] asn1Encode() throws Asn1Exception, IOException { DerOutputStream bytes=new DerOutputStream(); DerOutputStream temp=new DerOutputStream(); bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT,true,(byte)0x00),pATimeStamp.asn1Encode()); if (pAUSec != null) { temp=new DerOutputStream(); temp.p...
Encodes a PAEncTSEnc object.
public void goToNextColor(){ mColorIndex=(mColorIndex + 1) % (mColors.length); }
Proceed to the next available ring color. This will automatically wrap back to the beginning of colors.
public static Map<String,Object> createContentMethod(DispatchContext dctx,Map<String,? extends Object> rcontext){ Map<String,Object> context=UtilMisc.makeMapWritable(rcontext); context.put("entityOperation","_CREATE"); List<String> targetOperationList=ContentWorker.prepTargetOperationList(context,"_CREATE"); if...
Create a Content method. The work is done in this separate method so that complex services that need this functionality do not need to incur the reflection performance penalty.
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); if (modelList == null) { throw new NullPointerException(); } if (knowledge == null) { throw new NullPointerException(); } }
Adds semantic checks to the default deserialization method. This method must have the standard signature for a readObject method, and the body of the method must begin with "s.defaultReadObject();". Other than that, any semantic checks can be specified and do not need to stay the same from version to version. A readObj...
public void paintBorder(Component c,Graphics g,int x,int y,int w,int h){ Graphics copy=g.create(); if (copy != null) { try { copy.translate(x,y); paintLine(c,copy,w,h); } finally { copy.dispose(); } } }
Paint Border
@Override public void unregisterListener(RadioListener mRadioListener){ log("Register unregistered."); mService.unregisterListener(mRadioListener); }
Unregister listeners
private double distance(Instance first,Instance second){ double diff, distance=0; for (int i=0; i < m_instances.numAttributes(); i++) { if (i == m_instances.classIndex()) { continue; } double firstVal=m_globalMeansOrModes[i]; double secondVal=m_globalMeansOrModes[i]; switch (m_instances.attrib...
Calculates the distance between two instances
private static Method findGetTopologyMethod(Object topologySource,String methodName) throws NoSuchMethodException { Class clazz=topologySource.getClass(); Method[] methods=clazz.getMethods(); ArrayList<Method> candidates=new ArrayList<Method>(); for ( Method method : methods) { if (!method.getName().equals...
Given a `java.lang.Object` instance and a method name, attempt to find a method that matches the input parameter: `java.util.Map` or `backtype.storm.Config`.
public boolean checkSlotAndSize(@Nonnull IInventory inv,@Nullable IMultiItemStacks expected,int src){ final ItemStack actual=inv.getStackInSlot(src); if (expected == null) { if (actual != null) return false; } else { if (actual == null) return false; if (!expected.containsItemStack(actual)) ...
Checks the given inventory and slot for an expected ItemStack
public void write(String str,int off,int len) throws IOException { internalOut.write(str,off,len); }
Writes a portion of a string.
public static InputStream systemDotIn(){ return System.in; }
Get System.in. CliTools should be allowed to use System.in/out/err. This is private because we only want them to be used by cli tools.
public void onMotion(MotionEvent event,Interaction iact){ }
Notifies listener of a mouse motion event. A motion event is dispatched when no button is currently pressed, in an isolated "one shot" interaction, and always goes to the layer hit by the event coordinates.
public void put(E e) throws InterruptedException { checkNotNull(e); final ReentrantLock lock=this.lock; lock.lockInterruptibly(); try { while (count == items.length) notFull.await(); enqueue(e); } finally { lock.unlock(); } }
Inserts the specified element at the tail of this queue, waiting for space to become available if the queue is full.
public void draw(Shape s){ Stroke stroke=gc.getStroke(); if (stroke instanceof BasicStroke) { Element svgShape=shapeConverter.toSVG(s); if (svgShape != null) { domGroupManager.addElement(svgShape,DOMGroupManager.DRAW); } } else { Shape strokedShape=stroke.createStrokedShape(s); fill(str...
Strokes the outline of a <code>Shape</code> using the settings of the current <code>Graphics2D</code> context. The rendering attributes applied include the <code>Clip</code>, <code>Transform</code>, <code>Paint</code>, <code>Composite</code> and <code>Stroke</code> attributes.
public void tank(double leftSpeed,double rightSpeed){ leftSpeed=speedLimiter.applyAsDouble(leftSpeed); rightSpeed=speedLimiter.applyAsDouble(rightSpeed); left.setSpeed(leftSpeed); right.setSpeed(rightSpeed); }
Provide tank steering using the stored robot configuration. This function lets you directly provide joystick values from any source.
@Override public InputHandler copy(){ return new DefaultInputHandler(this); }
Returns a copy of this input handler that shares the same key bindings. Setting key bindings in the copy will also set them in the original.
public void schedBowlGames(){ for (int i=0; i < teamList.size(); ++i) { teamList.get(i).updatePollScore(); } Collections.sort(teamList,new TeamCompPoll()); semiG14=new Game(teamList.get(0),teamList.get(3),"Semis, 1v4"); teamList.get(0).gameSchedule.add(semiG14); teamList.get(3).gameSchedule.add(semiG14)...
Schedules bowl games based on team rankings.
public Element(ElementType type,boolean defaultAttributes){ theType=type; if (defaultAttributes) theAtts=new AttributesImpl(type.atts()); else theAtts=new AttributesImpl(); theNext=null; preclosed=false; }
Return an Element from a specified ElementType.
protected AbstractEvent retargetEvent(AbstractEvent e,NodeEventTarget target){ AbstractEvent clonedEvent=e.cloneEvent(); setTarget(clonedEvent,target); return clonedEvent; }
Clones and retargets the given event.
protected void sequence_TypeRef_TypeRefWithModifiers_UnionTypeExpressionOLD(ISerializationContext context,UnionTypeExpression semanticObject){ genericSequencer.createSequence(context,semanticObject); }
Contexts: UnionTypeExpression.UnionTypeExpression_1_0 returns UnionTypeExpression IntersectionTypeExpression returns UnionTypeExpression IntersectionTypeExpression.IntersectionTypeExpression_1_0 returns UnionTypeExpression PrimaryTypeExpression returns UnionTypeExpression Constraint: ( typeRefs+=TypeRefWithoutModifiers...
private void updatePhysicalInterval(Register p,CompoundInterval c,BasicInterval stop){ CompoundInterval physInterval=regAllocState.getInterval(p); if (physInterval == null) { regAllocState.setInterval(p,c.copy(p,stop)); } else { if (VM.VerifyAssertions) VM._assert(!c.intersects(physInterval)); st...
Update the interval representing the allocations of a physical register p to include a new compound interval c. Include only those basic intervals in c up to and including basic interval stop.
protected boolean isAssignable(AnnotatedTypeMirror varType,AnnotatedTypeMirror receiverType,Tree variable){ return true; }
Tests whether the variable accessed is an assignable variable or not, given the current scope TODO: document which parameters are nullable; e.g. receiverType is null in many cases, e.g. local variables.
public void releaseStreamAllocation() throws IOException { streamAllocation.release(); }
Configure the socket connection to be either pooled or closed when it is either exhausted or closed. If it is unneeded when this is called, it will be released immediately.
public void removeControllerListener(ControllerListener listener){ listeners.removeListener(listener); }
Removes the specified listener so it no longer receives controller events.
static JsonObject wrap(JobRegistryService.EventType evType,Job job){ JsonObject value=new JsonObject(); value.addProperty("time",(Number)System.currentTimeMillis()); value.addProperty("event",evType.toString()); JsonObject obj=new JsonObject(); obj.addProperty("id",job.getId()); obj.addProperty("name",job.g...
Creates a JsonObject wrapping a JobRegistryService event type and Job info.
public void namespaceAfterStartElement(String prefix,String uri) throws SAXException { if (m_elemContext.m_elementURI == null) { String prefix1=getPrefixPart(m_elemContext.m_elementName); if (prefix1 == null && EMPTYSTRING.equals(prefix)) { m_elemContext.m_elementURI=uri; } } startPrefixMapping(...
This method is used when a prefix/uri namespace mapping is indicated after the element was started with a startElement() and before and endElement(). startPrefixMapping(prefix,uri) would be used before the startElement() call.
public String toStringX(Properties ctx){ String in=Msg.getMsg(ctx,"Include"); String ex=Msg.getMsg(ctx,"Exclude"); StringBuffer sb=new StringBuffer(); sb.append(Msg.translate(ctx,"AD_Table_ID")).append("=").append(getTableName(ctx)); if (ACCESSTYPERULE_Accessing.equals(getAccessTypeRule())) sb.append(" - ")...
Extended String Representation
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 DropDownTriangle(final UpDirection upState,final boolean down,final String upLabel,final String downLabel,final Window parent){ ddTriangle=new ClickableTriangle(upState,down); upTriLabel=new JLabel(upLabel); downTriLabel=new JLabel(downLabel); this.parent=parent; this.down=down; this.setLayout(new Bo...
Creates a drop down triangle with a label displayed when it is in the "up" state and a label displayed when it is in the "down" state. The triangle points either left or right in the "up" state and starts out either "up" or down.
public static String clearLastViewedProducts(HttpServletRequest request,HttpServletResponse response){ HttpSession session=request.getSession(); if (session != null) { session.setAttribute("lastViewedProducts",FastList.newInstance()); } return "success"; }
Event to clear the last vieweed products
@Override public void stopCq(String cqName,ClientProxyMembershipID clientId) throws CqException { String serverCqName=cqName; if (clientId != null) { serverCqName=this.constructServerCqName(cqName,clientId); } ServerCQImpl cQuery=null; StringId errMsg=null; Exception ex=null; try { HashMap<String,...
Called directly on server side.
private boolean isRunning(SystemMember member){ if (member instanceof ManagedEntity) { return ((ManagedEntity)member).isRunning(); } else { return true; } }
Returns whether or not the given member is running
private static int NewLongArray(JNIEnvironment env,int length){ if (traceJNI) VM.sysWrite("JNI called: NewLongArray \n"); RuntimeEntrypoints.checkJNICountDownToGC(); try { long[] newArray=new long[length]; return env.pushJNIRef(newArray); } catch ( Throwable unexpected) { if (traceJNI) unex...
NewLongArray: create a new long array
private void fillPicks() throws Exception { Properties ctx=Env.getCtx(); MLookup resourceL=MLookupFactory.get(ctx,m_WindowNo,0,MColumn.getColumn_ID(I_M_Product.Table_Name,"S_Resource_ID"),DisplayType.TableDir); resource=new VLookup("S_Resource_ID",false,false,true,resourceL); }
Fill Picks Column_ID from C_Order
@DSComment("Dalvik class method") @DSBan(DSCat.DALVIK) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:02:39.732 -0500",hash_original_method="51AB769B18373F25E42ACAB5FC64B8CC",hash_generated_method="2F173EE517FB3C5BC94167DFC70EE753") public Enumeration<String> entries(){ return ne...
Enumerate the names of the classes in this DEX file.
public TomcatServiceBuilder baseDir(Path baseDir){ baseDir=requireNonNull(baseDir,"baseDir").toAbsolutePath(); if (!Files.isDirectory(baseDir)) { throw new IllegalArgumentException("baseDir: " + baseDir + " (expected: a directory)"); } this.baseDir=baseDir; return this; }
Sets the base directory of an embedded Tomcat.
public void complete(ITextViewer viewer,int completionPosition,ICompilationUnit compilationUnit){ IDocument document=viewer.getDocument(); if (!(fContextType instanceof CompilationUnitContextType)) return; Point selection=viewer.getSelectedRange(); Position position=new Position(completionPosition,selection.y...
Inspects the context of the compilation unit around <code>completionPosition</code> and feeds the collector with proposals.
private BluetoothSocket(int type,int fd,boolean auth,boolean encrypt,String address,int port) throws IOException { this(type,fd,auth,encrypt,new BluetoothDevice(address),port,null); }
Construct a BluetoothSocket from address. Used by native code.
public final double similarity(final boolean[] sig1,final boolean[] sig2){ double agg=0; for (int i=0; i < sig1.length; i++) { if (sig1[i] == sig2[i]) { agg++; } } agg=agg / sig1.length; return Math.cos((1 - agg) * Math.PI); }
Compute the similarity between two signature, which is also an estimation of the cosine similarity between the two vectors.
public UDAnimator cancel(){ AnimatorUtil.cancel(getAnimator()); if (mTarget != null) { mTarget.cancelAnimation(); } return this; }
cancel animator
protected boolean engineVerify(byte[] signature) throws SignatureException { return engineVerify(signature,0,signature.length); }
Verify all the data thus far updated.
public boolean isLaunchedAsService(){ return launchedAsService; }
Checks if is launched as service.
Vect extractComponent(BEGraphNode node){ BEGraphNode node1=(BEGraphNode)comStack.pop(); if (node == node1 && !node.transExists(node)) { node.setNumber(MAX_FIRST); return null; } Vect nodes=new Vect(); numFirstCom=secondNum++; numSecondCom=thirdNum; node1.setNumber(numFirstCom); nodes.addElement(...
Returns the set of nodes in a nontrivial component. Returns null for a trivial one. It also assigns a new number to all the nodes in the component.
public MultiGeneralAndersonDarlingTest(List<List<Double>> data,List<RealDistribution> distributions){ if (distributions == null) { throw new NullPointerException(); } this.distributions=distributions; for ( List<Double> _data : data) { Collections.sort(_data); } this.data=data; runTest(); }
Constructs an Anderson-Darling test for the given column of data.
public CPaper(double x,double y,int units,boolean landscape,double left,double top,double right,double bottom){ super(); setMediaSize(x,y,units,landscape); setImageableArea(left,top,getWidth() - left - right,getHeight() - top - bottom); }
Get Media Size
public static int compareTimestamps(final int a,final int b){ long diff=diffTimestamps(a,b); return diff < 0 ? -1 : (diff > 0 ? 1 : 0); }
Compares two RTMP time stamps, accounting for time stamp wrapping.
public static void main(String[] args){ try { new Replier(args).run(); } catch ( Exception ex) { System.err.println("Exception: " + ex.getMessage()); ex.printStackTrace(); } finally { System.exit(0); } }
Main executive.
public ClassDefinitionBuilder methods(List<MethodDefinitionBuilder> mdbs){ for ( MethodDefinitionBuilder mdb : mdbs) { method(mdb); } return this; }
Appends the methods built by the given builder (the methods are built without annotations if necessary).
protected synchronized void rotate() throws IOException { close(); final File file=m_fileStrategy.nextFile(); setFile(file,m_append); openFile(); }
Rotates the file.
public ASN1Primitive toASN1Primitive(){ return seq; }
ECPrivateKey ::= SEQUENCE { version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), privateKey OCTET STRING, parameters [0] Parameters OPTIONAL, publicKey [1] BIT STRING OPTIONAL }
public final void testValidateSucceeds(){ IRIValidator iriValidator=new IRIValidator("foo"); assertTrue(iriValidator.validate("")); assertTrue(iriValidator.validate("http://www.foo.com")); assertTrue(iriValidator.validate("http://www.foo123.com")); assertTrue(iriValidator.validate("http://www.foo.com/bar/bar_...
Tests the functionality of the validate-method, if it succeeds.
@Override public Label conditionalJump(int index,Condition condition){ Label label; if (conditionalLabelPointer <= conditionalLabels.size()) { label=new Label(); conditionalLabels.add(label); conditionalLabelPointer=conditionalLabels.size(); } else { label=conditionalLabels.get(conditionalLabelPo...
This method caches the generated labels over two assembly passes to get information about branch lengths.
public void addWhitelistURL(String URL){ serviceWhitelist.add(URL); }
Add URL to service whitelist
@Override protected boolean isSplitable(JobContext context,Path filename){ RDFFormat rdfFormat=getRDFFormat(context); if (RDFFormat.NTRIPLES.equals(rdfFormat) || RDFFormat.NQUADS.equals(rdfFormat)) { return super.isSplitable(context,filename); } return false; }
Determine whether an input file can be split. If the input format is configured to be anything other than N-Triples or N-Quads, then the structure of the file is important and it cannot be split arbitrarily. Otherwise, default to the superclass logic to determine whether splitting is appropriate.
@SuppressWarnings("unchecked") private Segment<K,V> ensureSegment(int k){ final Segment<K,V>[] ss=this.segments; long u=(k << SSHIFT) + SBASE; Segment<K,V> seg; if ((seg=(Segment<K,V>)UNSAFE.getObjectVolatile(ss,u)) == null) { Segment<K,V> proto=ss[0]; int cap=proto.table.length; float lf=proto.load...
Returns the segment for the given index, creating it and recording in segment table (via CAS) if not already present.
public void printSeries(){ for (int i=0; i < this.getItemCount(); i++) { StochasticOscillatorItem dataItem=(StochasticOscillatorItem)this.getDataItem(i); _log.debug("Type: " + this.getType() + " Time: "+ dataItem.getPeriod().getStart()+ " Value: "+ dataItem.getStochasticOscillator()); } }
Method printSeries.
@SuppressWarnings("unchecked") private static void replacePlayerCape(AbstractClientPlayer player){ final String displayName=player.getDisplayNameString(); final NetworkPlayerInfo playerInfo; try { playerInfo=(NetworkPlayerInfo)GET_PLAYER_INFO.invokeExact(player); } catch ( Throwable throwable) { Logge...
Replace a player's cape with the TestMod3 cape.
static int parseTenthsOfSecond(String text) throws ParseException { int pos=text.indexOf("."); int lastPos=text.lastIndexOf("."); if (pos != lastPos) throw new ParseException(text,lastPos); final int tenthsOfSecond; if (pos == -1) { int seconds=Integer.parseInt(text); tenthsOfSecond=seconds * 10; ...
Parses a value representing seconds and optional tenths of a second. For example, <code>32.8</code> is returned as <code>328</code> and <code>32</code> is returned as <code>320</code>.
public void showTableItemControlDecoration(TableViewer tableViewer,Object data,String message){ if (null == tableViewer) { return; } for ( TableItemControlDecoration decoration : tableItemControlDecorations) { if (data == decoration.getData()) { decoration.show(); decoration.setDescriptionTex...
Shows the error decoration data.
public void removeUnusableGenerators(){ generatorCache.clear(); Set<GenericClass> removed=new LinkedHashSet<>(); for ( Map.Entry<GenericClass,Set<GenericAccessibleObject<?>>> entry : generators.entrySet()) { if (entry.getValue().isEmpty()) { recursiveRemoveGenerators(entry.getKey()); } Set<Gene...
A generator for X might be a non-static method M of Y, but what if Y itself has no generator? In that case, M should not be a generator for X, as it is impossible to instantiate Y
protected boolean isLeaderInShard(String shardId){ return gondola.getShard(shardId).getLocalMember().isLeader(); }
Protected Methods.
public EventType(String name,String description,EventAttribute attribute){ this(name,description,new EventAttribute[]{attribute}); }
Create a new event type with a single attribute.
public void testXformLoadFailed_ShowsError(){ mController.init(); mFakeGlobalEventBus.post(new FetchXformFailedEvent(FetchXformFailedEvent.Reason.UNKNOWN)); verify(mMockUi).showError(R.string.fetch_xform_failed_unknown_reason); }
Tests that an error message is displayed when the xform fails to load.
public T summary(String value){ return attr("summary",value); }
Sets the <code>summary</code> attribute on the last started tag that has not been closed.
public static double[] toDoubleArray(short[] array){ double[] result=new double[array.length]; for (int i=0; i < array.length; i++) { result[i]=(double)array[i]; } return result; }
Coverts given shorts array to array of doubles.
protected void appendConfiguration(StringBuffer sb){ ConfigurationParameter[] params=this.getConfiguration(); for (int i=0; i < params.length; i++) { ConfigurationParameter param=params[i]; if (!param.isModifiable()) { continue; } String name=param.getName(); String value=param.getValueAsS...
Appends configuration information to a <code>StringBuffer</code> that contains a command line. Handles certain configuration parameters specially.
protected MetadataImpl(){ super(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
private static byte charToByte(char c){ return (byte)"0123456789ABCDEF".indexOf(c); }
Convert char to byte
public void sortFromTo(int from,int to){ final int widthThreshold=10000; if (size == 0) return; checkRangeFromTo(from,to,size); char min=elements[from]; char max=elements[from]; char[] theElements=elements; for (int i=from + 1; i <= to; ) { char elem=theElements[i++]; if (elem > max) max=ele...
Sorts the specified range of the receiver into ascending order. The sorting algorithm is dynamically chosen according to the characteristics of the data set. Currently quicksort and countsort are considered. Countsort is not always applicable, but if applicable, it usually outperforms quicksort by a factor of 3-4. <p>...
public void finaliseAddObservations(){ totalObservations=0; for ( double[] currentObservation : vectorOfObservations) { totalObservations+=currentObservation.length - k; } destPastVectors=new double[totalObservations][k]; destNextVectors=new double[totalObservations][1]; int startObservation=0; for (...
Flag that the observations are complete, probability distribution functions can now be built.
public static void checkGLError(String label){ int error; while ((error=GLES20.glGetError()) != GLES20.GL_NO_ERROR) { Log.e(TAG,label + ": glError " + error); throw new RuntimeException(label + ": glError " + error); } }
Checks if we've had an error inside of OpenGL ES, and if so what that error is.
private void isElementIndex(int index){ if (index < 0 || index >= size) { throw new IndexOutOfBoundsException("Index [" + index + "] must be less than size ["+ size+ "]"); } }
Tells if the argument is the index of an existing element.
protected void validateManagerSameInstance(Locale countryLocale,HolidayCalendar countryCalendar){ Locale defaultLocale=Locale.getDefault(); Locale.setDefault(countryLocale); try { HolidayManager defaultManager=HolidayManager.getInstance(); HolidayManager countryManager=HolidayManager.getInstance(countryCa...
Validate Country calendar and Default calendar is same if local default is set to country local
public static void main(String[] args){ Application app; String os=System.getProperty("os.name").toLowerCase(); if (os.startsWith("mac")) { app=new OSXApplication(); } else if (os.startsWith("win")) { app=new SDIApplication(); } else { app=new SDIApplication(); } DefaultApplicationModel mo...
Creates a new instance.
public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { return xctxt.getCurrentNode(); }
Return the first node out of the nodeset, if this expression is a nodeset expression. This is the default implementation for nodesets. Derived classes should try and override this and return a value without having to do a clone operation.
protected void attemptGridStrokeSelection(){ StrokeChooserPanel panel=new StrokeChooserPanel(this.gridStrokeSample,this.availableStrokeSamples); int result=JOptionPane.showConfirmDialog(this,panel,localizationResources.getString("Stroke_Selection"),JOptionPane.OK_CANCEL_OPTION,JOptionPane.PLAIN_MESSAGE); if (resu...
Handle a grid stroke selection.
private static Class<?> boxPrimatives(Class<?> type){ if (type == byte.class) { return Byte.class; } else if (type == short.class) { return Short.class; } else if (type == int.class) { return Integer.class; } else if (type == long.class) { return Long.class; } else if (type == floa...
Returns the box primitive type if the passed type is an (unboxed) primitive. Otherwise it returns the passed type
public String buildImage(final BuildImageParams params,final ProgressMonitor progressMonitor) throws IOException { if (params.getRemote() != null) { DockerConnection dockerConnection=connectionFactory.openConnection(dockerDaemonUri).query("remote",params.getRemote()); return buildImage(dockerConnection,params...
Builds new image.
public void newProcessingInstruction(String target,Reader reader){ }
This method is called when a processing instruction is encountered. PIs with target "xml" are handled by the parser.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:02.476 -0500",hash_original_method="43F228216BAE54D0FCDF4DEA936A6994",hash_generated_method="2D27E6B01FD5503A17C0CE28F2EA1FAE") static public boolean isSyncEnabled(Context context){ Cursor cursor=null; try { cursor=context.g...
Returns true if bookmark sync is enabled
public void start(){ thd=new Thread(this,"ConnectorHandler: initializing"); thd.start(); }
Start the thread to serve thl changes to requesting slaves.
@SuppressWarnings({"StringContatenationInLoop"}) protected static String[] determineStreamNames(StreamSpecCompiled[] streams){ String[] streamNames=new String[streams.length]; for (int i=0; i < streams.length; i++) { streamNames[i]=streams[i].getOptionalStreamName(); if (streamNames[i] == null) { stre...
Returns a stream name assigned for each stream, generated if none was supplied.
public void testApp(){ assertTrue(true); }
Rigourous Test :-)
public void add(Input key){ synchronized (this.keys) { this.keys.put(key.getEvent(),key); } }
Adds the given key.
private static TextContainer parseTextContainer(TextContainer textContainer){ textContainer.setCurrentScale(1.0f).setCurrentColor(0x808080); textContainer.registerTag(new FormatTags.TagNewLine()); textContainer.registerTag(new FormatTags.TagScale(1.0F)); textContainer.registerTag(new FormatTags.TagColor(0x80808...
Parses the text container. Used to get the right width and height of the container
public PKCS10Attribute(ObjectIdentifier attributeId,Object attributeValue){ this.attributeId=attributeId; this.attributeValue=attributeValue; }
Constructs an attribute from individual components of ObjectIdentifier and the value (any java object).
protected void figureOutChartSeriesForEntries(BinaryFile binFile) throws IOException, FormatException { RpfTocEntry[] entriesAlreadyChecked=new RpfTocEntry[entries.length]; System.arraycopy(entries,0,entriesAlreadyChecked,0,entries.length); for (int i=0; i < numFrameIndexRecords; i++) { if (DEBUG_RPFTOCFRAMED...
Method that looks at one frame file for each RpfTocEntry, in order to check the suffix and load the chart series information into the RpfTocEntry. This is needed for when the RpfTocHandler is asked for matching RpfTocEntries for a given scale and location when the chart type has been limited to a certain chart code.
public int editOperationsBaseline(){ return editOperationsBaseline; }
Get the baseline editing Operations ( = total Objects)
public void rebalanceNestedOperations(){ nestedOperations=preparedOperations; }
Used to make things stable again after an operation has failed between a workspace.prepareOperation() and workspace.beginOperation(). This method can only be safely called from inside a workspace operation. Should NOT be called from outside a prepareOperation/endOperation block.
public boolean isInfoEnabled(){ return true; }
Enabled, return true
public boolean isWorkflow(){ return getAD_Workflow_ID() > 0; }
Is it a Workflow
public long node(){ if (version() != 1) { throw new UnsupportedOperationException("Not a time-based UUID"); } return leastSigBits & 0x0000FFFFFFFFFFFFL; }
The node value associated with this UUID. <p> The 48 bit node value is constructed from the node field of this UUID. This field is intended to hold the IEEE 802 address of the machine that generated this UUID to guarantee spatial uniqueness. <p> The node value is only meaningful in a time-based UUID, which has version ...
protected void afterAttachActions() throws SQLException { getDatabaseInfo(getDescribeDatabaseInfoBlock(),1024,getDatabaseInformationProcessor()); }
Additional tasks to execute directly after attach operation. <p> Implementation retrieves database information like dialect ODS and server version. </p>
public void incThreadIdentifiers(){ this._stats.incInt(_threadIdentifiersId,1); }
Increments the "threadIdentifiers" stat by 1.
public WebResource createWebResource(String serviceURL){ Client client=Client.create(); WebResource webResource=client.resource(serviceURL); return webResource; }
Create a web resource for the given URL
public boolean hasAgent(){ return super.hasElement(Agent.KEY); }
Returns whether it has the Used in work addresses. Also for 'in care of' or 'c/o'.
public void abort(){ if (_inputStream != null) { try { _inputStream.close(); } catch ( Throwable e) { } } if (_errorStream != null) { try { _errorStream.close(); } catch ( Throwable e) { } } if (_process != null) { try { _process.destroy(); } catch ( ...
Aborts the compilation.
public static String toString(double M_[][]){ return toString(M_,2); }
ToString - return a String representation.
public static BigDecimal allocated(int p_C_Payment_ID,int p_C_Currency_ID) throws SQLException { BigDecimal PayAmt=null; int C_Charge_ID=0; String sql="SELECT PayAmt, C_Charge_ID " + "FROM C_Payment_v " + "WHERE C_Payment_ID=?"; PreparedStatement pstmt=Adempiere.prepareStatement(sql); pstmt.setInt(1,p_C_Payme...
Get allocated Payment amount. - paymentAllocated