language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
python | def _create_template(self, name):
"""Create an instance of a tornado.template.Template object for the
given template name.
:param str name: The name/path to the template
:rtype: tornado.template.Template
"""
url = '%s/%s' % (self._base_url, escape.url_escape(name))
... |
java | protected PropertiesRecordingId setFinalRecordingNameAndGetFreeRecordingId(Session session,
RecordingProperties properties) {
String recordingId = this.recordingManager.getFreeRecordingId(session.getSessionId(),
this.getShortSessionId(session));
if (properties.name() == null || properties.name().isEmpty()) {... |
java | @XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "folderId", scope = CreateDocument.class)
public JAXBElement<String> createCreateDocumentFolderId(String value) {
return new JAXBElement<String>(_CreateDocumentFolderId_QNAME,
String.class, CreateDocument.class, value);... |
java | public static int codePointAt(char[] a, int index, int limit) {
if (index >= limit || limit < 0 || limit > a.length) {
throw new IndexOutOfBoundsException();
}
return codePointAtImpl(a, index, limit);
} |
java | private final byte[] deriveSigningKey(AWSCredentials credentials,
AWS4SignerRequestParams signerRequestParams) {
final String cacheKey = computeSigningCacheKeyName(credentials,
signerRequestParams);
final long daysSinceEpochSigningDate = DateUtils
.numberOfDa... |
java | public String getString() throws ValueFormatException, IllegalStateException, RepositoryException
{
return locationFactory.createJCRPath(getQPath()).getAsString(false);
} |
python | def getVerificators(self):
"""Returns the user ids of the users that verified this analysis
"""
verifiers = list()
actions = ["verify", "multi_verify"]
for event in wf.getReviewHistory(self):
if event['action'] in actions:
verifiers.append(event['actor... |
java | public Cookie logInAndObtainJwtCookie(String testName, WebClient webClient, String protectedUrl, String username, String password) throws Exception {
return logInAndObtainJwtCookie(testName, webClient, protectedUrl, username, password, JwtFatConstants.DEFAULT_ISS_REGEX);
} |
python | def first(self, limit=1, columns=None):
"""
Execute the query and get the first results
:param limit: The number of results to get
:type limit: int
:param columns: The columns to get
:type columns: list
:return: The result
:rtype: mixed
"""
... |
python | def generate(self, name: str, **kwargs):
""" generate full qualified url for named url pattern with kwargs
"""
path = self.urlmapper.generate(name, **kwargs)
return self.make_full_qualified_url(path) |
java | @SuppressWarnings("unchecked")
@Override
public <E> int delete(final Class<? extends E> entityType, final Object... keys) {
@SuppressWarnings("rawtypes")
EntityHandler handler = this.getEntityHandler();
if (!handler.getEntityType().isAssignableFrom(entityType)) {
throw new IllegalArgumentException("Entity ty... |
java | public CompilerInput getInput() {
if (compilerInput == null && inputId != null) {
compilerInput = compiler.getInput(inputId);
}
return compilerInput;
} |
python | def uniquify_list(L):
"""Same order unique list using only a list compression."""
return [e for i, e in enumerate(L) if L.index(e) == i] |
python | def get_dead_hosting_devices_info(self):
"""
Get a list of hosting devices that have been marked dead
:return: List of dead hosting device ids
"""
res = []
for hd_id in self.hosting_devices_backlog:
hd = self.hosting_devices_backlog[hd_id]['hd']
if... |
python | def transit_verify_signed_data(self, name, input_data, algorithm=None, signature=None, hmac=None, context=None,
prehashed=None, mount_point='transit', signature_algorithm='pss'):
"""POST /<mount_point>/verify/<name>(/<algorithm>)
:param name:
:type name:
... |
python | def iline(self, value):
"""Write iterables to lines
Examples:
Supports writing to *all* crosslines via assignment, regardless of
data source and format. Will respect the sample size and structure
of the file being assigned to, so if the argument traces are longer
... |
python | def plotlyviz(
scomplex,
colorscale=None,
title="Kepler Mapper",
graph_layout="kk",
color_function=None,
color_function_name=None,
dashboard=False,
graph_data=False,
factor_size=3,
edge_linewidth=1.5,
node_linecolor="rgb(200,200,200)",
width=600,
height=5... |
python | def do_up(self,args):
"""
Navigate up by one level.
For example, if you are in `(aws)/stack:.../asg:.../`, executing `up` will place you in `(aws)/stack:.../`.
up -h for more details
"""
parser = CommandArgumentParser("up")
args = vars(parser.parse_args(args))
... |
python | def parse_attributes(self, elt, ps):
'''find all attributes specified in the attribute_typecode_dict in
current element tag, if an attribute is found set it in the
self.attributes dictionary. Default to putting in String.
Parameters:
elt -- the DOM element being parsed
... |
java | public static <T extends Throwable> T printHistoryAndReturnThrowable(final T th, final PrintStream stream) {
printHistory(th, new SystemPrinter(stream));
return th;
} |
java | public void throwBodyMetaNoIndependentDelimiterException(String bodyFile, String plainText) {
final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
br.addNotice("No independent delimter of mail body meta.");
br.addItem("Advice");
br.addElement("The delimter of mail body meta ... |
java | public final hqlParser.deleteStatement_return deleteStatement() throws RecognitionException {
hqlParser.deleteStatement_return retval = new hqlParser.deleteStatement_return();
retval.start = input.LT(1);
CommonTree root_0 = null;
Token DELETE20=null;
ParserRuleReturnScope optionalFromTokenFromClause21 =null... |
python | def mkpassword(length=16, chars=None, punctuation=None):
"""Generates a random ascii string - useful to generate authinfos
:param length: string wanted length
:type length: ``int``
:param chars: character population,
defaults to alphabet (lower & upper) + numbers
:type chars: ``s... |
java | static double expint(int p, final double result[]) {
//double x = M_E;
final double xs[] = new double[2];
final double as[] = new double[2];
final double ys[] = new double[2];
//split(x, xs);
//xs[1] = (double)(2.7182818284590452353602874713526625L - xs[0]);
//xs[... |
java | public Blob createBlobFromInputStream(String bucketName, String blobName) {
// [START createBlobFromInputStream]
InputStream content = new ByteArrayInputStream("Hello, World!".getBytes(UTF_8));
BlobId blobId = BlobId.of(bucketName, blobName);
BlobInfo blobInfo = BlobInfo.newBuilder(blobId).setContentTyp... |
python | def _from_dict(cls, _dict):
"""Initialize a Log object from a json dictionary."""
args = {}
if 'request' in _dict:
args['request'] = MessageRequest._from_dict(_dict.get('request'))
else:
raise ValueError(
'Required property \'request\' not present ... |
java | public byte findRecoveryId(Sha256Hash hash, ECDSASignature sig) {
byte recId = -1;
for (byte i = 0; i < 4; i++) {
ECKey k = ECKey.recoverFromSignature(i, sig, hash, isCompressed());
if (k != null && k.pub.equals(pub)) {
recId = i;
break;
... |
python | def _decode_messages(self, messages):
'''
Take the zmq messages, decrypt/decode them into a payload
:param list messages: A list of messages to be decoded
'''
messages_len = len(messages)
# if it was one message, then its old style
if messages_len == 1:
... |
python | def equivalent_crust_cohesion(self):
"""
Calculate the equivalent crust cohesion strength according to Karamitros et al. 2013 sett, pg 8 eq. 14
:return: equivalent cohesion [Pa]
"""
deprecation("Will be moved to a function")
if len(self.layers) > 1:
crust = s... |
java | public void setVertex(int i, double x, double y, double z) {
this.cornerX.set(i, x);
this.cornerY.set(i, y);
this.cornerZ.set(i, z);
calcG();
} |
java | public void execute(TransformerImpl transformer)
throws TransformerException
{
SerializationHandler rhandler = transformer.getSerializationHandler();
try
{
// JJK Bugzilla 3464, test namespace85 -- make sure LRE's
// namespace is asserted even if default, si... |
python | def from_raw(self, rval: RawValue, jptr: JSONPointer = "") -> Value:
"""Override the superclass method."""
def convert(val):
if isinstance(val, list):
res = ArrayValue([convert(x) for x in val])
elif isinstance(val, dict):
res = ObjectValue({x: con... |
python | def __get_stack_id(self, value, values, height):
"""
Returns the index of the column representation of the given value
β β β β β
β β' ...
β β β β β
β β' β β β β β β β ...
β β β β β
β β' β β ... |
java | @Override
public EClass getIfcExtrudedAreaSolid() {
if (ifcExtrudedAreaSolidEClass == null) {
ifcExtrudedAreaSolidEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(251);
}
return ifcExtrudedAreaSolidEClass;
} |
python | def lset(self, key, index, value):
"""Sets the list element at index to value.
:raises TypeError: if index is not int
"""
if not isinstance(index, int):
raise TypeError("index argument must be int")
return self.execute(b'LSET', key, index, value) |
python | def geo_map(h2, map=None, tiles='stamenterrain', cmap="wk", alpha=0.5, lw=1, fit_bounds=None, layer_name=None):
"""Show rectangular grid over a map.
Parameters
----------
h2: physt.histogram_nd.Histogram2D
A histogram of coordinates (in degrees: latitude, longitude)
map : folium.folium.Map
... |
java | public static <K,V> NavigableMap<K,V> checkedNavigableMap(NavigableMap<K, V> m,
Class<K> keyType,
Class<V> valueType) {
return new CheckedNavigableMap<>(m, keyType, valueType);
} |
java | public void save(final KeyPair keyPair) throws IOException {
LOGGER.info("Saving key pair");
final PrivateKey privateKey = keyPair.getPrivate();
final PublicKey publicKey = keyPair.getPublic();
// Store Public Key
final File publicKeyFile = getKeyPath(publicKey);
publicK... |
python | def dz_fltr_ma(dem, refdem, perc=None, rangelim=(0,30), smooth=False):
"""Absolute elevation difference range filter using values from a source array and a reference array
"""
if smooth:
refdem = gauss_fltr_astropy(refdem)
dem = gauss_fltr_astropy(dem)
dz = refdem - dem
#This is T... |
java | public static <T> AddLabelledQuery<T> start(T query, long correlationId, String label) {
return start(query, correlationId, label, null);
} |
java | public EClass getIfcEnvironmentalImpactValue() {
if (ifcEnvironmentalImpactValueEClass == null) {
ifcEnvironmentalImpactValueEClass = (EClass) EPackage.Registry.INSTANCE
.getEPackage(Ifc2x3tc1Package.eNS_URI).getEClassifiers().get(208);
}
return ifcEnvironmentalImpactValueEClass;
} |
python | def equals(self, other, equiv=duck_array_ops.array_equiv):
"""True if two Variables have the same dimensions and values;
otherwise False.
Variables can still be equal (like pandas objects) if they have NaN
values in the same locations.
This method is necessary because `v1 == v2... |
java | public void removeRelationshipsNotConnectedToElement(Element element) {
if (element != null) {
getRelationships().stream()
.map(RelationshipView::getRelationship)
.filter(r -> !r.getSource().equals(element) && !r.getDestination().equals(element))
... |
python | def _determineLength(self, fObj):
"""
Determine how many bytes can be read out of C{fObj} (assuming it is not
modified from this point on). If the determination cannot be made,
return C{UNKNOWN_LENGTH}.
"""
try:
seek = fObj.seek
tell = fObj.tell
... |
python | def _start_new_session(self):
""" Starts a new session and calculates when the new session will end. If username and password are provided
it will also make login.
"""
self._session_start = datetime.datetime.now()
session_id = self._parse_session_id(self._session_info) if self._... |
python | def name(self):
""" Returns the type name of the `Fraction` field (read-only)."""
return "{0}{1}.{2}".format(self.item_type.name.capitalize(),
self._bits_integer,
self.bit_size) |
java | public static void copy(InputStream in, OutputStream out) throws IOException {
byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
for (int length = in.read(buffer); length > 0; length = in.read(buffer)) {
out.write(buffer, 0, length);
out.flush();
}
} |
java | public static String getFormBeanName( Class formBeanClass, HttpServletRequest request )
{
ModuleConfig moduleConfig = RequestUtils.getRequestModuleConfig( request );
List/*< String >*/ names = getFormNamesFromModuleConfig( formBeanClass.getName(), moduleConfig );
if ( names != null ... |
python | def limit_disk_io(self, uuid, media, totalbytessecset=False, totalbytessec=0, readbytessecset=False, readbytessec=0, writebytessecset=False,
writebytessec=0, totaliopssecset=False, totaliopssec=0, readiopssecset=False, readiopssec=0, writeiopssecset=False, writeiopssec=0,
tot... |
python | def describe_event_source_mapping(UUID=None, EventSourceArn=None,
FunctionName=None,
region=None, key=None, keyid=None, profile=None):
'''
Given an event source mapping ID or an event source ARN and FunctionName,
obtain the current settings... |
java | public static INDArray buildFromData(List<DataPoint> data) {
INDArray ret = Nd4j.create(data.size(), data.get(0).getD());
for (int i = 0; i < ret.slices(); i++)
ret.putSlice(i, data.get(i).getPoint());
return ret;
} |
python | def subscribe(self, topic=b''):
"""subscribe to the SUB socket, to listen for incomming variables, return a stream that can be listened to."""
self.sockets[zmq.SUB].setsockopt(zmq.SUBSCRIBE, topic)
poller = self.pollers[zmq.SUB]
return poller |
java | public void setIgnoreDependencyPattern(String ignoreDependencyPattern) {
try {
Pattern pattern = Pattern.compile(ignoreDependencyPattern);
this.ignoreDependencyPattern = pattern;
} catch (PatternSyntaxException e) {
throw new BuildException("invalid ignore dependency ... |
python | def create_page(self, build_dir, filepath, context={}, content=None, template=None, markup=None, layout=None):
"""
To dynamically create a page and save it in the build_dir
:param build_dir: (path) The base directory that will hold the created page
:param filepath: (string) the name of t... |
java | public void setActiveForTriggerAndMetric(Trigger trigger, Metric metric, boolean active) {
String key = _hashTriggerAndMetric(trigger, metric);
this.activeStatusByTriggerAndMetric.put(key, active);
} |
python | def iflat_tasks_wti(self, status=None, op="==", nids=None):
"""
Generator to iterate over all the tasks of the `Flow`.
Yields:
(task, work_index, task_index)
If status is not None, only the tasks whose status satisfies
the condition (task.status op status) are selec... |
java | protected <T> void buildHeaderMapper(final BeanMapping<T> beanMapping, final CsvBean beanAnno) {
final HeaderMapper headerMapper = (HeaderMapper) configuration.getBeanFactory().create(beanAnno.headerMapper());
beanMapping.setHeaderMapper(headerMapper);
beanMapping.setHeade... |
python | def _get_flat_db_sources(self, model):
""" Return a flattened representation of the individual ``sources`` lists. """
sources = []
for source in self.sources:
for sub_source in self.expand_source(source):
target_field = self.resolve_source(model, sub_source)
... |
python | def transform(self, data):
"""
:param data:
:type data: dict
:return:
:rtype:
"""
out=[]
keys = sorted(data.keys())
for k in keys:
out.append("%s=%s" % (k, data[k]))
return "\n".join(out) |
python | def render(self, context):
"""inspect the code and look for files that can be turned into combos.
Basically, the developer could type this:
{% slimall %}
<link href="/one.css"/>
<link href="/two.css"/>
{% endslimall %}
And it should be reconsidered like this:
... |
java | public void setItem(String itemName, String value, String suffix) {
itemName = lookupItemName(itemName, suffix, value != null);
items.put(itemName, value);
} |
python | def addRelation(self, link):
'''Appends Relation
'''
if isinstance(link, Relation):
self.internalLinks.append(link)
else:
raise TypeError(
'link Type should be InternalLink, not %s' % type(link)) |
python | def get_json(self):
"""Create JSON data for LANPort.
:returns: JSON data as follows:
{
"@PortIdx":1,
"PortEnable":{
},
"UseVirtualAddresses":{
},
"BootProtocol":{
},
"VirtualAddr... |
java | static String toSignedBase64(SignableSAMLObject signableObj,
Credential signingCredential,
String signatureAlgorithm) {
sign(signableObj, signingCredential, signatureAlgorithm);
final String messageStr = nodeToString(serialize(signableObj... |
java | public Pair<Boolean, String> property() {
String name = method.getName();
if (Modifier.isStatic(method.getModifiers())) return null;
if (0 == parameterTypes.length) {
if (name.startsWith("get")) {
if (name.length() > 3) return of(TRUE, uncapitalize(substringAfter(name, "get")));
} else i... |
python | def copy(self, *, continuations: List[memoryview] = None,
expected: Sequence[Type['Parseable']] = None,
list_expected: Sequence[Type['Parseable']] = None,
command_name: bytes = None,
uid: bool = None,
charset: str = None,
tag: bytes = None,
... |
java | public static byte[] copy(byte[] array) {
byte[] newArray = new byte[array.length];
System.arraycopy(array, 0, newArray, 0, array.length);
return newArray;
} |
python | def will_expire(certificate, days):
'''
Returns a dict containing details of a certificate and whether
the certificate will expire in the specified number of days.
Input can be a PEM string or file path.
.. versionadded:: 2016.11.0
certificate:
The certificate to be read. Can be a path... |
java | @Override
public void delete(Object entity, Object pKey)
{
if (!isOpen())
{
throw new PersistenceException("PelopsClient is closed.");
}
EntityMetadata metadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entity.getClass());
MetamodelImpl meta... |
python | def call(self, my_args=None):
"""
setup the request and call the remote service. Wait the answer (blocking call)
:param my_args: dict like {properties, body}
:return response
"""
LOGGER.debug("rabbitmq.Requester.call")
if my_args is None:
raise excepti... |
java | @CheckReturnValue
Context transitionToState(HtmlContext state) {
Context.Builder builder = toBuilder().withState(state).withUriPart(UriPart.NONE);
if (uriPart != UriPart.NONE) {
// Only reset the URI type if we're leaving a URI; intentionally, URI type needs to
// remain prior to the URI, for exam... |
python | def _get_config_generator(filename):
"""
A generator which populates and return a dict.
:parse filename: A string containing the path to YAML file.
:return: dict
"""
for d in _get_config(filename):
repo = d['git']
parsedrepo = giturlparse.parse(repo)
name = '{}.{}'.forma... |
java | public Long updateDatasetExpiration(DatasetInfo dataset) {
// [START bigquery_update_dataset_expiration]
Long beforeExpiration = dataset.getDefaultTableLifetime();
Long oneDayMilliseconds = 24 * 60 * 60 * 1000L;
DatasetInfo.Builder builder = dataset.toBuilder();
builder.setDefaultTableLifetime(oneD... |
java | public static String getPackageName(String className) {
int i = className.lastIndexOf(".");
String packageName = "";
if (i > -1) {
packageName = className.substring(0, i);
}
return packageName;
} |
java | private static Object unwrap(Object object) {
if (object instanceof Reflect) {
return ((Reflect) object).get();
}
return object;
} |
python | def parse_cron_line(self, line):
"""Parses crontab line and returns only starting time string
Args:
line: crontab line
Returns:
Time part of cron line
"""
stripped = line.strip()
if stripped and stripped.startswith('#') is False:
rexr... |
java | public Object next() {
if ( this.entry != null ) {
this.entry = this.entry.getNext();
}
// if no entry keep skipping rows until we come to the end, or find one that is populated
while ( this.entry == null && this.row < this.length ){
this.entry = this.table[this.... |
java | public static appfwjsoncontenttype get(nitro_service service, String jsoncontenttypevalue) throws Exception{
appfwjsoncontenttype obj = new appfwjsoncontenttype();
obj.set_jsoncontenttypevalue(jsoncontenttypevalue);
appfwjsoncontenttype response = (appfwjsoncontenttype) obj.get_resource(service);
return respons... |
python | async def _set_rev_reg(self, rr_id: str, rr_size: int) -> None:
"""
Move precomputed revocation registry data from hopper into place within tails directory.
:param rr_id: revocation registry identifier
:param rr_size: revocation registry size, in case creation required
"""
... |
java | public NumberExpression<Integer> month() {
if (month == null) {
month = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.MONTH, mixin);
}
return month;
} |
java | public void setDBClusterSnapshotAttributes(java.util.Collection<DBClusterSnapshotAttribute> dBClusterSnapshotAttributes) {
if (dBClusterSnapshotAttributes == null) {
this.dBClusterSnapshotAttributes = null;
return;
}
this.dBClusterSnapshotAttributes = new java.util.Array... |
python | def move_file(originals, destination):
"""
Move file from original path to destination path.
:type originals: Array of str
:param originals: The original path
:type destination: str
:param destination: The destination path
"""
for original in originals:
if o... |
java | private static Gson createGson(String className) {
GsonBuilder builder = new GsonBuilder();
// ISO8601 date format support
builder.setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSX");
builder.registerTypeAdapter(TranslationStatus.class,
new EnumWithFallbackAdapter<TranslationSt... |
python | def join_sources(source_module: DeploymentModule, contract_name: str):
""" Use join-contracts.py to concatenate all imported Solidity files.
Args:
source_module: a module name to look up contracts_source_path()
contract_name: 'TokenNetworkRegistry', 'SecretRegistry' etc.
"""
joined_file... |
java | public ServiceFuture<List<CompositeEntityExtractor>> listCompositeEntitiesAsync(UUID appId, String versionId, ListCompositeEntitiesOptionalParameter listCompositeEntitiesOptionalParameter, final ServiceCallback<List<CompositeEntityExtractor>> serviceCallback) {
return ServiceFuture.fromResponse(listCompositeEnt... |
python | def list_routers_on_hosting_device(self, client, hosting_device_id,
**_params):
"""Fetches a list of routers hosted on a hosting device."""
res_path = hostingdevice.HostingDevice.resource_path
return client.get((res_path + DEVICE_L3_ROUTERS) %
... |
java | public static float distancePointPlane(float pointX, float pointY, float pointZ,
float v0X, float v0Y, float v0Z, float v1X, float v1Y, float v1Z, float v2X, float v2Y, float v2Z) {
float v1Y0Y = v1Y - v0Y;
float v2Z0Z = v2Z - v0Z;
float v2Y0Y = v2Y - v0Y;
float v1Z0Z = v1Z -... |
java | private void addActivateColumn(
CmsListMetadata metadata,
CmsListDirectAction enable,
CmsListDirectAction deactivate) {
// create column for activation/deactivation
CmsListColumnDefinition actCol = new CmsListColumnDefinition(LIST_COLUMN_ACTIVATE);
actCol.setName(Message... |
java | public void restoreState() {
String memberStr = keyValStore.getValue(keyValStoreName);
if (null != memberStr) {
// The member was found in the key value store, so restore the
// state.
byte[] serialized = Hex.decode(memberStr);
ByteArrayInputStream bis = new ByteArrayInputStream(serialized);
try {
... |
java | private IsNullConditionDecision getDecision(BasicBlock basicBlock, IsNullValueFrame lastFrame)
throws DataflowAnalysisException {
assert lastFrame != null;
final InstructionHandle lastInSourceHandle = basicBlock.getLastInstruction();
if (lastInSourceHandle == null) {
re... |
java | @Override public final String getHeaderField(String fieldName) {
try {
return fieldName == null
? StatusLine.get(getResponse().getResponse()).toString()
: getHeaders().get(fieldName);
} catch (IOException e) {
return null;
}
} |
python | def get_calendar_for_object(self, obj, distinction=''):
"""
This function gets a calendar for an object. It should only return one
calendar. If the object has more than one calendar related to it (or
more than one related to it under a distinction if a distinction is
defined) a... |
java | public static MavenSpyLogProcessor.PluginInvocation newPluginInvocation(Element pluginInvocationElt) {
MavenSpyLogProcessor.PluginInvocation pluginInvocation = new MavenSpyLogProcessor.PluginInvocation();
pluginInvocation.groupId = pluginInvocationElt.getAttribute("groupId");
pluginInvocation.ar... |
java | public void cloneEmitter() {
if (selected == null) {
return;
}
try {
ByteArrayOutputStream bout = new ByteArrayOutputStream();
ParticleIO.saveEmitter(bout, selected);
ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray());
ConfigurableEmitter emitter = ParticleIO.loadEm... |
java | private Formula distribute(final Formula f1, final Formula f2) {
if (this.handler != null)
this.proceed = this.handler.performedDistribution();
if (this.proceed) {
final FormulaFactory f = f1.factory();
if (f1.type() == FType.OR || f2.type() == FType.OR) {
final LinkedHashSet<Formula> ... |
java | public static ConfusionMatrix createCumulativeMatrix(ConfusionMatrix... matrices)
{
ConfusionMatrix result = new ConfusionMatrix();
for (ConfusionMatrix matrix : matrices) {
for (Map.Entry<String, Map<String, Integer>> gold : matrix.map.entrySet()) {
for (Map.Entry<Strin... |
java | public int count(String key) {
ConcurrentMap<WebSocketConnection, WebSocketConnection> bag = registry.get(key);
return null == bag ? 0 : bag.size();
} |
java | ValidationResult cleanMultiValuePropertyKey(String name) {
ValidationResult vr = cleanObjectKey(name);
name = (String) vr.getObject();
// make sure its not a known property key (reserved in the case of multi-value)
try {
RestrictedMultiValueFields rf = RestrictedMultiValue... |
java | private void processProjectProperties() throws SQLException
{
List<Row> rows = getRows("select * from project_summary where projid=?", m_projectID);
if (rows.isEmpty() == false)
{
m_reader.processProjectProperties(rows.get(0));
}
} |
java | public String decodedPath() {
ensurePresence();
final String decodedPath = this.decodedPath;
if (decodedPath != null) {
return decodedPath;
}
return this.decodedPath = ArmeriaHttpUtil.decodePath(path);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.