code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public double pop(){
int numObjs=this.numObjs;
if (numObjs <= 0) return 0;
double ret=objs[--numObjs];
this.numObjs=numObjs;
return ret;
}
| Returns 0 if the DoubleBag is empty, else removes and returns the topmost double. |
public int onDelete(HeaderSet request,HeaderSet reply){
return ResponseCodes.OBEX_HTTP_NOT_IMPLEMENTED;
}
| Called when a DELETE request is received. <P> If this method is not implemented by the class that extends this class, <code>onDelete()</code> will always return an <code>OBEX_HTTP_NOT_IMPLEMENTED</code> response code. <P> The headers received in the request can be retrieved from the <code>request</code> argument. The h... |
public boolean isDestroyed(){
return getState().isDestroyed();
}
| Returns true if the state is closed |
protected void clearEvents(){
}
| This method resets the incoming events (time events included). |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:27:54.186 -0500",hash_original_method="E237E117068718AE5F81C4213860014E",hash_generated_method="EC8549F6CD04C333D2B4BB4092FBBE60") public ServiceState(Parcel in){
mState=in.readInt();
mRoaming=in.readInt() != 0;
mOperatorAlphaLon... | Construct a ServiceState object from the given parcel. |
@Override public InvitationObject copy(){
return new InvitationObject(this);
}
| This method was generated by MyBatis Generator. This method corresponds to the database table invitation |
public static Object sum(Object[] self){
return sum(toList(self),null,true);
}
| Sums the items in an array. This is equivalent to invoking the "plus" method on all items in the array. |
public double value(int attIndex){
return m_AttValues[attIndex];
}
| Returns an instance's attribute value in internal format. |
public int reset(String tableName){
return reset(tableName,0);
}
| Reset registered Cache |
public static boolean writeFile(File file,InputStream is){
return writeFile(file,is,false);
}
| Write file |
public PermissionRequestBuilder(final String requestUrl,final IOneDriveClient client,final List<Option> options){
super(requestUrl,client,options);
}
| The request builder for the Permission |
public EmptyRegionFunctionException(String msg,Throwable cause){
super(msg,cause);
}
| Construct an instance of EmtpyRegionFunctionException |
@Override public void run(){
amIActive=true;
String inputHeader=null;
String streamsHeader="";
String outputHeader=null;
int row, col, x, y;
int progress=0;
double myPointer, neighbourPointer;
int i;
int[] dX=new int[]{1,1,1,0,-1,-1,-1,0};
int[] dY=new int[]{-1,0,1,1,1,0,-1,-1};
double[] inflowing... | Used to execute this plugin tool. |
public void addComponent(Component cmp){
contentPane.addComponent(cmp);
}
| Adds Component to the Form's Content Pane |
public static Map<Short,String> generateMapOfValueNameShort(Class<?> clazz){
Map<Short,String> valuesName=new HashMap<>();
try {
for ( Field field : clazz.getFields()) {
if (field.getType().isPrimitive()) {
valuesName.put((Short)field.get(short.class),field.getName());
}
}
}
catch ... | Used to generate map of class fields where key is field value and value is field name. |
public PlanarYUVLuminanceSource buildLuminanceSource(byte[] data,int width,int height){
Rect rect=getFramingRectInPreview();
if (rect == null) {
return null;
}
return new PlanarYUVLuminanceSource(data,width,height,rect.left,rect.top,rect.width(),rect.height(),false);
}
| A factory method to build the appropriate LuminanceSource object based on the format of the preview buffers, as described by Camera.Parameters. |
public Enumeration<Option> listOptions(){
Vector<Option> newVector=new Vector<Option>();
newVector.addElement(new Option("\tThe construction method to employ. Either TopDown or BottomUp\n" + "\t(default: weka.core.TopDownConstructor)","C",1,"-C <classname and options>"));
newVector.addAll(Collections.list(super.l... | Returns an enumeration describing the available options. |
void sendMessageToHandlerNoControllerReset(List<OFMessage> messages) throws Exception {
setupMessageEvent(messages);
handler.messageReceived(ctx,messageEvent);
}
| reset, setup, and replay the messageEvent mock for the given messages, mock controller send message to channel handler This method will start replay on controller, and then verify |
public void resumeJob(JobKey jobKey) throws SchedulerException {
try {
getRemoteScheduler().resumeJob(jobKey);
}
catch ( RemoteException re) {
throw invalidateHandleCreateException("Error communicating with remote scheduler.",re);
}
}
| <p> Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>. </p> |
private Bitmap processBitmap(int resId){
if (BuildConfig.DEBUG) {
Log.d(TAG,"processBitmap - " + resId);
}
return decodeSampledBitmapFromResource(mResources,resId,mImageWidth,mImageHeight,getImageCache());
}
| The main processing method. This happens in a background task. In this case we are just sampling down the bitmap and returning it from a resource. |
public final boolean isItemEnabled(final int index){
return adapter.isItemEnabled(index);
}
| Returns, whether the item at a specific index is enabled, or not. |
private final void validateSurface(SunGraphics2D sg2d){
XRSurfaceData xrsd=(XRSurfaceData)sg2d.surfaceData;
xrsd.validateAsDestination(sg2d,sg2d.getCompClip());
xrsd.maskBuffer.validateCompositeState(sg2d.composite,sg2d.transform,sg2d.paint,sg2d);
}
| Common validate method, used by all XRRender functions to validate the destination context. |
public static UnManagedProtectionSet checkUnManagedProtectionSetExistsInDB(DbClient dbClient,String nativeGuid) throws IOException {
List<UnManagedProtectionSet> cgs=CustomQueryUtility.getUnManagedProtectionSetByNativeGuid(dbClient,nativeGuid);
Iterator<UnManagedProtectionSet> cgsItr=cgs.iterator();
if (cgsItr.ha... | check unmanaged Protection Set exists in DB |
public ProgressDialog showProgressDialog(Context context,String title,String message){
ProgressDialog progressDialog=new ProgressDialog(context);
progressDialog.setTitle(title);
progressDialog.setMessage(message);
progressDialog.setCanceledOnTouchOutside(false);
progressDialog.show();
return progressDialog;... | Shows a ProgressDialog with the given parameters |
public NotExpression(){
}
| Ctor - for use to create an expression tree, without child expression. |
@Nullable public GridCacheMvccCandidate candidate(GridCacheVersion ver){
GridCacheMvccCandidate cand=candidate(locs,ver);
if (cand == null) cand=candidate(rmts,ver);
return cand;
}
| Gets candidate for lock ID. |
private void handleInputChange(PropertyChangeEvent evt){
Object newValue=evt.getNewValue();
Object oldValue=evt.getOldValue();
if (!((oldValue != null) ^ (newValue != null))) {
throw new IllegalStateException("Exactly one of old or new values must be non-null for INPUT event");
}
if (newValue != null) {
... | Called when change to one of the inputs occurs |
public boolean isDigest256(){
return isDigest256;
}
| Return <tt>true</tt> if this is a 256 bit digest instance. |
public FastIntBuffer(){
this.minChunkLen=1024;
}
| Creates a new <code>int</code> buffer. The buffer capacity is initially 1024 bytes, though its size increases if necessary. |
public JSONArray put(Object value){
this.myArrayList.add(value);
return this;
}
| Append an object value. This increases the array's length by one. |
@Override protected EClass eStaticClass(){
return SexecPackage.Literals.EXECUTION_SYNCHRONIZATION;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public byte[] encode(byte[] bytes){
return encodeUrl(WWW_FORM_URL,bytes);
}
| Encodes an array of bytes into an array of URL safe 7-bit characters. Unsafe characters are escaped. |
public boolean isAtLeast(int major,int minor,int buildNumber){
return this.compareTo(new VersionNumber(major,minor,buildNumber)) >= 0;
}
| Returns if this number is at least as high as the given arguments. |
public static boolean hasText(@Nullable AccessibilityNodeInfoCompat node){
if (node == null) {
return false;
}
return !TextUtils.isEmpty(node.getText()) || !TextUtils.isEmpty(node.getContentDescription());
}
| Returns whether the specified node has text or a content description. |
public void recompilationCompleted(CompilationPlan plan){
if (Controller.options.LOGGING_LEVEL >= 2) {
printlnToLogWithTimePrefix("Recompiled (at level " + plan.options.getOptLevel() + ") "+ plan.method);
}
}
| This method logs the successful completion of an adaptively selected recompilation |
public MySqlLeaveStatement parseLeave(){
accept(Token.LEAVE);
MySqlLeaveStatement leaveStmt=new MySqlLeaveStatement();
leaveStmt.setLabelName(exprParser.name().getSimpleName());
accept(Token.SEMI);
return leaveStmt;
}
| parse leave statement |
@Override public boolean equals(Object obj){
if (obj == this) {
return true;
}
if (!(obj instanceof CenterArrangement)) {
return false;
}
return true;
}
| Tests this instance for equality with an arbitrary object. |
public static String concatenateName(String name1,String name2){
StringBuffer buf=new StringBuffer();
if (name1 != null && name1.length() > 0) {
buf.append(name1);
}
if (name2 != null && name2.length() > 0) {
if (buf.length() > 0) {
buf.append('.');
}
buf.append(name2);
}
return buf.to... | Concatenates two names. Uses a dot for separation. Both strings can be empty or <code>null</code>. |
public static Size constrainToAspectRatio(Size size,float aspectRatio){
float width=size.getWidth();
float height=size.getHeight();
float currentAspectRatio=width * 1.0f / height;
if (currentAspectRatio > aspectRatio) {
if (width > height) {
width=height * aspectRatio;
}
else {
height=width... | Given a size, return the largest size with the given aspectRatio that maximally fits into the bounding rectangle of the original Size. |
public Matrix4 trn(Vector3 vector){
val[M03]+=vector.x;
val[M13]+=vector.y;
val[M23]+=vector.z;
return this;
}
| Adds a translational component to the matrix in the 4th column. The other columns are untouched. |
boolean deleteAll(File file){
if (file.isDirectory()) {
for ( File f : file.listFiles()) deleteAll(f);
}
return file.delete();
}
| Delete a file or a directory (including all its contents). |
public static String unescapeString(String s){
int backSlashIdx=s.indexOf('\\');
if (backSlashIdx == -1) {
return s;
}
int startIdx=0;
int sLength=s.length();
StringBuilder sb=new StringBuilder(sLength);
while (backSlashIdx != -1) {
sb.append(s.substring(startIdx,backSlashIdx));
if (backSlashI... | Unescapes an escaped Unicode string. Any Unicode sequences ( <tt>\uxxxx</tt> and <tt>\Uxxxxxxxx</tt>) are restored to the value indicated by the hexadecimal argument and any backslash-escapes ( <tt>\"</tt>, <tt>\\</tt>, etc.) are decoded to their original form. |
public CarrierIdToEntityConverter(final GenericDAO<Carrier,Long> carrierLongGenericDAO){
super(carrierLongGenericDAO);
}
| Construct converter. |
public Boolean isUseAutoDetect(){
return useAutoDetect;
}
| Gets the value of the useAutoDetect property. |
public SQLTransientConnectionException(){
}
| Creates an SQLTransientConnectionException object. The Reason string is set to null, the SQLState string is set to null and the Error Code is set to 0. |
public Intent putExtra(String name,byte[] value){
if (mExtras == null) {
mExtras=new Bundle();
}
mExtras.putByteArray(name,value);
return this;
}
| Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll". |
public ScreenAnnotationBalloon(String text,Point point){
super(text);
if (point == null) {
String message=Logging.getMessage("nullValue.PositionIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
this.screenPoint=point;
this.annotation=this.createAnnotation()... | Create the balloon. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:07.318 -0500",hash_original_method="C42E665E40D735B4BFD234363CD8C238",hash_generated_method="6FE2D9C0A2B717CDE23FE0708B3F64F1") public JoinHeader createJoinHeader(String callId,String toTag,String fromTag) throws ParseException {
... | Create a Join header with a call Id, to and from tag. |
@Override protected void sendFunctionGroup2(){
DCCppMessage msg=DCCppMessage.makeFunctionGroup2OpsMsg(this.getDccAddress(),f5,f6,f7,f8);
queueMessage(msg,THROTTLEIDLE);
}
| Send the DCC++ message to set the state of functions F5, F6, F7, F8 |
public GenericEntry createMailMonitor(String sourceUser,MailMonitor mailMonitor) throws AppsForYourDomainException, MalformedURLException, IOException, ServiceException {
GenericEntry entry=mailMonitor.toGenericEntry();
return insert(new URL(BASE_URL + "mail/monitor/" + domain+ "/"+ sourceUser),entry);
}
| Creates a new monitoring task to begin an audit. Note: The number of daily requests are limited per domain, and can include requests from several administrators during the day |
public boolean removeEdge(Edge edge){
int i=nodesHash.get(edge.getNode1());
int j=nodesHash.get(edge.getNode2());
graphMatrix[i][j]=0;
graphMatrix[j][i]=0;
return true;
}
| Removes an edge from the graph. (Note: It is dangerous to make a recursive call to this method (as it stands) from a method containing certain types of iterators. The problem is that if one uses an iterator that iterates over the edges of node A or node B, and tries in the process to remove those edges using this metho... |
public void updateAvailabilityIndicators(){
for ( String string : availabilityIndicators.keySet()) {
CommandTarget commandTarget=commands.get(string);
if (commandTarget != null) {
commandTarget.setAvailabilityIndicator(availabilityIndicators.get(string));
}
}
}
| Will update all the references to availability Indicators for commands |
private static LinkedHashSet<FunctionBlock> findPassedFunctions(final Callgraph callgraph,final Function startFunction,final Function targetFunction){
final FunctionBlock sourceCallgraphNode=findBlock(callgraph,startFunction);
final FunctionBlock targetCallgraphNode=findBlock(callgraph,targetFunction);
Logger.inf... | Determines all functions that lie on all possible paths between a given start function and a given target function. |
public void flush(){
synchronized (mDiskCacheLock) {
if (mDiskLruCache != null) {
try {
mDiskLruCache.flush();
}
catch ( Throwable e) {
LogUtils.e(e.getMessage(),e);
}
}
}
}
| Flushes the disk cache associated with this ImageCache object. Note that this includes disk access so this should not be executed on the main/UI thread. |
public List<String[]> readAll() throws IOException {
List<String[]> allElements=new ArrayList<String[]>();
while (hasNext) {
String[] nextLineAsTokens=readNext();
if (nextLineAsTokens != null) {
allElements.add(nextLineAsTokens);
}
}
return allElements;
}
| Reads the entire file into a List with each element being a String[] of tokens. |
public static String toString(URI uri,String encoding) throws IOException {
return toString(uri.toURL(),encoding);
}
| Gets the contents at the given URI. |
public long readVarLong(){
long x=data[pos++];
if (x >= 0) {
return x;
}
x&=0x7f;
for (int s=7; ; s+=7) {
long b=data[pos++];
x|=(b & 0x7f) << s;
if (b >= 0) {
return x;
}
}
}
| Read a variable size long. |
@Override public void doInitialize(UimaContext aContext) throws ResourceInitializationException {
confidenceThreshold=ConfigUtils.stringToFloat(confidenceThresholdString,0.0f);
}
| Initialise the annotator |
public static void copyView(final JFrame parent,final INaviModule module,final INaviView view){
Preconditions.checkNotNull(parent,"IE01832: Parent argument can not be null");
Preconditions.checkNotNull(module,"IE01833: Module argument can not be null");
Preconditions.checkNotNull(view,"IE01834: View argument can ... | Copies a view into a module view. |
private JSONWriter append(String string) throws JSONException {
if (string == null) {
throw new JSONException("Null pointer");
}
if (this.mode == 'o' || this.mode == 'a') {
try {
if (this.comma && this.mode == 'a') {
this.writer.write(',');
}
this.writer.write(string);
}
cat... | Append a value. |
public static ComponentUI createUI(JComponent c){
return new WindowsPasswordFieldUI();
}
| Creates a UI for a JPasswordField |
public byte[] readBytes(int length) throws IOException {
byte[] bytes=new byte[length];
readBytes(bytes,0,length);
return bytes;
}
| Reads the specified number of bytes into a new byte[]. |
public static void main(final String[] args){
DOMTestCase.doMain(notationgetnotationname.class,args);
}
| Runs this test from the command line. |
public void remove(Comparable x){
throw new UnsupportedOperationException();
}
| Remove from the tree. |
private void historyBack(){
if (historyPosition > 0 && historyPosition <= history.size()) {
historyPosition--;
String text=history.get(historyPosition);
if (text != null) {
setText(text);
historyTextEdited=false;
}
}
}
| Move back in the history, changing the text. |
private String nextLiteral(boolean assignOffsetsOnly) throws IOException {
StringBuilder builder=null;
valuePos=-1;
valueLength=0;
int i=0;
findNonLiteralCharacter: while (true) {
for (; pos + i < limit; i++) {
switch (buffer[pos + i]) {
case '/':
case '\\':
case ';':
case '#':
case '=':
checkLe... | Reads the value up to but not including any delimiter characters. This does not consume the delimiter character. |
protected boolean isFullDetail(final Boolean fullDetailRequest){
if (fullDetailRequest == null) {
return defaultFullDetail;
}
return fullDetailRequest.booleanValue();
}
| <p>Is this field to be output in full detail.</p> <p>This method converts a detail request into a detail level. The calling code may request full detail (<code>true</code>), but a subclass might ignore that and always return <code>false</code>. The calling code may pass in <code>null</code> indicating that it doesn't c... |
private static boolean isSeparator(char ch){
return ch == UNIX_SEPARATOR || ch == WINDOWS_SEPARATOR;
}
| Checks if the character is a separator. |
public static CertificateToken loadCertificateFromBase64EncodedString(final String base64Encoded){
final byte[] bytes=Base64.decodeBase64(base64Encoded);
return loadCertificate(bytes);
}
| This method loads a certificate from a base 64 encoded String |
public boolean is2D(){
return true;
}
| Return true if this renderer supports 2D drawing. Defaults to true. |
public static String join(Iterable<String> input){
StringBuilder builder=new StringBuilder();
for ( String item : input) {
builder.append(item).append(", ");
}
if (builder.length() >= 2) {
builder.setLength(builder.length() - 2);
}
return builder.toString();
}
| Returns a comma-separated join of the strings in the input. |
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
stream.defaultReadObject();
this.store=new TreeMap();
int keyCount=stream.readInt();
for (int i=0; i < keyCount; i++) {
Comparable key=(Comparable)stream.readObject();
Stroke stroke=SerialUtilities.readStroke(... | Provides serialization support. |
private static void saveToDisk(String vcard,String filename,String path,Context context){
if (TextUtils.isEmpty(vcard) || TextUtils.isEmpty(filename) || context == null) {
return;
}
File peerProfilesFile=new File(path);
if (!peerProfilesFile.exists()) {
peerProfilesFile.mkdirs();
}
FileOutputStream ... | Saves a vcard string to an internal new vcf file. |
private static boolean doEquals(DerValue d1,DerValue d2){
synchronized (d1.data) {
synchronized (d2.data) {
d1.data.reset();
d2.data.reset();
return d1.buffer.equals(d2.buffer);
}
}
}
| Helper for public method equals() |
private void displayText(){
String output="";
for ( Integer e : list) output+=e + " ";
textArea.setText(output);
textField.setText("");
}
| Display elements in the list in the text area |
public static IndexType createScan(boolean persistent){
IndexType type=new IndexType();
type.persistent=persistent;
type.scan=true;
return type;
}
| Create a scan pseudo-index. |
private IgniteBiTuple<String,Integer> hostPort(String connStr,String hostPortStr) throws IgniteCheckedException {
String[] tokens=hostPortStr.split(":",-1);
String host=tokens[0];
if (F.isEmpty(host)) host=LOCALHOST;
int port;
if (tokens.length == 1) port=IgfsIpcEndpointConfiguration.DFLT_PORT;
else if... | Parse host and port. |
public Y eq(X value){
return add(" = ?",value);
}
| SQL: <code>=</code> |
public boolean isTurningToDouble(int stage){
return stage == doubleStage;
}
| Return true if this crop is turning double crop at this stage |
public void incrementSent(){
this.sentPackets++;
}
| Used for incrementing the number of packets sent to the client |
public List<Integer> orderNodesByDegree(Bag people){
Bag friends=new Bag();
int[] degreeArray=new int[people.numObjs];
TreeMap<Double,Object> sorted_map=new TreeMap<Double,Object>();
int count=0;
for ( Object person : people) {
socialNetwork.getEdges(person,friends);
degreeArray[count]=friends.numObj... | Sorts the nodes by their degree in the social graph, from lowest degree to highest. |
public Address phone(Phone phone){
this.phone=phone;
return this;
}
| Sets the phone number associated with <strong>this</strong> address. |
@SuppressWarnings("deprecation") public void testUPDATEWithDiffKeysValuesCount() throws Exception {
OptimizeUpdatesFilter filter=new OptimizeUpdatesFilter();
OneRowChange oneRowChange=generateRowChange("foo","bar",RowChangeData.ActionType.UPDATE);
oneRowChange.setColumnSpec(generateSpec(oneRowChange));
oneRowCh... | Test UPDATE which has some columns changed and some - static. |
public void closeEntry() throws IOException {
ensureOpen();
if (current != null) {
ZipEntry e=current.entry;
switch (e.method) {
case DEFLATED:
def.finish();
while (!def.finished()) {
deflate();
}
if ((e.flag & 8) == 0) {
if (e.size != def.getBytesRead()) {
throw new ZipException... | Closes the current ZIP entry and positions the stream for writing the next entry. |
public static void incorrectBodyDefinition(String methodName,String className){
throw new DynamicConversionBodyException(MSG.INSTANCE.message(dynamicConversionBodyException,methodName,className));
}
| Thrown when the body method don't respects the convetions beloging to the dynamic conversion implementation. |
private void handleSendSubject(Intent intent){
AppLog.v(this,"handleSendSubject()");
try {
setSharedTexts(intent.getStringExtra(Intent.EXTRA_SUBJECT),intent.getStringExtra(Intent.EXTRA_TEXT));
openDiasporaUrl(urls.getNewPostUrl());
}
catch ( Exception e) {
AppLog.e(this,e.toString());
}
}
| Handle sent text + subject |
public static void organizeDistribution(final double[] probabilities,final boolean allowAllZeros){
double sum=0.0;
if (probabilities.length == 0) throw new ArithmeticException("Distribution has no elements");
for (int x=0; x < probabilities.length; x++) {
if (probabilities[x] < 0.0) throw new Arithmetic... | Normalizes probabilities, then converts them into continuing sums. This prepares them for being usable in pickFromDistribution. If the probabilities are all 0, then selection is uniform, unless allowAllZeros is false, in which case an ArithmeticException is thrown. If any of them are negative, or if the distribution ... |
static void validateAsciiPostalInfo(@Nullable PostalInfo internationalized) throws EppException {
if (internationalized != null) {
Preconditions.checkState(INTERNATIONALIZED.equals(internationalized.getType()));
ContactAddress address=internationalized.getAddress();
Set<String> fields=Sets.newHashSet(inte... | Check that an internationalized postal info has only ascii characters. |
public static void make(Project project,MessageType type,String text){
StatusBar statusBar=WindowManager.getInstance().getStatusBar(project);
JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(text,type,null).setFadeoutTime(7500).createBalloon().show(RelativePoint.getCenterOf(statusBar.getComponent()),Balloo... | Display simple notification of given type |
public WizardPreview(Composite parent,int style){
super(parent,style);
this.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).extendedMargins(0,0,0,0).create());
createEditor();
createInfoBar();
inactiveColor=createInactiveColor();
this.sourceViewer.getTextWidget().setData("org.eclipse.e4.ui.css.CssC... | Creates a new wizard preview for a given shell. |
public boolean endsWith(Name n){
if (n instanceof CompoundName) {
return (impl.endsWith(n.size(),n.getAll()));
}
else {
return false;
}
}
| Determines whether a compound name is a suffix of this compound name. A compound name 'n' is a suffix if it it is equal to getSuffix(size()-n.size())--in other words, this compound name ends with 'n'. If n is null or not a compound name, false is returned. <p> Implementation note: Currently the syntax properties of n a... |
private void cmd_selection(Object source){
for (int i=0; i < m_selectionList.size(); i++) {
if (source == m_selectionList.get(i)) {
boolean selected=isSelectionSelected(source);
Decimalbox qty=m_qtyList.get(i);
qty.setReadonly(!selected);
return;
}
}
log.log(Level.SEVERE,"not found... | Enable/disable qty based on selection |
public ResourceList<VirtualSubnet> list(String parentId,String parentKind,Optional<String> name,Optional<Integer> pageSize) throws ExternalException {
final ImmutableMap.Builder<String,String> termsBuilder=new ImmutableMap.Builder<>();
if (parentId != null) {
termsBuilder.put("parentId",parentId);
}
if (par... | Gets a list of virtual networks by the given parent ID and kind. The list can be filtered by the optional name of the virtual network. The size of the list can be restricted by the optional page size. Parent ID can be project/tenant ID, or can be null in case the virtual network is global. |
private static int computeInitialSampleSize(BitmapFactory.Options options,int minSideLength,int maxNumOfPixels){
double w=options.outWidth;
double h=options.outHeight;
int lowerBound=(maxNumOfPixels == -1) ? 1 : (int)Math.ceil(Math.sqrt(w * h / maxNumOfPixels));
int upperBound=(minSideLength == -1) ? 128 : (int... | compute bitmap initial sample size |
public void addActionListener(ActionListener l){
listeners.addElement(l);
}
| Add an ActionListener. An action event is generated when the edited item changes |
private void printSpace(int n) throws IOException {
final java.io.Writer writer=m_writer;
for (int i=0; i < n; i++) {
writer.write(' ');
}
}
| Prints <var>n</var> spaces. |
public ListRendererEditor(EditableResources res,com.codename1.ui.Component parentList,String currentUI){
initComponents();
try {
help.setPage(getClass().getResource("/help/renderer.html"));
}
catch ( IOException ex) {
ex.printStackTrace();
}
this.parentList=parentList;
this.res=res;
Vector names... | Creates new form ListRendererEditor |
public static void main(final String[] args){
DOMTestCase.doMain(characterdataindexsizeerrreplacedataoffsetnegative.class,args);
}
| Runs this test from the command line. |
int groupFromChildId(long childId){
if (!mDataValid) return -1;
int group=-1;
for (mCursor.moveToFirst(); !mCursor.isAfterLast(); mCursor.moveToNext()) {
if (getLong(mIdIndex) == childId) {
int bin=mDateSorter.getIndex(getLong(mDateIndex));
if (DateSorter.DAY_COUNT == mNumberOfBins) {
re... | Determine which group an item belongs to. |
void cancel(){
isCancelled=true;
}
| Cancel the watcher to avoid spurious warn messages during shutdown. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.