language
stringclasses
2 values
func_code_string
stringlengths
63
466k
python
def get_string(self): """ Returns a string from the Diff resutl. Depending on the method, either the string will be generated directly from the PDA using the state removal method, or the PDA will be first translated to a CFG and then a string will be generated from the CF...
python
def add_record(cls, fqdn, name, type, value, ttl): """Create record for a domain.""" data = { "rrset_name": name, "rrset_type": type, "rrset_values": value, } if ttl: data['rrset_ttl'] = int(ttl) meta = cls.get_fqdn_info(fqdn) ...
python
def list_devices(self, shop_id=None, page_index=1, page_size=20): """ 查询设备 详情请参考 http://mp.weixin.qq.com/wiki/10/6232005bdc497f7cf8e19d4e843c70d2.html :param shop_id: 可选,门店 ID :param page_index: 可选,分页下标,默认从1开始 :param page_size: 可选,每页的个数,默认20个,最大20个 :retu...
java
private void applyAliases() { CustomFieldContainer fields = m_projectFile.getCustomFields(); for (Map.Entry<FieldType, String> entry : ALIASES.entrySet()) { fields.getCustomField(entry.getKey()).setAlias(entry.getValue()); } }
python
def track_field(field): """ Returns whether the given field should be tracked by Actionslog. Untracked fields are many-to-many relations and relations to the Actionslog LogAction model. :param field: The field to check. :type field: Field :return: Whether the given field should be tracked. ...
java
private static void hasValidatingMcfInterface(PrintStream out, PrintStream error, String classname, URLClassLoader cl) { try { out.print(" Validating: "); Class<?> clazz = Class.forName(classname, true, cl); if (hasInterface(clazz, "javax.resource.spi.ValidatingManag...
java
private static IHEAuditor getAuditorForClass(Class<? extends IHEAuditor> clazz) { if (null == clazz) { LOGGER.error("Error - Cannot specify a null auditor class"); } else { try { return clazz.newInstance(); } catch (ClassCastException e) { LOGGER.error("The requested class "+ clazz.getName() +" is...
java
protected void boxLocalVar(final Type type, final int slot, final boolean isSensitive) { visitVarInsn(type.getOpcode(ILOAD), slot); box(type, isSensitive); }
python
def store_json(self, filename, dict_to_store): """Store json files.""" filename = os.path.join( self.data_dir, filename + '.data' ) fileops.dump_dict_to_file( dict_to_store, filename )
python
def delete(self, request, bot_id, id, format=None): """ Delete existing handler --- responseMessages: - code: 401 message: Not authenticated """ return super(HandlerDetail, self).delete(request, bot_id, id, format)
java
@GET @Path("create") public Response createFromRedirect() { KeycloakPrincipal principal = (KeycloakPrincipal) sessionContext.getCallerPrincipal(); RefreshableKeycloakSecurityContext kcSecurityContext = (RefreshableKeycloakSecurityContext) principal.getKeycloakSecurityContext(); ...
python
def add_logger_encoder(self, encoder, logger=None, requests_only=False, for_single_worker=False): """Add an item in the log encoder or request encoder chain. * http://uwsgi-docs.readthedocs.io/en/latest/LogEncoders.html .. note:: Encoders automatically enable master log handling (see ``.se...
python
def is_koish(board, c): 'Check if c is surrounded on all sides by 1 color, and return that color' if board[c] != EMPTY: return None neighbors = {board[n] for n in NEIGHBORS[c]} if len(neighbors) == 1 and EMPTY not in neighbors: return list(neighbors)[0] else: return None
python
def read_CTOH(self,filename,params=None,force=False,timerange=None,datatype=None,**kwargs): """ Read AVISO Along-Track SLA regional products :return outStr: Output data structure containing all recorded parameters as specificied by NetCDF file PARAMETER list. :aut...
java
public List<InMemoryHistoryNode> getMetrics(final String metricName, final Date from, final Date to, final Boolean useStats) throws ClassCastException { final LinkedList<InMemoryHistoryNode> selectedLists = new LinkedList<>(); if (this.historyListMapping.containsKey(metricName)) { logger.debu...
java
public String _(String key, Object... args) { // JellyBuilder b = (JellyBuilder)getDelegate(); ResourceBundle resourceBundle = getResourceBundle(); // notify the listener if set // InternationalizedStringExpressionListener listener = (InternationalizedStringExpressionListener) Stapler.ge...
java
private <F extends FileDescriptor> F scanFile(MavenProjectDirectoryDescriptor projectDescriptor, File file, String path, Scope scope, Scanner scanner) { scanner.getContext().push(MavenProjectDirectoryDescriptor.class, projectDescriptor); try { return scanner.scan(file, path, scope); ...
python
def set_flair(self, *args, **kwargs): """Set flair for this submission. Convenience function that utilizes :meth:`.ModFlairMixin.set_flair` populating both the `subreddit` and `item` parameters. :returns: The json response from the server. """ return self.subreddit.set...
java
public EEnum getBDMDatFmt() { if (bdmDatFmtEEnum == null) { bdmDatFmtEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(7); } return bdmDatFmtEEnum; }
python
def list_commands(self, ctx): """Override for showing commands in particular order""" commands = super(PinaxGroup, self).list_commands(ctx) return [cmd for cmd in order_manually(commands)]
java
public OvhTransaction payment_transaction_transactionId_GET(Long transactionId) throws IOException { String qPath = "/me/payment/transaction/{transactionId}"; StringBuilder sb = path(qPath, transactionId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhTransaction.class); }
python
def samples(self, gp, Y_metadata=None): """ Returns a set of samples of observations conditioned on a given value of latent variable f. :param gp: latent variable """ orig_shape = gp.shape gp = gp.flatten() weibull_samples = np.array([sp.stats.weibull_min.rvs(sel...
java
public static ipsecprofile[] get(nitro_service service) throws Exception{ ipsecprofile obj = new ipsecprofile(); ipsecprofile[] response = (ipsecprofile[])obj.get_resources(service); return response; }
java
@Override public Response createApplication( Application app ) { this.logger.fine( "Request: create application " + app + "." ); Response result; try { String tplName = app.getTemplate() == null ? null : app.getTemplate().getName(); String tplQualifier = app.getTemplate() == null ? null : app.getTemplate(...
python
def call(ezo, name, method, data, target): ''' calls a method with data and returns a result without changing the chain state :param ezo: ezo instance :param name: name of the Contract :param method: name of the contract method :param data: formatted data to send to th...
java
public static HostAndPort of(String host, int port) { LettuceAssert.isTrue(isValidPort(port), String.format("Port out of range: %s", port)); HostAndPort parsedHost = parse(host); LettuceAssert.isTrue(!parsedHost.hasPort(), String.format("Host has a port: %s", host)); return new HostAnd...
python
def difference(self, other): """Returns a new Interval or an :class:`~pyinter.IntervalSet` representing the subtraction of this :class:`~pyinter.Interval` with the other :class:`~pyinter.Interval`. The result will contain everything that is contained by the left interval but not contained ...
python
def adapt_files(solver): """ Rename and remove files whenever necessary. """ print("adapting {0}'s files".format(solver)) root = os.path.join('solvers', solver) for arch in to_extract[solver]: arch = os.path.join(root, arch) extract_archive(arch, solver, put_inside=True) ...
python
def _derY(self,x,y): ''' Returns the derivative with respect to y of the interpolated function at each value in x,y. Only called internally by HARKinterpolator2D.derivativeX. ''' x_pos, y_pos = self.findSector(x,y) alpha, beta = self.findCoords(x,y,x_pos,y_pos) #...
python
def entities(self, subject_id): """ Returns all the entities of assertions for a subject, disregarding whether the assertion still is valid or not. :param subject_id: The identifier of the subject :return: A possibly empty list of entity identifiers """ res = self._cache...
java
public static H2HeaderField decodeHeader(WsByteBuffer buffer, H2HeaderTable table, boolean isFirstHeader, boolean isTrailerBlock, H2ConnectionSettings settings) throws CompressionException { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { ...
python
def data_to_bytes(self, data_element, encoding=None): """ Converts the given data element into a string representation using the :method:`data_to_string` method and encodes the resulting text with the given encoding. """ if encoding is None: encoding = self.en...
java
public TabbedPanel2 getTabbedSelect() { if (tabbedSelect == null) { tabbedSelect = new TabbedPanel2(); tabbedSelect.setPreferredSize(new Dimension(200, 400)); tabbedSelect.setName("tabbedSelect"); tabbedSelect.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); } return tabbedSelect; }
java
private static boolean canWrapChain( ClassLoader loader ) { if( loader == null ) { return false; } UrlClassLoaderWrapper wrapped = UrlClassLoaderWrapper.wrap( loader ); boolean bSysLoader = loader == ClassLoader.getSystemClassLoader(); if( bSysLoader ) { return wrapped != null; } ...
java
public void addGetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) { StringBuilder sb = new StringBuilder(); method.addJavaDocLine("/**"); if (StringUtility.stringHasValue(introspectedColumn.getRemarks())) { sb.append(" * 获取"); ...
java
protected int countComponentContainPaxWicketBeanAnnotatedOneLevel(Class<?> component) { Class<?> clazz = component; int numberOfInjectionFields = 0; for (Field field : clazz.getDeclaredFields()) { if (field.isAnnotationPresent(Inject.class)) { numberOfInjectionFields+...
java
@Override public synchronized RecordScan insert(long sessionId, String scanName) throws DatabaseException { try { psInsert.setLong(1, sessionId); psInsert.setString(2, scanName); psInsert.executeUpdate(); int id; try (ResultSet rs = psGetIdLastInsert.executeQuery()) { rs.next();...
python
def show_zoning_enabled_configuration_output_enabled_configuration_cfg_name(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") show_zoning_enabled_configuration = ET.Element("show_zoning_enabled_configuration") config = show_zoning_enabled_configuration ...
java
public TregexMatcher matcher(Tree t) { return matcher(t, t, new IdentityHashMap<Tree, Tree>(), new HashMap<String, Tree>(), new VariableStrings()); }
java
public final Company createCompany(TenantOrProjectName parent, Company company) { CreateCompanyRequest request = CreateCompanyRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setCompany(company) .build(); return createCompany(request); }
python
def append(self, map): """ Appends new elements to this map. :param map: a map with elements to be added. """ if isinstance(map, dict): for (k, v) in map.items(): key = StringConverter.to_string(k) value = v self.put(ke...
java
@BetaApi public final AggregatedListTargetVpnGatewaysPagedResponse aggregatedListTargetVpnGateways( String project) { AggregatedListTargetVpnGatewaysHttpRequest request = AggregatedListTargetVpnGatewaysHttpRequest.newBuilder().setProject(project).build(); return aggregatedListTargetVpnGateways(r...
python
def _parse_keypad(self, keypad_xml): """Parses a keypad device (the Visor receiver is technically a keypad too).""" keypad = Keypad(self._lutron, name=keypad_xml.get('Name'), integration_id=int(keypad_xml.get('IntegrationID'))) components = keypad_xml.find('Components...
python
def append(self, *strings): """ Adds any number of supplied *strings* to `self` (we're a subclass of `str` remember) just before the last closing tag and returns a new instance of `~htmltag.HTML` with the result. Example:: >>> from htmltag import span, b ...
python
def check(self, pattern): """ Apply `pattern` on the current position and return the match object. (Doesn't touch pos). Use this for lookahead. """ if self.eos: raise EndOfText() if pattern not in self._re_cache: self._re_cache[pattern] = r...
java
public static <Type> NegateValidator<Type> create(@NonNull final CharSequence errorMessage, @NonNull final Validator<Type> validator) { return new NegateValidator<>(errorMessage, validator); }
java
private void checkElement(Element elementToBeAdded) { if (!(elementToBeAdded instanceof Person) && !(elementToBeAdded instanceof SoftwareSystem) && !(elementToBeAdded instanceof Container) && !(elementToBeAdded instanceof Component)) { throw new IllegalArgumentException("Only people, software system...
java
public void init(Partition p) throws Exception { Class.forName(jdbcDeepJobConfig.getDriverClass()); conn = DriverManager.getConnection(jdbcDeepJobConfig.getConnectionUrl(), jdbcDeepJobConfig.getUsername(), jdbcDeepJobConfig.getPassword()); Statement statement = co...
python
def optimizer(self) -> Union[mx.optimizer.Optimizer, SockeyeOptimizer]: """ Returns the optimizer of the underlying module. """ # TODO: Push update to MXNet to expose the optimizer (Module should have a get_optimizer method) return self.current_module._optimizer
java
public static Object waitForAppearanceInJNDI(final Context ctx, final String jndiName, long timeout) { while (timeout > 0) { try { Object result = ctx.lookup(jndiName); if (result != null) { return result; } } catch (Nam...
java
void clearLocalProperties() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "clearLocalProperties"); if (locallyStoredPropertyValues != null) locallyStoredPropertyValues.clear(); // d255144 Also clear the local version of the mess...
python
def resource_quota_update(sender, instance, **kwargs): """ Update resource consumption details and price estimate if its configuration has changed """ quota = instance resource = quota.scope try: new_configuration = CostTrackingRegister.get_configuration(resource) except ResourceNotRegistere...
java
@ManagedAttribute(description = "Global configuration properties", displayName = "Global configuration properties", dataType = DataType.TRAIT, displayType = DisplayType.SUMMARY) public Properties getGlobalConfigurationAsProperties() { return new PropertyFormatter().format(configurationManager.getGlobalConfigur...
java
public void decodeBulk(byte[][] readBufs, byte[][] writeBufs, int[] erasedLocations) throws IOException { int[] tmpInput = new int[readBufs.length]; int[] tmpOutput = new int[erasedLocations.length]; int numBytes = readBufs[0].length; for (int idx = 0; idx < numBytes; idx++) { for (int i = ...
java
public PagedList<VaultInner> listBySubscription(final Integer top) { ServiceResponse<Page<VaultInner>> response = listBySubscriptionSinglePageAsync(top).toBlocking().single(); return new PagedList<VaultInner>(response.body()) { @Override public Page<VaultInner> nextPage(String ne...
python
def done(self): """Return True the future is done, False otherwise. This still returns True in failure cases; checking :meth:`result` or :meth:`exception` is the canonical way to assess success or failure. """ return self._exception != self._SENTINEL or self._result != self._SEN...
python
def replace_cluster_role(self, name, body, **kwargs): """ replace the specified ClusterRole This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_cluster_role(name, body, async_req=True) ...
java
@Override protected void initGraphics() { super.initGraphics(); barColor = tile.getBarColor(); barBackground = new Region(); barBackground.setBackground(new Background(new BackgroundFill(tile.getBarBackgroundColor(), new CornerRadii(0.0, 0.0, 0.025, 0.025, true), Insets.EMPTY))); ...
java
void flush(ByteBuf out) { final int bitCount = this.bitCount; if (bitCount > 0) { final long bitBuffer = this.bitBuffer; final int shiftToRight = 64 - bitCount; if (bitCount <= 8) { out.writeByte((int) (bitBuffer >>> shiftToRight << 8 - bitCount)); ...
python
def insert_from_xmldoc(connection, source_xmldoc, preserve_ids = False, verbose = False): """ Insert the tables from an in-ram XML document into the database at the given connection. If preserve_ids is False (default), then row IDs are modified during the insert process to prevent collisions with IDs already in t...
python
def cancel(self, *args, **kwargs): """ Cancel all queue items - then attempt to cancel all in progress items """ self._cancel_called = True self.clear_waiting_coordinators(cancel=True) super(AsperaTransferCoordinatorController, self).cancel(*args, **kwargs)
java
@Override public <I> Choice8<A, B, C, D, E, F, G, I> pure(I i) { return h(i); }
python
def remove_agent(self, agent: GUIAgent): """ Removes the given agent. :param agent: the agent to remove :return: """ self.index_manager.free_index(agent.overall_index) self.agents.remove(agent) self.update_teams_listwidgets() self.overall_config.se...
python
def normalize_attr_values(a: Any) -> np.ndarray: """ Take all kinds of input values and validate/normalize them. Args: a List, tuple, np.matrix, np.ndarray or sparse matrix Elements can be strings, numbers or bools Returns a_normalized An np.ndarray with elements conforming to one of the valid Loom at...
java
public static void emptyAndDelete(File fileOrDir) { if (fileOrDir.isDirectory()) { File[] files = fileOrDir.listFiles(); for (File file : files) { emptyAndDelete(file); } } fileOrDir.delete(); }
python
def _decode(frame, tab): """Decode a frame with the help of the table.""" blocks = [] # Decode each block while frame: length, endseq = tab[frame[0]] blocks.extend([frame[1:length], endseq]) frame = frame[length:] # Remove one (and only one)...
java
public boolean update( Image input , RectangleRotate_F64 output ) { if( trackLost ) return false; trackFeatures(input, region); // See if there are enough points remaining. use of config.numberOfSamples is some what arbitrary if( pairs.size() < config.numberOfSamples ) { System.out.println("Lack of sa...
python
def get_dataset(): """Create a dataset for machine learning of segmentations. Returns ------- tuple : (X, y) where X is a list of tuples. Each tuple is a feature. y is a list of labels (0 for 'not in one symbol' and 1 for 'in symbol') """ seg_data = "segmentation-X.npy" seg_...
python
def submit_error(url, user, project, area, description, extra=None, default_message=None): """Celery task for submitting errors asynchronously. :param url: string URL for bugzscout :param user: string fogbugz user to designate when submitting via bugzscout :param proje...
python
def analyze_one(self, nm, importernm=None, imptyp=0, level=-1): """ break the name being imported up so we get: a.b.c -> [a, b, c] ; ..z -> ['', '', z] """ #print '## analyze_one', nm, importernm, imptyp, level if not nm: nm = importernm importernm...
python
def dedupe_by(things, key=None): """ Given an iterator of things and an optional key generation function, return a new iterator of deduped things. Things are compared and de-duped by the key function, which is hash() by default. """ if not key: key = hash index = {key(thing): thing f...
java
public static final SupportProgressDialogFragment newInstance(Context context, int title, int message, boolean indeterminate) { return newInstance(context.getString(title), context.getString(message), indeterminate); }
python
def fit(self, X, y, Z): """Compute the Semi-Supervised Shared Response Model Parameters ---------- X : list of 2D arrays, element i has shape=[voxels_i, n_align] Each element in the list contains the fMRI data for alignment of one subject. There are n_align samp...
python
def row_csv_limiter(rows, limits=None): """ Limit row passing a value or detect limits making the best effort. """ limits = [None, None] if limits is None else limits if len(exclude_empty_values(limits)) == 2: upper_limit = limits[0] lower_limit = limits[1] elif len(exclude_emp...
java
private void tryFoldForCondition(Node forCondition) { if (NodeUtil.getPureBooleanValue(forCondition) == TernaryValue.TRUE) { reportChangeToEnclosingScope(forCondition); forCondition.replaceWith(IR.empty()); } }
python
def normalizeRotationAngle(value): """ Normalizes an angle. * Value must be a :ref:`type-int-float`. * Value must be between -360 and 360. * If the value is negative, it is normalized by adding it to 360 * Returned value is a ``float`` between 0 and 360. """ if not isinstance(value, (in...
python
def thumbnail(self): """Read-only attribute that provides the value of the thumbnail to display. """ # check if there is a valid thumbnail override if self.thumbnail_override.id is not None: return self.thumbnail_override # otherwise, just try to grab the first image...
java
public boolean commmit(KafkaMessage msg, String groupId) { KafkaMsgConsumer kafkaConsumer = cacheConsumers.get(groupId); return kafkaConsumer != null ? kafkaConsumer.commit(msg) : false; }
java
public CmsUser readUser(CmsRequestContext context, String username, String password) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); CmsUser result = null; try { result = m_driverManager.readUser(dbc, CmsOrganizationalUnit.removeLeadingSeparator(us...
java
public Observable<Void> disableAsync(String resourceGroupName, String workflowName) { return disableWithServiceResponseAsync(resourceGroupName, workflowName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return...
python
def total(self): """ Return the total (virtual) size of the process in bytes. If process information is not available, get the best number available, even if it is a poor approximation of reality. """ if self.system_total.available: return self.system_total.vs...
java
public void setClasspathref (Reference pathref) { _cloader = ClasspathUtils.getClassLoaderForPath(getProject(), pathref); // set the parent of the classloader to be the classloader used to load this task, rather // than the classloader used to load Ant, so that we have access to Narya class...
python
def command_set_factory(bridge, group_number, led_type): """ Create command set for controlling a specific led group. :param bridge: The bridge the leds are connected to. :param group_number: The group number. :param led_type: The type of the leds. :return: The created command set. """ f...
java
public static CommerceCurrency findByGroupId_First(long groupId, OrderByComparator<CommerceCurrency> orderByComparator) throws com.liferay.commerce.currency.exception.NoSuchCurrencyException { return getPersistence().findByGroupId_First(groupId, orderByComparator); }
python
def reload(filename=None, url=r"https://raw.githubusercontent.com/googlei18n/emoji4unicode/master/data/emoji4unicode.xml", loader_class=None): u"""reload google's `emoji4unicode` project's xml file. must call this method first to use `e4u` library.""" if loader_class is None: loader_clas...
java
public boolean remove(String mem){ try { return getJedisCommands(groupName).zrem(key,mem) >= 1; } finally{ getJedisProvider(groupName).release(); } }
java
public static void putLongBE(final byte[] array, final int offset, final long value) { array[offset + 7] = (byte) (value ); array[offset + 6] = (byte) (value >>> 8); array[offset + 5] = (byte) (value >>> 16); array[offset + 4] = (byte) (value >>> 24); array[offset + 3] = (byte) (value >>> 32)...
java
private void introspect() { if (!listenerClass.isAnnotationPresent(EntityListener.class)) { String message = String.format( "Class %s must have %s annotation to be used as an EntityListener", listenerClass.getName(), EntityListener.class.getName()); throw new EntityManagerException(m...
java
private void createAndLockDescriptorFile() throws CmsException { String sitePath = m_sitepath + m_basename + CmsMessageBundleEditorTypes.Descriptor.POSTFIX; m_desc = m_cms.createResource( sitePath, OpenCms.getResourceManager().getResourceType(CmsMessageBundleEditorTypes.BundleTy...
java
@Nonnull public BugInstance addSourceLine(ClassContext classContext, Method method, Location location) { return addSourceLine(classContext, method, location.getHandle()); }
python
def runCommand(command, silent=False, shell=False): """ Run a shell command """ splits = shlex.split(command) runCommandSplits(splits, silent=silent, shell=shell)
java
@Override public java.util.concurrent.Future<BatchWriteItemResult> batchWriteItemAsync(java.util.Map<String, java.util.List<WriteRequest>> requestItems, com.amazonaws.handlers.AsyncHandler<BatchWriteItemRequest, BatchWriteItemResult> asyncHandler) { return batchWriteItemAsync(new BatchWriteItem...
java
@Deprecated public static StringBuffer convertIDNToUnicode(String src, int options) throws StringPrepParseException{ return IDNA2003.convertIDNToUnicode(src, options); }
java
public Description getDescription() { return DescriptionBuilder.builder() .name(SERVICE_PROVIDER_NAME) .title("Example Step") .description("Does nothing") .property(PropertyBuilder.builder() .string("bunny") .tit...
python
def write(filename, mesh, write_binary=False): """Writes mdpa files, cf. <https://github.com/KratosMultiphysics/Kratos/wiki/Input-data>. """ assert not write_binary if mesh.points.shape[1] == 2: logging.warning( "mdpa requires 3D points, but 2D points given. " "Append...
java
@Override public void write (@Nonnull final byte [] b, @Nonnegative final int off, @Nonnegative final int len) throws IOException { checkThreshold (len); getStream ().write (b, off, len); m_nWritten += len; }
java
protected boolean valueIsNull(MapEntryValue value) { return value == null || value.type() == MapEntryValue.Type.TOMBSTONE; }
java
public Snippet createSnippet(Object projectIdOrPath, String title, String filename, String description, String code, Visibility visibility) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title, true) .withParam("file_name...
python
def get_field_by_name(self, name): """ the field member matching name, or None if no such field is found """ for f in self.fields: if f.get_name() == name: return f return None
java
public void product(LongIntVector other) { // TODO: Add special case for LongIntDenseVector. for (int i=0; i<idxAfterLast; i++) { elements[i] *= other.get(i); } }