code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
protected void initializeInputHandlers(){
ViewInputAttributes.ActionAttributes.MouseAction[] resetRollMouseEvents={new ViewInputAttributes.ActionAttributes.MouseAction(MouseEvent.BUTTON1_DOWN_MASK)};
this.getAttributes().setMouseActionAttributes(ORBITVIEW_RESET_ROLL,0,ViewInputAttributes.ActionAttributes.ActionTrig... | Initialize input handlers specific to ObitView. |
public T args(String... args){
bootique.args(args);
return (T)this;
}
| Appends extra values to the test CLI arguments. |
private void showFeedback(String message){
if (myHost != null) {
myHost.showFeedback(message);
}
else {
System.out.println(message);
}
}
| Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface. |
public double[] computeLocalOfPreviousObservations() throws Exception {
return computeLocalUsingPreviousObservations(null,null,true);
}
| Computes the local transfer entropies for the previous supplied observations. Where more than one time series has been added, the array contains the local values for each tuple in the order in which they were added. If there was only a single time series added, the array contains k zero values before the local values. ... |
public Bundler putCharSequence(String key,CharSequence value){
bundle.putCharSequence(key,value);
return this;
}
| Inserts a CharSequence value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. |
public String toString(){
final String TAB=" ";
StringBuffer retValue=new StringBuffer();
retValue.append("DateOperator ( ").append("date = ").append(date.toString()).append(TAB).append("res = ").append(this.res.name()).append(TAB).append("type = ").append(this.type).append(TAB).append(TAB).append(" )");
return... | Constructs a <code>String</code> with all attributes in name = value format. |
protected boolean isEqualKey(Object key1,Object key2){
return (key1 == key2 || key1.equals(key2));
}
| Compares two keys, in internal converted form, to see if they are equal. This implementation uses the equals method and assumes neither key is null. Subclasses can override this to match differently. |
public AttributeCertificateHolder(int digestedObjectType,String digestAlgorithm,String otherObjectTypeID,byte[] objectDigest){
holder=new Holder(new ObjectDigestInfo(digestedObjectType,new ASN1ObjectIdentifier(otherObjectTypeID),new AlgorithmIdentifier(digestAlgorithm),Arrays.clone(objectDigest)));
}
| Constructs a holder for v2 attribute certificates with a hash value for some type of object. <p> <code>digestedObjectType</code> can be one of the following: <ul> <li>0 - publicKey - A hash of the public key of the holder must be passed. <li>1 - publicKeyCert - A hash of the public key certificate of the holder must be... |
public void noBody(){
if (headers.isEmpty()) {
size=0;
}
}
| Indicate that there is no text body in the message. In this case we don't need to write a single CRLF in anycase if this Element does not contain a header. |
@Path("/secrets/{secretId}/groups/{groupId}") @Timed @ExceptionMetered @PUT public Response allowAccess(@Auth User user,@PathParam("secretId") LongParam secretId,@PathParam("groupId") LongParam groupId){
logger.info("User '{}' allowing groupId {} access to secretId {}",user,groupId,secretId);
try {
aclDAO.findA... | Allow a Group to access this Secret |
public ChartEntity(Shape area,String toolTipText,String urlText){
ParamChecks.nullNotPermitted(area,"area");
this.area=area;
this.toolTipText=toolTipText;
this.urlText=urlText;
}
| Creates a new entity. |
public boolean isMaxXSet(){
return isMaxXSet(0);
}
| Returns if the maximum X value was set. |
public static final boolean isLetterOrDigit(char ch){
return (ch <= 'z') && (dataTable[ch] & LETTER_OR_DIGIT_MASK) > 0;
}
| Returns whether or not a character is a US-ASCII letter or a digit. |
private void editSubscriptions(){
String packageName=getPackageName();
Intent i=new Intent(Intent.ACTION_VIEW,Uri.parse("market://details?id=" + packageName));
startActivity(i);
}
| List subscriptions for this package in Google Play This allows users to unsubscribe from this apps subscriptions. Subscriptions are listed on the Google Play app detail page, so this should only be called if subscriptions are known to be present. |
@Override public void configureZone(final StendhalRPZone zone,final Map<String,String> attributes){
buildNPC(zone);
}
| Configure a zone. |
public void clear(){
map.clear();
}
| Clear a map |
private static Account createSyncAccount(Context context){
Account newAccount=new Account(ACCOUNT_NAME,ACCOUNT_TYPE);
AccountManager accountManager=(AccountManager)context.getSystemService(ACCOUNT_SERVICE);
Account[] accountsByType=accountManager.getAccountsByType(ACCOUNT_TYPE);
if (!dummyAccountAlreadyAdded(ac... | Create a new dummy account for the sync adapter |
private void clearIndexToFirst(){
for (; ; ) {
Index<K,V> q=head;
for (; ; ) {
Index<K,V> r=q.right;
if (r != null && r.indexesDeletedNode() && !q.unlink(r)) break;
if ((q=q.down) == null) {
if (head.right == null) tryReduceLevel();
return;
}
}
}
}
| Clears out index nodes associated with deleted first entry. |
public static double tan(double radians){
return Math.tan(radians);
}
| Returns the trigonometric tangent of the specified angle in radians. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:53.696 -0400",hash_original_method="CEC383E8BE8AD02DFB1E0F8E166802C6",hash_generated_method="A1354CACA253C1ABA13FFB05377E0442") public SuffixFileFilter(List<String> suffixes,IOCase caseSensitivity){
if (suffixes == null) {
thr... | Constructs a new Suffix file filter for a list of suffixes specifying case-sensitivity. |
public void writeTaskContainerMapping(String taskName,Integer containerId){
Integer existingContainerId=taskNameToContainerId.get(taskName);
if (existingContainerId != null && !existingContainerId.equals(containerId)) {
log.info("Task \"{}\" moved from container {} to container {}",new Object[]{taskName,existin... | Method to write task container info to coordinator stream. |
protected void onBeforeClusterRendered(Cluster<T> cluster,MarkerOptions markerOptions){
int bucket=getBucket(cluster);
BitmapDescriptor descriptor=mIcons.get(bucket);
if (descriptor == null) {
mColoredCircleBackground.getPaint().setColor(getColor(bucket));
descriptor=BitmapDescriptorFactory.fromBitmap(mIc... | Called before the marker for a Cluster is added to the map. The default implementation draws a circle with a rough count of the number of items. |
public void addPoint(float lt1,float ln1,int x1,int y1,int radius,LinkProperties properties) throws IOException {
LinkPoint.write(lt1,ln1,x1,y1,radius,properties,link.dos);
}
| Write a point in the response. |
protected void deleteLink(Link link,String reason){
if (link == null) return;
List<Link> linkList=new ArrayList<Link>();
linkList.add(link);
deleteLinks(linkList,reason);
}
| Delete a link |
public void committed(CompositeTransaction tx){
removeTransaction(tx);
}
| Called if a tx is ended successfully. In order to remove the tx from the mapping. |
private void print(LogisticRegression.Result result,double alpha){
if (result == null) {
return;
}
String text=result.getNy0() + " cases have " + result.getTarget()+ " = 0; ";
text+=result.getNy1() + " cases have " + result.getTarget()+ " = 1.\n\n";
text+="Var\tAvg\tSD\n";
for (int i=1; i <= result.getN... | Prints the info in the result to the text area (doesn't use the results representation). |
public void orderlyClose(){
try {
server.orderlyCloseChannel(key);
}
catch ( IOException e) {
System.out.println(e);
}
}
| Perform an orderly close of the TCP connection associated with this request. This method guarantees that any response already sent will not be reset (by this end). The implementation does a shutdownOutput() of the TCP connection and for a period of time consumes and discards data received on the reading side of the con... |
public boolean enabled(){
return soot.PhaseOptions.getBoolean(options,"enabled");
}
| Enabled -- . |
public InputMethod createInputMethod() throws Exception {
return new CodePointInputMethod();
}
| Creates a new instance of the Code Point input method. |
public final void yyreset(java.io.Reader reader) throws IOException {
zzBuffer=s.array;
zzStartRead=s.offset;
zzEndRead=zzStartRead + s.count - 1;
zzCurrentPos=zzMarkedPos=s.offset;
zzLexicalState=YYINITIAL;
zzReader=reader;
zzAtEOF=false;
}
| Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream <b>cannot</b> be reused (internal buffer is discarded and lost). Lexical state is set to <tt>YY_INITIAL</tt>. |
public static void main(String[] args) throws Exception {
new AerovisConverter().start(args);
}
| Starts the command line utility for converting result files into Aerovis input files. |
public boolean isUseSuspenseBalancing(){
Object oo=get_Value(COLUMNNAME_UseSuspenseBalancing);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Use Suspense Balancing. |
public void onHeadersTransitionStart(boolean withHeaders){
}
| Callback when headers transition starts. |
public UndertowFraction enableHTTPS(String path,String keystorePassword,String keyPassword,String alias){
this.keystorePath=path;
this.keystorePassword=keystorePassword;
this.keyPassword=keyPassword;
this.alias=alias;
return this;
}
| Enable HTTPS on this fraction. <p>This will enable HTTPS of the fraction. The application also <b>must</b> include the <code>management</code> fraction in its dependencies.</p> |
protected void writeColumns(Table table,StringBuilder ddl){
for (int idx=0; idx < table.getColumnCount(); idx++) {
printIndent(ddl);
writeColumn(table,table.getColumn(idx),ddl);
if (idx < table.getColumnCount() - 1) {
println(",",ddl);
}
}
}
| Writes the columns of the given table. |
public ImagePortrayal2D(Image image,double scale){
super(null,scale);
this.image=image;
this.scale=scale;
}
| Creates an ImagePortrayal2D with the given image, and scaled with the given scale.. |
public void test_construct_with_ground_terms() throws MalformedQueryException, TokenMgrError, ParseException {
final String sparql="" + "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" + "construct { ?s rdf:type ?o }\n"+ "where {?s rdf:type ?o}";
final QueryRoot expected=new QueryRoot(QueryType.CONSTR... | A construct query with some constants in the template (not ground triples, just RDF Values). |
public boolean isFullyZoomedOut(){
return mViewPortHandler.isFullyZoomedOut();
}
| if the chart is fully zoomed out, return true |
@RequestMapping(value="/replies/{id}",method=RequestMethod.DELETE,produces=MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<Void> deleteReply(@PathVariable Long id){
log.debug("REST request to delete Reply : {}",id);
replyService.deleteReply(id);
return ResponseEntity.ok().headers(HeaderUtil.createE... | DELETE /replys/:id -> delete the "id" reply. |
public ZDT5(int numberOfVariables){
super(numberOfVariables);
}
| Constructs a ZDT5 test problem with the specified number of decision variables. |
public void reset(final int maxSize,final String keyPrefix){
Check.notNullOrEmpty(keyPrefix,"keyPrefix");
for (int i=0; i < maxSize; i++) {
final String key=makeKey(keyPrefix,i);
if (preferenceStore.contains(key)) {
preferenceStore.setToDefault(key);
}
}
}
| Resets preference values which start with the given key prefix into an |
private void showFeedback(String message){
if (myHost != null) {
myHost.showFeedback(message);
}
else {
System.out.println(message);
}
}
| Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface. |
public static Region region(String name,Cache cache){
Region region=mock(Region.class);
RegionAttributes attributes=mock(RegionAttributes.class);
DataPolicy policy=mock(DataPolicy.class);
when(region.getAttributes()).thenReturn(attributes);
when(attributes.getDataPolicy()).thenReturn(policy);
when(region.ge... | A fake region, which contains a fake cache and some other fake attributes |
@Parameterized.Parameters(name="{index}: PaymentChannelStateTest({0})") public static Collection<PaymentChannelClient.VersionSelector> data(){
return Arrays.asList(PaymentChannelClient.VersionSelector.VERSION_1,PaymentChannelClient.VersionSelector.VERSION_2_ALLOW_1);
}
| We use parameterized tests to run the channel connection tests with each version of the channel. |
public static Path currentDataDirectory(){
RootDirectorySystem rootService=getCurrent();
if (rootService == null) throw new IllegalStateException(L.l("{0} must be active for getCurrentDataDirectory().",RootDirectorySystem.class.getSimpleName()));
return rootService.dataDirectory();
}
| Returns the data directory for current active directory service. |
@Override public boolean equals(Object obj){
if (obj == this) {
return true;
}
if (!(obj instanceof Marker)) {
return false;
}
Marker that=(Marker)obj;
if (!PaintUtilities.equal(this.paint,that.paint)) {
return false;
}
if (!ObjectUtilities.equal(this.stroke,that.stroke)) {
return false;... | Tests the marker for equality with an arbitrary object. |
@RequestMapping(ResourceURL.WELCOME) public ResultVO welcome(@AuthenticationPrincipal User user){
return resultHelper.successResp(new WelcomeVO(user.getId(),String.format(template,user.getName())));
}
| Welcome somebody. |
public SecureRandomPool(String algorithm,int poolSize){
this(algorithm,poolSize,null);
}
| Creates a SecureRandomPool using the specified algorithm. |
public void markChanges(SerialReply l){
try {
for (int i=0; i <= lastUsedSensor; i++) {
if (sensorArray[i] == null) {
continue;
}
int loc=i / 8;
int bit=i % 8;
boolean value=(((l.getElement(loc + 2) >> bit) & 0x01) == 1) ^ sensorArray[i].getInverted();
if (value) {
... | Use the contents of the poll reply to mark changes |
public synchronized long exponentialWait(){
long maxDelayRet=minDelay + ((maxDelay - minDelay) / maxFailureCount) * currentFailureCount;
return (long)(random.nextFloat() * maxDelayRet);
}
| Calculating wait duration after failure attempt |
private double computeLogsum(double betaWalkTT,double betaWalkTD,double cik1TT,double cik2TT,double cik3TT,double cik1TD,double cik2TD,double cik3TD){
double Vik1=betaWalkTT * cik1TT + betaWalkTD * cik1TD;
double Vik2=betaWalkTT * cik2TT + betaWalkTD * cik2TD;
double Vik3=betaWalkTT * cik3TT + betaWalkTD * cik3TD... | Calculates the logsum by taking log sum of the disutilities of traveling from the origin i to each opportunity k |
public static boolean asBoolean(CharSequence string){
return string.length() > 0;
}
| Coerce a string (an instance of CharSequence) to a boolean value. A string is coerced to false if it is of length 0, and to true otherwise. |
public FrenchLightStemFilterFactory(Map<String,String> args){
super(args);
if (!args.isEmpty()) {
throw new IllegalArgumentException("Unknown parameters: " + args);
}
}
| Creates a new FrenchLightStemFilterFactory |
@Override public boolean containsValue(Object value){
final Segment<K,V>[] segments=this.segments;
int[] mc=new int[segments.length];
for (int k=0; k < RETRIES_BEFORE_LOCK; ++k) {
int sum=0;
int mcsum=0;
for (int i=0; i < segments.length; ++i) {
int c=segments[i].count;
mcsum+=mc[i]=segmen... | Returns <tt>true</tt> if this map maps one or more keys to the specified value. Note: This method requires a full internal traversal of the hash table, and so is much slower than method <tt>containsKey</tt>. |
private void emitLoop(List<Object> localQueue,Object current){
boolean once=true;
boolean skipFinal=false;
try {
do {
if (localQueue != null) {
for ( Object n : localQueue) {
accept(n);
}
}
if (once) {
once=false;
accept(current);
}
sync... | Emits the contents of the queue as long as there are values. |
public static void startGooglePlay(Context context){
final String appPackageName=context.getPackageName();
try {
context.startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("market://details?id=" + appPackageName)));
}
catch ( android.content.ActivityNotFoundException anfe) {
context.startActivity(new... | Starts Google Play application for this application. |
public Class toClass(CtClass ct,ClassLoader loader) throws CannotCompileException {
return toClass(ct,loader,null);
}
| Converts the class to a <code>java.lang.Class</code> object. Do not override this method any more at a subclass because <code>toClass(CtClass)</code> never calls this method. <p><b>Warining:</b> A Class object returned by this method may not work with a security manager or a signed jar file because a protection domain ... |
@DSComment("Data serialization/deserialization") @DSSpec(DSCat.SERIALIZATION) @DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:35:46.127 -0500",hash_original_method="9A231220123F2F65AC76F55439204202",hash_generated_method="4B27DE55ED62E34... | Run the backup process on each of the configured handlers. |
public boolean isEntering(){
return mFocusState == FocusState.STATE_ENTER;
}
| returns true if the renderer is in an enter state. |
public static String trim(@NonNull String str,int start,int end){
return str.length() > start ? (str.length() > end ? str.substring(start,end) : str.substring(start)) : "";
}
| Trims a string from a start position to an end position. |
public void insert(Key key){
Node x=new Node();
x.key=key;
size++;
head=insert(x,head);
if (min == null) min=head;
else min=(greater(min.key,key)) ? head : min;
}
| Insert a key in the queue Worst case is O(1) |
@Override public BNetwork reduce(Query.ReduceQuery query){
BNetwork network=query.getNetwork();
Collection<String> queryVars=query.getQueryVars();
Assignment evidence=query.getEvidence();
List<String> sortedNodesIds=network.getSortedNodesIds();
sortedNodesIds.retainAll(queryVars);
Collections.reverse(sorted... | Reduces the Bayesian network to a subset of its variables. This reduction operates here by generating the possible conditional assignments for every retained variables, and calculating the distribution for each assignment. |
public Process run(RunConfiguration config,IExecutor executor){
return runnerRegistry.getRunner(config).run(config,executor);
}
| Launches the given run configuration. The specific runner to use is defined by the runnerId in the given run configuration and the given executor will be used for launching any external tools. |
@SafeVarargs public static <Type>Constraint<Type> disjunctive(@NonNull final Constraint<Type>... constraints){
return DisjunctiveConstraint.create(constraints);
}
| Creates and returns a constraint, which allows to combine multiple constraints in a disjunctive manner. If at least one constraint is satisfied, the resulting constraint will also be satisfied. |
private void updateProgress(String progressLabel,int progress){
if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) {
myHost.updateProgress(progressLabel,progress);
}
previousProgress=progress;
previousProgressLabel=progressLabel;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
private boolean isIvrEnabled(NetworkSystem networkSystem) throws NetworkDeviceControllerException {
MDSDialog dialog=null;
try {
dialog=setUpDialog(networkSystem);
return dialog.isIvrEnabled();
}
catch ( NetworkDeviceControllerException ex) {
_log.error("Cannot remove zones: " + (ex.getCause() != nu... | Verify if given network system is ivr enabled |
public JSONObject put(String key,Map<String,Object> value) throws JSONException {
this.put(key,new JSONObject(value));
return this;
}
| Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map. |
public DNSOutput(){
this(32);
}
| Create a new DNSOutput |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:30:27.178 -0500",hash_original_method="2C5263E549B4F001B6A4C4F0C63C3EBE",hash_generated_method="5447061C36967CD18D741AA45242B581") public void removeAtRange(int index,int size){
final int end=Math.min(mSize,index + size);
for (int ... | Remove a range of mappings as a batch. |
public void testFailureCompressionNotWorking() throws IOException {
if (skip) return;
long rawDataSize=writeRecords(10000,false,false,false);
if (!compression.equalsIgnoreCase(Compression.Algorithm.NONE.getName())) {
Assert.assertTrue(out.getPos() < rawDataSize);
}
closeOutput();
}
| Verify that the compressed data size is less than raw data size. |
public static void trace(byte level,String s){
trace(level,s,null);
}
| Trace the given text. |
public static void dropTable(SQLiteDatabase db,boolean ifExists){
String sql="DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "'LESSONS'";
db.execSQL(sql);
}
| Drops the underlying database table. |
public XmlHandler fromXmlToAnnotation(){
try {
for ( String className : xml.loadAttributes().keySet()) fromXmlToAnnotation(Class.forName(className));
}
catch ( Exception e) {
JmapperLog.ERROR(e);
}
return this;
}
| Adds annotations to all classes presents in the Xml configuration. |
private void renderComponent(final Graphics2D g2,final FormObject formObject,final boolean isPrinting){
final int page=formObject.getPageNumber();
final AffineTransform ax=g2.getTransform();
final Font backup=g2.getFont();
final Stroke st=g2.getStroke();
final Color old=g2.getColor();
final Shape oldClip=g2... | render component onto G2 for print of image creation |
Index(Node<K,V> node,Index<K,V> down,Index<K,V> right){
this.node=node;
this.down=down;
this.right=right;
}
| Creates index node with given values. |
public LocalDate withDayOfMonth(int dayOfMonth){
return withLocalMillis(getChronology().dayOfMonth().set(getLocalMillis(),dayOfMonth));
}
| Returns a copy of this date with the day of month field updated. <p> LocalDate is immutable, so there are no set methods. Instead, this method returns a new instance with the value of day of month changed. |
public void addDocument(Document d){
if (!m_readMode) {
try {
writer.addDocument(d);
m_hitCountCache.clear();
}
catch ( IOException e) {
e.printStackTrace();
}
}
else {
throw new IllegalStateException("Documents can not be added to the index unless" + "the LuceneSearcher is no... | Add a document to the Lucene search index. |
public static boolean isLongPressOnPowerOffEnabled(){
return SystemProperties.getInt("factory.long_press_power_off",0) != 0;
}
| When true, long-press on power should immediately cause the device to shut down, without prompting the user. |
private void updateProgress(String progressLabel,int progress){
if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) {
myHost.updateProgress(progressLabel,progress);
}
previousProgress=progress;
previousProgressLabel=progressLabel;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
private void installClientDecorations(JRootPane root){
installBorder(root);
JComponent titlePane=createTitlePane(root);
setTitlePane(root,titlePane);
installWindowListeners(root,root.getParent());
installLayout(root);
if (window != null) {
root.revalidate();
root.repaint();
}
}
| Installs the necessary state onto the JRootPane to render client decorations. This is ONLY invoked if the <code>JRootPane</code> has a decoration style other than <code>JRootPane.NONE</code>. |
void processOFMessage(OFMessage m){
roleChanger.checkTimeout();
switch (m.getType()) {
case BARRIER_REPLY:
processOFBarrierReply((OFBarrierReply)m);
break;
case ERROR:
processOFError((OFErrorMsg)m);
break;
case FLOW_REMOVED:
processOFFlowRemoved((OFFlowRemoved)m);
break;
case GET_CONFIG_REPLY:
processOFGetConfi... | Process an OF message received on the channel and update state accordingly. The main "event" of the state machine. Process the received message, send follow up message if required and update state if required. Switches on the message type and calls more specific event handlers for each individual OF message type. If we... |
@Override protected void replaceBorderIfNecessary(){
if (!isNativeSearchField()) {
super.replaceBorderIfNecessary();
}
}
| This does nothing, if the search field is rendered natively on Leopard. |
public Vector add(int x,int y,int z){
return new Vector(this.x + x,this.y + y,this.z + z);
}
| Add another vector to this vector and return the result as a new vector. |
public static AnimatedLabel createClassicSpinningLine(){
return createClassicSpinningLine(150);
}
| Creates a classic spinning bar which can be used to signal to the user that an operation in is process. |
public byte[] engineDigest(){
int bufferNdx=(int)(count % BLOCK_LENGTH);
int padLen=(bufferNdx < 56) ? (56 - bufferNdx) : (120 - bufferNdx);
byte[] tail=new byte[padLen + 8];
tail[0]=(byte)0x80;
for (int i=0; i < 8; i++) tail[padLen + i]=(byte)((count * 8) >>> (8 * i));
engineUpdate(tail,0,tail.length);
... | Completes the hash computation by performing final operations such as padding. At the return of this engineDigest, the MD engine is reset. |
@Override public void put(String name,Object value){
emulatedFields.put(name,value);
}
| Find and set the Object value of a given field named <code>name</code> in the receiver. |
private void showFeedback(String message){
if (myHost != null) {
myHost.showFeedback(message);
}
else {
System.out.println(message);
}
}
| Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface. |
private String productOwnership(){
log.info("productOwnership - M_Product_Category_ID=" + p_M_Product_Category_ID + ", M_Product_ID="+ p_M_Product_ID);
String set=" SET AD_Org_ID=" + p_AD_Org_ID;
if (p_M_Product_Category_ID > 0) set+=" WHERE EXISTS (SELECT * FROM M_Product p" + " WHERE p.M_Product_ID=x.M_Produc... | Product Ownership |
public PostConstructCustomScopeEvent(ScopeContext scopeContext){
super(scopeContext);
}
| <p class="changed_added_2_0">An instance of this event indicates that the custom scope enclosed within the argument <code>scopeContext</code> was just created.</p> |
private boolean processAccessKeys(String keyStr,HTMLComponent htmlC,Component ui){
int index=keyStr.indexOf(' ');
boolean isFirstKey=true;
while (index != -1) {
String key=keyStr.substring(0,index).trim();
keyStr=keyStr.substring(index + 1);
if (!processAccessKey(key,htmlC,ui,isFirstKey)) {
retu... | Tries to assign the given key string as an access key to the specified component The key string given here may consist of a multiple key assignment, i.e. several keys seperated with space |
private static int searchSomeElementsInBFList(List<BloomFilter<Integer>> bfList,int[] values,int nbSearchesToDo){
int minSearchSteps=10000000;
int maxSearchSteps=0;
int sumSearchSteps=0;
int minSearchStepsToFirst=10000000;
int maxSearchStepsToFirst=0;
int sumSearchStepsToFirst=0;
int nbSearches=0;
int n... | Search in the given bfList for nbInteger elements in the [startRange, endRange) |
public static double quantile(double y,double shape,double scale){
return 0.5 * scale * pointChi2(y,2.0 * shape);
}
| quantile (inverse cumulative density function) of the Gamma distribution |
public float distance(Vector3f v){
return FastMath.sqrt(distanceSquared(v));
}
| Distance calculates the distance between this vector and vector v. |
public int numChildren(int row){
int count=0;
nextValidRowPositions.clear();
for (int i=0; i < n; i++) {
board[row][i]=true;
if (valid(row,i)) {
count++;
nextValidRowPositions.add(i);
}
board[row][i]=false;
}
return count;
}
| Find out how many valid children states are found by trying to add a queen to the given row. Note: No error checking to ensure you aren't adding a queen to a row which already contains one. Caveat Emptor! Returns a number from 0 to n. |
private static List<Territory> findFontier(final Territory start,final Match<Territory> endCondition,final Match<Territory> routeCondition,final int distance,final GameData data){
final Match<Territory> canGo=new CompositeMatchOr<>(endCondition,routeCondition);
final IntegerMap<Territory> visited=new IntegerMap<>()... | Finds list of territories at exactly distance from the start |
public List<SootMethod> implicit(){
List<SootMethod> ret=new ArrayList<SootMethod>();
addMethod(ret,"<java.lang.System: void initializeSystemClass()>");
addMethod(ret,"<java.lang.ThreadGroup: void <init>()>");
addMethod(ret,"<java.lang.Thread: void exit()>");
addMethod(ret,"<java.lang.ThreadGroup: void uncaug... | Returns only the entry points invoked implicitly by the VM. |
public static Float convertFontSize(Element e){
Value v=CSSUtilities.getComputedStyle(e,SVGCSSEngine.FONT_SIZE_INDEX);
return new Float(v.getFloatValue());
}
| Converts the font-size CSS value to a float value. |
public GoTo(int playerId,int to){
super();
addParameterToRequest("playerid",playerId);
addParameterToRequest("to",to);
}
| Go to previous/next/specific item in the playlist. |
public void fireDisplayedChainChanged(){
fireModelChanged(ModelEvent.DISPLAYED_CHAIN_CHANGED);
}
| Fire when the displayed operator chain has changed. |
public boolean supportsAltitude(){
return mProperties.mSupportsAltitude;
}
| Returns true if the provider is able to provide altitude information, false otherwise. A provider that reports altitude under most circumstances but may occassionally not report it should return true. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.