code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public boolean equals2D(Coordinate c,double tolerance){
if (!NumberUtil.equalsWithTolerance(this.x,c.x,tolerance)) {
return false;
}
if (!NumberUtil.equalsWithTolerance(this.y,c.y,tolerance)) {
return false;
}
return true;
}
| Tests if another coordinate has the same values for the X and Y ordinates. The Z ordinate is ignored. |
public void start(int conditions) throws IOException {
print("conditions",new String[]{Integer.toBinaryString(conditions)});
printer.flush();
}
| Description of the Method |
@NamespacePermission(fields="#request?.namespace",permissions=NamespacePermissionEnum.EXECUTE) @Override @Transactional(propagation=Propagation.REQUIRES_NEW) public EmrCluster createCluster(EmrClusterCreateRequest request) throws Exception {
return createClusterImpl(request);
}
| Creates a new EMR Cluster. Creates its own transaction. |
public PrintStream remove(int index){
if ((index >= 0) && (index < size())) {
m_Timestamps.remove(index);
m_Prefixes.remove(index);
return (PrintStream)m_Streams.remove(index);
}
else {
return null;
}
}
| removes the given PrintStream from the list. |
public void readCVOpsMode(int CV,jmri.ProgListener p,int addr,boolean longAddr) throws jmri.ProgrammerException {
lopsa=addr & 0x7f;
hopsa=(addr / 128) & 0x7f;
mServiceMode=false;
doRead(CV,p,0x2F);
}
| Invoked by LnOpsModeProgrammer to start an ops-mode read operation. |
public static void assertTrue(boolean condition){
assertTrue(null,condition);
}
| Assert a condition is true. |
protected CoreContainer createCoreContainer(){
SolrResourceLoader loader=new SolrResourceLoader(SolrResourceLoader.locateSolrHome());
ConfigSolr config=loadConfigSolr(loader);
CoreContainer cores=new CoreContainer(loader,config);
cores.load();
return cores;
}
| Override this to change CoreContainer initialization |
public Builder delay(long delayMs){
currentDelayMs+=delayMs;
return this;
}
| Schedules a delay between executing any previous actions and any subsequent ones. |
public static byte[] decode(String s) throws java.io.IOException {
return decode(s,NO_OPTIONS);
}
| Decodes data from Base64 notation, automatically detecting gzip-compressed data and decompressing it. |
private UnManagedVolume findUnmanagedVolumeKnownToVipr(VPlexVirtualVolumeInfo info){
s_logger.info("Determining if Unmanaged Volume {} is known to ViPR",info.getName());
String volumeNativeGuid=info.getPath();
s_logger.info("...checking ViPR's UnManagedVolume table for volume native guid {}",volumeNativeGuid);
... | Determines if the given VPLEX volume information represents an unmanaged virtual volume that is already known to ViPR, and returns the UnManagedVolume object if it is found. |
public void inline(TestChromosome test){
inline(test.test);
}
| <p> inline </p> |
public static PSQLException extractPSQLException(Throwable exception){
while (exception != null) {
if (exception instanceof PSQLException) {
return (PSQLException)exception;
}
exception=exception.getCause();
}
return null;
}
| Extracts a PSQLException from an ORMLite wrapped SQLException. This is necessary in order to pull out sqlstate data |
public void deleteNode(final ViewNode node){
Preconditions.checkNotNull(node,"Error: Node argument can't be null");
naviView.getContent().deleteNode(node.getNative());
}
| Deletes a node from the view. |
public void addHeaderView(View v,Object data,boolean isSelectable){
ListAdapter adapter=getAdapter();
if (adapter != null && !(adapter instanceof HeaderViewGridAdapter)) {
throw new IllegalStateException("Cannot add header view to grid -- setAdapter has already been called.");
}
ViewGroup.LayoutParams lyp=v... | Add a fixed view to appear at the top of the grid. If addHeaderView is called more than once, the views will appear in the order they were added. Views added using this call can take focus if they want. <p/> NOTE: Call this before calling setAdapter. This is so HeaderGridView can wrap the supplied cursor with one that ... |
public String qty(Properties ctx,int WindowNo,GridTab mTab,GridField mField,Object value){
if (value == null) return "";
int M_Product_ID=Env.getContextAsInt(ctx,WindowNo,"M_Product_ID");
if (steps) log.warning("qty - init - M_Product_ID=" + M_Product_ID + " - ");
BigDecimal QtyOrdered=Env.ZERO;
BigDecima... | Order Line - Quantity. - called from C_UOM_ID, QtyEntered, QtyOrdered - enforces qty UOM relationship |
public static Polygon createRegularPolygon(double centerLat,double centerLon,double radiusMeters,int gons){
double[][] result=new double[2][];
result[0]=new double[gons + 1];
result[1]=new double[gons + 1];
for (int i=0; i < gons; i++) {
double angle=360.0 - i * (360.0 / gons);
double x=Math.cos(SloppyM... | Makes an n-gon, centered at the provided lat/lon, and each vertex approximately distanceMeters away from the center. Do not invoke me across the dateline or a pole!! |
public ExecutionNode basicGetNode(){
return node;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public IgniteInternalFuture<GridCacheReturn> fut(){
final Object obj=this.o;
if (obj instanceof GridCacheReturn) return new GridFinishedFuture<>((GridCacheReturn)obj);
else if (obj instanceof IgniteInternalFuture) return (IgniteInternalFuture)obj;
else if (obj == null) {
boolean res=COMPLETABLE_WRAPPE... | Allows wait for properly initialized value. |
private void animatePropertyBy(int constantName,float byValue){
float fromValue=getValue(constantName);
animatePropertyBy(constantName,fromValue,byValue);
}
| Utility function, called by the various xBy(), yBy(), etc. methods. This method is just like animateProperty(), except the value is an offset from the property's current value, instead of an absolute "to" value. |
public boolean isAlwaysFalse(){
return alwaysFalse;
}
| Check if the result is empty for sure. |
final boolean isMatched(){
Object x=item;
return (x == this) || ((x == null) == isData);
}
| Returns true if this node has been matched, including the case of artificial matches due to cancellation. |
@Override public View createView(final String name,final String description){
if (!isLoaded()) {
throw new IllegalStateException("Error: The project has not yet been loaded");
}
final INaviView newView=m_project.getContent().createView(name,description);
return ObjectFinders.getObject(newView,m_views);
}
| Creates a new empty project view. |
public static String base64Encode(byte[] data,boolean isUrlSafe){
Base64 encoder=new Base64(isUrlSafe);
return new String(encoder.encode(data)).replace("\r\n","");
}
| BASE64 encoding helper function |
public static Method findMethod(Class c,String methodName){
return findDeclaredMethod(c,methodName,true);
}
| Returns method from an object, matched by name. This may be considered as a slow operation, since methods are matched one by one. Returns only accessible methods. Only first method is matched. |
@Override public Object clone() throws CloneNotSupportedException {
ContourPlot clone=(ContourPlot)super.clone();
if (this.domainAxis != null) {
clone.domainAxis=(ValueAxis)this.domainAxis.clone();
clone.domainAxis.setPlot(clone);
clone.domainAxis.addChangeListener(clone);
}
if (this.rangeAxis != nu... | Extends plot cloning to this plot type |
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. |
public static void e(String tag,String msg){
if (sLevel > LEVEL_ERROR) {
return;
}
Log.e(tag,msg);
}
| Send an ERROR log message |
private static OFActionSetVlanVid decode_set_vlan_id(String actionToDecode,OFVersion version,Logger log){
Matcher n=Pattern.compile("((?:0x)?\\d+)").matcher(actionToDecode);
if (n.matches()) {
if (n.group(1) != null) {
try {
VlanVid vlanid=VlanVid.ofVlan(get_short(n.group(1)));
OFActionSet... | Parse set_vlan_id actions. The key and delimiter for the action should be omitted, and only the data should be presented to this decoder. Data with a leading 0x is permitted. |
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. |
public int size(){
return this.entries.size();
}
| Getter for the number of MXF metadata sets in the collection |
public static void assertNotNull(Object object){
Assert.assertNotNull(object);
}
| Asserts that an object isn't null. |
public void onProgress(int bytesWritten,int totalSize){
}
| Fired when the request progress, override to handle in your own code |
@Override protected void sendImpl(CommMessage message) throws IOException {
try {
protocol().send(ostream,message,istream);
ostream.flush();
}
catch ( IllegalBlockingModeException e) {
throw new IOException(e);
}
}
| Sends a message through the channel. |
public SVGFeMorphologyElementBridge(){
}
| Constructs a new bridge for the <feMorphology> element. |
public void printCurrentUnits(){
units.printCurrent();
}
| Print current (mid-phase) units |
@Inline public static boolean isForwardedOrBeingForwarded(ObjectReference object){
return (VM.objectModel.readAvailableByte(object) & FORWARDING_MASK) != 0;
}
| Has an object been forwarded or is it being forwarded? |
public HistogramSeriesAttributes(ChartGenerator generator,String name,int index,double[] values,int bins,SeriesChangeListener stoppable){
super(generator,name,index,stoppable);
setValues(values);
super.setSeriesName(name);
numBins=bins;
numBinsField.setValue(bins);
numBinsField.setInitialValue(bins);
}
| Produces a HistogramSeriesAttributes object with the given generator, series name, series index, and desire to display margin options. |
public Bindings add(String property,JTextArea textArea,String defaultValue){
registerPropertyChangeListener(textArea);
return add(new JTextComponentBinding(property,textArea,defaultValue));
}
| Handles JTextArea |
public ActionSenderUseChatBucket(String attribute){
this.attribute=attribute;
}
| use chat bucket |
public static HandshakeMessage fromByteArray(byte[] byteArray,InetSocketAddress peerAddress) throws HandshakeException {
DatagramReader reader=new DatagramReader(byteArray);
int major=reader.read(VERSION_BITS);
int minor=reader.read(VERSION_BITS);
ProtocolVersion version=new ProtocolVersion(major,minor);
Rand... | Creates a <em>Server Hello</em> object from its binary encoding as used on the wire. |
@Override public void eSet(int featureID,Object newValue){
switch (featureID) {
case N4mfPackage.DECLARED_VERSION__MAJOR:
setMajor((Integer)newValue);
return;
case N4mfPackage.DECLARED_VERSION__MINOR:
setMinor((Integer)newValue);
return;
case N4mfPackage.DECLARED_VERSION__MICRO:
setMicro((Integer)newValue);
retur... | <!-- begin-user-doc --> <!-- end-user-doc --> |
private static int hashCode(double[] array){
int prime=31;
if (array == null) {
return 0;
}
int result=1;
for ( double element : array) {
long temp=Double.doubleToLongBits(element);
result=(prime * result) + (int)(temp ^ (temp >>> 32));
}
return result;
}
| Returns a hash code value for the array. |
public static void addControl(Element bodyNode,Element controlNode){
bodyNode.addChild(Element.ELEMENT,controlNode);
}
| Adds a UI control to the document body. |
QsiMessage createPacket(String s){
byte b[]=jmri.util.StringUtil.bytesFromHexString(s);
if (b.length == 0) {
return null;
}
QsiMessage m=new QsiMessage(b.length);
for (int i=0; i < b.length; i++) {
m.setElement(i,b[i]);
}
return m;
}
| Create a well-formed packet from a String |
public PowerFunction2D(double a,double b){
this.a=a;
this.b=b;
}
| Creates a new power function. |
public Population(){
super();
data=new ArrayList<Solution>();
}
| Constructs an empty population. |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
public Input(String name,@InputType int type,@Alignment int align,Connection connection){
mName=name;
mType=type;
mAlign=align;
mConnection=connection;
if (mConnection != null) {
mConnection.setInput(this);
}
}
| Creates a new input that can be added to a block. |
public void testEqualsBigIntegerTrue(){
byte aBytes[]={12,56,100,-2,-76,89,45,91,3,-15,35,26,3,91};
byte bBytes[]={12,56,100,-2,-76,89,45,91,3,-15,35,26,3,91};
int aSign=1;
int bSign=1;
BigInteger aNumber=new BigInteger(aSign,aBytes);
Object bNumber=new BigInteger(bSign,bBytes);
assertTrue(aNumber.equals(... | equals(Object obj). obj is a BigInteger. numbers are equal. |
public static byte[] downloadBitmapToMemory(Context context,String urlString,int maxBytes){
HttpURLConnection urlConnection=null;
ByteArrayOutputStream out=null;
InputStream in=null;
try {
final URL url=new URL(urlString);
urlConnection=(HttpURLConnection)url.openConnection();
if (urlConnection.getR... | Download a bitmap from a URL, write it to a disk and return the File pointer. This implementation uses a simple disk cache. |
protected MouseDragGestureRecognizer(DragSource ds){
this(ds,null);
}
| Construct a new <code>MouseDragGestureRecognizer</code> given the <code>DragSource</code> for the <code>Component</code>. <P> |
@SuppressLint("InlinedApi") public static Bitmap blur(Context context,Bitmap sentBitmap,int radius){
if (radius < 0) {
radius=0;
if (DEBUG) {
Log.w(TAG,"radius must be 0 < r < 25 , forcing radius=0");
}
}
else if (radius > 25) {
radius=25;
if (DEBUG) {
Log.w(TAG,"radius must be 0 ... | Apply a blur to a Bitmap |
public static void mergeSort(long[] a,int fromIndex,int toIndex,LongComparator c){
rangeCheck(a.length,fromIndex,toIndex);
long aux[]=(long[])a.clone();
mergeSort1(aux,a,fromIndex,toIndex,c);
}
| Sorts the specified range of the specified array of elements according to the order induced by the specified comparator. All elements in the range must be <i>mutually comparable</i> by the specified comparator (that is, <tt>c.compare(e1, e2)</tt> must not throw a <tt>ClassCastException</tt> for any elements <tt>e1</tt... |
public static void reverseInPlace(final byte[] a){
for (int start=0, end=a.length - 1; start < end; start++, end--) {
final byte tmp=a[start];
a[start]=a[end];
a[end]=tmp;
}
}
| Reverse all of a byte array in-place. |
void _m02(float m02){
this.m02=m02;
}
| Set the value of the matrix element at column 0 and row 2 |
private void wakeThreads(int count){
while (true) {
int taskCount=Math.max(0,_taskCount.get());
int spinIdleCount=_spinIdleCount.get();
long threadWakeHead=_threadWakeHead.get();
long threadWakeTail=_threadWakeTail.get();
long threadCount=spinIdleCount + threadWakeHead - threadWakeTail;
if (ta... | wake enough threads to process the tasks |
private void checkCodecRestrictions(Codec codec){
assumeFalse("Class not allowed to use codec: " + codec.getName() + ".",shouldAvoidCodec(codec.getName()));
if (codec instanceof RandomCodec && !avoidCodecs.isEmpty()) {
for ( String name : ((RandomCodec)codec).formatNames) {
assumeFalse("Class not allow... | Check codec restrictions. |
public ASTCombination(Token t){
super(t);
}
| Creates a new instance of ASTCombination |
public Track copyTrack(String newName,Location newLocation){
Track newTrack=newLocation.addTrack(newName,getTrackType());
newTrack.clearTypeNames();
newTrack.setAddCustomLoadsAnySpurEnabled(isAddCustomLoadsAnySpurEnabled());
newTrack.setAddCustomLoadsAnyStagingTrackEnabled(isAddCustomLoadsAnyStagingTrackEnabled... | Creates a copy of this track. |
@Override public String basePath(){
return "/wm/linkdiscovery";
}
| Set the base path for the Topology |
@Override public void step(MessageLogger logger){
try {
addAgent();
env.step();
}
catch ( Exception e) {
e.printStackTrace();
}
}
| Executes one simulation step. |
public Matcher matcher(MatchResult res,String groupName){
Integer id=res.pattern().groupId(groupName);
if (id == null) throw new IllegalArgumentException("group not found:" + groupName);
int group=id;
return matcher(res,group);
}
| Just as above, yet with symbolic group name. |
private boolean verifyYInput(JComponent input){
JTextField textField=(JTextField)input;
String inputString=textField.getText();
try {
Double.parseDouble(inputString);
}
catch ( NumberFormatException e) {
textField.setForeground(Color.RED);
return false;
}
textField.setForeground(Color.BLACK);
... | Verify that the y-value is correct. |
@SuppressWarnings("unchecked") private GridCacheSharedContext createSharedContext(GridKernalContext kernalCtx,Collection<CacheStoreSessionListener> storeSesLsnrs) throws IgniteCheckedException {
IgniteTxManager tm=new IgniteTxManager();
GridCacheMvccManager mvccMgr=new GridCacheMvccManager();
GridCacheVersionMana... | Creates shared context. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-25 10:38:09.187 -0500",hash_original_method="468AD85F0115764703DC30A2A08F954C",hash_generated_method="8D78EAE151F9C4FB3184ACDDBA16806B") public int stat() throws IOException {
return sendCommand(NNTPCommand.STAT);
}
| A convenience method to send the NNTP STAT command to the server, receive the initial reply, and return the reply code. <p> |
public R addParams(String key,File file,String contentType,String customFileName){
if (key != null) {
mFileParams.put(key,new FileWrapper(file,contentType,customFileName));
}
return (R)this;
}
| add file params. |
public void enableScrollingToTopOnChange(boolean enable){
isScrollingToTopOnChange=enable;
}
| If the scrolling is enabled, the scroll bar of the combo box pop up list will be scrolled to top when the model's data changed. |
public void recordBlockSnapshotOperation(DbClient dbClient,OperationTypeEnum opType,Operation.Status status,String evDesc,Object... extParam){
try {
boolean opStatus=(Operation.Status.ready == status) ? true : false;
String evType;
evType=opType.getEvType(opStatus);
String opStage=AuditLogManager.AUDI... | Record block snapshot related event and audit |
private void processVersion(String versionString){
try {
StringTokenizer tokens=new StringTokenizer(versionString,".");
majorVersion=Integer.parseInt(tokens.nextToken());
minorVersion=Integer.parseInt(tokens.nextToken());
this.versionString=versionString;
}
catch ( Exception e) {
}
}
| process a version string, to determine the major and minor versions of the file. |
public boolean hasValue(){
return super.hasAttribute(VALUE);
}
| Returns whether it has the rating value. |
public CStartTraceListener(final TraceLogger logger,final TraceList trace,final Set<BreakpointAddress> addresses,final int maximumHits){
m_logger=Preconditions.checkNotNull(logger,"IE01562: Logger argument can not be null");
m_addresses=Preconditions.checkNotNull(addresses,"IE01563: Addresses argument can not be nu... | Creates a new trace listener object. |
void renderShadowMap(){
glUseProgram(shadowProgram);
glUniformMatrix4fv(shadowProgramVPUniform,false,light.get(matrixBuffer));
glBindFramebuffer(GL_FRAMEBUFFER,fbo);
glViewport(0,0,shadowMapSize,shadowMapSize);
glClear(GL_DEPTH_BUFFER_BIT);
glBindVertexArray(vao);
glDrawArrays(GL_TRIANGLES,0,6 * 6 * boxes... | Render the shadow map into a depth texture. |
@Override public void processElement(Wrapper<Element> elementWrapper){
builder.append(baseIndent).append("elementContent=").append(elementWrapper).append("\n");
}
| Add each element to string |
private void updateProgress(int progress){
if (myHost != null && progress != previousProgress) {
myHost.updateProgress(progress);
}
previousProgress=progress;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
private boolean isSizeConsistent(Node x){
if (x == null) return true;
if (x.size != size(x.left) + size(x.right) + 1) return false;
return isSizeConsistent(x.left) && isSizeConsistent(x.right);
}
| Checks if the size of the subtree is consistent. |
private void checkNotEqual(Message m1,Message m2){
String equalsError=String.format("%s should not be equal to %s",m1,m2);
assertFalse(equalsError,m1.equals(m2));
assertFalse(equalsError,m2.equals(m1));
assertFalse(String.format("%s should have a different hash code from %s",m1,m2),m1.hashCode() == m2.hashCode(... | Asserts that the given protos are not equal and have different hash codes. |
public Vector4f(float x,float y,float z,float w){
this.points[0]=x;
this.points[1]=y;
this.points[2]=z;
this.points[3]=w;
}
| Instantiates a new vector4f. |
public boolean chainIsNotPinned(String hostname,List<X509Certificate> chain) throws PinManagerException {
PinListEntry entry=lookup(hostname);
if (entry != null) {
return entry.chainIsNotPinned(chain);
}
return false;
}
| This is the public interface for cert pinning. Given a hostname and a certificate chain this verifies that the chain includes certs from the pinned list provided. If the chain doesn't include those certs and is in enforcing mode, then this method returns true and the certificate check should fail. |
protected JMenuItem add(JMenu m,Action a){
JMenuItem item=m.add(a);
if (suppressIcons) {
item.setIcon(null);
}
return item;
}
| Adds an action to a menu. Returns the menu item that was added. This method is invoked for each action that is added to a menu. Override this method to customize the menu item that is being created. |
public StunTestSuite(String s){
super(s);
}
| Creates a new instance of the suite |
public int processByte(byte in,byte[] out,int outOff) throws DataLengthException, IllegalStateException {
int resultLen=0;
if (bufOff == buf.length) {
resultLen=cipher.processBlock(buf,0,out,outOff);
bufOff=0;
}
buf[bufOff++]=in;
return resultLen;
}
| process a single byte, producing an output block if neccessary. |
private static String initialise(Token currentToken,int[][] expectedTokenSequences,String[] tokenImage){
String eol=System.getProperty("line.separator","\n");
StringBuffer expected=new StringBuffer();
int maxSize=0;
for (int i=0; i < expectedTokenSequences.length; i++) {
if (maxSize < expectedTokenSequences... | It uses "currentToken" and "expectedTokenSequences" to generate a parse error message and returns it. If this object has been created due to a parse error, and you do not catch it (it gets thrown from the parser) the correct error message gets displayed. |
protected SetMapAdapter(Map<E,Object> mapImplementation){
this.map=mapImplementation;
}
| Constructs a new, empty set; the backing <code>HashMap</code> instance has default initial capacity (16) and load factor (0.75). |
private void uninstallLayout(JRootPane root){
if (savedOldLayout != null) {
root.setLayout(savedOldLayout);
savedOldLayout=null;
}
}
| Uninstalls the previously installed <code>LayoutManager</code>. |
private void drawText(final Graphics2D g2d){
g2d.translate(-getScreenViewX(),-getScreenViewY());
synchronized (texts) {
Iterator<RemovableSprite> it=texts.iterator();
while (it.hasNext()) {
RemovableSprite text=it.next();
if (!text.shouldBeRemoved()) {
text.draw(g2d);
}
else {
... | Draw the screen text bubbles. |
public SimpleClassifierAdapter(org.apache.samoa.moa.classifiers.Classifier learner,Instances dataset){
this.learner=learner.copy();
this.isInit=false;
this.dataset=dataset;
}
| Instantiates a new learner. |
public void run(){
ScriptContext context=null;
if (getChatConsoleControllerSource() != null) {
context=getChatConsoleControllerSource().getConnector().getScriptContext();
}
else if (context == null && getChessBoardControllerSource() != null && getChessBoardControllerSource().getConnector() != null) {
c... | Executes the script. |
private boolean testJDBC(String url,String uid,String pwd){
try {
@SuppressWarnings("unused") Connection conn=p_db.getDriverConnection(url,uid,pwd);
}
catch ( Exception e) {
log.severe(e.toString());
return false;
}
return true;
}
| Test JDBC Connection to Server |
public static String md5(String str){
if (str == null) {
return null;
}
try {
MessageDigest messageDigest=MessageDigest.getInstance(ALGORITHM);
messageDigest.update(str.getBytes());
return getFormattedText(messageDigest.digest());
}
catch ( Exception e) {
throw new RuntimeException(e);
}... | encode By MD5 |
private int readVarint32() throws TException {
int result=0;
int shift=0;
if (trans_.getBytesRemainingInBuffer() >= 5) {
byte[] buf=trans_.getBuffer();
int pos=trans_.getBufferPosition();
int off=0;
while (true) {
byte b=buf[pos + off];
result|=(int)(b & 0x7f) << shift;
if ((b & ... | Read an i32 from the wire as a varint. The MSB of each byte is set if there is another byte to follow. This can read up to 5 bytes. |
public FighterSquadron(String name){
super();
setChassis(name.trim() + " Squadron");
setModel("");
}
| construct fighter squadron with a specific name |
private Object writeReplace(){
return new SynchronizedList<>(list);
}
| Allows instances to be deserialized in pre-1.4 JREs (which do not have SynchronizedRandomAccessList). SynchronizedList has a readResolve method that inverts this transformation upon deserialization. |
protected boolean isIncludeClientInfo(){
return this.includeClientInfo;
}
| Return whether or not the client address and session id should be included in the log message. |
public Observable<Long> publish(final String topic,Object... args){
return publish(topic,ArgArrayBuilder.buildArgumentsArray(clientConfig.objectMapper(),args),null);
}
| Publishes an event under the given topic. |
public static void run(AdSense adsense,String accountId,int maxPageSize) throws Exception {
System.out.println("=================================================================");
System.out.printf("Listing all ad clients for account %s\n",accountId);
System.out.println("=========================================... | Runs this sample. |
public boolean next() throws SQLException {
checkState();
boolean b=rs.next();
notifyCursorMoved();
return b;
}
| Moves the cursor for this rowset's <code>ResultSet</code> object down one row from its current position. A <code>ResultSet</code> cursor is initially positioned before the first row; the first call to the method <code>next</code> makes the first row the current row; the second call makes the second row the current row,... |
public static void i(String message,Throwable cause){
if (BuildConfig.DEBUG) {
Log.i(LOG_TAG,"[" + message + "]",cause);
}
}
| <p><b>INFORMATIVE:</b> This level of logging should used be to note that something interesting to most people happened, i.e. when a situation is detected that is likely to have widespread impact, though isn't necessarily an error. Such a condition should only be logged by a module that reasonably believes that it is th... |
public boolean isMult(){
return mult;
}
| Gets the mult value for this ArchiveFld. |
public Quaterniond div(Quaterniondc b){
return div(b,this);
}
| Divide <code>this</code> quaternion by <code>b</code>. <p> The division expressed using the inverse is performed in the following way: <p> <tt>this = this * b^-1</tt>, where <tt>b^-1</tt> is the inverse of <code>b</code>. |
protected void startChunkSend(ByteBuffer... chunks){
synchronized (chunkIncubator) {
for ( ByteBuffer chunk : chunks) chunkIncubator.incubate(chunk);
}
}
| Put chunks into send queue. Chunks will be given a sequence number but will be flushed in endChunkSend(). |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.