this is a public method for use by drone API or other scripting
491462
def set_override_chan(self, channel, value):
        ''''''
        self.override[channel] = value
        self.override_counter = 10
        self.send_rc_override()
1009412
def comittoapi(api):
    
    global USED_API
    assert USED_API is None, "committoapi called again!"
    check = ["PyQt4", "PyQt5", "PySide", "PySide2"]
    assert api in [QT_API_PYQT5, QT_API_PYQT4, QT_API_PYSIDE, QT_API_PYSIDE2]
    for name in check:
        if name.lower() != api and name in sys.modules:
            raise RuntimeError(
                "{} was already imported. Cannot commit to {}!"
                .format(name, api)
            )
    else:
        api = _intern(api)
        USED_API = api
        AnyQt.__SELECTED_API = api
        AnyQt.USED_API = api
424385
function(id) {
		var config, script;
		return {
			as: function($edbml) {
				config = edbml.$runtimeconfigure($edbml);
				script = gui.Object.assert(id, config);
				script.$bind = function() {
					console.error('Deprecated API is deprecated: $bind');
				};
				script.lock = function(out) {
					return script({
						$out: out
					});
				};
				return this;
			},
			withInstructions: function(pis) {
				script.$instructions = pis;
			}
		};
	}
565351
function RemoteObject(name, response) {
  // I don't think this is strictly necessary.
  Stream.call(this);

  // A readable stream.
  this.readable = true;
  this._paused = false;
  this._data = response;

  var emitter = this;
  // The event handlers for stream.
  function ondata(chunk) {
    emitter.emit('data', chunk);
  }
  function onerror(e) {
    emitter.emit('error', e);
  }
  function onend() {
    emitter.emit('end');
  }
  function onclose(e) {
    emitter.emit('close', e);
  }

  // Pipe these events through.
  this._data.on('data', ondata);
  this._data.on('error', onerror);
  this._data.on('end', onend);
  this._data.on('close', onclose);

  this._objectinfo = ObjectInfo.newFromResponse(name, response);
}
504999
private Object invoke(Class<?> objClass, Object obj, String methodName, String[] argTypes,
            Object[] args, String appId, String token) throws RpcException {
        Object res;
        try {
            MethodDescriptor<String> desc = serviceLocator
                    .getServiceDescriptor(new MethodWrapper(objClass.getName(), methodName,
                            StringUtil.toString4Array(argTypes)).toString());
            if (desc == null) {
                throw new MethodNotFoundException(String.format(
                        "Service method not found. class=%s, method=%s, argTypes=%s", objClass,
                        methodName, StringUtil.toString4Array(argTypes)));
            }

            if (!isAuthoriedAccess(desc, appId, token)) {
                throw new AuthAccessDeniedException("AppId or token is not valid to access");
            }

            res = desc.getMethod().invoke(desc.getTarget(), args);
        } catch (MethodNotFoundException e1) {
            throw new InvalidParamException(e1);
        } catch (IllegalArgumentException e1) {
            throw new InvalidParamException(e1);
        } catch (IllegalAccessException e1) {
            throw new InvalidAccessException(e1);
        } catch (AuthAccessDeniedException e1) {
            throw new RpcException(e1);
        } catch (InvocationTargetException e1) {
            Throwable e2 = e1.getTargetException();
            if (e2 instanceof RpcException) {
                throw (RpcException) e2;
            } else {
                throw new ServerErrorException(e2);
            }
        }
        if (res == void.class) {
            return null;
        } else {
            return res;
        }
    }
654168
function pongOnTheFlyOpenDlg(id, modalName, resourceURL, params) {
  log( "PoNG-OnTheFly", "Open " + id + " " + modalName + " " + resourceURL );
  var viewCfg = getViewConfig( id );
  log( "PoNG-OnTheFly", "GET " + resourceURL + '/' + viewCfg.type );
  $.getJSON( resourceURL + '/' + viewCfg.type, function(pluginConfig) {
    log( "PoNG-OnTheFly", "Config loaded from " + resourceURL + '/'
        + viewCfg.type );
    $( '#' + id + modalName + 'Dialog' ).dialog( 'open' );
    $( '#' + id + modalName + 'DialogConfig' ).val(
        JSON.stringify( pluginConfig, null, "  " ) );
  } );
  if ( params && params.assistUrl ) {
    $.get( 
        params.assistUrl, 
        function(assistTxt) {
          log( "PoNG-OnTheFly", "Assistance loaded from " + params.assistUrl );
          $( '#' + id + modalName + 'DialogAssist' ).val( assistTxt );
        } 
      ).fail(
          function() { publishEvent( 'feedback', {'text': 'Can not load assistance ' } ) }
      );
  }
}
570644
function (p) {
            var src = ariaWidgetsFormDropDownTrait.prototype;
            for (var key in src) {
                if (src.hasOwnProperty(key) && !p.hasOwnProperty(key)) {
                    // import methods from DropDownTrait which are not already on this object (this avoids copying
                    // $classpath and $destructor)
                    p[key] = src[key];
                }
            }
        }
