Prints PDA state attributes
181382
def printer(self):
        """"""
        print " ID " + repr(self.id)
        if self.type == 0:
            print " Tag: - "
            print " Start State - "
        elif self.type == 1:
            print " Push " + repr(self.sym)
        elif self.type == 2:
            print " Pop State " + repr(self.sym)
        elif self.type == 3:
            print " Read State " + repr(self.sym)
        elif self.type == 4:
            print " Stop State " + repr(self.sym)
        for j in self.trans:
            if len(self.trans[j]) > 1 or (len(self.trans[j]) == 1):
                for symbol in self.trans[j]:
                    print " On Symbol " + repr(symbol) + " Transition To State " + repr(j)
1048571
def widget_attrs(self, widget):
        
        attrs = {}
        if getattr(self, "min_value", None) is not None:
            attrs['min'] = self.min_value
        if getattr(self, "max_value", None) is not None:
            attrs['max'] = self.max_value
        return attrs
1315155
def do_printActivity(self,args):
        """"""
        parser = CommandArgumentParser("printActivity")
        parser.add_argument(dest='index',type=int,help='refresh');
        args = vars(parser.parse_args(args))
        index = args['index']

        activity = self.activities[index]
        pprint(activity)
1253009
private static String printStatement(Context context, JCStatement statement) {
    StringWriter writer = new StringWriter();
    try {
      pretty(context, writer).printStat(statement);
    } catch (IOException e) {
      throw new AssertionError("StringWriter cannot throw IOExceptions");
    }
    return writer.toString();
  }
281374
def print_status(self):
        """"""
        s = []
        s.append('=== State Machines: ===\n')
        for stm_id in Driver._stms_by_id:
            stm = Driver._stms_by_id[stm_id]
            s.append('    - {} in state {}\n'.format(stm.id, stm.state))
        s.append('=== Events in Queue: ===\n')
        for event in self._event_queue.queue:
            if event is not None:
                s.append('    - {} for {} with args:{} kwargs:{}\n'.format(
                    event['id'], event['stm'].id,
                    event['args'], event['kwargs']))
        s.append('=== Active Timers: {} ===\n'.format(len(self._timer_queue)))
        for timer in self._timer_queue:
            s.append('    - {} for {} with timeout {}\n'.format(
                timer['id'], timer['stm'].id, timer['timeout']))
        s.append('=== ================ ===\n')
        return ''.join(s)
1217511
def pretty_print_device(device):
    """"""
    logging.info('Device Instance ID: %s' % device['id'])
    if 'nickname' in device:
        logging.info('    Nickname: %s' % device['nickname'])
    if 'modelId' in device:
        logging.info('    Model: %s' % device['modelId'])
    logging.info('')
1242385
public void printHtmlOptional(PrintWriter out, String strTag, String strParams, String strData)
    {
        String strField = ((BasePanel)this.getRecordOwner()).getProperty("field");
        if ((strField != null) && (strField.length() > 0) && (m_recDetail.getField(strField) != null))
        {
            String string = m_recDetail.getField(strField).toString();
            if (strField.equalsIgnoreCase("TechnicalInfo"))
            {
                string = this.getRecordOwner().getProperty("tech");   // Special case - For Technical Info, Only output if &tech is found
                if (string != null)
                    string = "yes";
            }
            if ((string != null) && (string.length() > 0))
                this.parseHtmlData(out, strData);   // If the data is not blank, then process the HTML
            // Otherwise, don't output the HTML
        }
    }
424183
def printActiveIndices(self, state, andValues=False):
    
    (cols, cellIdxs) = state.nonzero()

    if len(cols) == 0:
      print "NONE"
      return

    prevCol = -1
    for (col,cellIdx) in zip(cols, cellIdxs):
      if col != prevCol:
        if prevCol != -1:
          print "] ",
        print "Col %d: [" % (col),
        prevCol = col

      if andValues:
        print "%d: %s," % (cellIdx, state[col,cellIdx]),
      else:
        print "%d," % (cellIdx),
    print "]"
806628
@Override
    public void print(
        ChronoDisplay context,
        Appendable buffer,
        AttributeQuery attributes
    ) throws IOException {

        NumberSystem numsys = attributes.get(Attributes.NUMBER_SYSTEM, NumberSystem.ARABIC);
        char zeroChar = (
            attributes.contains(Attributes.ZERO_DIGIT)
            ? attributes.get(Attributes.ZERO_DIGIT).charValue()
            : (numsys.isDecimal() ? numsys.getDigits().charAt(0) : '0'));
        this.print(context, buffer, attributes, numsys, zeroChar, 1, 10);

    }
