code
stringlengths
10
174k
nl
stringlengths
3
129k
public void paintSeparatorBackground(SynthContext context,Graphics g,int x,int y,int w,int h){ paintBackground(context,g,x,y,w,h,null); }
Paints the background of a separator.
protected void handleReplyMessage(Message msg){ }
called when server reply message to the message requester.
public int length(){ return text.length; }
Gibt die Laenge des CFMLString zurueck.
protected void loadCubicPanoramaImage(PLCubicPanorama panorama,PLCubeFaceOrientation face,JSONObject images,String property,String urlBase,boolean hasPreviewImage,PLTextureColorFormat colorFormat) throws Exception { if (images.has(property)) { String url=this.buildURL(images.getString(property),urlBase); if (...
load methods
public void compileSortCriteria(String sortCriterion){ CompiledValue obj=(CompiledValue)this.stack.pop(); boolean criterion=false; if (sortCriterion.equals("desc")) criterion=true; CompiledSortCriterion csc=new CompiledSortCriterion(criterion,obj); push(csc); }
Yogesh: compiles sort criteria present in order by clause and push into the stack
final boolean indexesDeletedNode(){ return node.value == null; }
Returns true if the node this indexes has been deleted.
public static void initialize(Application application){ applicationContext=application; }
This is an optional initialize method that can be used to set the application context. All the context related methods will then use the application context where available.
public void createPictScenario02() throws Exception { long usageStartTime=DateTimeHandling.calculateMillis("2013-06-03 20:00:00"); BillingIntegrationTestBase.setDateFactoryInstance(usageStartTime); String supplierAdminId="Pict02Supplier"; VOOrganization supplier=orgSetup.createOrganization(basicSetup.getPlatfor...
See testcase #2 in BESBillingFactorCombinations.xlsx
public JMapper<D,S> destinationFactory(DestinationFactory<D> factory){ this.mapper.setDestinationFactory(factory); return this; }
Permits to define a destination factory, this is usefull in case of immutable objects.
private void updateVirtualNetwork(CreateVirtualNetworkWorkflowDocument state,SubnetState subnetState){ VirtualNetworkService.State virtualNetworkPatchState=new VirtualNetworkService.State(); virtualNetworkPatchState.state=subnetState; virtualNetworkPatchState.logicalSwitchId=state.taskServiceEntity.logicalSwitchI...
Updates the VirtualNetwork entity in cloud-store.
private double difference(int index,double val1,double val2){ switch (m_trainInstances.attribute(index).type()) { case Attribute.NOMINAL: if (Utils.isMissingValue(val1) || Utils.isMissingValue(val2)) { return (1.0 - (1.0 / (m_trainInstances.attribute(index).numValues()))); } else if ((int)val1 != (in...
Computes the difference between two given attribute values.
public static void register(){ FilePath.register(INSTANCE); }
Register the file system.
@RequestMapping(value="/account",method=RequestMethod.POST,produces=MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<String> saveAccount(@RequestBody UserDTO userDTO){ return userRepository.findOneByLogin(SecurityUtils.getCurrentUser().getUsername()).map(null).orElseGet(null); }
POST /account -> update the current user information.
public boolean handleTouch(MotionEvent event){ int action=event.getAction(); if (mRenderer != null && action == MotionEvent.ACTION_MOVE) { if (oldX >= 0 || oldY >= 0) { float newX=event.getX(0); float newY=event.getY(0); if (event.getPointerCount() > 1 && (oldX2 >= 0 || oldY2 >= 0) && mRendere...
Handles the touch event.
public int match(final AuthScope that){ int factor=0; if (LangUtils.equals(this.scheme,that.scheme)) { factor+=1; } else { if (this.scheme != ANY_SCHEME && that.scheme != ANY_SCHEME) { return -1; } } if (LangUtils.equals(this.realm,that.realm)) { factor+=2; } else { if (this.real...
Tests if the authentication scopes match.
void calculateAvg(){ long sum=0; int count=1; synchronized (stats) { boolean useMovingAvg=getMovingAvgFrame() > 0 && getMovingAvgFrame() < stats.size(); for (ListIterator<XYDataItem> it=stats.listIterator(); it.hasNext(); ) { XYDataItem xy=it.next(); sum+=xy.getY().longValue(); if ((useMov...
Calculate avg.
public double height(){ return ymax - ymin; }
Returns the height of this rectangle.
public static void estimateAccessibilityCriteria(Scenario sc){ LOG.info("Estimating car ownership..."); int hasCarAccessAsPassenger=0; int hasCarAccessAsDriver=0; int isSchoolGoing=0; Counter counter=new Counter(" persons # "); for ( Id<Person> personId : sc.getPopulation().getPersons().keySet()) { St...
Estimates the following criteria that are used in ERAfrica accessibility calculations: <ul> <li> the number of household members with access to a car as passenger; <li> the number of household members with access to a car as driver; and <li> the number of household members that are school-going. </ul>
public void executeChildTemplates(ElemTemplateElement elem,boolean shouldAddAttrs) throws TransformerException { ElemTemplateElement t=elem.getFirstChildElem(); if (null == t) return; if (elem.hasTextLitOnly() && m_optimizer) { char[] chars=((ElemTextLiteral)t).getChars(); try { this.pushElemTempl...
Execute each of the children of a template element.
protected GoldenComparator createGoldenComparator(){ return new RegexGoldenComparator(expectedProblemLines()); }
Creates and returns a new GoldenComparator instance. Default implementation is RegexGoldenComparator. Override if you need a different implementation such as StringGoldenComparator.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:31:10.439 -0500",hash_original_method="B37B8587D770D7826EF61767CDFB0D6A",hash_generated_method="DA2EEFE68EA779BBB3625E96F4F5DF0E") static Element createUser(RenderScript rs,DataType dt){ DataKind dk=DataKind.USER; boolean norm=fals...
Create a custom Element of the specified DataType. The DataKind will be set to USER and the vector size to 1 indicating non-vector.
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 SPFRecord(Name name,int dclass,long ttl,String string){ super(name,Type.SPF,dclass,ttl,string); }
Creates a SPF Record from the given data
private void readObject(final java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException { s.defaultReadObject(); int size=s.readInt(); buildFromSorted(size,null,s,null); }
Reconstitute the <tt>TreeMap</tt> instance from a stream (i.e., deserialize it).
private BigDecimal notNull(Decimal value){ if (null == value) { return (new BigDecimal(0.0D)); } else { return (value.getBigDecimalValue()); } }
Method notNull.
@Deprecated @Override public final void add(int index,E element){ throw new UnsupportedOperationException(); }
Guaranteed to throw an exception and leave the list unmodified.
public String toString(){ int iMax=array.length - 1; if (iMax == -1) return "[]"; StringBuilder b=new StringBuilder(); b.append('['); for (int i=0; ; i++) { b.append(getRaw(byteOffset(i))); if (i == iMax) return b.append(']').toString(); b.append(',').append(' '); } }
Returns the String representation of the current values of array.
public static long token(){ return Math.abs(random.nextLong()); }
Generate next token
@Override protected void starting_bytecode(){ spTopOffset=startLocalOffset - BYTES_IN_STACKSLOT - (stackHeights[biStart] * BYTES_IN_STACKSLOT); }
About to start generating code for bytecode biStart. Perform any platform specific setup
private void performUpdate(final int i,final double D,final double U,final double Qh_ii){ final double G=y[i] * (w.dot(vecs[i]) + bias) - 1 + D * alpha[i]; final double PG; if (alpha[i] == 0) PG=Math.min(G,0); else if (alpha[i] == U) PG=Math.max(G,0); else PG=G; if (PG != 0) { final double alphaOl...
Performs steps a, b, and c of the DCD algorithms 1 and 2
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:02:08.799 -0500",hash_original_method="F74FE94679D9CBC1A9D9F74AEF1CAA7D",hash_generated_method="484EE365C6556E904F590230622E9FF8") public static int secondaryOrder(int order){ return (order & SECONDARY_ORDER_MASK_) >> SECONDARY_ORDER...
Gets the secondary order of a collation order.
public void configure(JobConf conf){ this.conf=conf; this.inlinks=conf.getBoolean("inlinks",false); this.outlinks=conf.getBoolean("outlinks",false); this.scores=conf.getBoolean("scores",true); this.topn=conf.getLong("topn",Long.MAX_VALUE); }
Configures the job, sets the flag for type of content and the topN number if any.
public void close() throws IOException { if (channel != null) { if (!readonly) { channel.force(true); channel.truncate(nextOverflowData); } channel.close(); } if (file != null) { file.close(); } }
Close the Geotiff file.
public boolean isLocal(){ if (this.innerInfo == null) return false; if (this.innerInfo.getEnclosingTypeName() != null) return false; char[] innerSourceName=this.innerInfo.getSourceName(); return (innerSourceName != null && innerSourceName.length > 0); }
Answer true if the receiver is a local type, false otherwise
public MoreLikeThisQueryBuilder like(Item... likeItems){ this.likeItems=new ArrayList<>(); return addLikeItem(likeItems); }
Sets the documents to use in order to find documents that are "like" this.
public FastBuffer<E> append(E[] array,int off,int len){ int end=off + len; if ((off < 0) || (len < 0) || (end > array.length)) { throw new IndexOutOfBoundsException(); } if (len == 0) { return this; } int newSize=size + len; int remaining=len; if (currentBuffer != null) { int part=Math.min(r...
Appends <code>E</code> array to buffer.
public void testFailoverConnectionSynchronization() throws Exception { Set<String> downedHosts=new HashSet<String>(); downedHosts.add(HOST_1); downedHosts.add(HOST_3); Properties props=new Properties(); props.setProperty("retriesAllDown","2"); props.setProperty("failOverReadOnly","false"); com.mysql.jdbc....
Tests connection properties synchronization in a failover connection using three hosts and the following sequence of events: - [\HOST_1 : /HOST_2 : \HOST_3] --> HOST_2 - [/HOST_1 : \HOST_2 : \HOST_3] --> HOST_1 - [\HOST_1 : \HOST_2 : /HOST_3] --> HOST_3 [Legend: "/HOST_n" --> HOST_n up; "\HOST_n" --> HOST_n down]
public void reduceN(){ int i, j, h; i=blocks - 1; while ((value[i] == 0) && (i > 0)) { i--; } h=value[i]; j=0; while (h != 0) { h>>>=1; j++; } len=(i << 5) + j; blocks=i + 1; }
Reduces len by finding the most significant bit set to one and reducing len and blocks.
public static boolean isMonitorWait(Instruction ins,ConstantPoolGen cpg){ if (!(ins instanceof InvokeInstruction)) { return false; } if (ins.getOpcode() == Constants.INVOKESTATIC) { return false; } InvokeInstruction inv=(InvokeInstruction)ins; String methodName=inv.getMethodName(cpg); String metho...
Determine if given Instruction is a monitor wait.
public static Object runJs(Executor.Input... inputs){ return runJs(null,inputs); }
Runs the javascript from the given inputs in order, and returns the result.
public static PublicKey generatePublicKey(String encodedPublicKey){ try { byte[] decodedKey=Base64.decode(encodedPublicKey); KeyFactory keyFactory=KeyFactory.getInstance(KEY_FACTORY_ALGORITHM); return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey)); } catch ( NoSuchAlgorithmException e) ...
Generates a PublicKey instance from a string containing the Base64-encoded public key.
private void addMenuItems(){ JPopupMenu popup=new JPopupMenu(); JMenu advancedMenu=new JMenu("Advanced"); advancedMenu.setMnemonic(KeyEvent.VK_A); advancedMenu.setIcon(iconCache.getIcon(IconCache.Icon.SETTINGS_ICON)); JMenuItem sitesItem=new JMenuItem("Site Manager...",iconCache.getIcon(IconCache.Icon.SAVED_I...
Builds the swing pop-up menu with the specified items
public static OptionBuilder hasArg(boolean hasArg){ OptionBuilder.numberOfArgs=hasArg ? 1 : Option.UNINITIALIZED; return instance; }
The next Option created will require an argument value if <code>hasArg</code> is true.
public boolean load(File fi) throws JmriConfigureXmlException { return load(fi,false); }
Load a file. <p> Handles problems locally to the extent that it can, by routing them to the creationErrorEncountered method.
public static int StringIsEmpty(String value){ int len=value.length(); if (len == 0) { return BooleanHelper.K; } else { return -len; } }
<p> StringIsEmpty </p>
public static int[] copyOfRange(int[] 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); int[] copy=new int[length]; System.arraycopy(original,start,copy,0,copyLengt...
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 0.
public void writeFile(String filePath,String content){ StringBuilder buf=new StringBuilder(); String newContent=stripOffCR(content); String[] lines=newContent.split("\n"); String cmd=null; for ( String line : lines) { if (cmd == null) { cmd=String.format(ImageServerDialogProperties.getString("cmd.w...
Write file using echo command.
final boolean isTransient(){ return Modifier.isTransient(getModifiers()); }
Returns true if the field is transient.
public void addQuat(Quaternion input,Quaternion output){ output.setX(getX() + input.getX()); output.setY(getY() + input.getY()); output.setZ(getZ() + input.getZ()); output.setW(getW() + input.getW()); }
Add this quaternion and another quaternion together and store the result in the output quaternion
public static boolean compatibleTypes(short t1,short pi1,short t2,short pi2){ return t1 == t2 && (t1 != SVGLength.SVG_LENGTHTYPE_PERCENTAGE || pi1 == pi2) || t1 == SVGLength.SVG_LENGTHTYPE_NUMBER && t2 == SVGLength.SVG_LENGTHTYPE_PX || t1 == SVGLength.SVG_LENGTHTYPE_PX && t2 == SVGLength.SVG_LENGTHTYPE_NUMBER; }
Determines if two SVG length types are compatible.
@Override public void receiveEvent(ClientStateInformation information){ if (information.getState() != currentState) { logger.info("Received status update: " + information); if (information.getState() == ClientState.SEARCH) { searchStartTime=System.currentTimeMillis(); for ( SequenceOutputVari...
Process status update event received from client
private void zzScanError(int errorCode){ String message; try { message=ZZ_ERROR_MSG[errorCode]; } catch ( ArrayIndexOutOfBoundsException e) { message=ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); }
Reports an error that occured while scanning. In a wellformed scanner (no or only correct usage of yypushback(int) and a match-all fallback rule) this method will only be called with things that "Can't Possibly Happen". If this method is called, something is seriously wrong (e.g. a JFlex bug producing a faulty scanner ...
Item newConstItem(final Object cst){ if (cst instanceof Integer) { int val=((Integer)cst).intValue(); return newInteger(val); } else if (cst instanceof Byte) { int val=((Byte)cst).intValue(); return newInteger(val); } else if (cst instanceof Character) { int val=((Character)cst).charValu...
Adds a number or string constant to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item.
@Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); hasSurface=false; inactivityTimer=new InactivityTimer(this); }
Called when the activity is first created.
public Map<Integer,TestLogyyyymm> selectToMap(){ return selectByExampleToMap((Example)this.example); }
List result to Map, The map key is primary-key: id
public Combinatorics(T[] values,int size){ this.values=values; this.size=size; this.result=new ArrayList<>(); }
Generates all possible combinations with the given size.
public void actionPerformed(ActionEvent evt){ panel.getSharedContext().setDebug_draw_line_boxes(!panel.getSharedContext().debugDrawLineBoxes()); panel.repaint(); }
Description of the Method
public JCExpression makeNullCheck(JCExpression arg){ Name name=TreeInfo.name(arg); if (name == names._this || name == names._super) return arg; JCTree.Tag optag=NULLCHK; JCUnary tree=make.at(arg.pos).Unary(optag,arg); tree.operator=syms.nullcheck; tree.type=arg.type; return tree; }
Make an attributed null check tree.
public boolean isSetValues(){ return this.values != null; }
Returns true if field values is set (has been assigned a value) and false otherwise
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-25 10:38:06.841 -0500",hash_original_method="CEA799A3A5D71AC4A4B6E1D8871A32D5",hash_generated_method="44B04DEDFA13B69A131EA52296DBC6D0") public String[] listNewNews(NewGroupsOrNewsQuery query) throws IOException { int size; String line; ...
List all new articles added to the NNTP server since a particular date subject to the conditions of the specified query. If no new new news is found, a zero length array will be returned. If the command fails, null will be returned. You must add at least one newsgroup to the query, else the command will fail. Each ...
@Kroll.method public boolean hasPermission(@Kroll.argument() String requestedPermission){ Log.d(LCAT,"check for granted permission: " + requestedPermission); if (Build.VERSION.SDK_INT < 23) { return true; } Context ctx=TiApplication.getInstance().getApplicationContext(); if (ContextCompat.checkSelfPermiss...
check, if given permission is currently granted
public CopySourceEdit(int offset,int length){ super(offset,length); }
Constructs a new copy source edit.
public StochasticOscillatorItem(RegularTimePeriod period,BigDecimal stochasticOscillator){ super(period,new StochasticOscillator(stochasticOscillator)); }
Creates a new instance of <code>CandleItem</code>.
public static short successor(final short n) throws NoSuccessorException { if (Short.MAX_VALUE == n) { throw new NoSuccessorException(); } else { return (short)(n + 1); } }
Computes the successor of a <code>short</code> value.
public double magnitude(){ return Math.sqrt(this.dot(this)); }
Returns the magnitude of this vector. This is also known as the L2 norm or the Euclidean norm.
@RequestProcessing(value="/member/{userName}/following/users",method=HTTPRequestMethod.GET) @Before(adviceClass={StopwatchStartAdvice.class,AnonymousViewCheck.class,UserBlockCheck.class}) @After(adviceClass=StopwatchEndAdvice.class) public void showHomeFollowingUsers(final HTTPRequestContext context,final HttpServletRe...
Shows user home following users page.
public void onInitMatResources(MatResources resources){ }
Override this function to modify the MatResources instance. You can add your own logic to the default GreenMatter behaviour.
public ExecutionScopeItemProvider(AdapterFactory adapterFactory){ super(adapterFactory); }
This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!-- end-user-doc -->
public static String createDistributedUniqueID(){ String uuid=null; try { String pname=ManagementFactory.getRuntimeMXBean().getName(); String pid=pname.split("@")[0]; InetAddress addr=InetAddress.getLocalHost(); String host=addr.getHostAddress(); uuid=pid + "_" + host; } catch ( Exception ex...
Creates a unique identifier with the pattern <process_id>_<host_ip>.
protected void displayRunnerLog(){ List<UserRunnerStatus> matchingStatuses=getMultiRemoteCodenvy().findRunners(processID); UserRunnerStatus foundStatus=checkOnlyOne(matchingStatuses,processID,"runner","runners"); if (foundStatus == null) { return; } RunnerState state=foundStatus.getInnerStatus().status();...
Display the runner log
public void initialize() throws InterruptedException { check(0,0,0); for ( Thread t : threads) { t.start(); } ready.await(); check(numthreads,0,0); }
Starts threads and gets them ready for the firing pistol
public static String mapChineseMarksToAnsi(String text){ }
Convert Chinese full-width punctuation marks to corresponding ANSI marks.
public static boolean isControl(long flags){ return ((flags & LOGRECORD_FLAGS_CONTROL_MESSAGE) != 0); }
Check flags to see if it indicates a control record.
public boolean addAll(int index,Collection c){ Object[] a=c.toArray(); int numNew=a.length; if (numNew == 0) return false; modCount++; Entry successor=(index == size ? header : entry(index)); Entry predecessor=successor.previous; for (int i=0; i < numNew; i++) { Entry e=new Entry(a[i],successor,pred...
Inserts all of the elements in the specified collection into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the list in the order that they are returned by the spe...
@Override public void draw(Graphics2D g2,Rectangle2D area){ double t=this.insets.calculateTopInset(area.getHeight()); double b=this.insets.calculateBottomInset(area.getHeight()); double l=this.insets.calculateLeftInset(area.getWidth()); double r=this.insets.calculateRightInset(area.getWidth()); double x=area....
Draws the border by filling in the reserved space.
public JMenuItem createPopupMenuItem(JPopupMenu menu,String label,String mnemonic,String accessibleDescription,String laf){ JMenuItem mi=menu.add(new JMenuItem(getString(label))); popupMenuGroup.add(mi); mi.setMnemonic(getMnemonic(mnemonic)); mi.getAccessibleContext().setAccessibleDescription(getString(accessib...
Creates a JMenuItem for the Look and Feel popup menu.
private static final IProblem[] safeGetProblems(CompilationResult result){ if (!USE_INTROSPECTION_TO_INVOKE_GET_PROBLEM) { try { return result.getProblems(); } catch ( NoSuchMethodError re) { USE_INTROSPECTION_TO_INVOKE_GET_PROBLEM=true; } } try { if (GET_PROBLEM_METH == null) { ...
Invoke CompilationResult#getProblems safely so that it works with 3.1.1 and more recent versions of the eclipse java compiler. See https://jsp.dev.java.net/issues/show_bug.cgi?id=13
public byte[] recordAPICall(final serverObjects post,final String servletName,final String type,final String comment){ String[] pks=post.remove(TABLE_API_COL_APICALL_PK); byte[] pk=pks == null ? null : UTF8.getBytes(pks[0]); final String apiurl="/" + servletName + "?"+ post.toString(); Row row=null; try { ...
recording of a api call. stores the call parameters into the API database table
public void start(){ if (!getLifecycle().toStarting()) { startListeners(); return; } try { make(); } catch ( Exception e) { log().log(Level.WARNING,e.toString(),e); e.printStackTrace(); } startListeners(); getLifecycle().toActive(); if (isAdminEnable()) { Thread thread=Thread.c...
Marks the environment of the class loader as started. The class loader itself doesn't use this, but a callback might.
public DInhibitAnyPolicy(JDialog parent){ super(parent); setTitle(res.getString("DInhibitAnyPolicy.Title")); initComponents(); }
Creates a new DInhibitAnyPolicy dialog.
public String write(Double value){ return value.toString(); }
This method is used to convert the provided value into an XML usable format. This is used in the serialization process when there is a need to convert a field value in to a string so that that value can be written as a valid XML entity.
public final boolean canGetDate(String field){ Column col=getColumn(field); return (col == null ? false : col.canGetDate()); }
Check if the given data field can return primitive <code>Date</code> values.
public static UrlTemplate compile(String template){ String[] urlPieces=new String[5]; int[] identifiers=new int[4]; String[] identifierFormatTags=new String[4]; int identifierCount=parseTemplate(template,urlPieces,identifiers,identifierFormatTags); return new UrlTemplate(urlPieces,identifiers,identifierFormat...
Compile an instance from the provided template string.
public boolean hasVariableValue(String name){ return variables.containsKey(name); }
Determines if a variable's value is set.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:30:49.510 -0500",hash_original_method="571F1D61EE68738D4B1083BD48C02876",hash_generated_method="E5E6612EE5F6102975B877338E28BF26") public boolean isEmulated(){ return mIsEmulated; }
Return true if the tag is emulated, determined at discovery time. These are actually smart-cards that emulate a MIFARE Classic interface. They can be treated identically to a MIFARE Classic tag.
@Override public V put(Integer key,V value){ return wrapValue(_map.put(unwrapKey(key),unwrapValue(value))); }
Inserts a key/value pair into the map.
@Override public CompletableFuture<Boolean> allMatch(final Predicate<? super T> predicate){ return CompletableFuture.supplyAsync(null,exec); }
Perform an asynchronous All Match operation
public boolean load(){ String adempiereHome=System.getProperty(ADEMPIERE_HOME); if (adempiereHome == null || adempiereHome.length() == 0) adempiereHome=System.getProperty("user.dir"); boolean envLoaded=false; String fileName=adempiereHome + File.separator + ADEMPIERE_ENV_FILE; File env=new File(fileName); ...
Load Configuration Data
protected Object convertValueType(final String searchField,final String searchValue){ return searchValue; }
Implementing Action need to override this method incase the search criteria contains non string values. eg: <code> protected Object convertType (String searchField, String searchValue) { Object convertedValue = null; if (searchField.equals("accountNumber")) { convertedValue = new BigDecimal(searchValue); } return conve...
@Override protected Optional<Exception> doTranslateException(Exception ex){ if (ex instanceof ConstraintViolationException) { return Optional.of(ex); } if (ex instanceof ServiceLayerException) { return Optional.of(ex); } return Optional.of(new ServiceLayerException(ex.getMessage())); }
Override method to handle the transaction yourself and skip to the default exception handling .
public static <E>E syncRest(final Iterator<? extends Object> iterator,final Callable<E> task) throws Exception { if (iterator.hasNext()) { synchronized (iterator.next()) { return syncRest(iterator,task); } } else { return task.call(); } }
Recursively synchronizes on the components in the provided iterator and executes the provided task if there are no more components.
protected void markTabStateInitialized(){ mTabStateInitialized=true; for ( TabModelSelectorObserver listener : mObservers) listener.onTabStateInitialized(); }
Marks the task state being initialized and notifies observers.
public void seen(Sha256Hash hash,PeerAddress byPeer){ lock.lock(); try { cleanPool(); Entry entry=memoryPool.get(hash); if (entry != null) { if (entry.tx != null) { checkState(entry.addresses == null); Transaction tx=entry.tx.get(); if (tx != null) { markBroadcast...
Called by peers when they see a transaction advertised in an "inv" message. It either will increase the confidence of the pre-existing transaction or will just keep a record of the address for future usage.
protected Value parseQNameOrBoolean() throws IOException, RDFParseException { int c=readCodePoint(); if (c == -1) { throwEOFException(); } if (c != ':' && !TurtleUtil.isPrefixStartChar(c)) { reportError("Expected a ':' or a letter, found '" + new String(Character.toChars(c)) + "'",BasicParserSettings.VE...
Parses qnames and boolean values, which have equivalent starting characters.
public void resetJavaName(){ javaNameProp.set(javaNamePrev); }
Revert changes to java names made by user.
public void substring() throws IOException { print("substring",null); }
Description of the Method
public void addIncidenceLink(HGPersistentHandle targetHandle,HGPersistentHandle linkHandle){ impl.addIncidenceLink(targetHandle,linkHandle); }
<p>Update the incidence set of an atom with a newly created link pointing to it. This method is only to be used internally by hypergraph. </p> <p> If the link is already part of the incidence set of this atom, it will not be added again. </p>
public double distance(Vector2 point){ double dx=this.x - point.x; double dy=this.y - point.y; return Math.sqrt(dx * dx + dy * dy); }
Returns the distance from this point to the given point.
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:59:50.776 -0500",hash_original_method="8C4C1B59B00A9C1FB0F98F7424B5199F",hash_generated_method="D96DD0F25F76242E105CF187E0E2089A") private static void preloadClasses(){ final ...
Performs Zygote process initialization. Loads and initializes commonly used classes. Most classes only cause a few hundred bytes to be allocated, but a few will allocate a dozen Kbytes (in one case, 500+K).
protected void sequence_Exponentiation_Multiplication(ISerializationContext context,Expression semanticObject){ genericSequencer.createSequence(context,semanticObject); }
Contexts: Multiplication returns Expression Multiplication.Expression_1_0_0 returns Expression Constraint: ((left=Multiplication_Expression_1_0_0 (op='*' | op='/') right=Exponentiation) | (left=Exponentiation_Expression_1_0_0 op='^' right=Binary))