393386
function batchMethod (obj, method) {
  const descriptor = Object.getOwnPropertyDescriptor(obj, method)
  if (descriptor) {
    const newDescriptor = Object.assign({}, descriptor, {
      set (value) {
        return descriptor.set.call(this, batchFn(value))
      }
    })
    Object.defineProperty(obj, method, newDescriptor)
  }
}
1337495
public static void callMethod(final Object obj, final String methodName, final boolean includePrivateMehtods, final Object... args)
			throws InvocationTargetException {
		final Class[] intArgsClass = initParamsClasses(args);
		try {
			Class<?> current = obj.getClass();
			Method method = null;
			while (current != Object.class) {
				try {
					method = current.getDeclaredMethod(methodName, intArgsClass);
					break;
				} catch (final NoSuchMethodException ex) {
					current = current.getSuperclass();
				}
			}
			if (method == null) {
				throw new NoSuchMethodException("Mehtod is not found in " + current);
			}
			method.setAccessible(true);
			method.invoke(obj, args);
		} catch (final InvocationTargetException e) {
			throw new InvocationTargetException(e.getCause());
		} catch (final Exception e) {
			throw new InvocationTargetException(e);
		}
	}
1223114
function injectVideoApi(url, callback) {
    if (utils.isNil(url)) {
        console.error('Inject videos api error');
        return;
    }
    let found = document.querySelectorAll('script[src="' + url + '"]')
    if (utils.isNil(found) || found.length == 0) {
        let script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = url;
        script.onload = () => {
            if (utils.isFunction(callback)) callback();
        };
        document.body.appendChild(script);
        return false;
    }
    if (utils.isFunction(callback)) callback();
}
1098233
private <I extends Message, O extends Message> ListenableFuture<JsonRpcResponse> invoke(
      ServerMethod<I, O> method, JsonObject parameter, JsonElement id) {
    I request;
    try {
      request = (I) Messages.fromJson(method.inputBuilder(), parameter);
    } catch (Exception e) {
      serverLogger.logServerFailure(method, e);
      SettableFuture<JsonRpcResponse> future = SettableFuture.create();
      future.setException(e);
      return future;
    }
    ListenableFuture<O> response = method.invoke(request);
    return Futures.transform(response, new JsonConverter(id), TRANSFORM_EXECUTOR);
  }