1076771
public void printHtmlSeeAlso(PrintWriter out, String strTag, String strParams, String strData)
    {
        String strSeeAlso = m_recDetail.getSeeAlso();
        if ((strSeeAlso != null) && (strSeeAlso.length() > 0) && (strSeeAlso.indexOf('<') == -1))
        { // List of classes to reference
            int iStartClass = 0;
            while (true)
            {
                int iEndClass = strSeeAlso.indexOf(',', iStartClass);
                if (iEndClass == -1)
                    iEndClass = strSeeAlso.length();
                String strClass = strSeeAlso.substring(iStartClass, iEndClass);

                this.parseHtmlClassInfo(out, strTag, strParams, strData, strClass);

                iStartClass = iEndClass + 1;
                if (iStartClass >= strSeeAlso.length())
                    break;
                if (strSeeAlso.charAt(iStartClass) == ' ')
                    iStartClass++;
            }
        }
        else
            this.parseHtmlData(out, strSeeAlso);
    }
413274
public void printHtmlField(PrintWriter out, String strTag, String strParams, String strData)
    {
        String strField = ((BasePanel)this.getRecordOwner()).getProperty("name");
        if ((strField != null) && (strField.length() > 0) && (m_recDetail.getField(strField) != null))
        {
            String string = m_recDetail.getField(strField).toString();
            out.print(string);
        }
    }
590985
private static String printStatements(Context context, Iterable<JCStatement> statements) {
    StringWriter writer = new StringWriter();
    try {
      pretty(context, writer).printStats(com.sun.tools.javac.util.List.from(statements));
    } catch (IOException e) {
      throw new AssertionError("StringWriter cannot throw IOExceptions");
    }
    return writer.toString();
  }
890852
function printCollectedDeviceData(results) {
        var dataToKeep = {
            'AIN0': 'val',
            'FIRMWARE_VERSION': 'val',
            'WIFI_IP': 'str',
            'ETHERNET_IP': 'str',
            'WIFI_RSSI': 'str',
            'WIFI_VERSION': 'val',
            'SERIAL_NUMBER': 'val',
            'HARDWARE_INSTALLED': 'productType',
        };
        var vals = [];
        results.forEach(function(result) {
            result = result.data;
            var data = {};
            var keyToKeep = 'res';
            if(dataToKeep[result.name]) {
                keyToKeep = dataToKeep[result.name];
            }
            data[result.name] = result.res;
            if(result[keyToKeep]) {
                data[result.name] = result[keyToKeep];
            }
            vals.push(data);
        });

        if(DEBUG_COLLECTED_DEVICE_DATA) {
            console.log('Connection Type', self.curatedDevice.savedAttributes.connectionTypeName);
            console.log('Serial Number', self.curatedDevice.savedAttributes.serialNumber);
            console.log('Read Data', self.curatedDevice.getDevice().handle,':');
            console.log(vals);
        }
    }
736997
public void printHtmlClassInfo(PrintWriter out, String strTag, String strParams, String strData)
    {
        String strClass = ((BasePanel)this.getRecordOwner()).getProperty("name");
        if (strClass != null) if (strClass.length() > 0)
            if (strData != null) if (strData.length() > 0)
        {
            this.parseHtmlClassInfo(out, strTag, strParams, strData, strClass);
        }
    }
942312
protected function runningState()
    {
        $char = $this->getCurrentChar();

        if ($char === self::CHAR_AT) {
            $this->setState(self::IN_ATRULE);
            $this->bufferize($char);
            $this->output($char);
        } elseif ($char === self::CHAR_STAR && $this->getPreviousChar() === self::CHAR_SLASH) {
            $this->setState(self::IN_MAINCOMMENT);
            $this->output($char);
        } elseif ($char === self::CHAR_SLASH) {
            $this->output($char);
        } elseif (self::isWhiteSpace($char) === false && $char !== self::CHAR_CLOSINGBRACE) {
            $this->bufferize($char);
            $this->setState(self::IN_SELECTOR);
        } else {
            $this->output($char);
        }
    }
561996
def publish_pdb_state(self):
        
        if self._pdb_obj and self._do_publish_pdb_state:
            state = dict(namespace_view = self.get_namespace_view(),
                         var_properties = self.get_var_properties(),
                         step = self._pdb_step)
            self.send_spyder_msg('pdb_state', content={'pdb_state': state})
        self._do_publish_pdb_state = True
788831
public void printRulesTree(State rootState) {
		List<State> nextStates = rootState.getNextStates();
		if (nextStates.isEmpty()) {
			return;
		}
		for (int i = 0; i < rootState.getNextStates().size(); i++) {
			State currState = nextStates.get(i);
			String accept = "";
			if (currState instanceof AcceptState) {
				accept = Long.toString(((AcceptState) currState).getRule().getId());
			}
			System.out.printf("state[%4d], parent[%4d], rule[%4s], element[%s]\n", Integer.valueOf(currState.getName()), Integer.valueOf(rootState.getName()), accept, RuleUtils.getPatternElementAsString(currState.getElement()));
			this.printRulesTree(nextStates.get(i));
		}
	}