patch
stringlengths
18
160k
callgraph
stringlengths
4
179k
summary
stringlengths
4
947
msg
stringlengths
6
3.42k
@@ -276,7 +276,7 @@ class Cmake(Package): # When building our own private copy of curl then we need to properly # enable / disable oepnssl - if '+ownlibs' in spec: + if '+openssl' in spec and '+ownlibs' not in spec: args.append('-DCMAKE_USE_OPENSSL=%s' % str('+openssl' in spec)) args.append('-DBUILD_CursesDialog=%s' % str('+ncurses' in spec))
[Cmake->[install->[filter_file,make,find,satisfies],build_test->[make],determine_version->[group,Executable,search],build->[make],bootstrap->[bootstrap,Executable,bootstrap_args],test->[run_test,format],flag_handler->[append,any,ValueError],bootstrap_args->[satisfies,append,extend,str,format,join,get_cmake_prefix_path,get_rpaths],depends_on,conflicts,version,patch,on_package_attributes,variant,run_after]]
Returns the command line arguments for the CMake bootstrap. Returns a list of args that can be passed to the command line.
This change is confusing for me - it seems like we are reversing the current logic?
@@ -104,3 +104,13 @@ class AsyncKeyVaultClientBase: @property def vault_url(self) -> str: return self._vault_url + + async def __aenter__(self) -> "AsyncKeyVaultClientBase": + await self._client.__aenter__() + return self + + async def __aexit__(self, *args) -> None: + await self.close(*args) + + async def close(self, *args): + await self._client.__aexit__(*args)
[AsyncKeyVaultClientBase->[__init__->[_create_config]]]
Returns the vault URL.
`close` needs no parameters, and should have a simple docstring like "Closes sockets opened by the client".
@@ -636,13 +636,16 @@ entry_stat(dfs_t *dfs, daos_handle_t th, daos_handle_t oh, const char *name, /* Check if parent has the entry */ rc = fetch_entry(oh, th, name, len, true, &exists, &entry, - 0, NULL, NULL, NULL); + xnr, xnames, xvals, xsizes); if (rc) return rc; if (!exists) return ENOENT; + if (eoid && (eoid->hi != entry.oid.hi || eoid->lo != entry.oid.lo)) + return ENOENT; + if (obj && (obj->oid.hi != entry.oid.hi || obj->oid.lo != entry.oid.lo)) return ENOENT;
[dfs_mount_root_cont->[dfs_cont_create,dfs_mount],dfs_umount_root_cont->[dfs_umount],int->[dfs_oclass_select],dfs_obj_local2global->[dfs_get_chunk_size],dfs_cont_create->[dfs_oclass_select],dfs_chmod->[dfs_release],dfs_access->[dfs_release]]
This function returns the stat information of an entry in the object tree. D - D - F - I - D - F - I - D - F -.
obj is only used in this function for checkout the expected oid so this function doesn't need to take and check both, it's probably better to keep eiod rather than obj however.
@@ -362,7 +362,7 @@ public class SlaveComputer extends Computer { * Creates a {@link Channel} from the given stream and sets that to this agent. * * @param in - * Stream connected to the remote "slave.jar". It's the caller's responsibility to do + * Stream connected to the remote "agent.jar". It's the caller's responsibility to do * buffering on this stream, if that's necessary. * @param out * Stream connected to the remote peer. It's the caller's responsibility to do
[SlaveComputer->[getRetentionStrategy->[getNode,getRetentionStrategy],setNode->[setNode],getClassLoadingTime->[call],getResourceLoadingCount->[call],getNode->[getNode],grabLauncher->[getLauncher],taskCompleted->[taskCompleted],taskCompletedWithProblems->[taskCompletedWithProblems],getIcon->[getIcon],disconnect->[disconnect],getResourceLoadingTime->[call],getOSDescription->[call],getSlaveVersion->[call],isAcceptingTasks->[isAcceptingTasks],getLogRecords->[call],getClassLoadingCount->[call],taskAccepted->[getNode,taskAccepted],isLaunchSupported->[isLaunchSupported],getClassLoadingPrefetchCacheCount->[call],kill->[kill],setChannel->[getNode,call,setChannel]]]
Creates a channel from the given input stream and outputs it to the given output stream. Reads the n - node from the input and output.
"To the remote agent"
@@ -1473,7 +1473,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NETWORK_OFFERING_ASSIGN, vmInstance.getAccountId(), vmInstance.getDataCenterId(), vmInstance.getId(), oldNicIdString, oldNetworkOfferingId, null, 0L, VirtualMachine.class.getName(), vmInstance.getUuid(), vmInstance.isDisplay()); - if (vmInstance.getState() != State.Stopped) { + if (vmInstance.getState() == State.Running) { try { VirtualMachineProfile vmProfile = new VirtualMachineProfileImpl(vmInstance); User callerUser = _accountMgr.getActiveUser(CallContext.current().getCallingUserId());
[UserVmManagerImpl->[removeInstanceFromInstanceGroup->[expunge],applyUserData->[getName],moveVMToUser->[doInTransactionWithoutResult->[getName,resourceCountIncrement,resourceCountDecrement],removeInstanceFromInstanceGroup,resourceLimitCheck,getName,getVmId,getSecurityGroupIdList],loadVmDetailsInMapForExternalDhcpIp->[VmAndCountDetails],expungeVm->[expunge],commitUserVm->[doInTransaction->[getName,resourceCountIncrement,createVirtualMachine]],finalizeStop->[getVirtualMachine,setupVmForPvlan],createVmGroup->[createVmGroup],generateNetworkUsageForVm->[getName],updateVmStateForFailedVmCreation->[resourceCountDecrement],rebootVirtualMachine->[rebootVirtualMachine,VmAndCountDetails],upgradeVirtualMachine->[upgradeStoppedVirtualMachine,upgradeVirtualMachine],createVirtualMachine->[resourceLimitCheck,validateCustomParameters,addInstanceToGroup,createAdvancedVirtualMachine,getName,createAdvancedSecurityGroupVirtualMachine,createBasicSecurityGroupVirtualMachine,checkNameForRFCCompliance],deleteVmGroup->[expunge,deleteVmGroup],collectVmNetworkStatistics->[doInTransactionWithoutResult->[getName],getName],upgradeRunningVirtualMachine->[validateCustomParameters],addNicToVirtualMachine->[getVmId],finalizeStart->[doInTransactionWithoutResult->[VmAndCountDetails],getName,getVirtualMachine,setupVmForPvlan],collectVmDiskStatistics->[doInTransactionWithoutResult->[getName],getName],migrateVirtualMachineWithVolume->[getName,checkHostsDedication,isVMUsingLocalStorage],addExtraConfig->[persistExtraConfigNonVmware,persistExtraConfigVmware],updateVirtualMachine->[getName,saveExtraDhcpOptions,updateVirtualMachine],recoverVirtualMachine->[doInTransactionWithoutResult->[resourceLimitCheck,resourceCountIncrement]],restoreVM->[getVmId],upgradeStoppedVirtualMachine->[validateCustomParameters],VmIpAddrFetchThread->[runInContext->[decrementCount,getRetrievalCount]],saveExtraDhcpOptions->[saveExtraDhcpOptions],getSecurityGroupIdList->[getSecurityGroupIdList],migrateVirtualMachine->[collectVmDiskStatistics,getName,collectVmNetworkStatistics,isVMUsingLocalStorage],updateDefaultNicForVirtualMachine->[getVmId],checkIfAllVmsCreatedInStrictMode->[isServiceOfferingUsingPlannerInPreferredMode],checkHostsDedication->[accountOfDedicatedHost,getName,checkIfHostIsDedicated,domainOfDedicatedHost],VmIpFetchTask->[runInContext->[VmIpAddrFetchThread,getVirtualMachine,getRetrievalCount,getVmId]],prepareStop->[collectVmDiskStatistics,collectVmNetworkStatistics],addInstanceToGroup->[doInTransactionWithoutResult->[getName,expunge],createVmGroup],generateUsageEvent->[getName],destroyVm->[expunge,getName,destroyVm,getVirtualMachine,resourceCountDecrement,stopVirtualMachine],stopVirtualMachine->[stop,getVirtualMachine],removeNicFromVirtualMachine->[getVmId],restoreVMInternal->[start,getName,stop,resetVMPasswordInternal],startVirtualMachine->[updateVmStateForFailedVmCreation,getVirtualMachine,validPassword,startVirtualMachine]]]
Updates the default NIC for a virtual machine. set default nic for a VM This method is called to update the default network for a VM instance. Checks if a VM is stopped.
Log warning perhaps if this method is called when not in running state?
@@ -495,10 +495,10 @@ public class QueueTest { assertThat("The cycle should have been defanged and chain3 executed", queue.getItem(chain3), nullValue()); } - private static class TestFlyweightTask extends TestTask implements Queue.FlyweightTask { + public static class TestFlyweightTask extends TestTask implements Queue.FlyweightTask { Executor exec; private final Label assignedLabel; - TestFlyweightTask(AtomicInteger cnt, Label assignedLabel) { + public TestFlyweightTask(AtomicInteger cnt, Label assignedLabel) { super(cnt); this.assignedLabel = assignedLabel; }
[QueueTest->[queueApiOutputShouldBeFilteredByUserPermission->[equals],TestTask->[hashCode->[hashCode],createExecutable->[run->[doRun]]],pendingsConsistenceAfterErrorDuringMaintain->[equals,getName,getDisplayName],testBlockBuildWhenUpstreamBuildingLock->[save],permissionSensitiveSlaveAllocations->[getACL->[getACL]],shouldBeAbleToBlockFlyweightTaskAtTheLastMinute->[equals,getDisplayName],fileItemPersistence->[FileItemPersistenceTestServlet],BlockDownstreamProjectExecution->[canTake->[equals]],waitForStart->[waitForStart],waitForStartAndCancelBeforeStart->[waitForStart]]]
In order to build the upstream upstream build the upstream build is a special case. If the current executor is null then the current executor is null.
Maybe better to move it to the Jenkins Test Harness lib
@@ -475,6 +475,8 @@ func (h *UserHandler) proofSuggestionsHelper(mctx libkb.MetaContext) (ret []Proo switch displayConfig.Key { case "zcash.t", "zcash.z", "zcash.s": altKey = "zcash" + case "bitcoin": + altKey = "btc" case "http", "https", "dns": altKey = "web" }
[LoadUserPlusKeys->[LoadUserPlusKeys],loadPublicKeys->[LoadUser],LoadUser->[LoadUser],InterestingPeople->[loadUsername],FindNextMerkleRootAfterRevoke->[FindNextMerkleRootAfterRevoke],LoadUserByName->[LoadUser],FindNextMerkleRootAfterReset->[FindNextMerkleRootAfterReset]]
proofSuggestionsHelper returns a list of proofs that can be accepted by the user. Returns a list of proofs that suggest a key that is not available in the user s This function is used to sort the list of keys in the order offline and offline.
this this affect ident2?
@@ -220,7 +220,7 @@ docsApp.directive.docModuleComponents = function() { ' </tr>' + ' <tr ng-repeat="component in section.components">' + ' <td><a ng-href="{{ component.url }}">{{ component.shortName }}</a></td>' + - ' <td>{{ component.shortDescription }}</td>' + + ' <td ng-bind-html="component.shortDescription"></td>' + ' </tr>' + ' </table>' + ' </div>' +
[No CFG could be retrieved]
JS - DAG Add the components to the api section.
I don't understand why this is needed.
@@ -297,4 +297,4 @@ public class TestHoodieTableFactory { return false; } } -} +} \ No newline at end of file
[TestHoodieTableFactory->[MockContext->[getInstance->[MockContext,getInstance]]]]
Returns true if the is a temporary condition.
nit: new line
@@ -277,11 +277,13 @@ def mixed_norm(evoked, forward, noise_cov, alpha, loose=0.2, depth=0.8, Noise covariance to compute whitener. alpha : float Regularization parameter. - loose : float in [0, 1] + loose : float in [0, 1] | 'auto' | None Value that weights the source variances of the dipole components that are parallel (tangential) to the cortical surface. If loose is 0 or None then the solution is computed with fixed orientation. If loose is 1, it corresponds to free orientations. + If 'auto' then it defaults to 0.2 for surface-oriented source space + and to 1.0 for volumic or discrete source space. depth: None | float in [0, 1] Depth weighting coefficients. If None, no depth weighting is performed. maxit : int
[tf_mixed_norm->[_make_sparse_stc,_reapply_source_weighting,_prepare_gain,_make_dipoles_sparse,_compute_residual,_window_evoked],mixed_norm->[_reapply_source_weighting,_prepare_gain,_make_sparse_stc,_compute_residual,_make_dipoles_sparse],_prepare_gain->[_prepare_gain_column],_prepare_gain_column->[_prepare_weights]]
Mixed - norm estimate. Parameters for the algorithm to use. Computes a single residue of the n - th residue in the network. Compute the active dipoles given a mixed - norm model. Computes a from the active set.
This is different from two of the others, but they should all be identical IIUC
@@ -45,7 +45,7 @@ public abstract class CauseOfBlockage { * Obtains a simple implementation backed by {@link Localizable}. */ public static CauseOfBlockage fromMessage(@NonNull final Localizable l) { - l.getKey(); // null check + Objects.requireNonNull(l); return new CauseOfBlockage() { @Override public String getShortDescription() {
[CauseOfBlockage->[print->[getShortDescription],toString->[getShortDescription],NeedsMoreExecutorImpl->[getShortDescription->[toString]],fromMessage->[CauseOfBlockage]]]
Create a new CauseOfBlockage from a Localizable object.
A more direct way of expressing the same concept that also aids the static analyzer.
@@ -143,8 +143,10 @@ class CLI_Command extends WP_CLI_Command { $update_type = 'patch'; } - if ( ! ( isset( $assoc_args['patch'] ) && 'patch' !== $update_type ) - && ! ( isset( $assoc_args['minor'] ) && 'minor' !== $update_type ) + if ( ! ( isset( $assoc_args['patch'] ) && $assoc_args['patch'] && 'patch' !== $update_type ) + && ! ( isset( $assoc_args['patch'] ) && ! $assoc_args['patch'] && 'patch' === $update_type ) + && ! ( isset( $assoc_args['minor'] ) && $assoc_args['minor'] && 'minor' !== $update_type ) + && ! ( isset( $assoc_args['minor'] ) && ! $assoc_args['minor'] && 'minor' === $update_type ) && ! $this->same_minor_release( $release_parts, $updates ) ) { $updates[] = array(
[CLI_Command->[check_update->[same_minor_release]]]
Checks if a release is updated. \ brief Show the version of the package. \ details.
What is the purpose of adding `! $assoc_args['patch']`?
@@ -45,6 +45,14 @@ class AbstractTarget(object): """ return tuple() + @classmethod + def alias(cls): + """Subclasses should return their desired BUILD file alias. + + :rtype: string + """ + raise NotImplementedError() + # TODO: Kill this in 1.5.0.dev0, once this old-style resource specification is gone. @property def has_resources(self):
[Target->[sources_relative_to_source_root->[has_sources,sources_relative_to_buildroot],sources_relative_to_buildroot->[has_sources],maybe_readable_combine_ids->[combine_ids],invalidation_hash->[compute_invalidation_hash],transitive_invalidation_hash->[dep_hash_iter->[RecursiveDepthError,invalidation_hash,transitive_invalidation_hash],RecursiveDepthError,dep_hash_iter,invalidation_hash],assert_list->[assert_list],id->[compute_target_id],inject_dependency->[invalidate_dependee->[mark_transitive_invalidation_hash_dirty],inject_dependency],Arguments->[check_unknown->[UnknownArgumentError]],__ne__->[__eq__],__init__->[check],create_sources_field->[supports_default_sources,default_sources],has_sources->[has_sources],closure_for_targets->[_closure_predicate],closure->[closure_for_targets],mark_invalidation_hash_dirty->[mark_extra_invalidation_hash_dirty]]]
Returns a tuple of subsystem types this target uses.
This doesn't seem necessary... currently only really used explicitly for macros?
@@ -11,6 +11,7 @@ Rails.application.routes.draw do via: %i[get post delete], as: :destroy_user_session match '/api/saml/auth' => 'saml_idp#auth', via: %i[get post] + post '/analytics' => 'analytics#create' # SAML secret rotation paths if FeatureManagement.enable_saml_cert_rotation?
[redirect,devise_scope,join,put,draw,root,scope,post,webauthn_enabled?,enable_usps_verification?,enable_identity_verification?,rotation_path_suffix,enable_saml_cert_rotation?,patch,devise_for,match,delete,namespace,get,doc_auth_enabled?,enable_test_routes]
This method is used to generate routes that are used by the application. Routes that handle login. Alphabetically sorted.
This endpoint shouldn't be exposed unless a feature is enabled to use it.
@@ -787,6 +787,14 @@ Service_Participant::initialize() initial_SubscriberQos_.partition = initial_PartitionQosPolicy_; initial_SubscriberQos_.group_data = initial_GroupDataQosPolicy_; initial_SubscriberQos_.entity_factory = initial_EntityFactoryQosPolicy_; + + initial_TypeConsistencyEnforcementQosPolicy_.kind = DDS::ALLOW_TYPE_COERCION; + initial_TypeConsistencyEnforcementQosPolicy_.prevent_type_widening = false; + initial_TypeConsistencyEnforcementQosPolicy_.ignore_sequence_bounds = true; + initial_TypeConsistencyEnforcementQosPolicy_.ignore_string_bounds = true; + initial_TypeConsistencyEnforcementQosPolicy_.ignore_member_names = false; + initial_TypeConsistencyEnforcementQosPolicy_.force_type_validation = false; + } void
[No CFG could be retrieved]
Initializes the scheduling. Initialize the scheduling policy.
ignore_member_names should be treated like its name suggests. In our case, we do want to ignore the names of members for assignability so we should set it to true. The spec has an issue regarding this setting so we should treat it as the name suggests rather than how the spec suggests until we get further clarification from OMG.
@@ -6,7 +6,7 @@ * Copyright (c) 2000-2015 John Willinsky * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. * - * @class OjsAuthorDashboardAccessPolicy + * @class OjsJournalMustPublishPolicy * @ingroup security_authorization * * @brief Class to control access to OMP author dashboard.
[OjsJournalMustPublishPolicy->[effect->[getAuthorizedContextObject,getSetting]]]
Creates a new object of type OjsAuthorDashboardAccessPolicy that can be used to see.
I think this is also wrong
@@ -1644,8 +1644,11 @@ def unicode_getitem(s, idx): if isinstance(idx, types.Integer): def getitem_char(s, idx): idx = normalize_str_idx(idx, len(s)) - ret = _empty_string(s._kind, 1, s._is_ascii) - _set_code_point(ret, 0, _get_code_point(s, idx)) + cp = _get_code_point(s, idx) + kind = _codepoint_to_kind(cp) + is_ascii = _codepoint_is_ascii(cp) + ret = _empty_string(kind, 1, is_ascii) + _set_code_point(ret, 0, cp) return ret return getitem_char elif isinstance(idx, types.SliceType):
[unicode_casefold->[case_operation],unicode_rsplit->[rsplit_impl->[_rsplit_char->[_get_code_point],_rsplit_char],_unicode_rsplit_check_type],_unicode_casefold->[_set_code_point,_get_code_point],_empty_string->[_malloc_string],unicode_eq->[eq_impl->[_cmp_region]],unicode_istitle->[impl->[_get_code_point]],unicode_join->[join_iter_impl->[join_list],join_str_impl->[join_list],join_list_impl->[join_list]],unicode_find->[unicode_sub_check_type,unicode_idx_check_type],unicode_split->[split_impl->[_cmp_region,_get_code_point],split_whitespace_impl->[_get_code_point]],_finder->[_cmp_region],unicode_repeat->[wrap->[_repeat_impl]],_unicode_capitalize->[_lower_ucs4,_set_code_point,_get_code_point],generate_splitlines_func->[impl->[_get_code_point]],set_uint16->[make_set_codegen],unicode_strip->[strip_impl->[unicode_strip_left_bound,unicode_strip_right_bound],unicode_strip_types_check],_rfinder->[_cmp_region],_set_code_point->[set_uint32,set_uint8,set_uint16],unicode_gt->[gt_impl->[_cmp_region]],unicode_lt->[lt_impl->[_cmp_region]],case_operation->[impl->[_empty_string,_codepoint_is_ascii,_codepoint_to_kind,_get_code_point,_set_code_point]],_unicode_title->[_lower_ucs4,_set_code_point,_get_code_point],ol_ord->[impl->[_get_code_point]],unicode_islower->[impl->[_get_code_point]],unicode_upper->[case_operation],unicode_expandtabs->[expandtabs_impl->[_empty_string,_set_code_point,_get_code_point]],unicode_partition->[impl->[_empty_string]],make_string_from_constant->[compile_time_get_string_data],unicode_index->[unicode_sub_check_type,unicode_idx_check_type],_lower_ucs4->[_handle_capital_sigma],unicode_getitem->[getitem_char->[_empty_string,normalize_str_idx,_get_code_point,_set_code_point],getitem_slice->[_normalize_slice,_get_str_slice_view,_empty_string,_get_code_point,_slice_span,_set_code_point]],iternext_unicode->[len_impl],deref_uint32->[make_deref_codegen],_get_code_point->[deref_uint16,deref_uint32,deref_uint8],join_list->[_empty_string,_pick_kind,_pick_ascii],unicode_rfind->[unicode_sub_check_type,unicode_idx_check_type],_ascii_capitalize->[_set_code_point,_get_code_point],_is_upper->[impl->[_get_code_point]],unicode_title->[case_operation],_PyUnicode_FromOrdinal->[_unicode_char],UnicodeModel->[__init__->[__init__]],_unicode_swapcase->[_lower_ucs4,_set_code_point,_get_code_point],gen_isAlX->[unicode_isAlX->[impl->[_get_code_point]]],gen_isX->[unicode_isX->[impl->[_get_code_point]]],deref_uint16->[make_deref_codegen],_ascii_swapcase->[_set_code_point,_get_code_point],generate_rsplit_whitespace_impl->[rsplit_whitespace_impl->[_get_code_point]],ol_chr->[impl->[_PyUnicode_FromOrdinal]],unicode_capitalize->[case_operation],unicode_rstrip->[rstrip_impl->[unicode_strip_right_bound],unicode_strip_types_check],unicode_lower->[case_operation],unicode_swapcase->[case_operation],unicode_endswith->[endswith_impl->[_cmp_region,_adjust_indices]],unicode_startswith->[startswith_impl->[_cmp_region]],_handle_capital_sigma->[_get_code_point],set_uint8->[make_set_codegen],_gen_unicode_upper_or_lower->[_do_upper_or_lower->[_lower_ucs4,_set_code_point,_get_code_point]],_gen_ascii_upper_or_lower->[_ascii_upper_or_lower->[_set_code_point,_get_code_point]],_ascii_title->[_set_code_point,_get_code_point],unicode_rpartition->[impl->[_empty_string]],set_uint32->[make_set_codegen],unicode_rindex->[unicode_sub_check_type,unicode_idx_check_type],_repeat_impl->[_empty_string,_strncpy],constant_unicode->[make_string_from_constant],deref_uint8->[make_deref_codegen],_ascii_casefold->[_set_code_point,_get_code_point],_strncpy->[_get_code_point,_set_code_point,_kind_to_byte_width],cast_from_literal->[make_string_from_constant],_unicode_char->[_empty_string,_set_code_point,_codepoint_to_kind],_cmp_region->[_get_code_point],unicode_concat->[concat_impl->[_pick_kind,_empty_string,_get_code_point,_set_code_point,_pick_ascii]],unicode_lstrip->[lstrip_impl->[unicode_strip_left_bound],unicode_strip_types_check],unicode_isidentifier->[impl->[_get_code_point]],generate_finder,generate_rsplit_whitespace_impl,gen_unicode_Xjust,_gen_unicode_upper_or_lower,_gen_ascii_upper_or_lower,generate_splitlines_func,_is_upper,gen_isAlX,gen_isX]
Get unicode item by index.
Perhaps it would be good to enhance this description with an additional sentence as to what the symptoms of breaking here might be?
@@ -1352,10 +1352,12 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable LOG.debug("Successfully invoked @OnScheduled methods of {} but scheduled state is no longer STARTING so will stop processor now", processor); // can only happen if stopProcessor was called before service was transitioned to RUNNING state + activateThread(); try { ReflectionUtils.quietlyInvokeMethodsWithAnnotation(OnUnscheduled.class, processor, processContext); - } finally { ReflectionUtils.quietlyInvokeMethodsWithAnnotation(OnStopped.class, processor, processContext); + } finally { + deactivateThread(); } scheduledState.set(ScheduledState.STOPPED);
[No CFG could be retrieved]
Creates a task that invokes the OnScheduled annotation of the given processor.
Not sure which approach is correct, but this appears to be a change in behavior. If OnUnscheduled throws, OnStopped will not be invoked anymore. Do we want this new behavior, or do this finally block contain a nested try/finally with deactiveThread() in the nested finally? This would maintain the same behavior.
@@ -122,7 +122,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. */ @RunWith(SpringRunner.class) <%_ if (authenticationType === 'uaa' && applicationType !== 'uaa') { _%> -@SpringBootTest(classes = {SecurityBeanOverrideConfiguration.class, <%= mainClass %>.class}) +@SpringBootTest(classes = {<%= mainClass %>.class}, SecurityBeanOverrideConfiguration.class) <%_ } else { _%> @SpringBootTest(classes = <%= mainClass %>.class) <%_ } _%>
[No CFG could be retrieved]
Tests the class. missing field validation - check for missing field validation - check for missing field validation - check for.
`} ` needs to be placed correctly
@@ -43,10 +43,8 @@ class TestTrilinosLevelSetConvection(KratosUnittest.TestCase): def tearDown(self): my_pid = self.model_part.GetCommunicator().MyPID() - # Remove the .time file - KratosUtils.DeleteFileIfExisting("levelset_convection_process_mesh.time") - # Remove the Metis partitioning files + self.model_part.GetCommunicator().GetDataCommunicator().Barrier() # required as all ranks must be done with using the partitioning files KratosUtils.DeleteDirectoryIfExisting("levelset_convection_process_mesh_partitioned") # While compining in debug, in memory partitioner also writes down the mpda in plain text
[TestTrilinosLevelSetConvectionInMemory->[setUp->[GetFilePath]],TestTrilinosLevelSetConvection->[test_trilinos_levelset_convection->[ConvectionVelocity,BaseDistance],test_trilinos_levelset_convection_BFECC->[ConvectionVelocity,BaseJumpedDistance],setUp->[GetFilePath]]]
Remove all files of type n - bytes and remove the levelset_convection_.
removing as is no longer needed, I checked
@@ -214,7 +214,7 @@ public class HyperUniquesAggregatorFactory extends AggregatorFactory { byte[] fieldNameBytes = StringUtils.toUtf8(fieldName); - return ByteBuffer.allocate(1 + fieldNameBytes.length).put(CACHE_TYPE_ID).put(fieldNameBytes).array(); + return ByteBuffer.allocate(1 + fieldNameBytes.length).put(AggregatorUtil.HYPER_UNIQUE_CACHE_TYPE_ID).put(fieldNameBytes).array(); } @Override
[HyperUniquesAggregatorFactory->[getMergingFactory->[getCombiningFactory],estimateCardinality->[estimateCardinality],equals->[equals],finalizeComputation->[estimateCardinality],getCombiningFactory->[HyperUniquesAggregatorFactory],getRequiredColumns->[HyperUniquesAggregatorFactory]]]
Returns the cache type ID for the given field name.
This line is longer than 120 cols
@@ -54,7 +54,7 @@ void DataReaderListenerImpl::on_data_available(DDS::DataReader_ptr reader) #else if (reader == part_reader_) { DDS::ParticipantBuiltinTopicDataDataReader_var part_reader_impl = - DDS::ParticipantBuiltinTopicDataDataReader::_narrow(part_reader_); + DDS::ParticipantBuiltinTopicDataDataReader::_narrow(reader); if (!part_reader_impl) { std::cerr << "ERROR: Failed to get particpant builtin topic reader\n"; return;
[No CFG could be retrieved]
DDS data reader listener user_data - User data that was read from the part_data array.
Does this change anything? Line 55 says they're equal. Not that I'm objecting to it.
@@ -61,7 +61,11 @@ public class APITxTest<K, V> extends MultiHotRodServersTest { new APITxTest<String, String>().keyValueGenerator(STRING_GENERATOR).transactionMode(NON_DURABLE_XA), new APITxTest<byte[], byte[]>().keyValueGenerator(BYTE_ARRAY_GENERATOR).transactionMode(NON_DURABLE_XA), - new APITxTest<Object[], Object[]>().keyValueGenerator(GENERIC_ARRAY_GENERATOR).transactionMode(NON_DURABLE_XA) + new APITxTest<Object[], Object[]>().keyValueGenerator(GENERIC_ARRAY_GENERATOR).transactionMode(NON_DURABLE_XA), + + new APITxTest<String, String>().keyValueGenerator(STRING_GENERATOR).transactionMode(FULL_XA), + new APITxTest<byte[], byte[]>().keyValueGenerator(BYTE_ARRAY_GENERATOR).transactionMode(FULL_XA), + new APITxTest<Object[], Object[]>().keyValueGenerator(GENERIC_ARRAY_GENERATOR).transactionMode(FULL_XA) }; }
[APITxTest->[checkNoKeys->[checkNoKeys],createHotRodClientConfigurationBuilder->[createHotRodClientConfigurationBuilder],clearContent->[clearContent],putIfAbsent->[putIfAbsent],removeWithVersion->[removeWithVersion],compute->[compute],putAll->[put,putAll],checkInitValue->[checkInitValue],replaceWithVersion->[replaceWithVersion],computeIfAbsent->[computeIfAbsent],parameterValues->[parameterValues],parameterNames->[parameterNames],remove->[remove],computeIfPresent->[compute],put->[put],cleanupAfterMethod->[cleanupAfterMethod],replace->[replace]]]
Method to create an array of objects that can be used to test a single node in a.
Do we really need all combos? Same question for `MultipleCacheTxFunctionalTest`.
@@ -969,8 +969,8 @@ bool Server::checkInteractDistance(RemotePlayer *player, const f32 d, const std: else if (max_d < 0) max_d = BS * 4.0f; - // cube diagonal: sqrt(3) = 1.732 - if (d > max_d * 1.732) { + // Cube diagonal: sqrt(3) = 1.732 + if (d > max_d + 1.732f * BS) { actionstream << "Player " << player->getName() << " tried to access " << what << " from too far: "
[handleCommand_Interact->[process_PlayerPos,checkInteractDistance],handleCommand_PlayerPos->[process_PlayerPos]]
Checks if a player has interacted the given distance from the hand to the player.
I don't think this is correct. The idea here is that the distance is up to `sqrt(3)` **times** longer when measuring through the cube diagonal, as opposed to a straight line (which has a length of `d`).
@@ -513,6 +513,7 @@ register('zen', zen); register('zergnet', zergnet); register('zucks', zucks); register('speakol', speakol); +register('lentainform', lentainform); // For backward compat, we always allow these types without the iframe // opting in.
[No CFG could be retrieved]
Register all of the types of the objects that are registered with the module. Draws a 3p embed to the window.
Can we put this (and the one above, my apologies), in alphabetical order?
@@ -39,6 +39,7 @@ export default (state: ApplicationProfileState = initialState, action): Applicat return { ...state, ribbonEnv: data['display-ribbon-on-profiles'], + isMailEnabled: data['mailEnabled'], inProduction: data.activeProfiles.includes('prod'), isSwaggerEnabled: data.activeProfiles.includes('swagger') };
[No CFG could be retrieved]
The state of the application profile.
`data.mailEnabled`, use `data[]` only when the keys have special chars in it
@@ -21,6 +21,7 @@ import org.springframework.context.annotation.Configuration; * @since 5.2.0 */ @Configuration(value = "ldapPasswordManagementConfiguration", proxyBeanMethods = false) +@ConditionalOnProperty(prefix = "cas.authn.pm.ldap", name = "ldapUrl") @EnableConfigurationProperties(CasConfigurationProperties.class) public class LdapPasswordManagementConfiguration { @Autowired
[LdapPasswordManagementConfiguration->[passwordChangeService->[getObject,LdapPasswordManagementService,getPrefix,getPm]]]
Creates a new LdapPasswordManagementConfiguration object.
This will not work. The setting is defined as `cas.authn.pm.ldap[x].ldapUrl` in master. To make things consistent between master and 6.1, I suggest that if an LDAP url is not defined, a new BeanCreationException should be thrown instead, rather than ignoring the configuration silently.
@@ -400,8 +400,9 @@ class CoreferenceResolver(Model): antecedent_scores += antecedent_log_mask # Shape: (batch_size, num_spans_to_keep, 1) - dummy_scores = util.get_zeros([antecedent_scores.size(0), antecedent_scores.size(1), 1], - antecedent_scores.is_cuda) + shape = [antecedent_scores.size(0), antecedent_scores.size(1), 1] + dummy_scores = Variable(antecedent_scores.data.new().resize_(shape).fill_(0), + requires_grad=False) # Shape: (batch_size, num_spans_to_keep, max_antecedents + 1) augmented_antecedent_scores = torch.cat([dummy_scores, antecedent_scores], -1)
[CoreferenceResolver->[forward->[_compute_negative_marginal_log_likelihood,_compute_pairwise_inputs,_generate_antecedents,_prune_and_sort_spans,_compute_span_representations,_compute_antecedent_gold_labels,_compute_antecedent_scores],from_params->[from_params],_compute_span_representations->[_compute_head_attention]]]
Compute the antecedent scores for each pair of spans. Returns the ccedent scores for the current node.
I'm not opposed to this, just wondering what the motivation is for not using `get_zeros`.
@@ -164,7 +164,7 @@ class CI_DB_pdo_dblib_driver extends CI_DB_pdo_driver { .sprintf($this->_like_escape_str, $this->_like_escape_chr); } - return $sql.' ORDER BY '.$this->escape_identifiers('name'); + return $sql .' ORDER BY '.$this->escape_identifiers('name'); } // --------------------------------------------------------------------
[CI_DB_pdo_dblib_driver->[_limit->[escape_identifiers,_compile_order_by,version],_list_columns->[escape],field_data->[query,escape,result_object],_delete->[_compile_wh],_insert_batch->[display_error,version],_list_tables->[escape_identifiers,escape_like_str],db_connect->[row_array,query]]]
List tables in the database.
... remove the space.
@@ -179,7 +179,13 @@ func (e *EKLib) newDeviceEKNeeded(ctx context.Context, merkleRoot libkb.MerkleRo s := e.G().GetDeviceEKStorage() maxGeneration, err := s.MaxGeneration(ctx) if err != nil { - return needed, err + switch err.(type) { + case *erasablekv.UnboxError: + e.G().Log.Debug(err.Error()) + return true, nil + default: + return false, err + } } if maxGeneration < 0 { return true, nil
[CleanupStaleUserAndDeviceEKs->[metaContext],checkLoginAndPUK->[NewMetaContext],NewMetaContext->[NewMetaContext],PrepareNewTeamEK->[NewTeamEKNeeded],NewUserEKNeeded->[metaContext],NewTeamEKNeeded->[metaContext],OnLogin->[KeygenIfNeeded],KeygenIfNeeded->[checkLoginAndPUK,metaContext],SignedDeviceEKStatementFromSeed->[DeriveDeviceDHKey,metaContext],PurgeTeamEKGenCache->[isEntryValid,cacheKey],BoxLatestTeamEK->[NewTeamEKNeeded,metaContext],BoxLatestUserEK->[KeygenIfNeeded],getOrCreateLatestTeamEKInner->[checkLoginAndPUK,newTeamEKNeeded,cacheKey,isEntryValid,metaContext,newCacheEntry,keygenIfNeeded],NewDeviceEKNeeded->[metaContext],GetTeamEK->[GetOrCreateLatestTeamEK]]
newDeviceEKNeeded checks if a deviceEK is needed.
Can we annotate these error messages more?
@@ -662,6 +662,10 @@ def main(): action="store_true", help="unlink a package") + p.add_option('--target-prefix', + default=sys.prefix, + help="target prefix (defaults to %default)") + p.add_option('-p', '--prefix', action="store", default=sys.prefix,
[binary_replace->[replace->[PaddingError]],messages->[rm_rf],try_hard_link->[rm_empty_dir,rm_rf,_link],rm_extracted->[rm_rf,Locked],read_no_link->[yield_lines],extract->[Locked],main->[messages,try_hard_link,extracted,linked,extract,unlink,link],_link->[win_hard_link,win_soft_link],rm_fetched->[rm_rf,Locked],unlink->[name_dist,rm_empty_dir,unlink,Locked,run_script,mk_menus],run_script->[name_dist],read_has_prefix->[yield_lines],update_prefix->[binary_replace,replace],link->[name_dist,read_url,create_meta,yield_lines,read_no_link,_link,Locked,run_script,remove_binstar_tokens,read_has_prefix,update_prefix,read_icondata,mk_menus],main,NullHandler]
%prog main . fasta link packages_dir prefix with prefix.
This should be `%(default)s`.
@@ -330,10 +330,17 @@ namespace System.Reflection #endregion #region Invocation Logic(On MemberBase) + [MethodImpl(MethodImplOptions.AggressiveInlining)] private void CheckConsistency(object? target) { // only test instance methods - if ((m_methodAttributes & MethodAttributes.Static) != MethodAttributes.Static) + if ((m_methodAttributes & MethodAttributes.Static) == 0) + { + CheckConsistencyInstance(target); + } + + [MethodImpl(MethodImplOptions.NoInlining)] // move check out of hot path when invoking static methods + void CheckConsistencyInstance(object? target) { if (!m_declaringType.IsInstanceOfType(target)) {
[RuntimeMethodInfo->[GetMethodBody->[GetMethodBody],InvokeArgumentsCheck->[CheckConsistency,ThrowNoInvokeException],GetHashCode->[GetHashCode],GetParameters->[FetchNonReturnParameters],IsDefined->[IsDefined],GetParametersNoCopy->[FetchNonReturnParameters],GetCustomAttributes->[GetCustomAttributes],ToString->[ToString],GetGenericArguments]]
Checks if the object is a reserved object.
This is not a lazy initialization. Is splitting this method really improvement? Maybe mark the whole method with `AggressiveInlining` without spliting it?
@@ -1134,6 +1134,15 @@ function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) { // input event on backspace, delete or cut if ($sniffer.hasEvent('input')) { element.on('input', listener); + + // On date-family inputs, we also need to listen for `keyup` in case the date is partially + // edited by the user using the keyboard, resulting in a change in the validity state, but + // without an accompanying change in the input value (thus no `input` event). + // (This is only necessary on browsers that support inputs of that type - other browsers set the + // `type` property to "text".) + var isTypeSupported = (type === attr.type); + var listenForKeyup = isTypeSupported && (DATE_INPUT_TYPES.indexOf(type) !== -1); + if (listenForKeyup) element.on('keyup', function() { element.triggerHandler('input'); }); } else { var timeout;
[No CFG could be retrieved]
Adds event listeners to the element that is responsible for the value. context menu in IE.
can this name be a bit more explicit, such as `browserSupportsType`?
@@ -104,6 +104,14 @@ describe Assignment do end describe 'custom validations' do + it 'should catch a zero group_min' do + expect{create(:assignment, group_min: 0)}.to raise_error(ActiveRecord::RecordInvalid) + end + + it 'should catch a negative group_min' do + expect{create(:assignment, group_min: -5)}.to raise_error(ActiveRecord::RecordInvalid) + end + it 'fails when group_max less than group_min' do assignment = build(:assignment, group_max: 1, group_min: 2) expect(assignment).not_to be_valid
[round,create,let,accepted_grouping_for,have_many,through,it,to,select,get_current_assignment,update_results_stats,each,marking_state,puts,context,clone_groupings_from,reload,and_return,be,match_array,to_csv,where,should,map,save!,today,drop,groupings,get_latest_result,due_date,id,once,not_to,save,class_name,new,add_csv_group,ago,for,get_total_extra_points,add_group,dependent,vcs_submit,accept_nested_attributes_for,before,total_mark,mark,repo_name,destroy_all,section_due_date,inspect,day,to_s,from_now,max_mark,times,receive,now,get_total_extra_percentage,push,build,has_submission?,eq,raise_error,update_attribute,describe,update_attributes,find_by_markable_id_and_markable_type,allow_destroy,first,is_greater_than,order,name,validate_uniqueness_of,pending,latest_due_date,validate_presence_of,same_time_within_ms,update!,user_name,be_a]
Checks that a node has a parent assignment and that it has a peer review assignment. create a permission file for the given component.
You can delete this test and the next one (covered above in lines 58-63).
@@ -576,7 +576,7 @@ async def transitive_hydrated_targets(addresses: Addresses) -> TransitiveHydrate to_visit.extend(tht.dependencies) return TransitiveHydratedTargets( - tuple(tht.root for tht in transitive_hydrated_targets), closure + tuple(tht.root for tht in transitive_hydrated_targets), FrozenOrderedSet(closure) )
[hydrate_sources->[HydratedField,_eager_fileset_with_spec],hydrate_sources_snapshot->[SourcesSnapshot],sources_snapshots_from_filesystem_specs->[SourcesSnapshots,SourcesSnapshot],transitive_hydrated_target->[TransitiveHydratedTarget],transitive_hydrated_targets->[TransitiveHydratedTargets],OwnersRequest->[validate->[InvalidOwnersOfArgs]],LegacyBuildGraph->[_index->[inject],resolve_address->[inject_address_closure],create->[target_types_from_build_file_aliases],_inject_address_specs->[_resolve_context,_index],_instantiate_remote_sources->[_DestWrapper],clone_new->[LegacyBuildGraph]],sources_snapshots_from_address_specs->[SourcesSnapshots],hydrate_target->[HydratedTarget],addresses_with_origins_from_filesystem_specs->[OwnersRequest],hydrated_targets->[HydratedTargets],legacy_transitive_hydrated_targets->[from_hydrated_target,LegacyTransitiveHydratedTargets],sort_targets->[HydratedTargets,TopologicallyOrderedTargets],topo_sort->[recursive_topo_sort->[recursive_topo_sort],recursive_topo_sort],hydrate_bundles->[HydratedField,_eager_fileset_with_spec],LegacyHydratedTarget->[from_hydrated_target->[LegacyHydratedTarget]],hydrated_targets_with_origins->[HydratedTargetsWithOrigins],hydrate_target_with_origin->[HydratedTargetWithOrigin],find_owners->[owns_any_source,Owners]]
Given Addresses kicks off recursion on expansion of TransitiveHydratedTargets.
This does have a minor performance hit to convert from `OrderedSet` to `FrozenOrderedSet`. I looked at refactoring this code to use a comprehension so that we can use `FrozenOrderedSet`, but it doesn't seem possible with the `while` loop. We could choose to have `TransitiveHydratedTargets.closure` use `OrderedSet` instead of `FrozenOrderedSet`, but, from the start, the entire purpose of these `ordered_set` changes has been for this particular use case to make THTs safer..So, I think it's worth it to get the safety of immutablity + hashability.
@@ -298,11 +298,7 @@ describe AlaveteliPro::SubscriptionsController, feature: :pro_pricing do before do error = Stripe::RateLimitError.new StripeMock.prepare_error(error, :create_subscription) - post :create, 'stripeToken' => token, - 'stripeTokenType' => 'card', - 'stripeEmail' => user.email, - 'plan_id' => 'pro', - 'coupon_code' => '' + post :create, params: { 'stripeToken' => token, 'stripeTokenType' => 'card', 'stripeEmail' => user.email, 'plan_id' => 'pro', 'coupon_code' => '' } end it 'sends an exception email' do
[successful_signup->[email,post],email,create,new,let,be,describe,start,create_test_helper,first,it,create_pro_account,map,to,stripe_customer_id,plan_path,before,prepare_error,post,let!,prepare_card_error,require,signin_path,dirname,stop,shared_examples,enable_actor,generate_card_token,match,id,create_plan,enabled?,customer,update!,redirect_to,default_source,context,delete,token,include_examples,get,not_to,eq,after,reload,create_coupon,raise_error,and_return,expand_path]
expects the customer to be a customer who has a new token Stripe API prepare_error prepare_subscription prepare_error prepare_coupon_code send_.
Line is too long. [157/80]
@@ -1,6 +1,8 @@ if (window.angular.bootstrap) { //AngularJS is already loaded, so we can return here... - console.log('WARNING: Tried to load angular more than once.'); + if (!!window.console) { + console.log('WARNING: Tried to load angular more than once.'); + } return; }
[log,bindJQuery]
This is a hack to avoid the angular. bootstrap call from the angular. js library.
Why not `if (window.console)`?
@@ -24,6 +24,7 @@ import org.apache.dubbo.remoting.telnet.TelnetHandler; import org.apache.dubbo.remoting.transport.ChannelHandlerAdapter; public class TelnetHandlerAdapter extends ChannelHandlerAdapter implements TelnetHandler { + private static volatile boolean enableTelnet = true; private final ExtensionLoader<TelnetHandler> extensionLoader = ExtensionLoader.getExtensionLoader(TelnetHandler.class);
[TelnetHandlerAdapter->[telnet->[trim,getMessage,append,indexOf,hasExtension,replace,telnet,getParameterAndDecoded,contains,toString,StringBuilder,length],getExtensionLoader]]
Telephone command with optional prompt.
It is not a good way to close telnet. This property should be bound to URL.
@@ -42,7 +42,7 @@ final class IdentifiersExtractor implements IdentifiersExtractorInterface $this->resourceClassResolver = $resourceClassResolver; if (null === $this->resourceClassResolver) { - @trigger_error(sprintf('Not injecting %s in the CachedIdentifiersExtractor might introduce cache issues with object identifiers.', ResourceClassResolverInterface::class), E_USER_DEPRECATED); + @trigger_error(sprintf('Not injecting %s in the IdentifiersExtractor might introduce cache issues with object identifiers.', ResourceClassResolverInterface::class), E_USER_DEPRECATED); } }
[IdentifiersExtractor->[getIdentifiersFromItem->[getValue,isResourceClass,create,getObjectClass,isIdentifier],getIdentifiersFromResourceClass->[isIdentifier,create]]]
Initializes the CachedIdentifiersExtractor.
It could be changed to use `__CLASS__` instead? And remove "the".
@@ -164,6 +164,7 @@ static void coco_cart_slot1_3(device_slot_interface &device) device.option_add("rs232", COCO_RS232); device.option_add("dcmodem", COCO_DCMODEM); device.option_add("orch90", COCO_ORCH90); + device.option_add("stereo_composer", COCO_STEREO_COMPOSER); device.option_add("ssc", COCO_SSC); device.option_add("ram", COCO_PAK_RAM); device.option_add("games_master", COCO_PAK_GMC);
[No CFG could be retrieved]
coco_cart_slot1_3 provides the basic functionality of the coco_ coco_multipak_device is the most important method to initialize the machine configuration.
Does the name here need to be this long? Most of the options here use terse, abbreviated names for the command line.
@@ -14,6 +14,7 @@ import ( // GenerateBuildFromConfig creates a new build based on a given BuildConfig. Optionally a SourceRevision for the new // build can be specified. Also optionally a list of image names to be substituted can be supplied. Values in the BuildConfig // that have a substitution provided will be replaced in the resulting Build +// You NEED to update BuildConfig object after calling this! func GenerateBuildFromConfig(bc *buildapi.BuildConfig, ref *buildapi.SourceRevision, imageSubstitutions map[string]string, imageRepoSubstitutions map[kapi.ObjectReference]string) (build *buildapi.Build) { // Need to copy the buildConfig here so that it doesn't share pointers with
[Copy,Infof,GetByNamespace,V,Errorf,IsNotFound,LatestTaggedImage]
GenerateBuildFromConfig creates a new build based on a given BuildConfig and a SourceRevision. GenerateBuildFromBuild creates a new build based on the build s imageRepoReferences.
this is a worrisomely loose contract.
@@ -70,7 +70,7 @@ abstract class RestController extends FOSRestController * contains default translations for some fields * @var array */ - protected $fieldsDefaultTranslationKeys = array('id' => 'public.id', 'name' => 'public.name'); + protected $fieldsDefaultTranslationKeys = array('id' => 'public.id', 'title' =>'public.title','name' => 'public.name','changed'=>'public.changed','created'=>'public.created'); /** * contains fields that cannot be hidden and are visible by default
[RestController->[getHalLinks->[all,getRequestUri,replaceOrAddUrlString,getPage,get,getParameterName,getLimit],createHalResponse->[getHalLinks],responseFields->[getMessage,handleview,get,getAllFields,view,addFieldAttributes],responseDelete->[view,toArray],responseList->[find,getHalLinks,getPage,get,getTotalPages,getLimit,view],responseGetById->[view,toArray],responsePersistSettings->[getCurrentUserData,getMessage,setUserSetting,handleView,get,getParameter,has,view],processPut->[findMatch,getId]]]
Returns a response with all the fields of the given type. Get fields of a node - header.
@turbo-ele should we move that to config?
@@ -67,6 +67,9 @@ func (d *Delegate) BeforeJobDeleted(jb job.Job) { func (d *Delegate) ServicesForSpec(spec job.Job) ([]job.Service, error) { // TODO: we need to fill these out manually, find a better fix + if spec.PipelineSpec == nil { + spec.PipelineSpec = &pipeline.Spec{} + } spec.PipelineSpec.JobName = spec.Name.ValueOrZero() spec.PipelineSpec.JobID = spec.ID
[ServicesForSpec->[ValueOrZero],spec->[RUnlock,RLock],BeforeJobDeleted->[Errorw,DeleteJob],RunJob->[ValueOrZero,Errorw,spec,CombinedContext,Run,With,NewVarsFrom,NewRun],Start->[addSpec],Close->[rmSpec],addSpec->[Lock,Unlock,Errorf],AfterJobCreated->[Notify,Errorw],rmSpec->[Lock,Unlock],New]
ServicesForSpec returns a list of services that can be run on the given job.
Was this an accidental commit?
@@ -35,6 +35,10 @@ func NewSTIBuildStrategy(stiBuilderImage string, tc TempDirectoryCreator, useLoc // CreateBuildPod creates a pod that will execute the STI build // TODO: Make the Pod definition configurable func (bs *STIBuildStrategy) CreateBuildPod(build *buildapi.Build) (*api.Pod, error) { + buildJson, err := json.Marshal(build) + if err != nil { + return nil, err + } pod := &api.Pod{ TypeMeta: api.TypeMeta{ ID: build.PodID,
[setupTempVolume->[CreateTempDirectory],CreateBuildPod->[setupTempVolume],CreateTempDirectory->[TempDir]]
CreateBuildPod creates a pod with the given build.
As above re: encoding
@@ -2084,11 +2084,11 @@ class BlobClient(StorageAccountHostsMixin): # pylint: disable=too-many-public-m if_unmodified_since=kwargs.pop('if_unmodified_since', None), if_match=kwargs.pop('if_match', None), if_none_match=kwargs.pop('if_none_match', None)) - page_range = None # type: ignore - if start_range is not None and end_range is None: - page_range = str(start_range) - elif start_range is not None and end_range is not None: - page_range = str(end_range - start_range + 1) + if length is not None: + length = offset + length - 1 # Reformat to an inclusive range index + page_range, _ = validate_and_format_range_headers( + offset, length, start_range_required=False, end_range_required=False, align_to_page=True + ) options = { 'snapshot': self.snapshot, 'lease_access_conditions': access_conditions,
[BlobClient->[create_page_blob->[_create_page_blob_options],abort_copy->[_abort_copy_options],set_sequence_number->[_set_sequence_number_options],start_copy_from_url->[_start_copy_from_url_options,start_copy_from_url],resize_blob->[_resize_blob_options],upload_blob->[_upload_blob_options],upload_pages_from_url->[_upload_pages_from_url_options,upload_pages_from_url],append_block->[_append_block_options,append_block],create_append_blob->[_create_append_blob_options],commit_block_list->[commit_block_list,_commit_block_list_options],create_snapshot->[create_snapshot,_create_snapshot_options],stage_block->[_stage_block_options,stage_block],clear_page->[_clear_page_options],get_page_ranges->[_get_page_ranges_result,_get_page_ranges_options,get_page_ranges],set_http_headers->[_set_http_headers_options,set_http_headers],get_block_list->[get_block_list,_get_block_list_result],stage_block_from_url->[_stage_block_from_url_options,stage_block_from_url],upload_page->[_upload_page_options],set_blob_metadata->[_set_blob_metadata_options],delete_blob->[_delete_blob_options],append_block_from_url->[_append_block_from_url_options,append_block_from_url],_delete_blob_options->[_generic_delete_blob_options],download_blob->[_download_blob_options]]]
Returns a dict of options for page - range filtering.
So we will update the method **validate_and_format_range_headers** in another PR?
@@ -130,7 +130,7 @@ $sql = "UPDATE " . TABLE_BANNERS . " SET - date_scheduled = :scheduledDate, + date_scheduled = DATE_ADD(:scheduledDate, INTERVAL '00:00:00' HOUR_SECOND), expires_date = DATE_ADD(:expiresDate, INTERVAL '23:59:59' HOUR_SECOND), expires_impressions = " . ($expires_impressions == 0 ? "null" : ":expiresImpressions") . " WHERE banners_id = :bannersID";
[MoveNext,bindVars,Execute,display_count,parse,infoBox,add_session,updateObjectInfo,RecordCount,display_links,set_destination,add,save]
This function returns an array with the data about the banners. function to show a new node in the list of banners.
Doesn't this need something more, for when `$date_scheduled` is blank? Something similar to line 140? `if ($date_scheduled != '') {`
@@ -112,6 +112,7 @@ public class TestSqlTaskExecution private static final OutputBufferId OUTPUT_BUFFER_ID = new OutputBufferId(0); private static final CatalogName CONNECTOR_ID = new CatalogName("test"); private static final Duration ASSERT_WAIT_TIMEOUT = new Duration(1, HOURS); + public static final TaskId TASK_ID = new TaskId("query", 0, 0); @DataProvider public static Object[][] executionStrategies()
[TestSqlTaskExecution->[TestingBuildOperatorFactory->[Pauser],OutputBufferConsumer->[abort->[abort]],BuildStates->[setNoNewLookups->[setNoNewLookups]],TestingScanOperatorFactory->[TestingScanOperator->[getOutput->[await,finish]],Pauser],TestingCrossJoinOperatorFactory->[TestingCrossJoinOperator->[getOutput->[isFinished]],Pauser]]]
Returns the list of possible execution strategies for the given .
Does this reduce exception stacks printed during tests? or is it a separate change?
@@ -57,7 +57,7 @@ class AssignmentsController < ApplicationController def peer_review assignment = Assignment.find(params[:id]) @assignment = assignment.is_peer_review? ? assignment : assignment.pr_assignment - if @assignment.nil? || @assignment.is_hidden + unless current_user.visible_assessments(assessment_id: assignment.id).exists? render 'shared/http_status', formats: [:html], locals: {
[AssignmentsController->[start_timed_assignment->[update],new->[new],create->[new],set_boolean_graders_options->[update]]]
shows a page with a nail node if the user has not submitted any of the.
This should still handle the case where `@assignment` is nil.
@@ -55,7 +55,7 @@ namespace static_assert(alignof(T) == 1, "T must have 1 byte alignment"); static_assert(sizeof(T) <= sizeof(source), "T is too large for source"); static_assert(sizeof(T) * 2 <= sizeof(expected), "T is too large for destination"); - std::memcpy(std::addressof(value), source, sizeof(T)); + std::memcpy(addressof(value), source, sizeof(T)); std::stringstream out; out << "BEGIN" << value << "END";
[is_formatted->[str],memset->[memcmp,memset,ASSERT_EQ],EXPECT_TRUE->[EXPECT_TRUE]]
Checks if the sequence of values in the source sequence are formatted.
`std::addressof(unwrap(unwrap(value))` ? Either way I thought `crypto::secret_key` was double wrapped.
@@ -15,7 +15,7 @@ import java.io.File; @Test(groups = "functional", testName = "query.blackbox.LocalCacheAsyncCacheStoreTest") public class LocalCacheAsyncCacheStoreTest extends LocalCacheTest { - private String indexDirectory = System.getProperty("java.io.tmpdir") + File.separator + "asyncStore"; + private final String indexDirectory = System.getProperty("java.io.tmpdir") + File.separator + "asyncStore"; @Override protected EmbeddedCacheManager createCacheManager() throws Exception {
[LocalCacheAsyncCacheStoreTest->[setup->[setup],teardown->[teardown]]]
Creates a cache manager based on the configuration.
why didn't you use `TestingUtil.tmpDirectory(getClass())` as in the other tests?
@@ -33,13 +33,16 @@ class Git(Base): GIT_DIR = ".git" def __init__(self, root_dir=os.curdir, repo=None): + """Git class constructor. + Requires `Repo` class from `git` module (from gitpython package). + """ super(Git, self).__init__(root_dir, repo=repo) - import git + from git import Repo from git.exc import InvalidGitRepositoryError try: - self.git = git.Repo(root_dir) + self.repo = Repo(root_dir) except InvalidGitRepositoryError: msg = "{} is not a git repository" raise SCMError(msg.format(root_dir))
[Git->[is_dirty->[is_dirty],ignore->[_get_gitignore],install->[_install_hook],ignore_remove->[_get_gitignore],commit->[commit],cleanup_ignores->[ignore_remove],get_diff_trees->[_get_diff_trees],branch->[branch],_get_diff_trees->[get_tree,commit],tag->[tag],add->[add],checkout->[checkout]]]
Initialize a new Git object.
Is this git -> repo renaming necessary? Also, you are overwriting `self.repo` that is a dvc repo and set in SCMBase.
@@ -902,3 +902,8 @@ func (s *policyServer) setVersionForInterceptorSwitch(v api.Version) { s.vChan <- v } } + +func (s *policyServer) isBeta2p1() bool { + version := s.vSwitch.Version + return version.Major == api.Version_V2 && version.Minor == api.Version_V1 +}
[GetPolicy->[GetPolicy],PurgeSubjectFromPolicies->[PurgeSubjectFromPolicies],AddPolicyMembers->[AddPolicyMembers],CreateRole->[CreateRole],RemovePolicyMembers->[RemovePolicyMembers],DeletePolicy->[DeletePolicy],UpdateRole->[UpdateRole],UpdatePolicy->[UpdatePolicy],CreatePolicy->[CreatePolicy],ListRoles->[ListRoles],GetRole->[GetRole],MigrateToV2->[CreateRole,CreatePolicy],ListPolicies->[ListPolicies],ListPolicyMembers->[ListPolicyMembers],DeleteRole->[DeleteRole],ReplacePolicyMembers->[ReplacePolicyMembers]]
setVersionForInterceptorSwitch sets the version for interceptor switch.
This falls apart when we're using IAM v2 endpoints with authz-service running on v1. This is what our inspec tests have been doing for a while now.
@@ -811,9 +811,10 @@ public class BigtableIO { public final synchronized BigtableSource splitAtFraction(double fraction) { ByteKey splitKey; try { - splitKey = source.getRange().interpolateKey(fraction); + splitKey = rangeTracker.getRange().interpolateKey(fraction); } catch (IllegalArgumentException e) { - logger.info("%s: Failed to interpolate key for fraction %s.", source.getRange(), fraction); + logger.info( + "%s: Failed to interpolate key for fraction %s.", rangeTracker.getRange(), fraction); return null; } logger.debug(
[BigtableIO->[BigtableWriter->[checkForFailures->[toString],close->[checkForFailures,close],write->[checkForFailures],open->[getTableId],getSink],BigtableReader->[getFractionConsumed->[getFractionConsumed],start->[start,createReader],close->[close],advance->[advance],splitAtFraction->[getRange,withStartKey,withEndKey],getRange],Write->[withBigtableOptions->[withBigtableOptions,Write],withBigtableService->[Write],populateDisplayData->[populateDisplayData],toString->[toString],withTableId->[Write],apply->[getBigtableService,apply]],Read->[withBigtableOptions->[withBigtableOptions,Read],withBigtableService->[Read],withRowFilter->[Read],populateDisplayData->[populateDisplayData],toString->[toString],withTableId->[Read],apply->[apply]],Sink->[toString->[toString]],BigtableSource->[splitIntoBundlesBasedOnSamples->[withEndKey],withStartKey->[withStartKey,BigtableSource],getEstimatedSizeBytes->[getSampleRowKeys],withEndKey->[BigtableSource,withEndKey],splitKeyRangeIntoBundleSizedSubranges->[withEstimatedSizeBytes,withEndKey],withEstimatedSizeBytes->[BigtableSource],splitIntoBundles->[getSampleRowKeys],toString->[toString],getSampleRowKeys->[getSampleRowKeys]]]]
Splits this source at the specified fraction.
This is subtle, but I don't think that we want this change. If the Source's range is `[a,z)` and the first key is `d`, I think the source's range is still `[a, z)`. Leave the start key alone, but the rangeTracker will still keep the state the same. (The change above is still good)
@@ -1741,9 +1741,17 @@ void DataReaderImpl::notify_read_conditions() ReadConditionSet local_read_conditions = read_conditions_; ACE_GUARD(Reverse_Lock_t, unlock_guard, reverse_sample_lock_); + ConditionImpl* ci; for (ReadConditionSet::iterator it = local_read_conditions.begin(), end = local_read_conditions.end(); it != end; ++it) { - dynamic_cast<ConditionImpl*>(it->in())->signal_all(); + ci = dynamic_cast<ConditionImpl*>(it->in()); + if (ci) { + ci->signal_all(); + } else { + ACE_ERROR((LM_ERROR, + ACE_TEXT("(%P|%t) ERROR: DataReaderImpl::notify_read_conditions: ") + ACE_TEXT("Failed to obtain ConditionImpl - can't notify.\n"))); + } } }
[No CFG could be retrieved]
private static final int DCPS_DEBUG_LEVEL = 0 ; GUI return value.
Maybe declare ci within the loop?
@@ -61,7 +61,7 @@ namespace Dynamo.TestInfrastructure DynamoViewModel.ExecuteCommand(runCancel); })); - Thread.Sleep(100); + Thread.Sleep(0); writer.WriteLine("### - re-exec complete"); writer.Flush();
[CodeBlockNodeMutator->[RunTest->[Flush,Invoke,Mutate,ExecuteCommand,Data,RunEnabled,Count,WriteLine,ToString,Sleep,Undo,Add,GUID],Mutate->[Invoke,Code,ExecuteCommand,Next,Empty,Substring,NextDouble,Length,GUID]]]
Runs the readout undo and redo commands. read - back.
Can you explain why this `Thread.Sleep` call is present? There are different, guaranteed mechanisms for flushing the `Dispatcher`. For example, see `NodeViewCustomizationTests`.
@@ -13,7 +13,7 @@ describe("animations", function() { }; })); - afterEach(inject(function($$jqLite) { + afterEach(inject(function() { dealoc(element); }));
[No CFG could be retrieved]
The ngAnimateMock module provides a function to allow animations on the DOM element and a requires that the templateRequest is injected and initialized.
What is going on here? Do we actually need an `inject` call at all?
@@ -53,7 +53,8 @@ class RequestAnalyzerResolver implements RequestAnalyzerResolverInterface 'resourceLocatorPrefix' => $requestAnalyzer->getCurrentResourceLocatorPrefix(), 'resourceLocator' => $requestAnalyzer->getCurrentResourceLocator(), 'get' => $requestAnalyzer->getCurrentGetParameter(), - 'post' => $requestAnalyzer->getCurrentPostParameter() + 'post' => $requestAnalyzer->getCurrentPostParameter(), + 'analyticsKey' => $requestAnalyzer->getCurrentAnalyticsKey(), ) ); }
[RequestAnalyzerResolver->[resolveForPreview->[getPortalInformations],resolve->[getCurrentPortalUrl,getCurrentResourceLocator,getLocalization,getCurrentPostParameter,getCurrentResourceLocatorPrefix,getCurrentGetParameter,getKey,getDefaultLocalization]]]
Resolves a sequence of keys from the current request analyzer to the current request analyzer.
Do we want to be adding vendor specific things in a core component? Could we not solve this with some sort of filter? /cc @danrot @chirimoya @wachterjohannes
@@ -186,7 +186,7 @@ public class GroupByBenchmark if (ComplexMetrics.getSerdeForType("hyperUnique") == null) { ComplexMetrics.registerSerde("hyperUnique", new HyperUniquesSerde(Hashing.murmur3_128())); } - executorService = Execs.multiThreaded(numSegments, "GroupByThreadPool"); + executorService = Execs.multiThreaded(numProcessingThreads, "GroupByThreadPool[%d]"); setupQueries();
[GroupByBenchmark->[querySingleIncrementalIndex->[runQuery],setup->[setupQueries],querySingleQueryableIndex->[runQuery]]]
Setup the index. Benchmarks a group by query.
Most formats are with the thread enumeration after a dash rather than in brackets. Suggest keeping that here.
@@ -317,7 +317,7 @@ class IsolatedProcessTest(TestBase, unittest.TestCase): self.assertEqual( files_content_result.dependencies, - (FileContent("roland", b"European Burmese"),) + (FileContent("roland", b"European Burmese", False),) ) def test_exercise_python_side_of_timeout_implementation(self):
[IsolatedProcessTest->[test_javac_compilation_example_success->[JavacCompileRequest,JavacSources,BinaryLocation],rules->[create_javac_compile_rules,create_cat_stdout_rules],test_javac_compilation_example_failure->[JavacCompileRequest,JavacSources,BinaryLocation],test_javac_version_example->[JavacVersionExecutionRequest,BinaryLocation],test_integration_concat_with_snapshots_stdout->[Concatted,ShellCat,BinaryLocation,CatExecutionRequest]],ExecuteProcessRequestTest->[test_blows_up_on_invalid_args->[_default_args_execute_process_request]],cat_files_process_result_concatted->[argv_from_snapshot,Concatted],get_javac_version_output->[JavacVersionOutput,gen_argv],javac_compile_process_result->[argv_from_source_snapshot,JavacCompileResult]]
This test tests that the write of a file is the same as the write of a file.
Encouraged to use kwarg `is_executable` here.
@@ -124,6 +124,8 @@ func (l *Limits) RegisterFlags(f *flag.FlagSet) { f.DurationVar(&l.RulerEvaluationDelay, "ruler.evaluation-delay-duration", 0, "Duration to delay the evaluation of rules to ensure the underlying metrics have been pushed to Cortex.") f.IntVar(&l.RulerTenantShardSize, "ruler.tenant-shard-size", 0, "The default tenant's shard size when the shuffle-sharding strategy is used by ruler. When this setting is specified in the per-tenant overrides, a value of 0 disables shuffle sharding for the tenant.") + f.IntVar(&l.RulerMaxRulesPerRuleGroup, "ruler.max-rules-per-rule-group", 15, "Maximum number of rules per rule group per-tenant. 0 to disable.") + f.IntVar(&l.RulerMaxRuleGroupsPerTenant, "ruler.max-rule-groups-per-tenant", 20, "Maximum number of rule groups per-tenant. 0 to disable.") f.StringVar(&l.PerTenantOverrideConfig, "limits.per-user-override-config", "", "File name of per-user overrides. [deprecated, use -runtime-config.file instead]") f.DurationVar(&l.PerTenantOverridePeriod, "limits.per-user-override-period", 10*time.Second, "Period with which to reload the overrides. [deprecated, use -runtime-config.reload-period instead]")
[DropLabels->[getOverridesForUser],MaxGlobalSeriesPerMetric->[getOverridesForUser],RulerTenantShardSize->[getOverridesForUser],MaxLabelValueLength->[getOverridesForUser],MaxSamplesPerQuery->[getOverridesForUser],MaxLocalMetadataPerMetric->[getOverridesForUser],MaxQueriersPerUser->[getOverridesForUser],MinChunkLength->[getOverridesForUser],IngestionRate->[getOverridesForUser],EvaluationDelay->[getOverridesForUser],StoreGatewayTenantShardSize->[getOverridesForUser],IngestionBurstSize->[getOverridesForUser],MaxQueryLength->[getOverridesForUser],getOverridesForUser->[tenantLimits],AcceptHASamples->[getOverridesForUser],IngestionTenantShardSize->[getOverridesForUser],MaxLabelNamesPerSeries->[getOverridesForUser],MaxLocalSeriesPerUser->[getOverridesForUser],RejectOldSamples->[getOverridesForUser],MaxLocalSeriesPerMetric->[getOverridesForUser],MaxCacheFreshness->[getOverridesForUser],MaxQueryParallelism->[getOverridesForUser],MaxChunksPerQuery->[getOverridesForUser],RejectOldSamplesMaxAge->[getOverridesForUser],MaxLocalMetricsWithMetadataPerUser->[getOverridesForUser],MaxGlobalMetricsWithMetadataPerUser->[getOverridesForUser],HAReplicaLabel->[getOverridesForUser],EnforceMetricName->[getOverridesForUser],EnforceMetadataMetricName->[getOverridesForUser],CardinalityLimit->[getOverridesForUser],MaxGlobalMetadataPerMetric->[getOverridesForUser],MaxGlobalSeriesPerUser->[getOverridesForUser],RegisterFlags->[StringVar,IntVar,DurationVar,Float64Var,Var,BoolVar],CreationGracePeriod->[getOverridesForUser],MaxLabelNameLength->[getOverridesForUser],MaxSeriesPerQuery->[getOverridesForUser],MaxMetadataLength->[getOverridesForUser],HAClusterLabel->[getOverridesForUser],New]
RegisterFlags registers the limits for the command. This is a variable that can be used to configure the validation behavior. This function defines the maximum number of active series per user across the cluster.
**suggestion:** I think we should consider setting 0 as the default value for both new options. Otherwise this is a breaking change for some users. If we leave the default as is at least consider mentioning the new default value in the changelog.
@@ -151,13 +151,7 @@ class FastavroIT(unittest.TestCase): fastavro_records = \ fastavro_read_pipeline \ | 'create-fastavro' >> Create(['%s*' % fastavro_output]) \ - | 'read-fastavro' >> ReadAllFromAvro(use_fastavro=True) \ - | Map(lambda rec: (rec['number'], rec)) - - avro_records = \ - fastavro_read_pipeline \ - | 'create-avro' >> Create(['%s*' % avro_output]) \ - | 'read-avro' >> ReadAllFromAvro(use_fastavro=False) \ + | 'read-fastavro' >> ReadAllFromAvro() \ | Map(lambda rec: (rec['number'], rec)) def check(elem):
[FastavroIT->[test_avro_it->[check->[assertEqual]]]]
Seed a PCollection with num_records records and an avro record with num_records records \ read - fastavro >> Read from avro and create a new file if it doesn.
The mechanics of this test was to run a pipeline with Avro and with FastAvro, and then check that the output was the same. Now we don't have Avro implementation, so such test scenario wouldn't work. We could instead verify that the checksum of the values that have bean read matches some pre-computed value.
@@ -0,0 +1,15 @@ +class AAL3Policy + def initialize(user, sp_session, session) + @user = MfaContext.new(user) + @sp_session = sp_session + @session = session + end + + def aal3_required? + @sp_session[:aal_level_requested] == 3 + end + + def aal3_used? + %w[webauthn piv_cac].include?(@session[:auth_method]) + end +end
[No CFG could be retrieved]
No Summary Found.
`sp_session` is inside of `session` (it's the `:sp` key) .... so passing in both is redundant IMO
@@ -420,12 +420,12 @@ public class ListenTCPRecord extends AbstractProcessor { getLogger().debug("Removing flow file, no records were written"); session.remove(flowFile); } else { - final String sender = getRemoteAddress(socketRecordReader); + final String sender = recordReader.getSender().toString(); final Map<String, String> attributes = new HashMap<>(writeResult.getAttributes()); attributes.put(CoreAttributes.MIME_TYPE.key(), mimeType); attributes.put("tcp.sender", sender); - attributes.put("tcp.port", String.valueOf(port)); + attributes.put("tcp.port", String.valueOf(port)); // Should this be the remote port..? attributes.put("record.count", String.valueOf(writeResult.getRecordCount())); flowFile = session.putAllAttributes(flowFile, attributes);
[ListenTCPRecord->[getRemoteAddress->[getRemoteAddress]]]
This method is called when a trigger is triggered. This method is called from the main loop of the write process. This method is called when a new connection is received.
The docs for tcp.port say @WritesAttribute(attribute="tcp.port", description="The port that the processor accepted the connection on."), But possibly we should add another attribute like tcp.sender.port
@@ -49,13 +49,11 @@ public class PlanDeterminismChecker public void checkPlanIsDeterministic(Session session, String sql) { - IntStream.range(1, MINIMUM_SUBSEQUENT_SAME_PLANS) - .mapToObj(attempt -> getPlanText(session, sql)) - .map(planEquivalenceFunction) - .reduce((previous, current) -> { - assertEquals(previous, current); - return current; - }); + String previous = planEquivalenceFunction.apply(getPlanText(session, sql)); + for (int attempt = 1; attempt < MINIMUM_SUBSEQUENT_SAME_PLANS; attempt++) { + String current = planEquivalenceFunction.apply(getPlanText(session, sql)); + assertEquals(previous, current); + } } private String getPlanText(Session session, String sql)
[PlanDeterminismChecker->[checkPlanIsDeterministic->[checkPlanIsDeterministic]]]
Checks if the plan is deterministic.
You can keep it the stream way, just replace `reduce` with `forEach`
@@ -240,7 +240,7 @@ public class CardContentProvider extends ContentProvider { /* Search for notes using direct SQL query */ String[] proj = sanitizeNoteProjection(projection); String sql = SQLiteQueryBuilder.buildQueryString(false, "notes", proj, selection, null, null, order, null); - return col.getDb().query(sql, (Object[])selectionArgs); + return col.getDb().query(sql, selectionArgs); } case NOTES: { /* Search for notes using the libanki browser syntax */
[CardContentProvider->[getTemplateFromUri->[getModelIdFromUri],update->[shouldEnforceUpdateSecurity],insertMediaFile->[getType],bulkInsert->[shouldEnforceQueryOrInsertSecurity,bulkInsert],query->[shouldEnforceQueryOrInsertSecurity,query],insert->[shouldEnforceQueryOrInsertSecurity],answerCard->[answerCard]]]
Query the notes of a specific type. Returns a MatrixCursor that contains all the elements of the current note. retrieve a card template with specific ID return a cursor of cards that are not currently selected get full depart name and count of all depart nodes.
@Arthur-Milchior this broke the build. Please don't ever submit a PR that you haven't run `./gradlew clean jacocoTestReport` on
@@ -163,7 +163,7 @@ namespace System.Security.Cryptography tmp.CopyTo(destination); } - CryptographicOperations.ZeroMemory(tmp); + CryptographicOperations.ZeroMemory(tmp.Slice(0, bytesWritten)); } if (rent != null)
[No CFG could be retrieved]
Reads the specified block of data and decrypts it. Check if the decryption method is present.
Wass this just for clarity? `tmp` is sliced above as `tmp = tmp.Slice(0, bytesWritten);`
@@ -158,6 +158,9 @@ class WPSEO_Twitter { if ( is_singular() ) { $meta_desc = $this->single_description(); } + elseif ( is_home() && ! is_front_page() ) { + $meta_desc = $this->single_description( get_option( 'page_for_posts' ) ); + } else { $meta_desc = $this->fallback_description(); }
[WPSEO_Twitter->[site_twitter->[output_metatag],fallback_title->[title],title->[output_metatag],image_output->[output_metatag],image_from_content_output->[image_output],description->[output_metatag],author->[get_twitter_id,output_metatag],image_thumbnail_output->[image_output],image_from_meta_values_output->[image_output],site_domain->[output_metatag]]]
Get the description of the post.
Ok, so now I'm thinking `is_posts_page` should be a function of `WPSEO_Utils`
@@ -535,7 +535,7 @@ public class ProjectBuilder extends Builder { * version. */ protected void startBuild(Builder builder) { - project.versionMap.clear(); + project.versionMap.remove(builder.getBsn()); } /**
[ProjectBuilder->[getSourceFileFor->[getSourceFileFor],report->[getBaselineRepo,report,getReleaseRepo],getClasspath->[getClasspath,init],changedFile->[changedFile],getBaselineRepo->[getReleaseRepo],builds->[getExportedRuns,builds],lastModified->[lastModified]]]
Start the build.
Are these uses of versionMap safe? In some places Project, versionMap is synchronized before being mutated.
@@ -907,6 +907,18 @@ def remove_auth_from_url(url): return surl +def redact_password_from_url(url): + """Replace the password in a given url with ****""" + return transform_url(url, redact_netloc) + + +def remove_auth_from_url(url): + # Return a copy of url with 'username:password@' removed. + # username/pass params are passed to subversion through flags + # and are not recognized in the url. + return transform_url(url, lambda netloc: split_auth_from_netloc(netloc)[0]) + + def protect_pip_from_modification_on_windows(modifying_pip): """Protection of pip.exe from modification on Windows
[dist_in_site_packages->[normalize_path],has_leading_dir->[split_leading_dir],get_installed_distributions->[editables_only_test->[dist_is_editable],editable_test->[dist_is_editable],user_test,editables_only_test,local_test,editable_test],captured_output->[from_stream],dist_in_usersite->[normalize_path],unzip_file->[ensure_dir,has_leading_dir,split_leading_dir,current_umask],captured_stdout->[captured_output],splitext->[splitext],is_local->[normalize_path],dist_is_local->[is_local],unpack_file->[untar_file,unzip_file,file_contents,is_svn_page],untar_file->[ensure_dir,has_leading_dir,split_leading_dir,current_umask],rmtree->[rmtree],dist_location->[egg_link_path],remove_auth_from_url->[split_auth_from_netloc]]
Protection of pip. exe from modification on Windows On Windows ensuring that pip is run.
You need a period at the end of the sentence.
@@ -623,6 +623,9 @@ static bool ScheduleRun(EvalContext *ctx, Policy **policy, GenericAgentConfig *c DetectEnvironment(ctx); + Log(LOG_LEVEL_INFO, "Re-evaluating augments" ); + LoadAugments(ctx, config); + EvalContextClassPutHard(ctx, CF_AGENTTYPES[AGENT_TYPE_EXECUTOR], "cfe_internal,source=agent"); time_t t = SetReferenceTime();
[No CFG could be retrieved]
Reads a promise file and checks if it has any new promises and if so loads the promise Find the next non - empty class in the schedule that is defined at the given time.
VERBOSE please, no need to spam syslog with this.
@@ -8,6 +8,7 @@ public final class Constants { //Regex for acceptable logins public static final String LOGIN_REGEX = "^[_'.@A-Za-z0-9-]*$"; // Spring profile for development and production, see http://jhipster.github.io/profiles/ + public static final String SPRING_PROFILE_TEST = "test"; public static final String SPRING_PROFILE_DEVELOPMENT = "dev"; public static final String SPRING_PROFILE_PRODUCTION = "prod"; // Spring profile used when deploying with Spring Cloud (used when deploying to CloudFoundry)
[No CFG could be retrieved]
Enumerates all application constants.
I don't like to have a specific "test" profile, which would be only for Cassandra. Indeed, we could create one, but not just for this specific case.
@@ -4,7 +4,7 @@ RSpec.describe ChatChannelMembership, type: :model do let(:chat_channel_membership) { FactoryBot.create(:chat_channel_membership) } describe "#channel_text" do - it "sets channel text using name, slig, and human names" do + it "sets channel text using name, slug, and human names" do chat_channel = chat_channel_membership.chat_channel parsed_channel_name = chat_channel_membership.channel_name&.gsub("chat between", "")&.gsub("and", "") expected_text = "#{parsed_channel_name} #{chat_channel.slug} #{chat_channel.channel_human_names.join(' ')}"
[create,let,describe,slug,join,it,to,elasticsearch_doc,with,destroy,require,sidekiq_assert_enqueued_with,to_s,receive,index_to_elasticsearch,gsub,id,hash_including,keys,have_received,chat_channel,eq,save,index_to_elasticsearch_inline]
Describe the chat channel membership adds the given hash to the elasticsearch index.
This really doesn't have to do with fixing the bug, but since it's just a quick typo fix related to the same subject of `ChatChannelMembership` I figured I'd just include it here.
@@ -186,6 +186,15 @@ class Pipeline(AbstractContextManager, Generic[HTTPRequestType, HTTPResponseType _ for _ in executor.map(prepare_requests, requests) ] + def _prepare_multipart(self, request): + # type: (HTTPRequestType) -> None + # This code is fine as long as HTTPRequestType is actually + # azure.core.pipeline.transport.HTTPRequest, bu we don't check it in here + # since we didn't see (yet) pipeline usage where it's not this actual instance + # class used + self._prepare_multipart_mixed_request(request) + request.prepare_multipart_body() # type: ignore + def run(self, request, **kwargs): # type: (HTTPRequestType, Any) -> PipelineResponse """Runs the HTTP Request through the chained policies.
[Pipeline->[run->[send,_prepare_multipart_mixed_request,_TransportRunner],__init__->[_SansIOHTTPPolicyRunner,_TransportRunner],_prepare_multipart_mixed_request->[prepare_requests->[_await_result]],__exit__->[__exit__],__enter__->[__enter__]],_SansIOHTTPPolicyRunner->[send->[_await_result,send]],_TransportRunner->[send->[send]]]
Will execute the multipart policies. Will execute the multipart policies. Will execute.
Same method (but async) should be done on the AsyncPipline
@@ -827,4 +827,13 @@ class Article < ApplicationRecord ::Articles::DetectAnimatedImagesWorker.perform_async(id) end + + def delete_images + image_paths = body_markdown.scan(IMG_MARKDOWN_REGEX).flatten + main_image_path = main_image&.scan(IMG_MARKDOWN_REGEX) + image_paths << main_image_path if main_image_path + image_paths.each do |image_path| + Images::DeleteWorker.perform_async([image_path]) + end + end end
[Article->[username->[username],evaluate_front_matter->[set_tag_list],update_notifications->[update_notifications],readable_edit_date->[edited?]]]
Detects an animated images on the article.
You are almost there. I'd you change this method to accept only a single string instead of an array. The same should be done with `Image::Delete` service
@@ -1331,7 +1331,9 @@ public class CardBrowser extends NavigationDrawerActivity implements private static String formatQA(String txt) { /* Strips all formatting from the string txt for use in displaying question/answer in browser */ - String s = txt.replace("<br>", " "); + String s = txt; + s = s.replaceAll("<!--.*?-->", ""); + s = s.replace("<br>", " "); s = s.replace("<br />", " "); s = s.replace("<div>", " "); s = s.replace("\n", " ");
[CardBrowser->[updateList->[updatePreviewMenuItem],onCollectionLoaded->[getLastDeckId,onCollectionLoaded],onDestroy->[onDestroy],onNavigationPressed->[onNavigationPressed],onCreate->[onCreate],onOptionsItemSelected->[run->[getSelectedCardIds],onClick->[changeDeck],onOptionsItemSelected,getSelectedCardIds],onCheck->[updateMultiselectMenu],updateCardsInList->[getPositionMap,updateList],onStop->[onStop],onResume->[onResume],onPostExecute->[searchCards,updateCardsInList,updateList,updatePreviewMenuItem,getSubtitleText,updateMultiselectMenu],removeNotesView->[getReviewerCardId,getPositionMap,updateList],onSaveInstanceState->[onSaveInstanceState],saveLastDeckId->[clearLastDeckId],onCheckAll->[updateMultiselectMenu],closeCardBrowser->[closeCardBrowser],onActivityResult->[onActivityResult],changeDeck->[getSelectedCardIds],onBackPressed->[onBackPressed],selectDropDownItem->[saveLastDeckId],onProgressUpdate->[updateCardInList,updateList,removeNotesView],endMultiSelectMode->[recenterListView],onRestoreInstanceState->[onRestoreInstanceState],onCreateOptionsMenu->[onQueryTextSubmit->[onSearch],onCreateOptionsMenu],selectDeckById->[selectDropDownItem]]]
Strips all formatting from the string txt for use in displaying question or answer in browser.
This is just for the small QA chunks and the template never passes through here right? I ask because it seems like 7 string copy / modification cycles is a bit much, but if the text is small performance is inconsequential vs code complexity If the expected text could be large though I wonder if we could do one pattern that handled all of them? As a static this one could be a prime spot for a `@VisibleForTesting` unit test so as not to shoot feet while attempting. I think the text is small so then this would be a nice targeted change. Possibly enough internet points to trade in for at least a pixelated silver medal :2nd_place_medal: at this point hahaha
@@ -488,14 +488,10 @@ public class SparkInterpreter extends Interpreter { */ try { - if (sc.version().startsWith("1.1") || sc.version().startsWith("1.2")) { + if (sparkVersion < 130) { Method loadFiles = this.interpreter.getClass().getMethod("loadFiles", Settings.class); loadFiles.invoke(this.interpreter, settings); - } else if (sc.version().startsWith("1.3")) { - Method loadFiles = this.interpreter.getClass().getMethod( - "org$apache$spark$repl$SparkILoop$$loadFiles", Settings.class); - loadFiles.invoke(this.interpreter, settings); - } else if (sc.version().startsWith("1.4")) { + } else { Method loadFiles = this.interpreter.getClass().getMethod( "org$apache$spark$repl$SparkILoop$$loadFiles", Settings.class); loadFiles.invoke(this.interpreter, settings);
[SparkInterpreter->[getProgress->[getJobGroup],interpretInput->[toString,interpret],getSQLContext->[useHiveContext,getSparkContext],getProgressFromStage_1_0x->[getProgressFromStage_1_0x],getProgressFromStage_1_1x->[getProgressFromStage_1_1x],close->[close],cancel->[getJobGroup],open->[getDependencyResolver,getSQLContext,getDepInterpreter,getSparkContext],interpret->[getJobGroup,interpret]]]
Opens the compiler. create a new compiler and a pool for the compiler The following methods are used to provide the necessary functionality to display the result of a query. add jar and file if it is not in the current context.
should we make 130 a class constant?
@@ -901,5 +901,12 @@ namespace MonoGame.Tools.Pipeline } } } + + public bool CopyOrLink(string file, bool exists, out int def, out bool applyforall) + { + def = 2; + applyforall = true; + return true; + } } }
[MainView->[UpdateMenus->[UpdateRecentProjectList],TreeViewOnKeyDown->[TreeViewShowContextMenu]]]
ItemExistanceChanged method.
@cra0zy - So this is where someone would hook in the dialog for Windows? What is `def`? Can you rename that to something more obvious?
@@ -194,13 +194,6 @@ function grunion_message_bulk_spam() { echo '<div class="updated"><p>' . __( 'Feedback(s) marked as spam', 'jetpack' ) . '</p></div>'; } -// remove admin UI parts that we don't support in feedback management -add_action( 'admin_menu', 'grunion_admin_menu' ); -function grunion_admin_menu() { - global $menu, $submenu; - unset( $submenu['edit.php?post_type=feedback'] ); -} - add_filter( 'bulk_actions-edit-feedback', 'grunion_admin_bulk_actions' ); function grunion_admin_bulk_actions( $actions ) { global $current_screen;
[grunion_delete_spam_feedbacks->[get_posts],grunion_ajax_shortcode_to_json->[get_attribute],grunion_ajax_spam->[get_results]]
This function is used to display a message in bulk when the user is editing a message in.
Removed this piece of code since it seemed obsolete. After loading this file, we hook again into `admin_menu` for registering the feedback menu and submenus.
@@ -126,8 +126,14 @@ static int template_private_test(void) BIGNUM *bn = NULL, *bn_res = NULL; int res = 0; - if (!TEST_ptr(bld) - || !TEST_true(OSSL_PARAM_BLD_push_uint(bld, "i", 6)) + if (!TEST_ptr(data1 = OPENSSL_secure_malloc(data1_size)) + || !TEST_ptr(bld = OSSL_PARAM_BLD_new())) + goto err; + + for (j = 0; j < data1_num; j++) + data1[j] = -16 * j; + + if (!TEST_true(OSSL_PARAM_BLD_push_uint(bld, "i", 6)) || !TEST_true(OSSL_PARAM_BLD_push_ulong(bld, "l", 42)) || !TEST_true(OSSL_PARAM_BLD_push_uint32(bld, "i32", 1532)) || !TEST_true(OSSL_PARAM_BLD_push_uint64(bld, "i64", 9999999))
[int->[OSSL_PARAM_BLD_push_long,TEST_time_t_eq,TEST_long_eq,TEST_str_eq,OSSL_PARAM_get_ulong,OSSL_PARAM_get_double,BN_new,TEST_true,TEST_ptr,OSSL_PARAM_BLD_push_int32,OSSL_PARAM_get_utf8_string,OSSL_PARAM_BLD_free,OSSL_PARAM_BLD_push_time_t,OSSL_PARAM_BLD_push_double,TEST_int_eq,OSSL_PARAM_get_long,OSSL_PARAM_BLD_new,BN_cmp,OSSL_PARAM_BLD_push_octet_string,TEST_ulong_eq,OSSL_PARAM_BLD_push_uint,OSSL_PARAM_get_BN,OSSL_PARAM_BLD_push_int64,TEST_size_t_eq,TEST_mem_eq,BN_free,OSSL_PARAM_get_int,TEST_uint_eq,BN_secure_new,OSSL_PARAM_get_int32,OSSL_PARAM_BLD_free_params,OSSL_PARAM_get_size_t,OSSL_PARAM_locate,OSSL_PARAM_get_uint64,TEST_double_eq,OSSL_PARAM_BLD_push_octet_ptr,OSSL_PARAM_get_uint32,OSSL_PARAM_get_utf8_ptr,OSSL_PARAM_BLD_push_int,OSSL_PARAM_BLD_push_utf8_string,OSSL_PARAM_BLD_to_param,OSSL_PARAM_BLD_push_BN,OPENSSL_free,OSSL_PARAM_BLD_push_uint64,OSSL_PARAM_BLD_push_uint32,OSSL_PARAM_BLD_push_ulong,BN_set_word,OSSL_PARAM_BLD_push_size_t,OSSL_PARAM_get_uint,OSSL_PARAM_get_int64,OSSL_PARAM_BLD_push_utf8_ptr,OSSL_PARAM_get_time_t],setup_tests->[ADD_TEST]]
test if template private parameters are available Check if parameter i and p are in the next block of chain. Checks if the current parameter p is in a chain of chains.
Should there be some CRYPTO_secure_allocated() calls to test that the relevant params `i` and `bignumber` are securely allocated?
@@ -27,6 +27,10 @@ module Gobierto config.i18n.default_locale = :es config.i18n.available_locales = [:es, :en, :ca] + # Custom I18n fallbacks + config.after_initialize do + I18n.fallbacks = {ca: [:ca, :es, :en], es: [:es, :ca, :en], en: [:en, :es, :ca]} + end config.generators do |g| g.test_framework :minitest, spec: false, fixture: true
[Application->[queue_adapter,join,load_path,field_error_proc,root,merge!,time_zone,select,generators,autoload_paths,eager_load_paths,to_s,default_locale,directory?,each,test_framework,proc,chdir,available_locales,require_dependency],groups,require_relative,require,require_dependency]
The main entry point for the railtie application. This method is used to configure the available strategies.
Space inside { missing.<br>Space inside } missing.
@@ -406,7 +406,7 @@ crt_ctx_epi_abort(d_list_t *rlink, void *arg) wait = 0; } else { D_MUTEX_UNLOCK(&ctx->cc_mutex); - rc = crt_progress(ctx, 1, NULL, NULL); + rc = crt_progress(ctx, 1); D_MUTEX_LOCK(&ctx->cc_mutex); if (rc != 0 && rc != -DER_TIMEDOUT) { D_ERROR("crt_progress failed, rc %d.\n", rc);
[No CFG could be retrieved]
aborts all RPCs in the queue -DER_INVAL - DESTROY - 1 - 1 - 1 - 1 -.
copyright dates need to be updated
@@ -3099,6 +3099,11 @@ namespace System.Diagnostics.Tracing } } + // Scoping the call to GetFields to a local function to limit the linker suppression + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2070:UnrecognizedReflectionPattern", + Justification = "Nested type members are safe from linker with the parent annotation")] + static FieldInfo[] GetNestedFields(Type nestedType) => nestedType.GetFields(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); + // Collect task, opcode, keyword and channel information #if FEATURE_MANAGED_ETW_CHANNELS && FEATURE_ADVANCED_MANAGED_ETW_CHANNELS foreach (var providerEnumKind in new string[] { "Keywords", "Tasks", "Opcodes", "Channels" })
[No CFG could be retrieved]
Creates an EventMetadata object for the given EventSource. missing type in event source.
(nit) The `Justification` line should be indented one level to the right. (nit) "safe from linker" sounds a bit like the linker is dangerous. How about "Nested type members will be preserved by the ILLinker with the parent annotation" ?
@@ -191,11 +191,12 @@ def write_jpeg(input: torch.Tensor, filename: str, quality: int = 75): write_file(filename, output) -def decode_image(input: torch.Tensor) -> torch.Tensor: +def decode_image(input: torch.Tensor, channels: int = 0) -> torch.Tensor: """ Detects whether an image is a JPEG or PNG and performs the appropriate operation to decode the image into a 3 dimensional RGB Tensor. + Optionally converts the image to the desired number of color channels. The values of the output tensor are uint8 between 0 and 255. Parameters
[encode_png->[encode_png],write_png->[encode_png,write_file],read_image->[read_file,decode_image],write_file->[write_file],decode_png->[decode_png],decode_jpeg->[decode_jpeg],encode_jpeg->[encode_jpeg],decode_image->[decode_image],write_jpeg->[encode_jpeg,write_file],read_file->[read_file]]
Detects whether an image is a JPEG or PNG and performs the appropriate appropriate operation to decode.
On user-facing APIs where the value can be used either as channels or components, we name them channels.
@@ -16,7 +16,7 @@ module ProgramDecoratorCommon path = h.work_path(work) h.link_to(work.title, path, target: "_blank") when :started_at - send(field).to_time.strftime("%Y-%m-%d %H:%M") + send(field).to_time.strftime("%Y/%m/%d %H:%M") else send(field) end
[to_values->[inject,send,work_path,find,work_episode_path,strftime,title_with_number,work,link_to,title,name],included,extend]
Returns a hash of allDIFF fields with a value of .
Do not use `to_time` on Date objects, because they know nothing about the time zone in use.
@@ -127,6 +127,8 @@ module View obsolete_schedule[first.obsolete_on] = Array(obsolete_schedule[first.obsolete_on]).append(name) end + show_obsolete_schedule = obsolete_schedule.any? { |key, _value| !key.nil? } + rows = @depot.upcoming.group_by(&:name).map do |name, trains| train = trains.first discounts = train.discount&.group_by { |_k, v| v }&.map do |price, price_discounts|
[GameInfo->[render->[depot,h,empty?],game_info->[class,h],render_body->[concat,any?],discarded_trains->[h,price,format_currency,name,map],upcoming_trains->[h,names_to_prices,size,append,zero?,with_index,include?,format_currency,map,class,any?,join,first,each,ordinal,rusts_on,available_on,obsolete_on],phases->[h,contrast_on,current,class,concat,color_for,any?,join,each,last,capitalize,map],needs,include],require]
Returns a Hash of all upcoming and obsolete records grouped by name. Returns a list of missing nodes if any of the train s events are available.
this should be show_obsolete_schedule = obsolete_schedule.keys.any?
@@ -696,7 +696,10 @@ public abstract class ComponentMessageProcessor<T extends ComponentModel> extend @Override public boolean isAsync() { - return ComponentMessageProcessor.this.isAsync(); + // If the operation is blocking we cannot guarantee that the + // processor switch threads while executing. So parallelism + // should be handled in the processing strategy. + return !ComponentMessageProcessor.this.isBlocking(); } };
[ComponentMessageProcessor->[buildTransactionConfig->[supportsTransactions],createExecutionContext->[createExecutionContext],onEvent->[process],getExecutionCallbackForPolicyAndOperationWithTarget->[complete->[complete],error->[error]],prepareAndExecuteOperation->[mapped,isTargetWithPolicies,executeOperation],setOperationExecutionParams->[createExecutionContext,setOperationExecutionParams,getPrecalculatedContext,shouldUsePrecalculatedContext],doStart->[startInnerFlux],startInnerFlux->[isAsync->[isAsync],error],getRetryPolicyTemplate->[apply],resolveParameters->[apply,createExecutionContext],addContextToEvent->[resolveConfiguration,shouldUsePrecalculatedContext],toString->[toString],mapped->[complete->[complete],error->[error]],resolveHonouringRetryPolicyTemplateOverride->[isAsync],isAsyncExecutableBasedOn->[getRetryPolicyTemplate,isAsync]]]
Starts the inner flux. onProcessor - > innerProcessor.
would be better to keep this method as is and instead add an `isBlocking` method in this class and its interface, for consistency with the owner class.
@@ -1282,9 +1282,12 @@ bool Game::createSingleplayerServer(const std::string &map_dir, } if (bind_addr.isIPv6() && !g_settings->getBool("enable_ipv6")) { - *error_message = "Unable to listen on " + - bind_addr.serializeString() + - " because IPv6 is disabled"; + const char *s = gettext("Unable to listen on %s because IPv6 is disabled"); + char buf[128]; + porting::mt_snprintf(buf, sizeof(buf), s, bind_addr.serializeString().c_str()); + *error_message = buf; + errorstream << *error_message << std::endl; + return false; errorstream << *error_message << std::endl; return false; }
[No CFG could be retrieved]
Create a single - player server and a client. Reads the network configuration from the network and returns true if the connection is successful.
two duplicate lines
@@ -602,15 +602,14 @@ namespace System.Xml.Schema { _StateHistory.Push(); _StateHistory[_StateHistory.Length - 1] = _CurState; - _CurState = _NextState; + _CurState = _NextState!; } private void Pop() { - _CurState = (XdrEntry)_StateHistory.Pop(); + _CurState = (XdrEntry?)_StateHistory.Pop()!; } - // // Group stack push & pop //
[XdrBuilder->[XDR_EndAttribute->[Reset],GroupContent->[],XDR_InitGroup->[PushGroupInfo],Push->[Push],PushGroupInfo->[Copy,Push],XDR_EndGroup->[PopGroupInfo],PopGroupInfo->[Pop],SendValidationEvent->[SendValidationEvent],Pop->[Pop]]]
private private void Push - Stack - Stack - Stack.
NIT: `?` or `!` redundant
@@ -17,7 +17,7 @@ module View if @tile.lawson? || @tile.paths.empty? h(Part::TownDot, town: town, tile: @tile, region_use: @region_use, color: color_for(town)) else - h(Part::TownRect, town: town, region_use: @region_use, color: color_for(town)) + h(Part::TownRect, tile: @tile, town: town, region_use: @region_use, color: color_for(town)) end end end
[Towns->[color_for->[paths,town,class,find_index,any?,paths_for,map],render->[h,empty?,lawson?,color_for,map],needs,freeze],require]
Renders a color - based tag for the top - level tile.
don't need this
@@ -114,7 +114,9 @@ quiet = partial( dest='quiet', action='count', default=0, - help='Give less output.') + help=('Give less output. Option is additive, and can be used up to 3' + ' times (corresponding to WARNING, ERROR, and CRITICAL logging' + ' levels).') log = partial( Option,
[only_binary->[Option,set,FormatControl],_handle_only_binary->[getattr,fmt_ctl_handle_mutual_exclude],exists_action->[Option],trusted_host->[Option],extra_index_url->[Option],make_option_group->[add_option,option,OptionGroup],allow_unsafe->[Option],constraints->[Option],check_install_build_global->[getname->[getattr],any,fmt_ctl_no_binary,warn,map],resolve_wheel_no_use_binary->[fmt_ctl_no_use_wheel],_merge_hash->[setdefault,split,error,join],allow_external->[Option],find_links->[Option],no_binary->[Option,set,FormatControl],_get_format_control->[getattr],_handle_no_binary->[getattr,fmt_ctl_handle_mutual_exclude],editable->[Option],requirements->[Option],partial]
Create a list of options for the given sequence number. Proxy server for a single connection.
You've got a syntax error here, a closing parenthesis is missing
@@ -301,10 +301,10 @@ public class OpenApiConnectorGenerator extends ConnectorGenerator { private static void addGlobalParameters(final Connector.Builder builder, final OpenApiModelInfo info) { switch (info.getApiVersion()) { case V2: - Oas20ConnectorGeneratorSupport.addGlobalParameters(builder, info.getV2Model()); + new Oas20ParameterGenerator().addGlobalParameters(builder, info.getV2Model()); break; case V3: - Oas30ConnectorGeneratorSupport.addGlobalParameters(builder, info.getV3Model()); + new Oas30ParameterGenerator().addGlobalParameters(builder, info.getV3Model()); break; default: throw new IllegalStateException(String.format("Unable to build connector for OpenAPI document type '%s'", info.getModel().getClass()));
[OpenApiConnectorGenerator->[addGlobalParameters->[addGlobalParameters],determineConnectorName->[determineConnectorName],determineConnectorDescription->[determineConnectorDescription],configureConnector->[createDescriptor]]]
Adds the global parameters to the connector builder.
And these also, we could cache them in a field instead of instantiating them.
@@ -63,12 +63,10 @@ func CreateTxAndAttempt( ) *models.Tx { tx := NewTx(from, sentAt) if err := store.Save(tx); err != nil { - logger.Fatal(err) + logger.Error(err) } _, err := store.AddAttempt(tx, tx.EthTx(big.NewInt(1)), sentAt) - if err != nil { - logger.Fatal(err) - } + mustNotErr(err) return tx }
[EthTx,Save,NewTime,NewJob,AddAttempt,NewString,StringFrom,Unix,ParseNullableTime,BytesToHash,ToLower,Read,Get,BytesToAddress,Cron,Sprintf,Unmarshal,NewInt,String,Fatal,Parse]
NewJob creates a new models. Job from a given sequence number. NewEthAddress returns a new ethernet address based on the given parameters.
`logger.Error` doesn't exit the program, but continues running. Do we want that? `Fatal` does. A failure to save shouldn't continue running imo
@@ -84,9 +84,13 @@ public class CombatUnitAbility { @Builder.Default boolean returnFire = true; /** When should this unit commit suicide on offense */ - @Builder.Default Suicide suicideOnOffense = Suicide.NONE; + @Getter(value = AccessLevel.NONE) + @Builder.Default + Suicide suicideOnOffense = Suicide.NONE; /** When should this unit commit suicide on defense */ - @Builder.Default Suicide suicideOnDefense = Suicide.NONE; + @Getter(value = AccessLevel.NONE) + @Builder.Default + Suicide suicideOnDefense = Suicide.NONE; /** Which {@link games.strategy.triplea.delegate.power.calculator.CombatValue} should be used */ @Value
[CombatUnitAbility->[CombatValueType->[CombatValueType]]]
The name of this unit ability that will be shown in the Battle UI. Checks if a given side is a side of the current CombatUnit.
Side-note, `Suicide` sounds like a value object, perhaps could be renamed to `SuicideCondition` or `UnitSuicideCondition`
@@ -48,6 +48,14 @@ function fontColor(props, isHovered?: boolean, isActionText?: boolean) { case KIND.negative: return props.$theme.colors.tagNegativeFontDisabled; case KIND.custom: + console.log( + props.$color, + props.$theme.colors.tagFontDisabledRampUnit, + customOnRamp( + props.$color, + props.$theme.colors.tagFontDisabledRampUnit, + ), + ); return customOnRamp( props.$color, props.$theme.colors.tagFontDisabledRampUnit,
[No CFG could be retrieved]
Custom on - ramp color function Colors for tag - aligned solid - font tags.
need to remove this `console.log`
@@ -701,6 +701,11 @@ function createInjector(modulesToLoad, strictDi) { instanceInjector.strictDi = strictDi; forEach(runBlocks, function(fn) { if (fn) instanceInjector.invoke(fn); }); + instanceInjector.loadNewModules = function(mods) { + forEach(loadModules(mods), function(fn) { if (fn) instanceInjector.invoke(fn); }); + }; + + return instanceInjector; ////////////////////////////////////
[No CFG could be retrieved]
Register a service with the angular module. Provides a value provider instance that can be used to provide the name of the instance.
Worth putting this in a method to avoid duplicating it a few lines down?
@@ -164,11 +164,14 @@ public class GeoEnrichIP extends AbstractProcessor { final DatabaseReader dbReader = databaseReaderRef.get(); final String ipAttributeName = context.getProperty(IP_ADDRESS_ATTRIBUTE).evaluateAttributeExpressions(flowFile).getValue(); final String ipAttributeValue = flowFile.getAttribute(ipAttributeName); - if (StringUtils.isEmpty(ipAttributeName)) { //TODO need to add additional validation - should look like an IPv4 or IPv6 addr for instance + + if (StringUtils.isEmpty(ipAttributeName)) { session.transfer(flowFile, REL_NOT_FOUND); - getLogger().warn("Unable to find ip address for {}", new Object[]{flowFile}); + getLogger().warn("FlowFile '{}' aatribute '{}' was empty. Routing to failure", + new Object[]{flowFile, IP_ADDRESS_ATTRIBUTE.getDisplayName()}); return; } + InetAddress inetAddress = null; CityResponse response = null;
[GeoEnrichIP->[init->[add,unmodifiableList,unmodifiableSet],onScheduled->[getValue,build,getDuration,stop,set,info,File,StopWatch],onTrigger->[getValue,getByName,getLatitude,toString,warn,put,city,getDuration,putAllAttributes,isEmpty,valueOf,transfer,getAttribute,StopWatch,stop,getCode,getSubdivisions,getName,getIsoCode,get,getLongitude],closeReader->[get,close],build]]
On trigger. region Flow File Implementation.
minor typo here, will fix while merging
@@ -543,9 +543,16 @@ class CPUCallConv(BaseCallConv): def _get_excinfo_argument(self, func): return func.args[1] - def call_function(self, builder, callee, resty, argtys, args): + def call_function(self, builder, callee, resty, argtys, args, + attrs=None): """ Call the Numba-compiled *callee*. + Parameters: + ----------- + attrs: LLVM style string or iterable of individual attributes, default + is None which specifies no attributes. Examples: + LLVM style string: "noinline fast" + Equivalent iterable: ("noinline", "fast") """ # XXX better fix for callees that are not function values # (pointers to function; thus have no `.args` attribute)
[ErrorModel->[fp_zero_division->[return_user_exc]],CPUCallConv->[decorate_function->[get_arguments,_get_arg_packer],check_try_status->[_get_try_state],return_value->[_return_errcode_raw],get_function_type->[get_return_type,_get_arg_packer],call_function->[_get_return_status,_get_return_argument,_get_arg_packer],return_user_exc->[_return_errcode_raw,set_static_user_exc],return_status_propagate->[_return_errcode_raw,check_try_status],unset_try_status->[_get_try_state],set_try_status->[_get_try_state]],MinimalCallConv->[_return_errcode_raw->[_const_int],decorate_function->[_get_arg_packer],get_function_type->[get_return_type,_get_arg_packer],call_function->[_get_return_status,_get_arg_packer],return_user_exc->[_get_call_helper,_const_int]],_const_int]
Get the excinfo argument from the function.
Just noticed this docstring is wrong!
@@ -244,7 +244,7 @@ final class PlatformDependent0 { public Object run() { try { Class<?> bitsClass = - Class.forName("java.nio.Bits", false, PlatformDependent.getSystemClassLoader()); + Class.forName("java.nio.Bits", false, getSystemClassLoader()); Method unalignedMethod = bitsClass.getDeclaredMethod("unaligned"); Throwable cause = ReflectionUtil.trySetAccessible(unalignedMethod); if (cause != null) {
[PlatformDependent0->[getLong->[getLong],equals->[getLong,getInt],getInt->[getInt],getContextClassLoader->[run->[getContextClassLoader],getContextClassLoader],getByte->[getByte],freeDirectBuffer->[freeDirectBuffer],getSystemClassLoader->[run->[getSystemClassLoader],getSystemClassLoader],putShort->[putShort],objectFieldOffset->[objectFieldOffset],hashCodeAscii->[getLong,getByte,getInt,getShort],getObject->[getObject],addressSize->[addressSize],copyMemory->[copyMemory],putLong->[putLong],putInt->[putInt],getClassLoader->[run->[getClassLoader],getClassLoader],putByte->[putByte],freeMemory->[freeMemory],throwException->[throwException],allocateMemory->[allocateMemory],equalsConstantTime->[getLong,getInt,getByte,equalsConstantTime],setMemory->[setMemory],getShort->[getShort]]]
This method is called when the system is running.
This fixed a cycle reference
@@ -68,10 +68,13 @@ public interface ComponentEntityMerger<EntityType extends ComponentEntity & Perm if (clientEntity.getBulletins().size() > MAX_BULLETINS_PER_COMPONENT) { clientEntity.setBulletins(clientEntity.getBulletins().subList(0, MAX_BULLETINS_PER_COMPONENT)); } + } else { + clientEntity.setBulletins(null); + } + if (canRead || canOperate) { mergeComponents(clientEntity, entityMap); } else { - clientEntity.setBulletins(null); clientEntity.setComponent(null); // unchecked warning suppressed } }
[merge->[getValue,getBulletins,setBulletins,size,sort,getPermissions,add,getKey,mergeComponents,mergePermissions,getCanRead,mergeBulletins,forEach,setComponent,entrySet,subList]]
Merge the client entity with the given entity map.
I think we need to continue to set the component to null when `canRead` is false. It may have been changed to accommodate an earlier iteration of this PR.
@@ -0,0 +1,18 @@ +package com.baeldung.core.modifiers.otherpackage; + +import com.baeldung.core.modifiers.Person; + +public class Sword { + Person wielder; + String name; + + public Sword(String wielderName, int wielderAge, String swordName) { + + name = swordName; + + // The constructor Person(String, String, int) is not visible + + // person = new Person("Mr", wielderName, wielderAge); + wielder = new Person(); + } +}
[No CFG could be retrieved]
No Summary Found.
The Weapon example, along with Forge and Blacksmith is missing