code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public TokenException(String msg){
super(msg);
}
| Constructs an instance of <code>TokenException</code> with the specified detail message. |
private Cuboid(String worldName,int x1,int y1,int z1,int x2,int y2,int z2){
this.worldName=worldName;
this.x1=Math.min(x1,x2);
this.x2=Math.max(x1,x2);
this.y1=Math.min(y1,y2);
this.y2=Math.max(y1,y2);
this.z1=Math.min(z1,z2);
this.z2=Math.max(z1,z2);
}
| Construct a Cuboid in the given world name and xyz co-ordinates. |
public boolean isString(String key){
Object val=get(key);
return val instanceof String;
}
| Check type of section element defined by key. Return true this element is String |
public void countUr92sAndQueryDuplexIdentityInfo(){
if (thisone == null) {
log.error("called countUR92sAndQueryDuplexInfo before thisone is initialized");
return;
}
if ((waitingForIplReply == true) || (swingTmrIplQuery == null) || (swingTmrDuplexInfoQuery == null)|| (swingTmrIplQuery.isRunning())|| (swing... | Begins a sequence which includes counting available UR92s and, if at least one UR92 is present, reads the Duplex Group Identity Info. |
private void flushBuffer() throws IOException {
if (bpos > 0) {
internalWrite(buffer,0,bpos,false);
bpos=0;
}
}
| Flush any buffered data from calls to write(int). Needed before doing a write(byte[], int, int) or a close(). |
public Builder enableRenderer(int index){
return apply(new SetSelectedTrack(tag,index,ExoPlayer.TRACK_DEFAULT));
}
| Schedules a renderer enable action to be executed. |
public boolean isRevocationEnabled(){
return revocationEnabled;
}
| Returns whether the default revocation checking mechanism of the underlying service provider is used. |
public DisconnectedEvent(Object source){
super(source,DISCONNECTED);
}
| Constructs connection event |
public static BigInteger ressol(BigInteger a,BigInteger p) throws IllegalArgumentException {
BigInteger v=null;
if (a.compareTo(ZERO) < 0) {
a=a.add(p);
}
if (a.equals(ZERO)) {
return ZERO;
}
if (p.equals(TWO)) {
return a;
}
if (p.testBit(0) && p.testBit(1)) {
if (jacobi(a,p) == 1) {
... | Computes the square root of a BigInteger modulo a prime employing the Shanks-Tonelli algorithm. |
public ConvertOgreBinaryVisualPanel1(){
initComponents();
}
| Creates new form ConvertOgreBinaryVisualPanel1 |
public void beginProcessSubTokens(){
}
| Called at the start of sub token processing |
private void stopScan(){
mIsScanInProgress=false;
mHandler.removeCallbacks(mAutoScanRunnable);
}
| Stops the auto scan if it is currently running |
private int fixFontSize(float pointSize){
if (screenRes != 72) {
pointSize=(int)Math.round(pointSize * screenRes / 72.0);
}
return (int)pointSize;
}
| Returns a font point size adjusted for the current screen resolution. Java2D assumes 72 dpi. On systems with larger dpi (Windows, GTK, etc.), font rendering will appear to small if we simply return a Java "Font" object's getSize() value. We need to adjust it for the screen resolution. |
public void rejectInvitation() throws RcsPermissionDeniedException, RcsGenericException {
try {
mSessionIntf.rejectInvitation();
}
catch ( Exception e) {
RcsPermissionDeniedException.assertException(e);
throw new RcsGenericException(e);
}
}
| Rejects session invitation |
public void handleRegionLossEvent(SystemMemberRegionEvent event){
String memberId=event.getMemberId();
SystemMemberJmx systemMemberJmx=(SystemMemberJmx)findCacheOrAppVmById(memberId);
if (systemMemberJmx != null) {
systemMemberJmx.handleRegionLoss(event);
}
}
| Finds the member as per details in the given event object and passes on this event for handling the region loss. |
protected int calculateChecksum(){
int checksum=cfgbuf.checksum_ts();
if (!isSwcChecksumEnabled || swcDefSignatureChecksums == null || swcDefSignatureChecksums.size() == 0) {
checksum+=swcContext.checksum();
}
return checksum;
}
| Calculate the data checksum on configuration buffer and the swcContext. If the configuration changes the checksum changes. |
private void initTimer(float levelDuration){
_levelDuration=levelDuration;
_timePassed=0.0f;
float scaleY=_height / 1920f;
scaleY=scaleY + ((1 - scaleY) * .5f);
int barHeight=(int)((BAR_HEIGHT + ((_density - 1.5) * 30)) * scaleY);
if (levelDuration > 0) {
Rectangle timerBarBackground=new Rectangle(_widt... | Initialize the timer bar |
private void queryForComputeStates(EnumerationContext ctx,Map<Long,GCPInstance> vms){
logInfo("Enumerating Local Compute States");
QueryTask.Query.Builder instanceIdFilterParentQuery=QueryTask.Query.Builder.create(QueryTask.Query.Occurance.MUST_OCCUR);
for ( Long instanceId : vms.keySet()) {
QueryTask.Query ... | Query all compute states for the cluster filtered by the received set of instance Ids. |
protected boolean afterSave(boolean newRecord,boolean success){
if (!success) return success;
return updateJournalTotal();
}
| After Save. Update Journal/Batch Total |
public static byte[] savePng(Bitmap src) throws ImageSaveException {
return save(src,Bitmap.CompressFormat.PNG,100);
}
| Saving image in png to byte array with specific quality |
@Override public final String toString(){
return image;
}
| Returns the image. |
public VmIdentifier(String uriString) throws URISyntaxException {
URI u;
try {
u=canonicalize(uriString);
}
catch ( URISyntaxException e) {
if (uriString.startsWith("//")) {
throw e;
}
u=canonicalize("//" + uriString);
}
uri=u;
validate();
}
| Create a VmIdentifier instance from a string value. |
private void removeElementAt(int at){
if (at < m_firstFree) {
int index=at >>> m_SHIFT;
int maxindex=m_firstFree >>> m_SHIFT;
int offset=at & m_MASK;
while (index <= maxindex) {
int copylen=m_blocksize - offset - 1;
int[] block=m_map[index];
if (null == block) block=m_map[index... | Deletes the component at the specified index. Each component in this vector with an index greater or equal to the specified index is shifted downward to have an index one smaller than the value it had previously. |
@Override protected void doPost(SlingHttpServletRequest request,SlingHttpServletResponse response) throws ServletException, IOException {
final String blogPath=request.getParameter(BLOG_PATH_PARAMETER);
if (!recaptchaService.getEnabled() || recaptchaService.validate(request)) {
final String author=request.getPa... | Save the comment to the JCR. Get or create the comment node structure to mirror the blog post node structure. Create the comment node under the structure and save the author, comment, and date. Currently redirects back to the same page. Verifies against the reCAPTCHA service. The next version will be an asynchronous po... |
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 void advanceToNextPageOrFinish(){
if (canFlipToNextPage()) {
getContainer().showPage(getNextPage());
}
else if (canFinishEarly()) {
if (getWizard().performFinish()) {
((WizardDialog)getContainer()).close();
}
}
}
| Makes the next page visible. |
public static Volume fetchVplexVolume(DbClient dbClient,Volume volume){
Volume vplexVolume=null;
URIQueryResultList queryResults=new URIQueryResultList();
dbClient.queryByConstraint(AlternateIdConstraint.Factory.getVolumeByAssociatedVolumesConstraint(volume.getId().toString()),queryResults);
if (queryResults.it... | Given a volume, this is an utility method that returns the VPLEX virtual volume that this volume is associated with. |
public StaticMap https(){
this.https=true;
return this;
}
| Force https scheme (default) |
public boolean isInterim(){
return interim;
}
| Indicates this location navigating to is an interim location that won't be pushed to history back stack. |
public final void testValidateFails(){
MinLengthValidator minLengthValidator=new MinLengthValidator("foo",2);
assertFalse(minLengthValidator.validate("a"));
}
| Tests the functionality of the validate-method, if it fails. |
public Vector3f min(Vector3fc v){
this.x=x < v.x() ? x : v.x();
this.y=y < v.y() ? y : v.y();
this.z=z < v.z() ? z : v.z();
return this;
}
| Set the components of this vector to be the component-wise minimum of this and the other vector. |
private void analize(){
StringTokenizer tokenizer=new StringTokenizer(sourceData,",");
String nextToken=null;
l=Integer.parseInt(tokenizer.nextToken());
t=Integer.parseInt(tokenizer.nextToken());
r=Integer.parseInt(tokenizer.nextToken());
b=Integer.parseInt(tokenizer.nextToken());
style=Integer.parseInt(t... | Private methods |
private void write(byte[] buffer,int offset,int byteCount) throws IOException {
Arrays.checkOffsetAndCount(buffer.length,offset,byteCount);
if (streaming) {
while (byteCount > 0) {
int bytesWritten=IoBridge.sendto(fd,buffer,offset,byteCount,0,null,0);
byteCount-=bytesWritten;
offset+=bytesWrit... | For PlainSocketOutputStream. |
public void focusLost(FocusEvent evt){
}
| Method focusLost. |
public Tree(){
super();
}
| Needed by CGLib |
protected POInfo initPO(Properties ctx){
POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName());
return poi;
}
| Load Meta Data |
public DataSetReader(Operator operator,List<ColumnMetaData> metaData,boolean isFaultTolerant){
this.operator=operator;
this.isFaultTolerant=isFaultTolerant;
this.metaData=metaData;
}
| Creates a new reader. |
@Override public java.lang.Iterable<Object> iterable(final IScope scope){
return ImmutableList.copyOf(getMatrix());
}
| Method iterator() |
protected boolean beforeSave(boolean newRecord){
String rt=getRecurringType();
if (rt == null) {
log.saveError("FillMandatory",Msg.getElement(getCtx(),"RecurringType"));
return false;
}
if (rt.equals(MRecurring.RECURRINGTYPE_Order) && getC_Order_ID() == 0) {
log.saveError("FillMandatory",Msg.getElem... | Before Save |
public boolean supportsPositionedDelete() throws SQLException {
return true;
}
| Is positioned DELETE supported? |
public static Bitmap scaleImage(Bitmap org,float scaleWidth,float scaleHeight){
if (org == null) {
return null;
}
Matrix matrix=new Matrix();
matrix.postScale(scaleWidth,scaleHeight);
return Bitmap.createBitmap(org,0,0,org.getWidth(),org.getHeight(),matrix,true);
}
| scale image |
public void testTodoCase() throws Exception {
String file="TodoTestCase.java";
String warningMessage=file + ":5: Warning: " + TodoDetector.ISSUE.getBriefDescription(TextFormat.TEXT)+ " ["+ TodoDetector.ISSUE.getId()+ "]\n"+ " // TODO\n"+ " ~~~~\n"+ "0 errors, 1 warnings\n";
assertEquals(warningMessage,li... | Test that a java file with a to-do has a warning. |
public boolean isLast() throws SQLException {
return crsInternal.isLast();
}
| Indicates whether the cursor is on the last row in this <code>JoinRowSetImpl</code> object. <P> Note: Calling the method <code>isLast</code> may be expensive because the JDBC driver might need to fetch ahead one row in order to determine whether the current row is the last row in this rowset. |
public void redoLastAction(){
try {
if (undoManager.canRedo()) undoManager.redo();
}
catch ( CannotRedoException cre) {
cre.printStackTrace();
}
}
| Attempt to redo the last action. |
public RawDiagnosticFormatter(Options options){
super(null,new SimpleConfiguration(options,EnumSet.of(DiagnosticPart.SUMMARY,DiagnosticPart.DETAILS,DiagnosticPart.SUBDIAGNOSTICS)));
}
| Create a formatter based on the supplied options. |
public static void callSecuredAPI(Context context,String endpoint,HTTP_METHODS methodType,JSONObject requestParams,APIResultCallBack apiResultCallBack,int requestCode){
EndPointInfo apiUtilities=new EndPointInfo();
apiUtilities.setEndPoint(endpoint);
apiUtilities.setHttpMethod(methodType);
if (requestParams != ... | Calls the secured API. |
public static ClassInfo findClass(String fullName){
return classes.get(fullName);
}
| Find a class with given name |
private Security(){
super();
}
| Prevent construction. |
public static Range findZBounds(XYZDataset dataset,List visibleSeriesKeys,Range xRange,boolean includeInterval){
ParamChecks.nullNotPermitted(dataset,"dataset");
Range result=iterateToFindZBounds(dataset,visibleSeriesKeys,xRange,includeInterval);
return result;
}
| Finds the bounds of the z-values in the specified dataset, including only those series that are listed in visibleSeriesKeys, and those items whose x-values fall within the specified range. |
@Override public void addValue(double value){
long n1=n;
min=min == null ? value : Math.min(min,value);
max=max == null ? value : Math.max(max,value);
sum+=value;
sumOfLogs+=Math.log(value);
sumOfSquares+=value * value;
digest.add(value);
n++;
double delta, delta_n, delta_n2, term1;
delta=value - M1... | Add a value. NOTE: This does not store the point, but only updates internal state. NOTE: This is NOT threadsafe. |
public PI addElement(Element element){
addElementToRegistry(element);
return (this);
}
| Adds an Element to the element. |
public void addSelectionListener(SelectionListener l){
if (listeners == null) {
listeners=new ArrayList();
}
listeners.add(l);
}
| Add a SelectionListener to this Selector's notification list. |
private UCharacterEnums(){
}
| This is just a namespace, it is not instantiatable. |
public static boolean[] copyOfRange(boolean[] original,int start,int end){
if (start <= end) {
if (original.length >= start && 0 <= start) {
int length=end - start;
int copyLength=Math.min(length,original.length - start);
boolean[] copy=new boolean[length];
System.arraycopy(original,start,... | Copies elements in original array to a new array, from index start(inclusive) to end(exclusive). The first element (if any) in the new array is original[from], and other elements in the new array are in the original order. The padding value whose index is bigger than or equal to original.length - start is false. |
public void ignoreRegion(int start,int end){
this.ignoredRegions.add(new Pair<>(start,end));
}
| Suppress analysis output for a given region. |
public boolean processEvents(List<AsyncEvent> events){
for ( AsyncEvent event : events) {
this.eventsMap.put(event.getKey(),event.getDeserializedValue());
}
return true;
}
| Processes events by recording their latencies. |
public Object readResolve() throws ObjectStreamException {
if (generationHistory == null) {
generationHistory=new LinkedList<OutputPort>();
}
if (annotations == null) {
annotations=new Annotations();
}
return this;
}
| Restores an empty history. |
public static boolean hasPermission(Security security,GenericValue userLogin,GenericValue orderHeader){
if (userLogin == null || orderHeader == null) return false;
if (security.hasEntityPermission("ORDERMGR","_VIEW",userLogin)) {
return true;
}
else if (security.hasEntityPermission("ORDERMGR","_ROLEVIEW"... | Checks to see if this user has read permission on the specified order |
public void adjustForNoTerms(long actualUsed){
breaker.addWithoutBreaking(actualUsed);
}
| Adjust the breaker when no terms were actually loaded, but the field data takes up space regardless. For instance, when ordinals are used. |
public Rest header(final String name,final String value) throws RestException {
try {
this.headers.put(URLEncoder.encode(name,"UTF-8"),URLEncoder.encode(value,"UTF-8"));
}
catch ( UnsupportedEncodingException e) {
throw new RestException(e);
}
return this;
}
| <p>Adds a header to be send with the HTTP request.</p> <p>Both the header name and value will be automatically url-encoded by the Rest client.</p> <p>This method may be chained together repeatedly, to pass multiple headers with a request. When the request is ultimately sent, the headers will be sorted by their names.<... |
public GridLayoutAnimationController(Animation animation,float columnDelay,float rowDelay){
super(animation);
mColumnDelay=columnDelay;
mRowDelay=rowDelay;
}
| Creates a new layout animation controller with the specified delays and the specified animation. |
public synchronized void activityStop(){
if (this.spinnerDialog != null) {
this.spinnerDialog.dismiss();
this.spinnerDialog=null;
}
}
| Stop spinner. |
public static IJavaElement create(IResource resource,IJavaProject project){
if (resource == null) {
return null;
}
int type=resource.getType();
switch (type) {
case IResource.PROJECT:
return JavaCore.create((IProject)resource);
case IResource.FILE:
return create((IFile)resource,project);
case IResource.... | Returns the Java element corresponding to the given resource, or <code>null</code> if unable to associate the given resource with a Java element. <p> The resource must be one of:<ul> <li>a project - the element returned is the corresponding <code>IJavaProject</code></li> <li>a <code>.java</code> file - the element retu... |
public boolean isChecked(){
return isChecked;
}
| Returns the checked state. |
public final CC shrinkPrioY(int p){
ver.setShrinkPriority(p);
return this;
}
| The shrink priority compared to other components in the same cell. <p> For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. |
final void updateScrimVisibility(){
if (mContentScrim != null || mStatusBarScrim != null) {
setScrimsShown(getHeight() + mCurrentOffset < getScrimVisibleHeightTrigger());
}
}
| Show or hide the scrims if needed |
void validateMirrorOrNull(Mirror mirror){
if ((mirror != null) && !vm.equals(mirror.virtualMachine())) {
throw new VMMismatchException(mirror.toString());
}
}
| Allow null mirror. Throw VMMismatchException on wrong VM. |
private double estimateTravelTime(Coord startCoord,Coord endCoord,Person person,double now,String mode){
double travelTime=0.0;
if (mode.equals("car")) {
Network network=(Network)scenario.getNetwork();
final Coord coord=startCoord;
Link startLink=NetworkUtils.getNearestLinkExactly(network,coord);
fi... | Estimation of the travel times, using car as a network mode and teleportation for other modes. |
public static RecipeBrew registerBrewRecipe(Brew brew,Object... inputs){
Preconditions.checkArgument(inputs.length <= 6);
RecipeBrew recipe=new RecipeBrew(brew,inputs);
brewRecipes.add(recipe);
return recipe;
}
| Registers a Brew Recipe (for the Botanical Brewery). |
public void stopLoad(){
loading=false;
this.stopAnimator=true;
setArcToLineAnimator();
setDisAppearAnimator();
}
| set the animation stop |
public void onConfigurationChanged(){
int curFirst=pager.getCurrentScreen() * PAGE_SIZE;
calPageSize();
int newPage=curFirst / PAGE_SIZE;
removeViewAt(1);
afterPlatformListGot();
pager.setCurrentScreen(newPage);
}
| after the screen rotates, this method will be called to refresh the list of gridviews |
@Override public void initCPTs(BayesNet bayesNet) throws Exception {
int nMaxParentCardinality=1;
for (int iAttribute=0; iAttribute < bayesNet.m_Instances.numAttributes(); iAttribute++) {
if (bayesNet.getParentSet(iAttribute).getCardinalityOfParents() > nMaxParentCardinality) {
nMaxParentCardinality=bayes... | initCPTs reserves space for CPTs and set all counts to zero |
public CertId(X509Certificate issuerCert,SerialNumber serialNumber) throws IOException {
this(issuerCert.getSubjectX500Principal(),issuerCert.getPublicKey(),serialNumber);
}
| Creates a CertId. The hash algorithm used is SHA-1. |
public static String stripTrailingChar(String string,char c){
if (string.length() > 0) {
if (string.charAt(string.length() - 1) == c) {
return string.substring(0,string.length() - 1);
}
}
return string;
}
| Strips trailing char if string ends with one. |
public Matrix4d scale(Vector3dc xyz){
return scale(xyz.x(),xyz.y(),xyz.z(),this);
}
| Apply scaling to this matrix by scaling the base axes by the given <tt>xyz.x</tt>, <tt>xyz.y</tt> and <tt>xyz.z</tt> factors, respectively. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>M * S</code>. So when transforming a vector <code>v</code... |
public void addEventListener2(IImageSharingListener listener) throws RemoteException {
if (listener == null) {
throw new ServerApiIllegalArgumentException("listener must not be null!");
}
try {
synchronized (mLock) {
mBroadcaster.addEventListener(listener);
}
}
catch ( ServerApiBaseException e) ... | Adds a listener on image sharing events |
protected int hashCode(char c){
return c;
}
| Computes a hash code corresponding to the given objects. |
public FeedFilter withUser(@Nonnull String username){
FeedFilter copy=basic();
copy.username=fromNullable(emptyToNull(username.trim()));
return fix(copy);
}
| Returns a copy of this filter that filters by the given username |
public ArrayObjectProvider(){
elementType=null;
}
| Produces regular arrays. Note that the object is stateless and immutable, so one instance per application can be used. |
public MBeanOperationInfo(String name,String description,MBeanParameterInfo[] signature,String type,int impact,Descriptor descriptor){
super(name,description,descriptor);
if (signature == null || signature.length == 0) signature=MBeanParameterInfo.NO_PARAMS;
else signature=signature.clone();
this.signature=s... | Constructs an <CODE>MBeanOperationInfo</CODE> object. |
public QuestStateStartsWithCondition(final String questname,final String state){
this.questname=checkNotNull(questname);
this.state=checkNotNull(state);
}
| Creates a new QuestStateStartsWithCondition. |
public void addTargetRequest(String requestString){
if (StringUtils.isBlank(requestString) || requestString.equals("#")) {
return;
}
synchronized (targetRequests) {
requestString=UrlUtils.canonicalizeUrl(requestString,url.toString());
targetRequests.add(new Request(requestString));
}
}
| add url to fetch |
private void drawOrthograph(Coords c,Graphics boardGraph){
if (!game.getBoard().contains(c)) {
return;
}
final IHex oHex=game.getBoard().getHex(c);
final Point oHexLoc=getHexLocation(c);
int elevOffset=oHex.terrainLevel(Terrains.BRIDGE_ELEV);
int orthX=oHexLoc.x;
int orthY=oHexLoc.y - (int)(HEX_ELEV *... | Draws a orthographic hex onto the board buffer. This assumes that drawRect is current, and does not check if the hex is visible. |
public void testBogusArguments() throws Exception {
IllegalArgumentException expected=expectThrows(IllegalArgumentException.class,null);
assertTrue(expected.getMessage().contains("Unknown parameters"));
}
| Test that bogus arguments result in exception |
public void testMinPosZero(){
byte aBytes[]={45,91,3,-15,35,26,3,91};
int aSign=1;
byte rBytes[]={0};
BigInteger aNumber=new BigInteger(aSign,aBytes);
BigInteger bNumber=BigInteger.ZERO;
BigInteger result=aNumber.min(bNumber);
byte resBytes[]=new byte[rBytes.length];
resBytes=result.toByteArray();
for... | max(BigInteger val). min of positive and ZERO. |
public boolean isLeftToRight(){
return (orientation & LTR_BIT) != 0;
}
| HorizontalLines: Do items run left-to-right?<br> Vertical Lines: Do lines run left-to-right?<br> This will return true for horizontal, left-to-right writing systems such as Roman. |
private void writeQName(javax.xml.namespace.QName qname,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI=qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix=xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {... | method to handle Qnames |
public static VOOperatorOrganization toVOOperatorOrganization(Organization organization,boolean imageDefined,LocalizerFacade localizerFacade){
VOOperatorOrganization voOperatorOrganization=new VOOperatorOrganization();
fillVOOrganization(voOperatorOrganization,organization,imageDefined,null,localizerFacade);
Set<... | Creates a new VOOperatorOrganization object and fills the fields with the corresponding fields from the given organization domain object. This value object is used only by operations of the operator client. <br> In contrast to the <code>toVOOrganization</code> method, the VOOperatorOrganization will be filled with valu... |
public void printNewline() throws IOException {
String nl=prettyPrinter.getNewline();
for (int i=0; i < nl.length(); i++) {
writer.write(nl.charAt(i));
}
column=0;
line++;
}
| Prints a newline. |
public Game(Team home,Team away,String name){
homeTeam=home;
awayTeam=away;
gameName=name;
homeScore=0;
homeQScore=new int[10];
awayScore=0;
awayQScore=new int[10];
numOT=0;
homeTOs=0;
awayTOs=0;
HomeQBStats=new int[6];
AwayQBStats=new int[6];
HomeRB1Stats=new int[4];
HomeRB2Stats=new int[4]... | Create game with a name (likely a bowl game). |
public NotificationChain basicSetDeclaredTypeRef(TypeRef newDeclaredTypeRef,NotificationChain msgs){
TypeRef oldDeclaredTypeRef=declaredTypeRef;
declaredTypeRef=newDeclaredTypeRef;
if (eNotificationRequired()) {
ENotificationImpl notification=new ENotificationImpl(this,Notification.SET,TypesPackage.TGETTER__D... | <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override public int read() throws IOException {
if (buf == null) {
throw new IOException();
}
if (pos < buf.length) {
return (buf[pos++] & 0xFF);
}
return in.read();
}
| Reads a single byte from this stream and returns it as an integer in the range from 0 to 255. If the pushback buffer does not contain any available bytes then a byte from the source input stream is returned. Blocks until one byte has been read, the end of the source stream is detected or an exception is thrown. |
public static HappyURL URL(String url) throws IOException {
return new HappyURL(url);
}
| Creates a new instance of a HappyMySQL object with the same parameters as those of the input HappyMySQL object. |
public Document read(URL url) throws DocumentException, IOException, XmlPullParserException {
String systemID=url.toExternalForm();
return read(createReader(url.openStream()),systemID);
}
| <p> Reads a Document from the given <code>URL</code> </p> |
public void addPrintln(String message){
addGetstatic("java.lang.System","err","Ljava/io/PrintStream;");
addLdc(message);
addInvokevirtual("java.io.PrintStream","println","(Ljava/lang/String;)V");
}
| Appends instructions for executing <code>java.lang.System.println(<i>message</i>)</code>. |
public void addIload(int n){
if (n < 4) addOpcode(26 + n);
else if (n < 0x100) {
addOpcode(ILOAD);
add(n);
}
else {
addOpcode(WIDE);
addOpcode(ILOAD);
addIndex(n);
}
}
| Appends ILOAD or (WIDE) ILOAD_<n> |
private void assertIsAssignable(TypeReference parentType,TypeReference childType){
if (VM.VerifyAssertions) {
if (childType.isUnboxedType()) {
opt_assert(parentType.isUnboxedType());
}
else {
if (childType != TypeReference.JavaLangObject) {
if (ClassLoaderProxy.includesType(parentType,chi... | Assert that the given child type is a subclass of the given parent type. |
public SlidingActivityHelper(Activity activity){
mActivity=activity;
}
| Instantiates a new SlidingActivityHelper. |
public static void printList(Object[] list){
for (int i=0; i < list.length; i++) System.out.print(list[i] + " ");
System.out.println();
}
| Display elements in an Array |
public static double calculateAdjRSquared(double rsq,int n,int k){
if (n < 1 || k < 2 || n == k) {
System.err.println("Cannot calculate Adjusted R^2.");
return Double.NaN;
}
return 1 - ((1 - rsq) * (n - 1) / (n - k));
}
| Returns the adjusted R-squared value for a linear regression model. This works for either a simple or a multiple linear regression model. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.