747846
function buildAPIs(vueObj) {
  const funcArray = [propsAPIObject, methodsAPIObject, eventsAPIObject, slotsAPIObject]

  const compAPIObj = funcArray.reduce((apiObj, curFn) => {
    const obj = curFn(vueObj)

    if (obj !== null) {
      Object.assign(apiObj, obj)
    }
    return apiObj
  }, {})
  
  return compAPIObj
}
1016584
function histogramBinHoverProvider(publicAPI, model) {
  if (!model.hoverState) {
    model.hoverState = {};
  }

  publicAPI.setHoverState = (hoverState) => {
    model.hoverState = hoverState;
    publicAPI.fireHoverBinChange(model.hoverState);
  };
}
767918
function exposePanopticonMethod(method) {
	exports[method] = function () {
		for (var i = 0; i < panoptica.length; i++) {
			var panopticon = panoptica[i];

			panopticon[method].apply(panopticon, arguments);
		}
	};
}
1083073
function getMethodUse(tokens, API) {
  var used = [];

  // Those variable names can't be jQuery things.
  var excludeListIdentifiers = ['behaviors', 'this', 'self', 'tab_focus'];

  var JQVars = ['jQuery', '$'];
  var JQMethods = _.pluck(_.where(API, {object: 'jQuery'}), 'method');
  var JQFNMethods = _.pluck(_.where(API, {object: 'jQuery.fn'}), 'method');
  var sizzleSelectors = _.pluck(_.where(API, {object: 'jQuery.expr.filters'}), 'method');

  var isJQ = false;
  var isVar = false;
  var isVarExcluded = false;
  var justAddedVar = false;

  tokens.forEach(function (token) {
    var isJQVar = JQVars.indexOf(token.value) !== -1;
    var isJQMethod = JQMethods.indexOf(token.value) !== -1;
    var isJQFNMethod = JQFNMethods.indexOf(token.value) !== -1;
    // Some things use jQuery method names while not being jQuery.
    var isExcluded = excludeListIdentifiers.indexOf(token.value) !== -1;

    var semicol = token.type === 'Punctuator' && token.value === ';';
    var closeCurly = token.type === 'Punctuator' && token.value === '}';
    var jsword = token.type === 'Keyword';
    var stop = semicol || closeCurly || jsword;

    // Make sure we're not mistaking jQuery stuff with other variable names.
    if (justAddedVar) {
      if (token.type === 'Punctuator' && token.value !== '(') {
        var poped = used.pop();
        debug(poped);
      }
      justAddedVar = false;
    }

    if (isExcluded && !isVarExcluded) {
      isVarExcluded = true;
    }

    if (!isVarExcluded) {
      // Catch $('.element').xxx()
      if (token.type === 'Identifier') {
        if (isJQFNMethod) {
          used.push({method: token.value, object: 'jQuery.fn'});
          justAddedVar = true;
        }
      }
      else if (token.type === 'Identifier' && !isJQVar) {
        isVar = true;
      }
      else if (stop) {
        isVar = false;
      }

      // Catch jQuery.xxx().
      if (token.type === 'Identifier' && isJQVar) {
        isJQ = true;
      }
      else if (isJQ && token.type === 'Identifier' && isJQMethod) {
        used.push({method: token.value, object: 'jQuery'});
      }
      else if (isJQ && stop) {
        isJQ = false;
      }
    }

    if (stop) {
      isVarExcluded = false;
    }

    // Catch sizzle selectors in strings.
    if (token.type === 'String' && token.value.indexOf(':') !== -1) {
      sizzleSelectors.forEach(function (selector) {
        if (token.value.indexOf(selector) !== -1) {
          used.push({method: selector, object: 'jQuery.expr.filters'});
        }
      });
    }

    // Ajax is special. We don't track transport types so it's best guess.
    if (token.type === 'String') {
      var ajaxDep = false;
      switch (token.value.replace(/'/g, '').replace(/"/g, '')) {
        case 'jsonp':
          ajaxDep = {method: 'jsonp', object: 'jQuery.ajax', module: 'ajax/jsonp'};
          break;

        case 'json':
          ajaxDep = {method: 'json', object: 'jQuery.ajax', module: 'ajax/parseJSON'};
          break;

        case 'xml':
          ajaxDep = {method: 'xml', object: 'jQuery.ajax', module: 'ajax/parseXML'};
          break;

        case 'script':
          ajaxDep = {method: 'script', object: 'jQuery.ajax', module: 'ajax/script'};
          break;
      }

      if (ajaxDep) {
        used.push(ajaxDep);
        used.push({method: 'xhr', object: 'jQuery.ajax', module: 'ajax/xhr'});
      }
    }
  });

  debug(used);

  return used;
}
191216
private function execute($str_method, ProtocolMessage $obj_request, ProtocolMessage $obj_response)
    {
        try {
            $this->obj_last_request = $obj_request;
            $this->obj_last_response = null;
            ApiProxy::makeSyncCall('search', $str_method, $obj_request, $obj_response, 60);
            $this->obj_last_response = $obj_response;
        } catch (ApplicationError $obj_exception) {
            throw $obj_exception;
        }
    }
1235225
function onCarapacePort (info) {
      if (!responded && info && info.event === 'port') {
        responded = true;
        result.socket = {
          host: self.host,
          port: info.data.port
        };
        
        drone.minUptime = 0;

        haibu.emit('drone:port', 'info', {
          pkg: app,
          info: info
        });
        
        callback(null, result);
        
        //
        // Remove listeners to related events
        //
        drone.removeListener('exit', onExit);
        drone.removeListener('error', onError);
        clearTimeout(timeout);
      }
    }