code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public static boolean isUsableAuthenticationProvider(AuthnProviderParamsToValidate param,StringBuilder errorString){
String endpoint=null;
int attempts=0;
while (attempts < _MAX_VALIDATION_RETRIES) {
_log.debug("Validation attempt {}",++attempts);
AuthSvcInternalApiClientIterator authSvcClientItr=new Auth... | Sends an internal api call to authsvc to validate authentication provider basic connectivity parameters |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:47.397 -0400",hash_original_method="DD9093B6630FDA95068771DA019094CE",hash_generated_method="D72ED220325CA7066E9333C435204C50") protected boolean isJdk14Available(){
return isLogLibraryAvailable("Jdk14","org.apache.commons.logging... | <p>Return <code>true</code> if <em>JDK 1.4 or later</em> logging is available. Also checks that the <code>Throwable</code> class supports <code>getStackTrace()</code>, which is required by Jdk14Logger.</p> |
private final boolean subparse(String text,ParsePosition parsePosition,String positivePrefix,String negativePrefix,DigitList digits,boolean isExponent,boolean status[]){
int position=parsePosition.index;
int oldStart=parsePosition.index;
int backup;
boolean gotPositive, gotNegative;
gotPositive=text.regionMat... | Parse the given text into a number. The text is parsed beginning at parsePosition, until an unparseable character is seen. |
public void startUnRegistration(Context context){
String regId=Preference.getString(context,context.getResources().getString(R.string.shared_pref_regId));
JSONObject requestParams=new JSONObject();
try {
requestParams.put(context.getResources().getString(R.string.shared_pref_regId),regId);
}
catch ( JSONE... | Start un-registration process. |
public static boolean process(final Instruction[] flow,final int start,final Processor<Instruction> processor){
final int length=flow.length;
boolean[] visited=new boolean[length];
Arrays.fill(visited,false);
final IntStack stack=new IntStack(length);
stack.push(start);
while (!stack.empty()) {
Progress... | Process control flow graph in depth first order |
private void driveIpReconfigStateMachine() throws Exception {
log.info("driving ipreconfig state machine ...");
String localnode_status_key=String.format(IpReconfigConstants.CONFIG_NODESTATUS_KEY,localNodeId);
IpReconfigConstants.NodeStatus localnode_status=IpReconfigConstants.NodeStatus.valueOf(config.getConfig(... | Handle core status change for the ip reconfig procedure For each node, the status could be 1. None System just receiving ip reconfiguration request. 2. LOCALAWARE_LOCALPERSISTENT Local node has got the new IPs persisted while it has no idea of other nodes' status. 3. LOCALAWARE_CLUSTERPERSISTENT Local node knows the ne... |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:32:18.410 -0500",hash_original_method="2468FB71A40A0019FA8D57CEA81AC8A6",hash_generated_method="B71728294A7ADAA6224D584B4DB6A1F8") private int distanceToView(View descendant){
... | Determine the distance to the nearest edge of a view in a particular direction. |
private void acquireWifiLock(){
if (mWifiLock != null && !mWifiLock.isHeld() && mMediaPlayer.isStreaming()) {
mWifiLock.acquire();
}
}
| WifiLock Functions |
public boolean isElement(){
return element != null;
}
| Checks if the content is a element content. It is if it just have an element. |
public boolean isModified(){
return false;
}
| Returns true if the definition of the class has been modified. |
public boolean equals(Object other){
if (other instanceof Name) return table == ((Name)other).table && index == ((Name)other).getIndex();
else return false;
}
| Is this name equal to other? |
public static String format(Date date){
return format(date,false,TIMEZONE_UTC);
}
| Format a date into 'yyyy-MM-ddThh:mm:ssZ' (default timezone, no milliseconds precision) |
static public SerialLightManager instance(){
if (_instance == null) {
_instance=new SerialLightManager();
}
return _instance;
}
| Allow access to SerialLightManager |
public TransformW(){
m00=m11=1.0;
}
| Constructs a new <code>TransformW</code> representing the Identity transformation. |
public DrawingOpacityIcon(DrawingEditor editor,AttributeKey<Double> opacityKey,AttributeKey<Color> fillColorKey,AttributeKey<Color> strokeColorKey,URL imageLocation,Shape fillShape,Shape strokeShape){
super(imageLocation);
this.editor=editor;
this.opacityKey=opacityKey;
this.fillColorKey=fillColorKey;
this.st... | Creates a new instance. |
@Override public boolean receiveImage(ImageToProcess img,Set<TaskImageContainer> tasks,boolean blockUntilImageRelease,boolean closeOnImageRelease,Optional<Runnable> runnableWhenDone) throws InterruptedException {
if (tasks == null || tasks.size() <= 0) {
return false;
}
if (img == null) {
throw new Runtim... | Implements that top-level image single task submission that is defined by the ImageConsumer interface. |
protected void clearOtherErrors(String formName,String... fieldsToKeep){
Set<play.data.validation.Error> errors=Sets.newHashSet();
for ( String name : fieldsToKeep) {
play.data.validation.Error error=Validation.error(String.format("%s.%s",formName,name));
if (error != null) {
errors.add(error);
}... | Clears all other validation error, except for the specified fields. |
public void addOrShowTerminal(MachineEntity machine){
String machineId=machine.getId();
TerminalPresenter terminal=terminals.get(machineId);
if (terminal != null) {
terminal.connect();
view.showTerminal(terminal);
return;
}
TerminalPresenter newTerminal=terminalFactory.create(machine);
terminals... | Adds terminal for current machine. Or if terminal already exist updates terminal. |
private void deleteNode(TSTNode nodeToDelete){
if (nodeToDelete == null) {
return;
}
nodeToDelete.data=null;
while (nodeToDelete != null) {
nodeToDelete=deleteNodeRecursion(nodeToDelete);
}
}
| Deletes the node passed in as an argument. If this node has non-null data, then both the node and the data will be deleted. It also deletes any other nodes in the trie that are no longer needed after the deletion of the node. |
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:57:12.203 -0500",hash_original_method="F97CF4B9707D277EAF947474019CC6FE",hash_generated_method="CEE6F0364685959E02A5037951EEC7AB") public AtomicReference(){
}
| Creates a new AtomicReference with null initial value. |
private static int convertFromDphi(int dphi,int units){
if (units < 1) {
throw new IllegalArgumentException(": units is < 1");
}
int round=units / 2;
return (dphi + round) / units;
}
| Convert a value from dphi to some other units. The result is rounded to the nearest integer. |
public static SecretKey loadOrGenerateKeys(Context context,File keyFile) throws GeneralSecurityException, IOException {
final SecretKeyWrapper wrapper=new SecretKeyWrapper(context,"settings");
if (!keyFile.exists()) {
final byte[] raw=new byte[KEY_LENGTH];
new SecureRandom().nextBytes(raw);
final Secret... | Load our symmetric secret key. The symmetric secret key is stored securely on disk by wrapping it with a public/private key pair, possibly backed by hardware. |
public void putInt(int x){
bb.putInt(space-=4,x);
}
| Add an `int` to the buffer, backwards from the current location. Doesn't align nor check for space. |
private Object showNode(Node node,Object data){
String tokens="";
String special="";
Token t;
if (showTokens) {
t=node.getFirstToken();
if (t.specialToken != null && !t.specialToken.image.startsWith("##")) special=t.specialToken.image;
tokens=" -> " + special + t.image;
}
System.out.println(... | Display the type of nodes and optionally the first token. |
@Override protected void onDestroy(){
super.onDestroy();
Log.d(TAG,"onDestroy() - the activity is about to be destroyed");
}
| Hook method that gives a final chance to release resources and stop spawned threads. onDestroy() may not always be called-when system kills hosting process |
public int idRangeOffsetLocation(int segment){
isValidIndex(segment);
return idRangeOffsetOffset(this.segCount) + segment * FontData.DataSize.USHORT.size();
}
| Get the location of the id range offset for a segment. |
boolean isLogUpToDate(long lastIndex,long lastTerm,Request request){
if (context.getLog().isEmpty()) {
LOGGER.debug("{} - Accepted {}: candidate's log is up-to-date",context.getCluster().member().address(),request);
return true;
}
long localLastIndex=context.getLog().lastIndex();
long localLastTerm=cont... | Returns a boolean value indicating whether the given candidate's log is up-to-date. |
ZoneData(ZoneAttributes attributes,Modifiers modifiers,WeatherEntity entity){
this.attributes=attributes;
this.modifiers=modifiers;
this.entity=entity;
}
| Create a ZoneData. |
public Vec3D closestPointTo(ReadonlyVec3D p){
final Vec3D v=b.sub(a);
final float t=p.sub(a).dot(v) / v.magSquared();
if (t < 0.0f) {
return a.copy();
}
else if (t > 1.0f) {
return b.copy();
}
return a.add(v.scaleSelf(t));
}
| Computes the closest point on this line to the given one. |
private boolean isColoringEnabled(){
return Boolean.parseBoolean(WtWindowManager.getInstance().getProperty("ui.colormaps","true"));
}
| Check if map coloring is enabled. |
boolean explicitCastEquivalentToAsType(MethodType newType){
if (this == newType) return true;
if (!explicitCastEquivalentToAsType(rtype,newType.rtype)) {
return false;
}
Class<?>[] srcTypes=newType.ptypes;
Class<?>[] dstTypes=ptypes;
if (dstTypes == srcTypes) {
return true;
}
assert (dstTypes.... | Returns true if MHs.explicitCastArguments produces the same result as MH.asType. If the type conversion is impossible for either, the result should be false. |
private void reset(){
reassembledData=null;
reassembledDataSize=null;
reassembledDataFullSize=0;
reassembledDataHasStart=false;
reassembledDataHasEnd=false;
reassembledDataPosSeqStart=Integer.MAX_VALUE;
reassembledDataPosSeqEnd=Integer.MIN_VALUE;
reassembledDataNALHeader=0;
timeStamp=-1;
format=null... | Reset the FrameAssembler It as package access instead of private for improved performance. See: http://developer.android.com/guide/practices/performance.html Consider Package Instead of Private Access with Private Inner Classes |
public void clear(){
synchronized (lock) {
changesByServerPath.clear();
changesByParentServerPath.clear();
changesByLocalPath.clear();
changesByParentLocalPath.clear();
}
}
| Clears all pending change data held by this collection. |
private void commit(Method method){
if (commit == null) {
commit=getFunction(method);
}
}
| This method is used to check the provided method to determine if it contains the <code>Commit</code> annotation. If the method contains the required annotation it is stored so that it can be invoked during the deserialization process. |
public Top(int value){
this.value=value;
}
| Constructs the top value transformation |
public static HostResource persistDeletedHost(String hostName,DateTime deletionTime){
return persistResource(newHostResource(hostName).asBuilder().setDeletionTime(deletionTime).build());
}
| Persists a host resource with the given hostname deleted at the specified time. |
public static double angle(double[] v1,double[] v2,double[] o){
final int mindim=(v1.length >= v2.length) ? v1.length : v2.length;
double s=0, e1=0, e2=0;
for (int k=0; k < mindim; k++) {
final double ok=(k < o.length) ? o[k] : 0;
final double r1=v1[k] - ok;
final double r2=v2[k] - ok;
s+=r1 * r2;... | Compute the angle between two vectors. |
public boolean isStandardColumn(){
String columnName=getColumnName();
if (columnName.equals("AD_Client_ID") || columnName.equals("AD_Org_ID") || columnName.equals("IsActive")|| columnName.startsWith("Created")|| columnName.startsWith("Updated")) return true;
return false;
}
| Is Standard Column |
public GL10 createGL(){
return (GL10)mEglContext.getGL();
}
| Create a GL object for the current EGL context. |
public OtaBitmap(BufferedImage img){
int bitOffset=0;
int data=0;
int nByte=0;
int nTotalBytes=0;
Raster raster=img.getData();
width_=img.getWidth();
height_=img.getHeight();
nTotalBytes=(width_ * height_) / 8;
if (((width_ * height_) % 8) > 0) {
nTotalBytes++;
}
otaImgData_=new byte[nTotalByt... | Creates an OtaBitmap object from an BufferedImage. <p> Every pixel that is not white will be converted to black. |
private E peekExpired(){
E first=q.peek();
return (first == null || first.getDelay(NANOSECONDS) > 0) ? null : first;
}
| Returns first element only if it is expired. Used only by drainTo. Call only when holding lock. |
private void contactedBy(InternalDistributedMember sender,long timeStamp){
TimeStamp cTS=new TimeStamp(timeStamp);
cTS=memberTimeStamps.putIfAbsent(sender,cTS);
if (cTS != null && cTS.getTime() < timeStamp) {
cTS.setTime(timeStamp);
}
if (suspectedMemberInView.remove(sender) != null) {
logger.info("No... | Record member activity at a specified time |
@NonNull public static <T extends Collection<?>>T checkCollectionNotEmpty(T collection,@Nullable Object errorMessage){
checkNotNull(collection,errorMessage);
checkArgument(!collection.isEmpty(),errorMessage);
return collection;
}
| Ensures that a collection is not null or empty. |
public void addWrapper(String jspUri,JspServletWrapper jsw){
jsps.remove(jspUri);
jsps.put(jspUri,jsw);
}
| Add a new JspServletWrapper. |
public String toString(){
StringBuilder result=new StringBuilder("{ ");
for ( Interval interval : intervals) result.append(interval);
result.append(" }");
return result.toString();
}
| Make a string representation of this char set. |
public AssertionConsumerService(String name,String binding,String endpoint){
ValidateUtil.validateNotEmpty(binding,"binding");
ValidateUtil.validateNotEmpty(endpoint,"endpoint");
this.name=name;
this.endpoint=endpoint;
this.binding=binding;
}
| AssertionConsumerService ctr taking all required parameters |
public Filter createFilter(BridgeContext ctx,Element filterElement,Element filteredElement,GraphicsNode filteredNode,Filter inputFilter,Rectangle2D filterRegion,Map filterMap){
Rectangle2D defaultRegion=filterRegion;
Rectangle2D primitiveRegion=SVGUtilities.convertFilterPrimitiveRegion(filterElement,filteredElement... | Creates a <tt>Filter</tt> primitive according to the specified parameters. |
public static void recordExplicitUserNavigation(String destinationUrl,int rapporMetric){
switch (rapporMetric) {
case RAPPOR_ACTION_NAVIGATED_USING_OMNIBOX:
RapporServiceBridge.sampleDomainAndRegistryFromURL("NTP.ExplicitUserAction.PageNavigation.OmniboxNonSearch",destinationUrl);
return;
case RAPPOR_ACTION_VISIT... | Record the eTLD+1 for a website explicitly visited by the user, using Rappor. |
public ImageSizesAdapter(Context context,int layoutResourceId){
super(context,layoutResourceId);
mContext=context;
mLayoutResourceId=layoutResourceId;
mLayoutInflater=LayoutInflater.from(mContext);
}
| Construct an adapter which will display a list of image size |
public Rect[] newArray(int size){
return new Rect[size];
}
| Return an array of rectangles of the specified size. |
public static boolean isHebrew(int codePoint){
return Character.UnicodeBlock.HEBREW.equals(Character.UnicodeBlock.of(codePoint));
}
| Determines if a character is a Hebrew character. |
public void finished(int tenantclass,Operation op,long latency){
finished(op,tenantclass,0,latency);
}
| Indicate that the given tenantclass has finished an HDFS request that performed the specified operation |
public void update(Matrix X){
Matrix CD=epoch(X);
Matrix dW=(CD.minusEquals(this.W.times(COST))).timesEquals(LEARNING_RATE);
this.W.plusEquals(dW.plus(this.dW_.timesEquals(MOMENTUM)));
this.dW_=dW;
}
| Update - Carry out one epoch of CD, update W. We use dW_ to manage momentum. <br> TODO weight decay SHOULD NOT BE APPLIED TO BIASES |
public boolean isHealthy(boolean doExtensiveChecks){
if (socket.isClosed() || socket.isInputShutdown() || socket.isOutputShutdown()) {
return false;
}
if (framedConnection != null) {
return true;
}
if (doExtensiveChecks) {
try {
int readTimeout=socket.getSoTimeout();
try {
sock... | Returns true if this connection is ready to host new streams. |
public String toString(){
return getCssText();
}
| Returns a printable representation of this value. |
public static boolean removeDirectory(final String dir){
final File file=new File(dir);
return file.delete();
}
| Removes the directory. |
public static boolean isAnnotationPresent(final Method method,final Class<? extends Annotation> annotationType){
return method != null && method.isAnnotationPresent(annotationType);
}
| Utility method kept for backwards compatibility. Annotation checking used to be problematic on GWT. |
public String sqlMetadata_checkTables(String vendorName,String catalogName,String schemaName){
return m_interfaces.get(getDBVendorID(vendorName)).sqlMetadata_checkTables(catalogName,schemaName);
}
| gets the database specific SQL command to find check constraint tables |
public TrashExample(){
oredCriteria=new ArrayList<Criteria>();
}
| This method was generated by MyBatis Generator. This method corresponds to the database table trash |
public WampClientBuilder(){
roles=EnumSet.of(WampRoles.Caller,WampRoles.Callee,WampRoles.Publisher,WampRoles.Subscriber);
WampSerialization.addDefaultSerializations(serializations);
}
| Construct a new WampClientBuilder object. |
public Node item(int index){
return null;
}
| Returns the <code>index</code>th item in the collection. If <code>index</code> is greater than or equal to the number of nodes in the list, this returns <code>null</code>. |
public boolean isIncludeInReceiverChannel(){
return includeInReceiverChannel;
}
| Checks if is include in receiver channel. |
public static boolean isWhiteSpace(char ch[],int start,int length){
int end=start + length;
for (int s=start; s < end; s++) {
if (!isWhiteSpace(ch[s])) return false;
}
return true;
}
| Tell if the string is whitespace. |
protected POInfo initPO(Properties ctx){
POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName());
return poi;
}
| Load Meta Data |
@Override public void run(){
amIActive=true;
String inputFilesString=null;
String[] imageFiles=null;
String outputHeader=null;
WhiteboxRasterInfo[] images=null;
WhiteboxRaster ouptut=null;
int nCols=0;
int nRows=0;
double z;
int numClasses=0;
int numImages;
int progress=0;
int col, row;
int ... | Used to execute this plugin tool. |
public void clearPanel(){
if (this.loadingThread != null && this.loadingThread.isAlive()) {
this.loadingThread.interrupt();
return;
}
if (this.nameField != null) this.nameField.setText("");
if (this.urlField != null) this.urlField.setText("");
if (this.layerTree != null) {
this.layerTree.clear... | Clears the panel. Any layers currently in the layer manager are left there. |
public boolean isContext(){
return context;
}
| Checks if is context. |
public void rtestSerialization(){
setUp();
boolean simulation=true;
this.session.clearNodes();
SessionNode node1=new SessionNode(Type6.class);
SessionNode node2=new SessionNode(Type7.class);
SessionNode node3=new SessionNode(Type8.class);
this.session.addNode(node1);
this.session.addNode(node2);
this.... | Tests whether the session can be serialized and reconstructed correctly. This only tests the skeletal form of the serialization--serialization of each specific model has to be tested separately in those models, since the session class itself is not supposed to have any knowledge of specific models. (For the test, we ju... |
public static void println(PrintStream self,Object value){
self.println(InvokerHelper.toString(value));
}
| Print a value formatted Groovy style (followed by a newline) to the print stream. |
public static void initPluginGuis(MainFrame mainframe){
callPluginInitMethods("initGui",new Class[]{MainFrame.class},new Object[]{mainframe},false);
}
| This method will try to invoke the method void initGui(MainFrame) of PluginInit class of every plugin. |
private static void init(){
if (DEFAULT_REPORTER == null) {
synchronized (XTrace.class) {
if (DEFAULT_REPORTER == null) {
XTRACE_ENABLED=XTraceSettings.On();
if (XTRACE_ENABLED) {
PubSubReporter pubsub=new PubSubReporter();
pubsub.start();
DEFAULT_REPORTER=pubsub;
... | Lazy initialization of reporter and loggers |
void startSequenceDelay(){
int delay=Integer.parseInt(mDelayField[mNextSequenceElement].getText());
mNextSequenceElement++;
restartTimer(delay);
}
| Echo has been heard, start delay for next packet |
@Override public String toString(){
return expression.toString();
}
| Returns the parameter template as a string |
public JMSSubscription(){
}
| Empty Ctor required for use with Spring. |
@Override public boolean isEnabled(){
return jpfPassword.isEnabled();
}
| Is the password quality field? |
private int calculateNewCapacity(){
int oldCapacity=queue.length;
int newCapacity=(oldCapacity < 64) ? (oldCapacity + 1) * 2 : IntMath.checkedMultiply(oldCapacity / 2,3);
return capAtMaximumSize(newCapacity,maximumSize);
}
| Returns ~2x the old capacity if small; ~1.5x otherwise. |
@Override protected void finishInit(){
m_TabbedPane.setSelectedIndex(0);
for ( AbstractExplorerTab tab : m_Tabs) tab.update();
updateMenu();
}
| Finishes the initialization. |
public void startDocument(XMLLocator locator,String encoding,NamespaceContext namespaceContext,Augmentations augs) throws XNIException {
fNamespaceContext=namespaceContext;
try {
if (fDocumentHandler != null) {
if (locator != null) {
fDocumentHandler.setDocumentLocator(new LocatorProxy(locator));
... | The start of the document. |
public void stringLessThan() throws IOException {
print("stringLessThan",null);
}
| Description of the Method |
public StatementBuilder append(String s){
builder.append(s);
return this;
}
| Append a text. |
@Singleton @Provides SubscribeOn provideSubscribeOn(){
return (null);
}
| Provides the Scheduler to be used by any subscriber on subscribing. The operation will be executed in a new thread, this way the ui won't be block |
public LanguageTranslator(){
super(SERVICE_NAME);
if ((getEndPoint() == null) || getEndPoint().isEmpty()) {
setEndPoint(URL);
}
}
| Instantiates a new Language Translator service. |
public boolean invertedY(){
return invertedY;
}
| Returns true if the texture is inverted along the vertical direction. |
static String kindToString(int kind){
switch (kind) {
case IClasspathEntry.CPE_PROJECT:
return "src";
case IClasspathEntry.CPE_SOURCE:
return "src";
case IClasspathEntry.CPE_LIBRARY:
return "lib";
case IClasspathEntry.CPE_VARIABLE:
return "var";
case IClasspathEntry.CPE_CONTAINER:
return "con";
case org.eclipse.j... | Returns a <code>String</code> for the kind of a class path entry. |
public void add(int index,DataSource source,boolean visible){
data.add(index,source);
if (visible) {
dataVisible.add(source);
}
autoscaleAxes();
if (getLegend() != null) {
getLegend().add(source);
}
source.addDataListener(this);
invalidateAxisExtrema();
}
| Inserts the specified data series to the plot at a specified position. |
public static int addCount(){
return _stateCount++;
}
| Increments state counter |
public T caseNumericalMultiplyDivideExpression(NumericalMultiplyDivideExpression object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Numerical Multiply Divide Expression</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
protected void updateConnection(){
if (connection != null && !connection.isClosed()) {
connection.update();
}
}
| call this once to update the connection |
@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:59:45.516 -0500",hash_original_method="C8C31043DDFE26EC3BE146F1B2B418E3",hash_generated_method="4278121A770EE39DDEB6E37D007DBBC8") public void sendMessage(int what){
Message msg=Message.o... | Send a message to the destination handler |
@Override protected EClass eStaticClass(){
return UmplePackage.eINSTANCE.getSymmetricReflexiveAssociation_();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
protected synchronized void putJarTypeInfo(IJavaElement type,Object info){
this.cache.jarTypeCache.put(type,info);
}
| Remember the info for the jar binary type |
public static int centroids(Relation<? extends NumberVector> rel,List<? extends Cluster<?>> clusters,NumberVector[] centroids,NoiseHandling noiseOption){
assert (centroids.length == clusters.size());
int ignorednoise=0;
Iterator<? extends Cluster<?>> ci=clusters.iterator();
for (int i=0; ci.hasNext(); i++) {
... | Compute centroids. |
public static int prevClothColor(int data){
switch (data) {
case ClothColor.ID.LIGHT_GRAY:
return ClothColor.ID.WHITE;
case ClothColor.ID.GRAY:
return ClothColor.ID.LIGHT_GRAY;
case ClothColor.ID.BLACK:
return ClothColor.ID.GRAY;
case ClothColor.ID.BROWN:
return ClothColor.ID.BLACK;
case ClothColor.ID.RED:
return... | Returns the data value for the previous ext color of cloth in the rainbow. This should not be used if you want to just increment the data value. |
public PaletteColorWheelChooser(){
}
| Creates a new instance. |
private void trackAllChildViews(){
int childCount=mRv.getChildCount();
for (int i=0; i < childCount; i++) {
View v=mRv.getChildAt(i);
if (v instanceof BaseRecyclerViewFastScrollBar.FastScrollFocusableView) {
mTrackedFastScrollViews.add((BaseRecyclerViewFastScrollBar.FastScrollFocusableView)v);
}
... | Starts tracking all the recycler view's children which are FastScrollFocusableViews. |
public void add(String[] titles,double[] values){
add(mCategories.size() + "",titles,values);
}
| Adds a new value to the series |
public TooltipEvent(Optional<Entity> entity,List<String> tooltips){
this.entity=entity;
this.tooltips=tooltips;
}
| Gets a list of tooltips for this item. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-03-25 14:54:51.366 -0400",hash_original_method="995562A88AB64E96C6246F34F5EFC890",hash_generated_method="29CC6ED3C9950F5F3090A7D5209533A8") protected DrmEvent(int uniqueId,int type,String message,HashMap<String,Object> attributes){
mUniqueId=... | Creates a <code>DrmEvent</code> object with the specified parameters. |
private void initialize(){
if (!cacheDir.exists()) {
cacheDir.mkdirs();
}
File[] files=cacheDir.listFiles();
if (files == null) {
return;
}
for (int i=0; i < files.length; i++) {
File file=files[i];
if (file.length() == 0) {
file.delete();
}
else {
CacheSpan span=CacheSpan.c... | Ensures that the cache's in-memory representation has been initialized. |
public boolean isProcessed(){
Object oo=get_Value(COLUMNNAME_Processed);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Processed. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.