code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public static boolean isCharAtEqual(String string,int index,char charToCompare){
if ((index < 0) || (index >= string.length())) {
return false;
}
return string.charAt(index) == charToCompare;
}
| Safely compares provided char with char on given location. |
private void checkContentLengthLimit(final Request request) throws BrowserException {
long length=-1;
if (request == null || request.getHttpConnection() == null || (length=request.getHttpConnection().getLongContentLength()) < 0) {
return;
}
else if (length > this.limit) {
final Logger llogger=this.getL... | Assures that the browser does not download any binary files in textmode |
public void cancel(){
this.canceled=true;
}
| Cancel the current event. The Pageable widget does not change the page if canceled |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:02:41.676 -0500",hash_original_method="840870BB0412797A5F6A599B61D1A09E",hash_generated_method="392B5DDB1E404545881718EFE88BA53A") @Deprecated public static void startMethodTracing(){
}
| Start method tracing with default name, size, and with <code>0</code> flags. |
public void shutdown(){
this.shallRun=false;
this.interrupt();
Log.getLog().info("catched QueuedIndexing termination signal");
}
| ask the thread to shut down |
public Enumeration breadthFirstEnumeration(){
return new BreadthFirstEnumeration(this);
}
| Creates and returns an enumeration that traverses the subtree rooted at this node in breadth-first order. The first node returned by the enumeration's <code>nextElement()</code> method is this node.<P> Modifying the tree by inserting, removing, or moving a node invalidates any enumerations created before the modificat... |
private List<String> defaultArgs(){
List<String> args=new ArrayList<String>();
args.add("--no-auth-cache");
args.add("--non-interactive");
args.add("--trust-server-cert");
return args;
}
| Creates a list of arguments containing default values. |
@Override public void update(BasicCamera camera){
scale=camera.getPixelSizeAt(getWorldTranslation(),true) * PIXEL_SIZE;
if (Math.abs(scale - oldScale) > 0.0000001) {
oldScale=scale;
scaleShape(scale);
}
}
| Update view dependent parts |
public final boolean doPeriodicWork() throws Exception {
synchronized (this.theFPSet) {
if (this.checkLiveness) {
if (!liveCheck.check(false)) {
return false;
}
}
if (TLCGlobals.doCheckPoint()) {
MP.printMessage(EC.TLC_CHECKPOINT_START,this.metadir);
this.theFPSet.beginChkpt(... | There are several things to do: Check liveness: check liveness properties on the partial state graph. Checkpoint: checkpoint three data structures: the state set, the state queue, and the state trace. |
private static void sumAggWithFn(double[] a,double[] c,int ai,int ci,final int len,KahanObject kbuff,KahanFunction kfunc){
for (int i=0; i < len; i++, ai++, ci++) {
kbuff._sum=c[ci];
kbuff._correction=c[ci + len];
kfunc.execute2(kbuff,a[ai]);
c[ci]=kbuff._sum;
c[ci + len]=kbuff._correction;
}
}
| Aggregated summation using the Kahan summation algorithm with one of the Kahan functions. |
public LabelledStatement basicGetLabel(){
return label;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
final public boolean isFull(){
return nkeys == keys.length;
}
| True iff the key buffer can not contain another key. |
private ManaIndicator(final LinearScalingModel model){
super(model);
this.model=model;
setVisible(false);
setBarColor(new Color(49,75,253));
}
| Create a new mana indicator. |
public void initializeDelegate(Provider<T> delegate){
checkState(this.delegate == null,"delegate already initialized");
this.delegate=checkNotNull(delegate,"delegate");
}
| Sets the actual provider. |
public static Collection<EmailType> all(){
return enums.all();
}
| Gets all of the parameter values that are defined as static constants in this class. |
public static void register(Config config){
cThreadLocal.set(config);
}
| register a Config for he current thread |
private void updateAppearance(){
if (mAdapter.getCount() > 0) {
mExpandActivityOverflowButton.setEnabled(true);
}
else {
mExpandActivityOverflowButton.setEnabled(false);
}
final int activityCount=mAdapter.getActivityCount();
final int historySize=mAdapter.getHistorySize();
if (activityCount > 0 && ... | Updates the buttons state. |
public static int fieldModifiers(){
return PUBLIC | PROTECTED | PRIVATE| STATIC| FINAL| TRANSIENT| VOLATILE;
}
| Returns a mask of all the modifiers that may be applied to fields. |
protected void notifyListeners(DatasetChangeEvent event){
Object[] listeners=this.listenerList.getListenerList();
for (int i=listeners.length - 2; i >= 0; i-=2) {
if (listeners[i] == DatasetChangeListener.class) {
((DatasetChangeListener)listeners[i + 1]).datasetChanged(event);
}
}
}
| Notifies all registered listeners that the dataset has changed. |
public void writeEntry(String tag,String logMsg){
writeEntry(TrackerEntry.createEntry(tag,logMsg));
}
| insert given log message into tracker data |
public static void append(Path file,Writer writer,boolean writeBom) throws IOException {
append(file,writer,Charset.defaultCharset().name(),writeBom);
}
| Append the text supplied by the Writer at the end of the File, using a specified encoding. If the given charset is "UTF-16BE" or "UTF-16LE" (or an equivalent alias), <code>writeBom</code> is <code>true</code>, and the file doesn't already exist, the requisite byte order mark is written to the file before the text is ap... |
public HalfEdge prevNode(){
HalfEdge e=this;
while (e.degree() == 2) {
e=e.prev();
if (e == this) return null;
}
return e;
}
| Finds the first node previous to this edge, if any. If no such node exists (i.e the edge is part of a ring) then null is returned. |
public CompactHashSet(){
this(INITIAL_SIZE);
}
| Constructs a new, empty set. |
public Token(CharSequence text,int start,int end){
append(text);
setOffset(start,end);
}
| Constructs a Token with the given term text, start and end offsets. The type defaults to "word." <b>NOTE:</b> for better indexing speed you should instead use the char[] termBuffer methods to set the term text. |
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){
switch (featureID) {
case TypesPackage.TMETHOD__DECLARED_FINAL:
return isDeclaredFinal();
case TypesPackage.TMETHOD__DECLARED_STATIC:
return isDeclaredStatic();
case TypesPackage.TMETHOD__DECLARED_OVERRIDE:
return isDeclaredOverride();
... | <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override public void addEventLine(EventLine line){
System.out.println(ESC_COLOR_RESET + line + ESC_COLOR_INPUT);
}
| just output a line on stdout |
@RequestMapping(value="/download/single/initiation/namespaces/{namespace}/businessObjectDefinitionNames/{businessObjectDefinitionName}" + "/businessObjectFormatUsages/{businessObjectFormatUsage}/businessObjectFormatFileTypes/{businessObjectFormatFileType}" + "/businessObjectFormatVersions/{businessObjectFormatVersion}/... | Initiates a download of a single file. <p>Requires READ permission on namespace</p> |
void checkForClass(String clazz) throws ClassNotFoundException {
Class.forName(clazz,false,getClass().getClassLoader());
}
| Try to load the given class using <code>Class#forName()</code>. |
public PlainSaslAuthenticator(final Vertx vertx){
this.vertx=Objects.requireNonNull(vertx);
}
| Creates a new authenticator for a Vertx environment. |
static String[] DefPrefixes(String prefix){
if (prefix.equals("")) {
return new String[]{""};
}
String[] split=prefix.split("!");
String[] result=new String[split.length + 1];
for (int i=0; i < result.length; i++) {
if (i == 0) {
result[i]="";
}
else {
result[i]=result[i - 1] + split[... | If prefix = "Foo!Bar!", then it returns the three-element array ["", "Foo!", "Foo!Bar!"] . |
@Override public String toString(){
return "CUdeviceptr[" + "nativePointer=0x" + Long.toHexString(getNativePointer()) + ","+ "byteOffset="+ getByteOffset()+ "]";
}
| Returns a String representation of this object. |
public void closeEntityManager(){
EntityManagerHolder emHolder=(EntityManagerHolder)TransactionSynchronizationManager.getResource(getEntityManagerFactory());
if (emHolder == null) {
return;
}
logger.debug("Closing JPA EntityManager in EntityManagerUtil");
EntityManagerFactoryUtils.closeEntityManager(emHol... | close the entity manager. Use it with caution! This is only intended for use with async request, which Spring won't close the entity manager until the async request is finished. |
public void cmd(String cmd){
cmdLine.cmd(getProject().getProjectDir(),cmd);
}
| Executes the given command. |
@Override public void generateRss(XmlWriter w,String elementName,RssFormat rssFormat) throws IOException {
switch (rssFormat) {
case FULL_HTML:
StringWriter sw=new StringWriter();
XmlWriter xw=new XmlWriter(sw);
xw.innerXml(xhtml.getBlob());
w.simpleElement(Namespaces.rssNs,elementName,null,sw.toString());
break;... | Generates XML in the RSS format. |
public boolean equals(lalr_item_set other){
if (other == null || other.size() != size()) return false;
try {
return is_subset_of(other);
}
catch ( internal_error e) {
e.crash();
return false;
}
}
| Equality comparison. |
public boolean removeMetric(final String name){
return this.metricRegistry.remove(name);
}
| Removes the referenced metric |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:28.686 -0500",hash_original_method="C5F540EE3212366BBE1CC045B8933E13",hash_generated_method="262E961EDDD689037F17F32869A44BE3") public void userActivity(long when,boolean noChangeLights){
try {
mService.userActivity(when,noCha... | User activity happened. <p> Turns the device from whatever state it's in to full on, and resets the auto-off timer. |
public X500Principal(byte[] name){
if (name == null) {
throw new IllegalArgumentException("Name cannot be null");
}
try {
dn=(Name)Name.ASN1.decode(name);
}
catch ( IOException e) {
throw incorrectInputEncoding(e);
}
}
| Creates a new X500Principal from a given ASN.1 DER encoding of a distinguished name. |
public void deleteBackup(String backupTag){
checkOnStandby();
validateBackupName(backupTag);
InterProcessLock lock=null;
try {
lock=getLock(BackupConstants.BACKUP_LOCK,BackupConstants.LOCK_TIMEOUT,TimeUnit.MILLISECONDS);
deleteBackupWithoutLock(backupTag,false);
}
finally {
releaseLock(lock);
... | Delete backup file on all nodes |
public int decrement(int offset){
return increment(-offset);
}
| Decrement the numeric badge label. If the current badge label cannot be converted to an integer value, its label will be set to "0". |
public boolean equalTo(FXGVersion version){
return (compareTo(version) == 0);
}
| Compares whether this FXGVersion's value is equal to the value of the version parameter. |
private void validateMaxFileSize(){
String maxFileSizeStr=carbonProperties.getProperty(CarbonCommonConstants.MAX_FILE_SIZE,CarbonCommonConstants.MAX_FILE_SIZE_DEFAULT_VAL);
try {
int maxFileSize=Integer.parseInt(maxFileSizeStr);
if (maxFileSize < CarbonCommonConstants.MAX_FILE_SIZE_DEFAULT_VAL_MIN_VAL || ma... | TODO: This method validates the maximum number of blocklets per file ? |
public void putTypeDescription(String extension,String typeDescription){
typeDescriptions.put(extension,typeDescription);
}
| Adds a human readable type description for files. Based on "dot" extension strings, e.g: ".gif". Case is ignored. |
@Override public DOMHandler beginCssLikeSelection(){
selectedElements=new Elements();
return this;
}
| This method should be called at each first selection of a RuleImplementation to reset all the local collections. |
public void addToken(char[] array,int start,int end,int tokenType,int startOffset){
super.addToken(array,start,end,tokenType,startOffset);
zzStartRead=zzMarkedPos;
}
| Adds the token specified to the current linked list of tokens. |
public boolean exists(ID id){
return findOne(id) != null;
}
| Returns whether an entity with the given id exists. |
public static boolean isApng(File file){
boolean isApng=false;
try {
PngReaderApng reader=new PngReaderApng(file);
reader.end();
int apngNumFrames=reader.getApngNumFrames();
isApng=apngNumFrames > 1;
}
catch ( Exception e) {
if (enableDebugLog) FLog.w("Error: %s",e.toString());
}
ret... | Check a file whether it is APNG |
public long id(FeedType type){
return type == FeedType.PROMOTED ? promotedId : id;
}
| Gets the id of this feed item depending on the type of the feed.. |
@Override public boolean onInterceptTouchEvent(MotionEvent ev){
try {
if (isImmersiveSwipe(ev)) return false;
return super.onInterceptTouchEvent(ev);
}
catch ( Exception e) {
Logger.e("VerticalViewPager",e);
return false;
}
}
| Hacky fix for Issue #4 and http://code.google.com/p/android/issues/detail?id=18990 <p/> ScaleGestureDetector seems to mess up the touch events, which means that ViewGroups which make use of onInterceptTouchEvent throw a lot of IllegalArgumentException: pointerIndex out of range. <p/> There's not much I can do in my cod... |
@Override public Object clone() throws CloneNotSupportedException {
return super.clone();
}
| Returns an independent copy of the generator. |
public void uninstallUI(JComponent a){
for (int i=0; i < uis.size(); i++) {
((ComponentUI)(uis.elementAt(i))).uninstallUI(a);
}
}
| Invokes the <code>uninstallUI</code> method on each UI handled by this object. |
public static Media createMedia(String uri,boolean isVideo) throws IOException {
return createMedia(uri,isVideo,null);
}
| Creates a Media from a given URI |
public static void write(int x1,int y1,int w,int h,int[] pix,LinkProperties properties,DataOutputStream dos) throws IOException {
dos.write(Link.RASTER_HEADER.getBytes());
dos.writeByte(GRAPHICTYPE_RASTER);
dos.writeByte(RENDERTYPE_XY);
dos.writeByte(COLORMODEL_DIRECT);
dos.writeInt(x1);
dos.writeInt(y1);
... | Write an image, XY placement with a direct colormodel. |
public int newLocal(final Type type){
Object t;
switch (type.getSort()) {
case Type.BOOLEAN:
case Type.CHAR:
case Type.BYTE:
case Type.SHORT:
case Type.INT:
t=Opcodes.INTEGER;
break;
case Type.FLOAT:
t=Opcodes.FLOAT;
break;
case Type.LONG:
t=Opcodes.LONG;
break;
case Type.DOUBLE:
t=Opcodes.DOUBLE;
break;
case T... | Creates a new local variable of the given type. |
private RtpPacket parseRtpPacket(byte[] data){
RtpPacket packet=new RtpPacket();
try {
packet.length=data.length;
packet.receivedAt=System.currentTimeMillis();
packet.extension=(data[0] & 0x10) > 0;
if ((byte)((data[1] & 0xff) & 0x80) == (byte)0x80) {
packet.marker=1;
}
else {
packe... | Parse the RTP packet |
public void addPolygon(PositionTextureVertex[] verts,int[][] uv){
try {
for (int i=0; i < verts.length; i++) {
verts[i]=verts[i].setTexturePosition(uv[i][0] / textureWidth,uv[i][1] / textureHeight);
}
}
finally {
addPolygon(verts);
}
}
| Creates a new polygon, and adds UV mapping to it. |
public boolean isDelivered(){
Object oo=get_Value(COLUMNNAME_IsDelivered);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Delivered. |
public double adaptedCoefficientOfDetermination(){
int n=getEstimatedResiduals().length;
return 1.0 - ((n - 1.0) / (n * 1.0 - p)) * (1 - coefficientOfDetermination());
}
| Returns the adapted coefficient of determination |
public AWTEventsListener(){
String version=System.getProperty("java.version");
if (version != null) {
runningOnJDK1_4=(version.compareTo("1.4") >= 0);
}
initializeIntrospection();
installListeners();
if (runningOnJDK1_4) {
MenuSelectionManager.defaultManager().addChangeListener(this);
}
EventQue... | Create a new instance of this class and install it on each component instance in the virtual machine that supports any of the currently registered listeners in AWTEventMonitor. Also registers itself as a TopLevelWindowListener with EventQueueMonitor so it can automatically add new listeners to new components. |
public final Iterator<AuthorityEntry> authoritiesIterator(){
return mDataAuthorities != null ? mDataAuthorities.iterator() : null;
}
| Return an iterator over the filter's data authorities. |
public void testFormatContact(){
Log.i(TAG,"testFormatContact");
try {
ContactId contact=ContactUtil.getInstance(mContext).formatContact("06 81 63 90 59");
Log.i(TAG,"Formatted contact: " + contact.toString());
}
catch ( RcsPermissionDeniedException e) {
Log.e(TAG,"Permission denied");
}
assertN... | Format a contact |
private Rectangle findBounds(int AD_WF_Node_ID){
for (int i=0; i < m_nodes.size(); i++) {
WFNode node=(WFNode)m_nodes.get(i);
if (node.getAD_WF_Node_ID() == AD_WF_Node_ID) return node.getBounds();
}
return null;
}
| Get Bounds of WF Node Icon |
protected void finalize() throws Throwable {
this.parameterEntityResolver=null;
this.attributeDefaultValues.clear();
this.attributeDefaultValues=null;
this.currentElements.clear();
this.currentElements=null;
super.finalize();
}
| Cleans up the object when it's destroyed. |
public DCheckUpdate(JFrame parent){
super(parent,Dialog.ModalityType.DOCUMENT_MODAL);
initComponents();
}
| Creates a new DCheckUpdate dialog. |
public InvalidSearchControlsException(){
super();
}
| Constructs a new instance of InvalidSearchControlsException. All fields are set to null. |
private void addSortedStyle(SelectorMapping mapping,Vector<SelectorMapping> elements){
int size=elements.size();
if (size > 0) {
int specificity=mapping.getSpecificity();
for (int counter=0; counter < size; counter++) {
if (specificity >= elements.elementAt(counter).getSpecificity()) {
element... | Adds <code>mapping</code> to <code>elements</code>. It is added such that <code>elements</code> will remain ordered by specificity. |
public void endRepresentation(){
if (!representationProtectionsSet) {
if (currentRepresentationProtections != null) {
Collections.sort(currentRepresentationProtections,this);
}
representationProtections=currentRepresentationProtections;
representationProtectionsSet=true;
}
else {
if (curr... | Should be invoked after processing each child Representation element, in order to apply consistency checks. |
private void performTest(){
if (engine == null) {
testResultLabel.clear();
return;
}
final Path testRepPath=testRepPathField.getPath();
if (!Files.exists(testRepPath) || Files.isDirectory(testRepPath)) {
testResultLabel.setNotAvailable("No test replay selected.");
return;
}
final Path testRe... | Performs a template apply test on the entered test replay file. |
public org.fife.ui.rsyntaxtextarea.Token yylex() throws java.io.IOException {
int zzInput;
int zzAction;
int zzCurrentPosL;
int zzMarkedPosL;
int zzEndReadL=zzEndRead;
char[] zzBufferL=zzBuffer;
char[] zzCMapL=ZZ_CMAP;
int[] zzTransL=ZZ_TRANS;
int[] zzRowMapL=ZZ_ROWMAP;
int[] zzAttrL=ZZ_ATTRIBUTE;
... | Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs. |
protected void handleFailedRequest(String taskId,TaskList taskList,List<Volume> volumes,ServiceCoded sc,boolean markInactive){
for ( TaskResourceRep volumeTask : taskList.getTaskList()) {
volumeTask.setState(Operation.Status.error.name());
volumeTask.setMessage(sc.getMessage());
URI resourceURI=volumeTas... | Updates passed volume and tasks on failure. |
public void clear(){
this.referent=null;
}
| Clears this reference object. Invoking this method will not cause this object to be enqueued. <p> This method is invoked only by Java code; when the garbage collector clears references it does so directly, without invoking this method. |
@Override protected void onMeasure(int widthMeasureSpec,int heightMeasureSpec){
assert getLayoutParams().height == LayoutParams.WRAP_CONTENT : "InfoBar heights cannot be constrained.";
int unspecifiedSpec=MeasureSpec.makeMeasureSpec(0,MeasureSpec.UNSPECIFIED);
for (int i=0; i < getChildCount(); i++) {
measure... | Measures *and* assigns positions to all of the views in the infobar. These positions are saved in each view's LayoutParams (lp.start and lp.top) and used during onLayout(). All of the interesting logic happens inside onMeasure(); onLayout() just assigns the already- determined positions and mirrors everything for RTL, ... |
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 void dismiss(){
if (mDialog.isShowing()) {
mDialog.dismiss();
}
}
| Dismiss the dialog if it is showing (calls AlertDialog#dismiss). |
protected void resetSizeAt(int index){
sizes[index]=0;
doReset=true;
}
| Resets the size of the Component at the passed in location. |
public static void createSimple() throws Exception {
MemoryStore memoryStore=new MemoryStore();
LuceneSail lucenesail=new LuceneSail();
lucenesail.setParameter(LuceneSail.INDEX_CLASS_KEY,ElasticsearchIndex.class.getName());
lucenesail.setBaseSail(memoryStore);
SailRepository repository=new SailRepository(luce... | Create a LuceneSail and add some triples to it, ask a query. |
@DSSink({DSSinkKind.SMS_MMS}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:27:52.982 -0500",hash_original_method="D2AB66A7ACEF0D4C8C4D01478F148AA5",hash_generated_method="21DC2D4654A30F5918F7D07B4E0FBB8F") public boolean enableCellBroadcast(int messageIdentifier){
boolean succe... | Enable reception of cell broadcast (SMS-CB) messages with the given message identifier. Note that if two different clients enable the same message identifier, they must both disable it for the device to stop receiving those messages. All received messages will be broadcast in an intent with the action "android.provider... |
private void testTransferRate(){
Assert.assertNotNull(mExpectedTransferRateOps);
Assert.assertNotNull(mExpectedTransferRateBps);
Assert.assertTrue(mExpectedTransferRateBps.intValue() > 0);
Assert.assertTrue(mExpectedTransferRateOps.intValue() > 0);
}
| Compare transfer rate calculated to expected value. |
public static float intersectRayTriangleFront(float originX,float originY,float originZ,float dirX,float dirY,float dirZ,float v0X,float v0Y,float v0Z,float v1X,float v1Y,float v1Z,float v2X,float v2Y,float v2Z,float epsilon){
float edge1X=v1X - v0X;
float edge1Y=v1Y - v0Y;
float edge1Z=v1Z - v0Z;
float edge2X=... | Determine whether the given ray with the origin <tt>(originX, originY, originZ)</tt> and direction <tt>(dirX, dirY, dirZ)</tt> intersects the frontface of the triangle consisting of the three vertices <tt>(v0X, v0Y, v0Z)</tt>, <tt>(v1X, v1Y, v1Z)</tt> and <tt>(v2X, v2Y, v2Z)</tt> and return the value of the parameter <... |
public void connectPort(AbstractPortController p){
istream=p.getInputStream();
ostream=p.getOutputStream();
if (controller != null) {
log.warn("connectPort: connect called while connected");
}
controller=p;
}
| Make connection to existing PortController object. |
@Override public String toString(){
return name;
}
| Gets a string describing the sensitivity. |
public GmlPoint(Point point){
if (point != null) {
if (!(point instanceof GmlPos)) {
point=new GmlPos(point);
}
setExtension(point);
}
}
| Constructs a gml:Point element using the given Point coordinates for the nested gml:pos element. If the point is already a gml:pos, then it will be used directly as the extension, otherwise a gml:pos element will be created as a copy of the given point. |
@Override protected Iterable<?> orderDomainValues(Variable var,Assignment assignment,CSP csp){
if (!isLCVHeuristicEnabled) {
return csp.getDomain(var);
}
else {
return applyLeastConstrainingValueHeuristic(var,csp);
}
}
| Primitive operation, ordering the domain values of the specified variable. |
public static void colorIcons(Menu menu,int color){
MenuTint.on(menu).setMenuItemIconColor(color).apply();
}
| Apply a ColorFilter with the specified color to all icons in the menu. |
public final int yylength(){
return zzMarkedPos - zzStartRead;
}
| Returns the length of the matched text region. |
protected String dot(String base){
return dot(base,"");
}
| A synonym for <code>dot( base, "" )</code>. |
public static long[] values(Long[] array){
long[] dest=new long[array.length];
for (int i=0; i < array.length; i++) {
Long v=array[i];
if (v != null) {
dest[i]=v.longValue();
}
}
return dest;
}
| Converts to primitive array. |
public static void handleError(String errorMessage,SimpleMethod method,Element element) throws ValidationException {
ValidationException e=new ValidationException(errorMessage,method,element);
if (strictOn()) {
throw e;
}
else {
Debug.logWarning(e.getMessage(),module);
}
}
| Handles a Mini-language validation error. |
public synchronized void onSuccess(){
reset();
}
| Notification about success |
public boolean isTouched(Rect touchRect){
return Rect.intersects(this.touchRect,touchRect);
}
| Determines whether touch rectangle intersects the bounds of this object. Coordinates that are passed in touchRect are the screen coordinates + scroll offset. |
private static Map<String,List<String>> splitQuery(Uri uri) throws UnsupportedEncodingException {
final Map<String,List<String>> query_pairs=new LinkedHashMap<>();
String query=uri.getQuery();
if (query == null) return query_pairs;
final String[] pairs=query.split("&");
for ( String pair : pairs) {
fin... | Splits the query parameters into key value pairs. See: http://stackoverflow.com/a/13592567/534471. |
public static boolean contains(double x1,double y1,double w1,double h1,double x2,double y2,double w2,double h2){
return x1 <= x2 && y1 <= y2 && x1 + w1 >= x2 + w2 && y1 + h1 >= y2 + h2;
}
| Checks wheather the 2nd rectangle is contained in the first rectangle |
public static Lexicon buildNameLexicon(){
Lexicon l=new Lexicon();
String[] names={"John","Mary","Boston","Xiao","Hollie","Kendrick","Beverly","Garnet","Zora","Shavonda","Peg","Katherin","Beatriz","Deirdre","Gaylord","Desirae","Tresa","Gwyneth","Rashida","Garfield","Pinkie","Claretta","Teressa","Andy","Eugena","Car... | A lexicon of names that complements the 'wumpus lexicon' above. There are 50 names of equal derivation likelihood (%2) |
protected void fireTreeStructureChanged(Object source,Object[] path,int[] childIndices,Object[] children){
Object[] listeners=listenerList.getListenerList();
TreeModelEvent e=null;
for (int i=listeners.length - 2; i >= 0; i-=2) {
if (listeners[i] == TreeModelListener.class) {
if (e == null) e=new ... | Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method. |
public Entry(int hash,Element element,int locationLine,int locationColumn,Entry next){
super(element);
this.hash=hash;
this.locationLine=locationLine;
this.locationColumn=locationColumn;
this.next=next;
}
| Creates a new entry |
public BasicDataFileStore(){
String configPath=Configuration.getStringValue(AVKey.DATA_FILE_STORE_CONFIGURATION_FILE_NAME);
if (configPath == null) {
String message=Logging.getMessage("FileStore.NoConfiguration");
Logging.logger().severe(message);
throw new IllegalStateException(message);
}
java.io.... | Create an instance. |
public boolean aggregateContains(int row,VisualItem member){
return getAggregatedRow(row,member) >= 0;
}
| Indicates if an item is a member of the aggregate at the given row |
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. |
public void accept(MemberValueVisitor visitor){
visitor.visitDoubleMemberValue(this);
}
| Accepts a visitor. |
@DSSafe(DSCat.SAFE_LIST) @DSSink({DSSinkKind.DATABASE}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:28:38.457 -0500",hash_original_method="70AF33973781662CA48B1120B9D51D5F",hash_generated_method="3AA8A3379FD3EF5E8F74AFA39939EA2C") public void bind(int index,String value){
if (... | Bind the value to an index. A prepareForInsert() or prepareForReplace() without a matching execute() must have already have been called. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.