code
stringlengths
10
174k
nl
stringlengths
3
129k
public JaasConfiguration(String clientPrincipal,File clientKeytab,String serverPrincipal,File serverKeytab){ Map<String,String> clientOptions=new HashMap(); clientOptions.put("principal",clientPrincipal); clientOptions.put("keyTab",clientKeytab.getAbsolutePath()); clientOptions.put("useKeyTab","true"); client...
Add an entry to the jaas configuration with the passed in name, principal, and keytab. The other necessary options will be set for you.
public void testNextInt(){ int f=ThreadLocalRandom.current().nextInt(); int i=0; while (i < NCALLS && ThreadLocalRandom.current().nextInt() == f) ++i; assertTrue(i < NCALLS); }
Repeated calls to nextInt produce at least two distinct results
public static void validatePositiveNumber(long fieldValue,String fieldName){ if (fieldValue <= 0) { logAndThrow(String.format("%s should be a positive number: %d",fieldName,fieldValue)); } }
Validate the the given value is a positive number.
public boolean isFileLevelAnnotation(){ return myIsFileLevelAnnotation; }
File level annotations are visualized differently than lesser range annotations by showing a title bar on top of the editor rather than applying text attributes to the text range.
public BillReceiptInfoImpl(final ReceiptHeader receiptHeader,final String additionalInfo,final ChartOfAccountsHibernateDAO chartOfAccountsHibernateDAO,final PersistenceService persistenceService){ this.receiptHeader=receiptHeader; receiptURL=CollectionConstants.RECEIPT_VIEW_SOURCEPATH + receiptHeader.getId(); thi...
Creates bill receipt information object for given receipt header and additional message
void visitSubroutine(final Label JSR,final long id,final int nbSubroutines){ Label stack=this; while (stack != null) { Label l=stack; stack=l.next; l.next=null; if (JSR != null) { if ((l.status & VISITED2) != 0) { continue; } l.status|=VISITED2; if ((l.status & RET) !...
Finds the basic blocks that belong to a given subroutine, and marks these blocks as belonging to this subroutine. This method follows the control flow graph to find all the blocks that are reachable from the current block WITHOUT following any JSR target.
public static boolean varResolveTreeWalkUp(@NotNull final PsiScopeProcessor processor,@NotNull final BashVar entrance,@Nullable final PsiElement maxScope,@NotNull final ResolveState state){ PsiElement prevParent=entrance; PsiElement scope=entrance; boolean hasResult=false; while (scope != null) { hasResult|...
This tree walkup method does continue even if a valid definition has been found on an more-inner level. Bash is different in regard to the definitions, the most outer definitions count, not the most inner / the first one found.
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 boolean overlaps(TextEdit edit1,TextEdit edit2){ if (edit1 instanceof MultiTextEdit && edit2 instanceof MultiTextEdit) { MultiTextEdit multiTextEdit1=(MultiTextEdit)edit1; if (!multiTextEdit1.hasChildren()) return false; MultiTextEdit multiTextEdit2=(MultiTextEdit)edit2; if (!multiTe...
Does any node in <code>edit1</code> overlap with any other node in <code>edit2</code>. <p>If this returns true then the two edit trees can be merged into one.</p>
public static void runJavadoc(String[] javadocArgs){ if (com.sun.tools.javadoc.Main.execute(javadocArgs) != 0) { throw new Error("Javadoc failed to execute"); } }
Run javadoc
public Color average(Color color){ return rgbac((red() + color.red()) / 2,(green() + color.green()) / 2,(blue() + color.blue()) / 2,(alpha() + color.alpha()) / 2); }
Performs average operation.
void updateCellRangeByTableSelection(JTable contentTable){ int columnIndexStart=contentTable.getSelectedColumn(); int rowIndexStart=contentTable.getSelectedRow(); int columnIndexEnd=columnIndexStart + contentTable.getSelectedColumnCount() - 1; int rowIndexEnd=rowIndexStart + contentTable.getSelectedRowCount() -...
Uses the current table selection to update the cell range selection.
public void mAssignmentCallback(MResourceAssignment assignment){ m_mAssignment=assignment; if (m_createNew) dispose(); else displayCalendar(); }
Callback. Called from WSchedule after WAssignmentDialog finished
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:53.468 -0500",hash_original_method="A3047134DA2BBFDCD9EABEAC496A6A0D",hash_generated_method="F536D3834BA3A1966C0D2AEDA6B38E1F") public X500Principal(byte[] name){ if (name == null) { throw new IllegalArgumentException("Name ca...
Creates a new X500Principal from a given ASN.1 DER encoding of a distinguished name.
public void normalizeOutdir(){ if (outputDir != null) return; File destDir; if (destinationDir != null) { if (packageName == null) { destDir=destinationDir; } else { String path=packageName.replace('.',File.separatorChar); destDir=new File(destinationDir,path); } } else { d...
Sets the actual output directory if not already set. Uses javac logic to determine output dir = dest dir + package name If not destdir has been set, output dir = parent of input file Assumes that package name is already set.
public void delete() throws IOException { close(); deleteContents(directory); }
Closes the cache and deletes all of its stored values. This will delete all files in the cache directory including files that weren't created by the cache.
public BannerPattern(DyeColor color,BannerPatternType pattern){ this.color=color; this.pattern=pattern; }
Construct new BannerPattern.
public void start() throws IOException { Thread thread=new Thread(this); thread.setName("TLSMessageProcessorThread"); thread.setPriority(Thread.MAX_PRIORITY); thread.setDaemon(true); this.sock=sipStack.getNetworkLayer().createSSLServerSocket(this.getPort(),0,this.getIpAddress()); ((SSLServerSocket)this.sock...
Start the processor.
private void stopStorageSystem(StorageSystem storageSystem) throws ControllerException { if (!DiscoveredDataObject.Type.vplex.name().equals(storageSystem.getSystemType())) { StorageController controller=getStorageController(storageSystem.getSystemType()); controller.disconnectStorage(storageSystem.getId()); ...
Invoke disconnect storage to stop events and statistics gathering of this storage system.
public void testCrazyPrefixes2() throws Exception { Query expected=new PrefixQuery(new Term("field","st*ar\\*")); assertEquals(expected,parse("st*ar\\\\**")); }
test prefixes with some escaping
public static ActionBarBackground fadeOut(AppCompatActivity activity){ ActionBarBackground abColor=new ActionBarBackground(activity); abColor.fadeOut(); return abColor; }
Fade the ActionBar background to zero opacity
public void testCommonPrefix(){ String returned=m_Trie.getCommonPrefix(); assertEquals("Common prefixes differ",0,returned.length()); String expected="this is a"; Trie t=buildTrie(new String[]{m_Data[0],m_Data[1]}); returned=t.getCommonPrefix(); assertEquals("Common prefixes differ",expected.length(),return...
tests whether the common prefix is determined correctly
public static boolean equals(short[] array1,short[] array2){ if (array1 == array2) { return true; } if (array1 == null || array2 == null || array1.length != array2.length) { return false; } for (int i=0; i < array1.length; i++) { if (array1[i] != array2[i]) { return false; } } return...
Compares the two arrays.
public static void authenticateWithoutRestart(AuthenticationListener listener){ ReprintInternal.INSTANCE.authenticate(listener,false,0); }
Start a fingerprint authentication request. <p/> This variant will not restart the fingerprint reader after any failure, including non-fatal failures.
public boolean execute(String action,String rawArgs,CallbackContext callbackContext) throws JSONException { JSONArray args=new JSONArray(rawArgs); return execute(action,args,callbackContext); }
Executes the request. This method is called from the WebView thread. To do a non-trivial amount of work, use: cordova.getThreadPool().execute(runnable); To run on the UI thread, use: cordova.getActivity().runOnUiThread(runnable);
@Bean public ExecutorService defaultExecutor(){ return executor; }
PlayOnLinux default executor service
public LOTZ(int numberOfBits){ super(1,2); this.numberOfBits=numberOfBits; }
Constructs an instance of the LOTZ problem with the specified number of bits.
public static GridPeerDeployAware detectPeerDeployAware(GridPeerDeployAware obj){ GridPeerDeployAware p=nestedPeerDeployAware(obj,true,new GridLeanIdentitySet<>()); return p != null ? p : peerDeployAware(obj.getClass()); }
Unwraps top level user class for wrapped objects.
public static <F,S,T>Triple<F,S,T> of(final F first,final S second,final T third){ return new Triple<>(first,second,third); }
Static creation method to create a new instance of a triple with the parameters provided. This method allows for nicer triple creation syntax, namely: Triple<String,Integer,String> myTriple = Triple.of("abc",123,"xyz"); Instead of: Triple<String,Integer,String> myTriple = new Triple<String,Integer,String>("abc",123,"xy...
public Object runSafely(Catbert.FastStack stack) throws Exception { return ((Agent)stack.pop()).getAutoConvertFormat(); }
Gets the name of the format that recordings of this Favorite will automatically be converted to when they have completed recording. It will return an empty string if automatic conversion is disabled for this Favorite
public Object runSafely(Catbert.FastStack stack) throws Exception { Show s=getShow(stack); return (s == null) ? "" : s.getParentalRating(); }
Returns the parental rating for this show. The parental rating field in Airing is used instead of this in the standard implementation.
public ScrolledComposite createScrolledComposite(Composite parent,int style){ ScrolledComposite scrolledComposite=new ScrolledComposite(parent,style); adapt(scrolledComposite); scrolledComposite.getHorizontalBar().setIncrement(10); scrolledComposite.getVerticalBar().setIncrement(10); return scrolledComposite;...
Creates a scrolled composite as a part of the form.
private void readObject(final java.io.ObjectInputStream in) throws IOException { populateLevels(); int levelInt=in.readInt(); if (Level.INFO.intValue() == levelInt) { level=Level.INFO; } else if (Level.CONFIG.intValue() == levelInt) { level=Level.CONFIG; } else if (Level.FINE.intValue() == level...
Deserialize the state of the object.
public synchronized Entry firstValue(){ if (array.isEmpty()) return null; else { return array.get(0); } }
First value Entry is returned. Iteration is organized in this manner: Iteration is organized in this manner: for(ConcurrentArrayHashMap<K, V>.Entry e = targets.firstValue(); e != null; e = targets.nextValue(e)) { V element = e.getValue();
public WeakAlarm(AlarmListener listener){ super(listener); }
Create a new wakeup alarm with a designated listener as a callback. The alarm is not scheduled.
public void saveMedia(Context context,File folder){ mFileName=null; Uri mediaUri=getUri(); if (null != mediaUri) { try { ResourceUtils.Resource resource=ResourceUtils.openResource(context,mediaUri,getMimeType(context)); if (null == resource) { Log.e(LOG_TAG,"## saveMedia : Fail to retrieve...
Save a media into a dedicated folder
public ProfileManagerDialog(java.awt.Frame parent,boolean modal){ super(parent,modal); initComponents(); initGuiFields(); translateTexts(); }
Creates new form ProfileManagerDialog
public static void swap4Bytes(byte[] bytes,int offset){ swapBytesAt(bytes,offset + 0,offset + 3); swapBytesAt(bytes,offset + 1,offset + 2); }
Swaps the 4 bytes (changes endianness) of the bytes at the given offset.
public static boolean isValid(int c){ return (c < 0x10000 && (CHARS[c] & MASK_VALID) != 0) || (0x10000 <= c && c <= 0x10FFFF); }
Returns true if the specified character is valid. This method also checks the surrogate character range from 0x10000 to 0x10FFFF. <p> If the program chooses to apply the mask directly to the <code>CHARS</code> array, then they are responsible for checking the surrogate character range.
@Override public boolean equals(Object o){ return m_Root.equals(((Trie)o).getRoot()); }
Compares the specified object with this collection for equality.
public int numParameters(){ return 2; }
Returns the number of hyperparameters of this<code>CovarianceFunction</code>
protected void addScheduledTasks(){ if (!lock.isHeldByCurrentThread()) throw new IllegalMonitorStateException(); final AbstractFederation fed=(AbstractFederation)getFederation(); notifyFuture=fed.addScheduledTask(new NotifyReleaseTimeTask(),60,60,TimeUnit.SECONDS); if (snapshotInterval != 0L) { writeFutur...
Adds the scheduled tasks.
public void transform(double[] srcPts,int srcOff,float[] dstPts,int dstOff,int numPts){ double M00, M01, M02, M10, M11, M12; switch (state) { default : stateError(); return; case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE): M00=m00; M01=m01; M02=m02; M10=m10; M11=m11; M12=m12; while (--numPts >= 0) { double x...
Transforms an array of double precision coordinates by this transform and stores the results into an array of floats. The coordinates are stored in the arrays starting at the specified offset in the order <code>[x0, y0, x1, y1, ..., xn, yn]</code>.
public static synchronized Object readAsXML(ObjectInput in) throws IOException { if (readBuf == null) readBuf=new byte[16384]; Thread cThread=Thread.currentThread(); ClassLoader oldCL=null; try { oldCL=cThread.getContextClassLoader(); cThread.setContextClassLoader(LayoutUtil.class.getClassLoader()); ...
Reads an object from <code>in</code> using the
@Override public void deletedProject(final IDatabase database,final INaviProject project){ for (int i=0; i < getChildCount(); i++) { final CProjectNode node=(CProjectNode)getChildAt(i); if (node.getObject() == project) { node.dispose(); remove(node); break; } } getTreeModel().nodeStr...
When a project was removed from the database, the corresponding node must be removed from the tree.
public static ChainingJsonWriter writeJson(ICalendar... icals){ return writeJson(Arrays.asList(icals)); }
Writes an xCal document (XML-encoded iCalendar objects).
public static int signOfDet2x2(DD x1,DD y1,DD x2,DD y2){ DD det=x1.multiply(y2).selfSubtract(y1.multiply(x2)); return det.signum(); }
Computes the sign of the determinant of the 2x2 matrix with the given entries.
public static String encode(byte[] source,int off,int len,byte[] alphabet,boolean doPadding){ byte[] outBuff=encode(source,off,len,alphabet,Integer.MAX_VALUE); int outLen=outBuff.length; while (doPadding == false && outLen > 0) { if (outBuff[outLen - 1] != '=') { break; } outLen-=1; } return...
Encodes a byte array into Base64 notation.
public TransferHandlerAnnotationPlaintext(final JEditorPane editor){ if (editor == null) { throw new IllegalArgumentException("editor must not be null!"); } this.editor=editor; this.original=editor.getTransferHandler(); }
Creates a new plain text transfer handler for the annotation editor.
private void fireTableChange(WTableModelEvent event){ for ( WTableModelListener listener : m_listeners) { listener.tableChanged(event); } return; }
Send the specified <code>event</code> to all listeners.
public static String date2Str(Date d,String format){ if (d == null) return ""; SimpleDateFormat sdf=new SimpleDateFormat(format); return sdf.format(d); }
return String of input date
public static void test6(){ final String nat="STRING"; fm.getFlavorsForNative(nat); fm.setFlavorsForNative(nat,new DataFlavor[0]); List<DataFlavor> flavors=fm.getFlavorsForNative(nat); if (!flavors.isEmpty()) { System.err.println("flavors=" + flavors); throw new RuntimeException("Test failed"); } }
Verifies that a native doesn't have any native-to-flavor mappings after a call to setFlavorsForNative() with this native and an empty flavor array as arguments.
public Criteria or(){ Criteria criteria=createCriteriaInternal(); oredCriteria.add(criteria); return criteria; }
This method was generated by MyBatis Generator. This method corresponds to the database table trash
private void forceInternalError(){ throw new InternalError("gotcha"); }
not really any good way to convince Java to do this, so I'm just gonna throw it directly.
@Override protected void doPost(HttpServletRequest request,HttpServletResponse response){ processGetRequest(request,response); }
Handles the HTTP <code>POST</code> method.
private void validateTableMetaData_allViews(String tableNamePattern) throws Exception { Set<String> expectedViews=new HashSet<>(Arrays.asList("TEST_NORMAL_VIEW","test_quoted_normal_view")); Set<String> retrievedTables=new HashSet<>(); Map<TableMetaData,Object> rules=getDefaultValueValidationRules(); rules.put(T...
Helper method for test methods that retrieve table metadata of all view tables.
public void clear(){ root=null; size=0; }
Remove all elements from the tree
public long queryCount() throws GenericEntityException { if (dynamicViewEntity != null) { EntityListIterator iterator=null; try { iterator=queryIterator(); return iterator.getResultsSizeAfterPartialList(); } finally { if (iterator != null) { iterator.close(); } } } ...
Executes the EntityQuery and returns the result count If the query generates more than a single result then an exception is thrown
public void testForkQuietlyJoin(){ testForkQuietlyJoin(mainPool()); }
quietlyJoin of a forked task returns when task completes
public final void testGetCount(){ CharSequence[] entries=new CharSequence[]{"entry1","entry2"}; ProxySpinnerAdapter adapter1=createAdapter(new CharSequence[0]); ProxySpinnerAdapter adapter2=createAdapter(entries); assertEquals(0,adapter1.getCount()); assertEquals(3,adapter2.getCount()); }
Tests the functionality of the getCount-method.
private boolean parseIntent(){ Intent intent=getIntent(); if (intent != null && intent.getAction().equals(ACTION_INTERNAL_REQUEST_BT_ON)) { mEnableOnly=true; } else if (intent != null && intent.getAction().equals(ACTION_INTERNAL_REQUEST_BT_ON_AND_DISCOVERABLE)) { mEnableOnly=false; mTimeout=intent....
Parse the received Intent and initialize mLocalBluetoothAdapter.
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:20.083 -0500",hash_original_method="9A759A0D04375324D8F6D99375FF174F",hash_generated_method="0FF4C408441CDF51A299C96865D3C743") public boolean isOpaque(){ return getTaint...
Return true if the device that the current layer draws into is opaque (i.e. does not support per-pixel alpha).
public String createResultsTable(ResultProducer rp,String tableName) throws Exception { if (m_Debug) { System.err.println("Creating results table " + tableName + "..."); } String query="CREATE TABLE " + tableName + " ( "; String[] names=rp.getKeyNames(); Object[] types=rp.getKeyTypes(); if (names.length...
Creates a results table for the supplied result producer.
public char current(){ return reorderedACI.current(); }
Gets the character at the current position (as returned by getIndex()).
public static boolean lookingAt(String str,String regex){ return Pattern.compile(regex).matcher(str).lookingAt(); }
Say whether this regular expression can be found at the beginning of this String. This method provides one of the two "missing" convenience methods for regular expressions in the String class in JDK1.4.
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 void writeToFile(File filename) throws IOException { FileUtils.stringToFile(mText.toString(),filename); }
write the reference.txt to a file
public GraphicsNodeMouseEvent(GraphicsNode source,MouseEvent evt,int button,int lockState){ super(source,evt,lockState); this.button=button; this.x=evt.getX(); this.y=evt.getY(); this.clickCount=evt.getClickCount(); }
Constructs a new graphics node mouse event from an AWT MouseEvent.
@Uninterruptible public void activate(){ rvmThread.monitor().lockNoHandshake(); osr_flag=true; rvmThread.monitor().broadcast(); rvmThread.monitor().unlock(); }
Activates organizer thread if it is waiting.
protected boolean isURL(){ final boolean debug=false; char nc=peek(1); switch (nc) { case ' ': case '\t': case '\r': case '\n': case '"': case '\'': return false; } State cs=this.getCurrent(); UrlValidation syntaxvalid=new UrlValidation(); int where; if ((where=syntaxvalid.isValid(text,cs.start)) != -1) { Str...
We have encountered a colon in the input data stream, check to see if it is a URL, and if it is, advance the cursor and return true, or return false.
public void runTest() throws Throwable { Document doc; NodeList acronymList; Node testNode; NamedNodeMap attributes; Attr titleAttr; String value; Text textNode; Node retval; Node lastChild; doc=(Document)load("hc_staff",true); titleAttr=doc.createAttribute("title"); textNode=doc.createTextNode(...
Runs the test case.
public InlineQueryResultDocument.InlineQueryResultDocumentBuilder thumbUrl(URL thumbUrl){ this.thumb_url=thumbUrl; return this; }
*Optional Sets the URL of the thumbnail that should show next to the result in the inline result selection pane
@DSComment("OS Bundle data structure") @DSSafe(DSCat.DATA_STRUCTURE) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:36.518 -0500",hash_original_method="8FC0D5E8787A84A268AF6F8743FC18A2",hash_generated_method="6F7D480D452EFF0784927D78F4534B62") public void putBundle(String key,Bu...
Inserts a Bundle value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
void deleteConsistencyGroup(String cgName) throws VPlexApiException { s_logger.info("Request to delete consistency group {}",cgName); VPlexApiDiscoveryManager discoveryMgr=_vplexApiClient.getDiscoveryManager(); List<VPlexClusterInfo> clusterInfoList=discoveryMgr.getClusterInfoLite(); VPlexConsistencyGroupInfo c...
Deletes the consistency group with the passed name.
protected void update(int length){ tickLabelValues.clear(); tickLabels.clear(); tickLabelPositions.clear(); if (scale.isLogScaleEnabled()) { updateTickLabelForLogScale(length); } else { updateTickLabelForLinearScale(length); } updateTickVisibility(); updateTickLabelMaxLengthAndHeight(); }
Updates the tick labels.
public static Object[] clone(Object[] array){ if (array == null) { return null; } return (Object[])array.clone(); }
<p>Shallow clones an array returning a typecast result and handling <code>null</code>.</p> <p>The objects in the array are not cloned, thus there is no special handling for multi-dimensional arrays.</p> <p>This method returns <code>null</code> for a <code>null</code> input array.</p>
@Override protected char[] escape(int cp){ if (cp < safeOctets.length && safeOctets[cp]) { return null; } else if (cp == ' ' && plusForSpace) { return URI_ESCAPED_SPACE; } else if (cp <= 0x7F) { char[] dest=new char[3]; dest[0]='%'; dest[2]=UPPER_HEX_DIGITS[cp & 0xF]; dest[1]=UPPER_H...
Escapes the given Unicode code point in UTF-8.
public static void disableConnectionReuseIfNecessary(){ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) { System.setProperty("http.keepAlive","false"); } }
Workaround for bug pre-Froyo, see here for more info: http://android-developers.blogspot.com/2011/09/androids-http-clients.html
public void clear(){ initialize(); }
Removes all of the mappings from this map.
private void readObject(ObjectInputStream s) throws InvalidObjectException { throw new InvalidObjectException("Deserialization via serialization delegate"); }
Defend against malicious streams.
private void updateUnsuccessfulDownloadedFile(){ OCFile file=mStorageManager.getFileById(mCurrentDownload.getFile().getFileId()); file.setDownloading(false); mStorageManager.saveFile(file); }
Update the OC File after a unsuccessful download
private DebugAttributedStringBuilder format(String s){ DebugAttributedStringBuilder dest=new DebugAttributedStringBuilder(); f.format(s,normal,dest); return dest; }
Format a string.
public void visitSource(String source,String debug){ if (cv != null) { cv.visitSource(source,debug); } }
Visits the source of the class.
public void scanMainJarFile(){ Dimension screenSiz=Toolkit.getDefaultToolkit().getScreenSize(); watchXSize=(int)(0.4 * (double)screenSiz.width); watchYSize=(int)(0.4 * (double)screenSiz.height); String JarName=GlobalValues.jarFilePath; examplesFound.clear(); try { JarInputStream zin=new JarInputStream(n...
Scans the contents of the Jar archive and populates the combo box.
public Map<String,Object> runSync(String localName,ModelService modelService,Map<String,? extends Object> params,boolean validateOut) throws ServiceAuthException, ServiceValidationException, GenericServiceException { long serviceStartTime=System.currentTimeMillis(); Map<String,Object> result=new HashMap<String,Obje...
Run the service synchronously and return the result.
protected void sequence_AnnotatedScriptElement_InterfaceImplementsList_Members_TypeVariables(ISerializationContext context,N4InterfaceDeclaration semanticObject){ genericSequencer.createSequence(context,semanticObject); }
Contexts: AnnotatedScriptElement returns N4InterfaceDeclaration Constraint: ( annotationList=AnnotatedScriptElement_N4InterfaceDeclaration_1_3_0_1_0 declaredModifiers+=N4Modifier* typingStrategy=TypingStrategyDefSiteOperator? name=BindingIdentifier (typeVars+=TypeVariable typeVars+=TypeVariable*)? (superInterfaceR...
public void onRetry(){ }
Fired when a retry occurs, override to handle in your own code
public void deleteAllItems() throws XMPPException { PubSub request=createPubsubPacket(Type.SET,new NodeExtension(PubSubElementType.PURGE_OWNER,getId()),PubSubElementType.PURGE_OWNER.getNamespace()); SyncPacketSend.getReply(con,request); }
Purges the node of all items. <p>Note: Some implementations may keep the last item sent.
public static String arpabetToIPA(String s) throws IllegalArgumentException { String[] arpaPhonemes=s.trim().split("[ \\t]+"); StringBuffer ipaPhonemes=new StringBuffer(s.length()); for ( String arpaPhoneme : arpaPhonemes) { char stressChar=arpaPhoneme.charAt(arpaPhoneme.length() - 1); if (stressChar == ...
Converts an Arpabet phonemic transcription to an IPA phonemic transcription. Note that, somewhat unusually, the stress symbol will precede the vowel rather than the syllable. This is because Arpabet does not mark syllable boundaries.
private void updateTransitivePreds(DTNHost host){ MessageRouter otherRouter=host.getRouter(); assert otherRouter instanceof ProphetRouter : "PRoPHET only works " + " with other routers of same type"; double pForHost=getPredFor(host); Map<DTNHost,Double> othersPreds=((ProphetRouter)otherRouter).getDeliveryPreds(...
Updates transitive (A->B->C) delivery predictions. <CODE>P(a,c) = P(a,c)_old + (1 - P(a,c)_old) * P(a,b) * P(b,c) * BETA </CODE>
private void generate(Region.Entry entry) throws SAXException { if ((entry == null)) { return; } handler.startElement("",ENTRY,ENTRY,EMPTY); handler.startElement("",KEY,KEY,EMPTY); generate(entry.getKey()); handler.endElement("",KEY,KEY); handler.startElement("",VALUE,VALUE,EMPTY); generate(entry.ge...
Generates XML for a region entry
public boolean threadPool(){ return this.threadPool; }
Should the node Thread Pool be returned.
protected void goingInactive(OBlock block){ if (_runMode == MODE_NONE) { return; } if (!ThreadingUtil.isLayoutThread()) log.error("invoked on wrong thread",new Exception("traceback")); int idx=getIndexOfBlock(block,_idxLastOrder); if (log.isDebugEnabled()) { log.debug("Block \"" + block.getDisplayNa...
Block in the route is going Inactive
public static boolean isContactImpulseEnabled(){ return contactImpulseEnabled; }
Returns true if contact impulses should be rendered.
public static OracleRequest[] generatePkcs1Vectors(RSAPublicKey publicKey,CryptoConstants.Algorithm algorithm,boolean setEncryptedData) throws CryptoAttackException { Random random=new Random(); byte[] keyBytes=new byte[algorithm.KEY_SIZE]; random.nextBytes(keyBytes); LOG.debug("Generated a random symmetric key...
Generates different encrypted PKCS1 vectors
public CredentialNotFoundException(String msg){ super(msg); }
Constructs a CredentialNotFoundException with the specified detail message. A detail message is a String that describes this particular exception. <p>
private ElementCreatorImpl whitelistAttributes(Collection<AttributeKey<?>> attributeKeys){ synchronized (registry) { if (attributeWhitelist == null) { attributeWhitelist=Sets.newHashSet(); } attributeWhitelist.addAll(attributeKeys); registry.dirty(); } return this; }
Whitelists a set of attributes for this element metadata. This will hide all declared attributes on the metadata instance that will be created from this builder.
public void initContext(Object context){ initComponents(); }
Init Context.
public void configure(){ SerialTrafficController.instance().connectPort(this); jmri.InstanceManager.setTurnoutManager(jmri.jmrix.tmcc.SerialTurnoutManager.instance()); jmri.InstanceManager.setThrottleManager(new jmri.jmrix.tmcc.SerialThrottleManager()); jmri.jmrix.tmcc.ActiveFlag.setActive(); }
set up all of the other objects to operate connected to this port
private static void checkSyntax(String functionCall) throws FBSQLParseException { int parenthesisStart=functionCall.indexOf('('); if (parenthesisStart != -1 && functionCall.charAt(functionCall.length() - 1) != ')') throw new FBSQLParseException("No closing parenthesis found, not a function call."); }
Simple syntax check if function is specified in form "name(...)".