code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public static boolean isStatusInformational(int status){
return (status >= 100 && status < 200);
}
| Returns whether the status is informational (i.e. 1xx). |
public static void waitForCompletion(Future<?>[] futures){
int size=futures.length;
try {
for (int j=0; j < size; j++) {
futures[j].get();
}
}
catch ( ExecutionException ex) {
ex.printStackTrace();
}
catch ( InterruptedException e) {
e.printStackTrace();
}
}
| Waits for all threads to complete computation. |
public String toString(){
return getSelector() + " + " + getSiblingSelector();
}
| Returns a representation of the selector. |
public static DirectedGraph<Integer,DefaultEdge> loadGraph(String location) throws IOException, ClassNotFoundException {
File file=new File(location);
if (!file.canWrite()) {
throw new IOException("Cannot read from file " + location);
}
return GraphSerialization.loadGraph(file);
}
| Deserializes a SerializableDirectedGraph object that is stored in the given<br> location. This method returns the DirectedGraph object, that is wrapped in <br> the SerializableDirectedGraph. |
protected POInfo initPO(Properties ctx){
POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName());
return poi;
}
| Load Meta Data |
public Editor edit() throws IOException {
return DiskLruCache.this.edit(key,sequenceNumber);
}
| Returns an editor for this snapshot's entry, or null if either the entry has changed since this snapshot was created or if another edit is in progress. |
public LocalTime(int hourOfDay,int minuteOfHour,int secondOfMinute){
this(hourOfDay,minuteOfHour,secondOfMinute,0,ISOChronology.getInstanceUTC());
}
| Constructs an instance set to the specified time using <code>ISOChronology</code>. |
public final void clear(){
for ( TTEntry ent : table) {
ent.type=TTEntry.T_EMPTY;
}
}
| Clear the transposition table. |
@DebugLog private void assignColorToPlayer(@NonNull String color,@NonNull PlayerColorChoices player,String reason){
PlayerResult playerResult=new PlayerResult(player.name,player.type,color,reason);
results.results.add(playerResult);
Timber.i("Assigned %s",playerResult);
colorsAvailable.remove(color);
playersN... | Assign a color to a player, and remove both from the list of remaining colors and players. This can't be called from a for each loop without ending the iteration. |
public static void filterDataModel(BookFilter filter){
List<Book> booksCopy=new LinkedList<Book>(DataModel.getListOfBooks());
for ( Book book : booksCopy) {
if (!filter.didBookPassThroughFilter(book)) {
for ( Tag tag : book.getTags()) {
List<Book> books=DataModel.getMapOfBooksByTag().get(tag... | Apply the specified filter to the current data model |
public boolean isStreaming(){
return false;
}
| Tells that this entity is not streaming. |
public LabeledOMSpline(float latPoint,float lonPoint,int[] xypoints,int cMode){
super(latPoint,lonPoint,xypoints,cMode);
}
| Create an x/y LabeledOMSpline at an offset from lat/lon. |
public void fireTableRowsUpdated(int firstRow,int lastRow){
fireTableChanged(new TableModelEvent(this,firstRow,lastRow,TableModelEvent.ALL_COLUMNS,TableModelEvent.UPDATE));
}
| Notifies all listeners that rows in the range <code>[firstRow, lastRow]</code>, inclusive, have been updated. |
public UpdateManager(BridgeContext ctx,GraphicsNode gn,Document doc){
bridgeContext=ctx;
bridgeContext.setUpdateManager(this);
document=doc;
updateRunnableQueue=RunnableQueue.createRunnableQueue();
runHandler=createRunHandler();
updateRunnableQueue.setRunHandler(runHandler);
graphicsNode=gn;
scriptingEn... | Creates a new update manager. |
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. |
public LoggingFraction consoleHandler(Level level,String formatter){
consoleHandler(new ConsoleHandler(CONSOLE).level(level).namedFormatter(formatter));
return this;
}
| Add a ConsoleHandler to the list of handlers for this logger. |
public static double[] meansOfRows(double[][] input){
double[] theMeans=new double[input.length];
for (int i=0; i < input.length; i++) {
theMeans[i]=mean(input[i]);
}
return theMeans;
}
| Return an array of the means of each row in the 2D input matrix |
private Token toASIToken(ILeafNode leaf){
if (leaf.isHidden()) {
return newSemicolonToken(leaf);
}
else {
if (!leafNodes.hasNext()) {
int tokenType=tokenTypeMapper.getInternalTokenType(leaf);
int semicolonTokenType=tokenTypeMapper.getInternalTokenType(semicolon);
if (tokenType == semicolo... | Produces either one or two tokens from the given leaf which represents a location where the production parser inserted a semicolon. |
public void respondPrivateMessage(String response){
getUser().send().message(response);
}
| Respond with a PM directly to the user |
public static void checkArgument(boolean expression,Object errorMessage){
if (!expression) {
throw new IllegalArgumentException(String.valueOf(errorMessage));
}
}
| Ensures the truth of an expression involving one or more parameters to the calling method. |
public void prepend(CharSequence s){
StringBuffer newText=new StringBuffer();
newText.append(s);
newText.append(text);
text=newText;
}
| Add a string to the start of the first line of the buffer. |
public RC5ParameterSpec(int version,int rounds,int wordSize){
this.version=version;
this.rounds=rounds;
this.wordSize=wordSize;
this.iv=null;
}
| Creates a new <code>RC5ParameterSpec</code> instance with the specified version, round count an word size (in bits). |
private void updateTickLabelForLogScale(int length){
double min=scale.getRange().getLower();
double max=scale.getRange().getUpper();
if (min <= 0 || max <= 0) throw new IllegalArgumentException("the range for log scale must be in positive range");
boolean minBigger=max < min;
int digitMin=(int)Math.ceil(Mat... | Updates tick label for log scale. |
public boolean isLastInstructionInBasicBlock(){
return !basicBlock.isEmpty() && handle == basicBlock.getLastInstruction();
}
| Return whether or not the Location is positioned at the last instruction in the basic block. |
private PrincipalId authenticate(String tenantName,X509Certificate[] tlsCertChain) throws IDMLoginException, CertificateRevocationCheckException, InvalidArgumentException, IdmCertificateRevokedException, IDMException {
TenantInformation info;
try {
info=findTenant(tenantName);
}
catch ( Exception e) {
t... | TLS Client Certificate (or smartcard) authentication. This function does the following Certificate path validation, revocation check Subject validation OID filtering |
public static double[][][] expandNoiseArray(final double[][][] input){
double[][][] result=getNewCubeSizedArray();
int xSteps=X_SECTION_SIZE - 1;
int ySteps=Y_SECTION_SIZE - 1;
int zSteps=Z_SECTION_SIZE - 1;
for (int noiseX=0; noiseX < X_SECTIONS - 1; noiseX++) {
for (int noiseZ=0; noiseZ < Z_SECTIONS - 1... | expand the noise array to 16x16x16 by interpolating the values. |
@Override public void translate(final ITranslationEnvironment environment,final IInstruction instruction,final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment,instruction,instructions,"UQSUB16");
translateAll(environment,instruction,... | UQSUB16{<cond>} <Rd>, <Rn>, <Rm> Operation: if ConditionPassed(cond) then Rd[15:0] = UnsignedSat(Rn[15:0] - Rm[15:0], 16) Rd[31:16] = UnsignedSat(Rn[31:16] - Rm[31:16], 16) |
public static String toStringExclude(Object object,final String excludeFieldName){
return toStringExclude(object,new String[]{excludeFieldName});
}
| Builds a String for a toString method excluding the given field name. |
public static boolean removeDirectory(String pathToDir){
return deleteRecursive(new File(pathToDir));
}
| Remove directory and all its sub-resources with specified path |
public Dimension minimumSize(int v){
FontMetrics fm=getFontMetrics(getFont());
initFontMetrics();
return new Dimension(20 + fm.stringWidth("0123456789abcde"),getItemHeight() * v + (2 * MARGIN));
}
| return the minimumsize |
String pullInSource(InputStream in,Charset encoding){
String script="";
BufferedReader f=null;
try {
StringBuilder sb=new StringBuilder();
Reader reader=null;
if (encoding == null) reader=new InputStreamReader(in);
else reader=new InputStreamReader(in,encoding);
f=new BufferedReader(reade... | Given an input stream containing source file contents, read in each line |
@Override public void connect() throws IOException {
File f=new File(filename);
if (f.isDirectory()) {
isDir=true;
is=getDirectoryListing(f);
}
else {
is=new BufferedInputStream(new FileInputStream(f));
long lengthAsLong=f.length();
length=lengthAsLong <= Integer.MAX_VALUE ? (int)lengthAsLong... | This methods will attempt to obtain the input stream of the file pointed by this <code>URL</code>. If the file is a directory, it will return that directory listing as an input stream. |
public int falsePositives(int classindex){
int fp=0;
for (int i=0; i < confusion[classindex].length; i++) {
if (i != classindex) {
fp+=confusion[classindex][i];
}
}
return fp;
}
| The false positives for the specified class. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:49.470 -0400",hash_original_method="00066F2A5261D560420BAE8B5DB685BE",hash_generated_method="0F0633676B8D14425F94FFB8C4B89BE8") private boolean isSilentStart(String value){
boolean result=false;
for (int i=0; i < SILENT_START.le... | Determines whether or not the value starts with a silent letter. It will return <code>true</code> if the value starts with any of 'GN', 'KN', 'PN', 'WR' or 'PS'. |
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 MPLSObject(sage.io.SageDataFile inStream) throws java.io.IOException {
byte[] strHolder=new byte[4];
inStream.readFully(strHolder);
String fileType=new String(strHolder,BluRayParser.BLURAY_CHARSET);
if (!"MPLS".equals(fileType)) throw new java.io.IOException("Invalid BluRay structure: MPLS file is miss... | Creates a new instance of MPLSObject |
public final void yyreset(java.io.Reader reader) throws java.io.IOException {
zzBuffer=s.array;
zzStartRead=s.offset;
zzEndRead=zzStartRead + s.count - 1;
zzCurrentPos=zzMarkedPos=s.offset;
zzLexicalState=YYINITIAL;
zzReader=reader;
zzAtEOF=false;
}
| Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream <b>cannot</b> be reused (internal buffer is discarded and lost). Lexical state is set to <tt>YY_INITIAL</tt>. |
@Override public boolean lookAt(PLRotation rotation){
return (mIsNotLocked ? this.internalLookAt(null,rotation.pitch,rotation.yaw,false,true,false) : false);
}
| lookat methods |
public BreadcrumbItem(final Breadcrumb parent,final int style){
super(parent,checkStyle(style));
parent.addItem(this);
this.parentBreadcrumb=parent;
this.textColor=parent.getDisplay().getSystemColor(SWT.COLOR_BLACK);
this.textColorSelected=parent.getDisplay().getSystemColor(SWT.COLOR_BLACK);
this.enabled=tr... | Constructs a new instance of this class given its parent (which must be a <code>Breadcrumb</code>) and a style value describing its behavior and appearance. The item is added to the end of the items maintained by its parent. <p> The style value is either one of the style constants defined in class <code>SWT</code> wh... |
public FileDescriptor(){
}
| Constructs a new invalid FileDescriptor. |
public TDoubleObjectHashMap(int initialCapacity,float loadFactor,TDoubleHashingStrategy strategy){
super(initialCapacity,loadFactor);
_hashingStrategy=strategy;
}
| Creates a new <code>TDoubleObjectHashMap</code> instance with a prime value at or near the specified capacity and load factor. |
public void addImageView(CubeImageView imageView){
if (null == imageView) {
return;
}
if (null == mFirstImageViewHolder) {
mFirstImageViewHolder=new ImageViewHolder(imageView);
return;
}
ImageViewHolder holder=mFirstImageViewHolder;
for (; ; holder=holder.mNext) {
if (holder.contains(imageVi... | Bind ImageView with ImageTask |
public static void checkLocation(int location,String label){
if (location < 0) {
throw new RuntimeException("Unable to locate '" + label + "' in program");
}
}
| Checks to see if the location we obtained is valid. GLES returns -1 if a label could not be found, but does not set the GL error. <p> Throws a RuntimeException if the location is invalid. |
@Override public int read() throws java.io.IOException {
if (position < 0) {
if (encode) {
byte[] b3=new byte[3];
int numBinaryBytes=0;
for (int i=0; i < 3; i++) {
try {
int b=in.read();
if (b >= 0) {
b3[i]=(byte)b;
numBinaryBytes++;
... | Reads enough of the input stream to convert to/from Base64 and returns the next byte. |
public MethExecutorResult executeMethodOnObject(Object obj,String methodName,Object[] args){
String name=obj.getClass().getName() + "." + methodName+ (args != null ? " with " + args.length + " args" : "")+ " on object: "+ obj;
long start=start(name);
MethExecutorResult result=MethExecutor.executeObject(obj,method... | Executes a given instance method on a given object with the given arguments. |
private void logError(Text url,Throwable t){
if (LOG.isInfoEnabled()) {
LOG.info("Conversion of " + url + " failed with: "+ StringUtils.stringifyException(t));
}
}
| <p>Logs any error that occurs during conversion.</p> |
public void testDivideRemainderIsZero(){
String a="8311389578904553209874735431110";
int aScale=-15;
String b="237468273682987234567849583746";
int bScale=20;
String c="3.5000000000000000000000000000000E+36";
int resScale=-5;
BigDecimal aNumber=new BigDecimal(new BigInteger(a),aScale);
BigDecimal bNumbe... | Divide: remainder is zero |
public static String toString(LocalDateTime data,String modelo){
return data == null ? "" : data.format(formatter(modelo));
}
| Converte LocalDateTime para String indicando o formato da toString |
private void paintCloseEnabled(Graphics2D g,JComponent c,int width,int height){
paintClose(g,c,width,height,enabled);
}
| Paint the background enabled state. |
public void append(Printable painter,PageFormat page,int numPages){
BookPage bookPage=new BookPage(painter,page);
int pageIndex=mPages.size();
int newSize=pageIndex + numPages;
mPages.setSize(newSize);
for (int i=pageIndex; i < newSize; i++) {
mPages.setElementAt(bookPage,i);
}
}
| Appends <code>numPages</code> pages to the end of this <code>Book</code>. Each of the pages is associated with <code>page</code>. |
void close(){
myContentManager.removeAllContents(true);
myToolWindowManager.unregisterToolWindow(myWindowName);
}
| Close window |
protected static boolean isLandingPage(HttpServletRequest httpRequest){
return httpRequest.getServletPath().startsWith(BaseBean.MARKETPLACE_START_SITE);
}
| Returns true if the request targets the landing page of the market place |
protected final boolean _matchToken(String matchStr,int i) throws IOException, JsonParseException {
final int len=matchStr.length();
do {
if (_inputPtr >= _inputEnd) {
if (!loadMore()) {
_reportInvalidEOFInValue();
}
}
if (_inputBuffer[_inputPtr] != matchStr.charAt(i)) {
_repor... | Helper method for checking whether input matches expected token |
@RequestMapping(value=STORAGE_POLICIES_URI_PREFIX,method=RequestMethod.POST,consumes={"application/xml","application/json"}) @Secured(SecurityFunctions.FN_STORAGE_POLICIES_POST) public StoragePolicy createStoragePolicy(@RequestBody StoragePolicyCreateRequest request){
return storagePolicyService.createStoragePolicy(r... | Creates a new storage policy. <p>Requires WRITE permission on namespace and READ permission on filter namespace</p> |
public boolean isString(){
return value instanceof String;
}
| Check whether this primitive contains a String value. |
public UtilizationModelPlanetLabInMemory(String inputPath,double schedulingInterval) throws NumberFormatException, IOException {
data=new double[289];
setSchedulingInterval(schedulingInterval);
BufferedReader input=new BufferedReader(new FileReader(inputPath));
int n=data.length;
for (int i=0; i < n - 1; i++)... | Instantiates a new PlanetLab resource utilization model from a trace file. |
public GridByteArrayList(byte[] data,int size){
assert data != null;
assert size > 0;
this.data=data;
this.size=size;
}
| Wraps existing array into byte array list. |
public JToolBar createJToolBar(String name) throws MissingResourceException, ResourceFormatException, MissingListenerException {
JToolBar result=new JToolBar();
List buttons=getStringList(name);
Iterator it=buttons.iterator();
while (it.hasNext()) {
String s=(String)it.next();
if (s.equals(SEPARATOR)) {... | Creates a tool bar |
private void removeAllNodes(@Nullable Object key){
for (Iterator<V> i=new ValueForKeyIterator(key); i.hasNext(); ) {
i.next();
i.remove();
}
}
| Removes all nodes for the specified key. |
@Bean public static DataSourceInitializer dataSourceInitializer(){
ResourceDatabasePopulator resourceDatabasePopulator=new ResourceDatabasePopulator();
resourceDatabasePopulator.addScript(new ClassPathResource("alterJpaTablesAndInsertReferenceData.sql"));
DataSourceInitializer dataSourceInitializer=new DataSource... | This is a data source initializer which is used to make changes to the auto-created schema based on JPA annotations and to insert reference data. This bean is an InitializingBean which means it will automatically get invoked when the Spring test context creates all its beans. This approach will work for making changes ... |
public void createBuffers(){
boolean supportsUIntBuffers=RajawaliRenderer.supportsUIntBuffers;
if (mVertices != null) {
mVertices.compact().position(0);
createBuffer(mVertexBufferInfo,BufferType.FLOAT_BUFFER,mVertices,GLES20.GL_ARRAY_BUFFER);
}
if (mNormals != null) {
mNormals.compact().position(0);... | Creates the actual Buffer objects. |
private ServerPod[] buildServers(int serverCount){
ArrayList<ServerPod> serversPod=new ArrayList<>();
for (int i=0; i < serverCount; i++) {
if (i < _serverList.size()) {
serversPod.add(_serverList.get(i));
}
else {
serversPod.add(new ServerPod(i));
}
}
ServerPod[] serverArray=new Server... | Create cluster pods using the configuration as a hint. Both the cluster and cluster_hub pods use this. |
public boolean remove(URI uri,HttpCookie ck){
if (ck == null) {
throw new NullPointerException("cookie is null");
}
boolean modified=false;
lock.lock();
try {
modified=cookieJar.remove(ck);
}
finally {
lock.unlock();
}
return modified;
}
| Remove a cookie from store |
public static Document parseSAMLConfig(String samlConfigDoc) throws IOException, SAXException {
assert samlConfigDoc != null;
DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
dbf.setValidating(false);
DocumentBuilder builder;
try {
builder=dbf.newDocumentBuil... | Parse SAML configuration value passed as argument to DOM document. |
public static void assertTrue(boolean value,String errorMessage){
if (verbose) {
log("assertTrue(" + value + ", "+ errorMessage+ ")");
}
assertBool(value,errorMessage);
}
| Asserts that the given expression evaluates to true |
public boolean hasDays(){
return super.hasAttribute(DAYS);
}
| Returns whether it has the number of days before the start time. |
protected void stripIgnorableText(){
if (rootElement.getFirstChild() == null) {
return;
}
Node firstChild=rootElement.getFirstChild();
if (isIgnorableTextNode(firstChild)) {
rootElement.removeChild(firstChild);
if (rootElement.getFirstChild() == null) {
return;
}
}
Node lastChild=rootE... | Strip ignorable whitespace nodes from the root. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 15:01:24.484 -0400",hash_original_method="FE4B8D7BDC2BC5EA73BFE2D5582C2DF7",hash_generated_method="8E163135FFCE65EC07B847F759C17E8E") public boolean isMarked(){
return pair.mark;
}
| Returns the current value of the mark. |
public void write(OutputNode node,Object source) throws Exception {
Collection list=(Collection)source;
for ( Object item : list) {
if (item != null) {
Class expect=entry.getType();
Class actual=item.getClass();
if (!expect.isAssignableFrom(actual)) {
throw new PersistenceException("E... | This <code>write</code> method will write the specified object to the given XML element as as list entries. Each entry within the given collection must be assignable from the annotated type specified within the <code>ElementList</code> annotation. Each entry is serialized as a root element, that is, its <code>Root</co... |
public static TestSuite suite() throws Exception {
Class testClass=ClassLoader.getSystemClassLoader().loadClass("org.w3c.domts.level3.core.alltests");
Constructor testConstructor=testClass.getConstructor(new Class[]{DOMTestDocumentBuilderFactory.class});
DOMTestDocumentBuilderFactory factory=new BatikTestDocument... | Factory method for suite. |
public static long[] unknown_N_compute_B_and_K(double epsilon,double delta,int quantiles){
return unknown_N_compute_B_and_K_raw(epsilon,delta,quantiles);
}
| Computes the number of buffers and number of values per buffer such that quantiles can be determined with an approximation error no more than epsilon with a certain probability. |
public static String reflectionToString(Object object,ToStringStyle style){
return ReflectionToStringBuilder.toString(object,style);
}
| <p>Uses <code>ReflectionToStringBuilder</code> to generate a <code>toString</code> for the specified object.</p> |
public DrawerBuilder withTranslucentStatusBarShadow(Boolean translucentStatusBarShadow){
this.mTranslucentStatusBarShadow=translucentStatusBarShadow;
return this;
}
| Sets if the MaterialDrawer should add the translucent shadow overlay under the statusBar to get the same effect as the toolbar with a colored statusBar |
@DELETE @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("/{snapshot_id}") @CheckPermission(roles={Role.SYSTEM_MONITOR,Role.TENANT_ADMIN},acls={ACL.ANY}) public Response deleteSnapshot(@PathParam("tenant_id") String openstack_tenant_id,@PathParam("snapshot_id") String snapshot_id){
_log.info("D... | Delete a specific snapshot |
@Since(CommonParams.VERSION_1) @DELETE @Path(CommonParams.PATH_ID) @Override public Response deleteItem(@Context Request request,@InjectParam TriggerParameters params) throws WebApplicationException {
return delete(request,triggerBackend.deleteItem(),params);
}
| Deletes the trigger definition with the given id. |
public DecodeReturn(String _data){
data=_data;
pos=0;
}
| Use this to make a new DecodeReturn starting at position 0 |
public static ServerSocketBar create(int port,int listenBacklog) throws IOException {
return create(null,port,listenBacklog,true);
}
| Creates the SSL ServerSocket. |
private void fixedLongToBytes(long n,byte[] buf,int off){
buf[off + 0]=(byte)(n & 0xff);
buf[off + 1]=(byte)((n >> 8) & 0xff);
buf[off + 2]=(byte)((n >> 16) & 0xff);
buf[off + 3]=(byte)((n >> 24) & 0xff);
buf[off + 4]=(byte)((n >> 32) & 0xff);
buf[off + 5]=(byte)((n >> 40) & 0xff);
buf[off + 6]=(byte)((n ... | Convert a long into little-endian bytes in buf starting at off and going until off+7. |
public boolean matchesFirst(){
return super.get().getValue() == 0;
}
| checks if we already returned to the method that marked the first call. |
public static void main(final String[] args){
System.out.println(TITLE + " " + VERSION);
}
| prints the version string |
public Builder noCache(){
this.noCache=true;
return this;
}
| Don't accept an unvalidated cached response. |
private boolean parseQuantifier(PsiBuilder builder){
final PsiBuilder.Marker marker=builder.mark();
if (builder.getTokenType() == RegExpTT.LBRACE) {
builder.advanceLexer();
boolean minOmitted=false;
if (builder.getTokenType() == RegExpTT.COMMA && myCapabilities.contains(RegExpCapability.OMIT_NUMBERS_IN_... | QUANTIFIER ::= Q TYPE | "" Q ::= "{" BOUND "}" | "*" | "?" | "+" BOUND ::= NUM | NUM "," | NUM "," NUM TYPE ::= "?" | "+" | "" |
public MAttributeInstance(Properties ctx,ResultSet rs,String trxName){
super(ctx,rs,trxName);
}
| Load Cosntructor |
public JSONWriter value(double d) throws JSONException {
return this.value(new Double(d));
}
| Append a double value. |
public void startAutoScroll(int delayTimeInMills){
isAutoScroll=true;
sendScrollMessage(delayTimeInMills);
}
| start auto scroll |
public static ModuleSpec parse(String moduleSpec,Option... options){
int sep=moduleSpec.indexOf("/");
String name=sep != -1 ? moduleSpec.substring(0,sep) : moduleSpec;
name=name.trim();
String version=sep != -1 && sep < moduleSpec.length() - 1 ? moduleSpec.substring(sep + 1) : "";
version=version.trim();
if... | Parse a module spec according to the given version option. |
private Process createProcess(final File sourceFile,final File destFile) throws IOException {
notNull(sourceFile);
final String[] commandLine=getCommandLine(sourceFile.getPath(),destFile.getPath());
LOG.debug("CommandLine arguments: {}",Arrays.asList(commandLine));
final Process process=new ProcessBuilder(comma... | Creates process responsible for running tsc shell command by reading the file content from the sourceFilePath |
public void beginAdding(GL10 gl){
checkState(STATE_INITIALIZED,STATE_ADDING);
mLabels.clear();
mU=0;
mV=0;
mLineHeight=0;
Bitmap.Config config=mFullColor ? Bitmap.Config.ARGB_4444 : Bitmap.Config.ALPHA_8;
mBitmap=Bitmap.createBitmap(mStrikeWidth,mStrikeHeight,config);
mCanvas=new Canvas(mBitmap);
mBit... | Call before adding labels. Clears out any existing labels. |
public boolean equals(Object o){
if (o instanceof Action) return isEquiv((Action)o);
else return false;
}
| Test for equality to another object. This action equals another object if the other object is an equivalent action. |
public void removeIndex(String indexName) throws Exception {
try {
Collection<Index> idxs=qs.getIndexes();
if (!idxs.isEmpty()) {
Iterator<Index> idx=idxs.iterator();
while (idx.hasNext()) {
Index index=idx.next();
if (index.getName().equals(indexName)) {
qs.removeIndex(i... | remove a given index |
private void drawDiamond(Canvas canvas,Paint paint,float[] path,float x,float y){
path[0]=x;
path[1]=y - size;
path[2]=x - size;
path[3]=y;
path[4]=x;
path[5]=y + size;
path[6]=x + size;
path[7]=y;
drawPath(canvas,path,paint,true);
}
| The graphical representation of a diamond point shape. |
public void onMessagesRead(Peer peer,long fromDate){
if (fromDate < getLastReadDate(peer)) {
return;
}
getNotifications().clear();
pendingStorage.setMessagesCount(0);
pendingStorage.setDialogsCount(0);
allPendingNotifications.clear();
saveStorage();
updateNotification();
setLastReadDate(peer,fromD... | Processing event about messages read |
public void doSaveAs(){
saveAs();
}
| doSaveAs() - |
public CursorPosition(IndexSegmentTupleCursor<E> cursor,ILeafCursor<ImmutableLeaf> leafCursor,int index,byte[] key){
super(cursor,leafCursor,index,key);
}
| Create position on the specified key, or on the successor of the specified key if that key is not found in the index. |
private void enlarge(final int size){
int length1=2 * data.length;
int length2=length + size;
byte[] newData=new byte[length1 > length2 ? length1 : length2];
System.arraycopy(data,0,newData,0,length);
data=newData;
}
| Enlarge this byte vector so that it can receive n more bytes. |
public RaceGUI(String appName){
UIManager.put("swing.boldMetal",Boolean.FALSE);
JFrame f=new JFrame(appName);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setLayout(new BorderLayout());
track=new TrackView();
f.add(track,BorderLayout.CENTER);
controlPanel=new RaceControlPanel();
f.add(controlPane... | Creates a new instance of RaceGUI |
public static double logpdf(double val,double loc,double scale,double shape1,double shape2){
final double c=cdf(val,loc,scale,shape1,shape2);
val=(val - loc) / scale;
if (shape1 != 0.) {
val=1 - shape1 * val;
if (val < 1e-15) {
return Double.NEGATIVE_INFINITY;
}
val=(1. - 1. / shape1) * Math... | Probability density function. |
public IndexSchema create(String resourceName,SolrConfig config){
SolrResourceLoader loader=config.getResourceLoader();
InputStream schemaInputStream=null;
if (null == resourceName) {
resourceName=IndexSchema.DEFAULT_SCHEMA_FILE;
}
try {
schemaInputStream=loader.openSchema(resourceName);
}
catch ( ... | Returns an index schema created from a local resource |
private GridData gridDataForLbl(){
GridData gridData=new GridData();
gridData.horizontalIndent=5;
gridData.verticalIndent=10;
return gridData;
}
| Method creates grid data for label field. |
public static boolean isXioVolume(String nativeGuid){
return nativeGuid.contains("XTREMIO");
}
| Determines if the volume is an xtremio volume |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.