code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
private boolean pointInCurrentPolygon(final Point p){
if (m_current == null) {
return false;
}
for ( final Polygon item : m_current) {
if (item.contains(p)) {
return true;
}
}
return false;
}
| java.lang.boolean pointInCurrentPolygon(java.awt.Point) returns false if there is no points in a current polygon. returns true if there is. |
public Observable<RxCameraData> oneShotRequest(){
return new TakeOneShotRequest(rxCamera).get();
}
| only one shot camera data, encapsulated the setOneShotPreviewCallback |
protected void addOffHeapNotificationListener(){
ManagementService service=ManagementService.getExistingManagementService(getCache());
assertNotNull(service);
assertTrue(service.isManager());
MemberMXBean memberBean=service.getMemberMXBean();
assertNotNull(memberBean);
assertTrue(memberBean instanceof Membe... | Adds an off-heap notification listener to the MemberMXBean. |
public boolean isSupported(DurationFieldType type){
return getPeriodType().isSupported(type);
}
| Checks whether the field specified is supported by this period. |
public static String shortToHex(final short src,final int srcPos,final String dstInit,final int dstPos,final int nHexs){
if (0 == nHexs) {
return dstInit;
}
if ((nHexs - 1) * 4 + srcPos >= 16) {
throw new IllegalArgumentException("(nHexs-1)*4+srcPos is greather or equal to than 16");
}
final StringBui... | <p> Converts a short into an array of Char using the default (little endian, Lsb0) byte and bit ordering. </p> |
private void updateHoverEntry(Point p){
long hoverEntryBefore=hoverEntry;
hoverEntry=findHoverEntry(p);
if (hoverEntry != hoverEntryBefore) {
repaint();
if (listener != null) {
if (hoverEntry == -1) {
listener.noItemSelected();
}
else {
StreamInfoHistoryItem item=history.get(h... | Update the hoverEntry with the currently hovered entry, or none if none is hovered. Repaints and informs listeners if something has changed. |
private PostgreSQLTracesLoader(){
}
| Do not instantiate this class. |
public int size(){
return this.parameters.size();
}
| Get the size |
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. |
protected void drawCubic(Canvas c,LineDataSet dataSet,List<Entry> entries){
Transformer trans=mChart.getTransformer(dataSet.getAxisDependency());
Entry entryFrom=dataSet.getEntryForXIndex(mMinX);
Entry entryTo=dataSet.getEntryForXIndex(mMaxX);
int minx=dataSet.getEntryPosition(entryFrom);
int maxx=Math.min(da... | Draws a cubic line. |
public boolean hasComments(){
return super.hasElement(Comments.KEY);
}
| Returns whether it has the Comments class. |
public boolean eatOptionalNewlines(int maxNewlines){
return eatOptionalNewlines(maxNewlines,false);
}
| Reads all line feed tokens of the stream until either there are no more newlines or that maxNewLines is reached. |
public boolean isEmpty(){
return mostRecentEvents.isEmpty();
}
| Returns true if the view is empty. |
public static Map<String,Object> productImportFromSpreadsheet(DispatchContext dctx,Map<String,? extends Object> context){
Delegator delegator=dctx.getDelegator();
Locale locale=(Locale)context.get("locale");
String path=System.getProperty("user.dir") + "/spreadsheet";
List<File> fileItems=FastList.newInstance()... | This method is responsible to import spreadsheet data into "Product" and "InventoryItem" entities into database. The method uses the ImportProductHelper class to perform its operation. The method uses "Apache POI" api for importing spreadsheet (xls files) data. Note : Create the spreadsheet directory in the ofbiz home ... |
public void init(){
int len=Constants.FILE_BLOCK_SIZE;
byte[] salt;
byte[] magic=HEADER.getBytes(Constants.UTF8);
if (length() < HEADER_LENGTH) {
checkedWriting=false;
writeDirect(magic,0,len);
salt=generateSalt();
writeDirect(salt,0,len);
initKey(salt);
write(magic,0,len);
checkedWr... | Initialize the file. This method will write or check the file header if required. |
@Override public void start(){
paused=false;
GUIFrame gui=system.getModule(GUIFrame.class);
if (gui == null) {
throw new RuntimeException("Nuance connection requires access to the GUI");
}
ttsCache=new HashMap<String,SpeechData>();
}
| Starts the Nuance speech plugin. |
@Override public int addSorted(E element,Comparator<? super E> cmp){
throw new UnsupportedOperationException(ERROR_MSG);
}
| Guaranteed to throw an exception and leave the table unmodified. |
public void clear(){
headers.clear();
}
| Removes any contained headers. |
public final String toString(){
return TextIO.moveToUCIString(this);
}
| Useful for debugging. |
public void delete() throws IOException {
close();
Utils.deleteContents(directory);
}
| Closes the cache and deletes all of its stored values. This will delete all files in the cache directory including files that weren't created by the cache. |
public void onError(CqEvent aCqEvent){
if (true) {
throw new IllegalStateException(LocalizedStrings.CqListenerImpl_NOT_YET_SUPPORTED.toLocalizedString());
}
}
| An error occurred in the processing of a CQ. This event does contain an error. The newValue and oldValue in the may or may not be available, and will be null if not available. |
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. |
protected int engineDoFinal(byte[] input,int inputOffset,int inputLen,byte[] output,int outputOffset) throws IllegalBlockSizeException, ShortBufferException, BadPaddingException {
return core.doFinal(input,inputOffset,inputLen,output,outputOffset);
}
| Encrypts or decrypts data in a single-part operation, or finishes a multiple-part operation. The data is encrypted or decrypted, depending on how this cipher was initialized. <p>The first <code>inputLen</code> bytes in the <code>input</code> buffer, starting at <code>inputOffset</code>, and any input bytes that may hav... |
private void checkRunning() throws AdminException {
if (this.isRunning()) {
throw new AdminException(LocalizedStrings.SystemMemberBridgeServerImpl_CANNOT_CHANGE_THE_CONFIGURATION_OF_A_RUNNING_BRIDGE_SERVER.toLocalizedString());
}
}
| Throws an <code>AdminException</code> if this bridge server is running. |
public T caseTypeProvidingElement(TypeProvidingElement object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Type Providing Element</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
public CAbstractOrExpression(final List<IAbstractNode> children){
m_children=new ArrayList<IAbstractNode>(children);
}
| Creates a new OR expression. |
private Query makeXDL(boolean crossedDateLine){
return new TermQuery(new Term(field_xdl,crossedDateLine ? "T" : "F"));
}
| Constructs a query to retrieve documents that do or do not cross the date line. |
protected void paintTabBorder(Graphics g,int tabPlacement,int tabIndex,int x,int y,int w,int h,boolean isSelected){
g.setColor(lightHighlight);
switch (tabPlacement) {
case LEFT:
g.drawLine(x + 1,y + h - 2,x + 1,y + h - 2);
g.drawLine(x,y + 2,x,y + h - 3);
g.drawLine(x + 1,y + 1,x + 1,y + 1);
g.drawLine(x + 2,y... | this function draws the border around each tab note that this function does now draw the background of the tab. that is done elsewhere |
public void internalFrameClosing(InternalFrameEvent e){
}
| ********************* InternalFrameListener implementatiom * |
public static void sendPatchToEnumerationTask(StatelessService service,URI taskLink){
sendPatchToEnumerationTask(service,taskLink,null);
}
| Sends patch to the enumeration task. |
private Object extractIdToFieldObject(T data) throws SQLException {
return idField.extractJavaFieldToSqlArgValue(data);
}
| Return a field-object for the id extracted from the data. |
public Assignment(String var,double val){
this();
map.put(var,ValueFactory.create(val));
}
| Creates a new assignment, with a single (var,value) pair |
public SortArrowIcon(boolean ascending,String colorKey){
this.ascending=ascending;
this.colorKey=colorKey;
if (colorKey == null) {
throw new IllegalArgumentException();
}
}
| Creates a <code>SortArrowIcon</code>. |
public DoubleMatrix jblas_solveSymmetric(double[][] B){
return org.jblas.Solve.solveSymmetric(new DoubleMatrix(this.getArray()),new DoubleMatrix(B));
}
| Solves the linear equation A*X = B for symmetric A. ( A is this) |
@CanIgnoreReturnValue public static <T>T checkNotNull(T reference,@Nullable 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 static String reverseUrl(URL url){
String host=url.getHost();
String file=url.getFile();
String protocol=url.getProtocol();
int port=url.getPort();
StringBuilder buf=new StringBuilder();
reverseAppendSplits(host,buf);
buf.append(':');
buf.append(protocol);
if (port != -1) {
buf.append(':');... | Reverses a url's domain. This form is better for storing in hbase. Because scans within the same domain are faster. <p> E.g. "http://bar.foo.com:8983/to/index.html?a=b" becomes "com.foo.bar:http:8983/to/index.html?a=b". |
public void analyseCode(CompilationUnitScope unitScope){
if (this.ignoreFurtherInvestigation) return;
try {
internalAnalyseCode(null,FlowInfo.initial(this.maxFieldCount));
}
catch ( AbortType e) {
this.ignoreFurtherInvestigation=true;
}
}
| Flow analysis for a package member type |
public CellEntry(Cell cell){
this();
if (cell != null) {
setExtension(cell);
}
}
| Constructs a CellEntry with a new cell. |
public void addRtpStreamListener(RtpStreamListener rtpStreamListener){
this.rtpStreamListener=rtpStreamListener;
}
| Adds the RTP stream listener |
protected double reportReturn(String methodCall,double value){
reportAllReturns(methodCall,"" + value);
return value;
}
| Conveniance method to report (for logging) that a method returned a double value. |
private static Credential authorize() throws Exception {
GoogleClientSecrets clientSecrets=GoogleClientSecrets.load(JSON_FACTORY,new InputStreamReader(TaskQueueSample.class.getResourceAsStream("/client_secrets.json")));
if (clientSecrets.getDetails().getClientId().startsWith("Enter") || clientSecrets.getDetails().g... | Authorizes the installed application to access user's protected data. |
private Object readResolve(){
if (getDescriptor().getFieldNames().length == 0) {
OpenType<Object> xopenType=cast(openType);
Set<Object> xlegalValues=cast(legalValues);
Comparable<Object> xminValue=cast(minValue);
Comparable<Object> xmaxValue=cast(maxValue);
return new OpenMBeanAttributeInfoSupport... | An object serialized in a version of the API before Descriptors were added to this class will have an empty or null Descriptor. For consistency with our behavior in this version, we must replace the object with one where the Descriptors reflect the same values of openType, defaultValue, etc. |
private UploadSingleCredentialExtensionResponse extendUploadSingleCredentials(BusinessObjectData businessObjectData){
return uploadDownloadRestController.extendUploadSingleCredentials(businessObjectData.getNamespace(),businessObjectData.getBusinessObjectDefinitionName(),businessObjectData.getBusinessObjectFormatUsage... | Extends the credentials of an in-progress upload. |
private Reader createReader(InputStream inputStream,String encoding,Boolean isBigEndian) throws IOException, JasperException {
if (encoding == null) {
encoding="UTF-8";
}
String ENCODING=encoding.toUpperCase(Locale.ENGLISH);
if (ENCODING.equals("UTF-8")) {
return new UTF8Reader(inputStream,fBufferSize);... | Creates a reader capable of reading the given input stream in the specified encoding. |
public void test_smallSlotWasteRecylcing(){
final Journal store=(Journal)getSmallSlotStore(1024,10,20.0f);
try {
final RWStrategy bufferStrategy=(RWStrategy)store.getBufferStrategy();
final RWStore rw=bufferStrategy.getStore();
final int cSlotSize=128;
final int cAllocSize=99;
int breaks=0;
... | At scale the small slot handling can lead to large amounts of store waste, tending to the small slot allocation thresholds of 50%, dependent on use case. <p> To mitigate this problem, when more than some minimum number of allocators are in use the storage stats are used to check on overall usage. If the waste is above ... |
private int medianXValue(Object[] connectedCells,int rankValue){
if (connectedCells.length == 0) {
return 0;
}
int[] medianValues=new int[connectedCells.length];
for (int i=0; i < connectedCells.length; i++) {
medianValues[i]=((mxGraphAbstractHierarchyCell)connectedCells[i]).getGeneralPurposeVariable(ra... | Calculates the median position of the connected cell on the specified rank |
public static int compareBoolean(int a,int b){
if ((a > 0 && b > 0) || (a <= 0 && b <= 0)) return Math.abs(a - b);
else return -1 * Math.abs(a - b);
}
| <p> compareBoolean </p> |
public void clear(){
new ByteArrayList(this.state).fillFromToWith(0,this.state.length - 1,FREE);
this.distinct=0;
this.freeEntries=table.length;
trimToSize();
}
| Removes all (key,value) associations from the receiver. Implicitly calls <tt>trimToSize()</tt>. |
@Override public boolean execute(final String[] params,final String remainder){
final RPAction invisible=new RPAction();
invisible.put("type","invisible");
ClientSingletonRepository.getClientFramework().send(invisible);
return true;
}
| Execute a chat command. |
private boolean conjIsDecomposable(OpApplNode node){
ExprOrOpArgNode[] conjuncts=node.getArgs();
for (int i=0; i < conjuncts.length; i++) {
if (conjuncts[i] instanceof OpApplNode) {
OpApplNode curNode=(OpApplNode)conjuncts[i];
if ((curNode.getOperator().getKind() == ASTConstants.UserDefinedOpKind) &... | This method ssumes node represents a conjunction (either infix or bulleted list). Returns true iff one of the conjuncts is either - a \E or - a disjunction and this.state.splitChosen() = false or a conjunction c for which conjIsDecomposable(c) is true. It assumes that a conjunct that is a SubstInNode is not decompos... |
private void showFeedback(String message){
if (myHost != null) {
myHost.showFeedback(message);
}
else {
System.out.println(message);
}
}
| Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface. |
protected POInfo initPO(Properties ctx){
POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName());
return poi;
}
| Load Meta Data |
public static long computeHash(long k0,long k1,DirectoryFindRequest request){
return computeHash(k0,k1,request.getTimestamp(),request.getClassSelector(),request.getLabelsSelectors());
}
| Compute the hash of a DirectoryFindRequest for the provided SipHash key |
public static ConstantNode forInt(int i){
return createPrimitive(JavaConstant.forInt(i));
}
| Returns a node for an integer constant. |
private void parseServiceProviderExt(Node node){
Node childnode=node.getFirstChild();
if (childnode != null) {
do {
if (childnode.getNodeName().equals("characteristic")) {
if (childnode.getAttributes().getLength() > 0) {
Node typenode=childnode.getAttributes().getNamedItem("type");
... | Parse service provider ext |
public boolean isStatusBarTintEnabled(){
return mStatusBarTintEnabled;
}
| Is tinting enabled for the system status bar? |
public boolean isSet(_Fields field){
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case HEADER:
return isSetHeader();
case VALUES:
return isSetValues();
case ERROR:
return isSetError();
}
throw new IllegalStateException();
}
| Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
public static <K extends Comparable<?>,V>Builder<K,V> reverseOrder(){
return new Builder<K,V>(Ordering.natural().reverse());
}
| Returns a builder that creates immutable sorted maps whose keys are ordered by the reverse of their natural ordering. |
@Override public void onDetailLoadFailure(){
Snackbar.make(mRootView,R.string.unknown_error,Snackbar.LENGTH_SHORT).show();
}
| Called when loading media details fails |
public static String encodeString(String src){
return encode(src);
}
| Encode String object; |
public Builder permitDiskWrites(){
return disable(DETECT_DISK_WRITE);
}
| Disable detection of disk writes. |
public static boolean waitToSeeLive(ZkStateReader zkStateReader,String collection,String coreNodeName,String baseUrl,int timeoutInMs){
long timeout=System.nanoTime() + TimeUnit.NANOSECONDS.convert(timeoutInMs,TimeUnit.MILLISECONDS);
while (System.nanoTime() < timeout) {
log.debug("waiting to see replica just cr... | Wait to see an entry in the ClusterState with a specific coreNodeName and baseUrl. |
public void test_agg11() throws MalformedQueryException {
final String query="PREFIX : <http://www.example.org/>\n" + "SELECT ((?O1 + ?O2) AS ?O12) (COUNT(?O1) AS ?C)\n" + "WHERE { ?S :p ?O1; :q ?O2 } GROUP BY (?S)";
negativeTest(query);
}
| Use of an ungrouped variable in a project expression |
void handleConnect(MqttConnectMessage connect,ChannelHandlerContext ctx) throws Exception {
this.ctx=ctx;
connectionEntry.ttl=connect.variableHeader().keepAliveTimeSeconds() * 1500;
String clientId=connect.payload().clientIdentifier();
session.getConnectionManager().connect(clientId,connect.payload().userName()... | Called during connection. |
public static String replaceCharacters(final ConversionMethod conversionMethod,final String input,final int fromCharacter,final int toCharacter,final String wrap){
String convertedText=input;
for (int i=fromCharacter; i <= toCharacter; i++) {
final String characterToReplace=new String(Character.toChars(i));
... | Replaces characters using the given conversion method. |
public boolean isSetAuthScheme(){
return this.authScheme != null;
}
| Returns true if field authScheme is set (has been assigned a value) and false otherwise |
private void updateProgress(String progressLabel,int progress){
if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) {
myHost.updateProgress(progressLabel,progress);
}
previousProgress=progress;
previousProgressLabel=progressLabel;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
public static Hashtable<String,String> parseHashtableConfig(final String config){
Hashtable<String,String> hashtable=new Hashtable<>();
String[] topElements=config.split(";");
for ( String element : topElements) {
String[] expression=element.split("=");
if (expression.length != 2) {
throw new Illeg... | Used on parsing JNDI Configuration |
public Value(String key,String description,boolean documented){
this.key=key;
this.description=description;
this.documented=documented;
}
| Creates a new Value object. |
protected boolean readSetupData(){
outTest=outputButton.isSelected();
wrapTest=wrapButton.isSelected();
try {
ua=Integer.parseInt(uaAddrField.getText());
}
catch ( Exception e) {
statusText1.setText("Error - Bad character in Node(UA) field, please try again.");
statusText1.setVisible(true);
re... | Local method to read data in Diagnostic Frame, get node data, and test for consistency Returns 'true' if no errors are found Returns 'false' if errors are found If errors are found, the errors are noted in the status panel of the Diagnostic Frame |
public void format(String name,Action<FormatExtension> closure){
FormatExtension extension=new FormatExtension(name,this);
closure.execute(extension);
}
| Configures a custom extension. |
@Override public Object eInvoke(int operationID,EList<?> arguments) throws InvocationTargetException {
switch (operationID) {
case N4JSPackage.FUNCTION_OR_FIELD_ACCESSOR___GET_NAME:
return getName();
case N4JSPackage.FUNCTION_OR_FIELD_ACCESSOR___GET_LOCAL_ARGUMENTS_VARIABLE:
return getLocalArgumentsVariable();
ca... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public MySqlSpoutConfig(MySqlConfig mysqlConfig,ZkBinLogStateConfig zkBinLogStateConfig,FailureConfig failureConfig,int metricsTimeBucketSizeInSecs,int bufferCapacity){
this.mysqlConfig=mysqlConfig;
this.zkBinLogStateConfig=zkBinLogStateConfig;
this.failureConfig=failureConfig;
this.metricsTimeBucketSizeInSecs=... | Initialize a spout configuration with sidelining. |
@Override public int hashCode(){
return getPath().hashCode();
}
| Uses sourceFile to create a hashCode. |
public ApproximateUpdater(BayesIm bayesIm,Evidence evidence){
if (bayesIm == null) {
throw new NullPointerException();
}
this.bayesIm=bayesIm;
setEvidence(evidence);
}
| Constructs a new updater for the given Bayes net. |
public TraceType_ createTraceType_(){
TraceType_Impl traceType_=new TraceType_Impl();
return traceType_;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public Where<T,ID> le(String columnName,Object value) throws SQLException {
addClause(new SimpleComparison(columnName,findColumnFieldType(columnName),value,SimpleComparison.LESS_THAN_EQUAL_TO_OPERATION));
return this;
}
| Add a '<=' clause so the column must be less-than or equals-to the value. |
private void processOverdueFilterStatus(){
overdueBtnClicked=!overdueBtnClicked;
managementUIState.getTargetTableFilters().setOverdueFilterEnabled(overdueBtnClicked);
if (overdueBtnClicked) {
buttonClicked.addStyleName(BTN_CLICKED);
eventBus.publish(this,TargetFilterEvent.FILTER_BY_STATUS);
}
else {
... | Process - OVERDUE. |
public static Operator indexScan_Default(IndexRowType indexType,boolean reverse,IndexKeyRange indexKeyRange){
if (indexKeyRange == null) {
indexKeyRange=IndexKeyRange.unbounded(indexType);
}
return indexScan_Default(indexType,reverse,indexKeyRange,indexType.tableType());
}
| Creates a scan operator for the given index, using LEFT JOIN semantics after the indexType's tableType. |
public void initialize(){
if (isInitialized()) {
return;
}
this.isInitialized=true;
}
| Initialize this instance. Get the useful parts of the input operation and event. |
@Override public boolean containsValue(Object val){
return _map.containsValue(unwrapValue(val));
}
| Checks for the presence of <tt>val</tt> in the values of the map. |
private void buildIfNeededMap(){
if (map == null) {
map=new HashMap<String,Value>(items.length);
for ( Entry<String,Value> miv : items) {
if (miv == null) {
break;
}
map.put(miv.getKey(),miv.getValue());
}
}
}
| Build the map if requested to, it does this lazily. |
@Override public String globalInfo(){
return "This Bayes Network learning algorithm uses conditional independence tests " + "to find a skeleton, finds V-nodes and applies a set of rules to find the directions " + "of the remaining arrows.";
}
| This will return a string describing the search algorithm. |
public long key(){
return _map._set[_index];
}
| Provides access to the key of the mapping at the iterator's position. Note that you must <tt>advance()</tt> the iterator at least once before invoking this method. |
protected CtClass removeCached(String classname){
return (CtClass)classes.remove(classname);
}
| Provide a hook so that subclasses can do their own caching of classes. |
public static String formatTime(Date date){
synchronized (dateFormat) {
return dateFormat.format(date);
}
}
| Formats the time to a String value. |
public String sqlAD_getSystemColumnsWithoutElement(String vendorName,String catalogName,String schemaName,ArrayList<String> customEntities){
String tableName="AD_Column";
String tableAlias="c";
ArrayList<String> columnNames=new ArrayList<String>();
columnNames.add("ColumnName");
columnNames.add("Name");
col... | gets the database specific SQL command to find system columns which have no base element |
@Override public int hashCode(){
return 65537 * super.hashCode() + 37 * _host.hashCode() + _port;
}
| Returns a hashCode for the path. |
protected void assertTextMessageEqual(String message,TextMessage m1,TextMessage m2) throws JMSException {
assertFalse(message + ": expected {" + m1+ "}, but was {"+ m2+ "}",m1 == null ^ m2 == null);
if (m1 == null) {
return;
}
assertEquals(message,m1.getText(),m2.getText());
}
| Tests if m1 and m2 are equal. |
@Deprecated public boolean isDetectMovieMultiDir(){
return detectMovieMultiDir;
}
| Should we detect (and create) movies from directories containing more than one movie? |
public ByteSendPacket send(byte[] bytes){
return send(bytes,null);
}
| Send byte array to queue |
boolean nodeIsTooSmall(NodeData nodeData){
return nodeData.getSelectedAttributes().length < 2 || SelectionCreator.getArbitraryValue(nodeData.getAllSelectedExamples()).length < MINIMAL_EXAMPLES_FOR_GROWING_PARALLEL;
}
| Decides whether the node is to small to do the splitting attribute parallel. |
public E poll(){
final Node<E> f=first;
return (f == null) ? null : unlinkFirst(f);
}
| Retrieves and removes the head (first element) of this list. |
void pointToCellRounded(int x,int y,int[] result){
pointToCellExact(x + (mCellWidth / 2),y + (mCellHeight / 2),result);
}
| Given a point, return the cell that most closely encloses that point |
void checkNotClosed(){
if (status == STATUS_CLOSED) {
throw DataUtils.newIllegalStateException(DataUtils.ERROR_CLOSED,"Transaction is closed");
}
}
| Check whether this transaction is open or prepared. |
private Object readResolve() throws ObjectStreamException {
if (this.equals(PolarAxisLocation.NORTH_RIGHT)) {
return PolarAxisLocation.NORTH_RIGHT;
}
else if (this.equals(PolarAxisLocation.NORTH_LEFT)) {
return PolarAxisLocation.NORTH_LEFT;
}
else if (this.equals(PolarAxisLocation.SOUTH_RIGHT)) {
... | Ensures that serialization returns the unique instances. |
public void valueChanged(ListSelectionEvent e){
selectionChanged();
}
| It is called when the table selection changes. |
private void prepareUserForRanking(User user){
User updatedUser=userRepository.findOne(user.getId(),0);
if (updatedUser.getImported() == null || !updatedUser.getImported()) {
updatedUser.setImported(true);
updatedUser.setPagerank(null);
updatedUser.setLastPageRank(null);
updatedUser.setCurrentRank(n... | Prepares a user to be ranked for the first time after having follower data imported, resetting the previous PageRanks and preparing for a new calculation and ranking. |
public void testGetHashKey() throws ChessParseError {
Position pos=TextIO.readFEN("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
long key=0x463b96181691fc9cL;
assertEquals(key,PolyglotBook.getHashKey(pos));
pos=TextIO.readFEN("rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1");
key=0x... | Test of getBookMove method, of class Book. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.