code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
static boolean isInstanceOfNotEqualConditionEvaluator(Object o){
return o instanceof RangeJunction.NotEqualConditionEvaluator;
}
| Test method which checks if the Filter operand is of type NotEqualConditionEvaluator |
protected float floatSpeed(int lSpeed){
if (lSpeed == 0) {
return 0.f;
}
else if (lSpeed == 1) {
return -1.f;
}
else {
return ((lSpeed - 1) / 126.f);
}
}
| Convert a CBUS speed integer to a float speed value |
public Geo cross(Geo b){
return cross(b,new Geo());
}
| Vector cross product. |
public String globalInfo(){
return "Class for running an arbitrary clusterer on data that has been passed " + "through an arbitrary filter. Like the clusterer, the structure of the filter " + "is based exclusively on the training data and test instances will be processed "+ "by the filter without changing their struc... | Returns a string describing this clusterer. |
public NearestNeighbour(int k,boolean weighted,DistanceMetric distanceMetric,VectorCollectionFactory<VecPaired<Vec,Double>> vcf){
this.mode=null;
this.vcf=vcf;
this.k=k;
this.weighted=weighted;
this.distanceMetric=distanceMetric;
}
| Constructs a new Nearest Neighbor Classifier |
public StatusDetail withDetail(final String key,final String value){
final LinkedHashMap<String,String> newDetails=new LinkedHashMap<>(details);
newDetails.put(key,value);
return statusDetail(name,status,message,newDetails);
}
| Create a copy of this StatusDetail, add a detail and return the new StatusDetail. |
public IntIteratorSpliterator(PrimitiveIterator.OfInt iterator,long size,int characteristics){
this.it=iterator;
this.est=size;
this.characteristics=(characteristics & Spliterator.CONCURRENT) == 0 ? characteristics | Spliterator.SIZED | Spliterator.SUBSIZED : characteristics;
}
| Creates a spliterator using the given iterator for traversal, and reporting the given initial size and characteristics. |
public static DetailPostWebFragment newInstance(String param1,String param2){
DetailPostWebFragment fragment=new DetailPostWebFragment();
Bundle args=new Bundle();
args.putString(ARG_PARAM1,param1);
args.putString(ARG_PARAM2,param2);
fragment.setArguments(args);
return fragment;
}
| Use this factory method to create a new instance of this fragment using the provided parameters. |
@Override public boolean hasActiveShield(int location){
if ((location != Mech.LOC_RARM) && (location != Mech.LOC_LARM)) {
return false;
}
if (isShutDown() || (getCrew().isKoThisRound() || getCrew().isUnconscious())) {
return false;
}
for (int slot=0; slot < this.getNumberOfCriticals(location); slot++)... | Does the mech have an active shield This should only be called by hasActiveShield(location,rear) |
public static void notifyNativeGestureStarted(View view,MotionEvent event){
RootViewUtil.getRootView(view).onChildStartedNativeGesture(event);
}
| Helper method that should be called when a native view starts a native gesture (e.g. a native ScrollView takes control of a gesture stream and starts scrolling). This will handle dispatching the appropriate events to JS to make sure the gesture in JS is canceled. |
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, java.io.NotActiveException, ClassNotFoundException {
s.defaultReadObject();
thisX500Name=new X500Name(name);
}
| Reads this object from a stream (i.e., deserializes it) |
public static boolean gitLocalConfig(final AtomicReference<String> path) throws IOException {
return gitLocalConfig(Environment.getCurrentDirectory(),path);
}
| Gets the path to the Git local configuration file based on the current working directory. |
public void clear(){
fullyLock();
try {
for (Node<E> p, h=head; (p=h.next) != null; h=p) {
h.next=h;
p.item=null;
}
head=last;
if (count.getAndSet(0) == capacity) notFull.signal();
}
finally {
fullyUnlock();
}
}
| Atomically removes all of the elements from this queue. The queue will be empty after this call returns. |
public static final double show(Window owner){
ApplyTorqueDialog atd=new ApplyTorqueDialog(owner);
atd.setLocationRelativeTo(owner);
atd.setVisible(true);
if (!atd.canceled) {
double t=atd.torquePanel.getTorque();
return t;
}
return 0.0;
}
| Shows a dialog used to accept input for applying a torque to a body. <p> Returns zero if the dialog is closed or canceled. |
public final void sort(){
flushLocal();
((SortTODSharedDeque)queue).sort();
}
| Sort the address on the shared stack. |
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
if (xmlWriter.getPrefix(namespace) == null) {
xmlWriter.writeNamespace(prefix,namespace);
x... | Util method to write an attribute with the ns prefix |
@Override public void run(){
amIActive=true;
String inputHeader1=null;
String inputHeader2=null;
if (args.length <= 0) {
showFeedback("Plugin parameters have not been set.");
return;
}
inputHeader1=args[0];
inputHeader2=args[1];
if (inputHeader1 == null || inputHeader2 == null) {
showFeedbac... | Used to execute this plugin tool. |
void remove(String key){
map.remove(key);
}
| Remove a session attribute from the map. |
public static Map<String,Object> findProductById(DispatchContext ctx,Map<String,Object> context){
Delegator delegator=ctx.getDelegator();
String idToFind=(String)context.get("idToFind");
String goodIdentificationTypeId=(String)context.get("goodIdentificationTypeId");
String searchProductFirstContext=(String)con... | Finds productId(s) corresponding to a product reference, productId or a GoodIdentification idValue |
@Override public void writeExternal(ObjectOutput out) throws IOException {
super.writeExternal(out);
out.writeDouble(knnDistance);
}
| Calls the super method and writes the knn distance of this entry to the specified stream. |
public Number parse(String text,ParsePosition parsePosition){
String s=text.substring(parsePosition.getIndex());
long tot=0, max=0;
char ch[]=s.toUpperCase().toCharArray();
int i, p;
for (p=ch.length - 1; p >= 0; p--) {
for (i=0; i < syms.length; i++) {
if (syms[i].symbol == ch[p]) {
if (sym... | This method converts a Roman Numeral string to a long integer. It does not check that the string is in the correct format - for some incorrectly formatted numbers, i.e. iix, it will produce a number. For others, it will throw an exception. |
public static String encodeWithinQuery(final String unescaped) throws URIException {
return encodeWithinQuery(unescaped,URI.getDefaultProtocolCharset());
}
| Escape and encode a string regarded as within the query component of an URI with the default protocol charset. When a query comprise the name and value pairs, it is used in order to encode each name and value string. The reserved special characters within a query component are being included in encoding the query. |
protected void removeValues() throws Exception {
int i, j;
int flag, count;
count=m_vals.size();
j=0;
for (i=0; i < count; i++) {
flag=m_editFlags.get(j);
if ((flag == FolderEditFlag.NONE) || (flag == FolderEditFlag.UPDATE)) {
flag=FolderEditFlag.REMOVE;
m_editFlags.set(j,flag);
j=j ... | Elimina todos los valores asociados al campo multivalor |
public boolean equals(Object obj){
if (this == obj) {
return true;
}
if (obj instanceof AttributeSet) {
AttributeSet attrs=(AttributeSet)obj;
return isEqual(attrs);
}
return false;
}
| Compares this object to the specified object. The result is <code>true</code> if the object is an equivalent set of attributes. |
protected void reset(int linksSize,int varArraySize){
_frameTop=0;
_linksTop=0;
if (_links == null) {
_links=new int[linksSize];
}
_links[_linksTop++]=0;
_stackFrames=new XObject[varArraySize];
}
| Reset the stack to a start position. |
public SimpleDateFormat(){
super();
}
| Construct a SimpleDateFormat with no pattern. |
private static double[][] powerSymmMatrix(double[][] inMatrix,double power){
EigenValueDecompositionSymm eigenDeco=new EigenValueDecompositionSymm(inMatrix);
int m=Matrix.getNumOfRows(inMatrix);
double[][] eigenVectors=eigenDeco.getV();
double[] eigenValues=eigenDeco.getRealEigenvalues();
for (int i=0; i < m;... | Calculates the power of a symmetric matrix. |
public boolean isValid(){
if (!_parameters.hasParameter("required") && !_parameters.hasParameter("if_available")) {
_log.warn("One of 'required' or 'if_available' parameters must be present.");
return false;
}
if (!_parameters.hasParameter("mode") || !"fetch_request".equals(_parameters.getParameterValue("... | Checks the validity of the extension. <p> Used when constructing a extension from a parameter list. |
private void breakBarrier(){
generation.broken=true;
count=parties;
trip.signalAll();
}
| Sets current barrier generation as broken and wakes up everyone. Called only while holding lock. |
@RequestMapping(value="/foos/{id}",method=RequestMethod.DELETE,produces=MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<Void> deleteFoo(@PathVariable Long id){
log.debug("REST request to delete Foo : {}",id);
fooRepository.delete(id);
return ResponseEntity.ok().headers(HeaderUtil.createEntityDeleti... | DELETE /foos/:id -> delete the "id" foo. |
private static boolean isViewDescendantOf(View child,View parent){
if (child == parent) {
return true;
}
final ViewParent theParent=child.getParent();
return (theParent instanceof ViewGroup) && isViewDescendantOf((View)theParent,parent);
}
| Return true if child is a descendant of parent, (or equal to the parent). |
protected RrdNioBackend(String path,boolean readOnly,int syncPeriod) throws IOException {
super(path,readOnly);
try {
mapFile();
if (!readOnly) {
fileSyncTimer.schedule(syncTask,syncPeriod * 1000L,syncPeriod * 1000L);
}
}
catch ( final IOException ioe) {
super.close();
throw ioe;
}
}... | Creates RrdFileBackend object for the given file path, backed by java.nio.* classes. |
private static Device findAvailableDevice(){
Device device=Display.getCurrent();
if (device == null) {
device=Display.getDefault();
}
if (device == null) throw new IllegalStateException("No display available");
return device;
}
| Find an available device to create image with. |
public static final int max(int a,int b,int c){
return (a > b) ? ((a > c) ? a : c) : ((b > c) ? b : c);
}
| Returns the maximum value of three ints. |
public void commit() throws IOException {
if (hasErrors) {
completeEdit(this,false);
remove(entry.key);
}
else {
completeEdit(this,true);
}
}
| Commits this edit so it is visible to readers. This releases the edit lock so another edit may be started on the same key. |
public void updateOwners(Property property,BasicProperty basicProp,Address ownerAddress){
int orderNo=0;
basicProp.getPropertyOwnerInfo().clear();
for ( final PropertyOwnerInfo ownerInfo : property.getBasicProperty().getPropertyOwnerInfoProxy()) {
if (ownerInfo != null) {
User user=null;
if (Stri... | Update the owners for a property |
public Object runSafely(Catbert.FastStack stack) throws Exception {
MediaFile mf=getMediaFile(stack);
return Boolean.valueOf(mf != null && mf.isPicture());
}
| Returns true if this MediaFile's content represents a picture file |
@Override protected EClass eStaticClass(){
return StextPackage.Literals.EXIT_EVENT;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public String globalInfo(){
return "Class for visualizing class probability estimates.\n\n" + "For more information, see\n\n" + getTechnicalInformation().toString();
}
| Returns a string describing this tool |
public void write(Out out,int value) throws IOException {
int code=codes[value];
int bitCount=30 - Integer.numberOfLeadingZeros(code);
Node n=tree;
for (int i=bitCount; i >= 0; i--) {
boolean goRight=((code >> i) & 1) == 1;
int prob=(int)((long)MAX_PROBABILITY * n.right.frequency / n.frequency);
out... | Write a value. |
public TreeRTGAcaciaAbyssinica(){
super();
this.logBlock=Blocks.LOG2.getDefaultState();
this.leavesBlock=Blocks.LEAVES2.getDefaultState();
this.trunkSize=12;
}
| <b>Acacia Abyssinica (Flat-top Acacia)</b><br><br> <u>Relevant variables:</u><br> logBlock, logMeta, leavesBlock, leavesMeta, trunkSize, <s>crownSize</s>, noLeaves<br><br> <u>DecoTree example:</u><br> DecoTree decoTree = new DecoTree(new TreeRTGAcaciaAbyssinica());<br> decoTree.treeType = DecoTree.TreeType.RTG_TREE;<br... |
public void ifPresent(IntConsumer consumer){
if (isPresent) consumer.accept(value);
}
| Have the specified consumer accept the value if a value is present, otherwise do nothing. |
private static boolean contains(String value,int start,int length,String criteria1,String criteria2,String criteria3,String criteria4){
return contains(value,start,length,new String[]{criteria1,criteria2,criteria3,criteria4});
}
| Shortcut method with 4 criteria |
private void writeTreeLikelihood(String tag,String id,int num,PartitionData partition,XMLWriter writer){
PartitionSubstitutionModel substModel=partition.getPartitionSubstitutionModel();
PartitionTreeModel treeModel=partition.getPartitionTreeModel();
PartitionClockModel clockModel=partition.getPartitionClockModel(... | Write the tree likelihood XML block. |
private static void sift(final int[] primary,final int[] names,final int left,final int right){
int currentLeft;
final int primaryTMP;
final int namesTMP;
int childL;
currentLeft=left;
primaryTMP=primary[currentLeft];
namesTMP=names[currentLeft];
childL=2 * left + 1;
if ((childL < right) && (primary[c... | quick sort list on 1 value with names as int primary is sorted into ascending order and names is joined to primary. so if primary[i] is moved to primary[j], then names[i] is moved to names[j] |
public static cuComplex cuCmul(cuComplex x,cuComplex y){
cuComplex prod;
prod=cuCmplx((cuCreal(x) * cuCreal(y)) - (cuCimag(x) * cuCimag(y)),(cuCreal(x) * cuCimag(y)) + (cuCimag(x) * cuCreal(y)));
return prod;
}
| Returns the product of the given complex numbers.<br /> <br /> Original comment:<br /> <br /> This implementation could suffer from intermediate overflow even though the final result would be in range. However, various implementations do not guard against this (presumably to avoid losing performance), so we don't do it... |
public View onContentViewCreated(View contentView){
ViewGroup mainView=(ViewGroup)activity.getLayoutInflater().inflate(layoutId,null);
mainView.addView(contentView,0);
return mainView;
}
| This event is fired when root content view is created |
public static KeyPair load(File certificateFile,File privateKeyFile,String privateKeyPassword) throws IOException, UnrecoverableKeyException, NoSuchAlgorithmException, CertificateException, KeyStoreException {
Cert cert=Cert.load(certificateFile);
PrivKey privKey=PrivKey.loadFromKeyStore(privateKeyFile,privateKeyPa... | Load Certificate & Private key pair from X.509 and keystore file |
public void addPrivilegedService(Class<? extends Service> serviceType){
super.addPrivilegedService(serviceType);
}
| Adds a service to a privileged list, allowing it to operate on authorization. context |
protected byte[] engineDoFinal(byte[] input,int inputOffset,int inputLen) throws IllegalBlockSizeException, BadPaddingException {
return core.doFinal(input,inputOffset,inputLen);
}
| Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. The data is encrypted or decrypted, depending on how this cipher was initialized. <p>The first <code>inputLen</code> bytes in the <code>input</code> buffer, starting at <code>inputOffset</code>, and any input bytes that may hav... |
public void startTransition(long durationMillis){
mFrom=0;
mTo=255;
mAlpha=0;
mDuration=mOriginalDuration=durationMillis;
mReverse=false;
mTransitionState=TRANSITION_STARTING;
invalidateSelf();
}
| Begin the second layer on top of the first layer. |
private void drawXTickMarks(Graphics g){
Rectangle plotRect=getPlotRect();
int yPos=plotRect.y + plotRect.height;
NumberFormat nf=NumberFormatUtil.getInstance().getNumberFormat();
for (double d=0.0; d <= 1.0; d+=0.1) {
int xPos=getXPos(d);
g.setColor(boundaryColor);
g.drawLine(xPos,yPos,xPos,yPos - ... | This method draws tick marks for the x axis. The x axis represents pi_e, the true probability of effect in treatment, and ranges in value from pi_c to 1.0. |
private static String buildToolTip(final ZyLabelContent content){
return HtmlGenerator.getHtml(content,MONOSPACE_FONT,true);
}
| Builds the tooltip text of a table row from the content of a node. |
public static double convertFeetToMeters(double feet){
return (feet / METERS_TO_FEET);
}
| Converts distance in feet to distance in meters. |
public static void appendUnpaddedInteger(StringBuffer buf,int value){
if (value < 0) {
buf.append('-');
if (value != Integer.MIN_VALUE) {
value=-value;
}
else {
buf.append("" + -(long)Integer.MIN_VALUE);
return;
}
}
if (value < 10) {
buf.append((char)(value + '0'));
}
els... | Converts an integer to a string, and appends it to the given buffer. <p>This method is optimized for converting small values to strings. |
public boolean isConstant(){
return constant;
}
| tells if arg we are poxying for is dynamic or constant. |
public void write(byte[] buf) throws IOException {
write(buf,0,buf.length);
}
| Write a byte array to the output stream. |
public static _Fields findByThriftIdOrThrow(int fieldId){
_Fields fields=findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
| Find the _Fields constant that matches fieldId, throwing an exception if it is not found. |
private static byte[] encode3to4(byte[] b4,byte[] threeBytes,int numSigBytes){
encode3to4(threeBytes,0,numSigBytes,b4,0);
return b4;
}
| Encodes up to the first three bytes of array <var>threeBytes</var> and returns a four-byte array in Base64 notation. The actual number of significant bytes in your array is given by <var>numSigBytes</var>. The array <var>threeBytes</var> needs only be as big as <var>numSigBytes</var>. Code can reuse a byte array by pas... |
public void closeFile(){
closeFile(true);
}
| closes the current tab |
public void updateStatus(JobContext jobContext){
try {
if (_status == JobStatus.SUCCESS) {
s_logger.debug("Calling task completer for successful job");
_taskCompleter.ready(jobContext.getDbClient());
}
else if (_status == JobStatus.FAILED) {
s_logger.debug("Calling task completer for fa... | Update the status after a poll. |
private void cancelScrollFeedback(){
removeMessages(SCROLL_FEEDBACK);
}
| Removes any pending scroll position feedback. Call this for every event. |
public final void actionDelete() throws BasicException {
saveData();
if (canDeleteData()) {
Object obj=getCurrentElement();
int iIndex=getIndex();
int iCount=m_bd.getSize();
if (iIndex >= 0 && iIndex < iCount) {
m_iState=ST_DELETE;
m_editorrecord.writeValueDelete(obj);
m_Dirty.setD... | Delete data |
public QueryInvalidException(String msg){
super(msg);
}
| Construct an instance of QueryInvalidException |
public static Timestamp toTimestamp(String string){
if (string == null) return null;
else try {
return Timestamp.valueOf(string);
}
catch ( Throwable t) {
return null;
}
}
| Return Timestamp value using a String. Null or conversion error returns null. |
public boolean hasNext(){
return (current != null);
}
| Determine if there are more Nodes in the list to be reported. |
@Override public long skip(long n) throws IOException {
if (n <= 0) {
return n;
}
long skipLen=0;
while (n > 0) {
long sublen=Math.min(n,_readLength - _readOffset);
if (sublen > 0) {
_readOffset+=sublen;
skipLen+=sublen;
n-=sublen;
}
else {
if (_source.hasSkip()) {
... | Skips the next <code>n</code> bytes. |
@Override public double op(double z){
z=(z - average) / sigma;
double result=0.5 * (1.0 + errorFunction.op(z * Constants.M_SQRT_2));
if (result <= 1e-8) {
double sum=1.0;
final double zsqr=z * z;
double i=1.0, g=1.0, x, y, a=Constants.QL_MAX_REAL, lasta;
do {
lasta=a;
x=(4.0 * i - 3.0)... | Computes the cumulative normal distribution. <p> Asymptotic expansion for very negative z as references on M. Abramowitz book. |
public boolean isZoomXEnabled(){
return mZoomXEnabled;
}
| Returns the enabled state of the zoom on X axis. |
protected void connectToAnyPeer() throws PeerDiscoveryException {
final State state=state();
if (!(state == State.STARTING || state == State.RUNNING)) return;
PeerAddress addr=null;
long nowMillis=Utils.currentTimeMillis();
long retryTime=0;
lock.lock();
try {
if (!haveReadyInactivePeer(nowMillis)) ... | Picks a peer from discovery and connects to it. If connection fails, picks another and tries again. |
public int read(char buff[],int off,int len) throws IOException {
int b=read();
if (b == -1) return -1;
else {
buff[off]=(char)b;
return 1;
}
}
| This is a degenerate implementation. I don't know how to keep this from blocking if we try to read more than one char... There is no available() for Readers ?? |
public InputStream read(int size,boolean extraCRLF) throws DecodingException {
nextSeen=false;
nextChar=0;
FixedLengthInputStream fin=new FixedLengthInputStream(this.in,size);
if (extraCRLF) {
return new EolInputStream(this,fin);
}
else {
return fin;
}
}
| Reads and consumes a number of characters from the underlying reader, filling the char array provided. TODO: remove unnecessary copying of bits; line reader should maintain an internal ByteBuffer; |
public static void registerTurtleUpgrade(ITurtleUpgrade upgrade){
if (upgrade != null) {
findCC();
if (computerCraft_registerTurtleUpgrade != null) {
try {
computerCraft_registerTurtleUpgrade.invoke(null,upgrade);
}
catch ( Exception e) {
}
}
}
}
| Registers a new turtle turtle for use in ComputerCraft. After calling this, users should be able to craft Turtles with your new turtle. It is recommended to call this during the load() method of your mod. |
private void showFeedback(String feedback){
if (myHost != null) {
myHost.showFeedback(feedback);
}
else {
System.out.println(feedback);
}
}
| Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface. |
public void println(long x){
out.println(x);
}
| Print a long and then terminate the line. |
public static String[] warningOptionNames(){
String[] result={OPTION_ReportAnnotationSuperInterface,OPTION_ReportAssertIdentifier,OPTION_ReportAutoboxing,OPTION_ReportComparingIdentical,OPTION_ReportDeadCode,OPTION_ReportDeadCodeInTrivialIfStatement,OPTION_ReportDeprecation,OPTION_ReportDeprecationInDeprecatedCode,OP... | Return all warning option names for use as keys in compiler options maps. |
public AnchorUpdateControl(Layout[] layout,String action){
this(layout,action,true);
}
| Create a new AnchorUpdateControl. |
public static Data convertInputType(String parameterName,Object parameterValue,Metadata metadata){
String name=parameterName;
Object value=parameterValue;
boolean hasMetadata=(metadata != null) ? true : false;
boolean hasMatrixMetadata=hasMetadata && (metadata instanceof MatrixMetadata) ? true : false;
boolea... | Convert input types to internal SystemML representations |
@Override public List<ExampleSetBasedIndividual> operate(ExampleSetBasedIndividual individual) throws Exception {
List<ExampleSetBasedIndividual> l=new LinkedList<ExampleSetBasedIndividual>();
AttributeWeightedExampleSet clone=(AttributeWeightedExampleSet)individual.getExampleSet().clone();
double p=prob < 0 ? 1.... | Performs one of the following three mutations: <ul> <li>add a newly generated attribute</li> <li>add an original attribute</li> <li>remove an attribute</li> </ul> |
public int findPeakElement(int[] num){
if (num == null || num.length == 0) return 0;
int n=num.length;
if (n <= 1) return 0;
if (num[0] > num[1]) return 0;
if (num[n - 1] > num[n - 2]) return n - 1;
int left=1, right=n - 2;
while (left < right) {
int mid=(right - left) / 2 + left;
if (num[... | Binary search for a peak. Other peaks can be ignored. |
public static void serializeTrace(Model model){
try {
List<TLCState> trace=getErrorOfOriginalTrace(model).getStates(Length.ALL);
Assert.isNotNull(trace);
Iterator<TLCState> it=trace.iterator();
IFile traceSourceFile=model.getTraceSourceFile();
ModelHelper.createOrClearFiles(new IFile[]{traceSource... | Writes the trace to MC_TE.out. |
public AmqpSender createSender(final String address) throws Exception {
return createSender(address,false);
}
| Create a sender instance using the given address |
@Override public void prepareAccessibilityDrop(){
if (mReorderAlarm.alarmPending()) {
mReorderAlarm.cancelAlarm();
mReorderAlarmListener.onAlarm(mReorderAlarm);
}
}
| When performing an accessibility drop, onDrop is sent immediately after onDragEnter. So we need to complete all transient states based on timers. |
@RequestMapping(value="/{id}",params="action=delete",method=POST) public Callable<String> deleteTodo(@PathVariable("id") Long id){
return null;
}
| Delete a to-do item. |
public WitboxFaces(int face,int[] type){
mType=face;
generatePlaneCoords(face,type);
int vertexShader=ViewerRenderer.loadShader(GLES20.GL_VERTEX_SHADER,vertexShaderCode);
int fragmentShader=ViewerRenderer.loadShader(GLES20.GL_FRAGMENT_SHADER,fragmentShaderCode);
mProgram=GLES20.glCreateProgram();
GLES20.glA... | Sets up the drawing object data for use in an OpenGL ES context. Alberto: change alpha according to face |
public <T extends ServiceDocument>Iterable<T> selectedDocuments(Class<T> type){
if (this.results == null || this.results.selectedDocuments == null) {
return Collections.emptyList();
}
Stream<T> stream=this.results.selectedDocuments.values().stream().map(null);
return null;
}
| Iterate over all selected documents converted to the desired type. The returned iterable is not reusable. |
public static PlatformDecoder buildPlatformDecoder(PoolFactory poolFactory,boolean decodeMemoryFileEnabled){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
return new ArtDecoder(poolFactory.getBitmapPool(),poolFactory.getFlexByteArrayPoolMaxNumThreads());
}
else {
if (decodeMemoryFileEnabled ... | Provide the implementation of the PlatformDecoder for the current platform using the provided PoolFactory |
protected void uninstallListeners(){
frame.removePropertyChangeListener(this);
removePropertyChangeListener(this);
}
| Uninstall the listeners from the title pane. |
protected void paintData(Graphics2D g2,Variate.N xData,Variate.N yData){
g2.setPaint(linePaint);
g2.setStroke(lineStroke);
if (getSelectedPoints() != null && getSelectedPoints().size() > 0) {
for ( int i : getSelectedPoints()) {
double x=((Number)xTipData.get(i)).doubleValue();
double y=((Numbe... | Paint data series |
public MessageBuilder appendQuote(String content){
return appendCode("",content);
}
| Adds a multiline code block with no language highlighting. |
@Override public boolean isAscending(){
return false;
}
| Ascending is set to false as we are looking for Bottom N |
private DebugProtocolHelper(){
}
| You are not supposed to instantiate this class. |
public String name(){
return name;
}
| Returns bucket name. |
public MergePolicyWrapper(MergePolicy in){
this.in=in;
}
| Creates a new merge policy instance. |
public void pop(){
mv.visitInsn(Opcodes.POP);
}
| Generates a POP instruction. |
public static String ssx(String shpFileName){
String ret=null;
if (shpFileName != null) {
ret=shpFileName.substring(0,shpFileName.indexOf(".shp")) + ".ssx";
}
return ret;
}
| Figures out the ssx file name from the shp file name. |
@Nullable public GeoPoint center(){
return center;
}
| Query for the center of the map |
public static boolean running(){
return running;
}
| Check if the simulation is still running. This method should be used by entities to check if they should continue executing. |
public CheckItemProvider(AdapterFactory adapterFactory){
super(adapterFactory);
}
| This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc --> |
private boolean sendEmail(MRequest request,String AD_Message){
String subject=Msg.getMsg(m_client.getAD_Language(),AD_Message,new String[]{request.getDocumentNo()});
return m_client.sendEMail(request.getSalesRep_ID(),subject,request.getSummary(),request.createPDF());
}
| Send Alert EMail |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.