reqScannerSubscription(EClient self, int tickerId, ScannerSubscription subscription, TagValueListSPtr const & scannerSubscriptionOptions)
197650
def reqScannerSubscription(self, tickerId, subscription, scannerSubscriptionOptions):
        """"""
        return _swigibpy.EClient_reqScannerSubscription(self, tickerId, subscription, scannerSubscriptionOptions)
934797
def startSubscription(self, reqId, subscriber, contract=None):
        
        self._reqId2Contract[reqId] = contract
        self.reqId2Subscriber[reqId] = subscriber
270040
private StmtTargetTableScan simplifierForSubquery(AbstractParsedStmt subquery) {
        // Must be a SELECT statement (not a SET operation)
        if (!(subquery instanceof ParsedSelectStmt)) {
            return null;
        }
        ParsedSelectStmt selectSubquery = (ParsedSelectStmt) subquery;
        // No aggregation and/or GROUP BY is allowed
        if (selectSubquery.hasAggregateOrGroupby()) {
            return null;
        }
        // No DISTINCT
        if (selectSubquery.hasAggregateDistinct()) {
            return null;
        }
        // No windowed aggregate functions like RANK.
        if (selectSubquery.hasWindowFunctionExpression()) {
            return null;
        }
        // No LIMIT/OFFSET
        if (selectSubquery.hasLimitOrOffset() || selectSubquery.hasLimitOrOffsetParameters()) {
            return null;
        }
        // Only SELECT from a single TARGET TABLE is allowed
        int tableCount = 0;
        StmtTargetTableScan simpler = null;
        for (Map.Entry<String, StmtTableScan> entry : selectSubquery.getScanEntrySet()) {
            if (entry.getKey().startsWith(AbstractParsedStmt.TEMP_TABLE_NAME)) {
                // This is an artificial table for a subquery expression
                continue;
            }
            if (++tableCount > 1) {
                return null;
            }
            // Only allow one TARGET TABLE, not a nested subquery.
            StmtTableScan scan = entry.getValue();
            if (scan instanceof StmtTargetTableScan) {
                simpler = (StmtTargetTableScan) scan;
            }
            else {
                return null;
            }
        }
        return simpler;
    }
1211372
protected void scanSuper(TypeElement e) {
    TypeElement superElement =
        (TypeElement) utils.typeUtils.asElement(e.getSuperclass());
    if (superElement != null) {
      superElement.accept(new ContractExtensionBuilder(), type);
    }
    for (TypeMirror iface : e.getInterfaces()) {
      TypeElement ifaceElement =
          (TypeElement) utils.typeUtils.asElement(iface);
      ifaceElement.accept(new ContractExtensionBuilder(), type);
    }
  }
837939
public void subscribe(ArrayList<Long> tokens) {
        if(ws != null) {
            if (ws.isOpen()) {
                createTickerJsonObject(tokens, mSubscribe);
                ws.sendText(createTickerJsonObject(tokens, mSubscribe).toString());
                subscribedTokens.addAll(tokens);
                for(int i = 0; i < tokens.size(); i++){
                    modeMap.put(tokens.get(i), modeQuote);
                }
            }else {
                if(onErrorListener != null) {
                    onErrorListener.onError(new KiteException("ticker is not connected", 504));
                }
            }
        }else {
            if(onErrorListener != null) {
                onErrorListener.onError(new KiteException("ticker is null not connected", 504));
            }
        }
    }
606534
public SubscriptionDefinition querySubscription(String subId) 
  throws SIDurableSubscriptionNotFoundException, SINotPossibleInCurrentConfigurationException, SIIncorrectCallException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "querySubscription", subId);

    checkStarted();
    
    if (subId == null)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "querySubscription", "Exception SubId null");

      throw new SIIncorrectCallException(
        nls.getFormattedMessage(
          "SUBSCRIPTION_DOESNT_EXIST_ERROR_CWSIP0072",
          new Object[] { null,
                         messageProcessor.getMessagingEngineName() },
          null));
    }

    ConsumerDispatcherState subState = null;
    HashMap durableSubs = destinationManager.getDurableSubscriptionsTable();

    synchronized (durableSubs)
    {
      //Look up the consumer dispatcher for this subId in the system durable subs list
      ConsumerDispatcher cd = (ConsumerDispatcher) durableSubs.get(subId);

      if (cd == null)
      {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
          SibTr.exit(tc, "querySubscription", "Subscription not found");

        throw new SIDurableSubscriptionNotFoundException(
          nls.getFormattedMessage(
            "SUBSCRIPTION_DOESNT_EXIST_ERROR_CWSIP0072",
            new Object[] { subId,
                           messageProcessor.getMessagingEngineName() },
            null));
      }

      // Obtain the subscription state from the consumer dispatcher
      subState = cd.getConsumerDispatcherState();
    }
    
    DestinationHandler dest = null;
    try
    {    
      dest = 
        destinationManager.getDestination(subState.getTopicSpaceUuid(), true);
    }
    catch (SITemporaryDestinationNotFoundException e)
    {
      // No FFDC code needed 
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "querySubscription", "SINotPossibleInCurrentConfigurationException");
      throw new SINotPossibleInCurrentConfigurationException(e.getMessage());
    }

    // Create subscription definition
    SubscriptionDefinition subDef =
      new SubscriptionDefinitionImpl(
        dest.getName(),
        subState.getSelectionCriteria().getDiscriminator(),
        subState.getSelectionCriteria().getSelectorString(),
        subState.getSelectionCriteria().getSelectorDomain().toInt(),
        subState.getUser(),
        subState.isNoLocal(),
        subState.getDurableHome());

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "querySubscription", subDef);

    return subDef;
  }
