code
stringlengths
10
174k
nl
stringlengths
3
129k
private void addBlockBasedOnMinMaxValue(FilterExecuter filterExecuter,List<DataRefNode> listOfDataBlocksToScan,DataRefNode dataRefNode,SegmentProperties segmentProperties){ BitSet bitSet=filterExecuter.isScanRequired(dataRefNode.getColumnsMaxValue(),dataRefNode.getColumnsMinValue()); if (!bitSet.isEmpty()) { li...
Selects the blocks based on col max and min value.
public static DateBuilder newDateInLocale(Locale lc){ return new DateBuilder(lc); }
Create a DateBuilder, with initial settings for the current date and time in the given locale.
public final void pushPair(Node v1,Node v2){ if (null == m_map) { m_map=new Node[m_blocksize]; m_mapSize=m_blocksize; } else { if ((m_firstFree + 2) >= m_mapSize) { m_mapSize+=m_blocksize; Node newMap[]=new Node[m_mapSize]; System.arraycopy(m_map,0,newMap,0,m_firstFree); m_map=n...
Push a pair of nodes into the stack. Special purpose method for TransformerImpl, pushElemTemplateElement. Performance critical.
@SuppressWarnings("rawtypes") public static Map<String,String> parseKeyAndValueToMap(JSONObject sourceObj){ if (sourceObj == null) { return null; } Map<String,String> keyAndValueMap=new HashMap<String,String>(); for (Iterator iter=sourceObj.keys(); iter.hasNext(); ) { String key=(String)iter.next(); ...
parse key-value pairs to map. ignore empty key, if getValue exception, put empty value
public boolean dynInit() throws Exception { log.config(""); super.dynInit(); window.setTitle(getTitle()); sameWarehouseCb.setSelected(true); sameWarehouseCb.addActionListener(this); MLocatorLookup locator=new MLocatorLookup(Env.getCtx(),p_WindowNo); locatorField=new WLocatorEditor("M_Locator_ID",true,fals...
Dynamic Init
public static void putLong(byte[] arr,long off,long val){ if (UNALIGNED) UNSAFE.putLong(arr,off,val); else putLongByByte(arr,off,val,BIG_ENDIAN); }
Stores long value into byte array. Alignment aware.
public void deleteInvalidFlows(IOFSwitch sw,Map<OFPort,List<Match>> invalidOutportAndMatch){ log.debug("Deleting invalid flows on switch : " + sw.getId()); Map<OFPort,List<Match>> invalidNeighborIngressAndMatches=new HashMap<OFPort,List<Match>>(); for ( OFPort outPort : invalidOutportAndMatch.keySet()) { Lis...
Deletes flows with similar matches and output action ports on the specified switch
public SerializerRegistry registerDefault(Class<?> baseType,Class<? extends TypeSerializer> serializer){ return registerDefault(baseType,new DefaultTypeSerializerFactory(serializer)); }
Registers the given class as a default serializer for the given base type.
public Bundler putString(String key,String value){ bundle.putString(key,value); return this; }
Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
public synchronized void start() throws RemoteException { if (!isRunning()) { if (ssf != null) { registry=LocateRegistry.createRegistry(port,null,ssf); } else { registry=LocateRegistry.createRegistry(port); } isRunning=true; } }
Starts this MBean: rmiregistry can now accept incoming calls
@NoInline @Interruptible public static ITableArray newITableArray(int size){ if (!VM.runningVM) { return ITableArray.allocate(size); } return (ITableArray)newRuntimeTable(size,RVMType.ITableArrayType); }
Allocate a new ITableArray
public void show(Animation anim){ show(true,anim); }
Make the badge visible in the UI.
public static void writeFileWithArray(ArrayList<String[]> array,String fileName,int param){ try { FileWriter fw=new FileWriter(fileName); BufferedWriter bw=new BufferedWriter(fw); try (PrintWriter outputFile=new PrintWriter(bw)){ if (param == 1) { for (int i=0; i < array.size(); i++) { ...
Write a file
public static Organization updateCustomer(Organization organization,VOOrganization voOrganization) throws ValidationException, ConcurrentModificationException { validate(voOrganization); verifyVersionAndKey(organization,voOrganization); copyAttributes(organization,voOrganization); return organization; }
Updates the fields in the Customer Organization object to reflect the changes performed in the value object.
public boolean isShortName(){ return isShortName; }
Whether the alternate name is a short name
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
public boolean isXLevelTechnicallyValid(final String signatureId){ SignatureWrapper signatureWrapper=getSignatureByIdNullSafe(signatureId); return signatureWrapper.isXLevelTechnicallyValid(); }
Indicates if the -X level is technically valid. It means that the signature and the digest are valid.
public boolean contains(Point2D p){ if (!super.contains(p)) { return false; } List list=getTextRuns(); for (int i=0; i < list.size(); i++) { StrokingTextPainter.TextRun run=(StrokingTextPainter.TextRun)list.get(i); TextSpanLayout layout=run.getLayout(); float x=(float)p.getX(); float y=(floa...
Returns true if the specified Point2D is inside the boundary of this node, false otherwise.
public void sortInstances(){ if (m_CurrentCol == -1) { return; } ((DataSortedTableModel)m_TableData.getModel()).sortInstances(m_CurrentCol); }
sorts the instances via the currently selected column
public static String replaceEscapedRightAngle(String s){ StringBuilder buf=new StringBuilder(); int i=0; while (i < s.length()) { char c=s.charAt(i); if (c == '<' && s.substring(i).startsWith("<\\\\>")) { buf.append("<\\\\>"); i+="<\\\\>".length(); continue; } if (c == '>' && s.s...
Replace &gt;\&gt; with &gt;&gt; in s. Replace \&gt;&gt; unless prefix of \&gt;&gt;&gt; with &gt;&gt;. Do NOT replace if it's &lt;\\&gt;
private NullValue(){ }
Create a new null Value.
private TaskList rpVPlexDataMigration(List<Volume> volumes,VirtualPool newVpool,String taskId,List<RPVPlexMigration> validMigrations,VirtualPoolChangeParam vpoolChangeParam) throws InternalException { TaskList taskList=new TaskList(); if (validMigrations == null || validMigrations.isEmpty()) { _log.warn(String....
Create the RP+VPLEX/MetroPoint Data Migration volume descriptors to be passed to the block orchestration change vpool workflow.
public HessianOutput createHessianOutput(OutputStream os){ return new HessianOutput(os); }
Creates a new Hessian 1.0 serializer.
public static void main(String[] args){ if (args.length > 0) { System.out.printf("Lombok %s\n",getFullVersion()); } else { System.out.println(VERSION); } }
Prints the version followed by a newline, and exits.
public SimpleReceipt(String ticketline,DataLogicSales dlSales,DataLogicCustomers dlCustomers,TaxesLogic taxeslogic){ initComponents(); ticketlines=new JTicketLines(ticketline); this.dlCustomers=dlCustomers; this.dlSales=dlSales; this.taxeslogic=taxeslogic; jPanel2.add(ticketlines,BorderLayout.CENTER); }
Creates new form SimpleReceipt
public static boolean parseHashIndex(PsiBuilder b,int l){ if (consumeToken(b,LEFT_BRACE)) { boolean r=convertBracedString(b,l); if (!r) { r=PerlParserImpl.expr(b,l,-1); } if (!r && b.getTokenType() == RIGHT_BRACE) { r=true; b.mark().error("Empty hash index"); } return r && co...
Parsing hash index, counting braces, smart error on empty expr
public void createFieldEditors(){ addField(new BooleanFieldEditor(PreferenceConstants.P_ENABLE_ECLIPSE_LISTENER,"&Enable Eclipse Listener to prevent Jetty leaks when Eclipse crash (Take effect after Eclipse restarted).",getFieldEditorParent())); addField(new BooleanFieldEditor(PreferenceConstants.P_DEFAULT_ENABLE_S...
Creates the field editors. Field editors are abstractions of the common GUI blocks needed to manipulate various types of preferences. Each field editor knows how to save and restore itself.
public ObjectFactory(){ }
Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: generated
public ReindexServiceImpl(final TaskExecutor executor,final RemoteBackdoorService remoteBackdoorService,final NodeService nodeService){ super(executor); this.remoteBackdoorService=remoteBackdoorService; this.nodeService=nodeService; }
Construct reindexer.
public String toString(){ return "[" + getClass().getSimpleName() + ": item="+ getItem()+ "; order="+ getOrder()+ "]"; }
Gets a human readable description of the sort clause. <p> The returned string is not suitable for passing to Solr, but may be useful in debug output and the like.
private void attemptAuthentication(boolean getPasswdFromSharedState) throws LoginException { if (krb5PrincName != null) { try { principal=new PrincipalName(krb5PrincName.toString(),PrincipalName.KRB_NT_PRINCIPAL); } catch ( KrbException e) { LoginException le=new LoginException(e.getMessage())...
process the configuration options Get the TGT either out of cache or from the KDC using the password entered Check the permission before getting the TGT
public static <T>T checkNotNull(T reference,Object errorMessage){ if (reference == null) { throw new NullPointerException(String.valueOf(errorMessage)); } return reference; }
Ensures that an object reference passed as a parameter to the calling method is not null.
public void addAuditory(int id){ mAuditoryFeedback.add(id); }
Adds auditory feedback to this utterance.
protected final List<MailetMatcherDescriptor> buildDescriptors(MavenProject project){ final DefaultDescriptorsExtractor extractor=new DefaultDescriptorsExtractor(); if (project.isExecutionRoot()) { logProject(project); for ( MavenProject subproject : reactorProjects) { logSubproject(subproject); ...
Build descriptors for mailets contained within subprojects.
@HLEUnimplemented @HLEFunction(nid=0x0809C831,version=150) public int sceHttpEnableRedirect(int templateId){ return 0; }
Enable redirect
public static TaskExecution createSampleTaskExecution(long executionId){ Date startTime=new Date(); String taskName=UUID.randomUUID().toString(); String externalExecutionId=UUID.randomUUID().toString(); List<String> args=new ArrayList<>(ARG_SIZE); for (int i=0; i < ARG_SIZE; i++) { args.add(UUID.randomUUI...
Creates a fully populated TaskExecution for testing.
public MicroBurlapOutput(){ }
Creates an uninitialized Burlap output stream.
@Override public void execute(ExecutionContext ec) throws DMLRuntimeException { _runID=_idSeq.getNextID(); changeTmpInput(_runID,ec); changeTmpOutput(_runID); ArrayList<DataIdentifier> inputParams=null; try { inputParams=getInputParams(); for ( DataIdentifier di : inputParams) { Data d=ec.get...
Method to be invoked to execute instructions for the external function invocation
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
public Paragraph clearParagraphOutput(String paragraphId){ synchronized (paragraphs) { for ( Paragraph p : paragraphs) { if (p.getId().equals(paragraphId)) { p.setReturn(null,null); return p; } } } return null; }
Clear paragraph output by id.
public void inline(Context context) throws CFGBuilderException { CFG result=context.getResult(); context.checkForRecursion(); Subroutine subroutine=context.getSubroutine(); CFG subCFG=subroutine.getCFG(); while (context.hasMoreWork()) { BasicBlock subBlock=context.nextItem(); BasicBlock resultBlock=co...
Inline a subroutine into a calling context.
private void basicVerifyStats(boolean recovValues){ String oldValue=System.getProperty(DiskStoreImpl.RECOVER_VALUE_PROPERTY_NAME); System.setProperty(DiskStoreImpl.RECOVER_VALUE_PROPERTY_NAME,"" + recovValues); try { diskProps.setDiskDirs(dirs); diskProps.setPersistBackup(true); diskProps.setRegionNam...
Make sure recovery correctly sets stats. Currently this test only checks inVM vs onDisk. It could be enhanced to also check bucketStats. See bug 41849 for the bug that motivated this unit test.
public static DBID importInteger(int id){ return DBIDFactory.FACTORY.importInteger(id); }
Import and integer as DBID. Note: this may not be possible for some factories!
public Builder requestTimeoutMs(long requestTimeoutMs){ this._requestTimeoutMs=requestTimeoutMs; return this; }
Set request timeout in milliseconds.
public static boolean isConnected(Context context){ ConnectivityManager connectivityManager=(ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo=connectivityManager.getActiveNetworkInfo(); return networkInfo != null && networkInfo.isConnected(); }
Determines if the device has an active network connection
public PrintException(){ super(); }
Construct a print exception with no detail message.
private void addErrorMessage(String errorKey,boolean showContinueButton){ addMessage(null,FacesMessage.SEVERITY_ERROR,errorKey); showError=true; showButton=showContinueButton; }
Adds a error message to the page and sets showError=true
private static byte[] streamToBytes(InputStream in,int length) throws IOException { byte[] bytes=new byte[length]; int count; int pos=0; while (pos < length && ((count=in.read(bytes,pos,length - pos)) != -1)) { pos+=count; } if (pos != length) { throw new IOException("Expected " + length + " bytes, ...
Reads the contents of an InputStream into a byte[].
public static void checkArgument(boolean expression,@Nullable 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 boolean isArray(){ return getRawClass().isArray(); }
Returns true for an array class.
protected static void deleteNodes(final CConnection connection,final int viewId) throws SQLException { final String query="DELETE FROM " + CTableNames.NODES_TABLE + " WHERE view_id = "+ viewId; connection.executeUpdate(query,true); }
Deletes the nodes of a view from the databases.
private void registerDebugEvents() throws FloodlightModuleException { if (debugEventService == null) { debugEventService=new MockDebugEventService(); } evSwitch=debugEventService.buildEvent(SwitchEvent.class).setModuleName(this.counters.getPrefix()).setEventName("switch-event").setEventDescription("Switch con...
Registers an event handler with the debug event service for switch events.
public void testDoubleValuePosMaxValue(){ byte[] a={0,-1,-1,-1,-1,-1,-1,-8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,...
Convert a positive number to a double value. The exponent is 1023 and the mantissa is all 1s. The rounding bit is 0. The result is Double.MAX_VALUE.
@Override public double conf(double totalWeight,double delta){ double inverseNormal=inverseNormal(1 - delta / 2); return 3.0d / (2.0d * Math.sqrt(totalWeight)) * inverseNormal + (totalWeight + Math.sqrt(totalWeight)) / (4.0d * totalWeight * Math.sqrt(totalWeight)) * Math.pow(inverseNormal,2.0d) + Math.pow(inverseNo...
Calculate confidence intervall without a specific rule.
public ApprovalDialog(Dialog owner){ super(owner); }
Creates a modeless dialog without a title with the specified Dialog as its owner.
public GeometricObject(){ dateCreated=new java.util.Date(); }
Construct a default geometric object
private void report(String name,int burnin){ double treeLength=0.0; int count=0; try { FileReader fileReader=new FileReader(new File(name)); TreeImporter importer=new NexusImporter(fileReader); while (importer.hasTree()) { Tree tree=importer.importNextTree(); if (count >= burnin) { ...
Recursively analyzes trees files.
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); if (factors == null) { throw new NullPointerException(); } if (parents == null) { throw new IllegalStateException(); } }
Adds semantic checks to the default deserialization method. This method must have the standard signature for a readObject method, and the body of the method must begin with "s.defaultReadObject();". Other than that, any semantic checks can be specified and do not need to stay the same from version to version. A readObj...
@Override public double evaluate(Recommendation<U,I> recommendation){ NDCGRelevanceModel<U,I>.UserNDCGRelevanceModel userRelModel=(NDCGRelevanceModel<U,I>.UserNDCGRelevanceModel)relModel.getModel(recommendation.getUser()); double ndcg=0.0; int rank=0; for ( Tuple2od<I> pair : recommendation.getItems()) { n...
Returns a score for the recommendation list.
public static String thisthese(final int quantity){ if (quantity == 1) { return "this"; } else { return "these"; } }
"this" or "these", depending on the quantity.
public static void testVNX2NetAllocAssign(Map<URI,List<Initiator>> net2InitiatorsMapA,Map<URI,List<Initiator>> net2InitiatorsMapB,Map<URI,List<Initiator>> net2InitiatorsMapC,Map<URI,List<Initiator>> net2InitiatorsMapD,int maxPaths,int minPaths,int pathsPerInitiator,int initiatorsPerPort) throws Exception { Map<URI,Ma...
Test allocation in a VNX two network environment.
public void removeDebugger(final IDebugger debugger){ debuggers.remove(debugger); for ( final DebuggerProviderListener listener : m_listeners) { try { listener.debuggerRemoved(this,debugger); } catch ( final Exception exception) { CUtilityFunctions.logException(exception); } } }
Removes a debugger from the provider.
public void storeLocal(final int local){ storeInsn(getLocalType(local),local); }
Generates the instruction to store the top stack value in the given local variable.
public void flushQuietly(){ try { flush(); } catch ( IOException e) { } }
flushes the writer without throwing any exceptions.
public PoBox(String value){ this(); setValue(value); }
Constructs a new instance with the given value.
public static void updateType(final Connection connection,final BaseType baseType,final String name,final int size,final boolean isSigned,final INaviModule module) throws CouldntSaveDataException { try { final PreparedStatement statement=connection.prepareStatement("UPDATE " + CTableNames.BASE_TYPES_TABLE + " SET...
Updates the record of the given base type in the database.
public void paintText(SynthContext ss,Graphics g,String text,Icon icon,int hAlign,int vAlign,int hTextPosition,int vTextPosition,int iconTextGap,int mnemonicIndex,int textOffset){ if ((icon == null) && (text == null)) { return; } Graphics2D g2d=(Graphics2D)g.create(); g2d.setRenderingHint(RenderingHints.KEY...
Paints an icon and text. This will render the text as html, if necessary, and offset the location by the insets of the component.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:57.973 -0400",hash_original_method="F892F249392A40C312747AD59BC47A28",hash_generated_method="6E34DDC4D732A9732C387B06C7143C16") public FileAlterationObserver(String directoryName,FileFilter fileFilter){ this(new File(directoryName...
Construct an observer for the specified directory and file filter.
private static boolean hasSpecializedHandlerIntents(Context context,Intent intent){ try { PackageManager pm=context.getPackageManager(); List<ResolveInfo> handlers=pm.queryIntentActivities(intent,PackageManager.GET_RESOLVED_FILTER); if (handlers == null || handlers.size() == 0) { return false; }...
Used to check whether there is a specialized handler for a given intent.
public Cone(Position centerPosition,double northSouthRadius,double verticalRadius,double eastWestRadius,Angle heading,Angle tilt,Angle roll){ if (centerPosition == null) { String message=Logging.getMessage("nullValue.PositionIsNull"); Logging.logger().severe(message); throw new IllegalArgumentException(me...
Constructs a cone from a specified center position, axes lengths and rotation angles. All angles are specified in degrees and positive angles are counter-clockwise.
public void testConfigFileFile() throws Exception { Properties properties=loadProperties("test-configFile-file"); assertEquals("12345",properties.getProperty("cargo.servlet.port")); }
Test the Configuration Files option with copying of file.
private void updateUploadPrefs(){ SharedPreferences.Editor editor=mSharedPreferences.edit(); int day=getCurrentDay(); int prevCount=mSharedPreferences.getInt(PREF_UPLOAD_COUNT,0); if (mSharedPreferences.getInt(PREF_LAST_UPLOAD_DAY,0) != day) { prevCount=0; } editor.putInt(PREF_LAST_UPLOAD_DAY,day).putIn...
Updates preferences used for determining crash upload constraints.
public QuotaLineItemEntity add(QuotaLineItemEntity val){ return operate(OpCode.ADD,val); }
Returns a QuotaLineItemEntity whose value is this + val. The unit in the result are the same as the unit in "this". That is to say if "this" is in KB and "val" is in MB, the result is in KB. <p> The unit for B and COUNT represent the normalized value. This means that 1 KB is the same as 1024 B or COUNT. </p> <p> Note: ...
public Builder strict(final boolean strict){ this.strict=strict; return this; }
When set to true, exceptions will be thrown if a property value cannot be coerced to the expected data type. If set to false, then the reader will continue with the import but ignore the failed property key. By default this value is "true".
public void clear(){ count=0; }
Remove all entries from the list.
public boolean isProcessing(){ Object oo=get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get Process Now.
public static void main(String[] args){ JFrame frame=new JFrame(GridBagLayoutDemo.class.getAnnotation(DemoProperties.class).value()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(new GridBagLayoutDemo()); frame.setPreferredSize(new Dimension(800,600)); frame.pack(); frame...
main method allows us to run as a standalone demo.
public double[] instanceToSchema(Instance inst,MiningSchema miningSchema) throws Exception { Instances miningSchemaI=miningSchema.getMiningSchemaAsInstances(); double[] result=new double[miningSchema.getFieldsAsInstances().numAttributes()]; for (int i=0; i < miningSchemaI.numAttributes(); i++) { result[i]=ins...
Convert an <code>Instance</code> to an array of values that matches the format of the mining schema. First maps raw attribute values and then applies rules for missing values, outliers etc.
public NbtInputLimitedStream(InputStream in,NbtLimiter limiter){ super(in); this.limiter=limiter; }
Construct new limited stream using given input stream and limiter.
public Parameter createParameter(){ ParameterImpl parameter=new ParameterImpl(); return parameter; }
<!-- begin-user-doc --> <!-- end-user-doc -->
@Override public int compare(CLIQUESubspace<?> s1,CLIQUESubspace<?> s2){ return -(s1.getCoverage() - s2.getCoverage()); }
Compares the two specified CLIQUESubspaces for order. Returns a negative integer, zero, or a positive integer if the coverage of the first subspace is greater than, equal to, or less than the coverage of the second subspace. I.e. the subspaces are reverse ordered by the values of their coverage. Note: this comparator p...
@Override public void onChangedAdded(final RPObject object,final RPObject changes){ super.onChangedAdded(object,changes); if (changes.has("action")) { action=changes.get("action"); } if (changes.has("text")) { text=changes.get("text"); } }
The object added/changed attribute(s).
public boolean isCreatePOCommitment(){ String s=getCommitmentType(); if (s == null) return false; return COMMITMENTTYPE_POCommitmentOnly.equals(s) || COMMITMENTTYPE_POCommitmentReservation.equals(s) || COMMITMENTTYPE_POSOCommitmentReservation.equals(s)|| COMMITMENTTYPE_POSOCommitment.equals(s); }
Create PO Commitment Accounting
static void parseAttributeValue(Element element,ElementMetadata<?,?> metadata,AttributeKey<?> attKey,AttributeMetadata<?> attMeta,Object value) throws ParseException { if (attMeta == null) { element.setAttributeValue(attKey,value); } else { attMeta.parseValue(element,metadata,value); } }
Parses the value for an attribute.
public byte[] generateSignature(byte[] message){ byte[] otsSig=new byte[mdLength]; byte[] authPathBytes; byte[] indexBytes; otsSig=ots.getSignature(message); authPathBytes=gmssUtil.concatenateArray(currentAuthPaths[numLayer - 1]); indexBytes=gmssUtil.intToBytesLittleEndian(index[numLayer - 1]); byte[] gms...
Signs a message.
public void addResultSet(MariaSelectResultSet result,boolean moreResultAvailable){ this.result=result; this.insertId=Statement.SUCCESS_NO_INFO; this.affectedRows=-1; this.setMoreResultAvailable(moreResultAvailable); }
Add a resultSet information.
protected void reportFatalError(String msg,long lineNo,long columnNo) throws RDFParseException { RDFParserHelper.reportFatalError(msg,lineNo,columnNo,getParseErrorListener()); }
Reports a fatal error with associated line- and column number to the registered ParseErrorListener, if any, and throws a <tt>ParseException</tt> afterwards.
private void nextWindow(Calendar startTime){ if (isDaily()) { startTime.add(Calendar.DAY_OF_MONTH,1); } else if (isWeekly()) { startTime.add(Calendar.WEEK_OF_MONTH,1); } else if (isMonthly()) { int month=startTime.get(Calendar.MONTH); adjustDayOfMonth(startTime,month + 1); } }
Changes to the next window start time.
public static void write(float lt,float ln,int offset_x1,int offset_y1,int w,int h,byte[] bytes,Color[] colorTable,int trans,LinkProperties properties,DataOutputStream dos) throws IOException { dos.write(Link.RASTER_HEADER.getBytes()); dos.writeByte(GRAPHICTYPE_RASTER); dos.writeByte(RENDERTYPE_OFFSET); dos.wri...
Lat/lon placement with XY offset with a indexed colormodel, which is using a colortable and a byte array to construct the int[] pixels.
@Override public void translate(final ITranslationEnvironment environment,final IInstruction instruction,final List<ReilInstruction> instructions) throws InternalTranslationException { TranslationHelpers.checkTranslationArguments(environment,instruction,instructions,"LDC"); final long baseOffset=ReilHelpers.nextRei...
LDC{<cond>}{L} <coproc>, <CRd>, <addressing_mode> LDC2 {L} <coproc>, <CRd>, <addressing_mode>
public synchronized void processedFiles(int numberOfFiles,long totalSize){ processedFiles=numberOfFiles; processedSize=totalSize; }
Sets processed files stats
public DocumentTemplateContext(TemplateContextType type,Document document,Position position){ super(type); Assert.isNotNull(document); Assert.isNotNull(position); Assert.isTrue(position.getOffset() <= document.getLength()); fDocument=document; fPosition=position; fOriginalOffset=fPosition.getOffset(); f...
Creates a document template context. The supplied <code>Position</code> will be queried to compute the <code>getStart</code> and <code>getEnd</code> methods, which will therefore answer updated position data if it is registered with the document.
public boolean equals(Object obj){ return (obj != null && obj instanceof CompositeName && impl.equals(((CompositeName)obj).impl)); }
Determines whether two composite names are equal. If obj is null or not a composite name, false is returned. Two composite names are equal if each component in one is equal to the corresponding component in the other. This implies both have the same number of components, and each component's equals() test against the c...
public void handle(ConfigEvent event,Context context) throws IOException { Regions region=Regions.fromName(System.getenv(AWS_REGION_PROPERTY)); AmazonConfig configClient=new AmazonConfigClient().withRegion(region); doHandle(event,context,configClient); }
This handler function is executed when AWS Lambda passes the event and context objects.
@SuppressWarnings({"rawtypes","unchecked"}) private JCas convertSourceDocumentToCas(File aFile,Class aReader,SourceDocument aDocument) throws UIMAException, IOException { TypeSystemDescription builtInTypes=TypeSystemDescriptionFactory.createTypeSystemDescription(); List<TypeSystemDescription> projectTypes=getProjec...
Get CAS object for the first time, from the source document using the provided reader
@Override public boolean onDragEvent(DragEvent event){ if (event.getClipDescription() != null && event.getClipDescription().hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN) && event.getClipDescription().getLabel().equals(WorkspaceView.BLOCK_GROUP_CLIP_DATA_LABEL)) { return false; } return super.onDragEvent(ev...
Override onDragEvent to stop blocks from being dropped into text fields. If the dragged information is anything but a block, let the standard EditText drag interface take care of it.
public NoticeReference(String organization,Vector numbers){ this(organization,convertVector(numbers)); }
Creates a new <code>NoticeReference</code> instance.
@Override public <T>Record<T> retrieveRecord(String key,boolean isEncrypted,String encryptKey){ key=safetyKey(key); File file=new File(cacheDirectory,key); try { if (isEncrypted) { file=fileEncryptor.decrypt(encryptKey,file); } Type partialType=jolyglot.newParameterizedType(Record.class,Object.c...
Retrieve the Record previously saved.
public void testDoublesRoundTrip(){ byte[] encoded=new byte[Double.BYTES]; for (int i=0; i < 10000; i++) { double value=Double.longBitsToDouble(TestUtil.nextLong(random(),Long.MIN_VALUE,Long.MAX_VALUE)); NumericUtils.longToSortableBytes(NumericUtils.doubleToSortableLong(value),encoded,0); double actual=...
test round-trip encoding of random doubles
@Transactional public Token generate(final long ttlSec){ final Token token=createToken(ttlSec,null,null); if (LOGGER.isDebugEnabled()) LOGGER.debug("Generated token: " + token); return token; }
Generates a UUID token with given TTL (Time To Live) and saves to database.