code
stringlengths
10
174k
nl
stringlengths
3
129k
public static void log(final IRule rule,final IRuleState ruleState,final JoinStats[] joinStats){ if (log.isInfoEnabled()) { log.info(JoinStats.toString(rule,ruleState,joinStats)); } }
Log distributed join execution statistics using a CSV format.
@Override public boolean isValid(){ return getItemStacks().size() > 0 || ore != null; }
Does this schema have ANY valid items?
public UpdateRequest add(final SolrInputDocument doc,Boolean overwrite){ return add(doc,null,overwrite); }
Add a SolrInputDocument to this request
@SuppressWarnings("unchecked") public static List<CORSRule> parseListBucketCORS(InputStream responseBody) throws ResponseParseException { try { Element root=getXmlRootElement(responseBody); List<CORSRule> corsRules=new ArrayList<CORSRule>(); List<Element> corsRuleElems=root.getChildren("CORSRule"); fo...
Unmarshall get bucket cors response body to cors rules.
public FROM FROM(@NonNull String tableName){ return new FROM(this,tableName); }
The sql FROM part to declare the table
private Collection<ScriptCommand> createSessionManagementPropertiesScripts(){ Collection<ScriptCommand> sessionManPropertiesCommands=new ArrayList<ScriptCommand>(); String sessManProps=getPropertyValue(WebSpherePropertySet.SESSION_MANAGEMENT_PROPERTIES); if (sessManProps != null && !sessManProps.isEmpty()) { ...
Create session management properties.
public XmlPullParser newPullParser() throws XmlPullParserException { if (parserClasses == null) throw new XmlPullParserException("Factory initialization was incomplete - has not tried " + classNamesLocation); if (parserClasses.size() == 0) throw new XmlPullParserException("No valid parser classes found in " + c...
Creates a new instance of a XML Pull Parser using the currently configured factory features.
protected void updateButtonState(){ getCancelButton().setEnabled(isEditable() & isEnabled()); getFindButton().setEnabled(isEnabled()); getPopupButton().setEnabled(isEnabled()); }
Enables the cancel action if this search field is editable and enabled, otherwise it will be disabled. Enabled the search action and popup button if this search field is enabled, otherwise it will be disabled.
@Override public String toString(){ return toString("=== Confusion Matrix ===\n"); }
Calls toString() with a default title.
@Override public IChunkedOrderedIterator<E> iterator(){ return iterator(0L,0L,0); }
Visits nothing.
@Override public ChatEvent parse(String text){ text=text.trim(); if (text.length() < 600) { if (text.startsWith(SHOUT_1)) { String name=text.substring(SHOUT_1.length()).trim(); RaptorStringTokenizer stringtokenizer=new RaptorStringTokenizer(name," "); String s1=IcsUtils.stripTitles(stringtoken...
Returns null if text does not match the event this class produces.
static boolean isType(Symbol sym){ return sym != null && sym.kind == TYP; }
Is this symbol a type?
public void writeGraphic(final CategoryHistogram modeData,final String filename,final String legMode){ try { ChartUtilities.saveChartAsPNG(new File(filename),getGraphic(modeData,legMode),1024,768); } catch ( IOException e) { e.printStackTrace(); } }
Writes a graphic showing the number of departures, arrivals and vehicles en route of all legs/trips with the specified transportation mode to the specified file.
@SuppressWarnings("unused") @Deprecated private static ArrayList<GPSPoint> sortTimeRadix(int maxT,ArrayList<GPSPoint> log){ final int RUNS=(int)Math.ceil(Math.log10(maxT - 1)); ; final int RADIX=10; ArrayList<ArrayList<GPSPoint>> buckets=new ArrayList<ArrayList<GPSPoint>>(RADIX); for (int i=0; i < RADIX; i++)...
This <i>RADIX</i> sorting method looked very cool, but turned out to be much slower. Probably because of the size of the sorting field, i.e. time.
public MinecraftDirectory(String rootDir){ this(new File(rootDir)); }
Creates a MinecraftDirectory with the given root directory.
public static Scenario loadScenarioFromPlans(String plansFile){ Config config=new Config(); config.addCoreModules(); config.plans().setInputFile(plansFile); Scenario scenario=ScenarioUtils.loadScenario(config); return scenario; }
Returns scenario containing only plans file location.
public static String toString(InputStream input,String encoding) throws IOException { return toString(input,Charsets.toCharset(encoding)); }
Get the contents of an <code>InputStream</code> as a String using the specified character encoding. <p> Character encoding names can be found at <a href="http://www.iana.org/assignments/character-sets">IANA</a>. <p> This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>.
public static boolean isViable(World worldObj,int x,int y,int z,int yoffset){ Block id=worldObj.getBlockState(new BlockPos(x,y,z)).getBlock(); if (id == Blocks.ladder && isPassableBlock(worldObj,x,y + 1,z)) { return true; } if (!isPassableBlock(worldObj,x,y,z) || !isPassableBlock(worldObj,x,y + 1,z)) { ...
Determines whether or not an AStarNode is traversable Checks if a 2 Block high nonblocked space exists with this Node as bottom Also checks if you can reach this node without your head passing through a solid overhang (vertical diagonal)
public FacebookGraphResponseException(GraphResponse graphResponse,String errorMessage){ super(errorMessage); this.graphResponse=graphResponse; }
Constructs a new FacebookGraphResponseException.
public void writeTo(OutputStream os) throws IOException { DataOutputStream dos=new DataOutputStream(os); dos.writeInt(N); dos.writeInt(q); dos.writeInt(d); dos.writeInt(d1); dos.writeInt(d2); dos.writeInt(d3); dos.writeInt(B); dos.writeInt(basisType); dos.writeDouble(beta); dos.writeDouble(normBou...
Writes the parameter set to an output stream
protected FloatOption(OptionSet set,String name,String desc,float defaultValue){ super(set,FLOAT_OPTION,name,desc); this.value=this.defaultValue=defaultValue; }
Create a new float option.
public int transformToActualPosition(int position){ return position % getActualItemCountFromAdapter(); }
Transform adapter position to actual position.
public ArrayVal(double[] values){ this.array=new double[values.length]; for (int i=0; i < array.length; i++) { array[i]=values[i]; } hashcode=Arrays.hashCode(array); }
Creates a new array of doubles
public ConnectUriManager(List<String> connectUri) throws THLException { this.uriList=connectUri; if (connectUri.size() == 0) { throw new THLException("Connect URI value is empty; must be a list of one or more THL URIs"); } }
Creates a new instance with a list of URIs.
private void showFeedback(String message){ if (myHost != null) { myHost.showFeedback(message); } else { System.out.println(message); } }
Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface.
private double[] arrayDifference(double[] array1,double[] array2){ double[] difference=new double[array1.length]; for (int i=0; i < array1.length; i++) { difference[i]=array1[i] - array2[i]; } return difference; }
Creates an array containing the differences of the entries of the given arrays.
public void testRecoveryAfterAnError0_Runtime() throws Exception { doTestRecoveryAfterAnError(0,HadoopErrorSimulator.Kind.Runtime); }
Tests recovery.
private boolean fixReplacementOffsetInString(PsiElement element,OffsetMap offsetMap){ int endCharIndex=StringUtils.indexOfAny(element.getText(),new char[]{'\n',' '}); if (endCharIndex > 0) { offsetMap.addOffset(IDENTIFIER_END_OFFSET,element.getTextOffset() + endCharIndex); return true; } return false; }...
In a completion like "$abc<caret> def" the element is a word psi lead element, in this case to not expand the autocompletion after the whitespace character https://code.google.com/p/bashsupport/issues/detail?id=51 a completion at the end of a line with an open string is parsed as string until the first quote in the nex...
public void subdivide(Segment s0,Segment s1){ Cubic c0=null, c1=null; if (s0 instanceof Cubic) c0=(Cubic)s0; if (s1 instanceof Cubic) c1=(Cubic)s1; subdivide(c0,c1); }
Subdivides this Cubic curve into two curves at t = 0.5. can be done with getSegment but this is more efficent.
public static List<Alert> findByPrefix(EntityManager em,String prefix){ requireArgument(em != null,"Entity Manager cannot be null"); requireArgument(prefix != null && !prefix.isEmpty(),"Cannot find alerts starting with null of empty prefix"); TypedQuery<Alert> query=em.createNamedQuery("Alert.findByPrefix",Alert....
Finds all alerts whose name starts with the given prefix.
@Override public void configureZone(final StendhalRPZone zone,final Map<String,String> attributes){ buildNPC(zone); }
Configure a zone.
public JButton(Action a){ this(); setAction(a); }
Creates a button where properties are taken from the <code>Action</code> supplied.
private FinalizeDeploymentMigrationWorkflowService.State buildValidStartState(@Nullable FinalizeDeploymentMigrationWorkflowService.TaskState.TaskStage startStage,@Nullable FinalizeDeploymentMigrationWorkflowService.TaskState.SubStage startSubStage) throws Throwable { FinalizeDeploymentMigrationWorkflowService.State s...
This method creates a new State object which is sufficient to create a new FinishDeploymentWorkflowService instance.
protected TFunctionImpl(){ super(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public LineFileDocs(Random random,String path) throws IOException { this.path=path; this.random=new Random(random.nextLong()); open(random); }
If forever is true, we rewind the file at EOF (repeat the docs over and over)
private double score(Vec x,boolean averaged){ double score=0; double denom=0; double finalScore=0; for (int i=0; i < supports.size(); i++) { double eta_s=signedEtas.get(i); double tmp=eta_s * K.eval(supports.get(i),x) / normalizers.get(i); double denom_tmp=2 * eta_s * associatedScores.get(i) + eta_s...
Computes the output of the summations of the input vector with the current weight vector as a recursive linear combination of all previous support vectors and their associated score values. <br> See Remark 5 in the original paper.
public boolean transformPushWhitelistTokenSending(@NonNull Message message,@NonNull String[] whitelistTokens){ String localUserId=message.getFrom().getAddress(); String remoteUserId=message.getTo().getAddress(); String body=message.getBody(); SessionID sessionId=getSessionId(localUserId,remoteUserId); try { ...
Create a message body describing the ChatSecure-Push Whitelist Token Exchange. See <a href="https://github.com/ChatSecure/ChatSecure-Push-Server/wiki/Chat-Client-Implementation-Notes#json-whitelist-token-exchange">JSON Whitelist Token Exchange</a>
public void ignorableWhitespace(char ch[],int start,int length) throws org.xml.sax.SAXException { if (!m_shouldProcess) return; getCurrentProcessor().ignorableWhitespace(this,ch,start,length); }
Receive notification of ignorable whitespace in element content.
static boolean containsTokenWithValue(final Token[] tokens,final Object value){ for ( final Token token : tokens) { if (token.getValue() == value) { return true; } } return false; }
Helper method to determine if a set of tokens contain a value
public long addSubscription(String url,@NonNull Provider.RefreshMode refreshMode) throws SubscriptionNotInsertedException { if (!url.toLowerCase().matches("^\\w+://.*")) { url="http://" + url; Log.w(TAG,"Feed download protocol defaults to http, new url: " + url); } long id=generateId(url); Cursor c=reso...
Add subscription to podcasts table
@Override public boolean equals(Object other){ if (other == this) return true; if (other == null) return false; if (!(other instanceof MembershipAttributes)) return false; final MembershipAttributes that=(MembershipAttributes)other; if (this.requiredRoles != that.requiredRoles && !(this.requiredRoles !=...
Indicates whether some other object is "equal to" this one.
public String createUrl(boolean createDB){ return getUrl(); }
Returns a JDBC URL that can be used for connections.
static void accumMultiSeg(int counts[],SortedSetDocValues si,DocIdSetIterator disi,int subIndex,OrdinalMap map) throws IOException { final int segCounts[]; if (map == null) { segCounts=counts; } else { segCounts=new int[1 + (int)si.getValueCount()]; } int doc; while ((doc=disi.nextDoc()) != DocIdSe...
"typical" multi-valued faceting: not too many unique values, no prefixing. maps to global ordinals as a separate step
private static String checkTfPath(final String exePath,final String[] exeNames){ if (StringUtils.isNotEmpty(exePath)) { for ( final String filename : exeNames) { final File tfFile=new File(exePath,filename); if (tfFile.exists()) { return tfFile.toString(); } } } return null; }...
Checks if the given path contains one of the given acceptable tf commands
public static Rect rect(double width,double height){ Rect rect=new Rect(); rect.xMax=(int)(width * SwfConstants.TWIPS_PER_PIXEL); rect.yMax=(int)(height * SwfConstants.TWIPS_PER_PIXEL); return rect; }
Creates a SWF Rect from double precision width and height (in pixels) that imply the top left corner (0.0, 0.0) and the bottom right corner (width, height). The values are converted into twips (1/20th of pixel) and rounded to an integer as required by the SWF format.
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.
private static void clone(final String remoteUri,final Path localClonePath,final String branch){ checkNotNull(remoteUri,"remoteUri"); checkNotNull(localClonePath,"clonePath"); checkNotNull(branch,"branch"); final File destinationFolder=localClonePath.toFile(); if (!destinationFolder.exists()) { try { ...
Clones a branch of a remote Git repository to the local file system.
public static int countWhitespacesAtTheBeginningOfLine(String text){ MatchResult result=RegExpUtils.findMatchAfterIndex(UnicodeUtils.regexpNotWhitespaceExcludingNewlineAndCarriageReturn,text,-1); return result == null ? text.length() : result.getIndex(); }
Counts number of whitespaces at the beginning of line.
public void updateVirtualMethod(RVMMethod m){ RVMMethod dm=findDeclaredMethod(m.getName(),m.getDescriptor()); if (dm != null && dm != m) return; updateTIBEntry(m); if (m.isPrivate()) return; for ( RVMClass sc : getSubClasses()) { if (sc.isResolved()) { sc.updateVirtualMethod(m); } } }
Update the TIB entry's for all classes that inherit the given method to point to the current compiled code for the given method.<p> NOTE: This method is intentionally not synchronized to avoid deadlocks. We instead rely on the fact that we are always updating the JTOC with the most recent instructions for the method.
public StoredGraphs search(){ TetradMatrix A, W; StoredGraphs graphs=new StoredGraphs(); try { long sTime=(new Date()).getTime(); boolean fastIca=true; if (fastIca) { W=getWFastIca(); System.out.println("W = " + W); graphs=findCandidateModels(dataSet.getVariables(),W,true); } el...
The search method is used to process LiNG. Call search when you want to run the algorithm.
protected double secureProduct(Vector v){ double sum=0; for (int i=0; i < v.dimension(); i++) sum+=components[i] * v.components[i]; return sum; }
Compute the scalar product (or dot product) of two vectors. No dimension checking is made.
public final void removeHelperTextColor(@ColorInt final int color){ int index=helperTextColors.indexOf(color); if (index != -1) { helperTextColors.remove(index); verifyPasswordStrength(); } }
Removes a specific helper text color, which should not be used to highlight the helper text, which indicates the password strength, anymore.
public String[] ignoreIndexSettings(){ return ignoreIndexSettings; }
Returns the list of index settings and index settings groups that shouldn't be restored from snapshot
public RandomGenerator(int numberOfObjectives,int numberOfPoints){ super(); this.numberOfObjectives=numberOfObjectives; this.numberOfPoints=numberOfPoints; }
Constructs a new weight generator that generates randomly-sampled weights.
public static List<Assignment> deserializeAssignmentList(final List<String> serializedList){ return deserializeAssignmentList(serializedList,false); }
De-serialize assignment list.
public long size(){ VirtualFile f=getVirtualFile(); return f == null ? 0 : f.size(); }
Return file size...
private void remove(TaggedLineString line,int start,int end){ for (int i=start; i < end; i++) { TaggedLineSegment seg=line.getSegment(i); inputIndex.remove(seg); } }
Remove the segs in the section of the line
public int indexOf(StrMatcher matcher){ return indexOf(matcher,0); }
Searches the string builder using the matcher to find the first match. <p> Matchers can be used to perform advanced searching behaviour. For example you could write a matcher to find the character 'a' followed by a number.
public boolean hasValue(){ return getValue() != null; }
Returns whether it has the value.
@Override protected EClass eStaticClass(){ return UmplePackage.eINSTANCE.getAnonymous_methodBody_1_(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public boolean paretoDominates(MultiObjectiveFitness other){ boolean abeatsb=false; if (objectives.length != other.objectives.length) throw new RuntimeException("Attempt made to compare two multiobjective fitnesses; but they have different numbers of objectives."); for (int x=0; x < objectives.length; x++) { ...
Returns true if I'm better than _fitness. The rule I'm using is this: if I am better in one or more criteria, and we are equal in the others, then betterThan is true, else it is false.
@SuppressWarnings({"deprecation"}) public static String post(SSLContext sslContext,String url,String contentType,String content) throws UtilException { org.apache.http.client.HttpClient httpClient=null; if (sslContext != null) { SSLConnectionSocketFactory sslsf=new SSLConnectionSocketFactory(sslContext,new Stri...
Description: <br>
private void handleOnOffSwitchClick(int idx,boolean action){ listener.onSwitchClick(idx,action); }
Handles the on/off switch click
public static void main(String[] args) throws Exception { new SPQRNodeServer().run(args); }
Ramps up the node server instance
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException { s.defaultReadObject(); int size=s.readInt(); header=new Entry(null,null,null); header.next=header.previous=header; for (int i=0; i < size; i++) add(s.readObject()); }
Reconstitute this <tt>LinkedList</tt> instance from a stream (that is deserialize it).
public static void assertEquals(String message,List<IOObject> expected,List<IOObject> actual){ assertSize(expected,actual); Iterator<IOObject> expectedIter=expected.iterator(); Iterator<IOObject> actualIter=actual.iterator(); int objectIndex=1; while (expectedIter.hasNext() && actualIter.hasNext()) { IOOb...
Tests if both list of ioobjects are equal.
private void informModuleNotification(final ViewNotificationContainer moduleViewNotificationContainer,final SQLProvider provider) throws CouldntLoadDataException { if (moduleViewNotificationContainer.getDatabaseOperation().equals("INSERT")) { final INaviModule module=moduleViewNotificationContainer.getNotificatio...
The inform function for notifications from the bn_module_views table. This function is used when a module view is created or deleted.
public static CharLiteralExpr escape(String string){ return new CharLiteralExpr(Utils.escapeEndOfLines(string)); }
Utility method that creates a new StringLiteralExpr. Escapes EOL characters.
public static Scs cs_permute(Scs A,int[] pinv,int[] q,boolean values){ int t, j, k, nz=0, m, n, Ap[], Ai[], Cp[], Ci[]; float Cx[], Ax[]; Scs C; if (!Scs_util.CS_CSC(A)) return (null); m=A.m; n=A.n; Ap=A.p; Ai=A.i; Ax=A.x; C=Scs_util.cs_spalloc(m,n,Ap[n],values && Ax != null,false); Cp=C.p; Ci...
Permutes a sparse matrix, C = PAQ.
public SourceMapper(IPath sourcePath,String rootPath,Map options,String encoding){ this.areRootPathsComputed=false; this.options=options; this.encoding=encoding; this.defaultEncoding="UTF-8"; if (rootPath != null) { this.rootPaths=new ArrayList(); this.rootPaths.add(rootPath); } this.sourcePath=so...
Creates a <code>SourceMapper</code> that locates source in the zip file at the given location in the specified package fragment root.
private String primaryStateToString(byte value){ switch (value) { case NO_PRIMARY_NOT_HOSTING: return "NO_PRIMARY_NOT_HOSTING"; case NO_PRIMARY_HOSTING: return "NO_PRIMARY_HOSTING"; case OTHER_PRIMARY_NOT_HOSTING: return "OTHER_PRIMARY_NOT_HOSTING"; case OTHER_PRIMARY_HOSTING: return "OTHER_PRIMARY_HOSTING"; case...
Returns string representation of the primary state value.
public synchronized Session createSession(User user){ Session session=new Session(this,user,++nextSessionId); userSessions.add(session); trace.info("create session #{0}",session.getId(),"engine"); return session; }
Create a session for the given user.
public RemoteMethodCallResults invokeAndWait(final String endPointName,final RemoteMethodCall remoteCall){ EndPoint local; synchronized (m_endPointMutex) { local=m_localEndPoints.get(endPointName); } if (local == null) { return invokeAndWaitRemote(remoteCall); } else { final long number=local.takeA...
Invoke and wait for all implementors on all vms to finish executing.
public void readFromClassPath(final String propertyFileLocation) throws ConfigurationException { properties=readPropertyFileFromClassPath(propertyFileLocation); }
Reads a property file into memory.
private Preconditions(){ }
No instances allowed.
@SuppressWarnings("rawtypes") public CIMObjectPath addZoneAlias(WBEMClient client,CIMInstance zoneServiceIns,String fabricId,String fabricWwn,ZoneWwnAlias alias) throws WBEMException { CIMObjectPath aliasPath=null; CIMArgument[] outargs=new CIMArgument[1]; CIMArgument[] inargs=new CIMArgument[1]; inargs[0]=_cim...
Create an instance of an alias object on the switch. The alias object can have a single member that has to be of type WWN. <p> This function will retry if the alias creation fails because the session is lost or timed out. The total number of tries is set to 2.
private static long seconds2000NoTZ(long millis){ DateTimeZone dtz=DateTimeZone.getDefault(); millis+=dtz.getOffset(millis); return millis / 1000 - 946684800; }
Adjust milliseconds since 1970-01-01 00:00:00-UTC to seconds since 2000-01-01 00:00:00 timezoneless. A conversion from local time to UTC involves an offset that varies for Summer time. A conversion from local time to timezoneless just removes the zone as though all days were the same length.
public static boolean isDragImageSupported(){ Toolkit t=Toolkit.getDefaultToolkit(); Boolean supported; try { supported=(Boolean)Toolkit.getDefaultToolkit().getDesktopProperty("DnD.isDragImageSupported"); return supported.booleanValue(); } catch ( Exception e) { return false; } }
Reports whether or not drag <code>Image</code> support is available on the underlying platform. <P>
private static void queryNextReminderAndSchedule(Cursor instancesCursor,Context context,ContentResolver contentResolver,AlarmManagerInterface alarmManager,int batchSize,long currentMillis){ if (AlertService.DEBUG) { int eventCount=instancesCursor.getCount(); if (eventCount == 0) { Log.d(TAG,"No events f...
Queries for all the reminders of the events in the instancesCursor, and schedules the alarm for the next upcoming reminder.
public boolean doesStandbyProdCopyExist(RecoverPointVolumeProtectionInfo volume){ try { ConsistencyGroupUID cgID=new ConsistencyGroupUID(); cgID.setId(volume.getRpVolumeGroupID()); ConsistencyGroupState state=functionalAPI.getGroupState(cgID); ConsistencyGroupSettings cgSettings=functionalAPI.getGroup...
Determines if the consistency group associated with the volume protection info contains a standby production copy.
public static boolean tryCancelUpdate(final QueryEngine queryEngine,RunningQuery query){ if (query != null) { final IRunningQuery q; try { q=queryEngine.getRunningQuery(query.getQueryUuid()); if (q != null && q.cancel(true)) { return true; } } catch ( RuntimeException ex) { ...
Attempt to cancel a running SPARQL UPDATE request.
public Expression locationPathPattern(int opPos) throws TransformerException { opPos=getFirstChildPos(opPos); return stepPattern(opPos,0,null); }
Compile a location match pattern unit expression.
private boolean readHeader() throws IOException { if (consecutiveLineBreaks > 1) { consecutiveLineBreaks=0; return false; } readName(); consecutiveLineBreaks=0; readValue(); return consecutiveLineBreaks > 0; }
Read a single line from the manifest buffer.
private void deleteCharacter(){ if (insertionPoint < buffer.length()) { buffer.deleteCharAt(insertionPoint); sendComposedText(); } else { beep(); } }
Delete the character following the insertion point in the composed text. If the insertion point is at the end of the composed text, ring the bell.
protected DefaultSelectorFactory(){ }
This class does not need to be instantiated.
private void connectTxSc1SerialDevice(SerialInterface serialInterface,FMountCircuit fMountCircuit,IoPort[] txIoPorts){ SerialDevice.interConnectSerialDevices(serialInterface,fMountCircuit); Pin.interconnect(txIoPorts[IoPort.PORT_I].getPin(3),fMountCircuit.getFromTXPin()); Pin.interconnect(txIoPorts[IoPort.PORT_J]...
Connect Tx serial interface SC1 with lens mount
void warning(String key,Object... args){ out.println(ownName + ": " + getLocalizedString(key,args)); }
Report a warning.
public boolean removeAll(Iterable<? extends Solution> iterable){ boolean changed=false; for ( Solution solution : iterable) { changed|=remove(solution); } return changed; }
Removes all solutions in the specified collection from this population.
public void put(String key,InputStream stream,String name,String contentType){ put(key,stream,name,contentType,autoCloseInputStreams); }
Adds an input stream to the request.
public Digest(boolean signed){ this.signed=signed; }
Create a signed or unsigned digest.
@Override public void onDestroy(){ unregisterReceiver(mPacManReceiver); PluginsLookup.getDefault().removeProviderListener(this); ProviderAggregator.getDefault().removeUpdateCallback(this); mRemoteMetadata.release(); mHandler.removeCallbacks(mPrefetcher); mPrefetcher.cancel(); mPrefetcher=null; if (mHasA...
Called when the service is destroyed
private void writeVarUInt(int v){ int offset=myOffset; if (v < (1 << (7 * 1))) { if (--offset < 0) { offset=growBuffer(offset); } myBuffer[offset]=(byte)(v | 0x80); } else if (v < (1 << (7 * 2))) { if ((offset-=2) < 0) { offset=growBuffer(offset); } myBuffer[offset]=(byte)(v...
Write a VarUInt field. VarUInts are sequence of bytes. The high-order bit of the last octet is one, indicating the end of the sequence. All other high-order bits must be zero. <p> Writes at least one byte, even for zero values. int parameter is enough as the scalar and container writers do not have APIs that return lon...
@SuppressWarnings("unchecked") @Override public void eSet(int featureID,Object newValue){ switch (featureID) { case GamlPackage.BLOCK__STATEMENTS: getStatements().clear(); getStatements().addAll((Collection<? extends Statement>)newValue); return; case GamlPackage.BLOCK__FUNCTION: setFunction((Expression)newValue)...
<!-- begin-user-doc --> <!-- end-user-doc -->
public int doFinal(byte[] out,int outOff) throws DataLengthException, IllegalStateException, InvalidCipherTextException { if (bufOff + outOff > out.length) { throw new DataLengthException("output buffer to small in doFinal"); } int blockSize=cipher.getBlockSize(); int len=bufOff - blockSize; byte[] block=...
Process the last block in the buffer.
private boolean isExpression(Instruction inst){ if (inst.isDynamicLinkingPoint()) return false; switch (inst.operator().format) { case InstructionFormat.Unary_format: case InstructionFormat.GuardedUnary_format: case InstructionFormat.Binary_format: case InstructionFormat.GuardedBinary_format: case InstructionFormat...
Does the instruction compute some expression?
private String createSubQueryUdocsNotInEliminacion(DbColumnDef idElementoCuadro,String subQueryIdsUdocConservar){ StringBuffer select=new StringBuffer(); TableDef tablaUdocDeposito=new TableDef(UDocEnUiDepositoDbEntityImpl.TABLE_NAME,UDocEnUiDepositoDbEntityImpl.TABLE_NAME); TableDef tablaUiDeposito=new TableDef(...
Genera la subconsulta para descartar las unidades documentales que cumplen ciertas condiciones
protected void writeFactoriesAddition(final StringBuilder sb,final Map<String,String> factoryMap){ if (factoryMap == null || factoryMap.isEmpty()) { return; } sb.append(in); sb.append("_factories("); for ( final String key : factoryMap.keySet()) { final String[] segments=key.split("\\$"); final S...
All the factories are written at once, in order to initialize them
@SuppressWarnings("unchecked") public static <T>EmitterInterfaceInfo<T> forInterface(Class<? extends T> iface){ return (EmitterInterfaceInfo<T>)cache.computeIfAbsent(iface,null); }
Get event interface information from the supplied interface. This method is cached.
private void generateAfterBodyCall(String method){ loadHookDispatcher(); swap(); push(methodId); dup2X1(); pop2(); if (isStatic) { pushNull(); } else { loadThis(); } swap(); loadArgArray(); swap(); mv.visitMethodInsn(Opcodes.INVOKEINTERFACE,IInstrumenterConstant.IHOOK_DISPATCHER_INTERNA...
Generates code for the after body call. This method expects the result of the method call on the stack that can be consumed.
public void testLiangFigure6(){ int[] a={0,0,0,0,1,1,1,1}; int[] b={0,0,1,1,0,0,1,1}; int[] c={0,1,0,1,0,1,0,1}; int[] ap={0,0,1,1,0,0,1,1}; int[] bp={0,1,0,1,1,1,1,1}; int[] cp={0,0,0,1,0,1,1,1}; for (int i=0; i < ntimes - 1; i++) { cases[i][0]=a[i]; cases[i][1]=b[i]; cases[i][2]=c[i]; ca...
Tests whether the calculations in Liang, Figure 6 come out to the correct values.