450512
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public ScanRecord parseFromBytes(byte[] scanRecord) {
        if (scanRecord == null) {
            return null;
        }

        int currentPos = 0;
        int advertiseFlag = -1;
        List<ParcelUuid> serviceUuids = new ArrayList<ParcelUuid>();
        String localName = null;
        int txPowerLevel = Integer.MIN_VALUE;

        SparseArray<byte[]> manufacturerData = new SparseArray<>();
        Map<ParcelUuid, byte[]> serviceData = new HashMap<>();

        try {
            while (currentPos < scanRecord.length) {
                // length is unsigned int.
                int length = scanRecord[currentPos++] & 0xFF;
                if (length == 0) {
                    break;
                }
                // Note the length includes the length of the field type itself.
                int dataLength = length - 1;
                // fieldType is unsigned int.
                int fieldType = scanRecord[currentPos++] & 0xFF;
                switch (fieldType) {
                    case DATA_TYPE_FLAGS:
                        advertiseFlag = scanRecord[currentPos] & 0xFF;
                        break;
                    case DATA_TYPE_SERVICE_UUIDS_16_BIT_PARTIAL:
                    case DATA_TYPE_SERVICE_UUIDS_16_BIT_COMPLETE:
                        parseServiceUuid(scanRecord, currentPos,
                                dataLength, UUID_BYTES_16_BIT, serviceUuids);
                        break;
                    case DATA_TYPE_SERVICE_UUIDS_32_BIT_PARTIAL:
                    case DATA_TYPE_SERVICE_UUIDS_32_BIT_COMPLETE:
                        parseServiceUuid(scanRecord, currentPos, dataLength,
                                UUID_BYTES_32_BIT, serviceUuids);
                        break;
                    case DATA_TYPE_SERVICE_UUIDS_128_BIT_PARTIAL:
                    case DATA_TYPE_SERVICE_UUIDS_128_BIT_COMPLETE:
                        parseServiceUuid(scanRecord, currentPos, dataLength,
                                UUID_BYTES_128_BIT, serviceUuids);
                        break;
                    case DATA_TYPE_LOCAL_NAME_SHORT:
                    case DATA_TYPE_LOCAL_NAME_COMPLETE:
                        localName = new String(
                                extractBytes(scanRecord, currentPos, dataLength));
                        break;
                    case DATA_TYPE_TX_POWER_LEVEL:
                        txPowerLevel = scanRecord[currentPos];
                        break;
                    case DATA_TYPE_SERVICE_DATA:
                        // The first two bytes of the service data are service data UUID in little
                        // endian. The rest bytes are service data.
                        int serviceUuidLength = UUID_BYTES_16_BIT;
                        byte[] serviceDataUuidBytes = extractBytes(scanRecord, currentPos,
                                serviceUuidLength);
                        ParcelUuid serviceDataUuid = parseUuidFrom(serviceDataUuidBytes);
                        byte[] serviceDataArray = extractBytes(scanRecord,
                                currentPos + serviceUuidLength, dataLength - serviceUuidLength);
                        serviceData.put(serviceDataUuid, serviceDataArray);
                        break;
                    case DATA_TYPE_MANUFACTURER_SPECIFIC_DATA:
                        // The first two bytes of the manufacturer specific data are
                        // manufacturer ids in little endian.
                        int manufacturerId = ((scanRecord[currentPos + 1] & 0xFF) << 8)
                                + (scanRecord[currentPos] & 0xFF);
                        byte[] manufacturerDataBytes = extractBytes(scanRecord, currentPos + 2,
                                dataLength - 2);
                        manufacturerData.put(manufacturerId, manufacturerDataBytes);
                        break;
                    default:
                        // Just ignore, we don't handle such data type.
                        break;
                }
                currentPos += dataLength;
            }

            if (serviceUuids.isEmpty()) {
                serviceUuids = null;
            }
            return new ScanRecordImplCompat(serviceUuids, manufacturerData, serviceData,
                    advertiseFlag, txPowerLevel, localName, scanRecord);
        } catch (Exception e) {
            RxBleLog.e(e, "Unable to parse scan record: %s", LoggerUtil.bytesToHex(scanRecord));
            // As the record is invalid, ignore all the parsed results for this packet
            // and return an empty record with raw scanRecord bytes in results
            return new ScanRecordImplCompat(null, null, null, -1, Integer.MIN_VALUE, null, scanRecord);
        }
    }
