patch
stringlengths
18
160k
callgraph
stringlengths
4
179k
summary
stringlengths
4
947
msg
stringlengths
6
3.42k
@@ -76,3 +76,10 @@ class TensorField(Field[torch.Tensor]): def array(self): """This is a compatibility method that returns the underlying tensor as a numpy array.""" return self.tensor.numpy() + + @overrides + def human_readable_repr(self) -> JsonDict: + shape = list(self.tensor.shap...
[TensorField->[get_padding_lengths->[str,enumerate,size],__eq__->[equal,isinstance],as_tensor->[list,size,pad,len,str,reversed,enumerate,unsqueeze],__len__->[size,len],empty_field->[TensorField,tensor],__str__->[size],__init__->[to,astype,cpu,from_numpy,ValueError,isinstance],array->[numpy]]]
Returns the underlying tensor as a numpy array.
I think we should include the data type as well.
@@ -26,14 +26,14 @@ func TestJobRuns_RetrievingFromDBWithError(t *testing.T) { require.NoError(t, store.CreateJob(&job)) jr := job.NewRun(job.Initiators[0]) jr.JobSpecID = job.ID - jr.Result = cltest.RunResultWithError(fmt.Errorf("bad idea")) + jr.Result.ErrorMessage = null.StringFrom("bad idea") err := store.C...
[RunResultWithError,False,NewStore,NewConfig,Merge,Set,NewRun,WaitForJobRunStatus,Add,NewBig,CreateJob,Error,New,NullString,NewLink,Start,Errorf,ApplyResult,Len,CreateJobRun,HasError,SetError,Equal,NextTaskRun,Contains,Parallel,NoError,Send,NewJobWithWebInitiator,ForLogger,JSONEq,NewStoreWithConfig,AllSyncEvents,FindJo...
Testing functions for testing the number of records in the database. Run tests the job run.
I agree with @felder-cl that it would be clearer to provide a convenience method than to use `.Valid` to test for an error.
@@ -222,7 +222,9 @@ public class NullDereferenceCheck extends SECheck { } private static boolean isAnnotatedCheckForNull(MethodInvocationTree syntaxNode) { - return syntaxNode.symbol().metadata().isAnnotatedWith("javax.annotation.CheckForNull"); + return syntaxNode.symbol().metadata().isAnnotatedWith("jav...
[NullDereferenceCheck->[reportIssue->[reportIssue],checkPostStatement->[NullDereferenceIssue],reportIssues->[reportIssue],checkConstraint->[NullDereferenceIssue,checkConstraint]]]
Checks if a given syntax node is annotated with CheckForNull.
you can avoid calling two times `syntaxNode.symbol().metadata()` by storing it first.
@@ -170,8 +170,9 @@ class Jetpack_Sync_Module_Posts extends Jetpack_Sync_Module { $update = $args[2]; $is_auto_save = isset( $args[3] ) ? $args[3] : false; //See https://github.com/Automattic/jetpack/issues/7372 $just_published = isset( $args[4] ) ? $args[4] : false; //Preventative in light of above issu...
[Jetpack_Sync_Module_Posts->[filter_post_content_and_add_links->[add_embed,remove_embed]]]
This function expands the arguments passed to the WordPress insert_post function.
it would be great to put all the flags under one param
@@ -65,6 +65,17 @@ public class SelectQuery extends BaseQuery<Result<SelectResultValue>> this.pagingSpec = pagingSpec; Preconditions.checkNotNull(pagingSpec, "must specify a pagingSpec"); + Preconditions.checkArgument(checkPagingSpec(pagingSpec, descending), "invalid pagingSpec"); + } + + private boole...
[SelectQuery->[withDataSource->[SelectQuery],withQuerySegmentSpec->[SelectQuery],withOverriddenContext->[SelectQuery],equals->[equals],hashCode->[hashCode]]]
Returns true if this dimFilter has a non - null .
This is a part of the java spec I'm not as familiar with. Is this doing `((descending ? 1 : 0) ^ value) < 0` or `descending ^ (value < 0)`?
@@ -640,10 +640,10 @@ server_init(int argc, char *argv[]) D_INFO("Service fully up\n"); /** Report timestamp when engine was open for business */ - d_tm_record_timestamp(NULL, "servicing_at", NULL); + d_tm_record_timestamp(NULL, "servicing_at"); /** Report rank */ - d_tm_set_gauge(NULL, dss_self_rank(), "rank...
[int->[setenv,crt_finalize,printf,hwloc_bitmap_asprintf,hwloc_bitmap_set,daos_errno2der,nanosleep,d_tm_record_timestamp,dss_self_rank,hwloc_get_nbobjs_by_depth,hwloc_get_type_depth,pl_fini,drpc_init,server_init_state_fini,d_tm_init,hwloc_topology_load,D_ERROR,dss_set_start_epoch,crt_register_event_cb,free,set_abt_max_n...
Initialize the server Load and initialize all modules write writeable by the current user DSS module setup - - - - - - - - - - - - - - - - - -.
Shall we move this to a counter then with an initial value equal to the rank? We don't care about min/max/avg for this one.
@@ -31,7 +31,6 @@ module Db count(COALESCE(back_image_view_at,mobile_back_image_view_at,capture_mobile_back_image_view_at,present_cac_view_at)) as back_image, count(COALESCE(ssn_view_at,enter_info_view_at)) as ssn, count(verify_view_at) as verify_info, - count(COALESCE(doc_succ...
[piv_cac_submitted->[join],drop_off_rates->[quote],calc_percent_left->[round,zero?],print_report->[calc_percent_left,calc_dropoff,format,join,each_with_index],generate_report->[format,print_report],drop_offs_in_range->[execute],images_submitted->[join],verified_profiles_count_for_issuer->[execute],calc_dropoff->[round,...
Select counts from the doc_auth_logs table.
Do we know if any of our reporting consumers rely on this column? Or rely on a specified # of columns? If so, should we put a 0, -1 or "N/A" there?
@@ -31,7 +31,7 @@ public class ExecutionStack implements Serializable { private IExecutable m_current; private final Stack<IExecutable> m_stack = new Stack<>(); - public void execute(final IDelegateBridge bridge) { + void execute(final IDelegateBridge bridge) { // we were interrupted before, resume where...
[ExecutionStack->[isEmpty->[isEmpty],push->[push],execute->[execute]]]
Execute the next command in the stack.
Are you sure this method isn't used by reflection?
@@ -676,13 +676,14 @@ public class RemoteServer implements Server setArrayString(params, 7, excludeArgs); params.set(8, JSONBoolean.getInstance(excludeArgsFromObject)); params.set(9, new JSONString(filePath)); + params.set(10, new JSONString(documentId)); sendRequest(RPC_SCOPE, ...
[RemoteServer->[synctexForwardSearch->[sendRequest],applyInverseConcordance->[sendRequest],setPresentationSlideIndex->[sendRequest],applyForwardConcordance->[sendRequest],svnStatus->[sendRequest],convertToYAML->[sendRequest],connectShinyAppsAccount->[sendRequest],devtoolsLoadAllPath->[sendRequest],sendRequest->[onError...
This method retrieves completions for a given sequence of tokens.
Are we actually using this on the server side right now?
@@ -92,7 +92,7 @@ namespace Dynamo.Graph.Nodes /// The index of the selected item. /// </summary> [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] - public int SelectedIndex { get; set; } + public int? SelectedIndex { get; set; } private static Dictionary<...
[NodeInputData->[NodeInputTypes->[TryGetValue],Equals->[MaximumValue,Value,StepValue,Description,Id,MinimumValue,NumberType,Abs,ToString,Type,InvariantCulture,ToDouble,Choices],Ignore,numberInput,stringInput,dateInput,booleanInput]]
- A list of all node input types that can be selected by the user. This method checks if the object passed in is an and if so returns it.
it's likely this is an API break. I don't know if we care - but I think it fits in: DISALLOWED: Changing the type of a member The return value of a method or the type of a property or field cannot be modified. For example, the signature of a method that returns an Object cannot be changed to return a String, or vice ...
@@ -753,10 +753,9 @@ class DependencyMap(HashableMap): return "{deps: %s}" % ', '.join(str(d) for d in sorted(self.values())) -def _libs_default_handler(descriptor, spec, cls): - """Default handler when looking for 'libs' attribute. The default - tries to search for 'lib{spec.name}' recursively start...
[colorize_spec->[insert_color],canonical_deptype->[canonical_deptype],VariantMap->[copy->[copy,VariantMap]],DependencySpec->[copy->[DependencySpec]],SpecParser->[check_identifier->[format],spec->[VariantMap,satisfies,_add_variant,DependencyMap,_add_version,_set_compiler,FlagMap,_add_flag,spec_by_hash,dag_hash],version_...
Default handler when looking for libraries.
@alalazo Previously, any package without a `shared` variant would search for static libraries. I changed this behavior below.
@@ -1532,8 +1532,16 @@ namespace System.Text.RegularExpressions /// that could be made atomic _assuming_ the conditions exist for it with the loop's ancestors. /// </summary> /// <returns>The found node that should be explored further for auto-atomicity; null if it doesn't exist.</returns> - ...
[RegexNode->[ReduceConcatenationWithAdjacentLoops->[MakeRep],TryGetJoinableLengthCheckChildRange->[ComputeMinLength],CanBeMadeAtomic->[CanBeMadeAtomic],ComputeMinLength->[ComputeMinLength],NodeSupportsSimplifiedCodeGenerationImplementation->[NodeSupportsSimplifiedCodeGenerationImplementation,IsAtomicByParent,ChildCount...
FindLastExpressionInLoopForAutoAtomic finds the last expression in a loop that can particip.
Do we need this check here? We never had it before, and `CanBeMadeAtomic` is doing the check (as it was before with maxDepth).
@@ -63,9 +63,7 @@ public class NumberProperty extends AEditableProperty { public boolean validate(final Object value) { if (value instanceof Integer) { final int i = ((Integer) value); - if (i <= max && i >= min) { - return true; - } + return i <= max && i >= min; } return...
[NumberProperty->[getEditorComponent->[setValue,getValue]]]
Validate if the given value is a reserved key.
Not directly related, but the outer parentheses can be removed, and the value can be cast to int directly
@@ -211,10 +211,10 @@ public class TestHoodieGlobalBloomIndex { t -> t._2()._2().getRecordKey(), Collectors.mapping(t -> t._2()._1().split("#")[0], Collectors.toList()))); assertEquals(4, recordKeyToFileComps.size()); - assertEquals(Arrays.asList("f4", "f1", "f3"), recordKeyToFileComps.get("002")); -...
[TestHoodieGlobalBloomIndex->[testLoadInvolvedFiles->[assertTrue,size,assertNull,getMinRecordKey,toFileMap,getRowKey,getPartitionPath,put,getMaxRecordKey,asList,assertFalse,HoodieGlobalBloomIndex,newArrayList,getHoodieTable,mkdirs,HoodieRecord,createNewFile,TestRawTripPayload,assertEquals,hasKeyRanges,loadInvolvedFiles...
This test test cases where the partition partition of the incoming records is ignored. This test tests whether the tag location is correct. This test creates a file in the partition directory that contains all of the possible records in the missing record in the table tagLocation - Tag records with the same file id as ...
Would it be easy to cover range pruning on/off cases here ?
@@ -17,8 +17,8 @@ def add_version_log_for_blocked_versions(obj, al): from olympia.activity.models import VersionLog VersionLog.objects.bulk_create([ - VersionLog(activity_log=al, version_id=id_chan[0]) - for version, id_chan in obj.addon_versions.items() + VersionLog(activity_log=al, ve...
[block_activity_log_save->[add_version_log_for_blocked_versions],block_activity_log_delete->[add_version_log_for_blocked_versions]]
Adds a version log for blocked versions.
I don't really understand what this change is about.
@@ -87,6 +87,8 @@ class Compose: """ def __init__(self, transforms): + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(self) self.transforms = transforms def __call__(self, img):
[RandomAffine->[forward->[get_params]],_setup_angle->[_check_sequence_input],RandomPerspective->[forward->[get_params]],RandomCrop->[forward->[get_params]],GaussianBlur->[forward->[get_params]],RandomResizedCrop->[forward->[get_params]],ColorJitter->[forward->[get_params]],RandomRotation->[forward->[get_params]],Random...
Initialize a object.
The `__init__` of `Compose` is compiled by JIT in some cases.
@@ -0,0 +1,7 @@ +class ProfilePreviewCardsController < ApplicationController + layout false + + def show + @user = User.find(params[:id]) + end +end
[No CFG could be retrieved]
No Summary Found.
I renamed the controller and paths to follow the rails convention of having controllers with plural names
@@ -420,10 +420,10 @@ public abstract class AbstractStream implements Stream { } @Override - public void onReset(Http2Error http2Error) { + public void onCancel(GrpcStatus status) { if (getState().allowSendReset()) { getState().setResetSend(); - ...
[AbstractStream->[transportError->[transportError,getMethodName],cancelByRemote->[cancel],compress->[compress],method->[getMethodName],decompress->[decompress],UnaryTransportObserver->[onData->[onError],onComplete->[extractStatusFromMeta,execute,onError,getHeaders]],execute->[execute],getTrailers->[getGrpcMessage],Abst...
On reset.
Remove setResetSend() method ,This state is already set in transport
@@ -296,8 +296,8 @@ func (l *lumberjackClient) sendCompressed(payload []byte) error { return err } - _, err := l.Write(payload) - return err + l.Write(payload) + return nil } func (l *lumberjackClient) writeDataFrame(
[Connect->[Connect],Close->[Close],compressEvents->[Close],onFail->[Close]]
sendCompressed sends a compressed message to the lumberjack.
What happens to the error returned by Write? Not needed anymore?
@@ -12,6 +12,9 @@ #include <gurt/common.h> +extern int dm_init(void); +extern void dm_fini(void); + static pthread_mutex_t d_log_lock = PTHREAD_MUTEX_INITIALIZER; static int d_log_refcount;
[No CFG could be retrieved]
The debug subsystem. Load common debug bits into dictionary and load common debug groups into dictionary.
(style) externs should be avoided in .c files
@@ -373,8 +373,15 @@ public abstract class AbstractAuditBackend implements AuditBackend { if (!processEvents) { return; } + List<LogEntry> entries = new ArrayList<>(eventBundle.size()); for (Event event : eventBundle) { - logEvent(event); + LogEntry e...
[AbstractAuditBackend->[syncLogCreationEntries->[guardedDocument],buildEntryFromEvent->[doPutExtendedInfos],logEvent->[buildEntryFromEvent],logEvents->[getAuditableEventNames],queryLogs->[queryLogsByPage],nativeQuery->[nativeQuery],nativeQueryLogs->[nativeQuery],getLogEntriesFor->[getLogEntriesFor],doSyncNode->[doSyncN...
Log events from the given event bundle.
`if (!entries.isEmpty())` is more modern.
@@ -559,9 +559,8 @@ class Network */ public static function isUrlBlocked($url) { - $h = @parse_url($url); - - if (! $h) { + $host = @parse_url($url, PHP_URL_HOST); + if (! $host) { return true; }
[Network->[post->[set_curl_code,set_curl_headers,save_timestamp,get_useragent],curl->[save_timestamp,set_curl_content_type,get_useragent,set_curl_headers,set_curl_code],finalUrl->[save_timestamp,loadHTML,query,get_useragent]]]
Checks if a URL is blocked.
Good catch, `parse_url()` without 2nd parameter does return the full array. OT: Maybe we should remove `@`? I find it not good muting PHP functions. Instead maybe switch to a proper class (composer again) which allows validation?
@@ -95,7 +95,10 @@ def download_url(url, root, filename=None, md5=None): ) else: raise e - + # check integrity of downloaded file + if not check_integrity(fpath, md5): + print("Error downloading file: Dataset not found in " + fpath + " or corrupted...
[extract_archive->[_is_zip,_is_tar,_is_targz,_is_gzip,_is_tarxz],check_md5->[calculate_md5],download_url->[check_integrity,gen_bar_updater,makedir_exist_ok],download_and_extract_archive->[extract_archive,download_url],verify_str_arg->[iterable_to_str],check_integrity->[check_md5],download_file_from_google_drive->[check...
Download a file from a given url and place it in a given directory.
1. This is not only used to download datasets. Maybe change to wording from "Dataset" to "file"? 2. Is there a possibility that the file is not present after the download? If not, I would remove the "not found" part
@@ -107,6 +107,9 @@ class Trainer: parameter.register_hook(clip_function) logger.info("Beginning training.") + num_training_batches = self._iterator.get_num_batches(self._train_dataset) + if self._validation_dataset is not None: + num_validation_batches = self._i...
[Trainer->[train->[train],from_params->[Trainer]]]
Train the model. key in the output of model. forward returns the loss and metrics of the last missing key Add a scalar value to the cache.
`verbose_training_generator` or something would be a little better, maybe?
@@ -715,8 +715,8 @@ func updateIssueCols(e Engine, issue *Issue, cols ...string) error { } // UpdateIssueCols only updates values of specific columns for given issue. -func UpdateIssueCols(issue *Issue, cols ...string) error { - return updateIssueCols(x, issue, cols...) +func UpdateIssueCols(ctx DBContext, issue *I...
[DiffURL->[HTMLURL],ChangeStatus->[changeStatus,loadPullRequest,loadRepo,APIFormat,loadPoster],loadAttributes->[loadPullRequest,loadTotalTimes,loadRepo,loadLabels,loadAttributes,isTimetrackerEnabled,loadPoster,loadComments,loadReactions],ClearLabels->[loadPullRequest,loadRepo,APIFormat,clearLabels,LoadPoster],ReplaceLa...
changeStatus changes the status of an issue.
Not for this PR, but as a side note: calling this from outside `models` exposes too much of the internal structure IMHO. It doesn't seem right for other modules to give a list of table columns.
@@ -271,7 +271,7 @@ class RteList $params = Routine::getParameters($stmt); - if (Util::currentUserHasPrivilege('EXECUTE', $db)) { + if (Util::currentUserHasPrivilege('EXECUTE', $db)||1) { $execute_action = 'execute_routine'; for ($i = 0; $i < $par...
[RteList->[getRoutineRow->[isSuperuser,escapeString,getDefinition,getCurrentUser,fetchValue],get->[render,isAjax]]]
Returns a row of a block of content that represents a single node of a procedure. This function is called when a user has no rights to execute a specific critical block. a helper function to display a single missing key block.
I'm a bit unsure about this. Why use if condition if you used `||1` ?
@@ -1606,7 +1606,7 @@ class StateBackedTestElementType(object): StateBackedTestElementType.live_element_count += 1 # Due to using state backed iterable, we expect there is a few instances # alive at any given time. - if StateBackedTestElementType.live_element_count > 5: + if StateBackedTestElementT...
[ElementCounter->[set_breakpoint->[Breakpoint->[wait->[wait]],Breakpoint]],FnApiRunnerSplitTest->[run_split_pipeline->[split_manager,create_pipeline],run_sdf_split_pipeline->[EnumerateSdf->[process->[EnumerateProvider]],split_manager,create_pipeline,EnumerateSdf]],ExpandStringsProvider->[split->[split]],FnApiRunnerTest...
Initialize a new object with the given number of elements and unused elements.
once removed restriction on fnapi runner the limit this fails, any thoughts?
@@ -100,6 +100,18 @@ func (ms *Status) stage2() { ms.finalCleanup() ms.taskCompleted() + err := ms.SendAllActionsThroughPipeline() + if err != nil { + logFatal(err.Error(), "Unable to re-insert actions") + } + ms.taskCompleted() + + err = ms.DeleteAllActionsIndexes() + if err != nil { + logFatal(err.Error(), "U...
[reindexAllInsightsIndexes->[GetAllTimeseriesIndiceNames,taskCompleted,Error,ReindexInsightstoConvergeHistory,Sprintf,ReindexInsightstoActions,DeleteIndex],migrateA1ToCurrent->[calculateA1Tasks,stage1,update,stage2],stage2->[taskCompleted,reindexAllInsightsIndexes,update,finish,finalCleanup,updateNodesWithMissingRunDat...
stage2 is the stage of the migration from Automate 1. x.
After all the A1 actions are updated to A2, we re-ingest the actions to send them to the event-feed-service and policy information to config-mgmt-service.
@@ -134,6 +134,18 @@ public abstract class IndicesIT extends ElasticsearchBaseTest { //assertThat(getIndexState(index)).isEqualTo("close"); } + @Test + public void testClosedIndices() { + final String index1 = client().createRandomIndex("indices_it_"); + client().closeIndex(index1); ...
[IndicesIT->[testExistsIfIndexDoesNotExist->[isFalse],testTimestampStatsOfIndexWithNonExistingIndex->[indexRangeStatsOfIndex],testAliasTarget->[createRandomIndex,addAliasMapping,contains,isEmpty],deletePostsIndicesDeletedEvent->[create,register,isEmpty,IndicesEventListener,createRandomIndex,containsOnly,delete],testTim...
Test close.
I would suggest to rename this to `findsClosedIndices` and also create a third index and not close it to verify that *only* closed indices are found.
@@ -13,6 +13,7 @@ from __future__ import print_function, absolute_import, division # Kratos Core and Apps +from KratosMultiphysics import * from KratosMultiphysics.StructuralMechanicsApplication import * # Additional imports
[KratosInternalAnalyzer->[__ClearResultsFromModelPart->[SetDeformationVariablesToZero,SetMeshToReferenceMesh],FinalizeAfterOptimizationLoop->[Finalize,values],InitializeBeforeOptimizationLoop->[Initialize,values],AnalyzeDesignAndReportToCommunicator->[CalculateGradient,reportGradient,__ClearResultsFromModelPart,isReque...
Constructor for the base class for the given object.
I recommend to slowly shift to `import KratosMultiphysics`
@@ -106,6 +106,8 @@ class PipelineClient(PipelineClientBase): policies = kwargs.get('policies') if policies is None: # [] is a valid policy list + if config is None: + raise ValueError("No config or policies supplied.") policies = [ config.hea...
[PipelineClient->[close->[__exit__],__exit__->[__exit__],__enter__->[__enter__]]]
Build a Pipeline object from the given configuration.
Why not if config is None, give a default one?
@@ -20007,7 +20007,8 @@ bool Lowerer::GenerateFastBooleanAndObjectEqLikely(IR::Instr * instr, IR::Opnd * break; } - if (src1->GetValueType().IsLikelyBoolean() && src2->GetValueType().IsLikelyBoolean()) + bool generateObjectFastPath = true; + if ((src1->GetValueType().IsLikelyBoolean() || src1->...
[No CFG could be retrieved]
Generate a branch if the two operands are true and if the two operands are false. If missing object type.
> && [](start = 133, length = 3) OR ?
@@ -239,6 +239,12 @@ public class TestPubsubSignal implements TestRule { String result = pollForResultForDuration(resultSubscriptionPath, duration); + try { + pubsub.deleteSubscription(resultSubscriptionPath); + } catch (IOException e) { + LOG.warn(String.format("Leaked PubSub subscription '%s'...
[TestPubsubSignal->[sleep->[sleep],signalSuccessWhen->[signalSuccessWhen],PublishStart->[expand->[apply]],create->[TestPubsubSignal],StatefulPredicateCheck->[processElement->[apply]],PublishSuccessWhen->[expand->[apply]],apply->[evaluate->[evaluate]]]]
Polls for a result message and waits for it to be set to success.
nit: Will LOG.error make it easier to be discovered?
@@ -407,6 +407,12 @@ export class Resources { * @private */ buildReadyResources_() { + // Avoid cases where elements add more elements inside of them + // and cause an infinite loop of building - see #3354 for details. + if (this.isCurrentlyBuildingPendingResources_) { + return; + } + thi...
[No CFG could be retrieved]
Adds a new resource object to the list of resources that are ready to be built. Tasks that are scheduled to be run when an element has been upgraded to the DOM.
Wrap the following in `try { } finally {}`. Otherwise an exception can make this stuck forever.
@@ -416,7 +416,7 @@ class GradeEntryFormsController < ApplicationController end end - #If the request is a post type and the abort flag is down (operation can continue) + # If the request is a post type and the abort flag is down (operation can continue) if request.post? && !abort_upload ...
[GradeEntryFormsController->[new->[new],create->[new]]]
upload a single with a CSV file if there is a grade entry with this id redirect to the view.
Line is too long. [87/80]
@@ -188,7 +188,7 @@ class AutoToolsBuildEnvironment(object): def _configure_flags(self): ret = copy.copy(self._deps_cpp_info.cflags) ret.append(self._architecture_flag) - if self._build_type == "Debug": + if self._build_type == "Debug" and str(self._compiler) in ['gcc', 'clang', 'ap...
[AutoToolsBuildEnvironment->[vars_dict->[_get_vars,append],_configure_defines->[stdlib_defines],configure->[_get_host_build_target_flags],vars->[_get_vars],_get_vars->[append->[append],append],_configure_cxx_flags->[stdlib_flags]]]
Return a list of flags to be used to configure the compiler.
Maybe use ``str(self.compiler) != "Visual Studio"``? Just in case someone adds another compiler, like ICC, or arm-gcc to their own settings, I'd say the chances to accept those flags might be higher than the opposite. ~~BTW, what is exactly the scenario of using AutoToolsBuildEnvironment with Visual Studio? Use configu...
@@ -13,6 +13,11 @@ def KratosPrintInfo(message): KratosMultiphysics.Logger.Print(message, label="") KratosMultiphysics.Logger.Flush() +def IsOk(value, ref, tol): + if abs(value - ref) / ref > tol: + return False + return True + #=================================================================...
[TestAnalytics->[tables->[MainCouplingFemDemForTestingSolution]]]
Print a message to the Kratos Multiphysics Logger.
I recommend using the functionalities procided by pythons unittest module
@@ -93,6 +93,7 @@ type PullRequestsConfig struct { AllowRebase bool AllowRebaseMerge bool AllowSquash bool + AllowMergeUnrelated bool } // FromDB fills up a PullRequestsConfig from serialized format.
[ToDB->[Marshal],FromDB->[Unmarshal],BeforeSet->[ToStr],Where,Find]
FromDB parses the given bytes and populates the pull requests config from it.
This seems like a feature unrelated to the original PR... it should at least deserve updating the title.
@@ -169,8 +169,8 @@ class CActionComm if ($obj->module == 'invoice' && ! $conf->facture->enabled) $qualified=0; if ($obj->module == 'order' && ! $conf->commande->enabled) $qualified=0; if ($obj->module == 'propal' && ! $conf->propal->enabled...
[CActionComm->[fetch->[free,query,error,num_rows,fetch_object,escape],liste_array->[query,trans,num_rows,fetch_object,lasterror,load],getNomUrl->[trans]]]
List all action commercial items in order of highest priority. A simple method to add a common action to an object if id or code is found return it.
a & b | c Some parenthesis are missing surely.
@@ -46,14 +46,14 @@ class ProfileField extends BaseModel /** @var PermissionSet */ private $permissionset; - /** @var \Friendica\Repository\PermissionSet */ - private $permissionSetRepository; + /** @var \Friendica\Security\PermissionSet\Depository\PermissionSet */ + private $permissionSetDepository; - public f...
[ProfileField->[__get->[checkValid,selectFirst]]]
This method is overridden to allow to retrieve a permissionset object from the database.
Please use an import alias, like `PermissionSetDepository`. It should make the constructor declaration lighter on the eyes.
@@ -81,7 +81,7 @@ class LSUN(data.Dataset): classes = [classes] else: classes = [c + '_' + classes for c in categories] - if type(classes) == list: + elif type(classes) == list: for c in classes: c_short = c.split('_') ...
[LSUN->[__repr__->[__len__,__repr__],__init__->[LSUNClass]]]
Initialize LSUNDataset from a list of base LSUN classes.
hmm, should it be: `elif isinstance(classes, list): ..`, it more pythonic :)
@@ -0,0 +1,6 @@ +<%= render partial: 'exam_template_download', + locals: { exam_template: @exam_templates }%> +<br><br> +<%= render partial: 'exam_template_upload', + locals: { exam_template: @exam_templates }%> +
[No CFG could be retrieved]
No Summary Found.
Don't use `<br>` for styling. You should remove these for now.
@@ -20,6 +20,7 @@ class AzureTree(BaseTree): PATH_CLS = CloudURLInfo REQUIRES = { "azure-storage-blob": "azure.storage.blob", + "azure-identity": "azure.identity", "knack": "knack", } PARAM_CHECKSUM = "etag"
[AzureTree->[get_file_hash->[get_etag],walk_files->[_list_paths]]]
Creates a new AzureTree object that represents a single node in the tree. A CLIConfig class that creates a new object.
what are the dependencies of this sub-package? we had some problems before with azure-cli-core. We need to check that this one doesn't pull a lot of stuff with it.
@@ -118,7 +118,7 @@ public class RoaringBitmapSerdeFactory implements BitmapSerdeFactory @Override public int compare(ImmutableBitmap o1, ImmutableBitmap o2) { - return RORING_COMPARATOR.compare((WrappedImmutableRoaringBitmap) o1, (WrappedImmutableRoaringBitmap) o2); + throw new UnsupportedOper...
[RoaringBitmapSerdeFactory->[ImmutableRoaringBitmapObjectStrategy->[toBytes->[toBytes],compare->[compare]]]]
Compares two bitmaps.
Should this be removed? I think it's useful and might be used for index-only query processing in the future. If this should be removed, it's better to make ObjectStrategy to not extend Comparator.
@@ -80,11 +80,6 @@ frappe.ui.form.AssignTo = Class.extend({ add: function() { var me = this; - if(this.frm.doc.__unsaved == 1) { - frappe.throw(__("Please save the document before assignment")); - return; - } - if(!me.dialog) { me.dialog = new frappe.ui.form.AssignToDialog({ obj: me,
[No CFG could be retrieved]
function to add a new user - specific assignment Show a dialog to add or remove an assignment to an object.
Check based on `__islocal`?
@@ -268,8 +268,9 @@ function handleCommentSubmit(event) { }); var preview = document.getElementById("preview-div"); - preview.classList.add("preview-toggle"); + var togglePreview = document.querySelector('.preview-toggle'); preview.innerHTML = ""; + ...
[No CFG could be retrieved]
Creates a new comment in the main comment tree. onSubmit - function for handling the form submission.
Where possible it would be good to use `const` rather than `var`.
@@ -562,7 +562,8 @@ func (rm *resmon) Invoke(ctx context.Context, req *pulumirpc.InvokeRequest) (*pu args, err := plugin.UnmarshalProperties( req.GetArgs(), plugin.MarshalOptions{ - Label: label, + Label: label, + // RejectUnknowns: true // should we just fail fast here if we see unknowns? Ke...
[ReadResource->[getDefaultProviderRef],handleRequest->[newRegisterDefaultProviderEvent],StreamInvoke->[StreamInvoke],Invoke->[Invoke],serve->[handleRequest],getDefaultProviderRef,serve]
Invoke invokes the resource identified by the given request. onfails is a callback that returns a nil response if the call fails.
I'd expect to reject unknowns here but I don't have a holistic picture of this option, unfortunately
@@ -1,9 +1,16 @@ angular.module('DocsController', []) -.controller('DocsController', function($scope, $rootScope, $location, $window, $cookies, NG_PAGES, NG_NAVIGATION, NG_VERSION) { +.controller('DocsController', [ + '$scope', '$rootScope', '$location', '$window', '$cookies', 'openPlunkr', + '...
[No CFG could be retrieved]
Provides a controller for the navigating docs. ********************************** NG_PAGES - NG_PAGES - NG_PAGE.
This is the important line here. The bits above are just wrapping the controller function in an inline injection annotation array.
@@ -262,4 +262,9 @@ public class CasSupportActionsConfiguration { return new ServiceWarningAction(centralAuthenticationService, authenticationSystemSupport, ticketRegistrySupport, warnCookieGenerator.getIfAvailable(), principalElectionStrategy); } + + @Bean + public Action mfaInitialize...
[CasSupportActionsConfiguration->[initializeLoginAction->[InitializeLoginAction],generateServiceTicketAction->[GenerateServiceTicketAction],frontChannelLogoutAction->[FrontChannelLogoutAction],authenticationViaFormAction->[InitialAuthenticationAction],genericSuccessViewAction->[getDefaultRedirectUrl,GenericSuccessViewA...
Service warning action.
Also not sure if this belongs here. Shouldn't the MFA-related actions, etc be housed in a module that is only required for MFA, and not by default?
@@ -890,7 +890,7 @@ public class DatastoreV1 { QueryResultBatch currentBatch = null; while (moreResults) { - Query.Builder queryBuilder = query.toBuilder().clone(); + Query.Builder queryBuilder = Query.newBuilder().mergeFrom(query); queryBuilder.setLimit(Int32Value.newBu...
[DatastoreV1->[DeleteKeyFn->[apply->[isValidKey,build]],Mutate->[populateDisplayData->[populateDisplayData],toString->[toString]],DatastoreWriterFn->[populateDisplayData->[populateDisplayData],flushBatch->[addRequestLatency,build],startBundle->[start],processElement->[nextBatchSize],WriteBatcherImpl],Write->[withProjec...
Process the element of the response.
Shouldn't dropping `clone` be enough since `toBuilder()` is short hand for effectively `newBuilder().mergeFrom(...)`?
@@ -51,10 +51,6 @@ async function unit() { maybePrintArgvMessages(); - if (argv.local_changes && !getUnitTestsToRun()) { - return; - } - const config = new RuntimeTestConfig('unit'); const runner = new Runner(config);
[No CFG could be retrieved]
Creates a unit test runner that runs unit tests. A list of all the ucelabs names that are being run.
Detecting the wasteful double-call of `getUnitTestsToRun()` was a nice catch! However, removing this check will cause Karma to error out if the local changes affect zero tests. Can we reinstate this code and then save the results of `getUnitTestsToRun()` so they can be reused while starting the Karma server?
@@ -19,6 +19,9 @@ class TestListField(AllenNlpTestCase): self.vocab.add_token_to_namespace("n", 'characters') self.vocab.add_token_to_namespace("t", 'characters') self.vocab.add_token_to_namespace("c", 'characters') + for label in ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k']...
[TestListField->[test_all_fields_padded_to_max_length->[assert_array_almost_equal,get_padding_lengths,as_array,index,ListField,array],test_fields_can_pad_to_greater_than_max_length->[assert_array_almost_equal,get_padding_lengths,as_array,index,ListField,array],test_get_padding_lengths->[get_padding_lengths,index,ListFi...
This method initializes the fields of the TestListField.
Looks like a duplicate line here.
@@ -124,6 +124,12 @@ public abstract class AbstractInternalDataContainer<K, V> implements InternalDat public boolean touch(int segment, Object k, long currentTimeMillis) { ConcurrentMap<K, InternalCacheEntry<K, V>> entries = getMapForSegment(segment); if (entries != null) { + if (trace) { + ...
[AbstractInternalDataContainer->[compute->[getSegmentForKey,getMapForSegment,compute],peek->[get,getSegmentForKey,getMapForSegment,peek],handleEviction->[containsKey],DefaultEvictionListener->[onRemoval->[remove],onEntryChosenForEviction->[put,handleEviction]],containsKey->[containsKey,peek,getSegmentForKey],get->[get,...
touch method.
Couldn't `getMapForSegment()` return a `TouchableMap`, or rather a `PeekableTouchableMap`, in order to avoid the `instanceof` check?
@@ -986,7 +986,13 @@ def utc_millesecs_from_epoch(for_datetime=None): """ if not for_datetime: for_datetime = datetime.datetime.now() - return calendar.timegm(for_datetime.utctimetuple()) * 1000 + # Number of seconds. + seconds = time.mktime(for_datetime.utctimetuple()) + # timetuple() do...
[slug_validator->[slugify],escape_all->[escape_all],partial->[partial],to_language->[to_language],attach_trans_dict->[sorted_groupby,get_locale_and_string],unsubscribe_newsletter->[sync_user_with_basket],fetch_subscribed_newsletters->[sync_user_with_basket],ImageCheck->[is_animated->[is_image]],send_mail->[urlparams,re...
Returns millesconds from the Unix epoch in UTC.
Are you _sure_ this works as expected? I checked in a shell and this expression always resolves to an integer value, meaning we instantly lose the fraction of a second you just added. You'd need `float(...)` around the microsecond value, afaik. Or have `seconds` be `milliseconds` on the line above and just divide `.mic...
@@ -1337,16 +1337,6 @@ func (a *apiServer) workerServiceIP(ctx context.Context, deploymentName string) func (a *apiServer) pipelineManager(ctx context.Context, pipelineInfo *pps.PipelineInfo) { // Clean up workers if the pipeline gets cancelled pipelineName := pipelineInfo.Pipeline.Name - go func() { - // Clean u...
[DeletePipeline->[DeleteJob],validateJob->[validateInput],watchJobCompletion->[InspectJob],jobManager->[scaleUpWorkers,numWorkers,workerServiceIP,updateJobState,InspectJob],AddShard->[pipelineWatcher,jobWatcher],CreatePipeline->[validatePipeline],pipelineWatcher->[setPipelineCancel,deletePipelineCancel],RestartDatum->[...
pipelineManager is the main function for the pipeline manager branchSetFactory is a helper function that creates a branchSet for the given pipeline. loop - loop through all the nodes in the branchSet and create a new This function checks if all of the jobs in the input set have been processed.
It seems like there's probably a matching call to create the workers that might error now because the workers already exist. Is that true and if so do we trap that error in some way?
@@ -126,7 +126,7 @@ export const displayAuthError = message => ({ type: ACTION_TYPES.ERROR_MESSAGE, export const getSession = () => dispatch => dispatch({ type: ACTION_TYPES.GET_SESSION, - payload: axios.get('/<% if (authenticationType === 'uaa') { %><%= apiUaaPath %><% } %>api/account') + payload: axios.get('/...
[No CFG could be retrieved]
The login action This function is called when the user is logged in. It will check if the token is.
`apiUaaPath` is either the path or blank so no conditional is needed
@@ -1,5 +1,5 @@ class NullTag < Liquid::Block - def initialize(tag_name, _markup, _options) + def initialize(tag_name, _markup, _options) # rubocop:disable Lint/MissingSuper raise StandardError, "Liquid##{tag_name} tag is disabled" end end
[NullTag->[initialize->[raise]],each,register_tag]
Initializes the tag.
I'm assuming we're explicitly omitting super because we're just raising an error?
@@ -68,6 +68,7 @@ const ( archive // an online, read-only branch offline // an offline, read-write branch archiveOffline // an offline, read-only branch + conflict // a cleared, local conflict branch ) // Constants use...
[waitForRootBlockFetch->[logIfErr],kickOffPartialMarkAndSweep->[Lock,Unlock,goTracked,doPartialMarkAndSweep],handleTLFBranchChange->[setHeadSuccessorLocked,isUnmergedLocked,id,Lock,handleUnflushedEditNotifications,Unlock,setBranchIDLocked],SetInitialHeadFromServer->[kickOffPartialSyncIfNeeded,kickOffRootBlockFetch,wait...
The type of a single - block object. Error implements the error interface for ErrStillStagedAfterCR.
What about before it's cleared?
@@ -16,15 +16,9 @@ /** * @fileoverview - * Gets Bento components to publish. + * Logs Bento components to publish. */ -const bundles = require('../compile/bundles.config.extensions.json'); -const extensions = bundles - .filter((bundle) => bundle.options?.npm) - .map((bundle) => ({ - 'extension': bundle.na...
[No CFG could be retrieved]
Get Bento components to publish.
nit: Consider replacing `console /*OK*/.log()` with `logWithoutTimestamp()` from `build-system/common/logging.js`.
@@ -5,6 +5,14 @@ module ProjectsHelper t('user_projects.enums.role.' + user_project.role) end + def user_names_with_roles(user_projects) + user_projects.map { |up| user_name_with_role(up) }.join('&#013;').html_safe + end + + def user_name_with_role(user_project) + sanitize_input("#{user_project.user....
[folders_recursive_builder->[folders_recursive_builder]]
returns the list of all modules that have the specified role.
Rails/OutputSafety: Tagging a string as html safe may be a security risk.
@@ -475,6 +475,14 @@ func (c *postgresReadOnlyCollection) Watch(opts ...watch.Option) (watch.Watcher, return } + // if waitEv was set but not sent yet, send it now + if waitEv != nil && interested(waitEv, options.SortTarget) { + if err := watcher.sendInitial(waitEv.WatchEvent(c.ctx, watcher.db, watcher.tem...
[getByIndex->[validateIndex],get->[mapSQLError],DeleteByIndex->[validateIndex,mapSQLError],Create->[withKey,insert],GetByIndex->[getByIndex],Count->[mapSQLError],Watch->[tableWatchChannel,list],watchOne->[get,indexWatchChannel],Get->[withKey,get],Delete->[withKey],GetRevByIndex->[validateIndex,listRev],ListRev->[listRe...
Watch creates a Watch for a read - only collection.
whether the watcher is interested should not decide whether we send here
@@ -157,14 +157,15 @@ class Model: def __init__(self, args, interactive_mode): self.args = args - log.info("Creating Inference Engine") + log.info('OpenVINO Inference Engine') + log.info('build: {}'.format(get_version())) self.ie = IECore() - self.ie.set_config( - ...
[resize->[resize],Model->[_start_encoder->[_async_infer_encoder],infer_async->[change_layout],preprocess_inputs->[preprocess_image],__init__->[read_net],infer_sync->[change_layout],_start_decoder->[_async_infer_decoder],_process_decoding_results->[_async_infer_decoder]],prerocess_crop->[preprocess_image]]
Initialize the object with the given parameters.
In case more than one model, the log should contain the model types (here -`encoder model`, `decoder model`). It helps to distinguish similar logs
@@ -69,7 +69,7 @@ def test_udp_unreachable_node(raiden_network, skip_if_not_udp): @pytest.mark.parametrize('number_of_nodes', [1]) @pytest.mark.parametrize('channels_per_node', [0]) @pytest.mark.parametrize('number_of_tokens', [1]) -def test_suite_survives_unhandled_exception(raiden_network): +def test_suite_survive...
[test_suite_survives_unhandled_exception->[do_fail->[UnhandledTestException],UnhandledTestException]]
Test suite that surves unhandled exception.
`skip_if_parity` should be a marker imho
@@ -95,6 +95,7 @@ angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $r $scope.chart = {}; $scope.colWidthOption = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; $scope.paragraphFocused = false; + $scope.editor.setReadOnly($scope.isRunning()); if (newParagraph.focus) { ...
[No CFG could be retrieved]
The NoteController for the NgModel - related components. function to render the data.
Sorry, my bad for pointing out that place, editor is not loaded yet at that point, so we have an error in the console. The right place should be around Line 542
@@ -1418,7 +1418,7 @@ function conv_sort($arr, $order) { if (stristr($order, 'created')) { usort($parents, 'sort_thr_created'); - } elseif (stristr($order, 'commented')) { + } elseif(stristr($order, 'commented')) { usort($parents, 'sort_thr_commented'); }
[localize_item->[attributes],get_responses->[get_id],conversation->[add_thread,get_template_data]]
Sort an array of items in a thread - alphabetically This function is used to sort the tree of nodes by their parent and then by their children.
Here you removed the space ...
@@ -31,11 +31,7 @@ public class CaffeineCache { public CaffeineCache(CaffeineCacheInfo cacheInfo) { this.name = cacheInfo.name; Caffeine<Object, Object> builder = Caffeine.newBuilder(); - /* - * The following line is a workaround for a GraalVM issue: https://github.com/oracle/graal...
[CaffeineCache->[get->[get],invalidate->[invalidate],invalidateAll->[invalidateAll]]]
Creates a cache that implements the Caffeine interface. Get the value associated with the given key.
Good catch! This should have been removed in #6792 when we dropped the GraalVM 19.2.1 support. The build failed because you need to remove the `ForkJoinPool` import. Could you fix that please?
@@ -61,9 +61,6 @@ class ExecuteProcessResult(datatype(['stdout', 'stderr', 'exit_code'])): def create_process_rules(): """Intrinsically replaced on the rust side.""" - return [execute_process_noop, RootRule(ExecuteProcessRequest)] - - -@rule(ExecuteProcessResult, [Select(ExecuteProcessRequest)]) -def execute_pro...
[ExecuteProcessRequest->[create_with_empty_snapshot->[create_from_snapshot],create_from_snapshot->[ExecuteProcessRequest]]]
Create rules for the ExecuteProcessRequest.
Why is this a `RootRule`?
@@ -148,10 +148,13 @@ static float compute_center_pixel_norm(const float center_weight, const int radi // compute the channel-normed squared difference between two pixels static inline float pixel_difference(const float* const pix1, const float* pix2, const float norm[4]) { - float dif1 = pix1[0] - pix2[0]; - floa...
[No CFG could be retrieved]
Compute the patches for the central pixel. Computes the squared difference between two channel - normed squared difference between two pixels.
can you add space before and after `*` to make code a bit more readable. TIA.
@@ -195,6 +195,10 @@ def test_info_no_rename_no_reorder_no_pdf(): np.array([ch['loc'] for ch in info['chs']]), np.array([ch['loc'] for ch in info2['chs']])) + # just check reading data | corner case + read_raw_bti(pdf_fname=pdf, config_fname=config, head_shape_fname=None, + ...
[test_no_conversion->[allclose,partial,catch_warnings,_process_bti_headshape,enumerate,assert_allclose,dict,raw_info,pick_info,assert_equal,startswith,_read_bti_header,assert_array_equal,read_raw_bti,raw_info_con,_correct_trans,zip,assert_true,eye,get_info,pick_types],test_setup_headshape->[list,keys,_process_bti_heads...
Test private renaming reordering and partial construction option. Tests if the data in the info file is missing missing missing values. Check the header of the BTI images for a BTI image. MNE - COVER - 4D HEAD.
you're not really testing anything right?
@@ -68,7 +68,8 @@ class LegacyPropertyFactory /** * Create a new property. * - * @param Item $item + * @param ItemMetadata $property + * @param null|StructureInterface $structure * * @return PropertyInterface $property */
[LegacyPropertyFactory->[createSectionProperty->[createProperty],createBlockProperty->[createProperty],convertArrayToParameters->[convertArrayToParameters]]]
Creates a new LegacyProperty object from the given ItemMetadata.
Actually we were saying that we only add these params if they add some value. In that case all this information is already in the function signature itself, therefore I would just remove these two lines.
@@ -12,7 +12,13 @@ describe Repository::GitRevision do # Make sure repo exists, if not make it repo = ga_repo.config.get_repo('test_repo_workdir') + if repo.nil? + Repository.conf = { + REPOSITORY_STORAGE: REPOSITORY_STORAGE, + REPOSITORY_PERMISSION_FILE: REPOSITORY_P...
[directories_at_path,create,new,describe,it,nil?,to,root,before,let!,require,reload!,include,get_transaction,get_repo,context,get_latest_revision,be_a,build,files_at_path,eq,add,commit]
Describe objects with a git repository retrieves an object of type Repository :: RevisionDirectory.
Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
@@ -111,8 +111,8 @@ namespace System.IO.Pipes public virtual System.IO.Pipes.PipeTransmissionMode ReadMode { get { throw null; } set { } } public Microsoft.Win32.SafeHandles.SafePipeHandle SafePipeHandle { get { throw null; } } public virtual System.IO.Pipes.PipeTransmissionMode TransmissionM...
[No CFG could be retrieved]
Override BeginRead and EndWrite.
The `callback` should be nullable for both BeginXx methods, too.
@@ -412,10 +412,15 @@ class UM3OutputDevicePlugin(OutputDevicePlugin): active_machine = self._application.getMachineManager().activeMachine # type: Optional["GlobalStack"] if active_machine: - # Check 1: Printer isn't already configured for cloud + # Check 1A: Print...
[UM3OutputDevicePlugin->[_onMachineSwitched->[checkCloudFlowIsPossible],stop->[stop],removeManualDevice->[resetLastManualDevice],start->[start],startDiscovery->[resetLastManualDevice]]]
Checks if cloud connection is possible.
Suggestion: Use `parseBool` instead of `is True`
@@ -19,11 +19,13 @@ class PreloadPConfigAdapter extends AbstractDbaConfigAdapter implements IPConfig private $config_loaded; /** + * {@inheritDoc} + * * @param int $uid The UID of the current user */ - public function __construct($uid = null) + public function __construct(Database $dba, $uid = null) { -...
[PreloadPConfigAdapter->[delete->[load],set->[get,load],get->[load]]]
Initialize the object.
The `$uid` parameter is useless, the Adapter is created before we know if a user is logged in or not. As a result, the subsequent `load` call in the constructor is never called. Now the pconfig shouldn't be load in its entirety from the table because it wouldn't scale with the number of users, so it has to be on-demand...
@@ -0,0 +1,9 @@ +from .models import Channel + + +def raise_channel_validation(): + """Enable validation if there are more than 2 channels.""" + count = Channel.objects.count() + if count >= 2: + return True + return False
[No CFG could be retrieved]
No Summary Found.
When we merge #5818 you should use `get_default_channel_slug_if_available` for getting default channel.
@@ -84,6 +84,15 @@ def setup_logging(stream=None, conf_fname=None, env_var='BORG_LOGGING_CONF', lev borg_logger.json = json logger.debug('using logging configuration read from "{0}"'.format(conf_fname)) warnings.showwarning = _log_warning + if level: + # ...
[create_logger->[LazyLogger->[warning->[warning],info->[info],exception->[exception],error->[error],debug->[debug],__init__->[find_parent_module],critical->[critical],getChild->[LazyLogger],log->[log],setLevel->[setLevel]],LazyLogger]]
setup logging module according to the arguments provided. This function is called when a new log entry is found. It is called by the Repository.
if level is not None:
@@ -761,12 +761,13 @@ void Server::handleCommand_ChatMessage(NetworkPacket* pkt) message += (wchar_t)tmp_wchar; } - RemotePlayer *player = m_env->getPlayer(pkt->getPeerId()); + session_t peer_id = pkt->getPeerId(); + RemotePlayer *player = m_env->getPlayer(peer_id); if (player == NULL) { - errorstream << "Ser...
[handleCommand_Interact->[process_PlayerPos,checkInteractDistance],handleCommand_PlayerPos->[process_PlayerPos]]
Handle a command from a client that is sent to a client.
i don't think this way to call errorstream is compliant with our guidelines no ?
@@ -32,8 +32,16 @@ namespace ILCompiler { _r2rFieldLayoutAlgorithm = new ReadyToRunMetadataFieldLayoutAlgorithm(); _systemObjectFieldLayoutAlgorithm = new SystemObjectFieldLayoutAlgorithm(_r2rFieldLayoutAlgorithm); - _vectorOfTFieldLayoutAlgorithm = new VectorOfTFieldLayout...
[ReadyToRunCompilerContext->[SetCompilationGroup->[SetCompilationGroup]],VectorOfTFieldLayoutAlgorithm->[ComputeContainsGCPointers->[ComputeContainsGCPointers]]]
Override GetLayoutAlgorithmForType to return a layout algorithm for the given type.
I would inline this `matchingVectorType` computation into the place where the algorithm needs the name - not sure if putting the logic here is buying us anything, besides the burden of having to pipe through an extra string.
@@ -201,7 +201,7 @@ func (orm *ORM) FindInitiator(ID int64) (initr models.Initiator, err error) { return initr, err } return initr, orm.DB. - Set("gorm:auto_preload", true). + Preload(clause.Associations). First(&initr, "id = ?", ID).Error }
[preloadJobRuns->[Unscoped],createJob->[MustEnsureAdvisoryLock],ClearNonCurrentSessions->[MustEnsureAdvisoryLock],ArchiveJob->[convenientTransaction],JobRunsSortedFor->[MustEnsureAdvisoryLock,JobRunsCountFor,preloadJobRuns],CreateBridgeType->[MustEnsureAdvisoryLock],UpdateBridgeType->[MustEnsureAdvisoryLock],PendingBri...
FindInitiator returns the first Initiator with the given ID.
I hate this with all my heart, can we make it explicit please?
@@ -141,9 +141,14 @@ require_once 'includes/modal/delete_service.inc.php'; } else { $sql_param[0] = $device_id; } - $head = true; - foreach (dbFetchRows("SELECT * FROM `services` WHERE `device_id` = ? $where ORDER...
[No CFG could be retrieved]
This function returns a list of all device - related services that can be found in the database Renders the panel.
I'd like to see better variable names that describe what data they contain. Same for the two below.
@@ -41,7 +41,10 @@ namespace Dynamo.Models private int currentPasteOffset = 0; internal int CurrentPasteOffset { - get { return currentPasteOffset; } + get + { + return currentPasteOffset == 0 ? PASTE_OFFSET_STEP : currentPasteOffset; + ...
[WorkspaceModel->[SaveAs->[OnWorkspaceSaved],Clear->[ClearNodes,Clear,Dispose],AddAnnotation->[AddNewAnnotation],AddNode->[OnNodeAdded],AddAndRegisterNode->[AddNode,OnRequestNodeCentered],SaveInternal->[Save],DeleteModel->[Dispose,RemoveNote,RemovePreset,RemoveNode],ClearAnnotations->[Clear,OnAnnotationsCleared],Reload...
Creates a model which can be used to perform a single paste operation. A function that can be used to repsond to a saved workspace.
We've been correcting `const` values to use camel case. Can we make this `PasteOffsetStep`?
@@ -12,7 +12,7 @@ import ( "github.com/harmony-one/harmony/p2p/host" "github.com/harmony-one/harmony/services/explorer" - consensus2 "github.com/harmony-one/harmony/consensus/proto" + consensus_proto "github.com/harmony-one/harmony/api/consensus" "github.com/harmony-one/harmony/profiler" "github.com/dedis/k...
[reportMetrics->[Info,Hash,Seconds,GetProfiler,Transactions,Now,String,Sub,LogMetrics,EncodeToString],WaitForNewBlock->[RemovePeers,HasEnoughValidators,Transactions,Now,ResetState,startConsensus,Sleep,Debug],ProcessMessageLeader->[Error,processResponseMessage,GetConsensusMessagePayload,processCommitMessage,GetConsensus...
WaitForNewBlock waits for a new block to run consensus on ProcessMessageLeader dispatches a message to the leader of the consensus transaction.
i don't see any api folder in this PR and in master
@@ -1638,6 +1638,13 @@ func (pkg *pkgContext) genResource(w io.Writer, r *schema.Resource, generateReso fmt.Fprint(w, "\topts = append(opts, replaceOnChanges)\n") } + // Setup PluginDownloadURL. We pre-append our call to PluginDownloadURL to + // that if a user adds their own separate PluginDownloadURL, we won't...
[outputType->[outputTypeImpl],outputTypeImpl->[resolveObjectType,outputTypeImpl,resolveResourceType,tokenToType,tokenToEnum],genEnumRegistrations->[detailsForType,tokenToEnum],genOutputTypes->[detailsForType,tokenToType,typeString,outputType],functionResultTypeName->[functionName],genResourceModule->[genHeader],argsTyp...
genResource generates a resource definition in the given writer. Produce the inputs. Deref is a debug - friendly output for the missing - arguments. The command line interface for the unknown - secret protocol.
I wonder if we should emit a utility function in the generated `pulumiUtilities.go` for this (only if `PluginDownloadURL` is set), to reduce the amount of duplicated code for each resource.
@@ -463,7 +463,11 @@ public class UCFGJavaVisitor extends BaseTreeVisitor implements JavaFileScanner return isObject(var.type().symbolType()); } - private static boolean isObject(Type type) { + private static boolean isObject(@Nullable Type type) { + if (type == null) { + // typeless arrays will hav...
[UCFGJavaVisitor->[IdentifierGenerator->[lookupIdFor->[lookupIdFor],lookupExpressionFor->[isConst]],location->[location],visitMethod->[visitMethod],isObject->[isObject]]]
Checks if a variable declaration is an object variable.
cast to ArrayType
@@ -34,6 +34,9 @@ import java.util.TreeSet; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; + +import com.google.common.collect.*; +import com.typesafe.config.*; import org.apache.commons.lang3.StringUtils; import com.google.common.base.Function;
[ConfigUtils->[getLong->[getLong],propertiesToConfig->[findFullPrefixKeys,propertiesToConfig],getStringList->[getStringList,getString],resolveEncrypted->[getConfig,configToProperties],configToState->[configToProperties],getInt->[getInt],getBoolean->[getBoolean],desanitizeKey->[sanitizedKey],configToProperties->[configT...
Imports a single version of a n - tuple. Common utility class for dealing with Gobblin configuration objects.
It is not recommended to import star.
@@ -410,7 +410,10 @@ class JSONRPCClient: log.debug('send_raw_transaction returned', tx_hash=encode_hex(tx_hash), **log_details) return tx_hash - def poll(self, transaction_hash: bytes, confirmations: int = None): + def poll( + self, + transaction_hash: bytes, + ...
[JSONRPCClient->[poll->[block_number],send_transaction->[check_startgas,gas_price],__init__->[monkey_patch_web3],deploy_solidity_contract->[new_contract_proxy,get_transaction_receipt,dependencies_order_of_build,deploy_dependencies_symbols],check_startgas->[gaslimit]]]
This method is used to send a signed transaction to a node. This function checks if a transaction has a reserved block and waits for it to be accepted.
There's a docstring for `confirmations` which should be removed.
@@ -1,4 +1,5 @@ 'use strict'; +/* global stripHash: true */ var PATH_MATCH = /^([^?#]*)(\?([^#]*))?(#(.*))?$/, DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};
[No CFG could be retrieved]
Encode a path using encodeUriSegment normalize and parse the url. region URL parsing.
One could move `stripHash` global into `browser.js` as well for consistency. Otherwise you have two way importing going on.
@@ -22,6 +22,9 @@ class OriginEventSource { } async getListing(listingId, blockNumber) { + if (blockNumber === undefined) { + blockNumber = this.contract.eventCache.getBlockNumber() + } const id = `${listingId}-${blockNumber}` if (this.listingCache[id]) { return this.listingCache[id]...
[No CFG could be retrieved]
The OriginEventSource class Get the data for a specific .
It seems this change means that every listing ID will include the current block number, meaning the listing ID will change on every block. Do we need this?
@@ -41,6 +41,11 @@ class CategoryCreate(ModelMutation): cleaned_input = super().clean_input(info, instance, input, errors) if 'slug' not in cleaned_input: cleaned_input['slug'] = slugify(cleaned_input['name']) + parent_id = input['parent'] + if parent_id: + parent...
[ProductVariantUpdate->[Arguments->[ProductVariantInput]],VariantImageUnassign->[mutate->[VariantImageUnassign]],CollectionAddProducts->[mutate->[CollectionAddProducts]],CollectionCreate->[Arguments->[CollectionCreateInput]],CategoryUpdate->[Arguments->[CategoryInput]],ProductTypeUpdate->[Arguments->[ProductTypeInput]]...
Clean input for a .
I'd opt for sticking to `parent_id` instead of `parent` to keep it consistent
@@ -423,6 +423,17 @@ EVP_ASYM_CIPHER *EVP_ASYM_CIPHER_fetch(OSSL_LIB_CTX *ctx, const char *algorithm, (void (*)(void *))EVP_ASYM_CIPHER_free); } +EVP_ASYM_CIPHER *evp_asym_cipher_fetch_from_prov(OSSL_PROVIDER *prov, + const char *algorithm...
[No CFG could be retrieved]
private function for EVP_ASYM_CIPHER_free This function returns the number of the specified cipher.
Should this be `const OSSL_PROVIDER *prov`...and for other similar instances?
@@ -54,6 +54,10 @@ static int test_certs(BIO *fp) typedef X509 *(*d2i_X509_t)(X509 **, const unsigned char **, long); typedef int (*i2d_X509_t)(X509 *, unsigned char **); int err = 0; + BIO *fp = BIO_new_file(files[num], "r"); + + if (!TEST_ptr(fp)) + return 0; for (count = 0; ...
[main->[CRYPTO_mem_ctrl,printf,strerror,CRYPTO_mem_leaks,BIO_new_file,getenv,CRYPTO_set_mem_debug,fprintf,strcmp,BIO_free,EXIT,test_certs,test_usage,BIO_new_fp],void->[ERR_get_error_line_data,fprintf,ERR_error_string_n],int->[perror,PEM_read_bio,d2i,OPENSSL_free,memcmp,ERR_GET_REASON,ERR_peek_last_error,print_errors,st...
test_certs - test if a file is a cert cert cert cert cert cert cert cert Checks if the encoded content of the certificate and the certificate are valid. If it is not Check for any errors in PEM file.
A printout of `strerror(errno)` would be suitable here.
@@ -20,7 +20,7 @@ public class TestDbConfig private static boolean USE_DERBY = true; private static boolean USE_MYSQL = false; - private static boolean USE_ORACLE = false; + private static boolean USE_ORACLE = true; public static List<Object[]> getResources()
[TestDbConfig->[getOracleResource->[singletonList,OracleTestDatabase,emptyList],getDerbyResource->[singletonList,DerbyTestDatabase,emptyList],getResources->[getOracleResource,getDerbyResource,getMySqlResource,addAll],getMySqlResource->[singletonList,MySqlTestDatabase,emptyList]]]
Get all resources that are managed by this class.
Revert this change
@@ -133,7 +133,7 @@ abstract class DnsNameResolverContext<T> { public void operationComplete(Future<AddressedEnvelope<DnsResponse, InetSocketAddress>> future) { queriesInProgress.remove(future); - if (promise.isDone()) { + if (promise.isDone() || future.isCa...
[DnsNameResolverContext->[tryToFinishResolve->[query],onResponse->[query],finishResolve->[finishResolve],onResponseCNAME->[onResponseCNAME],followCname->[query],query->[operationComplete->[query],query]]]
Query the server.
huh ? isDone() should be true if isCancelled() is be true. What I'm missing here ?
@@ -437,8 +437,17 @@ func (h *serviceHandler) setHeaderCacheForever() { h.w.Header().Set("Cache-Control", "public, max-age=31536000") } +// sendFile send the provided content from a file func (h *serviceHandler) sendFile(contentType, file string) { - reqFile := path.Join(h.dir, file) + reqFile := filepath.Join(h....
[sendFile->[IsNotExist,Header,ModTime,Join,Size,Stat,Format,Sprintf,ServeFile,Set,WriteHeader],setHeaderNoCache->[Header,Set],setHeaderCacheForever->[Header,Unix,Sprintf,Now,Set],Status,TempDir,HasPrefix,IsErrRepoNotExist,GetOwner,GetUserRepoPermission,MustCompile,RunInDirBytes,LookupRepoRedirect,HasSuffix,ServerError,...
setHeaderCacheForever sends a file with a cache forever.
I'm not sure that this is strictly necessary anymore after the changes in GetTextFile but it's potentially good practice
@@ -1117,6 +1117,7 @@ def boolean_mask(tensor, mask, name="boolean_mask"): Args: tensor: N-D tensor. mask: K-D boolean tensor, K <= N and K must be known statically. + axis: The axis in `tensor` to mask from. Defaults to the first dimension. name: A name for this operation (optional). Retur...
[identity->[identity],reverse_sequence->[reverse_sequence],boolean_mask->[_apply_mask_1d,shape,concat],rank_internal->[size,rank],_SliceHelperVar->[_SliceHelper],sparse_placeholder->[_normalize_sparse_shape,placeholder],gather->[gather],transpose->[transpose,rank],ones_like->[shape_internal],_get_dtype_from_nested_list...
Applies boolean mask to tensor. Compute a single - dimensional nanoseconds.
What if mask isn't a 1-D tensor?
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2018 IBM Corp. and others + * Copyright (c) 2018, 2019 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2...
[Test_String->[testStrip->[assertEquals,assertSame,strip],testValueOfCodePoint->[getDeclaredMethod,codePointAt,setAccessible,invoke,assertEquals,fail],testStripLeading->[stripLeading,assertEquals,assertSame],testIsblank->[assertTrue,isBlank,assertFalse],testStripTrailing->[assertEquals,assertSame,stripTrailing],testRep...
Creates a new instance of the System. Reads the String from the system.
some other tests you could consider are - what happens when `|n|` is greater or less than the number of characters in your string? - I think it would be good to have tests for different kinds of strings like the empty string and string without a line ending etc
@@ -125,6 +125,10 @@ class AmpSocialShare extends AMP.BaseElement { /** @override */ layoutCallback() { + if (!this.shareEndpoint_) { + return Promise.resolve(); + } + const hrefWithVars = addParamsToUrl( dev().assertString(this.shareEndpoint_), this.params_
[No CFG could be retrieved]
This method is called when the user clicks on a link in the social share window. It Missing link for link - based elements.
No user error/warning?
@@ -63,7 +63,7 @@ public abstract class BaseRpcInterceptor extends DDAsyncInterceptor { staggeredOptions = rpcManager.getRpcOptionsBuilder(ResponseMode.WAIT_FOR_VALID_RESPONSE, DeliverOrder.NONE).responseFilter(new ResponseFilter() { @Override public boolean isAcceptable(Response response, Ad...
[BaseRpcInterceptor->[totalOrderPrepare->[transactionRemotelyPrepared]]]
Initializes the cache.
Since this filter is stateless, couldn't we cache it in a `static final`?
@@ -20,7 +20,8 @@ type DependencyGraph struct { // order with respect to the snapshot dependency graph. // // The time complexity of DependingOn is linear with respect to the number of resources. -func (dg *DependencyGraph) DependingOn(res *resource.State, ignore map[resource.URN]bool) []*resource.State { +func (dg ...
[DependingOn->[ParseReference,URN,Assert],DependenciesOf->[ParseReference,URN,Assert]]
DependingOn returns a list of resources that depend on the given resource. Returns a set of dependents that are dependent on the given candidate.
I'm wondering whether this should be `includeChildren=true` always. It's great to be conservative with the change here so we minimize blast radius, but we should follow up to figure this out what the implications here are..
@@ -407,8 +407,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, //v3f wield_rotation = v3f(-100, 120, -100); v3f wield_rotation = v3f(-100, 120, -100); wield_position.Y += fabs(m_wield_change_timer)*320 - 40; - if(m_digging_anim < 0.05 || m_digging_anim > 0.5) - { + if(m_digging_anim < 0...
[step->[event,my_modf,setItem,MYMIN,fabs],successfullyCreated->[empty,clear],f32->[modf],drawNametags->[getProjectionMatrix,getAlpha,utf8_to_wide,multiplyWith1x4Matrix,getPosition,end,getScreenSize,begin,getFont,v3f,getViewMatrix],removeNametag->[remove],drawWieldedTool->[,getAbsoluteTransformation,setPosition,getAspec...
This is the main entry point for the camera. This function is called from the camera when it is in a lighting state. - - - - - - - - - - - - - - - - - - This function is called from the game object when it is about to move the camera.
Incidently, does anyone know what this block actually _does_?