code
stringlengths
10
174k
nl
stringlengths
3
129k
public static String encode(int character){ StringBuffer ret; ret=new StringBuffer(13); ret.append("&#"); if (ENCODE_HEXADECIMAL) { ret.append("x"); ret.append(Integer.toHexString(character)); } else ret.append(character); ret.append(';'); return (ret.toString()); }
Convert a character to a numeric character reference. Convert a unicode character to a numeric character reference of the form &#xxxx;.
public void processQueryFacets(final Filter filter) throws IOException { for ( QueryFacetRequest qfr : queryFacets) { for ( String query : qfr.getQueries()) { if (query.contains(AnalyticsParams.RESULT) && !query.contains(AnalyticsParams.QUERY_RESULT)) { try { String[] pivotStr=Expressi...
Initiates the collecting of query facets
public void testEvaluation(){ PolynomialTerm term=new PolynomialTerm(0.5,new int[]{0,1,1,2}); double[] values=new double[]{1.0,2.0,3.0}; assertEquals(6.0,term.evaluate(values),0.00001); }
Test the evaluation of terms.
public OnlineTSPSource(final String tspServer){ this.tspServer=tspServer; }
Build a OnlineTSPSource that will query the specified URL
public String optString(int index){ return this.optString(index,""); }
Get the optional string value associated with an index. It returns an empty string if there is no value at that index. If the value is not a string and is not null, then it is coverted to a string.
private void freshAttributeInfo(){ m_Attributes=(FastVector)m_Attributes.copyElements(); }
Replaces the attribute information by a clone of itself.
private void createDirectionGroup(){ RowLayout rowLayout=new RowLayout(); rowLayout.fill=true; rowLayout.type=org.eclipse.swt.SWT.VERTICAL; directionGroup=new Group(sShell,SWT.NONE); directionGroup.setText(textDirection); FormData formData=new FormData(); formData.top=new FormAttachment(replaceGroup.group...
This method initializes group1
private GenID generateGenID(TreeNode syntaxTreeNode,ModuleNode mn,boolean unaryNegKludge) throws AbortException { GenID genID; TreeNode[] children=syntaxTreeNode.heirs(); TreeNode[] prefix=null; TreeNode[] prefixElt; TreeNode[] allArgs=null; TreeNode[] argsList=null; if (children == null || children.lengt...
It appears that this is called with unaryNegKludge = true only when processing a prefix operator.
public void prolog(ExecutionResult executionResult,int maxRows,boolean hasProxy,MariaDbConnection connection,Statement statement) throws SQLException { if (explicitClosed) { throw new SQLException("execute() is called on closed connection"); } if (!hasProxy) { if (shouldReconnectWithoutProxy()) { tr...
Preparation before command.
public void switchContent(Fragment fragment){ getActionBar().setDisplayHomeAsUpEnabled(true); getActionBar().setDisplayShowHomeEnabled(true); getActionBar().setDisplayShowCustomEnabled(false); getSupportFragmentManager().beginTransaction().replace(R.id.mainActivityContainer,fragment).commit(); mDrawerLayout.c...
Loads the specified fragment into the target layout.
public static String ForwardAdb(int roboRioPort,int devicePort){ if (m_jadb != null) { return RIOdroid.executeCommand("adb forward tcp:" + roboRioPort + " tcp:"+ devicePort); } else { System.out.println("Current adb connection is null"); } return null; }
Forward a local host port from the roborio to the android device connected to the roborio
public Object runSafely(Catbert.FastStack stack) throws Exception { Seeker.getInstance().scanLibrary(Catbert.evalBool(stack.pop())); return null; }
Tells SageTV to run a library import scan now. This will scan all of the library import directories for new content.
public org.apache.nutch.storage.ParseStatus.Builder clearMinorCode(){ fieldSetFlags()[1]=false; return this; }
Clears the value of the 'minorCode' field
public static void main(String[] args) throws Exception { SimpleCommandLineParser parser=new SimpleCommandLineParser(args); String username=parser.getValue("username","user","u"); String password=parser.getValue("password","pass","passwd","pw","p"); boolean help=parser.containsKey("help","h"); if (help || (us...
Main entry point. Parses arguments and creates and invokes the IndexClient.
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:58:53.625 -0500",hash_original_method="D3D57AE588662EF8725CB60FCA1C3072",hash_generated_method="2B75B99AF9634D353514986B6026DE94") private boolean isHomeSid(int sid){ if (mHom...
Check whether a specified system ID that matches one of the home system IDs.
public void reset(){ hashMap=new ReversePurgeLongHashMap(1 << LG_MIN_MAP_SIZE); this.curMapCap=hashMap.getCapacity(); this.offset=0; this.streamLength=0; }
Resets this sketch to a virgin state.
int parseHour(String source,char patternChar,int offset) throws ParseException { int min=(patternChar == HOUR_1_LETTER || patternChar == HOUR12_1_LETTER) ? 1 : 0; int max=((patternChar == HOUR_LETTER || patternChar == HOUR_1_LETTER) ? 23 : 11) + min; return parseNumber(source,offset,"hour",min,max) - min; }
Parse a hour value. Depending on patternChar parameter, the hour can be 0-23, 1-24, 0-11, or 1-12. The returned value will always be 0 based.
public static Automaton union(Collection<Automaton> l){ Automaton result=new Automaton(); result.createState(); for ( Automaton a : l) { result.copy(a); } int stateOffset=1; for ( Automaton a : l) { if (a.getNumStates() == 0) { continue; } result.addEpsilon(0,stateOffset); stateO...
Returns an automaton that accepts the union of the languages of the given automata. <p> Complexity: linear in number of states.
private static DefaultTestCase buildTestCase0() throws NoSuchMethodException, SecurityException, ClassNotFoundException { TestCaseBuilder builder=new TestCaseBuilder(); VariableReference int0=builder.appendIntPrimitive(10); VariableReference int1=builder.appendIntPrimitive(10); VariableReference int2=builder.ap...
Creates the test case: <code> int int0 = 10; int int1 = 10; int int2 = 10; Foo.bar(int0,int1,int2); </code>
public int totalRules(){ if (rules == null) { return 0; } return rules.size(); }
Returns total number of all rules.
@POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_JSON) @RequiresRole(role=Role.ADMINISTRATOR) public ExternalIDPDTO registerWithMetadata(String externalIDPConfig){ try { String entityId=getIDMClient().importExternalIDPConfiguration(tenant,parseSAMLConfig(externalIDPConfig)); return E...
Register external identity provider (ADFS, Shibboleth etc) with provided metadata
public static void main(final String[] args){ DOMTestCase.doMain(createDocument06.class,args); }
Runs this test from the command line.
public State(File file){ super(); this.file=file; }
Constructs a state indicator backed by the specified file.
public static float[] centroid(float pts[],int len){ float[] c=new float[]{0,0}; for (int i=0; i < len; i+=2) { c[0]+=pts[i]; c[1]+=pts[i + 1]; } c[0]/=len / 2; c[1]/=len / 2; return c; }
Computes the mean, or centroid, of a set of points
@Override public void writeExternal(ObjectOutput out) throws IOException { path.writeExternal(out); out.writeInt(blockSize); out.writeLong(grpBlockSize); out.writeLong(len); U.writeStringMap(out,props); out.writeLong(accessTime); out.writeLong(modificationTime); out.writeByte(flags); }
Writes object to data output.
public boolean isMature(){ if (!isCoinBase()) return true; if (getConfidence().getConfidenceType() != ConfidenceType.BUILDING) return false; return getConfidence().getDepthInBlocks() >= params.getSpendableCoinbaseDepth(); }
A transaction is mature if it is either a building coinbase tx that is as deep or deeper than the required coinbase depth, or a non-coinbase tx.
public String globalInfo(){ return "Combines multiple dataset providers."; }
Description to be displayed in the GUI.
public Date(long date){ super(date); }
Constructs a <code>Date</code> object using the given milliseconds time value. If the given milliseconds value contains time information, the driver will set the time components to the time in the default time zone (the time zone of the Java virtual machine running the application) that corresponds to zero GMT.
private void entryInvalidateInSynchPersistTypeForIOExceptionCase(Region region) throws Exception { region.create("key1","value1"); UninterruptibleFileChannel oplogFileChannel=((LocalRegion)region).getDiskRegion().testHook_getChild().getFileChannel(); oplogFileChannel.close(); try { region.invalidate("key1")...
If IOException occurs while invalidating an entry in a persist only synch mode, DiskAccessException should occur & region should be destroyed
public Matrix4 multiplyByTranslation(double x,double y,double z){ double[] m=this.m; m[3]+=(m[0] * x) + (m[1] * y) + (m[2] * z); m[7]+=(m[4] * x) + (m[5] * y) + (m[6] * z); m[11]+=(m[8] * x) + (m[9] * y) + (m[10] * z); m[15]+=(m[12] * x) + (m[13] * y) + (m[14] * z); return this; }
Multiplies this matrix by a translation matrix with specified translation values.
public static Entity create(final String className,final Map<String,String> parameters,final Map<String,String> attributes){ final ConfigurableFactory factory=ConfigurableFactoryHelper.getFactory(className); if (factory == null) { return null; } final Object obj=factory.create(new ConfigurableFactoryContext...
Create an entity using a [logical] class name, and apply optional attribute values.
public boolean contains(Object e){ if (e == null) return false; Class<?> eClass=e.getClass(); if (eClass != elementType && eClass.getSuperclass() != elementType) return false; int eOrdinal=((Enum<?>)e).ordinal(); return (elements[eOrdinal >>> 6] & (1L << eOrdinal)) != 0; }
Returns <tt>true</tt> if this set contains the specified element.
public AnnotationVisitor visitAnnotation(String desc,boolean visible){ if (cv != null) { return cv.visitAnnotation(desc,visible); } return null; }
Visits an annotation of the class.
public void write(Buffer buffer){ VideoSample sample=new VideoSample((byte[])buffer.getData(),buffer.getTimestamp(),buffer.getSequenceNumber(),buffer.getVideoOrientation()); getRenderer().writeSample(sample); }
Write to the stream without blocking
public MetricKDE(DistanceMetric distanceMetric,VectorCollectionFactory<VecPaired<Vec,Integer>> vcf){ this(DEFAULT_KF,distanceMetric,vcf); }
Creates a new KDE object that still needs a data set to model the distribution of
public void readMap(InputStream inputStream,MapBuilder builder){ try { parseMap(inputStream,builder); if (builder.nodeRefsWithoutDefsAdded()) LOG.warning("Nodes were referenced in ways but not defined before."); } catch ( SAXParseException e) { throw new OsmRuntimeException("Unable to parse input ...
Reads all data from the specified stream and sends it to the consumer. The consumer is cleared before.
boolean readModule(int row,int column,int numRows,int numColumns){ if (row < 0) { row+=numRows; column+=4 - ((numRows + 4) & 0x07); } if (column < 0) { column+=numColumns; row+=4 - ((numColumns + 4) & 0x07); } readMappingMatrix.set(column,row); return mappingBitMatrix.get(column,row); }
<p>Reads a bit of the mapping matrix accounting for boundary wrapping.</p>
private List<? extends Object[]> addRows(List<? extends Object[]> rows,final boolean isBatchWrite) throws IOException { if (rows.isEmpty()) { return rows; } getPageChannel().startWrite(); try { ByteBuffer dataPage=null; int pageNumber=PageChannel.INVALID_PAGE_NUMBER; int updateCount=0; int a...
Add multiple rows to this table, only writing to disk after all rows have been written, and every time a data page is filled.
private static String convertToPropertiesKey(String environmentVariableKey,String environmentContext){ return environmentVariableKey.substring(environmentContext.length()).replace(ENV_DELIMITER,PROPERTIES_DELIMITER); }
Convert the Environment Variable Name to the expected Properties Key formatting
public void test_staticPartitioning() throws Exception { final String name="testIndex"; final IndexMetadata metadata=new IndexMetadata(name,UUID.randomUUID()); metadata.setDeleteMarkers(true); UUID indexUUID=fed.registerIndex(metadata,new byte[][]{new byte[]{},new byte[]{5}},new UUID[]{dataService0.getServiceUU...
Tests the ability to statically partition a scale-out index.
@DSComment("Package priviledge") @DSBan(DSCat.DEFAULT_MODIFIER) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:58:59.596 -0500",hash_original_method="D40242C1775E5BFA18B0D32E606C72BC",hash_generated_method="811B1D06942A741BDFAD8B5A12010FC7") void processCode(){ try { if (isPu...
Process a MMI PUK code
public String substring(int start,int count){ return String.valueOf(text,start,count); }
Gibt eine Untermenge des CFMLString als Zeichenkette zurueck, ausgehend von start mit einer maximalen Laenge count.
private String readQueryString(final String queryResource) throws RepositoryException, IOException { final InputStream stream=TestFederatedQuery.class.getResourceAsStream(TEST_RESOURCE_PATH + queryResource); try { return IOUtil.readString(new InputStreamReader(stream,"UTF-8")); } finally { stream.close(...
Read the query string from the specified resource
public int indexOf(LuaString s,int start){ final int slen=s.length(); final int limit=m_length - slen; for (int i=start; i <= limit; ++i) { if (equals(m_bytes,m_offset + i,s.m_bytes,s.m_offset,slen)) return i; } return -1; }
Find the index of a string starting at a point in this string
public WorksheetFeed(BaseFeed sourceFeed){ super(WorksheetEntry.class,sourceFeed); getCategories().add(WorksheetEntry.CATEGORY); }
Constructs a new worksheet feed from an existing feed instance.
public int length(){ return buffer.length; }
Returns the length of this buffer
public void addInfoField(String id,MetaType type,VcfNumber number,String description){ addInfoField(new InfoField(id,type,number,description)); }
Add an info field
private int partition(long qAddr){ return mem.readInt(qAddr + 2); }
Reads partition entry belongs to.
public UCrop withAspectRatio(@IntRange(from=1) int x,@IntRange(from=1) int y){ mCropIntent.putExtra(EXTRA_ASPECT_RATIO_SET,true); mCropIntent.putExtra(EXTRA_ASPECT_RATIO_X,x); mCropIntent.putExtra(EXTRA_ASPECT_RATIO_Y,y); return this; }
Set an aspect ratio for crop bounds. User won't see the menu with other ratios options.
public ZipLong(byte[] bytes,int offset){ value=(bytes[offset + 3] << 24) & 0xFF000000L; value+=(bytes[offset + 2] << 16) & 0xFF0000; value+=(bytes[offset + 1] << 8) & 0xFF00; value+=(bytes[offset] & 0xFF); }
Create instance from the four bytes starting at offset.
public double[] toArray(int start,int len){ int remaining=len; int pos=0; double[] array=new double[len]; if (len == 0) { return array; } int i=0; while (start >= buffers[i].length) { start-=buffers[i].length; i++; } while (i < buffersCount) { double[] buf=buffers[i]; int c=Math.mi...
Creates <code>double</code> subarray from buffered content.
public static SourceLineAnnotation createReallyUnknown(@DottedClassName String className){ return createUnknown(className,SourceLineAnnotation.UNKNOWN_SOURCE_FILE,-1,-1); }
Factory method to create an unknown source line annotation. This doesn't use the analysis context.
public static ActiveMQConnectionFactory createConnectionFactoryWithoutHA(JMSFactoryType jmsFactoryType,final TransportConfiguration... transportConfigurations){ ActiveMQConnectionFactory factory=null; if (jmsFactoryType.equals(JMSFactoryType.CF)) { factory=new ActiveMQJMSConnectionFactory(false,transportConfigu...
Create an ActiveMQConnectionFactory which creates session factories using a static list of transportConfigurations. <p> The ActiveMQConnectionFactory is not updated automatically as the cluster topology changes, and no HA backup information is propagated to the client
public void disableQueue(){ if (this.isQueueEnabled()) { this.flushQueue(); } }
Disable the queue. This will flush the queue.
@Nullable public CloseableReference<CloseableImage> cache(int frameIndex,CloseableReference<CloseableImage> imageRef){ return mBackingCache.cache(keyFor(frameIndex),imageRef,mEntryStateObserver); }
Caches the image for the given frame index. <p> Important: the client should use the returned reference instead of the original one. It is the caller's responsibility to close the returned reference once not needed anymore.
public static boolean calcDrawSloppyEdges(final ZyGraph graph){ Preconditions.checkNotNull(graph,"IE02113: Graph argument can not be null"); final EdgeHidingMode mode=graph.getSettings().getEdgeSettings().getEdgeHidingMode(); return (mode == EdgeHidingMode.HIDE_NEVER) || ((mode == EdgeHidingMode.HIDE_ON_THRESHOLD...
Calculates whether edges are drawn in sloppy mode or normal node.
private void checkAutoRelease(){ if ((autoReleaseBox != null) && (autoReleaseBox.isSelected())) { boolean foundOne=true; while ((allocatedSections.size() > 0) && foundOne) { try { foundOne=false; AllocatedSection as=null; for (int i=0; (i < allocatedSections.size()) && !foundOne;...
Check if any allocation requests need to be allocated, or if any allocated sections need to be released
public String toString(){ return _tokenTypeUri; }
Gets the URI string value for the token type.
public static void logExecution(TradeOrderfill execution){ _log.debug("execDetails OrderId: " + execution.getTradeOrder().getIdTradeOrder() + " Exchange: "+ execution.getExchange()+ " Side: "+ execution.getSide()+ " ExecId: "+ execution.getExecId()+ " Time: "+ execution.getTime()+ " Qty: "+ execution.getQuantity()+ "...
Method logExecution.
private void fetchLiteral(){ fetchBlockScalar('|'); }
Fetch a literal scalar, denoted with a vertical-bar. This is the type best used for source code and other content, such as binary data, which must be included verbatim.
public Builder byDay(Collection<DayOfWeek> days){ for ( DayOfWeek day : days) { byDay(null,day); } return this; }
Adds one or more BYDAY rule parts.
public void destroyJoint(Joint j){ assert (isLocked() == false); if (isLocked()) { return; } boolean collideConnected=j.getCollideConnected(); if (j.m_prev != null) { j.m_prev.m_next=j.m_next; } if (j.m_next != null) { j.m_next.m_prev=j.m_prev; } if (j == m_jointList) { m_jointList=j.m...
destroy a joint. This may cause the connected bodies to begin colliding.
public BinaryProperty(InputStream in,T type) throws IOException { this(new Gobble(in).asByteArray(),type); }
Creates a binary property.
public void clamp(){ IntegerVectorSpecies _species=(IntegerVectorSpecies)species; for (int i=0; i < genomeLength(); i++) { long minGene=_species.minGene(i); if (genome[i] < minGene) genome[i]=minGene; else { long maxGene=_species.maxGene(i); if (genome[i] > maxGene) genome[i]=maxGene;...
Clips each gene value to be within its specified [min,max] range.
public boolean isDirectory(){ return getJar().isDirectory(getPath()); }
Returns true if the entry is a directory in the jar file.
public String isMandatory(){ return mandatory; }
Recupera la obligatoriedad del documento en el procedimiento.
public CompletionAnalyzer(Analyzer analyzer,boolean preserveSep,boolean preservePositionIncrements,int maxGraphExpansions){ super(PER_FIELD_REUSE_STRATEGY); this.analyzer=analyzer; this.preserveSep=preserveSep; this.preservePositionIncrements=preservePositionIncrements; this.maxGraphExpansions=maxGraphExpansi...
Wraps an analyzer to convert it's output token stream to an automaton
public AsyncTabCreationParams(LoadUrlParams loadUrlParams){ this(loadUrlParams,null,null,null); }
Create parameters for creating a Tab asynchronously.
public static boolean isSpace(int c){ return c < 0x10000 && (CHARS[c] & MASK_SPACE) != 0; }
Returns true if the specified character is a space character as defined by production [3] in the XML 1.0 specification.
public void test_parseObjectLjava_lang_StringLjava_text_ParsePosition(){ DateFormat df=DateFormat.getInstance(); try { Date current=new Date(); ParsePosition pp=new ParsePosition(0); int parseIndex=pp.getIndex(); Date result=(Date)df.parseObject(df.format(current),pp); assertEquals("Dates are di...
java.text.DateFormat#parseObject(String, ParsePosition) Test of method java.text.DateFormat#parseObject(String, ParsePosition). Case 1: Try to parse correct data string. Case 2: Try to parse partialy correct data string. Case 3: Try to use argument ParsePosition as null.
public int apiLevel(){ return this.apiLevel; }
Return the API level supported by this AST.
public SecretKey engineResolveSecretKey(Element element,String baseURI,StorageResolver storage) throws KeyResolverException { if (log.isLoggable(java.util.logging.Level.FINE)) { log.log(java.util.logging.Level.FINE,"Can I resolve " + element.getTagName() + "?"); } if (XMLUtils.elementIsInSignatureSpace(elemen...
Method engineResolveSecretKey
public boolean isServer(){ if (this.cache.getCacheServers().isEmpty()) { return false; } return true; }
Is the CQ service in a cache server environment
public HtmlRegularNode h(int level,String text){ return addSimpleNode("h" + level,text); }
Adds a top level header at a certain level with plain text Subsequent calls can be made to add additional elements to the result
@PUT @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @Path("/{alertId}") @Description("Updates an alert having the given ID.") public AlertDto updateAlert(@Context HttpServletRequest req,@PathParam("alertId") BigInteger alertId,AlertDto alertDto){ if (alertId == null || alertId.compareTo(B...
Updates existing alert.
public Builder uncertainty(Double uncertainty){ this.uncertainty=uncertainty; return this; }
Sets the uncertainty (how accurate the coordinates are).
public void handleMBeanUnregistration(ObjectName objectName,String roleName) throws IllegalArgumentException, RoleNotFoundException, InvalidRoleValueException, RelationServiceNotRegisteredException, RelationTypeNotFoundException, RelationNotFoundException { if (objectName == null || roleName == null) { String exc...
Callback used by the Relation Service when a MBean referenced in a role is unregistered. <P>The Relation Service will call this method to let the relation take action to reflect the impact of such unregistration. <P>BEWARE. the user is not expected to call this method. <P>Current implementation is to set the role with ...
final boolean shouldMapAttrChar(int value){ if (value < ASCII_MAX) return shouldMapAttrChar_ASCII[value]; return get(value); }
Tell if the character argument that is from an attribute value has a mapping to a String.
public synchronized void rollback(){ storageQueue.clear(); Storage.getInstance().deleteStorageFile("CN1StorageQueue"); }
Cancels current pending changes
@SuppressWarnings("unchecked") public void submitMeasurement(Measurement s){ Vector<MeasurementListener> v; synchronized (this) { v=(Vector<MeasurementListener>)measurementListeners.clone(); } if (log.isDebugEnabled()) { log.debug("notify " + v.size() + " MeasurementListeners about item "); } int cnt=...
Invoked when a new Measurement is created
private StringBuffer removeMarketingPermissionsAndObsoleteOrgRefs(List<String> organizationIds,TechnicalProduct tpRef,Map<String,MarketingPermission> permissionForOrgId){ Set<Long> affectedOrgRefs=new HashSet<Long>(); StringBuffer orgIdsThatFailed=new StringBuffer(); for ( String orgId : organizationIds) { M...
Removes the organization references if there is no related marketing permission.
public void initialize(Body body1,Body body2){ this.bodyA=body1; this.bodyB=body2; this.linearOffset.set(bodyA.getLocalPoint(bodyB.getPosition())); this.angularOffset=bodyB.getAngle() - bodyA.getAngle(); }
Initialize the bodies and offsets using the current transforms.
protected void parset() throws ParseException, IOException { current=reader.read(); skipSpaces(); boolean expectNumber=true; for (; ; ) { switch (current) { default : if (expectNumber) reportUnexpected(current); return; case '+': case '-': case '.': case '0': case '1': case '2': case '3': case '...
Parses a 't' command.
public dd removeElement(String hashcode){ removeElementFromRegistry(hashcode); return (this); }
Removes an Element from the element.
@Deprecated @Override public final String readLine() throws IOException { return dis.readLine(); }
Read a line.
public AlbumSorter(boolean ascending,boolean ignoreThe){ super(ascending); this.ignoreThe=ignoreThe; }
Creates a new instance of AlbumSorter
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.
private String readResponseFromServer(HttpURLConnection urlConnection) throws RequestFailureException { try { InputStreamReader reader=new InputStreamReader(urlConnection.getInputStream()); BufferedReader in=new BufferedReader(reader); try { StringBuilder response=new StringBuilder(); for (Str...
Reads the response from the Omaha Server.
public final void detach(){ if (isAttachedToRecycler) { isAttachedToRecycler=false; recyclerWantsTouch=false; recyclerView.reset(); recyclerView=null; layoutManager=null; } }
Detaches <code>RecyclerViewHeader</code> from <code>RecyclerView</code>.
public static OFGroup createMPLSL2VPNLabel(U32 index){ return OFGroup.of(0 | (index.getRaw() & 0x00ffFFff) | (MPLSSubType.MPLS_L2_VPN_LABEL << 24)| (OFDPAGroupType.MPLS_LABEL << 28)); }
Only bits 0-23 of index are used. Bits 24-31 are ignored.
public void stubFromType(TypeElement typeElement){ if (typeElement.getKind() != ElementKind.CLASS && typeElement.getKind() != ElementKind.INTERFACE) return; String newPackageName=ElementUtils.getVerboseName(ElementUtils.enclosingPackage(typeElement)); boolean newPackage=!newPackageName.equals(currentPackage); ...
Generate the stub file for provided class. The generated file includes the package name.
protected ThisTypeRefStructuralImpl(){ super(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void firePropertyChange(String propertyName,long oldValue,long newValue){ }
Overridden for performance reasons. See the <a href="#override">Implementation Note</a> for more information.
public Matrix4x3d translationRotateScale(double tx,double ty,double tz,double qx,double qy,double qz,double qw,double sx,double sy,double sz){ double dqx=qx + qx, dqy=qy + qy, dqz=qz + qz; double q00=dqx * qx; double q11=dqy * qy; double q22=dqz * qz; double q01=dqx * qy; double q02=dqx * qz; double q03=d...
Set <code>this</code> matrix to <tt>T * R * S</tt>, where <tt>T</tt> is a translation by the given <tt>(tx, ty, tz)</tt>, <tt>R</tt> is a rotation transformation specified by the quaternion <tt>(qx, qy, qz, qw)</tt>, and <tt>S</tt> is a scaling transformation which scales the three axes x, y and z by <tt>(sx, sy, sz)</...
public void delete(int key){ int i=binarySearch(mKeys,0,mSize,key); if (i >= 0) { removeAt(i); } }
Removes the mapping from the specified key, if there was any.
public void copyTo(Map<ByteArrayWrapper,byte[]> copy){ synchronized (myDatabase) { copy.putAll(myDatabase); } }
Get all entries in the database
public void dispose(){ CWindowManager.instance().removeListener(listener); for ( final CGraphWindow window : CWindowManager.instance().getOpenWindows()) { window.removeListener(panelListener); } }
Frees allocated resources.
@Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); }
Called when the activity is first created.
public static Object decodeToObject(String encodedObject) throws java.io.IOException, java.lang.ClassNotFoundException { return decodeToObject(encodedObject,NO_OPTIONS,null); }
Attempts to decode Base64 data and deserialize a Java Object within. Returns <tt>null</tt> if there was an error.
static public void initLogging(){ initLogging(System.getProperty("jmri.log","default.lcf")); }
Initialize logging from a default control file. <p> Primary functions: <ul> <li>Initialize the JMRI system console <li>Set up the slf4j j.u.logging to log4J bridge <li>Start log4j <li>Initialize some default exception handlers (to feed the logs?) </ul>