1262749
function(module, agent, msg, cb) {
  if(!msg) {
    utils.invokeCallback(cb, new Error('masterwatcher subscribe empty message.'));
    return;
  }

  module.watchdog.subscribe(msg.id);
  utils.invokeCallback(cb, null, module.watchdog.query());
}
968373
function subscribe() {
    console.log(' > ', 'init', ['xmlrpc_bin://' + thisHost + ':2031', 'test123']);
    rpcClient.methodCall('init', ['xmlrpc_bin://' + thisHost + ':2031', 'test123'], function (err, res) {
        console.log(err, res);
    });
}
980744
def startTicker(self, reqId, contract, tickType):
        
        ticker = self.tickers.get(id(contract))
        if not ticker:
            ticker = Ticker(
                contract=contract, ticks=[], tickByTicks=[],
                domBids=[], domAsks=[], domTicks=[])
            self.tickers[id(contract)] = ticker
        self.reqId2Ticker[reqId] = ticker
        self._reqId2Contract[reqId] = contract
        self.ticker2ReqId[tickType][ticker] = reqId
        return ticker
114666
@RequirePOST
    public synchronized void doSubmitDescription( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
        checkPermission(CONFIGURE);

        setDescription(req.getParameter("description"));
        rsp.sendRedirect(".");  // go to the top page
    }
496625
function listSubscribers(req, res, next) {
  var listSubscribersParams = {
    _id: req.params.id
  };

  logger.debug("Middleware: listSubscribers: ", {params: listSubscribersParams});

  forms.getNotifications(_.extend(req.connectionOptions, listSubscribersParams), formsResultHandlers(constants.resultTypes.forms, req, next));
}
810606
private ControllableSubscription getSubscription(String id) 
  throws SIMPControllableNotFoundException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getSubscription", id);
      
    //id is assumed to be SIBUuid12
    SIBUuid12 uuid = new SIBUuid12(id);
    SubscriptionTypeFilter filter = new SubscriptionTypeFilter();
    filter.LOCAL = Boolean.TRUE;
    ControllableSubscription sub = getSubscriptionIndex().findByUuid(uuid, filter);
    
    // If the sub is null, throw an exception
    if (sub == null)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(
          tc,
          "getLocalSubscriptionControlByID",
          "SIMPControllableNotFoundException");
          
      throw new SIMPControllableNotFoundException(
        nls.getFormattedMessage(
          "SUBSCRIPTION_NOT_FOUND_ERROR_CWSIP0271",
          new Object[]{id},
          null));  
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getSubscription", sub);
    
    return sub;
  }
1333755
def subscribe(self, tag, fun, description=None):
        
        self.methods[tag] = fun
        self.descriptions[tag] = description
        self.socket.set_string_option(nanomsg.SUB, nanomsg.SUB_SUBSCRIBE, tag)
1329119
function(source, baseUrl, requestFormatter, responseFormatter) {
  const querier =  pointToQuery(baseUrl, requestFormatter, responseFormatter)(source);
  querier.subscribe = function(callback) {
    querier(0, callback)
  }
  return querier;
}
449390
@RequirePOST
    public synchronized void doSubmitDescription( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
        getPrimaryView().doSubmitDescription(req, rsp);
    }
1216371
public void updateScannerStat(final int query_index, final int id, 
      final QueryStat name, final long value) {
    Map<Integer, Map<QueryStat, Long>> qs = scanner_stats.get(query_index);
    long cum_time = value;
    if (qs == null) {
      qs = new ConcurrentHashMap<Integer, Map<QueryStat, Long>>();
      scanner_stats.put(query_index, qs);
    }
    Map<QueryStat, Long> scanner_stat_map = qs.get(id);
    if (scanner_stat_map == null) {
      scanner_stat_map = new HashMap<QueryStat, Long>();
      qs.put(id, scanner_stat_map);
    }

    if (scanner_stat_map.containsKey(name)) {
      cum_time += scanner_stat_map.get(name);
    }
    
    scanner_stat_map.put(name, cum_time);
  }