code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public VCard next(VCardVersion expectedVersion) throws IOException {
if (first) {
first=false;
}
else {
if (!warningsChecked) {
warnings(0);
}
int total=vcard.getProperties().size();
assertEquals("The vCard has " + total + " properties, but only "+ propertiesChecked+ " were checked.",prop... | Reads the next vCard object. Also checks to make sure all the properties from the previous vCard were verified. |
private void validateSQLFields(){
boolean flag=controller.isEnableSQLDatabaseOutput();
enableSQLDatabaseConnection.setSelected(flag);
sqlHostLabel.setEnabled(flag);
sqlHostField.setEnabled(flag);
sqlDatabaseLabel.setEnabled(flag);
sqlDatabaseField.setEnabled(flag);
sqlUserLabel.setEnabled(flag);
sqlUser... | Validates the UNCOMPRESSED Settings. |
private boolean hasConnectivityToAllSystems(Initiator initiator,Collection<URI> storageSystems,ExportGroup exportGroup){
return hasConnectivityToAllSystems(initiator,storageSystems,null,exportGroup);
}
| Checks if an initiator has connectivity to a storage system in a varray. |
public void endPrefixMapping(String prefix) throws SAXException {
flushStartDoc();
m_resultContentHandler.endPrefixMapping(prefix);
}
| Receive notification of the end of a Namespace mapping. <p>By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each prefix mapping.</p> |
public static String readAll(Reader rd) throws IOException {
StringBuilder sb=new StringBuilder();
int cp;
while ((cp=rd.read()) != -1) {
sb.append((char)cp);
}
return sb.toString();
}
| Read all. |
protected TextSyntax(String value,Locale locale){
this.value=verify(value);
this.locale=verify(locale);
}
| Constructs a TextAttribute with the specified string and locale. |
public static void addConceptMapAttributes(Element element,String conceptValueString){
String[] tokens=StringUtils.split(conceptValueString,"^");
ConceptService cs=Context.getConceptService();
try {
Concept concept=cs.getConcept(Integer.valueOf(tokens[0].trim()));
String prefSourceName=Context.getAdminist... | Methods replaces the conceptId with a concept source name and source code. |
@SuppressWarnings("unchecked") public static <K,V>ImmutableListMultimap<K,V> of(){
return (ImmutableListMultimap<K,V>)EmptyImmutableListMultimap.INSTANCE;
}
| Returns the empty multimap. |
public static RecyclerViewHeader fromXml(Context context,@LayoutRes int layoutRes){
RecyclerViewHeader header=new RecyclerViewHeader(context);
View.inflate(context,layoutRes,header);
return header;
}
| Inflates layout from <code>xml</code> and encapsulates it with <code>RecyclerViewHeader</code>. |
public Object next(){
if (currentWord == null) {
LinkedVector vector=(LinkedVector)super.next();
if (vector != null) currentWord=(Word)vector.get(0);
}
Word result=currentWord;
if (currentWord != null) currentWord=(Word)currentWord.next;
return result;
}
| Retrieves the next sentence from the files being parsed. |
public void normalizeOutdir(){
if (outputDir != null) return;
File destDir;
if (destinationDir != null) {
if (packageName == null) {
destDir=destinationDir;
}
else {
String path=packageName.replace('.',File.separatorChar);
destDir=new File(destinationDir,path);
}
}
else {
d... | Sets the actual output directory if not already set. Uses javac logic to determine output dir = dest dir + package name If not destdir has been set, output dir = parent of input file Assumes that package name is already set. |
public SVGPath relativeHorizontalLineTo(double x){
if (x > Double.NEGATIVE_INFINITY && x < Double.POSITIVE_INFINITY) {
append(PATH_HORIZONTAL_LINE_TO_RELATIVE,x);
}
return this;
}
| Draw a horizontal line to the given relative x coordinate. |
protected void registerOperator(Process process){
if (process != null) {
setName(process.registerName(getName(),this));
}
}
| Registers this operator in the given process. Please note that this might change the name of the operator. |
public boolean isModernTls(){
return modernTls;
}
| Returns true if this route uses modern TLS. |
public SQLRecoverableException(String reason,String sqlState){
super(reason,sqlState,0);
}
| Creates an SQLRecoverableException object. The Reason string is set to the given reason string, the SQLState string is set to the given SQLState string and the Error Code is set to 0. |
public static Calendar toCalendar(Date date,TimeZone timeZone,Locale locale){
Calendar cal=getCalendarInstance(timeZone,locale);
if (date != null) {
cal.setTime(date);
}
return cal;
}
| Returns a Calendar object initialized to the specified date/time, time zone, and locale. |
public Boolean isCompressLargeMessage(){
if (ActiveMQResourceAdapter.trace) {
ActiveMQRALogger.LOGGER.trace("isCompressLargeMessage()");
}
return raProperties.isCompressLargeMessage();
}
| Get compressLargeMessage |
public Tasks<VolumeRestRep> createFullCopy(URI id,VolumeFullCopyCreateParam input){
return postTasks(input,getFullCopyUrl(),id);
}
| Begins creating a full copy of the given block volume. <p> API Call: <tt>POST /block/volumes/{id}/protection/full-copies</tt> |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:57:19.368 -0500",hash_original_method="CB8395C0A8B6CFC4974D10648908BD61",hash_generated_method="20E6E3A8ED32C619C18A9D0CB16FE443") protected int tryAcquireShared(int ignore){
return innerIsDone() ? 1 : -1;
}
| Implements AQS base acquire to succeed if ran or cancelled |
public void rolledback(CompositeTransaction tx){
removeTransaction(tx);
}
| Called if a tx is ended with failure. In order to remove tx from mapping. |
public float avgPrimariesPerNode(){
return ((float)metaData.numberOfShards()) / nodes.size();
}
| Returns the global average of primaries per node |
public float noise(float x,float y,float z){
if (perlin == null) {
if (perlinRandom == null) {
perlinRandom=new Random();
}
perlin=new float[PERLIN_SIZE + 1];
for (int i=0; i < PERLIN_SIZE + 1; i++) {
perlin[i]=perlinRandom.nextFloat();
}
perlin_cosTable=PGraphics.cosLUT;
perli... | Computes the Perlin noise function value at x, y, z. |
private boolean updateZone(MDSDialog dialog,ZoneUpdate updateZone,Integer vsanId,List<Zone> zonesInFabric,boolean activateZones) throws NetworkDeviceControllerException {
_log.info("Updating zone: " + updateZone.getName() + " vsan: "+ vsanId);
boolean updated=false;
Zone zoneInFabric=getZoneInFabric(updateZone.ge... | Update the zone of the given fabric Checks if the zone with the same name already exists before update. The rules for updating a zone are: It must be exist in fabric |
public TcpServer tcpServer(){
return _myOscNetManager.tcpServer();
}
| return the instance of the running TCP server if in TCP mode. |
public static void main(final String[] args){
DOMTestCase.doMain(textwithnomarkup.class,args);
}
| Runs this test from the command line. |
public XYLocation east(){
return new XYLocation(xCoOrdinate + 1,yCoOrdinate);
}
| Returns the location one unit right of this location. |
public void playNext(){
if (mNextListener != null && mNextButton != null && mNextButton.getVisibility() == View.VISIBLE) {
mNextListener.onClick(mNextButton);
}
}
| Triggers click of next button. |
public static CloseableHttpClient basic(String user,String password){
return basic(null,null);
}
| Create a basic authentication HTTP client with a fixed user and password. |
private void initView(){
WebSettings settings=mWebView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setSupportZoom(false);
btnComment.setClickable(false);
ScrollerBottomLayoutDelegation.delegation(mNestedScroller,mBottomLayout);
}
| init view |
public static boolean isDiscoveryJobTypeSupported(String jobType){
return jobType != null && Arrays.asList(DISCOVERY_JOB_TYPES).contains(jobType);
}
| Check whether the given jobType is one of supported discovery job type. |
public void addButtonActionPerformed(){
int nodeAddress=readNodeAddress();
if (nodeAddress < 0) {
return;
}
curNode=(SerialNode)_memo.getTrafficController().getNodeFromAddress(nodeAddress);
if (curNode != null) {
statusText1.setText(rb.getString("Error1") + Integer.toString(nodeAddress) + rb.getString... | Method to handle add button |
public EObject basicGetAstElement(){
return astElement;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public void log(@GuardSatisfied Level level,String msg,@GuardSatisfied Object param1){
throw new RuntimeException();
}
| Log a message, with one object parameter. <p> If the logger is currently enabled for the given message level then a corresponding LogRecord is created and forwarded to all the registered output Handler objects. <p> |
public final synchronized boolean canMoveVariationUp(){
return game.canMoveVariation(-1);
}
| Return true if the current variation can be moved closer to the main-line. |
private void returnData(Object ret){
if (myHost != null) {
myHost.returnData(ret);
}
}
| Used to communicate a return object from a plugin tool to the main Whitebox user-interface. |
private boolean journalRebuildRequired(){
final int redundantOpCompactThreshold=2000;
return redundantOpCount >= redundantOpCompactThreshold && redundantOpCount >= lruEntries.size();
}
| We only rebuild the journal when it will halve the size of the journal and eliminate at least 2000 ops. |
public void syncEvent(@NonNull MessageEvent messageEvent){
byte[] objectArray=messageEvent.getData();
int indexClassDelimiter=messageEvent.getPath().lastIndexOf(WearBusTools.CLASS_NAME_DELIMITER);
String className=messageEvent.getPath().substring(indexClassDelimiter + 1);
boolean isEventMessage=messageEvent.get... | Will take a MessageEvent from GooglePlayServices and attempt to parse WearEventBus data to sync with the local EventBus |
private void init(){
String cfName=_clazz.getAnnotation(Cf.class).value();
_cf=new ColumnFamily<String,CompositeColumnName>(cfName,StringSerializer.get(),CompositeColumnNameSerializer.get());
BeanInfo bInfo;
try {
bInfo=Introspector.getBeanInfo(_clazz);
}
catch ( IntrospectionException ex) {
throw D... | Initializes cf & all column metadata for this data type |
public static void main(String[] args){
junit.textui.TestRunner.run(ResultSetTest.class);
}
| Runs all test cases in this test suite |
public int normalize(char s[],int len){
for (int i=0; i < len; i++) {
switch (s[i]) {
case '\u0928':
if (i + 1 < len && s[i + 1] == '\u094D') {
s[i]='\u0902';
len=delete(s,i + 1,len);
}
break;
case '\u0901':
s[i]='\u0902';
break;
case '\u093C':
len=delete(s,i,len);
i--;
break;
case '... | Normalize an input buffer of Hindi text |
public AddUIResource(java.awt.Component c,EditableResources res){
super((java.awt.Frame)SwingUtilities.windowForComponent(c),true);
initComponents();
ModifiableJOptionPane.reverseOKCancel(ok,cancel);
name.setText(AddResourceDialog.nextAvailableName(res,"GUI"));
try {
templateDetails.setPage(getClass().get... | Creates new form AddThemeResource |
private E doRemove(Object okey,Object value){
Comparable<? super E> key=comparable(okey);
for (; ; ) {
Node<E> b=findPredecessor(key);
Node<E> n=b.next;
for (; ; ) {
if (n == null) return null;
Node<E> f=n.next;
if (n != b.next) break;
Object v=n.value;
if (v ==... | Main deletion method. Locates node, nulls value, appends a deletion marker, unlinks predecessor, removes associated index nodes, and possibly reduces head index level. Index nodes are cleared out simply by calling findPredecessor. which unlinks indexes to deleted nodes found along path to key, which will include the in... |
public boolean isSetKey(){
return this.key != null;
}
| Returns true if field key is set (has been assigned a value) and false otherwise |
public Builder customProperty(Property property){
int index=customProperties.stream().filter(null).findFirst().map(null).orElse(-1);
if (index > -1) {
customProperties.set(index,property);
}
else {
customProperties.add(property);
}
return this;
}
| Sets metadata custom property. |
void displayWarningLog(Window w){
ToolDialog wd=new ToolDialog(PolicyTool.getMessage("Warning"),tool,this,true);
Point location=((w == null) ? getLocationOnScreen() : w.getLocationOnScreen());
wd.setLayout(new GridBagLayout());
JTextArea ta=new JTextArea();
ta.setEditable(false);
for (int i=0; i < tool.warn... | display the warning log |
void processNew(Instruction s){
for ( HeapOperand<?> def : ssa.getHeapDefs(s)) {
DF_LatticeCell c=findOrCreateCell(def.getHeapVariable());
if (c instanceof ObjectCell) {
((ObjectCell)c).setBOTTOM();
}
else {
((ArrayCell)c).setBOTTOM();
}
}
}
| Update the set of dataflow equations to account for the actions of allocation instruction s |
public void insert(int index,Boolean value){
if (value == null) {
insertNull(index);
}
else {
_insert(index,booleanNode(value.booleanValue()));
}
}
| Alternative method that we need to avoid bumping into NPE issues with auto-unboxing. |
private void sendMessage(){
String msg=mMessageText.getText().toString();
Nearby.Connections.sendReliableMessage(mGoogleApiClient,mOtherEndpointId,msg.getBytes());
mMessageText.setText(null);
}
| Send a reliable message to the connected peer. Takes the contents of the EditText and sends the message as a byte[]. |
@Override public synchronized int available(){
return count - pos;
}
| Returns the number of remaining bytes. |
public LowerCaseFilter(TokenStream in){
super(in);
}
| Create a new LowerCaseFilter, that normalizes token text to lower case. |
protected void onPageScrolled(){
final int scrollX=getScrollX();
final int childCount=getChildCount();
for (int i=0; i < childCount; i++) {
final View child=getChildAt(i);
final float transformPos=(float)(child.getLeft() - scrollX) / getClientWidth();
transformPage(child,transformPos);
}
}
| This method will be invoked when the current page is scrolled, either as part of a programmatically initiated smooth scroll or a user initiated touch scroll. |
public String toString(){
if (value == null) {
return '[' + localName + ']';
}
return '[' + localName + "=\""+ value+ "\"]";
}
| Returns a text representation of this object. |
public static PropertiesReader loadFromClasspath(String propertiesFile){
return new PropertiesReader(loadPropertiesFromClasspath(propertiesFile));
}
| Loads a properties reader for the given properties file on the classpath. |
@Override protected boolean isHorizontal(){
return false;
}
| Returns if this is a horizontal specification (vs. vertical). Used to distinct between horizontal and vertical dialog units, which have different conversion factors. |
public ToStringBuilder append(final String fieldName,final char[] array,final boolean fullDetail){
style.append(buffer,fieldName,array,Boolean.valueOf(fullDetail));
return this;
}
| <p>Append to the <code>toString</code> a <code>char</code> array.</p> <p>A boolean parameter controls the level of detail to show. Setting <code>true</code> will output the array in full. Setting <code>false</code> will output a summary, typically the size of the array.</p> |
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){
switch (featureID) {
case TypesPackage.ANNOTATION__PROPERTIES:
return getProperties();
case TypesPackage.ANNOTATION__TARGETS:
return getTargets();
}
return super.eGet(featureID,resolve,coreType);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
private void runExternalChecks(LimeWireCore limeWireCore,String[] args){
ExternalControl externalControl=limeWireCore.getExternalControl();
if (args.length > 0 && !args[0].equals("-startup")) {
String arg=externalControl.preprocessArgs(args);
externalControl.checkForActiveFrostWire(arg);
externalControl... | Initializes any code that is dependent on external controls. Specifically, GURLHandler & MacEventHandler on OS X, ensuring that multiple LimeWire's can't run at once, and processing any arguments that were passed to LimeWire. |
public Vector3d mulPosition(Matrix4x3fc mat){
return mulPosition(mat,this);
}
| Multiply the given 4x3 matrix <code>mat</code> with <code>this</code>. <p> This method assumes the <tt>w</tt> component of <code>this</code> to be <tt>1.0</tt>. |
public void detach(){
m_currentNode=DTM.NULL;
m_dtm=null;
m_traverser=null;
m_isFresh=true;
m_root=DTM.NULL;
}
| Detaches the walker from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. |
@SuppressWarnings("unchecked") void checkIfError(ResourceNode node) throws ResourceCollectionException {
if (node.getObject() != null) {
if (node.getObject() instanceof ResourceCollectionException) {
throw (ResourceCollectionException)node.getObject();
}
else if (node.getObject() instanceof Map<?,?... | Checks if the given node represents an exception. <br /> If it represents an error, an exception is thrown. |
public double localScore(int i){
throw new UnsupportedOperationException();
}
| Specialized scoring method for no parents. Used to speed up the effect edges search. |
public void update(IBlockAccess access,Multiblock mb,BlockPos anchorPos){
originalBlockAccess=access;
multiblock=mb;
this.anchorPos=anchorPos;
hasBlockAccess=access != null;
}
| Updates the block access to the new parameters |
public int index(){
return index;
}
| Gets the index of this local in the array of parameters. This is NOT the JVM local index. |
public final Iterator<String> categoriesIterator(){
return mCategories != null ? mCategories.iterator() : null;
}
| Return an iterator over the filter's categories. |
public static void main(final String[] args){
DOMTestCase.doMain(attrdefaultvalue.class,args);
}
| Runs this test from the command line. |
public Object readRemote() throws IOException {
String type=readType();
String url=readString();
return resolveRemote(type,url);
}
| Reads a remote object. |
public boolean isShowTextOverlay(){
return (worldScene.getShowTextOverlay());
}
| Get text overlay visibility |
public void onExceededDatabaseQuota(String url,String databaseIdentifier,long quota,long estimatedDatabaseSize,long totalQuota,WebStorage.QuotaUpdater quotaUpdater){
if (mWebChromeClient == null) {
quotaUpdater.updateQuota(quota);
return;
}
Message exceededQuota=obtainMessage(EXCEEDED_DATABASE_QUOTA);
H... | Called by WebViewCore to inform the Java side that the current origin has overflowed it's database quota. Called in the WebCore thread so posts a message to the UI thread that will prompt the WebChromeClient for what to do. On return back to C++ side, the WebCore thread will sleep pending a new quota value. |
private void updateCurrentActionsList(){
currentActionListModel.clear();
for ( NetworkUpdateAction action : network.getUpdateManager().getActionList()) {
currentActionListModel.addElement(action);
}
repaint();
}
| Update the JList's model. |
public DTNHost createHost(MovementModel mmProto,String name){
if (settings.getNameSpace() == null) {
settings.setNameSpace(IFACE_NS);
}
if (!this.settings.contains(NetworkInterface.TRANSMIT_RANGE_S)) {
settings.putSetting(NetworkInterface.TRANSMIT_RANGE_S,"1.0");
settings.putSetting(NetworkInterface.T... | Creates a host with defined movement model |
@Override public void addQueueSimulationListeners(MobsimListener listener){
this.listenerManager.addQueueSimulationListener(listener);
}
| Adds the QueueSimulationListener instance given as parameters as listener to this QueueSimulation instance. |
public String toString(){
return mPath;
}
| for debugging |
@Override public void removePropertyChangeListener(PropertyChangeListener pcl){
m_pcs.removePropertyChangeListener(pcl);
}
| Remove a property change listener |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:51.514 -0500",hash_original_method="77FDB26F7E07396FBB2F925B9C6125A4",hash_generated_method="EC73CBB8EAD727032252B9D5371705BD") public static boolean putString(ContentResolver resolver,String name,String value){
if (MOVED_TO_SECUR... | Store a name/value pair into the database. |
private String toString(BalancedBinaryNode<K,V> node){
if (node == null) {
return "";
}
StringBuilder sb=new StringBuilder("(");
sb.append(toString(node.left()));
sb.append(node.toString());
sb.append(toString(node.right()));
return sb.append(")").toString();
}
| Return string of sub-tree rooted at node. Recursive operation. |
public Short(short value){
this.value=value;
}
| Constructs a Short object initialized to the specified short value. value - the initial value of the Short |
public int optInt(String key){
return optInt(key,0);
}
| Get an optional int value associated with a key, or zero if there is unknown such key or if the value is not a number. If the value is a string, an attempt will be made to evaluate it as a number. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:03.129 -0500",hash_original_method="D08BA028CDC8B846863357DB1B876085",hash_generated_method="C93B72394AF8999743A4416F94F84797") @Deprecated public synchronized void clear(){
mPlugins.clear();
}
| Clears the plugin list. |
public boolean addressTypeUnique(){
return true;
}
| There are no ambiguous addresses on this system. |
protected byte[] generateData(int size,DataType type,Random rng){
int min=Byte.MIN_VALUE;
int max=Byte.MAX_VALUE;
if (type == DataType.TEXT) {
min=32;
max=126;
}
byte[] result=new byte[size];
Log.i(LOG_TAG,"Generating data of size: " + size);
if (rng == null) {
rng=new LoggingRng();
}
for ... | Helper to generate a random blob of bytes using a given RNG. |
public Builder put(String key,String value){
if (key != null && value != null) {
mParams.put(key,value);
}
return this;
}
| Adds a key/value string pair to the request. |
public void withVisualItem(AggregateItem item,Consumer<VisualItem> cb){
Iterator it=item.items(IS_SWITCH_PREDICATE);
if (it.hasNext()) {
cb.accept((VisualItem)it.next());
}
}
| Runs the callback on all switch nodes within the aggregate (WILL BE ONLY ONE). |
private void jbInit() throws Exception {
int line=0;
queryPanel.add(reportField,new GridBagConstraints(0,line,3,1,0,0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(0,0,0,0),0,0));
reportField.addActionListener(this);
queryPanel.add(processLabel,new GridBagConstraints(0,++line,1,1,0,0,GridBagConstra... | Static Init |
static private void addLinkedDefinition(WbXmlDefinition def,String value){
def.getLinkedDefinitions().put(value,null);
}
| Private method that adds the linked definition to the current one. This method is calling during the file processing, cos the linked definition could not be loaded yet it just store the name. Then another method will put the complete definition. |
private PositionedReadable in() throws IOException {
if (opened) {
if (err != null) throw err;
}
else {
opened=true;
try {
in=fs.open(path,bufSize);
if (in == null) throw new IOException("Failed to open input stream (file system returned null): " + path);
}
catch ( IOExcep... | Get input stream. |
public XYEntry<K,V> removeByIndex(int index){
K key=indexList.remove(index);
return new XYEntry<K,V>(key,this.remove(key));
}
| Removes entry from map by index |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:56.365 -0500",hash_original_method="489D29010318A7E75E7BD15B3041DE9E",hash_generated_method="879A428473929333048F52A723E405DE") public static boolean isStatusClientError(int status){
return (status >= 400 && status < 500);
}
| Returns whether the status is a client error (i.e. 4xx). |
public void clearOutputElements(){
peekOutputElements().clear();
}
| Clears the record of the elements output so far to the main output. |
protected boolean isBottomEdge(@NonNull SpanLookup spanLookup,int position,int childCount){
int latestCheckedPosition=childCount - 1;
for (; latestCheckedPosition >= 0; latestCheckedPosition--) {
int spanIndex=spanLookup.getIndex(latestCheckedPosition);
if (spanIndex == 0) {
break;
}
}
return ... | Determines if the item at <code>position</code> is a bottom-most view |
public static Test suite(){
return (new TestSuite(FaceletsITCase.class));
}
| Return the tests included in this test suite. |
public static void main(String[] args){
log.info("===================================================================");
log.info(" Generating a plans file from an UrbanSim population query. ");
log.info("-------------------------------------------------------------------");
MyDemandGenerator mdg=new MyDemandG... | Implements the <code>MyDemandGenerator</code> class. |
public int normalize(char s[],int len){
for (int i=0; i < len; i++) {
switch (s[i]) {
case FARSI_YEH:
case YEH_BARREE:
s[i]=YEH;
break;
case KEHEH:
s[i]=KAF;
break;
case HEH_YEH:
case HEH_GOAL:
s[i]=HEH;
break;
case HAMZA_ABOVE:
len=delete(s,i,len);
i--;
break;
default :
break;
}
}
return len;
}
| Normalize an input buffer of Persian text |
public URLConnection(URL u){
super(u);
properties=new MessageHeader();
}
| Create a URLConnection object. These should not be created directly: instead they should be created by protocol handers in response to URL.openConnection. |
@Override public boolean status(){
return true;
}
| Check that this object is ready to operate. This is a question of configuration, not transient hardware status. |
public void readSequence(StringBuffer sequence,DataType dataType,String delimiters,int maxSites,String gapCharacters,String missingCharacters,String matchCharacters,String matchSequence) throws IOException, ImportException {
char ch=read();
try {
int n=0;
while (n < maxSites && delimiters.indexOf(ch) == -1)... | Reads sequences, skipping over any comments and filtering using dataType. |
@Override public <R>Task<R> offerJob(T key,Supplier<Task<R>> job,int maxQueueSize){
if (key == null) {
executorService.execute(null);
}
return getSerializer(key).executeSerialized(null,maxQueueSize);
}
| Only accepts if the queue size is not exceeded. |
public ParseException(String message){
super(message);
}
| Creates a <code>ParseException</code> with the given detail message. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:14.074 -0500",hash_original_method="FB275304C6A60067CFDA4B800CA085AD",hash_generated_method="B0D60E7C0E7958119A198825437CB9DE") protected DERObject buildObject(int tag,int tagNo,int length) throws IOException {
boolean isConstruct... | build an object given its tag and the number of bytes to construct it from. |
public static double[] toPrimitive(final Double[] array){
if (array == null) {
return null;
}
else if (array.length == 0) {
return ArrayUtils.EMPTY_DOUBLE_ARRAY;
}
final double[] result=new double[array.length];
for (int i=0; i < array.length; i++) {
result[i]=array[i].doubleValue();
}
retu... | <p>Converts an array of object Doubles to primitives.</p> <p>This method returns <code>null</code> for a <code>null</code> input array.</p> |
private void handleNumericAttribute(Instances trainInstances) throws Exception {
m_c45S=new C45Split(m_attIndex,2,m_sumOfWeights,true);
m_c45S.buildClassifier(trainInstances);
if (m_c45S.numSubsets() == 0) {
return;
}
m_errors=0;
Instances[] trainingSets=new Instances[m_complexityIndex];
trainingSets[... | Creates split on numeric attribute. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.