patch
stringlengths
18
160k
callgraph
stringlengths
4
179k
summary
stringlengths
4
947
msg
stringlengths
6
3.42k
@@ -768,7 +768,10 @@ abstract class CI_DB_driver { { if ( ! $this->conn_id) { - $this->initialize(); + if( !$this->initialize() ) + { + return FALSE; + } } return $this->_execute($sql);
[CI_DB_driver->[protect_identifiers->[protect_identifiers,escape_identifiers],list_fields->[query],db_pconnect->[db_connect],escape_identifiers->[escape_identifiers],list_tables->[query],field_data->[field_data,query],field_exists->[list_fields],insert_string->[escape_identifiers,escape],escape_str->[escape_str],simple_query->[initialize],update_string->[escape],escape_like_str->[escape_str],count_all->[query],table_exists->[list_tables]]]
Simple query.
`if ( ! $this->initialize())`
@@ -1008,7 +1008,7 @@ avl_destroy_nodes(avl_tree_t *tree, void **cookie) --tree->avl_numnodes; /* - * If we just did a right child or there isn't one, go up to parent. + * If we just made a right child or there isn't one, go up to parent. */ if (child == 1 || parent->avl_child[1] == NULL) { node = parent;
[No CFG could be retrieved]
This function is called when a node is destroyed. region AVL_NODE_2_DATA functions.
I don't think we are "making" any nodes here; "did" seems ok to me, or we could change it to "removed"
@@ -17,8 +17,11 @@ """ Test script for the demos. -For the tests to work, the test data directory must contain a "ILSVRC2012_img_val" -subdirectory with the ILSVRC2012 dataset. +For the tests to work, the test data directory must contain: +* a "ILSVRC2012_img_val" subdirectory with the ILSVRC2012 dataset; +* a "BraTS" subdirectory with BraTS 2017 dataset in NIFTI format (see http://medicaldecathlon.com); +* a "Image_Retrieval" subdirectory with image retrieval dataset (images, videos) (see https://github.com/19900531/test) + and list of images (see https://github.com/opencv/openvino_training_extensions/blob/develop/tensorflow_toolkit/image_retrieval/data/gallery/gallery.txt) """ import argparse
[main->[option_to_args->[resolve_arg],collect_result,option_to_args,parse_args],parse_args->[parse_args],main]
Parses command line options and returns a single object representing a single object. Parse command line options for the model optimization entry point script.
You say it's supposed to be BraTS 2017, but then you link to Medical Segmentation Decathlon. Which is it?
@@ -248,4 +248,5 @@ if sys.platform == 'darwin': MAXVAL = 15 if len(name) > MAXVAL: name = name[:MAXVAL] - return tmpdir_factory.mktemp(name, numbered=True) + tdir = tmpdir_factory.mktemp(name, numbered=True) + return tdir
[validate_solidity_compiler->[validate_solc],pytest_addoption->[addoption],pytest_generate_tests->[list,getoption,append,extend,set,parametrize],dont_exit_pytest->[get_hub],_tmpdir_short->[getbasetemp->[get_temproot,ensure,trace,realpath,check,mkdir,remove,local,make_numbered_dir],delattr],tmpdir->[mktemp,sub,len],logging_level->[LogLevelConfigType,convert,configure_logging],enable_greenlet_debugger->[debugger->[post_mortem,print_exception],get_hub],insecure_tls->[make_requests_insecure],enable_gevent_monitoring_signal->[signal],patch_all,fixture]
Return a temporary directory path object which is unique to each test function invocation object created.
The `tdir` variable looks like a debugging remnant?
@@ -326,6 +326,17 @@ WebContents.prototype._init = function () { } }) + this.on('-ipc-invoke', function (event, channel, args) { + event.reply = (result) => event.sendReply({ result }) + event.throw = (error) => event.sendReply({ error: error.toString() }) + this.emit('ipc-invoke', event, channel, ...args) + if (channel in ipcMain._invokeHandlers) { + ipcMain._invokeHandlers[channel](event, ...args) + } else { + event.throw(`No handler registered for '${channel}'`) + } + }) + this.on('-ipc-message-sync', function (event, internal, channel, args) { addReturnValueToEvent(event) if (internal) {
[No CFG could be retrieved]
The main event handler for the object. BrowserWindow - BrowserWindow and BrowserView - BrowserView.
What is the purpose of this `emit`?
@@ -90,6 +90,10 @@ func gatherInfoForNode(in message.Compliance) (*manager.NodeMetadata, error) { tags = append(tags, &common.Kv{Key: "environment", Value: in.Report.GetEnvironment()}) } + mgrType := in.Report.GetAutomateManagerType() + if in.Report.GetSourceFqdn() != "" { + mgrType = "chef" + } return &manager.NodeMetadata{ Uuid: in.Report.GetNodeUuid(), Name: in.Report.GetNodeName(),
[GetNodeName,GetPolicyGroup,GetJobUuid,GetPolicyName,GetEnvironment,GetSourceId,GetSourceAccountId,GetRelease,GetName,Errorf,GetRoles,Debugf,FinishProcessingCompliance,ProcessNode,Propagate,GetAutomateManagerId,GetNodeUuid,GetOrganizationName,TimestampProto,Err,GetChefTags,GetTags,GetSourceFqdn,Background,GetSourceRegion,Parse,GetPlatform]
ProcessComplianceReport returns a NodeMetadata object that can be used to populate the node metadata. Get all projects data from the environment roles and policy_name.
if there's a value for the chef server, we know the node is managed by chef
@@ -120,7 +120,7 @@ class GroupsController < ApplicationController @grouping = Grouping.find(params[:grouping_id]) @grouping.validate_grouping @grouping_data = construct_table_row(@grouping, @assignment) - render :valid_grouping, :formats => [:js] + render :valid_grouping, formats: [:js] end def invalid_grouping
[GroupsController->[remove_member->[remove_member]]]
valid_grouping validates the group node id and renders a table with the data for the.
Trailing whitespace detected.
@@ -70,9 +70,10 @@ namespace NServiceBus.Serializers.XML /// </summary> public void Serialize(object message, Stream stream) { - var serializer = new Serializer(mapper, conventions, cache, SkipWrappingRawXml, Namespace); - var buffer = serializer.Serialize(message); - stream.Write(buffer, 0, buffer.Length); + using (var serializer = new Serializer(mapper, stream, message, conventions, cache, SkipWrappingRawXml, Namespace)) + { + serializer.Serialize(); + } } /// <summary>
[XmlMessageSerializer->[InitType->[InitType],Serialize->[Serialize],Initialize->[InitType],Deserialize->[Deserialize]]]
Serializes the given object to the given stream.
Note: I'm personally always unsure what the better design is regarding what comes into the ctor and what into the method. In the serializer case I would tend to add everything which is cacheable, bound to the lifetime of the object etc. into the ctor and everything which cannot be reused over multiple calls into the method. So I would tend to add the StreamWriter into the method not the ctor. @SimonCropp How do you approach those decisions?
@@ -103,6 +103,8 @@ class User < ApplicationRecord acts_as_follower has_one :profile, dependent: :destroy + has_one :notification_setting, class_name: "Users::NotificationSetting", dependent: :destroy + has_one :setting, class_name: "Users::Setting", dependent: :destroy has_many :access_grants, class_name: "Doorkeeper::AccessGrant", foreign_key: :resource_owner_id, inverse_of: :resource_owner, dependent: :delete_all
[User->[check_for_username_change->[path],send_welcome_notification->[send_welcome_notification],blocked_by?->[blocking?],auditable?->[any_admin?],blocking?->[blocking?],resave_articles->[path]]]
The base class for all of the user - related attributes. The author_id is the primary key of the author.
Create two new tables with a relationship to the Users table.
@@ -569,6 +569,9 @@ def _find_recursive(root, search_files): # found in a key, and reconstructing the stable order later. found_files = collections.defaultdict(list) + if not os.path.isdir(root): + return [] + for path, _, list_files in os.walk(root): for search_file in search_files: for list_file in list_files:
[_find_non_recursive->[join_path],working_dir->[mkdirp],install->[set_install_permissions,copy_mode],traverse_tree->[traverse_tree],change_sed_delimiter->[filter_file],find_headers->[HeaderList,find],remove_dead_links->[join_path],touchp->[mkdirp,touch],install_tree->[set_install_permissions,copy_mode],fix_darwin_install_name->[join_path],FileFilter->[filter->[filter_file]],FileList->[__radd__->[__add__],__str__->[joined]],_find_recursive->[join_path],find_libraries->[find,LibraryList]]
Find all library file paths recursively.
i guess you can now drop changes in `filesystem`?
@@ -55,7 +55,7 @@ class SpannerSchema implements Serializable { } public Builder addKeyPart(String table, String column, boolean desc) { - keyParts.put(table, KeyPart.create(column.toLowerCase(), desc)); + keyParts.put(table.toLowerCase(), KeyPart.create(column.toLowerCase(), desc)); return this; }
[SpannerSchema->[hashCode->[hashCode],Column->[parseSpannerType->[parseSpannerType],create->[create]],Builder->[addColumn->[addColumn],build->[SpannerSchema]]]]
Add a key part to the schema.
This is a lot of toLowerCase's throughout the PR, seems very likely that someone will add new code that forgets to add toLowerCase and it will break. Is there anything else we can do? Maybe introduce a new type for case-insensitive strings and use it for table and column names? Not sure if that's better than the current state in terms of complexity though...
@@ -172,6 +172,9 @@ public class CaseInsensitiveHashMap<K, V> implements Map<K, V>, Serializable { if (this instanceof ImmutableCaseInsensitiveHashMap) { return this; } + if (this.isEmpty() && EMPTY_MAP != null) { + return EMPTY_MAP; + } return new ImmutableCaseInsensitiveHashMap<>(this); }
[CaseInsensitiveHashMap->[size->[size],containsValue->[containsValue],keySet->[keySet],putAll->[putAll],entrySet->[entrySet],values->[values],containsKey->[containsKey],get->[get],remove->[remove],clear->[clear],put->[put],toString->[toString],isEmpty->[isEmpty]]]
toImmutableCaseInsensitiveMap - returns an immutable case - insensitive map.
Can this check be avoided using polymorphism?
@@ -993,6 +993,7 @@ public class SparkInterpreter extends Interpreter { } private Results.Result interpret(String line) { + out.ignoreLeadingNewLinesFromScalaReporter(); return (Results.Result) Utils.invokeMethod( intp, "interpret",
[SparkInterpreter->[createSparkSession->[useHiveContext,isYarnMode,hiveClassesArePresent],interpretInput->[interpret],getSQLContext_1->[useHiveContext,getSparkContext],setupListeners->[onJobStart->[onJobStart]],populateSparkWebUrl->[toString,getSparkUIUrl],setupConfForPySpark->[isYarnMode],getCompletionTargetString->[toString],getProgressFromStage_1_0x->[getProgressFromStage_1_0x],putLatestVarInResourcePool->[toString,getLastObject,getValue],getProgressFromStage_1_1x->[getProgressFromStage_1_1x],open->[isYarnMode,getDepInterpreter,importImplicit,getSQLContext,printREPLOutput,getDependencyResolver,getSparkSession,getSparkContext],interpret->[toString,interpret,populateSparkWebUrl]]]
Interprets a line in the tag.
is there a reason we have to set this every time interpret is called, and not have it sticky?
@@ -105,6 +105,9 @@ class SwitchingDirectRunner(PipelineRunner): # The FnApiRunner does not support execution of SplittableDoFns. if DoFnSignature(dofn).is_splittable_dofn(): self.supported_by_fnapi_runner = False + # The FnApiRunner does not support execution of Stateful DoFns. + if DoFnSignature(dofn).is_stateful_dofn(): + self.supported_by_fnapi_runner = False # The FnApiRunner does not support execution of CombineFns with # deferred side inputs. if isinstance(dofn, CombineValuesDoFn):
[_StreamingGroupAlsoByWindow->[from_runner_api_parameter->[_StreamingGroupAlsoByWindow]],_get_pubsub_transform_overrides->[WriteToPubSubOverride->[get_replacement_transform->[_DirectWriteToPubSubFn]],ReadFromPubSubOverride->[get_replacement_transform->[_DirectReadFromPubSub]],WriteToPubSubOverride,ReadFromPubSubOverride],SwitchingDirectRunner->[run_pipeline->[_FnApiRunnerSupportVisitor,run_pipeline]],_StreamingGroupByKeyOnly->[from_runner_api_parameter->[_StreamingGroupByKeyOnly]],DirectPipelineResult->[metrics->[metrics]],_get_transform_overrides->[StreamingGroupAlsoByWindowOverride->[get_replacement_transform->[_StreamingGroupAlsoByWindow]],StreamingGroupByKeyOverride->[get_replacement_transform->[_StreamingGroupByKeyOnly]],CombinePerKeyOverride,StreamingGroupAlsoByWindowOverride,StreamingGroupByKeyOverride],BundleBasedDirectRunner->[run_pipeline->[_get_transform_overrides,_TestStreamUsageVisitor]]]
Runs a pipeline on the FnApiRunner. Check whether all transforms used in the pipeline are supported by the .
For some reason I thought the intent was to add this to the FnAPI runner. I suppose I'd like to cap investment in the BundleBasedRunner (and deprecate/remove it) sooner rather than later.
@@ -80,6 +80,12 @@ const ( TraefikBackendLoadBalancerStickinessCookieName = Prefix + SuffixBackendLoadBalancerStickinessCookieName TraefikBackendMaxConnAmount = Prefix + SuffixBackendMaxConnAmount TraefikBackendMaxConnExtractorFunc = Prefix + SuffixBackendMaxConnExtractorFunc + TraefikBackendBufferingEnabled = Prefix + SuffixBackendBufferingEnabled + TraefikBackendBufferingMaxRequestBodyBytes = Prefix + SuffixBackendBufferingMaxRequestBodyBytes + TraefikBackendBufferingMemRequestBodyBytes = Prefix + SuffixBackendBufferingMemRequestBodyBytes + TraefikBackendBufferingMaxResponseBodyBytes = Prefix + SuffixBackendBufferingMaxResponseBodyBytes + TraefikBackendBufferingMemResponseBodyBytes = Prefix + SuffixBackendBufferingMemResponseBodyBytes + TraefikBackendBufferingRetryExpression = Prefix + SuffixBackendBufferingRetryExpression TraefikFrontend = Prefix + SuffixFrontend TraefikFrontendAuthBasic = Prefix + SuffixFrontendAuthBasic TraefikFrontendEntryPoints = Prefix + SuffixFrontendEntryPoints
[No CFG could be retrieved]
Returns a list of all possible suffix names.
```go const ( // ... TraefikBackendBuffering = Prefix + SuffixBackendBuffering // ... )
@@ -107,7 +107,7 @@ export function setImportantStyles(element, styles) { /** * Sets the CSS style of the specified element with optional units, e.g. "px". - * @param {Element} element + * @param {?Element} element * @param {string} property * @param {*} value * @param {string=} opt_units
[No CFG could be retrieved]
Gets the value of the specified CSS property of the specified element. Gets the CSS styles of the specified element.
`?` not necessary since classes are nullable by default.
@@ -457,13 +457,9 @@ class TestFileViewer(FilesBase, TestCase): res = self.client.get(self.file_url(u'\u1109\u1161\u11a9')) assert res.status_code == 200 - def test_unicode_fails_with_wrong_configured_basepath(self): + def test_unicode_unicode_tmp_path(self): with override_settings(TMP_PATH=six.text_type(settings.TMP_PATH)): - file_viewer = FileViewer(self.file) - file_viewer.src = unicode_filenames - - with pytest.raises(UnicodeDecodeError): - file_viewer.extract() + self.test_unicode() def test_serve_no_token(self): self.file_viewer.extract()
[TestDiffViewer->[test_view_one_missing->[file_url],test_different_tree->[file_url],test_view_right_binary->[file_url],test_binary_serve_links->[file_url],check_urls->[poll_url,file_url],test_view_both_present->[file_url],test_file_chooser_selection->[file_url],test_tree_no_file->[file_url],test_view_left_binary->[file_url],test_content_file->[file_url]],FilesBase->[test_channel_prefix_not_shown_when_no_mixed_channels->[login_as_admin],test_files_for_unlisted_addon_with_admin->[login_as_admin],test_all_versions_shown_for_admin->[login_as_admin],setUp->[create_directory,login_as_reviewer]],TestFileViewer->[check_urls->[poll_url,file_url],test_serve_fake_token->[files_serve],test_content_file->[file_url],test_binary->[add_file,file_url],test_tree_no_file->[file_url],test_file_size->[file_url],test_unicode->[file_url],test_file_chooser_non_ascii_platform->[file_url],test_content_xss->[add_file,file_url],test_poll_failed->[poll_url],test_directory->[file_url],test_file_chooser_selection->[file_url],test_serve_get_token->[files_redirect],test_bounce->[files_redirect],test_content_file_size_uses_binary_prefix->[file_url],test_serve_no_token->[files_serve],test_files_xss->[add_file,file_url],test_serve_bad_token->[files_serve],test_content_no_file->[file_url],test_memcache_goes_bye_bye->[files_redirect]]]
Test that unicode files are served.
This test was fixed by changing the zip file to set the relevant encoding flag in it, because Python 3 behavior for zipfiles without that flag is different now. Before, it used to return the filenames as bytes, and we'd decode that using utf-8 ourselves. Now, *if the flag is absent* it uses `cp437`, which the the "legacy" encoding for zipfiles, and otherwise falls back to utf-8. The end result for zip files without the flag set is the filenames may look weird in some circumstances, but ultimately should still be coherent.
@@ -39,6 +39,7 @@ crt_corpc_info_init(struct crt_rpc_priv *rpc_priv, struct crt_corpc_hdr *co_hdr; int rc; + DBG_ENTRY(); D_ASSERT(rpc_priv != NULL); D_ASSERT(grp_priv != NULL);
[No CFG could be retrieved]
The main entry point for the . d_rank_list_dup - dup a node in the rank list.
if we are to add new symbol/define that is visible from outside of cart internals we should rename those into D_DBG_ENTRY() and D_DBG_EXIT() or some such (D_ prefix for all externally visible macros, unless it is CRT macro in which case CRT_ prefix)
@@ -332,13 +332,13 @@ namespace DynamoCoreWpfTests public void GettingNodeNameDoesNotTriggerPropertyChangeCycle() { //add a node - var numNode = new CoreNodeModels.Input.DoubleInput { X = 100, Y = 100 }; + var numNode = new CoreNodeModels.Input.DoubleInput(); ViewModel.Model.CurrentWorkspace.AddAndRegisterNode(numNode, true); //subscribe to all property changes var nvm = ViewModel.CurrentSpaceViewModel.Nodes.First(); nvm.PropertyChanged += NodeNameTest_PropChangedHandler; - //get the nodes's name. + //get the node name. var temp = nvm.Name; nvm.PropertyChanged -= NodeNameTest_PropChangedHandler; }
[NodeViewTests->[Open->[Open],CheckLoadedCustomNodeOriginalName->[Open],ZIndex_NodeAsMemberOfGroup->[Open],ZIndex_Test_MouseDown->[Open],SettingOriginalNodeName->[Open],Run->[Run],SettingOriginalNodeNameOnCustomNode->[Open],CheckNotLoadedCustomNodeOriginalName->[Open],CheckDummyNodeName->[Open],SettingNodeAsInputOrOutputMarksGraphAsModified->[Open],ZIndex_Test_MouseEnter_Leave->[Open],NodesHaveCorrectLocationsIndpendentOfCulture->[Open]]]
This test is used to get the node name and property change cycle.
`ModeBase.X` is obsolete, seems here we do not really need positions to be set
@@ -607,6 +607,7 @@ PAYMENT_GATEWAYS = { "module": "saleor.payment.gateways.braintree", "config": { "auto_capture": True, + "store_card": False, "template_path": "order/payment/braintree.html", "connection_params": { "sandbox_mode": get_bool_from_env("BRAINTREE_SANDBOX_MODE", True),
[get_list->[strip,split],get_bool_from_env->[literal_eval,ValueError,format],get_host->[get_current],get_currency_fraction,bool,int,pgettext_lazy,_,parse,append,get_list,dirname,insert,get,getenv,config,setdefault,join,normpath,get_bool_from_env,CACHES]
This function is used to configure the payment gateway. Returns a configuration object that can be used to configure the payment gateways.
I assume that this value should be taken from env first. (Same as `auto_capture` btw)
@@ -2377,6 +2377,18 @@ def _check_pandas_index_arguments(index, defaults): 'values are \'None\' or %s' % tuple(options)) +def _check_ch_locs(locs3d): + """Check if channel locations exist. + + Parameters + ---------- + locs3d : array, shape (n_channels, 3) + The channel locations + """ + return (locs3d == 0).all() or \ + (~np.isfinite(locs3d)).all() or np.allclose(locs3d, 0.) + + def _clean_names(names, remove_whitespace=False, before_dash=True): """Remove white-space on topo matching.
[set_config->[get_config_path,warn,_load_config],get_config->[get_config_path,_load_config],object_diff->[_sort_keys,object_diff],_load_config->[warn],object_size->[object_size],open_docs->[get_config],_get_stim_channel->[get_config],_fetch_file->[_get_http,warn],array_split_idx->[_ensure_int],deprecated->[_decorate_class->[deprecation_wrapped->[warn]],_decorate_fun->[deprecation_wrapped->[warn]]],buggy_mkl_svd->[dec->[warn]],_chunk_write->[update_with_increment_value],traits_test->[dec->[traits_test_context]],check_fname->[warn],object_hash->[object_hash,_sort_keys],md5sum->[update],_check_mayavi_version->[check_version],set_log_file->[warn,WrapStdOut],get_config_path->[_get_extra_data_path],requires_nibabel->[has_nibabel],ProgressBar->[__iter__->[update_with_increment_value,update],__setitem__->[update],__call__->[update_with_increment_value],__enter__->[update],update_with_increment_value->[update]],_get_http->[ProgressBar,update_with_increment_value],run_subprocess->[warn],random_permutation->[check_random_state],_validate_type->[_ensure_int],catch_logging->[__exit__->[set_log_file]],_TempDir->[__new__->[__new__]],SizeMixin->[_size->[object_size,warn],__hash__->[object_hash]],pformat->[_FormatDict]]
Remove white - space on topo matching. CTF names and return a list of cleaned names.
to be reusable elsewhere this function should take as input : info['chs']
@@ -322,8 +322,6 @@ function parsePackageManagerName(userAgent) { return packageManager } -// prettier-ignore -const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__EMPTY_STRING = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER__EMPTY_STRING' // prettier-ignore const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING' // prettier-ignore
[No CFG could be retrieved]
UserAgent - Agent parser for NPM package managers. Get Post Install Trigger JSON Schema Error.
Is this not used?
@@ -78,7 +78,7 @@ func (m moduleName) String() string { case Configs: return "configs" case AlertManager: - return "alertmanager" + return "alert-manager" case All: return "all" default:
[stopStore->[Stop],initAlertmanager->[Handler,NewMultitenantAlertmanager,GetStatusHandler,Wrap,Run,PathPrefix],initDistributor->[Handle,HandlerFunc,New,Wrap,HandleFunc],Set->[ToLower,Errorf],initIngester->[Path,Handler,RegisterIngesterServer,HandlerFunc,New,RegisterHealthServer],initQuerier->[Register,Path,Handler,NewServer,NewWorker,ChunksHandler,HandlerFunc,WithPrefix,New,Subrouter,Wrap,RemoteReadHandler,MustCompile,NewAPI,PathPrefix],initServer->[New],stopDistributor->[Stop],stopTableManager->[Stop],stopAlertmanager->[Stop],initConfigs->[RegisterRoutes,New],stopRuler->[Stop],initOverrides->[NewOverrides],stopQuerier->[Stop],stopOverrides->[Stop],initTableManager->[Error,NewBucketClient,CheckFatal,Start,NewTableClient,Log,NewTableManager,Exit,Load],initRuler->[Handle,NewRuler,New,NewAPIFromConfig,RegisterRoutes],stopConfigs->[Close],stopIngester->[Shutdown],initRing->[Handle,MustRegister,New],initQueryFrontend->[Handler,New,RegisterFrontendServer,Wrap,PathPrefix],stopQueryFrontend->[Close],initStore->[NewStore,Load],stopServer->[Shutdown],String->[Sprintf]]
String returns the string representation of a module name.
Why are you hyphenating here?
@@ -54,6 +54,9 @@ func (cli *Client) RunNode(c *clipkg.Context) error { updateConfig(cli.Config, c.Bool("debug"), c.Int64("replay-from-block")) logger.SetLogger(cli.Config.CreateProductionLogger()) logger.Infow(fmt.Sprintf("Starting Chainlink Node %s at commit %s", static.Version, static.Sha), "id", "boot", "Version", static.Version, "SHA", static.Sha, "InstanceUUID", static.InstanceUUID) + if cli.Config.Dev() { + logger.Warn("Chainlink is running in DEVELOPMENT mode. This is a security risk if enabled in production.") + } app, err := cli.AppFactory.NewApplication(cli.Config) if err != nil {
[PrepareTestDatabase->[ResetDatabase],DeleteUser->[DeleteUser]]
RunNode starts the node AuthenticateVRFKey authenticates with a VRF key store and password.
This moved from application.go to prevent log spew in tests
@@ -210,8 +210,9 @@ describe('amp-youtube', function() { 'data-param-my-param': 'hello world', }).then(yt => { const iframe = yt.querySelector('iframe'); - expect(iframe.src).to.contain('autoplay=1'); expect(iframe.src).to.contain('myParam=hello%20world'); + // autoplay is temporarily black listed. + expect(iframe.src).to.not.contain('autoplay=1'); }); }); });
[No CFG could be retrieved]
Test data - param - my - param attribute is set in iframe src.
I'm testing that it gets removed.
@@ -30,6 +30,7 @@ module Lib black: '#000000', red: '#ec232a', blue: '#35A7FF', + purple: '#800080', }.freeze def self.points(scale: 1.0)
[freeze]
Returns the points of the polygon if any.
This allows users to config the color, because user.rb iterates over Lib::Hex::COLOR. The config wouldn't have any effect though (not saved, not accessed in view/game/hex). It works, but isn't ideal. So I'd either remove this line and change "purple" to hex value in 18CZ's and 1873's config or render frame in user selected color. The latter would entail using named colors for possible tile frames in the future, too.
@@ -544,4 +544,4 @@ class CI_Cart { } /* End of file Cart.php */ -/* Location: ./system/libraries/Cart.php */ \ No newline at end of file +/* Location: ./system/libraries/Cart.php */
[CI_Cart->[insert->[_save_cart,_insert],_save_cart->[set_userdata,unset_userdata],update->[_update,_save_cart],destroy->[unset_userdata],remove->[_save_cart],__construct->[driver,userdata]]]
End of file Cart. php.
I didn't change this line. I don't understand why it's mark as "changed"
@@ -256,8 +256,10 @@ void block_queue::set_span_hashes(uint64_t start_height, const boost::uuids::uui if (i->start_block_height == start_height && i->connection_id == connection_id) { span s = *i; - blocks.erase(i); + erase_block(i); s.hashes = std::move(hashes); + for (const crypto::hash &h: s.hashes) + requested_hashes.insert(h); blocks.insert(s); return; }
[has_next_span->[is_blockchain_placeholder],foreach->[is_blockchain_placeholder],reserve_span->[requested,add_blocks],get_num_filled_spans_prefix->[is_blockchain_placeholder],get_next_span->[is_blockchain_placeholder],get_next_span_if_scheduled->[is_blockchain_placeholder],get_start_gap_span->[print,is_blockchain_placeholder]]
This method is called from the block_queue thread.
Is this inserting hash references after they are invalidated in `erase_block`?
@@ -59,11 +59,17 @@ def get_head_surf(subject, source=('bem', 'head'), subjects_dir=None, surf : dict The head surface. """ + return _get_head_surface(subject=subject, source=source, + subjects_dir=subjects_dir) + + +def _get_head_surface(subject, source, subjects_dir, raise_error=True): + """Load the subject head surface.""" from .bem import read_bem_surfaces # Load the head surface from the BEM subjects_dir = get_subjects_dir(subjects_dir, raise_error=True) if not isinstance(subject, string_types): - raise TypeError('subject must be a string, not %s' % (type(subject,))) + raise TypeError('Subject must be a string, not %s.' % (type(subject,))) # use realpath to allow for linked surfaces (c.f. MNE manual 196-197) if isinstance(source, string_types): source = [source]
[_project_onto_surface->[_triangle_coords],complete_surface_info->[_triangle_neighbors,_accumulate_normals,fast_cross_3d],_nearest_tri_edge->[_get_tri_dist],decimate_surface->[_decimate_surface],_tessellate_sphere->[_norm_midpt],_create_surf_spacing->[complete_surface_info,_get_surf_neighbors,_compute_nearest,read_surface,_normalize_vectors],_get_tri_supp_geom->[fast_cross_3d,_normalize_vectors],read_curvature->[_fread3],mesh_dist->[mesh_edges],_make_morph_map->[_compute_nearest,read_surface,_get_tri_supp_geom,_triangle_neighbors,_normalize_vectors]]
Load the subject head surface. Find a bem file in path that contains a specific head.
don't like this change, `subject` is an all-lower-case variable name
@@ -18,10 +18,14 @@ from ..utils import ( create_payment_information, create_transaction, is_currency_supported, + payment_owned_by_user, update_payment, validate_gateway_response, ) +pytest_plugins = ["saleor.plugins.webhook.tests.test_payment_webhook"] + + NOT_ACTIVE_PAYMENT_ERROR = "This payment is no longer active." EXAMPLE_ERROR = "Example dummy error"
[test_validate_gateway_response_not_json_serializable->[CustomClass]]
This module provides a test to test the payment method. A gateway response for a single .
This shouldn't be needed. If you need any fixture from test_payment_webhook, then move it to generic conftest.
@@ -27,7 +27,7 @@ class Internal::BroadcastsController < Internal::ApplicationController private def broadcast_params - params.permit(:title, :processed_html, :type_of, :sent) + params.permit(:title, :processed_html, :type_of, :active) end def authorize_admin
[broadcast_params->[permit],create->[redirect_to,create!],new->[new],edit->[find_by!],update->[redirect_to,update!,find_by!],authorize_admin->[authorize],index->[all],layout]
Provides a way to broadcast a request to the user that has a sequence of unknown params.
@benhalpern is this an allowed param in Fastly? It seems super general so I am assuming it is but worth a double check.
@@ -414,8 +414,7 @@ class Executor(object): feed_tensor.set(feed[feed_name], core.CPUPlace()) feed_tensor_dict[feed_name] = feed_tensor - self.executor.feed_and_split_tensor_into_local_scopes( - feed_tensor_dict) + exe.feed_and_split_tensor_into_local_scopes(feed_tensor_dict) elif isinstance(feed, list) or isinstance(feed, tuple): if len(feed) != len(program._places): raise ValueError(
[Executor->[_run->[_add_feed_fetch_ops,_add_program_cache,_get_program_cache,as_numpy,run,_get_program_cache_key,_fetch_data,_feed_data],_add_feed_fetch_ops->[has_feed_operators,has_fetch_operators],run->[global_scope,Executor,_run_parallel],_run_parallel->[as_numpy],close->[close],_feed_data->[_as_lodtensor],_run_inference->[run]],_fetch_var->[global_scope,as_numpy],as_numpy->[as_numpy],scope_guard->[_switch_scope]]
Runs the parallel network.
Same above, program is a bit confusing with fluid.Program
@@ -144,6 +144,8 @@ func createLoadBalancerServerTCP(client Client, namespace string, service v1alph tcpService.LoadBalancer.TerminationDelay = service.TerminationDelay } + tcpService.LoadBalancer.ProxyProtocolVersion = service.ProxyProtocolVersion + return tcpService, nil }
[loadIngressRouteTCPConfiguration->[FromContext,Str,Error,Sprintf,SetDefaults,Contains,Warnf,WithField,Errorf,With,GetIngressRouteTCPs],FromContext,GetService,Sprintf,New,GetEndpoints,Debugf]
createLoadBalancerServerTCP creates a loadbalancer server and a tcp service from the given service. getNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetwork.
As this value is not conditionally set, could you set the `ProxyProtocolVersion` directly when `tcpService` is created?
@@ -1,9 +1,17 @@ package errutil import ( + "fmt" "strings" ) +var ( + // ErrBreak is an error used to break out of call back based iteration, + // should be swallowed by iteration functions and treated as successful + // iteration. + ErrBreak = fmt.Errorf("BREAK") +) + // IsAlreadyExistError returns true if err is due to trying to create a // resource that already exists. It uses simple string matching, it's not // terribly smart.
[Contains,Error]
IsAlreadyExistError returns true if err is due to trying to create a resource.
This is just a note about changing this idiom to returning a break/done boolean, rather than returning a break within an error.
@@ -132,6 +132,11 @@ class Cmake(Package): # https://gitlab.kitware.com/cmake/cmake/issues/18232 patch('nag-response-files.patch', when='@3.7:3.12') + # Cray libhugetlbfs and icpc warnings failing CXX tests + # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4698 + # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4681 + patch('ignore_crayxc_warnings.patch', when='@3.7:3.17.2') + conflicts('+qt', when='^qt@5.4.0') # qt-5.4.0 has broken CMake modules # https://gitlab.kitware.com/cmake/cmake/issues/18166
[Cmake->[install->[make],build->[make],bootstrap->[bootstrap,Executable,bootstrap_args],test->[make],flag_handler->[append,any,ValueError],bootstrap_args->[append,format,str,satisfies],depends_on,conflicts,version,patch,on_package_attributes,variant,run_after]]
Find all possible conflicts in a sequence of possible dependencies. Add flags to the C ++ 11 standard.
@jennfshr Does this actually cleanly apply all the way back to 3.7?
@@ -139,8 +139,8 @@ class AssetsController < ApplicationController render_html = if @asset.step assets = @asset.step.assets - order_atoz = az_ordered_assets_index(assets, @asset.id) - order_ztoa = assets.length - az_ordered_assets_index(assets, @asset.id) + order_atoz = az_ordered_assets_index(@asset.step, @asset.id) + order_ztoa = assets.length - az_ordered_assets_index(@asset.step, @asset.id) asset_position = @asset.step.asset_position(@asset) render_to_string( partial: 'steps/attachments/item.html.erb',
[AssetsController->[append_wd_params->[to_query],load_vars->[step,protocol,repository_cell,my_module,class,result,repository,find_by_id],edit->[append_wd_params,to_s,render,token,zero?,get_action_url,update,create_wopi_file_activity,locked?,favicon_url,now,get_wopi_token],check_read_permission->[can_read_experiment?,can_read_protocol_in_module?,can_read_protocol_in_repository?,experiment,class,team,can_read_team?],create_start_edit_image_activity->[create_edit_image_activity],asset_data_type->[wopi_file?,image?],check_edit_permission->[can_manage_repository_rows?,can_manage_protocol_in_module?,can_manage_module?,can_manage_protocol_in_repository?,class,team],file_preview->[editable_image?,respond_to,can_manage_module?,image?,rails_representation_url,render_to_string,merge!,team,file_image_quality,marvin_js_asset_path,can_manage_protocol_in_module?,include?,file,can_manage_protocol_in_repository?,escape_input,json,metadata,wopi_enabled?,file_name,truncate,id,render,can_manage_repository_rows?,rails_blob_path,class,large_preview,wopi_file?,content_type],wopi_file_edit_button_status->[t,last,include?],asset_params->[permit],update_image->[step,find,respond_to,az_ordered_assets_index,post_process_file,file_size,render_to_string,save!,team,require,update,json,now,assets,length,file_name,id,attach,render,create_edit_image_activity,release_space,asset_position,can_read_team?],view->[append_wd_params,to_s,render,token,get_action_url,favicon_url,get_wopi_token],create_wopi_file->[create,new,find,original_filename,can_manage_module?,create!,errors,protocol,asset_id,require,wopi_content_type,to_i,can_manage_protocol_in_module?,include?,update,can_manage_protocol_in_repository?,now,edit_asset_url,attach,render,valid?],before_action,include]]
update image tag.
Can you fix issue for assets without blob for this `az_ordered_assets_index`
@@ -33,7 +33,7 @@ class PyLogilabCommon(Package): version('1.2.0', 'f7b51351b7bfe052746fa04c03253c0b') - extends("python") + extends('python', ignore=r'bin/pytest') depends_on("py-setuptools", type='build') depends_on("py-six", type=nolink)
[PyLogilabCommon->[install->[setup_py],depends_on,version,extends]]
Install the given spec.
What does this ignore notation mean? I've never seen it before...
@@ -0,0 +1,12 @@ +#!/usr/bin/env python +import sys +import os + +hook_script_type = os.path.basename(os.path.dirname(sys.argv[1])) +sys.stderr.write(str(os.environ)) +if hook_script_type == 'deploy' and ('RENEWED_DOMAINS' not in os.environ or 'RENEWED_LINEAGE' not in os.environ): + sys.stderr.write('Environment variables not properly set!\n') + sys.exit(1) + +with open(sys.argv[2], 'a') as file_h: + file_h.write(hook_script_type + '\n')
[No CFG could be retrieved]
No Summary Found.
Did you mean to keep this here or was it for temporary debugging purposes?
@@ -21,6 +21,8 @@ import ( "fmt" "time" + "github.com/elastic/beats/libbeat/autodiscover" + "github.com/pkg/errors" "github.com/elastic/beats/heartbeat/config"
[RunStaticMonitors->[NewFactory,Wrap,Create,Start],Run->[RunDynamicMonitors,Stop,RunStaticMonitors,NewReloader,Start,Enabled,Info],RunDynamicMonitors->[NewFactory,Run,Check],NewWithLocation,LoadLocation,Unpack,Errorf]
New creates a new instance of the beat. Errorf returns an error if the config file is not present or if it is not present.
import mess :-)
@@ -433,7 +433,6 @@ namespace DotNetNuke.Modules.Admin.Users Required = required, TextMode = TextBoxMode.Password, TextBoxCssClass = ConfirmPasswordTextBoxCssClass, - ClearContentInPasswordMode = true }; userForm.Items.Add(formItem);
[Register->[OnInit->[OnInit,Register],registerButton_Click->[CreateUser],CreateUser->[CreateUser],UpdateDisplayName->[UpdateDisplayName],UserAuthenticated->[CreateUser],OnLoad->[OnLoad],OnPreRender->[OnPreRender]]]
AddPasswordConfirmField - Add a password confirm field to the user form.
Why was this removed?
@@ -81,6 +81,7 @@ class BalanceProof: @staticmethod def hash_balance_data(transferred_amount: int, locked_amount: int, locksroot: str) -> str: + # Use transfer.utils.hash_balance_data instead? return Web3.soliditySha3( # pylint: disable=no-value-for-parameter ["uint256", "uint256", "bytes32"], [transferred_amount, locked_amount, locksroot] )
[BalanceProof->[balance_hash->[encode_hex,ValueError,isinstance,hash_balance_data],__init__->[hash_balance_data],hash_balance_data->[soliditySha3],serialize_bin->[decode_hex,pack_data]],encode_hex]
Return the hash balance data.
Do you want to fix this in this PR?
@@ -199,10 +199,13 @@ namespace DotNetNuke.Modules.Admin.Authentication } var alias = PortalAlias.HTTPAlias; - var comparison = StringComparison.InvariantCultureIgnoreCase; - var isDefaultPage = redirectURL == "/" - || (alias.Contains("/") && redirectURL.Equals(alias.Substring(alias.IndexOf("/", comparison)), comparison)); - + var aliasWithoutDomain = alias.Substring(Request.Url.Host.Length); + var redirectURLTrimmed = RemoveQueryStrings(redirectURL).TrimEnd(new[] { SLASH_CHARACTER }); + + var isDefaultPage = redirectURL == SLASH_CHARACTER.ToString() || + (aliasWithoutDomain.Contains(SLASH_CHARACTER.ToString()) + && aliasWithoutDomain.Contains(redirectURLTrimmed)); + if (string.IsNullOrEmpty(redirectURL) || isDefaultPage) { if (
[Login->[BindLoginControl->[AddLoginControlAttributes],PasswordUpdated->[ValidateUser],ShowPanel->[BindRegister,BindLogin],cmdAssociate_Click->[ValidateUser,UpdateProfile],ValidateUser->[ValidateUser,ShowPanel],OnInit->[OnInit],cmdProceed_Click->[ValidateUser],UserCreateCompleted->[ValidateUser,UpdateProfile],ProfileUpdated->[ValidateUser],UserAuthenticated->[InitialiseUser,ValidateUser,ShowPanel,UpdateProfile],OnLoad->[OnLoad,UserNeedsVerification,ShowPanel]]]
This function checks if there is a returnurl in the request and if so redirects to the if user has a specific id redirect to current page.
Rather than converting the character back to a string all of the time, why not make the constant a string.
@@ -224,7 +224,7 @@ export function getA2AAncestor(win) { // Not a security property. We just check whether the // viewer might support A2A. More domains can be added to whitelist // as needed. - if (top.indexOf('.google.') == -1) { + if (!top.includes('.google.')) { return null; } const amp = origins[origins.length - 2];
[No CFG could be retrieved]
Gets the Nth ancestor of the given window.
`String#includes` is not supported in IE.
@@ -175,7 +175,7 @@ func BuildMasterConfig(options configapi.MasterConfig) (*MasterConfig, error) { kubeletClientConfig := configapi.GetKubeletClientConfig(options) // in-order list of plug-ins that should intercept admission decisions (origin only intercepts) - admissionControlPluginNames := []string{"ProjectRequestLimit", "OriginNamespaceLifecycle", "PodNodeConstraints", "BuildByStrategy", "OriginResourceQuota"} + admissionControlPluginNames := []string{"ProjectRequestLimit", "OriginNamespaceLifecycle", "PodNodeConstraints", "BuildByStrategy", "OriginResourceQuota", imageadmission.PluginName} if len(options.AdmissionConfig.PluginOrderOverride) > 0 { admissionControlPluginNames = options.AdmissionConfig.PluginOrderOverride }
[GetServiceAccountClients->[New,Clients],ResourceQuotaManagerClients->[FromUnversionedClient],DeploymentControllerClients->[GetServiceAccountClients,Fatal],BuildControllerClients->[GetServiceAccountClients,Fatal],WebConsoleEnabled->[Has],GetKubeletClientConfig,NewString,NewAuthorizerReviewer,GetClientCertCAPool,ClusterPolicyGetter,NewLeased,ReadPublicKey,NewReadOnlyCacheAndClient,GetAPIClientCertCAPool,NewChainHandler,Validate,NewAuthorizer,New,FromUnversionedClient,NewREST,NewGetterFromClient,UseTLS,Errorf,DefaultVerifyOptions,NewDefaultRuleResolver,MakeNewEtcdClient,NewAuthenticator,GetKubeClient,NewAuthorizationCache,NewGroupAdder,NewStorage,GetPluginConfig,NewEtcdStorage,PolicyGetter,Join,NewRequestContextMapper,Infof,NewUnionAuthentication,NewProjectCache,NewTokenAuthenticator,NewGetterFromStorageInterface,NewAuthorizationAttributeBuilder,BindingLister,V,Fatalf,NewForbiddenMessageResolver,ClusterBindingLister,NewDefaultImageTemplate,Namespaces,GetOpenShiftClient,Sprintf,EtcdClient,Initialize,JWTTokenAuthenticator,String,NewRegistry,LegacyCodec,NewEtcd,InitPlugin,Run,NewGroupCache]
Initialize the object that will be used to intercept the variable object add a plugin to the list of plugins to be run when the if flag is.
I never like seeing something after quota... is there a reason why this cannot be before?
@@ -41,7 +41,7 @@ util.inherits(Generator, yeoman.Base); */ Generator.prototype.addElementToMenu = function (routerName, glyphiconName, enableTranslation) { try { - var fullPath = CLIENT_MAIN_SRC_DIR + 'app/layouts/navbar/navbar.html'; + var fullPath = CLIENT_MAIN_SRC_DIR + 'app/layouts/navbar/navbar.component.html'; jhipsterUtils.rewriteFile({ file: fullPath, needle: 'jhipster-needle-add-element-to-menu',
[No CFG could be retrieved]
Generates a menu element that can be added to the menu. Adds a new menu element to the admin menu.
this shouldnt be changed now. It will be have to work for both ng1 and ng2 hence will be changed after entity migration
@@ -494,7 +494,7 @@ public class SqlToJavaVisitor { } joiner.add( - process(convertArgument(arg, sqlType, paramType), context.getCopy()) + process(convertArgument(arg, sqlType, paramType),typeContextsForChildren.get(i)) .getLeft()); }
[SqlToJavaVisitor->[formatExpression->[process],of->[SqlToJavaVisitor],Formatter->[visitWhenClause->[visitIllegalState],visitLambdaExpression->[process],visitArithmeticUnary->[process],visitSimpleCaseExpression->[visitUnsupported],visitCast->[of,process],visitInPredicate->[process],visitIsNullPredicate->[process],visitFunctionCall->[of,visitType],visitBetweenPredicate->[process],visitComparisonExpression->[visitMapComparisonExpression,visitBytesComparisonExpression,visitTimestampComparisonExpression,visitStringComparisonExpression,process,visitArrayComparisonExpression,visitStructComparisonExpression,visitBooleanComparisonExpression,visitScalarComparisonExpression,nullCheckPrefix],visitType->[visitIllegalState],visitIsNotNullPredicate->[process],visitArithmeticBinary->[process],visitInListExpression->[visitUnsupported],visitTimeLiteral->[visitUnsupported]]]]
Visit a FunctionCall node. Evaluate the missing return type.
nit: space after `,`
@@ -392,6 +392,16 @@ class Stock(models.Model): def quantity_available(self): return max(self.quantity - self.quantity_allocated, 0) + def get_costs_data(self): + zero_price = Price(0, 0, currency=DEFAULT_CURRENCY) + if not self.cost_price: + return {'costs': zero_price, 'margins': 0} + + price = self.variant.get_price_per_item() + margin = price - self.cost_price + percent = round((margin.gross / price.gross) * 100, 0) + return {'costs': self.cost_price, 'margins': percent} + @python_2_unicode_compatible class ProductAttribute(models.Model):
[ProductVariant->[get_absolute_url->[get_slug],get_cost_price->[select_stockrecord],as_data->[get_price_per_item],get_first_image->[get_first_image]],Product->[is_in_stock->[is_in_stock],ProductManager],ProductImage->[delete->[get_ordering_queryset],save->[get_ordering_queryset],ImageManager],Stock->[StockManager]]
Returns the number of available items in the pool.
Could this live outside of the model class? We try to prevent models from implementing business logic.
@@ -107,8 +107,8 @@ class PostCreator topic_creator = TopicCreator.new(@user, guardian, @opts) return false unless skip_validations? || validate_child(topic_creator) else - @topic = Topic.find_by(id: @opts[:topic_id]) - if (@topic.blank? || !guardian.can_create?(Post, @topic)) + @topic = Topic.with_deleted.find_by(id: @opts[:topic_id]) + if (@topic.blank? || !guardian.can_create?(Post, @topic)) && !skip_validations? errors[:base] << I18n.t(:topic_not_found) return false end
[PostCreator->[save_post->[skip_validations?],build_post_stats->[track_post_stats],store_unique_post_key->[store_unique_post_key],create!->[create!],create->[create,valid?],handle_spam->[skip_validations?,create],ensure_in_allowed_users->[create!],valid?->[skip_validations?],transaction->[transaction],enqueue_jobs->[enqueue_jobs],create_topic->[create]]]
Checks if a single node in the system is a valid .
Why is `skip_validations` required here? I don't see any validations in this line or within the following closure
@@ -676,12 +676,10 @@ class SemanticAnalyzerPass2(NodeVisitor[None], self.fail('Type signature has too many arguments', fdef, blocker=True) def visit_class_def(self, defn: ClassDef) -> None: - self.scope.enter_class(defn.info) - with self.analyze_class_body(defn) as should_continue: + with self.scope.class_scope(defn.info), self.analyze_class_body(defn) as should_continue: if should_continue: # Analyze class body. defn.defs.accept(self) - self.scope.leave() @contextmanager def analyze_class_body(self, defn: ClassDef) -> Iterator[bool]:
[infer_condition_value->[infer_condition_value],make_any_non_explicit->[accept],SemanticAnalyzerPass2->[analyze_comp_for->[analyze_lvalue],build_newtype_typeinfo->[named_type],name_not_defined->[add_fixture_note,lookup_fully_qualified_or_none],check_classvar->[is_self_member_ref],visit_lambda_expr->[analyze_function],build_typeddict_typeinfo->[basic_new_typeinfo,str_type,object_type,named_type_or_none],visit_for_stmt->[fail_invalid_classvar,anal_type,is_classvar,store_declared_types,visit_block,visit_block_maybe,analyze_lvalue],add_symbol->[is_func_scope],visit_import_all->[dereference_module_cross_ref,add_submodules_to_parent_modules,process_import_over_existing_name,normalize_type_alias,correct_relative_import],basic_new_typeinfo->[object_type],visit_index_expr->[analyze_alias,add_type_alias_deps,alias_fallback,anal_type],accept->[accept],normalize_type_alias->[add_module_symbol],analyze_simple_literal_type->[named_type_or_none],anal_type->[type_analyzer],parse_typeddict_fields_with_types->[anal_type],is_class_scope->[is_func_scope],check_newtype_args->[anal_type],visit_with_stmt->[fail_invalid_classvar,anal_type,is_classvar,store_declared_types,visit_block,analyze_lvalue],analyze_types->[anal_type],process_typevar_parameters->[expr_to_analyzed_type,object_type],fail_blocker->[fail],visit_type_application->[anal_type],build_namedtuple_typeinfo->[named_type,add_field,add_method,object_type,make_init_arg,basic_new_typeinfo,str_type,named_type_or_none],visit_assignment_stmt->[anal_type],process_module_assignment->[process_module_assignment],analyze_try_stmt->[analyze_lvalue],alias_fallback->[object_type],build_enum_call_typeinfo->[basic_new_typeinfo,named_type_or_none],store_declared_types->[store_declared_types],parse_namedtuple_fields_with_types->[anal_type],visit_block_maybe->[visit_block],visit_member_expr->[dereference_module_cross_ref,normalize_type_alias],visit_while_stmt->[visit_block_maybe],apply_class_plugin_hooks->[get_fullname->[get_fullname],get_fullname],analyze_tuple_or_list_lvalue->[analyze_lvalue],correct_relative_import->[correct_relative_import],visit_cast_expr->[anal_type],lookup_qualified->[lookup,normalize_type_alias],check_and_set_up_type_alias->[analyze_alias,add_type_alias_deps,alias_fallback],is_valid_del_target->[is_valid_del_target],visit_if_stmt->[visit_block_maybe,visit_block],visit_import_from->[add_submodules_to_parent_modules],analyze_typeddict_classdef->[is_typeddict],visit__promote_expr->[anal_type],is_module_scope->[is_func_scope,is_class_scope],analyze_lvalue->[analyze_lvalue],check_classvar_in_signature->[check_classvar_in_signature]],calculate_class_mro->[fail],replace_implicit_first_type->[replace_implicit_first_type],mark_block_mypy_only->[accept],mark_block_unreachable->[accept]]
Analyzes a class definition. Analyzes the typeinfo of the class.
Style nit: I'd prefer two nested with statements, as otherwise the second context manager is easy to miss.
@@ -236,6 +236,8 @@ type RuntimeConfig struct { EventsLogger string `toml:"events_logger"` // EventsLogFilePath is where the events log is stored. EventsLogFilePath string `toml:-"events_logfile_path"` + //DetachKeys is the sequence of keys used to detach a container + DetachKeys string `toml:"detach_keys"` } // runtimeConfiguredFrom is a struct used during early runtime init to help
[Shutdown->[ID,Wrapf,Unlock,AllContainers,Shutdown,Close,Lock,StopWithTimeout,Errorf],GetConfig->[RUnlock,Wrapf,RLock],Info->[GetBlockedRegistries,Wrapf,GetInsecureRegistries,storeInfo,GetRegistries,hostInfo],refresh->[ID,Wrapf,newSystemEvent,AllContainers,Close,Errorf,AllPods,OpenFile,refresh,Refresh,Debugf],generateName->[LookupContainer,Cause,LookupPod,GetRandomName],OpenSHMLockManager,GetBackend,Dir,IsRootless,Unlock,newEventer,Warningf,Warnf,Close,Setenv,GetDBConfig,Mkdir,Encode,HasPrefix,GetRootlessUID,Exit,WriteStorageConfigFile,Locked,IsNotExist,NewSHMLockManager,refresh,Stat,ReadFile,NewEncoder,Cause,New,GetLockfile,GetRootlessRuntimeDir,BecomeRootInUserNS,SetNamespace,Lock,Errorf,Debugf,Debug,Wrapf,Join,Current,Geteuid,GetStore,GetRootlessPauseProcessPidPath,Remove,Shutdown,NewImageRuntimeFromStore,Base,MkdirAll,DefaultStoreOptions,renumberLocks,IsDir,Sprintf,Decode,ValidateDBConfig,SetStore,Chmod,DefaultConfigFile,InitCNI,String,migrate,OpenFile,Getenv,IsExist]
InfraImage is the name of the image that is used to start up a pod inf RuntimeConfig returns the runtime configuration for the container.
Completely unrelated to this PR, but what is this `-` doing in the TOML string... @baude you added this, right?
@@ -48,6 +48,7 @@ void AddAMGCLSolverToPython(pybind11::module& m) enum_<AMGCLSmoother>(m,"AMGCLSmoother") .value("SPAI0", SPAI0) + .value("SPAI1", SPAI1) .value("ILU0", ILU0) .value("DAMPED_JACOBI",DAMPED_JACOBI) .value("GAUSS_SEIDEL",GAUSS_SEIDEL)
[AddAMGCLSolverToPython->[,enum_<AMGCLSmoother>,enum_<AMGCLCoarseningType>,enum_<AMGCLIterativeSolverType>]]
AddAMGCLSolverToPython adds a new AMD solver to the module. missing block of type AMDCoarseningType.
i actually would like to remove this construction mode and only leave the one by parameters... in any case let's remove it at a later time
@@ -180,12 +180,12 @@ int comp_verify_params(struct comp_dev *dev, uint32_t flag, int comp_buffer_connect(struct comp_dev *comp, uint32_t comp_core, struct comp_buffer *buffer, uint32_t buffer_core, uint32_t dir) { + struct comp_dev *cd = buffer_get_comp(buffer, dir); int ret; /* check if it's a connection between cores */ - if (buffer_core != comp_core) { + if (cd && cd->ipc_config.core != comp_core) { dcache_invalidate_region(buffer, sizeof(*buffer)); - buffer->inter_core = true; if (!comp->is_shared) {
[No CFG could be retrieved]
find the buffer that owns the component and set the period frames find the scheduling component by id.
unless one of your other patches / PRs that I haven't got in my local tree yet changed this yet, `dir` in `buffer_get_comp()` and in `pipeline_connect()` / `buffer_set_comp()` have different meanings, which isn't confusing at all of course. The former is one of `PPL_DIR_DOWNSTREAM` / `PPL_DIR_UPSTREAM` while the latter is one of `PPL_CONN_DIR_COMP_TO_BUFFER` / `PPL_CONN_DIR_BUFFER_TO_COMP`. When `comp_buffer_connect()` is called from `copier_params()` one of the latter values is used. When `COMP_TO_BUFFER` (which happens to be 0) is used, it means, that we want to attach the buffer's source to the component (i.e. the meaning of `buffer->source` is the upstream / source component), right? 0 also corresponds to `PPL_DIR_DOWNSTREAM`. `buffer_get_comp(buffer, PPL_DIR_DOWNSTREAM)` returns the component on buffer's sink. So, this should indeed work, but I think it would be better to explicitly convert between the two `dir` value sets, or maybe remove one of them altogether.
@@ -1475,6 +1475,11 @@ namespace System.Net.Http.Functional.Tests { await server.AcceptConnectionAsync(async connection => { + if (connection is Http2LoopbackConnection http2Connection) + { + http2Connection.SetupAutomaticPingResponse(); // Handle RTT PING + } + // Send unexpected 1xx responses. HttpRequestData requestData = await connection.ReadRequestDataAsync(readBody: false); await connection.SendResponseAsync(responseStatusCode, isFinal: false);
[HttpClientHandlerTest->[Properties_Get_CountIsZero->[Equal,Count,Properties,CreateHttpClientHandler,Same],Properties_AddItemToDictionary_ItemPresent->[Equal,TryGetValue,Properties,CreateHttpClientHandler,Add,True],MaxRequestContentBufferSize_SetInvalidValue_ThrowsArgumentOutOfRangeException->[MaxValue,MaxRequestContentBufferSize,CreateHttpClientHandler,Assert],Ctor_ExpectedDefaultPropertyValues_CommonPlatform->[AutomaticDecompression,CookieContainer,UseDefaultCredentials,Count,False,AllowAutoRedirect,Manual,Null,Equal,None,Browser,NotNull,UseProxy,UseCookies,SupportsAutomaticDecompression,MaxAutomaticRedirections,ClientCertificateOptions,Credentials,Proxy,CreateHttpClientHandler,Properties,True],GetAsync_IPBasedUri_Success_MemberData->[Loopback,IPv6Loopback],SecureAndNonSecure_IPBasedUri_MemberData->[IsNotBrowser,Loopback,IPv6Loopback],SendRequestAndGetRequestVersionAsync->[CreateHttpClient,OK,StatusCode,WhenAllCompletedOrAnyFailed,Equal,Version,Contains,SendAsync,AcceptConnectionSendResponseAndCloseAsync,Get,CreateServerAsync,True],Ctor_ExpectedDefaultPropertyValues->[MaxResponseHeadersLength,CheckCertificateRevocationList,Equal,MaxRequestContentBufferSize,None,Browser,False,SupportsProxy,SupportsRedirectConfiguration,CreateHttpClientHandler,SslProtocols,PreAuthenticate,True],MaxAutomaticRedirections_InvalidValue_Throws->[MaxAutomaticRedirections,Browser,CreateHttpClientHandler,Assert],Task->[StatusCode,Connection,InnerException,Host,Unauthorized,ContentType,PathAndQuery,ReadRequestHeaderAndSendResponseAsync,InfiniteTimeSpan,Post,PostAsync,CreateClientAndServerAsync,Array,AcceptConnectionSendCustomResponseAndCloseAsync,nameof,IsNotBrowser,Timeout,ReadByte,Browser,ContentLocation,Server,OrdinalIgnoreCase,Task,SendResponseBodyAsync,SwitchingProtocols,Begin,MaxForwards,WriteLine,ProxyAuthenticate,RunContinuationsAsynchronously,ResponseHeadersRead,CreateHttpClientHandler,GetSingleHeaderValue,IsNotBrowserDomSupported,Value,Version11,WriteByte,Now,False,BeginWrite,Add,Range,EnsureSuccessStatusCode,Relative,ReadAsync,Delay,CorsHeaders,ContentMD5,Null,GetValueOrDefault,CharSet,AcceptConnectionSendResponseAndCloseAsync,None,Position,ContentLength,ProxyAuthorization,FromSeconds,ToString,Body,Unit,GetAsync,Write,ReadRequestHeaderAndSendCustomResponseAsync,AcceptConnectionAsync,CopyTo,SendRequestAndGetRequestVersionAsync,Tag,Headers,CacheControl,Pragma,Length,IfUnmodifiedSince,Seek,CanWrite,UtcNow,IfModifiedSince,WwwAuthenticate,ExpectContinue,IsCancellationRequested,Count,SendAsync,ContentEncoding,DispositionType,CopyToAsync,Warning,TransferEncodingChunked,ReadAsStreamAsync,SetResult,Assert,SetLength,Address,GetBytes,Same,ReasonPhrase,FromMinutes,Equal,Authorization,Via,Dispose,FromAsync,DoesNotContain,AcceptRanges,ReadAsStringAsync,ReadRequestBodyAsync,Scheme,Get,BeginRead,ToArray,ComputeHash,HandleCORSPreFlight,Trailer,WriteAsync,OK,GetStringAsync,GetHeaderValueCount,WhenAllCompletedOrAnyFailed,ContentLanguage,Upgrade,HandleRequestAsync,FileName,Parse,Vary,Cancel,ServerCertificateCustomValidationCallback,True,GetValues,Path,Port,GetIPv6LinkLocalAddress,EndRead,Allow,ReadRequestDataAsync,Referrer,IfRange,GetCookieHeader,Empty,GetByteArrayAsync,Location,CanRead,CreateHttpClient,MediaType,SendResponseAsync,Continue,MethodNotAllowed,Contains,IsNullOrEmpty,WriteStringAsync,Date,CanSeek,Read,AllowAllCertificates,Credentials,Version,CreateRequest,GetString,Proxy,WaitAsync,Content,FromBase64String,CreateServerAsync],CookieContainer_SetNull_ThrowsArgumentNullException->[CreateHttpClientHandler,CookieContainer,Assert],Credentials_SetGet_Roundtrips->[Credentials,Browser,Null,CreateHttpClientHandler,DefaultCredentials,Same]]]
Send an unexpected 1xx response.
We shouldn't need to do this for every test that uses LoopbackServerFactory. It should be enabled by default or something.
@@ -346,7 +346,10 @@ public class ServerPluginRepository implements PluginRepository, Startable { * @return the list of plugins to be uninstalled as {@link PluginInfo} instances */ public Collection<PluginInfo> getUninstalledPlugins() { - return newArrayList(transform(listJarFiles(uninstalledPluginsDir()), jarToPluginInfo())); + return listJarFiles(uninstalledPluginsDir()) + .stream() + .map(PluginInfo::create) + .collect(Collectors.toList()); } public void cancelUninstalls() {
[ServerPluginRepository->[appendDependentPluginKeys->[appendDependentPluginKeys]]]
Cancel uninstalls.
same suggestion to use MoreCollectors here
@@ -0,0 +1,14 @@ +import { render } from "@wordpress/element"; +import AddonInstallationSuccessful from "./components/AddonInstallationSuccessful"; + +const elementToInsert = document.createElement( "div" ); +elementToInsert.setAttribute( "id", "wpseo-app-element-2" ); + +// Insert under the first heading on the page. +const elementToAppend = document.getElementsByClassName( "yoast-heading-highlight" )[ 0 ].parentElement; +elementToAppend.append( elementToInsert ); + +render( + <AddonInstallationSuccessful />, + elementToInsert +);
[No CFG could be retrieved]
No Summary Found.
Have you considered adding an ID to the heading we want to attach this to? Would make changes to the layout of the page in the future a bit more easy.
@@ -41,8 +41,7 @@ public final class SparkRunnerRegistrar { public static class Runner implements PipelineRunnerRegistrar { @Override public Iterable<Class<? extends PipelineRunner<?>>> getPipelineRunners() { - return ImmutableList.of( - SparkRunner.class, TestSparkRunner.class, SparkStructuredStreamingRunner.class); + return ImmutableList.of(SparkRunner.class, TestSparkRunner.class); } }
[SparkRunnerRegistrar->[Runner->[getPipelineRunners->[of]],Options->[getPipelineOptions->[of]]]]
Returns an iterable of PipelineRunners that are not yet in the pipeline runners.
Is it a breaking change? If yes then it would make sense to add a note about that into `CHANGES`
@@ -51,7 +51,7 @@ class Lmod(AutotoolsPackage): def setup_environment(self, spack_env, run_env): stage_lua_path = join_path( - self.stage.path, 'Lmod-{version}', 'src', '?.lua') + self.stage.source_path, 'Lmod-{version}', 'src', '?.lua') spack_env.append_path('LUA_PATH', stage_lua_path.format( version=self.version), separator=';')
[Lmod->[setup_environment->[join_path,append_path,format],patch->[filter_file,Version,glob],depends_on,version,patch]]
Add the environment variables for the Nexus Nexus environment.
This one should be `self.stage.source_path, 'src', '?.lua')`, as `Lmod-<version>` is now just `src`
@@ -1208,12 +1208,15 @@ abstract class CommonObject { // phpcs:enable $temp = array(); + $listId = null; $typeContact = $this->liste_type_contact($source, '', 0, 0, $code); - foreach ($typeContact as $key => $value) { - array_push($temp, $key); + if (! empty($typeContact)) { + foreach ($typeContact as $key => $value) { + array_push($temp, $key); + } + $listId = implode(",", $temp); } - $listId = implode(",", $temp); $sql = "DELETE FROM ".MAIN_DB_PREFIX."element_contact"; $sql .= " WHERE element_id = ".$this->id;
[CommonObject->[updateExtraField->[insertExtraFields,call_trigger],setSaveQuery->[isArray,isDuration,isDate,isInt,isFloat],fetchLinesCommon->[getFieldList,setVarsFromFetchObj],getBannerAddress->[getFullAddress,getFullName],line_ajaxorder->[updateRangOfLine],copy_linked_contact->[add_contact],update_note_public->[update_note],insertExtraFields->[call_trigger],fetchCommon->[getFieldList,fetch_optionals,setVarsFromFetchObj,quote],deleteLineCommon->[call_trigger,deleteExtraFields],getListContactId->[liste_contact],insertExtraLanguages->[call_trigger],printOriginLine->[fetch_product],showInputField->[showInputField],line_up->[line_order],getChildrenOfLine->[getChildrenOfLine],setStatusCommon->[call_trigger],line_max->[getRangOfLine],deleteCommon->[isObjectUsed,call_trigger,deleteExtraFields],showOptionals->[showInputField,showOutputField],createCommon->[insertExtraFields,call_trigger,setSaveQuery,quote],swapContactStatus->[update_contact],updateCommon->[insertExtraFields,call_trigger,setSaveQuery,quote],setVarsFromFetchObj->[isArray,isDate,isInt,isForcedToNullIfZero,isFloat],line_down->[line_order]]]
Deletes all linked contacts of the element.
Something looks strange to me in this method. If we don't find any type of contact, typeContact will be empty. It means we will delete all links later with the delete ? It seems it was already the case before. Don't you think we should include the delete inside the if ($listId)
@@ -44,6 +44,13 @@ class Postgres extends Connector { $connection->prepare("SET NAMES '{$config['charset']}'")->execute(); } + // If a schema has been specified, we'll execute a query against + // the database to set the search path. + if (isset($config['schema'])) + { + $connection->prepare("SET search_path TO '{$config['schema']}'")->execute(); + } + return $connection; }
[Postgres->[connect->[execute,options]]]
Connect to the database and return a PDO object.
Thanks @racklin for this, this addition was very useful :-) One thing that I noticed was that it trips up when you are trying to select multiple postgres schemas, since the single quote wrapping the desired schema tells pgsql to treat it as one. For the case of multiple schemas, it may be better to make $config['scema'] an array in the config file, unless you see another way of doing it?
@@ -160,6 +160,7 @@ public class GroupByRowProcessor aggregatorFactories ); final Grouper<RowBasedKey> grouper = pair.lhs; + // grouper.init(); final Accumulator<Grouper<RowBasedKey>, Row> accumulator = pair.rhs; closeOnExit.add(grouper);
[GroupByRowProcessor->[process->[cleanup->[close],make->[close->[close],get->[get],close]]]]
Process a sequence of rows. Returns an iterator which iterates all the elements in the sequence.
Please remove this.
@@ -227,6 +227,10 @@ public class FlowComputation { boolean endOfPath = visitedAllParents(edge) || shouldTerminate(learnedConstraints); + if (endOfPath) { + flowBuilder.addAll(flowForNullableMethodParameters(edge.parent)); + } + List<JavaFileScannerContext.Location> currentFlow = flowBuilder.build(); Set<List<JavaFileScannerContext.Location>> yieldsFlows = flowFromYields(edge); return yieldsFlows.stream()
[FlowComputation->[flowsForArgumentsChangingName->[equals],ExecutionPath->[addEdge->[ExecutionPath],equals->[equals],isConstraintOnlyPossibleResult->[equals],learnedConstraints->[learnedConstraints],newTrackedSymbols->[learnedAssociation]],flow->[FlowComputation,flow],computedFrom->[computedFrom]]]
Adds an edge to the graph.
I think this should be done outside of the path exploration as a separate step in `FlowComputation.run` method, because this is not dependent on the specific path and should be added to all flows.
@@ -85,7 +85,9 @@ Java_io_daos_obj_DaosObjClient_closeObject(JNIEnv *env, jclass clientClass, if (rc) { char *msg = "Failed to close DAOS object"; - throw_exception_const_msg_object(env, msg, rc); + throw_const_obj(env, + msg, + rc); } }
[No CFG could be retrieved]
Java object functions private void jni_io_daos_obj_DaosObjClient_.
(style) code indent should use tabs where possible
@@ -5,8 +5,15 @@ type TemplateConfig struct { Name string `config:"name"` Fields string `config:"fields"` Overwrite bool `config:"overwrite"` - OutputToFile string `config:"output_to_file"` Settings templateSettings `config:"settings"` + OutputToFile OutputToFile `config:"output_to_file"` +} + +// OutputToFile contains the configuration options for generating +// and writing the template into a file. +type OutputToFile struct { + Path string `config:"path"` + Version string `config:"version"` } type templateSettings struct {
[No CFG could be retrieved]
template type is a constructor for the template.
Not too much of a fan of the config name, but well :-)
@@ -26,16 +26,6 @@ import io.netty.handler.codec.compression.ZlibWrapper; * handler modifies the message, please refer to {@link HttpContentDecoder}. */ public class HttpContentDecompressor extends HttpContentDecoder { - - /** - * {@code "x-deflate"} - */ - private static final AsciiString X_DEFLATE = new AsciiString("x-deflate"); - /** - * {@code "x-gzip"} - */ - private static final AsciiString X_GZIP = new AsciiString("x-gzip"); - private final boolean strict; /**
[HttpContentDecompressor->[newContentDecoder->[equalsIgnoreCase,EmbeddedChannel,newZlibDecoder],AsciiString]]
Creates a new HttpContentDecompressor that decompresses a single HTTP message and a Creates a decoder for the given content encoding.
@trustin - I think these got moved during the header back port (and then forward port). I think it is better to keep a common definition in the HttpHeaderValue class rather than an independent definition in http/2 and http codec (and potentially spdy). If you agree I will back port the portion related to this change after this PR is resolved.
@@ -518,6 +518,16 @@ dss_srv_handler(void *arg) * temporary, Let's keep progressing for now. */ } + + daos_gettime_coarse(&now); + if (dmi->dmi_last_crt_progress_time == 0) { + dmi->dmi_last_crt_progress_time = now; + } else if (dmi->dmi_last_crt_progress_time + + PROGRESS_MESG_INTV < now) { + D_DEBUG(DB_MD, "%d progress on "DF_U64"\n", + dmi->dmi_xs_id, now); + dmi->dmi_last_crt_progress_time = now; + } } if (dss_xstream_exiting(dx)) {
[No CFG could be retrieved]
create GC ULT function to handle the failure of a context.
(style) Comparisons should place the constant on the right side of the test
@@ -125,9 +125,10 @@ class NativeExternalLibraryFetch(Task): @memoized_property def _conan_binary(self): - return Conan.scoped_instance(self).bootstrap( - self._conan_python_interpreter, - self._conan_pex_path) + # Note: For historical reasons, this file manipulates and executes pex commandlines directly, + # instead of calling pex.run() (ideally in a workunit, via PythonToolInstance.run()). + # TODO: Switch to calling conan in a workunit. + return self.context.products.get_data(ConanPrep.tool_instance_cls).pex def execute(self): native_lib_tgts = self.context.targets(self.native_library_constraint.satisfied_by)
[NativeExternalLibraryFetch->[_fetch_packages->[ensure_conan_remote_configuration,ConanRequirement,_copy_package_contents_from_conan_dir,parse_conan_stdout_for_pkg_sha,NativeExternalLibraryFetchError],_copy_package_contents_from_conan_dir->[_get_conan_data_dir_path_for_package],ensure_conan_remote_configuration->[_add_pants_conan_remote_cmdline,_remove_conan_center_remote_cmdline],_collect_external_libs->[_parse_lib_name_from_library_filename,NativeExternalLibraryFiles]]]
A method to create a Conan binary.
It might be that we can convert the whole native backend to v2 and do this at the same time.
@@ -55,5 +55,7 @@ namespace NServiceBus RootContext context; MessageOperations messageOperations; + + internal const string SubscribeAllFlagKey = "NServiceBus.SubscribeAllFlag"; } } \ No newline at end of file
[MessageSession->[Task->[nameof,Unsubscribe,AgainstNull,Publish,Send,Subscribe],context]]
The root context.
Can someone implementing a pipeline behavior need this? Should this be public or even a property?
@@ -254,9 +254,9 @@ namespace DotNetNuke.Services.GeneratedImage cachePolicy.SetExpires(DateTime_Now + ClientCacheExpiration); cachePolicy.SetETag(cacheId); } - + // Handle Server cache - if (EnableServerCache) + if (EnableServerCache && !hasprofileChanged) { if (ImageStore.TryTransmitIfContains(cacheId, context.Response)) {
[ImageHandlerInternal->[HandleImageRequest->[GetImageMimeType],RenderImage->[GetImageMimeType]]]
Handles image request. This function is the main entry point for the DNNImageHandler. It generates the image This function is called from the CacheHandler to try to transmit the image if it is contained.
This will avoid the cache not clear the cache
@@ -91,4 +91,10 @@ public interface CommandQueue extends Closeable { */ @Override void close(); + + void setOffsetValue(int offsetValue); + + void setSnapshot(); + + SnapshotWithOffset getSnapshotWithOffset(); }
[No CFG could be retrieved]
Close the sequence of tokens.
Combine these into a common call `setSnapshotWithOffset` - we need to update them together atomically.
@@ -93,6 +93,11 @@ public final class KafkaProducerInstrumentation extends Instrumenter.Default { callback = new ProducerCallback(callback, span); + boolean isTombstone = record.value() == null && !record.headers().iterator().hasNext(); + if (isTombstone) { + span.setAttribute("tombstone", true); + } + // Do not inject headers for batch versions below 2 // This is how similar check is being done in Kafka client itself: // https://github.com/apache/kafka/blob/05fcfde8f69b0349216553f711fdfc3f0259c601/clients/src/main/java/org/apache/kafka/common/record/MemoryRecordsBuilder.java#L411-L412
[KafkaProducerInstrumentation->[ProducerCallback->[onCompletion->[onCompletion]]]]
On method enter. Returns a sequence of characters that are not allowed to be included in the span.
This attribute is certainly not from semantic convention. Why should we want this into Otel?
@@ -208,6 +208,12 @@ public class MoveDelegate extends AbstractMoveDelegate { // while loading. if (GameStepPropertiesHelper.isResetUnitStateAtEnd(data)) { resetUnitStateAndDelegateState(); + } else { + + // Only air units can move during both CM and NCM in the same turn so moved units are set to no moves left + final List<Unit> alreadyMovedUnits = + Matches.getMatches(data.getUnits().getUnits(), Match.allOf(Matches.unitHasMoved(), Matches.unitIsNotAir())); + m_bridge.addChange(ChangeFactory.markNoMovementChange(alreadyMovedUnits)); } m_needToInitialize = true; m_needToDoRockets = true;
[MoveDelegate->[loadState->[loadState],saveState->[saveState],end->[end],start->[start],removeAirThatCantLand->[removeAirThatCantLand],setDelegateBridgeAndPlayer->[setDelegateBridgeAndPlayer]]]
end of the sequence.
Nit: For readability, consider renaming this variable `alreadyMovedNonAirUnits`.
@@ -133,9 +133,9 @@ const fixedTimestamp = model.Time(1557654321000) func TestChunkDecodeBackwardsCompatibility(t *testing.T) { // Chunk encoded using code at commit b1777a50ab19 - rawData := []byte("\x00\x00\x00\xb7\xff\x06\x00\x00sNaPpY\x01\xa5\x00\x00\x04\xc7a\xba{\"fingerprint\":18245339272195143978,\"userID\":\"userID\",\"from\":1557650721,\"through\":1557654321,\"metric\":{\"bar\":\"baz\",\"toms\":\"code\",\"__name__\":\"foo\"},\"encoding\":3}\n\x00\x00\x00\x15\x01\x00\x11\x00\x00\x01\xd0\xdd\xf5\xb6\xd5Z\x00\x00\x00\x00\x00\x00\x00\x00\x00") + rawData := []byte("\x00\x00\x00\xb7\xff\x06\x00\x00sNaPpY\x01\xa5\x00\x00\x04\xc7a\xba{\"fingerprint\":18245339272195143978,\"userID\":\"userID\",\"from\":1557650721,\"through\":1557654321,\"metric\":{\"bar\":\"baz\",\"toms\":\"code\",\"__name__\":\"foo\"},\"encoding\":3}\n\x00\x00\x00\x15\x01\x00\x11\x00\x00\x01У\xbe\xb3\xd5Z\x00\x00\x00\x00\x00\x00\x00\x00\x00") decodeContext := NewDecodeContext() - have, err := ParseExternalKey(userID, "userID/fd3477666dacf92a:16aab37c8e8:16aab6eb768:38eb373c") + have, err := ParseExternalKey(userID, "userID/fd3477666dacf92a:16aab37c8e8:16aab6eb768:ff216d5b") require.NoError(t, err) require.NoError(t, have.Decode(decodeContext, rawData)) want := dummyChunkForEncoding(fixedTimestamp, labelsForDummyChunks, encoding.Bigchunk, 1)
[f,Now,Duration,Encode,LabelsToMetric,Add,StopTimer,Cause,ExternalKey,Time,MergeSampleSets,Equal,NewForEncoding,Sort,NoError,Encoded,Samples,Fingerprint,Sprintf,StartTimer,Decode,Background,Run,ResetTimer]
TestChunkDecodeBackwardsCompatibility tests that the user - provided user - provided chunk has a TestParseExternalKey tests that the passed in external key is a valid Bigchunk.
Could you explain why this has changed? Given this is a backward compatibility test, we shouldn't touch it.
@@ -371,6 +371,12 @@ GenericAgentConfig *CheckOpts(int argc, char **argv) } break; + case 'T': + GenericAgentConfigSetInputFile(config, optarg, "promises.cf"); + MINUSF = true; + config->tag_release_dir = xstrdup(optarg); + break; + default: { Writer *w = FileWriter(stdout);
[main->[GenericAgentConfigApply,EvalContextNew,GenericAgentLoadPolicy,PolicyToString,PolicyDestroy,PolicyToJson,EvalContextDestroy,WriterClose,GenericAgentDiscoverContext,ParserParseFile,GenericAgentConfigDestroy,ShowPromises,ShowContextsFormatted,ShowVariablesFormatted,Log,JsonWrite,CheckOpts,FileWriter,exit,JsonDestroy],CheckOpts->[GetInputDir,GenericAgentWriteHelp,getopt_long,RlistDestroy,FileWriterDetach,LogSetGlobalLevel,GenericAgentWriteVersion,GenericAgentConfigSetInputFile,RlistFromSplitString,time,SyntaxToJson,StringSetFromString,strcmp,Log,GenericAgentConfigParseArguments,ManPageWrite,GenericAgentConfigParseWarningOptions,JsonWrite,GenericAgentConfigSetBundleSequence,GenericAgentConfigParseColor,GenericAgentConfigNewDefault,FileWriter,exit,JsonDestroy],void->[SeqSort,EvalContextVariableTags,printf,ClassTableIteratorNext,RvalWrite,StringSetToBuffer,ClassTableIteratorDestroy,EvalContextVariableTableIteratorNew,WriterClose,StringWriter,StringIsPrintable,SeqDestroy,SeqAt,xasprintf,VariableTableIteratorNext,SeqAppend,VarRefToString,EvalContextClassTableIteratorNewGlobal,VariableTableIteratorDestroy,SeqNew,EvalContextClassTags,free,BufferData,SeqLength,BufferDestroy,StringWriterData,ClassRefToString]]
Check - options and - options for the agent - specific - common. Optionally set config - agent - specific. common. policy_output_format - either - - - - - - - - - - - - - - - - - -.
MINUSF = true here worries me. Is it really necessary?
@@ -247,7 +247,7 @@ def test_scrape(scraper): """The scraper will loop through sources until complete.""" scraper.add_source('fake', 'loop', length=2, depth=2) sources = scraper.scrape() - assert sources.keys() == ['fake:loop', 'fake:loop2', 'fake:loop21'] + assert set(sources.keys()) == {'fake:loop', 'fake:loop2', 'fake:loop21'} def test_scrape_error(scraper):
[test_request->[request,Mock,assert_called_once_with,Requester],scraper->[Scraper],FakeSource->[gather->[append]],test_warn_percent_in_param->[assert_called_once_with,add_source,scrape],test_add_existing_source->[add_source],mock_logger->[patch],test_add_new_source->[add_source,isinstance],test_timeout_failure->[call,Requester,request,raises,range,Mock],test_scrape_error->[add_source,scrape],test_request_429_is_retried->[call,assert_called_once_with,Requester,request,Mock],test_connectionerror_success->[call,ConnectionError,Requester,request,Mock],test_request_no_raise->[request,Mock,assert_called_once_with,Requester],test_session->[isinstance,Requester],test_request_504_is_retried->[call,assert_called_once_with,Requester,request,Mock],test_warn_dependency_block->[assert_called_once_with,add_source,scrape],test_timeout_success->[call,Requester,Timeout,request,Mock],test_scrape_none->[scrape],test_scrape->[add_source,keys,scrape],list,fixture,yield_fixture,patch,parametrize,values]
Scrapes a scraper and checks that it s complete.
interesting way to work around iterator ``keys()`` an avoid assumed ordering
@@ -191,11 +191,11 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A { /** @private {?Element} */ this.ampAnalyticsElement_ = null; - /** @type {?Object<string,*>}*/ + /** @type {?JsonObject|Object} */ this.jsonTargeting = null; - /** @type {number} */ - this.adKey = 0; + /** @type {string} */ + this.adKey = '0'; /** @type {!Array<string>} */ this.experimentIds = [];
[AmpAdNetworkDoubleclickImpl->[postTroubleshootMessage->[dict,stringify,now,devAssert,userAgent],extractSize->[height,extractAmpAnalyticsConfig,dev,get,width],getBlockParameters_->[width,height,getContainerWidth,isInManualExperiment,serializeTargeting,assign,devAssert,googleBlockParameters,Number],constructor->[user,extensionsFor],tearDownSlot->[removeElement],shouldPreferentialRenderWithoutCrypto->[devAssert,isCdnProxy],getPageParameters->[getPageviewStateTokensForAdRequest,length,INSUFFICIENT,UNKNOWN],rewriteRtcKeys_->[keys],onCreativeRender->[customElementExtensions,then,height,dev,user,addCsiSignalsToAmpAnalyticsConfig,getRefreshManager,installAnchorClickInterceptor,insertAnalyticsElement,getEnclosingContainerTypes,devAssert,isReportingEnabled,setStyles,width],getCustomRealTimeConfigMacros_->[parseInt,getOrCreateAdCid,documentInfoForDoc,dev,stringify,tryParseJson,toLowerCase],warnOnError->[dev],generateAdKey_->[getAttribute,domFingerprintPlain,stringHash32],buildCallback->[getIdentityToken,indexOf,getMode,viewerForDoc,SRA,SRA_NO_RECOVER],populateAdUrlState->[Number,tryParseJson,join,getMultiSizeDimensions,length,map],getSlotSize->[Number],maybeValidateAmpCreative->[resolve,get,utf8Decode,stringHash32],sendXhrRequest->[dev,checkStillCurrent,dict,createElementWithAttributes,encodeURIComponent,isExperimentOn],maybeDeprecationWarn_->[user,warnDeprecation,tryParseJson],randomlySelectUnsetExperiments_->[randomlySelectUnsetExperiments],getLocationQueryParameterValue->[parseQueryString],fireDelayedImpressions->[split,dev,dict,urlForDoc,createElementWithAttributes],extractUrlExperimentId_->[extractUrlExperimentId],getA4aAnalyticsConfig->[getCsiAmpAnalyticsConfig],renderNonAmpCreative->[waitFor3pThrottle,is3pThrottled,incrementLoadingAds],isLayoutSupported->[FLUID,isLayoutSizeDefined],getAdUrl->[resolve,timerFor,all,googleAdUrl,dev,user,checkStillCurrent,now,assign,UNKNOWN],groupSlotsForSra->[groupAmpAdsByType],onNetworkFailure->[dev,maybeAppendErrorParameter],expandFluidCreative_->[dev,reject,resolve],getA4aAnalyticsVars->[getCsiAmpAnalyticsVariables],mergeRtcResponses_->[error,keys,callout,deepMerge,response,join,forEach,rtcTime,push],getAdditionalContextMetadata->[devAssert],setPageLevelExperiments->[SRA_NO_RECOVER,branch,isCdnProxy,keys,SRA_CONTROL,experiment,control,values,EXPERIMENT,SRA,isExperimentOn],getIdleRenderEnabled_->[isNaN,parseInt],initiateSraRequests->[all,dev,sraBlockCallbackHandler,lineDelimitedStreamer,attemptCollapse,devAssert,SRA_NO_RECOVER,map,metaJsonCreativeGrouper,hasAdPromise,resetAdUrl,sraDeferred,element,length,push,isCancellation,keys,xhrFor,checkStillCurrent,assignAdUrlToError,constructSRARequest_,forEach],getNonAmpCreativeRenderingMethod->[SAFEFRAME],getReferrer_->[viewerForDoc,isNaN,timerFor,parseInt]],getAttribute,all,extension,truncAndTimeUrl,dev,googlePageParameters,constructSRABlockParameters,getAdUrlDeferred,registerElement,now,assign,devAssert,length,includes,push,map]
Initializes a new missing - value object. Private methods for handling a single unknown node.
@aghassemi @jridgewell Is this change from `number` to `string` okay?
@@ -1071,7 +1071,8 @@ export class AmpForm { .then(rendered => { rendered.id = messageId; rendered.setAttribute('i-amphtml-rendered', ''); - return this.resources_.mutateElement(devAssert(container), + return this.resources_.mutateElement( + dev().assertElement(devAssert(container)), () => { container.appendChild(rendered); const renderedEvent = createCustomEvent(
[No CFG could be retrieved]
Provides a function to handle the creation of a new object of type eventType. onCreate - > onCreate - > onUpdate - > onHide - > onHide.
nested devAssert could go away
@@ -40,6 +40,8 @@ class Project < ApplicationRecord where("r1.project_id = :id OR r2.project_id = :id", id: project.id) } + has_one :key_set, class_name: 'Dataset::KeySet', as: :resource + validates :title, :owner, presence: true def info_request?(info_request)
[Project->[member?->[include?],info_request?->[include?],project_contributor_role,validates,has_one,where,project_owner_role,has_many,lambda,id]]
Checks if the given info request is a known info request.
For now just a has one association but can be changed to has many in the future when needed.
@@ -731,6 +731,11 @@ void ChatBackend::clearRecentChat() m_recent_buffer.clear(); } + +void ChatBackend::applySettings() { + m_recent_buffer.resize(g_settings->getU32("recent_chat_size")); +} + void ChatBackend::step(float dtime) { m_recent_buffer.step(dtime);
[historyPrev->[replace],step->[deleteByAge,step],formatChatLine->[clear],historyNext->[replace],scrollPageDown->[getRows,scroll],getRecentChat->[getLineCount],deleteByAge->[deleteOldest],nickCompletion->[replace],scrollPageUp->[getRows,scroll],clear->[clear],addMessage->[addLine],ChatLine->[getLineCount],addUnparsedMessage->[addMessage],clearRecentChat->[clear],reformat->[reformat,clear],scroll->[scroll]]
clear recent chat buffer.
brace on wrong line
@@ -46,13 +46,11 @@ public class HoodieFileReaderFactory { throw new UnsupportedOperationException(extension + " format not supported yet."); } - private static <T extends HoodieRecordPayload, R extends IndexedRecord> HoodieFileReader<R> newParquetFileReader( - Configuration conf, Path path) throws IOException { + private static <R extends IndexedRecord> HoodieFileReader<R> newParquetFileReader(Configuration conf, Path path) { return new HoodieParquetReader<>(conf, path); } - private static <T extends HoodieRecordPayload, R extends IndexedRecord> HoodieFileReader<R> newHFileFileReader( - Configuration conf, Path path) throws IOException { + private static <R extends IndexedRecord> HoodieFileReader<R> newHFileFileReader(Configuration conf, Path path) throws IOException { CacheConfig cacheConfig = new CacheConfig(conf); return new HoodieHFileReader<>(conf, path, cacheConfig); }
[HoodieFileReaderFactory->[getFileReader->[equals,getFileExtension,newHFileFileReader,newParquetFileReader,toString,UnsupportedOperationException],newHFileFileReader->[CacheConfig]]]
Returns a file reader that reads the next record in the file system based on the given configuration.
this method never throws IOException. Can you remove that as well?
@@ -165,8 +165,7 @@ Epetra_Map * convert_lightweightmap_to_map(const EpetraExt::LightweightMap & A, Epetra_CrsMatrix* convert_lightweightcrsmatrix_to_crsmatrix(const EpetraExt::LightweightCrsMatrix & A) { - RCP<TimeMonitor> tm; - tm = rcp(new TimeMonitor(*TimeMonitor::getNewTimer("OptimizedTransfer: Convert: MapConstructor"))); + TimeMonitor tm(*TimeMonitor::getNewTimer("OptimizedTransfer: Convert: MapConstructor")); const Epetra_Comm & Comm = A.DomainMap_.Comm(); // Build Maps
[main_->[TestTransfer],TestTransfer->[epetra_check_importer_correctness,convert_lightweightcrsmatrix_to_crsmatrix],convert_lightweightcrsmatrix_to_crsmatrix->[convert_lightweightmap_to_map,build_remote_pids]]
Convert a lightweight CRS matrix into a CRS matrix. Get a specific node in the domain map that is not part of the Export.
There are huge whitespace changes. It looks to me like your editor inserted tabs, rather than spaces. Could you please fix this.
@@ -2079,8 +2079,8 @@ class DFRN return false; } - $fields = ['title' => $item["title"], 'body' => $item["body"], - 'tag' => $item["tag"], 'changed' => DateTimeFormat::utcNow(), + $fields = ['title' => defaults($item["title"], ''), 'body' => defaults($item["body"], ''), + 'tag' => defaults($item["tag"], ''), 'changed' => DateTimeFormat::utcNow(), 'edited' => DateTimeFormat::utc($item["edited"])]; $condition = ["`uri` = ? AND `uid` IN (0, ?)", $item["uri"], $importer["importer_uid"]];
[DFRN->[mail->[appendChild,saveXML,createElement],itemFeed->[setAttribute,createElementNS,saveXML,appendChild],relocate->[appendChild,saveXML,createElement],fsuggest->[appendChild,saveXML,createElement],fetchauthor->[item,query,evaluate],processRelocation->[item],import->[item,registerNamespace,query,loadXML],processSuggestion->[item],doPoke->[attributes],transformActivity->[query,saveXML,appendChild,importNode,item,createElementNS],deliver->[get_curl_code,get_curl_headers],createActivity->[createElement,attributes],addHeader->[setAttribute,createElementNS,appendChild],feed->[saveXML,appendChild],processMail->[item],entries->[saveXML,appendChild],addAuthor->[appendChild,createElement],processEntry->[get_baseurl,query,set,item,purify],entry->[appendChild,createElementNS,setAttribute,createElement],addEntryAuthor->[createElement]]]
Update the content of an item in the current item.
The `defaults()` syntax for array usually is `defaults($item, 'title', '')`, unless you are sure the keys exists and you can use the shorter ternary operator form `$item['title'] ? : ''`.
@@ -56,4 +56,15 @@ public interface DimFilter * @return a Filter that implements this DimFilter, or null if this DimFilter is a no-op. */ public Filter toFilter(); + + /** + * Returns a RangeSet that represents the possible range of the input dimension for this DimFilter.This is + * applicable to filters that use dimensions such as select, in, bound, and logical filters such as and, or, not. + * Note that + * + * @param dimension name of the dimension to get range for + * @return a RangeSet that represent the possible range of the input dimension, or null if it is not possible to + * determine for this DimFilter. + */ + public RangeSet<String> getDimensionRangeSet (String dimension); }
[No CFG could be retrieved]
Returns the filter object that can be used to filter the query.
Note that ?
@@ -147,14 +147,7 @@ func serve(cmd *cobra.Command, args []string) error { LegacyDataCollectorToken: c.LegacyDataCollectorToken, } - // TODO (tc): We are dialing twice now. We should move all the client dials out here. - authzConn, err := factory.Dial("authz-service", c.AuthzAddress) - if err != nil { - return errors.Wrapf(err, "dial authz-service (%s)", c.AuthzAddress) - } - authzV2Client := authz_v2.NewAuthorizationClient(authzConn) - - serv, err := server.NewServer(context.Background(), serverConfig, authzV2Client) + serv, err := server.NewServer(context.Background(), serverConfig) if err != nil { return errors.Wrap(err, "failed to initialize server") }
[NewFactory,Close,Wrap,Exit,ParseZapLevel,ParseZapEncoding,Stop,ReadFile,Dial,New,ProjectUpdateBackend,NewManager,Start,NewProductionConfig,Errorf,RegisterTaskExecutors,Wrapf,Fprintln,FixupRelativeTLSPaths,Infof,Sugar,RedirectStdLog,WithVersionInfo,Serve,Build,NewServer,Sync,Background,NewGlobalTracer,Unmarshal,CloseQuietly,Parse,SetLevel,NewAuthorizationClient,ReadCerts]
Initialize a single unique identifier. nanononononononononon is a function that returns a logger that.
why don't we need to initialize the authz client anymore?
@@ -30,9 +30,9 @@ var errExit = fmt.Errorf("exit directly") const newAppLongDesc = ` Create a new application in OpenShift by specifying source code, templates, and/or images. -This command will try to build up the components of an application using images or code -located on your system. It will lookup the images on the local Docker installation (if -available), a Docker registry, or an OpenShift image stream. If you specify a source +This command will try to build up the components of an application using images, templates, +or code located on your system. It will lookup the images on the local Docker installation +(if available), a Docker registry, or an OpenShift image stream. If you specify a source code URL, it will set up a build that takes your source code and converts it into an image that can run inside of a pod. The images will be deployed via a deployment configuration, and a service will be hooked up to the first public port of the app.
[StringVar,StringP,AddObjectLabels,Errors,AddPrinterFlags,Exit,GetFlagString,Ping,VarP,Errorf,CheckErr,Var,Clients,NewHelper,DefaultNamespace,Create,Infof,NewPrintNameOrErrorAfter,V,NewAppConfig,SetOpenShiftClient,SetDockerClient,Out,Object,Fprintf,ParseLabels,AddArguments,Sprintf,UsageError,GetClient,Run,PrintObject,Flags]
Component of the application Create a new application from the remote repository.
You need the Oxford comma (a, b, and c)
@@ -9,6 +9,8 @@ class User < ApplicationRecord before_validation :nillify_empty_email_and_id_number # Group relationships + has_one :grader_permission, dependent: :destroy + after_create :create_grader_permission has_many :memberships, dependent: :delete_all has_many :grade_entry_students has_many :groupings, through: :memberships
[User->[admin?->[class],active_groupings->[where],grouping_for->[assessment_id,find],authenticate->[popen,nil?,new,instance,log,validate_custom_exit_status,join,close,exitstatus,match,puts,validate_file],test_server?->[class],student?->[class],authorize->[first],is_a_reviewer?->[is_peer_review?,is_a?,nil?],upload_user_list->[new,size,transaction,fill,join,ids,nil?,message,import,t,empty?,parse,include?,find_or_create_by,blank?,each,id,user_name,validate!,pluck,raise,find_index,clear],add_user->[attributes,find_or_create_by,zip,save,id],set_api_key->[nil?,new,update,strip,save,api_key],generate_api_key->[hex,to_s,new],strip_name->[email,user_name,last_name,id_number,strip,first_name],nillify_empty_email_and_id_number->[email,id_number,blank?],submission_for->[current_submission_used,nil?,grouping_for],ta?->[class],reset_api_key->[new,update,strip,save,api_key],is_reviewer_for?->[nil?,grouping_for,find,is_a?,where,result_id,id],validates_uniqueness_of,where,validates_format_of,validates_presence_of,has_many,before_validation],require]
This function requires the digest and base64 for the API token to be set. Check if user is authorized to enter MarkUs.
move this, the line below it, and the associated methods into the `ta.rb` model
@@ -78,13 +78,6 @@ const CACHED_FONT_LOAD_TIME_ = 100; export class AmpFont extends AMP.BaseElement { - - /** @override */ - prerenderAllowed() { - return true; - } - - /** @override */ buildCallback() { /** @private @const {string} */
[No CFG could be retrieved]
A class that exports a single with the default values. Starts to download the font.
Where's all the work done? In `buildCallback`?
@@ -164,9 +164,14 @@ class Jetpack_Carousel { return $output; } + function set_in_gallery( $output ) { + $this->in_gallery = true; + return $output; + } + function add_data_to_images( $attr, $attachment = null ) { - if ( $this->first_run ) // not in a gallery + if ( $this->in_gallery ) // not in a gallery return $attr; $attachment_id = intval( $attachment->ID );
[Jetpack_Carousel->[carousel_display_geo_callback->[settings_checkbox],carousel_display_geo_sanitize->[sanitize_1or0_option],carousel_enable_it_callback->[settings_checkbox],carousel_enable_it_sanitize->[sanitize_1or0_option],carousel_display_exif_callback->[settings_checkbox],settings_checkbox->[test_1or0_option],carousel_background_color_callback->[settings_select],enqueue_assets->[asset_version],carousel_display_exif_sanitize->[sanitize_1or0_option]]]
Enqueue the assets needed for the carousel 1 or 0 carousel display options Jetpack comments plugin Renders the Jetpack Carousel comment form. Add data to images This function is used to generate a link to an attachment.
Should this be ! in_gallery?
@@ -101,7 +101,7 @@ namespace GenDefinedCharList runtimeCodeBuilder.AppendLine(Invariant($" /// A <see cref=\"UnicodeRange\"/> corresponding to the '{blockName}' Unicode block (U+{startCode}..U+{endCode}).")); runtimeCodeBuilder.AppendLine(Invariant($" /// </summary>")); runtimeCodeBuilder.AppendLine(Invariant($" /// <remarks>")); - runtimeCodeBuilder.AppendLine(Invariant($" /// See http://www.unicode.org/charts/PDF/U{startCode}.pdf for the full set of characters in this block.")); + runtimeCodeBuilder.AppendLine(Invariant($" /// See https://www.unicode.org/charts/PDF/U{startCode}.pdf for the full set of characters in this block.")); runtimeCodeBuilder.AppendLine(Invariant($" /// </remarks>")); runtimeCodeBuilder.AppendLine(Invariant($" public static UnicodeRange {blockNameAsProperty} => {blockNameAsField} ?? CreateRange(ref {blockNameAsField}, first: '\\u{startCode}', last: '\\u{endCode}');")); runtimeCodeBuilder.AppendLine(Invariant($" private static UnicodeRange? {blockNameAsField};"));
[Program->[WriteCopyrightAndHeader->[AppendLine],RemoveAllNonAlphanumeric->[ToArray],Main->[Match,Value,AppendLine,WithDotNetPropertyCasing,RemoveAllNonAlphanumeric,ReadAllLines,Contains,WriteLine,OrdinalIgnoreCase,WriteAllText,WriteCopyrightAndHeader,Parse,Invariant,HexNumber,ToString,InvariantCulture,Length,Success],WithDotNetPropertyCasing->[ToLowerInvariant,IsUpper,AsSpan,ToCharArray,IsLower,Length]]]
This method reads the contents of the file specified by the command line and checks if the block Private helper methods This is a helper method to generate code for a missing object.
This is used to generate the `UnicodeRanges.generated.cs` file.
@@ -755,9 +755,10 @@ function ParagraphCtrl($scope, $rootScope, $route, $window, $routeParams, $locat } autoAdjustEditorHeight(_editor); - angular.element(window).resize(function() { - autoAdjustEditorHeight(_editor); - }); + + let adjustEditorListener = () => autoAdjustEditorHeight(_editor); + angular.element(window).resize(adjustEditorListener); + $scope.$on('$destroy', () => angular.element(window).unbind('resize', adjustEditorListener)); if (navigator.appVersion.indexOf('Mac') !== -1) { $scope.editor.setKeyboardHandler('ace/keyboard/emacs');
[No CFG could be retrieved]
A directive to show the text in the editor. on call completion.
@Savalek instead of this; could we have done `angular.element(window).unbind('resize');` in `$scope.$on('$destroy', function() {`, would it yield same result?
@@ -3,12 +3,13 @@ package org.apereo.cas.support.oauth; import org.apereo.cas.support.oauth.web.OAuth20ProfileControllerTests; import org.apereo.cas.support.oauth.web.OAuth20AccessTokenControllerTests; import org.apereo.cas.support.oauth.web.OAuth20AuthorizeControllerTests; +import org.apereo.cas.ticket.refreshtoken.OAuthRefreshTokenExpirationPolicy; import org.junit.runner.RunWith; import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses({OAuth20AccessTokenControllerTests.class, OAuth20AuthorizeControllerTests.class, - OAuth20ProfileControllerTests.class}) + OAuth20ProfileControllerTests.class, OAuthRefreshTokenExpirationPolicy.class}) /** * OAuth test suite that runs all test in a batch. * @author Misagh Moayyed
[No CFG could be retrieved]
package org. apache. oauth. web. OAuth20ControllerTests.
This is not a Test class?
@@ -46,6 +46,7 @@ public class OAuth2ReactiveRefreshTokensWebFilter implements WebFilter { .filter(principal -> principal instanceof OAuth2AuthenticationToken) .cast(OAuth2AuthenticationToken.class) .flatMap(authentication -> authorizedClient(exchange, authentication)) + .onErrorResume(e -> Mono.empty()) .thenReturn(exchange) .flatMap(chain::filter); }
[No CFG could be retrieved]
Provides a web filter which refreshes the oauth2 tokens.
It should redirect to the oauth2 login here. If the token is expired, an error is returned.
@@ -64,6 +64,10 @@ class Pgi(Package): license_vars = ['PGROUPD_LICENSE_FILE', 'LM_LICENSE_FILE'] license_url = 'http://www.pgroup.com/doc/pgiinstall.pdf' + def url_for_version(self, version): + return "file://{0}/pgilinux-20{1}-{2}-x86_64.tar.gz".format( + os.getcwd(), version.up_to(1), version.joined) + def install(self, spec, prefix): # Enable the silent installation feature os.environ['PGI_SILENT'] = "true"
[Pgi->[install->[system,RuntimeError],variant,getcwd,version]]
Installs a single or network object.
We need a more systematic approach than this. Can the user place it in a manual mirror, rather than CWD? (I suppose that such behavior is not prohibited in this case).
@@ -244,7 +244,7 @@ func (ctx *Context) Invoke(tok string, args interface{}, result interface{}, opt // err := ctx.ReadResource(tok, name, id, nil, &resource, opts...) // func (ctx *Context) ReadResource( - t, name string, id IDInput, props Input, resource CustomResource, opts ...ResourceOption) error { + t, name string, id StringInput, props Input, resource CustomResource, opts ...ResourceOption) error { if t == "" { return errors.New("resource type argument cannot be empty") } else if name == "" {
[ReadResource->[ReadResource,DryRun],RegisterComponentResource->[RegisterResource],Invoke->[Invoke],resolve->[resolve],prepareResourceInputs->[DryRun],RegisterResourceOutputs->[DryRun,endRPC,RegisterResourceOutputs,beginRPC],Close->[Close],RegisterResource->[DryRun,RegisterResource]]
ReadResource reads a resource from the given resource type. ReadResource reads a resource.
This refactoring will break all of our SDKs, so let's remove it for now .
@@ -419,7 +419,10 @@ class PublicBody < ActiveRecord::Base # Give an error listing ones that are to be deleted deleted_ones = set_of_existing - set_of_importing if deleted_ones.size > 0 - notes.push "Notes: Some " + tag + " bodies are in database, but not in CSV file:\n " + Array(deleted_ones).sort.join("\n ") + "\nYou may want to delete them manually.\n" + notes.push "Notes: Some #{tag} bodies are in database, but " \ + "not in CSV file:\n " + + Array(deleted_ones).compact.sort.join("\n ") + + "\nYou may want to delete them manually.\n" end # Rollback if a dry run, or we had errors
[PublicBody->[get_request_percentages->[where_clause_for_stats],purge_in_cache->[purge_in_cache],not_requestable_reason->[defunct?,has_request_email?,not_apply?],set_locale_fields_from_csv_row->[localized_csv_field_name],request_email_if_requestable->[request_email,is_requestable?],get_request_totals->[where_clause_for_stats],is_requestable?->[defunct?,not_apply?],law_only_short->[eir_only?],special_not_requestable_reason?->[defunct?,not_apply?]]]
Imports a CSV file containing a sequence of individual I18n - formatted I18n - This method imports a single node in the CSV file.
Explain what was breaking and how this fixes it. Might need specs?
@@ -400,14 +400,13 @@ class TestReceiptFromStreamAsync(AsyncFormRecognizerTest): @FormRecognizerPreparer() @GlobalClientPreparer() - @pytest.mark.skip("the service is returning a different error code") async def test_receipt_locale_error(self, client): with open(self.receipt_jpg, "rb") as fd: receipt = fd.read() with pytest.raises(HttpResponseError) as e: async with client: await client.begin_analyze_document("prebuilt-receipt", receipt, locale="not a locale") - assert "UnsupportedLocale" == e.value.error.code + assert "InvalidArgument" == e.value.error.code @FormRecognizerPreparer() @GlobalClientPreparerV2(client_kwargs={"api_version": FormRecognizerApiVersion.V2_0})
[TestReceiptFromStreamAsync->[test_blank_page->[begin_analyze_document,read,result,open,assertIsNotNone],test_damaged_file_passed_as_bytes->[result,assertRaises,begin_analyze_document],test_pages_kwarg_specified->[open,read,result,begin_analyze_document],test_passing_enum_content_type->[begin_recognize_receipts,read,result,open,assertIsNotNone],test_passing_unsupported_url_content_type->[result,assertRaises,begin_analyze_document],test_receipt_locale_error->[open,begin_analyze_document,read,raises],test_damaged_file_bytes_io_fails_autodetect->[AzureKeyCredential,begin_recognize_receipts,BytesIO,assertRaises,result,FormRecognizerClient],test_auto_detect_unsupported_stream_content->[begin_analyze_document,read,result,assertRaises,open],test_receipt_stream_transform_png->[callback->[append,_from_generated,_deserialize],begin_analyze_document,assertDocumentStylesTransformCorrect,len,assertDocumentTablesTransformCorrect,read,result,assertDocumentTransformCorrect,assertDocumentKeyValuePairsTransformCorrect,open,assertDocumentEntitiesTransformCorrect,assertDocumentPagesTransformCorrect],test_receipt_png->[time,begin_analyze_document,assertEqual,get,len,read,result,open,assertIsNotNone,date],test_receipt_continuation_token->[begin_analyze_document,continuation_token,wait,read,result,open,assertIsNotNone],test_passing_bad_content_type_param_passed->[begin_recognize_receipts,read,result,assertRaises,open],test_damaged_file_bytes_fails_autodetect_content_type->[result,assertRaises,begin_recognize_receipts],test_receipt_multipage_transform->[callback->[append,_from_generated,_deserialize],begin_analyze_document,assertDocumentStylesTransformCorrect,len,assertDocumentTablesTransformCorrect,read,result,responses,assertDocumentTransformCorrect,from_dict,assertDocumentKeyValuePairsTransformCorrect,open,assertDocumentEntitiesTransformCorrect,assertDocumentPagesTransformCorrect],test_receipt_locale_v2->[raises,begin_recognize_receipts,str,read,open],test_receipt_locale_specified->[open,read,result,begin_analyze_document],test_damaged_file_passed_as_bytes_io->[BytesIO,result,assertRaises,begin_analyze_document],test_receipt_jpg_include_field_elements->[time,assertFormPagesHasValues,begin_recognize_receipts,assertEqual,get,len,assertFieldElementsHasValues,read,result,items,open,assertIsNotNone,date],test_authentication_bad_key->[AzureKeyCredential,begin_analyze_document,DocumentAnalysisClient,result,assertRaises],test_receipt_bad_endpoint->[AzureKeyCredential,begin_analyze_document,DocumentAnalysisClient,read,assertRaises,result,open],test_receipt_stream_transform_jpg->[callback->[append,_from_generated,_deserialize],begin_analyze_document,assertDocumentStylesTransformCorrect,len,assertDocumentTablesTransformCorrect,read,result,assertDocumentTransformCorrect,assertDocumentKeyValuePairsTransformCorrect,open,assertDocumentEntitiesTransformCorrect,assertDocumentPagesTransformCorrect],test_receipt_multipage->[time,begin_analyze_document,assertEqual,get,len,read,result,from_dict,open,assertIsNotNone,to_dict,date],skip,FormRecognizerPreparer,GlobalClientPreparer,GlobalClientPreparerV2],partial]
Test for the presence of a prebuilt - receipt with a locale.
So is this the error code to expect from now on here?
@@ -1210,13 +1210,13 @@ function format_like($cnt, array $arr, $type, $id) { $arr = array_slice($arr, 0, MAX_LIKERS - 1); } if ($total < MAX_LIKERS) { - $last = t('and') . ' ' . $arr[count($arr)-1]; + $last = L10n::t('and') . ' ' . $arr[count($arr)-1]; $arr2 = array_slice($arr, 0, -1); $str = implode(', ', $arr2) . ' ' . $last; } if ($total >= MAX_LIKERS) { $str = implode(', ', $arr); - $str .= sprintf( t(', and %d other people'), $total - MAX_LIKERS ); + $str .= sprintf( L10n::t(', and %d other people'), $total - MAX_LIKERS ); } $likers = $str;
[best_link_url->[get_hostname],localize_item->[attributes],get_responses->[getId],conversation->[getTemplateData,addParent]]
Format like like like dislike like and attend maybe like like and dislike like like Renders the list of all the items in the list. id = > expanded.
If I understood it correctly, you can merge the sprintf into the t call.
@@ -477,4 +477,13 @@ Status appendLogTypeToJson(const std::string& log_type, std::string& log) { } return Status(0, "OK"); } + +void setAWSProxy(Aws::Client::ClientConfiguration& config) { + config.proxyScheme = + Aws::Http::SchemeMapper::FromString(FLAGS_aws_proxy_scheme); + config.proxyHost = FLAGS_aws_proxy_host; + config.proxyPort = FLAGS_aws_proxy_port; + config.proxyUserName = FLAGS_aws_proxy_username; + config.proxyPassword = FLAGS_aws_proxy_password; +} }
[getInstanceIDAndRegion->[initAwsSdk],CreateHttpRequest->[CreateHttpRequest],getAWSRegion->[getAWSRegionFromProfile]]
Append log type to JSON and log log.
I would prefer this to fail as opposed to revert to the default.
@@ -43,4 +43,7 @@ public abstract class EC2AutoScalingStrategyConfig @Config("druid.indexer.maxNumInstancesToProvision") @Default("1") public abstract int getMaxNumInstancesToProvision(); + + @Config("druid.indexer.userDataFile") + public abstract String getUserDataFile(); }
[No CFG could be retrieved]
The maximum number of instances to provision.
Having the userData in a file like this is going to make it rather difficult to edit on the fly. I'm assuming one of the things in the userData is the specific version of things that you want deployed and when you change from one AMI to another it's possible you will also want to change the userdata. I think we should use ZK or MySQL for storing this in a node-agnostic, persistent fashion. It should also be editable via an endpoint.
@@ -27,6 +27,7 @@ type Registrar struct { var ( statesUpdated = expvar.NewInt("registrar.state_updates") + statesTotal = expvar.NewInt("registar.states.total") ) func New(registryFile string) (*Registrar, error) {
[Stop->[Info,Wait],loadStates->[IsNotExist,NewDecoder,Stat,Decode,loadAndConvertOldState,Close,Open,SetStates,Info,Err],processEventStates->[Update,Debug],Init->[Dir,Resolve,Errorf,Info,MkdirAll],loadAndConvertOldState->[Seek,Info,Decode,Now,writeRegistry,SetStates,NewDecoder,Debug],Start->[loadStates,Err,Add,Run],writeRegistry->[Create,SafeFileRotate,Debug,NewEncoder,Close,Encode,Err,Add,GetStates],Run->[Cleanup,processEventStates,writeRegistry,Info,Err,Done,Debug],NewStates,NewInt,Init]
registrar import imports the given object and returns a Registrar GetStates fetches the previous reading of the state from the configure RegistryFile file.
counters for states added and removed would be nice too.
@@ -258,6 +258,17 @@ class ProjectsController < ApplicationController current_team_switch(@project.team) end + def experiments_cards + overview_service = ExperimentsOverviewService.new(@project, current_user, params) + render json: { + cards_html: render_to_string( + partial: 'projects/show/experiments_list.html.erb', + locals: { cards: overview_service.experiments } + ) + } + + end + def notifications @modules = @project .assigned_modules(current_user)
[ProjectsController->[new->[new],create->[new],update->[update]]]
This action displays a single node index that is a part of the system.
Layout/EmptyLinesAroundMethodBody: Extra empty line detected at method body end.