code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public boolean isDrawerOpen(){
return false;
}
| Get the current state of the drawer. True if the drawer is currently open. |
float map(float value,float start1,float stop1,float start2,float stop2){
return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));
}
| Takes a value, assumes it falls between start1 and stop1, and maps it to a value between start2 and stop2. For example, above, our slide goes 0-100, starting at 50. We map 0 on the slider to .1f and 100 to 1.9f, in order to better suit our shader calculations |
public td addElement(String hashcode,String element){
addElementToRegistry(hashcode,element);
return (this);
}
| Adds an Element to the element. |
public CompilationUnitChange attachChange(CompilationUnitChange cuChange,boolean generateGroups) throws CoreException {
boolean needsAstRewrite=fRewrite != null;
boolean needsImportRemoval=fImportRemover != null && fImportRemover.hasRemovedNodes();
boolean needsImportRewrite=fImportRewrite != null && fImportRewri... | Attaches the changes of this compilation unit rewrite to the given CU Change. The given change <b>must</b> either have no root edit, or a MultiTextEdit as a root edit. The edits in the given change <b>must not</b> overlap with the changes of this compilation unit. |
@Override public double[] distributionForInstance(Instance instance) throws Exception {
if (m_Filter.numPendingOutput() > 0) {
throw new Exception("Filter output queue not empty!");
}
if (!m_Filter.input(instance)) {
throw new Exception("Filter didn't make the test instance immediately available!");
}
... | Classifies a given instance after filtering. |
public ScaleIOSnapshotVolumeResponse snapshotMultiVolume(Map<String,String> id2snapshot,String systemId) throws Exception {
String uri=ScaleIOConstants.getSnapshotVolumesURI(systemId);
ScaleIOSnapshotVolumes spVol=new ScaleIOSnapshotVolumes();
for ( Map.Entry<String,String> entry : id2snapshot.entrySet()) {
... | Create multiple snapshots in a consistency group |
public static String decodeUnicodeStr(String s){
StringBuilder sb=new StringBuilder(s.length());
char[] chars=s.toCharArray();
for (int i=0; i < chars.length; i++) {
char c=chars[i];
if (c == '\\' && chars[i + 1] == 'u') {
char cc=0;
for (int j=0; j < 4; j++) {
char ch=Character.toLowe... | decode Unicode string |
private int readMethod(final ClassVisitor classVisitor,final Context context,int u){
char[] c=context.buffer;
context.access=readUnsignedShort(u);
context.name=readUTF8(u + 2,c);
context.desc=readUTF8(u + 4,c);
u+=6;
int code=0;
int exception=0;
String[] exceptions=null;
String signature=null;
int m... | Reads a method and makes the given visitor visit it. |
private JSONObject executeSqlStatementNDK(String query,JSONArray paramsAsJson,CallbackContext cbc) throws Exception {
JSONObject rowsResult=new JSONObject();
boolean hasRows;
SQLiteStatement myStatement=mydb.prepareStatement(query);
try {
for (int i=0; i < paramsAsJson.length(); ++i) {
if (paramsAsJso... | Get rows results from query cursor. |
public void paint(Graphics g,JComponent c){
if (progressBar.isIndeterminate()) {
paintIndeterminate(g,c);
}
else {
paintDeterminate(g,c);
}
}
| Delegates painting to one of two methods: paintDeterminate or paintIndeterminate. |
@After public void tearDown(){
List<HashMap> financialActivities=this.financialActivityAccountHelper.getAllFinancialActivityAccounts(this.responseSpec);
for ( HashMap financialActivity : financialActivities) {
Integer financialActivityAccountId=(Integer)financialActivity.get("id");
Integer deletedFinancial... | Delete the Liability transfer account |
public <T>Tuple5<T,A,B,C,D> prepend(T t){
return Tuple5.of(t,_1,_2,_3,_4);
}
| Creates a tuple 5 by prepending the supplied value |
public String doImport(){
boolean alreadyDone;
try {
alreadyDone=isImportAlreadyDone();
}
catch ( ImporterMetaDataException e) {
errorMessage=e.getMessage();
return ERROR;
}
if (importerManager.isInProgress() || alreadyDone) {
return WAIT;
}
ImportAction.logger.info("doImport");
this.i... | Run import if not in progress or already done, otherwise return Wait view |
public NetworkTopologyEventImpl(JmDNS jmDNS,InetAddress inetAddress){
super(jmDNS);
this._inetAddress=inetAddress;
}
| Constructs a Network Topology Event. |
public void endVisit(MethodInvocation node){
}
| End of visit the given type-specific AST node. <p> The default implementation does nothing. Subclasses may reimplement. </p> |
public boolean cancelLeaseOfIPv4(IPv4Address ip){
DHCPBinding binding=this.getDHCPbindingFromIPv4(ip);
if (binding != null) {
binding.clearLeaseTimes();
binding.setLeaseStatus(false);
this.setPoolAvailability(this.getPoolAvailability() + 1);
this.setPoolFull(false);
return true;
}
return fal... | Cancel an IP lease. |
void customize(){
}
| Customize dialog To be overwritten by concrete classes |
@Override public void run(){
try {
handleAlarm();
}
catch ( Throwable e) {
log.log(Level.WARNING,e.toString(),e);
}
finally {
_isRunning=false;
_runningAlarmCount.decrementAndGet();
}
}
| Runs the alarm. This is only called from the worker thread. |
public Builder(){
}
| Instantiates a new builder. |
public void test_checkServerTrusted_01() throws Exception {
X509TrustManagerImpl xtm=new X509TrustManagerImpl();
X509Certificate[] xcert=null;
try {
xtm.checkServerTrusted(xcert,"SSL");
fail("IllegalArgumentException wasn't thrown");
}
catch ( IllegalArgumentException expected) {
}
xcert=new X509C... | javax.net.ssl.X509TrustManager#checkServerTrusted(X509Certificate[] chain, String authType) |
@Override public CompilerPhase newExecution(IR ir){
return this;
}
| Return this instance of this phase. This phase contains no per-compilation instance fields. |
public final String toString(){
return description;
}
| Returns a <code>String</code> representation of this <code>BOM</code> value. |
public boolean supportsPreStripping(){
return false;
}
| Return true if the xsl:strip-space or xsl:preserve-space was processed during construction of the DTM document. <p>%REVEIW% Presumes a 1:1 mapping from DTM to Document, since we aren't saying which Document to query...?</p> |
public static <T>Key<T> of(Class<T> type,Annotation ann){
Objects.requireNonNull(type);
Objects.requireNonNull(ann);
return new Key<>(type,new Annotation[]{ann});
}
| Builds Key from a Class and annotation |
private void lazyChopIfNeeded(Object object){
if (lazyChop) {
if (object instanceof LazyValueMap) {
LazyValueMap m=(LazyValueMap)object;
m.chopMap();
}
else if (object instanceof ValueList) {
ValueList list=(ValueList)object;
list.chopList();
}
}
}
| If in lazy chop mode, and the object is a Lazy Value Map or a ValueList then we force a chop operation for each of its items. |
protected void loadRefs(){
try {
myLocalBranches.clear();
myRemoteBranches.clear();
myTags.clear();
final VirtualFile root=gitRoot();
GitRepository repository=GitUtil.getRepositoryManager(myProject).getRepositoryForRoot(root);
if (repository != null) {
myLocalBranches.addAll(repository.g... | Load tags and branches |
public static void hideKeyboard(Activity activity,IBinder windowToken){
InputMethodManager mgr=(InputMethodManager)activity.getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.hideSoftInputFromWindow(windowToken,0);
}
| This method is used to hide a keyboard after a user has finished typing the url. |
public static void main(String[] args){
System.out.println(parseSchedule("EmailTest,//GAI/datascience/tasks/daily/EmailTest,sendmail.r,Now,, beweber@ea.com, true,,false",true));
System.out.println(parseSchedule("EmailTest,//GAI/datascience/tasks/daily/EmailTest,sendmail.r,Now,, beweber@ea.com, true,,false",false));... | Unit test. |
@Override public void close(){
this.allowedOps.clear();
}
| Clears the cached information for this principal. |
public static String createFaultXml(String faultCode,String faultString,String faultActor,String detail) throws IOException {
return createFaultXml(new QName(faultCode),faultString,faultActor,detail);
}
| Creates a SOAP fault message. |
void shrink(){
int n=m_opMap.elementAt(MAPINDEX_LENGTH);
m_opMap.setToSize(n + 4);
m_opMap.setElementAt(0,n);
m_opMap.setElementAt(0,n + 1);
m_opMap.setElementAt(0,n + 2);
n=m_tokenQueue.size();
m_tokenQueue.setToSize(n + 4);
m_tokenQueue.setElementAt(null,n);
m_tokenQueue.setElementAt(null,n + 1);
... | Replace the large arrays with a small array. |
@Override public void eUnset(int featureID){
switch (featureID) {
case N4JSPackage.FUNCTION_DECLARATION__DECLARED_MODIFIERS:
getDeclaredModifiers().clear();
return;
case N4JSPackage.FUNCTION_DECLARATION__BODY:
setBody((Block)null);
return;
case N4JSPackage.FUNCTION_DECLARATION__LOK:
set_lok((LocalArgumentsVariabl... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public static ThreadContext push(String key,Object value) throws IllegalArgumentException {
if (key == null) throw new IllegalArgumentException("null key");
ThreadContext oldContext=getContext();
if (oldContext == null) oldContext=new ThreadContext(null,null,null);
ThreadContext newContext=new ThreadContext... | <p>Push an object on the context stack with the given key. This operation can subsequently be undone by calling <code>restore</code> with the ThreadContext value returned here.</p> |
public boolean hasRestriction(Resource r){
return classes.containsKey(r) && !classes.get(r).getOnProperty().isEmpty();
}
| Return whether this resource corresponds to a property restriction. |
public static void openShareFileIntent(Context context,File file,String shareDialogMessage){
try {
context.startActivity(Intent.createChooser(getShareFileIntent(context,file),shareDialogMessage));
}
catch ( Exception e) {
logThis(TAG,"openShareFileIntent Exception",e);
}
}
| Opens share file intent |
@Override public boolean isReadOnly() throws SQLException {
try {
if (isDebugEnabled()) {
debugCode("isReadOnly");
}
checkClosed();
return session.isReadOnly();
}
catch ( Exception e) {
throw logAndConvert(e);
}
}
| Returns true if the database is read-only. |
void optimize(Environment env,Label lbl){
lbl.pc=REACHED;
for (Instruction inst=lbl.next; inst != null; inst=inst.next) {
switch (inst.pc) {
case NOTREACHED:
inst.optimize(env);
inst.pc=REACHED;
break;
case REACHED:
return;
case NEEDED:
break;
}
switch (inst.opc) {
case opc_label:
case opc_dead:
if (ins... | Optimize instructions and mark those that can be reached |
public final void yyreset(java.io.Reader reader){
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>. |
private static void queryPositionEntry(FinanceService service,String entryUrl) throws IOException, MalformedURLException, ServiceException {
System.out.println("Requesting Entry at location " + entryUrl);
PositionEntry positionEntry=service.getEntry(new URL(entryUrl),PositionEntry.class);
printPositionEntry(posit... | Queries a positon entry and prints entry details. |
public void sort(final int columnIndex,final boolean sortAscending){
sortingController.sort(columnIndex,sortAscending);
}
| Sorts the table by the values of the column of the given index. |
public void addVetoableChangeListener(String propertyName,VetoableChangeListener in_vcl){
beanContextChildSupport.addVetoableChangeListener(propertyName,in_vcl);
}
| Method for BeanContextChild interface. Uses the BeanContextChildSupport to add a listener to this object's property. This listener wants to have the right to veto a property change. |
public String prettyPrint(String sparql){
return OpAsQuery.asQuery(Algebra.compile(QueryFactory.create(sparql))).serialize();
}
| Reformats the SPARQL query for logging purpose |
public ArrayStoreException(){
super();
}
| Constructs an <code>ArrayStoreException</code> with no detail message. |
private RDOParameter createRoleBasedParameter(RDOParameter parameterRdo,RDORole role,int parentEntryNr){
RDOParameter roleBasedParameter=new RDOParameter();
roleBasedParameter.setParentEntryNr(parentEntryNr);
roleBasedParameter.setEntryNr(sequence.nextValue());
roleBasedParameter.setId(parameterRdo.getId());
... | Create a new role based parameter. The information from the role and the parameter are merged. |
@After public void tearDown() throws Exception {
}
| Method tearDown. |
public void lostOwnership(Clipboard clipboard,Transferable contents){
}
| Required by the AbstractAction interface; does nothing. |
@Nonnull public BugInstance addSourceLine(SourceLineAnnotation sourceLine){
add(sourceLine);
return this;
}
| Add a source line annotation. |
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. |
static ClassLoader findClassLoader() throws ConfigurationError {
return Thread.currentThread().getContextClassLoader();
}
| Figure out which ClassLoader to use. For JDK 1.2 and later use the context ClassLoader. |
public int convertColumnIndexToModel(int viewColumnIndex){
return viewColumnIndex;
}
| Convert the index for a column from the display index to the corresponding index in the underlying model. <p> This is unused for this implementation because the column ordering cannot be dynamically changed. |
private int compare(WorkSource other,int i1,int i2){
final int diff=mUids[i1] - other.mUids[i2];
if (diff != 0) {
return diff;
}
return mNames[i1].compareTo(other.mNames[i2]);
}
| Returns 0 if equal, negative if 'this' is before 'other', positive if 'this' is after 'other'. |
@Override public int[] reduce(List<ComputeJobResult> results){
if (results.size() == 1) return results.get(0).getData();
assert results.size() == 2;
int[] arr1=results.get(0).getData();
int[] arr2=results.get(1).getData();
return mergeArrays(arr1,arr2);
}
| This method is called when both child jobs are completed, and is a Reduce step of Merge Sort algorithm. On this step we do a merge of 2 sorted arrays, produced by child tasks, into a 1 sorted array. |
public void actionPerformed(ActionEvent e){
GraphicsEnvironment.getLocalGraphicsEnvironment();
if (!GraphicsEnvironment.isHeadless()) {
if (UI == null) {
UI=new UserInterface();
}
else {
UI.setVisible(true);
}
}
else {
new FacelessServer();
}
}
| Start the server end of WiThrottle. |
Object processValue(StylesheetHandler handler,String uri,String name,String rawName,String value,ElemTemplateElement owner) throws org.xml.sax.SAXException {
int type=getType();
Object processedValue=null;
switch (type) {
case T_AVT:
processedValue=processAVT(handler,uri,name,rawName,value,owner);
break;
case... | Process an attribute value. |
public synchronized void add(String name,long threadId){
if (mFinished) {
throw new IllegalStateException("Marker added to finished log");
}
mMarkers.add(new Marker(name,threadId,SystemClock.elapsedRealtime()));
}
| Adds a marker to this log with the specified name. |
private static int convertToValue(final String rawValue){
int value=-1;
if (rawValue.equals("\"SUM\"")) {
value=SUM;
}
else if (rawValue.equals("\"AVG\"")) {
value=AVG;
}
else if (rawValue.equals("\"PRD\"")) {
value=PRD;
}
else if (rawValue.equals("\"MIN\"")) {
value=MIN;
}
else ... | get string name as int value if recognised |
public static final String toFEN(Position pos){
StringBuilder ret=new StringBuilder();
for (int r=7; r >= 0; r--) {
int numEmpty=0;
for (int c=0; c < 8; c++) {
int p=pos.getPiece(Position.getSquare(c,r));
if (p == Piece.EMPTY) {
numEmpty++;
}
else {
if (numEmpty > 0) {
... | Return a FEN string corresponding to a chess Position object. |
public static void announceDeletion(final DigestURL url,final int depth,final State state){
if (state == State.INVENTORY || state == State.ANY) inventory.announceDeletion(url,depth);
if (state == State.ARCHIVE || state == State.ANY) archive.announceDeletion(url,depth);
}
| Delete information about the storage of a snapshot to the Snapshot-internal index. The actual deletion of files in the target directory must be done elsewehre, this method does not store the snapshot files. |
public void stopProcess(){
if (getProcessState() != Process.PROCESS_STATE_STOPPED) {
getProcess().getLogger().info("Process stopped. Completing current operator.");
getStatusBar().setSpecialText("Process stopped. Completing current operator.");
if (processThread != null) {
if (processThread.isAlive(... | Can be used to stop the currently running process. Please note that the ProcessThread will still be running in the background until the current operator is finished. |
public CUnselectSubtreeNodesAction(final ZyGraph graph,final ITreeNode<CTag> tag){
super("Unselect Subtree Nodes");
m_graph=Preconditions.checkNotNull(graph,"IE02323: Graph argument can not be null");
m_tag=Preconditions.checkNotNull(tag,"IE02324: Tag can't be null");
}
| Creates a new action object. |
public void yypushback(int number){
if (number > yylength()) zzScanError(ZZ_PUSHBACK_2BIG);
zzMarkedPos-=number;
}
| Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method |
public final boolean isClassC(){
return (ipAddress & 0x00000007) == 3;
}
| Check if the IP address is belongs to a Class C IP address. |
public SemIm(SemPm semPm){
this(semPm,null,new Parameters());
}
| Constructs a new SEM IM from a SEM PM. |
public ConnectionConfig(){
super();
}
| Ctor for a functional Swing object with no existing adapter |
public static String addSentenceMarkers(String s){
return Vocabulary.START_SYM + " " + s+ " "+ Vocabulary.STOP_SYM;
}
| wrap sentence with sentence start/stop markers as defined by Vocabulary; separated by a single whitespace. |
private void updateProgress(String progressLabel,int progress){
if (myHost != null) {
myHost.updateProgress(progressLabel,progress);
}
else {
System.out.println(progressLabel + " " + progress+ "%");
}
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
private void inspect(final Player admin,final RPObject target){
final StringBuilder sb=new StringBuilder();
sb.append("Inspecting " + target.get("name") + "\n");
for ( final String value : target) {
sb.append(value + ": " + target.get(value)+ "\n");
}
admin.sendPrivateText(sb.toString());
sb.setLength(... | Inspects a player |
private boolean isViewTopHigherThenPreviousViewBottom(int previousViewBottom,int viewTop){
return viewTop < previousViewBottom;
}
| View top is higher when it's smaller then previous View Bottom |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:59.704 -0500",hash_original_method="7B8E28B63F298B36AFEC228A9203A43A",hash_generated_method="BA670570AB62185827AD01CD9C696E60") public static void checkURI(String uri) throws IOException {
try {
URI ur=new URI(uri);
if (ur... | Checks the correctness of the string representation of URI name. The correctness is checked as pointed out in RFC 3280 p. 34. |
@SuppressWarnings("WeakerAccess") public TerminalEmulatorDeviceConfiguration(int lineBufferScrollbackSize,int blinkLengthInMilliSeconds,CursorStyle cursorStyle,TextColor cursorColor,boolean cursorBlinking){
this(lineBufferScrollbackSize,blinkLengthInMilliSeconds,cursorStyle,cursorColor,cursorBlinking,true);
}
| Creates a new terminal device configuration object with all configurable values specified. |
private void cmdConvert(CommandSender sender,String[] args){
if (isNotPermissed(sender,"nametagedit.convert")) return;
if (args.length != 4) {
NametagMessages.USAGE_CONVERT.send(sender);
}
else {
boolean sourceIsFile=args[1].equalsIgnoreCase("file");
boolean destinationIsSQL=args[2].equalsIgnoreCas... | Handles /nte convert |
public List<Synapse> connectAllToAll(List<Neuron> sourceNeurons,List<Neuron> targetNeurons){
return connectAllToAll(sourceNeurons,targetNeurons,Utils.intersects(sourceNeurons,targetNeurons),selfConnectionAllowed,true);
}
| Connect all to all using underlying connection object to store parameters. Used by quick connect. |
public Vset checkAmbigName(Environment env,Context ctx,Vset vset,Hashtable exp,UnaryExpression loc){
return checkValue(env,ctx,vset,exp);
}
| Check something that might be an AmbiguousName (refman 6.5.2). A string of dot-separated identifiers might be, in order of preference: <nl> <li> a variable name followed by fields or types <li> a type name followed by fields or types <li> a package name followed a type and then fields or types </nl> If a type name is f... |
public final int size(){
return numOfEntries;
}
| Returns the number of the entries. |
public void initializeClassifier(Instances data) throws Exception {
m_RandomInstance=new Random(m_Seed);
int classIndex=data.classIndex();
if (m_Classifier == null) {
throw new Exception("A base classifier has not been specified!");
}
if (!(m_Classifier instanceof WeightedInstancesHandler) && !m_UseResamp... | Builds the boosted classifier |
public int compare(JavaScriptElement element1,JavaScriptElement element2){
int category1=category(element1);
int category2=category(element2);
if (category1 != category2) {
return category1 - category2;
}
return element1.friendlyString().compareTo(element2.friendlyString());
}
| Compares two Build Elements. Returns a negative number if first build element has a lower category value. Returns a positive number if the first build element has a higher category value. If category values are equal, returns the string comparison of their friendly strings. |
public static double quantile(double p,double k,double theta,double shift){
return Math.log(GammaDistribution.quantile(p,k,theta)) + shift;
}
| Compute probit (inverse cdf) for ExpGamma distributions. |
@SuppressWarnings("deprecation") static HttpUriRequest createHttpRequest(Request<?> request,Map<String,String> additionalHeaders) throws AuthFailureError {
switch (request.getMethod()) {
case Method.DEPRECATED_GET_OR_POST:
{
byte[] postBody=request.getPostBody();
if (postBody != null) {
HttpPost pos... | Creates the appropriate subclass of HttpUriRequest for passed in request. |
public static void selectClickedRow(final JTable table,final MouseEvent event){
final int row=table.rowAtPoint(event.getPoint());
if (row == -1) {
return;
}
table.setRowSelectionInterval(row,row);
}
| Selects a table row depending on a mouse event. |
public int size(){
return al.size();
}
| Returns the number of elements in this set. |
public static void i(Object... msg){
if (LuaViewConfig.isDebug()) {
Log.i(DEFAULT_PREFIX,getMsg(msg));
}
}
| log a info message |
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 PointMutation(double probability){
super();
this.probability=probability;
}
| Constructs a new point mutation instance. |
protected static File createRelativePath(File absolute) throws Exception {
File userDir=new File(System.getProperty("user.dir"));
String userPath=userDir.getAbsolutePath() + File.separator;
String targetPath=(new File(absolute.getParent())).getPath() + File.separator;
String fileName=absolute.getName();
Strin... | Converts a File's absolute path to a path relative to the user (ie start) directory. |
protected void pickUpCar(PrintWriter file,Car car,boolean isManifest){
if (isManifest) {
pickUpCar(file,car,new StringBuffer(padAndTruncateString(Setup.getPickupCarPrefix(),Setup.getManifestPrefixLength())),Setup.getPickupManifestMessageFormat(),isManifest);
}
else {
pickUpCar(file,car,new StringBuffer(pad... | Adds the car's pick up string to the output file using the manifest or switch list format |
public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws Exception {
String errM="";
sessionContext.checkPermission(Right.TimetableManagers);
WebTable.setOrder(sessionContext,"timetableManagerList.ord",request.getParameter("order"),1);
bo... | Reads list of schedule deputies and assistants and displays them in the form of a HTML table |
public Configurator emptyImage(int imageRes){
if (imageRes > 0) {
viewEmptyImage=imageRes;
}
return this;
}
| Customize the empty view image. |
public BaseElement(Node n,BaseElement parent){
node=n;
attributes=n.getAttributes();
if (parent != null) {
this.parent=parent;
parent.children.add(this);
errors_are_exceptions=parent.errors_are_exceptions;
log=parent.log;
}
}
| Create a new XML element. Children inherit settings from their parent |
public int decode(String data,OutputStream out) throws IOException {
byte b1, b2, b3, b4;
int length=0;
int end=data.length();
while (end > 0) {
if (!ignore(data.charAt(end - 1))) {
break;
}
end--;
}
int i=0;
int finish=end - 4;
i=nextI(data,i,finish);
while (i < finish) {
b1=dec... | decode the base 64 encoded String data writing it to the given output stream, whitespace characters will be ignored. |
private String printOFormat(final long x){
String sx=null;
if (x == Long.MIN_VALUE) {
sx="1000000000000000000000";
}
else if (x < 0) {
final String t=Long.toString((~(-x - 1)) ^ Long.MIN_VALUE,8);
switch (t.length()) {
case 1:
sx="100000000000000000000" + t;
break;
case 2:
sx="1000000000000... | Format method for the o conversion character and long argument. For o format, the flag character '-', means that the output should be left justified within the field. The default is to pad with blanks on the left. The '#' flag character means that the output begins with a leading 0 and the precision is increased by ... |
public void init() throws ServletException {
}
| Initialization of the servlet. <br> |
public void removeItem(YeomanGeneratorType type,String name,GeneratedItemView itemView){
List<String> existingNames=namesByTypes.get(type);
if (existingNames != null && existingNames.contains(name)) {
existingNames.remove(name);
if (existingNames.isEmpty()) {
namesByTypes.remove(type);
FoldingPa... | Remove an item from the data |
public SortableAndSearchableWrapperTableModel(TableModel model){
super();
m_MouseListener=null;
m_SortedIndices=null;
m_DisplayIndices=null;
m_ColumnIsNumeric=null;
setUnsortedModel(model);
}
| initializes with the given model. |
void cancelAllSuperActivityToasts(){
removeMessages(Messages.DISPLAY);
removeMessages(Messages.REMOVE);
for ( SuperActivityToast superActivityToast : mList) {
if (superActivityToast.isShowing()) {
superActivityToast.getViewGroup().removeView(superActivityToast.getView());
superActivityToast.getVi... | Removes all SuperActivityToasts and clears the list |
public void playSequentially(List<Animator> items){
if (items != null && items.size() > 0) {
mNeedsSort=true;
if (items.size() == 1) {
play(items.get(0));
}
else {
for (int i=0; i < items.size() - 1; ++i) {
play(items.get(i)).before(items.get(i + 1));
}
}
}
}
| Sets up this AnimatorSet to play each of the supplied animations when the previous animation ends. |
public boolean exportFormatX509(){
return formatX509;
}
| Was chosen export format X.509? |
public void write(org.apache.thrift.protocol.TProtocol oprot,Attachment struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetId()) {
oprot.writeFieldBegin(ID_FIELD_DESC);
oprot.writeI64(struct.id);
oprot.writeFieldEnd();
}
if (struct... | Description: <br> |
public static Map consultFolderInfo(AxSf axsf,Integer bookID,int page,Locale locale,Map extendedValues,String origen,String destino,Map fldDefs){
String data=axsf.getFormat().getData();
FormFormat formFormat=new FormFormat(data);
longFormatter=new SimpleDateFormat(RBUtil.getInstance(locale).getProperty(I18N_DATE_... | Public methods |
public void incomingPanDisconnection(BluetoothAdapter adapter,BluetoothDevice device){
disconnectFromRemoteOrVerifyConnectNap(adapter,device,false);
}
| Checks that a remote PANU disconnects from the local NAP correctly and that the correct actions were broadcast. |
private static void writeHeader(File file,OutputStream out) throws IOException {
String header="*** " + file.toString() + "\n";
out.write(header.getBytes());
}
| Writes a header for the given file. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.