code
stringlengths
10
174k
nl
stringlengths
3
129k
public String registerName(final String name,final Operator operator){ if (operatorNameMap.get(name) != null) { String baseName=name; int index=baseName.indexOf(" ("); if (index >= 0) { baseName=baseName.substring(0,index); } int i=2; while (operatorNameMap.get(baseName + " (" + i+ ")") ...
Returns a "name (i)" if name is already in use. This new name should then be used as operator name.
private void logResult(Iterable<Label> result){ if (LogUtils.LOG_LEVEL >= Log.VERBOSE) { final StringBuilder logMessageBuilder=new StringBuilder("Query result: ["); for ( Label label : result) { logMessageBuilder.append("\n "); logMessageBuilder.append(label); } logMessageBuilder.appen...
Logs labels resulting from a query.
public boolean isInserting(){ return m_inserting; }
Is inserting
public synchronized boolean canBeDeallocate(){ if (shareCounter > 0 || isBeingDeallocate) { return false; } if (!inCache.get()) { isBeingDeallocate=true; return true; } return false; }
Asked if can be deallocate (is not shared in other statement and not in cache) Set deallocate flag to true if so.
protected WrappingJavaFileManager(M fileManager){ super(fileManager); }
Creates a new instance of WrappingJavaFileManager.
protected AbstractParser(AltFormat altFormat,Class<? extends T> resultType){ Preconditions.checkNotNull(altFormat,"altFormat"); Preconditions.checkNotNull(resultType,"resultType"); this.altFormat=altFormat; this.resultType=resultType; }
Constructs a new AbstractParser instance for the specified representation and result type.
void printHelp(){ System.out.println("\nUsage: klist " + "[[-c] [-f] [-e] [-a [-n]]] [-k [-t] [-K]] [name]"); System.out.println(" name\t name of credentials cache or " + " keytab with the prefix. File-based cache or " + "keytab's prefix is FILE:."); System.out.println(" -c specifies that credential cache is ...
Prints out the help information.
public boolean hasCharacterIndex(int index){ for (int n=0; n < charMap.length; n++) { if (index == charMap[n]) return true; } return false; }
Return true is the character index is represented by glyphs in this layout.
@Override public ODataResponse handleError(ODataErrorContext ctx) throws ODataApplicationException { return EntityProvider.writeErrorDocument(ctx); }
Logs full stack traces. Always logs at ERROR level From ODataErrorCallback.
public T caseDebuggerStatement(DebuggerStatement object){ return null; }
Returns the result of interpreting the object as an instance of '<em>Debugger Statement</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
boolean wantsToTrigger(PropertyChangeEvent evt){ try { String sysName=((NamedBean)evt.getSource()).getSystemName(); String userName=((NamedBean)evt.getSource()).getUserName(); for (int i=0; i < _variableList.size(); i++) { if (sysName.equals(_variableList.get(i).getName())) { return _variabl...
Find out if the state variable is willing to cause the actions to execute
public void openToLeft(){ if (open) { return; } if (bottomRightWrapper.getComponentCount() == 0) { return; } Component bottom=bottomRightWrapper.getComponentAt(0); if (bottomLeftWrapper.getComponentCount() > 0) { bottomLeftWrapper.setVisible(false); } bottomRightWrapper.setVisible(true); i...
This method will open the top Component to the left if there is a Component to expose on the right.
@Override public void doInitialize(UimaContext aContext) throws ResourceInitializationException { DB db=mongoResource.getDB(); collection=db.getCollection(collectionName); collection.createIndex(new BasicDBObject(FIELD_UNIQUE_ID,1)); collection.createIndex(new BasicDBObject(FIELD_PUBLISHEDIDS,1)); stopFeature...
Get the MongoDB, collection and create some indexes
private void resetHintTime(){ mHandler.removeCallbacks(mHint); mHandler.postDelayed(mHint,HINT_DELAY); }
Reset the hint's delay time so that the delay is counted from the time this method is called.
public ExternalIDPResource externalIdp(){ return externalIdp; }
Get the subresource containing all of the commands related to a tenant's external identity providers.
public boolean isActivePointer(int pointerId){ final int pointerFlag=(1 << pointerId); return (mActivePointers & pointerFlag) != 0; }
Whether an input pointer is active.
private void doTextNormal(final PDFPage cmds,final String text){ final PointF zero=new PointF(); final Matrix scale=new Matrix(); Utils.setMatValues(scale,fsize,0,0,fsize * th,0,tr); final Matrix at=new Matrix(); final List<PDFGlyph> l=(List<PDFGlyph>)font.getGlyphs(text); for ( final PDFGlyph glyph : l) {...
add some text to the page.
@SuppressWarnings("unused") @Test public void testSiblingStateTransition(){ Statechart sc=_createStatechart("sc"); { InterfaceScope s_scope=_createInterfaceScope("Interface",sc); VariableDefinition v1=_createVariableDefinition("v1",TYPE_INTEGER,s_scope); Region r=_createRegion("r",sc); { Entry r_ent...
Local transition within a region with orthogonal siblings does not have to invoke sibling region entries or exists.
private void syncBackupsInDBWithExistingOnes(){ List<BackupEntry> realBackups=sdfsStateService.getBackupsFromSDFSMountPoint(); List<BackupEntry> backupEntries=backupRepository.findAll(); List<BackupEntry> toRemove=new ArrayList<>(); backupEntries.stream().filter(null).peek(null).forEach(null); backupRepositor...
There can be situations when user removed/added backups after system backup and than decided to migrate to another instance, in this case backups will not be in consistent state
public ClassMemberValue(String className,ConstPool cp){ super('c',cp); setValue(className); }
Constructs a class value.
public void teleportCheckpoint(Player player){ for (int index=checkpoints.size() - 1; index >= 0; index--) { Checkpoint checkpoint=checkpoints.get(index); if (checkpoint.isActivated()) { player.teleport(checkpoint.getLocation()); return; } } player.teleport(spawns.get(0)); }
Teleports a player to a checkpoint if they are activated. We reverse the search so we don't teleport them to multiple checkpoints
public synchronized void insert(double _priority,Object _data){ numElements++; if (numElements == queue.length) { PriorityQueueNode[] tmp=new PriorityQueueNode[(int)(queue.length * 1.5)]; System.arraycopy(queue,0,tmp,0,queue.length); for (int i=queue.length; i < tmp.length; i++) { tmp[i]=new Prior...
Insert the object passed with the priority value passed
private void validateTaskSubStageProgression(DeleteVirtualNetworkWorkflowDocument.TaskState startState,DeleteVirtualNetworkWorkflowDocument.TaskState patchState){ if (patchState.stage.ordinal() > TaskState.TaskStage.FINISHED.ordinal()) { return; } if (patchState.stage == TaskState.TaskStage.FINISHED) { Pr...
Validate the substage progresses correctly.
public RandomFilterParser(Element element) throws FilterException { String chanceProperty=element.getText(); if (chanceProperty == null) { throw new MissingFilterPropertyException("chance",element); } if (Numbers.isDecimal(chanceProperty)) { chance=Numbers.parseDouble(chanceProperty); } else { if...
Parses an element for a random filter.
public ScanQuery(){ this(null,null); }
Create scan query returning all entries.
public static AndroidHttpClient newInstance(String userAgent){ return newInstance(userAgent,null); }
Create a new HttpClient with reasonable defaults (which you can update).
public boolean updatePointByPoint(Point scaledPoint){ boolean changeMade=!scaledPoint.equals(potentialControlPoint); potentialControlPoint=scaledPoint; if (componentSlot != null && !componentSlot.isEmpty()) { componentSlot.get(0).setControlPoint(scaledPoint,1); } return changeMade; }
Updates component in the slot with the new second control point.
public void testNextDoubleBounded2(){ SplittableRandom sr=new SplittableRandom(); for (double least=0.0001; least < 1.0e20; least*=8) { for (double bound=least * 1.001; bound < 1.0e20; bound*=16) { double f=sr.nextDouble(least,bound); assertTrue(least <= f && f < bound); int i=0; double ...
nextDouble(least, bound) returns least <= value < bound; repeated calls produce at least two distinct results
final void signal(){ synchronized (this) { if (state == State.READY) { state=State.SIGNALLED; watcher.enqueueKey(this); } } }
Enqueues this key to the watch service
public int size(int taskId){ return readTasks.get(taskId).size(); }
Returns the current queue size.
private void registerFitDataListener(FitDataTypeSetting dataTypeSetting,OnDataPointListener listener){ sensorsAwaitingRegistration.add(dataTypeSetting); Fitness.SensorsApi.add(mGoogleApiClient,new SensorRequest.Builder().setDataType(dataTypeSetting.getDataType()).setSamplingRate(dataTypeSetting.getSamplingRateSecon...
Add SensorsApi listener for real-time display of sensor data. Can be called repeatedly on multiple data types.
public void translateTexts(){ String labelText=Localization.Main.getText(localizationKey + ".label"); if (labelText.endsWith("label")) labelText=Localization.Main.getText(localizationKey); if (labelText.equals(localizationKey)) labelText=""; String tooltipText=Localization.Main.getText(localizationKey + ".t...
Apply the localization for the given field(s)
public Statement copyInline(Context ctx,boolean valNeeded){ CompoundStatement s=(CompoundStatement)clone(); s.args=new Statement[args.length]; for (int i=0; i < args.length; i++) { s.args[i]=args[i].copyInline(ctx,valNeeded); } return s; }
Create a copy of the statement for method inlining
public double[] asDegreesArray(){ return new double[]{this.getLatitude().degrees,this.getLongitude().degrees}; }
Returns an array of this object's latitude and longitude in degrees.
@Override public void computeDerivatives(final double time,final double[] y,final double[] ydot) throws MaxCountExceededException, DimensionMismatchException { assignValue(currentScope,time,y); final Map<Integer,IAgent> equaAgents=getEquationAgents(currentScope); for (int i=0, n=getDimension(); i < n; i++) { ...
This method is bound to be called by the integrator of the equations system (instantiated in SolveStatement).
protected void initBPOrderDetails(int C_BPartner_ID,boolean forInvoice){ log.config("C_BPartner_ID=" + C_BPartner_ID); KeyNamePair pp=new KeyNamePair(0,""); orderField.removeActionListener(this); orderField.removeAllItems(); orderField.addItem(pp); ArrayList<KeyNamePair> list=loadOrderData(C_BPartner_ID,for...
Load PBartner dependent Order/Invoice/Shipment Field.
private void initialize(Properties props){ this.autoConnect=validateBoolean(props.getProperty(AUTO_CONNECT_NAME),DEFAULT_AUTO_CONNECT); this.httpEnabled=validateBoolean(props.getProperty(HTTP_ENABLED_NAME),DEFAULT_HTTP_ENABLED); this.httpBindAddress=validateHttpBindAddress(props.getProperty(HTTP_BIND_ADDRESS_NAME...
Initialize the values of this AgentConfig.
@Override public void removeListener(final IEventLayerListener listener){ listeners.remove(listener); }
Method removeMouseListener()
public int memberOf(){ return theType.memberOf(); }
Return the member-of vector of the element's type. Convenience method.
protected void checkForCompletion(FragmentBuilder builder,Node node){ if (builder.isComplete()) { if (node != null) { Trace trace=builder.getTrace(); if (builder.getLevel().ordinal() <= ReportingLevel.None.ordinal()) { if (log.isLoggable(Level.FINEST)) { log.finest("Not recording tra...
This method checks whether the supplied fragment has been completed and therefore should be processed.
@Override public void acceptDataSet(DataSetEvent e){ m_receivedStopNotification=false; TrainingSetEvent tse=new TrainingSetEvent(this,e.getDataSet()); tse.m_setNumber=1; tse.m_maxSetNumber=1; notifyTrainingSetProduced(tse); }
Accept a data set
@SuppressWarnings("static-access") private void resetUser(boolean isSource,String newUser){ String user=null; if (isSource) { if (newUser == null) { user=s_parameters.getSourceUser(); } else if (newUser.length() == 0) { user=m_sourceUser.getText(); ; } else { user=newUser; ...
resets the user
void drawImageArea(Image img,int x,int y,int imageX,int imageY,int imageWidth,int imageHeight){ img.drawImageArea(this,nativeGraphics,x,y,imageX,imageY,imageWidth,imageHeight); }
Draws a region of an image in the given x/y coordinate
@Override public void update(BasicCamera camera){ scale=camera.getPixelSizeAt(getWorldTranslation(),true) * PIXEL_SIZE; if (Math.abs(scale - oldScale) > 0.0000001) { oldScale=scale; if (autoScale) { scaleShape(scale); } } }
Update size based on camera location
private static String formatEntry(long ts,String threadName,long threadId,Object... data){ return "<" + DEBUG_DATE_FMT.format(new Date(ts)) + "><~DBG~><"+ threadName+ " id:"+ threadId+ "> "+ Arrays.deepToString(data); }
Formats log entry string.
public void overwriteSeries(String key,double[] values,int bins){ addSeries(key,values,bins); }
Add new values to an existing series. Overwrites the old data. The value set will be sorted after this method completes.
protected static final String addEscapes(String str){ StringBuffer retval=new StringBuffer(); char ch; for (int i=0; i < str.length(); i++) { switch (str.charAt(i)) { case 0: continue; case '\b': retval.append("\\b"); continue; case '\t': retval.append("\\t"); continue; case '\n': retval.append("\\n")...
Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string
public LogConnection connect(boolean readonly) throws ReplicatorException { LogConnection client=new LogConnection(this,readonly); if (logger.isDebugEnabled()) logger.debug("Client connect to log: connection=" + client.toString()); connectionManager.store(client); return client; }
Creates a new log connection.
public MaterializeBuilder withContainerLayoutParams(ViewGroup.LayoutParams layoutParams){ this.mContainerLayoutParams=layoutParams; return this; }
set the layout params for the container which will host the ScrimInsetsFrameLayout
public boolean isLoading(){ return !m_allLoaded; }
Is loading
private boolean isValueSupported(Object value){ for (int i=0; i < values.length; i++) { if (value.equals(values[i])) { return true; } } return false; }
Indicates whether the value specified is supported.
public SimpleMetadataReaderFactory(ResourceLoader resourceLoader){ this.resourceLoader=(resourceLoader != null ? resourceLoader : new DefaultResourceLoader()); }
Create a new SimpleMetadataReaderFactory for the given resource loader.
public static boolean equalsIncludingNaN(double x,double y,double eps){ return equalsIncludingNaN(x,y) || (FastMath.abs(y - x) <= eps); }
Returns true if both arguments are NaN or are equal or within the range of allowed error (inclusive).
public <D,E extends Element>ElementMetadata<D,E> bind(ElementKey<D,E> key){ return bind(null,key,null); }
Returns the default metadata for the element key.
public boolean isActive(){ return isActive; }
Returns true if this user is the active user and false otherwise.
private void remove(ThreadGroup g){ synchronized (groups) { for (Iterator<ThreadGroup> i=groups.iterator(); i.hasNext(); ) { ThreadGroup threadGroup=i.next(); if (threadGroup.equals(g)) { i.remove(); break; } } } destroyIfEmptyDaemon(); }
Removes an immediate subgroup.
public EditableOMText(OMText omc){ setGraphic(omc); }
Create the EditableOMText with an OMText already defined, ready for editing.
public StateData(Object parent,Object region,S state,Collection<E> deferred,Collection<? extends Action<S,E>> entryActions,Collection<? extends Action<S,E>> exitActions,boolean initial){ this.state=state; this.deferred=deferred; this.entryActions=entryActions; this.exitActions=exitActions; this.parent=parent;...
Instantiates a new state data.
@Override protected ArrayList<String> collectQueryParameters(){ ArrayList<String> params=new ArrayList<String>(); params.add("event_id=" + _eventId); params.add("logNames=" + _logNames); params.add("severity=" + _severity); params.add("start=" + _start); params.add("end=" + _end); params.add("nodeIds=" + ...
Constructs String of query parameters used
public boolean isEmpty(){ return empty; }
is this transaction empty?
public final void add(TXCommitMessage msg){ synchronized (this.txInProgress) { final Object key=msg.getTrackerKey(); if (key == null) { Assert.assertTrue(false,"TXFarSideCMTracker must have a non-null key for message " + msg); } this.txInProgress.put(key,msg); this.txInProgress.notifyAll(); ...
The transcation commit message has been received
@Override public Statement createStatement(int resultSetType,int resultSetConcurrency,int resultSetHoldability) throws SQLException { try { int id=getNextId(TraceObject.STATEMENT); if (isDebugEnabled()) { debugCodeAssign("Statement",TraceObject.STATEMENT,id,"createStatement(" + resultSetType + ", "+ res...
Creates a statement with the specified result set type, concurrency, and holdability.
public DragTrustedCertificateEntry(String name,Certificate trustedCertificate) throws CryptoException { super(name); contentStr=X509CertUtil.getCertEncodedX509Pem(X509CertUtil.convertCertificate(trustedCertificate)); contentBytes=contentStr.getBytes(); image=new ImageIcon(Toolkit.getDefaultToolkit().createImage...
Construct DragTrustedCertificateEntry.
public boolean decodeUintvarInteger(int startIndex){ int index=startIndex; mUnsigned32bit=0; while ((mWspData[index] & 0x80) != 0) { if ((index - startIndex) >= 4) { return false; } mUnsigned32bit=(mUnsigned32bit << 7) | (mWspData[index] & 0x7f); index++; } mUnsigned32bit=(mUnsigned32bit...
Decode the "Uintvar-integer" type for WSP pdu
public static void buildEventsFromCursor(ArrayList<Event> events,Cursor cEvents,Context context,int startDay,int endDay){ if (cEvents == null || events == null) { Log.e(TAG,"buildEventsFromCursor: null cursor or null events list!"); return; } int count=cEvents.getCount(); if (count == 0) { return; ...
Adds all the events from the cursors to the events list.
public String flatten(){ flattenAsMap(); if (flattenedMap.containsKey(ROOT)) return javaObj2Json(flattenedMap.get(ROOT)); else return flattenedMap.toString(printMode); }
Returns a flattened JSON string.
public static OutputStream newBZFileOutputStream(String file,boolean useGzip,boolean useOBuffers,int buffersize) throws IOException { return newBZFileOutputStream(file,useGzip,useOBuffers,buffersize,false); }
Constructs an output stream to a file
static void check(PublicKey key,AlgorithmId algorithmId) throws CertPathValidatorException { String sigAlgName=algorithmId.getName(); AlgorithmParameters sigAlgParams=algorithmId.getParameters(); if (!certPathDefaultConstraints.permits(SIGNATURE_PRIMITIVE_SET,sigAlgName,key,sigAlgParams)) { throw new CertPath...
Check the signature algorithm with the specified public key.
public long lengthSquared(){ return x * x + y * y; }
Return the length squared of this vector.
private void addAuthors(Document doc,Eml eml) throws DocumentException { HashSet<Agent> tempAgents=new LinkedHashSet<Agent>(); for ( Agent creator : eml.getCreators()) { if (!Strings.isNullOrEmpty(creator.getLastName())) { tempAgents.add(creator); } } for ( Agent metadataProvider : eml.getMetada...
Add authors section.
public void startElement(String namespaceURI,String localName,String qName,Attributes atts) throws SAXException { if ("Topic".equals(qName)) { curSection=atts.getValue("r:id"); } else if ("ExternalPage".equals(qName)) { if ((!includeAdult) && curSection.startsWith("Top/Adult")) { return; } ...
Start of an XML elt
public void java_lang_Package_getSystemPackage0(SootMethod method,ReferenceVariable thisVar,ReferenceVariable returnVar,ReferenceVariable params[]){ helper.assignObjectTo(returnVar,Environment.v().getStringObject()); }
This is an undocumented private native method, it returns the first (without caller) method's package. It should be formulated as a string constants. private static native java.lang.String getSystemPackage0(java.lang.String);
public UserConfig fetch(UserConfig config){ config.addCredentials(this); String xml=POST(this.url + "/check-user",config.toXML()); Element root=parse(xml); if (root == null) { return null; } try { UserConfig user=new UserConfig(); user.parseXML(root); return user; } catch ( Exception exc...
Fetch the user details for the user credentials. A token or password is required to validate the user.
@Inline public static boolean mightBeTIB(ObjectReference obj){ return !obj.isNull() && Space.isMappedObject(obj) && Space.isMappedObject(ObjectReference.fromObject(ObjectModel.getTIB(obj))); }
Check if object might be a TIB.
private boolean endsWithPossessive(int pos){ return (stemEnglishPossessive && pos > 2 && text[pos - 2] == '\'' && (text[pos - 1] == 's' || text[pos - 1] == 'S') && isAlpha(charType(text[pos - 3])) && (pos == endBounds || isSubwordDelim(charType(text[pos])))); }
Determines if the text at the given position indicates an English possessive which should be removed
public Object jjtAccept(SyntaxTreeBuilderVisitor visitor,Object data) throws VisitorException { return visitor.visit(this,data); }
Accept the visitor.
public boolean isWrap(){ return wrap != null; }
Returns if the flow should wrap to the next line/column <b>after</b> the component that this constraint belongs to. <p> For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void enableFiltering(Approximator a){ mFilterData=true; }
Enables data filtering for the chart data, filtering will use the user customized Approximator handed over to this method.
protected void drawItemPass0(Graphics2D x_graphics,Rectangle2D x_dataArea,PlotRenderingInfo x_info,XYPlot x_plot,ValueAxis x_domainAxis,ValueAxis x_rangeAxis,XYDataset x_dataset,int x_series,int x_item,CrosshairState x_crosshairState){ if (!((0 == x_series) && (0 == x_item))) { return; } boolean b_impliedZero...
Draws the visual representation of a single data item, first pass.
@Override public void actionPerformed(ActionEvent e){ if (abort()) { return; } WalletData perWalletModelData=super.bitcoinController.getModel().getActivePerWalletModelData(); boolean encryptNewKeys=false; if (super.bitcoinController.getModel().getActiveWallet() != null && super.bitcoinController.getModel(...
Create new receiving addresses.
private void deleteJSONManifest(String manifestPath) throws IOException { logger.info("Deleting " + manifestPath); File file=new File(manifestPath); if (file.exists()) if (!file.delete()) throw new IOException("Unable to delete " + manifestPath); }
Removes .manifest.json file form the file system.
public Object trunc(InstanceScope scope,Object v){ if (v == null) return null; if (v instanceof List) { List<?> elems=(List<?>)v; if (elems.size() <= 1) return null; return elems.subList(0,elems.size() - 1); } v=convertAnythingIteratableToIterator(scope,v); if (v instanceof Iterator) { L...
Return all but the last element. <code>trunc(<i>x</i>)==null</code> if <code><i>x</i></code> is single-valued.
protected Node inlineExternal(Document doc,ParsedURL urldata,Node eold){ File in=new File(urldata.getPath()); if (!in.exists()) { LoggingUtil.warning("Referencing non-existant file: " + urldata.toString()); return null; } ByteArrayOutputStream os=new ByteArrayOutputStream(); try { os.write(SVGSynt...
Inline an external file (usually from temp).
private UILib(){ }
Not instantiable.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:30:10.408 -0500",hash_original_method="DB70AA378C6CA75A97E2143D1A039441",hash_generated_method="3A1052EDADDDC32BAF9C16CC5ECEDA67") public static ETC1Texture createTexture(InputStream input) throws IOException { int width=0; int hei...
Create a new ETC1Texture from an input stream containing a PKM formatted compressed texture.
public BitcoinURI(String uri) throws BitcoinURIParseException { this(null,uri); }
Constructs a new BitcoinURI from the given string. Can be for any network.
public boolean checkForStringAttributes(){ return checkForAttributeType(Attribute.STRING); }
Checks for string attributes in the dataset
@Nullable public Date convert(@Nullable Date srcDate,TimeZone srcTimeZone,TimeZone dstTimeZone){ if (srcDate == null) return null; Preconditions.checkNotNullArgument(srcTimeZone,"srcTimeZone is null"); Preconditions.checkNotNullArgument(dstTimeZone,"dstTimeZone is null"); int srcOffset=srcTimeZone.getOffset(s...
Converts date between time zones.
private void removeTagArticleRelations(final String articleId,final String... tagIds) throws JSONException, RepositoryException { final List<String> tagIdList=Arrays.asList(tagIds); final List<JSONObject> tagArticleRelations=tagArticleRepository.getByArticleId(articleId); for (int i=0; i < tagArticleRelations.siz...
Removes tag-article relations by the specified article id and tag ids of the relations to be removed. <p> Removes all relations if not specified the tag ids. </p>
private static Credential authorize() throws Exception { GoogleClientSecrets clientSecrets=GoogleClientSecrets.load(JSON_FACTORY,new InputStreamReader(PlusSample.class.getResourceAsStream("/client_secrets.json"))); if (clientSecrets.getDetails().getClientId().startsWith("Enter") || clientSecrets.getDetails().getCli...
Authorizes the installed application to access user's protected data.
public Expression compile(int opPos) throws TransformerException { int op=getOp(opPos); Expression expr=null; switch (op) { case OpCodes.OP_XPATH: expr=compile(opPos + 2); break; case OpCodes.OP_OR: expr=or(opPos); break; case OpCodes.OP_AND: expr=and(opPos); break; case OpCodes.OP_NOTEQUALS: expr=notequals(o...
Execute the XPath object from a given opcode position.
public MyArrayList(){ }
Create a defalut list
public boolean shouldConnectTo(DiscoveryNode otherNode){ if (clientNode() && otherNode.clientNode()) { return false; } return true; }
Should this node form a connection to the provided node.
@Override public void refresh(){ googleMap.setZoom(googleMap.getZoom() + 1); googleMap.setZoom(googleMap.getZoom() - 1); }
Redraws the map
@Override protected void visit(final Object obj){ set[slot]=(ITuple<?>)(obj == NULL_VALUE ? null : obj); }
Assign tuple to set[slot]. Note: If [obj==NULL_VALUE] then no solutions for that slot.
@Override public List<String> hmget(final String key,final String... fields){ checkIsInMultiOrPipeline(); client.hmget(key,fields); return client.getMultiBulkReply(); }
Retrieve the values associated to the specified fields. <p> If some of the specified fields do not exist, nil values are returned. Non existing keys are considered like empty hashes. <p> <b>Time complexity:</b> O(N) (with N being the number of fields)
public Builder baseModelId(String baseModelId){ this.baseModelId=baseModelId; return this; }
Base model id.
@SideOnly(Side.CLIENT) public void changeYStart(int yStart){ this.unchangedYStart=yStart; }
Changes the starting coordinate
public void assertNotEqual(short expected,short actual,String errorMessage){ TestUtils.assertNotEqual(expected,actual,errorMessage); }
This method just invokes the test utils method, it is here for convenience
public static boolean deleteRecursive(File directory){ String canonicalParent; try { canonicalParent=getCanonicalPath(directory); } catch ( IOException ioe) { return false; } if (!directory.isDirectory()) return directory.delete(); File[] files=directory.listFiles(); for (int i=0; i < files.le...
Deletes all files in 'directory'. Returns true if this succesfully deleted every file recursively, including itself.