code
stringlengths
10
174k
nl
stringlengths
3
129k
public PcMaxLocalRunner(GraphWrapper graphWrapper,Parameters params){ super(graphWrapper.getGraph(),params); this.sourceGraph=graphWrapper.getGraph(); }
Constucts a wrapper for the given EdgeListGraph.
public String addPlot(double[] x,double[] y,String lineSpec){ return addPlot(x,y,lineSpec,""); }
Adds lines to the chart regardless of hold status.
public List<TransactionOutput> calculateAllSpendCandidates(){ return calculateAllSpendCandidates(true,true); }
Returns a list of the outputs that can potentially be spent, i.e. that we have the keys for and are unspent according to our knowledge of the block chain.
@Path("move") @POST @Consumes(MediaType.APPLICATION_JSON) @Produces({MediaType.APPLICATION_JSON,MediaType.TEXT_PLAIN}) @RolesAllowed("workspace/developer") public CLIOutputResponse move(final MoveRequest request) throws ServerException, IOException { request.setProjectPath(getRealPath(request.getProjectPath())); return this.subversionApi.move(request); }
Move provided path.
@ExceptionHandler(value={org.hibernate.ObjectNotFoundException.class,ObjectNotFoundException.class}) @ResponseStatus(HttpStatus.NOT_FOUND) @ResponseBody public ErrorInformation handleNotFoundException(RuntimeException exception){ return getErrorInformation(HttpStatus.NOT_FOUND,exception); }
Handle exceptions that result in a "not found" status.
public void addDataSource(){ Integer index=dataset.getItemCount() + 1; dataset.setValue(index,1); this.fireDataSourceAdded(index); }
Adds a data source to the plot.
@HLEFunction(nid=0x6652B8CA,version=150) public int sceKernelSetAlarm(int delayUsec,TPointer handlerAddress,int handlerArgument){ return hleKernelSetAlarm(delayUsec,handlerAddress,handlerArgument); }
Set an alarm.
public GridConcurrentWeakHashSet(int initCap){ store=new GridConcurrentHashSet<>(initCap); }
Creates a new, empty set with the specified initial capacity, and with default load factor and concurrencyLevel.
@Override public Writer append(char value){ builder.append(value); return this; }
Append a single character to this Writer.
public static final int[] make_sequence(int start,int end){ int array[]=new int[end - start]; for (int j=start, i=0; j < end; j++, i++) { array[i]=j; } return array; }
Make Sequence - Generate and return new int[]{start,start+1,...,end-2,end-1}.
private void unlock(){ if (inCollection) gcLock.release(); else mutatorLock.release(); }
Release the appropriate lock depending on whether the context is GC or mutator.
protected CardTerminals engineTerminals(){ return new PCSCTerminals(); }
Returns the available readers. This must be a new object for each call.
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.
@Override protected void overrideIdentifierData(EmaApiIdentifierType identifier) throws EmaException { identifier.setEmbedLevel(EmaApi.EMA_EMBED_LEVEL_EXTERNAL_STR); }
Set specific embed level for this event in CallHome Identifier section.
private boolean querySkipExistingMethods(final MethodDeclaration method) throws OperationCanceledException { if (!fSkipAllExisting) { return false; } return true; }
Queries the user whether to skip existing methods.
public static Boolean testClassF(Boolean b){ return !b; }
Class factory unit test
public ResourceBundleEnumeration(Set<String> set,Enumeration<String> enumeration){ this.set=set; this.iterator=set.iterator(); this.enumeration=enumeration; }
Constructs a resource bundle enumeration.
public void doEditChartProperties(){ ChartEditor editor=ChartEditorManager.getChartEditor(this.chart); int result=JOptionPane.showConfirmDialog(this,editor,localizationResources.getString("Chart_Properties"),JOptionPane.OK_CANCEL_OPTION,JOptionPane.PLAIN_MESSAGE); if (result == JOptionPane.OK_OPTION) { editor.updateChart(this.chart); } }
Displays a dialog that allows the user to edit the properties for the current chart.
public DynamicPercept(Object[] keys,Object[] values){ assert (keys.length == values.length); for (int i=0; i < keys.length; i++) { setAttribute(keys[i],values[i]); } }
Constructs a DynamicPercept with an array of attributes
public AssistOptions(Map settings){ if (settings == null) return; set(settings); }
Initializing the assist options with external settings
public CLEvent enqueueNDRange(CLQueue queue,long[] globalOffsets,long[] globalWorkSizes,long[] localWorkSizes,CLEvent... eventsToWaitFor){ }
#documentCallsFunction("clEnqueueNDRangeKernel") Enqueues a command to execute a kernel on a device.
public void mobileCouponsExample(View view){ Intent intent=new Intent(this,SegmentScanActivity.class); intent.putExtra(SegmentScanActivity.EXTRAS_LICENSE_KEY,LICENSE_KEY); MobileCouponsParserSettings couponParserSett=new MobileCouponsParserSettings(MobileCouponsParserSettings.TopUpPrefix.TOP_UP_PREFIX_123); couponParserSett.setAllowNoPrefix(true); ScanConfiguration conf[]=new ScanConfiguration[]{new ScanConfiguration(R.string.mobile_coupon_title,R.string.mobile_coupon_msg,NAME_MOBILE_COUPON,couponParserSett)}; intent.putExtra(SegmentScanActivity.EXTRAS_SCAN_CONFIGURATION,conf); Intent helpIntent=new Intent(this,HelpActivity.class); intent.putExtra(SegmentScanActivity.EXTRAS_HELP_INTENT,helpIntent); startActivityForResult(intent,BLINK_OCR_MOBILE_COUPON_REQUEST_CODE); }
Called as handler for "Mobile coupons example" button
public boolean isFunctionLike(){ return args != null; }
Returns true if this is a function-like macro.
public HttpURL(final HttpURL base,final String relative) throws URIException { this(base,new HttpURL(relative)); }
Construct a HTTP URL with a given relative URL string.
public PutResourceParams withNoOverwriteDirNonDir(Boolean noOverwriteDirNonDir){ this.noOverwriteDirNonDir=noOverwriteDirNonDir; return this; }
Adds allowing replace flag to this parameters.
@Inline(value=Inline.When.ArgumentsAreConstant,arguments={1,3,4}) public static void arraycopy(int[] src,int srcIdx,int[] dst,int dstIdx,int len){ if (srcIdx >= 0 && dstIdx >= 0 && len >= 0 && (srcIdx + len) >= 0 && (srcIdx + len) <= src.length && (dstIdx + len) >= 0 && (dstIdx + len) <= dst.length) { if ((src != dst || srcIdx >= dstIdx) && INT_BULK_COPY_SUPPORTED) { if (NEEDS_INT_ASTORE_BARRIER || NEEDS_INT_ALOAD_BARRIER) { Offset srcOffset=Offset.fromIntZeroExtend(srcIdx << LOG_BYTES_IN_INT); Offset dstOffset=Offset.fromIntZeroExtend(dstIdx << LOG_BYTES_IN_INT); Barriers.intBulkCopy(src,srcOffset,dst,dstOffset,len << LOG_BYTES_IN_INT); } else { Memory.arraycopy32Bit(src,srcIdx,dst,dstIdx,len); } } else { arraycopyPiecemeal(src,srcIdx,dst,dstIdx,len); } } else { failWithIndexOutOfBoundsException(); } }
Perform an array copy for arrays of ints.
private void flingOccurred(float x,float y,float tx,float ty,float vx,float vy){ if (mEdgeSwipeHandler != null && mEdgeSwipeStarted) { mEdgeSwipeHandler.swipeFlingOccurred(x,y,tx,ty,vx,vy); } }
Called whenever a fling occurs on the container view.
public RichText withItalic(){ this.formats.add(Format.ITALIC); return this; }
Make this text component italicized
protected boolean isDisplayShowTitleEnabled(){ return true; }
<p> Should the title be displayed in the toolbar. </p>
protected void fillStaffInfo(InstructorEditForm frm,HttpServletRequest request) throws Exception { Staff staff=new StaffDAO().get(new Long(frm.getSearchSelect())); frm.setPuId(staff.getExternalUniqueId()); frm.setFname(staff.getFirstName() != null ? staff.getFirstName().trim() : ""); frm.setMname(staff.getMiddleName() != null ? staff.getMiddleName().trim() : ""); frm.setLname(staff.getLastName() != null ? staff.getLastName().trim() : ""); frm.setTitle(staff.getAcademicTitle() != null ? staff.getAcademicTitle().trim() : ""); frm.setEmail(staff.getEmail()); if (staff.getPositionType() != null && (frm.getPosType() == null || frm.getPosType().trim().length() == 0)) frm.setPosType(staff.getPositionType().getUniqueId().toString()); }
Fills form with selected staff record info
public static void ensureEquivalent(final Message m1,final ActiveMQMessage m2) throws JMSException { ProxyAssertSupport.assertTrue(m1 != m2); ProxyAssertSupport.assertEquals(m1.getJMSTimestamp(),m2.getJMSTimestamp()); byte[] corrIDBytes=null; String corrIDString=null; try { corrIDBytes=m1.getJMSCorrelationIDAsBytes(); } catch ( JMSException e) { corrIDString=m1.getJMSCorrelationID(); } if (corrIDBytes != null) { ProxyAssertSupport.assertTrue(Arrays.equals(corrIDBytes,m2.getJMSCorrelationIDAsBytes())); } else if (corrIDString != null) { ProxyAssertSupport.assertEquals(corrIDString,m2.getJMSCorrelationID()); } else { try { byte[] corrID2=m2.getJMSCorrelationIDAsBytes(); ProxyAssertSupport.assertNull(corrID2); } catch ( JMSException e) { String corrID2=m2.getJMSCorrelationID(); ProxyAssertSupport.assertNull(corrID2); } } ProxyAssertSupport.assertEquals(m1.getJMSReplyTo(),m2.getJMSReplyTo()); ProxyAssertSupport.assertEquals(m1.getJMSDestination(),m2.getJMSDestination()); ProxyAssertSupport.assertEquals(m1.getJMSDeliveryMode(),m2.getJMSDeliveryMode()); ProxyAssertSupport.assertEquals(m1.getJMSType(),m2.getJMSType()); ProxyAssertSupport.assertEquals(m1.getJMSExpiration(),m2.getJMSExpiration()); ProxyAssertSupport.assertEquals(m1.getJMSPriority(),m2.getJMSPriority()); int m1PropertyCount=0, m2PropertyCount=0; for (Enumeration<String> p=m1.getPropertyNames(); p.hasMoreElements(); ) { String name=p.nextElement(); if (!name.startsWith("JMSX")) { m1PropertyCount++; } } for (Enumeration p=m2.getPropertyNames(); p.hasMoreElements(); ) { String name=(String)p.nextElement(); if (!name.startsWith("JMSX")) { m2PropertyCount++; } } ProxyAssertSupport.assertEquals(m1PropertyCount,m2PropertyCount); for (Enumeration props=m1.getPropertyNames(); props.hasMoreElements(); ) { boolean found=false; String name=(String)props.nextElement(); if (name.startsWith("JMSX")) { continue; } boolean booleanProperty=false; try { booleanProperty=m1.getBooleanProperty(name); found=true; } catch ( JMSException e) { } if (found) { ProxyAssertSupport.assertEquals(booleanProperty,m2.getBooleanProperty(name)); continue; } byte byteProperty=0; try { byteProperty=m1.getByteProperty(name); found=true; } catch ( JMSException e) { } if (found) { ProxyAssertSupport.assertEquals(byteProperty,m2.getByteProperty(name)); continue; } short shortProperty=0; try { shortProperty=m1.getShortProperty(name); found=true; } catch ( JMSException e) { } if (found) { ProxyAssertSupport.assertEquals(shortProperty,m2.getShortProperty(name)); continue; } int intProperty=0; try { intProperty=m1.getIntProperty(name); found=true; } catch ( JMSException e) { } if (found) { ProxyAssertSupport.assertEquals(intProperty,m2.getIntProperty(name)); continue; } long longProperty=0; try { longProperty=m1.getLongProperty(name); found=true; } catch ( JMSException e) { } if (found) { ProxyAssertSupport.assertEquals(longProperty,m2.getLongProperty(name)); continue; } float floatProperty=0; try { floatProperty=m1.getFloatProperty(name); found=true; } catch ( JMSException e) { } if (found) { ProxyAssertSupport.assertTrue(floatProperty == m2.getFloatProperty(name)); continue; } double doubleProperty=0; try { doubleProperty=m1.getDoubleProperty(name); found=true; } catch ( JMSException e) { } if (found) { ProxyAssertSupport.assertTrue(doubleProperty == m2.getDoubleProperty(name)); continue; } String stringProperty=null; try { stringProperty=m1.getStringProperty(name); found=true; } catch ( JMSException e) { } if (found) { ProxyAssertSupport.assertEquals(stringProperty,m2.getStringProperty(name)); continue; } ProxyAssertSupport.fail("Cannot identify property " + name); } }
Makes sure two physically different message are equivalent: they have identical JMS fields and body.
public static long parseLong(String string) throws NumberFormatException { return parseLong(string,10); }
Parses the specified string as a signed decimal long value. The ASCII character \u002d ('-') is recognized as the minus sign.
public void enter(){ cancel(); final int outerDuration=(int)(1000 * 1.0f / WAVE_OUTER_OPACITY_ENTER_VELOCITY); final ObjectAnimator outer=ObjectAnimator.ofFloat(this,"outerOpacity",0,1); outer.setAutoCancel(true); outer.setDuration(outerDuration); outer.setInterpolator(LINEAR_INTERPOLATOR); mAnimOuterOpacity=outer; outer.start(); }
Starts the enter animation.
private void zzScanError(int errorCode){ String message; try { message=ZZ_ERROR_MSG[errorCode]; } catch ( ArrayIndexOutOfBoundsException e) { message=ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); }
Reports an error that occured while scanning. In a wellformed scanner (no or only correct usage of yypushback(int) and a match-all fallback rule) this method will only be called with things that "Can't Possibly Happen". If this method is called, something is seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). Usual syntax/scanner level error handling should be done in error fallback rules.
private static int type(final ClassWriter cw,final String desc){ String t; int index=desc.charAt(0) == '(' ? desc.indexOf(')') + 1 : 0; switch (desc.charAt(index)) { case 'V': return 0; case 'Z': case 'C': case 'B': case 'S': case 'I': return INTEGER; case 'F': return FLOAT; case 'J': return LONG; case 'D': return DOUBLE; case 'L': t=desc.substring(index + 1,desc.length() - 1); return OBJECT | cw.addType(t); default : int data; int dims=index + 1; while (desc.charAt(dims) == '[') { ++dims; } switch (desc.charAt(dims)) { case 'Z': data=BOOLEAN; break; case 'C': data=CHAR; break; case 'B': data=BYTE; break; case 'S': data=SHORT; break; case 'I': data=INTEGER; break; case 'F': data=FLOAT; break; case 'J': data=LONG; break; case 'D': data=DOUBLE; break; default : t=desc.substring(dims + 1,desc.length() - 1); data=OBJECT | cw.addType(t); } return (dims - index) << 28 | data; } }
Returns the int encoding of the given type.
public static LambdaExpression findEnclosingLambdaExpression(ASTNode node){ node=node.getParent(); while (node != null) { if (node instanceof LambdaExpression) { return (LambdaExpression)node; } if (node instanceof BodyDeclaration || node instanceof AnonymousClassDeclaration) { return null; } node=node.getParent(); } return null; }
Returns the lambda expression node which encloses the given <code>node</code>, or <code>null</code> if none.
public BufferedImage reconstruct(int resolution) throws IllegalArgumentException { int numBands=this.xform.length; int[][] imageData=new int[numBands][this.resolutionX * this.resolutionY]; byte[][] imageBytes=new byte[numBands][this.resolutionX * this.resolutionY]; int res2=(resolution / 2) * (resolution / 2); int[][] A=new int[numBands][res2]; int[][] D=new int[numBands][res2]; int[][] V=new int[numBands][res2]; int[][] H=new int[numBands][res2]; for (int k=0; k < numBands; k++) imageData[k][0]=0x000000ff & this.xform[k][0]; int scale=1; int offset=1; do { int numVals=scale * scale; if (numVals >= resolution * resolution) break; int next=0; for (int j=0; j < scale; j++) { for (int i=0; i < scale; i++, next++) { for (int k=0; k < numBands; k++) { A[k][next]=imageData[k][j * resolution + i]; } } } for (int i=0; i < numVals; i++, offset++) { for (int k=0; k < numBands; k++) { H[k][i]=this.xform[k][offset]; } } for (int i=0; i < numVals; i++, offset++) { for (int k=0; k < numBands; k++) { V[k][i]=this.xform[k][offset]; } } for (int i=0; i < numVals; i++, offset++) { for (int k=0; k < numBands; k++) { D[k][i]=this.xform[k][offset]; } } next=0; for (int j=0; j < scale; j++) { for (int i=0; i < scale; i++, next++) { for (int k=0; k < numBands; k++) { int a=A[k][next] + H[k][next] + V[k][next]+ D[k][next]; int b=A[k][next] - H[k][next] + V[k][next] - D[k][next]; int c=A[k][next] + H[k][next] - V[k][next] - D[k][next]; int d=A[k][next] - H[k][next] - V[k][next] + D[k][next]; imageData[k][2 * j * resolution + (i * 2)]=a; imageData[k][2 * j * resolution + (i * 2) + 1]=b; imageData[k][2 * j * resolution + resolution + (i * 2)]=c; imageData[k][2 * j * resolution + resolution + (i * 2) + 1]=d; } } } scale*=2; } while (scale < resolution); for (int j=0; j < resolution; j++) { for (int i=0; i < resolution; i++) { for (int k=0; k < numBands; k++) { imageBytes[k][j * resolution + i]=(byte)Math.max(0,Math.min(255,imageData[k][j * resolution + i])); } } } BandedSampleModel sm=new BandedSampleModel(DataBuffer.TYPE_BYTE,resolution,resolution,numBands); DataBufferByte dataBuff=new DataBufferByte(imageBytes,imageBytes[0].length); WritableRaster rast=Raster.createWritableRaster(sm,dataBuff,new Point(0,0)); int imageType=getBufferedImageType(this); BufferedImage image=new BufferedImage(resolution,resolution,imageType); image.getRaster().setRect(rast); return image; }
Reconstructs an image from this wavelet encoding at the given resolution. The specified resolution must be a power of two, and must be less than or equal to the resolution of the encoding. This reconstruction algorithm was hinted at in: "Principles of Digital Image Synthesis" Andrew Glassner 1995, pp. 296
public static void checkArgument(boolean expression,@Nullable String errorMessageTemplate,@Nullable Object... errorMessageArgs){ if (!expression) { throw new IllegalArgumentException(format(errorMessageTemplate,errorMessageArgs)); } }
Ensures the truth of an expression involving one or more parameters to the calling method.
public void add(EventType eventType,FilterHandleSetNode rootNode){ eventTypesRWLock.writeLock().lock(); try { if (eventTypes.containsKey(eventType)) { throw new IllegalStateException("Event type already in index, add not performed, type=" + eventType); } eventTypes.put(eventType,rootNode); } finally { eventTypesRWLock.writeLock().unlock(); } }
Add a new event type to the index and use the specified node for the root node of its subtree. If the event type already existed, the method will throw an IllegalStateException.
private static Object createObjectFromFactories(Object obj,Name name,Context nameCtx,Hashtable<?,?> environment) throws Exception { FactoryEnumeration factories=ResourceManager.getFactories(Context.OBJECT_FACTORIES,environment,nameCtx); if (factories == null) return null; ObjectFactory factory; Object answer=null; while (answer == null && factories.hasMore()) { factory=(ObjectFactory)factories.next(); answer=factory.getObjectInstance(obj,name,nameCtx,environment); } return answer; }
Creates an object using the factories specified in the <tt>Context.OBJECT_FACTORIES</tt> property of the environment or of the provider resource file associated with <tt>nameCtx</tt>.
public static CreateFactoryParams create(){ return new CreateFactoryParams(); }
Creates and returns arguments holder.
public boolean containsValue(Object value){ return contains(value); }
<p> Returns <code>true</code> if this HashMap maps one or more keys to this value. </p> <p> Note that this method is identical in functionality to contains (which predates the Map interface). </p>
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) != 0) { if (!l.inSameSubroutine(JSR)) { Edge e=new Edge(); e.info=l.inputStackTop; e.successor=JSR.successors.successor; e.next=l.successors; l.successors=e; } } } else { if (l.inSubroutine(id)) { continue; } l.addToSubroutine(id,nbSubroutines); } Edge e=l.successors; while (e != null) { if ((l.status & Label.JSR) == 0 || e != l.successors.next) { if (e.successor.next == null) { e.successor.next=stack; stack=e.successor; } } e=e.next; } } }
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.
protected void fireFigureChanged(Rectangle2D.Double changedArea){ if (listenerList.getListenerCount() > 0) { FigureEvent event=null; Object[] listeners=listenerList.getListenerList(); for (int i=listeners.length - 2; i >= 0; i-=2) { if (listeners[i] == FigureListener.class) { if (event == null) { event=new FigureEvent(this,changedArea); } ((FigureListener)listeners[i + 1]).figureChanged(event); } } } }
Notify all listenerList that have registered interest for notification on this event type.
private void jbInit() throws Exception { this.setLayout(gridBagLayout); Insets bInsets=new Insets(0,5,0,5); TitledBorder titledBorder=new TitledBorder("dummy"); lJavaHome.setToolTipText(res.getString("JavaHomeInfo")); lJavaHome.setText(res.getString("JavaHome")); fJavaHome.setText("."); okJavaHome.setEnabled(false); bJavaHome.setMargin(bInsets); bJavaHome.setToolTipText(res.getString("JavaHomeInfo")); lJavaType.setToolTipText(res.getString("JavaTypeInfo")); lJavaType.setText(res.getString("JavaType")); fJavaType.setPreferredSize(fJavaHome.getPreferredSize()); JLabel sectionLabel=new JLabel("Java"); sectionLabel.setForeground(titledBorder.getTitleColor()); JSeparator separator=new JSeparator(); this.add(sectionLabel,new GridBagConstraints(0,0,7,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,5,0,10),0,0)); this.add(separator,new GridBagConstraints(0,1,7,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(0,5,0,10),0,0)); this.add(lJavaHome,new GridBagConstraints(0,2,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,5,2,5),0,0)); this.add(fJavaHome,new GridBagConstraints(1,2,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(5,5,5,0),0,0)); this.add(okJavaHome,new GridBagConstraints(2,2,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(5,0,2,5),0,0)); this.add(bJavaHome,new GridBagConstraints(3,2,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(0,0,0,0),0,0)); this.add(lJavaType,new GridBagConstraints(4,2,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,5,2,5),0,0)); this.add(fJavaType,new GridBagConstraints(5,2,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(5,5,2,0),0,0)); lAdempiereHome.setToolTipText(res.getString("AdempiereHomeInfo")); lAdempiereHome.setText(res.getString("AdempiereHome")); fAdempiereHome.setText("."); okAdempiereHome.setEnabled(false); bAdempiereHome.setMargin(bInsets); bAdempiereHome.setToolTipText(res.getString("AdempiereHomeInfo")); lKeyStore.setText(res.getString("KeyStorePassword")); lKeyStore.setToolTipText(res.getString("KeyStorePasswordInfo")); fKeyStore.setText(""); okKeyStore.setEnabled(false); sectionLabel=new JLabel("Adempiere"); sectionLabel.setForeground(titledBorder.getTitleColor()); separator=new JSeparator(); this.add(sectionLabel,new GridBagConstraints(0,3,7,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,5,0,0),0,0)); this.add(separator,new GridBagConstraints(0,4,7,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(0,5,0,10),0,0)); this.add(lAdempiereHome,new GridBagConstraints(0,5,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,5,2,5),0,0)); this.add(fAdempiereHome,new GridBagConstraints(1,5,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(5,5,2,0),0,0)); this.add(okAdempiereHome,new GridBagConstraints(2,5,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(5,0,2,5),0,0)); this.add(bAdempiereHome,new GridBagConstraints(3,5,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(0,0,0,0),0,0)); this.add(lKeyStore,new GridBagConstraints(4,5,1,1,0.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.NONE,new Insets(0,0,0,0),0,0)); this.add(fKeyStore,new GridBagConstraints(5,5,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(5,5,2,0),0,0)); this.add(okKeyStore,new GridBagConstraints(6,5,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(5,5,2,5),0,0)); lAppsServer.setToolTipText(res.getString("AppsServerInfo")); lAppsServer.setText(res.getString("AppsServer")); lAppsServer.setFont(lAppsServer.getFont().deriveFont(Font.BOLD)); fAppsServer.setText("."); okAppsServer.setEnabled(false); lAppsType.setToolTipText(res.getString("AppsTypeInfo")); lAppsType.setText(res.getString("AppsType")); fAppsType.setPreferredSize(fAppsServer.getPreferredSize()); sectionLabel=new JLabel(res.getString("AppsServer")); sectionLabel.setForeground(titledBorder.getTitleColor()); separator=new JSeparator(); this.add(sectionLabel,new GridBagConstraints(0,6,6,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,5,0,0),0,0)); this.add(separator,new GridBagConstraints(0,7,7,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(0,5,0,10),0,0)); this.add(lAppsServer,new GridBagConstraints(0,8,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,5,2,5),0,0)); this.add(fAppsServer,new GridBagConstraints(1,8,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(5,5,2,0),0,0)); this.add(okAppsServer,new GridBagConstraints(2,8,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(5,0,2,5),0,0)); this.add(lAppsType,new GridBagConstraints(4,8,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,5,2,5),0,0)); this.add(fAppsType,new GridBagConstraints(5,8,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(5,5,2,0),0,0)); lDeployDir.setToolTipText(res.getString("DeployDirInfo")); lDeployDir.setText(res.getString("DeployDir")); fDeployDir.setText("."); okDeployDir.setEnabled(false); bDeployDir.setMargin(bInsets); bDeployDir.setToolTipText(res.getString("DeployDirInfo")); lJNPPort.setToolTipText(res.getString("JNPPortInfo")); lJNPPort.setText(res.getString("JNPPort")); fJNPPort.setText("."); okJNPPort.setEnabled(false); this.add(lDeployDir,new GridBagConstraints(0,9,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(2,5,2,5),0,0)); this.add(fDeployDir,new GridBagConstraints(1,9,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(2,5,2,0),0,0)); this.add(okDeployDir,new GridBagConstraints(2,9,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(2,0,2,5),0,0)); this.add(bDeployDir,new GridBagConstraints(3,9,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(0,0,0,0),0,0)); this.add(lJNPPort,new GridBagConstraints(4,9,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(2,5,2,5),0,0)); this.add(fJNPPort,new GridBagConstraints(5,9,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(2,5,2,0),0,0)); this.add(okJNPPort,new GridBagConstraints(6,9,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(2,0,2,5),0,0)); lWebPort.setToolTipText(res.getString("WebPortInfo")); lWebPort.setText(res.getString("WebPort")); fWebPort.setText("."); okWebPort.setEnabled(false); lSSLPort.setText("SSL"); fSSLPort.setText("."); okSSLPort.setEnabled(false); this.add(lWebPort,new GridBagConstraints(0,10,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(2,5,2,5),0,0)); this.add(fWebPort,new GridBagConstraints(1,10,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(2,5,2,0),0,0)); this.add(okWebPort,new GridBagConstraints(2,10,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(2,0,2,5),0,0)); this.add(lSSLPort,new GridBagConstraints(4,10,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(2,5,2,5),0,0)); this.add(fSSLPort,new GridBagConstraints(5,10,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(2,5,2,0),0,0)); this.add(okSSLPort,new GridBagConstraints(6,10,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(2,0,2,5),0,0)); lDatabaseServer.setToolTipText(res.getString("DatabaseServerInfo")); lDatabaseServer.setText(res.getString("DatabaseServer")); lDatabaseServer.setFont(lDatabaseServer.getFont().deriveFont(Font.BOLD)); okDatabaseServer.setEnabled(false); lDatabaseType.setToolTipText(res.getString("DatabaseTypeInfo")); lDatabaseType.setText(res.getString("DatabaseType")); fDatabaseType.setPreferredSize(fDatabaseServer.getPreferredSize()); sectionLabel=new JLabel(res.getString("DatabaseServer")); sectionLabel.setForeground(titledBorder.getTitleColor()); separator=new JSeparator(); this.add(sectionLabel,new GridBagConstraints(0,11,6,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,5,0,0),0,0)); this.add(separator,new GridBagConstraints(0,12,7,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(0,5,0,10),0,0)); this.add(lDatabaseServer,new GridBagConstraints(0,13,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,5,2,5),0,0)); this.add(fDatabaseServer,new GridBagConstraints(1,13,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(5,5,2,0),0,0)); this.add(okDatabaseServer,new GridBagConstraints(2,13,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(5,0,2,5),0,0)); this.add(lDatabaseType,new GridBagConstraints(4,13,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,5,2,5),0,0)); this.add(fDatabaseType,new GridBagConstraints(5,13,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(5,5,2,0),0,0)); lDatabaseName.setToolTipText(res.getString("DatabaseNameInfo")); lDatabaseName.setText(res.getString("DatabaseName")); fDatabaseName.setText("."); lDatabaseDiscovered.setToolTipText(res.getString("TNSNameInfo")); lDatabaseDiscovered.setText(res.getString("TNSName")); fDatabaseDiscovered.setEditable(true); fDatabaseDiscovered.setPreferredSize(fDatabaseName.getPreferredSize()); okDatabaseSQL.setEnabled(false); this.add(lDatabaseName,new GridBagConstraints(0,14,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(2,5,2,5),0,0)); this.add(fDatabaseName,new GridBagConstraints(1,14,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(2,5,2,0),0,0)); this.add(okDatabaseSQL,new GridBagConstraints(2,14,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(2,0,2,5),0,0)); this.add(lDatabaseDiscovered,new GridBagConstraints(4,14,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(2,0,2,5),0,0)); this.add(fDatabaseDiscovered,new GridBagConstraints(5,14,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(2,5,2,0),0,0)); lDatabasePort.setToolTipText(res.getString("DatabasePortInfo")); lDatabasePort.setText(res.getString("DatabasePort")); fDatabasePort.setText("."); lSystemPassword.setToolTipText(res.getString("SystemPasswordInfo")); lSystemPassword.setText(res.getString("SystemPassword")); fSystemPassword.setText("."); okDatabaseSystem.setEnabled(false); this.add(lDatabasePort,new GridBagConstraints(0,15,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(2,5,2,5),0,0)); this.add(fDatabasePort,new GridBagConstraints(1,15,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(2,5,2,0),0,0)); this.add(lSystemPassword,new GridBagConstraints(4,15,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(2,5,2,5),0,0)); this.add(fSystemPassword,new GridBagConstraints(5,15,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(2,5,2,0),0,0)); this.add(okDatabaseSystem,new GridBagConstraints(6,15,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(2,0,2,5),0,0)); lDatabaseUser.setToolTipText(res.getString("DatabaseUserInfo")); lDatabaseUser.setText(res.getString("DatabaseUser")); fDatabaseUser.setText("."); lDatabasePassword.setToolTipText(res.getString("DatabasePasswordInfo")); lDatabasePassword.setText(res.getString("DatabasePassword")); fDatabasePassword.setText("."); okDatabaseUser.setEnabled(false); this.add(lDatabaseUser,new GridBagConstraints(0,16,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(2,5,2,5),0,0)); this.add(fDatabaseUser,new GridBagConstraints(1,16,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(2,5,2,0),0,0)); this.add(lDatabasePassword,new GridBagConstraints(4,16,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(2,5,2,5),0,0)); this.add(fDatabasePassword,new GridBagConstraints(5,16,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(2,5,2,0),0,0)); this.add(okDatabaseUser,new GridBagConstraints(6,16,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(2,0,2,5),0,0)); sectionLabel=new JLabel(res.getString("MailServer")); sectionLabel.setForeground(titledBorder.getTitleColor()); separator=new JSeparator(); this.add(sectionLabel,new GridBagConstraints(0,17,6,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,5,0,0),0,0)); this.add(separator,new GridBagConstraints(0,18,7,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(0,5,0,10),0,0)); lMailServer.setToolTipText(res.getString("MailServerInfo")); lMailServer.setText(res.getString("MailServer")); lMailServer.setFont(lMailServer.getFont().deriveFont(Font.BOLD)); fMailServer.setText("."); lAdminEMail.setToolTipText(res.getString("AdminEMailInfo")); lAdminEMail.setText(res.getString("AdminEMail")); fAdminEMail.setText("."); okMailServer.setEnabled(false); this.add(lMailServer,new GridBagConstraints(0,19,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,5,2,5),0,0)); this.add(fMailServer,new GridBagConstraints(1,19,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(5,5,2,0),0,0)); this.add(okMailServer,new GridBagConstraints(2,19,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(5,0,2,5),0,0)); this.add(lAdminEMail,new GridBagConstraints(4,19,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,5,2,5),0,0)); this.add(fAdminEMail,new GridBagConstraints(5,19,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(5,5,2,0),0,0)); lMailUser.setToolTipText(res.getString("MailUserInfo")); lMailUser.setText(res.getString("MailUser")); fMailUser.setText("."); lMailPassword.setToolTipText(res.getString("MailPasswordInfo")); lMailPassword.setText(res.getString("MailPassword")); fMailPassword.setText("."); okMailUser.setEnabled(false); this.add(lMailUser,new GridBagConstraints(0,20,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(2,5,2,5),0,0)); this.add(fMailUser,new GridBagConstraints(1,20,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.BOTH,new Insets(2,5,2,0),0,0)); this.add(lMailPassword,new GridBagConstraints(4,20,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(2,5,2,5),0,0)); this.add(fMailPassword,new GridBagConstraints(5,20,1,1,0.5,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(2,5,2,0),0,0)); this.add(okMailUser,new GridBagConstraints(6,20,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(2,0,2,5),0,0)); CPanel filler=new CPanel(); filler.setOpaque(false); filler.setBorder(null); this.add(filler,new GridBagConstraints(0,21,1,1,0.0,1.0,GridBagConstraints.WEST,GridBagConstraints.VERTICAL,new Insets(0,0,0,0),0,0)); bTest.setToolTipText(res.getString("TestInfo")); bTest.setText(res.getString("Test")); bSave.setToolTipText(res.getString("SaveInfo")); bSave.setText(res.getString("Save")); bHelp.setToolTipText(res.getString("HelpInfo")); this.add(bTest,new GridBagConstraints(0,22,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,5,10,5),0,0)); this.add(bHelp,new GridBagConstraints(3,22,2,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,5,10,5),0,0)); this.add(bSave,new GridBagConstraints(5,22,2,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(15,5,10,5),0,0)); bAdempiereHome.addActionListener(this); bJavaHome.addActionListener(this); bDeployDir.addActionListener(this); fJavaType.addActionListener(this); fAppsType.addActionListener(this); fDatabaseType.addActionListener(this); fDatabaseDiscovered.addActionListener(this); bHelp.addActionListener(this); bTest.addActionListener(this); bSave.addActionListener(this); }
Static Layout Init
public AMM(){ this(DEFAULT_REGULARIZER); }
Creates a new batch AMM learner
public static List<ServiceDetailDescriptor> findLayerAPI(LayerDetailDescriptor descriptor){ return new APIFinder().findLayerAPI(descriptor); }
Return list of Descriptor Detail for All service interfaces which are visible for the layer
@SuppressWarnings("unchecked") public static Class<? extends IndicatorLayout> createIndicatorLayoutClazz(String clazzName){ Class<? extends IndicatorLayout> clazz=null; if (clazzName == null) { clazz=DefaultIndicatorLayoutFactory.createIndicatorLayoutClazz(clazzName); return clazz; } try { clazz=(Class<? extends IndicatorLayout>)Class.forName(clazzName); } catch ( ClassNotFoundException e) { Log.e(LOG_TAG,"The indicator layout you have chosen class has not been found.",e); clazz=DefaultIndicatorLayoutFactory.createIndicatorLayoutClazz(clazzName); } return clazz; }
Create the class token matched by <b>class name</b>
private int clamp(final int c){ if (c < 0) { return 0; } if (c > 255) { return 255; } return c; }
Clamp a number between 0 and 255
@Override public void paintComponent(Graphics gx){ super.paintComponent(gx); if (m_plotInstances != null && m_plotInstances.numInstances() > 0 && m_plotInstances.numAttributes() > 0) { if (m_plotCompanion != null) { m_plotCompanion.prePlot(gx); } m_JRand=new Random(m_JitterVal); paintAxis(gx); if (m_axisChanged || m_plotResize) { int x_range=m_XaxisEnd - m_XaxisStart; int y_range=m_YaxisEnd - m_YaxisStart; if (x_range < 10) { x_range=10; } if (y_range < 10) { y_range=10; } m_drawnPoints=new int[x_range + 1][y_range + 1]; fillLookup(); m_plotResize=false; m_axisChanged=false; } paintData(gx); } }
Renders this component
@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:35:02.926 -0500",hash_original_method="06F5CBF51BDA69D9C47BB01131F079C4",hash_generated_method="2B96438F6D4AB5642FC14F03C275F180") public final XmlResourceParser openXmlResourceParser(int cookie,String fileName) throws IOException { XmlBlock block=openXmlBlockAsset(cookie,fileName); XmlResourceParser rp=block.newParser(); block.close(); return rp; }
Retrieve a parser for a compiled XML file.
public static Node toXML(Object value) throws PageException { if (value instanceof Node) return XMLCaster.toXMLStruct((Node)value,false); if (value instanceof ObjectWrap) { return toXML(((ObjectWrap)value).getEmbededObject()); } try { return XMLCaster.toXMLStruct(XMLUtil.parse(XMLUtil.toInputSource(null,value),null,false),false); } catch ( Exception outer) { throw Caster.toPageException(outer); } }
cast Object to a XML Node
protected RequestTask(KMLModelPlacemarkImpl placemark,String address){ if (placemark == null) { String message=Logging.getMessage("nullValue.ObjectIsNull"); Logging.logger().severe(message); throw new IllegalArgumentException(message); } if (address == null) { String message=Logging.getMessage("nullValue.PathIsNull"); Logging.logger().severe(message); throw new IllegalArgumentException(message); } this.placemark=placemark; this.address=address; }
Construct a request task for a specified network link resource.
public static Scs cs_compress(Scs T){ int m, n, nz, p, k, Cp[], Ci[], w[], Ti[], Tj[]; float Cx[], Tx[]; Scs C; if (!Scs_util.CS_TRIPLET(T)) return (null); m=T.m; n=T.n; Ti=T.i; Tj=T.p; Tx=T.x; nz=T.nz; C=Scs_util.cs_spalloc(m,n,nz,Tx != null,false); w=new int[n]; Cp=C.p; Ci=C.i; Cx=C.x; for (k=0; k < nz; k++) w[Tj[k]]++; Scs_cumsum.cs_cumsum(Cp,w,n); for (k=0; k < nz; k++) { Ci[p=w[Tj[k]]++]=Ti[k]; if (Cx != null) Cx[p]=Tx[k]; } return C; }
C = compressed-column form of a triplet matrix T. The columns of C are not sorted, and duplicate entries may be present in C.
@Override public boolean equals(Object obj){ if (!(obj instanceof TransitRouteStopImpl)) { return false; } TransitRouteStopImpl other=(TransitRouteStopImpl)obj; if (this.stop == null) { if (other.getStopFacility() != null) { return false; } } else { if (!stop.equals(other.getStopFacility())) { return false; } } if (this.departureOffset != other.getDepartureOffset()) { return false; } if (this.arrivalOffset != other.getArrivalOffset()) { return false; } if (this.awaitDepartureTime != other.isAwaitDepartureTime()) { return false; } return true; }
TransitRouteStops are typical Value Objects, so we consider two stops equal if they are equal field-wise.
public CActionFreezeView(final ZyGraph graph){ m_graph=Preconditions.checkNotNull(graph,"IE02818: graph argument can not be null"); putValue(Action.SHORT_DESCRIPTION,"Freeze view"); putValue(SMALL_ICON,new ImageIcon(CMain.class.getResource("data/viewlock_up.jpg"))); }
Creates a new action object.
public boolean match(SuperMethodInvocation node,Object other){ if (!(other instanceof SuperMethodInvocation)) { return false; } SuperMethodInvocation o=(SuperMethodInvocation)other; if (node.getAST().apiLevel >= AST.JLS3) { if (!safeSubtreeListMatch(node.typeArguments(),o.typeArguments())) { return false; } } return (safeSubtreeMatch(node.getQualifier(),o.getQualifier()) && safeSubtreeMatch(node.getName(),o.getName()) && safeSubtreeListMatch(node.arguments(),o.arguments())); }
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 testDEFAULTmgfSpec(){ assertTrue(MGF1ParameterSpec.SHA1.equals(PSSParameterSpec.DEFAULT.getMGFParameters())); }
Test for <code>DEFAULT</code> field<br> Assertion: default algorithm parameters for mask generation function are <code>MGF1ParameterSpec.SHA1</code>
protected RowValue readSqlData() throws SQLException, IOException { final RowDescriptor rowDescriptor=getFieldDescriptor(); final RowValue rowValue=rowDescriptor.createDefaultFieldValues(); final BlrCalculator blrCalculator=getDatabase().getBlrCalculator(); final XdrInputStream xdrIn=getXdrIn(); for (int idx=0; idx < rowDescriptor.getCount(); idx++) { final FieldDescriptor fieldDescriptor=rowDescriptor.getFieldDescriptor(idx); final FieldValue fieldValue=rowValue.getFieldValue(idx); final int len=blrCalculator.calculateIoLength(fieldDescriptor); byte[] buffer=readColumnData(xdrIn,len); if (xdrIn.readInt() == NULL_INDICATOR_NULL) buffer=null; fieldValue.setFieldData(buffer); } return rowValue; }
Reads a single row from the database.
void appendArrayType(StringBuilder sb,Class[] objs){ if (objs.length > 0) { appendArrayType(sb,objs[0]); for (int i=1; i < objs.length; i++) { sb.append(','); appendArrayType(sb,objs[i]); } } }
Appends names of the specified array classes to the buffer. The array elements may represent a simple type, a reference type or an array type. Output format: java.lang.Object[], java.io.File, void
public static <T>HashSet<T> linkedHashSet(){ return new LinkedHashSet<T>(); }
Create a new LinkedHashSet.
public TerminalColors(){ reset(); }
Create a new instance with default colors from the theme.
public XObject operate(XObject left,XObject right) throws javax.xml.transform.TransformerException { return left.equals(right) ? XBoolean.S_TRUE : XBoolean.S_FALSE; }
Apply the operation to two operands, and return the result.
public boolean isShowCustomTextGridY(){ return mShowCustomTextGridY; }
Returns if the Y axis custom text grid should be visible.
public VegetableGrower(final RPObject object,final String name,final int maxRipeness,final int growthRate){ super(object,"items/grower/" + name + "_grower","items/grower/" + name + " grower","Pick",maxRipeness,growthRate); vegetableName=name; setDescription("It looks like there's " + Grammar.a_noun(name) + " sprouting here."); update(); }
Create a VegetableGrower from an RPObject. Used when restoring growers from the DB.
public Writer buildDeletionWriter(AbstractSession session,Writer writer) throws ValidationException { try { writer.write("DROP TABLE " + getFullName() + session.getPlatform().getDropCascadeString()); } catch ( IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
INTERNAL: Return the drop table statement.
@Pure public String annotationClassToAnnotationInterface(){ if (VM.VerifyAssertions) { boolean isClassAnnotation=val[0] == 'L' && val[val.length - 1] == ';'; VM._assert(val.length > 0); if (!isClassAnnotation) { String msg=toString(); VM._assert(isClassAnnotation,msg); } } return StringUtilities.asciiBytesToString(val,1,val.length - 4).replace('/','.'); }
Creates a class name from a type name. For example Lfoo.bar$$; becomes the string foo.bar
public static void addStartStopNodesTo(BlockGraph graph){ ADDSTART: { List heads=graph.getHeads(); if (heads.size() == 0) break ADDSTART; if ((heads.size() == 1) && (heads.get(0) instanceof DummyBlock)) break ADDSTART; List blocks=graph.getBlocks(); DummyBlock head=new DummyBlock(graph.getBody(),0); head.makeHeadBlock(heads); graph.mHeads=new SingletonList(head); { Iterator blocksIt=blocks.iterator(); while (blocksIt.hasNext()) { Block block=(Block)blocksIt.next(); block.setIndexInMethod(block.getIndexInMethod() + 1); } } List newBlocks=new ArrayList(); newBlocks.add(head); newBlocks.addAll(blocks); graph.mBlocks=newBlocks; } ADDSTOP: { List tails=graph.getTails(); if (tails.size() == 0) break ADDSTOP; if ((tails.size() == 1) && (tails.get(0) instanceof DummyBlock)) break ADDSTOP; List blocks=graph.getBlocks(); DummyBlock tail=new DummyBlock(graph.getBody(),blocks.size()); tail.makeTailBlock(tails); graph.mTails=new SingletonList(tail); blocks.add(tail); } }
Transforms a multi-headed and/or multi-tailed BlockGraph to a single-headed singled-tailed BlockGraph by inserting a dummy start and stop nodes.
public static void invalidateDrawerMenuHeader(){ MainActivity instance=MainActivity.getInstance(); if (instance != null && instance.drawerFragment != null) { instance.drawerFragment.invalidateHeader(); } else { Timber.e(MSG_MAIN_ACTIVITY_INSTANCE_IS_NULL); } }
Method checks if MainActivity instance exist. If so, then drawer menu header will be invalidated.
private AspectItem(ItemStack stack,IItemStackMatcher matcher){ this.original=stack; this.matcher=matcher; }
Creates a new aspect item
public <E extends Layout,AE extends Array1D<E>>Class<AE> genArray1DImpl(final Class<E> elementInterfaceClass,final Class<AE> userDefinedArrayClass){ try { Class<AE> implCls=implClassloader.load1DClass(elementInterfaceClass,userDefinedArrayClass); unsafe.ensureClassInitialized(implCls); Field f=implCls.getDeclaredField("unsafe"); unsafe.putObject(unsafe.staticFieldBase(f),unsafe.staticFieldOffset(f),unsafe); return implCls; } catch ( Exception e) { e.printStackTrace(); } return null; }
Create a 1D array class from user defined Layout
@Override public void eUnset(int featureID){ switch (featureID) { case UmplePackage.TRACE_DIRECTIVE___TRACE_ITEM_1: getTraceItem_1().clear(); return; case UmplePackage.TRACE_DIRECTIVE___ANONYMOUS_TRACE_DIRECTIVE_11: getAnonymous_traceDirective_1_1().clear(); return; } super.eUnset(featureID); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void addMutualEdge(Object from,Object to){ if (!super.containsNode(from)) super.addNode(from); if (!super.containsNode(to)) super.addNode(to); super.addEdge(from,to); super.addEdge(to,from); }
Add mutual edge to the graph. It should be optimized in the future.
@Override public void stopMonitoring(StorageSystem storageDevice) throws StorageMonitorException { s_logger.debug("Disconnecting storage from event monitoring."); if (storageDevice == null) { throw new StorageMonitorException("Passed storage device is null"); } s_logger.info("Attempting to disconnect storage provider {} from event monitoring.",storageDevice.getSmisProviderIP()); if (_cimConnectionManager == null) { throw new StorageMonitorException("CIM adapter connection manager reference is null."); } try { _cimConnectionManager.removeConnection(storageDevice.getSmisProviderIP(),storageDevice.getSmisPortNumber()); } catch ( ConnectionManagerException cme) { throw new StorageMonitorException(MessageFormatter.format("Failed attempting to remove the connection to storage provider {}",storageDevice.getSmisProviderIP()).getMessage(),cme); } s_logger.info("Connection to storage provider {} was removed.",storageDevice.getSmisProviderIP()); }
Stops event monitoring for the passed storage device by removing the connection to the SMI-S provider for storage device.
public final char yycharat(int pos){ return zzBufferArray != null ? zzBufferArray[zzStartRead + pos] : zzBuffer.charAt(zzStartRead + pos); }
Returns the character at position <tt>pos</tt> from the matched text. It is equivalent to yytext().charAt(pos), but faster
public T caseReturnPrimitiveType(ReturnPrimitiveType object){ return null; }
Returns the result of interpreting the object as an instance of '<em>Return Primitive Type</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
public static void enableFullscreenFlags(Resources resources,Context context,int resControlContainerHeight){ ContentApplication.initCommandLine(context); CommandLine commandLine=CommandLine.getInstance(); if (commandLine.hasSwitch(ChromeSwitches.DISABLE_FULLSCREEN)) return; TypedValue threshold=new TypedValue(); resources.getValue(R.dimen.top_controls_show_threshold,threshold,true); commandLine.appendSwitchWithValue(ContentSwitches.TOP_CONTROLS_SHOW_THRESHOLD,threshold.coerceToString().toString()); resources.getValue(R.dimen.top_controls_hide_threshold,threshold,true); commandLine.appendSwitchWithValue(ContentSwitches.TOP_CONTROLS_HIDE_THRESHOLD,threshold.coerceToString().toString()); }
Enable fullscreen related startup flags.
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 boolean remove(K key){ Integer value=refSet.get(key); if (value == null) { return true; } if (value == 1) { refSet.remove(key); numValues--; return true; } value--; refSet.put(key,value); numValues--; return false; }
Removed a key to the set. Removes the key if the reference count is one. Decreases the reference count by one if the reference count is more then one. Return true if the reference count was one and the key thus removed, or false if key is stays in set.
@Override public void g(float sideMot,float forMot){ if (!CustomEntities.customEntities.contains(this)) { super.g(sideMot,forMot); return; } if (this.passenger != null && this.passenger instanceof EntityHuman && CustomEntities.customEntities.contains(this)) { this.lastYaw=this.yaw=this.passenger.yaw; this.pitch=this.passenger.pitch * 0.5F; this.setYawPitch(this.yaw,this.pitch); this.aI=this.aG=this.yaw; sideMot=((EntityLiving)this.passenger).aZ * 0.5F; forMot=((EntityLiving)this.passenger).ba; Field jump=null; try { jump=EntityLiving.class.getDeclaredField("aY"); } catch ( NoSuchFieldException|SecurityException e1) { e1.printStackTrace(); } jump.setAccessible(true); if (jump != null && BlockUtils.isOnGround(this.getBukkitEntity())) { try { if (jump.getBoolean(this.passenger)) { double jumpHeight=0.3D; this.motY=jumpHeight; } } catch ( IllegalAccessException e) { e.printStackTrace(); } } this.S=1.0F; this.aK=this.yaw; if (!this.world.isClientSide) { this.k(0.2f); if (bM()) { if (V()) { double d0=locY; float f3=0.8F; float f4=0.02F; float f2=EnchantmentManager.b(this); if (f2 > 3.0F) { f2=3.0F; } if (f2 > 0.0F) { f3+=(0.5460001F - f3) * f2 / 3.0F; f4+=(bI() * 1.0F - f4) * f2 / 3.0F; } a(sideMot,forMot,f4); move(motX,motY,motZ); motX*=f3; motY*=0.800000011920929D; motZ*=f3; motY-=0.02D; if ((positionChanged) && (c(motX,motY + 0.6000000238418579D - locY + d0,motZ))) motY=0.300000011920929D; } else if (ab()) { double d0=locY; a(sideMot,forMot,0.02F); move(motX,motY,motZ); motX*=0.5D; motY*=0.5D; motZ*=0.5D; motY-=0.02D; if ((positionChanged) && (c(motX,motY + 0.6000000238418579D - locY + d0,motZ))) motY=0.300000011920929D; } else { float f5=world.getType(new BlockPosition(MathHelper.floor(locX),MathHelper.floor(getBoundingBox().b) - 1,MathHelper.floor(locZ))).getBlock().frictionFactor * 0.91F; float f6=0.1627714F / (f5 * f5 * f5); float f3=bI() * f6; a(sideMot,forMot,f3); f5=world.getType(new BlockPosition(MathHelper.floor(locX),MathHelper.floor(getBoundingBox().b) - 1,MathHelper.floor(locZ))).getBlock().frictionFactor * 0.91F; if (k_()) { float f4=0.15F; motX=MathHelper.a(motX,-f4,f4); motZ=MathHelper.a(motZ,-f4,f4); fallDistance=0.0F; if (motY < -0.15D) { motY=-0.15D; } if (motY < 0.0D) { motY=0.0D; } } move(motX,motY,motZ); if ((positionChanged) && (k_())) { motY=0.2D; } if ((world.isClientSide) && ((!world.isLoaded(new BlockPosition((int)locX,0,(int)locZ))) || (!world.getChunkAtWorldCoords(new BlockPosition((int)locX,0,(int)locZ)).o()))) { if (locY > 0.0D) motY=-0.1D; else motY=0.0D; } else { motY+=0D; } motY*=0.9800000190734863D; motX*=f5; motZ*=f5; } } ay=az; double d0=locX - lastX; double d1=locZ - lastZ; float f2=MathHelper.sqrt(d0 * d0 + d1 * d1) * 4.0F; if (f2 > 1.0F) { f2=1.0F; } az+=(f2 - az) * 0.4F; aA+=az; super.g(sideMot,forMot); } this.ay=this.az; double d0=this.locX - this.lastX; double d1=this.locZ - this.lastZ; float f4=MathHelper.sqrt(d0 * d0 + d1 * d1) * 4.0F; if (f4 > 1.0F) { f4=1.0F; } this.az+=(f4 - this.az) * 0.4F; this.aA+=this.az; } else { this.S=0.5F; this.aK=0.02F; super.g(sideMot,forMot); } }
WASD Control.
private byte[] packRules(){ byte[] rules=new byte[6]; rules[0]=(byte)startDay; rules[1]=(byte)startDayOfWeek; rules[2]=(byte)endDay; rules[3]=(byte)endDayOfWeek; rules[4]=(byte)startTimeMode; rules[5]=(byte)endTimeMode; return rules; }
Pack the start and end rules into an array of bytes. Only pack data which is not preserved by makeRulesCompatible.
protected byte[] computeSHAdigest(final byte[] value){ try { return MessageDigest.getInstance("SHA").digest(value); } catch ( Exception e) { throw new UnsupportedOperationException(e.toString()); } }
Returns the SHA-1 message digest of the given value.
@NotNull static GitNewChangesCollector collect(@NotNull Project project,@NotNull Git git,@NotNull ChangeListManager changeListManager,@NotNull ProjectLevelVcsManager vcsManager,@NotNull AbstractVcs vcs,@NotNull VcsDirtyScope dirtyScope,@NotNull VirtualFile vcsRoot) throws VcsException { return new GitNewChangesCollector(project,git,changeListManager,vcsManager,vcs,dirtyScope,vcsRoot); }
Collects the changes from git command line and returns the instance of GitNewChangesCollector from which these changes can be retrieved. This may be lengthy.
public boolean addAll(Collection<? extends E> c){ Object[] a=c.toArray(); int numNew=a.length; ensureCapacity(size + numNew); System.arraycopy(a,0,elementData,size,numNew); size+=numNew; return numNew != 0; }
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's Iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this list, and this list is nonempty.)
private void unlinkCancelledWaiters(){ Node t=firstWaiter; Node trail=null; while (t != null) { Node next=t.nextWaiter; if (t.waitStatus != Node.CONDITION) { t.nextWaiter=null; if (trail == null) firstWaiter=next; else trail.nextWaiter=next; if (next == null) lastWaiter=trail; } else trail=t; t=next; } }
Unlinks cancelled waiter nodes from condition queue. Called only while holding lock. This is called when cancellation occurred during condition wait, and upon insertion of a new waiter when lastWaiter is seen to have been cancelled. This method is needed to avoid garbage retention in the absence of signals. So even though it may require a full traversal, it comes into play only when timeouts or cancellations occur in the absence of signals. It traverses all nodes rather than stopping at a particular target to unlink all pointers to garbage nodes without requiring many re-traversals during cancellation storms.
public static IndexType createScan(){ IndexType type=new IndexType(); type.scan=true; return type; }
Create a scan pseudo-index.
public Iterator<String> iterateSerializers(){ return serializers.iterator(); }
Iterate over view serializers
protected void generateProxyExposedMethodSignature(SourcePrinter w,NameFactory nameFactory,JMethod method){ JType returnType=method.getReturnType().getErasedType(); w.print("public "); w.print(returnType.getQualifiedSourceName()); w.print(" "); w.print(method.getName() + EXPOSED_METHOD_SUFFIX + "("); generateMethodParameters(w,nameFactory,method); w.print(")"); generateMethodTrhowsClause(w,method); w.println(); }
Generates the signature for the exposed method
public static void register(){ GameRegistry.registerItem(PartTransmitter,"PartTransmitter"); GameRegistry.registerItem(ElectricBow,"ElectricBow"); GameRegistry.registerItem(Dust,"Dust"); GameRegistry.registerItem(Ingot,"Ingot"); GameRegistry.registerItem(EnergyTablet,"EnergyTablet"); GameRegistry.registerItem(SpeedUpgrade,"SpeedUpgrade"); GameRegistry.registerItem(EnergyUpgrade,"EnergyUpgrade"); GameRegistry.registerItem(FilterUpgrade,"FilterUpgrade"); GameRegistry.registerItem(GasUpgrade,"GasUpgrade"); GameRegistry.registerItem(Robit,"Robit"); GameRegistry.registerItem(AtomicDisassembler,"AtomicDisassembler"); GameRegistry.registerItem(EnrichedAlloy,"EnrichedAlloy"); GameRegistry.registerItem(ReinforcedAlloy,"ReinforcedAlloy"); GameRegistry.registerItem(AtomicAlloy,"AtomicAlloy"); GameRegistry.registerItem(ItemProxy,"ItemProxy"); GameRegistry.registerItem(ControlCircuit,"ControlCircuit"); GameRegistry.registerItem(EnrichedIron,"EnrichedIron"); GameRegistry.registerItem(CompressedCarbon,"CompressedCarbon"); GameRegistry.registerItem(CompressedRedstone,"CompressedRedstone"); GameRegistry.registerItem(CompressedDiamond,"CompressedDiamond"); GameRegistry.registerItem(CompressedObsidian,"CompressedObsidian"); GameRegistry.registerItem(PortableTeleporter,"PortableTeleporter"); GameRegistry.registerItem(TeleportationCore,"TeleportationCore"); GameRegistry.registerItem(Clump,"Clump"); GameRegistry.registerItem(DirtyDust,"DirtyDust"); GameRegistry.registerItem(Configurator,"Configurator"); GameRegistry.registerItem(NetworkReader,"NetworkReader"); GameRegistry.registerItem(WalkieTalkie,"WalkieTalkie"); GameRegistry.registerItem(Jetpack,"Jetpack"); GameRegistry.registerItem(Dictionary,"Dictionary"); GameRegistry.registerItem(GasMask,"GasMask"); GameRegistry.registerItem(ScubaTank,"ScubaTank"); GameRegistry.registerItem(Balloon,"Balloon"); GameRegistry.registerItem(Shard,"Shard"); GameRegistry.registerItem(ElectrolyticCore,"ElectrolyticCore"); GameRegistry.registerItem(Sawdust,"Sawdust"); GameRegistry.registerItem(Salt,"Salt"); GameRegistry.registerItem(BrineBucket,"BrineBucket"); GameRegistry.registerItem(LithiumBucket,"LithiumBucket"); GameRegistry.registerItem(Crystal,"Crystal"); GameRegistry.registerItem(FreeRunners,"FreeRunners"); GameRegistry.registerItem(ArmoredJetpack,"ArmoredJetpack"); GameRegistry.registerItem(FilterCard,"FilterCard"); GameRegistry.registerItem(SeismicReader,"SeismicReader"); GameRegistry.registerItem(Substrate,"Substrate"); GameRegistry.registerItem(Polyethene,"Polyethene"); GameRegistry.registerItem(BioFuel,"BioFuel"); GameRegistry.registerItem(GlowPanel,"GlowPanel"); GameRegistry.registerItem(Flamethrower,"Flamethrower"); GameRegistry.registerItem(GaugeDropper,"GaugeDropper"); GameRegistry.registerItem(FactoryInstaller,"FactoryInstaller"); GameRegistry.registerItem(OtherDust,"OtherDust"); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid("brine"),new ItemStack(BrineBucket),FluidContainerRegistry.EMPTY_BUCKET); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid("lithium"),new ItemStack(LithiumBucket),FluidContainerRegistry.EMPTY_BUCKET); MinecraftForge.EVENT_BUS.register(GasMask); MinecraftForge.EVENT_BUS.register(FreeRunners); }
Adds and registers all items.
public static ArrayList<String> matches(String text){ return matches(text,ALL); }
It finds urls inside the text and return the matched ones
public static void showPicture(final Activity activity,Uri uri){ Intent intent=new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setDataAndType(uri,"image/*"); activity.startActivity(intent); }
Shows a picture
public static double[][] directProduct(double[][] ma,double[][] mb){ int arow=ma.length; int brow=mb.length; int acol=ma[0].length; int bcol=mb[0].length; double[][] product=new double[arow * brow][acol * bcol]; for (int i1=0; i1 < arow; i1++) { for (int j1=0; j1 < acol; j1++) { for (int i2=0; i2 < brow; i2++) { for (int j2=0; j2 < bcol; j2++) { int i=i1 * brow + i2; int j=j1 * bcol + j2; product[i][j]=ma[i1][j1] * mb[i2][j2]; } } } } return product; }
Computes the direct (Kronecker) outerProduct.
public static boolean shouldRun(String entry){ return Cron.shouldRun(entry,new Date()); }
Indicates if a CRON entry should run at the current moment in time.
public int deleteIds(DatabaseConnection databaseConnection,Collection<ID> ids,ObjectCache objectCache) throws SQLException { return MappedDeleteCollection.deleteIds(databaseType,tableInfo,databaseConnection,ids,objectCache); }
Delete a collection of objects from the database.
public CheckedCollection(Collection<E> c,Class<E> type){ if (c == null || type == null) { throw new NullPointerException(); } this.c=c; this.type=type; }
Constructs a dynamically typesafe view of the specified collection.
@Override public boolean draw(Canvas canvas,RectF bounds){ if (super.draw(canvas,bounds)) { return true; } drawArc(canvas); drawArcEdgeDetail(canvas); return true; }
Draw this pie chart in the current position calculated by the ValueAnimator.
public void createTransitSchedule(String transitRouteMode,boolean isBlocking,boolean awaitDeparture,double scheduleTravelTime_sec,double stopTime_sec){ Map<Id<TransitRoute>,List<Id<Link>>> routeID2linkIDs=getIDs(this.network,transitRouteMode); Map<Id<TransitRoute>,List<TransitStopFacility>> routeId2transitStopFacilities=getStopLinkIDs(this.network,routeID2linkIDs,isBlocking); Map<Id<TransitRoute>,NetworkRoute> routeId2networkRoute=getRouteId2NetworkRoute(routeID2linkIDs); Map<Id<TransitRoute>,List<TransitRouteStop>> routeId2TransitRouteStops=getRouteId2TransitRouteStops(stopTime_sec,scheduleTravelTime_sec,awaitDeparture,network,routeId2transitStopFacilities); setRouteId2TransitRoute(transitRouteMode,routeId2networkRoute,routeId2TransitRouteStops); setTransitLine(this.routeId2transitRoute); int lastStop=this.routeId2transitRoute.get(routeId1).getStops().size() - 1; this.routeTravelTime=this.routeId2transitRoute.get(routeId1).getStops().get(lastStop).getArrivalOffset(); log.info("RouteTravelTime: " + Time.writeTime(routeTravelTime,Time.TIMEFORMAT_HHMMSS)); }
Creates the transit schedule without departures. Creates a transit line for a simple corridor network. The transitRouteMode indicates on which link a transit stop has to be added. The schedule speed and scheduled stop time are used for calculating arrival and departure offsets based on the length of the corridor links.
public static int endsWithOneIgnoreCase(String src,String[] dest){ for (int i=0; i < dest.length; i++) { String m=dest[i]; if (m == null) { continue; } if (endsWithIgnoreCase(src,m)) { return i; } } return -1; }
Checks if string ends with at least one string from the provided array. If at least one string is matched, it returns its index. Otherwise, <code>-1</code> is returned.
public final void removeCallbacks(Runnable r){ final WeakRunnable runnable=mRunnables.remove(r); if (runnable != null) { mExec.removeCallbacks(runnable); } }
Remove any pending posts of Runnable r that are in the message queue.
public void beginAccept2(WebRequest theRequest){ theRequest.addHeader("Accept","text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c"); }
quality test - "text/x-dvi" wins