code
stringlengths
10
174k
nl
stringlengths
3
129k
public Plugin loadPlugin() throws PluginException { return getPlugin(); }
Get the Plugin.
@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:15.455 -0500",hash_original_method="E29573D85212414C15B5600ED44221C0",hash_generated_method="45AB3E76A33739E95CE9CE6CD6FCDA89") protected void sendMessage(byte[] msg,InetAddress peerAddr...
Send a message to a specified receiver address.
public Collection<Integer> pendingReducers(){ return pendingReducers; }
Gets collection of pending reducers.
public boolean isEncapsulated(){ return encapsulated; }
To check if this Progress is ready to be shown
private void resolveConflict(final ConflictDescription description){ final ConflictResolutionDialog resolveDialog=new ConflictResolutionDialog(getShell(),description); description.clearAnalysis(); if (resolveDialog.open() != IDialogConstants.OK_ID) { return; } final ConflictResolution resolution=resolveDi...
Raise the dialog prompting the user for conflict resolution, and then attempt to resolve the conflict with that given resolution.
@SuppressWarnings("unchecked") public Frame(final int nLocals,final int nStack){ this.values=(V[])new Value[nLocals + nStack]; this.locals=nLocals; }
Constructs a new frame with the given size.
@Override protected EClass eStaticClass(){ return ExpressionsPackage.Literals.CONDITIONAL_EXPRESSION; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public static FactoryImage createImage(InputStream is,String mediaType,String name) throws BadRequestException, ServerException { try { final ByteArrayOutputStream out=new ByteArrayOutputStream(); final byte[] buffer=new byte[1024]; int read; while ((read=is.read(buffer,0,buffer.length)) != -1) { ...
Creates factory image from input stream. InputStream should be closed manually.
public void pad(int factor) throws IOException { int padding=factor - (int)(nrBits % factor); int excess=padding & 7; if (excess > 0) { this.write(0,excess); padding-=excess; } while (padding > 0) { this.write(0,8); padding-=8; } this.out.flush(); }
Pad the rest of the block with zeroes and flush. pad(8) flushes the last unfinished byte. The underlying OutputStream will be flushed.
protected void processCompletionStageUpdateAuthzArtifacts(Operation op){ op.complete(); }
Update any authz cache artifacts. Service authors need to override this method to define custom authz cache clear behavior
public void createUser(String username,String password) throws SQLException { createUser(username,password,null); }
Create a database user. <p> On Firebird 3.0 or higher this uses the default user manager plugin. </p>
public void runTest() throws Throwable { Document doc; NodeList elementList; Element testAddr; NamedNodeMap addrAttr; Node attrNode; NamedNodeMap attrList; doc=(Document)load("hc_staff",false); elementList=doc.getElementsByTagName("acronym"); testAddr=(Element)elementList.item(0); addrAttr=testAddr....
Runs the test case.
protected void registerTouchpadAttributes(){ addAttributeProcessor(new DeadZoneLmlAttribute(),"deadzone","deadzoneRadius"); addAttributeProcessor(new ResetOnTouchUpLmlAttribute(),"resetOnTouchUp"); }
Touchpad widget attributes.
@Override public void handle(ReadyEvent event){ try { event.getClient().changeUsername("Awesome Bot"); } catch ( RateLimitException|DiscordException e) { e.printStackTrace(); } }
The ReadyEvent is fired when the bot is ready to interact with Discord. Attempting to do so (e.g. Changing account info, sending messages, etc.) before the event is fired will result in an error.
public boolean isContactIdAssociatedWithRcsContactProvider(final ContactId contact){ Cursor cursor=null; Uri uri=Uri.withAppendedPath(CONTENT_URI,contact.toString()); try { cursor=mLocalContentResolver.query(uri,PROJ_RCSCONTACT_CONTACT,null,null,null); CursorUtil.assertCursorIsNotNull(cursor,uri); ret...
Utility to check if a phone number is associated to an entry in the RCS contact provider
public T caseAnonymous_activity_1_(Anonymous_activity_1_ object){ return null; }
Returns the result of interpreting the object as an instance of '<em>Anonymous activity 1</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
public HostQueue(final File hostPath,final boolean onDemand,final boolean exceed134217727) throws MalformedURLException { this.onDemand=onDemand; this.exceed134217727=exceed134217727; this.hostPath=hostPath; String filename=hostPath.getName(); int pdot=filename.lastIndexOf('.'); if (pdot < 0) throw new Ru...
Initializes host queue from cache files. The internal id of the queue is extracted form the path name an must match the key initially generated currently the hosthash is used as id.
private void createIcon(final int numberOfRows){ final Label label=new Label(this.composite,SWT.NONE); label.setImage(this.icon); label.setBackground(this.composite.getDisplay().getSystemColor(SWT.COLOR_WHITE)); label.setLayoutData(new GridData(GridData.CENTER,GridData.BEGINNING,false,false,1,numberOfRows)); }
Create the icon
boolean isAttributeAssigned(int attrId){ return ((attrVals[attrId - CSS_STYLE_ID_OFFSET] != -1) || ((getAttributes() != null) && (getAttributes().get(new Integer(attrId)) != null))); }
Checks if the specified attribute is assigned (i.e. was set with a legal value)
private void addReference(final int sourcePosition,final int referencePosition){ if (srcAndRefPositions == null) { srcAndRefPositions=new int[6]; } if (referenceCount >= srcAndRefPositions.length) { int[] a=new int[srcAndRefPositions.length + 6]; System.arraycopy(srcAndRefPositions,0,a,0,srcAndRefPosi...
Adds a forward reference to this label. This method must be called only for a true forward reference, i.e. only if this label is not resolved yet. For backward references, the offset of the reference can be, and must be, computed and stored directly.
public UnitImageFactory(){ }
Creates new IconImageFactory
@Override public void eSet(int featureID,Object newValue){ switch (featureID) { case UmplePackage.AFTER_EVENT___TIMER_1: setTimer_1((String)newValue); return; } super.eSet(featureID,newValue); }
<!-- begin-user-doc --> <!-- end-user-doc -->
protected void processMappingValueConverter(DatabaseMapping mapping,String convertValue,List<ConvertMetadata> converts,MetadataClass referenceClass,MetadataClass referenceClassWithGenerics){ processMappingConverter(mapping,convertValue,getConverts(converts),referenceClass,referenceClassWithGenerics,false); }
INTERNAL: Process a convert value which specifies the name of an EclipseLink converter to process with this accessor's mapping.
@NonNull public RxAppState startMonitoring(){ appStateRecognizer.start(app,internalAppStateListener); return this; }
Starts monitoring the app for background / foreground changes.
public int addMovingPoint(int x,int y){ int position=super.addMovingPoint(x,y); redraw(null,true); return position; }
Overridden to overcome some repainting unpleasantness that occurs when a point is added. Slows things down, however.
public RenewSpec(boolean renewable,boolean renew,int remainingRenewables){ Validate.isTrue(remainingRenewables >= 0); this.remainingRenewables=remainingRenewables; this.renewable=renewable; this.renew=renew; }
Creates a new specification
private static Region RegionToTokPair(MappingObject[][] spec,Region reg){ PCalLocation regBegin=reg.getBegin(); PCalLocation regEnd=reg.getEnd(); if (regEnd.getLine() < 0 || regBegin.getLine() >= spec.length) { return null; } if (regBegin.getLine() < 0) { regBegin=new PCalLocation(0,0); } if (regE...
This implements the operator of the same name in TLAToPCal.tla. The Region return value is the position in spec of a pair of PCalLocations of a BeginTLAToken and EndTLAToken, which delimit the region in the TLA+ translation that we interpret the user's selection as having chosen. However, if the user has effectively ...
public static byte[] hexStringToByteArray(final String s,int offset,int len){ final byte[] b=new byte[len / 2]; for (int i=0; i < b.length; i++) { final int index=offset + i * 2; final int v=Integer.parseInt(s.substring(index,index + 2),16); b[i]=(byte)v; } return b; }
Hex string to byte array.
private void snipOutEntry(Entry entry,final Entry parent,boolean removeParentRelationship){ final String previousId=entry.getPreviousSiblingId(); if (previousId != null) { final Entry previous=getEntryById(previousId); previous.setNextSiblingId(entry.getNextSiblingId()); } else { parent.setFirstChild...
Helper method. Removes an entry from its parent and siblings, but not from its children. The user's entitlements must be checked before calling this method.
private void gotoMyLocation(){ LocationManager locationManager=(LocationManager)getSystemService(LOCATION_SERVICE); Criteria criteria=new Criteria(); String provider=locationManager.getBestProvider(criteria,true); if (Build.VERSION.SDK_INT >= 23 && ContextCompat.checkSelfPermission(getActivity(),android.Manifes...
animate google map to my location and add marker to my location
public T caseIfStatement(IfStatement object){ return null; }
Returns the result of interpreting the object as an instance of '<em>If Statement</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
public double eval(double params[]){ return (Math.abs(params[0])); }
Evaluate the absolute value of a single parameter.
public boolean explicitCast(Type from,Type to) throws ClassNotFound { if (implicitCast(from,to)) { return true; } if (from.inMask(TM_NUMBER)) { return to.inMask(TM_NUMBER); } if (from.isType(TC_CLASS) && to.isType(TC_CLASS)) { ClassDefinition fromClass=getClassDefinition(from); ClassDefinition...
Return true if an explicit cast from this type to the given type is allowed.
public boolean match(CatchClause node,Object other){ if (!(other instanceof CatchClause)) { return false; } CatchClause o=(CatchClause)other; return (safeSubtreeMatch(node.getException(),o.getException()) && safeSubtreeMatch(node.getBody(),o.getBody())); }
Returns whether the given node and the other object match. <p> The default implementation provided by this class tests whether the other object is a node of the same type with structurally isomorphic child subtrees. Subclasses may override this method as needed. </p>
public final void writeShort(short[] pa,int start,int n) throws IOException { for (int i=0; i < n; i++) { writeShort(pa[start + i]); } }
Write an array of shorts
public static double logPdf(double x,double m,double shape){ double a=Math.sqrt(shape / (2.0 * Math.PI * x* x* x)); double b=((-shape) * (x - m) * (x - m)) / (2.0 * m * m* x); return Math.log(a) + b; }
the natural log of the probability density function of the distribution
public long findUniqueLong(@NotNull SqlQuery query){ return executeQuery(rowMapperForClass(long.class).unique(),query); }
A convenience method for retrieving a single non-null long.
public static PivotTracingClient client(){ PivotTracingClient pt=new PivotTracingClient(); pt.addTracepoint(hdfs_datanode_incrBytesRead); pt.addTracepoint(hdfs_datanode_addReadBlockOp); pt.addTracepoint(hdfs_datanode_dataTransferProtocol); pt.addTracepoint(hdfs_client_open); pt.addTracepoint(hdfs_namenode_g...
Get a client loaded with the example tracepoints
public static void execute(ExecutablePool pool,Instantiator[] instantiators,EventID eventId){ AbstractOp op=new RegisterInstantiatorsOpImpl(instantiators,eventId); pool.execute(op,Integer.MAX_VALUE); }
Register a bunch of instantiators on a server using connections from the given pool to communicate with the server.
@Override public int parse(char[] buf,int start,int end,T data){ if (subject != null) { return subject.parse(buf,start,end,data); } else { return NO_MATCH; } }
Delegates parsing responsibilties to <code>subject</code> if it is non-null, and returns <code>NO_MATCH</code> otherwise.
static LogWriterAppender createLogWriterAppender(final boolean appendToFile,final boolean isLoner,final boolean isSecurity,final LogConfig config,final boolean logConfig){ final boolean isDistributionConfig=config instanceof DistributionConfig; final DistributionConfig dsConfig=isDistributionConfig ? (DistributionC...
Creates the log writer appender for a distributed system based on the system's parsed configuration. The initial banner and messages are also entered into the log by this method.
public static void encode(Configuration configuration,Movie movie,OutputStream out) throws IOException { final boolean useCompression=configuration.getCompilerConfiguration().useCompression(); TagEncoder encoder=configuration.generateSizeReport() ? new TagEncoderReporter() : new TagEncoder(); new MovieEncoder(enc...
Encode movie; produce binary output
public boolean hasMasks(){ return (masks != null && !masks.isEmpty()); }
Indicates if there are any masks found for placement
public ASN1Primitive parsePublicKey() throws IOException { ASN1InputStream aIn=new ASN1InputStream(keyData.getBytes()); return aIn.readObject(); }
for when the public key is an encoded object - if the bitstring can't be decoded this routine throws an IOException.
public void onUpdate(Project.NameKey project,String oldValue,String newValue){ }
Called after a project config is updated.
public VisorNodeDataCollectorTaskArg(boolean taskMonitoringEnabled,String evtOrderKey,String evtThrottleCntrKey,int sample,boolean sysCaches){ this.taskMonitoringEnabled=taskMonitoringEnabled; this.evtOrderKey=evtOrderKey; this.evtThrottleCntrKey=evtThrottleCntrKey; this.sample=sample; this.sysCaches=sysCache...
Create task arguments with given parameters.
public T caseFeatureType(FeatureType object){ return null; }
Returns the result of interpreting the object as an instance of '<em>Feature Type</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
public void initialize(){ TextureState ts=new TextureState(); ts.setEnabled(false); setRenderState(ts); for (int i=0; i < lineSetList.size(); ++i) { LineSetState state=lineSetList.get(i); addLineSet(state,false); } zBufferState=new ZBufferState(); zBufferState.setFunction(ZBufferState.TestFunction...
Initialize this LineSets object
public static TileEntity loadTileEntityHook(NBTTagCompound data,Class<? extends TileEntity> clazz) throws Exception { if (FWTile.class.isAssignableFrom(clazz)) { return FWTileLoader.loadTile(data); } else { return clazz.newInstance(); } }
Used to inject forwarded TileEntites
private static Boolean isInsidePolygon(final GeoPoint point,final List<GeoPoint> polyPoints){ final double latitude=point.getLatitude(); final double longitude=point.getLongitude(); final double sinLatitude=Math.sin(latitude); final double cosLatitude=Math.cos(latitude); final double sinLongitude=Math.sin(lon...
For a specified point and a list of poly points, determine based on point order whether the point should be considered in or out of the polygon.
public void transmit(Command c,Map h,String b){ _server.receive(c,h,b,this); }
Transmit a message to clients and listeners.
@Override protected void onCreate(Bundle savedInstanceState){ setContentView(R.layout.acronym_activity); mEditText=(EditText)findViewById(R.id.editText1); super.onCreate(savedInstanceState,AcronymOps.class,this); }
Hook method called when a new instance of Activity is created. One time initialization code goes here, e.g., storing Views.
private void expandOnCheck(){ if (chkExpand.isChecked()) expandAll(); else collapseAll(); }
On check event for the expand checkbox
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:31:09.123 -0500",hash_original_method="E6965F1E2FB321FAD1F4EA1126484F16",hash_generated_method="60C132B45E842D9C2697360FDDF75B00") public void copy1DRangeFrom(int off,int count,float[] d){ validateIsFloat32(); copy1DRangeFromUnchec...
Copy part of an allocation from an array. This variant is type checked and will generate exceptions if the Allocation type is not a 32 bit float type.
public List<String> findAllInContent(String content){ List<String> results=new LinkedList<String>(); for ( BoyerMooreMatcher matcher : strings) { if (matcher.findInContent(content) >= 0) results.add(matcher.getPattern()); } Matcher matcher; for ( Pattern pattern : patterns) { matcher=pattern.mat...
Search for all possible occurrences inside a specific content
public static void saveDefaultsToProperties(Properties properties){ properties.setProperty("MapElement.CartesianGrid.defaultColor",StringUtil.colorToString(defaultColor)); properties.setProperty("MapElement.CartesianGrid.defaultRows",Integer.toString(defaultRows)); properties.setProperty("MapElement.CartesianGrid...
Save defaults
public synchronized final void incrementProgressBy(int diff){ setProgress(mProgress + diff); }
<p>Increase the progress bar's progress by the specified amount.</p>
public void updateRegisterToClose(UseCaseConf useCaseConf,Integer bookId,List fields,List listIdsRegister) throws ValidationException, SecurityException, AttributesException, BookException, SessionException, ParseException { BookSession.preUpdateRegisterToClose(useCaseConf.getSessionID(),bookId,listIdsRegister,useCas...
Metodo que prepara y actualiza el estado de los registros a CERRADO
public static byte[] encode(Object object){ String data=new JSONObject(object).toString(); data=filter(data); return data.getBytes(); }
exchange the api resource returns to a JSONObject
public GemFireHealthConfigImpl(String hostName){ this.hostName=hostName; }
Creates a new <code>GemFireHealthConfigImpl</code> that applies to the host with the given name.
public FunctionLibFunction(){ }
Geschuetzer Konstruktor ohne Argumente.
public void login(UseCaseConf useCaseConf,String login,String password) throws ValidationException, SecurityException, Exception { String sessionID=null; if (!useCaseConf.getEntidadId().equals("ISicres") && login.indexOf("##CODE##") != -1) { String decodedLogin=login.substring(0,login.indexOf("##CODE##")); ...
Public methods
protected static boolean isUserDefinedProperty(String propName){ return !standardPropNames.contains(propName); }
Is this property a Solr-standard property, or is it an extra property defined per-core by the user?
@SuppressWarnings("rawtypes") @Test public void testCustomStorageFormat() throws Exception { String resourceId="/schema/test/foo"; String storedResourceId="_schema_test_foo.bin"; MockAnalysisComponent observer=new MockAnalysisComponent(); List<ManagedResourceObserver> observers=Arrays.asList((ManagedResourceObs...
The ManagedResource storage framework allows the end developer to use a different storage format other than JSON, as demonstrated by this test.
private static String translateOperator(String operator,Locale locale){ String result=null; if (operator.equals(RBUtil.getInstance(locale).getProperty(Keys.I18N_QUERY_EQUAL_TEXT_VALUE))) { result=com.ieci.tecdoc.common.isicres.Keys.QUERY_EQUAL_TEXT_VALUE; } else if (operator.equals(RBUtil.getInstance(local...
Traducimos el operador de busqueda de texto a su simbolo correspondiente
public boolean isStopPlaying(){ return this.stopPlaying; }
Gets the stopPlaying attribute of the SoundInfo object
public List<List<Integer>> subsetsC(int[] nums){ List<List<Integer>> subset=new ArrayList<>(); subset.add(new ArrayList<>()); for (int i=0; i < nums.length; i++) { int n=subset.size(); for (int j=0; j < n; j++) { List<Integer> set=new ArrayList<>(subset.get(j)); set.add(nums[i]); subset....
Iterative. Build from empty set to the next subsets. By add each subset the current num, new subsets are generated. Then add new subsets to all subsets and generate next round. Stop when we iterate through the array. <p> [] -> [] [1] [] [1] -> [] [1] [2] [1, 2]
public Object parse(String text) throws DataParseException { try { StringTokenizer st=new StringTokenizer(text,"\"[](){}, "); int[] array=new int[st.countTokens()]; for (int i=0; st.hasMoreTokens(); ++i) { String tok=st.nextToken(); array[i]=Integer.parseInt(tok); } return array; } ...
Parse an int array from a text string.
private void revealChildrenThatNeedAttention(TreeViewer viewer,LogEntry<T> entry){ Data logData=entry.getLogData(); if (logData != null && logData.getNeedsAttention()) { viewer.reveal(entry); } List<LogEntry<T>> disclosedChildren=entry.getDisclosedChildren(); for ( LogEntry<T> logEntry : disclosedChildre...
Reveal all children in the model that require attention.
public static ITypeBinding normalizeWildcardType(ITypeBinding wildcardType,boolean isBindingToAssign,AST ast){ ITypeBinding bound=wildcardType.getBound(); if (isBindingToAssign) { if (bound == null || !wildcardType.isUpperbound()) { return ast.resolveWellKnownType("java.lang.Object"); } } else { ...
Use this method before creating a type for a wildcard. Either to assign a wildcard to a new type or for a type to be assigned.
public Vector<SiftFeature> run(){ Vector<SiftFeature> features=new Vector<SiftFeature>(); for (int o=0; o < octaves.length; ++o) { if (octaves[o].state == FloatArray2DScaleOctave.State.EMPTY) continue; Vector<SiftFeature> more=runOctave(o); features.addAll(more); } return features; }
detect features in all scale octaves
protected AssociationResponse(ParameterList params){ super(params); }
Constructs an AssociationResponse message from a parameter list. <p> Useful for processing incoming messages.
private static <T>void siftDownComparable(int k,T x,Object[] array,int n){ if (n > 0) { Comparable<? super T> key=(Comparable<? super T>)x; int half=n >>> 1; while (k < half) { int child=(k << 1) + 1; Object c=array[child]; int right=child + 1; if (right < n && ((Comparable<? super...
Inserts item x at position k, maintaining heap invariant by demoting x down the tree repeatedly until it is less than or equal to its children or is a leaf.
public Boolean isForce(){ return force; }
Gets the value of the force property.
public ArrayLongCompressed(int size,int leadingClearBits,int trailingClearBits){ init(size,BIT_LENGTH - leadingClearBits - trailingClearBits,trailingClearBits); }
Create <code>LongArrayCompressed</code> from number of longs to be stored, the number of leading and trailing clear bits. Everything else is stored in the internal data structure.
@Override public byte readByte() throws IOException { LOG.warn("Should not be used!"); return inputStream.readByte(); }
This method should never be used!
public String toString(){ return m_Attributes.toString(); }
returns a string representation of this object
public X509v3CertificateBuilder copyAndAddExtension(ASN1ObjectIdentifier oid,boolean isCritical,X509CertificateHolder certHolder){ Certificate cert=certHolder.toASN1Structure(); Extension extension=cert.getTBSCertificate().getExtensions().getExtension(oid); if (extension == null) { throw new NullPointerExcept...
Add a given extension field for the standard extensions tag (tag 3) copying the extension value from another certificate.
public static boolean less(TMember left,TMember right){ return less(left.getMemberAccessModifier(),right.getMemberAccessModifier()); }
Convenience method, returns true if left member access modifier is less then right one.
public void testFloatValueNegativeInfinity2(){ byte[] a={0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}; int aSign=-1; float aNumber=new BigInteger(aSign,a).floatValue(); assertTrue(aNumber == Float.NEGATIVE_INFINITY); }
Convert a negative number to a float value. The exponent is 1023 and the mantissa is all 0s. The rounding bit is 0. The result is Float.NEGATIVE_INFINITY.
private byte[] unpadOAEP(byte[] padded) throws BadPaddingException { byte[] EM=padded; boolean bp=false; int hLen=lHash.length; if (EM[0] != 0) { bp=true; } int seedStart=1; int seedLen=hLen; int dbStart=hLen + 1; int dbLen=EM.length - dbStart; mgf1(EM,dbStart,dbLen,EM,seedStart,seedLen); mgf1...
PKCS#1 v2.1 OAEP unpadding (MGF1).
static int dp2px(Context context,float dp){ float px=TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,dp,context.getResources().getDisplayMetrics()); return Math.round(px); }
Convert a dp float value to pixels
private final boolean parkAndCheckInterrupt(){ LockSupport.park(this); return Thread.interrupted(); }
Convenience method to park and then check if interrupted
private void sendCommittedText(){ AttributedString as=new AttributedString(buffer.toString()); context.dispatchInputMethodEvent(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED,as.getIterator(),buffer.length(),TextHitInfo.leading(insertionPoint),null); buffer.setLength(0); insertionPoint=0; format=UNSET; }
Send the committed text to the client.
public static void CheckForDuplicateMacros(Vector macros) throws ParseAlgorithmException { int i=0; while (i < macros.size()) { String namei=((AST.Macro)macros.elementAt(i)).name; int j=i + 1; while (j < macros.size()) { if (namei.equals(((AST.Macro)macros.elementAt(j)).name)) { throw new ...
MACRO EXPANSION * Methods for expanding macros.
public SpaceHorizontalAction(final NetworkPanel networkPanel){ super(networkPanel,"Space Horizontal",EnablingCondition.NEURONS); putValue(SMALL_ICON,ResourceManager.getImageIcon("SpaceHorizontal.png")); putValue(SHORT_DESCRIPTION,"Space selected neurons horizontally"); }
Create a new space horizontal action with the specified network panel.
public static void create(DataSource ds,SQLDialect dialect,String... tables){ DSLContext dsl=DSL.using(ds,dialect); dsl.dropTableIfExists(USERS).execute(); dsl.createTable(USERS).column(UIDX,UIDX.getDataType().nullable(false)).column(USER_ID,USER_ID.getDataType().nullable(false)).execute(); dsl.alterTable(USERS...
Creates empty tables for their use in SQLPreferenceData
public static Calendar toCalendar(String datestring){ return parseGetCal(datestring,new SimpleDateFormat()); }
Returns a calendar from a given string using the default SimpleDateFormat for parsing.
private void append(StringBuilder result,String value,int[] index,String placeholder,MaskCharacter[] mask) throws ParseException { for (int counter=0, maxCounter=mask.length; counter < maxCounter; counter++) { mask[counter].append(result,value,index,placeholder); } }
Invokes <code>append</code> on the mask characters in <code>mask</code>.
public static _Fields findByThriftIdOrThrow(int fieldId){ _Fields fields=findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; }
Find the _Fields constant that matches fieldId, throwing an exception if it is not 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 String validateString(String string){ if (string == null) { return ""; } else { return string; } }
Checks if the given string is null and if it is, it returns an empty string
public SVGDescriptor toSVG(GraphicContext gc){ return toSVG(gc.getComposite()); }
Converts part or all of the input GraphicContext into a set of attribute/value pairs and related definitions
public static OrganizationAlreadyExistsException convertToApi(org.oscm.internal.types.exception.OrganizationAlreadyExistsException oldEx){ return convertExceptionToApi(oldEx,OrganizationAlreadyExistsException.class); }
Convert source version Exception to target version Exception
@Override public String toString(){ return "ResultProcessStartedResponse{" + "transactionId=" + transactionId + ", signature="+ signature+ "} "+ super.toString(); }
Returns a string representation of the object
public void destination(Object destination){ this.destination=Objects.requireNonNull(destination); }
Sets the destination directory, defaults to `build/p2asmaven`.
public static boolean isHdrOn(SettingsManager settingsManager){ return settingsManager.getBoolean(SettingsManager.SCOPE_GLOBAL,KEY_CAMERA_HDR); }
Returns whether hdr mode is set on.
public static List<String> enumConstantsOf(Column column){ return Stream.of(column.getEnumConstants().orElseThrow(null).split(",")).collect(toList()); }
Returns a list of all the enum constants in a particular column. The list is created each time this method is called and is therefore safe to edit without affecting the column. <p> If no enum constants was specified in the column, an exception is thrown.
@Override public boolean equals(Object obj){ if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof ConversationContext)) return false; ConversationContext other=(ConversationContext)obj; if (forMatching != other.forMatching) return false; if (ignoreIgnorable != other.igno...
Default implementation of equals()
@Override public void merge(Result<Map<ByteArrayWrapper,MeasureAggregator[]>,MeasureAggregator> result){ ByteArrayWrapper key; MeasureAggregator[] value; Map<ByteArrayWrapper,MeasureAggregator[]> otherResult=result.getResult(); if (otherResult != null) { while (resultIterator.hasNext()) { Entry<ByteAr...
below method will be used to merge the scanned result, in case of map based the result we need to aggregate the result