code
stringlengths
10
174k
nl
stringlengths
3
129k
private static void mkdirs(IgniteFileSystem fs,IgfsPath path) throws IgniteException { assert fs != null; assert path != null; try { fs.mkdirs(path); System.out.println(); System.out.println(">>> Created directory: " + path); } catch ( IgfsException e) { System.out.println(); System.out.pr...
Creates directories.
public PopupLoader show(Phase phase,Widget widget){ PopupLoader loader=popups.get(phase); if (loader != null) { return loader; } switch (phase) { case STARTING_WORKSPACE_RUNTIME: loader=popupLoaderFactory.getPopup(locale.startingWorkspaceRuntime(),locale.startingWorkspaceRuntimeDescription()); loader.sh...
Displays a loader with a message and a widget.
@Override public void onAction(final ActionType at){ if (isReleased()) { return; } switch (at) { case USE: case KNOCK: at.send(at.fillTargetInfo(entity)); break; default : super.onAction(at); break; } }
Perform an action.
private MutableBigInteger divideMagnitude(MutableBigInteger div,MutableBigInteger quotient,boolean needRemainder){ int shift=Integer.numberOfLeadingZeros(div.value[div.offset]); final int dlen=div.intLen; int[] divisor; MutableBigInteger rem; if (shift > 0) { divisor=new int[dlen]; copyAndShift(div.va...
Divide this MutableBigInteger by the divisor. The quotient will be placed into the provided quotient object & the remainder object is returned.
public boolean isClosed(){ return !isOpen(); }
Returns true if dynamic region factory is closed.
@Override public final boolean run(String[] args) throws AdeException { init(args); try { parseArgs(args); } catch ( AdeUsageException e) { String msg=e.getMessage(); if (msg != null) { logger.error(msg); } return false; } return execute(); }
Copied from super class, so that the execute() from this class can be run.
private static DefaultSampleValues parseTfhd(DefaultSampleValues extendsDefaults,ParsableByteArray tfhd){ tfhd.setPosition(Atom.HEADER_SIZE); int fullAtom=tfhd.readInt(); int flags=Atom.parseFullAtomFlags(fullAtom); tfhd.skipBytes(4); if ((flags & 0x01) != 0) { tfhd.skipBytes(8); } int defaultSampleDe...
Parses a tfhd atom (defined in 14496-12).
public OMGraphicList filter(Shape withinThisShape){ return filter(withinThisShape,true); }
Filters the OMGraphicHandler graphic list so that graphics within the given shape will be visible. Returns an OMGraphicList with those visible shapes. The returned list should not be assumed to be the same OMGraphicList object that is maintained inside the OMGraphicHandler. Same as calling filter(withinThisShape, true)...
public static EventBean adapterForType(Object theEvent,EventType eventType,EventAdapterService eventAdapterService){ if (theEvent == null) { return null; } if (eventType instanceof BeanEventType) { return eventAdapterService.adapterForTypedBean(theEvent,(BeanEventType)eventType); } else if (eventType...
Return an adapter for the given type of event using the pre-validated object.
public TomcatWarTest(String testName,EnvironmentTestData testData) throws Exception { super(testName,testData); }
Initializes the test case.
public FrameObject toFrameObject(){ return frameObject; }
Obtain the frame as a SystemML FrameObject.
public static void pickGalleryImage(Activity targetActivity,Fragment targetFragment){ Intent intent=new Intent(Intent.ACTION_GET_CONTENT,null); intent.setType("image/*"); if (targetFragment != null) { targetFragment.startActivityForResult(intent,REQUEST_CODE_PICK_IMAGE); } else if (targetActivity != null...
Opens the gallery for the user to pick an image.
public StrTokenizer(final char[] input,final StrMatcher delim){ this(input); setDelimiterMatcher(delim); }
Constructs a tokenizer splitting using the specified delimiter matcher.
public ConfigureXmlExternalEntityDialog_NB(XmlExternalEntity xmlExternalEntity){ this.xmlExternalEntity=xmlExternalEntity; initComponents(); List<String> elements=Arrays.asList(xmlExternalEntity.getExternalEntities()); configureStringList_NB1.setStringList(elements); }
Creates new form ConfigureCoerceiveParsingDialog_NB
protected boolean convertToUppercase(){ return false; }
Method convertToUppercase.
public void fill(Shape s){ System.err.println("fill"); }
Fills the interior of a <code>Shape</code> using the settings of the <code>Graphics2D</code> context. The rendering attributes applied include the <code>Clip</code>, <code>Transform</code>, <code>Paint</code>, and <code>Composite</code>.
public void showSelectedSynapseProperties(){ SynapseDialog dialog=SynapseDialog.createSynapseDialog(this.getSelectedModelSynapses()); dialog.setModalityType(Dialog.ModalityType.MODELESS); dialog.pack(); dialog.setLocationRelativeTo(null); dialog.setVisible(true); }
Creates and displays the synapse properties dialog.
@Override protected void init(){ super.init(); setMultiSelect(true); setSelectable(true); }
Initialize the component.
GregorianCalendar(TimeZone zone,Locale locale,boolean flag){ super(zone,locale); gdate=(BaseCalendar.Date)gcal.newCalendarDate(getZone()); }
Constructs an empty GregorianCalendar.
public synchronized void resetToDefaultEndpoints(){ this.endpoints=defaultEndpoints; this.apiBroker.send(new ApiBroker.ChangeEndpoints(endpoints)); }
Reset default endpoints
public SourceBuilder<T> emitAll(Collection<T> records){ builder.emitAll(records); return this; }
Adds a collection of elements to the input
public static String doubleToString(double value,int afterDecimalPoint){ StringBuffer stringBuffer; double temp; int dotPosition; long precisionValue; temp=value * Math.pow(10.0,afterDecimalPoint); if (Math.abs(temp) < Long.MAX_VALUE) { precisionValue=(temp > 0) ? (long)(temp + 0.5) : -(long)(Math.abs(t...
Rounds a double and converts it into String.
public void write(int c){ int newcount=count + 1; if (newcount > buf.length) { if (writer == null) { expandCapacity(newcount); } else { flush(); newcount=1; } } buf[count]=(char)c; count=newcount; }
Writes a character to the buffer.
public final void checkAccess(){ }
Does nothing.
public Where<T,ID> and(){ ManyClause clause=new ManyClause(pop("AND"),ManyClause.AND_OPERATION); push(clause); addNeedsFuture(clause); return this; }
AND operation which takes the previous clause and the next clause and AND's them together.
public void forwardEvent(EventType eventType,Object data,boolean historyEvent){ AppEvent ae=new AppEvent(eventType,data); ae.setHistoryEvent(historyEvent); dispatch(ae); }
Creates and forwards an application event to the dispatcher.
public ReferenceCount decrement(){ return new ReferenceCount(this.getRaw() - 1); }
Decrements the reference counter.
public void receiveErrorqueryStorageProcessors(java.lang.Exception e){ }
auto generated Axis2 Error handler override this method for handling error response from queryStorageProcessors operation
public int squash(int value){ return Math.min(Math.max(getMin(),value),getMax()); }
Normalize the value to fit within the bounds of the range.
public VariableReference addFieldAssignment(TestCase test,GenericField field,int position,int recursionDepth) throws ConstructionFailedException { logger.debug("Recursion depth: " + recursionDepth); if (recursionDepth > Properties.MAX_RECURSION) { logger.debug("Max recursion depth reached"); throw new Const...
Add method at given position if max recursion depth has not been reached
public static void print(int[] a){ int n=a.length; StdOut.println(n); for (int i=0; i < n; i++) { StdOut.printf("%9d ",a[i]); } StdOut.println(); }
Prints an array of integers to standard output.
public MultipartBuilder attachment(InputStream is,String filename,MediaType mediaType){ return bodyPart(new StreamDataBodyPart(ATTACHMENT_NAME,is,filename,mediaType)); }
Adds a named attachment with a custom MIME media type.
public void defineLocal() throws IOException { writeCode(DEFINE_LOCAL); }
SWFActions interface
public AccountHeaderBuilder withTranslucentStatusBar(boolean translucentStatusBar){ this.mTranslucentStatusBar=translucentStatusBar; return this; }
Set or disable this if you use a translucent statusbar
public boolean isPointSelected(Point p){ int row=rowAtPoint(p); int col=columnAtPoint(p); if (row == -1 || col == -1) return false; int sel[]=getSelectedRows(); for (int i=0; i < sel.length; i++) if (sel[i] == row) return true; return false; }
Determines if the given point is a selected row.
public void play(Context context,Uri uri,boolean looping,int stream){ Command cmd=new Command(); cmd.requestTime=SystemClock.uptimeMillis(); cmd.code=PLAY; cmd.context=context; cmd.uri=uri; cmd.looping=looping; cmd.stream=stream; synchronized (mCmdQueue) { enqueueLocked(cmd); mState=PLAY; } }
Start playing the sound. It will actually start playing at some point in the future. There are no guarantees about latency here. Calling this before another audio file is done playing will stop that one and start the new one.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:28:32.773 -0500",hash_original_method="03AA0E6A46D7F727B5D81615ADC51108",hash_generated_method="8DC11397EA3F6F6EF3CD12372C47ADB5") private static Bitmap makeBitmap(int minSideLength,int maxNumOfPixels,Uri uri,ContentResolver cr,ParcelF...
Make a bitmap from a given Uri, minimal side length, and maximum number of pixels. The image data will be read from specified pfd if it's not null, otherwise a new input stream will be created using specified ContentResolver. Clients are allowed to pass their own BitmapFactory.Options used for bitmap decoding. A new Bi...
protected Button createOpenButton(){ Button ob=new Button(); ob.setUIID("MenuButton"); UIManager uim=parent.getUIManager(); Image i=(Image)uim.getThemeImageConstant("sideMenuImage"); if (i != null) { ob.setIcon(i); } else { float size=4.5f; try { size=Float.parseFloat(uim.getThemeConstant...
Creates the Side Menu open button.
public static Collection<Range> all(){ return enums.all(); }
Gets all of the parameter values that are defined as static constants in this class.
@Override public final boolean equals(Object obj){ if (obj == null) return false; if (this == obj) return true; if (!(obj instanceof Scheme)) return false; Scheme s=(Scheme)obj; return (name.equals(s.name) && defaultPort == s.defaultPort && layered == s.layered && socketFactory.equals(s.socketFactory));...
Compares this scheme to an object.
protected void reportWrongNumberArgs() throws WrongNumberArgsException { throw new WrongNumberArgsException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_TWO_OR_THREE,null)); }
Constructs and throws a WrongNumberArgException with the appropriate message for this function object.
public void denyTypesByRegExp(final Pattern... regexps){ denyPermission(new RegExpTypePermission(regexps)); }
Add security permission forbidding types matching one of the specified regular expressions.
public Car newCar(String road,String number){ Car car=getByRoadAndNumber(road,number); if (car == null) { car=new Car(road,number); register(car); } return car; }
Finds an existing Car or creates a new Car if needed requires car's road and number
public CommandRegistry(boolean allowCommandsWithUsername,String botUsername){ this.allowCommandsWithUsername=allowCommandsWithUsername; this.botUsername=botUsername; }
Creates a Command registry
private int findMethodParameterIndex(String mtdName,Class<?>[] mtdTypes,Annotation[][] mtdParamAnns){ List<Integer> allowedParamIdxs=new ArrayList<>(mtdTypes.length); for (int i=0; i < mtdTypes.length; i++) { Class<?> paramType=mtdTypes[i]; if (GridifyUtils.isMethodParameterTypeAllowed(paramType)) allow...
Find parameter index where elements should be placed.
public final char yycharat(int pos){ return zzBuffer[zzStartRead + pos]; }
Returns the character at position <tt>pos</tt> from the matched text. It is equivalent to yytext().charAt(pos), but faster
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:57:32.166 -0500",hash_original_method="3C94069B7580B83ACAD9A7049BA1E3DA",hash_generated_method="14ACC9FC067849549AFBF7F4DBB09450") public void reset(){ tbytes=crc=0; }
Resets the CRC32 checksum to it initial state.
private void writeQName(javax.xml.namespace.QName qname,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String namespaceURI=qname.getNamespaceURI(); if (namespaceURI != null) { java.lang.String prefix=xmlWriter.getPrefix(namespaceURI); if (prefix == null) {...
method to handle Qnames
public void actionPerformed(ActionEvent e){ int parserCount=getParserCount(); if (parserCount == 0) { return; } long begin=0; if (DEBUG_PARSING) { begin=System.currentTimeMillis(); } RSyntaxDocument doc=(RSyntaxDocument)textArea.getDocument(); Element root=doc.getDefaultRootElement(); int firs...
Called when the timer fires (e.g. it's time to parse the document).
public boolean isLeaves(){ return !(isComposite(boundable1) || isComposite(boundable2)); }
Tests if both elements of the pair are leaf nodes
public CipherParameters generateDerivedParameters(int keySize,int ivSize){ keySize=keySize / 8; ivSize=ivSize / 8; if ((keySize + ivSize) > digest.getDigestSize()) { throw new IllegalArgumentException("Can't generate a derived key " + (keySize + ivSize) + " bytes long."); } byte[] dKey=generateDerivedKey(...
Generate a key with initialisation vector parameter derived from the password, salt, and iteration count we are currently initialised with.
private void loadQoSSettings(){ storage.get(qosSettingsUri,null); }
Loads the QoS settings.
public boolean isNeedSaved(){ return false; }
Need to save preferece.
@Override public void relocate(){ int w=120, h=130; int x=(this.getWidth() - w) / 2, y=(this.getHeight() - h) / 2; surrogateLabel.setLocation(10,10); faultySurrogatesRadioButton.setLocation(x,y + 55); replaceSurrogatesRadioButton.setLocation(x,y + 30); discardSurrogatesRevisionRadioButton.setLocation(x,y + ...
A call of this method should validate the positions of the panels components.
public LoadResult(final List<Pair<IPlugin<T>,PluginStatus>> loadedPlugins,final List<Pair<String,Throwable>> failedPlugins){ this.loadedPlugins=Lists.newArrayList(Preconditions.checkNotNull(loadedPlugins,"IE01657: Loaded plugins argument can not be null")); this.failedPlugins=Lists.newArrayList(Preconditions.checkN...
Creates a new load result object.
public double optDouble(String key,double defaultValue){ try { Object o=opt(key); return o instanceof Number ? ((Number)o).doubleValue() : new Double((String)o).doubleValue(); } catch ( Exception e) { return defaultValue; } }
Get an optional double associated with a key, or the defaultValue if there is no such key or if its value is not a number. If the value is a string, an attempt will be made to evaluate it as a number.
static <K,V>void writeMap(Map<K,V> map,ObjectOutputStream stream) throws IOException { stream.writeInt(map.size()); for ( Map.Entry<K,V> entry : map.entrySet()) { stream.writeObject(entry.getKey()); stream.writeObject(entry.getValue()); } }
Stores the contents of a map in an output stream, as part of serialization. It does not support concurrent maps whose content may change while the method is running. <p>The serialized output consists of the number of entries, first key, first value, second key, second value, and so on.
public void addListener(final IGraphBuilderManagerListener listener){ m_listeners.addListener(listener); }
Adds a listener object that is notified about changes in the managed builders.
private void tryShutdown(){ if (isClosing() && isOkToClose()) shutdown(closeFuture.get()); }
Close was signaled in closeAsync() but there were pending messages at that time. This method attempts the shutdown if the returned result cleared up the last pending message.
protected GenericPlanStrategy<T,I> chooseStrategy(final String subpopulation){ final StrategyWeights<T,I> weights=getStrategyWeights(subpopulation); double rnd=MatsimRandom.getRandom().nextDouble() * weights.totalWeights; double sum=0.0; for (int i=0, max=weights.weights.size(); i < max; i++) { sum+=weights...
chooses a (weight-influenced) random strategy
@Override protected final long total(){ return heap.getHeapMemoryUsage().getCommitted(); }
currently allocated memory in the Java virtual machine; may vary over time
private static int med3(float[] x,int a,int b,int c){ return (x[a] < x[b] ? (x[b] < x[c] ? b : x[a] < x[c] ? c : a) : (x[b] > x[c] ? b : x[a] > x[c] ? c : a)); }
Returns the index of the median of the three indexed floats.
private boolean updateDistanceAndCheckAchievements(int difference,Player player,Map<String,Integer> distances,String achievementKeyName,HashMultimap<Integer,String> achievementsCache){ String uuid=player.getUniqueId().toString(); Integer distance=distances.get(uuid); if (distance == null) { distances.put(uuid...
Compare the distance travelled to the achievement thresholds. If a threshold is reached, award the achievement. Update the various tracking objects.
public Counter(){ }
For de-serialization
public PolynomialGF2mSmallM(GF2mField field,int deg,char typeOfPolynomial,SecureRandom sr){ this.field=field; switch (typeOfPolynomial) { case PolynomialGF2mSmallM.RANDOM_IRREDUCIBLE_POLYNOMIAL: coefficients=createRandomIrreduciblePolynomial(deg,sr); break; default : throw new IllegalArgumentException(" Error: ...
Construct a polynomial over the finite field GF(2^m).
public void step(SimState state){ }
This method is performed when the next step for the agent is computed. This agent does nothing, so nothing is inside the body of the method.
@Override public void close(){ ConfigurationManager.clearLocalConfigs(); }
Close connection to SystemML, which clears the thread-local DML and compiler configurations.
protected static PduBody parseParts(ByteArrayInputStream pduDataStream){ if (pduDataStream == null) { return null; } int count=parseUnsignedInt(pduDataStream); PduBody body=new PduBody(); for (int i=0; i < count; i++) { int headerLength=parseUnsignedInt(pduDataStream); int dataLength=parseUnsigned...
Parse pdu parts.
public void faceTarget(MowzieModelRenderer box,float f,float f3,float f4){ box.rotateAngleY+=(f3 / (180f / (float)Math.PI)) / f; box.rotateAngleX+=(f4 / (180f / (float)Math.PI)) / f; }
Rotates a box to face where the entity is looking. <p/> Note: Just keep f3 and f4 from the setRotationAngles() method.
private void sb7(int a,int b,int c,int d){ int t1=b ^ c; int t2=c & t1; int t3=d ^ t2; int t4=a ^ t3; int t5=d | t1; int t6=t4 & t5; X1=b ^ t6; int t8=t3 | X1; int t9=a & t4; X3=t1 ^ t9; int t11=t4 ^ t8; int t12=X3 & t11; X2=t3 ^ t12; X0=(~t11) ^ (X3 & X2); }
S7 - { 1,13,15, 0,14, 8, 2,11, 7, 4,12,10, 9, 3, 5, 6 } - 16 terms.
@Override public int updateJobDetail(Connection conn,JobDetail job) throws IOException, SQLException { ByteArrayOutputStream baos=serializeJobData(job.getJobDataMap()); int len=baos.toByteArray().length; ByteArrayInputStream bais=new ByteArrayInputStream(baos.toByteArray()); PreparedStatement ps=null; int ins...
<p> Update the job detail record. </p>
@Override public String toString(){ return "isOpen=" + isOpen; }
Returns a String for development/debug support. Content subject to change.
public boolean isProcessed(){ Object oo=get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get Processed.
public static boolean rectCrossesPoly(final double rMinX,final double rMinY,final double rMaxX,final double rMaxY,final double[] shapeX,final double[] shapeY,final double sMinX,final double sMinY,final double sMaxX,final double sMaxY){ if (rectDisjoint(rMinX,rMinY,rMaxX,rMaxY,sMinX,sMinY,sMaxX,sMaxY)) { return fa...
Computes whether a rectangle crosses a shape. (touching not allowed)
private boolean makeServiceNameUnique(ServiceInfoImpl info){ final String originalQualifiedName=info.getKey(); final long now=System.currentTimeMillis(); boolean collision; do { collision=false; for ( DNSEntry dnsEntry : this.getCache().getDNSEntryList(info.getKey())) { if (DNSRecordType.TYPE_S...
Generate a possibly unique name for a service using the information we have in the cache.
private void onHotspotBoundsChanged(){ final int count=mExitingRipplesCount; final RippleForeground[] ripples=mExitingRipples; for (int i=0; i < count; i++) { ripples[i].onHotspotBoundsChanged(); } if (mRipple != null) { mRipple.onHotspotBoundsChanged(); } if (mBackground != null) { mBackgroun...
Notifies all the animating ripples that the hotspot bounds have changed.
private void appendIndentation(int level,StringBuilder result){ for (int i=0; i < level; ++i) result.append(" "); }
Helper method. Appends indentation to `result`.
private void solve(int method) throws NullPointerException { if (solved) { return; } if (!reducedRowEchelonForm) { reducedRowEchelonForm(method); } if (!isSolvable(method)) { if (LOG.isDebugging()) { LOG.debugFine("Equation system is not solvable!"); } return; } int cols=coeff[0]...
solves linear system with the chosen method
public BESplitPaneUI(){ super(); }
Instantiates a new bE split pane ui.
boolean cleanupNonDirty(LocalRegion r){ if (isDirty()) { return false; } else { cleanup(r); return true; } }
If the entry is not dirty (read only) then clean it up.
public ByteVector putInt(final int i){ int length=this.length; if (length + 4 > data.length) { enlarge(4); } byte[] data=this.data; data[length++]=(byte)(i >>> 24); data[length++]=(byte)(i >>> 16); data[length++]=(byte)(i >>> 8); data[length++]=(byte)i; this.length=length; return this; }
Puts an int into this byte vector. The byte vector is automatically enlarged if necessary.
protected static void propagatePreviousLubs(final TargetConstraints targetRecord,Lubs solution,final Map<AnnotatedTypeMirror,Set<AnnotationMirror>> subtypesOfTarget){ for ( final Entry<TypeVariable,Set<AnnotationMirror>> supertypeTarget : targetRecord.supertypes.targets.entrySet()) { final AnnotatedTypeMirror su...
If the target corresponding to targetRecord must be a supertype of another target for which we have already determined a lub, add that target's lub to this list.
private boolean showHelpOnFirstLaunch(){ try { PackageInfo info=getPackageManager().getPackageInfo(PACKAGE_NAME,0); int currentVersion=info.versionCode; SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(this); int lastVersion=prefs.getInt(PreferencesActivity.KEY_HELP_VERSION_SHOWN,...
We want the help screen to be shown automatically the first time a new version of the app is run. The easiest way to do this is to check android:versionCode from the manifest, and compare it to a value stored as a preference.
public void or(Criteria criteria){ oredCriteria.add(criteria); }
This method was generated by MyBatis Generator. This method corresponds to the database table company_privilege
private <T>InternalProviderImpl installInternalProvider(Class<T> clazz,String bindingName,InternalProviderImpl<? extends T> internalProvider,boolean isBound){ if (bindingName == null) { if (isBound) { return installUnNamedProvider(mapClassesToUnNamedBoundProviders,clazz,internalProvider); } else { ...
Installs a provider either in the scope or the pool of unbound providers.
private synchronized boolean performTurn(Value systemAction){ boolean turnPerformed=false; simulatorState.setParameters(domain.getParameters()); Assignment systemAssign=new Assignment(system.getSettings().systemOutput,systemAction); simulatorState.addToState(systemAssign); while (!simulatorState.getNewVariabl...
Performs the dialogue turn in the simulator.
public DigitalSignatureValidationException(){ }
Constructs a new exception with <code>null</code> as its detail message. The cause is not initialized.
public void subdivide(double t,Segment s0,Segment s1){ Linear l0=null, l1=null; if (s0 instanceof Linear) l0=(Linear)s0; if (s1 instanceof Linear) l1=(Linear)s1; subdivide(t,l0,l1); }
Subdivides this Linear segment into two segments at given t.
public Object[] patch_apply(LinkedList<Patch> patches,String text){ if (patches.isEmpty()) { return new Object[]{text,new boolean[0]}; } patches=patch_deepCopy(patches); String nullPadding=patch_addPadding(patches); text=nullPadding + text + nullPadding; patch_splitMax(patches); int x=0; int delta=0...
Merge a set of patches onto the text. Return a patched text, as well as an array of true/false values indicating which patches were applied.
protected static EventType createEventType(StatementContext statementContext,StatViewAdditionalProps additionalProps,int streamNum){ Map<String,Object> eventTypeMap=new HashMap<String,Object>(); eventTypeMap.put(ViewFieldEnum.REGRESSION__SLOPE.getName(),Double.class); eventTypeMap.put(ViewFieldEnum.REGRESSION__YI...
Creates the event type for this view.
private synchronized void drawIsometricWreckSpritesForHex(Coords c,Graphics g,ArrayList<IsometricWreckSprite> spriteArrayList){ Rectangle view=g.getClipBounds(); for ( IsometricWreckSprite sprite : spriteArrayList) { Coords cp=sprite.getEntity().getPosition(); if (cp.equals(c) && view.intersects(sprite.get...
Draws the wrecksprites for the given hex. This function is used by the isometric rendering process so that sprites are drawn in the order that hills are rendered to create the appearance that the sprite is behind the hill.
public static long moduloSignedPowerOfTwo(final long value,final long spot){ if (spot == Long.MIN_VALUE) { return value != Long.MIN_VALUE ? value : 0; } else { long s=value >> 63; return ((value + s ^ s) & abs(spot) - 1) + s ^ s; } }
This treatment being designed for optimization, the fact that spot is a signed power of two is not checked.
public static void doMain(String[] args){ String job="java:aggregatingDataHDFS"; final String keyspaceName="test"; final String tableName="songs"; String home=System.getProperty("hadoop.home.dir"); final String splitSep=","; ContextProperties p=new ContextProperties(args); DeepSparkContext deepContext=new...
This is the method called by both main and tests.
public static AboutFragment newInstance(int sectionNumber){ AboutFragment fragment=new AboutFragment(); Bundle args=new Bundle(); args.putInt(ARG_SECTION_NUMBER,sectionNumber); fragment.setArguments(args); return fragment; }
Returns a new instance of this fragment for the given section number.
static boolean isPoolingAllowed(String socketFactory,OutputStream trace,String authMech,String protocol,Hashtable<?,?> env) throws NamingException { if (trace != null && !debug || (protocol == null && !supportPlainProtocol) || ("ssl".equalsIgnoreCase(protocol) && !supportSslProtocol)) { d("Pooling disallowed due ...
Determines whether pooling is allowed given information on how the connection will be used. Non-configurable rejections: - nonstandard socketFactory has been specified: the pool manager cannot track input or parameters used by the socket factory and thus has no way of determining whether two connection requests are equ...
private static MagnetOptions[] extractDownloadableMagnets(MagnetOptions[] magnets){ List<MagnetOptions> dls=new ArrayList<MagnetOptions>(magnets.length); for (int i=0; i < magnets.length; i++) { MagnetOptions magnet=magnets[i]; if (!magnet.isKeywordTopicOnly()) { dls.add(magnets[i]); } } if (d...
Extracts magnets that are not keyword topic only magnets
public static void deleteFilesInDirectory(final File directory,final FilenameFilter filter,final Logger logger) throws IOException { FileUtils.deleteFilesInDirectory(directory,filter,logger,false); }
Deletes all files (not directories..) in the given directory (non recursive) that match the given filename filter. If any file cannot be deleted then this is printed at warn to the given logger.
public static void createAllTables(SQLiteDatabase db,boolean ifNotExists){ UserDao.createTable(db,ifNotExists); CategoryDao.createTable(db,ifNotExists); ChallengeDao.createTable(db,ifNotExists); AnswerDao.createTable(db,ifNotExists); CompletionDao.createTable(db,ifNotExists); SettingsDao.createTable(db,ifNo...
Creates underlying database table using DAOs.
public void writeParameter(String wrapperName,String id,int dimension,double value,double lower,double upper,XMLWriter writer){ writer.writeOpenTag(wrapperName); writeParameter(id,dimension,value,lower,upper,writer); writer.writeCloseTag(wrapperName); }
write a parameter
public void testBug27916() throws Exception { createTable("testBug27916","(field1 TINYINT UNSIGNED, field2 SMALLINT UNSIGNED, field3 INT UNSIGNED, field4 INTEGER UNSIGNED, field5 MEDIUMINT UNSIGNED, field6 BIGINT UNSIGNED)"); ResultSetMetaData rsmd=this.stmt.executeQuery("SELECT * FROM testBug27916").getMetaData();...
Tests fix for BUG#27916 - UNSIGNED types not reported via DBMD.getTypeInfo(), and capitalization of types is not consistent between DBMD.getColumns(), RSMD.getColumnTypeName() and DBMD.getTypeInfo(). This fix also ensures that the precision of UNSIGNED MEDIUMINT and UNSIGNED BIGINT is reported correctly via DBMD.getCol...