patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -46,6 +46,8 @@ public class MuleApplicationClassLoader extends AbstractArtifactClassLoader impl
protected static final URL[] CLASSPATH_EMPTY = new URL[0];
+ private static final String DEFAULT_LEAK_CLEANER_CLASS = "DefaultLeakCleaner.class";
+
private String appName;
private File appDir;
| [MuleApplicationClassLoader->[findClass->[findClass],getArtifactName->[getAppName],getResources->[getResources],findLibrary->[findLibrary],getResource->[getResource]]] | Creates a class loader that loads all of the mule modules and transports. Get Mule libs folder. | Why? Can't you either specify implementation directly or if that doen't make sense use Service Provider approach. |
@@ -437,6 +437,14 @@ func MustHash(in string) common.Hash {
return common.BytesToHash(out)
}
+func MustHexDecodeString(s string) []byte {
+ a, err := hex.DecodeString(s)
+ if err != nil {
+ panic(err)
+ }
+ return a
+}
+
// LogListeningAddress returns the LogListeningAddress
func LogListeningAddress(address common.Address) string {
if address == ZeroAddress {
| [Stop->[Stop],Empty->[Empty],Reset->[Stop,Reset],Add->[Add],Destroy->[Pause],Sleep->[Sleep],Take->[Take,Empty],After,Duration,Reset] | MustHash returns the hash of the given possible address string or an error if it s not HexToUint256 returns the uint256 represented by s or an error if it doesn t. | nit: If this is only used in tests, I think `cltest` would be a better place for this. I try to avoid panicking in general, maybe during initialization. `cltest` is a bit controversial, as it pulls in just about every package, but it is where we tend to keep test helpers. |
@@ -1048,11 +1048,9 @@ func (bc *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain [
batch.Reset()
}
}
- if batch.ValueSize() > 0 {
- bytes += batch.ValueSize()
- if err := batch.Write(); err != nil {
- return 0, err
- }
+ bytes += batch.ValueSize()
+ if err := batch.Write(); err != nil {
+ return 0, err
}
// Update the head fast sync block if better
| [AddPendingCrossLinks->[WritePendingCrossLinks,ReadPendingCrossLinks],IsSameLeaderAsPreviousBlock->[GetHeaderByNumber],SuperCommitteeForNextEpoch->[ShardID,CurrentHeader,Config],ValidatorCandidates->[ReadValidatorList],ReadValidatorStats->[ReadValidatorStats],ReadTxLookupEntry->[ReadTxLookupEntry],UpdateStakingMetaData->[writeDelegationsByDelegator,WriteValidatorSnapshot,ReadValidatorList,WriteValidatorList],UpdateBlockRewardAccumulator->[WriteBlockRewardAccumulator,ReadBlockRewardAccumulator],GetBlockByNumber->[GetBlock],WriteValidatorList->[WriteValidatorList],GetHeaderByNumber->[GetHeaderByNumber],ReadEpochVrfBlockNums->[ReadEpochVrfBlockNums],WriteBlockRewardAccumulator->[WriteBlockRewardAccumulator],WriteCXReceiptsProofSpent->[WriteCXReceiptsProofSpent],GetECDSAFromCoinbase->[ShardID,ReadShardState,Config],GetBlockByHash->[GetBlock],WriteValidatorSnapshot->[WriteValidatorSnapshot],HasBlockAndState->[HasState],GetUnclesInChain->[GetBlock],Stop->[CurrentBlock],InsertReceiptChain->[Reset,CurrentFastBlock,HasBlock],GasLimit->[GasLimit],GetTdByHash->[GetTdByHash],ReadValidatorInformationAt->[StateAt],update->[Stop,procFutureBlocks],GetVrfByNumber->[GetHeaderByNumber],ReadShardLastCrossLink->[ReadShardLastCrossLink],State->[CurrentBlock],DeleteFromPendingSlashingCandidates->[writeSlashes],ReadValidatorSnapshot->[ReadValidatorSnapshot,CurrentBlock],GetTd->[GetTd],SetHead->[loadLastState,SetHead],insertChain->[HasState,GetBlock,CurrentBlock,insertChain,Validator,WriteBlockWithState],CurrentHeader->[CurrentHeader],ReadShardState->[ShardID,ReadShardState],reportBlock->[addBadBlock],AddPendingSlashingCandidates->[State,ReadPendingSlashingCandidates,writeSlashes],ReadCXReceipts->[ReadCXReceipts],WriteBlockWithState->[CurrentBlock,insertWithWriter],ShardID->[ShardID],DeleteCrossLinks->[ShardID],ResetWithGenesisBlock->[SetHead],UpdateValidatorSnapshots->[WriteValidatorSnapshot],ReadValidatorList->[ReadValidatorList],LastContinuousCrossLink->[ReadCrossLink],ReadPendingSlashingCandidates->[CurrentHeader,Config],ReadPendingCrossLinks->[ReadPendingCrossLinks],CXMerkleProof->[ShardID,ReadCXReceipts],ReadEpochVdfBlockNum->[ReadEpochVdfBlockNum],GetHeaderByHash->[GetHeaderByHash],GetBlockHashesFromHash->[GetBlockHashesFromHash],WriteShardStateBytes->[WriteShardStateBytes],WriteCrossLinks->[ShardID],HasHeader->[HasHeader],WriteEpochVrfBlockNums->[WriteEpochVrfBlockNums],InsertHeaderChain->[InsertHeaderChain],GetHeader->[GetHeader],ReadValidatorInformation->[ReadValidatorInformationAt,CurrentBlock],GetAncestor->[GetAncestor],GetBlocksFromHash->[GetBlock],Export->[CurrentBlock],DeleteFromPendingCrossLinks->[WritePendingCrossLinks,ShardID,ReadPendingCrossLinks],WriteEpochVdfBlockNum->[WriteEpochVdfBlockNum],ReadDelegationsByDelegator->[ReadDelegationsByDelegator,CurrentBlock],UpdateValidatorVotingPower->[ReadValidatorStats,ReadValidatorSnapshotAtEpoch],ReadDelegationsByDelegatorAt->[ReadDelegationsByDelegator],ReadBlockRewardAccumulator->[ReadBlockRewardAccumulator],GetVdfByNumber->[GetHeaderByNumber],insert->[insertWithWriter],prepareStakingMetaData->[ReadDelegationsByDelegator],WritePendingCrossLinks->[ShardID,WritePendingCrossLinks],Rollback->[removeInValidatorList,CurrentBlock,GetBlock,CurrentFastBlock]] | InsertReceiptChain inserts a new block into the block store. This function is called when a block is unknown. It writes all the data in the block private static int processed = 0 nil = nil. | why remove the > 0 condition? |
@@ -205,9 +205,9 @@ void GcodeSuite::G28(const bool always_home_all) {
#endif
}
- #else
+ else
- if (home_all || homeX || homeY) {
+ if (homeX || homeY) {
// Raise Z before homing any other axes and z is not already high enough (never lower z)
destination[Z_AXIS] = Z_HOMING_HEIGHT;
if (destination[Z_AXIS] > current_position[Z_AXIS]) {
| [No CFG could be retrieved] | Creates a new object from the given n - tuple. Creates a n - tuple for the given node. | What a nonsense! I really love it when my machine can home when z is not homing to max. |
@@ -81,8 +81,8 @@ export default class ListingAdapterV1 extends AdapterBase {
? new Money(ipfsData.commission)
: null
listing.commissionPerUnit = ipfsData.commissionPerUnit
- ? new Money(ipfsData.commissionPerUnit)
- : null
+ ? new Money(ipfsData.commissionPerUnit)
+ : null
} else if (listing.type === 'fractional') {
listing.slots = ipfsData.slots
listing.timeIncrement = ipfsData.timeIncrement
| [No CFG could be retrieved] | Get a listing of the given type. | I'm a little confused about the use of `new Money()` as it is used in this file (not just from this new use of it). To me it looks like you'd at least have to pass it an object with a key called `amount` in order for it to return anything useful, and ideally, you'd also pass it another key called `currency`, which differs between `OGN` and `ETH` in this file (price is normally ETH and commission is normally OGN), but that's not defined in this file... How does `new Money()` return a useful object without being explicitly passed `amount` or `currency`? |
@@ -132,7 +132,11 @@ class BaseInput<T: EventTarget> extends React.Component<
const [Before, beforeProps] = getOverrides(BeforeOverride, NullComponent);
const [After, afterProps] = getOverrides(AfterOverride, NullComponent);
return (
- <InputContainer {...sharedProps} {...inputContainerProps}>
+ <InputContainer
+ data-baseweb={this.props['data-baseweb'] || 'base-input'}
+ {...sharedProps}
+ {...inputContainerProps}
+ >
<Before {...sharedProps} {...beforeProps} />
<Input {...sharedProps} {...this.getInputProps()} {...inputProps}>
{type === CUSTOM_INPUT_TYPE.textarea ? value : null}
| [No CFG could be retrieved] | Helps to create a unique input object that can be used to render a hidden input. | How about we don't add it to the API? |
@@ -57,7 +57,6 @@ abstract class AbstractBattle implements IBattle {
List<Unit> attackingUnits = new ArrayList<>();
List<Unit> defendingUnits = new ArrayList<>();
- List<Unit> amphibiousLandAttackers = new ArrayList<>();
List<Unit> bombardingUnits = new ArrayList<>();
@Getter Collection<TerritoryEffect> territoryEffects;
BattleResultDescription battleResultDescription;
| [AbstractBattle->[markDamaged->[markDamaged],equals->[getBattleType,equals],isBombingRun->[isBombingRun],findDefender->[equals],hashCode->[hashCode],getUnitsWithDependents->[getDependentUnits]]] | Abstract battle. Get the dependent units. | This is a suspect I believe for save game compatibility issues. Have you double checked that this field is not serialized? |
@@ -0,0 +1,16 @@
+/*
+Copyright (c) 2018 Uber Technologies, Inc.
+
+This source code is licensed under the MIT license found in the
+LICENSE file in the root directory of this source tree.
+*/
+// @flow
+export {default as HeaderNavigation} from './header-navigation';
+// Styled elements
+export {
+ Root as StyledRoot,
+ NavigationItem,
+ NavigationList,
+} from './styled-components';
+export {ALIGN} from './constants';
+export * from './types';
| [No CFG could be retrieved] | No Summary Found. | Should we add `Styled` to the `NavigationItem` and `NavigationList` components for consistency? |
@@ -166,6 +166,7 @@ class Trainer:
patience: Optional[int] = None,
validation_metric: str = "-loss",
validation_iterator: DataIterator = None,
+ shuffle: bool = True,
num_epochs: int = 20,
serialization_dir: Optional[str] = None,
num_serialized_models_to_keep: int = 20,
| [Trainer->[_parameter_and_gradient_statistics_to_tensorboard->[add_train_scalar,is_sparse],train->[_enable_activation_logging,_validation_loss,_should_stop_early,_metrics_to_tensorboard,_enable_gradient_clipping,_metrics_to_console,_train_epoch,_get_metrics],_enable_activation_logging->[hook->[add_train_histogram]],_rescale_gradients->[sparse_clip_norm],_validation_loss->[_get_metrics,_batch_loss],_restore_checkpoint->[find_latest_checkpoint,move_optimizer_to_cuda],_batch_loss->[_data_parallel],__init__->[TensorboardWriter],_metrics_to_tensorboard->[add_validation_scalar,add_train_scalar],_train_epoch->[add_train_scalar,time_to_str,_rescale_gradients,_batch_loss,_get_metrics],from_params->[Trainer,from_params],_histograms_to_tensorboard->[add_train_histogram]],sparse_clip_norm->[is_sparse],TensorboardWriter->[add_validation_scalar->[_item],add_train_scalar->[_item]]] | Initialize a new object with the given parameters. _best - Saves the best model for a given n - epoch. This class is called by the training and validation functions. Initialize the object variables. Initialize the _log_histograms_this_batch and _last_log attributes. | `Trainer` has a custom from_params, so you'll need to add it there too |
@@ -988,7 +988,8 @@ function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $n
}
}
- if ($contact) {
+ // Check if $contact has been successfully loaded
+ if (is_array($contact)) {
if (strlen($inform) && (isset($contact["notify"]) || isset($contact["id"]))) {
$inform .= ',';
}
| [No CFG could be retrieved] | This function handles the tag processing for a given person This function will return a contact object if it exists. select user by name in any network Tag the numeric ID URL in a mention if it s subscribed to you. | It should be `DBA::isResult()` instead. |
@@ -0,0 +1,5 @@
+from ._feature import Feature
+
+
+class Pixels(Feature):
+ pass
| [No CFG could be retrieved] | No Summary Found. | What are the semantics that we envision for `Pixels`? What is its format structure? Can it be tied to `Keypoint`s? |
@@ -54,7 +54,7 @@
<% end %>
<% if tag.badge_id && tag.badge %>
- <img src="<%= optimized_image_url(tag.badge.badge_image_url, width: 180) %>" style="width: 64px; height: 64px; transform: rotate(<%= -25 + (tag.id.digits.first * 5) %>deg);" class="right-1 bottom-1 absolute" />
+ <img src="<%= optimized_image_url(tag.badge.badge_image_url, width: 180) %>" style="width: 64px; height: 64px; transform: rotate(<%= -25 + (tag.id.digits.first * 5) %>deg);" class="right-1 bottom-1 absolute" alt="" />
<% end %>
</div>
<% end %>
| [No CFG could be retrieved] | Panels for the . | Wouldn't it make sense to make it like alt="<%= tag %>'s icon" or something? |
@@ -504,6 +504,9 @@ char *evp_get_global_properties_str(OSSL_LIB_CTX *libctx, int loadconfig)
char *propstr = NULL;
size_t sz;
+ if (plp == NULL)
+ return "";
+
sz = ossl_property_list_to_string(libctx, *plp, NULL, 0);
if (sz == 0) {
ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
| [int->[EVP_set_default_properties],EVP_set_default_properties->[evp_set_default_properties_int]] | This function returns the global properties string. | This would have to be `return OPENSSL_strdup("");` |
@@ -550,6 +550,10 @@ class Guardian
@user.has_trust_level_or_staff?(SiteSetting.min_trust_level_for_here_mention)
end
+ def is_me?(other)
+ other && authenticated? && other.is_a?(User) && @user == other
+ end
+
private
def is_my_own?(obj)
| [Guardian->[can_revoke_moderation?->[moderator?],allowed_theme_repo_import?->[blank?,admin?],can_approve?->[is_staff?,approved?],is_not_me?->[blank?,is_me?],can_see_site_contact_details?->[authenticated?],can_do?->[method_name_for,authenticated?],can_activate?->[is_staff?],can_see_groups_members?->[blank?],can_send_private_message?->[is_silenced?,is_staff?,has_trust_level?,staff?,authenticated?],can_tag?->[blank?],can_delete_reviewable_queued_post?->[authenticated?],can_create?->[can_see?,authenticated?],can_grant_moderation?->[moderator?],can_ignore_user?->[staff?],can_administer_user?->[can_administer?,is_not_me?],can_view_action_logs?->[is_staff?],can_moderate?->[has_trust_level?,is_silenced?,is_staff?,authenticated?],can_revoke_admin?->[admin?],can_bulk_invite_to_forum?->[admin?],can_invite_via_email?->[can_invite_to_forum?,is_staff?,can_invite_to?],can_see_private_messages?->[authenticated?,is_admin?],can_ignore_users?->[anonymous?,staff?,has_trust_level?],can_grant_title?->[is_staff?],can_mute_users?->[anonymous?,staff?],is_admin?->[admin?],can_mention_here?->[blank?,has_trust_level_or_staff?,authenticated?],can_impersonate?->[is_developer?,admin?,is_admin?],can_invite_to?->[can_see?,is_staff?,is_admin?,authenticated?],can_destroy_all_invites?->[staff?],is_silenced?->[silenced?],is_moderator?->[moderator?],is_developer?->[email,is_admin?],can_mute_user?->[staff?],can_export_entity?->[anonymous?,is_moderator?,is_admin?],is_anonymous?->[anonymous?],can_enable_safe_mode?->[is_staff?],can_grant_admin?->[admin?],can_resend_all_invites?->[staff?],can_see_group_members?->[blank?,is_staff?,authenticated?,is_admin?],is_my_own?->[anonymous?,user],can_administer?->[is_admin?],can_send_private_messages_to_email?->[has_trust_level_or_staff?,authenticated?],can_change_primary_group?->[is_staff?],can_see_invite_details?->[is_staff?],can_see_invite_emails?->[is_staff?],can_publish_page?->[blank?,is_staff?],is_staff?->[staff?],can_grant_badges?->[is_staff?],can_change_trust_level?->[is_staff?],can_see_groups?->[blank?,is_staff?,authenticated?,is_admin?],can_send_activation_email?->[is_staff?],is_category_group_moderator?->[authenticated?],is_staged?->[staged?],can_invite_to_forum?->[is_staff?,has_trust_level?,is_admin?,blank?,authenticated?],is_me?->[authenticated?],can_access_forum?->[anonymous?,is_staff?,approved?],allow_themes?->[blank?,is_staff?],can_suspend?->[is_staff?]]] | Checks if a node can be mentions here. | Moved this method as public since I find it quite useful when it's needed to know if `guardian` and `user` are the same. |
@@ -649,11 +649,13 @@ func (p *Properties) setAgentProfileDefaults(isUpgrade, isScale bool) {
if profile.VMSSOverProvisioningEnabled == nil {
profile.VMSSOverProvisioningEnabled = to.BoolPtr(DefaultVMSSOverProvisioningEnabled && !isUpgrade && !isScale)
}
- if profile.Count > 100 {
- profile.SinglePlacementGroup = to.BoolPtr(false)
- }
+
if profile.SinglePlacementGroup == nil {
- profile.SinglePlacementGroup = to.BoolPtr(DefaultSinglePlacementGroup)
+ if p.OrchestratorProfile.KubernetesConfig.LoadBalancerSku == StandardLoadBalancerSku {
+ profile.SinglePlacementGroup = to.BoolPtr(false)
+ } else {
+ profile.SinglePlacementGroup = to.BoolPtr(DefaultSinglePlacementGroup)
+ }
}
}
// set default OSType to Linux
| [SetPropertiesDefaults->[setAgentProfileDefaults,setOrchestratorDefaults,setTelemetryProfileDefaults,SetDefaultCerts,setCustomCloudProfileDefaults,setExtensionDefaults,setHostedMasterProfileDefaults,setMasterProfileDefaults,setWindowsProfileDefaults,setStorageDefaults],setAgentProfileDefaults->[BoolPtr,IsKubernetes,IsAzureStackCloud,IntPtr,AcceleratedNetworkingSupported],setOrchestratorDefaults->[SetCloudProviderBackoffDefaults,Warnf,setAPIServerConfig,GetMinVersion,setAddonsConfig,setCloudControllerManagerConfig,IsAddonEnabled,getDefaultKubernetesClusterSubnetIPv6,SetCloudProviderRateLimitDefaults,Atoi,IsCustomVNET,BoolPtr,IsRBACEnabled,IsKubernetesVersionGe,IsAzureStackCloud,ParseCIDR,HasAvailabilityZones,Make,Bool,IsVirtualMachineScaleSets,To4,setKubeletConfig,Join,TotalNodes,GetFirstConsecutiveStaticIPAddress,setSchedulerConfig,PrivateJumpboxProvision,GetCloudSpecConfig,ToLower,HasWindows,IsHostedMasterProfile,IsFeatureEnabled,Split,IsAzureCNI,LT,IsKubernetes,Sprintf,setControllerManagerConfig,GetValidPatchVersion],SetDefaultCerts->[Uint32,To4,PutUint32,CreatePkiKeyCertPair,GetCustomCloudName,Split,CidrStringFirstIP,Errorf,CreatePki,IsFeatureEnabled,ParseIP,GetLocations,IsVirtualMachineScaleSets],getDefaultKubernetesClusterSubnetIPv6->[IsKubernetesVersionGe],setMasterProfileDefaults->[GetFirstConsecutiveStaticIPAddress,BoolPtr,IsKubernetes,IsAzureStackCloud,IntPtr,HasWindows,IsVirtualMachineScaleSets,IsCustomVNET],setWindowsProfileDefaults->[BoolPtr],Strings,Read,TrimSuffix,Sprintf,IsKubernetesVersionGe,String,WriteString,EncodeToString,Split,Trim] | setAgentProfileDefaults sets default values for all agent pool profiles. This function is called by the VM manager to configure the environment. | Strings.EqualFold aks SLB constant is standard, while aks-e StandardLoadBalancerSku is Standard (yes it's confusing :)) |
@@ -244,8 +244,8 @@ class AutoToolsBuildEnvironment(object):
ret.append(arg)
return ret
- lib_paths = ['-L%s' % x for x in self.library_paths]
- include_paths = ['-I%s' % x for x in self.include_paths]
+ lib_paths = ['-L%s' % unix_path(x) for x in self.library_paths]
+ include_paths = ['-I%s' % unix_path(x) for x in self.include_paths]
ld_flags = append(self.link_flags, lib_paths)
cpp_flags = append(include_paths, ["-D%s" % x for x in self.defines])
| [AutoToolsBuildEnvironment->[vars_dict->[_get_vars,append],_configure_defines->[stdlib_defines],configure->[_get_host_build_target_flags],vars->[_get_vars],_get_vars->[append->[append],append],_configure_cxx_flags->[stdlib_flags]]] | Get variables for missing - missing - missing - missing - missing - missing - missing - missing. | Sure this change in paths is enough covered by tests? |
@@ -44,7 +44,6 @@ class HhvmDetector
self::$hhvmVersion = defined('HHVM_VERSION') ? HHVM_VERSION : null;
if (self::$hhvmVersion === null && !Platform::isWindows()) {
- self::$hhvmVersion = false;
$this->executableFinder = $this->executableFinder ?: new ExecutableFinder();
$hhvmPath = $this->executableFinder->find('hhvm');
if ($hhvmPath !== null) {
| [HhvmDetector->[getVersion->[find,execute]]] | Checks if there is a dependency on the current system and returns it. | Why removing this ? |
@@ -11,6 +11,10 @@ declare var $: Function;
declare var APP: Object;
declare var config: Object;
+const CONFERENCE_ID_ENDPOINT = config.conferenceMapperUrl;
+const DIAL_IN_NUMBERS_ENDPOINT = config.dialInNumbersUrl;
+const MUC_URL = config && config.hosts && config.hosts.muc;
+
/**
* Opens the Invite Dialog.
*
| [No CFG could be retrieved] | Exports a function that updates the dial - in numbers of a user s account. | "conferenceMapperUrl" sounds too generic to me. Can we rename this parameter to dialInConfCodeUrl? |
@@ -207,7 +207,7 @@ namespace System.Text.Json.Serialization
{
if (writer.CurrentDepth >= options.EffectiveMaxDepth)
{
- ThrowHelper.ThrowJsonException_SerializerCycleDetected(options.MaxDepth);
+ ThrowHelper.ThrowJsonException_SerializerCycleDetected(options.EffectiveMaxDepth);
}
if (CanBePolymorphic)
| [JsonConverter->[TryWrite->[TryWriteAsObject,OnTryWrite],TryRead->[OnTryRead]]] | Try to write a value to the writer. Pop the last failure from the stack. | @thomaslevesque - are you up for submitting a PR with tests for this? If not, @Jozkee - can you do so (or file an up-for-grabs issue)? |
@@ -91,8 +91,7 @@ class Pocl(CMakePackage):
@run_after('install')
def symlink_opencl(self):
- with working_dir(self.build_directory):
- os.symlink("OpenCL", join_path(self.prefix.include, "CL"))
+ os.symlink("CL", os.path.join(self.prefix.include, "OpenCL"))
@run_after('install')
@on_package_attributes(run_tests=True)
| [Pocl->[symlink_opencl->[join_path,working_dir,symlink],check_install->[join_path,print,working_dir,dirname,spec,compile_c_and_execute,compare_output_file],depends_on,patch,version,provides,on_package_attributes,variant,run_after]] | Create a symlink to the OpenCL library. | `self.prefix.include.OpenCL` should work with `join()`. |
@@ -5741,6 +5741,8 @@ describe('$compile', function() {
siblingController = this.friend;
};
spyOn(MeController.prototype, '$onInit').andCallThrough();
+ MeController.prototype.$onDestroy = function() {};
+ spyOn(MeController.prototype, '$onDestroy').andCallThrough();
angular.module('my', [])
.directive('me', function() {
| [testUrl,testReplaceElementCleanup,fn,directive,myDirective,attr,$id,disabled,value3,$$destroyed,$digest,whatever,data2,dataOnVar,onVar,$compile,it,testAttr,parent,module,assertLeadingOrTrailingWhitespaceInDirectiveName,owRef,owOptref,getAll,optreference,getChildScopes,message,foo,fromParent3,lowercase,replace,register,set,i,colrefAlias,browserTrigger,imgSrcSanitizationWhitelist,decorator,trustAsHtml,list,height,$parent,prepend,mode,reference,value4,trim,css,assertIsValidSvgCircle,$destroy,currentCleanData,substring,ngMyAttr,createElementNS,length,match,expr,userAgent,myC2,afterEach,optRef,context,query,value,dimensions,$root,$eval,onDashEnd,checked,nums,bb,optrefAlias,supportsForeignObject,contents,testCleanup,aHrefSanitizationWhitelist,fromParent1,expectGET,reset,text,any,toArray,whom,removeAll,scale,ie,sliceArgs,theCtrl,hasData,myC1,cls,$$element,asyncTemplate,x,shouldCompile,expect,mediumLog,val2,jqLiteCacheSize,logDirective,empty,log,code,watch,$$childHead,addClass,ctrl,children,template,event,observe,linkingFn,isSVGElement,prop,fromParent4,id,trustAsUrl,width,dealoc,val,collection,$$nextSibling,trustAsResourceUrl,fn2,testCompileLinkDataCleanup,isHTMLElement,$apply,endSymbol,beforeEach,ref,colref,fromParent2,createElement,greet,forEach,required,whenGET,cc,value2,emphasis,find,SVGElement,flush,isElement,shift,$observe,onDashStart,valueFn,bar,toString,createSpy,$countChildScopes,remove,firstChild,errors,put,optref,inject,supportsMathML,isArray,string,events,$$isolateBindings,body,extend,before,remoteData,isSlotFilled,callCount,second,greeting,jqLite,num,spyOn,$set,_data,deregisterObserver,attrAlias,startSymbol,myFoo,$timeout,hasClass,MutationObserver,myName,optExpr,args,items,isUnknownElement,element,$normalize,owRefAlias,owOptrefAlias,push,$$phase,andReturn,$$watchers,sortedHtml,exprAlias,eq,val1,after,highLog,$new,string2,coolTitle,debugInfoEnabled,constructor,describe,mock,exp,objectContaining,navigator,eval,ngMultiBind,test,aa,join,compile,first,name,onClickJs,getBoundingClientRect,countWatches,queue,show,y,scope,on,hello,html,disconnect,trustAsCss,concat,prototype,number,nodeName_,$onInit,valueOf,innerHTML,count,sort,append,$watch,unshift,data,myVal,component,cleanData,color,controller,abc,setGreeting,$transclude,value1,_invokeQueue,ngOther,hasOwnProperty,isolateScope,transclude,uppercase,refAlias,optRefAlias,obj,someAttr] | The base directive for the nagios - core directive. Tests that the controller and the onInit method of the controller are bound to the parent controller. | Place this line right under `MeController.prototype.$onInit = ...`. |
@@ -152,4 +152,18 @@ public class FunctionCall
{
IGNORE, RESPECT
}
+
+ @Override
+ public boolean shallowEquals(Node other)
+ {
+ if (!sameClass(this, other)) {
+ return false;
+ }
+
+ FunctionCall otherFunction = (FunctionCall) other;
+
+ return name.equals(otherFunction.name) &&
+ distinct == otherFunction.distinct &&
+ nullTreatment.equals(otherFunction.nullTreatment);
+ }
}
| [FunctionCall->[hashCode->[hash],accept->[visitFunctionCall],equals->[getClass,equals],getChildren->[build,addAll,ifPresent,builder,map],empty,of,requireNonNull]] | TYPE CHECKING FOR THE TYPE CHECKING FOR THE TYPE CHECKING FOR THE TYPE CHECKING. | `nullTreatment` is an `Optional`, compare by equals. |
@@ -337,6 +337,9 @@ class TransformExecutor(_ExecutorService.CallableTask):
evaluator = self._transform_evaluator_registry.get_evaluator(
self._applied_ptransform, self._input_bundle,
side_input_values, scoped_metrics_container)
+ evaluator._execution_context.reset()
+ if hasattr(evaluator, 'step_context'):
+ evaluator.global_state = evaluator.step_context.get_keyed_state(None)
if self._fired_timers:
for timer_firing in self._fired_timers:
| [_CompletionCallback->[handle_result->[handle_result]],Executor->[start->[start],await_completion->[await_completion]],_ExecutorServiceParallelExecutor->[await_completion->[shutdown,await_completion],schedule_consumption->[parallel,schedule,serial,TransformExecutor],__init__->[_CompletionCallback,_TransformExecutorServices,_ExecutorService],start->[submit],_MonitorTask->[_add_work_if_necessary->[_is_executing,schedule_consumption],call->[_VisibleExecutorUpdate,poll,schedule_consumers,schedule_unprocessed_bundle,offer,submit],_fire_timers->[_CompletionCallback,schedule_consumption],_should_shutdown->[shutdown,offer,_VisibleExecutorUpdate]]],_ExecutorService->[shutdown->[shutdown],_ExecutorServiceWorker->[run->[_get_task_or_none,call,_update_name]],__init__->[_ExecutorServiceWorker]],TransformExecutor->[call->[handle_exception,complete],attempt_call->[handle_result]],_TransformEvaluationState->[schedule->[submit]],_TransformExecutorServices->[serial->[_SerialEvaluationState],__init__->[_ParallelEvaluationState]]] | Attempts to evaluate a single . | <!--new_thread; commit:300004280c92e8312298cce950a0ccf4634707a9; resolved:0--> Why do we set the `global_state` property here? The evaluator should be responsible for doing this. |
@@ -27,7 +27,12 @@ __all__ = ['DATA_HOME', 'download', 'md5file', 'split', 'cluster_files_reader']
DATA_HOME = os.path.expanduser('~/.cache/paddle/dataset')
if not os.path.exists(DATA_HOME):
- os.makedirs(DATA_HOME)
+ try:
+ os.makedirs(DATA_HOME)
+ except OSError as exc:
+ if exc.errno != errno.EEXIST:
+ raise
+ pass
def md5file(fname):
| [download->[md5file],convert->[close_writers,write_data,reader,open_writers]] | Calculate the MD5 hash of a file. | I don't get it -- it seems that we create DATA_HOME only if it doesn't exist; why would we need to catch the EEXIST exception here? |
@@ -56,6 +56,7 @@ type Settings struct {
FlushMinEvents int
FlushTimeout time.Duration
WaitOnClose bool
+ IntQueueSize int
}
type ackChan struct {
| [Close->[Wait],reverse->[pop,empty,prepend],MakeDetails,RegisterQueueType,Done,Unpack,NewLogger,Get,run,L,Add,Put] | Creates a broker which receives and receives events from the object. NewQueue creates a new queue based on in - memory queue holding up to sz number of. | My preference (here and in the spool) would be to use `InternalQueueSize`, since that's what's used in the earlier structure and "Int" as an abbreviation is overloaded with "Integer" |
@@ -92,6 +92,15 @@ module Dependabot
def local_replacements
@local_replacements ||=
+ # Find all the local replacements, and return them with a stub path
+ # we can use in their place. Using generated paths is safer as it
+ # means we don't need to worry about references to parent
+ # directories, etc.
+ ReplaceStubber.new(repo_contents_path).stub_paths(manifest, go_mod.directory)
+ end
+
+ def manifest
+ @manifest ||=
SharedHelpers.in_a_temporary_directory do |path|
File.write("go.mod", go_mod.content)
| [FileParser->[required_packages->[parse],skip_dependency?->[parse],local_replacements->[parse]]] | Find all the local replacements and return them with stub paths. | +1 for caching the manifest |
@@ -47,7 +47,8 @@ func main() {
kibanaURL := flag.String("kibana", "http://localhost:5601", "Kibana URL")
spaceID := flag.String("space-id", "", "Space ID")
dashboard := flag.String("dashboard", "", "Dashboard ID")
- fileOutput := flag.String("output", "output.ndjson", "Output file")
+ fileOutput := flag.String("output", "output.ndjson", "Output NDJSON file")
+ folderOutput := flag.String("folder", "", "Output folder to save all assets to more human friendly JSON format")
ymlFile := flag.String("yml", "", "Path to the module.yml file containing the dashboards")
flag.BoolVar(&indexPattern, "indexPattern", false, "include index-pattern in output")
flag.BoolVar(&quiet, "quiet", false, "be quiet")
| [Dir,Wrap,Username,WriteFile,Usage,Export,NewClientWithConfig,ExportAllFromYml,Errorf,SaveToFile,SetFlags,GetVersion,Fatalf,Password,MkdirAll,Printf,Println,DecodeExported,String,Parse,DefaultHTTPTransportSettings,BoolVar] | This function is responsible for importing a module. Parse the kibana URL and return a client to the kibana API. | I think we can remove the code for NDJSON, one thing less to maintain. |
@@ -383,6 +383,14 @@ namespace System.Net.Quic.Implementations.MsQuic
{
ThrowIfDisposed();
+ lock (_state)
+ {
+ if (_state.ShutdownWriteState == ShutdownWriteState.ConnectionClosed)
+ {
+ throw GetConnectionClosedException(_state);
+ }
+ }
+
// TODO do anything to stop writes?
using CancellationTokenRegistration registration = cancellationToken.UnsafeRegister(static (s, token) =>
{
| [MsQuicStream->[Shutdown->[StartShutdown],Dispose->[Dispose],CleanupSendState->[Dispose],ValueTask->[StartShutdown,CleanupSendState],Dispose]] | Override to indicate that the shutdown write is complete. | I'm. not sure if this needs to be under lock since we are not modifying the state. For the check there is IMHO race condition anyway e.g. the state can be changed immediately after the lock before other code executes. |
@@ -705,3 +705,7 @@ def validate_variants_in_checkout_lines(lines: Iterable["CheckoutLineInfo"]):
)
}
)
+
+
+def get_base_money(taxed_money: "TaxedMoney", from_gross: bool) -> Money:
+ return taxed_money.gross if from_gross else taxed_money.net
| [change_shipping_address_in_checkout->[_check_new_checkout_address],add_voucher_to_checkout->[get_voucher_discount_for_checkout],get_prices_of_discounted_specific_product->[get_discounted_lines],add_variant_to_checkout->[check_variant_in_stock],get_voucher_discount_for_checkout->[_get_products_voucher_discount,_get_shipping_voucher_discount_for_checkout],recalculate_checkout_discount->[get_voucher_for_checkout,get_voucher_discount_for_checkout],remove_voucher_code_from_checkout->[get_voucher_for_checkout],change_billing_address_in_checkout->[_check_new_checkout_address]] | Validate that there are no unavailable variants in the line. | Not sure if the name gives enough context. What is base_money? The function returns a money amount which we used in all calculations, based on the flag value |
@@ -249,12 +249,9 @@ def run_flake8(flake8_cmd, file_list, args):
# run in chunks of 100 at a time to avoid line length limit
# filename parameter in config *does not work* for this reliably
for chunk in grouper(file_list, 100):
-
output = flake8_cmd(
- # use .flake8 implicitly to work around bug in flake8 upstream
- # append-config is ignored if `--config` is explicitly listed
- # see: https://gitlab.com/pycqa/flake8/-/issues/455
- # "--config=.flake8",
+ # always run with config from running spack prefix
+ "--config=%s" % os.path.join(spack.paths.prefix, ".flake8"),
*chunk,
fail_on_error=False,
output=str
| [run_black->[rewrite_and_print_output,grouper,print_tool_result],run_flake8->[rewrite_and_print_output,grouper,print_tool_result],rewrite_and_print_output->[translate->[cwd_relative]],run_mypy->[rewrite_and_print_output,print_tool_result],run_isort->[rewrite_and_print_output,grouper,print_tool_result],style->[print_style_header,changed_files,prefix_relative,print_tool_header],print_style_header->[cwd_relative],tool] | Run flake8 with n - ary configuration. | @trws: is this still an issue? I could not see where it would even be triggered. |
@@ -1,12 +1,15 @@
-# Author: Mainak Jas <mainak.jas@telecom-paristech.fr>
+# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>
+# Jona Sassenhagen <jona.sassenhagen@gmail.com>
#
# License: BSD (3-clause)
+import warnings
import os.path as op
import numpy as np
-from ..utils import _read_segments_file, _find_channels
+from ..utils import (_read_segments_file, _find_channels,
+ _synthesize_stim_channel)
from ..constants import FIFF
from ..meas_info import _empty_info, create_info
from ..base import _BaseRaw, _check_update_montage
| [RawEEGLAB->[__init__->[_check_fname,_get_info,_check_mat_struct]],EpochsEEGLAB->[__init__->[_check_fname,_get_info,_check_mat_struct]],_get_info->[_to_loc]] | Check if a given sequence number is valid. Get the location of the channel in the network. | don't use `warnings.warn()` use `from ...utils import warn` and just do `warn(...)` |
@@ -1120,8 +1120,8 @@ ProgramFiles(x86)=C:\Program Files (x86)
def detect_windows_subsystem_test(self):
# Dont raise test
- result = tools.os_info.detect_windows_subsystem()
- if not tools.os_info.bash_path() or platform.system() != "Windows":
+ result = global_os_info.detect_windows_subsystem()
+ if not global_os_info.bash_path() or platform.system() != "Windows":
self.assertEqual(None, result)
else:
self.assertEqual(str, type(result))
| [GitToolTest->[test_clone_submodule_git->[_create_paths],unix_to_dos_unit_test->[save_file],test_verify_ssl->[MyRunner]],ToolsTest->[run_in_bash_test->[MockConanfile->[__init__->[MyRun]],MockConanfile],get_gnu_triplet_test->[get_values]],SystemPackageToolTest->[system_package_tool_try_multiple_test->[RunnerMultipleMock],add_repository_test->[_run_add_repository_test->[RunnerOrderedMock],_run_add_repository_test],system_package_tool_fail_when_not_0_returned_test->[get_linux_error_message],system_package_tool_mode_test->[RunnerMultipleMock]]] | Checks if the OS is on Windows systems. | Do I need to play with the global one or can I just instantiate a new one and tests against it? |
@@ -29,6 +29,7 @@ class SSHRemote(Remote):
with self.tree.ssh(path_infos[0]) as ssh:
channels = ssh.open_max_sftp_channels()
+ # NOTE: is the config-based max workers limit relevant here?
max_workers = len(channels)
with ThreadPoolExecutor(max_workers=max_workers) as executor:
| [SSHRemote->[hashes_exist->[exists_with_progress->[batch_exists]]]] | Check if a batch of paths exists. | Hi, @efiop. May I ask for some clarification of the design? I'm not sure, how and should I use the configuration-based jobs (workers) limit here? Why is it based on sftp channels count there and on the CPU cores count in the base tree? |
@@ -59,12 +59,14 @@ namespace Content.Client.ContextMenu.UI
/// Update the icon and text of this element based on the given entity or this element's own entity if none
/// is provided.
/// </summary>
- public void UpdateEntity(EntityUid entity = default)
+ public void UpdateEntity(EntityUid? entity = null)
{
- if (Entity != default && _entityManager.EntityExists(Entity) && !entity.Valid)
+ // Deleted() automatically checks for null & existence.
+ if (!_entityManager.Deleted(Entity))
+ {
entity = Entity;
-
- if (entity == default)
+ }
+ else if (_entityManager.Deleted(entity))
{
Text = string.Empty;
return;
| [EntityMenuElement->[UpdateEntity->[Valid,Empty,Sprite,EntityName,EntityExists,_entityManager,Visible],Dispose->[Dispose],SetGrowHorizontal,Begin,BottomRight,UpdateEntity,AddChild,South,SetAnchorPreset,InjectDependencies,Visible,SetGrowVertical]] | Updates the entity. | Wouldn't this just be an else? |
@@ -21,9 +21,9 @@ namespace Content.Server.Projectiles.Components
public class HitscanComponent : Component
{
[Dependency] private readonly IGameTiming _gameTiming = default!;
- [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
public override string Name => "Hitscan";
+ public CollisionGroup CollisionMask => (CollisionGroup) _collisionMask;
private TimeSpan _startTime;
private TimeSpan _deathTime;
| [HitscanComponent->[MuzzleFlash->[Theta,Normalized,Multiply,Offset],ImpactFlash->[FlipPositive,Multiply,Offset,ToVec],FireEffects->[SpawnTimer,Play,Deleted,Coordinates,CreateParticle,ImpactFlash,Offset,FromSeconds,TotalMilliseconds,Normalized,Delete,AfterEffects,MuzzleFlash,EntitySystem,Pvs,CurTime],EffectSystemMessage->[Theta,Multiply,Offset,ToVec],_prototypeManager,Opaque]] | Component for handling hitscan DamageType - DamageType to damage from. | there should probably be a unified way to specify a list of damages to apply; i imagine a lot of stuff can use this like HealthChange reagenteffect and MeleeWeapon, out of scope though |
@@ -233,9 +233,6 @@ class DefaultConcretizer(object):
setattr(spec.architecture, field, getattr(arch, field))
spec_changed = True
- if not spec.architecture.concrete:
- raise InsufficientArchitectureInfoError(spec, default_archs)
-
return spec_changed
def concretize_variants(self, spec):
| [DefaultConcretizer->[concretize_compiler->[_proper_compiler_style],choose_virtual_or_external->[_valid_virtuals_and_externals]]] | Concretizes the architecture of the object. Returns the changed . | @becker33 is there a reason to remove this check? If `sys_arch` is guaranteed to be concrete then it would make sense to me that this check isn't needed. |
@@ -83,12 +83,7 @@ class PantsLoader:
module = importlib.import_module(module_path)
entrypoint_fn = getattr(module, func_name)
-
- try:
- entrypoint_fn()
- except TypeError:
- print(f"{DAEMON_ENTRYPOINT} {func_name} is not callable", file=sys.stderr)
- sys.exit(PANTS_FAILED_EXIT_CODE)
+ entrypoint_fn()
@staticmethod
def run_default_entrypoint() -> None:
| [main->[main],PantsLoader->[main->[setup_warnings,run_alternate_entrypoint,run_default_entrypoint,ensure_locale]],main] | Runs an alternative entrypoint. | This only (ever, seemingly) served to obscure unrelated `TypeErrors` occurring during engine initialization. |
@@ -158,7 +158,15 @@ RtpsUdpDataLink::open(const ACE_SOCK_Dgram& unicast_socket)
}
}
- /// FUTURE: Set TTL on the alternate sockets.
+ if (!OpenDDS::DCPS::set_socket_ttl(ipv6_alternate_socket_, ttl)) {
+ ACE_ERROR_RETURN((LM_ERROR,
+ ACE_TEXT("(%P|%t) ERROR: ")
+ ACE_TEXT("RtpsUdpDataLink::open: ")
+ ACE_TEXT("failed to set ipv6_alternate_socket_ TTL: %d %p\n"),
+ config_->ttl_,
+ ACE_TEXT("ACE_OS::setsockopt(TTL)")),
+ false);
+ }
#endif
if (config_->use_multicast_) {
| [No CFG could be retrieved] | finds the next NIC in the sn_tqe_map and opens it - - - - - - - - - - - - - - - - - -. | Use this same helper function everywhere else multicast TTL is set in the codebase (also, rename to have "multicast" in the name?) |
@@ -526,6 +526,14 @@ class Jetpack {
Jetpack_Network::init();
}
+ // Load Gutenberg editor blocks
+ add_action( 'init', array( $this, 'load_jetpack_gutenberg' ) );
+
+ // A filter to control Gutenberg editor blocks
+ add_filter( 'jetpack_gutenberg', '__return_false', 9 );
+ // A filter to control if Gutenberg blocks should be loaded from CDN or locally
+ add_filter( 'jetpack_gutenberg_cdn', '__return_true', 9 );
+
add_action( 'set_user_role', array( $this, 'maybe_clear_other_linked_admins_transient' ), 10, 3 );
// Unlink user before deleting the user from .com
| [Jetpack->[verify_json_api_authorization_request->[add_nonce],get_locale->[guess_locale_from_lang],admin_notices->[opt_in_jetpack_manage_notice,can_display_jetpack_manage_notice],authenticate_jetpack->[verify_xml_rpc_signature],admin_page_load->[disconnect,unlink_user,can_display_jetpack_manage_notice],wp_rest_authenticate->[verify_xml_rpc_signature],jumpstart_has_updated_module_option->[do_stats,stat],jetpack_getOptions->[get_connected_user_data],build_connect_url->[build_connect_url],opt_in_jetpack_manage_notice->[opt_in_jetpack_manage_url],display_activate_module_link->[opt_in_jetpack_manage_url],register->[do_stats,stat,validate_remote_register_response]]] | This method is called by the constructor of the class. This method is called by the server when the user is redirected to the jetpack authentication This is the main entry point for all Jetpack actions. | I think this `add_filter` is unnecessary - we can resort to the default value that is passed to the `apply_filters()` below. |
@@ -16,6 +16,9 @@ class WPSEO_Database_Proxy {
/** @var bool */
protected $suppress_errors = true;
+ /** @var bool */
+ protected $is_global = false;
+
/** @var bool */
protected $last_suppressed_state;
| [WPSEO_Database_Proxy->[update->[update],get_results->[get_results],insert->[insert],upsert->[insert,update],delete->[delete]]] | Creates a new object of type WPSEO_Database_Proxy for inserting data into the Updates data in the table. | `is_global` has a different meaning to me that the intended use. Would prefer to have something that references `multisite` in the name. |
@@ -588,7 +588,17 @@ class LowLevelIRBuilder:
branch.negated = False
self.add(branch)
self.activate_block(short_int_block)
- eq = self.binary_int_op(bool_rprimitive, lhs, rhs, op_type, line)
+ # for now equal op, explicitly convert tagged(unsigned) to signed to include negative
+ # situtations
+ if op not in ("==", "!="):
+ lhs_short = self.add(Truncate(lhs, short_int_rprimitive,
+ c_pyssize_t_rprimitive, line))
+ rhs_short = self.add(Truncate(rhs, short_int_rprimitive,
+ c_pyssize_t_rprimitive, line))
+ else:
+ lhs_short = lhs
+ rhs_short = rhs
+ eq = self.binary_int_op(bool_rprimitive, lhs_short, rhs_short, op_type, line)
self.add(Assign(result, eq, line))
self.goto(out)
self.activate_block(int_block)
| [LowLevelIRBuilder->[load_static_float->[literal_static_name,add],load_static_int->[literal_static_name,add],py_get_attr->[add],decompose_union_helper->[isinstance_native,activate_block,goto,add,alloc_temp,add_bool_branch,coerce],matching_call_c->[call_c],binary_int_op->[add],check_tagged_short_int->[add],primitive_op->[coerce,add],add_bool_branch->[binary_op,unbox_or_cast,add_bool_branch,activate_block,gen_method_call,add,none_object,primitive_op],unary_op->[matching_primitive_op],unbox_or_cast->[add],none->[add],box->[add],union_method_call->[call_union_item->[gen_method_call]],load_static_bytes->[literal_static_name,add],compare_tagged->[check_tagged_short_int,goto_and_activate,activate_block,goto,add,alloc_temp],shortcircuit_helper->[activate_block,goto,add,alloc_temp,coerce],load_module->[add],binary_op->[matching_primitive_op],matching_primitive_op->[none,primitive_op,coerce],_create_dict->[call_c,add],union_get_attr->[get_item_attr->[get_attr]],call->[add],builtin_call->[matching_primitive_op],py_method_call->[py_call,py_get_attr],load_static_checked->[activate_block,add],translate_eq_cmp->[binary_op,gen_method_call],literal_static_name->[literal_static_name],gen_method_call->[py_method_call,py_call,native_args_to_positional,add],none_object->[add],load_static_complex->[literal_static_name,add],coerce->[unbox_or_cast,add,box,alloc_temp],goto_and_activate->[activate_block,goto],load_static_unicode->[literal_static_name,add],call_c->[none,coerce,add],load_native_type_object->[add],native_args_to_positional->[coerce,add],get_attr->[add],goto->[add],translate_special_method_call->[matching_primitive_op,matching_call_c]]] | Compare two tagged integers using given logical operation. | This is not very principled. The truncate op is redundant, and also confusingly the sizes of source and target types are the same, so there's no truncation actually going on. Instead, we should generate the correct C code for short int comparison (add the cast to a signed integer type). Maybe you can look at the `type` attribute of `BinaryIntOp` to determine whether a signed comparison is needed when emitting C. |
@@ -3,8 +3,12 @@
using System.Collections.Generic;
using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
using System.Net;
using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.DotNet.RemoteExecutor;
using Xunit;
namespace System.DirectoryServices.Protocols.Tests
| [LdapConnectionTests->[Abort_InvalidAsyncResult_ThrowsArgumentNullException->[AssertExtensions,Abort],GetPartialResults_Disposed_ThrowsObjectDisposedException->[Assert,GetPartialResults,Dispose],Ctor_NullIdentifier_ThrowsNullReferenceException->[Dpa,Assert],SendRequest_DsmlAuthRequest_ThrowsNotSupportedException->[SendRequest,Assert],Abort_Disposed_ThrowsObjectDisposedException->[Assert,Abort,Dispose],Ctor_Identifier->[AutoBind,Equal,nameof,Timeout,AuthType,Directory,Negotiate,True],Ctor_Identifier_Credential->[AutoBind,Equal,nameof,Timeout,AuthType,Directory,Negotiate,True],EndSendRequest_InvalidAsyncResult_ThrowsArgumentNullException->[AssertExtensions,EndSendRequest],Timeout_SetInvalid_ThrowsArgumentException->[MaxValue,FromSeconds,AssertExtensions,Timeout],AuthType_SetInvalid_ThrowsInvalidEnumArgumentException->[Kerberos,Anonymous,AssertExtensions,AuthType],BeginSendRequest_ReturnModeAndSearchRequest_ThrowsInvalidNotSupportedException->[ReturnPartialResultsAndNotifyCallback,BeginSendRequest,ReturnPartialResults,Assert],Ctor_InvalidAuthTypeWithCredentials_ThrowsArgumentException->[AssertExtensions,Anonymous],SendRequest_NullRequest_ThrowsArgumentNullException->[AssertExtensions,SendRequest,BeginSendRequest,NoPartialResultSupport],AutoBind_Set_GetReturnsExpected->[False,AutoBind],Ctor_InvalidAuthType_ThrowsInvalidEnumArgumentException->[Kerberos,Anonymous,AssertExtensions],Ctor_Identifier_Credential_AuthType->[AutoBind,Equal,nameof,Timeout,AuthType,Directory,True],Ctor_String->[AutoBind,Equal,Timeout,AuthType,Servers,Negotiate,True],BeginSendRequest_NotifyCallbackAndNullCallback_ThrowsArgumentException->[ReturnPartialResultsAndNotifyCallback,AssertExtensions,BeginSendRequest],AuthType_SetValid_GetReturnsExpected->[AuthType,Equal,Basic],SendRequest_Disposed_ThrowsObjectDisposedException->[SendRequest,BeginSendRequest,Dispose,Assert,NoPartialResultSupport],GetPartialResults_NullAsyncResult_ThrowsArgumentNullException->[GetPartialResults,AssertExtensions],Ctor_ServerHasSpaceInName_ThrowsArgumentException->[AssertExtensions],BeginSendRequest_InvalidPartialMode_ThrowsInvalidEnumArgumentException->[ReturnPartialResultsAndNotifyCallback,AssertExtensions,BeginSendRequest,NoPartialResultSupport],Abort_NullAsyncResult_ThrowsArgumentNullException->[AssertExtensions,Abort],Timeout_SetValid_GetReturnsExpected->[Zero,Equal,Timeout],Dispose_MultipleTimes_Nop->[Dispose],Ctor_Identifier_NetworkCredential_AuthType_TestData->[Kerberos,Anonymous],EndSendRequest_NullAsyncResult_ThrowsArgumentNullException->[AssertExtensions,EndSendRequest],GetPartialResults_InvalidAsyncResult_ThrowsArgumentNullException->[GetPartialResults,AssertExtensions],Bind_AnonymouseAuthenticationAndNetworkCredentials_ThrowsInvalidOperationException->[Credential,Anonymous,Assert,Bind],EndSendRequest_Disposed_ThrowsObjectDisposedException->[Assert,EndSendRequest,Dispose],Bind_Disposed_ThrowsObjectDisposedException->[Assert,Dispose,Bind],IsWindowsOrLibLdapIsInstalled,nameof]] | Creates an LdapConnection object that can be used to connect to a server. Creates an array of LdapDirectoryIdentifiers that can be used to test the connection timeout. | Undo changes in this file? |
@@ -1758,7 +1758,7 @@ public abstract class AbstractFlashcardViewer extends NavigationDrawerActivity i
// This does not handle mUseInputTag (the WebView contains an input field with a typable answer).
// In this case, the user can use touch to focus the field if necessary.
if (typeAnswer()) {
- mAnswerField.focusWithKeyboard();
+ AndroidUiUtils.setFocusAndOpenKeyboard(mAnswerField, getWindow());
} else {
mFlipCardLayout.requestFocus();
}
| [AbstractFlashcardViewer->[MyWebView->[onOverScrolled->[onOverScrolled],onScrollChanged->[onScrollChanged],onTouchEvent->[onTouchEvent],loadDataWithBaseURL->[loadDataWithBaseURL],findScrollParent->[findScrollParent]],LinkDetectingGestureDetector->[executeTouchCommand->[processCardAction],onWebViewCreated->[executeTouchCommand]],undo->[mAnswerCardHandler],dispatchKeyEvent->[dispatchKeyEvent],initLayout->[lookUp,clipboardHasText],onCollectionLoaded->[setTitle,onCollectionLoaded],onDestroy->[onDestroy],onCreate->[onCreate],displayMediaUpgradeRequiredSnackbar->[showSnackbar],onSelectedTags->[displayCardQuestion],onKeyDown->[onKeyDown,processCardFunction],displayString->[typeAnsQuestionFilter],fillFlashcard->[updateForNewCard,processCardAction,switchTopBarVisibility],hideEaseButtons->[run],tapOnCurrentCard->[processCardAction],displayAnswerBottomBar->[run],removeFrontSideAudio->[getAnswerFormat],CardViewerWebClient->[filterUrl->[displayCardAnswer,focusAnswerCompletionField,flipOrAnswerCard,getSignalFromUrl,isFullscreen,executeCommand,redrawCard],shouldInterceptRequest->[shouldInterceptRequest],onRenderProcessGone->[destroyWebView,displayCardQuestion,canRecoverFromWebViewRendererCrash,webViewRendererLastCrashedOnCard,recreateWebView,inflateNewView],onReceivedHttpError->[onReceivedHttpError],onPageFinished->[drawMark,drawFlag],onReceivedError->[onReceivedError]],onResume->[setTitle,onResume],onPause->[onPause],blockControls->[typeAnswer],onPageDown->[processCardAction],handleUrlFromJavascript->[filterUrl],loadInitialCard->[mAnswerCardHandler],loadUrlInViewer->[processCardAction],cleanCorrectAnswer->[cleanCorrectAnswer],executeCommand->[undo,showDeleteNoteDialog,editCard,displayCardAnswer,flipOrAnswerCard,lookUpOrSelectText,playSounds,getRecommendedEase],selectAndCopyText->[processCardAction],answerCard->[mAnswerCardHandler,hideLookupButton],onFlag->[refreshActionBar,drawFlag],onActivityResult->[onActivityResult,clearClipboard],onKeyUp->[onKeyUp],onBackPressed->[onBackPressed],scrollCurrentCardBy->[processCardAction],mAnswerCardHandler->[onPreExecute->[onPreExecute],NextCardHandler],performClickWithVisualFeedback->[performClickWithVisualFeedback],displayCardQuestion->[displayCardQuestion,displayString,setInterface,hideEaseButtons],playSounds->[playSounds],updateCard->[isInNightMode,addAnswerSounds,processCardAction],lookUp->[lookUp,clearClipboard],recreateWebView->[createWebView],unblockControls->[typeAnswer],getRecommendedEase->[getAnswerButtonCount],ttsInitialized->[playSounds],dismiss->[blockControls],displayCouldNotFindMediaSnackbar->[showSnackbar],MyGestureDetector->[onDoubleTap->[executeCommand],onFling->[onFling,executeCommand],executeTouchCommand->[executeCommand,showLookupButtonIfNeeded]],onMark->[drawMark,refreshActionBar],isControlBlocked->[getControlBlocked],JavaScriptFunction->[ankiIsInFullscreen->[isFullscreen],init->[requireApiVersion,enableJsApi],ankiIsInNightMode->[isInNightMode],ankiIsDisplayingAnswer->[isDisplayingAnswer],ankiGetCardMark->[shouldDisplayMark]],displayCardAnswer->[displayAnswerBottomBar,typeAnsAnswerFilter,actualHideEaseButtons,cleanTypedAnswer,cleanCorrectAnswer],lookUpOrSelectText->[clipboardHasText],resumeTimer->[resumeTimer],updateDeckName->[setTitle],hideLookupButton->[clearClipboard],onConfigurationChanged->[onConfigurationChanged],inflateNewView->[getContentViewAttr],onPageUp->[processCardAction],showSnackbar]] | Focus the completion field if the user has typed an answer. | It'd be better to keep the API the same, and leverage the same functionality (if possible). |
@@ -340,6 +340,12 @@ public class KsqlConfig extends AbstractConfig {
+ "error messages (per query) to hold in the internal query errors queue and display"
+ "in the query description when executing the `EXPLAIN <query>` command.";
+ public static final String KSQL_QUERY_STATUS_RUNNING_THRESHOLD_SECS =
+ "ksql.query.status.running.threshold.seconds";
+ private static final Integer KSQL_QUERY_STATUS_RUNNING_THRESHOLD_SECS_DEFAULT = 18000;
+ private static final String KSQL_QUERY_STATUS_RUNNING_THRESHOLD_SECS_DOC = "Amount of time in "
+ + "seconds to wait before setting a restarted query status as healthy (or running).";
+
public static final String KSQL_PROPERTIES_OVERRIDES_DENYLIST =
"ksql.properties.overrides.denylist";
private static final String KSQL_PROPERTIES_OVERRIDES_DENYLIST_DOC = "Comma-separated list of "
| [KsqlConfig->[buildConfigDef->[defineLegacy,defineCurrent],ConfigValue->[isResolved->[isResolved]],getKsqlStreamConfigProps->[getKsqlStreamConfigProps],buildStreamingConfig->[applyStreamsConfig],getAllConfigPropsWithSecretsObfuscated->[getKsqlConfigPropsWithSecretsObfuscated],overrideBreakingConfigsWithOriginalValues->[KsqlConfig],cloneWithPropertyOverwrite->[KsqlConfig,getKsqlStreamConfigProps,buildStreamingConfig],getKsqlStreamConfigPropsWithSecretsObfuscated->[convertToObfuscatedString],resolveStreamsConfig->[ConfigValue],CompatibilityBreakingConfigDef->[defineCurrent->[define],defineLegacy->[define],define->[define]],configDef,buildStreamingConfig]] | This class is used to provide a basic configuration for a join. COMPATIBLY_BREAKING_CONFIG_DEFS - List of CompatibilityBreak. | this seems a little high - can we set it to `2700` instead? (3x the max query backoff) |
@@ -17,8 +17,8 @@
package io.confluent.ksql;
import io.confluent.ksql.metastore.MetaStore;
-import io.confluent.ksql.util.KafkaTopicClientImpl;
-import io.confluent.ksql.util.KsqlConfig;
+import io.confluent.ksql.util.*;
+import org.apache.kafka.streams.KeyValue;
import org.apache.kafka.streams.StreamsConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
| [KsqlContext->[getMetaStore->[getMetaStore],close->[close]]] | Creates a new KSQL context object. The metastore is valid only if the object is not in the streams. | you probably need to change your import settings? |
@@ -902,6 +902,7 @@ def smoketest(ctx, debug, **kwargs): # pylint: disable=unused-argument
eth_rpc_endpoint='http://127.0.0.1:{}'.format(ethereum_config['rpc']),
keystore_path=ethereum_config['keystore'],
address=ethereum_config['address'],
+ network_id='627',
)
for option_ in app.params:
if option_.name in args.keys():
| [smoketest->[append_report],wait_for_sync->[wait_for_sync_rpc_api,wait_for_sync_etherscan],wait_for_sync_etherscan->[etherscan_query_with_retries],run->[_run_app],removedb->[_removedb],app->[check_synced,check_json_rpc,check_discovery_registration_gas]] | Test that the raiden installation is sane. Invoke the raiden app with a object. This function checks if there is a report in the report_file and if so writes it. | suggestion: name the constant |
@@ -63,6 +63,12 @@ if ($user->socid > 0)
{
$socid = $user->socid;
}
+// list of limit id for invoice
+$facids = GETPOST('facids', 'alpha');
+if(empty($facid) && !empty($facids)) {
+ $r =explode(',', $facids);
+ $facid = (int) $r[0];
+}
$object = new Facture($db);
| [fetch,addPaymentToBank,create,formconfirm,fetch_object,getSommePaiement,jdate,getNomUrl,rollback,begin,initHooks,select_comptes,load,plimit,getSumCreditNotesUsed,transnoentities,executeHooks,loadLangs,select_types_paiements,close,selectDate,free,query,trans,num_rows,hasDelay,fetch_thirdparty,commit,getSumDepositsUsed] | Load and initialize a single user object. This function checks if a given node has an action and if so executes it. | Should use GETPOST('facids', 'intcomma'); or a SQL injection will be possible later in the $sql .= ' AND f.rowid IN('.$facids.')'; |
@@ -17,13 +17,9 @@ class CMakeDepsFileTemplate(object):
def pkg_name(self):
return self.conanfile.ref.name + self.suffix
- @property
- def target_namespace(self):
- return self.get_target_namespace(self.conanfile) + self.suffix
-
@property
def global_target_name(self):
- return self.get_global_target_name(self.conanfile) + self.suffix
+ return self.get_global_target_name(self.conanfile, self.suffix)
@property
def file_name(self):
| [CMakeDepsFileTemplate->[get_file_name->[get_file_name],get_component_alias->[get_target_namespace]]] | Package name of the node. | Given the changes we are introducing, I would rename this method to `root_target_name` |
@@ -14,7 +14,7 @@ class User extends Authenticatable
/**
* The attributes that are mass assignable.
*
- * @var array
+ * @var string[]
*/
protected $fillable = [
'name',
| [No CFG could be retrieved] | Create a user object from a given object. | Why update this but not the hidden array phpdoc? |
@@ -36,7 +36,7 @@ public class EncodingPayloadTransformer<T> extends AbstractPayloadTransformer<T,
}
@Override
- protected byte[] transformPayload(T payload) throws Exception {
+ protected byte[] transformPayload(T payload) throws Exception {//NOSONAR
return codec.encode(payload);
}
| [EncodingPayloadTransformer->[transformPayload->[encode],notNull]] | Transform the payload. | @garyrussell, to be honest I don't like this restriction. Seems for me we lived with such a design for a long time already. So, how about to fix SONAR rules a bit on the matter? |
@@ -209,6 +209,10 @@ namespace System.Reflection.Emit
return _underlyingType;
}
+ [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2110:RequiresDynamicallyAccessedMembers",
+ Justification = "For instance member internal calls, the linker preserves all fields of the declaring type. " +
+ "The _tb field has DynamicallyAccessedMembersAttribute requirements, but the field access is safe because " +
+ "Reflection.Emit is not subject to trimming.")]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern void setup_enum_type(Type t);
| [EnumBuilder->[IsDefined->[IsDefined],GetEvents->[GetEvents],GetInterfaces->[GetInterfaces],GetNestedType->[GetNestedType],GetMethods->[GetMethods],GetNestedTypes->[GetNestedTypes],GetFields->[GetFields],GetElementType->[GetElementType],GetMember->[GetMember],SetCustomAttribute->[SetCustomAttribute],CreateType->[CreateType],GetInterface->[GetInterface],GetConstructors->[GetConstructors],CreateTypeInfo->[CreateTypeInfo],InvokeMember->[InvokeMember],GetMembers->[GetMembers],GetCustomAttributes->[GetCustomAttributes],GetField->[GetField],GetProperties->[GetProperties],GetEvent->[GetEvent],IsAssignableFrom->[IsAssignableFrom]]] | Defines a literal field in the enum. | This is a super weird place for this suppression IMO. You don't even see the `_tb` field around here. Maybe it might help to use `MethodImplOptions.InternalCall` (or just `InternalCall`) in the suppression message instead of "internal calls". |
@@ -149,6 +149,9 @@ public class ClientOptions
@Option(name = "--ignore-errors", title = "ignore errors", description = "Continue processing in batch mode when an error occurs (default is to exit immediately)")
public boolean ignoreErrors;
+ @Option(name = "--insecure", title = "trust all certificates", description = "Assumed to be used for debugging purpose. Skip certificate validation process so that we can connect to untrusted site.")
+ public boolean isInsecure;
+
public enum OutputFormat
{
ALIGNED,
| [ClientOptions->[ClientExtraCredential->[equals->[equals]],ClientResourceEstimate->[equals->[equals]],ClientSessionProperty->[equals->[equals]]]] | Creates a new client session based on the specified options. Returns a list of all possible Negotiate objects. | Let's change the description to > Skip validation of HTTP server certificates (should only be used for debugging) |
@@ -48,6 +48,8 @@ if (strlen($GLOBALS['db']) > 0
if (! isset($_REQUEST['newname']) || strlen($_REQUEST['newname']) === 0) {
$message = PMA\libraries\Message::error(__('The database name is empty!'));
+ } else if($_REQUEST['newname'] === $_REQUEST['db']) {
+ $message = PMA\libraries\Message::error(__('The new database name is equal to the current one!'));
} else {
$_error = false;
if ($move || ! empty($_REQUEST['create_database_before_copying'])) {
| [query,addParam,isAjax,setCookie,setRequestStatus,isError,getScripts,isSystemSchema,addFile,addParamHtml,getTablesFull,isSuccess,addHTML,addJSON,escapeString,getDbCollation,getHeader,selectDb] | Provides a script to move or copy a database or a table. Create a stand - in table for a database. | I suggest changing this message to "Cannot copy database to the same name. Change the name and try again." |
@@ -222,9 +222,16 @@ class Auth::DefaultCurrentUserProvider
@env[CURRENT_USER_KEY] = user
end
- def cookie_hash(unhashed_auth_token)
+ def cookie_hash(unhashed_auth_token, user)
+ cookie = DiscourseAuthCookie.new(
+ token: unhashed_auth_token,
+ user_id: user.id,
+ trust_level: user.trust_level,
+ timestamp: Time.zone.now,
+ valid_for: SiteSetting.maximum_session_age.hours
+ )
hash = {
- value: unhashed_auth_token,
+ value: cookie.to_text,
httponly: true,
secure: SiteSetting.force_https
}
| [lookup_api_user->[ip,to_i,update_columns,downcase,user,now,header_api_key?,warn,username_lower,first,request_allowed?,find_by,can_write?,try],refresh_session->[is_api?,ip,cookie_hash,unhashed_auth_token,trigger,key?,user,auth_token_seen,ago,rotate!,rotated_at,is_user_api?,delete],cookie_hash->[from_now,same_site_cookies,persistent_sessions,force_https],rate_limit_admin_api_requests!->[env,to_i,max,new,performed!,deprecate,respond_to?],parameter_api_patterns->[api_parameter_routes],current_user->[new,lookup,lookup_user_api_user_and_update_key,later,update_last_seen!,update_ip_address!,performed!,max_user_api_reqs_per_day,t,can_perform?,cookies,rate_limit_admin_api_requests!,ip,to_i,key?,active,should_update_last_seen?,max_user_api_reqs_per_minute,blank?,api_parameter_allowed?,length,try,hash_key,get,raise,find_by,lookup_api_user,suspended?],should_update_last_seen?->[xhr?,can_write?],log_on_user->[ip,cookie_hash,unhashed_auth_token,staff?,unstage!,make_developer_admin,enable_bootstrap_mode,enforce_session_count_limit!,generate!,id],make_developer_admin->[email,save,include?,active?,respond_to?,admin],api_parameter_allowed?->[any?,match?],enable_bootstrap_mode->[is_singular_admin?,nil?,bootstrap_mode_enabled,admin,id,enqueue],can_write?->[pg_readonly_mode?],has_auth_cookie?->[length,nil?,cookies],log_off_user->[log_out_strict,admin,destroy_all,destroy,logged_out,delete],initialize->[new],lookup_user_api_user_and_update_key->[update_columns,user,raise,now,can_write?,destroy_all,first,present?,client_id,allow?],require_relative,new,map] | Log a user in the session and cookies. | Just curious, do we need to store `timestamp` and `valid_for` separately? Can we replace it with a `valid_until_timestamp` field? |
@@ -558,13 +558,17 @@ void Sky::update(float time_of_day, float time_brightness,
f32 pointcolor_light = rangelim(m_time_brightness * 3, 0.2, 1);
video::SColorf pointcolor_sun_f(1, 1, 1, 1);
- if (m_sun_tonemap) {
+ // Use tonemap only if default sun/moon tinting is used
+ // which keeps previous behaviour.
+ if (m_sun_tonemap && m_default_tint) {
pointcolor_sun_f.r = pointcolor_light *
(float)m_materials[3].EmissiveColor.getRed() / 255;
pointcolor_sun_f.b = pointcolor_light *
(float)m_materials[3].EmissiveColor.getBlue() / 255;
pointcolor_sun_f.g = pointcolor_light *
(float)m_materials[3].EmissiveColor.getGreen() / 255;
+ } else if (!m_default_tint) {
+ pointcolor_sun_f = m_sky_params.sun_tint;
} else {
pointcolor_sun_f.r = pointcolor_light * 1;
pointcolor_sun_f.b = pointcolor_light *
| [place_sky_body->[rotateXYBy,rotateXZBy],render->[fabs,getInterpolated,rotateVect,getNearValue,setScale,unlock,getAbsolutePosition,drawIndexedTriangleFan,getFarValue,drawVertexPrimitiveList,setMaterial,rotateXYBy,getGreen,setTransform,lock,setTranslation,getRed,v3f,easeCurve,draw_moon,getVideoDriver,getActiveCamera,getBlue,MYMAX,buildRotateFromTo,sin,toSColor,draw_sun,rotateXZBy,MYMIN,drawIndexedTriangleList],OnRegisterSceneNode->[registerNodeForRendering],draw_moon->[place_sky_body,setMaterial,draw_sky_body,setAlpha,drawIndexedTriangleFan],update->[wrapDegrees_0_360,getInterpolated,m_mix_scolor,getAlpha,getGreen,m_horizon_blend,update,getBlue,m_mix_scolorf,getRed,toSColor,rangelim,MYMIN,m_materials],draw_sun->[place_sky_body,setMaterial,draw_sky_body,setAlpha,drawIndexedTriangleFan],ISceneNode->[normalize,myrand_range,setAutomaticCulling,get_scene_manager,getTextureForMesh,getBool,set,v3f,getTexture,isKnownSourceImage,m_materials]] | Sky update method Standard video functions Color Change Color Change Color Change Color Change Color Change Color Change Color Change Color Change Color Change This is a wrapper for the color interpolation functions that color the brightness of the video. | I have a suspect feeling this is the bug in question. |
@@ -53,7 +53,7 @@ class Pre_Connection_JITM extends JITM {
'message' => $message['message'],
'description' => $message['description'],
'list' => array(),
- 'icon' => 'jetpack',
+ 'icon' => isset( $message['icon'] ) ? $message['icon'] : 'jetpack',
);
$formatted_messages[] = $obj;
| [Pre_Connection_JITM->[get_messages->[filter_messages]]] | Filters the messages that are not part of the pre - connection JITMs. | Should we check whether the icon is one of an array of accepted values, instead of passing anything that may be provided? |
@@ -98,6 +98,10 @@ class Tuner(Recoverable):
checkpoin_path = self.get_checkpoint_path()
_logger.info('Save checkpoint ignored by tuner, checkpoint path: %s' % checkpoin_path)
+ def feed_tuning_data(self, data):
+ _logger.info('Feeding...')
+ pass
+
def _on_exit(self):
pass
| [Tuner->[generate_multiple_parameters->[generate_parameters]]] | Save the checkpoint of tuner. path. | Please add docstring for this function. |
@@ -12,14 +12,7 @@ import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
| [FlywayProcessor->[getMigrationLocations->[toCollection,isDefaultDataSourcePresent,dataSourceNamesOf,addAll,collect],discoverApplicationMigrations->[nextElement,warnv,getResources,equals,toURI,infov,initFileSystem,getApplicationMigrationsFromPath,substring,addAll,hasMoreElements,length,startsWith,getProtocol,getPath],build->[FeatureBuildItem,unremovableOf,discoverApplicationMigrations,getMigrationLocations,setFlywayBuildConfig,produce,BeanContainerListenerBuildItem,registerNativeImageResources,createFlywayProducerBean,dataSourceNamesOf],capability->[CapabilityBuildItem],registerNativeImageResources->[toArray,getBytes,produce,add,GeneratedResourceBuildItem,collect,joining,addAll,NativeImageResourceBuildItem],getApplicationMigrationsFromPath->[walk,toURI,get,collect,toSet],configureRuntimeProperties->[getValue,ServiceStartBuildItem,produce,doStartActions,DataSourceSchemaReadyBuildItem,dataSourceNamesOf,configureFlywayProperties],initFileSystem->[newFileSystem,put],getLogger]] | Imports the packages that are used by the Quarkus library. Imports all components of the ServiceStartBuildItem. | Oh my bad, I did not see this star import. We usually do not allow them in the codebase. Sorry I should have spotted it. Can you please deal import individual classes and get rid of it (making sure that it is into one commit) ? Thank you |
@@ -53,7 +53,7 @@ public class VirtualMachinePowerStateSyncImpl implements VirtualMachinePowerStat
@Override
public void processHostVmStateReport(long hostId, Map<String, HostVmStateReportEntry> report) {
if (s_logger.isDebugEnabled())
- s_logger.debug("Process host VM state report from ping process. host: " + hostId);
+ s_logger.debug("Process host VM state report. host: " + hostId);
Map<Long, VirtualMachine.PowerState> translatedInfo = convertVmStateReport(report);
processReport(hostId, translatedInfo);
| [VirtualMachinePowerStateSyncImpl->[convertVmStateReport->[getState,entrySet,getKey,getId,info,put,findVM],processHostVmStatePingReport->[convertVmStateReport,debug,processReport,isDebugEnabled],processHostVmStateReport->[convertVmStateReport,debug,processReport,isDebugEnabled],resetHostSyncState->[info,resetHostPowerStateTracking],processReport->[getValue,getPingInterval,size,currentGMTTime,getPowerStateUpdateTime,warn,publish,isDebugEnabled,remove,isPowerStateUpToDate,findByHostInStates,getTime,getKey,resetVmPowerStateTracking,hasNext,debug,iterator,next,entrySet,updatePowerState,get,getId],findVM->[findVMByInstanceName],getLogger]] | Process a host VM state report. | Can you remove this IF condition as well? |
@@ -165,10 +165,10 @@ namespace System.Net.Tests
var listener = listenerFactory.GetListener();
listener.Start();
var listenerTask = Task.Run(() => Assert.Throws<HttpListenerException>(() => listener.GetContext()));
- await Task.Delay(1000).TimeoutAfter(10000); // Wait for listenerTask to call GetContext.
+ await Task.Delay(1000); // Wait for listenerTask to call GetContext.
listener.Stop();
listener.Close();
- await listenerTask.TimeoutAfter(10000);
+ await listenerTask.WaitAsync(TimeSpan.FromSeconds(10));
}
}
}
| [HttpListenerTests->[IsListening_Disposed_ReturnsFalse->[False,Close,IsListening],GetContext_NotStarted_ThrowsInvalidOperationException->[BeginGetContext,GetContext,Assert],IsListening_Stopped_ReturnsFalse->[False,IsListening,Stop],IsListening_NotStarted_ReturnsFalse->[False,IsListening],IsListening_Aborted_ReturnsFalse->[False,IsListening,Abort],GetContext_Disposed_ThrowsObjectDisposedException->[BeginGetContext,Close,GetContext,Assert],EndGetContext_NullAsyncResult_ThrowsArgumentNullException->[AssertExtensions,EndGetContext],Task->[GetListener,Stop,Start,Close,TimeoutAfter,Assert,GetContext,Run],IgnoreWriteExceptions_SetDisposed_ThrowsObjectDisposedException->[Close,IgnoreWriteExceptions,Assert],Start_Disposed_ThrowsObjectDisposedException->[Close,Assert,Start],GetContext_NoPrefixes_ThrowsInvalidOperationException->[BeginGetContext,Start,GetContext,Assert],EndGetContext_InvalidAsyncResult_ThrowsArgumentException->[BeginGetContext,Start,AssertExtensions,EndGetContext],EndGetContext_AlreadyCalled_ThrowsInvalidOperationException->[GetStringAsync,GetListener,EndGetContext,Start,Assert,ListeningUrl,BeginGetContext],Stop_Disposed_ThrowsObjectDisposedException->[Close,Stop,Assert],Mono,IsNotWindowsNanoServer,nameof]] | Stop is called when GetContext. GetContextUnblocked is called. | this is a bug fix? Why would anyone want to timeout the `Delay`? |
@@ -286,4 +286,15 @@ class GradersController < ApplicationController
end
Grouping.unassign_tas(grader_membership_ids, grouping_ids, @assignment)
end
+
+ def find_empty_submissions(grouping_ids)
+ grouping_ids.each do |grouping_id|
+ submission = Submission.find_by_grouping_id(grouping_id)
+ if !submission || !SubmissionFile.where(submission_id: submission.id).exists?
+ grouping_ids.delete(grouping_id)
+ @found_empty_submission = true;
+ end
+ end
+ return grouping_ids
+ end
end
| [GradersController->[criteria_with_assoc->[where,includes],csv_upload_grader_groups_mapping->[redirect_to,nil?,assign_tas_by_csv,size,read,post?,join,t],randomly_assign_graders->[randomly_assign_tas],groups_coverage_dialog->[render,find],set_assign_criteria->[head,save,assign_graders_to_criteria,find],populate->[all,get_groups_table_info_no_criteria,find,render,get_groups_table_info_with_criteria,get_graders_table_info_with_criteria,get_graders_table_info_no_criteria,assign_graders_to_criteria],assign_all_graders->[assign_all_tas],unassign_graders->[id,find,unassign_tas,map],randomly_assign_graders_to_criteria->[randomly_assign_tas],global_actions->[render,find,uniq,unassign_graders_from_criteria,assign_all_graders_to_criteria,blank?,head,t,assign_all_graders,unassign_graders,randomly_assign_graders,randomly_assign_graders_to_criteria],download_grader_criteria_mapping->[criteria_with_assoc,send_data,find,user_name,generate,each,get_name,push],groupings_with_assoc->[where,includes],index->[t,find,size],grader_criteria_dialog->[render,find],add_grader_to_grouping->[add_tas,find,head,criterion,each,save,map],csv_upload_grader_criteria_mapping->[redirect_to,nil?,assign_tas_by_csv,find,size,read,post?,join,t],unassign_graders_from_criteria->[unassign_tas],download_grader_groupings_mapping->[send_data,find,user_name,group_name,generate,groupings_with_assoc,each,push],assign_all_graders_to_criteria->[assign_all_tas],include,before_filter]] | Unassign all graders with the given ids. | Do not use semicolons to terminate expressions. |
@@ -289,8 +289,7 @@ public class TestStorageContainerManager {
return false;
}
}, 1000, 10000);
- Assert.assertTrue(helper.getAllBlocks(containerIDs).isEmpty());
-
+ Assert.assertTrue(helper.verifyBlocksWithTxnTable(containerBlocks));
// Continue the work, add some TXs that with known container names,
// but unknown block IDs.
for (Long containerID : containerBlocks.keySet()) {
| [TestStorageContainerManager->[testCloseContainerCommandOnRestart->[mock,getPipelineID,OzoneConfiguration,CloseContainerCommand,isRunning,info,setInt,getReplicationManager,createKeys,setAccessible,CloseContainerCommandMatcher,getContainerID,set,setTimeDuration,fireEvent,getStorageContainerManager,CommandForDatanode,getState,sleep,stop,TestStorageContainerManagerHelper,setBoolean,printStackTrace,getDeclaredField,getModifiers,next,assertNotNull,updateContainerState,build,waitFor,getUuid,waitForClusterToBeReady,restartStorageContainerManager,getContainers,eq,containerID,argThat,shutdown],testBlockDeletingThrottling->[assertTrue,blocksTobeDeleted,size,OzoneConfiguration,getType,getKeyLocationVersions,setInt,setBlockDeleteTXNum,createKeys,closeContainers,setTimeDuration,ofMillis,values,getStorageContainerManager,getScmNodeManager,getSCMBlockDeletingService,sleep,createDeleteTXLog,TestStorageContainerManagerHelper,setBoolean,getObject,setBlockDeletionInterval,assertEquals,getNumOfValidTransactions,build,waitFor,get,waitForClusterToBeReady,getDeletedBlockLog,shutdown,processHeartbeat,setFromObject],cleanup->[close],testBlockDeletionTransactions->[assertTrue,ofSeconds,size,OzoneConfiguration,getKeyLocationVersions,addTransaction,setInt,singletonList,createKeys,closeContainers,isEmpty,setTimeDuration,values,getStorageContainerManager,sleep,nextLong,createDeleteTXLog,TestStorageContainerManagerHelper,getObject,setBlockDeletionInterval,assertEquals,getNumOfValidTransactions,build,waitFor,waitForClusterToBeReady,getDeletedBlockLog,shutdown,keySet,setFromObject],testRpcPermission->[setStrings,testRpcPermissionWithConf,OzoneConfiguration],testRpcPermissionWithConf->[assertTrue,getTestContainerID,getClientProtocolServer,size,build,thenReturn,getReplicationType,deleteContainer,waitForClusterToBeReady,verifyPermissionDeniedException,contains,shutdown,allocateContainer,assertEquals,getContainer,spy,fail],testSCMReinitialization->[getNodeType,getTempPath,build,SCMStorageConfig,get,OzoneConfiguration,getClusterID,assertNotEquals,waitForClusterToBeReady,set,toString,scmInit,shutdown,assertEquals],testScmInfo->[getScmInfo,deleteQuietly,getSoftwareVersion,getTempPath,getScmId,SCMStorageConfig,getClusterId,get,OzoneConfiguration,setClusterId,setScmId,set,toString,createSCM,File,assertEquals,getVersion,initialize],testScmProcessDatanodeHeartbeat->[assertTrue,size,setClass,OzoneConfiguration,getNodeByUuid,toString,getUuidString,getAllNodes,addNodeToRack,getStorageContainerManager,sleep,getNetworkLocation,monotonicNow,getNetworkName,assertEquals,getLastHeartbeatTime,build,get,waitForClusterToBeReady,shutdown],createDeleteTXLog->[assertTrue,getValue,newHashMap,newArrayList,size,add,getLocalID,getKey,containsKey,getContainerID,values,put,forEach,addTransaction,assertEquals,entrySet,getLocationList],CloseContainerCommandMatcher->[matches->[equals,getCommand,getPipelineID,getProto,getType,getContainerID]],verifyPermissionDeniedException->[assertTrue,assertEquals,getMessage],testSCMInitializationFailure->[expect,getTempPath,expectMessage,get,OzoneConfiguration,set,toString,createSCM],setup->[XceiverClientManager,OzoneConfiguration],testSCMInitialization->[getNodeType,getTempPath,SCMStorageConfig,get,OzoneConfiguration,getClusterID,set,toString,scmInit,assertEquals],getLogger,TemporaryFolder,none,Timeout]] | This test method creates a new cluster and checks if there are no transactions left in the cluster This method checks if a transaction with the given container ID is not in the log and if. | This will only work for schema version two. `SCHEMA_LATEST` should be able to be changed to V1 and this test should still pass. Therefore, we need something along the lines of `verifyWithSchemaV1` and `verifyWithSchemaV2` methods. |
@@ -117,10 +117,11 @@ public class KafkaConsumerGroupClientImpl implements KafkaConsumerGroupClient {
ExecutorUtil.executeWithRetries(
() -> adminClient.get().deleteConsumerGroups(groups).all().get(),
e -> (e instanceof RetriableException)
- || (e instanceof GroupNotEmptyException && retryCount.getAndIncrement() < 5),
- () -> Duration.of(3, ChronoUnit.SECONDS)
+ || (e instanceof GroupNotEmptyException),
+ (retry) -> Duration.of(3L * retry, ChronoUnit.SECONDS),
+ 10
);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new KafkaResponseGetFailedException("Failed to delete consumer groups: " + groups, e);
}
}
| [KafkaConsumerGroupClientImpl->[deleteConsumerGroups->[of,AtomicInteger,get,KafkaResponseGetFailedException,executeWithRetries,getAndIncrement],listConsumerGroupOffsets->[get,KsqlGroupAuthorizationException,KafkaResponseGetFailedException,executeWithRetries],listGroups->[toList,KafkaResponseGetFailedException,collect],describeConsumerGroup->[KsqlGroupAuthorizationException,get,KafkaResponseGetFailedException,collect,ConsumerGroupSummary,executeWithRetries,toSet]]] | Delete consumer groups. | First change: add linear backoff so that we will wait 3, 6, 9, and so forth seconds between each retry instead of just waiting 3 seconds every time. |
@@ -27,5 +27,10 @@ namespace System.IO
/// In other cases (including the default 0 value), it's ignored.
/// </summary>
public long PreallocationSize { get; set; }
+ /// <summary>
+ /// The size of the buffer used by <see cref="FileStream" /> for buffering. The default buffer size is 4096.
+ /// 0 or 1 means that buffering should be disabled. Negative values are not allowed.
+ /// </summary>
+ public int BufferSize { get; set; } = FileStream.DefaultBufferSize;
}
}
| [FileStreamOptions->[DefaultShare,Read]] | - The size of the block that is used to allocate the block. | > Negative values are not allowed. We don't want to do such validation in the setter? |
@@ -157,7 +157,7 @@ type InspectMount struct {
// "volume" and "bind".
Type string `json:"Type"`
// The name of the volume. Empty for bind mounts.
- Name string `json:"Name,omptempty"`
+ Name string `json:"Name,omitempty"`
// The source directory for the volume.
Source string `json:"Source"`
// The destination directory for the volume. Specified as a path within
| [No CFG could be retrieved] | Inspects a single container s current . This is a hack to make sure that the fields that are not unused are not considered to. | @Luap99 Note that this is similar |
@@ -313,9 +313,7 @@ class User < ApplicationRecord
end
def suspended?
- # TODO: [@jacobherrington] After all of our Forems have been successfully deployed,
- # and data scripts have successfully removed the banned role, we can remove `has_role?(:banned)`
- has_role?(:suspended) || has_role?(:banned)
+ has_role?(:suspended)
end
def warned
| [User->[check_for_username_change->[path],send_welcome_notification->[send_welcome_notification],blocked_by?->[blocking?],auditable?->[any_admin?],blocking?->[blocking?],resave_articles->[path]]] | Checks if a node has a specific type that can be removed. | Verified via Blazer that the old "banned" role indeed no longer exists, so we can safely remove this code (which was meant to be extremely temporary). |
@@ -2,5 +2,5 @@
# Licensed under the MIT license.
from .config import *
-from .experiment import Experiment
-from .data import *
+#from .experiment import Experiment
+#from .data import *
| [No CFG could be retrieved] | Copyright 2015 The MIT License. | remove the line if it is not used anymore, or add annotation to annotate why it should keep. |
@@ -287,13 +287,7 @@ public final class HttpRequestSessionContext
private static Map<String, String> parseSessionHeaders(HttpServletRequest servletRequest)
{
- Map<String, String> sessionProperties = new HashMap<>();
- for (String header : splitSessionHeader(servletRequest.getHeaders(PRESTO_SESSION))) {
- List<String> nameValue = Splitter.on('=').limit(2).trimResults().splitToList(header);
- assertRequest(nameValue.size() == 2, "Invalid %s header", PRESTO_SESSION);
- sessionProperties.put(nameValue.get(0), nameValue.get(1));
- }
- return sessionProperties;
+ return parseProperty(servletRequest, PRESTO_SESSION);
}
private static Map<String, SelectedRole> parseRoleHeaders(HttpServletRequest servletRequest)
| [HttpRequestSessionContext->[parseRoleHeaders->[splitSessionHeader],parseSessionHeaders->[splitSessionHeader],parseResourceEstimate->[splitSessionHeader],parsePreparedStatementsHeaders->[assertRequest,splitSessionHeader]]] | parse session headers and role headers. | can you please extract this refactor as separate commit |
@@ -801,10 +801,15 @@ public class RealtimePlumber implements Plumber
private void removeMergedSegment(final Sink sink)
{
final File mergedTarget = new File(computePersistDir(schema, sink.getInterval()), "merged");
- if (mergedTarget.exists()) {
+ removeSegment(sink, mergedTarget);
+ }
+
+ private void removeSegment(final Sink sink, final File target)
+ {
+ if (target.exists()) {
try {
- log.info("Deleting Index File[%s]", mergedTarget);
- FileUtils.deleteDirectory(mergedTarget);
+ log.info("Deleting Index File[%s]", target);
+ FileUtils.deleteDirectory(target);
}
catch (Exception e) {
log.makeAlert(e, "Unable to remove merged segment for dataSource[%s]", schema.getDataSource())
| [RealtimePlumber->[persistHydrant->[persist,computePersistDir],getSink->[add],finishJob->[persistAndMerge],persistAndMerge->[doRun->[add]],registerServerViewCallback->[segmentAdded->[abandonSegment]],add->[add],computePersistDir->[computeBaseDir],removeMergedSegment->[computePersistDir],persist->[add],mergeAndPush->[persistAndMerge,add],bootstrapSinksFromDisk->[compare->[compare],add]]] | Remove merged segment if it exists. | This alert message is no longer accurate |
@@ -1664,8 +1664,13 @@ def plot_compare_evokeds(evokeds, picks=list(), gfp=False, colors=None,
for condition in conditions:
# this will fail if evokeds do not have the same structure
# (e.g. channel count)
- data = np.asarray([evoked_.data[picks, :].mean(0)
- for evoked_ in evokeds[condition]])
+ if ch_type == 'grad':
+ data = [(_merge_grad_data(evoked_.data[picks, :])).
+ mean(0) for evoked_ in evokeds[condition]]
+ data = np.asarray(data)
+ else:
+ data = np.asarray([evoked_.data[picks, :].mean(0)
+ for evoked_ in evokeds[condition]])
ci_array[condition] = _ci_fun(data) * scaling
# get the grand mean
| [plot_evoked_joint->[plot_evoked_joint,_connection_line,_plot_evoked],_check_estimated_rank->[_match_proj_type],plot_evoked_image->[_plot_evoked],_handle_spatial_colors->[_plot_legend],_plot_lines->[_rgb],plot_compare_evokeds->[_truncate_yaxis,_plot_legend,plot_compare_evokeds,_setup_styles],_plot_evoked_white->[_check_estimated_rank,whitened_gfp],plot_evoked->[_plot_evoked]] | Plot evoked time courses for one or multiple channels and conditions. Plots a single in the current plot. Plots a single critical band. Generate a single object from a list of evokes. Plots a plot if the picks channel is not in the list of channels. | It seems you need to import `_merge_grad_data` :) Also maybe you will have to include a check that the relevant channels are in the picks. |
@@ -22,7 +22,9 @@ class Functions {
* @return array
*/
public static function get_modules() {
- require_once JETPACK__PLUGIN_DIR . 'class.jetpack-admin.php';
+ if ( defined( 'JETPACK__PLUGIN_DIR' ) ) {
+ require_once JETPACK__PLUGIN_DIR . 'class.jetpack-admin.php';
+ }
return \Jetpack_Admin::init()->get_modules();
}
| [Functions->[is_version_controlled->[is_vcs_checkout],get_modules->[get_modules],get_paused_themes->[get_all],get_paused_plugins->[get_all],expand_synced_post_type->[add_rewrite_rules,add_supports,register_taxonomies,add_hooks]]] | Get all modules. | class.jetpack-admin.php defines the Jetapck_Admin class. This change will lead to fatals as Jetpack_Admin will not be defined if the Sync package is being used without the full plugin. I suggest that get_modules return an empty array in this case. Perhaps have the existing line 29 move up below the require statement and replace line 29 with return []; |
@@ -32,7 +32,6 @@ class LocalTree(BaseTree):
PARAM_CHECKSUM = "md5"
PARAM_PATH = "path"
TRAVERSE_PREFIX_LEN = 2
- UNPACKED_DIR_SUFFIX = ".unpacked"
CACHE_MODE = 0o444
SHARED_MODE_MAP = {None: (0o644, 0o755), "group": (0o664, 0o775)}
| [LocalTree->[isfile->[isfile],stat->[stat],unprotect->[exists,_unprotect_dir,isdir,_unprotect_file],_unprotect_file->[is_symlink,is_hardlink,remove],remove->[exists,remove],symlink->[symlink],list_paths->[exists,walk_files],_unprotect_dir->[_unprotect_file,walk_files],copy->[copy,remove],move->[isfile,move,makedirs],protect->[stat],exists->[exists],copy_fobj->[remove,makedirs],walk->[walk,dvcignore],hardlink->[hardlink,open],is_empty->[isfile,isdir],open->[open],_remove_unpacked_dir->[remove],is_protected->[stat],reflink->[reflink],_upload->[protect,makedirs],is_symlink->[is_symlink],is_hardlink->[is_hardlink],walk_files->[walk],getsize->[getsize],makedirs->[makedirs],isdir->[isdir]]] | Initialize a object. | This needs to be moved to cache as well. EDIT: experiments depend on it, so won't be touching right now. |
@@ -0,0 +1,8 @@
+require 'rails_helper'
+
+describe BackupCodeSetupForm do
+ it 'returns the correct domain' do
+ domain = BackupCodeSetupForm.domain_name
+ expect(domain).to eq 'www.example.com'
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | Why do we care what domain the setup form returns? We don't use the domain_name method anywhere in the application. |
@@ -97,7 +97,7 @@ final class PurgeHttpCacheListener
/**
* Purges tags collected during this request, and clears the tag list.
*/
- public function postFlush()
+ public function onKernelTerminate()
{
$this->purger->purge($this->tags);
$this->tags = [];
| [PurgeHttpCacheListener->[onFlush->[getEntityManager,getScheduledEntityInsertions,getUnitOfWork,getScheduledEntityDeletions,getScheduledEntityUpdates,gatherResourceAndItemTags,gatherRelationTags],preUpdate->[getEntityChangeSet,getAssociationMappings,gatherResourceAndItemTags,addTagsFor,getObject],addTagForItem->[getIriFromItem],postFlush->[purge],gatherResourceAndItemTags->[getResourceClass,getIriFromResourceClass,getIriFromItem],addTagsFor->[addTagForItem],gatherRelationTags->[addTagsFor,getAssociationMappings,getValue]]] | Post flush callback. | If you do that you are not in the right place. This is in the doctrine bridge |
@@ -118,8 +118,8 @@ func (c *CmdPassphraseRecover) GetUsage() libkb.Usage {
}
}
-func (c *CmdPassphraseRecover) errNoUID() error {
- return errors.New(`Can't recover without a UID.
+func (c *CmdPassphraseRecover) errNotProvisioned() error {
+ return errors.New(`Can't recover without device keys.
If you have not provisioned this device before but do have
your paper key, try running: keybase login
| [errNoUID->[New],errNoPaperKeys->[New],loginWithPaperKey->[LoginWithPaperKey,G],Run->[GetTerminalUI,errNoUID,Printf,errNoPaperKeys,Exists,PromptForConfirmation,G,GetMyUID,loginWithPaperKey,TODO,errLockedKeys],errLockedKeys->[New],NewContextified,ChooseCommand] | GetUsage returns the usage of the device. | are these errors still used/needed? |
@@ -436,7 +436,12 @@ class PythonLibrarySources(PythonSources):
class PythonLibrary(Target):
- """A Python library that may be imported by other targets."""
+ """Python source code.
+
+ A `python_library` does not necessarily correspond to a distribution you publish (see
+ `python_distribution` and `pex_binary` for that). `python_library` is intended for your first-
+ party library code, meaning your code imported by tests and deployables/binaries.
+ """
alias = "python_library"
core_fields = (*COMMON_PYTHON_FIELDS, Dependencies, PythonLibrarySources)
| [PythonRequirementsField->[compute_value->[format_invalid_requirement_string_error]],resolve_pex_entry_point->[ResolvedPexEntryPoint]] | A base class that can be imported by other targets. This is a hack to get around the issue in the git repo. | I'm not sure how to talk about this. A common source of confusion for new users is thinking that `python_library == python_distribution`. |
@@ -997,16 +997,6 @@ namespace System.Text.Json.Serialization.Tests
Assert.Equal(3, input.Value[2]);
}
- [Fact]
- public static void ReadKeyValuePairOfKeyValuePair()
- {
- KeyValuePair<string, KeyValuePair<int, int>> input = JsonSerializer.Deserialize<KeyValuePair<string, KeyValuePair<int, int>>>(@"{""Key"":""Key"", ""Value"":{""Key"":1, ""Value"":2}}");
-
- Assert.Equal("Key", input.Key);
- Assert.Equal(1, input.Value.Key);
- Assert.Equal(2, input.Value.Value);
- }
-
[Theory]
[InlineData(@"{""Key"":""Key"", ""Value"":{""Key"":1, ""Value"":2}}")]
[InlineData(@"{""Key"":""Key"", ""Value"":{""Value"":2, ""Key"":1}}")]
| [ValueTests->[ReadGenericIReadOnlyCollectionOfArray->[GetBytes,Equal,Assert,JsonSerializer],ReadGenericIReadOnlyListOfGenericIReadOnlyList->[GetBytes,Equal,Assert,JsonSerializer],ReadArrayOfGenericICollection->[GetBytes,Equal,JsonSerializer],ReadSimpleGenericStack->[GetBytes,Count,Equal,JsonSerializer],ReadListOfList->[GetBytes,Equal,JsonSerializer],ReadSimpleHashSetT->[GetBytes,Count,Equal,JsonSerializer],ReadListOfArray->[GetBytes,Equal,JsonSerializer],ReadSimpleList->[GetBytes,Count,Equal,JsonSerializer],ReadArrayOfGenericStack->[GetBytes,Equal,JsonSerializer],ReadISetTOfArray->[Equal,First,Contains,JsonSerializer,GetBytes,Last],ReadArrayOfIReadOnlyCollectionT->[GetBytes,Equal,Assert,JsonSerializer],ReadISetTOfHashSetT->[Equal,First,Contains,JsonSerializer,GetBytes,Last],ReadHashSetTOfHashSetT->[GetBytes,Equal,JsonSerializer],ReadListOfKeyValuePair->[Value,Equal,Count,JsonSerializer,Key],ReadGenericIReadOnlyListOfArray->[GetBytes,Equal,Assert,JsonSerializer],ReadGenericIEnumerableOfGenericIEnumerable->[GetBytes,Equal,Assert,JsonSerializer],ReadGenericSimpleIReadOnlyCollection->[Equal,Count,JsonSerializer,Assert,GetBytes],Read_HigherOrderCollectionInheritance_Works->[First,Equal,JsonSerializer],CollectionWith_BackingField_CanRoundtrip->[First,Serialize,Equal,JsonSerializer],ReadSimpleGenericICollection->[GetBytes,Count,Equal,JsonSerializer],ReadKeyValuePairWithNullValues->[Value,Equal,JsonSerializer,Null,Key],ReadGenericIReadOnlyCollectionOfGenericIReadOnlyCollection->[GetBytes,Equal,Assert,JsonSerializer],ReadIListTOfIListT->[GetBytes,Equal,JsonSerializer],ReadArrayOfList->[GetBytes,Equal,JsonSerializer],ReadSimpleGenericIList->[GetBytes,Count,Equal,JsonSerializer],ReadArrayOfIEnumerableT->[GetBytes,Equal,Assert,JsonSerializer],ReadGenericICollectionOfGenericICollection->[GetBytes,Equal,JsonSerializer],ReadGenericICollectionOfArray->[GetBytes,Equal,JsonSerializer],ReadSimpleLinkedListT->[GetBytes,Count,Equal,JsonSerializer],ReadArrayOfSortedSetT->[GetBytes,Equal,JsonSerializer],ReadLinkedListTOfArray->[GetBytes,Equal,JsonSerializer],ReadKeyValuePairOfList->[Value,Equal,Count,JsonSerializer,Key],ReadReadOnlyCollections_Throws->[Message,Contains,Assert,ToString,Deserialize],ReadArrayOfIListT->[GetBytes,Equal,JsonSerializer],ReadGenericISetOfGenericISet->[Equal,First,Contains,JsonSerializer,GetBytes,Last],ReadSimpleGenericIReadOnlyList->[Equal,Count,JsonSerializer,Assert,GetBytes],ReadArrayOfGenericIReadOnlyList->[GetBytes,Equal,Assert,JsonSerializer],DoesNotCall_CollectionPropertyGetter_EveryTimeElementIsAdded->[JsonSerializer,NetworkList,Equal,Serialize],ReadArrayOfILinkedListT->[GetBytes,Equal,JsonSerializer],NetworkWrapper->[Split,Join,Empty],ReadGenericLinkedListOfGenericLinkedList->[GetBytes,Equal,JsonSerializer],ReadQueueTOfArray->[GetBytes,Equal,JsonSerializer],ReadArrayOfIHashSetT->[GetBytes,Equal,JsonSerializer],ReadGenericStackOfArray->[GetBytes,Equal,JsonSerializer],ReadQueueTOfQueueT->[GetBytes,Equal,JsonSerializer],ReadArrayOfISetT->[Equal,First,JsonSerializer,GetBytes,Last],ReadArrayOfIQueueT->[GetBytes,Equal,JsonSerializer],ReadSimpleTestClass_GenericCollectionWrappers->[s_json,Verify,JsonSerializer],ReadSimpleGenericIEnumerable->[Equal,Count,JsonSerializer,Assert,GetBytes],ReadSimpleTestClass_GenericWrappers_NoAddMethod_Throws->[nameof,Message,Contains,Assert,ToString,Deserialize],ReadHashSetTOfISetT->[Equal,First,Contains,JsonSerializer,GetBytes,Last],ReadKeyValuePairOfKeyValuePair->[Value,Key,Equal,JsonSerializer],ReadSimpleSortedSetT->[GetBytes,Count,Equal,JsonSerializer],ReadSimpleKeyValuePairFail->[Assert,JsonSerializer],ReadSimpleISetT->[GetBytes,Count,Equal,JsonSerializer],ReadGenericIListOfArray->[GetBytes,Equal,JsonSerializer],Read_Generic_NoPublicConstructor_Throws->[Message,Contains,Assert,ToString,Deserialize],ReadHashSetTOfArray->[GetBytes,Equal,JsonSerializer],StackTOfStackT->[GetBytes,Equal,JsonSerializer],ReadSimpleQueueT->[GetBytes,Count,Equal,JsonSerializer],ReadClassWithNullKeyValuePairValues->[Value,Equal,JsonSerializer,Null,Key],ReadIEnumerableTOfArray->[GetBytes,Equal,Assert,JsonSerializer],s_json]] | Read KeyValuePairOfKeyValuePair of List and KeyValuePair of String and List of KeyValuePair. | Was this a dup? Wondering why it's being deleted. |
@@ -232,7 +232,7 @@ cont_create_hdlr(struct cmd_args_s *ap)
attr.da_chunk_size = ap->chunk_size;
rc = dfs_cont_create(ap->pool, ap->c_uuid, &attr, NULL, NULL);
} else {
- rc = daos_cont_create(ap->pool, ap->c_uuid, NULL, NULL);
+ rc = daos_cont_create(ap->pool, ap->c_uuid, ap->props, NULL);
}
if (rc != 0) {
| [No CFG could be retrieved] | creates a container by UUID - create container and link to object in POSIX filesystem or HDF5 file. | so we don't want to set a property for a dfs container with POSIX type here? similarly we probably need something similar in cont_create_uns_hdlr() |
@@ -412,7 +412,8 @@ public class Agent implements HandlerFactory, IAgentControl {
try {
_connection.start();
} catch (final NioConnectionException e) {
- throw new CloudRuntimeException("Unable to start the connection!", e);
+ s_logger.info("Attempted to connect to the server, but received an unexpected exception, trying again...");
+
}
_shell.getBackoffAlgorithm().waitBeforeRetry();
} while (!_connection.isStartup());
| [Agent->[processOtherTask->[getId],reconnect->[start,stop,cancelTasks,setLink],processRequest->[cancelTasks,scheduleWatch],sendRequest->[getNextSequence,getId,registerControlListener,unregisterControlListener],start->[start],getPod->[getPod],getZone->[getZone],stop->[stop],postRequest->[getNextSequence,getId,postRequest],StartupTask->[runInContext->[reconnect],cancel->[cancel]],processStartupAnswer->[scheduleWatch,getId,setId],getVersion->[getVersion],ShutdownThread->[run->[stop]],processReadyCommand->[getId,setId],setId->[getResourceName],processResponse->[processStartupAnswer],setupStartupCommand->[getPod,getZone,getId,getVersion,setId,getResourceName,getResourceGuid],getBackoffAlgorithm->[getBackoffAlgorithm],ServerHandler->[doTask->[processResponse,processOtherTask,reconnect,sendStartup,AgentRequestHandler,setLink]],sendStartup->[lockStartupTask],AgentRequestHandler->[doTask->[processRequest]]]] | Reconnect to the server. | 1. I think you should fix line 230/238, that's the root cause of the issue. line 415 is not. 2. line 416 can be removed. |
@@ -531,12 +531,14 @@ void Initializer::start() const {
}
initLogger(binary_);
+#ifndef WIN32
// Initialize the distributed plugin, if necessary
if (!FLAGS_disable_distributed) {
if (Registry::exists("distributed", FLAGS_distributed_plugin)) {
initActivePlugin("distributed", FLAGS_distributed_plugin);
}
}
+#endif
// Start event threads.
osquery::attachEvents();
| [No CFG could be retrieved] | This function is called when the initiator requested a configuration check and the application is shut down. This function is called when the main thread is requesting a shutdown. | Is this gate related to the process abstractions? Or just helpful since the distributed APIs are another can of porting worms? |
@@ -68,7 +68,7 @@ public class HiveSyncTool extends AbstractSyncTool {
try {
this.hoodieHiveClient = new HoodieHiveClient(cfg, configuration, fs);
- } catch (RuntimeException e) {
+ } catch (RuntimeException | HiveException | MetaException e) { //TODO-jsbali FIx this
if (cfg.ignoreExceptions) {
LOG.error("Got runtime exception when hive syncing, but continuing as ignoreExceptions config is set ", e);
} else {
| [HiveSyncTool->[syncHoodieTable->[syncHoodieTable],main->[syncHoodieTable]]] | This class is used to sync the table with the latest commit and the hive table. On read. | minor: revert this change? |
@@ -108,9 +108,13 @@ crt_corpc_initiate(struct crt_rpc_priv *rpc_priv)
if (grp_priv != NULL) {
grp_ref_taken = true;
} else {
- D_ERROR("crt_grp_lookup_grpid: %s failed.\n",
- co_hdr->coh_grpid);
- D_GOTO(out, rc = -DER_INVAL);
+ /* the local SG does not match others SG, so let's
+ * return GRPVER to retry until pool map is updated
+ * or the pool is stopped.
+ */
+ D_ERROR("crt_grp_lookup_grpid: %s failed: %d\n",
+ co_hdr->coh_grpid, -DER_GRPVER);
+ D_GOTO(out, rc = -DER_GRPVER);
}
}
| [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - - This function is called from the main function of the CRT. It is called by the. | just curious how can it happen? when pool created the sub-group should be created already, why in bcast the crt_grp_lookup_grpid() possibly fail? |
@@ -3343,7 +3343,8 @@ crt_group_primary_modify(crt_group_t *grp, crt_context_t *ctxs, int num_ctxs,
/* TODO: Change for multi-provider support */
for (k = 0; k < CRT_SRV_CONTEXT_NUM; k++) {
rc = grp_lc_uri_insert_internal_locked(grp_priv,
- k, rank, 0, uris[uri_idx[i]]);
+ k, rank, 0,
+ uris[uri_idx[i]]);
if (rc != 0)
D_GOTO(cleanup, rc);
| [No CFG could be retrieved] | Get back list of nodes to add to remove and uri list based on to_add list Remove ranks based on to_remove list and to_add list. | (style) line over 80 characters |
@@ -705,6 +705,7 @@ const char *dt_collection_name(dt_collection_properties_t prop)
case DT_COLLECTION_PROP_LOCAL_COPY: return _("local copy");
case DT_COLLECTION_PROP_MODULE: return _("module");
case DT_COLLECTION_PROP_ORDER: return _("module order");
+ case DT_COLLECTION_PROP_RATING: return _("image rating");
case DT_COLLECTION_PROP_LAST: return NULL;
default:
{
| [No CFG could be retrieved] | DATE - TIME - START - END get column name. | probably just "rating" here as already done in the code in different places. |
@@ -77,9 +77,7 @@ namespace Dynamo.Wpf.Views.GuidedTour
{
ContentRichTextBox.Visibility = Visibility.Hidden;
- if(webBrowserWindow == null)
- webBrowserWindow = new WebBrowserWindow(popupViewModel, hostControlInfo);
-
+ webBrowserWindow = new WebBrowserWindow(popupViewModel, hostControlInfo);
webBrowserWindow.IsOpen = true;
}
}
| [PopupWindow->[NextButton_Click->[OnGuidedTourNext,Sequence],PopupWindow_Opened->[IsOpen,Visibility,IsNullOrEmpty,FileName,HtmlPage,Hidden],CloseButton_Click->[OnStepClosed,Name,ToLower,OnGuidedTourFinish,StepType,GuideName],PopupWindow_Closed->[IsOpen],BackButton_Click->[Sequence,OnGuidedTourPrev],StartTourButton_Click->[OnGuidedTourNext,Sequence],InitializeComponent,HostUIElement,Height,Rect,HorizontalPopupOffSet,PopupPlacement,Width,VerticalPopupOffSet]] | Open the popup window. | Any reason we are removing the null check? |
@@ -555,6 +555,8 @@ export const adConfig = {
'kuadio': {},
+ 'lentainform': {},
+
'ligatus': {
prefetch: 'https://ssl.ligatus.com/render/ligrend.js',
renderStartImplemented: true,
| [No CFG could be retrieved] | The list of all possible links to the page that are currently available on the page. Provides a list of urls to the MADS API. | So I noticed here you removed implementing `renderStartImplemented`. If possible, could you please implement this? It helps us serve ads as fast as possible to our users, and gives us some big performance gains. If it's something you plan on supporting, and it's a server-side thing. I'm okay with merging this, and you can fix on your server Let me know what you think! |
@@ -894,7 +894,7 @@ class Profile
[
'label' => L10n::t('Status'),
'url' => $url,
- 'sel' => !$tab && $a->argv[0] == 'profile' ? 'active' : '',
+ 'sel' => !$tab && $a->argv[0] == 'profile' && (empty($a->argv[2]) || $a->argv[2] !== 'contacts') ? 'active' : '',
'title' => L10n::t('Status Messages and Posts'),
'id' => 'status-tab',
'accesskey' => 'm',
| [Profile->[zrlInit->[isSuccess,getBaseURL],load->[getCurrentTheme],openWebAuthInit->[getHostName]]] | Returns an array of tabs. add a link to the calendar Provides a tab that displays the new member tab. | Please avoid parameter specific logic in models. They should get retrieved in Module and passed to model => better decoupling |
@@ -64,9 +64,11 @@ import static org.infinispan.commons.util.Util.getInstance;
ClusteringDependentLogic.class, L1Manager.class, TransactionFactory.class, BackupSender.class,
TotalOrderManager.class, ByteBufferFactory.class, MarshalledEntryFactory.class,
RemoteValueRetrievedListener.class, InvocationContextFactory.class, CommitManager.class,
- XSiteStateTransferManager.class, XSiteStateConsumer.class, XSiteStateProvider.class})
+ XSiteStateTransferManager.class, XSiteStateConsumer.class, XSiteStateProvider.class, PartitionHandlingManager.class})
public class EmptyConstructorNamedCacheFactory extends AbstractNamedCacheComponentFactory implements AutoInstantiableFactory {
+ private static Log log = LogFactory.getLog(EmptyConstructorNamedCacheFactory.class);
+
@Override
@SuppressWarnings("unchecked")
public <T> T construct(Class<T> componentType) {
| [EmptyConstructorNamedCacheFactory->[construct->[CommandsFactoryImpl,MarshalledEntryFactoryImpl,isClustered,BackupSenderImpl,isReplicated,equals,XSiteStateTransferManagerImpl,EvictionManagerImpl,InvocationContextContainerImpl,keyEquivalence,XSiteStateConsumerImpl,DistributionLogic,PassivationManagerImpl,localSite,TransactionFactory,XSiteStateProviderImpl,LocalLogic,getComponent,CacheConfigurationException,getInstance,cacheMode,BatchContainer,RecoveryAdminOperations,TotalOrderManager,InvalidationLogic,CommitManager,ActivationManagerImpl,cast,StateTransferLockImpl,isTransactional,ReplicationLogic,CacheNotifierImpl,TransactionCoordinator,getName,ByteBufferFactoryImpl,isInvalidation,PersistenceManagerImpl,L1ManagerImpl]]] | Construct a new instance of the specified component type. Returns a new instance of the appropriate component type. | I like what was proposed elsewhere that we use the MethodHandles.lookup().lookupClass() instead of hardcoding the class name. |
@@ -56,7 +56,8 @@ public abstract class SCMDescriptor<T extends SCM> extends Descriptor<SCM> {
* @deprecated No longer used by default.
*/
@Deprecated
- public volatile int generation = 1;
+ @Restricted(NoExternalUse.class) @RestrictedSince("TODO")
+ public volatile AtomicInteger generation = new AtomicInteger(1);
protected SCMDescriptor(Class<T> clazz, Class<? extends RepositoryBrowser> repositoryBrowser) {
super(clazz);
| [SCMDescriptor->[load->[load],isApplicable->[isApplicable]]] | Descriptor for a type of a SCM. Load the last known field from the SCMDescriptor. | Making a variable atomic and volatile is redundant. The AtomicInteger (or any other AtomicReference) can be final as the volatile field is contained in those classes. |
@@ -14,6 +14,7 @@
#include <openssl/x509.h>
#include <openssl/asn1.h>
#include <openssl/engine.h>
+#include "conflcl.h"
/* Load all OpenSSL builtin modules */
| [OPENSSL_load_builtin_modules->[ASN1_add_oid_module,EVP_add_alg_module,ASN1_add_stable_module,ENGINE_add_conf_module]] | Load builtin modules. | Hmmm, we usually have a `_` before `lcl`... |
@@ -345,7 +345,7 @@ public class PhysicalPlanBuilderTest {
+ "TEST1.COL5 MAP<STRING, DOUBLE>] |"));
}
- @Test
+ // @Test
public void shouldCreateExecutionPlanForInsert() {
final String csasQuery = "CREATE STREAM s1 WITH (value_format = 'delimited') AS SELECT col0, col1, "
+ "col2 FROM "
| [PhysicalPlanBuilderTest->[shouldAddMetricsInterceptorsToExistingList->[buildPhysicalPlanBuilder,getCalls,buildPhysicalPlan],getNodeByName->[getNodeByName],execute->[execute],shouldBuildPersistentQueryWithCorrectSchema->[buildPhysicalPlan],shouldMakePersistentQuery->[buildPhysicalPlan],shouldAddMetricsInterceptors->[getCalls,buildPhysicalPlan],shouldHaveKStreamDataSource->[buildPhysicalPlan],shouldUseProvidedOptimizationConfig->[buildPhysicalPlanBuilder,getCalls,buildPhysicalPlan],before->[TestKafkaStreamsBuilder],shouldUseOptimizationConfigProvidedWhenOff->[shouldUseProvidedOptimizationConfig],shouldMakeBareQuery->[buildPhysicalPlan],shouldAddMetricsInterceptorsToExistingStringList->[buildPhysicalPlanBuilder,getCalls,buildPhysicalPlan],shouldBuildTransientQueryWithCorrectSchema->[buildPhysicalPlan],shouldAddMetricsInterceptorsToExistingString->[buildPhysicalPlanBuilder,getCalls,buildPhysicalPlan],buildPhysicalPlan->[buildPhysicalPlan],TestKafkaStreamsBuilder->[buildKafkaStreams->[Call]],shouldBuildForEachNodeForTransientQueries->[buildPhysicalPlan],shouldConfigureProducerErrorHandlerLogger->[buildPhysicalPlanBuilder,buildPhysicalPlan],shouldBuildMapValuesNodeForTransientQueries->[buildPhysicalPlan],shouldCreateExecutionPlan->[buildPhysicalPlan],shouldUseOptimizationConfigProvidedWhenOn->[shouldUseProvidedOptimizationConfig]]] | Test if the partition of the partition is in the physical plan. Should create execution plan for insert. | was this intentional? |
@@ -725,6 +725,8 @@ static obs_properties_t *vlcs_properties(void *data)
dstr_free(&filter);
dstr_free(&exts);
+ obs_properties_add_int(ppts, S_NETWORK_CACHING, T_NETWORK_CACHING, 100, 3600000, 10);
+
return ppts;
}
| [bool->[dstr_free,dstr_cmp,dstr_copy,dstr_ncopy,strchr],obs_properties_t->[obs_properties_create,dstr_cat,dstr_resize,pthread_mutex_lock,obs_properties_add_list,dstr_free,dstr_replace,dstr_copy,obs_properties_add_bool,da_end,obs_properties_add_editable_list,strrchr,dstr_cat_dstr,obs_property_list_add_string,pthread_mutex_unlock],int->[convert_vlc_audio_format,bfree,memset],const->[UNUSED_PARAMETER,obs_module_text],inline->[libvlc_media_new_path_,strstr,libvlc_media_new_location_],audio_format->[AUDIO_CONV,AUDIO_TEST],unsigned->[video_format_get_parameters,convert_vlc_video_format,libvlc_video_get_size_,obs_source_frame_free,obs_source_frame_init,get_format_lines],video_format->[CHROMA_CONV,CHROMA_TEST,CHROMA_CONV_FULL],libvlc_media_t->[strcmp,libvlc_media_retain_],void->[libvlc_media_list_unlock_,UNUSED_PARAMETER,obs_data_set_default_string,dstr_cat,obs_data_release,libvlc_media_list_player_set_media_list_,os_closedir,dstr_free,free_files,dstr_copy,valid_extension,obs_data_array_item,libvlc_media_list_player_set_media_player_,libvlc_media_list_player_set_playback_mode_,os_opendir,dstr_cat_ch,libvlc_video_set_format_callbacks_,get_audio_size,obs_data_set_default_bool,libvlc_video_set_callbacks_,libvlc_media_list_player_stop_,libvlc_media_list_player_pause_,libvlc_media_list_player_release_,obs_source_output_audio,libvlc_clock_,memcpy,obs_data_get_bool,pthread_mutex_init_value,libvlc_media_release_,libvlc_media_player_release_,os_get_path_extension,add_file,libvlc_media_player_new_,obs_data_get_string,bzalloc,libvlc_media_list_release_,vlcs_destroy,strstr,libvlc_audio_set_callbacks_,libvlc_media_list_add_media_,libvlc_media_list_new_,pthread_mutex_init,dstr_replace,create_media_from_file,obs_source_frame_free,obs_source_active,libvlc_media_add_option_,obs_source_output_video,load_libvlc,libvlc_media_list_player_play_,da_push_back,obs_data_array_release,libvlc_media_list_lock_,libvlc_media_player_event_manager_,obs_source_update,pthread_mutex_lock,libvlc_media_list_player_new_,libvlc_event_attach_,brealloc,da_init,os_readdir,da_free,obs_data_array_count,libvlc_audio_set_format_callbacks_,bfree,obs_data_get_array,astrcmpi,pthread_mutex_destroy,get_media,pthread_mutex_unlock]] | This method returns the list of observation properties for a given source. private static method to get the list of editable properties. | This line goes over the 80 character limit. Insert a line break after "100," (right after the comma), delete the proceeding space character (right before "3600000"), and insert two tabs to indent. |
@@ -150,9 +150,12 @@ define([
* Computes the geometric representation of a circle on an ellipsoid, including its vertices, indices, and a bounding sphere.
*
* @param {CircleGeometry} circleGeometry A description of the circle.
- * @returns {Geometry} The computed vertices and indices.
+ * @returns {Geometry|undefined} The computed vertices and indices.
*/
CircleGeometry.createGeometry = function(circleGeometry) {
+ if (!defined(circleGeometry._ellipseGeometry)) {
+ return;
+ }
return EllipseGeometry.createGeometry(circleGeometry._ellipseGeometry);
};
| [No CFG could be retrieved] | Computes the geometric representation of a circle on an ellipsoid including its vertices indices and bounding The CircleGeometry object for the national vertex. | This never happens because `_ellipseGeometry` is always defined in the constructor. Change the constructor so `this._ellipseGeometry` is only set to `new EllipseGeometry(...)` when `radius > 0` |
@@ -1,5 +1,8 @@
const fetch = require('cross-fetch')
+// Per Protocol Labs request, we add this param to any request we send to their cluster.
+const ORIGIN_PARAM = '?name=OriginProtocol'
+
class IpfsClusterApiService {
constructor(ifpsClusterUrl, username, password) {
this.ifpsClusterUrl = ifpsClusterUrl
| [No CFG could be retrieved] | Creates an instance of IpfsClusterApiService Get the status of a specific pin. | We might as well fix this typo in this PR too? |
@@ -501,13 +501,13 @@ class BaseFormatter:
class ArchiveFormatter(BaseFormatter):
KEY_DESCRIPTIONS = {
'name': 'archive name interpreted as text (might be missing non-text characters, see barchive)',
- 'archive': 'archive name interpreted as text (might be missing non-text characters, see barchive)',
+ 'archive': 'alias of "name"',
'barchive': 'verbatim archive name, can contain any character except NUL',
'comment': 'archive comment interpreted as text (might be missing non-text characters, see bcomment)',
'bcomment': 'verbatim archive comment, can contain any character except NUL',
'time': 'time (start) of creation of the archive',
# *start* is the key used by borg-info for this timestamp, this makes the formats more compatible
- 'start': 'time (start) of creation of the archive',
+ 'start': 'alias of "time"',
'end': 'time (end) of creation of the archive',
'id': 'internal ID of the archive',
}
| [BaseFormatter->[format_item->[get_item_data]],ellipsis_truncate->[swidth_slice],format_line->[InvalidPlaceholder,PlaceholderError],Location->[parse->[replace_placeholders],_parse->[normpath_special]],DatetimeWrapper->[__format__->[__format__]],json_print->[json_dump],ItemFormatter->[get_item_data->[remove_surrogates],__init__->[partial_format],available_keys->[get_item_data],format_item_json->[get_item_data],keys_help->[available_keys],format_iso_time->[format_time]],basic_json_data->[BorgJsonEncoder],replace_placeholders->[DatetimeWrapper,format_line],location_validator->[validator->[Location]],ArchiveFormatter->[get_item_data->[bin_to_hex,remove_surrogates],__init__->[partial_format],available_keys->[get_item_data],format_item_json->[get_item_data],get_comment->[remove_surrogates],keys_help->[available_keys]],sizeof_fmt_decimal->[sizeof_fmt],format_archive->[bin_to_hex],BorgJsonEncoder->[default->[bin_to_hex,canonical_path]],FileSize->[__format__->[format_file_size]],prepare_dump_dict->[decode->[decode_bytes,decode_tuple,decode],decode_bytes->[bin_to_hex],decode_tuple->[decode_tuple,decode_bytes],decode],sizeof_fmt_iec->[sizeof_fmt],FilesCacheMode] | Formats a sequence of a - ID keys. Return a list of keys that can be used to show the keys of the object. | maybe we could describe the more specific term (start, archive) and have the more generic one as alias (time, name). |
@@ -95,7 +95,7 @@ class Pexsi(MakefilePackage):
'make.inc'
)
shutil.copy(template, makefile)
- for key, value in substitutions.items():
+ for key, value in sorted(substitutions.items(), reverse=True):
filter_file(key, value, makefile)
def build(self, spec, prefix):
| [Pexsi->[build->[super,make],install->[install,join_path,mkdirp,install_tree],edit->[join_path,spec,dirname,copy,filter_file,join,items,getmodule],variant,depends_on,version]] | Edit a specific in the project. | Sorting this by key happens to work here, but that's only by coincidence, it doesn't give us much more control than alphabetic ordering. Let's replace the dictionary with a list of 2-tuples. That way we have explicit control over the ordering. This is how the `hpl` package works. |
@@ -11,6 +11,7 @@ if (0) { ?><script><?php }
elgg.config.lastcache = <?php echo (int)elgg_get_config('lastcache'); ?>;
elgg.config.viewtype = '<?php echo elgg_get_viewtype(); ?>';
elgg.config.simplecache_enabled = <?php echo (int)elgg_is_simplecache_enabled(); ?>;
+elgg.config.lastcache = <?php echo (int)elgg_get_config('lastcache'); ?>;
elgg.security.token.__elgg_ts = <?php echo $ts = time(); ?>;
elgg.security.token.__elgg_token = '<?php echo generate_action_token($ts); ?>';
| [toObject,isAdmin] | Initialize the javascript object with the uncacheable data. | That's a mistake |
@@ -38,7 +38,7 @@ if (count($slas > 0)) {
$rtt = $rttMonLatestRttOperTable['1.3.6.1.4.1.9.9.42.1.2.10.1.1'][$sla_nr];
echo 'SLA '.$sla_nr.': '.$rtt_type.' '.$sla['owner'].' '.$sla['tag'].'... '.$rtt.'ms at '.$time.'\n';
- $fields = array(
+ $metrics = array(
'rtt' => $rtt,
);
| [No CFG could be retrieved] | This function processes the Nagios - specific data for the given SLA. This function gathers all the metrics of the given RTT type. 1. 5. 2. 1. 47. | Probably best keeping this as `$fields` like it is everywhere else. |
@@ -593,6 +593,12 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
}
_storagePoolDetailsDao.addDetail(resourceId, name, value, true);
+ if (pool.getPoolType() == Storage.StoragePoolType.DatastoreCluster) {
+ List<StoragePoolVO> childDataStores = _storagePoolDao.listChildStoragePoolsInDatastoreCluster(resourceId);
+ for (StoragePoolVO childDataStore: childDataStores) {
+ _storagePoolDetailsDao.addDetail(childDataStore.getId(), name, value, true);
+ }
+ }
break;
| [ConfigurationManagerImpl->[updateConfiguration->[start,updateConfiguration],commitVlan->[doInTransaction->[createVlanAndPublicIpRange]],deletePod->[checkIfPodIsDeletable],checkPodCidrSubnets->[getCidrAddress,getCidrSize],createPod->[createPod,checkPodAttributes],editPod->[editPod,podHasAllocatedPrivateIPs,checkPodAttributes],releasePublicIpRange->[releasePublicIpRange],createNetworkOffering->[createNetworkOffering],createZone->[createZone,checkZoneParameters],createServiceOffering->[createServiceOffering],createPodIpRange->[getVlanNumberFromUri],createDiskOffering->[createDiskOffering],deleteVlanIpRange->[deleteVlanAndPublicIpRange],deleteZone->[checkIfZoneIsDeletable],savePublicIPRange->[doInTransaction->[savePublicIPRange]],createPortableIpRange->[checkOverlapPublicIpRange],editZone->[checkZoneParameters],hasSameSubnet->[checkIfSubsetOrSuperset],createVlanAndPublicIpRange->[checkOverlapPrivateIpRange],releaseDomainSpecificVirtualRanges->[doInTransactionWithoutResult->[releasePublicIpRange]],releaseAccountSpecificVirtualRanges->[doInTransactionWithoutResult->[releasePublicIpRange]]]] | Update the configuration in the DB. get the pool type Updates the host_details table if the name matches the name of the device in the database Checks if a configuration value has been set in the database. | I think both the entire `case StoragePool`-block and this part from it should be extracted. |
@@ -245,7 +245,12 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it,
if (!type || !pkey) {
ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ASN1_R_CONTEXT_NOT_INITIALISED);
- return 0;
+ goto err;
+ }
+
+ if (!pkey->ameth) {
+ ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED);
+ goto err;
}
if (pkey->ameth->item_sign) {
| [ASN1_item_sign->[ASN1err,EVP_DigestSignInit,EVP_MD_CTX_new,EVP_MD_CTX_free,ASN1_item_sign_ctx],ASN1_item_sign_ctx->[EVP_PKEY_size,EVP_DigestSignUpdate,EVP_DigestSignFinal,ASN1err,EVP_MD_CTX_pkey_ctx,OBJ_find_sigid_by_algs,EVP_MD_nid,OPENSSL_free,X509_ALGOR_set0,OPENSSL_clear_free,OBJ_nid2obj,ASN1_item_i2d,EVP_MD_CTX_free,OPENSSL_malloc,EVP_PKEY_CTX_get0_pkey,EVP_MD_CTX_md],ASN1_sign->[ASN1_TYPE_new,EVP_SignInit_ex,ASN1err,OPENSSL_free,OPENSSL_clear_free,OBJ_nid2obj,EVP_SignUpdate,EVP_MD_CTX_new,ASN1_TYPE_free,EVP_MD_CTX_free,OPENSSL_malloc,EVP_PKEY_size,ASN1_OBJECT_free,EVP_SignFinal,i2d]] | item_sign_ctx - signature - signature of an item. private methods for ASN. 1_PKEY_SIGPARAM. | as long as you'r changing things, please make this `==NULL` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.