Get all the operand a given script can import

@param ns the script namespace
@return a list of importable operand, may be empty
338171
public List<BtrpOperand> getImportables(String ns) {
        List<BtrpOperand> importable = new ArrayList<>();
        for (String symbol : getExported()) {
            if (canImport(symbol, ns)) {
                importable.add(getImportable(symbol, ns));
            }
        }
        return importable;
    }
1245643
private Object[] getObjectIdsImpl(Context cx, Object object) {
        if (!(object instanceof Scriptable) || object == Undefined.instance) {
            return Context.emptyArgs;
        }

        Object[] ids;
        Scriptable scriptable = (Scriptable)object;
        if (scriptable instanceof DebuggableObject) {
            ids = ((DebuggableObject)scriptable).getAllIds();
        } else {
            ids = scriptable.getIds();
        }

        Scriptable proto = scriptable.getPrototype();
        Scriptable parent = scriptable.getParentScope();
        int extra = 0;
        if (proto != null) {
            ++extra;
        }
        if (parent != null) {
            ++extra;
        }
        if (extra != 0) {
            Object[] tmp = new Object[extra + ids.length];
            System.arraycopy(ids, 0, tmp, extra, ids.length);
            ids = tmp;
            extra = 0;
            if (proto != null) {
                ids[extra++] = "__proto__";
            }
            if (parent != null) {
                ids[extra++] = "__parent__";
            }
        }

        return ids;
    }
361913
def get_namespace_keys(app, limit):
  """"""
  ns_query = datastore.Query('__namespace__', keys_only=True, _app=app)
  return list(ns_query.Run(limit=limit, batch_size=limit))
35353
public Method createFunction(String ns, String name)
    {
        return containsNamespace(ns) ? _functions.get(name) : null;
    }
1057204
private void getResolvedScriptSet(CharSequence input, ScriptSet result) {
        getResolvedScriptSetWithout(input, UScript.CODE_LIMIT, result);
    }
952257
public static ns[] get(nitro_service client) throws Exception
	{
		ns resource = new ns();
		resource.validate("get");
		return (ns[]) resource.get_resources(client);
	}
51542
def get_all_namespaces(offset=None, count=None, proxy=None, hostport=None):
    
    assert proxy or hostport, 'Need proxy or hostport'
    if proxy is None:
        proxy = connect_hostport(hostport)

    offset = 0 if offset is None else offset

    schema = {
        'type': 'object',
        'properties': {
            'namespaces': {
                'type': 'array',
                'items': {
                    'type': 'string',
                    'pattern': OP_NAMESPACE_PATTERN,
                },
            },
        },
        'required': [
            'namespaces'
        ],
    }

    namespaces_schema = json_response_schema(schema)

    resp = {}
    try:
        resp = proxy.get_all_namespaces()
        resp = json_validate(namespaces_schema, resp)
        if json_is_error(resp):
            return resp

    except ValidationError as e:
        if BLOCKSTACK_DEBUG:
            log.exception(e)

        resp = {'error': 'Server response did not match expected schema.  You are likely communicating with an out-of-date Blockstack node.', 'http_status': 502}
        return resp

    except socket.timeout:
        log.error("Connection timed out")
        resp = {'error': 'Connection to remote host timed out.', 'http_status': 503}
        return resp

    except socket.error as se:
        log.error("Connection error {}".format(se.errno))
        resp = {'error': 'Connection to remote host failed.', 'http_status': 502}
        return resp

    except Exception as ee:
        if BLOCKSTACK_DEBUG:
            log.exception(ee)

        log.error("Caught exception while connecting to Blockstack node: {}".format(ee))
        resp = {'error': 'Failed to contact Blockstack node.  Try again with `--debug`.', 'http_status': 500}
        return resp

    stride = len(resp['namespaces']) if count is None else offset + count
    return resp['namespaces'][offset:stride]
992680
function using(ns) {
	let nsParts = ns.split('.');
	let parentObj = global;

	// Build an object tree as necessary for the namespace hierarchy.
	for (let i = 0; i < nsParts.length - 1; i++) {
		let nsObj = parentObj[nsParts[i]];
		if (!nsObj) {
			nsObj = {};
			parentObj[nsParts[i]] = nsObj;
		}
		parentObj = nsObj;
	}

	let lastNsPart = nsParts[nsParts.length - 1];
	let nsPackage = require(uwpRoot + ns.toLowerCase());

	// Merge in any already-loaded sub-namespaces.
	// This allows loading in non-hierarchical order.
	let nsObj = parentObj[lastNsPart];
	if (nsObj) {
		Object.keys(nsObj).forEach(key => {
			nsPackage[key] = nsObj[key];
		})
	}
	parentObj[lastNsPart] = nsPackage;
}
1099976
public QueryNode[] getOperands() {
        if (operands == null) {
            return new QueryNode[0];
        } else {
            return (QueryNode[]) operands.toArray(new QueryNode[operands.size()]);
        }
    }
518008
public Script getScriptSig() throws ScriptException {
        // Transactions that generate new coins don't actually have a script. Instead this
        // parameter is overloaded to be something totally different.
        Script script = scriptSig == null ? null : scriptSig.get();
        if (script == null) {
            script = new Script(scriptBytes);
            scriptSig = new WeakReference<>(script);
        }
        return script;
    }
671952
public static final <T extends Number> String connect(Collection<T> ns) {
        StringBuilder sb = new StringBuilder(ns.size() * 8);
        for (Number o : ns) {
            sb.append(',').append(o);
        }
        sb.setCharAt(0, '(');
        sb.append(')');
        return sb.toString();
    }
1023988
def get_objects(ns, element_name, ext_class)
      elements = getlist(ns, element_name)
      return [] if elements.empty?
      elements.collect do |e|
        ext_class.new(:namespace => ns, :elem => e)
      end
    end
1278111
public int getImportInsertOffset(SarlScript script) {
		final ICompositeNode node = NodeModelUtils.findActualNodeFor(script.getImportSection());
		if (node == null) {
			final List<INode> children = NodeModelUtils.findNodesForFeature(script,
					XtendPackage.eINSTANCE.getXtendFile_Package());
			if (children.isEmpty()) {
				return 0;
			}
			return children.get(0).getEndOffset();
		}
		return node.getEndOffset();
	}
358102
public List<String> getScript(String scriptName) {
		String scriptFilename = this.scriptMap.get(scriptName);
		InputStream scriptFileStream = FileUtils.getFileInputStream(scriptFilename);
		
		List<String> sqlList = new SqlScriptReader().getSQLList(scriptFileStream);

		return sqlList;
	}
603010
def ns(self):
        
        ret = libxml2mod.xmlNodeGetNs(self._o)
        if ret is None:return None
        __tmp = xmlNs(_obj=ret)
        return __tmp
658143
function extractScripts($) {
  var scripts = [];
  $('script[src]').each(function() {
    var el  = $(this);
    var src = el.attr('src');
    if(ABS.test(src)) return;
    scripts.push(/^\./.test(src) ? src : './' + src);
    el.remove();
  })
  return scripts;
}
1150207
public static List<Element> getChildElements(final Element elem, final String ns, final String name) {
        final NodeList children =  elem.getChildNodes();
        final List<Element> res = new ArrayList<>(children.getLength());
        for (int i = 0; i < children.getLength(); i++) {
            final Node child = children.item(i);
            if (child.getNodeType() == Node.ELEMENT_NODE) {
                if (Objects.equals(child.getNamespaceURI(), ns) && name.equals(child.getLocalName())) {
                    res.add((Element) child);
                }
            }
        }
        return res;
    }