code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
@LogMessageDoc(level="ERROR",message="Error {error type} {error code} from {switch} " + "in state {state}",explanation="The switch responded with an unexpected error" + "to an OpenFlow message from the controller",recommendation="This could indicate improper network operation. " + "If the problem persists restarting th... | Log an OpenFlow error message from a switch |
public LegacyFieldType(){
}
| Create a new FieldType with default properties. |
public int[][] writeGeometry(EsriGraphicList list) throws IOException {
if (list instanceof EsriPolygonList || list instanceof EsriPolylineList) {
return writePolyGeometry(list);
}
else if (list instanceof EsriPointList) {
return writePointGeometry(list);
}
return null;
}
| Determine what type of list is given and write it out. |
public BlockOption(byte[] value){
if (value == null) throw new NullPointerException();
if (value.length > 3) throw new IllegalArgumentException("Block option's length must at most 3 bytes inclusive");
if (value.length == 0) {
this.szx=0;
this.m=false;
this.num=0;
}
else {
byte end=value[val... | Instantiates a new block option from the specified bytes (1-3 bytes). |
public boolean isIgnoreRecipientHeader(){
return fieldIgnoreRecipientHeader;
}
| Returns the ignoreRecipientHeader. |
public void resetCharges(){
pendingCharges.removeAllElements();
}
| Resets the pending charges list. |
public int keys(int[] list){
int[] tab=table;
byte[] stat=state;
if (list.length < distinct) return -1;
int j=0;
for (int i=tab.length; i-- > 0; ) {
if (stat[i] == FULL) list[j++]=tab[i];
}
return distinct;
}
| Fills all keys contained in the receiver into the specified list. Fills the list, starting at index 0. After this call returns the specified list has a new size that equals <tt>this.size()</tt>. <p> This method can be used to iterate over the keys of the receiver. |
public static StringBuffer printList(Collection<String> list){
StringBuffer sb=new StringBuffer();
if (list != null && list.size() > 0) {
Iterator<String> iter=list.iterator();
while (true) {
sb.append(escape(iter.next()));
if (iter.hasNext()) {
sb.append(", ");
}
else {
b... | Escapes the items of the Collection and returns them in a StringBuffer, separated by commas. |
private void establecerElementosVista(HttpServletRequest request){
GestionEliminacionBI eliminacionService=getGestionEliminacionBI(request);
GestionFondosBI fondosService=getGestionFondosBI(request);
int[] estados={IElementoCuadroClasificacion.VIGENTE};
removeInTemporalSession(request,ValoracionConstants.LISTA_... | Establece los elementos necesarios para mostrar en la vista |
public void testAddMathContextEqualScaleNegNeg(){
String a="1231212478987482988429808779810457634781384756794987";
int aScale=-10;
String b="747233429293018787918347987234564568";
int bScale=-10;
String c="1.2312E+61";
int cScale=-57;
BigDecimal aNumber=new BigDecimal(new BigInteger(a),aScale);
BigDecim... | Add two numbers of equal negative scales using MathContext |
protected Iterator createValuesIterator(){
return new ReferenceValuesIterator(this);
}
| Creates an values iterator. |
private void encodeSegment(final Url url,final String idName,final String idValueToEncode){
final String rez;
if (seoEnabled) {
if (WebParametersKeys.CATEGORY_ID.equals(idName)) {
final String categoryId=bookmarkService.saveBookmarkForCategory(idValueToEncode);
rez=categoryId != null ? categoryId : ... | Encode a segment of URI into SEO friendly version. |
public Rational add(Rational secondRational){
BigInteger n=(r[0].multiply(secondRational.getDenominator())).add(r[1].multiply(secondRational.getNumerator()));
BigInteger d=r[1].multiply(secondRational.getDenominator());
return new Rational(n,d);
}
| Add a rational number to this rational |
@Override public void revalidate(){
}
| Overridden for performance reasons. See the <a href="#override">Implementation Note</a> for more information. |
public boolean isAdd(){
return is(ADD);
}
| Determines if this property's value is "ADD". |
@Override @Transactional(isolation=Isolation.READ_UNCOMMITTED) @Modifying public Rollout updateRollout(final Rollout rollout){
Assert.notNull(rollout.getId());
return rolloutRepository.save((JpaRollout)rollout);
}
| Update rollout details. |
@Nullable public IgniteInternalFuture<?> awaitAckAsync(){
synchronized (this) {
if (cnt == 0) return null;
if (nodeLeft) return new GridFinishedFuture<>(new IgniteCheckedException("Failed to wait for finish synchronizer " + "state (node left grid): " + nodeId));
if (pendingFut == null) {
if (l... | Asynchronously waits for ack to be received from node. |
@Override protected EClass eStaticClass(){
return UmplePackage.eINSTANCE.getDepend_();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@Deprecated public void rebootNode(String nodeId){
UriBuilder builder=client.uriBuilder(CONTROL_REBOOT_NODE_URL);
addQueryParam(builder,NODE_ID_PARAM,nodeId);
client.postURI(String.class,builder.build());
}
| Reboot a virtual machine. <p> API Call: POST /control/node/reboot |
public Object runSafely(Catbert.FastStack stack) throws Exception {
ZPseudoComp uiComp=getUIComp(stack);
if (uiComp != null) {
ZComp rv=uiComp.getLastFocusedChild();
if (rv instanceof ZPseudoComp) return rv;
}
return null;
}
| If the specified component currently has a focused child; that child's UI object will be returned. If not, then the last focused child for this component will be returned. |
public int read(byte[] buf,int off,int len) throws IOException {
if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length) throw new IndexOutOfBoundsException();
if (len == 0) return 0;
if (in == null) throw new XZIOException("Stream closed");
if (exception != null) throw exception;
if (endRe... | Decompresses into an array of bytes. <p> If <code>len</code> is zero, no bytes are read and <code>0</code> is returned. Otherwise this will block until <code>len</code> bytes have been decompressed, the end of the LZMA stream is reached, or an exception is thrown. |
public boolean hasFields(){
return hasRepeatingExtension(Field.class);
}
| Returns whether it has the fields. |
@Override public String toString(){
StringBuilder sb=new StringBuilder();
sb.append("{");
sb.append(getContinuousScale().toString());
sb.append(",");
sb.append(hueLower);
sb.append(",");
sb.append(hueUpper);
sb.append(",");
sb.append(saturationLower);
sb.append(",");
sb.append(saturationUpper);
... | Create a string representation suitable for writing to a text file |
protected boolean isUseFieldNames(){
return useFieldNames;
}
| <p>Gets whether to use the field names passed in.</p> |
private void initializeAttributes(){
timeSeriesConsumerType=new AttributeType(this,"Series","setValue",double.class,true);
addConsumerType(timeSeriesConsumerType);
}
| Initialize consuming attributes. |
private synchronized void sendUnlistens(final Set<NotificationChannel> channelNames){
for ( final NotificationChannel channel : channelNames) {
try {
m_connection.executeUpdate("UNLISTEN " + channel.name(),true);
}
catch ( final SQLException exception) {
NaviLogger.severe("Error: Could not se... | Function sends a "UNLISTEN channel" message to the database server for all specified channels in the set. There is currently no way to unsubscribe from multiple channels in a single query. |
public static List<IJavaCompletionProposal> createProposalsForProblemsOnSyncMethod(ASTNode node){
RpcPair rpcPair=resolveRpcPair(node,PeerTypeResolver.ASYNC_RESOLVER);
return createProposal(rpcPair,BUILDER);
}
| Creates a quick-fix proposal for a marker on a sync method declaration. |
public boolean isPerFileThinProvisioningSupported(){
return perFileThinProvisioningSupported;
}
| Gets the value of the perFileThinProvisioningSupported property. |
public Boolean isCanBeDisabled(){
return canBeDisabled;
}
| Gets the value of the canBeDisabled property. |
public static double rand(){
return rand.nextDouble();
}
| Generates an equally distributed double precision random number. the upper boundary |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
protected boolean isShortCutKeysRequired(){
return true;
}
| If any short cut keys required on the table. |
private void discoverUnmanagedStorageViews(AccessProfile accessProfile,VPlexApiClient client,Map<String,VPlexVirtualVolumeInfo> vvolMap,Map<String,Set<UnManagedExportMask>> volumeToExportMasksMap,Map<String,Set<VPlexStorageViewInfo>> volumeToStorageViewMap,Set<String> recoverPointExportMasks) throws BaseCollectionExcep... | Discovers storage views on the VPLEX and creates UnManagedExportMasks for any that are not managed by ViPR. |
public void trainOnline(FloatVector trainingInstance){
model.trainOnline(trainingInstance);
}
| Train the model with one instance. |
public static org.oscm.internal.vo.ListCriteria convertToUp(org.oscm.vo.ListCriteria oldVO){
if (oldVO == null) {
return null;
}
org.oscm.internal.vo.ListCriteria newVO=new org.oscm.internal.vo.ListCriteria();
newVO.setOffset(oldVO.getOffset());
newVO.setLimit(oldVO.getLimit());
newVO.setFilter(oldVO.ge... | Convert source version VO to target version VO. |
void listFields(){
field_info fi;
ConstantValue_attribute cva;
CONSTANT_Utf8_info cm;
int i, j;
for (i=0; i < fields_count; i++) {
fi=fields[i];
G.v().out.print(fi.prototype(constant_pool));
for (j=0; j < fi.attributes_count; j++) {
cm=(CONSTANT_Utf8_info)(constant_pool[fi.attributes[j].attr... | Displays the list of fields defined in this ClassFile, including any static initializers (constants). |
@DSComment("Data structure only") @DSSafe(DSCat.DATA_STRUCTURE) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:31:01.401 -0500",hash_original_method="D55FF6AB44947F083C797EDEE83A6188",hash_generated_method="4412D78FAA6F07FFF0816FEBECD5E3BD") public boolean hasBearing(){
return mH... | Returns true if the provider is able to report bearing information, false otherwise. The default implementation returns false. |
private ByteBuffer encodeMemcache(GridMemcachedMessage msg) throws IgniteCheckedException {
GridByteArrayList res=new GridByteArrayList(HDR_LEN);
int keyLen=0;
int keyFlags=0;
if (msg.key() != null) {
ByteArrayOutputStream rawKey=new ByteArrayOutputStream();
keyFlags=encodeObj(msg.key(),rawKey);
msg... | Encodes memcache message to a raw byte array. |
@CanIgnoreReturnValue @Deprecated @Override public <T extends B>T putInstance(TypeToken<T> type,T value){
throw new UnsupportedOperationException();
}
| Guaranteed to throw an exception and leave the map unmodified. |
public static void main5(String[] args) throws Exception {
DistributedSystem system=DistributedSystem.connect(new java.util.Properties());
Cache cache=CacheFactory.create(system);
AttributesFactory factory=new AttributesFactory();
factory.setEvictionAttributes(EvictionAttributes.createLRUMemoryAttributes(2,(Obj... | Filling up the region with keys and values |
public void fillFieldValues(Randomizer rand){
ProbDistPanel rp=cardMap.get(rand.getPdf());
cbDistribution.setSelectedItem(rand.getPdf());
rp.fillFieldValues(rand);
cardPanel.removeAll();
cardPanel.add(rp.getPanel());
cardPanel.repaint();
if (parent != null) {
parent.pack();
parent.setLocationRelat... | Fills fields with values from a Random Source. |
protected WMouseDragGestureRecognizer(DragSource ds,Component c,int act){
this(ds,c,act,null);
}
| construct a new WMouseDragGestureRecognizer |
public Boolean isAccessible(){
return accessible;
}
| Gets the value of the accessible property. |
public static String dumpAsHex(byte[] byteBuffer,int length){
StringBuilder outputBuilder=new StringBuilder(length * 4);
int p=0;
int rows=length / 8;
for (int i=0; (i < rows) && (p < length); i++) {
int ptemp=p;
for (int j=0; j < 8; j++) {
String hexVal=Integer.toHexString(byteBuffer[ptemp] & 0xf... | Dumps the given bytes to STDOUT as a hex dump (up to length bytes). |
public void displaySession(int position){
try {
Intent intent=new Intent(this,MessagingSessionView.class);
String sessionId=sessions.get(position).getSessionId();
intent.putExtra(MessagingSessionView.EXTRA_MODE,MessagingSessionView.MODE_OPEN);
intent.putExtra(MessagingSessionView.EXTRA_SESSION_ID,sess... | Display a session |
public void schedule(TimerTask task,long delay,long period){
if (delay < 0 || period <= 0) {
throw new IllegalArgumentException();
}
scheduleImpl(task,delay,period,false);
}
| Schedule a task for repeated fixed-delay execution after a specific delay. |
public XmlJmapper toXStream(){
return xmlJmapper;
}
| Returns an XStream version of this XML. |
public static synchronized PasswordAuthentication requestPasswordAuthentication(String rHost,InetAddress rAddr,int rPort,String rProtocol,String rPrompt,String rScheme){
if (thisAuthenticator == null) {
return null;
}
thisAuthenticator.host=rHost;
thisAuthenticator.addr=rAddr;
thisAuthenticator.port=rPort... | Invokes the methods of the registered authenticator to get the authentication info. |
public DtoCarrierSlaServiceImpl(final DtoFactory dtoFactory,final GenericService<CarrierSla> carrierSlaGenericService,final AdaptersRepository AdaptersRepository){
super(dtoFactory,carrierSlaGenericService,AdaptersRepository);
}
| Construct service. |
public static String convertToRGB(int color){
String red=Integer.toHexString(Color.red(color));
String green=Integer.toHexString(Color.green(color));
String blue=Integer.toHexString(Color.blue(color));
if (red.length() == 1) {
red="0" + red;
}
if (green.length() == 1) {
green="0" + green;
}
if (... | Method currently used by onGetDefaultValue method to convert hex string provided in android:defaultValue to color integer. |
private void reportProgress(State state,InnerState innerState){
long now=System.currentTimeMillis();
if (innerState.mBytesSoFar - innerState.mBytesNotified > Constants.MIN_PROGRESS_STEP && now - innerState.mTimeLastNotification > Constants.MIN_PROGRESS_TIME) {
mInfo.mCurrentBytes=innerState.mBytesSoFar;
mDB... | Report download progress through the database if necessary. |
public CommitTask(final Note bug,final String comment,final boolean close){
Log.d(DEBUG_TAG,bug.getDescription() + " >" + comment+ "< "+ close);
this.bug=bug;
this.comment=comment;
this.close=close;
}
| Create the background task to upload changes to OSB. |
public void begin(float fbufWidth,float fbufHeight,boolean flip){
if (begun) throw new IllegalStateException(getClass().getSimpleName() + " mismatched begin()");
begun=true;
}
| Must be called before this batch is used to accumulate and send drawing commands. |
@Override public int hashCode(){
if (ActiveMQRAMessage.trace) {
ActiveMQRALogger.LOGGER.trace("hashCode()");
}
return message.hashCode();
}
| Return the hash code |
protected int index(int slice,int row,int column){
return sliceZero + slice * sliceStride + rowZero + row * rowStride + columnZero + column * columnStride;
}
| Returns the position of the given coordinate within the (virtual or non-virtual) internal 1-dimensional array. |
private StorageSystem createStorageSystem(boolean isVplex){
StorageSystem ss=new StorageSystem();
URI storageSystemId=URIUtil.createId(StorageSystem.class);
ss.setId(storageSystemId);
if (isVplex) {
ss.setLabel("VPLEX+FNM00114300288:FNM00114600001");
ss.setNativeGuid("VPLEX+FNM00114300288:FNM00114600001... | Convenience method that creates a StorageSystem. |
public static void start(Context context,URL url,UpdatePolicy updatePolicy){
RemoteNotifications remoteNotifications=new RemoteNotifications(context,url);
remoteNotifications.updateNotificationsFromServer(updatePolicy);
remoteNotifications.showPendingNotificationsToUser();
}
| Convenience method to update and show notifications. |
@SuppressWarnings("unchecked") private void notifyTextListeners(TextEvent te){
Vector<TextListener> l;
synchronized (this) {
l=(Vector<TextListener>)m_textListeners.clone();
}
if (l.size() > 0) {
for (int i=0; i < l.size(); i++) {
l.elementAt(i).acceptText(te);
}
}
}
| Notify all text listeners of a TextEvent |
public void reset(ActionMapping mapping,HttpServletRequest request){
op="List";
uniqueId=null;
key="";
defaultValue="";
allowedValues="";
description="";
}
| Method reset |
public void marshal(Object obj,HierarchicalStreamWriter writer,MarshallingContext context){
writer.setValue(((ElementoConTexto)obj).get());
}
| convertir el objeto pasado a xml, uso interno |
public static <T>void writeCollection(BinaryRawWriterEx writer,Collection<T> col,@Nullable PlatformWriterClosure<T> writeClo){
writeCollection(writer,col,writeClo,null);
}
| Write collection to the writer. |
public static OrganizationDataException convertToApi(org.oscm.internal.types.exception.OrganizationDataException oldEx){
return convertExceptionToApi(oldEx,OrganizationDataException.class);
}
| Convert source version Exception to target version Exception |
public void changeProgram(IFilter newFilter){
mFilter.releaseProgram();
mFilter=newFilter;
}
| Changes the program. The previous program will be released. <p> The appropriate EGL context must be current. |
@Inject public SelectGruntTaskPagePresenter(SelectGruntTaskPageView view,RunnerManagerPresenter runnerManagerPresenter,ProjectServiceClient projectServiceClient,DtoFactory dtoFactory,NotificationManager notificationManager,AppContext appContext){
this.view=view;
this.runnerManagerPresenter=runnerManagerPresenter;
... | Create wizard page |
public static boolean isDataCompressed(){
return compressData;
}
| Static method to indicate whether the message will reference compressed data. |
public void testTwoChars() throws Exception {
CharacterRunAutomaton single=new CharacterRunAutomaton(new RegExp("..").toAutomaton());
Analyzer a=new MockAnalyzer(random(),single,false);
assertAnalyzesTo(a,"foobar",new String[]{"fo","ob","ar"},new int[]{0,2,4},new int[]{2,4,6});
assertTokenStreamContents(a.token... | Test a configuration where two characters makes a term |
public final void mulTransposeLeft(Matrix3d m1,Matrix3d m2){
if (this != m1 && this != m2) {
this.m00=m1.m00 * m2.m00 + m1.m10 * m2.m10 + m1.m20 * m2.m20;
this.m01=m1.m00 * m2.m01 + m1.m10 * m2.m11 + m1.m20 * m2.m21;
this.m02=m1.m00 * m2.m02 + m1.m10 * m2.m12 + m1.m20 * m2.m22;
this.m10=m1.m01 * m2.m0... | Multiplies the transpose of matrix m1 times matrix m2, and places the result into this. |
public void insertAtPin(Pin pin){
Pin otherPin=pin.getConnectedPin();
Pin.interconnect(pin,pin1);
Pin.interconnect(pin2,otherPin);
if (logPinMessages) {
System.out.println("Connecting " + pin + " to "+ pin1);
System.out.println("Connecting " + pin2 + " to "+ otherPin);
}
}
| Inserts this component between the given pin and the pin originally connected to it The given pin gets connected to the the pin1 of this component The pin formerly connected to the given pin gets connected to the pin2 of this component |
public final void println(float f) throws IOException {
println(String.valueOf(f));
}
| Prints a float followed by a newline. |
public void threadUnexpectedException(){
threadFailed=true;
fail("Unexpected exception");
}
| threadFail with message "Unexpected exception" |
private String[] spliterator(String phrase){
String[] split=phrase.split(" ");
String[] out=new String[split.length];
for (int ix=1; ix < split.length; ix++) {
String temp=split[ix - 1];
temp+=" " + split[ix];
out[ix - 1]=temp;
}
return out;
}
| Splits the phrase into groups of two, with overlap This is for achieving a chain length of three |
public String globalInfo(){
return "Class that splits a BallNode of a ball tree based on the " + "median value of the widest dimension of the points in the ball. " + "It essentially implements Omohundro's KD construction algorithm.";
}
| Returns a string describing this nearest neighbour search algorithm. |
public boolean isFirebirdOnly(){
if (firebirdOnly == null) {
return false;
}
else {
return firebirdOnly;
}
}
| Gets the value of the firebirdOnly property. |
public IdentityArrayList(final Iterator<? extends K> i){
this();
while (i.hasNext()) this.add(i.next());
}
| Creates a new array list and fills it with the elements returned by an iterator.. |
public void printTimeMemory(String s,long time){
println(getMemoryUsed() + " MB: " + s+ " ms: "+ time);
}
| Print the currently used memory, the message and the given time in milliseconds. |
public void testDetectLanguageAf(){
LOGGER.debug("detectLanguage Af");
LanguageDetector instance=LanguageDetector.getInstance();
Document doc;
try {
doc=Jsoup.parse(new File(PATH + "af.wikipedia.org-wiki-Suider-Afrika_20140701.html"),UTF_8);
LOGGER.debug("start detection");
assertEquals("af",instanc... | Test of detectLanguage method, of class LanguageDetector with af pages. |
public Object[] toArray(){
return Arrays.copyOf(queue,size);
}
| Returns an array containing all of the elements in this queue. The elements are in no particular order. <p>The returned array will be "safe" in that no references to it are maintained by this queue. (In other words, this method must allocate a new array). The caller is thus free to modify the returned array. <p>This ... |
public Zoom(AbstractChart chart,boolean in,float rate){
super(chart);
mZoomIn=in;
setZoomRate(rate);
}
| Builds the zoom tool. |
public QueryFirstResponse QueryFirst(RequestHeader RequestHeader,ViewDescription View,NodeTypeDescription[] NodeTypes,ContentFilter Filter,UnsignedInteger MaxDataSetsToReturn,UnsignedInteger MaxReferencesToReturn) throws ServiceFaultException, ServiceResultException {
QueryFirstRequest req=new QueryFirstRequest(Reque... | Synchronous QueryFirst service request. |
private static void copyQueryHints(BOp node,final Properties queryHints){
if (queryHints == null) return;
if (!(node instanceof QueryNodeBase)) return;
final QueryNodeBase nodeAsQN=(QueryNodeBase)node;
final Enumeration<?> pnames=queryHints.propertyNames();
while (pnames.hasMoreElements()) {
final Str... | Copies the query hints to the given node, if not specified there. If the given node already has the query hint, it is left unmodified. |
public static String[] listServices() throws RemoteException {
try {
return getIServiceManager().listServices();
}
catch ( RemoteException e) {
Log.e(TAG,"error in listServices",e);
return null;
}
}
| Return a list of all currently running services. |
public boolean isServer(){
if (this.firstTransactionSeen == false) return this.serverTransactionFlag;
else return this.firstTransactionIsServerTransaction;
}
| Return true if is server. |
public G load(Reader reader,G g) throws IOException {
BufferedReader br=new BufferedReader(reader);
String curLine=skip(br,v_pred);
if (curLine == null) return g;
StringTokenizer st=new StringTokenizer(curLine);
st.nextToken();
int num_vertices=Integer.parseInt(st.nextToken());
List<V> id=null;
if (ve... | Populates the graph <code>g</code> with the graph represented by the Pajek-format data supplied by <code>reader</code>. Stores edge weights, if any, according to <code>nev</code> (if non-null). <p>Any existing vertices/edges of <code>g</code>, if any, are unaffected. <p>The edge data are filtered according to <code>g<... |
public AttributeMetaData(AttributeRole role,ExampleSet exampleSet,boolean shortened){
this(role.getAttribute().getName(),role.getAttribute().getValueType(),role.getSpecialName());
Attribute att=role.getAttribute();
if (att.isNominal()) {
int maxValues=shortened ? getMaximumNumberOfNominalValues() : Integer.MA... | This will generate the attribute meta data with the data's values shortened if the number of values exceeds the respective property and the boolean flag is set to true. If shortened only the first 100 characters of each nominal value is returned. |
@Override public String toString(){
String str="";
for ( String q : queryVars) {
str+=q + ",";
}
if (!queryVars.isEmpty()) {
str=str.substring(0,str.length() - 1);
}
if (!evidence.isEmpty()) {
str+="|";
if (!evidence.isEmpty()) {
str+=evidence;
}
}
str+="";
if (this instance... | Returns a string representation of the query. |
public RrdDefTemplate(String xmlString) throws IOException {
super(xmlString);
}
| Creates RrdDefTemplate object from the string containing XML template. Read general information for this class to see an example of a properly formatted XML source. |
public static String makeRgbString(int value){
return "rgb(" + Color.red(value) + ", "+ Color.green(value)+ ", "+ Color.blue(value)+ ")";
}
| Make a human readable representation of the RGB value of a color. |
public boolean chunkExists(int i,int i1){
return provider.chunkExists(i,i1);
}
| Checks to see if a chunk exists at x, y |
public void runTest() throws Throwable {
Document doc;
NodeList elementList;
Element testEmployee;
Attr domesticAttr;
String nodeName;
doc=(Document)load("hc_staff",false);
elementList=doc.getElementsByTagName("acronym");
testEmployee=(Element)elementList.item(0);
domesticAttr=testEmployee.getAttribut... | Runs the test case. |
public static void main(String... args) throws Exception {
int port=9099;
String connect="192.168.0.3";
boolean file=false;
for (int i=0; i < args.length; i++) {
if (args[i].equals("-port")) {
port=Integer.parseInt(args[++i]);
}
else if (args[i].equals("-connect")) {
connect=args[++i];
... | This method is called when executing this application from the command line. |
public synchronized final int evictionCount(){
return evictionCount;
}
| Returns the number of values that have been evicted. |
public void picture(double x,double y,String s,double w,double h){
Image image=getImage(s);
double xs=scaleX(x);
double ys=scaleY(y);
double ws=factorX(w);
double hs=factorY(h);
if (ws < 0 || hs < 0) throw new IllegalArgumentException("image " + s + " is corrupt");
if (ws <= 1 && hs <= 1) pixel(x,y);
... | Draws picture (gif, jpg, or png) centered on (x, y), rescaled to w-by-h. |
public int[] cleanOffsetOfDestFromSources(int[] sourcesOffsets){
int[] cleaned=new int[numSources];
int countOfSources=0;
for (int index=0; index < sourcesOffsets.length; index++) {
if (sourcesOffsets[index] != 0) {
if (countOfSources == numSources) {
countOfSources++;
break;
}
... | Returns the information contributors to this node which are not equal to the node itself (offset 0). Checks that there are enough sources. |
public SubscriptionDiagnosticsDataType clone(){
SubscriptionDiagnosticsDataType result=new SubscriptionDiagnosticsDataType();
result.SessionId=SessionId;
result.SubscriptionId=SubscriptionId;
result.Priority=Priority;
result.PublishingInterval=PublishingInterval;
result.MaxKeepAliveCount=MaxKeepAliveCount;
... | Deep clone |
public static String escapeUnicode(String s){
int len=s.length();
int i=0;
while (i < len) {
char ch=s.charAt(i);
if (ch > 255) {
StringBuilder buf=new StringBuilder();
buf.append(s.substring(0,i));
while (i < len) {
ch=s.charAt(i);
if (ch > 255) {
buf.append("\... | Escape all unicode characters in string. |
@SuppressWarnings("unchecked") public <T>T loadAs(InputStream input,Class<T> type){
return (T)loadFromReader(new StreamReader(new UnicodeReader(input)),type);
}
| Parse the only YAML document in a stream and produce the corresponding Java object. |
public synchronized void warning(String s){
println("WARNING:\n" + s,ALL_MESSAGE_LOGS,true);
}
| Posts a warning. |
@SuppressWarnings("unchecked") public static <K extends Comparable<? super K>,V>ImmutableSortedMap<K,V> of(K k1,V v1,K k2,V v2,K k3,V v3,K k4,V v4,K k5,V v5){
return ofEntries(entryOf(k1,v1),entryOf(k2,v2),entryOf(k3,v3),entryOf(k4,v4),entryOf(k5,v5));
}
| Returns an immutable sorted map containing the given entries, sorted by the natural ordering of their keys. |
public static int readUnsignedVarint(ByteBuffer buffer) throws IOException {
int val=0;
int bits=0;
while (true) {
final int data=buffer.get();
val|=(data & 0x7F) << bits;
if ((data & 0x80) == 0) {
return val;
}
bits+=7;
if (bits > 35) {
throw new IOException("Variable length q... | Read an unsigned integer. |
public static Request createConnectionBindRequest(int connectionIdValue) throws IllegalArgumentException {
Request connectionBindRequest=new Request();
connectionBindRequest.setMessageType(Message.CONNECTION_BIND_REQUEST);
ConnectionIdAttribute connectionIdAttribute=AttributeFactory.createConnectionIdAttribute(co... | Creates a ConnectionBindRequest in a 6062 compliant manner containing only <tt>CONECTION-ID-ATTRIBUTE</tt> attribute. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.