code
stringlengths 10
174k
| nl
stringlengths 3
129k
|
|---|---|
public static void grantOrganizationRoles(DataService mgr,Organization org,OrganizationRoleType... roles) throws NonUniqueBusinessKeyException {
for ( OrganizationRoleType role : roles) {
if (!org.hasRole(role)) {
addOrganizationToRole(mgr,org,role);
}
}
}
|
Adds the given organization role to the given organization, in case it does not have this role yet.
|
public boolean isCollection(){
return label.isCollection();
}
|
This is used to determine if the label is a collection. If the label represents a collection then any original assignment to the field or method can be written to without the need to create a new collection. This allows obscure collections to be used and also allows initial entries to be maintained.
|
public void addInterface(AbstractInterfaceType type){
addInterfaceNoBidirectionalUpdate(type);
type.addRealizingClassNoBidirectionalUpdate(this);
}
|
Adds a class that is annotated with this annotation and ensures that the back-reference on the referred entity is set as well.
|
private void findBoundsByIteration(){
this.minX=Double.NaN;
this.maxX=Double.NaN;
this.minY=Double.NaN;
this.maxY=Double.NaN;
Iterator iterator=this.data.iterator();
while (iterator.hasNext()) {
XYDataItem item=(XYDataItem)iterator.next();
updateBoundsForAddedItem(item);
}
}
|
Finds the bounds of the x and y values for the series, by iterating through all the data items.
|
public final void yyreset(java.io.Reader reader) throws java.io.IOException {
zzBuffer=s.array;
zzStartRead=s.offset;
zzEndRead=zzStartRead + s.count - 1;
zzCurrentPos=zzMarkedPos=s.offset;
zzLexicalState=YYINITIAL;
zzReader=reader;
zzAtEOF=false;
}
|
Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream <b>cannot</b> be reused (internal buffer is discarded and lost). Lexical state is set to <tt>YY_INITIAL</tt>.
|
public AvgProjectionExpression(boolean isDistinct){
this.distinct=isDistinct;
}
|
Ctor - for use to create an expression tree, without inner expression
|
public boolean isThumbnailCompressed(){
return mData.hasCompressedThumbnail();
}
|
Check if thumbnail is compressed.
|
private void log(LogLevel eventLevel,String message,Throwable cause){
switch (eventLevel) {
case TRACE:
logger.trace(message,cause);
return;
case DEBUG:
logger.debug(message,cause);
return;
case INFO:
logger.info(message,cause);
return;
case WARN:
logger.warn(message,cause);
return;
case ERROR:
logger.error(message,cause);
return;
default :
return;
}
}
|
Log if the logger and the current event log level are compatible. We log a message and an exception.
|
public String toString(){
String result="\nBias-Variance Decomposition\n";
if (getClassifier() == null) {
return "Invalid setup";
}
result+="\nClassifier : " + getClassifier().getClass().getName();
if (getClassifier() instanceof OptionHandler) {
result+=Utils.joinOptions(((OptionHandler)m_Classifier).getOptions());
}
result+="\nData File : " + getDataFileName();
result+="\nClass Index : ";
if (getClassIndex() == 0) {
result+="last";
}
else {
result+=getClassIndex();
}
result+="\nTraining Pool: " + getTrainPoolSize();
result+="\nIterations : " + getTrainIterations();
result+="\nSeed : " + getSeed();
result+="\nError : " + Utils.doubleToString(getError(),6,4);
result+="\nSigma^2 : " + Utils.doubleToString(getSigma(),6,4);
result+="\nBias^2 : " + Utils.doubleToString(getBias(),6,4);
result+="\nVariance : " + Utils.doubleToString(getVariance(),6,4);
return result + "\n";
}
|
Returns description of the bias-variance decomposition results.
|
public double readDouble(){
return Double.longBitsToDouble(readLong());
}
|
Reads the next eight bytes as a 64-bit floating point value.
|
private String findCameraId(Facing facing){
if (facing == Facing.FRONT) {
return findFirstFrontCameraId();
}
else {
return findFirstBackCameraId();
}
}
|
Returns the ID of the first camera facing the given direction.
|
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:47.077 -0500",hash_original_method="3A0BDE86F44AAAE489AB1403F9B488D7",hash_generated_method="A33312CA1EC96ADA3F27F09206D257AA") protected HttpResponse doSendRequest(final HttpRequest request,final HttpClientConnection conn,final HttpContext context) throws IOException, HttpException {
if (request == null) {
throw new IllegalArgumentException("HTTP request may not be null");
}
if (conn == null) {
throw new IllegalArgumentException("HTTP connection may not be null");
}
if (context == null) {
throw new IllegalArgumentException("HTTP context may not be null");
}
HttpResponse response=null;
context.setAttribute(ExecutionContext.HTTP_REQ_SENT,Boolean.FALSE);
conn.sendRequestHeader(request);
if (request instanceof HttpEntityEnclosingRequest) {
boolean sendentity=true;
final ProtocolVersion ver=request.getRequestLine().getProtocolVersion();
if (((HttpEntityEnclosingRequest)request).expectContinue() && !ver.lessEquals(HttpVersion.HTTP_1_0)) {
conn.flush();
int tms=request.getParams().getIntParameter(CoreProtocolPNames.WAIT_FOR_CONTINUE,2000);
if (conn.isResponseAvailable(tms)) {
response=conn.receiveResponseHeader();
if (canResponseHaveBody(request,response)) {
conn.receiveResponseEntity(response);
}
int status=response.getStatusLine().getStatusCode();
if (status < 200) {
if (status != HttpStatus.SC_CONTINUE) {
throw new ProtocolException("Unexpected response: " + response.getStatusLine());
}
response=null;
}
else {
sendentity=false;
}
}
}
if (sendentity) {
conn.sendRequestEntity((HttpEntityEnclosingRequest)request);
}
}
conn.flush();
context.setAttribute(ExecutionContext.HTTP_REQ_SENT,Boolean.TRUE);
return response;
}
|
Send a request over a connection. This method also handles the expect-continue handshake if necessary. If it does not have to handle an expect-continue handshake, it will not use the connection for reading or anything else that depends on data coming in over the connection.
|
public DLVRecord(Name name,int dclass,long ttl,int footprint,int alg,int digestid,byte[] digest){
super(name,Type.DLV,dclass,ttl);
this.footprint=checkU16("footprint",footprint);
this.alg=checkU8("alg",alg);
this.digestid=checkU8("digestid",digestid);
this.digest=digest;
}
|
Creates a DLV Record from the given data
|
public FeatureParsingException(String message,Throwable cause){
super(message,cause);
}
|
Constructs new FeatureParsingException with a String message and a Throwable cause.
|
public MutableVisionWorldModel(){
super();
this.pixelMatrix=EMPTY_PIXEL_MATRIX;
this.sensorMatrix=EMPTY_SENSOR_MATRIX;
}
|
Create a new mutable vision world model.
|
@Transactional public void delete(Object inputParam,User currentUser) throws Exception {
T po=findByIdParam(inputParam);
BeanUtils.copyPropertiesIgnoreNull(inputParam,po);
Field lastModifiedByField=po.getClass().getDeclaredField(CommonsConstant.LAST_MODIFIED_BY);
lastModifiedByField.setAccessible(true);
lastModifiedByField.set(po,currentUser.getId());
Field lastModifiedDateField=po.getClass().getDeclaredField(CommonsConstant.LAST_MODIFIED_DATE);
lastModifiedDateField.setAccessible(true);
lastModifiedDateField.set(po,new Date());
logHelper.logUsersOperations(OperationType.DELETE,getClassT().getName(),currentUser);
repository.save(setInvalid(po));
}
|
Delete <T>, update valid flag to invalid.
|
protected Utils(){
throw new RuntimeException("Non instantiable");
}
|
Makes this class non instantiable, but still let's others inherit from it.
|
public WeightMatrixViewer(NetworkPanel panel){
ArrayList<Neuron> sourceList=panel.getSourceModelNeurons();
ArrayList<Neuron> targetList=panel.getSelectedModelNeurons();
init(sourceList,targetList,panel);
}
|
Create a panel for viewing the matrices connecting a set of source and target neuron lists.
|
public ByteVector putByteArray(final byte[] b,final int off,final int len){
if (length + len > data.length) {
enlarge(len);
}
if (b != null) {
System.arraycopy(b,off,data,length,len);
}
length+=len;
return this;
}
|
Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if necessary.
|
public static byte[] decode(byte[] source,int off,int len) throws Base64DecoderException {
return decode(source,off,len,DECODABET);
}
|
Decodes Base64 content in byte array format and returns the decoded byte array.
|
public Scriptable construct(Context cx,Scriptable scope,Object[] args){
if (obj == null) {
Delegator n=newInstance();
Scriptable delegee;
if (args.length == 0) {
delegee=new NativeObject();
}
else {
delegee=ScriptRuntime.toObject(cx,scope,args[0]);
}
n.setDelegee(delegee);
return n;
}
else {
return ((Function)obj).construct(cx,scope,args);
}
}
|
Note that if the <code>delegee</code> is <code>null</code>, this method creates a new instance of the Delegator itself rathert than forwarding the call to the <code>delegee</code>. This permits the use of Delegator prototypes.
|
public NfcFileOutputStream putFile(String dsPath,long fileSize) throws IOException {
return this.putFile(dsPath,fileSize,false);
}
|
Open a PUT_FILE session to upload a raw file.
|
protected <T extends SpatialComparable>int pivotizeList1D(List<T> objs,int start,int end,int dim,double threshold,boolean desc){
threshold=2 * threshold;
int s=start, e=end;
while (s < e) {
if (!desc) {
double sminmax=getMinPlusMaxObject(objs,s,dim);
while ((sminmax < threshold) && s + 1 <= e && s + 1 < end) {
s++;
sminmax=getMinPlusMaxObject(objs,s,dim);
}
double eminmax=getMinPlusMaxObject(objs,e - 1,dim);
while ((eminmax >= threshold) && s < e - 1 && start < e - 1) {
e--;
eminmax=getMinPlusMaxObject(objs,e - 1,dim);
}
}
else {
double sminmax=getMinPlusMaxObject(objs,s,dim);
while ((sminmax > threshold) && s + 1 <= e && s + 1 < end) {
s++;
sminmax=getMinPlusMaxObject(objs,s,dim);
}
double eminmax=getMinPlusMaxObject(objs,e - 1,dim);
while ((eminmax <= threshold) && s < e - 1 && start < e - 1) {
e--;
eminmax=getMinPlusMaxObject(objs,e - 1,dim);
}
}
if (s >= e) {
assert (s == e);
break;
}
objs.set(s,objs.set(e - 1,objs.get(s)));
s++;
e--;
}
return e;
}
|
"Pivotize" the list, such that all elements before the given position are less than, all elements after the position are larger than the threshold value in the given dimension. (desc inverts the sorting!) Only the elments in the interval <tt>[start: end[</tt> are sorted!
|
private Pointer(NativePointerObject pointers[]){
buffer=null;
this.pointers=pointers;
byteOffset=0;
}
|
Creates a Pointer to the given array of pointers
|
static List<GeoPoint> filterEdges(final List<GeoPoint> noIdenticalPoints,final double leniencyValue){
for (int i=0; i < noIdenticalPoints.size(); i++) {
final SafePath startPath=new SafePath(null,noIdenticalPoints.get(i),i,null);
final SafePath resultPath=findSafePath(startPath,noIdenticalPoints,getLegalIndex(i + 1,noIdenticalPoints.size()),i,leniencyValue);
if (resultPath != null && resultPath.previous != null) {
final List<GeoPoint> rval=new ArrayList<>(noIdenticalPoints.size());
resultPath.fillInList(rval);
return rval;
}
}
return null;
}
|
Filter coplanar points.
|
protected boolean isNameUniqueForType(String typeId,String name){
return !model.getListOfUniqueNamesForType(typeId).contains(name);
}
|
Checks if the given name is unique for the specified type.
|
protected static boolean branchProbability(double p,boolean cond){
return GraalDirectives.injectBranchProbability(p,cond);
}
|
Inject a probability for a branch condition into the profiling information of this test case.
|
public boolean hasAttribute(String name){
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return false;
}
|
Unimplemented. See org.w3c.dom.Element
|
public static double[] clone(final double[] array){
if (array == null) {
return null;
}
return array.clone();
}
|
<p>Clones an array returning a typecast result and handling <code>null</code>.</p> <p>This method returns <code>null</code> for a <code>null</code> input array.</p>
|
public AsyncResult CancelAsync(RequestHeader RequestHeader,UnsignedInteger RequestHandle){
CancelRequest req=new CancelRequest(RequestHeader,RequestHandle);
return channel.serviceRequestAsync(req);
}
|
Asynchronous Cancel service request.
|
public static void checkReplicationGroupAccessibleOrFail(StorageSystem storage,BlockObject replica,DbClient dbClient,SmisCommandHelper helper,CIMObjectPathFactory cimPath) throws Exception {
BlockConsistencyGroup blockConsistencyGroup=dbClient.queryObject(BlockConsistencyGroup.class,replica.getConsistencyGroup());
String deviceName=ConsistencyGroupUtils.getSourceConsistencyGroupName(replica,dbClient);
String label=blockConsistencyGroup.getLabel();
CIMObjectPath path=cimPath.getReplicationGroupPath(storage,deviceName);
CIMInstance instance=helper.checkExists(storage,path,false,false);
if (instance == null) {
String msg=String.format("ReplicationGroup %s was not found on provider %s. " + "It may have already been deleted, or check SMI-S providers for connection issues or failover.",deviceName,storage.getActiveProviderURI());
_log.warn(msg);
throw DeviceControllerException.exceptions.consistencyGroupNotFoundForProvider(deviceName,label,storage.getSmisProviderIP());
}
}
|
Checks that the replication group is accessible from this storage system, using its currently active storage provider.
|
public void updateFrom(MDepreciationWorkfile wk){
setA_Asset_Cost(wk.getA_Asset_Cost());
setA_Accumulated_Depr(wk.getA_Accumulated_Depr());
setA_Accumulated_Depr_F(wk.getA_Accumulated_Depr_F());
setUseLifeMonths(wk.getUseLifeMonths());
setUseLifeMonths_F(wk.getUseLifeMonths_F());
setA_Asset_Remaining(wk.getA_Asset_Remaining());
setA_Asset_Remaining_F(wk.getA_Asset_Remaining_F());
}
|
Update fields from asset workfile
|
protected CCLabel(CharSequence string,final CGSize dimensions,TextAlignment alignment,String name,float size){
super();
_dimensions=dimensions;
_alignment=alignment;
_fontName=name;
_fontSize=size;
setString(string);
}
|
initializes the CCLabel with a font name, alignment, dimension and font size
|
public boolean hasReview(){
return hasExtension(Review.class);
}
|
Returns whether it has the review.
|
public void testGetRandomAccess(){
Multimap<String,Integer> multimap=create();
multimap.put("foo",1);
multimap.put("foo",3);
assertThat(multimap.get("foo")).isNotInstanceOf(RandomAccess.class);
assertThat(multimap.get("bar")).isNotInstanceOf(RandomAccess.class);
}
|
Confirm that get() returns a List that doesn't implement RandomAccess.
|
public TraceFor_ createTraceFor_(){
TraceFor_Impl traceFor_=new TraceFor_Impl();
return traceFor_;
}
|
<!-- begin-user-doc --> <!-- end-user-doc -->
|
public static final Criterion sizeLessThan(long value){
return new SizeCriterion(new NumericOperator(value,NumericComparator.LESS_THAN));
}
|
Creates a filter for message size less than the given value
|
LinkedList<TrieNode<T>> makeSuffixChain(TrieNode<T> root,String suffix,T value){
LinkedList<TrieNode<T>> result=new LinkedList<>();
String rootPrefix=root.getPrefix();
for (int i=1, suffixSize=suffix.length(); i <= suffixSize; i++) {
String newPrefix=rootPrefix + suffix.substring(0,i);
TrieNode<T> newNode=TrieNode.makeNode(newPrefix);
result.add(newNode);
root.addChild(newNode);
root=newNode;
}
root.setValue(value);
return result;
}
|
Inserts a chain of children into the given node.
|
protected final void clearTileEntityBuffer(){
for (int i=0; i < mBufferedTileEntities.length; i++) mBufferedTileEntities[i]=null;
}
|
Called automatically when the Coordinates of this TileEntity have been changed
|
public static InputStream post(URL url,String name1,Object value1,String name2,Object value2) throws IOException {
return new ClientHttpRequest(url).post(name1,value1,name2,value2);
}
|
post the POST request to specified URL, with the specified parameters
|
@Override public String toString(){
StringBuffer sb=new StringBuffer("MViewColumn[").append(get_ID()).append("-").append(getName()).append("]");
return sb.toString();
}
|
String representation
|
public void handleOneIncomingReply() throws java.io.IOException {
AbstractMRReply msg=newReply();
loadChars(msg,istream);
if (mLastSentMessage != null) {
if (mLastSentMessage.isForChildBoard()) {
if (log.isDebugEnabled()) {
log.debug("This is a message for a child board " + ((Dcc4PcReply)msg).toHexString());
log.debug("Originate " + (mLastMessage).toHexString());
}
if ((mLastSentMessage.getNumDataElements() - 1) == msg.getElement(1)) {
log.debug("message lengths match");
waitingForMore=true;
try {
Thread.sleep(10);
}
catch ( Exception ex) {
log.debug(ex.getLocalizedMessage(),ex);
}
lastIncomplete=null;
forwardToPort(Dcc4PcMessage.getResponse());
return;
}
else {
if (log.isDebugEnabled()) {
log.debug("Not all of the command was sent, we need to figure out a way to resend the bits");
log.debug("Original Message length " + mLastSentMessage.getNumDataElements());
log.debug("What CID has procced in size " + (byte)msg.getElement(1));
log.debug("Reply is in error " + ((Dcc4PcReply)msg).toHexString());
}
}
}
else if (mLastSentMessage.getElement(0) == 0x0C) {
if (log.isDebugEnabled()) {
log.debug("last message was a get response " + ((Dcc4PcReply)msg).toHexString());
}
if (msg.getElement(0) == Dcc4PcReply.SUCCESS) {
((Dcc4PcReply)msg).strip();
if (lastIncomplete != null) {
if (msg.getNumDataElements() != 0) {
int iOrig=lastIncomplete.getNumDataElements();
int iNew=0;
while (iNew < msg.getNumDataElements()) {
lastIncomplete.setElement(iOrig,msg.getElement(iNew));
iOrig++;
iNew++;
}
}
msg=lastIncomplete;
}
((Dcc4PcReply)msg).setError(false);
lastIncomplete=null;
waitingForMore=false;
mLastMessage=null;
mLastSentMessage=null;
}
else if (msg.getElement(0) == Dcc4PcReply.INCOMPLETE) {
waitingForMore=true;
((Dcc4PcReply)msg).strip();
if (lastIncomplete != null) {
if (msg.getNumDataElements() != 0) {
int iOrig=lastIncomplete.getNumDataElements();
int iNew=0;
while (iNew < msg.getNumDataElements()) {
lastIncomplete.setElement(iOrig,msg.getElement(iNew));
iOrig++;
iNew++;
}
}
}
else if (msg.getNumDataElements() > 1) {
lastIncomplete=(Dcc4PcReply)msg;
}
forwardToPort(Dcc4PcMessage.getResponse());
return;
}
else {
log.debug("Reply is an error mesage");
((Dcc4PcReply)msg).setError(true);
mLastMessage.setRetries(mLastMessage.getRetries() - 1);
if (mLastMessage.getRetries() >= 0) {
synchronized (xmtRunnable) {
mCurrentState=AUTORETRYSTATE;
replyInDispatch=false;
xmtRunnable.notify();
}
return;
}
}
}
}
else {
log.debug("Last message sent was null " + ((Dcc4PcReply)msg).toHexString());
}
replyInDispatch=true;
if (log.isDebugEnabled()) {
log.debug("dispatch reply of length " + msg.getNumDataElements() + " contains "+ msg.toString()+ " state "+ mCurrentState);
}
Runnable r=newRcvNotifier(msg,mLastSender,this);
try {
javax.swing.SwingUtilities.invokeAndWait(r);
}
catch ( Exception e) {
log.error("Unexpected exception in invokeAndWait:" + e);
e.printStackTrace();
}
if (log.isDebugEnabled()) {
log.debug("dispatch thread invoked");
}
if (!msg.isUnsolicited()) {
switch (mCurrentState) {
case WAITMSGREPLYSTATE:
{
if (msg.isRetransmittableErrorMsg()) {
if (log.isDebugEnabled()) {
log.debug("Automatic Recovery from Error Message: " + msg.toString());
}
synchronized (xmtRunnable) {
mCurrentState=AUTORETRYSTATE;
replyInDispatch=false;
xmtRunnable.notify();
}
}
else {
synchronized (xmtRunnable) {
mCurrentState=NOTIFIEDSTATE;
replyInDispatch=false;
xmtRunnable.notify();
}
}
break;
}
case WAITREPLYINPROGMODESTATE:
{
mCurrentMode=PROGRAMINGMODE;
replyInDispatch=false;
int warmUpDelay=enterProgModeDelayTime();
if (warmUpDelay != 0) {
try {
synchronized (xmtRunnable) {
xmtRunnable.wait(warmUpDelay);
}
}
catch ( InterruptedException e) {
Thread.currentThread().interrupt();
}
}
synchronized (xmtRunnable) {
mCurrentState=OKSENDMSGSTATE;
xmtRunnable.notify();
}
break;
}
case WAITREPLYINNORMMODESTATE:
{
mCurrentMode=NORMALMODE;
replyInDispatch=false;
synchronized (xmtRunnable) {
mCurrentState=OKSENDMSGSTATE;
xmtRunnable.notify();
}
break;
}
default :
{
replyInDispatch=false;
log.error("reply complete in unexpected state: " + mCurrentState + " was "+ msg.toString());
}
}
}
else {
if (log.isDebugEnabled()) {
log.debug("Unsolicited Message Received " + msg.toString());
}
replyInDispatch=false;
}
}
|
Handle each reply when complete. <P> (This is public for testing purposes) Runs in the "Receive" thread.
|
public Timestamp(Date stamp){
this(stamp,DEFAULT_FORMAT);
}
|
creates a timestamp with the given date and the default format.
|
public void addClass(ClassInterface clazz){
classes.add(clazz);
}
|
add class to current file
|
@EventHandler(ignoreCancelled=true) public void onEntityCombustByBlock(EntityCombustByBlockEvent event){
if (event.getEntity() instanceof Player && !canInteract((Player)event.getEntity())) {
event.getEntity().setFireTicks(0);
}
}
|
Prevents a player that can't interact from being set on fire.
|
public static void copyMatrix(double[][] original,double[][] copy){
for (int i=0; i < original.length; i++) {
for (int j=0; j < original[i].length; j++) {
copy[i][j]=original[i][j];
}
}
}
|
copyMatrix copies all the elements in the original matrix to the copy
|
protected String readResponseLine() throws IOException {
String line=readLine();
if (line != null) {
int n=line.indexOf(' ');
if (n != -1) {
line="HTTP/1.0" + line.substring(n);
}
}
return line;
}
|
Reads the first response line.
|
public String toString(){
try {
return to_simple_string();
}
catch ( internal_error e) {
e.crash();
return null;
}
}
|
Convert to a string
|
public static final int myUserId(){
return getUserId(Process.myUid());
}
|
Returns the user id of the current process
|
public InputStream findResource(String filename){
File f=new File(filename);
if (!f.exists()) return super.findResource(filename);
try {
return new FileInputStream(f);
}
catch ( IOException ioe) {
return null;
}
}
|
Try to open a file in the current working directory, or fall back to base opener if not found. This implementation attempts to open the file using new File(filename). It falls back to the base implementation that looks it up as a resource in the class path if not found as a plain file.
|
@SuppressWarnings({"rawtypes","unchecked"}) @Test public void testNodeProcessing() throws Exception {
HashMapToKeyValPair oper=new HashMapToKeyValPair();
CountTestSink keySink=new CountTestSink();
CountTestSink valSink=new CountTestSink();
CountTestSink keyvalSink=new CountTestSink();
oper.key.setSink(keySink);
oper.val.setSink(valSink);
oper.keyval.setSink(keyvalSink);
oper.beginWindow(0);
HashMap<String,String> input=new HashMap<String,String>();
input.put("a","1");
int numtuples=1000;
for (int i=0; i < numtuples; i++) {
oper.data.process(input);
}
oper.endWindow();
Assert.assertEquals("number emitted tuples",numtuples,keySink.count);
Assert.assertEquals("number emitted tuples",numtuples,valSink.count);
Assert.assertEquals("number emitted tuples",numtuples,keyvalSink.count);
}
|
Test oper pass through. The Object passed is not relevant
|
@Override public void translate(final ITranslationEnvironment environment,final IInstruction instruction,final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment,instruction,instructions,"USUB16");
translateAll(environment,instruction,"USUB16",instructions);
}
|
USUB16{<cond>} <Rd>, <Rn>, <Rm> Operation: if ConditionPassed(cond) then Rd[15:0] = Rn[15:0] - Rm[15:0] GE[1:0] = if BorrowFrom(Rn[15:0] - Rm[15:0]) then 0 else 0b11 Rd[31:16] = Rn[31:16] - Rm[31:16] GE[3:2] = if BorrowFrom(Rn[31:16] - Rm[31:16]) then 0 else 0b11
|
public InlineQueryResultPhoto.InlineQueryResultPhotoBuilder photoWidth(int photoWidth){
this.photo_width=photoWidth;
return this;
}
|
*Optional Sets the width of the photo for the result
|
public boolean isLoggedIn(){
return m_loggedIn;
}
|
Is User Logged in
|
public static int toIPv4Address(String ipAddress){
if (ipAddress == null) throw new IllegalArgumentException("Specified IPv4 address must" + "contain 4 sets of numerical digits separated by periods");
String[] octets=ipAddress.split("\\.");
if (octets.length != 4) throw new IllegalArgumentException("Specified IPv4 address must" + "contain 4 sets of numerical digits separated by periods");
int result=0;
for (int i=0; i < 4; ++i) {
int oct=Integer.valueOf(octets[i]);
if (oct > 255 || oct < 0) throw new IllegalArgumentException("Octet values in specified" + " IPv4 address must be 0 <= value <= 255");
result|=oct << ((3 - i) * 8);
}
return result;
}
|
Accepts an IPv4 address of the form xxx.xxx.xxx.xxx, ie 192.168.0.1 and returns the corresponding 32 bit integer.
|
public StateMachineConfigurationConfigurer<S,E> configureConfiguration(){
return adapter.configurationBuilder;
}
|
Configure configuration.
|
public JSONArray put(int index,double value) throws JSONException {
put(index,new Double(value));
return this;
}
|
Put or replace a double value. If the index is greater than the length of the JSONArray, then null elements will be added as necessary to pad it out.
|
public synchronized void addSchemaObject(SchemaObject obj){
obj.getSchema().add(obj);
}
|
Add a schema object to the database.
|
public static void checkExplanations(Query query,String defaultFieldName,IndexSearcher searcher) throws IOException {
checkExplanations(query,defaultFieldName,searcher,false);
}
|
Asserts that the explanation value for every document matching a query corresponds with the true score.
|
protected boolean isOutside(MutableCoord P1,MutableCoord P2,MutableCoord P3){
double minx=Math.min(P1.getX(),P2.getX()), miny=Math.min(P1.getY(),P2.getY());
double maxx=Math.max(P1.getX(),P2.getX()), maxy=Math.max(P1.getY(),P2.getY());
double x=P3.getX(), y=P3.getY();
if (x >= minx && x <= maxx && y >= miny && y <= maxy) return false;
else return true;
}
|
Test whether the point P3 is inside the bounding box of the segment formed by points P1 and P2
|
public LocalityTrackingGetJobsBuilder withNodeSwitching(long nodeReconnectCheckInterval,TimeUnit nodeReconnectCheckTimeUnit){
withReconnect=true;
this.interval=nodeReconnectCheckInterval;
this.timeUnit=nodeReconnectCheckTimeUnit;
return this;
}
|
Enables the periodic node switching based on the
|
public GradientBarPainter(double g1,double g2,double g3){
this.g1=g1;
this.g2=g2;
this.g3=g3;
}
|
Creates a new instance.
|
public int[][] generateNRandomSetsNoOverlap(int n,int p,int N,int[][] setsToAvoidOverlapWith){
int[][] distinctSets=generateDistinctRandomSets(n,p,N,setsToAvoidOverlapWith);
if (distinctSets.length == N) {
return distinctSets;
}
else if (distinctSets.length > N) {
throw new RuntimeException("generateDistinctRandomSets generated more than " + N + " distinct sets when asked for "+ N+ "; note n="+ n+ " p="+ p);
}
int[][] randomSets=new int[N][];
for (int i=0; i < N; i++) {
randomSets[i]=distinctSets[random.nextInt(distinctSets.length)];
}
return randomSets;
}
|
Generate exactly N sets of p integers chosen from [0..n-1]. Make sure that set i does not have any integers overlapping with set i from setsToAvoidOverlapWith.
|
public boolean isSmscDelReceiptFailureRequested(){
return isSmscDelReceiptFailureRequested(registeredDelivery);
}
|
SMSC Delivery Receipt.
|
public ClipData(ClipData other){
mClipDescription=other.mClipDescription;
mIcon=other.mIcon;
mItems=new ArrayList<Item>(other.mItems);
}
|
Create a new clip that is a copy of another clip. This does a deep-copy of all items in the clip.
|
public boolean isPersistent(){
return persistent;
}
|
Check if the referenced database is persistent.
|
public List<G> loadMultiple(String filename,Supplier<G> graph_factory) throws IOException {
return loadMultiple(new FileReader(filename),graph_factory);
}
|
Returns a list of the graphs parsed from the specified file, as created by the specified Supplier.
|
public int write(Connection conn,String outputFileName,String sql,String charset) throws SQLException {
Statement stat=conn.createStatement();
ResultSet rs=stat.executeQuery(sql);
int rows=write(outputFileName,rs,charset);
stat.close();
return rows;
}
|
Writes the result set of a query to a file in the CSV format.
|
public VdcPreCheckResponse2 syncVdcConfigPreCheck(VdcPreCheckParam2 checkParam,String vdcName){
WebResource rRoot;
rRoot=createRequest(VDCCONFIG_PRECHECK2_URI);
rRoot.accept(MediaType.APPLICATION_XML);
try {
return addSignature(rRoot).post(VdcPreCheckResponse2.class,checkParam);
}
catch ( UnauthorizedException e) {
throw GeoException.fatals.remoteVdcAuthorizationFailed(vdcName,e);
}
catch ( GeoException e) {
throw e;
}
catch ( Exception e) {
throw GeoException.fatals.failedToSendPreCheckRequest(vdcName,e);
}
}
|
Check the VDC from a remote VDC. 1. For disconnecting a vdc, check if there is another vdc that is under disconnecting.
|
public String toXMLBIF03(ArrayList<Integer> nodes){
StringBuffer text=new StringBuffer();
text.append(getBIFHeader());
text.append("\n");
text.append("\n");
text.append("<BIF VERSION=\"0.3\">\n");
text.append("<NETWORK>\n");
text.append("<NAME>" + XMLNormalize(m_Instances.relationName()) + "</NAME>\n");
for (int iNode=0; iNode < nodes.size(); iNode++) {
int nNode=nodes.get(iNode);
text.append("<VARIABLE TYPE=\"nature\">\n");
text.append("<NAME>" + XMLNormalize(m_Instances.attribute(nNode).name()) + "</NAME>\n");
for (int iValue=0; iValue < m_Instances.attribute(nNode).numValues(); iValue++) {
text.append("<OUTCOME>" + XMLNormalize(m_Instances.attribute(nNode).value(iValue)) + "</OUTCOME>\n");
}
text.append("<PROPERTY>position = (" + getPositionX(nNode) + ","+ getPositionY(nNode)+ ")</PROPERTY>\n");
text.append("</VARIABLE>\n");
}
for (int iNode=0; iNode < nodes.size(); iNode++) {
int nNode=nodes.get(iNode);
text.append("<DEFINITION>\n");
text.append("<FOR>" + XMLNormalize(m_Instances.attribute(nNode).name()) + "</FOR>\n");
for (int iParent=0; iParent < m_ParentSets[nNode].getNrOfParents(); iParent++) {
text.append("<GIVEN>" + XMLNormalize(m_Instances.attribute(m_ParentSets[nNode].getParent(iParent)).name()) + "</GIVEN>\n");
}
text.append("<TABLE>\n");
for (int iParent=0; iParent < m_ParentSets[nNode].getCardinalityOfParents(); iParent++) {
for (int iValue=0; iValue < m_Instances.attribute(nNode).numValues(); iValue++) {
text.append(m_Distributions[nNode][iParent].getProbability(iValue));
text.append(' ');
}
text.append('\n');
}
text.append("</TABLE>\n");
text.append("</DEFINITION>\n");
}
text.append("</NETWORK>\n");
text.append("</BIF>\n");
return text.toString();
}
|
return fragment of network in XMLBIF format
|
public static <T>void assertNotNull(T expression){
Assert.notNull(expression);
}
|
Gets the Assert class object object and calls its notNull method.
|
public boolean isConnected(int p,int q){
int pRoot=find(p);
int qRoot=find(q);
return pRoot == qRoot;
}
|
Check whether two points are in the same edges component. If connected, they will have the same id.
|
static void putUInt(long ptr,long data){
unsafe.putInt(ptr,(int)data);
}
|
Stores to C unsigned int data(four bytes)
|
private void rememberRegion(int offset,int length){
if (fStartOffset == -1) fStartOffset=offset;
else if (offset < fStartOffset) fStartOffset=offset;
int endOffset=offset + length;
if (fEndOffset == -1) fEndOffset=endOffset;
else if (endOffset > fEndOffset) fEndOffset=endOffset;
}
|
Helper method for tracking the minimal region containing all partition changes. If <code>offset</code> is smaller than the remembered offset, <code>offset</code> will from now on be remembered. If <code>offset + length</code> is greater than the remembered end offset, it will be remembered from now on.
|
public void filterNN(Raster off,WritableRaster dst,int[] xTile,int[] xOff,int[] yTile,int[] yOff){
final int w=dst.getWidth();
final int h=dst.getHeight();
final int xStart=maxOffX;
final int yStart=maxOffY;
final int xEnd=xStart + w;
final int yEnd=yStart + h;
DataBufferInt dstDB=(DataBufferInt)dst.getDataBuffer();
DataBufferInt offDB=(DataBufferInt)off.getDataBuffer();
SinglePixelPackedSampleModel dstSPPSM, offSPPSM;
dstSPPSM=(SinglePixelPackedSampleModel)dst.getSampleModel();
final int dstOff=dstDB.getOffset() + dstSPPSM.getOffset(dst.getMinX() - dst.getSampleModelTranslateX(),dst.getMinY() - dst.getSampleModelTranslateY());
offSPPSM=(SinglePixelPackedSampleModel)off.getSampleModel();
final int offOff=offDB.getOffset() + offSPPSM.getOffset(off.getMinX() - off.getSampleModelTranslateX(),off.getMinY() - off.getSampleModelTranslateY());
final int dstScanStride=dstSPPSM.getScanlineStride();
final int offScanStride=offSPPSM.getScanlineStride();
final int dstAdjust=dstScanStride - w;
final int offAdjust=offScanStride - w;
final int[] dstPixels=dstDB.getBankData()[0];
final int[] offPixels=offDB.getBankData()[0];
final int xShift=xChannel.toInt() * 8;
final int yShift=yChannel.toInt() * 8;
final int fpScaleX=(int)((scaleX / 255.0) * (1 << 15) + 0.5);
final int fpScaleY=(int)((scaleY / 255.0) * (1 << 15) + 0.5);
final int fpAdjX=(int)(-127.5 * fpScaleX - 0.5) + 0x4000;
final int fpAdjY=(int)(-127.5 * fpScaleY - 0.5) + 0x4000;
int dp=dstOff, ip=offOff;
long start=System.currentTimeMillis();
int y=yStart, xt=xTile[0] - 1, yt=yTile[0] - 1;
int[] imgPix=null;
int x0, y0, xDisplace, yDisplace, dPel;
while (y < yEnd) {
int x=xStart;
while (x < xEnd) {
dPel=offPixels[ip];
xDisplace=(fpScaleX * ((dPel >> xShift) & 0xff)) + fpAdjX;
yDisplace=(fpScaleY * ((dPel >> yShift) & 0xff)) + fpAdjY;
x0=x + (xDisplace >> 15);
y0=y + (yDisplace >> 15);
if ((xt != xTile[x0]) || (yt != yTile[y0])) {
xt=xTile[x0];
yt=yTile[y0];
imgPix=((DataBufferInt)image.getTile(xt,yt).getDataBuffer()).getBankData()[0];
}
dstPixels[dp]=imgPix[xOff[x0] + yOff[y0]];
dp++;
ip++;
x++;
}
dp+=dstAdjust;
ip+=offAdjust;
y++;
}
if (TIME) {
long end=System.currentTimeMillis();
System.out.println("Time: " + (end - start));
}
}
|
Does displacement map using Nearest neighbor interpolation
|
private void focusPrevious(){
final Element current=Elements.getDocument().getActiveElement();
if (current.getParentElement().isEqualNode(listElement)) {
final Element prev=current.getPreviousElementSibling();
if (prev != null) {
prev.focus();
}
else {
focusLast();
}
}
else {
focusFirst();
}
}
|
Focus the previous item in the list, or the last item if we are already at the first. In the case the list doesn't currently have focus, focus the first element.
|
@Override public void eSet(int featureID,Object newValue){
switch (featureID) {
case ImPackage.DELEGATING_GETTER_DECLARATION__DELEGATION_BASE_TYPE:
setDelegationBaseType((SymbolTableEntryOriginal)newValue);
return;
case ImPackage.DELEGATING_GETTER_DECLARATION__DELEGATION_SUPER_CLASS_STEPS:
setDelegationSuperClassSteps((Integer)newValue);
return;
case ImPackage.DELEGATING_GETTER_DECLARATION__DELEGATION_TARGET:
setDelegationTarget((SymbolTableEntryOriginal)newValue);
return;
case ImPackage.DELEGATING_GETTER_DECLARATION__DELEGATION_TARGET_IS_ABSTRACT:
setDelegationTargetIsAbstract((Boolean)newValue);
return;
}
super.eSet(featureID,newValue);
}
|
<!-- begin-user-doc --> <!-- end-user-doc -->
|
public synchronized void sendSprogMessage(SprogMessage m,SprogListener replyTo){
if (waitingForReply) {
try {
wait(100);
}
catch ( InterruptedException e) {
}
}
waitingForReply=true;
if (log.isDebugEnabled()) {
log.debug("sendSprogMessage message: [" + m + "]");
}
lastSender=replyTo;
notifyMessage(m,replyTo);
this.sendSprogMessage(m);
}
|
Forward a preformatted message to the actual interface (by calling SendSprogMessage(SprogMessage) after notifying any listeners Notifies listeners
|
private Split[] createSplitsFromFSArray(final FSArray splitsFSArray){
final Collection<Split> splitsCollection=FSCollectionFactory.create(splitsFSArray,Split.class);
return splitsCollection.toArray(new Split[splitsCollection.size()]);
}
|
Create a Split[] array from a FSArray
|
public MemLiteral(Object creator,String label){
super(label,XMLSchema.STRING);
this.creator=creator;
}
|
Creates a new Literal which will get the supplied label.
|
public OSRef(String ref) throws IllegalArgumentException {
char char1=ref.charAt(0);
char char2=ref.charAt(1);
int east=Integer.parseInt(ref.substring(2,5)) * 100;
int north=Integer.parseInt(ref.substring(5,8)) * 100;
if (char1 == 'H') {
north+=1000000;
}
else if (char1 == 'N') {
north+=500000;
}
else if (char1 == 'O') {
north+=500000;
east+=500000;
}
else if (char1 == 'T') {
east+=500000;
}
int char2ord=char2;
if (char2ord > 73) char2ord--;
double nx=((char2ord - 65) % 5) * 100000;
double ny=(4 - Math.floor((char2ord - 65) / 5)) * 100000;
easting=east + nx;
northing=north + ny;
}
|
Take a string formatted as a six-figure OS grid reference (e.g. "TG514131") and create a new OSRef object that represents that grid reference. The first character must be H, N, S, O or T. The second character can be any uppercase character from A through Z excluding I.
|
@Override public ChatEvent parse(String text){
ChatEvent result=null;
if (text.startsWith(BEGINING_MESSAGE) || text.startsWith(BEGINING_MESSAGE,1)) {
RaptorStringTokenizer tok=new RaptorStringTokenizer(text," \n:",true);
tok.nextToken();
tok.nextToken();
String userName=tok.nextToken();
if (userName != null) {
result=new ChatEvent(userName,ChatType.HISTORY,text);
}
}
return result;
}
|
Returns null if text does not match the event this class produces.
|
public T caseOperation(Operation object){
return null;
}
|
Returns the result of interpreting the object as an instance of '<em>Operation</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
|
@Deprecated public void appendCode(CharSequence chars){
content().appendCode(chars);
clearTextMap();
}
|
Append text to a Source explicitly created as <em>Appendable</em>.
|
public DefaultNamed(final String name,final GameData data){
super(data);
if (name == null || name.length() == 0) {
throw new IllegalArgumentException("Name must not be null");
}
m_name=name;
}
|
Creates new DefaultNamed
|
public URI buildAuthenticationRequestURI(URI redirectEndpointURI,ResponseType responseType,ResponseMode responseMode,TokenSpec tokenSpec,State state,Nonce nonce) throws OIDCClientException {
Validate.notNull(redirectEndpointURI,"redirectEndpointURI");
Validate.notNull(responseType,"responseType");
Validate.notNull(responseMode,"responseMode");
Validate.notNull(tokenSpec,"tokenSpec");
Validate.notNull(state,"state");
Validate.notNull(nonce,"nonce");
if (responseType.contains(ResponseTypeValue.AUTHORIZATION_CODE)) {
if (this.holderOfKeyConfig == null) {
throw new OIDCClientException("HolderOfKeyConfig is required when response type is code.");
}
if (responseMode != ResponseMode.QUERY && responseMode != ResponseMode.FORM_POST) {
throw new OIDCClientException("Only 'QUERY' or 'FORM_POST' response mode is supported when response type is code.");
}
}
else if (responseType.contains(ResponseTypeValue.ID_TOKEN)) {
if (responseMode != ResponseMode.FRAGMENT && responseMode != ResponseMode.FORM_POST) {
throw new OIDCClientException("Only 'FRAGMENT' or 'FORM_POST' response mode is supported when response type includes id_token.");
}
}
URI authorizationEndpointURI=this.authorizationEndpointURI;
if (highAvailabilityEnabled()) {
String domainController=getAvailableDomainController();
authorizationEndpointURI=URIUtils.changeHostComponent(authorizationEndpointURI,domainController);
}
Scope scope=OIDCClientUtils.buildScopeFromTokenSpec(tokenSpec);
ClientAssertion clientAssertion=null;
if (this.holderOfKeyConfig != null) {
clientAssertion=OIDCClientUtils.createClientAssertion(this.clientId,this.holderOfKeyConfig,authorizationEndpointURI);
}
AuthenticationRequest authenticationRequest=new AuthenticationRequest(authorizationEndpointURI,responseType,responseMode,this.clientId,redirectEndpointURI,scope,state,nonce,clientAssertion,new CorrelationID());
return authenticationRequest.toHttpRequest().getURI();
}
|
Build an authentication request URI
|
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:02:44.172 -0500",hash_original_method="FC137DB7CC1014A530CE1472E28E1AFA",hash_generated_method="5C886961AF1342B918C0FDF8BF5045A7") public void endTest(Test test){
for (Enumeration e=cloneListeners().elements(); e.hasMoreElements(); ) {
((TestListener)e.nextElement()).endTest(test);
}
}
|
Informs the result that a test was completed.
|
public final void removeCallbacksAndMessages(Object token){
mExec.removeCallbacksAndMessages(token);
}
|
Remove any pending posts of callbacks and sent messages whose <var>obj</var> is <var>token</var>. If <var>token</var> is null, all callbacks and messages will be removed.
|
public AbstractPushLogModel(Icon modelIcon,String modelName,boolean isClosable,int maxLogEntries){
super(modelIcon,modelName,LogMode.PULL,isClosable,maxLogEntries);
}
|
Creates a new log model with the defined size of log entries. If the size is exceeded old entries will be overwritten.
|
public static void json(String json){
printer.json(json);
}
|
Formats the json content and print it
|
@Override public CompanyPrivilegeObject copy(){
return new CompanyPrivilegeObject(this);
}
|
This method was generated by MyBatis Generator. This method corresponds to the database table company_privilege
|
public boolean isNumberBlocked(ContactId contact){
return RcsStatus.BLOCKED.equals(getContactSharingStatus(contact));
}
|
Is the number in the RCS blocked list
|
public static boolean checkUnityVolumeCanBeAddedOrRemovedToCG(String rgName,Volume volume,DbClient dbClient,boolean isAdd){
StorageSystem storage=dbClient.queryObject(StorageSystem.class,volume.getStorageController());
if (storage != null) {
if (storage.deviceIsType(Type.unity)) {
if (isAdd && rgName != null) {
List<Volume> volumesInRG=CustomQueryUtility.queryActiveResourcesByConstraint(dbClient,Volume.class,AlternateIdConstraint.Factory.getVolumeByReplicationGroupInstance(rgName));
if (volumesInRG != null && !volumesInRG.isEmpty()) {
for ( Volume vol : volumesInRG) {
if (vol.getStorageController().equals(volume.getStorageController())) {
List<BlockSnapshot> snaps=getVolumeNativeSnapshots(vol.getId(),dbClient);
if (!snaps.isEmpty()) {
return false;
}
}
}
}
}
else if (!isAdd) {
List<BlockSnapshot> snaps=getVolumeNativeSnapshots(volume.getId(),dbClient);
if (!snaps.isEmpty()) {
return false;
}
}
}
}
return true;
}
|
Check if a unity volume could be add or removed from unity consistency group. for Unity, if the unity CG has snapshot, volumes could not be added or removed.
|
@Deprecated public static <K,V>Map<K,V> asMap(K k1,V v1,K k2,V v2,K k3,V v3){
Map<K,V> map=new GridLeanMap<>(3);
map.put(k1,v1);
map.put(k2,v2);
map.put(k3,v3);
return map;
}
|
Creates map with given values.
|
public void pick(MotionEvent event){
this.pickedObject=null;
PickedObjectList pickList=getWorldWindow().pick(event.getX(),event.getY());
PickedObject topPickedObject=pickList.topPickedObject();
if (topPickedObject != null) {
this.pickedObject=topPickedObject.getUserObject();
}
}
|
Performs a pick at the tap location.
|
private int readWithQuotes(final char[] srcChars,final int start,final int len,final StrBuilder workArea,final List<String> tokenList,final int quoteStart,final int quoteLen){
workArea.clear();
int pos=start;
boolean quoting=quoteLen > 0;
int trimStart=0;
while (pos < len) {
if (quoting) {
if (isQuote(srcChars,pos,len,quoteStart,quoteLen)) {
if (isQuote(srcChars,pos + quoteLen,len,quoteStart,quoteLen)) {
workArea.append(srcChars,pos,quoteLen);
pos+=quoteLen * 2;
trimStart=workArea.size();
continue;
}
quoting=false;
pos+=quoteLen;
continue;
}
workArea.append(srcChars[pos++]);
trimStart=workArea.size();
}
else {
final int delimLen=getDelimiterMatcher().isMatch(srcChars,pos,start,len);
if (delimLen > 0) {
addToken(tokenList,workArea.substring(0,trimStart));
return pos + delimLen;
}
if (quoteLen > 0 && isQuote(srcChars,pos,len,quoteStart,quoteLen)) {
quoting=true;
pos+=quoteLen;
continue;
}
final int ignoredLen=getIgnoredMatcher().isMatch(srcChars,pos,start,len);
if (ignoredLen > 0) {
pos+=ignoredLen;
continue;
}
final int trimmedLen=getTrimmerMatcher().isMatch(srcChars,pos,start,len);
if (trimmedLen > 0) {
workArea.append(srcChars,pos,trimmedLen);
pos+=trimmedLen;
continue;
}
workArea.append(srcChars[pos++]);
trimStart=workArea.size();
}
}
addToken(tokenList,workArea.substring(0,trimStart));
return -1;
}
|
Reads a possibly quoted string token.
|
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.
|
void restart(){
progress=0;
timer.restart();
}
|
Start, or restart the animation.
|
public GenericPropertySheet(boolean isModal,Object target,Rectangle bounds,PropertyEditor pe,BeanBox beanBox){
super((JFrame)null,"Properties - <initializing...>",isModal);
this.targetBean=target;
this.editor=pe;
this.beanBox=beanBox;
init();
this.getContentPane().add(panel);
}
|
Constructs a property sheet dialog.
|
public int numberOfReplies(final Resource comment){
final Iterator<Resource> children=comment.listChildren();
int size=0;
while (children.hasNext()) {
children.next();
size++;
}
return size;
}
|
Get the number of replies for a given comment.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.