code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public XCalElement child(ICalDataType dataType){
String localName=dataType.getName().toLowerCase();
for ( Element child : children()) {
if (localName.equals(child.getLocalName()) && XCAL_NS.equals(child.getNamespaceURI())) {
return new XCalElement(child);
}
}
return null;
}
| Gets the first child element with the given data type. |
@Override public void onGuiClosed(){
Keyboard.enableRepeatEvents(false);
}
| "Called when the screen is unloaded. Used to disable keyboard repeat events." |
protected String doIt() throws Exception {
MWindow window=new MWindow(getCtx(),p_AD_Window_ID,get_TrxName());
MTab[] tabs=window.getTabs(true,get_TrxName());
for ( MTab tab : tabs) {
MTable table=null;
String format=null;
if (tab.isActive()) {
if (p_IsInsertRecord & tab.isInsertRecord()) {
... | Generate Export Format |
protected void sendAck(Node remote,Node local,NodeSecurity localSecurity,List<IncomingBatch> list,ITransportManager transportManager) throws IOException {
Exception error=null;
int sendAck=-1;
int numberOfStatusSendRetries=parameterService.getInt(ParameterConstants.DATA_LOADER_NUM_OF_ACK_RETRIES);
for (int i=0;... | Try a configured number of times to get the ACK through. |
public static CompletableFuture<Transport> bind(){
return bind(TransportConfig.defaultConfig());
}
| Init transport with the default configuration asynchronously. Starts to accept connections on local address. |
public Code39Reader(){
this(false);
}
| Creates a reader that assumes all encoded data is data, and does not treat the final character as a check digit. It will not decoded "extended Code 39" sequences. |
@Override public final String rightSide(int index,Instances data){
return m_c45S.rightSide(index,data);
}
| Prints the condition satisfied by instances in a subset. |
protected void prepareLabel(OMText text){
rrAttributes.setTo(text);
text.setLinePaint(rrAttributes.getLinePaint());
text.setTextMatteColor((Color)rrAttributes.getMattingPaint());
text.setTextMatteStroke(new BasicStroke(4));
}
| Customizes the given OMText before it is rendered. |
public Adapter createEObjectAdapter(){
return null;
}
| Creates a new adapter for the default case. <!-- begin-user-doc --> This default implementation returns null. <!-- end-user-doc --> |
@Override public void before(PropertyInfoRestRep oldProps,PropertyInfoRestRep newProps){
String newValue=newProps.getProperty(Constants.SYSTEM_UPDATE_CHECK_FREQUENCY_HOURS);
if (newValue == null) {
return;
}
int intNewValue=Integer.parseInt(newValue);
if (intNewValue <= 0) {
throw BadRequestException.... | check if new system_update_check_frequency_hours value is greater than 0, if not fail the property update. |
public UIError(){
initComponents();
}
| Creates new form UIError |
public void updateStatus(JobContext jobContext) throws Exception {
if (status == JobStatus.SUCCESS) {
taskCompleter.ready(jobContext.getDbClient());
}
else if (status == JobStatus.FAILED || status == JobStatus.FATAL_ERROR || status == JobStatus.ERROR) {
ServiceError error=DeviceControllerErrors.cinder.jo... | Updates the status of the job. |
public synchronized void delete(Long low,Long high) throws ReplicatorException, InterruptedException {
assertWritable();
diskLog.delete(this,low,high);
}
| Delete a range of events from the log. |
public TSink<JsonObject> send(TStream<JsonObject> stream){
Objects.requireNonNull(stream,"stream");
return sendText(stream,JsonFunctions.asString());
}
| Send a stream's JsonObject tuples as JSON in a WebSocket text message. |
public boolean isTainted(final Collection<String> registers){
Preconditions.checkNotNull(registers,"Error: Registers argument can not be null");
for ( final String register : registers) {
if (m_taintedRegs.contains(register)) {
return true;
}
}
return false;
}
| Function to check if any of the registers in a collection is in the current taint set. |
public boolean isDisconnected(){
return disconnected;
}
| checks whether this client is flagged as disconnected |
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. |
@Override public boolean isReadOnly() throws SQLException {
try {
debugCodeCall("isReadOnly");
return conn.isReadOnly();
}
catch ( Exception e) {
throw logAndConvert(e);
}
}
| Returns the same as Connection.isReadOnly(). |
private String expand(String item,String abbrev){
int seplen=sep.length();
int suffixStart=item.length() - (abbrev.length() + 1);
int slash=item.lastIndexOf(sep,suffixStart - seplen);
return slash >= 0 ? item.substring(slash + seplen) : item;
}
| Returns a longer suffix of original. |
protected void handleReaderImport(Reader in,JTextComponent c) throws BadLocationException, IOException {
char[] buff=new char[1024];
int nch;
boolean lastWasCR=false;
int last;
StringBuffer sbuff=null;
while ((nch=in.read(buff,0,buff.length)) != -1) {
if (sbuff == null) {
sbuff=new StringBuffer(nc... | Import the given stream data into the text component. |
public ImageIcon createImageIcon(String filename,String description){
if (getSwingSet2() != null) {
return getSwingSet2().createImageIcon(filename,description);
}
else {
String path="/resources/images/" + filename;
return new ImageIcon(getClass().getResource(path),description);
}
}
| Creates the image icon. |
public String toString(){
StringBuffer sb=new StringBuffer("VAccount[");
sb.append(m_value).append("]");
return sb.toString();
}
| String Representation |
public UnionIteration(Iteration<? extends E,X>... args){
this(Arrays.asList(args));
}
| Creates a new UnionIteration that returns the bag union of the results of a number of Iterations. |
public static Integer[] transformIntArray(int[] source){
Integer[] destin=new Integer[source.length];
for (int i=0; i < source.length; i++) {
destin[i]=source[i];
}
return destin;
}
| convert int array to Integer array |
public final void testValidateCaseInsensitiveNotAllowingSpacesSucceeds(){
char[] allowedCharacters=new char[]{'-'};
LetterOrNumberValidator characterOrNumberValidator=new LetterOrNumberValidator("foo",Case.CASE_INSENSITIVE,false,allowedCharacters);
assertTrue(characterOrNumberValidator.validate("Ab1-"));
}
| Tests the functionality of the validate-method, using case insensitivity and not allowing spaces, if it succeeds. |
public ArraySpliterator(Object[] array,int additionalCharacteristics){
this(array,0,array.length,additionalCharacteristics);
}
| Creates a spliterator covering all of the given array. |
static String add_escapes(String str){
StringBuilder retval=new StringBuilder();
char ch;
for (int i=0; i < str.length(); i++) {
switch (str.charAt(i)) {
case 0:
continue;
case '\b':
retval.append("\\b");
continue;
case '\t':
retval.append("\\t");
continue;
case '\n':
retval.append("\\n");
continue;
c... | Used to convert raw characters to their escaped version when these raw version cannot be used as part of an ASCII string literal. |
public static void write(byte x){
writeByte(x & 0xff);
}
| Write the 8-bit byte to standard output. |
protected boolean boundary(int index,Word word,Word next1,Word next2){
char punctuation=word.form.charAt(index);
Word prefix=new Word(word.form.substring(0,index));
Word suffix=new Word(word.form.substring(index + 1));
Word root=new Word(prefix.form);
while (root.form.length() > 0 && "\"'`{[(".indexOf(root.fo... | Determines whether the given punctuation represents the end of a sentence based on elements of the paragraph immediately surrounding the punctuation. |
private void sendTouchExplorationGestureStartAndHoverEnterIfNeeded(int policyFlags){
MotionEvent event=mInjectedPointerTracker.getLastInjectedHoverEvent();
if (event != null && event.getActionMasked() == MotionEvent.ACTION_HOVER_EXIT) {
final int pointerIdBits=event.getPointerIdBits();
sendAccessibilityEven... | Sends the enter events if needed. Such events are hover enter and touch explore gesture start. |
public String toString(){
return name;
}
| Prints out the name of the type. |
public int size(){
return n;
}
| Returns the number of key-value pairs in this symbol table. |
public static Typeface robotoRegular(Context context){
sRobotoRegular=getFontFromRes(R.raw.roboto_regular,context);
return sRobotoRegular;
}
| Roboto-Regular font face |
private synchronized void unsetLargeMessageDelivery(){
deliveringLargeMessage=false;
}
| just set deliveringLargeMessage to false |
private void addStepNumToProof(String stepNum,String[] proofText){
LeafProofNode pfNode=(LeafProofNode)this.proof;
if (pfNode.getOmitted()) {
return;
}
if (((pfNode.getFacts() == null) || (pfNode.getFacts().length == 0)) && ((pfNode.getDefs() == null) || (pfNode.getDefs().length == 0))) {
int i=0;
b... | Adds the stepNum as a fact to the BY part of the leaf proof represented by proofText--unless the proof is "OMITTED", in which case it does nothing. |
public static StreamTimestamp of(String streamId,Instant timestamp){
checkNotNull(streamId,"streamId must not be null");
checkNotNull(timestamp,"timestamp must not be null");
return new StreamTimestamp(streamId,timestamp);
}
| The timestamp at the given instant within the given stream. |
private static Point isTrayEvent(AWTEvent e){
if (e instanceof MouseEvent) {
MouseEvent me=(MouseEvent)e;
if (me.getID() == MouseEvent.MOUSE_RELEASED && me.getSource() != null) {
if (me.getSource().getClass().getName().contains("TrayIcon")) {
return me.getLocationOnScreen();
}
}
}
... | Determines if TrayIcon event is detected |
private void validateAddSecurityGroupsToClusterMasterRequest(EmrMasterSecurityGroupAddRequest request) throws IllegalArgumentException {
Assert.hasText(request.getNamespace(),"A namespace must be specified.");
Assert.hasText(request.getEmrClusterDefinitionName(),"An EMR cluster definition name must be specified.");... | Validates the add groups to EMR cluster master create request. This method also trims request parameters. |
private Set<String> filterResourceNames(Set<String> resourceNames,String prefix,String suffix){
Set<String> filteredResourceNames=new TreeSet<String>();
for ( String resourceName : resourceNames) {
String fileName=resourceName.substring(resourceName.lastIndexOf("/") + 1);
if (fileName.startsWith(prefix) &&... | Filters this list of resource names to only include the ones whose filename matches this prefix and this suffix. |
public boolean isShowing(){
return false;
}
| Determine if the object is showing. This is determined by checking the visibility of the object and visibility of the object ancestors. Note: this will return true even if the object is obscured by another (for example, it to object is underneath a menu that was pulled down). |
private void write(char c) throws SAXException {
try {
output.write(c);
}
catch ( IOException e) {
throw new SAXException(e);
}
}
| Write a raw character. |
public NamedThreadFactory(String namePrefix){
this._namePrefix=namePrefix;
_delegate=Executors.defaultThreadFactory();
}
| Constructs the thread factory. |
public static void removeXML(String outputDir,String templatesPath){
(new File(templatesPath + "ASDoc_Config.xml")).delete();
(new File(templatesPath + "overviews.xml")).delete();
(new File(outputDir + "index.tmp")).delete();
(new File(outputDir + "index2.tmp")).delete();
(new File(outputDir + "toplevel.xml")... | method to clean up temporary files after the asdoc generation is complete. It cleans up the dita xml files and out files that were copied from the templates folder. |
static boolean runningOnComputeEngine(HttpTransportFactory transportFactory){
try {
GenericUrl tokenUrl=new GenericUrl(METADATA_SERVER_URL);
HttpRequest request=transportFactory.create().createRequestFactory().buildGetRequest(tokenUrl);
HttpResponse response=request.execute();
HttpHeaders headers=resp... | Return whether code is running on Google Compute Engine. |
public void produceResults(Consumer<T> consumer,ProducerContext context){
consumer.onNewResult((T)null,true);
}
| Start producing results for given context. Provided consumer is notified whenever progress is made (new value is ready or error occurs). |
public static boolean isNominalMappingSubsetOrEqualTo(NominalMapping childMapping,NominalMapping superMapping){
if (childMapping.size() > superMapping.size()) {
return false;
}
List<String> superList=superMapping.getValues();
for ( String value : childMapping.getValues()) {
if (!superList.contains(valu... | Check if the childMapping is a subset of the superMapping or equal to it. |
@Override public void init(final Coordinate p1,final Coordinate p2){
init(p1.x,p2.x,p1.y,p2.y,p1.z,p2.z);
}
| Initialize an <code>Envelope</code> to a region defined by two Coordinates. |
public void keepOnly(final Collection<String> propertiesToKeep){
Iterator<Map.Entry<String,Object>> it=entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String,Object> entry=it.next();
if (!propertiesToKeep.contains(entry.getKey())) {
it.remove();
}
}
}
| Removes all properties with names that are not in the provided set. |
public void close() throws IOException {
}
| Closes the stream. |
protected void fireStartElem(String elemName) throws org.xml.sax.SAXException {
if (m_tracer != null) {
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_STARTELEMENT,elemName,m_attributes);
}
}
| Report the start element trace event. This trace method needs to be called just before the attributes are cleared. |
public Builder threadFormatter(ThreadFormatter threadFormatter){
this.threadFormatter=threadFormatter;
return this;
}
| Set the thread formatter used when logging. |
<T extends JCTree>List<Type> classEnter(List<T> trees,Env<AttrContext> env){
ListBuffer<Type> ts=new ListBuffer<Type>();
for (List<T> l=trees; l.nonEmpty(); l=l.tail) {
Type t=classEnter(l.head,env);
if (t != null) ts.append(t);
}
return ts.toList();
}
| Visitor method: enter classes of a list of trees, returning a list of types. |
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. |
private void loadAdminUserId(String entidad) throws Exception {
LdapUsersTable table=new LdapUsersTable();
String qual;
if (_logger.isDebugEnabled()) _logger.debug("loadAdminUserId");
DbConnection dbConn=new DbConnection();
try {
dbConn.open(DBSessionManager.getSession());
qual=table.getLoadOwnerIdQ... | Obtiene el identificador del administrador del archivador. |
public OWLCompiler() throws ObjectStoreConfigException {
this(findClassLoader());
}
| Constructs a new compiler instance using the existing Java classes referenced in the classpath. |
public synchronized void end(){
this.active=false;
this.selectedObject=null;
}
| Ends the select object action. |
@Override public void close() throws IOException {
this.writer.close();
}
| This method will close the connection to the output. |
public static void sortDesc(long[] a,int[] b,long[] tmpa,int[] tmpb){
hybridsortDesc(a,b,tmpa,tmpb,0,a.length - 1);
}
| Sorts the keys in an decreasing order. Elements key[i] and values[i] are always swapped together in the corresponding arrays. <p> A mixture of several sorting algorithms is used: <p> A radix sort performs better on the numeric data we sort, but requires additional storage to perform the sorting. Therefore only the not-... |
public static long computeCrc32(byte[] bytes) throws IOException {
ByteArrayInputStream bais=new ByteArrayInputStream(bytes);
try {
CheckedInputStream cis=new CheckedInputStream(bais,new CRC32());
byte[] buf=new byte[128];
while (cis.read(buf) >= 0) {
}
return cis.getChecksum().getValue();
}
... | Static routine to compute CRC 32. |
public Map.Entry<byte[],Map<String,byte[]>> selectOne(final String columnName,final Pattern columnMatcher){
final Iterator<Map.Entry<byte[],Map<String,byte[]>>> i=iterator();
Map.Entry<byte[],Map<String,byte[]>> row;
Map<String,byte[]> prop;
byte[] val;
while (i.hasNext()) {
row=i.next();
prop=row.get... | select one row from a table where a given matcher matches with elements in a given row this method stops the full-table scan as soon as a first matcher was found |
private String formatDefaultValue(Object value){
if (value instanceof Boolean) {
return ((Boolean)value) ? "true" : "false";
}
if (value instanceof Number) {
return value.toString();
}
if (value instanceof Collection) {
return formatCollectionValue((Collection)value);
}
String string=value.toS... | Format a default value for libsass function signature. |
private int compareClassesAllowingNull(ClassAnnotation lhs,ClassAnnotation rhs){
if (lhs == null || rhs == null) {
return compareNullElements(lhs,rhs);
}
String lhsClassName=classNameRewriter.rewriteClassName(lhs.getClassName());
String rhsClassName=classNameRewriter.rewriteClassName(rhs.getClassName());
... | Compare class annotations. |
protected void prepare(){
ProcessInfoParameter[] para=getParameter();
for (int i=0; i < para.length; i++) {
String name=para[i].getParameterName();
if (para[i].getParameter() == null) ;
else if (name.equals("PaymentRule")) p_PaymentRule=(String)para[i].getParameter();
else log.log(Level.SE... | Prepare - e.g., get Parameters. |
public boolean equals(Object object){
boolean isEqual=false;
if (object instanceof DefineFont3 && super.equals(object)) {
DefineFont3 defineFont=(DefineFont3)object;
isEqual=true;
}
return isEqual;
}
| Tests whether this DefineFont3 tag is equivalent to another DefineFont3 tag instance. |
void put(final MethodWriter owner,final ByteVector out,final int source){
if ((status & RESOLVED) == 0) {
addReference(source,out.length);
out.putShort(-1);
}
else {
out.putShort(position - source);
}
}
| Puts a reference to this label in the bytecode of a method. If the position of the label is known, the offset is computed and written directly. Otherwise, a null offset is written and a new forward reference is declared for this label. |
public NaviNode(final Node node,final IZyNodeRealizer realizer,final INaviViewNode rawNode){
super(node,realizer,rawNode);
m_realizer=realizer;
}
| Creates a new node object. |
public static double lerp(double a,double b,double f){
return a + f * (b - a);
}
| Linear interpolates isBetween point a and point b |
public void assertEqual(double expected,double actual,double maxRelativeError){
TestUtils.assertEqual(expected,actual,maxRelativeError);
}
| This method just invokes the test utils method, it is here for convenience |
public void buildClassifier(Instances D) throws Exception {
int L=D.classIndex();
int featlength=(D.numAttributes() - L) * 2;
int numSamples=D.numInstances();
int classlength=L * 2;
if (this.order == null) {
order=new ArrayList<Integer>();
for (int j=0; j < D.numInstances(); j++) {
order.add(j);... | Generates the classifier. |
@Override public final T next(){
if (_nextIndex == _size) {
throw new NoSuchElementException();
}
_lastReturned=_next;
_next=(T)_next.getNext();
_nextIndex++;
return _lastReturned;
}
| Returns the value at the Iterator's index and advances the iterator. |
public IntList mutableCopy(){
int sz=size;
IntList result=new IntList(sz);
for (int i=0; i < sz; i++) {
result.add(values[i]);
}
return result;
}
| Makes and returns a mutable copy of the list. |
public void flip(int x,int y){
int offset=y * rowSize + (x / 32);
bits[offset]^=1 << (x & 0x1f);
}
| <p>Flips the given bit.</p> |
private boolean isMinimized(final HttpServletRequest request){
return context.getConfig().isMinimizeEnabled() ? groupExtractor.isMinimized(request) : false;
}
| Uses isMinimizeEnabled configuration to compute minimize value. |
public void stopImsServices(TerminationReason reasonCode) throws PayloadException, NetworkException, ContactManagerException {
terminateAllSessions(reasonCode);
for ( ImsService imsService : mServices.values()) {
try {
if (imsService.isActivated()) {
if (sLogger.isActivated()) {
sLogger... | Stop IMS services |
private String parseQuoted(String tx){
StringBuilder buf=new StringBuilder();
int size=tx.length();
int i=0;
while (i < size) {
char ch=tx.charAt(i);
if (ch == '&') {
if (i + 5 < size && tx.charAt(i + 1) == 'a' && tx.charAt(i + 2) == 'p' && tx.charAt(i + 3) == 'o' && tx.charAt(i + 4) == 's' && tx.... | QuotedChar ::= ''' | '"' | '\\' | '\"' | "\'" | '\>' | '\$' | '\#' | Char |
public AuthorityInfoAccessExtension(List<AccessDescription> accessDescriptions) throws IOException {
this.extensionId=PKIXExtensions.AuthInfoAccess_Id;
this.critical=false;
this.accessDescriptions=accessDescriptions;
encodeThis();
}
| Create an AuthorityInfoAccessExtension from a List of AccessDescription; the criticality is set to false. |
private boolean isTestMethod(Method m){
String name=m.getName();
Class[] parameters=m.getParameterTypes();
Class returnType=m.getReturnType();
return parameters.length == 0 && name.startsWith("test") && returnType.equals(Void.TYPE);
}
| Check if method is test method. Test method is a method name of which starts with "test", it has no parameters and does not return any results. |
public void doPaste(){
jTextArea1.paste();
}
| doPaste() - |
private void dumpDefinition(Definition def){
String visibility="public";
if ((def.getFlags() & Definition.PRIVATE) > 0) {
visibility="protected";
}
else if ((def.getFlags() & Definition.HIDDEN) > 0) {
visibility="private";
}
DefinitionClass defClass=def.getDefinitionClass();
boolean staticFlag=(d... | dumps the definition |
@Override public void handleClick(int x,int y,PlotRenderingInfo info){
Rectangle2D dataArea=info.getDataArea();
if (dataArea.contains(x,y)) {
ValueAxis xaxis=getDomainAxis();
if (xaxis != null) {
double hvalue=xaxis.java2DToValue(x,info.getDataArea(),getDomainAxisEdge());
setDomainCrosshairValue... | Handles a 'click' on the plot by updating the anchor values. |
public void pausePresenters(){
for ( RosiePresenter presenter : presenters) {
presenter.pause();
presenter.resetView();
}
}
| Pauses all the already registered presenters lifecycle. |
public static JSONObject JsonPost(String url,String bssid,JSONObject postJSON,HeaderPair... headers){
return JsonPost(url,bssid,SERIAL_NORMAL_TASK,postJSON,headers);
}
| Just post Json to target url, no Http headers |
private void updateProgress(int progress){
if (myHost != null && progress != previousProgress) {
myHost.updateProgress(progress);
}
previousProgress=progress;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
@Override public void eSet(int featureID,Object newValue){
switch (featureID) {
case N4JSPackage.INDEXED_ACCESS_EXPRESSION__TARGET:
setTarget((Expression)newValue);
return;
case N4JSPackage.INDEXED_ACCESS_EXPRESSION__INDEX:
setIndex((Expression)newValue);
return;
}
super.eSet(featureID,newValue);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
protected final void GPR2FPR_64(Instruction s){
int offset=-burs.ir.stackManager.allocateSpaceForConversion();
StackLocationOperand sl=new StackLocationOperand(true,offset,QW);
StackLocationOperand sl1=new StackLocationOperand(true,offset + 4,DW);
StackLocationOperand sl2=new StackLocationOperand(true,offset,DW... | Emits code to move 64 bits from GPRs to FPRs. |
public static StringBuffer appendNumber(StringBuffer result,int n,int radix,int minDigits) throws IllegalArgumentException {
if (radix < 2 || radix > 36) {
throw new IllegalArgumentException("Illegal radix " + radix);
}
int abs=n;
if (n < 0) {
abs=-n;
result.append("-");
}
recursiveAppendNumber(... | Append a number to the given StringBuffer in the given radix. Standard digits '0'-'9' are used and letters 'A'-'Z' for radices 11 through 36. |
public void snapshot(int address,RegisterSpecSet specs){
if (DEBUG) {
System.err.printf("%04x snapshot %s\n",address,specs);
}
int sz=specs.getMaxSize();
aboutToProcess(address,sz - 1);
for (int i=0; i < sz; i++) {
RegisterSpec oldSpec=regs.get(i);
RegisterSpec newSpec=filterSpec(specs.get(i));
... | Sets the local state at the given address to the given snapshot. The first call on this instance must be to this method, so that the register state can be properly sized. |
protected ValueSource parseValueSource(boolean doConsumeDelimiter) throws SyntaxError {
return parseValueSource(doConsumeDelimiter ? (FLAG_DEFAULT | FLAG_CONSUME_DELIMITER) : (FLAG_DEFAULT & ~FLAG_CONSUME_DELIMITER));
}
| Parse an individual value source. |
protected boolean afterSave(boolean newRecord,boolean success){
if (newRecord && success) {
MUserRoles su=new MUserRoles(getCtx(),SUPERUSER_USER_ID,getAD_Role_ID(),get_TrxName());
su.saveEx();
if (getCreatedBy() != SUPERUSER_USER_ID) {
MUserRoles ur=new MUserRoles(getCtx(),getCreatedBy(),getAD_Role_... | After Save |
static PrecalculatedZone create(String id,boolean outputID,ArrayList<Transition> transitions,DSTZone tailZone){
int size=transitions.size();
if (size == 0) {
throw new IllegalArgumentException();
}
long[] trans=new long[size];
int[] wallOffsets=new int[size];
int[] standardOffsets=new int[size];
Strin... | Factory to create instance from builder. |
public static File parse(String[] options,String option,File defValue) throws Exception {
String value=Utils.getOption(option,options);
if (value.isEmpty()) return defValue;
else return new File(value);
}
| Parses a File option, uses default if option is missing. |
public void testThrowOnNext(){
SubmissionPublisher<Integer> p=basicPublisher();
TestSubscriber s1=new TestSubscriber();
TestSubscriber s2=new TestSubscriber();
p.subscribe(s1);
p.subscribe(s2);
s1.awaitSubscribe();
p.submit(1);
s1.throwOnCall=true;
p.submit(2);
p.close();
s2.awaitComplete();
ass... | Throwing an exception in onNext causes onError |
private static char CallCharMethodA(JNIEnvironment env,int objJREF,int methodID,Address argAddress) throws Exception {
if (traceJNI) VM.sysWrite("JNI called: CallCharMethodA \n");
Object returnObj=JNIGenericHelpers.callMethodJValuePtr(env,objJREF,methodID,argAddress,TypeReference.Char,false);
return Reflection... | CallCharMethodA: invoke a virtual method that returns a char value |
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){
switch (featureID) {
case UmplePackage.ENTRY_OR_EXIT_ACTION___TYPE_1:
return getType_1();
case UmplePackage.ENTRY_OR_EXIT_ACTION___ANONYMOUS_ENTRY_OR_EXIT_ACTION_11:
return getAnonymous_entryOrExitAction_1_1();
case UmplePackage.ENTRY_O... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public void registerFrameInput(String varName,DataFrame df,boolean containsID) throws DMLRuntimeException {
int blksz=ConfigurationManager.getBlocksize();
MatrixCharacteristics mcOut=new MatrixCharacteristics(-1,-1,blksz,blksz);
JavaPairRDD<Long,FrameBlock> rdd=FrameRDDConverterUtils.dataFrameToBinaryBlock(new Ja... | Register DataFrame as input. DataFrame is assumed to be in row format and each cell can be converted into SystemML frame row. Each column could be of type, Double, Float, Long, Integer, String or Boolean. <p> |
private float crossCheckVertical(int startI,int centerJ,int maxCount,int originalStateCountTotal){
BitMatrix image=this.image;
int maxI=image.getHeight();
int[] stateCount=crossCheckStateCount;
stateCount[0]=0;
stateCount[1]=0;
stateCount[2]=0;
int i=startI;
while (i >= 0 && image.get(centerJ,i) && stat... | <p>After a horizontal scan finds a potential alignment pattern, this method "cross-checks" by scanning down vertically through the center of the possible alignment pattern to see if the same proportion is detected.</p> |
protected void doFireDocumentChanged(DocumentEvent event,boolean firePartitionChange,Region partitionChange){
doFireDocumentChanged2(event);
}
| Notifies all listeners about the given document change. Uses a robust iterator. <p/> Executes all registered post notification replace operation. |
public boolean adjustValue(K key,float amount){
int index=index(key);
if (index < 0) {
return false;
}
else {
_values[index]+=amount;
return true;
}
}
| Adjusts the primitive value mapped to key. |
@Nullable public static PsiFile findFile(@Nullable PsiElement element){
return element == null ? null : findFile(element.getReferences());
}
| Returns a PsiFile element referenced to |
@Deprecated public void growthFactor(int growthFactor){
}
| A no-op for backward compatibility. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.