patch
stringlengths
18
160k
callgraph
stringlengths
4
179k
summary
stringlengths
4
947
msg
stringlengths
6
3.42k
@@ -4,6 +4,8 @@ module HtmlCssToImage FALLBACK_IMAGE = "https://thepracticaldev.s3.amazonaws.com/i/g355ol6qsrg0j2mhngz9.png".freeze + CACHE_EXPIRATION = 2.years + def self.url(html:, css: nil, google_fonts: nil) image = HTTParty.post("https://hcti.io/v1/image", body: { html: h...
[url->[post],fetch_url->[present?,read,url,write],freeze]
Get the url of an image in the host system.
I don't think we ever want Redis to be so full that we have to use the eviction policy and I also think Redis data should stay pretty up to date. Anything that is stale we want to try and remove as soon as possible. With that said, what do you think about changing this to 1.month? cc @benhalpern
@@ -127,7 +127,9 @@ class PythonPackage(PackageBase): list: list of strings of module names """ modules = [] - root = self.spec['python'].package.get_python_lib(prefix=self.prefix) + root = os.path.join( + self.prefix, self.spec['python'].package.config_vars['fals...
[PythonPackage->[setup_py->[setup_file,python],build_clib->[setup_py],install->[setup_py],install_data->[setup_py],install_headers->[setup_py],install_scripts->[setup_py],build_ext->[setup_py],build->[setup_py],build_scripts->[setup_py],install_lib->[setup_py],build_py->[setup_py]]]
Imports all modules that the Python package provides.
should this have some other index for `config_vars` or is it really `['false']['false']`?
@@ -24,10 +24,16 @@ export const FACEBOOK_IMAGE_SIZES = { * @returns {string} The display mode of the image. */ export function determineFacebookImageMode( originalDimensions ) { + const largeThreshold = { height: 233, width: 446 }; + if ( originalDimensions.height > originalDimensions.width ) { return "portr...
[No CFG could be retrieved]
Determines the display mode of the image given its dimensions. The image that is expected to be in the expected image.
Can we put these values in a constant somewhere?
@@ -77,9 +77,7 @@ import java.net.MalformedURLException; import java.net.URI; import java.net.URL; import java.net.URLConnection; -import java.nio.file.Files; -import java.nio.file.InvalidPathException; -import java.nio.file.StandardCopyOption; +import java.nio.file.*; import java.util.ArrayList; import java.util....
[FilePath->[getTotalDiskSpace->[act],unzipFrom->[invoke->[unzip]],unzip->[invoke->[getRemote,unzip],FilePath,unzip],equals->[equals],mkdirs->[invoke->[mkdirs],exists,act,mkdirs],AbstractInterceptorCallableWrapper->[call->[call],getClassLoader->[getClassLoader]],untarFrom->[invoke->[extract]],write->[invoke->[write,mkdi...
Imports a single object from the Java library. Package that imports the necessary packages.
nit: I personally prefer using single-class imports (especially for non-static imports) to make it obvious what classes are being used and avoid any name clashes if new classes are added to the package. I don't know if there is a preference either way in Jenkins in general.
@@ -14,6 +14,7 @@ module View needs :follow_scroll, default: true, store: true needs :selected_action_id, default: nil, store: true needs :limit, default: nil + needs :scroll_pos, default: nil, store: true def render children = [render_log]
[GameLog->[render->[h,new,player_by_id,process_action,strip,lambda,participant?],render_date_banner->[strftime,h],render_log->[new,yday,color_for,lambda,first,clientHeight,h,render_date_banner,log,flat_map,last,render_log_for_action,created_at,to_h,scrollTop,now,target,id,call,store,scrollHeight],render_action_buttons-...
Renders a with a hidden child that displays a block of content if the user has no.
if you're going to pass it in don't put store true here
@@ -81,6 +81,9 @@ class UDPTransport: def receive(self, data, host_port): # pylint: disable=unused-argument try: self.protocol.receive(data) + except InvalidProtocolMessage as e: + log.warning("Can't decode: {} (data={}, len={})".format(str(e), data, len(data))) + ...
[DummyNetwork->[send->[track_send]],UDPTransport->[receive->[receive],stop->[stop],__init__->[DummyPolicy],start->[start],stop_accepting->[stop_accepting],send->[consume]],DummyTransport->[receive->[receive,track_recv],send->[consume,send],__init__->[DummyPolicy,ServerMock,register],DummyNetwork]]
Receive a message from the network.
Why do we need that here?
@@ -284,6 +284,16 @@ func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Reques rawResponse = headerBytes } + // If the backend did not upgrade the request, return an error to the client. If the response was + // an error, the error is forwarded directly after the connection is hijacked. Ot...
[RoundTrip->[RoundTrip],ServeHTTP->[ServeHTTP,Error],Error->[Error],DialForUpgrade->[WrapRequest],tryUpgrade->[Error]]
tryUpgrade attempts to upgrade the given request to the backend proxy. If the upgrade fails the This function hijackes the connection and writes the response back to the client. Proxy the connection to the client.
here I'm using `rawResponseCode` directly vs `backendHTTPResponse.StatusCode` in 4.x
@@ -663,7 +663,7 @@ func (am *MultitenantAlertmanager) loadAndSyncConfigs(ctx context.Context, syncR level.Info(am.logger).Log("msg", "synchronizing alertmanager configs for users") am.syncTotal.WithLabelValues(syncReason).Inc() - cfgs, err := am.loadAlertmanagerConfigs(ctx) + allUsers, cfgs, err := am.loadAlertm...
[Validate->[Validate],serveRequest->[ServeHTTP],newAlertmanager->[getTenantDirectory],RegisterFlags->[RegisterFlags],alertmanagerFromFallbackConfig->[setConfig]]
loadAndSyncConfigs loads all the alertmanager configs and synchronizes them with the local user.
My understanding is that `loadAlertmanagerConfigs` only returns users owned by this instance (see lines 717-720), not "all users" with configuration.
@@ -122,7 +122,10 @@ module GobiertoPeople expected_tamara_data = { "key" => tamara.name, - "value" => [{ "key" => Time.zone.parse("2017/01"), "value" => 2 }] + "value" => [{ "key" => Time.zone.parse("2017/01"), "value" => 2, "url"=>"/agendas/tamara-devoux/eventos...
[PeopleIndexTest->[test_people_index_with_filters_test->[size,parse,assert_response,assert_equal,get,body,first,name,with_current_site,id],test_people_index_test_with_events_history->[size,parse,assert_response,assert_equal,get,body,create_event,destroy_all,detect,with_current_site,name],madrid->[sites],test_people_ind...
This test tests the people index with events history and tamara data.
Surrounding space missing for operator =>.<br>Line is too long. [183/180]
@@ -9,6 +9,13 @@ frappe.query_reports["Addresses And Contacts"] = { "label": __("Entity Type"), "fieldtype": "Link", "options": "DocType", + "get_query": function() { + return { + "filters": { + "name": ["in", "Contact, Address"], + } + } + } }, { "fieldname":"reference_name...
[No CFG could be retrieved]
2016 - Frappe Technologies and contributors.
Why? what's your requirement here?
@@ -92,7 +92,8 @@ public class FlattenJSONBenchmark public Map<String, Object> baseline(final Blackhole blackhole) { Map<String, Object> parsed = flatParser.parseToMap(flatInputs.get(flatCounter)); - for (String s : parsed.keySet()) { + for (Map.Entry<String, Object> entry : parsed.entrySet()) { + ...
[FlattenJSONBenchmark->[prepare->[getNestedParser,getJqParser,getFieldDiscoveryParser,generateFlatEvent,getFlatParser,generateNestedEvent,FlattenJSONBenchmarkUtil,getForcedPathParser,add],baseline->[keySet,parseToMap,get,consume],flatten->[keySet,parseToMap,get,consume],forcedRootPaths->[keySet,parseToMap,get,consume],...
Benchmarks a single missing event.
This can be just an iteration over `parsed.values()`. Similar in many other places in this PR.
@@ -426,14 +426,15 @@ public class ContainerBalancer { ContainerInfo container = containerManager.getContainer(moveSelection.getContainerID()); this.sizeMovedPerIteration += container.getUsedBytes(); - this.countDatanodesInvolvedPerIteration += 2; + metri...
[ContainerBalancer->[start->[start],toString->[toString]]]
This method performs the actual move of the container from one node to another. check if move is successful and update targets and selected targets.
Maybe we should also log the source dn here.
@@ -38,9 +38,15 @@ public class QueryDataSource implements DataSource } @Override - public String getName() + public Iterable<String> getNames() { - return query.getDataSource().getName(); + return query.getDataSource().getNames(); + } + + @Override + public String toShortString() + { + return...
[QueryDataSource->[hashCode->[hashCode],getName->[getName],toString->[toString],equals->[equals]]]
Returns the name of a .
I find this method a bit confusing. What is short string?
@@ -42,6 +42,8 @@ class Extends my_module_repository: 17, my_module_protocol: 18 } + ACTIVE_REPORT_ELEMENTS = %i(project_header my_module experiment my_module_repository) + # Data type name should match corresponding model's name REPOSITORY_DATA_TYPES = {...
[Extends->[freeze]]
This function returns a list of all the data types of a given model. Details of the repository.
Style/MutableConstant: Freeze mutable objects assigned to constants.
@@ -68,11 +68,13 @@ class SenderMixin(object): if not isinstance(message, Message): raise ValueError("Scheduling batch messages only supports iterables containing Message Objects." " Received instead: {}".format(message.__class__.__name__)) + if...
[ServiceBusSender->[schedule_messages->[_open,_build_schedule_request],__init__->[_create_attribute],_open->[_create_handler],cancel_scheduled_messages->[_open],_send->[_open,_set_msg_timeout]]]
Build a schedule request from the given messages.
Typical "pythonic" nonsense question, is there a way that we could do this without an explicit typecheck via a try/except? (I always feel unsure when I try to follow this dogma because it can sometimes make code less intuitive/messier, so absolutely judge this on cleanliness as well as letter-of-the-law in case it ends...
@@ -30,14 +30,15 @@ Rails.application.configure do # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # Generate digests for assets URLs. + # Asset digests allow you to set far-future HTTP expiration dates on all assets, + # yet still be able to expire them...
[new,compile,smtp_mailer_password,smtp_mailer_address,consider_all_requests_local,log_formatter,cache_classes,use,deprecation,smtp_mailer_authentication,dump_schema_after_migration,exception_notifications_to,smtp_mailer_domain,require,force_ssl,delivery_method,eager_load,blank?,smtp_mailer_port,smtp_mailer_enable_start...
Configures the configuration for a specific application. Ignore bad email addresses and do not raise email delivery errors.
Line is too long. [82/80]
@@ -18,10 +18,11 @@ else { } } - if ($handle = opendir($config['install_dir'].'/includes/services/')) { + if ($handle = opendir($config['nagios_plugins'])) { while (false !== ($file = readdir($handle))) { - if ($file != '.' && $file != '..' && !strstr($file, '.')) { - ...
[No CFG could be retrieved]
Add a new service.
Fix `list(,$check_name) = explode('_',$file);` to `list(,$check_name) = explode('_',$file,2);`. Avoids cutoff where the plugin is called `check_rta_multi` etc.
@@ -25,11 +25,13 @@ class VtkM(CMakePackage, CudaPackage): git = "https://gitlab.kitware.com/vtk/vtk-m.git" version('master', branch='master') + version('release', branch='release') + version('1.6.0-rc1', sha256="223f23b11260618c19c6a4fdc10e235f3f14fe955f604e55a068dabddd31af95") version('1.5...
[VtkM->[check_install->[smoke_test],smoke_test->[write,print,Executable,working_dir,cmake,test,RuntimeError,open,listdir,rmtree],cmake_args->[satisfies,append,working_dir,print,format,join,InstallError],depends_on,conflicts,version,on_package_attributes,variant,run_after]]
VTK - m is a toolkit of scientific visualization algorithms for all of Generate a sequence of all possible version - specific features.
Good catch, find this fixed in the last push.
@@ -143,6 +143,10 @@ function filterWhitelistedLinks(markdown) { // Links inside a <code> block (illustrative, and not always valid) filteredMarkdown = filteredMarkdown.replace(/<code>(.*?)<\/code>/g, ''); + // The heroku nightly build page is not always acccessible by the checker. + filteredMarkdown = filter...
[No CFG could be retrieved]
Checks if a file is in the given link list and if so runs the link checker. Check for dead links in markdown file.
Replace `http` with `https?`
@@ -300,13 +300,14 @@ class OrderedItemManager(models.Manager): try: target_item = target_group.items.get( product=item.product, product_name=item.product_name, - product_sku=item.product_sku) + product_sku=item.product_sku, stock=item.stock) ...
[OrderedItem->[change_quantity->[save,get_total_quantity,get_items,change_status,create_history_entry],OrderedItemManager],DeliveryGroup->[can_ship->[is_shipping_required],change_status->[save]],Payment->[get_purchased_items->[get_items],send_confirmation_email->[get_user_current_email],PaymentManager],Order->[send_con...
Move an item to a group.
To improve readability, I would rename this function to `merge_duplicated_lines` and add a docstring explaining its purpose. Also I think it could be moved to the "utils" module (as well as all of these functions in OrderedItemManager, but not all of them in this PR :)).
@@ -24,7 +24,10 @@ export class AmpContext { * @param {Window} win The window that the instance is built inside. */ constructor(win) { - this.setupMetadata_(); + this.win_ = win; + if (!this.getWindowSentinel_()) { + this.setupMetadata_(); + } this.client_ = new IframeMessagingClient(w...
[No CFG could be retrieved]
Creates a new AmpContext object that can be used to create a new instance of the observe intersection message.
can you add some doc to explain in what scenario we don't need to parse the metadata?
@@ -333,6 +333,12 @@ class Executor(object): fetch_var_name=fetch_var_name) self._feed_data(program, feed, feed_var_name, scope) + + # TODO(gongwb): does a program should be saved in run function? + if len(save_program_to_file) > 0: + with open(save_program_to_file, ...
[Executor->[_add_feed_fetch_ops->[has_feed_operators,has_fetch_operators],_feed_data->[as_lodtensor],run->[global_scope,get_program_cache_key,_get_program_cache,_add_program_cache,_add_feed_fetch_ops,run,as_numpy,_fetch_data,_feed_data],__init__->[Executor]],as_numpy->[as_numpy],fetch_var->[global_scope,as_numpy],scope...
Run a single n - node program by this Executor. Feed data by feed map and fetch Adds the necessary feed and fetch ops to the program.
I'm not sure we should do the save here...
@@ -51,6 +51,6 @@ class RequestAttributes */ public function merge(RequestAttributes $requestAttributes) { - return new self(array_merge($this->attributes, $requestAttributes->attributes)); + return new self(array_merge($requestAttributes->attributes, $this->attributes)); } }
[No CFG could be retrieved]
Merges the given request attributes into this request attributes.
This change is required because the `ParameterRequestProcessor` is called before the `WebsiteRequestProcessor`, and the values from the first one should not be overridden. However, I am not quite sure yet if this change is also ok with the `CustomUrlRequestProcessor`. But it looks that way, since the other `RequestProc...
@@ -35,12 +35,12 @@ public class AggregateAnalyzerTest { private static final KsqlParser KSQL_PARSER = new KsqlParser(); private MetaStore metaStore; - private FunctionRegistry functionRegistry; + private InternalFunctionRegistry functionRegistry; @Before public void init() { - metaStore = MetaStor...
[AggregateAnalyzerTest->[testAggregateWithExpressionHavingQueryAnalysis->[analyzeAggregates],testMultipleAggregateQueryAnalysis->[analyzeAggregates],testExpressionArgAggregateQueryAnalysis->[analyzeAggregates],testSimpleAggregateQueryAnalysis->[analyzeAggregates],testAggregateWithExpressionQueryAnalysis->[analyzeAggreg...
Initialize the object.
pass one to the other maybe?
@@ -83,11 +83,15 @@ public class QueryTranslationTest { */ @SuppressWarnings("unused") public QueryTranslationTest(final String name, final TestCase testCase) { + this.testCase = requireNonNull(testCase, "testCase"); } @Test public void shouldBuildAndExecuteQueries() { + if (!testCase.getNa...
[QueryTranslationTest->[QttTestFile->[buildTests->[flatMap,stream],isEmpty,copyOf,IllegalArgumentException,requireNonNull],shouldBuildAndExecuteQueries->[shouldBuildAndExecuteQuery],testFileLoader->[of],findTestCases->[load],data->[toCollection,concat,collect,containsKey,load],get,requireNonNull]]
shouldBuildAndExecuteQueries - Build and execute queries if any test case is not found.
Is this usd for debugging?
@@ -31,7 +31,7 @@ public interface VMSnapshot extends ControlledEntity, Identity, InternalIdentity enum State { Allocated("The VM snapshot is allocated but has not been created yet."), Creating("The VM snapshot is being created."), Ready( "The VM snapshot is ready to be used."), Reverting...
[addTransition]
Creates a state machine that represents a single virtual machine snapshot. Adds transitions to the FSM.
VM snapshot states / event shouldn't be hypervisor specific. Can this be addressed in any other way?
@@ -190,9 +190,10 @@ class ConllCorefReader(DatasetReader): not belong to a cluster. As these labels have variable length (it depends on how many spans we are considering), we represent this a as a ``SequenceLabelField`` with respect to the ``span_starts`` ``ListFie...
[ConllCorefReader->[_handle_line->[_normalize_word,complete_sentence,add_word],read->[canonicalize_clusters,_DocumentState,assert_document_is_finished]]]
Converts a list of sentences into a sequence label field. A sequence of nanoseconds.
Can you call this `word` instead of `token`, to distinguish it from the `Token(word)` that you get below?
@@ -49,7 +49,7 @@ import org.testng.annotations.Test; public class AbstractRestResourceTest extends MultipleCacheManagersTest { public static final String REALM = "ApplicationRealm"; public static final Subject ADMIN_USER = TestingUtil.makeSubject("ADMIN", ScriptingManager.SCRIPT_MANAGER_ROLE, ProtobufMetadata...
[AbstractRestResourceTest->[putStringValueInCache->[putInCache],putJsonValueInCache->[putInCache],getGlobalConfigForNode->[isSecurityEnabled],createCacheManagers->[getDefaultCacheBuilder,isSecurityEnabled,getGlobalConfigForNode],putInCache->[putInCache],createNewClient->[isSecurityEnabled]]]
Package private for unit testing purposes. Get the clustered cache configuration.
The idea is to have ADMIN have all permissions, but USER be a regular user, otherwise we have the same two subjects with different names
@@ -1748,12 +1748,12 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to * target will be the range. The heading will be determined from the offset. If the heading cannot be * determined from the offset, the heading will be north.</p> * - * @param {Entity|Entity[]|E...
[No CFG could be retrieved]
Displays a single type of entity in the reference frame. Checks if zoomTarget is defined.
You should update the description to include tilesets as well. Same applies to `zoomTo`.
@@ -405,6 +405,8 @@ module.exports = class mexc extends Exchange { 'info': currency, 'name': name, 'active': currencyActive, + 'deposit': undefined, + 'withdraw': undefined, 'fee': currencyFee, 'precision'...
[No CFG could be retrieved]
fetchMarketsByType - fetch market by type Fetch Markets with default type.
Please, add the same logic for currency-wide `deposit` and `withdraw` flags, derived from networks, as you did in the other exchanges.
@@ -518,11 +518,9 @@ func (c *CreateConfig) GetContainerCreateOptions(runtime *libpod.Runtime, pod *l if c.CgroupParent != "" { options = append(options, libpod.WithCgroupParent(c.CgroupParent)) } - // For a rootless container always cleanup the storage/network as they - // run in a different namespace thus not ...
[GetVolumesFrom->[ID,Wrapf,Contains,GetArtifact,Unmarshal,LookupContainer,Errorf,SplitN],createExitCommand->[GetLevel,Executable,GetConfig,String],GetContainerCreateOptions->[WithNetNS,WithDNSOption,IsRootless,IsContainer,WithName,WithShmSize,CreatePortBindings,WithCgroupParent,WithLocalVolumes,ShmDir,WithStopSignal,cr...
GetContainerCreateOptions returns the list of options that can be used to create a container This function returns a list of options to use when creating a pod IsContainer returns a list of options for the container NewContainer returns a new container with the specified options Get options for the pod.
@mheon i have to ask ... worst case, what are the performance implications here?
@@ -291,6 +291,9 @@ class _DoFnParam(object): return self.param_id == other.param_id return False + def __hash__(self): + return hash((type(self), self.param_id)) + def __repr__(self): return self.param_id
[Map->[_fn_takes_side_inputs,FlatMap],CombineValuesDoFn->[process->[merge_accumulators,create_accumulator,add_inputs,extract_output,apply]],Impulse->[get_windowing->[Windowing],from_runner_api_parameter->[Impulse]],Flatten->[get_windowing->[Windowing],from_runner_api_parameter->[Flatten]],CombineValues->[to_runner_api_...
Check if two params are equal.
let's simplify this to `hash(self.param_id)`.
@@ -15,7 +15,7 @@ internal static partial class Interop internal const string Odbc32 = "libodbc.2.dylib"; internal const string OpenLdap = "libldap"; internal const string SystemConfigurationLibrary = "/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration"; - int...
[No CFG could be retrieved]
region SystemConfigurationLibrary Constants.
we could append `.dylib` since these are OSX-only
@@ -33,8 +33,8 @@ double CalculateDeltaTime( Parameters default_parameters = Parameters(R"( { "time_step_prediction_level" : 2.0, - "max_delta_time" : 1.0e-3, - "safety_factor" : 0.4, + "max_delta_time" : 1.0e-1, + "safety_factor" ...
[No CFG could be retrieved]
The functions below are defined in the kratos. h file. This method is used to compute the value of the model part.
@KlausBSautter is this OK for you?, if not feel free to modify
@@ -344,6 +344,10 @@ vos_agg_akey(daos_handle_t ih, vos_iter_entry_t *entry, if (merge_window_status(&agg_param->ap_window) != MW_CLOSED) D_ASSERTF(false, "Merge window isn't closed.\n"); + /* Reset the output checksum buffer, since all overlap consumed. */ + D_FREE(agg_param->ap_window.mw_io_ctxt.ic_csum_buf); ...
[No CFG could be retrieved]
VOS_ITER_CB_SKIP is called when the iterator is about to be skipped finds the key in the aggregation table and deletes it if it is covered.
This should be done in close_merge_window().
@@ -108,3 +108,13 @@ class PageType(CountableDjangoObjectType): .load(root.pk) .then(lambda pages: bool(pages)) ) + + @staticmethod + def __resolve_references(roots: List["PageType"], info, **_kwargs): + ids = [ + int(from_global_id_or_error(root.id, PageType, ...
[PageType->[resolve_available_attributes->[get_unassigned_page_type_attributes],resolve_has_pages->[bool,PagesByPageTypeIdLoader],resolve_attributes->[PageAttributesByPageTypeIdLoader],FilterInputConnectionField,Boolean,List,AttributeFilterInput,permission_required],Page->[resolve_page_type->[PageTypeByIdLoader],resolv...
Resolve has_pages relation.
Pages visibility depends on user's permission, see the `resolve_pages` resolver - it uses `visible_for_user` method. Could we reuse the resolver here? If needed I would adjust the resolver to accept an optional list of IDs. Ideally those resolver function should be the only places where we can easily maintain this user...
@@ -107,8 +107,9 @@ class SnippetTypesController extends Controller implements ClassResourceInterfac return new JsonResponse( [ - 'template' => $type->getKey(), - 'title' => $type->getLocalizedTitle($this->getUser()->getLocale()), + 'key' => $key, + ...
[SnippetTypesController->[deleteDefaultAction->[checkPermission,getKey,getLocale,getStructure,getLocalizedTitle,remove,getRequestParameter],putDefaultAction->[checkPermission,get,getKey,getUuid,getLocale,getStructure,getLocalizedTitle,getRequestParameter,save,getTitle],cgetAction->[checkPermission,getBooleanRequestPara...
Put default action.
Same question as above: Why is this deprecated?
@@ -288,8 +288,14 @@ func (r *Reader) convertNamedField(fc fieldConversion, value string) interface{} if fc.isInteger { v, err := strconv.ParseInt(value, 10, 64) if err != nil { - r.logger.Debugf("Failed to convert field: %s \"%v\" to int: %v", fc.name, value, err) - return value + // Failed to convert to...
[toEvent->[Unix,Now,ToLower,convertNamedField,GetValue,TrimLeft,Put],checkForNewEvents->[Wait,Errorf],Next->[toEvent,Errno,checkForNewEvents,GetEntry,Reset,Next,Errorf,Wait],convertNamedField->[ParseInt,Debugf],seek->[Error,Next,SeekHead,SeekCursor,SeekTail,Debug],Close->[Close,StopMonitoringJournal],NewJournalFromDir,...
convertNamedField converts a named field to a Go value.
Any reason not to try and run this split always before the `strconv.ParseInt(...)`, so basically right inside the `if fc.isInteger` block? Are you doing this lazily as a performance optimization?
@@ -46,6 +46,10 @@ public class ExtractorMetrics { } } + public ExtractorMetrics(Map<String, Object> total, Map<String, Object> converters) { + + } + public Timer getTotalTiming() { return totalTiming; }
[ExtractorMetrics->[toUpperCase,Meter,valueOf,Timer]]
Get the total and converter timing.
Accidentally left empty?
@@ -217,13 +217,15 @@ func NewQuerierHandler( legacyPromRouter := route.New().WithPrefix(legacyPrefix + "/api/v1") api.Register(legacyPromRouter) + statsMiddleware := stats.NewMiddleware(logger) + // TODO(gotjosh): This custom handler is temporary until we're able to vendor the changes in: // https://github.c...
[GetContent->[Lock,Unlock],AddLink->[Lock,Unlock],Path,MetadataHandler,NewGaugeVec,RemoteReadHandler,Merge,With,NewAPI,Set,MiddlewareFunc,Handler,Error,NewRouter,Marshal,WithPrefix,New,GetContent,Funcs,MustCompile,Methods,Join,Execute,Must,OperationNameFunc,NewHistogramVec,Log,Register,Header,Write,Use,GathererFunc,Par...
cacheGenHeaderMiddleware is a middleware that registers the HTTP cache number header for all HTTP requests A router that routes all the REST API endpoints.
Should we conditionally enable it with a flag?
@@ -1,8 +1,8 @@ -<div aria-label="banner" role="banner"> +<header aria-label="banner"> <%= render 'shared/no_pii_banner' if FeatureManagement.show_no_pii_banner? %> <section class="usa-banner" aria-label="Official government website"> <div class="usa-accordion"> - <header class="usa-banner__header"> + ...
[No CFG could be retrieved]
Displays a hidden hidden banner and a button to show a specific tag in the UI. Displays a block of unicid.
This label isn't translated. Stepping back a bit, I wonder why we have so many different banners/headers in the first place. A few lines below we use a `header` for the "official website" banner, so we would want unique labels if we were to have multiple `header`s. We could go that route if the headers are meaningfully...
@@ -85,9 +85,14 @@ def update_checkout_shipping_method_if_invalid(checkout: models.Checkout, discou checkout.shipping_method = None checkout.save(update_fields=["shipping_method"]) - is_valid = clean_shipping_method( - checkout=checkout, method=checkout.shipping_method, discounts=discounts...
[CheckoutUpdateVoucher->[perform_mutation->[CheckoutUpdateVoucher]],CheckoutBillingAddressUpdate->[perform_mutation->[CheckoutBillingAddressUpdate,save]],CheckoutCreate->[process_checkout_lines->[check_lines_quantity],clean_input->[retrieve_billing_address,retrieve_shipping_address,process_checkout_lines],Arguments->[C...
Updates checkout shipping method if it is invalid.
Not 100% sure about this - all `ValidationError`s we raise in Graphene are supposed to be returned as errors in API. If we're catching it here, it means that maybe we shouldn't raise it in `clean_shipping_method`? Maybe resetting the shipping method should happen in `update_checkout_shipping_method_if_invalid`?
@@ -915,6 +915,11 @@ namespace System.Reflection.Tests private IDictionary<Type, string[]>? PropertyDictionaryNonNonNonNull { get; set; } public IDictionary<Type, string[]> PropertyDictionaryNonNonNonNon { get; set; } = null!; + public (string?, object) NullNonNonValueTuple; + public (...
[TypeWithNullableContext->[NullablNotNullIfNotNullReturn->[Empty],RefReturnNotNull->[Empty]],NullabilityInfoContextTests->[StringTypeTestData->[Nullable,Unknown,NotNull],PropertyTest->[ReadState,WriteState,Create,Equal,GenericTypeArguments,nameof,ElementType,GetProperty,Empty,SetMethod,Null,Type],JaggedArrayPropertyTes...
Property array - > Tuple This is a hack to allow for a field to be null.
typo "NonNon" `NullableNonNullableValueTuple` etc - would that be clearer maybe in these names
@@ -178,13 +178,13 @@ namespace System.ComponentModel.Design /// </summary> protected virtual Type CreateCollectionItemType() { - PropertyInfo[] props = TypeDescriptor.GetReflectionType(CollectionType).GetProperties(BindingFlags.Public | BindingFlags.Instance); + Propert...
[CollectionEditor->[EditValue->[EditValue],OnComponentChanged->[OnComponentChanged],ShowHelp->[GetService],FilterListBox->[RefreshItem->[RefreshItem],WndProc->[WndProc]],OnComponentChanging->[OnComponentChanging],CollectionForm->[CanRemoveInstance->[CanRemoveInstance],DisplayError->[GetService,ToString],GetService->[Ge...
This method returns the type of the collection item if it is a collection item or an object.
nit: move propertes[i] to local variable? or use foreach?
@@ -96,6 +96,17 @@ public class OrganizationDao implements Dao { getMapper(dbSession).updateDefaultTemplates(uuid, defaultTemplates, now); } + public Optional<Integer> getDefaultGroupId(DbSession dbSession, String organizationUuid) { + checkUuid(organizationUuid); + return Optional.ofNullable(getMapper...
[OrganizationDao->[getMapper->[getMapper],selectOrganizationsWithoutLoadedTemplate->[selectOrganizationsWithoutLoadedTemplate],selectByQuery->[selectByQuery],deleteByUuid->[deleteByUuid],update->[update],selectByUuids->[selectByUuid],selectByKey->[selectByKey],insert->[insert],selectByUuid->[selectByUuid],selectByPermi...
Updates the default templates for the organization with the given uuid.
what is the rationale to expose this methods? Why not create either: * `Optional<GroupDto> groupDao.selectByOrganizationUuid(orgUuid)` * `OrganizationDto selectByUuid(DbSession dbSession, String organizationUuid)` - then you have access to `OrganizationDto.getDefaultGroupId`
@@ -334,6 +334,16 @@ export class BaseElement { // Subclasses may override. } + /** + * Override in subclass to adjust the element when it is being added to + * the DOM. Could e.g. be used to add a listener. Notice, that this + * callback is called immediately after `buildCallback()` if the element + ...
[No CFG could be retrieved]
This method is called by the framework when a new element is created and the build phase of This method is called when a dynamic placeholder is created and returned to the builder.
This is great. @dmanek and I were just discussing in #30901 about where event listeners should be. It's really not consistent between components.
@@ -220,8 +220,13 @@ namespace Microsoft.Xna.Framework.Graphics _graphicsProfile = graphicsProfile; Setup(); GraphicsCapabilities = new GraphicsCapabilities(); - GraphicsCapabilities.Initialize(this); - Initialize(); + GraphicsCapabilities.Initiali...
[GraphicsDevice->[Reset->[PlatformValidatePresentationParameters,Reset],DrawUserPrimitives->[DrawUserPrimitives],SetVertexBuffers->[Clear],DrawInstancedPrimitives->[DrawInstancedPrimitives],DrawIndexedPrimitives->[DrawIndexedPrimitives],ApplyRenderTargets->[Clear],Dispose->[Clear,Dispose],SetVertexBuffer->[Clear],SetIn...
Create a new instance of the HuffmanImage object with all of the fields set in the RETURN NULL UNLESS THIS IS NOT NULL.
Can we do this in a better way that doesn't involve an `#if WINDOWS` here? We are trying to reduce the `#if`s and not increase them.
@@ -37,7 +37,9 @@ import com.google.common.io.Files; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; +//CHECKSTYLE.OFF: Regexp import com.metamx.common.logger.Logger; +//CHECKSTYLE.O...
[KafkaIndexTaskTest->[readSegmentDim1->[getSegmentDirectory],makeToolboxFactory->[makeTimeseriesOnlyConglomerate],setupTest->[getTopicName,generateRecords]]]
export from org. apache. commons. spi. IStreamer Implementation of TimestampSpec.
Why needs to use old logger?
@@ -394,6 +394,7 @@ class BaseEpochs(ProjMixin, ContainsMixin, UpdateChannelsMixin, self._decim = 1 self._raw_times = self.times assert self._data.shape[-1] == len(self.times) + self._raw = None # shouldn't need it anymore return self @verbose
[BaseEpochs->[equalize_event_counts->[_keys_to_idx,drop,drop_bad],plot_drop_log->[plot_drop_log],_get_data->[_get_epoch_from_raw,_detrend_offset_decim,_is_good_epoch,_project_epoch],get_data->[_get_data],drop_bad->[_reject_setup],resample->[resample],next->[_get_epoch_from_raw,_detrend_offset_decim,_is_good_epoch,_proj...
Load the data if not already preloaded. missing time - freq - freq - decim - slice - time - freq.
perhaps this needs a test?
@@ -38,7 +38,7 @@ class PostUpdate extends \Asika\SimpleConsole\Console */ private $appMode; /** - * @var IConfig + * @var \Friendica\Core\Config\Capability\IManageConfigValues */ private $config; /**
[PostUpdate->[doExecute->[getBasePath,getHelp,getOption,out,set,isInstall,t]]]
Creates a post update class that handles post - updates of a single node. Constructor for the command.
You can use the shorthand since there is a `use` statement.
@@ -281,7 +281,8 @@ def build_js(): sys.stdout.flush() os.chdir('bokehjs') - cmd = ["node", "make", 'build', '--emit-error'] + build_cmd = "build:stripped" if is_release else "build" + cmd = ["node", "make", "clean", build_cmd] t0 = time.time() try:
[get_version->[get_version],show_bokehjs->[yellow,bright],build_js->[green,size,red,yellow,dim,bright],get_cmdclass->[get_cmdclass],green,red,bright]
Builds BokehJS assets under the bokehjs source subdirectory. Get the size of the bokehjs build in KB.
@mattpap AFIACT `--emit-error` is superfluous now but please let me know if I am mistaken
@@ -286,8 +286,8 @@ def file_html(models, Args: models (Model or Document or list) : Bokeh object or objects to render typically a Model or Document - resources (Resources) : a resource configuration for Bokeh JS & CSS assets. Pass ``None`` if - using js_resources of css_res...
[file_html->[_bundle_for_objs_and_resources],_use_widgets->[_needs_widgets,_use_widgets],server_html_page_for_models->[_html_page_for_render_items,_bundle_for_objs_and_resources],_bundle_for_objs_and_resources->[_use_compiler,_use_widgets],_use_compiler->[_use_compiler,_needs_compiler],server_html_page_for_session->[_h...
Return a HTML document that embeds a Bokeh Model or Document object.
I would say "and/or" and signify that `None` is an accepted value. Also `(js_res, css_res)` should be in double backticks.
@@ -250,6 +250,9 @@ public class HoodieHFileReader<R extends IndexedRecord> implements HoodieFileRea try { reader.close(); reader = null; + if (fsDataInputStream != null) { + fsDataInputStream.close(); + } keyScanner = null; } catch (IOException e) { throw new Hood...
[HoodieHFileReader->[getRecordIterator->[next->[getSchema,next,hasNext],hasNext->[getSchema]],getRecordByKey->[getSchema],SeekableByteArrayInputStream->[readFully->[read]],close->[close],readAllRecords->[readAllRecords]]]
Closes the Hoodie HAR file.
this was a leak?
@@ -73,13 +73,13 @@ namespace Dynamo.Nodes protected virtual void RemoveInput() { VariableInputController.RemoveInputBase(); - OnAstUpdated(); + //OnAstUpdated(); } protected virtual void AddInput() { VariableInputController....
[VariableInputNode->[GetInputIndex->[GetInputIndexBase],AddInput->[AddInputBase],DeserializeCore->[DeserializeCore],HandleModelEventCore->[HandleModelEventCore],SerializeCore->[SerializeCore],BasicVariableInputNodeController->[GetInputTooltip->[GetInputTooltip],GetInputName->[GetInputName]],OnBuilt->[OnBuilt],RemoveInp...
This method is called to remove the input from the input list and add it to the input.
Are we sure we want these `OnAstUpdated` removed? For example, for `List.Create`, removing one input port while it connects to something will remove the same element from the result. Please try that out to confirm this continues to work.
@@ -204,8 +204,8 @@ func TestOverridesManager_StopClosesListenerChannels(t *testing.T) { return val, nil }, } - - overridesManager, err := NewRuntimeConfigManager(overridesManagerConfig) + registry := prometheus.NewRegistry() + overridesManager, err := NewRuntimeConfigManager(overridesManagerConfig, registry) ...
[TempFile,False,Close,GetConfig,CloseListenerChannel,WriteFile,Stop,NotNil,After,CreateListenerChannel,Store,Equal,loadConfig,Name,Remove,NewInt32,NoError,NewDecoder,SetStrict,Decode,Fatal,Open,WriteString,Load]
TestOverridesManager_StopClosesListenerChannels stops the listener channels and closes the listener channels.
Typically in tests we just pass nil (unless testing metrics), and make sure that New function can accept nil.
@@ -94,7 +94,7 @@ public class SocketChannelRecordReaderDispatcher implements Runnable, Closeable if (logger.isDebugEnabled()) { final String remoteAddress = remoteSocketAddress == null ? "null" : remoteSocketAddress.toString(); - logger.debug("Accepted connect...
[SocketChannelRecordReaderDispatcher->[close->[closeQuietly],connectionCompleted->[decrementAndGet],run->[getRemoteAddress,getMessage,setWantClientAuth,toString,warn,isDebugEnabled,accept,SSLSocketChannel,setNeedClientAuth,decrementAndGet,StandardSocketChannelRecordReader,offer,SSLSocketChannelRecordReader,debug,error,...
Main loop of the socket reader. if e is not a caveat.
Although this change is helpful, recommend reverting it from this PR since it is unrelated.
@@ -727,6 +727,9 @@ describe('input', function() { it('should invalid shorter than given minlength', function() { compileInput('<input type="text" ng-model="value" ng-minlength="3" />'); + changeInputValueTo(''); + expect(scope.value).toBeUndefined(); + changeInputValueTo('aa'); ex...
[No CFG could be retrieved]
Input field validation INPUT TYPES IN THE DOM.
This is the failing assertion
@@ -636,8 +636,12 @@ class HelpfulArgumentParser(object): self.verb = token return reordered - self.verb = "run" - return args + ["run"] + if "--standalone" in args and "--installer" not in args and "-i" not in args: + self.verb = "auth" + r...
[_plugins_parsing->[add,add_group,add_plugin_args],_auth_from_domains->[_report_new_cert,_treat_as_renewal],revoke->[revoke,_determine_account],auth->[_auth_from_domains,_find_domains,_report_new_cert,choose_configurator_plugins,_init_le_client],_create_subparsers->[add_subparser,add,add_group,flag_default],setup_loggi...
Preprocess command line arguments for a command.
I don't think we should be changing the verb based on the plugin flags given. `run` is the default except for when it's not? That's confusing. I think the behavior without these 6 lines of code is acceptable. If you run `letsencrypt --standalone` and you have an installer available, it'll be used with `standalone` in `...
@@ -41,7 +41,7 @@ module Admin private def authorization_resource - self.class.name.demodulize.sub("Controller", "").singularize.constantize + self.class.name.sub("Admin::", "").sub("Controller", "").singularize.constantize end def authorize_admin
[ApplicationController->[authorize_admin->[authorize],authorization_resource->[constantize],bust_content_change_caches->[bust,admin_action_taken_at,current],before_action,freeze,after_action]]
Returns the unique identifier for the resource that can be accessed.
Demodulize won't work in case the controller has one more namespace apart from `Admin::`. Are there better ideas for this?
@@ -122,6 +122,8 @@ type CreateRepoOption struct { // TrustModel of the repository // enum: default,collaborator,committer,collaboratorcommitter TrustModel string `json:"trust_model"` + // MirrorInterval time when creating a mirror (used with mirrors) + MirrorInterval string `json:"mirror_interval"` } // Edit...
[Name->[ToLower,Title]]
A description of the repository that is used to create a new unique branch of the repository. This is a no - op for testing.
this should not go into here ... since on normal repo creation no mirror will be ever created onyl throu migration api
@@ -125,7 +125,6 @@ const expectedFiles = { SERVER_MAIN_SRC_DIR + 'com/mycompany/myapp/service/mapper/UserMapper.java', SERVER_MAIN_SRC_DIR + 'com/mycompany/myapp/web/filter/package-info.java', SERVER_MAIN_SRC_DIR + 'com/mycompany/myapp/web/filter/CachingHttpHeadersFilter.java', - SERV...
[No CFG could be retrieved]
This file contains all the files that are used by the server. This is a workaround for the fact that the server is not running on a server that is.
This needs to be cleaned up if the project is re-generated
@@ -53,7 +53,7 @@ class CAR: LEXUS_IS = "LEXUS IS 2018" LEXUS_CTH = "LEXUS CT HYBRID 2018" RAV4H_TSS2 = "TOYOTA RAV4 HYBRID 2019" - LEXUS_NXH = "LEXUS NX HYBRID 2018" + LEXUS_NXH = "LEXUS NX HYBRID 2018 & 2019" LEXUS_NX = "LEXUS NX 2018" LEXUS_NX_TSS2 = "LEXUS NX 2020" MIRAI = "TOYOTA MIRAI 2021" # ...
[CarControllerParams->[max],dbc_dict,set]
Returns a string describing the names of the missing header values. ECMA - 262 15. 2. 5. 2 0x283 - > CAR. PRIUS - > CAR. LIN.
Revert this change
@@ -34,6 +34,8 @@ var ( // // The returned model.BatchProcessor does not guarantee order preservation // of events retained in the batch. +// +// TODO(axw) only discard non-RUM unsampled transactions. func NewDiscardUnsampledBatchProcessor() model.BatchProcessor { return model.ProcessBatchFunc(func(ctx context.Co...
[NewInt,ProcessBatchFunc,NewRegistry,Add]
NewDiscardUnsampledBatchProcessor returns a new BatchProcessor which discards unsampled events.
Follow up issue for this?
@@ -132,7 +132,7 @@ func getCreateFlags(c *cliconfig.PodmanCommand) { "Drop capabilities from the container", ) createFlags.String( - "cgroupns", "host", + "cgroupns", "", "cgroup namespace to use", ) createFlags.String(
[IsRootless,GetBool,StringP,StringSlice,StringArrayP,HasPrefix,Int,GetDefaultPidsLimit,New,CommandPath,Errorf,BoolP,Bool,Flags,Join,Uint64,Lookup,ToLower,StringArray,Int64,StringSliceP,Split,GetAuthFile,Sprintf,Uint,TrimPrefix,String,Getenv,TODO,Float64]
getCreateFlags returns the flags for creating a new container Missing flags for the CreateFlags package.
Can't we dynamically set the default like we do for a few other things? A bit less ugly than special-casing the empty string
@@ -60,13 +60,13 @@ namespace Microsoft.Extensions.Configuration /// <returns>The list of keys for this provider.</returns> public virtual IEnumerable<string> GetChildKeys( IEnumerable<string> earlierKeys, - string parentPath) + string? parentPath) { ...
[ConfigurationProvider->[OnReload->[OnReload,Exchange],Segment->[OrdinalIgnoreCase,IndexOf,KeyDelimiter,Substring],GetChildKeys->[AddRange,Length,Comparison,KeyDelimiter,Sort,Segment,Assert,StartsWith,OrdinalIgnoreCase,Add,Key],ToString->[Name],TryGet->[TryGetValue],OrdinalIgnoreCase]]
Get child keys.
Nit: not related to this PR but it seems like we could just iterate over `Data.Keys` rather than `KVP`? We are just using the keys on these two for loops.
@@ -27,12 +27,14 @@ from apache_beam.dataframe import io from apache_beam.dataframe import partitionings -@frame_base.DeferredFrame._register_for(pd.Series) -class DeferredSeries(frame_base.DeferredFrame): +class DeferredDataFrameOrSeries(frame_base.DeferredFrame): def __array__(self, dtype=None): raise fr...
[_unliftable_agg->[wrapper->[groupby]],DeferredDataFrame->[nunique->[nunique],fillna->[fillna],join->[_cols_as_temporary_index,join,fill_placeholders,reindex,revert],set_index->[set_index],nsmallest->[nsmallest],dot->[AsScalar],rename->[rename],nlargest->[nlargest],mode->[mode],dropna->[dropna],corr->[corr],reset_index...
Return a numpy array with the elements of self and other.
Should we call it `DeferredNDFrame` to be consistent with pandas?
@@ -0,0 +1,4 @@ +/** + * Audit specific code. + */ +package <%=packageName%>.config.audit; \ No newline at end of file
[No CFG could be retrieved]
No Summary Found.
there is a new line missing at the end of the file
@@ -59,7 +59,7 @@ public final class ConnectionUtils { public static <C> void logPoolStatus(Logger logger, GenericObjectPool<C> pool, String poolId) { if (logger.isDebugEnabled()) { - String maxActive = pool.getMaxActive() < 0 ? "unlimited" : String.valueOf(pool.getMaxActive()); + String maxActive =...
[ConnectionUtils->[getRetryPolicyTemplate->[orElseGet],connect->[connect,ConnectionException],logPoolStatus->[debug,getMaxIdle,getMaxActive,getNumIdle,isDebugEnabled,valueOf,getNumActive]]]
Log the status of the given object pool.
is this ok? Why call it in one case maxTotal andin another maxActive?
@@ -531,10 +531,8 @@ namespace System.Net.Test.Common return body; } - public async Task<(int streamId, HttpRequestData requestData)> ReadAndParseRequestHeaderAsync(bool readBody = true) + public async IAsyncEnumerable<Frame> ReadRequestHeadersFrames() { - HttpR...
[Http2LoopbackConnection->[DecodeInteger->[DecodeInteger],DecodeHeader->[DecodeInteger,DecodeLiteralHeader],ReadAndParseRequestHeaderAsync->[DecodeHeader],DecodeLiteralHeader->[DecodeString,DecodeInteger],DecodeString->[DecodeInteger],ReadRequestBodyAsync->[ReadBodyAsync],Task->[ReadFrameAsync,IgnoreWindowUpdates,Shutd...
Asynchronously reads the request body and headers from the stream. Data - Extract data from header and request data.
Seems like `switch` would be better here than `if` and `continue`
@@ -0,0 +1,15 @@ +RSpec.shared_examples "an InternalPolicy dependant request" do |resource| + let(:user) { create(:user) } + + before do + user.add_role(:single_resource_admin, resource) + sign_in user + allow(InternalPolicy).to receive(:new).and_call_original + end + + it "responds with 200 OK" do + re...
[No CFG could be retrieved]
No Summary Found.
Great. Could we also test the case when the user is not authorized to perform an aciton?
@@ -1814,8 +1814,11 @@ namespace TTD TraceLogger::TraceLogger(FILE* outfile) : m_currLength(0), m_indentSize(0), m_outfile(outfile) { - this->m_buffer = (char*)CoTaskMemAlloc(TRACE_LOGGER_BUFFER_SIZE); - this->m_indentBuffer = (char*)CoTaskMemAlloc(TRACE_LOGGER_INDENT_BUFFER_SIZE); + ...
[No CFG could be retrieved]
Adds a single integer or double to the list of possible values of the n - tuple. This function is called from Logger. It will write a sequence of non - zero integer values.
Malloc is not throwing- what is the right thing to do here if we OOM? terminate? throw?
@@ -0,0 +1,11 @@ +package com.baeldung.spring.cloud.springcloudcontractproducer; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SpringCloudContractProducerApplication { + public static void main(String[...
[No CFG could be retrieved]
No Summary Found.
Indentation should be 4 spaces per level
@@ -2164,12 +2164,13 @@ static int process_nlmeans_cl(struct dt_iop_module_t *self, dt_dev_pixelpipe_iop for(int i = 0; i < 3; i++) wb[i] = piece->pipe->dsc.processed_maximum[i]; } // adaptive p depending on white balance - const float p[4] = { MAX(d->shadows - 0.1 * logf(wb[0]), 0.0f), - ...
[No CFG could be retrieved]
missing values in the last three lines are the mean of the coeffs which corresponds to the mean - - - - - - - - - - - - - - - - - -.
For performance reasons I suppose we can rewrite this: `0.1 * logf(wb[3] * scale)` Same in many other places. Or is there any reasons to avoid that?
@@ -391,6 +391,7 @@ class WriteToDatastore(_Mutate): raise ValueError('Entities to be written to Cloud Datastore must ' 'have complete keys:\n%s' % client_entity) self._batch.put(client_entity) + self._batch_mutations.append((helper._WRITE_MUTATION, client_entity)) ...
[ReadFromDatastore->[_SplitQueryFn->[get_estimated_num_splits->[get_estimated_size_bytes],get_estimated_size_bytes->[query_latest_statistics_timestamp]]],_Mutate->[DatastoreMutateFn->[_flush_batch->[_init_batch],process->[add_element_to_batch]]]]
Add an entity to the batch.
We could also pass it only once as another param to write_mutations, and by adding another property to each subclass.
@@ -176,8 +176,14 @@ struct LocalFormspecHandler : public TextDest } } - // Don't disable this part when modding is disabled, it's used in builtin - if (m_client && m_client->getScript()) + if (m_formname == "MT_DEATH_SCREEN") { + assert(m_client != 0); + + m_client->sendRespawn(); + return; + } + + ...
[No CFG could be retrieved]
NodeMetadataFormSource is a class that handles the handling of the formspec input and output class for retrieving the of a node.
doesn't `m_client->moddingLoaded()` imply the script env to be available?
@@ -50,8 +50,8 @@ public abstract class RequesterService { */ public static String serialize(List<ServiceRequester> requesterList) throws IOException { String jsonList = objectMapper.writeValueAsString(requesterList); - String base64Str = Base64.getEncoder().encodeToString(jsonList.getBytes("UTF-8")); - ...
[RequesterService->[serialize->[writeValueAsString,encode,getBytes,encodeToString],deserialize->[readValue,decode,String],ObjectMapper]]
Serializes the given list of ServiceReques into a base64 encoded string.
Maybe call this isRequesterAllowed and make it return boolean? I know I made the original checkRequester throw exception, but this one's only called from one place and is abstract, so it seems better to have a more clear contract of returning boolean.
@@ -67,6 +67,11 @@ public class StorageFormat return outputFormat; } + public String getFileExtension() + { + return fileExtension; + } + @JsonProperty("serDe") public String getSerDeNullable() {
[StorageFormat->[equals->[equals],create->[StorageFormat],fromHiveStorageFormat->[getInputFormat,getSerDe,StorageFormat,getOutputFormat],toString->[toString],createNullable->[StorageFormat]]]
Get the output format of the storage.
If we are not going to serialize them then we can add `@JsonIgnore` annotations
@@ -514,6 +514,7 @@ export class AmpSlideScroll extends BaseSlides { */ showSlide_(newIndex) { const noOfSlides_ = this.noOfSlides_; + newIndex = dev().assertNumber(newIndex); if (newIndex < 0 || newIndex >= noOfSlides_ || this.slideIndex_ == newIndex) {
[AmpSlideScroll->[hideRestOfTheSlides_->[setStyle,includes],triggerAnalyticsEvent_->[dev,abs],analyticsEvent_->[triggerAnalyticsEvent],constructor->[isIos,startsWith,platformFor,isExperimentOn],onLayoutMeasure->[dev],touchEndHandler_->[timerFor],layoutCallback->[resolve],showSlideAndTriggerAction_->[createCustomEvent],...
showSlide_ - Shows the slide at the specified index.
To clarify: `dev.assertNumber` is stripped in PROD binary. Is this what you want?
@@ -1109,3 +1109,17 @@ class Python(AutotoolsPackage): view.remove_file(src, dst) else: os.remove(dst) + + def test(self): + # guaranteed executable name + # do not use self.command because we are also testing the run env + exe = 'python3' if self.s...
[Python->[get_sysconfigdata_name->[print_string,command,get_config_var],home->[get_config_var],deactivate->[write_easy_install_pth,python_ignore],libs->[get_config_var],get_python_lib->[command,print_string],setup_dependent_package->[_load_distutil_vars],get_python_inc->[command,print_string],headers->[get_config_h_fil...
Remove files from view that are not in bin_dir.
I'm not sure how guaranteed this is. For example, if someone is using an external Python installation on Blue Waters, they tend to bundle `python3.4`, `python3.5`, and `python3.6` all in the same directory.
@@ -0,0 +1,12 @@ +import io + +import numpy as np +import PIL.Image +import torch + +__all__ = ["pil"] + + +def pil(file: io.IOBase, mode="RGB") -> torch.Tensor: + image = PIL.Image.open(file).convert(mode.upper()) + return torch.from_numpy(np.array(image, copy=True)).permute((2, 0, 1))
[No CFG could be retrieved]
No Summary Found.
FYI this could be replaced by `torchvision.transforms.functional.pil_to_tensor`
@@ -24,8 +24,7 @@ public class AgentTestingLogsCustomizer implements AgentListener { SdkLogEmitterProvider logEmitterProvider = SdkLogEmitterProvider.builder() .setResource(autoConfiguredOpenTelemetrySdk.getResource()) - .addLogProcessor( - BatchLogProcessor.builder(...
[AgentTestingLogsCustomizer->[beforeAgent->[build,set,from]]]
This method is called before agent startup.
unrelated to this PR - testing should use simple log processor so we don't have to sleep or await
@@ -18,8 +18,10 @@ namespace Content.Shared.GameObjects.Components.Movement { physicsManager ??= IoCManager.Resolve<IPhysicsManager>(); - return !entity.HasComponent<MovementIgnoreGravityComponent>() && + bool isWeightless = !entity.HasComponent<MovementIgnoreGravityCompone...
[GravityExtensions->[IsWeightless->[IsWeightless]]]
Checks if an IEntity is weightless.
I don't think you need the generic's type here?
@@ -392,6 +392,11 @@ func checkAvailableProcessors(esClient PipelineLoader, requiredProcessors []Proc // LoadML loads the machine-learning configurations into Elasticsearch, if X-Pack is available func (reg *ModuleRegistry) LoadML(esClient PipelineLoader) error { + if !mlimporter.IsCompatible(esClient) { + logp.In...
[GetInputConfigs->[getInputConfig,Errorf],InfoString->[Sprintf],ModuleFilesets->[Resolve],SetupML->[Warn,Sprintf,Empty,ModuleNames,SetupModule,HaveXpackML,Errorf],LoadML->[ImportMachineLearningJob,Warn,GetMLConfigs,HaveXpackML,Errorf],NewConfigFrom,Warnf,Wrap,Stat,ReadFile,New,ReadDir,Errorf,MergeConfigs,Join,Unpack,Ne...
LoadML loads all the Machine Learning jobs from the filesets in the registry.
Would it be also an option to return an error instead? Like this we make sure the user is aware of the change and can adjust the code.
@@ -203,12 +203,12 @@ namespace Js Var DynamicObjectPropertyEnumerator::MoveAndGetNext(PropertyId& propertyId, PropertyAttributes * attributes) { + if (this->cachedData && this->initialType == this->object->GetDynamicType()) + { + return MoveAndGetNextWithCache(propertyId, attribute...
[MoveAndGetNext->[MoveAndGetNextWithCache,MoveAndGetNextNoCache],MoveAndGetNextNoCache->[GetSnapShotSemantics,GetTypeToEnumerate],GetTypeToEnumerate->[GetSnapShotSemantics],Reset->[GetSnapShotSemantics,GetEnumNonEnumerable,GetEnumSymbols]]
MoveAndGetNext - Get next property in object.
Did this->initialType always use to have the same value as this->cachedDataType?
@@ -941,7 +941,10 @@ func CanLogout(mctx MetaContext) (res keybase1.CanLogoutRes) { return res } - if err := CheckCurrentUIDDeviceID(mctx); err != nil { + // since this is on the critical path to logout, + // use a short timeout in case we're offline. + m, _ := mctx.WithTimeout(600 * time.Millisecond) + if err :...
[GetSyncedSecretKeys->[GetComputedKeyFamily],AllSyncedSecretKeys->[GetComputedKeyFamily,GetUID],GetDeviceSibkey->[GetNormalizedName,GetComputedKeyFamily],StellarAccountID->[StellarAccountID],GetActivePGPFingerprints->[GetActivePGPKeys],SigIDSearch->[sigChain],GetActivePGPKeys->[GetActivePGPKeys,GetComputedKeyFamily],Sy...
CanLogout checks if the user is logged in and if so logs the user out. RandomPW checks if the user has a passphrase and if so returns it.
I'm worried that if we are online, but 600ms is not enough for the API call to finish, we might not be able to success early on `case DeviceNotFoundError, ...:` and keep failing on `LoadHasRandomPw` if user really doesn't have a device or doesn't exist anymore. So on slow connection you will be in permanent state of ti...
@@ -1290,7 +1290,7 @@ feedRate_t get_homing_bump_feedrate(const AxisEnum axis) { /** * Home an individual linear axis */ -void do_homing_move(const AxisEnum axis, const float distance, const feedRate_t fr_mm_s=0.0) { +void do_homing_move(const AxisEnum axis, const float distance, const feedRate_t fr_mm_s=0.0, cons...
[No CFG could be retrieved]
Homing move for a linear axis. Returns the homing feedrate of the given axis.
It seems a little strange to have an argument called `heaters_off` which _may or may not_ impact the execution of the function. If this were named something like `final_move` then it would not misrepresent what is happening, even if the value is ignored.
@@ -59,7 +59,7 @@ func CheckClusterID(localClusterID types.ID, um types.URLsMap, tlsConfig *tls.Co trp.CloseIdleConnections() if gerr != nil { // Do not return error, because other members may be not ready. - log.Error(gerr) + log.Error(fmt.Sprintf("%v", gerr)) continue }
[ID,Error,WithTimeout,MemberRemove,StringSlice,Ctx,WithStack,Errorf,GetClusterFromRemotePeers,CloseIdleConnections,MemberList,MemberAdd]
CheckClusterID checks the given local cluster ID against the given list of etcd members. RemoveEtcdMember removes a member from etcd.
Why not use `zap.Error`?
@@ -163,7 +163,11 @@ <%_ if (devDatabaseType === 'mssql' || prodDatabaseType === 'mssql') { _%> identityInsertEnabled="true" <%_ } _%> - tableName="<%= jhiTablePrefix %>_authority"/> + tableName="<%= jhiTablePrefix %>_authority">...
[No CFG could be retrieved]
Private functions - > Load a lease on the JHI table. XML description of nag - base table.
I think all these conditions (including existing ones) `devDatabaseType === X || prodDatabaseType === X` can be replaced by just `prodDatabaseType === X`. BTW: here an extra `=` is missing in `prodDatabaseType == 'oracle'`
@@ -541,10 +541,7 @@ class Publicize extends Publicize_Base { ?> <?php if ( ! empty( $me['name'] ) ) : ?> - <p><?php printf( - esc_html__( 'Publicize to my %s:', 'jetpack' ), - '<strong>' . esc_html__( 'Facebook Wall', 'jetpack' ) . '</strong>' - ); ?></p> + <p><?php esc_html_e( 'Publicize...
[Publicize->[get_services->[get_connections],save_publicized_facebook_account->[get_connection_meta],save_publicized_twitter_account->[get_connection_meta],options_save_facebook->[globalization],test_connection->[get_connection_id,refresh_url],admin_page_load->[disconnect],enhaced_twitter_cards_site_tag->[get_connectio...
Options page Facebook General syntax for the checkboxes. Renders a block of tokens that can be selected.
Unfortunately we cannot do this with %s as there are languages that have to align the translation of `my` with the variable. For example in German: "Auf meine*r* Facebook Seite verffentlichen." vs. "Auf meine*m* Tumblr Blog verffentlichen."
@@ -586,7 +586,7 @@ const Toolbar = { * Toggles / untoggles the view for raised hand. */ _toggleRaiseHand(isRaisedHand) { - $('#toolbar_button_raisehand').toggleClass("toggled", isRaisedHand); + $('#toolbar_button_raisehand').toggleClass("glow", isRaisedHand); }, /**
[No CFG could be retrieved]
Displays login button and logout button. Mark audio icon as muted or not.
We should remove toggled as well if it's not used anywhere else.
@@ -187,7 +187,7 @@ export class SystemLayer { this.root_ = renderAsElement(this.win_.document, TEMPLATE); this.root_.insertBefore( - this.progressBar_.build(pageCount), this.root_.firstChild); + this.progressBar_.build(pageCount), this.root_.firstChild.nextSibling); this.leftButtonTray...
[No CFG could be retrieved]
Creates a new UI element. Adds event handlers to the UI elements.
What element is this? Can you make this clear by moving to a local var?
@@ -168,7 +168,7 @@ class _DispatcherBase(_dispatcher.Dispatcher): has_stararg) self.doc = py_func.__doc__ - self._compile_lock = utils.NonReentrantLock() + self._compile_lock = threading.RLock() utils.finalize(self, self._make_finalizer())
[Dispatcher->[_rebuild->[compile],__reduce__->[get_globals_for_reduction],__init__->[Dispatcher,__init__],compile->[compile,add_overload],recompile->[_make_finalizer,compile,_reset_overloads]],LiftedLoop->[compile->[add_overload],__init__->[__init__]],_DispatcherBase->[get_call_template->[fold_argument_types,compile],_...
Initialize a object.
To support mutual recursion, dispatcher reentrant is allowed.
@@ -224,8 +224,10 @@ public abstract class AbstractSequentialFileFactory implements SequentialFileFac @Override public void createDirs() throws Exception { boolean ok = journalDir.mkdirs(); - if (!ok) { - throw new IOException("Failed to create directory " + journalDir); + if (!ok && !j...
[AbstractSequentialFileFactory->[start->[start],stop->[stop],deactivateBuffer->[flush],flush->[flush]]]
Create directories and list of files with the given extension.
shouldn't this be || if !ok.. and directory exists.. shouldn't this throw an error? and how home mkdirs worked and the directory did not exist?
@@ -139,7 +139,7 @@ module.exports = options => ({ new ForkTsCheckerWebpackPlugin({ eslint: true }), new CopyWebpackPlugin({ patterns: [ - <%_ if (!reactive && (applicationType === 'gateway' || applicationType === 'monolith')) { _%> + <%_ if ((applicationType === 'gateway' || applicationT...
[No CFG could be retrieved]
Config for the missing - version middleware. Plugin that renders the main header of the application.
Remove unnecessary brackets
@@ -88,6 +88,9 @@ namespace System.Diagnostics /// </devdoc> public ThreadPriorityLevel PriorityLevel { + [SupportedOSPlatform("windows")] + [SupportedOSPlatform("linux")] + [SupportedOSPlatform("freebsd")] get { if (...
[ProcessThread->[EnsureState->[IsLocal,NotSupportedRemoteThread],_startAddress,Value,_threadState,_currentPriority,_basePriority,HasValue,_threadId,_threadWaitReason,WaitReasonUnavailable,Wait]]
Relations for the base unique identifier for the associated thread. Replies the reason the associated thread is waiting if any.
Windows, Linux and FreeBSD support it, everything else does not.
@@ -242,6 +242,10 @@ func (l *TeamLoader) load1(ctx context.Context, me keybase1.UserVersion, lArg ke mungedForceRepoll = true mungedWantMembers = nil } + if !mungedForceRepoll && l.InForceRepollMode(ctx) { + l.G().Log.CDebugf(ctx, "Must force-repoll in force-repoll mode") + mungedForceRepoll = true + } r...
[checkArg->[String],ResolveNameToIDUntrusted->[Load,String],NotifyTeamRename->[load2],isImplicitAdminOf->[load2],ImplicitAdmins->[load1],Delete->[Delete],load2Inner->[String],load1->[ResolveNameToIDUntrusted,String],load2InnerLockedRetry->[String],VerifyTeamName->[Load],audit->[getHeadMerkleSeqno],implicitAdminsAncesto...
Load1 loads a team from the server. Load a team from the server. This function checks if the team has the necessary secrets and returns the team object.
is this used? Anyway throw this in `load2DecideRepoll` instead of munge
@@ -22,7 +22,9 @@ type Router struct { } // RouterTLSConfig holds the TLS configuration for a router -type RouterTLSConfig struct{} +type RouterTLSConfig struct { + Options string `json:"options" toml:"options,omitzero"` +} // TCPRouter holds the router configuration. type TCPRouter struct {
[CreateTLSConfig->[NewCertPool,Stat,ReadFile,X509KeyPair,AppendCertsFromPEM,Errorf,LoadX509KeyPair],Mergeable->[DeepEqual]]
package config import This package imports the given package. type is a service type that can be merged into a load balancer service.
Since we have an omitzero for toml, don't we want an omitempty for json as well?
@@ -94,6 +94,7 @@ def convert_call(func): # [1. 1. 1.]] """ + translator_logger.log(1, "Convert call: convert {}.".format(func)) func_self = None converted_call = None
[convert_call->[is_paddle_func,is_builtin,is_builtin_len]]
Convert a function call which needs to be transformed to static function. x - > x - > x - > x - > x - > x - > Transform nanoseconds to function call.
`call` is an AST but not clear concept for users. Adding `ast.Call` or `Convert callable object:`
@@ -15,7 +15,7 @@ module Engine include Spender attr_accessor :ipoed, :par_price, :share_price, :tokens - attr_reader :companies, :coordinates, :min_price, :name, :full_name, :logo, :trains, :color + attr_reader :companies, :coordinates, :min_price, :name, :full_name, :logo, :trains, :color, :or_reven...
[Corporation->[counts_for_limit->[counts_for_limit]]]
Initialize a new object with the given parameters.
rename to revenue_history
@@ -1599,6 +1599,11 @@ export class AmpStory extends AMP.BaseElement { this.hideBookend_(); } this.switchTo_(dev().assertElement(this.pages_[0].element).id); + + // reset all pages so that they are offscren to right instead of left in + // desktop view + this.pages_.forEach(page => + remo...
[AmpStory->[buildSystemLayer_->[element],assertAmpStoryExperiment_->[AMP_STORY_EXPERIMENT_ENABLED_TEXT,user,toggleExperiment,removeElement,textContent,appendChild,classList,AMP_STORY_WARNING_EXPERIMENT_DISABLED_TEXT,addEventListener,AMP_STORY_EXPERIMENT_ENABLE_BUTTON_LABEL],registerAndPreloadBackgroundAudio_->[upgradeB...
replay_ - Replays the page.
nit: s/offscren/offscreen, s/reset/Reset, s/view/view.