code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public void assertConvertible(Type s,Type t){
assertCastable(s,t,true);
}
| assert that 's' is convertible (method invocation conversion) to 't' |
private void returnData(Object ret){
if (myHost != null) {
myHost.returnData(ret);
}
}
| Used to communicate a return object from a plugin tool to the main Whitebox user-interface. |
public boolean dataSave(boolean manualCmd){
log.fine("#" + m_vo.TabNo + " - row="+ m_currentRow);
try {
if (hasChangedCurrentTabAndParents()) {
if (manualCmd || m_mTable.hasChanged(m_currentRow)) return false;
}
boolean retValue=(m_mTable.dataSave(manualCmd) == GridTable.SAVE_OK);
if (ma... | Unconditionally Save data |
@Override public void addMessageBatch(byte[][] commands,MessageContext[] msgCtx,int consensusId){
CommandsInfo command=new CommandsInfo(commands,msgCtx);
if (isToLog) {
if (log == null) createLogFile();
writeCommandToDisk(command,consensusId);
}
}
| Adds a message batch to the log. This batches should be added to the log in the same order in which they are delivered to the application. Only the 'k' batches received after the last checkpoint are supposed to be kept |
protected static void restoreViewport(FrameBuffer dest){
if (hasViewport && dest == null) {
Gdx.gl.glViewport((int)viewport.x,(int)viewport.y,(int)viewport.width,(int)viewport.height);
}
}
| Restores the previously set viewport if one was specified earlier and the destination buffer is the screen |
public boolean isInteger(){
return type == INTEGER;
}
| Checks whether the value of this NSNumber is an integer. |
public static boolean hasTargetClassBeenLoaded(){
return TARGET_CLASS_INSTANCE != null;
}
| Returns true if there is a loaded target class object. Warning: resetTargetClass() does not load the class, only discards the previous target class object. |
public static void debug(Player player,String msg){
debug(player,msg,false);
}
| Print out a message prefixed by the player's name if in debug mode. |
private double adjustTransform(){
double xMin=Double.POSITIVE_INFINITY;
double xMax=Double.NEGATIVE_INFINITY;
double yMin=Double.POSITIVE_INFINITY;
double yMax=Double.NEGATIVE_INFINITY;
for ( String loc : env.getMap().getLocations()) {
Point2D point=env.getMap().getPosition(loc);
xMin=Math.min(xMin,p... | Computes transforms (translations and scaling) and applies them to the environment state view. Those transforms map location positions in the map to screen positions in the viewer pane. |
@Override public void populateDAG(DAG dag,Configuration conf){
JdbcPOJOInsertOutputOperator jdbcOutput=new JdbcPOJOInsertOutputOperator();
jdbcOutput.setFieldInfos(addFieldInfos());
JdbcTransactionalStore outputStore=new JdbcTransactionalStore();
jdbcOutput.setStore(outputStore);
jdbcOutput.setTablename("Test... | Populate dag with High-Level API. |
public int[] updateRemainingAttributes(int[] selectedAttributes,int bestAttribute){
int[] remainingAttributes;
if (columnTable.representsNominalAttribute(bestAttribute)) {
remainingAttributes=removeAttribute(bestAttribute,selectedAttributes);
}
else {
remainingAttributes=selectedAttributes;
}
return ... | If the bestAttribute is nominal, its number is removed from the selectedAttributes, otherwise it stays the same. |
protected boolean canUseDiamond(){
return fCanUseDiamond;
}
| Tells whether this proposal can use the diamond. |
public final void clear(int index){
bits[index >>> 0x5]&=~(1 << (index & 0x1f));
}
| Clears the bit on the given index. Index is expected to be in range - out of performance reasons no checks are done! |
private void unregisterLocationListener(){
if (myTracksLocationManager == null) {
Log.e(TAG,"locationManager is null.");
return;
}
myTracksLocationManager.removeLocationUpdates(locationListener);
}
| Unregisters the location manager. |
protected Node newNode(){
return new SVGOMAltGlyphItemElement();
}
| Returns a new uninitialized instance of this object's class. |
public static boolean addRollingMachineRecipe(ItemStack aResult,Object[] aRecipe){
aResult=GT_OreDictUnificator.get(true,aResult);
if (aResult == null || aRecipe == null || aResult.stackSize <= 0) return false;
try {
mods.railcraft.api.crafting.RailcraftCraftingManager.rollingMachine.getRecipeList().add(new... | Rolling Machine Crafting Recipe |
public CommentObject(CommentObject parent){
this.id=parent.getId();
this.content=parent.getContent();
this.creatorId=parent.getCreatorId();
this.attachId=parent.getAttachId();
this.attachType=parent.getAttachType();
this.deleted=parent.getDeleted();
this.projectId=parent.getProjectId();
this.created=par... | This method was generated by MyBatis Generator. This method corresponds to the database table comment |
protected boolean runAndReset(){
if (state != NEW || !UNSAFE.compareAndSwapObject(this,runnerOffset,null,Thread.currentThread())) return false;
boolean ran=false;
int s=state;
try {
Callable<V> c=callable;
if (c != null && s == NEW) {
try {
c.call();
ran=true;
}
catch ( ... | Executes the computation without setting its result, and then resets this future to initial state, failing to do so if the computation encounters an exception or is cancelled. This is designed for use with tasks that intrinsically execute more than once. |
public static String toString(final long value){
return Long.toString(value);
}
| Converts the given value to the XML string value. |
public static boolean isDefaultHapolicyRequestBackup(){
return DEFAULT_HAPOLICY_REQUEST_BACKUP;
}
| If true then the server will request a backup on another node |
public double normalDistance(final Vector v,final Membership... bounds){
return normalDistance(v.x,v.y,v.z,bounds);
}
| Compute normal distance from plane to a vector. |
private static Set<Emoticon> parseEmotes(String json,String channelRestriction){
Set<Emoticon> emotes=new HashSet<>();
if (json == null) {
return emotes;
}
JSONParser parser=new JSONParser();
try {
JSONObject root=(JSONObject)parser.parse(json);
String urlTemplate=(String)root.get("urlTemplate");
... | Parse emotes from the given JSON. |
private static boolean isCspAccountValid(PersistedAccount account,@NonNull String requestedProviderUrl){
return account != null && account.providerUrl.equals(requestedProviderUrl);
}
| Reports whether the persisted ChatSecure-Push account is valid. |
public static Automaton makeAnyBinary(){
Automaton a=new Automaton();
int s=a.createState();
a.setAccept(s,true);
a.addTransition(s,s,0,255);
a.finishState();
return a;
}
| Returns a new (deterministic) automaton that accepts all binary terms. |
static boolean parseLoopBody(BashPsiBuilder builder,boolean parseCompoundList,boolean enforcedDoKeyword){
final IElementType firstToken=ParserUtil.getTokenAndAdvance(builder);
if (firstToken == DO_KEYWORD && ParserUtil.isEmptyListFollowedBy(builder,DONE_KEYWORD)) {
ParserUtil.error(builder,"parser.shell.expecte... | Parses a compound list enclodes by {} or by DO .. DONE This type of command block is used in for and select loops. |
@Override public int countMissing(){
int count=0;
for (int i=0; i < size(); i++) {
if (getLong(i) == MISSING_VALUE) {
count++;
}
}
return count;
}
| Returns the count of missing values in this column |
private void cdiv(final double xr,final double xi,final double yr,final double yi){
double r, d;
if (Math.abs(yr) > Math.abs(yi)) {
r=yi / yr;
d=yr + r * yi;
cdivr=(xr + r * xi) / d;
cdivi=(xi - r * xr) / d;
}
else {
r=yr / yi;
d=yi + r * yr;
cdivr=(r * xr + xi) / d;
cdivi=(r * xi... | Complex scalar division. |
public CapabilitiesRequest(URI uri,String service) throws URISyntaxException {
super(uri,service);
if (uri == null) {
String message=Logging.getMessage("nullValue.URIIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
if (service == null) {
String message=L... | Constructs a request for a specified service at a specified server. |
public void testHiveCommandLine() throws Exception {
assertEquals(0,executeHiveQuery("create table table_a (" + "id_a int," + "id_b int"+ ") "+ "row format delimited fields terminated by '\\t'"+ "stored as textfile "+ "location '/table-a'"));
assertEquals(0,executeHadoopCmd("fs","-put",new File(testWorkDir,"data-a"... | Tests Hive integration. |
public static void sync(SolrCore core,List<String> replicas,int nUpdates){
ShardHandlerFactory shardHandlerFactory=core.getCoreDescriptor().getCoreContainer().getShardHandlerFactory();
ShardHandler shardHandler=shardHandlerFactory.getShardHandler();
for ( String replica : replicas) {
ShardRequest sreq=new Sh... | Requests and applies recent updates from peers |
@Override public int hashCode(){
return this.name.hashCode();
}
| Returns a hash code value for the object. |
public static Geometry read(Shape shp,double flatness,GeometryFactory geomFact){
PathIterator pathIt=shp.getPathIterator(INVERT_Y,flatness);
return ShapeReader.read(pathIt,geomFact);
}
| Converts a Shape to a Geometry, flattening it first. |
void remove(OsmElement element){
if (element.isUnchanged()) {
Log.e("DiscardedTags","Presented with unmodified element");
return;
}
boolean modified=false;
newTags=new TreeMap<String,String>();
for ( String key : element.getTags().keySet()) {
Log.d("DiscardedTags","Checking " + key);
if (!red... | Remove the redundant tags from element. Notes: - element already has the modified flag set if not, something went wrong and we skip - this does not create a checkpoint and assumes that we will never want to undo this |
public void start(){
UserTransaction userTransaction=startUserTransaction();
try {
start(userTransaction);
}
finally {
resolveUserTransaction(userTransaction);
}
}
| Based on the value of <em>wrapInUserTransaction</em>, wraps the call to start(UserTransaction) in a UserTransaction. |
@Deprecated public static <T>UnmodifiableIterator<T> unmodifiableIterator(UnmodifiableIterator<T> iterator){
return checkNotNull(iterator);
}
| Simply returns its argument. |
@DELETE @Path("/{id}") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @CheckPermission(roles={Role.SECURITY_ADMIN}) public Response deleteProvider(@PathParam("id") URI id){
AuthnProvider provider=getProviderById(id,false);
ArgValidator.checkEntityNotNull(provider,id,isIdEmbeddedInURL(id));
chec... | Delete the provider with the provided id. Authentication services will no longer use this provider for authentication. |
public BasicBlock exit(){
return _exitNode;
}
| Return the "exit" node of the FCFG. In a perfect world, we'd have the invariant that all nodes that are reachable in a forward traversal from cfgEntry() are exactly the same set of nodes as those that are reachable from cfgExit() via a reverse traversal, but that's currently not the case. Not all forward reachable no... |
public WebPage prepareWebpage(){
WebPage wp=WebPage.newBuilder().build();
wp.setStatus(1);
wp.setFetchInterval(interval);
wp.setScore(1.0f);
wp.setFetchTime(0L);
return wp;
}
| Prepare a Webpage to Test Adaptive Fetch Schedule. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:54:58.515 -0500",hash_original_method="E4304895721C991E07562D8775709E0E",hash_generated_method="4DEA8A7D31FCA622334591A054AF24E7") public void removeChargingCollectionFunctionAddress(String ccfAddress) throws ParseException {
if (ccf... | <p>Remove a Charging Collection Function (CCF) Address set in this header</p> |
public InvalidAttributeIdentifierException(String explanation){
super(explanation);
}
| Constructs a new instance of InvalidAttributeIdentifierException using the explanation supplied. All other fields set to null. |
public boolean isGlobal(){
return this == GLOBAL;
}
| Returns whether this is global scope. |
public void repaint(){
initialiseHeader();
this.setModel(this.getModel());
return;
}
| Repaint the Table. |
public CharSeq forEachLine(Consumer<CharSeq> action){
Objects.requireNonNull(action);
Seq<CharSeq> lines=this.eachLine();
lines.forEach(action);
return this;
}
| Performs the given action for each line of the CharSeq. |
public static <T extends MessageNano>String print(T message){
if (message == null) {
return "";
}
StringBuffer buf=new StringBuffer();
try {
print(null,message,new StringBuffer(),buf);
}
catch ( IllegalAccessException e) {
return "Error printing proto: " + e.getMessage();
}
catch ( Invocation... | Returns an text representation of a MessageNano suitable for debugging. The returned string is mostly compatible with Protocol Buffer's TextFormat (as provided by non-nano protocol buffers) -- groups (which are deprecated) are output with an underscore name (e.g. foo_bar instead of FooBar) and will thus not parse. <p>E... |
public ObjectTypeAttributes clone(){
ObjectTypeAttributes result=new ObjectTypeAttributes();
result.SpecifiedAttributes=SpecifiedAttributes;
result.DisplayName=DisplayName;
result.Description=Description;
result.WriteMask=WriteMask;
result.UserWriteMask=UserWriteMask;
result.IsAbstract=IsAbstract;
retur... | Deep clone |
public void putDouble(String key,double value){
unparcel();
mMap.put(key,value);
}
| Inserts a double value into the mapping of this Bundle, replacing any existing value for the given key. |
@Override public void connect(SocketAddress addr) throws SocketException {
if (delegate == null) super.connect(addr);
else delegate.connect(addr);
}
| Connects this socket to a remote socket address. |
public void fireGenerateEvent(int eventType,char[] ch,int start,int length){
}
| Fire off characters, cdate events. |
public static boolean equals(char[] a,char[] a2){
if (a == a2) return true;
if (a == null || a2 == null) return false;
int length=a.length;
if (a2.length != length) {
return false;
}
for (int i=0; i < length; i++) {
if (a[i] != a2[i]) return false;
}
return true;
}
| Returns <tt>true</tt> if the two specified arrays of chars are <i>equal</i> to one another. Two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. In other words, two arrays are equal if they contain the same elements in... |
public SymbolTableEntry basicGetRewiredTarget(){
return rewiredTarget;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public double extractFloatData(byte[] pachSourceData,int nMaxBytes,MutableInt pnConsumedBytes){
switch (pszFormatString.charAt(0)) {
case 'A':
case 'I':
case 'R':
case 'S':
case 'C':
String dataString=extractStringData(pachSourceData,nMaxBytes,pnConsumedBytes);
if (dataString.length() == 0) {
return 0;
}
tr... | Extract a subfield value as a float. Given a pointer to the data for this subfield (from within a DDFRecord) this method will return the floating point data for this subfield. The number of bytes consumed as part of this field can also be fetched. This method may be called for any type of subfield, and will return zero... |
@SuppressWarnings("unchecked") private void init(int left,int right){
root=(T)constructor.construct(left,right);
expandLeft(root);
expandRight(root);
}
| Initialize the tree. Manages segments drawn from the [left, right) domain. |
public Word prepareWord(Offset offset){
return loadWord(offset);
}
| Prepare for an atomic store operation. This must be associated with a related call to attempt. |
public static Collection<ImppType> all(){
return enums.all();
}
| Gets all of the parameter values that are defined as static constants in this class. |
public static TypeReference newTypeReference(int sort){
return new TypeReference(sort << 24);
}
| Returns a type reference of the given sort. |
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 verifyExceptionCaptured(Class<? extends Throwable> expectedExceptionClass){
assertTrue("Excpected exception not thrown",exceptionEventCapture.hasCaptured());
Throwable caughtEx=exceptionEventCapture.getValue().getCause();
assertEquals(expectedExceptionClass,caughtEx.getClass());
exceptionEventCapture.reset... | Verify that the given exception event capture (as returned by getAndInitExceptionCapture) has thrown an exception of the given expectedExceptionClass. Resets the capture |
public boolean isTask(){
return X_AD_Menu.ACTION_Task.equals(m_imageIndicator);
}
| Is Task |
public void testExactPhraseVersusMultiPhraseWithHoles() throws Exception {
Term t1=randomTerm();
Term t2=randomTerm();
PhraseQuery.Builder builder=new PhraseQuery.Builder();
builder.add(t1,0);
builder.add(t2,2);
PhraseQuery q1=builder.build();
Term t3=randomTerm();
MultiPhraseQuery.Builder q2b=new Multi... | same as above, with posincs |
public ASTNode createAST(IProgressMonitor monitor){
ASTNode result=null;
if (monitor != null) monitor.beginTask("",1);
try {
if (this.rawSource == null && this.typeRoot == null) {
throw new IllegalStateException("source not specified");
}
result=internalCreateAST(monitor);
}
finally {
... | Creates an abstract syntax tree. <p> A successful call to this method returns all settings to their default values so the object is ready to be reused. </p> |
public Message sendMessageSynchronously(int what,int arg1,int arg2,Object obj){
Message msg=Message.obtain();
msg.what=what;
msg.arg1=arg1;
msg.arg2=arg2;
msg.obj=obj;
Message resultMsg=sendMessageSynchronously(msg);
return resultMsg;
}
| Send the Message synchronously. |
public LessThan(){
super(Boolean.class,Number.class,Number.class);
}
| Constructs a new node for comparing if a number is less than another. |
public void addHUDObject(Node geom){
hud_group.addChild(geom);
}
| Add some goemetry to the HUD area. This geometry must come complete with its own parent transform to offset the object by the appropriate amount. The camera does not do any auto-offsets of geometry. |
public boolean toThunderState(){
return to;
}
| Gets the state of thunder that the world is being set to |
public static final int[] trim(int[] a,int size){
if (a.length == size) {
return a;
}
else {
int[] b=new int[size];
System.arraycopy(a,0,b,0,size);
return b;
}
}
| Trims an array to be exactly the target a size. |
public LazyArray(final ObjectProvider<? extends Type> provider,final boolean ordered,final Type[] array,final int start,final int count){
super(ordered,array,start,count);
this.provider=provider;
}
| Creates a new array containing the elements in the specified array. The new array will have the same type of backing array. The capacity is set to the number of elements, so any subsequent elements added will cause the backing array to be grown. |
public String extractMsgFileName(byte[] stegoData,String stegoFileName) throws OpenStegoException {
RandomLSBInputStream lsbIS=null;
lsbIS=new RandomLSBInputStream(ImageUtil.byteArrayToImage(stegoData,stegoFileName),this.config);
return lsbIS.getDataHeader().getFileName();
}
| Method to extract the message file name from the stego data |
public static void write(String s,Address a){
write(s);
write(a);
}
| writes a string followed by an address, in hexadecimal. |
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. |
public static boolean saveFile(String fileName,String m){
try {
PrintWriter out=new PrintWriter(fileName);
out.println(m);
out.close();
return true;
}
catch ( IOException ioex) {
return false;
}
}
| Standard "save". Write the string to the file. |
public JSONObject accumulate(String key,Object value) throws JSONException {
testValidity(value);
Object o=opt(key);
if (o == null) {
put(key,value instanceof JSONArray ? new JSONArray().put(value) : value);
}
else if (o instanceof JSONArray) {
((JSONArray)o).put(value);
}
else {
put(key,new J... | Accumulate values under a key. It is similar to the put method except that if there is already an object stored under the key then a JSONArray is stored under the key to hold all of the accumulated values. If there is already a JSONArray, then the new value is appended to it. In contrast, the put method replaces the pr... |
public Rectangle(Size rectSize){
setRect(new Rect(0,0,(int)rectSize.width,(int)rectSize.height));
}
| Create a rectangle of specified size with top = 0 and left = 0 |
public void testPrivateMode() throws Exception {
processIsolatedModeTest(DeploymentMode.PRIVATE);
}
| Test GridDeploymentMode.PRIVATE mode. |
public static byte[] encode(byte[] source,int off,int len,byte[] alphabet,int maxLineLength){
int lenDiv3=(len + 2) / 3;
int len43=lenDiv3 * 4;
byte[] outBuff=new byte[len43 + (len43 / maxLineLength)];
int d=0;
int e=0;
int len2=len - 2;
int lineLength=0;
for (; d < len2; d+=3, e+=4) {
int inBuff=((... | Encodes a byte array into Base64 notation. |
public final char yycharat(int pos){
return zzBuffer[zzStartRead + pos];
}
| Returns the character at position <tt>pos</tt> from the matched text. It is equivalent to yytext().charAt(pos), but faster |
public static void main(String args[]){
new RouteFindingAgentApp().startApplication();
}
| Application starter. |
public static final String mangleChar(char ch){
char[] result=new char[5];
result[0]='_';
result[1]=Character.forDigit((ch >> 12) & 0xf,16);
result[2]=Character.forDigit((ch >> 8) & 0xf,16);
result[3]=Character.forDigit((ch >> 4) & 0xf,16);
result[4]=Character.forDigit(ch & 0xf,16);
return new String(resu... | Mangle the specified character to create a legal Java class name. |
public String toString(){
return " at " + this.index + " [character "+ this.character+ " line "+ this.line+ "]";
}
| Make a printable string of this JSONTokener. |
public int hashCode(){
int hash=Float.floatToIntBits(width);
hash=hash * 31 + join;
hash=hash * 31 + cap;
hash=hash * 31 + Float.floatToIntBits(miterlimit);
if (dash != null) {
hash=hash * 31 + Float.floatToIntBits(dash_phase);
for (int i=0; i < dash.length; i++) {
hash=hash * 31 + Float.floatTo... | Returns the hashcode for this stroke. |
private void closeMessage(){
Intent intent=new Intent(getApplicationContext(),SmsPopupUtilsService.class);
intent.setAction(SmsPopupUtilsService.ACTION_MARK_MESSAGE_READ);
intent.putExtras(smsPopupPager.getActiveMessage().toBundle());
WakefulBroadcastReceiver.startWakefulService(getApplicationContext(),intent);... | Close the message window/popup, mark the message read if the user has this option on |
public boolean isFullyZoomedOutX(){
if (mScaleX > mMinScaleX || mMinScaleX > 1f) return false;
else return true;
}
| Returns true if the chart is fully zoomed out on it's x-axis (horizontal). |
protected POInfo initPO(Properties ctx){
POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName());
return poi;
}
| Load Meta Data |
public static Uri createDocumentDataString(int id,String initialUrl){
return new Uri.Builder().scheme(UrlConstants.DOCUMENT_SCHEME).authority(String.valueOf(id)).query(initialUrl).build();
}
| Creates a data string which stores the base information we need to relaunch a task: a unique identifier and the URL to load. |
private void updatePos(int change){
if (change == 0) {
return;
}
boolean isUnderTouch=mPtrIndicator.isUnderTouch();
if (isUnderTouch && !mHasSendCancelEvent && mPtrIndicator.hasMovedAfterPressedDown()) {
mHasSendCancelEvent=true;
sendCancelEvent();
}
if ((mPtrIndicator.hasJustLeftStartPosition()... | Apply position change to the view. |
public void populate(SqlStatementData sqlData,Object connection){
ConnectionMetaData connectionMetaData=get(connection);
if ((null != connectionMetaData) && (EMPTY != connectionMetaData)) {
sqlData.setDatabaseProductName(connectionMetaData.product);
sqlData.setDatabaseProductVersion(connectionMetaData.versi... | Populates the given SQL Statement data with the meta information from the storage if this data exist. |
public PropertyStringFormatException(){
super();
}
| Constructs a <code>MapRequestFormatException</code> with <tt>null</tt> as its error message string. |
public GeolocSharingDeleteTask(GeolocSharingServiceImpl geolocSharingService,RichcallService richcallService,LocalContentResolver contentResolver,ContactId contact){
super(contentResolver,GeolocSharingData.CONTENT_URI,GeolocSharingData.KEY_SHARING_ID,GeolocSharingData.KEY_CONTACT,contact);
mGeolocSharingService=geo... | Deletion of all geoloc sharing with a specific contact. |
protected POInfo initPO(Properties ctx){
POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName());
return poi;
}
| Load Meta Data |
public static long divide(long dividend,long divisor){
if (divisor < 0) {
if (compare(dividend,divisor) < 0) {
return 0;
}
else {
return 1;
}
}
if (dividend >= 0) {
return dividend / divisor;
}
long quotient=((dividend >>> 1) / divisor) << 1;
long rem=dividend - quotient * divis... | Returns dividend / divisor, where the dividend and divisor are treated as unsigned 64-bit quantities. |
public static double end(String name){
double time=(System.currentTimeMillis() - getExecutionTimes().get(name)) / 1000.0;
getExecutionTimes().remove(name);
return time;
}
| Finalizes measuring the execution time of a method/process. |
@TargetApi(Build.VERSION_CODES.KITKAT) public void removePauseListener(android.animation.Animator.AnimatorPauseListener listener){
mNativeAnimator.removePauseListener(listener);
}
| Removes a pause listener from the set listening to this animation. |
public static void main(String[] args){
Scanner input=new Scanner(System.in);
System.out.print("Enter n: ");
int n=input.nextInt();
printMatrix(n);
}
| Main Method |
public synchronized long term(){
Map.Entry<Long,Long> entry=terms.lastEntry();
return entry != null ? entry.getValue() : 0;
}
| Returns the highest term in the index. |
public ArrayNode putArray(String fieldName){
ArrayNode n=arrayNode();
_put(fieldName,n);
return n;
}
| Method that will construct an ArrayNode and add it as a field of this ObjectNode, replacing old value, if any. |
public ReturnType createReturnType(){
ReturnTypeImpl returnType=new ReturnTypeImpl();
return returnType;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override public boolean eIsSet(int featureID){
switch (featureID) {
case UmplePackage.ANONYMOUS_LINKING_OP_2__AND_OP_1:
return AND_OP_1_EDEFAULT == null ? andOp_1 != null : !AND_OP_1_EDEFAULT.equals(andOp_1);
case UmplePackage.ANONYMOUS_LINKING_OP_2__CONSTRAINT_EXPR_1:
return constraintExpr_1 != null && !constra... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public CommandNotExpectedException(TcpCommand expected,TcpCommand actual){
super(String.format("Expected : %s. Actual : %s.",expected,actual));
}
| Creates new a new instance. |
public void showLoading(){
isLoadingViewBeingShown=true;
changeViewsVisibility();
setViewVisibility(viewLoading,View.VISIBLE);
}
| Makes the loading view visible if the loading view was added to your layout. |
public static void showView(Activity context,int id){
if (context != null) {
View view=context.findViewById(id);
if (view != null) {
view.setVisibility(View.VISIBLE);
}
else {
Log.e("PercolateAndroidUtils","View does not exist. Could not hide it.");
}
}
}
| Sets visibility of the given view to <code>View.VISIBLE</code>. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:56:25.377 -0500",hash_original_method="9BD4203D3E5EBD7464FA7B2A4E6BD9E0",hash_generated_method="2901E5EF19F5713990C93D0D25796978") @SuppressWarnings({"unchecked"}) private void inheritValues(Values fromParent){
Object[] table=this.ta... | Inherits values from a parent thread. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.